labath added inline comments.

================
Comment at: lldb/include/lldb/Target/StackFrame.h:264
   ///     A pointer to a list of variables.
-  VariableList *GetVariableList(bool get_file_globals);
+  VariableList *GetVariableList(bool get_file_globals, Status *error_ptr);
 
----------------
Could this return `Expected<VariableList*>` ?


================
Comment at: lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp:4161
+  if (command) {
+    if (command->contains(" -gline-tables-only"))
+      return Status("-gline-tables-only enabled, no variable information is "
----------------
This isn't a particularly reliable way of detecting whether variable 
information was emitted. For example a command line `clang -gline-tables-only 
-g2` will in fact produce full debug info and `clang -g1` will not. Could we 
make that determination based on the presence of actual variable DIEs in the 
debug info? Perhaps query the index whether it knows of any (global) variable 
or any type defined within the compile unit?


================
Comment at: lldb/test/API/commands/frame/var/TestFrameVar.py:174-175
+        '''
+        self.build(dictionary={'CFLAGS_EXTRAS': '-gline-tables-only'},
+                   env={"RC_DEBUG_OPTIONS": "1"})
+        exe = self.getBuildArtifact("a.out")
----------------
Why not just pass `-grecord-command-line` in CFLAGS_EXTRAS? I think then you 
should be able to remove @skipUnlessDarwin from this test...


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D133164

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to