From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15765 invoked by alias); 23 Jul 2014 14:26:36 -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 15613 invoked by uid 89); 23 Jul 2014 14:26:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.1 required=5.0 tests=AWL,BAYES_20,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: na01-bn1-obe.outbound.protection.outlook.com Received: from dns-bn1lp0143.outbound.protection.outlook.com (HELO na01-bn1-obe.outbound.protection.outlook.com) (207.46.163.143) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Wed, 23 Jul 2014 14:26:32 +0000 Received: from CH1PR03CA010.namprd03.prod.outlook.com (10.255.156.155) by BN1PR03MB140.namprd03.prod.outlook.com (10.255.201.25) with Microsoft SMTP Server (TLS) id 15.0.990.7; Wed, 23 Jul 2014 14:26:28 +0000 Received: from BN1BFFO11FD010.protection.gbl (10.255.156.132) by CH1PR03CA010.outlook.office365.com (10.255.156.155) with Microsoft SMTP Server (TLS) id 15.0.990.7 via Frontend Transport; Wed, 23 Jul 2014 14:26:27 +0000 Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1BFFO11FD010.mail.protection.outlook.com (10.58.144.73) with Microsoft SMTP Server (TLS) id 15.0.980.11 via Frontend Transport; Wed, 23 Jul 2014 14:26:28 +0000 Received: from fsr-ub1264-100.ea.freescale.net (fsr-ub1264-100.ea.freescale.net [10.171.74.130]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id s6NEQPgZ023333; Wed, 23 Jul 2014 07:26:26 -0700 From: Adrian Sendroiu To: CC: Adrian Sendroiu Subject: [PATCH 0/2] Reimplement redirection for MI Date: Wed, 23 Jul 2014 14:26:00 -0000 Message-ID: <1406125575-28311-1-git-send-email-adrian.sendroiu@freescale.com> X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:192.88.168.50;CTRY:US;IPV:CAL;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(6009001)(199002)(189002)(68736004)(92566001)(92726001)(6806004)(20776003)(47776003)(64706001)(88136002)(110136001)(44976005)(81342001)(87936001)(77156001)(83072002)(89996001)(87286001)(50986999)(229853001)(4396001)(85852003)(50226001)(2351001)(107046002)(97736001)(83322001)(99396002)(86362001)(93916002)(36756003)(33646002)(77982001)(31966008)(84676001)(102836001)(79102001)(48376002)(105606002)(106466001)(74662001)(74502001)(46102001)(21056001)(81542001)(85306003)(95666004)(50466002)(76482001)(104016003)(104166001)(62966002)(26826002)(80022001);DIR:OUT;SFP:;SCL:1;SRVR:BN1PR03MB140;H:tx30smr01.am.freescale.net;FPR:;MLV:ovrnspm;PTR:InfoDomainNonexistent;MX:1;LANG:en; MIME-Version: 1.0 Content-Type: text/plain X-Microsoft-Antispam: BCL:0;PCL:0;RULEID: X-Forefront-PRVS: 028166BF91 Received-SPF: Fail (: domain of freescale.com does not designate 192.88.168.50 as permitted sender) receiver=; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=adrian.sendroiu@freescale.com; X-OriginatorOrg: freescale.com X-SW-Source: 2014-07/txt/msg00573.txt.bz2 The current implementation uses a "saved_buffer" field to save the current stream when doing a redirection, which will not function correctly in the case of nested mi_redirect calls. These patches reimplement the redirection using a stack of streams, in a manner similar with the one in the cli interpreter. Adrian Sendroiu (2): cli/cli-logging.c: don't call ui_out_redirect for MI when disabling logging mi-out: Implement mi redirection using a stack. gdb/cli/cli-logging.c | 3 +- gdb/mi/mi-out.c | 75 +++++++++++++++++++++++++++++-------------------- 2 files changed, 46 insertions(+), 32 deletions(-) -- 1.7.9.5