Skip to content
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

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

Open
s-p-k-m opened this issue Feb 11, 2023 · 2 comments
Open

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

s-p-k-m opened this issue Feb 11, 2023 · 2 comments

Comments

@s-p-k-m
Copy link

s-p-k-m commented Feb 11, 2023

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
Copy link
Contributor

zeromus commented Feb 11, 2023

Sounds like something to report to GDB

@s-p-k-m
Copy link
Author

s-p-k-m commented Feb 11, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants