[Lldb-commits] [PATCH] D112931: Fix mixed disassembly showing source lines for "line 0"

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Nov 2 07:07:01 PDT 2021


labath added inline comments.


================
Comment at: lldb/test/Shell/Commands/command-disassemble-mixed.c:11-18
+int main(int argc, char **argv)
+{
+  int i;
+
+  for (i=0; i < 10; ++i) ;
+
+  return 0;
----------------
ted wrote:
> clayborg wrote:
> > are we guaranteed to get some debug info with line zero in it with this example?
> I tried this with x86 Linux clang 12.0 and our internal Hexagon clang; both gave me a line zero.
> 
> I ran this test on Ubuntu 18 using x86 Linux clang 12.0 and the test failed without the change and passed with it.
Nonetheless, it would be better to test this via a .s file with some explicit .line directives. That way you could check for the actual command output instead of the absence of some string.

(Negative tests like this are very brittle, as they can be rendered ineffective by a change in the capitalization of the error message.)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D112931



More information about the lldb-commits mailing list