diff options
Diffstat (limited to 'gdb/objfiles.c')
-rw-r--r-- | gdb/objfiles.c | 20 |
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); +} |