This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb] Fix symbol table file name on AIX
- From: Ulrich Weigand <uweigand at sourceware dot org>
- To: gdb-cvs at sourceware dot org
- Date: 21 Oct 2016 15:48:23 -0000
- Subject: [binutils-gdb] Fix symbol table file name on AIX
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=d11261fc63ecbf9f3487be906a4e720b4b20fb42
commit d11261fc63ecbf9f3487be906a4e720b4b20fb42
Author: Ulrich Weigand <ulrich.weigand@de.ibm.com>
Date: Fri Oct 21 17:47:15 2016 +0200
Fix symbol table file name on AIX
When xlc -qfuncsect or gcc -ffunction-sections options is used in AIX,
each function csect is associated with each psymtab, so each psymtab
will have it's corresponding filename entries set.
If the pst filename isn't set then we will be seeing the below output
when we set a breakpoint.
(gdb) br main
Breakpoint 1 at 0x10000374: file _start_ , line 18.
With the fix it will be.
(gdb) br main
Breakpoint 1 at 0x10000518: file test.c, line 24.
Attached patch resolve this issue and correct filename will be set.
gdb/
2016-10-21 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
Ulrich Weigand <uweigand@de.ibm.com>
* xcoffread.c (read_xcoff_symtab): Make name of current file as
pst->filename instead of _start_ in AIX.
Signed-off-by: Ulrich Weigand <ulrich.weigand@de.ibm.com>
Diff:
---
gdb/ChangeLog | 6 ++++++
gdb/xcoffread.c | 2 +-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index a8ab8b0..104e3cb 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2016-10-21 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
+ Ulrich Weigand <uweigand@de.ibm.com>
+
+ * xcoffread.c (read_xcoff_symtab): Make name of current file as
+ pst->filename instead of _start_ in AIX.
+
2016-10-21 Philipp Rudo <prudo@linux.vnet.ibm.com>
* solist.h (struct target_so_ops): Delete special_symbol_handling
diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c
index 507baf2..02c1e5a 100644
--- a/gdb/xcoffread.c
+++ b/gdb/xcoffread.c
@@ -1026,7 +1026,7 @@ read_xcoff_symtab (struct objfile *objfile, struct partial_symtab *pst)
union internal_auxent fcn_aux_saved = main_aux;
struct context_stack *newobj;
- char *filestring = " _start_ "; /* Name of the current file. */
+ char *filestring = pst->filename; /* Name of the current file. */
const char *last_csect_name; /* Last seen csect's name. */