This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v2] gdb: xtensa: fix frame initialization when PC is invalid


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.

Thanks,
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]