This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA 0/9] Radically simplify the complaint system
>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:
Pedro> Can you give an example case of when do we still need or want
Pedro> the ISOLATED_MESSAGE vs SHORT_FIRST_MESSAGE distinction?
Sure. You can see it using:
$ ./gdb -nx
(gdb) set complaints 1
(gdb) file ./gdb
I get:
Reading symbols from ./gdb...DW_AT_low_pc 0x0 is zero for DIE at 0x1717ad8 [in module /home/tromey/gdb/build/gdb/gdb]....debug_line address at offset 0xa6284 is 0 [in module /home/tromey/gdb/build/gdb/gdb]...done.
... stuff here ...
During symbol reading, unsupported tag: 'DW_TAG_unspecified_type'.
During symbol reading, const value length mismatch for 'std::ratio<1, 1000000000>::num', got 8, expected 0.
What's happening here is that the SHORT_FIRST_MESSAGE stuff is printed
during the "Reading symbols...", and then once psymtabs are read, we hit
a call to clear_complaints. Any subsequent complaints -- say, during
psymtab expansion -- are issued as ISOLATED_MESSAGE.
I have some more patches to try to clean some of this up as well, but I
thought it would be better to submit this series as a simple complaint
cleanup rather than trying to change the output at the same time.
What I have so far still preserves this distinction, so this would be a
good time to talk about what should be done. All I really did is add
some newlines and remove the "done." text, so that the "Reading symbols"
output is cleaner, like:
Reading symbols from ./gdb...
DW_AT_low_pc 0x0 is zero for DIE at 0x1717ad8 [in module /home/tromey/gdb/build/gdb/gdb]
debug_line address at offset 0xa6284 is 0 [in module /home/tromey/gdb/build/gdb/gdb]
This is a bit weird sometimes still, because some of the complaints are
rather uninformative, e.g.:
complaint (&symfile_complaints,
_("location description stack overflow"));
I do think it would be good to be able to remove the *_MESSAGE
constants, I'm just not sure exactly what to print. Probably I'm just
overthinking it since I doubt anyone except gdb developers enable
complaints.
Pedro> Note: git am showed:
I'll fix that.
Tom