Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org
Cc: Adam Nemet <anemet@caviumnetworks.com>
Subject: Re: [PATCH] add-symbol-file not to print address truncated
Date: Sat, 03 May 2008 23:52:00 -0000	[thread overview]
Message-ID: <200805040043.26994.pedro@codesourcery.com> (raw)
In-Reply-To: <18460.63329.752236.534872@localhost.localdomain>

Hi Adam,

A Sunday 04 May 2008 00:38:09, Adam Nemet wrote:
> Usual issue, 32-bit host printing 64-bit target addresses incorrectly:
>
>   $ ./gdb -q
>   Setting up the environment for debugging gdb.
>   No symbol table is loaded.  Use the "file" command.
>   (gdb) set mips abi n64
>   (gdb) add-symbol-file s.o 0x1234567876543210
>   add symbol table from file "s.o" at
>           .text_addr = 0x76543210
>                        ^^^^^^^^^^
>   (y or n) y
>   Reading symbols from
>   /home/anemet/src/mips64octeon-unknown-linux-gnu/gdb/s.o...(no debugging
>   symbols found)...done.
>   (gdb) info func
>   All defined functions:
>
>   Non-debugging symbols:
>   0x1234567876543210  f
>
>
> I decided to use the same function to print the address above that is used
> to print the symbols.  This led me to move that code into its own function
> hex_string_addr.  Then looked through gdb and found a few other places that
> used similar patterns to print 32- or 64-bit addresses.  I changed those to
> use this function too.  Since now addresses are zero padded relocate.exp
> needed adjustment.
>

Would paddr_nz (in utils.c) do the trick?

-- 
Pedro Alves


  reply	other threads:[~2008-05-03 23:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-03 23:48 Adam Nemet
2008-05-03 23:52 ` Pedro Alves [this message]
2008-05-03 23:53   ` Adam Nemet
2008-05-04  0:29     ` Pedro Alves
2008-05-04  0:43       ` Adam Nemet
2008-05-04  3:39         ` Daniel Jacobowitz
2008-05-04  7:24           ` Adam Nemet

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=200805040043.26994.pedro@codesourcery.com \
    --to=pedro@codesourcery.com \
    --cc=anemet@caviumnetworks.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