This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v2] gdb: xtensa: fix frame initialization when PC is invalid
- From: Max Filippov <jcmvbkbc at gmail dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: gdb-patches at sourceware dot org, Maxim Grigoriev <maxim2405 at gmail dot com>, Woody LaRue <larue at cadence dot com>, Marc Gauthier <marc at cadence dot com>
- Date: Tue, 29 Mar 2016 22:56:23 +0300
- Subject: Re: [PATCH v2] gdb: xtensa: fix frame initialization when PC is invalid
- Authentication-results: sourceware.org; auth=none
- References: <1459275473-11718-1-git-send-email-jcmvbkbc at gmail dot com> <56FAD2EA dot 50003 at redhat dot com>
On Tue, Mar 29, 2016 at 10:09 PM, Pedro Alves <palves@redhat.com> wrote:
> On 03/29/2016 07:17 PM, Max Filippov wrote:
>> - op1 = read_memory_integer (pc, 1, byte_order);
>> - if (XTENSA_IS_ENTRY (gdbarch, op1))
>> + if (safe_read_memory_integer (pc, 1, byte_order, &op1)
>> + && XTENSA_IS_ENTRY (gdbarch, op1))
>> {
>
> I'm surprised if this compiles without an "incompatible pointer type"
> warning/error? safe_read_memory_integer's last parameter is
> 'LONGEST *', while op1 is 'char', AFAICS. So you need to change op1
> to be a LONGEST to match.
You're right, sorry. I've checked that it builds and works, but I've missed
that it was configured with --disable-werror.
--
Thanks.
-- Max