From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26035 invoked by alias); 9 Feb 2004 07:23:25 -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 26022 invoked from network); 9 Feb 2004 07:23:23 -0000 Received: from unknown (HELO maynard.mail.mindspring.net) (207.69.200.243) by sources.redhat.com with SMTP; 9 Feb 2004 07:23:23 -0000 Received: from user-119a90a.biz.mindspring.com ([66.149.36.10] helo=berman.michael-chastain.com) by maynard.mail.mindspring.net with esmtp (Exim 3.33 #1) id 1Aq5lK-0002R0-00 for gdb-patches@sources.redhat.com; Mon, 09 Feb 2004 02:23:22 -0500 Received: by berman.michael-chastain.com (Postfix, from userid 502) id 665D84B104; Mon, 9 Feb 2004 02:23:40 -0500 (EST) To: gdb-patches@sources.redhat.com Subject: [rfa/testsuite] gdb1250.exp: make 'break abort' work with new pending breakpoints Message-Id: <20040209072340.665D84B104@berman.michael-chastain.com> Date: Mon, 09 Feb 2004 07:23:00 -0000 From: mec.gnu@mindspring.com (Michael Elizabeth Chastain) X-SW-Source: 2004-02/txt/msg00193.txt.bz2 This patch enhances gdb.base/gdb1250.exp so that it works with the new pending-breakpoint interface. This test wants to set a breakpoint on 'abort', which may be in a shared library. Of course it still works with the old 'just quietly set the breakpoint' interface. I tested on native i686-pc-linux-gnu, red hat 8.0, glibc 2.2.93-5-rh. I tested with gdb 6.0 and gdb HEAD, gcc 3.3.2, binutils 2.14 and binutils HEAD, dwarf-2 and stabs+. All the tests PASSed in all configurations. This test is sensitive to the version of binutils because binutils HEAD has a PLT optimization for shared library functions. Okay to commit? Michael C 2004-02-09 Michael Chastain * gdb.base/gdb1250.exp: Improve 'break abort' to work with new pending-breakpoint user interface. Index: gdb1250.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.base/gdb1250.exp,v retrieving revision 1.1 diff -c -3 -p -r1.1 gdb1250.exp *** gdb1250.exp 15 Jul 2003 16:28:21 -0000 1.1 --- gdb1250.exp 9 Feb 2004 07:17: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_start *** 42,51 **** gdb_reinitialize_dir $srcdir/$subdir gdb_load ${binfile} ! if ![runto abort] then { perror "couldn't run to breakpoint" continue } # See http://sources.redhat.com/gdb/bugs/1250 # --- 42,67 ---- gdb_reinitialize_dir $srcdir/$subdir gdb_load ${binfile} ! # Set a breakpoint on 'abort' and run to it. gdb_breakpoint and runto ! # do not work because they answer 'no' to the breakpoint-pending ! # question. ! ! if { ![runto_main] } then { perror "couldn't run to breakpoint" continue } + + gdb_test_multiple "break abort" "break on abort" { + -re "Breakpoint $decimal .*$gdb_prompt $" { + pass "break on abort" + } + -re "Function \"abort\" not defined.\r\n.*Make breakpoint pending on future shared library load? \\(y or n\\) $" { + send_gdb "yes\n" + exp_continue + } + } + + gdb_test "continue" "Breakpoint $decimal.*" "continue to abort" # See http://sources.redhat.com/gdb/bugs/1250 #