debuggingarmgdbcliongdbserver

How to debug debugging using Clion -> armgdb -> J-link gdb server


I am trying to use Clion IDE to debug various NXP ARM M MCUs using J-link. In case when program is only in RAM it works fine but but in case of flash targets after program load IDE often slows down for a while and then I will get timeout. Some click on pause button in right moment pauses program somewhere and allows me to debug...

My question is there any way how to see interactions of IDE with armgdb client or armgdb and j-link gdb server? I tried to capture communication with gdb server using wire shark but it seems to be a binary protocol...

Thank you.


Solution

  • I found there is possibility to let gdb echo commands which showed me what is going on. Unfortunately in case of Clion the only way is to put it into .gdbinit file in the root of project.

    set trace-commands on
    

    It showed me warning

    warning: A handler for the OS ABI "Windows" is not built into this configuration
    of GDB. 
    

    Which leads me to comment of this question gdb-multiarch (MINGW64) cannot determine architecture from executable?

    Well I am not sure what caused Clion to hang but having .gdbinit with just set osabi none in it solved it.