From: Tristan Gingold Date: Thu, 4 Feb 2010 12:45:49 +0000 (+0000) Subject: 2010-02-04 Tristan Gingold X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2d33f7b84c60fc8fa2c9913d754edc54163355d6;p=binutils-gdb.git 2010-02-04 Tristan Gingold * machoread.c (macho_add_oso): Renamed to macho_register_oso. (macho_symtab_read): Adjust calls to macho_add_oso. (macho_oso_symfile): Renamed to macho_symfile_read_all_oso. (macho_symfile_read): Adjust call to macho_oso_symfile. (macho_new_init): Move this function after declarations. (macho_symfile_init): Ditto. * darwin-nat-info.c (darwin_lib_gdb_ports): Remove. * darwin-nat.c (darwin_lookup_task): Remove unused prototype. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index f3fa776a6ba..7e3f057d40f 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,14 @@ +2010-02-04 Tristan Gingold + + * machoread.c (macho_add_oso): Renamed to macho_register_oso. + (macho_symtab_read): Adjust calls to macho_add_oso. + (macho_oso_symfile): Renamed to macho_symfile_read_all_oso. + (macho_symfile_read): Adjust call to macho_oso_symfile. + (macho_new_init): Move this function after declarations. + (macho_symfile_init): Ditto. + * darwin-nat-info.c (darwin_lib_gdb_ports): Remove. + * darwin-nat.c (darwin_lookup_task): Remove unused prototype. + 2010-02-04 Vladimir Prus Include MI command in remotelog. diff --git a/gdb/darwin-nat-info.c b/gdb/darwin-nat-info.c index a0f4fbe3b84..4bcb88abc64 100644 --- a/gdb/darwin-nat-info.c +++ b/gdb/darwin-nat-info.c @@ -843,32 +843,6 @@ info_mach_exceptions_command (char *args, int from_tty) } } -static void -darwin_list_gdb_ports (const char *msg) -{ - mach_port_name_array_t names; - mach_port_type_array_t types; - unsigned int name_count, type_count; - kern_return_t result; - int i; - - result = mach_port_names (mach_task_self (), - &names, &name_count, &types, &type_count); - MACH_CHECK_ERROR (result); - - gdb_assert (name_count == type_count); - - printf_unfiltered (_("Ports for %s:"), msg); - for (i = 0; i < name_count; ++i) - printf_unfiltered (_(" 0x%04x"), names[i]); - printf_unfiltered (_("\n")); - - vm_deallocate (mach_task_self (), (vm_address_t) names, - (name_count * sizeof (mach_port_t))); - vm_deallocate (mach_task_self (), (vm_address_t) types, - (type_count * sizeof (mach_port_type_t))); -} - void _initialize_darwin_info_commands (void) { diff --git a/gdb/darwin-nat.c b/gdb/darwin-nat.c index ea2910566d0..535720df172 100644 --- a/gdb/darwin-nat.c +++ b/gdb/darwin-nat.c @@ -99,8 +99,6 @@ static ptid_t darwin_wait (ptid_t ptid, struct target_waitstatus *status); static void darwin_mourn_inferior (struct target_ops *ops); -static int darwin_lookup_task (char *args, task_t * ptask, int *ppid); - static void darwin_kill_inferior (struct target_ops *ops); static void darwin_ptrace_me (void); diff --git a/gdb/machoread.c b/gdb/machoread.c index be9e2a57133..3894236fc3f 100644 --- a/gdb/machoread.c +++ b/gdb/machoread.c @@ -38,18 +38,6 @@ /* If non-zero displays debugging message. */ static int mach_o_debug_level = 0; -static void -macho_new_init (struct objfile *objfile) -{ -} - -static void -macho_symfile_init (struct objfile *objfile) -{ - objfile->flags |= OBJF_REORDERED; - init_entry_point_info (objfile); -} - /* Dwarf debugging information are never in the final executable. They stay in object files and the executable contains the list of object files read during the link. @@ -77,15 +65,28 @@ typedef struct oso_el } oso_el; -/* Vector of object files to be read after the executable. */ +/* Vector of object files to be read after the executable. This is one + global variable but it's life-time is the one of macho_symfile_read. */ DEF_VEC_O (oso_el); static VEC (oso_el) *oso_vector; -/* Add a new OSO to the vector. */ +static void +macho_new_init (struct objfile *objfile) +{ +} + +static void +macho_symfile_init (struct objfile *objfile) +{ + objfile->flags |= OBJF_REORDERED; + init_entry_point_info (objfile); +} + +/* Add a new OSO to the vector of OSO to load. */ static void -macho_add_oso (const asymbol *oso_sym, int nbr_sections, - asymbol **symbols, bfd_vma *offsets) +macho_register_oso (const asymbol *oso_sym, int nbr_sections, + asymbol **symbols, bfd_vma *offsets) { oso_el el; @@ -135,8 +136,8 @@ macho_symtab_read (struct objfile *objfile, /* An empty SO entry terminates a chunk for an OSO file. */ if ((sym->name == NULL || sym->name[0] == 0) && oso_file != NULL) { - macho_add_oso (oso_file, nbr_sections, - first_symbol, first_offset); + macho_register_oso (oso_file, nbr_sections, + first_symbol, first_offset); first_symbol = NULL; first_offset = NULL; oso_file = NULL; @@ -258,7 +259,7 @@ macho_symtab_read (struct objfile *objfile, /* Just in case there is no trailing SO entry. */ if (oso_file != NULL) - macho_add_oso (oso_file, nbr_sections, first_symbol, first_offset); + macho_register_oso (oso_file, nbr_sections, first_symbol, first_offset); } /* If NAME describes an archive member (ie: ARCHIVE '(' MEMBER ')'), @@ -303,7 +304,7 @@ macho_add_oso_symfile (oso_el *oso, bfd *abfd, if (mach_o_debug_level > 0) printf_unfiltered (_("Loading symbols from oso: %s\n"), oso->name); - + if (!bfd_check_format (abfd, bfd_object)) { warning (_("`%s': can't read symbols: %s."), oso->name, @@ -382,7 +383,7 @@ macho_add_oso_symfile (oso_el *oso, bfd *abfd, /* Read symbols from the vector of oso files. */ static void -macho_oso_symfile (struct objfile *main_objfile, int symfile_flags) +macho_symfile_read_all_oso (struct objfile *main_objfile, int symfile_flags) { int ix; VEC (oso_el) *vec; @@ -684,7 +685,7 @@ macho_symfile_read (struct objfile *objfile, int symfile_flags) /* Then the oso. */ if (oso_vector != NULL) - macho_oso_symfile (objfile, symfile_flags); + macho_symfile_read_all_oso (objfile, symfile_flags); } static void