RTEMS5 libdebugger/gdb issue

Chris Johns chrisj at rtems.org
Fri Jul 12 20:56:39 UTC 2019


Hi,

Sorry about the delay, I have had to suddenly travel.

On 12/7/19 1:38 am, Wilkes, Jacob C. wrote:
> I am working with the current master branch of both RTEMS and RTEMS-LIBBSD on an
> Avnet PicoZed module (Xilinx Zynq 7015) with SMP enabled.  I am attempting to do
> some debugging (over Ethernet) using the remote gdb server provided by RTEMS and
> the arm-rtems5-gdb executable from RTEMS source builder.  I am able to connect
> from my host PC to the gdb server running within RTEMS on my Zynq, however I am
> unable to get breakpoints to work as expected.  After setting a breakpoint the
> system will pause but gdb on my host PC does not seem to register it (it will
> just remain at continue until I use ctrl-c to break out of it).
> 
> Does anyone have any idea what might be happening here?
> 

I suspect a few things.

First libdebugger SMP support is not well tested and has some issues I have not
fully resolved on ARM. I think I have locks all in the right places. I also
think the hardware breakpoint support needs to handle the context id register
and that needs to be set to the thread id or the other core will trip a debug
event with an inverted address mask mode when stepping.

I am also starting to wonder if there maybe some ARM/thumb mode issues on the
Zynq in the low level critical code. I am seeing better results on the BBB I am
currently working on which is all ARM mode code. This could be A9 vs A8 differences.

There are some bugs in the code I have under test and I am waiting for feedback
on. You can find these changes here so please feel free to try ...

https://ftp.rtems.org/pub/rtems/people/chrisj/libdebugger/

The patches include changes to support the BeagleBoneBlack in its BSP, it adds
memory mapped debug register and lots of other small changes.

Th patches also include a change to use a special debug interrupt mask bit in
the debug hardware. I think the bit is present on the A9 but I seem to remember
something about it being documented as going away. I wonder if this bit
complicates SMP mode.

The ARM support here is complex and the differences in devices adds to the
complexity. The ARM support to date has all been unfunded work so I work on it
when time permits. :)

I hope this help.

Chris





More information about the users mailing list