Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* how to debug this error by gdb?
@ 2009-05-11  2:35 明覺
  2009-05-11  3:12 ` Eli Zaretskii
  2009-05-11 17:21 ` Michael Snyder
  0 siblings, 2 replies; 6+ messages in thread
From: 明覺 @ 2009-05-11  2:35 UTC (permalink / raw)
  To: 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.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-05-12 14:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-11  2:35 how to debug this error by gdb? 明覺
2009-05-11  3:12 ` Eli Zaretskii
2009-05-11  4:55   ` 明覺
2009-05-11  6:24     ` Paul Pluzhnikov
2009-05-11 17:21 ` Michael Snyder
2009-05-12 14:42   ` Frank Ch. Eigler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox