From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10415 invoked by alias); 6 Jan 2004 01: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 10408 invoked from network); 6 Jan 2004 01:07:22 -0000 Received: from unknown (HELO localhost.redhat.com) (66.30.197.194) by sources.redhat.com with SMTP; 6 Jan 2004 01:07:22 -0000 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id C1F492B8F; Mon, 5 Jan 2004 20:07:22 -0500 (EST) Message-ID: <3FFA0A4A.1020908@gnu.org> Date: Tue, 06 Jan 2004 01:07:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030820 MIME-Version: 1.0 To: Nick Roberts Cc: gdb-patches@sources.redhat.com Subject: Re: [PATCH: gdb/mi] -stack-list-locals testcase References: <16319.64137.458928.417189@nick.uklinux.net> <3FC3F85F.8050007@gnu.org> <16332.423.456414.834703@nick.uklinux.net> <16341.13503.256676.933542@nick.uklinux.net> <3FD75E64.1020508@gnu.org> <16346.10340.488095.107663@nick.uklinux.net> <16351.48550.8915.678388@nick.uklinux.net> <3FF9DA74.7000304@gnu.org> <16377.64533.42018.863120@nick.uklinux.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-01/txt/msg00126.txt.bz2 > > Nick, just the testcase is missing. Suggest tweaking "mi-stack.exp" > > (you do not need to tweak mi[12]-stack.exp since they test older protocols). > > mi-stack.exp had three fails to start with. Replacing line=\"7\" with > line=\"8\" and "-exec-next 3" with "-exec-next 4" removed them. > > I have added one simple test for `-stack-list-locals 2' that seems to > work. It does not test complex data types but this would require changing > basics.c, which is probably not worth it. > > Andrew, if you tell me that this patch does the right thing, then I'll do one > for -var-list-children. > > Nick > > > *** mi-stack.exp.~1.10.~ 2002-11-05 15:43:18.000000000 +0000 > --- mi-stack.exp 2004-01-05 23:38:27.000000000 +0000 > *************** > *** 57,63 **** > # -stack-list-frames 1 3 > > mi_gdb_test "231-stack-list-frames" \ > ! "231\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"8\"\},frame=\{level=\"1\",addr=\"$hex\",func=\"callee3\",.*\},frame=\{level=\"2\",addr=\"$hex\",func=\"callee2\",.*\},frame=\{level=\"3\",addr=\"$hex\",func=\"callee1\",.*\},frame=\{level=\"4\",addr=\"$hex\",func=\"main\",.*\}\\\]" \ > "stack frame listing" > mi_gdb_test "232-stack-list-frames 1 1" \ > "232\\^done,stack=\\\[frame=\{level=\"1\",addr=\"$hex\",func=\"callee3\",.*\}\\\]" \ > --- 57,63 ---- > # -stack-list-frames 1 3 > > mi_gdb_test "231-stack-list-frames" \ > ! "231\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"7\"\},frame=\{level=\"1\",addr=\"$hex\",func=\"callee3\",.*\},frame=\{level=\"2\",addr=\"$hex\",func=\"callee2\",.*\},frame=\{level=\"3\",addr=\"$hex\",func=\"callee1\",.*\},frame=\{level=\"4\",addr=\"$hex\",func=\"main\",.*\}\\\]" \ > "stack frame listing" > mi_gdb_test "232-stack-list-frames 1 1" \ > "232\\^done,stack=\\\[frame=\{level=\"1\",addr=\"$hex\",func=\"callee3\",.*\}\\\]" \ This test (and the rest of mi-stack.exp) is passing on a PPC/NetBSD gcc 2.96 stabs system. We'll need to look at it more carefully (or check michaelc's test matrix) to see why there's a failure. MI is more strict with its test results. > *************** > *** 156,162 **** > "stack locals listing 0" > > # step until A, B, C, have some reasonable values. > ! send_gdb "-exec-next 3\n" > gdb_expect { > -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"callee4\",args=\\\[\\\],file=\".*basics.c\",line=\"13\"\}\r\n$mi_gdb_prompt$" { > pass "next's in callee4" > --- 156,162 ---- > "stack locals listing 0" > > # step until A, B, C, have some reasonable values. > ! send_gdb "-exec-next 4\n" > gdb_expect { > -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"callee4\",args=\\\[\\\],file=\".*basics.c\",line=\"13\"\}\r\n$mi_gdb_prompt$" { > pass "next's in callee4" > *************** > *** 168,173 **** > --- 168,177 ---- > "232\\^done,locals=\\\[\{name=\"A\",value=\"1\"\},\{name=\"B\",value=\"2\"\},\{name=\"C\",value=\"3\"\}\\\]" \ > "stack locals listing 1" > > + mi_gdb_test "232-stack-list-locals 2" \ > + "232\\^done,locals=\\\[\{name=\"A\",type=\"int\",value=\"1\"\},\{name=\"B\",type=\"int\",value=\"2\"\},\{name=\"C\",type=\"int\",value=\"3\"\}\\\]" \ > + "stack locals listing 2" > + Yes, just like that. Andrew > mi_gdb_test "234-stack-list-locals" \ > "234\\^error,msg=\"mi_cmd_stack_list_locals: Usage.*PRINT_VALUES.*\"" \ > "stack locals listing wrong" >