This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [2/2] RFA: implement 'set print symbol'
- From: Tom Tromey <tromey at redhat dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: gdb-patches at sourceware dot org, Eli Zaretskii <eliz at gnu dot org>
- Date: Mon, 14 May 2012 13:39:33 -0600
- Subject: Re: [2/2] RFA: implement 'set print symbol'
- References: <871uo2giob.fsf@fleche.redhat.com> <20120409191420.GA1010@host2.jankratochvil.net> <87fwcc679z.fsf@fleche.redhat.com> <83pqbg7i1n.fsf@gnu.org> <87r4vw4nxu.fsf@fleche.redhat.com> <83lim46rk7.fsf@gnu.org> <20120410065226.GA23852@host2.jankratochvil.net> <83aa2k6n96.fsf@gnu.org> <20120410081843.GA27643@host2.jankratochvil.net>
>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:
Jan> I have checked some (the first) FAIL cases of the testsuite and it does not
Jan> seem to be acceptable to be printed by default in its current form:
Jan> Breakpoint 7, marker3 (a=0x400918 <__dso_handle+48> "stack", b=0x400912 <__dso_handle+42> "trace") at ./gdb.base/break1.c:48^M
Jan> __dso_handle is a false resolution.
Jan> So if it should be default there should be at least restriction to ignore
Jan> size-less objects.
I made it ignore size-less data symbols.
It turns out that we can't ignore size-less text symbols --
asm-source.exp checks this case.
Jan> But even with size-ful objects the default on is not great:
Jan> (gdb) p t_structs_a(struct_val1)
Jan> $92 = <buf.2559>"foo"
In the new series (to be posted shortly) I fixed the obvious formatting
bug here.
Jan> Such local symbols just make no sense to display IMO. Maybe there
Jan> could be GDB hack to suppress the \.\d+$ symbols from GCC? Or even
Jan> GCC suppressing them?
I left it as-is.
I did notice that we have no way to look up a generic symbol by address.
In gdb currently, you can look up any minimal symbol by address, but
for full symbols you can only look up functions.
Jan> There is still an open issue of updating the whole testsuite if the
Jan> default is changed.
I did this. It revealed some other oddities.
Tom