From 8fac53967c6574e472a6d911a0bc0826b524512f Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Mon, 2 Nov 2009 14:50:26 +0000 Subject: gdb/ Remove INVALID_ENTRY_POINT. * frame.c (inside_entry_func): New variable entry_point. Return 0 if the entry point is not known. * solib-irix.c (enable_break): Likewise. * objfiles.c (init_entry_point_info): Stop using INVALID_ENTRY_POINT. Initialize EI.ENTRY_POINT_P. (entry_point_address): Rename to ... (entry_point_address_query): ... a new function. Use EI.ENTRY_POINT_P. (entry_point_address): New function. (objfile_relocate): Use EI.ENTRY_POINT_P. * objfiles.h (struct entry_info): Simplify entry_point comment. New field entry_point_p. (INVALID_ENTRY_POINT): Remove. (entry_point_address_query): New prototype. * solib-frv.c (enable_break): Check for NULL SYMFILE_OBJFILE and its EI.ENTRY_POINT_P. Return 0 if ".interp" is not found. --- gdb/solib-frv.c | 41 +++++++++++++++++++++++++++-------------- 1 file changed, 27 insertions(+), 14 deletions(-) (limited to 'gdb/solib-frv.c') diff --git a/gdb/solib-frv.c b/gdb/solib-frv.c index b8d5528d5fb..1a22735a4c1 100644 --- a/gdb/solib-frv.c +++ b/gdb/solib-frv.c @@ -822,30 +822,43 @@ enable_break (void) may have changed since the last time we ran the program. */ remove_solib_event_breakpoints (); - /* Check for the presence of a .interp section. If there is no - such section, the executable is statically linked. */ - - interp_sect = bfd_get_section_by_name (exec_bfd, ".interp"); - - if (interp_sect) + if (symfile_objfile == NULL) { - enable_break1_done = 1; - create_solib_event_breakpoint (target_gdbarch, - symfile_objfile->ei.entry_point); + if (solib_frv_debug) + fprintf_unfiltered (gdb_stdlog, + "enable_break: No symbol file found.\n"); + return 0; + } + if (!symfile_objfile->ei.entry_point_p) + { if (solib_frv_debug) fprintf_unfiltered (gdb_stdlog, - "enable_break: solib event breakpoint placed at entry point: %s\n", - hex_string_custom - (symfile_objfile->ei.entry_point, 8)); + "enable_break: Symbol file has no entry point.\n"); + return 0; } - else + + /* Check for the presence of a .interp section. If there is no + such section, the executable is statically linked. */ + + interp_sect = bfd_get_section_by_name (exec_bfd, ".interp"); + + if (interp_sect == NULL) { if (solib_frv_debug) fprintf_unfiltered (gdb_stdlog, - "enable_break: No .interp section found.\n"); + "enable_break: No .interp section found.\n"); + return 0; } + enable_break1_done = 1; + create_solib_event_breakpoint (target_gdbarch, + symfile_objfile->ei.entry_point); + + if (solib_frv_debug) + fprintf_unfiltered (gdb_stdlog, + "enable_break: solib event breakpoint placed at entry point: %s\n", + hex_string_custom (symfile_objfile->ei.entry_point, 8)); return 1; } -- cgit v1.2.1