On Tue, Mar 27, 2018 at 1:12 AM, Matthias Welwarsky <
matthias.welwar...@sysgo.com> wrote:
> > I haven’t looked into why r0 wasn’t readable nor into why gdb decided to
> > close the connection when it got that response. But given that gdb
> behaves
> > that way for ARM targets, it seems best not to report errors to it unless
> > we know it can handle them with grace.
>
> Well 'r0' is unreadable (in fact any register is) because your tree doesn't
> include the following patch:
> http://openocd.zylin.com/#/c/4432/
Interesting. Thanks for pointing that out. That looks like a useful patch
in general. I guess it's time for another merge from mainline...
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.
For me the bottom line is that a user should get feedback when they're
accessing a register that doesn't exist. I don't really see how to make
that happen without reporting the error, which feels like the right thing
to do in any case.
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