[Lldb-commits] [PATCH] D15593: Enhance "target modules dump line <file>" and use it to fix MI's -symbol-list-lines.
Ilia K via lldb-commits
lldb-commits at lists.llvm.org
Thu Dec 17 12:28:34 PST 2015
ki.stfu added inline comments.
================
Comment at: source/Commands/CommandObjectTarget.cpp:1536-1537
@@ -1508,1 +1535,4 @@
+ bool has_path = (file_spec.GetDirectory().AsCString() != 0);
+ int ncus = module->GetNumCompileUnits();
+ for (size_t i = 0; i < ncus; i++)
{
----------------
use it on line #1536 too
================
Comment at: source/Commands/CommandObjectTarget.cpp:1543
@@ +1542,3 @@
+ continue;
+ CompileUnit *cu = cu_sp.get();
+ const FileSpecList &cu_file_list = cu->GetSupportFiles();
----------------
That's no problem. Just replace s/cu/cu_sp/ on lines #1544, #1565, #1580, #1594, and then use cu_sp.get() on line #1586.
================
Comment at: source/Commands/CommandObjectTarget.cpp:1594-1596
@@ +1593,5 @@
+ start_idx++;
+ start_idx = cu->FindLineEntry(start_idx, line, &cu_file_spec, /*exact=*/true, &line_entry);
+ } while (start_idx != UINT32_MAX);
+
+ // Try the next higher line, starting over at start_idx 0.
----------------
How about that?
```
start_idx = cu->FindLineEntry(start_idx + 1,
line,
&cu_file_spec,
/*exact=*/true,
&line_entry);
```
================
Comment at: source/Commands/CommandObjectTarget.cpp:2689
@@ +2688,3 @@
+ break;
+ }
+
----------------
nit: you forgot the dot
Repository:
rL LLVM
http://reviews.llvm.org/D15593
More information about the lldb-commits
mailing list