On 18 Jul 2002 at 14:10, Sandeep Raju wrote: > If a page of memory is set as read only, and if the > process tries to access an address in the page, then a > Segmentation fault(SIGSEGV) occurs, right. > > My problem is - "Can we find out the address whose > attempted access raised the signal from within the > program or to be more precise from the signal > handler?".
Yes. Make the program to dump the core ( or it does probably for SIGSEGV).. Just do 'gdb progname core' and issue bt on gdb prompt. It will tell you the function where it died.. On a side note, any idea how to print stack trace from inside the program? Pretty useful in SIGSEGV handler IMO.. Binand provided some pointers some time back but couldn't find them handy.. Follow up on LIP please.. Bye Shridhar -- Actually, typing random strings in the Finder does the equivalent offilename completion.(Discussion in comp.os.linux.misc on the intuitiveness of commands: filecompletion vs. the Mac Finder.) ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ linux-india-help mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/linux-india-help
