albertodemichelis / squirrel

Official repository for the programming language Squirrel
http://www.squirrel-lang.org
MIT License
926 stars 161 forks source link

gdb crashes when debugging squirrel in C++ context #265

Open s-p-k-m opened 1 year ago

s-p-k-m commented 1 year ago

I'm using squirrel within a C++ project and gdb always crashed when hitting a breakpoint:

gdbtypes.c:1957: internal-error: internal_type_vptr_fieldno: Assertion `type->code () == TYPE_CODE_STRUCT || type->code () == TYPE_CODE_UNION' failed.

It turns out this happens when using the -gstabs flag with gcc -> https://www.cygwin.com/bugzilla/show_bug.cgi?id=28740#c3

I replaced all -gstabs with just -g and afterwards debugging works fine.

I'm no expert on these flags and I'm not sure if -gstabs is used here on purpose or not, but I thought just letting you know. -> https://gcc.gnu.org/onlinedocs/gcc-3.1.1/gcc/Debugging-Options.html

zeromus commented 1 year ago

Sounds like something to report to GDB

s-p-k-m commented 1 year ago

It seems STABS support is deprecated in gcc 12 and will be removed. -> https://gcc.gnu.org/gcc-12/changes.html