From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Tom Tromey <tromey@redhat.com>
Cc: gdb-patches@sourceware.org, Eli Zaretskii <eliz@gnu.org>
Subject: Re: [2/2] RFA: implement 'set print symbol'
Date: Tue, 10 Apr 2012 08:19:00 -0000 [thread overview]
Message-ID: <20120410081843.GA27643@host2.jankratochvil.net> (raw)
In-Reply-To: <83aa2k6n96.fsf@gnu.org>
On Tue, 10 Apr 2012 09:48:21 +0200, Eli Zaretskii wrote:
> Why do we need to retain the old behavior? You yourself said that no
> one will find this option to use it.
I have checked some (the first) FAIL cases of the testsuite and it does not
seem to be acceptable to be printed by default in its current form:
Breakpoint 7, marker3 (a=0x400918 <__dso_handle+48> "stack", b=0x400912 <__dso_handle+42> "trace") at ./gdb.base/break1.c:48^M
Section Headers:
[Nr] Name Type Address Off Size ES Flg Lk Inf Al
[15] .rodata PROGBITS 00000000004008e0 0008e0 00003e 00 A 0 0 8
[16] .eh_frame_hdr PROGBITS 0000000000400920 000920 00006c 00 A 0 0 4
Symbol table '.symtab' contains 84 entries:
Value Size Type Bind Vis Ndx Name
00000000004008e8 0 OBJECT GLOBAL HIDDEN 15 __dso_handle
0000000000400920 0 SECTION LOCAL DEFAULT 16
__dso_handle is a false resolution.
So if it should be default there should be at least restriction to ignore
size-less objects.
The question is whether there should be also a possibility to resolve the
address even to size-less objects, something like (hypothetical):
set print symbol no
set print symbol sizeful-only (default)
set print symbol always
but I think "set print symbol always" does not have to exist - there is always
the explicit "info symbol" command for special cases and the RFE PR/13907
should work fine with "set print symbol sizeful-only".
But even with size-ful objects the default on is not great:
(gdb) p t_structs_a(struct_val1)
$92 = <buf.2559>"foo"
Symbol table '.symtab' contains 177 entries:
Num: Value Size Type Bind Vis Ndx Name
43: 0000000000603a90 8 OBJECT LOCAL DEFAULT 25 buf.2559
Such local symbols just make no sense to display IMO. Maybe there could be GDB
hack to suppress the \.\d+$ symbols from GCC? Or even GCC suppressing them?
Too much information I thought may be the reason why some old-school hackers
may prefer the original behavior (I sure prefer the new behavior). But I do
not mind if the option exists / does not exist there either way, it is up to
Tom.
There is still an open issue of updating the whole testsuite if the default is
changed.
Thanks,
Jan
next prev parent reply other threads:[~2012-04-10 8:19 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-05 18:03 Tom Tromey
2012-04-05 21:13 ` Eli Zaretskii
2012-04-09 14:32 ` Tom Tromey
2012-04-09 16:31 ` Eli Zaretskii
2012-04-09 17:44 ` Tom Tromey
2012-04-09 17:55 ` Eli Zaretskii
2012-04-09 18:00 ` Tom Tromey
2012-04-09 19:14 ` Jan Kratochvil
2012-04-09 19:21 ` Tom Tromey
2012-04-09 19:36 ` Jan Kratochvil
2012-04-09 20:45 ` Eli Zaretskii
2012-04-09 21:04 ` Tom Tromey
2012-04-10 6:17 ` Eli Zaretskii
2012-04-10 6:56 ` Jan Kratochvil
2012-04-10 7:50 ` Eli Zaretskii
2012-04-10 8:19 ` Jan Kratochvil [this message]
2012-04-16 21:14 ` Tom Tromey
2012-05-14 19:39 ` Tom Tromey
2012-04-17 0:54 ` Doug Evans
2012-04-17 11:43 ` Tom Tromey
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=20120410081843.GA27643@host2.jankratochvil.net \
--to=jan.kratochvil@redhat.com \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=tromey@redhat.com \
/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