Still can't get source-level debugging to work

I’ve been struggling with this for a while. I’ve gone back and reviewed all the messages in this topic on the subject, and I still can’t figure it out.

– I’m disabling frame pointer elimination via “-disable-fp-elim”
– I see debugging information in my .s file.
– My command line for compiling the LLVM-generated looks like this:

gcc -g -O0 -x assembler ReflectionTest.s -o ReflectionTest -L/Users/talin/Projects/tart/build-eclipse/runtime -l runtime

– here’s what I see when I run ‘dwarfdump’:

dwarfdump test/stdlib/ReflectionTest

File: test/stdlib/ReflectionTest (i386)

.debug_info contents:

– When I try to debug in gdb, it prints this:

warning: Could not find object file
"/var/folders/h6/h6He5G34EF8g9zpg3SNFF++++TI/-Tmp-//ccoTexQw.o" - no debug
information available for "ReflectionTest.tart".

It seems you're on darwin, right? Then you need another build steps in
order to see dwarf stuff

Yes I am on darwin.

Yes I am on darwin.

I don't recall correctly, but there you cannot 'just' run gcc to get
all dwarf stuff into the binary. You will also need to do some extra
tool invocation (dsymutil?). Just pick some dummy c++ app, compile it
via "gcc -v" and you'll have the precise steps.

OK I got it to work. Thank you so much :slight_smile: