[RTE] Inserting breakpoint at run-time?

Can breakpoints be inserted into RTE mode running program “on the fly”?

I found that if I set breakpoint in the source pane when the program is running, nothing is sent to gdb, so the breakpoint is not resolved then. If I stop the program at any other existing breakpoint, the previous one still not set (so it is, basically, lost). If I stop the program and then put new breakpoint - all is fine and breakpoint is set through gdb.

Is it expected behaviour?

We use Eclipse and gdb for other project (not wavecom-related) and able to insert breakpoints even “on the fly”. That is, setting it stops running program immediately.

It is not a critical issue, but loosing the breakpoint which is set on the fly is not looking good.

Any comments?

I’ve experienced the same issue.
Is it systematic on your side?
For me, from times to times I can add breakpoints in live, and they hit, but don’t know why sometimes it works, sometimes not… :frowning:

Seems to be systematic, but I do not bet.
You can turn on Verbose console mode for gdb and see what happens when the breakpoint really added to gdb.
When no - no commands sent to gdb. When yes - interesting to see. I was unable to reproduce success yet.

Anyway, if it is supposed to be insertable on the fly - something is wrong and have to be checked by development team.

The same issue with .gdbinit configuration file. As I wrote in other thread, gdb sometimes unable to find this file and symbols are not loaded. I installed M2MS to my other PC and had exactly the same issue: no symbols until I browse and point to the exact symbol DLL with full path. Also must be checked by development team, I think. Additional info: I choose both RTE and Target configurations from wizard and then choose all debug and release ones. So I have 4 selectable configurations in the end, and RTE debug fails without explicit .gdbinit file selection with path.

Another clue:
actually, it seems that you can manipulate breakpoints only when your program execution is stopped… due to a breakpoint hit :exclamation:
Indeed, when I add/remove breakpoints when the program execution is stoped, it’s ok, they are taken into account.
But as soon as I try to add a breakpoint while the program is running, I get unresolved breakpoint warning…
Looking at the gdb console in verbose mode, I see it works when program is stoped, but no action when the program is running.

Gonna try with a standard CDT project to compare the behaviours…


Any gdb command to start or continue execution in background must be followed by &. If this is not the case - we will definitely have this situation as gdb unable to process commands when it is not expecting them. When program stopped - I also can issue gdb commands directly in the console. They are ignored as well when program runs.

Continuing my investigations… :wink:

Firstly I tried a standard CDT Win32 application, with M2M Studio packaged GDB (which is version 5.2.1), and I had the same behaviour : unable to add a breakpoint while the program is running.

Seeing that the GDB is quite old (2002 :exclamation: ), I tried to debug with a freshly downloaded 6.8 version… And it works…

Last step, I tried to debug my simple hello world app with this new GDB… And it’s worse than before… :confused:
Still unable to add breakpoints during the execution, but in addition the program stops (and needs to be resumed) about 10 times before the RTE monitor dialog is displayed :frowning: