From: 明覺 <shi.minjue@gmail.com>
To: gdb@sourceware.org
Subject: how to debug this error by gdb?
Date: Mon, 11 May 2009 02:35:00 -0000 [thread overview]
Message-ID: <6a8fced30905101934j2aa94d27i210484a99a523ce5@mail.gmail.com> (raw)
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.
next reply other threads:[~2009-05-11 2:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-11 2:35 明覺 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6a8fced30905101934j2aa94d27i210484a99a523ce5@mail.gmail.com \
--to=shi.minjue@gmail.com \
--cc=gdb@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox