On 7/24/18 4:15 AM, Andrew Haley wrote:
On 07/24/2018 09:06 AM, Andrew Janke wrote:
I'm trying to use gdb 8.0.1 to do this, but it doesn't seem to be
stopping the program when SIGILL is raised for the illegal instruction.
Or maybe SIGILL isn't being raised, and something else is happening? Is
gfortran doing something special that's preventing the debugger from
capturing it, or maybe I'm using the debugger wrong?
set follow-fork-mode child
Thanks!
I'm afraid that's not working, though. I'm getting the same behavior as
before.
$ sudo gdb -q
/Applications/Octave-4.4.0.app/Contents/Resources/usr/bin/gfortran
Password:
Reading symbols from
/Applications/Octave-4.4.0.app/Contents/Resources/usr/bin/gfortran...(no
debugging symbols found)...done.
(gdb) set follow-fork-mode child
(gdb) set startup-with-shell off
(gdb) r hello_world.f90
Starting program:
/Applications/Octave-4.4.0.app/Contents/Resources/usr/bin/gfortran
hello_world.f90
[New Thread 0xe03 of process 1663]
warning: unhandled dyld version (15)
<built-in>: internal compiler error: Illegal instruction: 4
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.
[Inferior 1 (process 1663) exited with code 01]
(gdb) bt
No stack.
(gdb) info signals SIGILL
Signal Stop Print Pass to program Description
SIGILL Yes Yes Yes Illegal instruction
(gdb)