On Fri, Mar 30, 2018 at 8:19 AM, Matthias Welwarsky <
matthias.welwar...@sysgo.com> wrote:
> On Dienstag, 27. März 2018 23:41:54 CEST Tim Newsome wrote:
> > 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.
>
> OK, here's my position on this patch: We already have a similar issue with
> memory access failure reporting. There's a command to enable it. If we
> want to
> make it easy for gdb people to improve their prodcuts behaviour we should
> also
> make the error reporting for register access failure a parameter that can
> be
> changed at runtime instead of keying it to a target. Especially, Tim, as
> it is
> _not_ openocd-target specific but specific to the particular target
> support in
> gdb. So, I suggest you change your patch to introduce a command
> 'gdb_report_register_access_error' similar to 'gdb_report_data_abort' and
> make sure it defaults to 'off'. Please also add documentation to
> openocd.texi.
> Your RISC-V target configuration scripts can then enable this option, as
> can
> everyone else who wants to experiment with it.
>
That works for me. I'll update the patch some time next week.
Thank you,
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