public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Tom Tromey <tom@tromey.com>, gdb-patches@sourceware.org
Subject: Re: [RFA 3/3] Special case NULL when using printf's %s format
Date: Fri, 16 Feb 2018 12:08:00 -0000	[thread overview]
Message-ID: <6abda67a-ad87-ebc7-e0d4-ab60e7e4cbc6@redhat.com> (raw)
In-Reply-To: <20180215205001.337-4-tom@tromey.com>

On 02/15/2018 08:50 PM, Tom Tromey wrote:
> This changes the printf command's %s and %ls formats to special-case
> NULL, and print "(null)" for these.  This is PR cli/14977.  This
> behavior seems a bit friendlier; I was undecided on whether other
> invalid pointers should be handled specially somehow, so for the time
> being I've left those out.

A question here is what to do on targets that actually map things at
address zero.  IIRC, some ARM chips do that.  For such ports, I think you'd
want to be able to read/print that memory.  I thought we had a gdbarch hook
for that, but I'm not finding it right now.  Maybe I was thinking of
has_section_at_zero in dwarf2read.c.

Thanks,
Pedro Alves

  reply	other threads:[~2018-02-16 12:08 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-15 20:50 [RFA 0/3] a few minor printf fixes Tom Tromey
2018-02-15 20:50 ` [RFA 1/3] Add usage to printf command Tom Tromey
2018-02-16 11:35   ` Alan Hayward
2018-02-16 21:58     ` Tom Tromey
2018-02-16 23:09       ` Simon Marchi
2018-02-19  9:16         ` Alan Hayward
2018-02-15 20:50 ` [RFA 3/3] Special case NULL when using printf's %s format Tom Tromey
2018-02-16 12:08   ` Pedro Alves [this message]
2018-02-16 12:25     ` Pedro Alves
2018-02-16 21:58       ` Tom Tromey
2018-02-15 20:50 ` [RFA 2/3] Allow - in %p for printf Tom Tromey
2018-02-16 11:31   ` Alan Hayward
2018-02-27  3:50     ` Tom Tromey
2018-03-14 15:44 ` [RFA 0/3] a few minor printf fixes Tom Tromey

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=6abda67a-ad87-ebc7-e0d4-ab60e7e4cbc6@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tom@tromey.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).