This is an archive of the discontinued LLVM Phabricator instance.

[lldb] [gdb-remote] Implement vRun packet
ClosedPublic

Authored by mgorny on Aug 11 2021, 2:00 PM.

Details

Summary

Implement the simpler vRun packet and prefer it over the A packet.
Unlike the latter, it tranmits command-line arguments without redundant
indices and lengths.

Diff Detail

Event Timeline

mgorny requested review of this revision.Aug 11 2021, 2:00 PM
mgorny created this revision.
mgorny updated this revision to Diff 365927.Aug 12 2021, 12:53 AM
mgorny edited the summary of this revision. (Show Details)

Include server tests.

mgorny retitled this revision from [lldb] [gdb-remote] Implement vRun packet [WIP] to [lldb] [gdb-remote] Implement vRun packet.Aug 12 2021, 12:53 AM
mgorny updated this revision to Diff 366084.Aug 12 2021, 1:15 PM

Correct the vRun packet to return a stop reason rather than 'OK' to match GDB behavior. Add initial client tests.

mgorny updated this revision to Diff 366090.Aug 12 2021, 1:41 PM

Handle unsupported qLaunchSuccess gracefully on the client. This effectively makes it possible to launch programs via gdbserver.

Enhance the client tests to verify that the process has actually 'started'.

labath accepted this revision.Sep 7 2021, 5:40 AM

I like this. I am saddened to see that neither method supports setting a "fake" argv[0], but that's not a problem of this patch,,,

This revision is now accepted and ready to land.Sep 7 2021, 5:40 AM

While technically this patch doesn't depend on these two, applying them out of order would cause unnecessary rebase hell.

This revision was landed with ongoing or failed builds.Sep 10 2021, 5:08 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptSep 10 2021, 5:08 AM