Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] print_frame add info
@ 2012-12-18  1:40 William Douglas
  2012-12-18  8:33 ` Jan Kratochvil
  0 siblings, 1 reply; 5+ messages in thread
From: William Douglas @ 2012-12-18  1:40 UTC (permalink / raw)
  To: gdb-patches

Hi all,

I want to have gdb's output for shared objects' stack frames changed to
append the from /path/to/lib.so.1 even if the function name or file name
are available.

It would make things easier for me when I don't readily know what
library a certain file is in and the change doesn't seem especially
drastic.

Any comments on this change?

--

diff --git a/gdb/stack.c b/gdb/stack.c
index 51747ea..9d28b74 100644
--- a/gdb/stack.c
+++ b/gdb/stack.c
@@ -1198,7 +1198,7 @@ print_frame (struct frame_info *frame, int
print_level,
       annotate_frame_source_end ();
     }
 
-  if (pc_p && (!funname || (!sal.symtab || !sal.symtab->filename)))
+  if (pc_p)
     {
 #ifdef PC_SOLIB
       char *lib = PC_SOLIB (get_frame_pc (frame));

-- 
William Douglas, Intel Open Source Technology Center


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] print_frame add info
  2012-12-18  1:40 [PATCH] print_frame add info William Douglas
@ 2012-12-18  8:33 ` Jan Kratochvil
  2012-12-18 16:08   ` Tom Tromey
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Kratochvil @ 2012-12-18  8:33 UTC (permalink / raw)
  To: William Douglas; +Cc: gdb-patches

Hello,

On Tue, 18 Dec 2012 02:51:39 +0100, William Douglas wrote:
> I want to have gdb's output for shared objects' stack frames changed to
> append the from /path/to/lib.so.1 even if the function name or file name
> are available.
> 
> It would make things easier for me when I don't readily know what
> library a certain file is in and the change doesn't seem especially
> drastic.

This is a several years lasting plan.  It was at least posted in:
	http://sourceware.org/ml/gdb-patches/2011-07/msg00796.html

* It should be configurable.

  * One of the options should be to print just basename.so.
    The lines should not become needlessly long.

* IMO it should be before the function name so that one can copy-paste it as
  a linespec to "break" and other commands.
  But linespec should be able to parse "objectname:funcname" which it
  currently cannot.

And I was not sure how well will one parse "objectname:funcname" in linespec,
Keith Seitz is rewriting the linespec parser somehow.


Thanks,
Jan


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] print_frame add info
  2012-12-18  8:33 ` Jan Kratochvil
@ 2012-12-18 16:08   ` Tom Tromey
  2012-12-18 21:52     ` Douglas, William
  0 siblings, 1 reply; 5+ messages in thread
From: Tom Tromey @ 2012-12-18 16:08 UTC (permalink / raw)
  To: Jan Kratochvil; +Cc: William Douglas, gdb-patches

>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:

Jan> * IMO it should be before the function name so that one can
Jan> copy-paste it as a linespec to "break" and other commands.  But
Jan> linespec should be able to parse "objectname:funcname" which it
Jan> currently cannot.

Jan> And I was not sure how well will one parse "objectname:funcname" in
Jan> linespec, Keith Seitz is rewriting the linespec parser somehow.

I don't think the linespec change should be a prerequisite to changing
how the stack frame is displayed.
I agree with your other points though.

Tom


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] print_frame add info
  2012-12-18 16:08   ` Tom Tromey
@ 2012-12-18 21:52     ` Douglas, William
  2012-12-19  7:07       ` Jan Kratochvil
  0 siblings, 1 reply; 5+ messages in thread
From: Douglas, William @ 2012-12-18 21:52 UTC (permalink / raw)
  To: Tom Tromey; +Cc: Jan Kratochvil, gdb-patches

On Tue, Dec 18, 2012 at 8:07 AM, Tom Tromey <tromey@redhat.com> wrote:
>>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:
>
> Jan> * IMO it should be before the function name so that one can
> Jan> copy-paste it as a linespec to "break" and other commands.  But
> Jan> linespec should be able to parse "objectname:funcname" which it
> Jan> currently cannot.
>
> Jan> And I was not sure how well will one parse "objectname:funcname" in
> Jan> linespec, Keith Seitz is rewriting the linespec parser somehow.
>
> I don't think the linespec change should be a prerequisite to changing
> how the stack frame is displayed.
> I agree with your other points though.
>

Okay so would a patch be acceptable with iam's original changes
getting updated per that thread then?


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] print_frame add info
  2012-12-18 21:52     ` Douglas, William
@ 2012-12-19  7:07       ` Jan Kratochvil
  0 siblings, 0 replies; 5+ messages in thread
From: Jan Kratochvil @ 2012-12-19  7:07 UTC (permalink / raw)
  To: Douglas, William; +Cc: Tom Tromey, gdb-patches

On Tue, 18 Dec 2012 22:52:21 +0100, Douglas, William wrote:
> Okay so would a patch be acceptable with iam's original changes
> getting updated per that thread then?

The original iam's patch is being reworked in
	archer-jankratochvil-absdir
	http://sourceware.org/gdb/wiki/ArcherBranchManagement
and hopefully to be finished this week, or maybe the next one.

Currently it has
	set filename-display {absolute|basename|relative}
with (current) default "relative" but for the shared libraries "relative" has
no meaning and moreover we want to also have an option "none" (the current
one).

So I see I should rename the option above rather to "set source-filename" as
"filename" is too ambiguous.

And this discussed feature should be unrelated to it with new option:
	set solib-filename {none|absolute|basename}
with current default still "none", or something like that, what do you think?

Both options should default to something else than what is the current
behavior but that should be done in a separate patch afterwards.


Thanks,
Jan


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-12-19  7:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-18  1:40 [PATCH] print_frame add info William Douglas
2012-12-18  8:33 ` Jan Kratochvil
2012-12-18 16:08   ` Tom Tromey
2012-12-18 21:52     ` Douglas, William
2012-12-19  7:07       ` Jan Kratochvil

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox