public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Nick Roberts <nickrob@snap.net.nz>
Cc: Eli Zaretskii <eliz@gnu.org>, gdb@sources.redhat.com
Subject: Re: Consistent format for memory addresses
Date: Wed, 25 May 2005 21:28:00 -0000	[thread overview]
Message-ID: <20050525212813.GA18065@nevyn.them.org> (raw)
In-Reply-To: <17044.59885.202702.599140@farnswood.snap.net.nz>

On Thu, May 26, 2005 at 09:11:09AM +1200, Nick Roberts wrote:
> Eli Zaretskii writes:
>  > > From: Nick Roberts <nickrob@snap.net.nz>
>  > > Date: Wed, 25 May 2005 15:52:47 +1200
>  > > Cc: gdb@sources.redhat.com
>  > > 
>  > > In truth I don't mind seven or eight digits. What makes it difficult for me
>  > > is if the output of the CLI commands constantly change.
>  > 
>  > But this (and similar) changes should not be very hard to accommodate
>  > for in Emacs, even if you search for the address as a string.  For
>  > instance, you could use a regexp that allows for an arbitrary number
>  > of leading zeroes, right?
>  > 
>  > Or am I missing something?
> 
> Sure all differences can be accommodated if I know what the rules are. But as
> Mark pointed out there are different systems. Presumably they might have
> different rules. However, if the same function is used to print out all the
> addresses, I don't need to know what format the address has. Since the output
> address the two commands would be identical, I can simply record it from one
> command and look for it in the other.

You know it's a number - it's going to stay a number.  A function to
turn one hex number into a regular expression that would match it with
leading zeros wouldn't be much work.

> The discrepancy in the example I referred to arises because disassemble now
> uses ui_out_field_core_addr while "info frame" still uses
> deprecated_print_address_numeric. The deprecated prefix suggests that this
> arrangement is not permanent. I would like to make changes now like the one
> below. Clearly it would be sensible to change the other calls to
> deprecated_print_address_numeric and, as it stands, it probably introduces a
> memory leak and it might conflict with MI. However, I would like some
> re-assurance that such a change would be accepted before going to the trouble
> of providing a proper patch.

The change is not correct.  The ui_out_* output is considerably different in MI
mode.  I think paddr_nz will do what you want though.

-- 
Daniel Jacobowitz
CodeSourcery, LLC

  reply	other threads:[~2005-05-25 21:28 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-25  3:18 Nick Roberts
2005-05-25  3:37 ` Daniel Jacobowitz
2005-05-25  3:51   ` Nick Roberts
2005-05-25 18:00     ` Eli Zaretskii
2005-05-25 21:10       ` Nick Roberts
2005-05-25 21:28         ` Daniel Jacobowitz [this message]
2005-05-25 23:11           ` Nick Roberts
2005-05-26  3:39             ` Eli Zaretskii
2005-05-26  3:46               ` Daniel Jacobowitz
2005-05-26  4:12               ` Nick Roberts
2005-05-25  4:12   ` Nick Roberts
2005-05-25  5:27 ` M.M. Kettenis
2005-05-25  5:48   ` Nick Roberts

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=20050525212813.GA18065@nevyn.them.org \
    --to=drow@false.org \
    --cc=eliz@gnu.org \
    --cc=gdb@sources.redhat.com \
    --cc=nickrob@snap.net.nz \
    /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).