summaryrefslogtreecommitdiff
path: root/gdb/solib-frv.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2009-11-02 14:50:26 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2009-11-02 14:50:26 +0000
commit8fac53967c6574e472a6d911a0bc0826b524512f (patch)
tree111ec4c20f5fc7f86e116612002e26c5fca96478 /gdb/solib-frv.c
parent1f84894efaa1f703f85c704b02b15ea540983c09 (diff)
downloadgdb-8fac53967c6574e472a6d911a0bc0826b524512f.tar.gz
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.
Diffstat (limited to 'gdb/solib-frv.c')
-rw-r--r--gdb/solib-frv.c41
1 files changed, 27 insertions, 14 deletions
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;
}