Subject: Re: Coredump on return debugging question
To: None <netbsd-users@netbsd.org>
From: Christoph Kaegi <kgc@zhwin.ch>
List: netbsd-users
Date: 05/16/2003 16:27:09
On 2003.05.16 12:44, David Laight wrote:
> > #0 0x20202020 in ?? ()
>
> > Can anybody give me a hint, in what direction I have to search?
>
> Since the return address is all spaces, I'd suspect you've overrun
> a char[] array in the called function and trampled all over the
> return address. With care you can jump to a known address - and
> even to some code you've put into the buffer itself!
I checked everything that handles a char (it's only a small function)
but everything seems to be correct.
I also initialised most of the variables to bigger sizes, but
no dice.
Can I look at the return address somehow with gdb while
singlestepping?
>
> On sparc the procedure call sequence is a lot different and the
> on-stack space for saving registers won't be used unless there
> is a deep call sequence.
>
OK.
Thanks
Chris
--
----------------------------------------------------------------------
Christoph Kaegi kgc@zhwin.ch
----------------------------------------------------------------------