This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix length calculation in aarch64_linux_set_debug_regs
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: Simon Marchi <simon dot marchi at ericsson dot com>
- Cc: <gdb-patches at sourceware dot org>, <qiyaoltc at gmail dot com>
- Date: Thu, 19 Nov 2015 11:52:23 +0000
- Subject: Re: [PATCH] Fix length calculation in aarch64_linux_set_debug_regs
- Authentication-results: sourceware.org; auth=none
- References: <1446475684-31936-1-git-send-email-simon dot marchi at ericsson dot com>
Simon Marchi <simon.marchi@ericsson.com> writes:
> correct. Instead, it can be computed simply with:
>
> offsetof (struct user_hwdebug_state, dbg_regs) + count * sizeof (regs.dbg_reg[0]);
>
> Does it make sense?
>
> gdb/ChangeLog:
>
> * nat/aarch64-linux-hw-point.c (aarch64_linux_set_debug_regs): Fix
> iov_len computation.
The old code is correct, but in order to make G++ happy, we still need
this patch, is that right?
--
Yao (éå)