Reputation: 12174
Is it possible to do that with lldb:
(lldb) p my_var
(uint64_t) $9 = 2
(lldb) set set target.max-children-count 4
But instead of 4, I would like to call the set command with the current value of my_var
, in this case 2.
Upvotes: 1
Views: 62
Reputation: 15375
In most lldb commands, backtick blocks are evaluated and the result substituted in their place. For instance,
(lldb) sett show stop-line-count-before
stop-line-count-before (int) = 3
(lldb) p 5
(int) $1 = 5
(lldb) sett set stop-line-count-before `$1`
(lldb) sett show stop-line-count-before
stop-line-count-before (int) = 5
Upvotes: 2