From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14928 invoked by alias); 10 Jun 2010 14:40:52 -0000 Received: (qmail 14911 invoked by uid 22791); 10 Jun 2010 14:40:51 -0000 X-SWARE-Spam-Status: No, hits=0.7 required=5.0 tests=AWL,BAYES_50,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from mail-gw0-f41.google.com (HELO mail-gw0-f41.google.com) (74.125.83.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 10 Jun 2010 14:40:46 +0000 Received: by gwb15 with SMTP id 15so630842gwb.0 for ; Thu, 10 Jun 2010 07:40:44 -0700 (PDT) MIME-Version: 1.0 Received: by 10.224.79.75 with SMTP id o11mr263516qak.212.1276180844451; Thu, 10 Jun 2010 07:40:44 -0700 (PDT) Received: by 10.229.74.79 with HTTP; Thu, 10 Jun 2010 07:40:44 -0700 (PDT) In-Reply-To: <-3629479195726626766@unknownmsgid> References: <1275405490.22316.12.camel@e102319-lin.cambridge.arm.com> <-3629479195726626766@unknownmsgid> Date: Thu, 10 Jun 2010 14:40:00 -0000 Message-ID: Subject: Re: [HELP]Can GDB for ARM set hard breakpoint when native debugging? From: "karthikeyan.s" To: Will Deacon Cc: Matthew Gretton-Dann , gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 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: 2010-06/txt/msg00037.txt.bz2 Hi Will, Did you have issue any issues(kernel crash) with the watch_thread_num test gdb test (testsuite) with your gdb changes (And offcourse with you kernel backend!)? ( watch_thread_num is in gdb/testsuite/gdb.base). The issue is not just with watchpoints but also breakpoints. I am using a 2.6.33 kernel for which you had posted the patch version2. I tried something similar to watch_thread_num using breakpoints and I get a hang. #./gdb watch_thread_vum # b main # run At this point the porogram is waiting in main # hb 60 # c Line 60 is --> shared_var++ # c (hit continue for some time) # quit When I quit, the kernel hangs (ping does not work). This issue does not happen if I set the breakpoint (hb 60) after all the threads have spawned. I noted that gdb requests breakpoint removal and then insertion whenever a thread is spawned. I insert breakpoints on all the current threads (ALL_LWPS). And remove only on those threads that I inserted the breakpoint on. I am yet to dig in though. Thanks, Karthik On Thu, Jun 3, 2010 at 5:23 PM, Will Deacon wrote: > Hi Karthik, > >> Just in case you are going to re-use most of the code for 2.6.35. >> In hw_breakpoint.c, the handlers do not release the locks on wtpt/bkpt >> not matched. >> Should rather be: >> =A0if (val !=3D (unpredictable & ~0x3)) { >> =A0 =A0 rcu_read_unlock(); >> =A0 =A0 continue; >> } >> >> Otherwise I get a "schedule while atomic" bug. > > Well spotted! My current tree is a little different, but I've > updated it as necessary. > > Thanks, > > Will > > > --=20 --- S. Karthikeyan | +919980814745 ---