how to debug a segfault?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

how to debug a segfault?

Marco Maggi-2
Ciao,

  I am getting  a segmentation fault when I compile  with "-O5" a shared
library   and    its   test   programs   with    "-O5"   (CHICKEN   5.1,
x86_64-pc-linux-gnu).   I need  some  directions on  how  to debug  this
problem.  I am compiling with:

   -k -O5 -C -g

but gdb  just tells me  "No stack" when I  try to display  the backtrace
after  running the  program and  Feathers just  shows the  "segmentation
fault" on the terminal and nothing in the X window.

  How do you do it?

TIA
--
Marco Maggi

_______________________________________________
Chicken-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/chicken-users
Reply | Threaded
Open this post in threaded view
|

Re: how to debug a segfault?

megane

Marco Maggi <[hidden email]> writes:

> Ciao,
>
>   I am getting  a segmentation fault when I compile  with "-O5" a shared
> library   and    its   test   programs   with    "-O5"   (CHICKEN   5.1,
> x86_64-pc-linux-gnu).   I need  some  directions on  how  to debug  this
> problem.  I am compiling with:
>
>    -k -O5 -C -g

Hi Marco!

You could try replacing -O5 with these:

  -optimize-leaf-routines -block -inline -lfa2 -inline-global -specialize
  -unsafe -disable-interrupts -clustering

These are the -O5 options with -no-trace and -no-lambda-info removed.

You can find the options for each optimization level in here:
http://wiki.call-cc.org/man/5/Using%20the%20compiler.

>
> but gdb  just tells me  "No stack" when I  try to display  the backtrace
> after  running the  program and  Feathers just  shows the  "segmentation
> fault" on the terminal and nothing in the X window.
>
>   How do you do it?
>
> TIA

_______________________________________________
Chicken-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/chicken-users