How to tell gdb to exit?

Daniel Jacobowitz
Thu May 6 16:18:00 GMT 2004

On Thu, May 06, 2004 at 11:16:46AM -0500, Grant Edwards wrote:
> On Thu, May 06, 2004 at 11:09:44AM -0500, Grant Edwards wrote:
> > -target-detch and -target-disconnect don't make any difference
> > either.
> My bad.  It looks like -target-disconnect works afer all.  [of
> course I swear I tried it before and it didn't.] -gdb-exit
> still refuses to exit, but it will exit on EOF.
> So, this seems to work:
>   #!/bin/bash
>   h8300-elf-gdb -interpreter=mi <<EOF
>   10-target-select async /dev/ttyS0
>   20-target-download test.elf
>   30-exec-continue
>   40-target-disconnect
>   EOF
> I messed around with this on and off for days, and couldn't
> find the answer, but as soon as I put my foot in my mouth
> publically, the answer appears.  Odd, that.

This will leave your target stopped, presumably.  The "disconnect"
commandd for the CLI will do the same thing.  Is that what you want?

Daniel Jacobowitz

More information about the Gdb mailing list