From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sonic304-22.consmr.mail.ir2.yahoo.com (sonic304-22.consmr.mail.ir2.yahoo.com [77.238.179.147]) by sourceware.org (Postfix) with ESMTPS id 724CF38515EC for ; Sat, 15 May 2021 12:31:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 724CF38515EC X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1621081915; bh=gahhgHBy8bsycdkfrENsQf/lHfkyvRDuDgfOPf/sFF/=; h=X-Sonic-MF:Date:From:To:Subject:From:Subject; b=CnrUCgmyplS0KKG2CyRRd6/IYU3KM5OaQzN0MEYlqBl2HJx/qfWjFDLLH6JvUSsU2q8GduKDjrUnnkzuiX5JKDKDDBYdGwgEKPEjWjlkKZMlE6bDYvvEKqZfBzG97oYsc/2FsBpiH06n0f/g6hYkuWbON85oiILqvvZP0Eq/3gMAwjSUrkj+0Cy0dAHZRvvluATLu4yh2Yw08ovWMVT2tLJHAkRloSLf2y/iVSi27+Ny5ACKzvE8tPcIK4qW3H2pjoMZr0YhdTfsRlEty2kneVvT4OlXu8Bc9PYevBOQUrwBrdwdi8+hn9s/Nbh/vVPAccn3iVioD6RE2+5Gn7aYcg== X-YMail-OSG: pERSt_8VM1kVBYoHNtdMRqPHAdTp60RQmZKH9RScfRUnKIneK_bL.wa4iDCjWW8 Wk2zS5ru_3s82KXvrg4ssG5J1pI2RAEO8AlQmOh2Sv09LGJnrafokFdNZoOC4DXDM7umoTIp8e9i pJCidUmemXyt7XrXIt3zSHiOd_HHkKVKMsQp1.b27NvEgoCugWuf2ieR.mD2y_XUiYqKQeVwN478 CyYETpRZe0yhEPDC9hwZcO_Tf.13kyD796avdqOJKAj_Zt1O1W65blwdsaYl3ZAVYz.WGKTZvcJy FqyYL13bbSBIsKjxJ6f9w8VmwEAxS09b2pBBIvR0ptGIYgm3lDLRpeZeEOgnf0BrlAB_cadD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VqLTWr1L_v0A- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic304.consmr.mail.ir2.yahoo.com with HTTP; Sat, 15 May 2021 12:31:55 +0000 Date: Sat, 15 May 2021 12:31:50 +0000 (UTC) From: Hannes Domani To: "gdb-patches@sourceware.org" Message-ID: <1952536930.1183681.1621081910404@mail.yahoo.com> Subject: Re: [PING^3] [PATCH v2] Fix raw-frame-arguments in combination with frame-filters MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable References: <1952536930.1183681.1621081910404.ref@mail.yahoo.com> X-Mailer: WebService/1.1.18291 YMailNorrin Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:87.0) Gecko/20100101 Firefox/87.0 X-Spam-Status: No, score=-9.2 required=5.0 tests=BAYES_00, BODY_8BITS, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 May 2021 12:31:59 -0000 Ping. FYI, I've locally re-formatted gdb.python/py-frame-args.py with black. Am Dienstag, 23. Februar 2021, 13:09:09 MEZ hat Hannes Domani via Gdb-patch= es Folgendes geschrieben: > Ping. > > Am Sonntag, 14. Februar 2021, 16:51:47 MEZ hat Hannes Domani via Gdb-patc= hes Folgendes geschrieben: > > > Ping. > > > > On 31.01.2021 14:46, 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 f= or > > > frame arguments in a backtrace. > > > > > > In this example, "super struct" is the output of the pretty-printer: > > > > > >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (gdb) disable frame-filter global Basic= FrameFilter > > >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (gdb) bt > > >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 #0=C2=A0 foo (x=3D42, ss=3Dsuper struct= =3D {...}) at C:/src/repos/gdb-testsuite/gdb/testsuite/gdb.python/py-frame= -args.c:47 > > >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 #1=C2=A0 0x004016aa in main () at C:/sr= c/repos/gdb-testsuite/gdb/testsuite/gdb.python/py-frame-args.c:57 > > > > > > If no frame-filter is active, then the raw-values print option does n= ot > > > affect the backtrace output: > > > > > >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (gdb) set print raw-values on > > >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (gdb) bt > > >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 #0=C2=A0 foo (x=3D42, ss=3Dsuper struct= =3D {...}) at C:/src/repos/gdb-testsuite/gdb/testsuite/gdb.python/py-frame= -args.c:47 > > >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 #1=C2=A0 0x004016aa in main () at C:/sr= c/repos/gdb-testsuite/gdb/testsuite/gdb.python/py-frame-args.c:57 > > >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (gdb) set print raw-values off > > > > > > Instead, the raw-frame-arguments option disables the pretty-printer i= n the > > > backtrace: > > > > > >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (gdb) bt -raw-frame-arguments on > > >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 #0=C2=A0 foo (x=3D42, ss=3D...) at C:/s= rc/repos/gdb-testsuite/gdb/testsuite/gdb.python/py-frame-args.c:47 > > >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 #1=C2=A0 0x004016aa in main () at C:/sr= c/repos/gdb-testsuite/gdb/testsuite/gdb.python/py-frame-args.c:57 > > > > > > But if a frame-filter is active, the same rules don't apply. > > > The option raw-frame-arguments is ignored, but raw-values decides if = the > > > pretty-printer is used: > > > > > >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (gdb) enable frame-filter global BasicF= rameFilter > > >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (gdb) bt > > >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 #0=C2=A0 foo (x=3D42, ss=3Dsuper struct= =3D {...}) at C:/src/repos/gdb-testsuite/gdb/testsuite/gdb.python/py-frame= -args.c:47 > > >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 #1=C2=A0 0x004016aa in main () at C:/sr= c/repos/gdb-testsuite/gdb/testsuite/gdb.python/py-frame-args.c:57 > > >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (gdb) set print raw-values on > > >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (gdb) bt > > >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 #0=C2=A0 foo (x=3D42, ss=3D...) at C:/s= rc/repos/gdb-testsuite/gdb/testsuite/gdb.python/py-frame-args.c:47 > > >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 #1=C2=A0 0x004016aa in main () at C:/sr= c/repos/gdb-testsuite/gdb/testsuite/gdb.python/py-frame-args.c:57 > > >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (gdb) set print raw-values off > > >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (gdb) bt -raw-frame-arguments on > > >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 #0=C2=A0 foo (x=3D42, ss=3Dsuper struct= =3D {...}) at C:/src/repos/gdb-testsuite/gdb/testsuite/gdb.python/py-frame= -args.c:47 > > >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 #1=C2=A0 0x004016aa in main () at C:/sr= c/repos/gdb-testsuite/gdb/testsuite/gdb.python/py-frame-args.c:57 > > > > > > So 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 enumerat= e_args. > > > > > > Then the output is the same if a frame-filter is active, the pretty-p= rinter > > > for backtraces is only disabled with the raw-frame-arguments option: > > > > > >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (gdb) enable frame-filter global BasicF= rameFilter > > >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (gdb) bt > > >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 #0=C2=A0 foo (x=3D42, ss=3Dsuper struct= =3D {...}) at C:/src/repos/gdb-testsuite/gdb/testsuite/gdb.python/py-frame= -args.c:47 > > >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 #1=C2=A0 0x004016aa in main () at C:/sr= c/repos/gdb-testsuite/gdb/testsuite/gdb.python/py-frame-args.c:57 > > >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (gdb) set print raw-values on > > >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (gdb) bt > > >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 #0=C2=A0 foo (x=3D42, ss=3Dsuper struct= =3D {...}) at C:/src/repos/gdb-testsuite/gdb/testsuite/gdb.python/py-frame= -args.c:47 > > >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 #1=C2=A0 0x004016aa in main () at C:/sr= c/repos/gdb-testsuite/gdb/testsuite/gdb.python/py-frame-args.c:57 > > >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (gdb) set print raw-values off > > >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (gdb) bt -raw-frame-arguments on > > >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 #0=C2=A0 foo (x=3D42, ss=3D...) at C:/s= rc/repos/gdb-testsuite/gdb/testsuite/gdb.python/py-frame-args.c:47 > > >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 #1=C2=A0 0x004016aa in main () at C:/sr= c/repos/gdb-testsuite/gdb/testsuite/gdb.python/py-frame-args.c:57 > > > > > > gdb/ChangeLog: > > > > > > 2021-01-31=C2=A0 Hannes Domani=C2=A0 > > > > > >=C2=A0=C2=A0=C2=A0=C2=A0 * extension.h (enum frame_filter_flag): Add > > >=C2=A0=C2=A0=C2=A0=C2=A0 PRINT_RAW_FRAME_ARGUMENTS. > > >=C2=A0=C2=A0=C2=A0=C2=A0 * python/py-framefilter.c (enumerate_args): O= verride raw flag. > > >=C2=A0=C2=A0=C2=A0=C2=A0 raw_frame_args argument. > > >=C2=A0=C2=A0=C2=A0=C2=A0 (py_mi_print_variables): Forward raw flag. > > >=C2=A0=C2=A0=C2=A0=C2=A0 (py_print_args): Forward raw_frame_args flag. > > >=C2=A0=C2=A0=C2=A0=C2=A0 (py_print_frame): Handle PRINT_RAW_FRAME_ARGU= MENTS. > > >=C2=A0=C2=A0=C2=A0=C2=A0 * stack.c (backtrace_command_1): Set PRINT_RA= W_FRAME_ARGUMENTS. > > > > > > gdb/testsuite/ChangeLog: > > > > > > 2021-01-31=C2=A0 Hannes Domani=C2=A0 > > > > > >=C2=A0=C2=A0=C2=A0=C2=A0 * gdb.python/py-frame-args.exp: Add bt raw-fr= ame-arguments tests. > > >=C2=A0=C2=A0=C2=A0=C2=A0 * gdb.python/py-frame-args.py: Add basic fram= e-filter. > > > --- > > > v2: > > > - More detailed commit message describing the problem. > > > --- > > >=C2=A0 gdb/extension.h=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0 4 ++++ > > >=C2=A0 gdb/python/py-framefilter.c=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 | 14 ++++++++++---- > > >=C2=A0 gdb/stack.c=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0 2 ++ > > >=C2=A0 gdb/testsuite/gdb.python/py-frame-args.exp | 20 +++++++++++++++= +++++ > > >=C2=A0 gdb/testsuite/gdb.python/py-frame-args.py=C2=A0 | 13 ++++++++++= +++ > > >=C2=A0 5 files changed, 49 insertions(+), 4 deletions(-) > > > > > > diff --git a/gdb/extension.h b/gdb/extension.h > > > index a505c68d25e..7067e232cd3 100644 > > > --- a/gdb/extension.h > > > +++ b/gdb/extension.h > > > @@ -103,6 +103,10 @@ enum frame_filter_flag > > > > > >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 /* Set this flag if elided frames shoul= d not be printed.=C2=A0 */ > > >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 PRINT_HIDE =3D 1 << 5, > > > + > > > +=C2=A0=C2=A0=C2=A0 /* Set this flag if pretty printers for frame arg= uments should not > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 be invoked.=C2=A0 */ > > > +=C2=A0=C2=A0=C2=A0 PRINT_RAW_FRAME_ARGUMENTS =3D 1 << 6, > > >=C2=A0=C2=A0=C2=A0 }; > > > > > >=C2=A0 DEF_ENUM_FLAGS_TYPE (enum frame_filter_flag, frame_filter_flags= ); > > > diff --git a/gdb/python/py-framefilter.c b/gdb/python/py-framefilter.= c > > > index 6dd741ab704..e53e3409235 100644 > > > --- a/gdb/python/py-framefilter.c > > > +++ b/gdb/python/py-framefilter.c > > > @@ -422,12 +422,14 @@ static enum ext_lang_bt_status > > >=C2=A0 enumerate_args (PyObject *iter, > > >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 struct ui_out *= out, > > >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 enum ext_lang_f= rame_args args_type, > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 bool raw_frame_args, > > >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 int print_args_= field, > > >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 struct frame_in= fo *frame) > > >=C2=A0 { > > >=C2=A0=C2=A0=C2=A0 struct value_print_options opts; > > > > > >=C2=A0=C2=A0=C2=A0 get_user_print_options (&opts); > > > +=C2=A0 opts.raw =3D raw_frame_args; > > > > > >=C2=A0=C2=A0=C2=A0 if (args_type =3D=3D CLI_SCALAR_VALUES) > > >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 { > > > @@ -655,8 +657,8 @@ py_mi_print_variables (PyObject *filter, struct u= i_out *out, > > >=C2=A0=C2=A0=C2=A0 ui_out_emit_list list_emitter (out, "variables"); > > > > > >=C2=A0=C2=A0=C2=A0 if (args_iter !=3D Py_None > > > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 && (enumerate_args (args_iter.get (),= out, args_type, 1, frame) > > > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D=3D EXT_LANG_BT_ERROR)) > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 && (enumerate_args (args_iter.get (),= out, args_type, opts->raw, 1, > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 frame) =3D=3D EXT_LANG_BT_ERROR)) > > >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 return EXT_LANG_BT_ERROR; > > > > > >=C2=A0=C2=A0=C2=A0 if (locals_iter !=3D Py_None > > > @@ -701,6 +703,7 @@ static enum ext_lang_bt_status > > >=C2=A0 py_print_args (PyObject *filter, > > >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 str= uct ui_out *out, > > >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 enu= m ext_lang_frame_args args_type, > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 bool raw_fram= e_args, > > >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 str= uct frame_info *frame) > > >=C2=A0 { > > >=C2=A0=C2=A0=C2=A0 gdbpy_ref<> args_iter (get_py_iter_from_func (filte= r, "frame_args")); > > > @@ -726,7 +729,8 @@ py_print_args (PyObject *filter, > > >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 } > > >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 } > > >=C2=A0=C2=A0=C2=A0 else if (args_iter !=3D Py_None > > > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 && (enumerate_args (args_iter.get (),= out, args_type, 0, frame) > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 && (enumerate_args (args_iter.get (),= out, args_type, > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 raw_frame_args, 0, frame) > > >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D= =3D EXT_LANG_BT_ERROR)) > > >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 return EXT_LANG_BT_ERROR; > > > > > > @@ -957,7 +961,9 @@ py_print_frame (PyObject *filter, frame_filter_fl= ags flags, > > >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 wrong.=C2=A0 */ > > >=C2=A0=C2=A0=C2=A0 if (print_args && (location_print || out->is_mi_lik= e_p ())) > > >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 { > > > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if (py_print_args (filter, out, args_= type, frame) =3D=3D EXT_LANG_BT_ERROR) > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 bool raw_frame_args =3D (flags & PRIN= T_RAW_FRAME_ARGUMENTS) !=3D 0; > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if (py_print_args (filter, out, args_= type, raw_frame_args, frame) > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D=3D EXT_LANG_BT_ERROR) > > >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 return EXT_LANG_BT_ERROR; > > >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 } > > > > > > diff --git a/gdb/stack.c b/gdb/stack.c > > > index bce6a2f42f8..dbca5ade1c2 100644 > > > --- a/gdb/stack.c > > > +++ b/gdb/stack.c > > > @@ -2028,6 +2028,8 @@ backtrace_command_1 (const frame_print_options = &fp_opts, > > >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 flags |=3D PRINT_LOCALS; > > >=C2=A0=C2=A0=C2=A0 if (bt_opts.hide) > > >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 flags |=3D PRINT_HIDE; > > > +=C2=A0 if (fp_opts.print_raw_frame_arguments) > > > +=C2=A0=C2=A0=C2=A0 flags |=3D PRINT_RAW_FRAME_ARGUMENTS; > > > > > >=C2=A0=C2=A0=C2=A0 if (!bt_opts.no_filters) > > >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 { > > > diff --git a/gdb/testsuite/gdb.python/py-frame-args.exp b/gdb/testsui= te/gdb.python/py-frame-args.exp > > > index 5d35323c0e6..dae0c0ac29e 100644 > > > --- a/gdb/testsuite/gdb.python/py-frame-args.exp > > > +++ b/gdb/testsuite/gdb.python/py-frame-args.exp > > > @@ -34,6 +34,26 @@ gdb_test_no_output "source ${remote_python_file}" = "load python file" > > >=C2=A0 gdb_breakpoint [gdb_get_line_number "break-here"] > > >=C2=A0 gdb_continue_to_breakpoint "break-here" ".* break-here .*" > > > > > > +# Test raw-frame-arguments on backtrace with and without frame-filte= r > > > +foreach_with_prefix filtered {enable disable} { > > > +=C2=A0=C2=A0=C2=A0 gdb_test_no_output "$filtered frame-filter global= BasicFrameFilter" > > > + > > > +=C2=A0=C2=A0=C2=A0 gdb_test "bt 1" \ > > > +=C2=A0=C2=A0=C2=A0 ".*foo \\(x=3D42, ss=3Dsuper struct =3D {\[.\]{3}= }\\).*" \ > > > +=C2=A0=C2=A0=C2=A0 "bt pretty" > > > + > > > +=C2=A0=C2=A0=C2=A0 gdb_test "bt -raw-frame-arguments on 1" \ > > > +=C2=A0=C2=A0=C2=A0 ".*foo \\(x=3D42, ss=3D\[.\]{3}\\).*" \ > > > +=C2=A0=C2=A0=C2=A0 "bt raw" > > > + > > > +=C2=A0=C2=A0=C2=A0 # "set print raw-values" should not affect frame = arguments > > > +=C2=A0=C2=A0=C2=A0 gdb_test_no_output "set print raw-values on" > > > +=C2=A0=C2=A0=C2=A0 gdb_test "bt 1" \ > > > +=C2=A0=C2=A0=C2=A0 ".*foo \\(x=3D42, ss=3Dsuper struct =3D {\[.\]{3}= }\\).*" \ > > > +=C2=A0=C2=A0=C2=A0 "bt pretty,raw-values" > > > +=C2=A0=C2=A0=C2=A0 gdb_test_no_output "set print raw-values off" > > > +} > > > + > > >=C2=A0 # Test all combinations with raw off. > > > > > >=C2=A0 gdb_test_no_output "set print raw-frame-arguments off" > > > diff --git a/gdb/testsuite/gdb.python/py-frame-args.py b/gdb/testsuit= e/gdb.python/py-frame-args.py > > > index d80d761b995..3b65eed0dad 100644 > > > --- a/gdb/testsuite/gdb.python/py-frame-args.py > > > +++ b/gdb/testsuite/gdb.python/py-frame-args.py > > > @@ -73,3 +73,16 @@ pretty_printers_dict =3D {} > > > > > >=C2=A0 register_pretty_printers () > > >=C2=A0 gdb.pretty_printers.append (lookup_function) > > > + > > > + > > > +class BasicFrameFilter (object): > > > +=C2=A0=C2=A0=C2=A0 def __init__ (self): > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 self.name =3D "BasicFrame= Filter" > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 self.priority =3D 100 > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 self.enabled =3D True > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 gdb.frame_filters[self.na= me] =3D self > > > + > > > +=C2=A0=C2=A0=C2=A0 def filter (self, frame_iter): > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 return frame_iter > > > + > > > +BasicFrameFilter ()