* gdb signal normal termination of program
@ 2001-11-21 4:01 Shaun Jackman
2001-11-23 8:56 ` Ruedi Dummermuth
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Shaun Jackman @ 2001-11-21 4:01 UTC (permalink / raw)
To: Ruedi Dummermuth; +Cc: gdb
Hello,
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?
Thanks,
Shaun
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: gdb signal normal termination of program
2001-11-21 4:01 gdb signal normal termination of program Shaun Jackman
@ 2001-11-23 8:56 ` Ruedi Dummermuth
2001-11-28 23:31 ` Ruedi Dummermuth
2001-11-28 8:25 ` Shaun Jackman
2001-11-28 8:39 ` William A. Gatliff
2 siblings, 1 reply; 6+ messages in thread
From: Ruedi Dummermuth @ 2001-11-23 8:56 UTC (permalink / raw)
To: Shaun Jackman; +Cc: bgat, gdb
Hello Shaun
The BDI cannot detect when you enter the exit() function
unless you set a breakpoint in it. The BDI cannot generate
the message "Program terminated normally" because
it has no information about when this event happens.
Also an embedded application normally does not terminate.
When you finally burn you application into flash, it should
run continuously and will never terminate via exit().
You may change your exit() function and code-in the opcode
of a software breakpoint. If you did not change it within the
BDI configuration, the opcode for a breakpoint is 0xE7FFDEFE.
Regards,
Ruedi
At 09:24 28.11.2001 -0700, you wrote:
>Hello,
>
>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?
>
>Thanks,
>Shaun
==============================
Ruedi Dummermuth
Abatron AG
Lettenstrasse 9
CH-6343 Rotkreuz
Switzerland
mailto:ruedi@abatron.ch
http://www.abatron.ch
Tel ++41 41 792 09 55
Fax ++41 41 792 09 60
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: gdb signal normal termination of program
2001-11-23 8:56 ` Ruedi Dummermuth
@ 2001-11-28 23:31 ` Ruedi Dummermuth
0 siblings, 0 replies; 6+ messages in thread
From: Ruedi Dummermuth @ 2001-11-28 23:31 UTC (permalink / raw)
To: Shaun Jackman; +Cc: bgat, gdb
Hello Shaun
The BDI cannot detect when you enter the exit() function
unless you set a breakpoint in it. The BDI cannot generate
the message "Program terminated normally" because
it has no information about when this event happens.
Also an embedded application normally does not terminate.
When you finally burn you application into flash, it should
run continuously and will never terminate via exit().
You may change your exit() function and code-in the opcode
of a software breakpoint. If you did not change it within the
BDI configuration, the opcode for a breakpoint is 0xE7FFDEFE.
Regards,
Ruedi
At 09:24 28.11.2001 -0700, you wrote:
>Hello,
>
>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?
>
>Thanks,
>Shaun
==============================
Ruedi Dummermuth
Abatron AG
Lettenstrasse 9
CH-6343 Rotkreuz
Switzerland
mailto:ruedi@abatron.ch
http://www.abatron.ch
Tel ++41 41 792 09 55
Fax ++41 41 792 09 60
^ permalink raw reply [flat|nested] 6+ messages in thread
* gdb signal normal termination of program
2001-11-21 4:01 gdb signal normal termination of program Shaun Jackman
2001-11-23 8:56 ` Ruedi Dummermuth
@ 2001-11-28 8:25 ` Shaun Jackman
2001-11-28 8:39 ` William A. Gatliff
2 siblings, 0 replies; 6+ messages in thread
From: Shaun Jackman @ 2001-11-28 8:25 UTC (permalink / raw)
To: Ruedi Dummermuth; +Cc: gdb
Hello,
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?
Thanks,
Shaun
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: gdb signal normal termination of program
2001-11-21 4:01 gdb signal normal termination of program Shaun Jackman
2001-11-23 8:56 ` Ruedi Dummermuth
2001-11-28 8:25 ` Shaun Jackman
@ 2001-11-28 8:39 ` William A. Gatliff
2001-11-21 4:09 ` William A. Gatliff
2 siblings, 1 reply; 6+ messages in thread
From: William A. Gatliff @ 2001-11-28 8:39 UTC (permalink / raw)
To: Shaun Jackman; +Cc: Ruedi Dummermuth, gdb
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: gdb signal normal termination of program
2001-11-28 8:39 ` William A. Gatliff
@ 2001-11-21 4:09 ` William A. Gatliff
0 siblings, 0 replies; 6+ messages in thread
From: William A. Gatliff @ 2001-11-21 4:09 UTC (permalink / raw)
To: Shaun Jackman; +Cc: Ruedi Dummermuth, gdb
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
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2001-11-29 7:31 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-21 4:01 gdb signal normal termination of program Shaun Jackman
2001-11-23 8:56 ` Ruedi Dummermuth
2001-11-28 23:31 ` Ruedi Dummermuth
2001-11-28 8:25 ` Shaun Jackman
2001-11-28 8:39 ` William A. Gatliff
2001-11-21 4:09 ` William A. Gatliff
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox