Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GDB error "cp_search_static_and_baseclasses"

Tags:

c++

eclipse

gdb

I'm using STM32 Workbench (Eclipse based IDE) and I have a workspace with a couple of C++ static libs and 2 C++ applications, all made with the STM32F4 MCU C++ application or static lib template.

My first application went well and I started the second. This project templates add a main.c with an inifinite loop, regardless of the language. If I try to debug the main.c everything is fine, but if I change the file name to main.cpp (I need that to use C++ classes inside) GDB stops before debug with the error:

/home/build/work/GCC-5-0-build/src/gdb/gdb/cp-namespace.c:343: internal-error: cp_search_static_and_baseclasses: Assertion `name[prefix_len + 1] == ':'' failed.

Before that I alo have a lot of "No source file named" error for files that are just needed for my first application, even for the main.cpp of the first application.

I'm using Stm32 Workbench 1.9 in Eclipse Mars 4.5.2 with GDB 7.10.1

EDIT

I assumed that the "no source file named" error indicate that maybe GDB is being loaded with the wrong files so I tried to create a new workspace with just the projects needed for this application and everything works. Still, it would be nice to have all of the projects in the same workspace, I'm not sure if having lib projects opened in 2 workspaces can be harmful.

like image 282
rnunes Avatar asked Jun 16 '16 10:06

rnunes


1 Answers

I had a similar problem in Eclipse with GDB crashing. I had some old breakpoints active in the eclipse workspace. After removal of these breakpoints from other projects the issue was resolved.

like image 149
Donald Rosendahl Avatar answered Sep 27 '22 22:09

Donald Rosendahl