[Lldb-commits] [PATCH] D124409: Filter non-external static members from SBType::GetFieldAtIndex.
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue May 10 05:54:01 PDT 2022
labath added inline comments.
================
Comment at: lldb/test/Shell/SymbolFile/DWARF/x86/debug_static-member-anonymous-namespace.s:18
+# static int s;
+# int m = 14159265;
+# };
----------------
siggi-alpheus wrote:
> I wonder why I couldn't get the query to work against an initialized global without the main function. Is the assembly directly out of gcc, or did you need to tweak it?
> PS: Now I fancy some pie.
I produced this by modifying/reducing the input you provided (with looking at some gcc output as reference).
Without more details, I can only guess what was the problem for you, but one of issue that comes up in tests like this is that lldb does not like to display variables whose "file address" is zero -- it mistakes them for a null pointer (one day I'll have to fix that). I work around that here, by adding some padding so that the variable does not end up at the address zero.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D124409/new/
https://reviews.llvm.org/D124409
More information about the lldb-commits
mailing list