This is the mail archive of the gdb@sources.redhat.com 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]

Re: gdb signal normal termination of program


Guys:


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.


HTH,


b.g.
-- 
Bill Gatliff
bgat@billgatliff.com


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