Debugging in M2MS: Unresolved breakpoint issue? [SOLVED]

I am a newby in Wavecom OpenAT development (and have a long time experience with embedded systems in general).
After installation of M2M Studio release, I found one problem: inability to debug in RTE mode.

I created an empty project (added WIP plugin,though), added there my sample files and compiled the [RTE]_MinGW_Debug configuration. After starting, the application works, prints traces, reacts to custom AT commands, but cannot be debugged. A breakpoint can be set but after start the IDE shows the “[!] Unresolved breakpoint” in the source pane.

I have some experience with previous IDE release (cygwin-based) and have not seen such problems.
I read and repeat tutorial steps regarding creation of new RTE debug configuration, but with the same result.

Can anybody suggest what can be done with it?

I can’t just get it failling, it just works for me.
Do you have the console output of GDB? There should be some interresting warnings or errors there…
What version of Open AT SDK are you using?

Thank you for your idea, the problem has been solved.

Looking into gdb output, I found that symbol table is not loaded. The “symbol-file” command is placed into .gdbinit file specified in “GDB command file” entry at Debugging configuration tab. M2M places there just .gdbinit without path, so some other file was loaded (if any). Browsing to correct one has solved the problem.

Thank you for your help!

In another post, you said that you systematically have the problem?
When I create a project with MinGW toolchain, M2M Studio fills correctly and automatically the path to .gdbinit in the debug configuration…
Is your project correctly selected in the project explorer, and the MinGW Debug build configuration enabled, when you create your debug configuration?

Or maybe there is something written in the error log (Window > Show View > Other… > Error log)…

In another post I said that I systematically have the problem of inserting breakpoints on the fly. I am unable to stop running program just by setting breakpoint, say, at switch operator where periodic events are coming. It is ignored (even not sent to gdb according to console). But it is not related to this thread.

Regarding this problem, I create a project with MinGW toolchain AND target toolchain (both). And there is no path (only .gdbinit file name) is filled in the debug configuration. And gdb cannot read symbols because correct .gdbinit is not processed until I explicitly put full path and file name there.

I have not tried to create MinGW only configuration (anyway I will need also to compile for target, right?). I can expect that in that case all may be fine. But choosing both configurations in the wizard is possible. So I think that in that case the rest also should be ok. It is not a critical issue when there is such workaround. But if it can be fixed…

Did you try to delete your Debug config from the Debug Configurations dialog, and to re-create it?
Is the path to .gdbinit the only one you have to modify in the Debug Config in order to make it works?
On my side, I just create the Debug config by double-clicking on the Open AT RTE node, and debug it without having to modify it.

Yes.

Yes, but not to modify - I have to add path because it is missing initially (as created by M2MS).

I double-clicked the Open AT RTE node and now have:

  • new node name: New_configuration
  • Debugger field: MinGW gdb Debugger
  • GDB debugger field: D:\Work\M2M.metadata.plugins.…\1.0.0\win32\mingw\bin\gdb.exe
  • GDB command file field: .gdbinit

I have to click the Browse button to the right of GDB command file field and choose right .gdbinit file.
Now it becomes equal to: D:\Work\M2M\ttcp[RTE]_MinGW_Debug.gdbinit

And now gdb works.

Seems that Debug config “automated creation” by M2M Studio highly depends on what is selected in the Project Explorer view.
Can you try again, but just before going to the Debug Configurations dialog, just click on your project in the Project Explorer.

Normally, when you create a Debug config, it is named with the project name & the build config name separated by a space char. (I guess in your case: “ttcp [RTE]_MinGW_Debug”). But it can guess this name only if the Project Explorer view is enabled with the right project selected. Otherwise, it creates a Debug config named “New_Configuration”… as in your case… :wink:

Great! You’re right!

And again, all was exactly like you just explained.

I have Project explorer view enabled all the time.
But if I enter the Debug configurations… dialog from source view - it will be “New_configuration”.
If I point at any node in the Project explorer view and repeat the procedure - correct configuration will be created.

Now we can finally say that solution is found. Thank you!

Actually, this is explained if you read really carefully the Run & debug the application in RTE mode cheat sheet, but I agree that it’s not intuitive… :confused:

I have read this before. But I did not expect that if I open my single project in the Project explorer view, I MUST stay in this view before entering Debug configurations… dialog. The step 2 assumes building the executable which may indirectly imply editing of the source. So the source view will be active with very high probability if developer does not expect such behaviour.

I think that if it cannot be avoided - it should be just better documented.