From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25234 invoked by alias); 6 Apr 2005 21:24:13 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 25210 invoked from network); 6 Apr 2005 21:24:06 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 6 Apr 2005 21:24:06 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id j36LO6wc006615 for ; Wed, 6 Apr 2005 17:24:06 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id j36LO6O23327 for ; Wed, 6 Apr 2005 17:24:06 -0400 Received: from localhost.localdomain (vpn50-19.rdu.redhat.com [172.16.50.19]) by pobox.corp.redhat.com (8.12.8/8.12.8) with ESMTP id j36LO5ec027148 for ; Wed, 6 Apr 2005 17:24:05 -0400 Received: from ironwood.lan (ironwood.lan [192.168.64.8]) by localhost.localdomain (8.12.11/8.12.10) with ESMTP id j36LO0vi001803 for ; Wed, 6 Apr 2005 14:24:00 -0700 Date: Wed, 06 Apr 2005 21:24:00 -0000 From: Kevin Buettner To: gdb@sources.redhat.com Subject: Redundancy in remote.c packet config messages? Message-ID: <20050406142359.0c61c694@ironwood.lan> Organization: Red Hat Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-SW-Source: 2005-04/txt/msg00041.txt.bz2 While working on a recently posted patch to eliminate deprecated_show_value_hack() from remote.c, I began to wonder if there's some redundancy in the messages showing the state of the machinery used for enabling and disabling the various remote protocol packets. Consider "show remote p-packet": (gdb) show remote p-packet Current use of remote protocol `p' (fetch-register) is auto. Support for remote protocol `p' (fetch-register) packet is auto-detected, currently unknown. The first line (beginning with "Current") says that the value of the p-packet "auto boolean" variable is auto. The second and (subsequent) line says the same thing as well as providing the detection status. If you examine the code involved, the "auto" in the first line and the "auto-detected" in the second line were both determined by examining the same variable. (Though you do have to wade through a bit of code to figure this out.) If I'm not mistaken, we have a similar situation when the packet has been enabled and disabled by the user: (gdb) set remote p-packet on (gdb) show remote p-packet Current use of remote protocol `p' (fetch-register) is on. Support for remote protocol `p' (fetch-register) packet is currently enabled. (gdb) set remote p-packet off (gdb) show remote p-packet Current use of remote protocol `p' (fetch-register) is off. Support for remote protocol `p' (fetch-register) packet is currently disabled. Does anyone know of a case where the first line provides non-redundant information? If not, I'd like to prepare a patch which eliminates it. That is, I would like the above session to instead show the following output: (gdb) show remote p-packet Support for remote protocol `p' (fetch-register) packet is auto-detected, currently unknown. (gdb) set remote p-packet on (gdb) show remote p-packet Support for remote protocol `p' (fetch-register) packet is currently enabled. (gdb) set remote p-packet off (gdb) show remote p-packet Support for remote protocol `p' (fetch-register) packet is currently disabled. Kevin