From: Hannes Domani <ssbssa@yahoo.de>
To: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>,
Simon Marchi <simon.marchi@polymtl.ca>
Subject: Re: [PATCH 4/4] Fix raw-frame-arguments in combination with frame-filters
Date: Thu, 31 Dec 2020 14:01:05 +0000 (UTC) [thread overview]
Message-ID: <1591238520.9132958.1609423265869@mail.yahoo.com> (raw)
In-Reply-To: <52196aba-3452-5ff2-e2a0-14b0c554faa3@polymtl.ca>
Am Donnerstag, 31. Dezember 2020, 05:54:03 MEZ hat Simon Marchi <simon.marchi@polymtl.ca> Folgendes geschrieben:
> On 2020-12-29 12:02 p.m., Hannes Domani via Gdb-patches wrote:
> > Currently, if frame-filters are active, raw-values is used instead of
> > raw-frame-arguments to decide if a pretty-printer should be invoked for
> > frame arguments in a backtrace.
> >
> > This adds the PRINT_RAW_FRAME_ARGUMENTS flag to frame_filter_flag which is
> > then used in the frame-filter to override the raw flag in enumerate_args.
>
> I'm not sure I understand the problem, but I have a small comment for the
> test case:
>
> > diff --git a/gdb/testsuite/gdb.python/py-frame-args.exp b/gdb/testsuite/gdb.python/py-frame-args.exp
> > index fd9c1f4342..7c621e1302 100644
> > --- a/gdb/testsuite/gdb.python/py-frame-args.exp
> > +++ b/gdb/testsuite/gdb.python/py-frame-args.exp
> > @@ -34,6 +34,28 @@ gdb_test_no_output "source ${remote_python_file}" "load python file"
> > gdb_breakpoint [gdb_get_line_number "break-here"]
> > gdb_continue_to_breakpoint "break-here" ".* break-here .*"
> >
> > +# Test raw-frame-arguments on backtrace with and without frame-filter
> > +foreach filtered [list "enable" "disable"] {
> > + gdb_test_no_output "$filtered frame-filter global BasicFrameFilter"
> > +
> > + gdb_test "bt 1" \
> > + ".*foo \\(x=42, ss=super struct = {\[.\]{3}}\\).*" \
> > + "bt frame-filter=$filtered,pretty"
> > +
> > + gdb_test "bt -raw-frame-arguments on 1" \
> > + ".*foo \\(x=42, ss=\[.\]{3}\\).*" \
> > + "bt frame-filter=$filtered,raw"
> > +
> > + # "set print raw-values" should not affect frame arguments
> > + gdb_test_no_output "set print raw-values on" \
> > + "raw-values-on,frame-filter=$filtered"
> > + gdb_test "bt 1" \
> > + ".*foo \\(x=42, ss=super struct = {\[.\]{3}}\\).*" \
> > + "bt frame-filter=$filtered,pretty,raw-values"
> > + gdb_test_no_output "set print raw-values off" \
> > + "raw-values-off,frame-filter=$filtered"
> > +}
>
> You can use foreach_with_prefix, that will ensure test names are
> unique without having to include frame-filter=$filtered in each
> test name. Something like this:
>
> # Test raw-frame-arguments on backtrace with and without frame-filter
> foreach_with_prefix filtered {enable disable} {
> gdb_test_no_output "$filtered frame-filter global BasicFrameFilter"
>
> gdb_test "bt 1" \
> ".*foo \\(x=42, ss=super struct = {\[.\]{3}}\\).*" \
> "bt pretty"
>
> gdb_test "bt -raw-frame-arguments on 1" \
> ".*foo \\(x=42, ss=\[.\]{3}\\).*" \
> "bt raw"
>
> # "set print raw-values" should not affect frame arguments
> gdb_test_no_output "set print raw-values on"
> gdb_test "bt 1" \
> ".*foo \\(x=42, ss=super struct = {\[.\]{3}}\\).*" \
> "bt pretty,raw-values"
>
> gdb_test_no_output "set print raw-values off"
> }
I've changed it locally like this, thanks.
Hannes
next prev parent reply other threads:[~2020-12-31 14:01 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20201229170227.821-1-ssbssa.ref@yahoo.de>
2020-12-29 17:02 ` [PATCH 1/4] Fix wrong method name Hannes Domani
2020-12-29 17:02 ` [PATCH 2/4] Return true in TuiWindow.is_valid only if TUI is enabled Hannes Domani
2020-12-31 4:24 ` Simon Marchi
2021-01-15 16:48 ` Andrew Burgess
2021-01-15 17:22 ` Hannes Domani
2021-01-17 11:31 ` Andrew Burgess
2021-01-17 13:19 ` Hannes Domani
2021-01-18 10:30 ` Andrew Burgess
2021-01-18 11:29 ` Hannes Domani
2021-01-23 17:54 ` Andrew Burgess
2021-01-23 17:55 ` Andrew Burgess
2021-01-24 12:33 ` Hannes Domani
2021-02-06 19:38 ` Tom Tromey
2021-02-08 11:58 ` Andrew Burgess
2021-02-08 19:19 ` Tom Tromey
2021-01-18 17:19 ` Eli Zaretskii
2020-12-29 17:02 ` [PATCH 3/4] Add optional styled argument to gdb.execute Hannes Domani
2020-12-29 17:19 ` Eli Zaretskii
2020-12-31 4:28 ` Simon Marchi
2020-12-29 17:02 ` [PATCH 4/4] Fix raw-frame-arguments in combination with frame-filters Hannes Domani
2020-12-31 4:53 ` Simon Marchi
2020-12-31 14:01 ` Hannes Domani [this message]
2021-01-31 7:13 ` Joel Brobecker
2020-12-29 17:18 ` [PATCH 1/4] Fix wrong method name Eli Zaretskii
2020-12-29 17:39 ` Hannes Domani
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=1591238520.9132958.1609423265869@mail.yahoo.com \
--to=ssbssa@yahoo.de \
--cc=gdb-patches@sourceware.org \
--cc=simon.marchi@polymtl.ca \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).