From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32145 invoked by alias); 31 Jul 2005 22:11:21 -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 32127 invoked by uid 22791); 31 Jul 2005 22:11:16 -0000 Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Sun, 31 Jul 2005 22:11:16 +0000 Received: from drow by nevyn.them.org with local (Exim 4.52) id 1DzM1Z-0003If-CV; Sun, 31 Jul 2005 18:11:13 -0400 Date: Sun, 31 Jul 2005 22:11:00 -0000 From: Daniel Jacobowitz To: Nick Roberts Cc: Mark Kettenis , gdb-patches@sources.redhat.com Subject: Re: PATCH: tests for MI commands Message-ID: <20050731221113.GC30901@nevyn.them.org> Mail-Followup-To: Nick Roberts , Mark Kettenis , gdb-patches@sources.redhat.com References: <20050724211946.GB798@nevyn.them.org> <17126.51233.887175.402254@farnswood.snap.net.nz> <20050727002721.GA27261@nevyn.them.org> <17126.62115.642102.742744@farnswood.snap.net.nz> <20050727035503.GA30670@nevyn.them.org> <17127.29797.456624.592127@farnswood.snap.net.nz> <200507272103.j6RL3HYf022581@elgar.sibelius.xs4all.nl> <17128.2540.73355.406922@farnswood.snap.net.nz> <20050728002057.GA25134@nevyn.them.org> <17128.14238.713213.954375@farnswood.snap.net.nz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <17128.14238.713213.954375@farnswood.snap.net.nz> User-Agent: Mutt/1.5.8i X-SW-Source: 2005-07/txt/msg00243.txt.bz2 Again, sorry for not getting back to you on Thursday. On Thu, Jul 28, 2005 at 01:40:46PM +1200, Nick Roberts wrote: > I never intended to leave things broken. You have asked me to fix the > failures, and I will, but I'm not sure if that means submit further patches to > the mailing list or commit appropriate fixes. Based on Mark Kettenis' e-mail, Submit patches, please. > I attach a simple fix for mi-var-child.exp. Does it work in your case? I > 2005-07-28 Nick Roberts > > * gdb.mi/mi-var-child.exp: Allow struct_declarations.character to be > uninitialized. First of all, it won't work. You added: value=\"0 '\\\\\\\\$decimal'\" which still has 0 in it :-) Second, I get a value of 0 here, but the test still fails. func_ptr_struct and func_ptr_ptr aren't initialized either. Chasing uninitialized members is going to leave the tests script a bit of a mess. Initializing the whole structure proved to be a bit of a pain - these tests are ridiculously tricky to edit. But here it is. Tested on i686-pc-linux-gnu and committed. I hope this will be more useful if we add any additional value-related tests. -- Daniel Jacobowitz CodeSourcery, LLC 2005-07-31 Daniel Jacobowitz * gdb.mi/mi-var-child.c (do_children_tests): Initialize struct_declarations. * gdb.mi/mi-var-child.exp: Step over the initialization of struct_declarations. Index: gdb.mi/mi-var-child.c =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-var-child.c,v retrieving revision 1.1 diff -u -p -r1.1 mi-var-child.c --- gdb.mi/mi-var-child.c 31 Jul 2005 21:24:25 -0000 1.1 +++ gdb.mi/mi-var-child.c 31 Jul 2005 22:04:14 -0000 @@ -208,6 +208,7 @@ do_children_tests (void) int bar; struct _struct_decl struct_declarations; + memset (&struct_declarations, 0, sizeof (struct_declarations)); weird = &struct_declarations; struct_declarations.integer = 123; Index: gdb.mi/mi-var-child.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-var-child.exp,v retrieving revision 1.19 diff -u -p -r1.19 mi-var-child.exp --- gdb.mi/mi-var-child.exp 31 Jul 2005 21:24:25 -0000 1.19 +++ gdb.mi/mi-var-child.exp 31 Jul 2005 22:04:14 -0000 @@ -47,6 +47,10 @@ mi_runto do_children_tests # # ##### ##### +# Step past the initialization of struct_declarations. +set line_weird [gdb_get_line_number "weird = &struct_declarations;"] +mi_execute_to "exec-next" "end-stepping-range" do_children_tests {} ".*${srcfile}" \ + [expr $line_weird] {} "step \$line_weird" # Test: c_variable-4.2 # Desc: create variable "struct_declarations"