[PING^2] [PATCH 4/4] Fix raw-frame-arguments in combination with frame-filters
Hannes Domani
ssbssa@yahoo.de
Thu Jan 21 18:11:54 GMT 2021
Ping.
Am Donnerstag, 14. Januar 2021, 17:16:46 MEZ hat Hannes Domani via Gdb-patches <gdb-patches@sourceware.org> Folgendes geschrieben:
> 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.
More information about the Gdb-patches
mailing list