From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23352 invoked by alias); 27 Mar 2009 17:19:58 -0000 Received: (qmail 23341 invoked by uid 22791); 27 Mar 2009 17:19:56 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 27 Mar 2009 17:19:52 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n2RHJS1a021214; Fri, 27 Mar 2009 13:19:28 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n2RHJKKn025623; Fri, 27 Mar 2009 13:19:20 -0400 Received: from opsy.redhat.com (vpn-14-142.rdu.redhat.com [10.11.14.142]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n2RHJROS009413; Fri, 27 Mar 2009 13:19:27 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id CB5D737814D; Fri, 27 Mar 2009 11:19:25 -0600 (MDT) To: Joel Brobecker Cc: gdb-patches@sourceware.org Subject: Re: [RFC] Change "set print frame-arguments"'s default to scalars References: <20090324212730.GU9472@adacore.com> From: Tom Tromey Reply-To: tromey@redhat.com Date: Fri, 27 Mar 2009 17:34:00 -0000 In-Reply-To: <20090324212730.GU9472@adacore.com> (Joel Brobecker's message of "Tue\, 24 Mar 2009 14\:27\:30 -0700") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: 2009-03/txt/msg00635.txt.bz2 >>>>> "Joel" == Joel Brobecker writes: Joel> * stack.c (print_frame_arguments): Set initial value to "scalars". I applied this to the Python branch, along with a fix to make pretty-printers respect this parameter. I needed the appended to make the test suite clean. Also, Jan had the excellent idea that we could limit the output (truncate it after some number of characters and add "...") for a given value, rather than have the selection be all-or-none. This could easily be done by making a new kind of output stream, and then using it when printing a frame in stack.c. Let me know what you think of this; I can implement it if people think it is a good idea. Tom 2009-03-27 Tom Tromey * gdb.base/funcargs.exp: Set print frame-arguments to "all". * gdb.base/call-ar-st.exp: Set print frame-arguments to "all". * gdb.ada/ref_param.exp: Set print frame-arguments to "all". * gdb.ada/lang_switch.exp: Set print frame-arguments to "all". diff --git a/gdb/testsuite/gdb.ada/lang_switch.exp b/gdb/testsuite/gdb.ada/lang_switch.exp index 45a4e53..3fc3584 100644 --- a/gdb/testsuite/gdb.ada/lang_switch.exp +++ b/gdb/testsuite/gdb.ada/lang_switch.exp @@ -41,6 +41,8 @@ gdb_load ${binfile} set bp_location [gdb_get_line_number "STOP" ${testdir}/foo.c] runto "foo.c:$bp_location" +gdb_test "set print frame-arguments all" "" + # Make sure that the language is switched to Ada for the second frame # by checking the string parameter. gdb_test "bt" \ diff --git a/gdb/testsuite/gdb.ada/ref_param.exp b/gdb/testsuite/gdb.ada/ref_param.exp index 5325dd2..4d49296 100644 --- a/gdb/testsuite/gdb.ada/ref_param.exp +++ b/gdb/testsuite/gdb.ada/ref_param.exp @@ -39,6 +39,8 @@ if ![runto call_me] then { return } +gdb_test "set print frame-arguments all" "" + set expected_d "\\(one => 1, two => 2, three => 3, four => 4, five => 5, six => 6\\)" gdb_test "frame" \ "#0\[ \t\]*pck\\.call_me \\(d=${expected_d}\\).*" \ diff --git a/gdb/testsuite/gdb.base/call-ar-st.exp b/gdb/testsuite/gdb.base/call-ar-st.exp index b88ff02..a058f67 100644 --- a/gdb/testsuite/gdb.base/call-ar-st.exp +++ b/gdb/testsuite/gdb.base/call-ar-st.exp @@ -332,6 +332,7 @@ gdb_expect { gdb_test "break sum_array_print" \ ".*Breakpoint ${decimal}: file .*call-ar-st.c, line.*" \ "set breakpoint in sum_array_print" +gdb_test "set print frame-arguments all" "" gdb_test "continue" \ ".*Breakpoint ${decimal}, sum_array_print \\(seed=10, linked_list1=.next_index = .1, 2, 3, 4, 5, 6, 7, 8, 9, 10., values = .4, 6, 8, 10, 12, 14, 16, 18, 20, 22., head = 0., linked_list2=.next_index = .1, 2, 3, 4, 5, 6, 7, 8, 9, 10., values = .8, 10, 12, 14, 16, 18, 20, 22, 24, 26., head = 0., linked_list3=.next_index = .1, 2, 3, 4, 5, 6, 7, 8, 9, 10., values = .10, 12, 14, 16, 18, 20, 22, 24, 26, 28., head = 0., linked_list4=.next_index = .1, 2, 3, 4, 5, 6, 7, 8, 9, 10., values = .20, 22, 24, 26, 28, 30, 32, 34, 36, 38., head = 0.\\) at .*call-ar-st.c:1105\[ \t\n\r\]+1105.*printf\\(.Sum of 4 arrays, by element \\(add in seed as well\\).*\\);.*" \ "check args of sum_array_print" diff --git a/gdb/testsuite/gdb.base/funcargs.exp b/gdb/testsuite/gdb.base/funcargs.exp index 1cf3e9d..037f0a0 100644 --- a/gdb/testsuite/gdb.base/funcargs.exp +++ b/gdb/testsuite/gdb.base/funcargs.exp @@ -1194,6 +1194,8 @@ gdb_expect { # Perform tests +gdb_test "set print frame-arguments all" "" + integral_args funcargs_reload unsigned_integral_args