From: Kai Tietz <ktietz70@googlemail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: gdb@sourceware.org
Subject: Re: [patch gdb]: Fix display for LLP64 target in window-nat.c
Date: Tue, 19 Feb 2013 17:24:00 -0000 [thread overview]
Message-ID: <CAEwic4YN2mxjWta7fM7nSOmnwJiVbqP2d_VHbHAu=4A-m+T41Q@mail.gmail.com> (raw)
In-Reply-To: <83obfgp8p5.fsf@gnu.org>
2013/2/19 Eli Zaretskii <eliz@gnu.org>:
>> Date: Tue, 19 Feb 2013 15:09:06 +0100
>> From: Kai Tietz <ktietz70@googlemail.com>
>>
>> this patch fixes a pointer-truncation in display on Windows LLP64 target.
>>
>> ChangeLog 2013-02-19 Kai Tietz <ktietz@redhat.com>
>>
>> * windows-nat.c (windows_xfer_memory): Fix debug-output
>> for LLP64.
>>
>> Ok for apply?
>
> Isn't DWORD_PTR the right replacement for DWORD in these cases?
No, CORE_ADDR is the type we want to print. DWORD_PTR is holding the
width of the host-pointer, not necessarily compatible to CORE_ADDR.
We want to fix pointer truncation here, not just express it different.
> Actually, I don't understand what is the cast to uintptr_t doing
> there, it seems redundant.
Well, the issue is that CORE_ADDR might be a smaller integer-scalar as
a pointer. So before casting it to a pointer you need to make integer
wide-enough.
Cheers,
Kai
prev parent reply other threads:[~2013-02-19 17:24 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
2013-02-19 14:59 ` Kai Tietz
2013-02-19 16:30 ` Eli Zaretskii
2013-02-19 17:24 ` Kai Tietz [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='CAEwic4YN2mxjWta7fM7nSOmnwJiVbqP2d_VHbHAu=4A-m+T41Q@mail.gmail.com' \
--to=ktietz70@googlemail.com \
--cc=eliz@gnu.org \
--cc=gdb@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