aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>2025-03-20 13:32:52 -0700
committerGitHub <noreply@github.com>2025-03-20 13:32:52 -0700
commitad5cac3b06c3cb41397acc1fc96beae9b460f20c (patch)
tree8d1efb791e6c90a781f12b082ab6bc3afb56b83a /clang/lib/CodeGen/CodeGenModule.cpp
parente60e0641583a144703433579b8f241276637fdb0 (diff)
downloadllvm-ad5cac3b06c3cb41397acc1fc96beae9b460f20c.zip
llvm-ad5cac3b06c3cb41397acc1fc96beae9b460f20c.tar.gz
llvm-ad5cac3b06c3cb41397acc1fc96beae9b460f20c.tar.bz2
[lldb][debugserver] remove g/G packet handling from debugserver (#132127)
In 2013 we added the QSaveRegisterState and QRestoreRegisterState packets to checkpoint a thread's register state while executing an inferior function call, instead of using the g packet to read all registers into lldb, then the G packet to set them again after the func call. Since then, lldb has not sent g/G (except as a bug) - it either asks for registers individually (p/P) or or asks debugserver to save and restore the entire register set with these lldb extensions. Felipe recently had a codepath that fell back to using g/G and found that it does not work with the modern signed fp/sp/pc/lr registers that we can get -- it sidesteps around the clearing of the non-addressable bits that we do when reading/writing them, and results in a crash. ( https://github.com/llvm/llvm-project/pull/132079 ) Instead of fixing that issue, I am removing g/G from debugserver because it's not needed by lldb, and it will would be easy for future bugs to creep in to this packet that lldb should not use, but it can accidentally fall back to and result in subtle bugs. This does mean that a debugger using debugserver on darwin which doesn't use QSaveRegisterState/QRestoreRegisterState will need to fall back to reading & writing each register individually. I'm open to re-evaluating this decision if this proves to be needed, and supporting these lldb extensions is onerous.
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions