[Lldb-commits] [PATCH] D12115: [LLDB-MI] Fix -data-info-line and -symbol-list-lines when Windows filenames are used.

Ilia K via lldb-commits lldb-commits at lists.llvm.org
Tue Sep 15 23:32:13 PDT 2015


ki.stfu requested changes to this revision.
This revision now requires changes to proceed.

================
Comment at: test/tools/lldb-mi/symbol/main.cpp:12
@@ +11,3 @@
+// included in -symbol-list-lines main.cpp, by checking that all the lines
+// are between 20 and 29.
+// line 13
----------------
Don't impose restrictions on the main file which contains test cases for symbol-xxx commands. If a new cases should be added, we will be forced to modify this test case (or be sure that we are still between 20-29 lines). I don't want to care about existing test cases when adding a new one. So please keep this file independent of line numbers, and move all your line-dependent code to a new file. For me, it should look like:
main.cpp:
```
int main ()  {
  [...]
  symbol_list_lines_for_inline_test();
  [...]
}
```
symbol_list_lines_for_inline_test.cpp:
```
// Skip lines so we can make sure we're not seeing any lines from x.h
[...]
// line 17
// line 18
// line 19
#include "x.h"
extern int j;
extern int gfunc(int i);
int i;
void symbol_list_lines_for_inline_test()  {
    i = gfunc(j);
    i += ns::s.mfunc();
    i += ns::ifunc(i);
}
```

And rename x.[h,cpp] to something more informative (symbol_list_lines_for_inline_test_x.[cpp|h] would be better).

================
Comment at: test/tools/lldb-mi/symbol/x.h:1-14
@@ +1,14 @@
+namespace ns {
+    inline int ifunc(int i) {
+	return i;
+    }
+    struct S {
+	int a;
+	int b;
+	S() : a(3), b(4) {}
+	int mfunc() {
+	    return a + b;
+	}
+    };
+    extern S s;
+}
----------------
Please fix the indentation here (for ex, use clang-format)

================
Comment at: tools/lldb-mi/MIUtilString.cpp:69
@@ +68,3 @@
+}
+
+
----------------
Remove this empty line


Repository:
  rL LLVM

http://reviews.llvm.org/D12115





More information about the lldb-commits mailing list