From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 65969 invoked by alias); 11 Jun 2019 02:29:18 -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 65961 invoked by uid 89); 11 Jun 2019 02:29:18 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-8.3 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3,SPF_PASS autolearn=ham version=3.3.1 spammy=H*r:4.82, HX-Languages-Length:1513, H*r:sk:RSA_AES X-HELO: eggs.gnu.org Received: from eggs.gnu.org (HELO eggs.gnu.org) (209.51.188.92) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 11 Jun 2019 02:29:17 +0000 Received: from fencepost.gnu.org ([2001:470:142:3::e]:35401) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1haWXC-0004LT-Nl; Mon, 10 Jun 2019 22:29:14 -0400 Received: from [176.228.60.248] (port=3039 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1haWX8-0008Vc-Rn; Mon, 10 Jun 2019 22:29:11 -0400 Date: Tue, 11 Jun 2019 02:29:00 -0000 Message-Id: <83imtcam8a.fsf@gnu.org> From: Eli Zaretskii To: Philippe Waroquiers CC: gdb-patches@sourceware.org In-reply-to: <20190610211622.15237-1-philippe.waroquiers@skynet.be> (message from Philippe Waroquiers on Mon, 10 Jun 2019 23:16:22 +0200) Subject: Re: [RFA] Ensure GDB printf command can print convenience var strings without a target. References: <20190610211622.15237-1-philippe.waroquiers@skynet.be> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-IsSubscribed: yes X-SW-Source: 2019-06/txt/msg00210.txt.bz2 > From: Philippe Waroquiers > Cc: Philippe Waroquiers > Date: Mon, 10 Jun 2019 23:16:22 +0200 > > Without this patch, GDB printf command calls malloc on the target, > writes the convenience var content to the target, > re-reads the content from the target, and then locally printf the string. > > This implies inferior calls, and does not work when there is no inferior, > or when the inferior is a core dump. > > With this patch, printf command can printf string convenience variables > without inferior function calls. > Ada string convenience variables can also be printed. > > gdb/ChangeLog > > 2019-06-10 Philippe Waroquiers > > * NEWS: Mention that GDB printf and eval commands can now print > C-style and Ada-style convenience var strings without > calling the inferior. > * printcmd.c (printf_c_string): Locally print GDB internal var > instead of transiting via the inferior. > (printf_wide_c_string): Likewise. > > 2019-06-10 Philippe Waroquiers > > * gdb.base/printcmds.exp: Test printing C strings and > C wide strings convenience var without transiting via the inferior. > --- > gdb/NEWS | 7 ++ > gdb/printcmd.c | 143 +++++++++++++++++---------- > gdb/testsuite/gdb.base/printcmds.exp | 39 ++++++++ > 3 files changed, 136 insertions(+), 53 deletions(-) The NEWS part is OK, thanks.