* [PATCH] Make name of current file as pst->filename instead of _start_ in AIX
@ 2016-10-21 14:01 Sangamesh Mallayya
2016-10-21 15:50 ` Ulrich Weigand
0 siblings, 1 reply; 3+ messages in thread
From: Sangamesh Mallayya @ 2016-10-21 14:01 UTC (permalink / raw)
To: gdb-patches; +Cc: Ulrich Weigand
[-- 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. */
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Make name of current file as pst->filename instead of _start_ in AIX
2016-10-21 14:01 [PATCH] Make name of current file as pst->filename instead of _start_ in AIX Sangamesh Mallayya
@ 2016-10-21 15:50 ` Ulrich Weigand
2016-10-23 16:10 ` Sangamesh Mallayya
0 siblings, 1 reply; 3+ messages in thread
From: Ulrich Weigand @ 2016-10-21 15:50 UTC (permalink / raw)
To: Sangamesh Mallayya; +Cc: gdb-patches, Ulrich Weigand
Sangamesh Mallayya wrote:
> 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.
This is OK. I've checked the patch in now.
Thanks,
Ulrich
--
Dr. Ulrich Weigand
GNU/Linux compilers and toolchain
Ulrich.Weigand@de.ibm.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Make name of current file as pst->filename instead of _start_ in AIX
2016-10-21 15:50 ` Ulrich Weigand
@ 2016-10-23 16:10 ` Sangamesh Mallayya
0 siblings, 0 replies; 3+ messages in thread
From: Sangamesh Mallayya @ 2016-10-23 16:10 UTC (permalink / raw)
To: Ulrich Weigand; +Cc: gdb-patches, Ulrich Weigand
Thanks a lot!
Thanks,
-Sangamesh
From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: Sangamesh Mallayya/India/IBM@IBMIN
Cc: gdb-patches@sourceware.org, Ulrich.Weigand@de.ibm.com (Ulrich
Weigand)
Date: 10/21/2016 09:20 PM
Subject: Re: [PATCH] Make name of current file as pst->filename
instead of _start_ in AIX
Sangamesh Mallayya wrote:
> 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.
This is OK. I've checked the patch in now.
Thanks,
Ulrich
--
Dr. Ulrich Weigand
GNU/Linux compilers and toolchain
Ulrich.Weigand@de.ibm.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-10-23 16:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-21 14:01 [PATCH] Make name of current file as pst->filename instead of _start_ in AIX Sangamesh Mallayya
2016-10-21 15:50 ` Ulrich Weigand
2016-10-23 16:10 ` Sangamesh Mallayya
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox