Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: gdb-patches@sourceware.org
Subject: Re: [commit/Ada] print null array pointer as `0x0' rather than `(null)'
Date: Thu, 30 Dec 2010 10:59:00 -0000	[thread overview]
Message-ID: <20101230044241.GI2396@adacore.com> (raw)
In-Reply-To: <m21v50civ7.fsf@igel.home>

> > gdb/ChangeLog:
> >
> >         * ada-valprint.c (ada_val_print_1): Print null array pointers as
> >         `0x0' rather than `(null)'.  Add assertion.
> 
> Why not `null'?

`null' would indeed be more Ada-like.  But two reasons lead to use
plain `0x0' for now: First, it is more consistent with the way we
display all other pointer (we delegate the printing of a pointer
to the common code with prints null pointers as 0x0). And the second
reason is that the language parser in the debugger does not handle
`null' yet.  When GDB prints a value, I try to print it in a way that
the user can copy-paste it in a expression that you can feed back
to GDB.

All the above is on my list of minor little improvements to make
some rainy day, but there are so many more important things I want
to get to, it's not likely to be done anytime soon.

-- 
Joel


      reply	other threads:[~2010-12-30  4:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-29 10:21 Joel Brobecker
2010-12-30  1:54 ` Andreas Schwab
2010-12-30 10:59   ` Joel Brobecker [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=20101230044241.GI2396@adacore.com \
    --to=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=schwab@linux-m68k.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