From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8821 invoked by alias); 20 Nov 2003 18:07:23 -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 8814 invoked from network); 20 Nov 2003 18:07:22 -0000 Received: from unknown (HELO localhost.redhat.com) (207.219.125.105) by sources.redhat.com with SMTP; 20 Nov 2003 18:07:22 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 2D8832B8F for ; Thu, 20 Nov 2003 13:07:18 -0500 (EST) Message-ID: <3FBD02D6.7060702@redhat.com> Date: Thu, 20 Nov 2003 18:07:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030820 X-Accept-Language: en-us, en MIME-Version: 1.0 To: gdb-patches@sources.redhat.com Subject: [commit] Recover from struct-return internal errors Content-Type: multipart/mixed; boundary="------------070207000502010009020104" X-SW-Source: 2003-11/txt/msg00423.txt.bz2 This is a multi-part message in MIME format. --------------070207000502010009020104 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 780 I've committed the attached. It tries to get the structs.exp test out of a hole that that the amd64 GDB appears to be digging for it: > (gdb) PASS: gdb.base/structs.exp: ptype foo1; structs-tc > p/c fun1() > /home/cygnus/cagney/GDB/src/gdb/x86-64-tdep.c:438: internal-error: classify_argument: unknown argument type > A problem internal to GDB has been detected, > further debugging may prove unreliable. > Quit this debugging session? (y or n) FAIL: gdb.base/structs.exp: p/c fun(); call 1 structs-tc (GDB internal error) > n > /home/cygnus/cagney/GDB/src/gdb/x86-64-tdep.c:438: internal-error: classify_argument: unknown argument type > A problem internal to GDB has been detected, > further debugging may prove unreliable. > Create a core file of GDB? (y or n) n Andrew --------------070207000502010009020104 Content-Type: text/plain; name="diffs" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="diffs" Content-length: 2615 2003-11-20 Andrew Cagney * gdb.base/structs.exp: Handle and recover from internal errors. Replace "foo${n}" with "foo" in test messages. Index: gdb.base/structs.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.base/structs.exp,v retrieving revision 1.8 diff -u -r1.8 structs.exp --- gdb.base/structs.exp 20 Nov 2003 17:11:55 -0000 1.8 +++ gdb.base/structs.exp 20 Nov 2003 18:01:41 -0000 @@ -321,11 +321,22 @@ -re "L[expr ${n} + 1] *= fun[expr ${n} + 1].*${gdb_prompt} $" { pass "${test}" } + -re "A problem internal to GDB has been detected" { + fail "${test} (GDB internal error 2)" + gdb_internal_error_resync + } + -re "${gdb_prompt} $" { + fail "${test} (wrong line info)" + } timeout { fail "${test} (timeout 2)" } } } + -re "A problem internal to GDB has been detected" { + fail "${test} (GDB internal error 1)" + gdb_internal_error_resync + } -re "${gdb_prompt} $" { fail "${test} (no query)" } @@ -364,6 +375,10 @@ fail "${test}" } } + -re "A problem internal to GDB has been detected" { + fail "${test} (GDB internal error)" + gdb_internal_error_resync + } -re "${gdb_prompt} $" { # Garbage returned, garbage printed fail "${test}" @@ -395,7 +410,7 @@ # Finish the function, set 'finish_value_unknown" to non-empty if the # return-value was not found. send_gdb "finish\n" - set test "finish foo${n}; ${tests}" + set test "finish foo; ${tests}" set finish_value_unknown 0 gdb_expect { -re "Value returned is .*${gdb_prompt} $" { @@ -406,6 +421,10 @@ set finish_value_unknown 1 pass "${test}" } + -re "A problem internal to GDB has been detected" { + fail "${test} (GDB internal error)" + gdb_internal_error_resync + } -re ".*${gdb_prompt} $" { # Garbage returned fail "${test}" @@ -419,7 +438,7 @@ # "p/c". If no return value was found, the 'Z' from the previous # check that the variable was cleared, is printed. send_gdb "p/c\n" - set test "value foo${n} finished; ${tests}" + set test "value foo finished; ${tests}" setup_kfails structs-*tld* i686-*-* gdb/1447 gdb_expect { -re "[foo ${n}]\[\r\n\]+${gdb_prompt} $" { @@ -440,6 +459,10 @@ # know the location of the return-value. fail "${test}" } + } + -re "A problem internal to GDB has been detected" { + fail "${test} (GDB internal error)" + gdb_internal_error_resync } -re ".*${gdb_prompt} $" { # Garbage returned --------------070207000502010009020104--