From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10217 invoked by alias); 24 Feb 2003 23:34:34 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 10206 invoked from network); 24 Feb 2003 23:34:34 -0000 Received: from unknown (HELO mail-out1.apple.com) (17.254.0.52) by 172.16.49.205 with SMTP; 24 Feb 2003 23:34:34 -0000 Received: from mailgate1.apple.com (A17-128-100-225.apple.com [17.128.100.225]) by mail-out1.apple.com (8.12.3/8.12.3) with ESMTP id h1ONYXg7015169 for ; Mon, 24 Feb 2003 15:34:33 -0800 (PST) Received: from scv3.apple.com (scv3.apple.com) by mailgate1.apple.com (Content Technologies SMTPRS 4.2.5) with ESMTP id ; Mon, 24 Feb 2003 15:34:31 -0800 Received: from apple.com (moleja.apple.com [17.201.22.21]) by scv3.apple.com (8.11.3/8.11.3) with ESMTP id h1ONYXf06415; Mon, 24 Feb 2003 15:34:33 -0800 (PST) Date: Mon, 24 Feb 2003 23:34:00 -0000 Subject: Re: [RFA]: Fix testsuite/gdb.base/break.exp when test compiled with -DPROTOTYPES Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v551) Cc: Elena Zannoni , gdb-patches@sources.redhat.com To: Stephane Carrez From: Jason Molenda In-Reply-To: <3E5A92C7.4070205@nerim.fr> Message-Id: <54BCA3D4-4850-11D7-AE21-003065BC3540@apple.com> Content-Transfer-Encoding: 7bit X-SW-Source: 2003-02/txt/msg00617.txt.bz2 On Monday, February 24, 2003, at 01:46 PM, Stephane Carrez wrote: > It's not good because marker4() is defined at 2 different lines. > > If we use gdb_get_line_number() it will always find the first match > which is at 46 > > and the test will fail for targets that don't compile their tests with > -DPROTOTYPES. Another alternative is to grab the line number when the breakpoint is set, and compare against that. It does mean that gdb could have the line number woefully incorrect, but at least gdb has to be consistently incorrect. e.g. something like send_gdb "break marker4\n" gdb_expect { -re "Breakpoint.*at.* file .*$srcfile, line ($decimal).*" { set marker4_lineno $expect_out(1,string) } [...] } Or drop the PROTOTYPES-is-undefined case altogether. I have no idea if there are cross-compilers in use that don't support prototypes, though.. J