This is the mail archive of the
mailing list for the GDB project.
Re: gdb signal normal termination of program
- From: "William A. Gatliff" <bgat at saturn dot billgatliff dot com>
- To: Shaun Jackman <sjackman at pathwayconnect dot com>
- Cc: Ruedi Dummermuth <ruedi at abatron dot ch>, gdb at sources dot redhat dot com
- Date: Wed, 28 Nov 2001 10:39:05 -0600
- Subject: Re: gdb signal normal termination of program
- References: <E1697Vx-0004um-00@dazed>
- Reply-to: bgat at billgatliff dot com
I have a bdi2000, too! Just got it yesterday... :^)
> I have an arm-elf target connected to a bdi2000 jtag debugger. Is
> there any instruction I can compile that indicates to the debugger
> or gdb that my program has reached normal termination. When main
> returns exit() is called which then hangs the processor. I have to
> interrupt it with ctrl-c. I'd like gdb to break to the prompt on its
> own and display the message "Program terminated normally". Do you
> know how I go about this?
I don't know what runtime library you're using, but if you step
through exit() most of the time it terminates in an infinite loop.
What needs to happen instead is something like a BKGD instruction (I'm
using cpu32, in case you couldn't tell), that forces the chip back
into debug mode. The bdi2000 should catch that and tell gdb that the
target has halted.
As to the "program terminated normally" message, that's going to
depend on how the bdi2000 interprets the occurrence of the BKGD event.
And that, along with whatever they (don't seem to) provide for console
output facilities, is up to Abatron.