Oops! The debug adapter has terminated abnormally.
OS: Windows 10 Pro 21H1 VSCode version: 1.58 Extension version: 1.6.5 Compiler: gcc version 11.1.0 (MinGW-W64 x86_64-posix-seh, built by Brecht Sanders) C++ Build target: x86_64-windows-msvc
Oops! The debug adapter has terminated abnormally.
I encountered this bug when debugging a program, the program could get a result, but once I debug it, it crashed. The same code ran and debugged normally in Visual Studio.
Debug log
configuration: {
name: 'debug',
type: 'lldb',
request: 'launch',
program: '${fileDirname}/${fileBasenameNoExtension}.exe',
args: [],
stopOnEntry: false,
cwd: '${workspaceFolder}',
terminal: 'external',
preLaunchTask: 'Compile',
__configurationTarget: 5,
relativePathBase: 'f:\\Desktop\\c++'
}
Listening on port 5139
error: Greedy_MVC.exe {0x0000000c}: DIE has DW_AT_ranges(0xc) attribute, but range extraction failed (missing or invalid range list table), please file a bug and attach the file at the start of this error message
error: Greedy_MVC.exe {0x0001c005}: DIE has DW_AT_ranges(0x6be) attribute, but range extraction failed (missing or invalid range list table), please file a bug and attach the file at the start of this error message
[adapter\src\terminal.rs:101] FreeConsole() = 1
[adapter\src\terminal.rs:102] AttachConsole(pid) = 1
[adapter\src\terminal.rs:106] FreeConsole() = 1
Debug adapter exit code=3221225477, signal=null.
Build target: x86_64-windows-msvc
If you are targeting x86_64-windows-msvc, why does your binary seem to use DWARF debug info?
The same code ran and debugged normally in Visual Studio.
Which debugger did you use or that? GDB?
I would guess that GCC 11 emits something in debug info that LLDB does not understand yet. Try compiling with -gdwarf-4.
I also got this error today. Before that, everything worked fine on this code for over a year. I was able to get rid of the error by just removing all breakpoints. After that everything works again. Unfortunately, I did not save the log when I received the error.
OS: Ubuntu 20.04.3 LTS VSCode version: 1.61.0 Extension version: 1.6.8 Target: Node.JS Node-API module with mix of C and C++ code.
Got the same today when hovering over a char* variable in the code:
[2021-11-17T17:44:59.264Z DEBUG codelldb::dap_codec] --> {"command":"evaluate","arguments":{"expression":"str","frameId":1002,"context":"hover"},"type":"request","seq":24}
Received signal: SIGSEGV
0: codelldb::hook_crashes::handler
1: <unknown>
2: <unknown>
3: <unknown>
4: <unknown>
5: <unknown>
6: <unknown>
7: <unknown>
8: <unknown>
9: <unknown>
10: <unknown>
11: <unknown>
12: <unknown>
13: <unknown>
14: <unknown>
15: <unknown>
16: <unknown>
17: _ZN4lldb7SBFrame23GetValueForVariablePathEPKcNS_16DynamicValueTypeE
18: _ZN4lldb7SBFrame23GetValueForVariablePathEPKc
19: <unknown>
20: <unknown>
21: _PyObject_Call
22: _PyEval_EvalFrameDefault
23: <unknown>
24: _PyFunction_Vectorcall
25: <unknown>
26: _PyEval_EvalFrameDefault
27: _PyFunction_Vectorcall
28: <unknown>
29: _PyEval_EvalFrameDefault
30: _PyFunction_Vectorcall
31: <unknown>
32: <unknown>
33: <unknown>
34: <unknown>
35: <unknown>
36: _PyEval_EvalFrameDefault
37: <unknown>
38: PyEval_EvalCode
39: <unknown>
40: <unknown>
41: <unknown>
42: _PyEval_EvalFrameDefault
43: _PyFunction_Vectorcall
44: <unknown>
45: _PyEval_EvalFrameDefault
46: _PyFunction_Vectorcall
47: <unknown>
48: <unknown>
49: <unknown>
50: <unknown>
51: codelldb::python::PythonInterface::evaluate
52: codelldb::debug_session::variables::<impl codelldb::debug_session::DebugSession>::evaluate_expr_in_frame
53: codelldb::debug_session::variables::<impl codelldb::debug_session::DebugSession>::handle_evaluate_expression
54: codelldb::debug_session::DebugSession::handle_request_args
55: codelldb::debug_session::DebugSession::handle_request
56: tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut
57: tokio::runtime::task::core::CoreStage<T>::poll
58: tokio::runtime::task::harness::Harness<T,S>::poll
59: std::thread::local::LocalKey<T>::with
60: tokio::task::local::LocalSet::tick
61: <tokio::task::local::LocalSet as core::future::future::Future>::poll
62: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
63: tokio::park::thread::CachedParkThread::block_on
64: tokio::runtime::thread_pool::ThreadPool::block_on
65: tokio::runtime::Runtime::block_on
66: entry
67: codelldb::main
68: std::sys_common::backtrace::__rust_begin_short_backtrace
69: std::rt::lang_start::{{closure}}
70: std::rt::lang_start_internal
71: main
72: __libc_start_main
73: _start
Debug adapter exit code=255, signal=null.