Author Topic: Remote Debugging: "Interrupting debugger failed :("  (Read 16465 times)

Offline MasterAlexei

  • Multiple posting newcomer
  • *
  • Posts: 83
    • Fun electronic
Remote Debugging: "Interrupting debugger failed :("
« on: January 04, 2023, 11:04:29 pm »
Hello every one,
I did build the tag 20.03. It was my upgrade from trunk rev 11835 to that new 20.03 version.
By remote debug i did find out, that I cannot set breakpoints on the running target. I get error "Interrupting debugger failed :("

I did downgraded back to rev 11835 and there it is possible to set breakpoints.

Moreover, i did copy the directory src\plugins\debuggergdb from src of rev 1835 to src of 20.03 and compile it AND I CAN set breakpoints in remotely running target.

Also there is a definitive a bug in gdb plugin in 20.03 for remote debugging.



Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1634
Re: Remote Debugging: "Interrupting debugger failed :("
« Reply #1 on: January 05, 2023, 10:48:03 am »
There are only 7 commits in the src\plugins\debuggergdb folder between 11835 and 20.03, can you do a bisection?

r11877 Fix crash when trying to attach when there is no loaded project
r11876 Fix regression when executing additional commands before
r11860 Make sure we always store remote debugging project options sorted by target
r11859 Make sure to set the modified flag for the project when the remote debugger options are modified
r11858 Rework the plugin to not use ProjectLoaderHooks
r11853 Make sure we don't save empty serial baud attributes in the debugger extension
r11852 Improve UI of Debugger project options panel

Offline MasterAlexei

  • Multiple posting newcomer
  • *
  • Posts: 83
    • Fun electronic
Re: Remote Debugging: "Interrupting debugger failed :("
« Reply #2 on: January 05, 2023, 10:56:39 am »
I'll try, it will take some time.

Offline MasterAlexei

  • Multiple posting newcomer
  • *
  • Posts: 83
    • Fun electronic
Re: Remote Debugging: "Interrupting debugger failed :("
« Reply #3 on: January 05, 2023, 11:32:05 am »
Hello every one,

well it does not took too much time.

In Rev r11853  it works, and is possible to set break points
in Rev r11858  it does not work anymore.

What I did: I checkout this two revisions of trunk, just copy the directory src\plugins\debuggergdb into CB 20.03 source dir and compile it, one after another, started my project, and tried to debug it. Debug session starts. Target app runns.

If there was some Breakpoints, that was set BEFORE apps start, they are set, and app stops on them.

If App already runs, it is not possible to set BPs.

Small addition:
It also not possible (from Rev r11858 ) to stop debuggie at all. Only killing the gdb on host and on target helps.
In Rev r11853 it is still possible to stop the debug session.

Best Regards,
Alexey
« Last Edit: January 05, 2023, 12:05:49 pm by MasterAlexei »

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1634
Re: Remote Debugging: "Interrupting debugger failed :("
« Reply #4 on: January 05, 2023, 03:02:16 pm »
I have just created a ticket, thank you for reporting and bisecting.

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1634
Re: Remote Debugging: "Interrupting debugger failed :("
« Reply #5 on: February 17, 2023, 09:39:46 am »
MasterAlexei, how are you connecting to the remote debugger (TCP, UDP or serial)?

Please, subscribe to ticket #1353.

Offline MasterAlexei

  • Multiple posting newcomer
  • *
  • Posts: 83
    • Fun electronic
Re: Remote Debugging: "Interrupting debugger failed :("
« Reply #6 on: February 17, 2023, 09:50:25 am »
Hello, Miguel.

I am connecting to remote debug session over TCP.

Best Regards,

Alexey

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6034
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Remote Debugging: "Interrupting debugger failed :("
« Reply #7 on: March 26, 2023, 04:52:10 pm »
I'm not fully understand the code change in rev https://sourceforge.net/p/codeblocks/code/11858/

If I remember correctly, many years ago, under C::B, I can use gdb.exe to connect with gdbserver.exe, and use gdbserver.exe to debug(control) a local exe file.

Many embedded development need remote debugging feature, so this is a big regression.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.