Pause

Russell Shaw rjshaw@netspace.net.au
Mon Jan 3 13:05:00 GMT 2005


Russell Shaw wrote:
> Hi,
> I set up .gdbinit so that with a single command, gdb can
> load a new file to be debugged, and start a simulator:
> 
> define simul
>     detach
>     shell killall -sHUP simulavr
>     shell simulavr -g -p 4242 -d atmega16 -c 16000000 loader_02.bin &
>     file loader_02
>     target remote localhost:4242
> end
> 
> This works ok if i type one line at a time. If i type "simul", the
> commands happen too fast and gdb gives an error message before the
> simulator has started. Does gdb have a "pause" or delay command?
> I need one here:
> 
> define simul
>     detach
>     shell killall -sHUP simulavr
>     shell simulavr -g -p 4242 -d atmega16 -c 16000000 loader_02.bin &
>     file loader_02
> 
>     < delay 300ms >
> 
>     target remote localhost:4242
> end

On second thoughts, i'll modify simulavr so that it sets itself up
properly before it forks (instead of using the shell fork &).



More information about the Gdb mailing list