From: "Sangamesh Mallayya" <sangamesh.swamy@in.ibm.com>
To: gdb-patches@sourceware.org
Cc: "Ulrich Weigand" <Ulrich.Weigand@de.ibm.com>
Subject: [PATCH] Make name of current file as pst->filename instead of _start_ in AIX
Date: Fri, 21 Oct 2016 14:01:00 -0000 [thread overview]
Message-ID: <OF0AE02BA0.ADAB0D03-ON65258053.004B0FB7-65258053.004D09EE@notes.na.collabserv.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2059 bytes --]
Hi,
When -qfuncsect xlc or -ffunction-section gcc compiler option is used in
AIX, each function csect will be 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.
Here is the summary of regression run with both xlc/gcc compiler.
gcc with -ffunction-sections and without pst filename change
------------------------------------------------------------
# of expected passes 7469
# of unexpected failures 4104
# of unexpected successes 1
# of expected failures 13
# of unresolved testcases 4
# of untested testcases 54
# of unsupported tests 30
gcc with -ffunction-sections and with pst filename change
---------------------------------------------------------
# of expected passes 8608
# of unexpected failures 3085
# of unexpected successes 1
# of expected failures 14
# of unresolved testcases 4
# of untested testcases 58
# of unsupported tests 30
xlc with -qfuncsect and without pst filename change
---------------------------------------------------
# of expected passes 2779
# of unexpected failures 2721
# of expected failures 10
# of unresolved testcases 71
# of untested testcases 92
# of unsupported tests 15
xlc with -qfuncsect and with pst filename change
------------------------------------------------
# of expected passes 2795
# of unexpected failures 2704
# of expected failures 10
# of unresolved testcases 72
# of untested testcases 92
# of unsupported tests 15
Thanks,
-Sangamesh
[-- Attachment #2: ChangeLog --]
[-- Type: application/octet-stream, Size: 302 bytes --]
* xcoffread.c (read_xcoff_symtab): Make name of current file as
pst->filename instead of _start_ in 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.
[-- Attachment #3: pst_file.patch --]
[-- Type: application/octet-stream, Size: 506 bytes --]
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. */
next reply other threads:[~2016-10-21 14:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-21 14:01 Sangamesh Mallayya [this message]
2016-10-21 15:50 ` Ulrich Weigand
2016-10-23 16:10 ` Sangamesh Mallayya
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=OF0AE02BA0.ADAB0D03-ON65258053.004B0FB7-65258053.004D09EE@notes.na.collabserv.com \
--to=sangamesh.swamy@in.ibm.com \
--cc=Ulrich.Weigand@de.ibm.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox