[llvm-dev] Debugging clang with debugger breakpoints ?

Joan Lluch via llvm-dev llvm-dev at lists.llvm.org
Mon Nov 4 13:22:59 PST 2019


Hi David,

I understand what you say, but have you actually read my messages? I don’t think so,

Anyway, I will repost the question in case someone else can help.

Thanks

John





> On 4 Nov 2019, at 22:18, Zachary Turner <zturner at roblox.com> wrote:
> 
> 
> 
> On Mon, Nov 4, 2019 at 1:11 PM Joan Lluch via llvm-dev <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>> wrote:
> Hi David,
> 
> Thank you for your patience but I still don’t get it:  I don’t see how that is a “command”, as it’s just a list of strings that state command options.
> 
> This is the output you pasted after running the command:
> 
> > "/Users/joan/LLVM-9/llvm-project/build/Debug/bin/clang" "-cc1" "-triple" "msp430" "-emit-llvm" "-disable-free" "-main-file-name" "main.c" "-mrelocation-model" "static" "-mthread-model" "posix" "-fmath-errno" "-masm-verbose" "-mconstructor-aliases" "-nostdsysteminc" "-dwarf-column-info" "-debugger-tuning=gdb" "-target-linker-version" "305" "-momit-leaf-frame-pointer" "-coverage-notes-file" "/Users/joan/Documents-Local/Relay/RelayNou/main.gcno" "-resource-dir" "/Users/joan/LLVM-9/llvm-project/build/Debug/lib/clang/9.0.1" "-internal-isystem" "/Users/joan/LLVM-9/llvm-project/build/Debug/bin/../msp430/include" "-Oz" "-fdebug-compilation-dir" "/Users/joan/Documents-Local/Relay/RelayNou" "-ferror-limit" "19" "-fmessage-length" "224" "-fobjc-runtime=gcc" "-fdiagnostics-show-option" "-fcolor-diagnostics" "-vectorize-slp" "-faddrsig" "-o" "main.ll" "-x" "c" "main.c" 
> 
> Yes it is a list of strings.  But the first string "/Users/joan/LLVM-9/llvm-project/build/Debug/bin/clang" is a command.  The rest are arguments.  So you should set your debugger to run this command:
> 
> "/Users/joan/LLVM-9/llvm-project/build/Debug/bin/clang" 
> 
> with these arguments:
> 
> "-cc1" "-triple" "msp430" "-emit-llvm" "-disable-free" "-main-file-name" "main.c" "-mrelocation-model" "static" "-mthread-model" "posix" "-fmath-errno" "-masm-verbose" "-mconstructor-aliases" "-nostdsysteminc" "-dwarf-column-info" "-debugger-tuning=gdb" "-target-linker-version" "305" "-momit-leaf-frame-pointer" "-coverage-notes-file" "/Users/joan/Documents-Local/Relay/RelayNou/main.gcno" "-resource-dir" "/Users/joan/LLVM-9/llvm-project/build/Debug/lib/clang/9.0.1" "-internal-isystem" "/Users/joan/LLVM-9/llvm-project/build/Debug/bin/../msp430/include" "-Oz" "-fdebug-compilation-dir" "/Users/joan/Documents-Local/Relay/RelayNou" "-ferror-limit" "19" "-fmessage-length" "224" "-fobjc-runtime=gcc" "-fdiagnostics-show-option" "-fcolor-diagnostics" "-vectorize-slp" "-faddrsig" "-o" "main.ll" "-x" "c" "main.c"
> 
> Does that make sense?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20191104/989f4367/attachment.html>


More information about the llvm-dev mailing list