From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22270 invoked by alias); 18 Dec 2001 09:42:06 -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 21261 invoked from network); 18 Dec 2001 09:40:45 -0000 Received: from unknown (HELO dc-mx07.cluster1.charter.net) (209.225.8.17) by sources.redhat.com with SMTP; 18 Dec 2001 09:40:45 -0000 Received: from [24.241.47.50] (HELO localhost) by dc-mx07.cluster1.charter.net (CommuniGate Pro SMTP 3.4.6) with ESMTP id 8247539; Tue, 18 Dec 2001 04:52:07 -0500 Received: from localhost ([127.0.0.1] helo=salmon.localnet) by localhost with esmtp (Exim 3.33 #1 (Debian)) id 16GGjo-00085m-00; Tue, 18 Dec 2001 04:40:40 -0500 From: Klee Dienes Reply-To: Klee Dienes To: Daniel Jacobowitz cc: Klee Dienes , gdb-patches@sources.redhat.com Subject: Re: [RFC] add 'save-breakpoints' command In-Reply-To: Your message of "Fri, 14 Dec 2001 15:48:51 EST." <20011214154851.A25801@nevyn.them.org> References: <20011214154851.A25801@nevyn.them.org> Date: Tue, 18 Dec 2001 01:42:00 -0000 Message-Id: X-SW-Source: 2001-12/txt/msg00435.txt.bz2 On Fri, Dec 14, 2001 at 03:44:03PM -0500, Klee Dienes wrote: >> We've been using a variant of this patch at Apple for a little over a >> year; it seems to be working. The test suite shows four additional >> unexpected successes when I run it with this patch, but I figure >> that's probably OK. > > That's odd; the testsuite is mostly (entirely?) compiled with debug > information. Which are they? Ah, you caught me. The 4 XPASSES were the result of mild version skew between the times I did the 'cvs update' on the two source trees; they were unrelated to the code changes. In fact, when I ran the test suite correctly I discovered a number of failed tests due to output changes (since now GDB is less aggressive about guessing the type about symbols without debugging information). After applying the following patch, I now get identical output from the test suite before- and after-patch. Index: gdb/testsuite/gdb.asm/asm-source.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.asm/asm-source.exp,v retrieving revision 1.14 diff -u -r1.14 asm-source.exp --- asm-source.exp 2001/12/13 13:42:19 1.14 +++ asm-source.exp 2001/12/18 09:19:04 @@ -206,10 +206,12 @@ "Make selected stack frame return now\?.*" "y" # See if we can look at a global variable -gdb_test "print globalvar" ".* = 11" "look at global variable" +gdb_test "print globalvar" ".* = (11|)" "look at global variable" +gdb_test "print (int) globalvar" ".* = 11" "look at global variable" # See if we can look at a static variable -gdb_test "print staticvar" ".* = 5" "look at static variable" +gdb_test "print staticvar" ".* = (5|)" "look at static variable" +gdb_test "print (int) staticvar" ".* = 5" "look at static variable" # See if we can look at a static function gdb_test "disassem foostatic" ".*:.*End of assembler dump." \ Index: gdb/testsuite/gdb.base/nodebug.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.base/nodebug.exp,v retrieving revision 1.2 diff -u -r1.2 nodebug.exp --- nodebug.exp 2001/03/06 08:21:50 1.2 +++ nodebug.exp 2001/12/18 09:19:04 @@ -77,23 +77,24 @@ gdb_test "whatis top" \ "(<(text variable|function), no debug info>|short \\(int\\)|short \\(\\))" if {!$gcc_compiled} then { setup_xfail "mips-sgi-irix6*" } - gdb_test "ptype top" "(short|int) \\((|void|int||, )\\)" + gdb_test "ptype top" "(short|int|) \\((|void|int||, )\\)" if {!$gcc_compiled} then { setup_xfail "mips-sgi-irix5*" } setup_xfail "mips-sgi-irix6*" gdb_test "p middle" \ - "\{(<(text variable|function), no debug info>|short \\(int\\)|short \\(\\))\} \[0-9a-fx]* " + "\{(<(text variable|function), no debug info>||short \\(int\\)|short \\(\\))\} \[0-9a-fx]* " if {!$gcc_compiled} then { setup_xfail "mips-sgi-irix5*" } setup_xfail "mips-sgi-irix6*" gdb_test "whatis middle" \ - "(<(text variable|function), no debug info>|short \\(int\\)|short \\(\\))" + "(<(text variable|function), no debug info>||short \\(int\\)|short \\(\\))" setup_xfail "mips-sgi-irix6*" - gdb_test "ptype middle" "(short|int) \\((|void|int||, )\\)" + gdb_test "ptype middle" "(short|int|) \\((|void|int||, )\\)" - gdb_test "p dataglobal" "= 3" + gdb_test "p dataglobal" "(= 3|)" + gdb_test "p (int) dataglobal" "= 3" gdb_test "whatis dataglobal" \ - "<(data variable|variable), no debug info>|int" - gdb_test "ptype dataglobal" "<(data variable|variable), no debug info>|int" + "<(data variable|variable), no debug info>||int" + gdb_test "ptype dataglobal" "<(data variable|variable), no debug info>||int" # The only symbol xcoff puts out for statics is for the TOC entry. # Possible, but hairy, for gdb to deal. Right now it doesn't, it @@ -102,37 +103,40 @@ setup_xfail "powerpc*-*-aix*" if {!$gcc_compiled} then { setup_xfail "hppa*-*-hpux*" } if {$gcc_compiled} then { setup_xfail "mips-sgi-irix6*" } - gdb_test "p datalocal" "= 4" + gdb_test "p datalocal" "(= 4|)" + gdb_test "p (int) datalocal" "4" setup_xfail "rs6000*-*-aix*" setup_xfail "powerpc*-*-aix*" if {!$gcc_compiled} then { setup_xfail "hppa*-*-hpux*" } if {$gcc_compiled} then { setup_xfail "mips-sgi-irix6*" } - gdb_test "whatis datalocal" "<(data variable|variable), no debug info>" + gdb_test "whatis datalocal" "<(data variable|variable), no debug info>|" setup_xfail "rs6000*-*-aix*" setup_xfail "powerpc*-*-aix*" if {!$gcc_compiled} then { setup_xfail "hppa*-*-hpux*" } if {$gcc_compiled} then { setup_xfail "mips-sgi-irix6*" } - gdb_test "ptype datalocal" "<(data variable|variable), no debug info>" + gdb_test "ptype datalocal" "<(data variable|variable), no debug info>|" - gdb_test "p bssglobal" "= 0" - gdb_test "whatis bssglobal" "<(data variable|variable), no debug info>|int" - gdb_test "ptype bssglobal" "<(data variable|variable), no debug info>|int" + gdb_test "p bssglobal" "(= 0|)" + gdb_test "p (int) bssglobal" "= 0" + gdb_test "whatis bssglobal" "<(data variable|variable), no debug info>||int" + gdb_test "ptype bssglobal" "<(data variable|variable), no debug info>||int" setup_xfail "rs6000*-*-aix*" setup_xfail "powerpc*-*-aix*" if {!$gcc_compiled} then { setup_xfail "hppa*-*-hpux*" } if {$gcc_compiled} then { setup_xfail "mips-sgi-irix6*" } - gdb_test "p bsslocal" "= 0" + gdb_test "p bsslocal" "(= 0|)" + gdb_test "p (int) bsslocal" "= 0" setup_xfail "rs6000*-*-aix*" setup_xfail "powerpc*-*-aix*" if {!$gcc_compiled} then { setup_xfail "hppa*-*-hpux*" } if {$gcc_compiled} then { setup_xfail "mips-sgi-irix6*" } - gdb_test "whatis bsslocal" "<(data variable|variable), no debug info>" + gdb_test "whatis bsslocal" "<(data variable|variable), no debug info>|" setup_xfail "rs6000*-*-aix*" setup_xfail "powerpc*-*-aix*" if {!$gcc_compiled} then { setup_xfail "hppa*-*-hpux*" } if {$gcc_compiled} then { setup_xfail "mips-sgi-irix6*" } - gdb_test "ptype bsslocal" "<(data variable|variable), no debug info>" + gdb_test "ptype bsslocal" "<(data variable|variable), no debug info>|" if {$gcc_compiled} then { setup_xfail "mips-sgi-irix6*" } gdb_test "backtrace 10" "#0.*inner.*#1.*middle.*#2.*top.*#3.*main.*" \ @@ -167,7 +171,9 @@ # We need to up this because this can be really slow on some boards. # (malloc() is called as part of the test). set timeout 60; - gdb_test {p/c array_index("abcdef",2)} " = 99 'c'" + gdb_test {p/c (int) array_index("abcdef",2)} " = 99 'c'" + gdb_test {p/c array_index("abcdef",2)} \ + "Unable to call function .* no return type information available.*" } }