From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14435 invoked by alias); 3 Feb 2007 05:31:21 -0000 Received: (qmail 14418 invoked by uid 22791); 3 Feb 2007 05:31:17 -0000 X-Spam-Check-By: sourceware.org Received: from viper.snap.net.nz (HELO viper.snap.net.nz) (202.37.101.8) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 03 Feb 2007 05:31:11 +0000 Received: from kahikatea.snap.net.nz (250.63.255.123.dynamic.snap.net.nz [123.255.63.250]) by viper.snap.net.nz (Postfix) with ESMTP id 45CAF2F458A; Sat, 3 Feb 2007 18:31:07 +1300 (NZDT) Received: by kahikatea.snap.net.nz (Postfix, from userid 500) id 644464F71C; Sat, 3 Feb 2007 18:31:04 +1300 (NZDT) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17860.7702.941611.6892@kahikatea.snap.net.nz> Date: Sat, 03 Feb 2007 05:31:00 -0000 To: Daniel Jacobowitz Cc: Vladimir Prus , gdb-patches@sources.redhat.com Subject: Re: MI: type prefixes for values [PATCH] In-Reply-To: <20060515165354.GG28924@nevyn.them.org> References: <17427.54333.236860.258115@kahikatea.snap.net.nz> <20060317191207.GA19068@nevyn.them.org> <20060324030332.GB2853@nevyn.them.org> <20060324202056.GA26748@nevyn.them.org> <20060505192535.GM31029@nevyn.them.org> <20060515165354.GG28924@nevyn.them.org> X-Mailer: VM 7.19 under Emacs 22.0.93.5 X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-02/txt/msg00028.txt.bz2 On Mon, 15 May 2006 12:53:54 -0400 at Daniel Jacobowitz writes: > > > This patch doesn't touch the issue of type prefixes, leaving that to > > > deal with separately. > > > > If I'm reading this right, I have since realised that my patch to use > > common_val_print was no good because it only prints address and not values > > for things like references > > Vladimir noticed that there's a deref_ref argument to common_val_print; > you passed zero, but if you pass one instead, it ought to do the right > thing. > > Would you like to try the patch again with that change? Here's a patch which got a bit lost in the mists of time. No regressions. -- Nick http://www.inet.net.nz/~nickrob 2007-02-03 Nick Roberts * mi/mi-cmd-stack.c (list_args_or_locals): Use common_val_print instead of print_variable_value to print values. *** mi-cmd-stack.c 10 Jan 2007 11:56:57 +1300 1.32 --- mi-cmd-stack.c 03 Feb 2007 18:25:42 +1300 *************** list_args_or_locals (int locals, int val *** 275,281 **** { struct cleanup *cleanup_tuple = NULL; struct symbol *sym2; ! if (values != PRINT_NO_VALUES) cleanup_tuple = make_cleanup_ui_out_tuple_begin_end (uiout, NULL); ui_out_field_string (uiout, "name", SYMBOL_PRINT_NAME (sym)); --- 275,282 ---- { struct cleanup *cleanup_tuple = NULL; struct symbol *sym2; ! struct value *val; ! if (values != PRINT_NO_VALUES) cleanup_tuple = make_cleanup_ui_out_tuple_begin_end (uiout, NULL); ui_out_field_string (uiout, "name", SYMBOL_PRINT_NAME (sym)); *************** list_args_or_locals (int locals, int val *** 297,309 **** && TYPE_CODE (type) != TYPE_CODE_STRUCT && TYPE_CODE (type) != TYPE_CODE_UNION) { ! print_variable_value (sym2, fi, stb->stream); ui_out_field_stream (uiout, "value", stb); } do_cleanups (cleanup_tuple); break; case PRINT_ALL_VALUES: ! print_variable_value (sym2, fi, stb->stream); ui_out_field_stream (uiout, "value", stb); do_cleanups (cleanup_tuple); break; --- 298,314 ---- && TYPE_CODE (type) != TYPE_CODE_STRUCT && TYPE_CODE (type) != TYPE_CODE_UNION) { ! val = read_var_value (sym2, fi); ! common_val_print ! (val, stb->stream, 0, 1, 0, Val_no_prettyprint); ui_out_field_stream (uiout, "value", stb); } do_cleanups (cleanup_tuple); break; case PRINT_ALL_VALUES: ! val = read_var_value (sym2, fi); ! common_val_print ! (val, stb->stream, 0, 1, 0, Val_no_prettyprint); ui_out_field_stream (uiout, "value", stb); do_cleanups (cleanup_tuple); break;