From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24464 invoked by alias); 1 May 2008 20:13:02 -0000 Received: (qmail 24456 invoked by uid 22791); 1 May 2008 20:13:02 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 01 May 2008 20:12:42 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 73530983DA; Thu, 1 May 2008 20:12:40 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 4C00D98366; Thu, 1 May 2008 20:12:40 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1Jrf8x-0007aO-Lh; Thu, 01 May 2008 16:12:39 -0400 Date: Thu, 01 May 2008 20:13:00 -0000 From: Daniel Jacobowitz To: Aleksandar Ristovski Cc: gdb-patches@sources.redhat.com Subject: Re: [patch] PR gdb/1665 pending catch/throw catchpoints Message-ID: <20080501201239.GO22218@caradoc.them.org> Mail-Followup-To: Aleksandar Ristovski , gdb-patches@sources.redhat.com References: <4817E37A.8020705@qnx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4817E37A.8020705@qnx.com> User-Agent: Mutt/1.5.17 (2007-12-11) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-05/txt/msg00037.txt.bz2 On Tue, Apr 29, 2008 at 11:11:54PM -0400, Aleksandar Ristovski wrote: > -# As I said before, this test script is not ready yet! > - > -continue There's comments higher up about this continue, they need to be updated too. > # Set a catch catchpoint > > -gdb_test "catch catch" "Catchpoint \[0-9\]+ \\(catch\\)" > +gdb_test "catch catch" "Catchpoint \[0-9\]+ \\(catch\\)" \ > + "catch catch (static executable)" > > # Set a throw catchpoint > > gdb_test "catch throw" "Catchpoint \[0-9\]+ \\(throw\\)" \ > "catch throw (static executable)" The descriptions on these are wrong, they aren't for a static executable. > # The catchpoints should be listed in the list of breakpoints. > +set addr "" > +set re_head "Num${ws}Type${ws}Disp${ws}Enb${ws}Address${ws}What" > +set re_2_bp "1${ws}breakpoint${ws}keep${ws}y${ws}$addr${ws}exception catch" > +set re_3_bp "2${ws}breakpoint${ws}keep${ws}y${ws}$addr${ws}exception throw" This won't work if the C++ library is linked in, e.g. -static or a bare metal toolchain; it won't be pending. > +gdb_test "tbreak main" "Temporary breakpoint 3.*" \ > + "Set temporary breakpoint at main" > + > +gdb_test "run" "Temporary breakpoint 3,.*" "Run to main" There's runto_main, use that instead; it handles remote targets and so forth. If you'll try to update this, I can test it on arm-none-eabi or another bare metal platform. Running it with "RUNTESTFLAGS=--target_board unix/-static" should be enough to test the problem. -- Daniel Jacobowitz CodeSourcery