* gdb & __stxncpy.S for alpha @ 1998-03-06 12:16 Uncle George 1998-03-06 12:23 ` warp 1998-03-09 16:57 ` Richard Henderson 0 siblings, 2 replies; 7+ messages in thread From: Uncle George @ 1998-03-06 12:16 UTC (permalink / raw) To: axp-list@redhat.com; +Cc: Richard Henderson Cannot do a gdb where on this call which is suppose to give me the stack trace? is there some compile majic to this feature? ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: gdb & __stxncpy.S for alpha 1998-03-06 12:16 gdb & __stxncpy.S for alpha Uncle George @ 1998-03-06 12:23 ` warp 1998-03-06 14:34 ` Uncle George 1998-03-09 16:57 ` Richard Henderson 1 sibling, 1 reply; 7+ messages in thread From: warp @ 1998-03-06 12:23 UTC (permalink / raw) To: axp-list Uncle George wrote: > > Cannot do a gdb where on this call which is suppose to give me the stack > trace? is there some compile majic to this feature? Yep, you can set GDB support in the kernel config. Kind regards, Antoine website..: http://www.alpha.kimitsu.com - Alpha/Linux Powered! email....: warp@warped.xs4all.nl & warp@alpha.kimitsu.com ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: gdb & __stxncpy.S for alpha 1998-03-06 12:23 ` warp @ 1998-03-06 14:34 ` Uncle George 1998-03-06 15:36 ` Michal Jaegermann 0 siblings, 1 reply; 7+ messages in thread From: Uncle George @ 1998-03-06 14:34 UTC (permalink / raw) To: warp; +Cc: axp-list 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 . warp@alpha.kimitsu.com wrote: > Uncle George wrote: > > > > Cannot do a gdb where on this call which is suppose to give me the stack > > trace? is there some compile majic to this feature? > > Yep, you can set GDB support in the kernel config. > > Kind regards, > Antoine > > website..: http://www.alpha.kimitsu.com - Alpha/Linux Powered! > email....: warp@warped.xs4all.nl & warp@alpha.kimitsu.com > > -- > To unsubscribe: send e-mail to axp-list-request@redhat.com with > 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: gdb & __stxncpy.S for alpha 1998-03-06 14:34 ` Uncle George @ 1998-03-06 15:36 ` Michal Jaegermann 1998-03-06 16:32 ` Tom Linden 1998-03-06 16:36 ` Uncle George 0 siblings, 2 replies; 7+ messages in thread From: Michal Jaegermann @ 1998-03-06 15:36 UTC (permalink / raw) To: axp-list 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 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: gdb & __stxncpy.S for alpha 1998-03-06 15:36 ` Michal Jaegermann @ 1998-03-06 16:32 ` Tom Linden 1998-03-06 16:36 ` Uncle George 1 sibling, 0 replies; 7+ messages in thread From: Tom Linden @ 1998-03-06 16:32 UTC (permalink / raw) To: axp-list I agree with this approach. You might first try stopi in __strxncpy.s go where The theory being that if you are stomping on your stack, this might catch it first. Can't remember if this breaks before prolog code, but I think it may On Fri, 6 Mar 1998, Michal Jaegermann wrote: > 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 > > -- > To unsubscribe: send e-mail to axp-list-request@redhat.com with > 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com > > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: gdb & __stxncpy.S for alpha 1998-03-06 15:36 ` Michal Jaegermann 1998-03-06 16:32 ` Tom Linden @ 1998-03-06 16:36 ` Uncle George 1 sibling, 0 replies; 7+ messages in thread From: Uncle George @ 1998-03-06 16:36 UTC (permalink / raw) To: axp-list thanks, but __stxncpy() is part of the alpha/glibc routines ( str...cpy() et al ). eventually stxncpy will get a bogus addr, but I have no way to see who did me in! I cannot get a stack trace at all if i breakpoint in __stxncpy(), regardless of the state of the stack! I may have to use the "c" version to see whats going on! its interesting though, i can get a stacktrace in strncpy() which is also assembler in the alpha. gat Michal Jaegermann wrote: > 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. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: gdb & __stxncpy.S for alpha 1998-03-06 12:16 gdb & __stxncpy.S for alpha Uncle George 1998-03-06 12:23 ` warp @ 1998-03-09 16:57 ` Richard Henderson 1 sibling, 0 replies; 7+ messages in thread From: Richard Henderson @ 1998-03-09 16:57 UTC (permalink / raw) To: axp-list On Fri, Mar 06, 1998 at 07:16:47AM -0500, Uncle George wrote: > Cannot do a gdb where on this call which is suppose to give me the stack > trace? is there some compile majic to this feature? Apparently there is a bug in gdb in that it is not respecting the return address register that was set with .frame sp, 0, t9 Any takers to fix it in the gdb 4.17 prereleases on ftp.cygnus.com? r~ ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~1998-03-09 16:57 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 1998-03-06 12:16 gdb & __stxncpy.S for alpha Uncle George 1998-03-06 12:23 ` warp 1998-03-06 14:34 ` Uncle George 1998-03-06 15:36 ` Michal Jaegermann 1998-03-06 16:32 ` Tom Linden 1998-03-06 16:36 ` Uncle George 1998-03-09 16:57 ` Richard Henderson
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox