This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

how to debug this error by gdb?


I'm debugging a application, for it crashes at line 660 of file
glxcmds.c, which is a file of mesa-7.4.1
here is the source code at which it crashes:
---------------------------------------------------------------------------------------
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
(gdb) print *psc->driScreen->waitX
Cannot access memory at address
(gdb) step
Program received signal SIGSEGV, Segmentation fault.
---------------------------------------------------------------------------------------

I think there are 2 possibilities:
(1) linking error, maybe psc->driScreen->waitX is linked to the wrong
address, then I'm wondering how could I further find the real memory
address of psc->driScreen->waitX? or,
(2) memory protection error, maybe 0x47206769666e6f63 is the correct
address of  psc->driScreen->waitX, but  it's cannot be accessed, then
what might be the cause?
could you help how to tell which is the correct possibility? and how
to solve it? thanks

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]