Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Vladimir Prus <vladimir@codesourcery.com>
Cc: gdb-patches@sourceware.org
Subject: [MI RFC] entryval: MI access to entry values  [Re: [RFC 06/12] entryval: Display @entry parameters in bt full]
Date: Fri, 02 Sep 2011 17:08:00 -0000	[thread overview]
Message-ID: <20110902170745.GA22738@host1.jankratochvil.net> (raw)
In-Reply-To: <CAN9gPaFFbEXH373MfCsS_LQga65X4VT9T57KnFgXOxpmmGih4g@mail.gmail.com>

Hi Volodya,

intro:
	[patch 00/12] entryval: Fix x86_64 <optimized out> parameters, virtual tail call frames
	http://sourceware.org/ml/gdb-patches/2011-07/msg00430.html
currently implemented at:
	http://sourceware.org/gdb/wiki/ArcherBranchManagement
	archer-jankratochvil-entryval

asking here how the MI format should look like.


The CLI part prints (in default `set print entry-values default'):
Breakpoint 8, validity (lost=<optimized out>, lost@entry=5, born=10) at gdb.arch/amd64-entry-value.cc:200

(1)
so I am inclined to just produce these MI records (which normal and @entry
variable variants get included depends on `-gdb-set print entry-values' like in
CLI):
print_frame_args:
	*stopped,[...],args=[{name="lost",value="<optimized out>"},{name="lost@entry",value="5"},{name="born",value="10"}],[...]
list_args_or_locals:
	-stack-list-variables --all-values
	^done,variables=[{name="lost",arg="1",value="<optimized out>"},{name="lost@entry",arg="1",value="5"},{name="born",arg="1",value="10"}]

(2)
currently the archer-jankratochvil-entryval branch implements this variant:
*stopped,[...],args=[{name="lost",value="<optimized out>",entry_value="5"},{name="born",value="10"}],[...]
-stack-list-variables --all-values
^done,variables=[{name="lost",arg="1",value="<optimized out>",entry_value="5"},{name="born",arg="1",value="10"}]
with .exp samples in:
	http://sourceware.org/git/gitweb.cgi?p=archer.git;a=blob_plain;f=gdb/testsuite/gdb.mi/mi2-amd64-entry-value.exp;hb=archer-jankratochvil-entryval

(3)
and I have some older implementation saved which produced:
*stopped,[...],args=[{name="lost",value="<optimized out>"},{name="born",value="10"}],args_entry=[{name="lost",value="5"}],[...]
although the list_args_or_locals mode not sure how it should look like.

(4)
?


The paramname@entry variant (1) requires no extra FE (Front End) extensions,
it should also be fully backward compatible.  The paramname@entry variables are
special that one cannot modify them but that is true also for other variables.

For (2) and (3) for FEs with proper parser an additional result should be
ignored correctly.  For FEs with some ugly manual matching I also do not think
it should be a problem as FEs are usually used for -O0 -g code debugging while
entry values are present only in -O2 -g code.  System libraries would be more a
problem although those on many OSes do not have the -g part.

For the FE->GDB part the FE can normally use `paramname@entry' strings instead
of `paramname' in expression strings as shown in [2].
	[2] http://people.redhat.com/jkratoch/eclipse2.png

The (2) case I tested with eclipse-cdt-8.0.0-5.fc16.x86_64 and ignores the
`entry_value' part correctly.  Maybe it could add the `entry value' in details
of the `val' parameter - as shown in the [1] picture (for that case maybe the
(2) format is better but sure FE is able to use any of the MI formats).
	[1] http://people.redhat.com/jkratoch/eclipse1.png


Thanks for advice,
Jan


  parent reply	other threads:[~2011-09-02 17:08 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-18 20:21 [RFC 06/12] entryval: Display @entry parameters in bt full 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   ` Jan Kratochvil [this message]
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

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=20110902170745.GA22738@host1.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=vladimir@codesourcery.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