From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 118293 invoked by alias); 15 Jul 2016 09:04:54 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 118274 invoked by uid 89); 15 Jul 2016 09:04:52 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_NEUTRAL autolearn=no version=3.3.2 spammy=H*MI:local, H*M:local, 17437, Hx-languages-length:2291 X-HELO: mx-relay04.cloudservice.ag Received: from mx-relay04.cloudservice.ag (HELO mx-relay04.cloudservice.ag) (81.20.94.241) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 15 Jul 2016 09:04:42 +0000 Received: from fw1.hostedoffice.ag ([81.20.90.82]) by mx-relay04.cloudservice.ag; Fri, 15 Jul 2016 11:04:38 +0200 Received: from EX132MBOX2B.de2.local (fw3.hostedoffice.ag [46.235.240.122]) by qhexrelay2.hosting.inetserver.de (Postfix) with ESMTP id C135318708D for ; Fri, 15 Jul 2016 11:04:36 +0200 (CEST) Received: from EX132MBOX2B.de2.local (10.50.10.182) by EX132MBOX2B.de2.local (10.50.10.182) with Microsoft SMTP Server (TLS) id 15.0.1178.4; Fri, 15 Jul 2016 11:04:32 +0200 Received: from EX132MBOX2B.de2.local ([fe80::d834:1170:aec:b5fa]) by EX132MBOX2B.de2.local ([fe80::d834:1170:aec:b5fa%19]) with mapi id 15.00.1178.000; Fri, 15 Jul 2016 11:04:32 +0200 From: =?iso-8859-1?Q?V=F6rtler=2C_Thilo?= To: "gdb-patches@sourceware.org" Subject: [PING] RE: [RFC][PATCH] - Fix pretty-printers which call the inferiors, mi-interface crashs Date: Fri, 15 Jul 2016 09:04:00 -0000 Message-ID: <641e01aae8f7432e98eb2aba3f54f022@EX132MBOX2B.de2.local> x-ms-exchange-transport-fromentityheader: Hosted x-exclaimer-md-config: 2329e0da-e5c9-454a-b62b-9269baa51382 x-hoag-tnef: done Content-Type: multipart/mixed; boundary="_002_641e01aae8f7432e98eb2aba3f54f022EX132MBOX2Bde2local_" MIME-Version: 1.0 X-cloud-security-sender:thilo.voertler@coseda-tech.com X-cloud-security-recipient:gdb-patches@sourceware.org X-cloud-security-Virusscan:CLEAN X-cloud-security-disclaimer: This E-Mail was scanned by E-Mailservice on mx-relay04.cloudservice.ag with 3040262CDB X-cloud-security-connect: fw1.hostedoffice.ag[81.20.90.82], TLS=0, IP=81.20.90.82 X-cloud-security:scantime:.1637 X-IsSubscribed: yes X-SW-Source: 2016-07/txt/msg00167.txt.bz2 --_002_641e01aae8f7432e98eb2aba3f54f022EX132MBOX2Bde2local_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-length: 2321 Ping ! > Hi, > as described in Bug 17437 the mi interface corrupts cached frames in=20 > the list_arg_or_local function of mi-cmd-stack.c when a pretty-printer=20 > calls a function of the inferior. To prevent this the frame_id is=20 > stored and used to restore the frame after calling list_arg_or_local > - MI regressions were run and no effect through the patch was seen >=20 > Is this patch okay? >=20 > BR, Thilo >=20 >=20 > gdb/ChangeLog: >=20 > 2016-06-02 Thilo V=F6rtler >=20 > * mi-cmd-stack.c (list_args_or_locals) the mi interface corrupts > cached frames in the list_arg_or_local function of mi-cmd-stack.c=20 > when > a pretty-printer calls a function of the inferior. To prevent this the > frame_id is stored and used to restore the frame after calling > list_arg_or_local > >From 1bd73a4b39fcbe31362c57a6d2e0392018a62435 Mon Sep 17 00:00:00 2001 >From: =3D?UTF-8?q?Thilo=3D20V=3DC3=3DB6rtler?=3D >Date: Wed, 1 Jun 2016 15:16:57 +0200 >Subject: [PATCH] FIX pretty-printers which call the inferiors though the m= i-interface > >- as described in Bug 17437 the mi interface corrupts cached frames in >the list_arg_or_local function of mi-cmd-stack.c when a pretty-printer >calls a function of the inferior. To prevent this the frame_id is stored >and used to restore the frame after calling list_arg_or_local >- MI regressions were run and no effect through the patch was seen >--- > gdb/mi/mi-cmd-stack.c | 4 ++++ > 1 files changed, 4 insertions(+), 0 deletions(-) > >diff --git a/gdb/mi/mi-cmd-stack.c b/gdb/mi/mi-cmd-stack.c >index 390fc7e..5622834 100644 >--- a/gdb/mi/mi-cmd-stack.c >+++ b/gdb/mi/mi-cmd-stack.c >@@ -581,8 +581,10 @@ list_args_or_locals (enum what_to_list what, enum pri= nt_values values, > struct type *type; > char *name_of_result; > struct ui_out *uiout =3D current_uiout; >+ struct frame_id id; >=20 > block =3D get_frame_block (fi, 0); >+ id =3D get_frame_id (fi); >=20 > switch (what) > { >@@ -680,6 +682,8 @@ list_args_or_locals (enum what_to_list what, enum prin= t_values values, > list_arg_or_local (&entryarg, what, values, skip_unavailable); > xfree (arg.error); > xfree (entryarg.error); >+ >+ fi =3D frame_find_by_id(id); > } > } >=20 >--=20 >1.7.1 --_002_641e01aae8f7432e98eb2aba3f54f022EX132MBOX2Bde2local_ Content-Type: application/octet-stream; name="0001-FIX-pretty-printers-which-call-the-inferiors-though-.patch" Content-Description: 0001-FIX-pretty-printers-which-call-the-inferiors-though-.patch Content-Disposition: attachment; filename="0001-FIX-pretty-printers-which-call-the-inferiors-though-.patch"; size=1418; creation-date="Mon, 27 Jun 2016 14:35:03 GMT"; modification-date="Mon, 27 Jun 2016 14:35:03 GMT" Content-Transfer-Encoding: base64 Content-length: 1924 RnJvbSAxYmQ3M2E0YjM5ZmNiZTMxMzYyYzU3YTZkMmUwMzkyMDE4YTYyNDM1 IE1vbiBTZXAgMTcgMDA6MDA6MDAgMjAwMQpGcm9tOiA9P1VURi04P3E/VGhp bG89MjBWPUMzPUI2cnRsZXI/PSA8dGhpbG8udm9lcnRsZXJAY29zZWRhLXRl Y2guY29tPgpEYXRlOiBXZWQsIDEgSnVuIDIwMTYgMTU6MTY6NTcg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