Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: gdb-patches@sourceware.org
Subject: Re: [PATCH] gdb/tracepoint.c: Don't use printf_vma
Date: Thu, 17 Nov 2016 00:46:00 -0000	[thread overview]
Message-ID: <9e5d6ac0-1825-b1b6-445d-9c7bec3efec7@redhat.com> (raw)
In-Reply-To: <1479251441-16443-1-git-send-email-palves@redhat.com>

On 11/15/2016 11:10 PM, Pedro Alves wrote:
> I noticed that bfd's printf_vma prints to stdout directly:
> 
>   bfd-in2.h:202:#define printf_vma(x) fprintf_vma(stdout,x)
> 
> This is a bad idea in gdb, where we should use
> gdb_stdout/gdb_stderr/gdb_stdlog, etc., to support redirection.
> 
> Eliminate uses of sprintf_vma too while at it.
> 
> Tested on Fedora 23, w/ gdbserver.
> 
> gdb/ChangeLog:
> yyyy-mm-dd  Pedro Alves  <palves@redhat.com>
> 
> 	* tracepoint.c (collection_list::add_memrange): Add gdbarch
> 	parameter.  Use paddress instead of printf_vma.  Adjust recursive
> 	calls.
> 	(collection_list::stringify): Use paddress and phex_nz instead of
> 	sprintf_vma.  Adjust add_memrange call.
> 	* tracepoint.h (collection_list::add_memrange): Declare new method.

Now pushed.

Thanks,
Pedro Alves


      parent reply	other threads:[~2016-11-17  0:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-15 23:10 Pedro Alves
2016-11-16 14:34 ` Luis Machado
2016-11-16 23:58 ` Joel Brobecker
2016-11-17  0:12   ` Pedro Alves
2016-11-19 18:43     ` [FYI/pushed] ARI: Add detection of printf_vma and sprintf_vma (was: "Re: [PATCH] gdb/tracepoint.c: Don't use printf_vma") Joel Brobecker
2016-11-17  0:46 ` Pedro Alves [this message]

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=9e5d6ac0-1825-b1b6-445d-9c7bec3efec7@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-patches@sourceware.org \
    /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