public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PING] [PATCH 4/4] Fix raw-frame-arguments in combination with frame-filters
       [not found] <1160551762.3641164.1610640997493.ref@mail.yahoo.com>
@ 2021-01-14 16:16 ` Hannes Domani
  0 siblings, 0 replies; only message in thread
From: Hannes Domani @ 2021-01-14 16:16 UTC (permalink / raw)
  To: gdb-patches, Simon Marchi

Ping.


Am Donnerstag, 31. Dezember 2020, 15:01:19 MEZ hat Hannes Domani via Gdb-patches <gdb-patches@sourceware.org> Folgendes geschrieben:

> 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.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-01-14 16:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1160551762.3641164.1610640997493.ref@mail.yahoo.com>
2021-01-14 16:16 ` [PING] [PATCH 4/4] Fix raw-frame-arguments in combination with frame-filters Hannes Domani

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).