From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11251 invoked by alias); 31 May 2010 10:25:54 -0000 Received: (qmail 11218 invoked by uid 22791); 31 May 2010 10:25:53 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-vw0-f41.google.com (HELO mail-vw0-f41.google.com) (209.85.212.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 31 May 2010 10:25:49 +0000 Received: by vws13 with SMTP id 13so4796538vws.0 for ; Mon, 31 May 2010 03:25:48 -0700 (PDT) MIME-Version: 1.0 Received: by 10.224.78.233 with SMTP id m41mr1488362qak.342.1275301547968; Mon, 31 May 2010 03:25:47 -0700 (PDT) Received: by 10.229.89.76 with HTTP; Mon, 31 May 2010 03:25:47 -0700 (PDT) In-Reply-To: <88426.50861.qm@web112506.mail.gq1.yahoo.com> References: <88426.50861.qm@web112506.mail.gq1.yahoo.com> Date: Mon, 31 May 2010 10:25:00 -0000 Message-ID: Subject: Re: [GDB help] Regarding breakpoint support in ARM From: Suraj Sivan To: gdb@sourceware.org Cc: paawan oza 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-05/txt/msg00109.txt.bz2 Hi, Thanks. This means that the GDB keeps the list of all breakpoints and watchpoints being set, even if it is not able to set in the actual hardware due to lack of debug registers. Hope this behavior of GDB is not correct where even after receiving error in setting breakpoints, it keeps the information of those breakpoints which returned error in its private list. Will this be corrected in the next release of GDB? Is there any option or commands that can be given prior to starting debugging to avoid keeping these erroneous brekpoints in the list? regards Suraj On Mon, May 31, 2010 at 2:52 PM, paawan oza wrote: > Hi, > The moment you give continue, gdb keeps on trying to insert the extra hw = breakpoint all the time. > I think, gdb expects you to remove manually and then continue (if you rov= e previously set hw breakpoint, then it should work also) > I wonder, even after knowing that it can not set extra hw watch-point, du= e to lack of debug registers, still it goes ahead and set it in its private= list, which could be avoided. > (this is the case with x86 also, If I am correct) > Regards, > Oza. > > > > ----- Original Message ---- > From: Suraj Sivan > To: gdb@sourceware.org > Sent: Mon, May 31, 2010 12:30:05 PM > Subject: [GDB help] Regarding breakpoint support in ARM > > Hi, > > I'm working with GDB and custom GDB Server for debugging ARM. The core > is ARM7TDMI-S which has 2 hardware resources for setting breakpoints. > I am using the option "set breakpoint always-inserted on" so that > whenever I set a breakpoint or watcpoint, GDB will put it immediately > rather than waiting for continue command. After setting three > breakpoints(2 software and 1 hardware), if I try to put a 4th hardware > breakpoint GDB will give a warning as below: > > Warning: > Cannot insert hardware breakpoint 4. > Could not insert hardware breakpoints: > You may have requested too many hardware breakpoints/watchpoints. > > Now if I list the breakpoints using "info b" command, GDB displays as bel= ow: > > Num =A0 =A0 Type =A0 =A0 =A0 =A0 =A0 Disp Enb Address =A0 =A0What > 1 =A0 =A0 =A0 breakpoint =A0 =A0 keep y =A0 0x40000010 ../source/armloop.= s:8 > 2 =A0 =A0 =A0 breakpoint =A0 =A0 keep y =A0 0x40000020 ../source/armloop.= s:12 > 3 =A0 =A0 =A0 hw breakpoint =A0keep y =A0 0x40000030 ../source/armloop.s:= 16 > 4 =A0 =A0 =A0 hw breakpoint =A0keep y =A0 0x40000040 ../source/armloop.s:= 20 > > Here it is seen that GDB keeps the 4th hardware breakpoint information > in its table. If I give a continue command, GDB will try to put the > 4th breakpoint again and gives the same warning as above and gets into > a situation where I have to manually delete the 4th breakpoint to > further continue. Is there an option for GDB to not keep the > information of the particular breakpoint which it gives a warning like > above? > > regards > Suraj S > > > > > > --=20 Suraj S, Lead Engineer, NeST Pvt. Ltd., A-3, Periyar,Technopark, Trivandrum, Kerala