[Lldb-commits] [PATCH] D153626: [lldb] Use SmallVector for handling register data

David Spickett via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Jun 26 09:16:43 PDT 2023


DavidSpickett updated this revision to Diff 534596.
DavidSpickett added a comment.

Drop {} in one place now that the resize is not conditional. The logic
there also seems faulty, but in other ways I will stay out of for now.

I did attempt another sanitizers build and realised I should have been
setting leak checker options. That got me to missing symbols, and
no amount of preloading seemed to help there. Not sure what went wrong.

I looked at asserting or adding some checker methods. Given that you're
going to resize to X then pass X as the size to the subsequent call,
there's not much value in it. It would prevent some typos maybe.

On the same theme I looked at adding overloads that took smallvector
directly, but with only 3/4 calls to each one it just didn't seem worth it.

The existing uses are compact enough to check manually and/or in a
sanitized build.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D153626/new/

https://reviews.llvm.org/D153626

Files:
  lldb/include/lldb/Utility/RegisterValue.h
  lldb/source/Host/common/NativeRegisterContext.cpp
  lldb/source/Plugins/ABI/AArch64/ABIMacOSX_arm64.cpp
  lldb/source/Plugins/ABI/AArch64/ABISysV_arm64.cpp
  lldb/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp
  lldb/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp
  lldb/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp
  lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux.cpp
  lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
  lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h
  lldb/source/Target/RegisterContext.cpp
  lldb/source/Utility/RegisterValue.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D153626.534596.patch
Type: text/x-patch
Size: 31668 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230626/2a8331e8/attachment-0001.bin>


More information about the lldb-commits mailing list