From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28243 invoked by alias); 13 Sep 2006 11:14:15 -0000 Received: (qmail 28234 invoked by uid 22791); 13 Sep 2006 11:14:14 -0000 X-Spam-Check-By: sourceware.org Received: from uekae.uekae.tubitak.gov.tr (HELO uekae.uekae.gov.tr) (193.140.74.2) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 13 Sep 2006 11:14:10 +0000 Received: from www.uekae.tubitak.gov.tr (hitit.uekae.tubitak.gov.tr [192.168.5.6]) by uekae.uekae.gov.tr (UEKAE_MAIL_SERVER_V4) with ESMTP id 57AB349001C; Wed, 13 Sep 2006 14:08:20 +0300 (EEST) Received: from 10.1.4.174 (SquirrelMail authenticated user ekara) by www.uekae.tubitak.gov.tr with HTTP; Wed, 13 Sep 2006 14:07:29 +0300 (EEST) In-Reply-To: <20060913110230.8EABD490164@uekae.uekae.gov.tr> References: <20060913110230.8EABD490164@uekae.uekae.gov.tr> Date: Wed, 13 Sep 2006 11:14:00 -0000 Subject: Re:[patch] "single step" atomic instruction sequences as a whole. From: ekara@uekae.tubitak.gov.tr To: ekara@uekae.tubitak.gov.tr Cc: pgilliam@us.ibm.com, gdb-patches@sources.redhat.com MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-9 Content-Transfer-Encoding: quoted-printable Message-Id: <20060913110820.6C27D490164@uekae.uekae.gov.tr> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-09/txt/msg00060.txt.bz2 Sorry forgot the logs. --------------------test function. #include #define __KERNEL__ #include atomic_t i; int main(void) { printf("atomic_step_test\n"); atomic_set(&i,5); printf("i=3D%d\n",atomic_read(&i)); atomic_dec(&i); printf("i=3D%d\n",atomic_read(&i)); } ----------- gdb logs----------- Breakpoint 2, main () at test.c:8 8 printf("atomic_step_test\n"); (gdb) next 9 atomic_set(&i,5); (gdb) next 10 printf("i=3D%d\n",atomic_read(&i)); (gdb) next 151 :"=3Dm" (v->counter), "=3Dqm" (c) (gdb) next Stepping over an atomic sequence of instructions beginning at 0x10000484 breakpoint.c:7730: internal-error: remove_single_step_breakpoints: Assertion `single_step_breakpoints[0] !=3D NULL' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. Quit this debugging session? (y or n) -------------------------- Regards. Emre > Hello Mr Gilliam; > Firstly thank you very much for your patch about single stepping problem > on atomic instructions. In my opinion, this bug is very critical for > powerpc arch (especially while kernel debugging). We have experienced this > problem with both with h/w probe (BDI2000) and KGDB while debugging > kernel. I have applied your patch to latest gdb (20060911 taken from cvs) > and after correctting some fail warnings and test it on a PPC8540. It can > successfullt detects 'lwarx' instruction but can't step over the loop and > a little moment later, it gives an error message like 'breakpoint.c:7730: > internal-error: remove_single_step_breakpoints: Assertion > `single_step_breakpoints[0] !=3D NULL' failed.' > I have corrected some patch error, I dont know, maybe this is the reason > of the problem. Here is the output of gdb and my test program that include > atomic_dec function. > Where can be the problem? And thank alot again, because atomic functions > are everywhere on kernel waiting to cause infinite loops.. > Regards. > Emre KARA > > >