Skip to content

Commit da8ed66

Browse files
committed
Add GDB thread command support
This commit updates the MRI core to version 1.1.20200413.0 which now includes support for GDB thread commands. It also provides the required implementations of the Platform_Rtos*() functions for ThreadDebug and KernelDebug to enable that new thread support in each of those debug monitors. Changes to the MRI core include: * Improve T packet response - Added support for notifying GDB of current thread id, if running in a RTOS environment, and expanding on the cause of debug trap stops to let GDB know which watchpoint, if any, was the cause. * vCont support - This commit adds support for single stepping, continuing, and ranged single stepping in single and multi threaded environments. The ranged single stepping is a really cool feature that reduces the round trip traffic that usually occurs between MRI and GDB when single stepping through code at source code level. Ranged single stepping will just continue execution on each single stepped instruction that corresponds to the current source code line and only send a T stop response to GDB when the program counter points to an instruction not in the range of the current source code line. * Implement qf/sThreadInfo request to list threads to GDB - Allows MRI to respond to GDB's qfThreadInfo & qsThreadInfo requests with a list of the RTOS thread IDs. * Added qThreadExtraInfo support - Allows GDB to call and retrieve extra information about a particular thread ID as a string. For RTX, it currently returns the thread name and its state (running, waiting, etc.) * Add support for Hg command - GDB sends this command to indicate which thread's registers should be reference by the next 'g' or 'G' command. Renamed the ScatterGather class to MriContext and now use it from the higher level MRI core code to access the CPU register contents. When Hg is sent, MRI will switch the RTX thead context used for future register read and write operations. * Added support for the T command - The T command is sent by GDB to see if a particular thread ID is still active or not. GDB sends this command to a remote stub when the user types the "thread id#" command into the user interface to see if the specified ID is valid or not.
1 parent 25d4290 commit da8ed66

22 files changed

+1627
-312
lines changed

Diff for: libraries/KernelDebug/src/KernelDebug.cpp

+349-8
Large diffs are not rendered by default.

Diff for: libraries/MRI/src/architectures/armv7-m/armv7-m.h

+4-2
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@
5858

5959
#include <stdint.h>
6060
#include <core/token.h>
61-
#include <core/scatter_gather.h>
61+
#include <core/context.h>
62+
#include <core/platforms.h>
6263

6364

6465
/* Give friendly names to the indices of important registers in the context scatter gather list. */
@@ -91,7 +92,8 @@
9192

9293
typedef struct
9394
{
94-
ScatterGather context;
95+
MriContext context;
96+
PlatformTrapReason reason;
9597
uint32_t taskSP;
9698
uint32_t sp;
9799
uint32_t exceptionNumber;

0 commit comments

Comments
 (0)