Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFC 06/12] entryval: Display @entry parameters in bt full
Date: Tue, 19 Jul 2011 16:21:00 -0000	[thread overview]
Message-ID: <m3y5zu45b6.fsf@fleche.redhat.com> (raw)
In-Reply-To: <20110718201852.GG30496@host1.jankratochvil.net> (Jan	Kratochvil's message of "Mon, 18 Jul 2011 22:18:53 +0200")

>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:

Jan> p@entry is not particularly useful here because the `line' local
Jan> variable contains the same.  One can imagine in other real world
Jan> applications it can be useful - for a backtrace sent by user where
Jan> you do not have a reproducer and/or the core file (the case of ABRT
Jan> bugreports).

Jan> The parameter@entry lines are not displayed if they are not useful.
Jan> Therefore if they would display the same value as the current
Jan> parameter value or if GDB cannot successfully determine the entry
Jan> value.

Jan> It is displayed by `bt full' and `info args'.  RFC is whether it is
Jan> not too verbose and/or if it should not be displayed some way even
Jan> with normal `bt'.  Also whether there should be some `set' variable
Jan> to forget about @entry values.

I think it is often confusing to users to see the currently value in a
backtrace.  Certainly this has confused me any number of times.

My first thought is to display this information by default in the
backtrace, even in the short form.

However, then I think there is another possible confusion -- some
arguments may have entry values, and some may not; and I think it would
be nice to clearly distinguish this for users.

How about something like:

#8  0x000000000048c50d in execute_command (p=0x22b573b "" (p@entry=0x22b5720 "maintenance internal-error "), from_tty=1) at top.c:438


Here, the entry value is clearly distinguished and arguments lacking an
entry value are also immediately visible.

If this is too verbose for somebody, let them complain and we can add a
new parameter.

If you think it is important to also distinguish the case where the
argument is equal to its entry value, then we can add additional output
sugar for that, e.g.:

#8  0x000000000048c50d in execute_command (p=p@entry=0x22b573b "whatever", from_tty=1) at top.c:438

Tom


      parent reply	other threads:[~2011-07-19 16:13 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-18 20:21 Jan Kratochvil
2011-07-18 22:24 ` Daniel Jacobowitz
2011-07-19 10:48   ` Eli Zaretskii
2011-07-19 10:55     ` Jan Kratochvil
2011-07-19 11:52       ` Eli Zaretskii
2011-07-19 12:17         ` Jakub Jelinek
2011-07-19 16:46           ` Eli Zaretskii
2011-07-19 17:22             ` Jakub Jelinek
2011-08-03 17:27           ` Jan Kratochvil
2011-08-03 17:53             ` Jan Kratochvil
2011-08-03 18:13               ` Jan Kratochvil
2011-08-03 18:36             ` Tom Tromey
2011-08-03 19:43   ` Jan Kratochvil
2011-09-02 17:08   ` [MI RFC] entryval: MI access to entry values [Re: [RFC 06/12] entryval: Display @entry parameters in bt full] Jan Kratochvil
2011-09-13 21:35     ` [MI RFC] entryval: MI access to entry values Jan Kratochvil
2011-09-14  8:50       ` Vladimir Prus
2011-09-14  9:13         ` André Pönitz
2011-09-14  9:20           ` Jan Kratochvil
2011-09-14 10:45             ` André Pönitz
2011-10-03 17:00               ` Tom Tromey
2011-10-03 16:57     ` [MI RFC] entryval: MI access to entry values [Re: [RFC 06/12] entryval: Display @entry parameters in bt full] Tom Tromey
2011-10-03 17:05       ` Vladimir Prus
2011-10-03 17:44         ` Jan Kratochvil
2011-10-03 18:14           ` Joel Brobecker
2011-10-10 16:09           ` André Pönitz
2011-07-19 10:57 ` [RFC 06/12] entryval: Display @entry parameters in bt full Eli Zaretskii
2011-07-19 16:21 ` Tom Tromey [this message]

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=m3y5zu45b6.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@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