Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: 明覺 <shi.minjue@gmail.com>
To: gdb@sourceware.org
Subject: Re: how to debug this error by gdb?
Date: Mon, 11 May 2009 04:55:00 -0000	[thread overview]
Message-ID: <6a8fced30905102154m5de0edb4w9ae77f6e9a3bb099@mail.gmail.com> (raw)
In-Reply-To: <834ovsz62r.fsf@gnu.org>

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.


  reply	other threads:[~2009-05-11  4:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-11  2:35 明覺
2009-05-11  3:12 ` Eli Zaretskii
2009-05-11  4:55   ` 明覺 [this message]
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=6a8fced30905102154m5de0edb4w9ae77f6e9a3bb099@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