From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26392 invoked by alias); 11 May 2009 04:55:01 -0000 Received: (qmail 26370 invoked by uid 22791); 11 May 2009 04:55:00 -0000 X-SWARE-Spam-Status: No, hits=5.0 required=5.0 tests=AWL,BAYES_00,CHARSET_FARAWAY_HEADER,MIME_CHARSET_FARAWAY,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from yx-out-1718.google.com (HELO yx-out-1718.google.com) (74.125.44.155) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 11 May 2009 04:54:55 +0000 Received: by yx-out-1718.google.com with SMTP id 4so1618086yxp.48 for ; Sun, 10 May 2009 21:54:53 -0700 (PDT) MIME-Version: 1.0 Received: by 10.100.227.18 with SMTP id z18mr3720564ang.67.1242017693176; Sun, 10 May 2009 21:54:53 -0700 (PDT) In-Reply-To: <834ovsz62r.fsf@gnu.org> References: <6a8fced30905101934j2aa94d27i210484a99a523ce5@mail.gmail.com> <834ovsz62r.fsf@gnu.org> Date: Mon, 11 May 2009 04:55:00 -0000 Message-ID: <6a8fced30905102154m5de0edb4w9ae77f6e9a3bb099@mail.gmail.com> Subject: Re: how to debug this error by gdb? From: =?ISO-2022-JP?B?GyRCTEBrNBsoQg==?= To: gdb@sourceware.org Content-Type: text/plain; charset=Big5 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2009-05/txt/msg00060.txt.bz2 On Mon, May 11, 2009 at 11:11 AM, Eli Zaretskii wrote: >> Date: Mon, 11 May 2009 10:34:52 +0800 >> From: =3D?ISO-2022-JP?B?GyRCTEBrNBsoQg=3D=3D?=3D >> >> ------------------------------------------------------------------------= --------------- >> PUBLIC void glXWaitX(void) >> { >> ...... >> if (psc->driScreen->waitX !=3D 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 =3D (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. > --=20 =A7=DA=AA=BA=BE=DE=A7@=A8t=B2=CE=ACOGnu/Linux Debian-sid-amd64/gNewSense Gn= ome Mozilla Gmail/Evolution Gtkmm/Clutter/Anjuta Scim Totem Pidgin.