Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Pedro Alves <palves@redhat.com>
Cc: Tom Tromey <tom@tromey.com>,  gdb-patches@sourceware.org
Subject: Re: [RFA 2/2] PR cli/19551 - change formatting of "Reading symbols" messages
Date: Thu, 20 Apr 2017 00:11:00 -0000	[thread overview]
Message-ID: <87a87c545w.fsf@tromey.com> (raw)
In-Reply-To: <3c04e1c7-7192-07ed-b2ca-ce9ebc0b99a6@redhat.com> (Pedro Alves's	message of "Tue, 18 Apr 2017 18:42:48 +0100")

>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:

>> It modifies the DWARF reader(s) to update the progress.  

Pedro> What does GDB show with the reader?  Is their output now broken, same,
Pedro> etc?
Pedro> Sorry, I meant, what does GDB show with the other readers.

I didn't update these, so it just prints, e.g.:

Reading symbols from outputs/gdb.stabs/weird/weirdx.o

I could take a look at the others I suppose.

>> Any printing is deferred until the first progress report, so the
>> messages no longer clash.

Pedro> Can you clarify what printing you're referring to?

This bit meant that the "Reading ..." message isn't emitted until the
first progress update.  This is what makes it so these messages don't
clash.

Pedro> What happens if gdb emits e.g., complaints while a progress bar
Pedro> is half full?

You get terrible-looking stuff like:

(gdb) file ../gdb
Reading symbols from ../gdb
[###################################                                          ]unsupported stack op: 'DW_OP_stack_value'...unsupported stack op: 'DW_OP_stack_va[####################################                                         ]u[####################################                                         ]u[######################################                                       ]u[##############################################                               ]unsupported stack op: 'DW_OP_stack_value'...unsupported stack op: 'DW_OP_stack_value'...unsupported stack op: 'DW_OP_stack_value'...unsupported stack op: 'DW_OP_[##############################################################               ]unsupported stack op: 'DW_OP_stack_value'...unsupported stack op: 'DW_OP_stack_va                                                                               


Maybe there's no easy way to improve this :( The issue is that the
complaint system just writes to the ui-file, bypassing ui-out entirely.
Complaints could be fixed, but this same problem would apply to any
possible output during symbol reading.

Though FWIW I don't think anybody other than gdb developers enables
complaints.

Pedro> I noticed that if you clear the screen such that the prompt is not at
Pedro> the bottom when gdb reads symbols (e.g., start gdb on itself,
Pedro> run to main, do ctrl-l to clear the screen, and do
Pedro> "nosharedlibrary / sharedlibrary"), and if symbol reading is quick, then
Pedro> the meter appears/disappears very quickly in what looks like an
Pedro> odd flash.  It looks a tiny bit annoying to me.  Though not a deal breaker
Pedro> and I'll get used to it for sure.  One way around it would be to
Pedro> not print the meter unless the operation is taking longer than some
Pedro> minimum time, like 1s or some such.

I'm wondering if you are seeing the case where the first notification is
at howmuch=1.0, causing printing of the progress bar followed by
immediately erasing it.

I can't see the effect myself, but that's an idea... I changed it to
avoid this case specifically.

>> +  /* Stack of progress meters.  */
>> +  std::vector<cli_progress_info> m_meters;

Pedro> I think it'd be good to have this comment expanded a bit to
Pedro> explain why we need a stack, and what happens when we're
Pedro> already printing a meter and a new stack level appears.

This case also doesn't really work.  If a meter is already printing, a
new meter will just confuse the output.  The current system relies on
the way that gdb does symbol reading, where it discovers separate
debuginfo before doing any work on the original objfile.

Pedro> If implementations can do nothing, shouldn't "nothing" be the
Pedro> default implementation?

I made the change; but I did it this way originally since the base class
looked purely abstract to me.

I made all the other changes.  I still didn't write the test for the
first patch, though, and I'm also experiencing a possible intermittent
with the buildbot (not sure, maybe it's my other patch series), so it
may be a little while before v2.

Tom


  parent reply	other threads:[~2017-04-20  0:11 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-13  4:17 [RFA 0/2] Fix PR cli/19551 Tom Tromey
2017-04-13  4:17 ` [RFA 2/2] PR cli/19551 - change formatting of "Reading symbols" messages Tom Tromey
2017-04-18 17:43   ` Pedro Alves
2017-04-18 17:44     ` Pedro Alves
2017-04-20  0:11     ` Tom Tromey [this message]
2017-04-27 21:40   ` Simon Marchi
2017-04-27 23:16     ` Tom Tromey
2017-04-27 23:53       ` Simon Marchi
2017-05-29 17:24     ` Tom Tromey
2017-04-13  4:44 ` [RFA 1/2] Use a distinguishing name for minidebug objfile Tom Tromey
2017-04-18 17:42   ` Pedro Alves
2017-04-19  3:11     ` 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=87a87c545w.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@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