Skip to content

Commit 92f1663

Browse files
felipepiovezangithub-actions[bot]
authored andcommitted
Automerge: [LLDB][NFC] Remove redundant target/process checks in SBFrame (#153258)
This is a follow up to llvm/llvm-project#152020, continuing the removal of now-redundant `if(process && target)` checks. Since this causes a diff in every line of the affected functions, this commit also uses the opportunity to create some helper functions and reduce nesting of the affected methods by rewriting all pre-condition checks as early returns, while remaining strictly NFC. This has exposed some odd behaviors: 1. `SBFrame::GetVariables` has a variable `num_produced` which is clearly meant to be incremented on every iteration of the loop but it is only incremented once, after the loop. So its value is always 0 or 1. The variable now lives in `FetchVariablesUnlessInterrupted`. 2. `SBFrame::GetVariables` has an interruption mechanism for local variables, but not for "recognized arguments". It's unclear if this is by design or not, but it is now evident that there is a discrepancy there. 3. In `SBFrame::EvaluateExpression` we only log some error paths, but not all of them. To stick to the strictly NFC nature of this patch, it does not address any of these issues.
2 parents 38e7ebb + 7d151cf commit 92f1663

File tree

1 file changed

+269
-256
lines changed

1 file changed

+269
-256
lines changed

0 commit comments

Comments
 (0)