This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Fix crash when completing register names after program exit
ClosedPublic

Authored by DavidSpickett on Jul 4 2023, 1:13 AM.

Details

Summary

Previously the following would crash:
(lldb) run
Process 2594053 launched: '/tmp/test.o' (aarch64)
Process 2594053 exited with status = 0 (0x00000000)
(lldb) register read <tab>

As the completer assumed that the execution context would always
have a register context. After a program has finished, it does not.

Split out the generic parts of the test from the x86 specific tests,
and added "register info" to both.

Diff Detail

Event Timeline

DavidSpickett created this revision.Jul 4 2023, 1:13 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 4 2023, 1:13 AM
DavidSpickett requested review of this revision.Jul 4 2023, 1:13 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 4 2023, 1:13 AM
DavidSpickett added inline comments.
lldb/test/API/functionalities/completion/TestCompletion.py
782

I will add register info here later once I've got an x86 build going again.

Added register info to the x86 test cases.

DavidSpickett edited the summary of this revision. (Show Details)Jul 4 2023, 3:03 AM
This revision is now accepted and ready to land.Jul 5 2023, 10:57 AM