Re: cannot gdb LDC build binary: Segmentation fault
On Friday, 7 October 2022 at 04:40:34 UTC, mw wrote: Has anyone experienced such problem before? any suggestions where I should look at? If you are compiling your program with "-release" command line option, then arrays bounds checking is not done in the @system code at all (which is all of your code by default). Either remove this "-release" option or try to mark all of your code as @safe and check whether the problem manifests itself in a nicer and more obvious way. Also in GDB it's always useful to look at the output of the "bt" (backtrace) command. Running your program under valgrind may also reveal something.
Re: cannot gdb LDC build binary: Segmentation fault
On Friday, 7 October 2022 at 04:40:34 UTC, mw wrote: Hi, I have a LDC (1.30.0) built binary on Ubuntu 18.04.5 LTS x86_64, the program core dumps somewhere, so I want to debug Did you try to use GDC? As gdb more gcc tool And for llvm should be lldb..
Re: cannot gdb LDC build binary: Segmentation fault
On Friday, 7 October 2022 at 04:40:34 UTC, mw wrote: Hi, I have a LDC (1.30.0) built binary on Ubuntu 18.04.5 LTS x86_64, the program core dumps somewhere, so I want to debug it. However under gdb, the program fails as soon as I start it: [...] Try the non-stop mode maybe : https://sourceware.org/gdb/onlinedocs/gdb/Non_002dStop-Mode.html