aboutsummaryrefslogtreecommitdiff
path: root/gdb/solib-frv.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2009-11-02 14:50:29 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2009-11-02 14:50:29 +0000
commitabd0a5fa917322975ca664878f29de21fa878e21 (patch)
tree6d589ca1a511d6f8633d523498418394425e4d45 /gdb/solib-frv.c
parent62f3b8c86784407e864ddf7698b9852cb76aa339 (diff)
downloadgdb-abd0a5fa917322975ca664878f29de21fa878e21.zip
gdb-abd0a5fa917322975ca664878f29de21fa878e21.tar.gz
gdb-abd0a5fa917322975ca664878f29de21fa878e21.tar.bz2
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 b8d5528..1a22735 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;
}