From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 30559 invoked from network); 6 Mar 1998 15:36:30 -0000 Received: from ellpspace.math.ualberta.ca (michal@129.128.88.19) by mail2.redhat.com with SMTP; 6 Mar 1998 15:36:30 -0000 Received: (from michal@localhost) by ellpspace.math.ualberta.ca (8.8.5/8.8.5) id IAA05678 for axp-list@redhat.com; Fri, 6 Mar 1998 08:36:36 -0700 From: Michal Jaegermann Message-Id: <199803061536.IAA05678@ellpspace.math.ualberta.ca> Subject: Re: gdb & __stxncpy.S for alpha To: axp-list@redhat.com Date: Fri, 6 Mar 1998 08:36:35 -0700 (MST) In-Reply-To: <3500098B.5B22CAC4@voicenet.com> from "Uncle George" at Mar 6, 98 09:34:53 am Content-Type: text Uncle George wrote: > > what does this have to do with the kernel. __strxncpy.S is defined in > sysdeps/alpha of glibc. > i Mean i cannot do a gdb "where" on this function, as it does not go up the > stack . Debuggers rely on some conventions followed by compilers when they try to unwind a stack. If you are hacking some low level function in an assembler you are free to disregard these conventions and apply shortcuts. This, of course, does wonders for a debugging if you try a backtrace from inside of such "weird" code. I do not know if this is the case here. The other possible source of a grief is when you are tracing a bug which writes over your stack. Writes beyond limits of an array allocated on stack, for example. This, naturally, has a pretty good chance to destroy precisely that information you are after when you attempt "where" in a debugger. Even if something prints it may have nothing even close with reality. If you are totally in a dark what may be causing this your only recourse is to trace patiently your program, breaking deeper and deeper on each trial run, until you will find what is killing your stack. The last bug is likely the most popular entry point to crack attacks. Instead of writing a garbage on a stack of a victim program you are putting there carefully crafted data so a continued execution will do something not-intended, like giving you a root shell, instead of just simply crashing with a bogus backtrace. Michal