This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/21873] GDB Crashes when ^C pressed while debugging ARM-Cortex M4F


https://sourceware.org/bugzilla/show_bug.cgi?id=21873

--- Comment #6 from Yao Qi <qiyao at gcc dot gnu.org> ---
(In reply to Ismail from comment #5)
> 
> I am not sure how to debug the gdb itself. It seems little bit complicated.
> I have to use openocd in order to run and debug the program on the target. 
> 
> I will have one GDB as runner and debugger, the second one that works in TUI
> mode will connect to openocd and debug the firmware. 
> 
> I would be happy if you can give me some documents/guidance to debug it.

Use the built GDB as usual.  Start it in TUI mode, and connect to OpenOCD. 
Start a new terminal, check the pid of the arm-none-eabi-gdb, like,

$ ps -elf | grep gdb

then start your host GDB (shipped in your distro) to attach the
arm-none-eabi-gdb, like

$ gdb -p PID
 (gdb) continue

and then go back the first terminal (using arm-none-eabi-gdb in TUI mode). 
Continue use it to reproduce the crash.  If it crashes, the host GDB will catch
the SIGSEGV signal, and you can show the stack backtrace of crash, and examine
why it crashes.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]