From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14585 invoked by alias); 9 Nov 2006 13:07:03 -0000 Received: (qmail 14454 invoked by uid 22791); 9 Nov 2006 13:07:01 -0000 X-Spam-Check-By: sourceware.org Received: from ug-out-1314.google.com (HELO ug-out-1314.google.com) (66.249.92.169) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 09 Nov 2006 13:06:53 +0000 Received: by ug-out-1314.google.com with SMTP id 75so204617ugb for ; Thu, 09 Nov 2006 05:06:51 -0800 (PST) Received: by 10.67.100.17 with SMTP id c17mr1288630ugm.1163077610782; Thu, 09 Nov 2006 05:06:50 -0800 (PST) Received: by 10.66.233.17 with HTTP; Thu, 9 Nov 2006 05:06:50 -0800 (PST) Message-ID: <2cf1ee820611090506te252d4apd925e5847db130d1@mail.gmail.com> Date: Thu, 09 Nov 2006 13:07:00 -0000 From: "emin ak" To: pgilliam@us.ibm.com Subject: Re: [patch] "single step" atomic instruction sequences as a whole. Cc: gdb-patches@sourceware.org In-Reply-To: <2cf1ee820609180459o3b2fb25fi7cd9d8d6ac867fd0@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <2cf1ee820609180459o3b2fb25fi7cd9d8d6ac867fd0@mail.gmail.com> X-IsSubscribed: yes 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-11/txt/msg00049.txt.bz2 Mr Gilliam, I'am very interested in one of your gdb patches about ""single step" atomic instruction sequences as a whole". we have experienced serious problems on atomic functions while debugging linux kernel and we have found only your approach can solve the problem. I have applied it againts latest cvs source but it is not working truly, it can detects atomic inc. successfully but cant step over them and gives this error: 'breakpoint.c:7730: internal-error: remove_single_step_breakpoints: Assertion `single_step_breakpoints[0] != NULL' failed.' Mr Gilliam, if you can kindly guide me (or give a clue) to overcome this problem, I can reorganize this patch and resend it to community Thank you very much for your time. Best Regards. Emin Ak 2006/9/18, emin ak : > Hi All; > Is there aynone can succesfully apply or care about this patch. I have > the same problem with my powerpc. > I have checked the latest cvs gdb and I have found this patch did'nt > merge into mainline. Will it commit later? > Thanks. Best Regards. > Emin Ak > >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=%d\n",atomic_read(&i)); > >atomic_dec(&i); > >printf("i=%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=%d\n",atomic_read(&i)); > >(gdb) next > >151 :"=m" (v->counter), "=qm" (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] != 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] != 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 > > > > > > >