This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Need help for system calls
On Thu, Jan 05, 2006 at 09:56:01AM -0500, Daniel Jacobowitz wrote:
> On Thu, Jan 05, 2006 at 07:33:52PM +0530, Partha Chatterjee wrote:
> > Hello,
> >
> > I will try to explain my problem through some stack-traceback examples
> >
> > The code is something as follows
> > main() ----> calls func1() ----> calls func2() ----> calls nanosleep()
> >
> > When I enter func2() from func1() the arguments passed to func2 + (its
> > local stack)
> > is proper. Once the control enters nanosleep() and if at that point (i.e
> > when the process
> > is still in the nanosleep() context) I send a signal to the process, the
> > following thing is
> > observed (same is observed in case I attach gdb to the process while the
> > context is
> > still in nanosleep()).
> >
> > The stack of func2() gets overloaded with the contents of func1() and
> > there is no way to
> > check what were the contents of func2()'s stack. (It is always the
> > previous function's (in
> > the call-stack) stack that gets overloaded).
>
> What you've written doesn't make sense. What I suspect you mean is
> that GDB is failing to show you the proper backtrace, right? If so,
> this is generally inadequate debugging information in your C library.
And in case this wasn't clear: current versions of glibc + gdb
shouldn't have this problem.
--
Daniel Jacobowitz
CodeSourcery