Need help for system calls

Daniel Jacobowitz drow@false.org
Thu Jan 5 14:56:00 GMT 2006


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.

-- 
Daniel Jacobowitz
CodeSourcery



More information about the Libc-alpha mailing list