From: Jiong Wang <jiong.wang@foss.arm.com>
To: Andreas Arnez <arnez@linux.vnet.ibm.com>, gdb-patches@sourceware.org
Cc: Simon Marchi <simon.marchi@ericsson.com>
Subject: Re: [PATCH v2] inf-ptrace: Do not stop memory transfers after a single word
Date: Thu, 16 Mar 2017 10:44:00 -0000 [thread overview]
Message-ID: <c13d8a01-71a8-2bef-2e85-1d52edc919f2@foss.arm.com> (raw)
In-Reply-To: <m3bmt3eucs.fsf@oc1027705133.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 887 bytes --]
On 14/03/17 15:44, Andreas Arnez wrote:
> + /* Restrict to a chunk that fits in the current word. */
> + chunk = std::min (sizeof (PTRACE_TYPE_RET) - skip, len - n);
>
On 14/03/17 15:44, Andreas Arnez wrote:
>
> + /* Restrict to a chunk that fits in the current word. */
> + chunk = std::min (sizeof (PTRACE_TYPE_RET) - skip, len - n);
Hi Andres,
I am seeing the following build failure on my local AArch32 native build:
...binutils-gdb/gdb/inf-ptrace.c:473:65: error: no matching function for call to 'min(unsigned int, ULONGEST)'
There are a few ways to fix this, this patch simply change the type of "skip" from "unsigned int" to "ULONGEST" so operands for std::min can have the same type.
OK for master?
gdb/
2017-03-16 Jiong Wang <jiong.wang@arm.com>
* inf-ptrace.c (inf_ptrace_peek_poke): Change the type to "ULONGEST" for
"skip".
[-- Attachment #2: fix.patch --]
[-- Type: text/x-diff, Size: 562 bytes --]
diff --git a/gdb/inf-ptrace.c b/gdb/inf-ptrace.c
index 32794ec132f72c261debd329196c73a4e3cff75b..431a36b8c726f8475650de00bf895b8d5f48fa83 100644
--- a/gdb/inf-ptrace.c
+++ b/gdb/inf-ptrace.c
@@ -462,7 +462,7 @@ inf_ptrace_peek_poke (pid_t pid, gdb_byte *readbuf,
/* We transfer aligned words. Thus align ADDR down to a word
boundary and determine how many bytes to skip at the
beginning. */
- unsigned int skip = addr & (sizeof (PTRACE_TYPE_RET) - 1);
+ ULONGEST skip = addr & (sizeof (PTRACE_TYPE_RET) - 1);
addr -= skip;
for (n = 0;
next prev parent reply other threads:[~2017-03-16 10:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-14 15:44 Andreas Arnez
2017-03-14 17:13 ` Pedro Alves
2017-03-14 18:24 ` Andreas Arnez
2017-03-16 10:44 ` Jiong Wang [this message]
2017-03-16 14:39 ` Yao Qi
2017-03-16 15:21 ` Andreas Arnez
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=c13d8a01-71a8-2bef-2e85-1d52edc919f2@foss.arm.com \
--to=jiong.wang@foss.arm.com \
--cc=arnez@linux.vnet.ibm.com \
--cc=gdb-patches@sourceware.org \
--cc=simon.marchi@ericsson.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