Re: [arm-gnu] gdb problem with library calls
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [arm-gnu] gdb problem with library calls



On Wed, 2005-11-16 at 19:25, Bahadir Balban wrote:
> Hi,
> 
>  I compiled the simple program below, with arm-none-eabi-gcc -g -o
> main main.c. (gcc 3.4.3)
> 
>  When I start arm-none-eabi-gdb on the program and type commands:
> 
>  % target sim
>  % load main
>  % break main
>  % continue
> 
>  It runs fine in the first run. On the subsequent runs, printfs don't
> print, and malloc returns 0. I can't actually step into these
> functions. Also, sometimes it happens to be that, gdb loops in main,
> i.e. after the last C statement, goes back to the first statement,
> when I run the code by stepping. This looping then goes forever. On a
> native gdb on my system (Gentoo/AMD64) the same program compiles and
> debugs fine. What's the problem? Am I missing something here?


When using the simulator you have to reload the application before each
run.  You don't have to quit GDB, or reconnect to the target, but you do
have to download the image again.

R.