From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6439 invoked by alias); 23 Feb 2004 05:57:49 -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 6430 invoked from network); 23 Feb 2004 05:57:47 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 23 Feb 2004 05:57:47 -0000 Received: from int-mx2.corp.redhat.com (nat-pool-rdu-dmz.redhat.com [172.16.52.200] (may be forged)) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id i1N5vkb13696 for ; Mon, 23 Feb 2004 00:57:46 -0500 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx2.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i1N5vkM28217 for ; Mon, 23 Feb 2004 00:57:46 -0500 Received: from 192.168.1.129 (vpn50-15.rdu.redhat.com [172.16.50.15]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id i1N5viX24330; Sun, 22 Feb 2004 21:57:44 -0800 From: Fred Fish Reply-To: fnf@redhat.com To: gdb-patches@sources.redhat.com Subject: [RFA] Fix gdb.base/gdb1250.exp to work when abort() is in a shared library Date: Mon, 23 Feb 2004 05:57:00 -0000 User-Agent: KMail/1.5.4 Cc: fnf@redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200402222257.42373.fnf@ninemoons.com> X-SW-Source: 2004-02/txt/msg00629.txt.bz2 The gdb1250.exp test tries to run directly to abort(), which fails if abort() is in a shared library that hasn't yet been loaded. For example the the i686-pc-linux-gnu native test fails: FAIL: gdb.base/gdb1250.exp: setting breakpoint at abort ERROR: couldn't run to breakpoint By first running to main, the shared libc gets loaded and then the run to abort() works. Here is a patch. -Fred + 2004-02-22 Fred Fish + + * gdb.base/gdb1250.exp: Run to main before trying to + run to abort. + Index: gdb.base/gdb1250.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.base/gdb1250.exp,v retrieving revision 1.1 diff -c -p -r1.1 gdb1250.exp *** gdb.base/gdb1250.exp 15 Jul 2003 16:28:21 -0000 1.1 --- gdb.base/gdb1250.exp 23 Feb 2004 05:54:30 -0000 *************** *** 1,4 **** ! # Copyright 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by --- 1,4 ---- ! # Copyright 2003, 2004 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by *************** gdb_exit *** 41,46 **** --- 41,55 ---- gdb_start gdb_reinitialize_dir $srcdir/$subdir gdb_load ${binfile} + + # First run to main so that any shared libc gets loaded. That is + # probably where abort() lives and gdb won't know how to find it to + # set a breakpoint there until the shared library symbols are read in. + + if ![runto_main] then { + perror "couldn't run to main" + continue + } if ![runto abort] then { perror "couldn't run to breakpoint"