I'm using VSCode version 1.71.0 784b0177c56c607789f9638da7b6bf3230d47a8c x64 on Ubuntu Linux version 22.04.1 LTS. I'm compiling with GCC version 11.2.0 but the same problem occurs when the application is compiled with Clang 14.0.0 and Clang 16.0.0. My version of GDB is 12.0.90. I'm using C/C++ v.1.12.4 and CMake Tools v1.12.26 plugins for VSCode. I start debugging session with the CMake: Debug command by default assigned to the F5 shortcut. For some time the application I'm debugging started to crash when a breakpoint is hit. The exact message is the following:
Aborted (core dumped)
[1] + Aborted (core dumped) "/usr/bin/gdb" --interpreter=mi --tty=${DbgTerm} 0<"/tmp/Microsoft-MIEngine-In-ifoflcfq.xvl" 1>"/tmp/Microsoft-MIEngine-Out-h4yklwfm.ghy"
The same problem does not occur when I'm using GDB from the command line and for that reason, I assume that the problem is related to the integration of GDB with VSCode. I cannot reproduce the problem with a small program. For a small test application, it works fine. At the beginning of debugging session, the following warning is displayed for a small amount of time before the terminal is cleared and the logs of the debugged application started to appear.
warning: GDB: Failed to set controlling terminal: Operation not permitted
I'm not sure whether it is somehow related to the problem.
launch.jsonconfiguration with the exact same results). Which let me thinks, it might be related to how vscode invokes GDB in mi-mode. I'll check if there's a similar issue at github.com/microsoft/vscode-cpptools,Abortedmessages are from a shell, rather than GDB itself. Usually, when GDB exists with SIGABRT this is because an internal assertion triggered, which should have printed an error somewhere - though if GDB is being run from inside VSCode, I assume that application is consuming the error. IF a core file has been created you could trygdb -q -ex 'bt' /usr/bin/gdb -c <COREFILE>and see if the backtrace includes useful symbols (might need to install debug symbols package for GDB first), then add the backtrace to this question.-O0is set.