[Lldb-commits] [PATCH] D150804: [lldb] Guarantee the lifetimes of all strings returned from SBAPI

Alex Langford via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed May 17 11:01:17 PDT 2023


bulbazord created this revision.
bulbazord added reviewers: jingham, mib.
Herald added a project: All.
bulbazord requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

LLDB should guarantee that the strings returned by SBAPI methods
live forever. I went through every method that returns a string and made
sure that it was added to the ConstString StringPool before returning if
it wasn't obvious that it was already doing so.
I've also updated the docs to document this behavior.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D150804

Files:
  lldb/docs/design/sbapi.rst
  lldb/source/API/SBAttachInfo.cpp
  lldb/source/API/SBBreakpoint.cpp
  lldb/source/API/SBBreakpointLocation.cpp
  lldb/source/API/SBBreakpointName.cpp
  lldb/source/API/SBCommandInterpreter.cpp
  lldb/source/API/SBData.cpp
  lldb/source/API/SBEvent.cpp
  lldb/source/API/SBExpressionOptions.cpp
  lldb/source/API/SBFrame.cpp
  lldb/source/API/SBFunction.cpp
  lldb/source/API/SBInstruction.cpp
  lldb/source/API/SBLaunchInfo.cpp
  lldb/source/API/SBModule.cpp
  lldb/source/API/SBPlatform.cpp
  lldb/source/API/SBProcess.cpp
  lldb/source/API/SBProcessInfo.cpp
  lldb/source/API/SBQueue.cpp
  lldb/source/API/SBStream.cpp
  lldb/source/API/SBStringList.cpp
  lldb/source/API/SBTarget.cpp
  lldb/source/API/SBThread.cpp
  lldb/source/API/SBTrace.cpp
  lldb/source/API/SBTraceCursor.cpp
  lldb/source/API/SBType.cpp
  lldb/source/API/SBTypeCategory.cpp
  lldb/source/API/SBTypeFilter.cpp
  lldb/source/API/SBTypeNameSpecifier.cpp
  lldb/source/API/SBTypeSummary.cpp
  lldb/source/API/SBTypeSynthetic.cpp
  lldb/source/API/SBUnixSignals.cpp
  lldb/source/API/SBValue.cpp
  lldb/source/API/SBWatchpoint.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D150804.523115.patch
Type: text/x-patch
Size: 40220 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230517/a81b60d6/attachment-0001.bin>


More information about the lldb-commits mailing list