This is the mail archive of the
gdb@sourceware.cygnus.com
mailing list for the GDB project.
Re: gdb stack in stub
- To: "davidwilliams at ozemail dot com dot au" <davidwilliams at ozemail dot com dot au>
- Subject: Re: gdb stack in stub
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Fri, 03 Dec 1999 18:21:34 +1100
- CC: "'gdb mail list'" <gdb at sourceware dot cygnus dot com>
- Organization: Cygnus Solutions
- References: <01BF3D52.CD93EEA0.davidwilliams@ozemail.com.au>
David Williams wrote:
>
> Hi all,
>
> I noticed that a 10K local stack is allocated in the m68k-stub.c for it own
> use when communcating with gdb. This seems excessive. I would like to leave
> the stub code in my final application so that I can debug in the field (via
> a special option). However it would be better if the stub consumed the
> least amount of system resources as possible.
>
> Is there any problem with using my applications stack (if enough room is
> allocated for GDB usage in addition to normal usage)? My application always
> runs in supervisor mode.
FYI,
GDB likes to perform inferior function calls on the target stack. Watch
the effect of:
(gdb) print printf ("Hello world\n")
If you try to use the target program's stack, GDB is very likely to
trash it :-(
enjoy,
Andrew
> What is likely max stack usage of GDB?
>
> TIA
> David Williams.