-
- return sp+1;
-}
-
-#ifdef MACH_KDB
-/*
- * This routine returns the section command for the symbol table in the
- * named segment for the mach_header pointer passed to it if it exist.
- * Otherwise it returns zero.
- */
-static struct symtab_command *
-getsectcmdsymtabfromheader(
- kernel_mach_header_t *mhp)
-{
- kernel_segment_command_t *sgp;
- unsigned long i;
-
- sgp = (kernel_segment_command_t *)
- ((uintptr_t)mhp + sizeof(kernel_mach_header_t));
- for(i = 0; i < mhp->ncmds; i++){
- if(sgp->cmd == LC_SYMTAB)
- return((struct symtab_command *)sgp);
- sgp = (kernel_segment_command_t *)((uintptr_t)sgp + sgp->cmdsize);
- }
- return((struct symtab_command *)NULL);
-}
-
-boolean_t getsymtab(kernel_mach_header_t *header,
- vm_offset_t *symtab,
- int *nsyms,
- vm_offset_t *strtab,
- vm_size_t *strtabsize)
-{
- kernel_segment_command_t *seglink_cmd;
- struct symtab_command *symtab_cmd;
-
- seglink_cmd = NULL;
-
- if((header->magic != MH_MAGIC)
- && (header->magic != MH_MAGIC_64)) { /* Check if this is a valid header format */
- return (FALSE); /* Bye y'all... */