This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [2/2] RFA: implement 'set print symbol'


>>>>> "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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]