Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Kai Tietz <ktietz70@googlemail.com>
Cc: gdb <gdb@sourceware.org>
Subject: Re: [patch gdb]: Fix display for LLP64 target in window-nat.c
Date: Tue, 19 Feb 2013 14:52:00 -0000	[thread overview]
Message-ID: <20130219145158.GA29938@adacore.com> (raw)
In-Reply-To: <20130219141635.GK22175@adacore.com>

> You should use %s & host_address_to_string instead of %p &
> the various casts. So the following should work:
> 
>       DEBUG_MEM (("gdb: write target memory, %d bytes at 0x%s\n",
> 		  len, host_address_to_string (memaddr)));
> 
> OK with that change.

Actually, I was confused. Sorry. Try either core_addr_to_string_nz
(or core_addr_to_string if you want leading zeros)...


> 
> > Index: windows-nat.c
> > ===================================================================
> > RCS file: /cvs/src/src/gdb/windows-nat.c,v
> > retrieving revision 1.238
> > diff -p -u -r1.238 windows-nat.c
> > --- windows-nat.c	1 Jan 2013 06:41:29 -0000	1.238
> > +++ windows-nat.c	19 Feb 2013 14:05:20 -0000
> > @@ -2312,8 +2312,8 @@ windows_xfer_memory (CORE_ADDR memaddr,
> >    SIZE_T done = 0;
> >    if (write)
> >      {
> > -      DEBUG_MEM (("gdb: write target memory, %d bytes at 0x%08lx\n",
> > -		  len, (DWORD) (uintptr_t) memaddr));
> > +      DEBUG_MEM (("gdb: write target memory, %d bytes at 0x%p\n",
> > +		  len, (LPVOID) (uintptr_t) memaddr));
> >        if (!WriteProcessMemory (current_process_handle,
> >  			       (LPVOID) (uintptr_t) memaddr, our,
> >  			       len, &done))
> > @@ -2323,8 +2323,8 @@ windows_xfer_memory (CORE_ADDR memaddr,
> >      }
> >    else
> >      {
> > -      DEBUG_MEM (("gdb: read target memory, %d bytes at 0x%08lx\n",
> > -		  len, (DWORD) (uintptr_t) memaddr));
> > +      DEBUG_MEM (("gdb: read target memory, %d bytes at 0x%p\n",
> > +		  len, (LPVOID) (uintptr_t) memaddr));
> >        if (!ReadProcessMemory (current_process_handle,
> >  			      (LPCVOID) (uintptr_t) memaddr, our,
> >  			      len, &done))
> 
> -- 
> Joel

-- 
Joel


  reply	other threads:[~2013-02-19 14:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-19 14:09 Kai Tietz
2013-02-19 14:16 ` Joel Brobecker
2013-02-19 14:52   ` Joel Brobecker [this message]
2013-02-19 14:59     ` Kai Tietz
2013-02-19 16:30 ` Eli Zaretskii
2013-02-19 17:24   ` Kai Tietz

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=20130219145158.GA29938@adacore.com \
    --to=brobecker@adacore.com \
    --cc=gdb@sourceware.org \
    --cc=ktietz70@googlemail.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