how to debug this error by gdb?

明覺 shi.minjue@gmail.com
Mon May 11 04:55:00 GMT 2009


On Mon, May 11, 2009 at 11:11 AM, Eli Zaretskii <eliz@gnu.org> wrote:
>> Date: Mon, 11 May 2009 10:34:52 +0800
>> From: =?ISO-2022-JP?B?GyRCTEBrNBsoQg==?= <shi.minjue@gmail.com>
>>
>> ---------------------------------------------------------------------------------------
>> PUBLIC void glXWaitX(void)
>> {
>>   ......
>>            if (psc->driScreen->waitX != NULL)
>> [line 660]              (*psc->driScreen->waitX)(pdraw);
>> .....
>> }
>> ---------------------------------------------------------------------------------------
>>
>>
>> and here is the gdb info:
>> ---------------------------------------------------------------------------------------
>> (gdb) break glxcmds.c:660
>> Breakpoint 1 (glxcmds.c:660) pending.
>> (gdb) run
>> Breakpoint 1, glXWaitX () at glxcmds.c:660
>> (gdb) print psc->driScreen->waitX
>> $3 = (void (*)(__GLXDRIdrawable *)) 0x47206769666e6f63
>                                      ^^^^^^^^^^^^^^^^^^
> This looks like ASCII text to me ("config G", little-endian).  So I'd
> try to see if some code that runs before this place could overflow
> some buffer with plain text, and part of that text spilled into this
> pointer.
I do not understand, could give some advice about what to do? thanks
>
>> (gdb) print *psc->driScreen->waitX
>> Cannot access memory at address
>> (gdb) step
>> Program received signal SIGSEGV, Segmentation fault.
>
> Right, because it's not NULL, but not a valid pointer, either.  Thus a
> SIGSEGV.
>



-- 
我的操作系統是Gnu/Linux Debian-sid-amd64/gNewSense Gnome Mozilla
Gmail/Evolution Gtkmm/Clutter/Anjuta Scim Totem Pidgin.



More information about the Gdb mailing list