[Lldb-commits] [lldb] r367441 - Don't crash when pass by value struct has no definition.

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Tue Aug 13 07:51:13 PDT 2019

On 05/08/2019 22:21, Greg Clayton wrote:
> so I can crash LLDB now with:
> $ clang -c main.s
> $ lldb main.o
> (lldb) target create "main.o"
> Current executable set to 'main.o' (x86_64).
> (lldb) image lookup --verbose --address 0x0000000000000008
> I can make a python test that can easily do this. Is there a better way that people would prefer?
> We need something that will get the function for the address and get the function's type. Doing this will cause the function type to be realized. This is the only way to get the "ByValue" type to be created since looking up the type will fail because it is a declaration, but if it is used as a parameter, it will be made.
> I attached my mach-o .s files below in case anyone wants it.

The .s file looks great. I'd probably just reduce it slightly by 
removing the .apple_*** lookup tables, as they're probably not needed 
for this test.

Instead of a python test, it would probably be more appropriate to make 
this a lit test. It should be sufficient to attach something like
# RUN: llvm-mc -target x86_64-apple-macosx %s >%t
# RUN: %lldb %t -o "image lookup --verbose 0" -o exit | FileCheck %s
# CHECK: <something to check>
to the beginning of the file.


More information about the lldb-commits mailing list