[Lldb-commits] [PATCH] D79554: [lldb/Dataformatter] Add support to CF{Dictionary, Set}Ref types
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Jul 7 06:03:11 PDT 2020
labath added inline comments.
================
Comment at: lldb/source/Core/ValueObject.cpp:690-694
+ if (!valobj && synthetic_array_member)
+ valobj = GetSyntheticValue()
+ ->GetChildAtIndex(synthetic_index, synthetic_array_member)
+ .get();
+
----------------
I'm getting a crash here when attempting to dereference incomplete c(++) types. The simplest (albeit contrived) repro is:
```
$ cat /tmp/a.c
struct incomplete;
struct incomplete *var = (struct incomplete *)0xdead;
int main() {}
$ clang /tmp/a.c -o /tmp/a.out -g
$ lldb /tmp/a.out -o "target variable var[0]"
(lldb) target create "/tmp/a.out"
Current executable set to '/tmp/a.out' (x86_64).
(lldb) target variable var[0]
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace.
Stack dump:
0. Program arguments: lldb /tmp/a.out -o target variable var[0]
#0 0x0000561dcd331cea llvm::sys::PrintStackTrace(llvm::raw_ostream&) (lldb+0x29cea)
#1 0x0000561dcd32ffc4 llvm::sys::RunSignalHandlers() (lldb+0x27fc4)
#2 0x0000561dcd330108 SignalHandler(int) (lldb+0x28108)
#3 0x00007f62b35175b0 __restore_rt (/lib64/libpthread.so.0+0x135b0)
#4 0x00007f62ae9235fc lldb_private::ValueObject::CreateChildAtIndex(unsigned long, bool, int) (../lib/liblldb.so.11git+0xb985fc)
#5 0x00007f62ae923e2b lldb_private::ValueObject::GetSyntheticArrayMember(unsigned long, bool) (../lib/liblldb.so.11git+0xb98e2b)
...
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79554/new/
https://reviews.llvm.org/D79554
More information about the lldb-commits
mailing list