Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [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

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