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: [RFA 2/2] PR cli/19551 - change formatting of "Reading symbols" messages


On 2017-04-13 00:15, Tom Tromey wrote:
From: Tom Tromey <tromey@redhat.com>

PR cli/19551 notes that the "Reading symbols" messages can be messy, for
example:

(gdb) file /bin/gdb
Reading symbols from /bin/gdb...Reading symbols from /bin/gdb...(no
debugging symbols found)...done.
(no debugging symbols found)...done.

In this case the first message is being interrupted by the message for
the minidebug info; then the subsequent output is emitted strangely.

This patch changes gdb to use a progress bar when reading debug info.
It modifies the DWARF reader(s) to update the progress.  Any printing
is deferred until the first progress report, so the messages no longer
clash.

While printing the status message it looks like:

Reading symbols from ./gdb
[##############                                                  ]

The "#"s show the progress; these are only printed on a terminal.

When it is finished it looks like:

Reading symbols from .gnu_debugdata for /usr/bin/gdb
Reading symbols from /bin/gdb

I made the MI implementation do nothing.  MI has a
"status-async-output" production in the grammar:

'STATUS-ASYNC-OUTPUT ==>'
     '[ TOKEN ] "+" ASYNC-OUTPUT NL'

... which maybe could be used for this sort of thing. Currently I think
it's only used for "load" progress (see mi_load_progress); so it wasn't
clear to me whether this would be a good idea.

Hi Tom,

I think that having a progress bar would be really awesome (right after making GDB load debug info faster so fast that we don't need one). However, I think that feature would deserve a patch of its own with a more expressive title. I am sure many people will be interested, but like this it's hidden under some obscure bug fix.

Would it be possible to make this patch a simple bug fix and put the progress bar in a patch of its own?

Thanks,

Simon


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