Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Philippe Waroquiers <philippe.waroquiers@skynet.be>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA] Ensure GDB printf command can print convenience var strings without a target.
Date: Tue, 11 Jun 2019 02:29:00 -0000	[thread overview]
Message-ID: <83imtcam8a.fsf@gnu.org> (raw)
In-Reply-To: <20190610211622.15237-1-philippe.waroquiers@skynet.be> (message	from Philippe Waroquiers on Mon, 10 Jun 2019 23:16:22 +0200)

> From: Philippe Waroquiers <philippe.waroquiers@skynet.be>
> Cc: Philippe Waroquiers <philippe.waroquiers@skynet.be>
> 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  <philippe.waroquiers@skynet.be>
> 
> 	* 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  <philippe.waroquiers@skynet.be>
> 
> 	* 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.


  reply	other threads:[~2019-06-11  2:29 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-10 21:16 Philippe Waroquiers
2019-06-11  2:29 ` Eli Zaretskii [this message]
2019-07-05 20:01 ` PING " Philippe Waroquiers
2019-07-08 18:13 ` Pedro Alves
2019-07-08 22:41   ` Philippe Waroquiers
2019-07-09  4:36     ` New FAIL on gdb.base/printcmds.exp (was: Re: [RFA] Ensure GDB printf command can print convenience var strings without a target.) Sergio Durigan Junior
2020-03-02  2:46 ` [PATCH] Fix printf of a convenience variable holding an inferior address Sergio Durigan Junior
2020-03-03 13:39   ` Andrew Burgess
2020-03-03 16:29     ` Sergio Durigan Junior
2020-03-03 16:49       ` Sergio Durigan Junior
2020-03-04 10:53         ` Joel Brobecker
     [not found]           ` <8736al5d8s.fsf@redhat.com>
2020-03-07 11:58             ` Joel Brobecker
2020-03-09 22:56               ` Sergio Durigan Junior
2020-03-10 22:37                 ` Joel Brobecker
2020-03-10 22:57                   ` Sergio Durigan Junior
2020-03-10 23:13                     ` Andreas Schwab
2020-03-10 23:38                       ` Sergio Durigan Junior
2020-03-11 16:34                   ` Sergio Durigan Junior

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83imtcam8a.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=philippe.waroquiers@skynet.be \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox