From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28363 invoked by alias); 9 Aug 2011 02:57:52 -0000 Received: (qmail 28355 invoked by uid 22791); 9 Aug 2011 02:57:52 -0000 X-SWARE-Spam-Status: No, hits=-6.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 09 Aug 2011 02:57:33 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p792vWs6006558 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 8 Aug 2011 22:57:32 -0400 Received: from psique ([10.3.112.5]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p792vQK5006750; Mon, 8 Aug 2011 22:57:29 -0400 From: Sergio Durigan Junior To: John Lindal Cc: gdb-patches@sourceware.org Subject: Re: Allow -data-disassemble to run with only -s option References: <587BFD3C-0540-49FA-87F9-89CBBF2FF010@newplanetsoftware.com> <3DBE6912-1DE6-4B8B-8353-96855B07268E@newplanetsoftware.com> Date: Tue, 09 Aug 2011 02:57:00 -0000 In-Reply-To: <3DBE6912-1DE6-4B8B-8353-96855B07268E@newplanetsoftware.com> (John Lindal's message of "Mon, 8 Aug 2011 18:00:31 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: 2011-08/txt/msg00168.txt.bz2 Hi John, Thanks for your work on this. Some comments below. John Lindal writes: >> A test case would be nice. > > Without the patch, you have to specify both -s and -e. With the > patch, you can do this: > > -data-disassemble -s main What Tom meant is that you should write a testcase for it. See the directory gdb/testsuite for examples. > 2011-08-06 John Lindal > > * mi-cmd-disas.c: Accept only -s option. Automatically set end to end > of function, or complain that start address is not part of any function. I think those lines are too long. We try to limit the lines on 80 characteres (some people set a hard limit at 72, IIRC). > + if (!line_seen && !file_seen && !num_seen && start_seen && !end_seen) Same issue here. > + if (find_pc_partial_function (low, &ignore_name, &ignore_low, &high) == 0) Same issue here. > *** doc/gdb.texinfo-orig 2011-08-08 17:51:19.000000000 -0700 > --- doc/gdb.texinfo 2011-08-08 17:55:37.000000000 -0700 > ! is the end address. If only @var{start-addr} is specified, then @var{end-addr} is set to the end of the function containing @var{start-addr}. Same issue here. Thanks, Sergio.