[PATCH v2] inf-ptrace: Do not stop memory transfers after a single word

Jiong Wang jiong.wang@foss.arm.com
Thu Mar 16 10:44:00 GMT 2017


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".

-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix.patch
Type: text/x-diff
Size: 562 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20170316/985fabc4/attachment.bin>


More information about the Gdb-patches mailing list