Comments (17)
Thanks for the report - I had this problem before and I thought I was completely fixed, but perhaps it is still happening in some cases.
What is your OS and VS Code versions? Also, what GDB server are you using?
from cortex-debug.
OS Ubuntu Gnome 16.04, VS Code 1.22.2, Cortex Debug plugin, says 0.1.19 in the extensions left hand pane, but the changelog only goes to 0.1.18.
GDB server is JLinkGDBServer 6.22g (I did update to 6.32, but downgraded after I had some problems that in hindsight were probably related to Eclipse).
from cortex-debug.
Thanks for the details; will try to have a look soon.
from cortex-debug.
Also the runToMain option works well after starting the debug session, but when pressing restart, then step, I am stepped into the init functions, not main.
from cortex-debug.
Yes, at the moment the runToMain functionality hasn't been implemented in the restart request. The reason for that is with many core/debugger combinations have a very limited number of breakpoints they can use (often as little as 2) - so when restarting I can't guarantee that I can actually set the temporary breakpoint. I need to add some functionality so that it can remove the breakpoints for the runToMain step and then re-create them after it breaks at main; until I have a chance to do that I can't implement the runToMain in a reliable fashion in the restart situation.
from cortex-debug.
I found that appending a command 'target-download' can make it jump to the init function correctly when click on restart.
like this:
from cortex-debug.
Can you provide more details about your restartCommands? any chance you would be willing to show which file it goes into? Thanks.
from cortex-debug.
@Marus Can you test if it is working using my solution see above. It works fine on my side.
from cortex-debug.
from cortex-debug.
It is better if you can find the root cause. This is only a workaround for me to use.
from cortex-debug.
@Marus Have a plan to fix this?
from cortex-debug.
Is there a fix for this issue in the making?
from cortex-debug.
Btw, if you are using an RTOS, this is a common problem with OpenOCD and JLink especially if you have runToMain
disabled. GDB never gets an updated stack
from cortex-debug.
Alright. Though I am not using a RTOS nor JLink. I have the Tiva Launchpad tm4c123gxl and connect with Stellaris ICDI JTAG/SWD interface.
from cortex-debug.
@rk-exxec Sorry to hear that. Does a single step fix the issue? We only report what GDB reports
from cortex-debug.
yes, when I step then the position is shown correctly again.
from cortex-debug.
There is no workaround for this. Not with gdb and most of the gdb-servers. With OpenOCD, there is a workaround that is used in VSCode (changes in master, not yet released).
Note that this only happens if you enable breakAfterReset
which is no longer the default, so you don't see this problem anymore.
The final workaround (for servers other than OpenOCD) is to do a single step to get the real stack trace. I have not found any gdb-trick to fix this. So, I am closing this issue
from cortex-debug.
Related Issues (20)
- Transport eclipse jlink debug configuration to vscode+cortex-debug failed. HOT 7
- Target not reported as halted with rust project HOT 3
- Possible to auto select BMPGDBSerialPort?
- Graphing utility similar to Segger's Ozone (timeline view) HOT 1
- Could not start GDB process while debugging Zephyr Blinky build on NUCLEO-WL55JCx HOT 1
- Unable to view some addresses in disassembly. Reopening disassembly makes more addresses viewable, but doesn't remove the error
- FreeRTOS Symbols Not Loaded when `"loadFiles"` and `"symbolFiles"` are Used
- Problems with ST-Link multicore debugging of STM32H755ZiQ HOT 1
- How to view the value of c++ standard container
- Offset in disassembly view
- gdb and non-ASCII symbols in filenames problems (again) HOT 2
- Feature request: focus on gdb terminal output while programming and on debug console when finished HOT 7
- debug error HOT 4
- gdb-server program client error Error: read ECONNRESET HOT 1
- STLink SWO support ?
- st-trace read_trace error
- Issues with semihosting with J-Link
- "serialNumber" property located in local user settings instead of launch.json HOT 3
- Can the development team provide a visual configuration tool for Cortex-debug
- No RTT connect retry with OpenOCD HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cortex-debug.