This is an archive of the discontinued LLVM Phabricator instance.

[lldb][NFCI] Rewrite error-handling code in ProcessGDBRemote::MonitorDebugserverProcess
ClosedPublic

Authored by bulbazord on Aug 15 2023, 1:21 PM.

Details

Summary

I'm rewriting this for 2 reasons:

  1. Although a 1024 char buffer is probably enough space, the error string may grow beyond that and we could lose some information. Using StringStream (as we do in the rest of ProcessGDBRemote) seems like a sensible solution.
  2. I am planning on changing UnixSignals::GetSignalAsCString, rewriting things with llvm::formatv will make that process easier.

Diff Detail

Event Timeline

bulbazord created this revision.Aug 15 2023, 1:21 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 15 2023, 1:21 PM
bulbazord requested review of this revision.Aug 15 2023, 1:21 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 15 2023, 1:21 PM
JDevlieghere accepted this revision.Aug 15 2023, 3:05 PM

LGTM

lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
3387–3393
This revision is now accepted and ready to land.Aug 15 2023, 3:05 PM