This is the mail archive of the gdb@sourceware.cygnus.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: gdb stack in stub


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]