Joan Lluch via llvm-dev
2019-Nov-04 21:22 UTC
[llvm-dev] Debugging clang with debugger breakpoints ?
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>
Zachary Turner via llvm-dev
2019-Nov-04 21:26 UTC
[llvm-dev] Debugging clang with debugger breakpoints ?
You hit Reply on my email but then addressed David. So I want to make sure you saw my suggestion. Let me know if you tried that and/or whether or not it solved your problem. Zach On Mon, Nov 4, 2019 at 1:23 PM Joan Lluch <joan.lluch at icloud.com> wrote:> 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> 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/430be68c/attachment.html>
Joan Lluch via llvm-dev
2019-Nov-04 21:46 UTC
[llvm-dev] Debugging clang with debugger breakpoints ?
Sorry Zach, my apologies. I understood now what you mean. I tried and it works!. But now I found that LLVM_DEBUG statements and other output to the console doesn’t show. How do I get that back?. Thanks John> On 4 Nov 2019, at 22:26, Zachary Turner <zturner at roblox.com> wrote: > > You hit Reply on my email but then addressed David. So I want to make sure you saw my suggestion. Let me know if you tried that and/or whether or not it solved your problem. > > Zach > > On Mon, Nov 4, 2019 at 1:23 PM Joan Lluch <joan.lluch at icloud.com <mailto:joan.lluch at icloud.com>> wrote: > 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 <mailto: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/5a0b618d/attachment.html>