Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "William A. Gatliff" <bgat@saturn.billgatliff.com>
To: Shaun Jackman <sjackman@pathwayconnect.com>
Cc: Ruedi Dummermuth <ruedi@abatron.ch>, gdb@sources.redhat.com
Subject: Re: gdb signal normal termination of program
Date: Wed, 28 Nov 2001 08:39:00 -0000	[thread overview]
Message-ID: <20011128103905.A11148@saturn.billgatliff.com> (raw)
In-Reply-To: <E1697Vx-0004um-00@dazed>

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


WARNING: multiple messages have this Message-ID
From: "William A. Gatliff" <bgat@saturn.billgatliff.com>
To: Shaun Jackman <sjackman@pathwayconnect.com>
Cc: Ruedi Dummermuth <ruedi@abatron.ch>, gdb@sources.redhat.com
Subject: Re: gdb signal normal termination of program
Date: Wed, 21 Nov 2001 04:09:00 -0000	[thread overview]
Message-ID: <20011128103905.A11148@saturn.billgatliff.com> (raw)
Message-ID: <20011121040900.VRfLdTU-_o84FElc8TvDODLd-OlfHcXOi8OkJ7_-KdI@z> (raw)
In-Reply-To: <E1697Vx-0004um-00@dazed>; from sjackman@pathwayconnect.com on Wed, Nov 28, 2001 at 09:24:47AM -0700

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


  parent reply	other threads:[~2001-11-28  8:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-21  4:01 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 [this message]
2001-11-21  4:09   ` William A. Gatliff

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20011128103905.A11148@saturn.billgatliff.com \
    --to=bgat@saturn.billgatliff.com \
    --cc=gdb@sources.redhat.com \
    --cc=ruedi@abatron.ch \
    --cc=sjackman@pathwayconnect.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox