This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

using GDB with openOCD - make gdb "forget"

I set up a combination of gdb and openOCD under macOS (Catalina).

I'm starting openOCD in one Terminal window and gdb in another one, connecting to a STM32F407G-DISC1 board (Discovery) with the following in ~/.gdbinit:

I have two questions about gdb:

1. Does gdb stop at the beginning after loading the binary (firmware.elf) or does it start through?
    Looks to me that it stops.

2. When I start gdb (continue)  for the first time, I get this picture:

When I then type ^C, the program is interrupted and gdb prompts:

Next I type "c"

Program runs. I Press the Reset button. Nothing happens (should gdb react somehow?)

I then hit ^C again. Now gdb prompts in another area of the code space.

I type "quit". gdb quits.

I start gdb again. Now it says:

What does the line 0x00001592 in serial_qemit() mean? That was the last interruption. When I now type

continue, where does gdb commence? I type again ^C. Now it stops near 0x00001592, namely in 0x00001590

The program seem to loop there.

gdb doesn't seem to "forget" where it last was interrupted and starts again there. How can I make gdb "forget"?

0