Using gdb to debug Segmentation fault on linux
Baurzhan Ismagulov
ibr@radix50.net
Wed Oct 3 09:41:00 GMT 2007
Hello Ying,
On Tue, Oct 02, 2007 at 06:46:22PM -0500, ying lcs wrote:
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread -1218548816 (LWP 25361)]
> 0x08067623 in RTPStream::SendRTCPSR (this=0x83a1520, inTime=@0x1b9a5b58,
> inAppendBye=0) at RTCPUtilitiesLib/RTCPSRPacket.h:123
> 123 ((UInt32*)&fSenderReportBuffer)[(fSenderReportWithServerInfoSize
> >> 2) + 1] = htonl(inSSRC);
First, you need to understand what SIGSEGV is. See, e.g.,
http://en.wikipedia.org/wiki/SIGSEGV .
Second, you need to understand what exactly caused it. "p
&((UInt32*)&fSenderReportBuffer)[(fSenderReportWithServerInfoSize >> 2)
+ 1]" at the gdb prompt might give a hint (compare it with the value of
fSenderReportBuffer and sizeof fSenderReportBuffer).
Only when these two are clear it would make sense to look at the bt,
which may or may not help.
With kind regards,
--
Baurzhan Ismagulov
http://www.kz-easy.com/
More information about the Gdb
mailing list