On Tue, Mar 27, 2018 at 11:26 AM, Tim Newsome <t...@sifive.com> wrote:
>
> However, reporting an error to gdb doesn't seem to be all that useful. I've
>> been trying with a Cortex-M target (STM32F303) and effectively the error
>> prevents gdb from fetching all registers from the target. Here's what I
>> get on
>> "info reg":
>>
>> Debug: 585 5119 gdb_server.c:3129 gdb_input_inner(): received packet:
>> 'p27'
>> Debug: 586 5119 gdb_server.c:1308 gdb_get_register_packet(): Couldn't get
>> register fpscr.
>> Debug: 587 5119 gdb_server.c:1388 gdb_error(): Reporting -4 to GDB as
>> generic
>> error
>>
>
> Yes, gdb's behavior is pretty poor there. I'd like to address that at some
> point, but haven't yet.
>
Here's a RISC-V-specific patch to deal with this problem:
https://github.com/riscv/riscv-binutils-gdb/pull/143
It's probably possible to do this target-independently
in frame_register_unwind() but I'm not feeling brave enough to touch that
right now.
Tim
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel