aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2011-04-17 18:09:02 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2011-04-17 18:09:02 +0000
commit90359a167375927982fc3f675718044a491da759 (patch)
tree259ce4fcbdee8ffc4b0c46172c8f16b3e335e665 /gdb
parent626e7282148f31aa82bcdaffe613fcf326914d76 (diff)
downloadgdb-90359a167375927982fc3f675718044a491da759.zip
gdb-90359a167375927982fc3f675718044a491da759.tar.gz
gdb-90359a167375927982fc3f675718044a491da759.tar.bz2
gdb/
* elfread.c (elf_symtab_read): Do not ignore .L symbols if they are BSF_SYNTHETIC. gdb/testsuite/ * gdb.base/callfuncs.c (Lcallfunc, callfunc): New functions. * gdb.base/callfuncs.exp (print callfunc (Lcallfunc, 5)): New test.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/elfread.c6
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/gdb.base/callfuncs.c12
-rw-r--r--gdb/testsuite/gdb.base/callfuncs.exp5
5 files changed, 32 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index e81afd7..b44889e 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2011-04-17 Jan Kratochvil <jan.kratochvil@redhat.com>
+ * elfread.c (elf_symtab_read): Do not ignore .L symbols if they are
+ BSF_SYNTHETIC.
+
+2011-04-17 Jan Kratochvil <jan.kratochvil@redhat.com>
+
Fix Python access to inlined frames.
* python/py-frame.c (frapy_read_var): Find BLOCK using get_frame_block.
* python/py-symbol.c (gdbpy_lookup_symbol): Likewise.
diff --git a/gdb/elfread.c b/gdb/elfread.c
index b9cfa13..2d589a4 100644
--- a/gdb/elfread.c
+++ b/gdb/elfread.c
@@ -412,7 +412,11 @@ elf_symtab_read (struct objfile *objfile, int type,
else
ms_type = mst_text;
}
- else if ((sym->name[0] == '.' && sym->name[1] == 'L')
+ /* The BSF_SYNTHETIC check is there to omit ppc64 function
+ descriptors mistaken for static functions starting with 'L'.
+ */
+ else if ((sym->name[0] == '.' && sym->name[1] == 'L'
+ && (sym->flags & BSF_SYNTHETIC) == 0)
|| ((sym->flags & BSF_LOCAL)
&& sym->name[0] == '$'
&& sym->name[1] == 'L'))
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index af1fd5f..f1f8d3c 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,10 @@
2011-04-17 Jan Kratochvil <jan.kratochvil@redhat.com>
+ * gdb.base/callfuncs.c (Lcallfunc, callfunc): New functions.
+ * gdb.base/callfuncs.exp (print callfunc (Lcallfunc, 5)): New test.
+
+2011-04-17 Jan Kratochvil <jan.kratochvil@redhat.com>
+
Fix Python access to inlined frames.
* gdb.python/py-frame-inline.c: New file.
* gdb.python/py-frame-inline.exp: New file.
diff --git a/gdb/testsuite/gdb.base/callfuncs.c b/gdb/testsuite/gdb.base/callfuncs.c
index 2d40650..406d22a 100644
--- a/gdb/testsuite/gdb.base/callfuncs.c
+++ b/gdb/testsuite/gdb.base/callfuncs.c
@@ -510,3 +510,15 @@ int main ()
t_structs_c(struct_val1);
return 0 ;
}
+
+static int
+Lcallfunc (int arg)
+{
+ return arg + 1;
+}
+
+int
+callfunc (int (*func) (int value), int value)
+{
+ return Lcallfunc (0) * 0 + func (value) * 2;
+}
diff --git a/gdb/testsuite/gdb.base/callfuncs.exp b/gdb/testsuite/gdb.base/callfuncs.exp
index 97efacb..27ebd1e 100644
--- a/gdb/testsuite/gdb.base/callfuncs.exp
+++ b/gdb/testsuite/gdb.base/callfuncs.exp
@@ -458,3 +458,8 @@ if {![target_info exists gdb,nosignals] && ![istarget "*-*-uclinux*"]} {
gdb_test {set $sp = $old_sp}
}
+
+# Test function descriptor resolution - the separate debug info .opd section
+# handling vs. local labels `.L'... as `Lcallfunc' starts with `L'.
+
+gdb_test "print callfunc (Lcallfunc, 5)" " = 12"