[Lldb-commits] [PATCH] D110011: [lldb] Add --stack option to `target symbols add` command

Dave Lee via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Sep 17 17:07:56 PDT 2021


kastiglione added inline comments.


================
Comment at: lldb/source/Commands/CommandObjectTarget.cpp:4300-4301
+                                      current_frame_flush))
+        symbols_found = true;
+      flush |= current_frame_flush;
+    }
----------------
JDevlieghere wrote:
> kastiglione wrote:
> > do you need the separate variable? can it be:
> > 
> > ```
> > flush |= true;
> > ```
> I want `flush` to be true only if at least one frame requires a flush. 
my suggestion still achieves that.

Instead of:

```
bool current_frame_flush = false;
if (DownloadObjectAndSymbolFile(module_spec, target, result,
                                current_frame_flush))
  symbols_found = true;

flush |= current_frame_flush;
```

Inline the `current_frame_flush` variable:

```
if (DownloadObjectAndSymbolFile(module_spec, target, result,
                                current_frame_flush))
  flush |= true;
```

This makes `flush` only true when one frame needs it.


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

https://reviews.llvm.org/D110011



More information about the lldb-commits mailing list