aboutsummaryrefslogtreecommitdiff
path: root/gdb/objfiles.c
diff options
context:
space:
mode:
authorPeter Schauer <Peter.Schauer@mytum.de>1994-04-01 08:50:03 +0000
committerPeter Schauer <Peter.Schauer@mytum.de>1994-04-01 08:50:03 +0000
commit38b90473602f5c7295242ec0cce8f804d171bcbf (patch)
tree9e835890af03c6a3c8c8cc2205180734280ad1a3 /gdb/objfiles.c
parent01f8d30971233e0c259278adf41cc870837e3aed (diff)
downloadgdb-38b90473602f5c7295242ec0cce8f804d171bcbf.zip
gdb-38b90473602f5c7295242ec0cce8f804d171bcbf.tar.gz
gdb-38b90473602f5c7295242ec0cce8f804d171bcbf.tar.bz2
For SVR4 targets, enable gdb to set breakpoints in shared
library functions before the executable is run. * elfread.c (elf_symtab_read): Handle symbols for shared library functions. * sparc-tdep.c (in_solib_trampoline): Renamed to in_plt_section and moved to objfiles.c. * objfiles.c (in_plt_section): Moved to here from sparc-tdep. * config/tm-sysv4.h (IN_SOLIB_TRAMPOLINE): Use new in_plt_section. * config/sparc/tm-sun4sol2.h (IN_SOLIB_TRAMPOLINE): Removed, the new generic definition from tm-sysv4.h works for Solaris.
Diffstat (limited to 'gdb/objfiles.c')
-rw-r--r--gdb/objfiles.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/gdb/objfiles.c b/gdb/objfiles.c
index 4f0dfd6..530e19b 100644
--- a/gdb/objfiles.c
+++ b/gdb/objfiles.c
@@ -825,3 +825,23 @@ find_pc_section(pc)
return(NULL);
}
+
+/* In SVR4, we recognize a trampoline by it's section name.
+ That is, if the pc is in a section named ".plt" then we are in
+ a trampoline. */
+
+int
+in_plt_section(pc, name)
+ CORE_ADDR pc;
+ char *name;
+{
+ struct obj_section *s;
+ int retval = 0;
+
+ s = find_pc_section(pc);
+
+ retval = (s != NULL
+ && s->the_bfd_section->name != NULL
+ && STREQ (s->the_bfd_section->name, ".plt"));
+ return(retval);
+}