Skip to content

Commit 2064087

Browse files
authored
[lldb][NFC] Add a missing setter method for UnwindPlans (#109751)
The UnwindPlan class has getter and setter methods for specifying an abstract register location, but it doesn't have a setter for a DWARF Expression register location. This hasn't been needed for any of the UnwindPlans that we do in mainline lldb yet, but it is used in the Swift language SwiftLanguageRuntime plugin which creates UnwindPlan for async functions. While it's currently unused on main branch, this is a straightforward setter in the same form as the others, the only caveat being that it doesn't own the dwarf expression bytes, it has a pointer to them.
1 parent 679c971 commit 2064087

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lldb/include/lldb/Symbol/UnwindPlan.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,13 @@ class UnwindPlan {
370370

371371
bool SetRegisterLocationToSame(uint32_t reg_num, bool must_replace);
372372

373+
/// This method does not make a copy of the \a opcodes memory, it is
374+
/// assumed to have the same lifetime as the Module this UnwindPlan will
375+
/// be registered in.
376+
bool SetRegisterLocationToIsDWARFExpression(uint32_t reg_num,
377+
const uint8_t *opcodes,
378+
uint32_t len, bool can_replace);
379+
373380
bool SetRegisterLocationToIsConstant(uint32_t reg_num, uint64_t constant,
374381
bool can_replace);
375382

0 commit comments

Comments
 (0)