Re: How to tell gdb to exit?

Grant Edwards
2004-05-06T16:16:54Z

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.