This is an archive of the discontinued LLVM Phabricator instance.

[lldb] [gdb-remote] Support QEnvironment fallback to hex-encoded
ClosedPublic

Authored by mgorny on Aug 12 2021, 11:35 PM.

Details

Summary

Fall back to QEnvironmentHexEncoded if QEnvironment is not supported.
The latter packet is an LLDB extension, while the former is universally
supported.

Add tests for both QEnvironment and QEnvironmentHexEncoded packets,
including both use due to characters that need escaping and fallback
when QEnvironment is not supported.

Diff Detail

Event Timeline

mgorny requested review of this revision.Aug 12 2021, 11:35 PM
mgorny created this revision.
labath accepted this revision.Sep 7 2021, 5:49 AM

cool

lldb/test/API/tools/lldb-server/main.cpp
332

Printing a quoted this in the case of a null pointer is exactly the opposite of what one would normally expect. It's not a big deal, since we control the inputs, but it may still be better to print <unset> or something like that instead...

This revision is now accepted and ready to land.Sep 7 2021, 5:49 AM
mgorny added inline comments.Sep 7 2021, 9:43 AM
lldb/test/API/tools/lldb-server/main.cpp
332

i.e. s/__unset__/<unset>/? I have strong Python background, and double underscores are common for special stuff in Python world.

labath added inline comments.Sep 7 2021, 11:30 AM
lldb/test/API/tools/lldb-server/main.cpp
332

Actually, never mind. I saw more quotes than there were. This is fine too...

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