-
Notifications
You must be signed in to change notification settings - Fork 237
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
Stepping through code kills the debug session #958
Comments
Same here, removing the RTOS option from config makes a huge difference. No GDB weirdness since... fingers crossed for me... |
I am closing this as it is not a problem with this extension. Since no relevant information from the Debug Console or from the TERMINAL(gdb-server) is provided, nothing here is actionable. Please use triple back-quotes for things that look like code/XML/JSON or things that are not a conversation (logs, output, etc.). It is part of markdown. |
Often when I am stepping through code the debug session dies. It takes a couple of seconds before the debugger responds after hitting F10 (so i already know "it happened again").
The only thing I can see in the debug console is:
[Switching to Thread 538996992]
Thread 12 hit Breakpoint 1, startup_task (parameter=0x0 ) at /home/dev/app/source/iobox-app/main.cpp:354
354 if (pulse_configuration.exists())
warning: Error removing breakpoint -7
[New Remote target]
Cannot remove breakpoints because program is no longer writable.
Further execution is probably impossible.
My way of working to workaround this problem, is stepping as less as possible. Launching the application and let it break on another breakpoint almost never shows this problem. It is horrible when stepping over / stepping into.
That doesn't make much sense to me. Maybe it does to you?
Full launch config for completeness
"configurations": [
{
"name": "app-debug",
"type": "cortex-debug",
"request": "launch",
"cwd": "${workspaceRoot}",
"executable": "${workspaceRoot}/build-app/app.axf",
"device": "MIMXRT1021xxx5A",
"serverpath": "/usr/bin/JLinkGDBServerCLExe",
"servertype": "jlink",
"preLaunchTask": "app - build - debug",
"interface": "swd",
"runToEntryPoint": "main",
"rtos": "FreeRTOS",
// "showDevDebugOutput": "raw"
},
{
"name": "app-release",
"type": "cortex-debug",
"request": "launch",
"cwd": "${workspaceRoot}",
"executable": "${workspaceRoot}/build-app/app.axf",
"device": "MIMXRT1021xxx5A",
"serverpath": "/usr/bin/JLinkGDBServerCLExe",
"servertype": "jlink",
"preLaunchTask": "app - build - release",
"interface": "swd",
"runToEntryPoint": "main",
"rtos": "FreeRTOS",
// "showDevDebugOutput": "raw"
},
{
"name": "hwtest",
"type": "cortex-debug",
"request": "launch",
"cwd": "${workspaceRoot}",
"executable": "${workspaceRoot}/build-hwtest/hwtest.axf",
"device": "MIMXRT1024xxx5A",
"serverpath": "/usr/bin/JLinkGDBServerCLExe",
"servertype": "jlink",
"preLaunchTask": "hwtest - build",
"interface": "swd",
"runToEntryPoint": "main",
"rtos": "FreeRTOS",
},
{
"name": "demo",
"type": "cortex-debug",
"request": "launch",
"cwd": "${workspaceRoot}",
"executable": "${workspaceRoot}/build-demo/demo.axf",
"device": "MIMXRT1024xxx5A",
"serverpath": "/usr/bin/JLinkGDBServerCLExe",
"servertype": "jlink",
"preLaunchTask": "demo - build",
"interface": "swd",
"runToEntryPoint": "main",
"rtos": "FreeRTOS",
},
{
"name": "attach app",
"type": "cortex-debug",
"request": "attach",
"cwd": "${workspaceRoot}",
"executable": "${workspaceRoot}/build-app/app.axf",
"device": "MIMXRT1021xxx5A",
"serverpath": "/usr/bin/JLinkGDBServerCLExe",
"postAttachCommands": [
"add-symbol-file ${workspaceRoot}/app/build-app/app.axf",
],
"servertype": "jlink",
"preLaunchTask": "app - build",
"postStartSessionCommands": [],
"interface": "swd",
// "showDevDebugOutput": "both",
// "showDevDebugTimestamps": true,
},
{
"name": "relocated app",
"type": "cortex-debug",
"request": "launch",
"cwd": "${workspaceRoot}",
"executable": "${workspaceRoot}/build-app/app.axf",
"serverpath": "/usr/bin/JLinkGDBServerCLExe",
"preLaunchCommands": [
"add-symbol-file ${workspaceRoot}/build-app/app.axf 0x601127D1",
],
"postLaunchCommands": [
],
"servertype": "jlink",
"device": "MIMXRT1021xxx5A",
"preLaunchTask": "app - build - release",
"serverArgs": ["-nogui"],
"postStartSessionCommands": [],
"interface": "swd",
//"runToEntryPoint": "main",
"showDevDebugOutput": "raw",
"showDevDebugTimestamps": true,
},
{
"name": "attach relocated app",
"type": "cortex-debug",
"request": "attach",
"cwd": "${workspaceRoot}",
"executable": "${workspaceRoot}/build-app/app.axf",
"serverpath": "/usr/bin/JLinkGDBServerCLExe",
"preAttachCommands": [
"add-symbol-file ${workspaceRoot}/app/build-app/app.axf 0x600d1f60",
],
"postAttachCommands": [
],
"servertype": "jlink",
"preLaunchTask": "app - build",
"postStartSessionCommands": [],
"interface": "swd",
// "showDevDebugOutput": "both",
// "showDevDebugTimestamps": true,
},
{
"name": "unit tests",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceRoot}/unit_tests/build/unittests",
"args" :["--gtest_color=yes"],
"stopAtEntry": false,
"cwd": "${workspaceRoot}",
"externalConsole": false,
"MIMode": "gdb",
"miDebuggerPath": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"preLaunchTask": "unittests - build"
}
]
The text was updated successfully, but these errors were encountered: