-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to debug using GDB or LLDB #14904
Comments
You didn't create a breakpoint for it to stop on. After your program crashes, gdb should still be running. Just use the You may also have more luck using |
I did try that but I got the same error.
I ran the backtrace, here is the output.
|
I'm seeing exactly the same issue (but with LLDB) with the game-of-life example:
This is all happening in the V pre-amble before main__main is hit. |
I don't know if this is a clue but compiling with -cg -keepc -gc none works, whereas -g -keepc -gc none does not. |
Will need a lot more about your OS than "Linux" :) |
I use Arch BTW Here is the info on the linux version and debugger versions.
|
It is simpler to run |
For example:
|
In my case running v doctor yields:
>> v doctor
±[●][master]
OS: linux, "Manjaro Linux"
Processor: 12 cpus, 64bit, little endian, Intel(R) Core(TM) i5-10600K CPU @
4.10GHz
CC version: cc (GCC) 12.1.0
getwd: /home/dave/v/examples/game_of_life
vmodules: /home/dave/.vmodules
vroot: /home/dave/v
vexe: /home/dave/v/v
vexe mtime: 2022-07-02 12:06:55
is vroot writable: true
is vmodules writable: true
V full version: V 0.3.0 b5f2636
Git version: git version 2.36.1
Git vroot status: 0.3-17-gb5f2636b (58 commit(s) behind V master)
.git/config present: true
thirdparty/tcc status: thirdparty-linux-amd64 827f7452
…On Fri, 8 Jul 2022 at 15:25, JalonSolov ***@***.***> wrote:
For example:
OS: linux, "Manjaro Linux"
Processor: 32 cpus, 64bit, little endian, AMD Ryzen 9 5950X 16-Core Processor
CC version: cc (GCC) 12.1.0
getwd: /home/jamie
vmodules: /home/jamie/.vmodules
vroot: /home/jamie/git/v
vexe: /home/jamie/git/v/v
vexe mtime: 2022-07-08 12:47:08
is vroot writable: true
is vmodules writable: true
V full version: V 0.3.0 a46bcf3.70890b2
Git version: git version 2.37.0
Git vroot status: 0.3-75-g70890b27
.git/config present: true
thirdparty/tcc status: thirdparty-linux-amd64 827f7452
—
Reply to this email directly, view it on GitHub
<#14904 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEEESADUJHB2C3HKIGAH35DVTA237ANCNFSM52K3TJVQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Chased this around a bit; sounds like it's expected, and we just need to find a way around it (Crystal's is here) looks like libgc sets up a fault handler and just bumps into it for a "done" signal 😄, GDB and LLDB see this - they're debuggers, after all - and notify you that your program received a signal. The fact that it's SIGSEGV is irrelevant in this case (for once! 😂) |
I have the same issue. Ma configuration:
|
Same issue:
|
V version:0.3.0 71ff221
OS:Linux
What did you do?
I compiled a basic hello world and tried to debug it.
I compiled it using
v -g . -o myapp
then I ran
gdb
gdb myapp ## then i typed run to run the app
The app runs fine on terminal
What did you expect to see?
I expected GDB or LLDB to stop at the breakpoint and show the variables in memory
What did you see instead?
I got a segfault error from the debugger
SIGSEGV
Error from
GDB
Error from
LLDB
The text was updated successfully, but these errors were encountered: