From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8909 invoked by alias); 9 Aug 2012 09:12:01 -0000 Received: (qmail 8897 invoked by uid 22791); 9 Aug 2012 09:11:59 -0000 X-SWARE-Spam-Status: No, hits=-4.7 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-lb0-f169.google.com (HELO mail-lb0-f169.google.com) (209.85.217.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 09 Aug 2012 09:11:41 +0000 Received: by lbon3 with SMTP id n3so166123lbo.0 for ; Thu, 09 Aug 2012 02:11:40 -0700 (PDT) MIME-Version: 1.0 Received: by 10.152.106.233 with SMTP id gx9mr21317642lab.48.1344503500287; Thu, 09 Aug 2012 02:11:40 -0700 (PDT) Received: by 10.114.0.242 with HTTP; Thu, 9 Aug 2012 02:11:40 -0700 (PDT) In-Reply-To: <2908402.0pCVQUbaGe@qiyao.dyndns.org> References: <2908402.0pCVQUbaGe@qiyao.dyndns.org> Date: Thu, 09 Aug 2012 09:12:00 -0000 Message-ID: Subject: Re: Hardware breakpoint limitation issue during the gdb regression test From: Terry Guo To: Yao Qi Cc: gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 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: 2012-08/txt/msg00024.txt.bz2 On Thu, Aug 9, 2012 at 11:47 AM, Yao Qi wrote: > On Wednesday, August 08, 2012 04:55:44 PM Terry Guo wrote: >> I managed to run gdb "make check" on a real arm cortex-m3 board. >> During this regression test, I saw many failures are caused by "Cannot >> insert hardware breakpoint 8" and "You may have requested too many >> hardware breakpoints/watchpoints". It's true that my arm board only >> supports limited number breakpoints. So how to workaround this >> limitation for regression test? Thanks. > > You don't have to workaround this limitation. x86 also has a limited number > of hardware breakpoints and processor with unlimited hw breakpoints doesn't > exist at all :) If testsuite works for x86, it should work for your > configuration. > > As you provide quite few information, I can't tell where the problem is. In > testsuite, it is regarded that target "arm*-*-*" supports both hardware > breakpoint and watchpoint (see skip_hw_breakpoint_tests and > skip_hw_watchpoint_tests in testsuite/lib/gdb.exp), so all hw watch/break > tests are run on your board. > > You have to check whether your stub is able to handle hardware > breakpoint/watchpoint packets, and insert them correctly. > > -- Thanks for help. Here are more information. I am trying to run tests in break.exp on my cortex-m3 board. The test process is: 1) start target gdb and load binary file. 2) set 8 different breakpoints. 3) then connect to my board and load binary file to board. 4) then use gdb command "continue" to start to run the binary. At this point, I will get error messages like: -----GDB output--------- (gdb) continue Continuing. Note: automatically using hardware breakpoints for read-only addresses. Warning: Cannot insert hardware breakpoint 2. Could not insert hardware breakpoints: You may have requested too many hardware breakpoints/watchpoints. (gdb) break 46 Breakpoint 9 at 0x180: file /home/terguo01/work/gcc-arm-none-eabi-4_8-2012q3-20120803/src/gdb/gdb/testsuite/gdb.base/break.c, line 46. (gdb) continue Continuing. Warning: Cannot insert hardware breakpoint 9. Cannot insert hardware breakpoint 2. Could not insert hardware breakpoints: You may have requested too many hardware breakpoints/watchpoints. ------------------------------------------------------------------------------------------------------ For me, it seems many tests in gdb regression test tend to set around 8 or 9 break points. And I always end with this error on "cannot insert hardware breakpoint". Such tests can work on x86, I think it is because x86 can support more breakpoints than arm. I do need a way to make these tests can run on arm board. Please help. BR, Terry