cancel
Showing results for 
Search instead for 
Did you mean: 

gdb error ''Cannot find bounds of current function''

M. Jeong
Associate II
Posted on December 20, 2017 at 11:54

When debugging my STM32F4-Discovery using gdb on command line, my gdb complains that 'cannot find bounds of current function'. Could anyone please help me understand the problem and cause?

I generated a project using STM32CubeMX. In the initial setting window I selected STM32F4-Discovery board and then generated codes without changing the default settings(pinout, clock configuration and etc). The project generated here is not for an IDE but for Makefile. After compiling the skeleton-like source code, I tried debugging with the output(.elf) file and gdb. But I only have the error messages shown below.

(gdb) target remote localhost:4242
Remote debugging using localhost:4242
0x00000000 in ??
(gdb) break main 
Breakpoint 1 at 0x80007cc: file Src/main.c, line 
(gdb) n 
Cannot find bounds of current function�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?

This is strange, because I don't have such problem when I do the same thing for my STM32L476-Discovery board. I can compile, flash, and trace the I/O register values of the MCU using gdb. I tried to edit the Makefile but couldn't solve the problem yet.

This is the project I generated.

https://github.com/nownuri/STM32F407_command_line_development.git

You could download the project. The makefile assumes that you would use the arm-none-eabi tools uploaded in the same repository.

0 REPLIES 0