Skip to content

LLDB compatibility changes (rebased)#161

Open
thomasgoodfellow wants to merge 3 commits into
tum-ei-eda:masterfrom
thomasgoodfellow:lldb_compat
Open

LLDB compatibility changes (rebased)#161
thomasgoodfellow wants to merge 3 commits into
tum-ei-eda:masterfrom
thomasgoodfellow:lldb_compat

Conversation

@thomasgoodfellow

Copy link
Copy Markdown

[original fork was taken from wysiwyng's, after forming a mess with multiple remotes decided simpler to transplant onto better upstream]

Addition of a limited set of the "GDB Remote Protocol Extensions" to the GDB server support of ETISS. The extensions are documented in https://lldb.llvm.org/resources/lldbgdbremote.html and although ostensibly optional and performance-oriented appear to be somewhat required for RISC-V support in the lldb client. Without them stack backtraces and frame (local) variables and registers were not working.

The set chosen was determined by comparing the behavior of remote-debugging against QEMU and progressively adding extension support until the lldb client was usable. It isn't certain that all of the extensions implemented are actually necessary since the easiest ones were added first.

The "NibbleString" helper was added to avoid fiddly length-dependent string arithmetic when progressively matching command tokens on the extended commands. Could be applied throughout handlePacket() as a minor tidy-up but should be in a separate issue.

ETISS Builder and others added 3 commits July 16, 2025 15:13
Changes fix lack of thread context (symptom: "register read" failed with
error about lacking prcoess/thread context), however callstacks still
not working. Parking in this state as this works well enough to work on
other demo tasks.
Reverted to GDB command handling logging being commented out. Switched
to the generated register descriptions for the general purpose
registers. This is incomplete work as it doesn't attempt to cover other
register sets (FP, CSR, custom). This was implemented as part of
attempting to get full backtrace support in the LLDB client, which still
does not work (however surprisingly it does work in VSCode)

64-bit GP registers should work but have not been tested.
@PhilippvK

Copy link
Copy Markdown
Member

How about the changes to the src/IntegratedLibrary/gdb/GDBConnection.cpp file for fixing the noack mode? See f97e2b2

@PhilippvK

Copy link
Copy Markdown
Member

The CI Trigger unfortunately does not work for forks (because the CI tokens are missing). I will look into the other failing test soon.

@PhilippvK PhilippvK added this to the Release v0.12 milestone Sep 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants