From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18917 invoked by alias); 27 Sep 2002 00:28:42 -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 18908 invoked from network); 27 Sep 2002 00:28:41 -0000 Received: from unknown (HELO localhost.redhat.com) (216.138.202.10) by sources.redhat.com with SMTP; 27 Sep 2002 00:28:41 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 32C803E0E; Thu, 26 Sep 2002 20:28:42 -0400 (EDT) Message-ID: <3D93A63A.9060908@redhat.com> Date: Thu, 26 Sep 2002 17:28:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.0) Gecko/20020824 X-Accept-Language: en-us, en MIME-Version: 1.0 To: phi 4369 Cc: gdb@sources.redhat.com, Fernando Nasser Subject: Re: consult before asking ER. References: <3CD63758.EA3E0F1F@hpfrcu81.france.hp.com> Content-Type: multipart/mixed; boundary="------------070201000108070609080304" X-SW-Source: 2002-09/txt/msg00468.txt.bz2 This is a multi-part message in MIME format. --------------070201000108070609080304 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 50 Fernando, This is really a CLI question. Andrew --------------070201000108070609080304 Content-Type: message/rfc822; name="mailbox-message://ac131313@movemail/fsf/gdb/misc#6985" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="mailbox-message://ac131313@movemail/fsf/gdb/misc#6985" Content-length: 5280 X-Mozilla-Status2: 00000000 Return-Path: Delivered-To: ac131313@localhost.redhat.com Received: from localhost (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id CEEAA3DC8 for ; Mon, 6 May 2002 09:59:57 -0400 (EDT) Received: from pop.cygnus.com by localhost with IMAP (fetchmail-5.9.6) for ac131313@localhost (single-drop); Mon, 06 May 2002 09:59:57 -0400 (EDT) Received: from cygnus-mx.sfbay.redhat.com (cygnus-mx.sfbay.redhat.com [172.16.27.16]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id AAA16649 for ; Mon, 6 May 2002 00:57:38 -0700 (PDT) Received: from sources.redhat.com (sources.redhat.com [209.249.29.67]) by cygnus-mx.sfbay.redhat.com (8.11.6/8.11.6) with SMTP id g4605kk21189 for ; Sun, 5 May 2002 17:05:46 -0700 Received: (qmail 19892 invoked by alias); 6 May 2002 07:57:19 -0000 Received: (qmail 19864 invoked from network); 6 May 2002 07:57:17 -0000 Received: from unknown (HELO bbnrel4.net.external.hp.com) (155.208.254.68) by sources.redhat.com with SMTP; 6 May 2002 07:57:17 -0000 Received: from iws1pb05.france.hp.com (unknown [15.124.72.14]) by bbnrel4.net.external.hp.com (Postfix) with ESMTP id 6EF3AB06 for ; Mon, 6 May 2002 09:57:15 +0200 (METDST) Received: from hpfrcu81.france.hp.com (localhost [127.0.0.1]) by iws1pb05.france.hp.com with ESMTP (8.8.6 (PHNE_17190)/8.7.3 SMKit7.01) id JAA01199; Mon, 6 May 2002 09:57:12 +0200 (METDST) Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Delivered-To: mailing list gdb@sources.redhat.com Message-ID: <3CD63758.EA3E0F1F@hpfrcu81.france.hp.com> Date: Mon, 06 May 2002 09:57:12 +0200 From: phi 4369 X-Accept-Language: en MIME-Version: 1.0 To: gdb@sources.redhat.com Subject: consult before asking ER. Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii Content-length: 2942 Hi All, I'd like to consult with you gdb sources guru before asking for an enhancement request, as I don't know if my request is valid or not. I'd like to define 'user defined commands' called here user-functions for which the name could be case sensitive. The reason for this are multiple but one important for me is the ability to define a set of function that mimic an older debuger I use to use (namely xdb). In this old debuger 's' and 'S' are not the same, and defining 'S' is vital for me :-) In top.c I see /* If the rest of the commands will be case insensitive, this one should behave in the same manner. */ for (tem = comname; *tem; tem++) if (isupper (*tem)) *tem = tolower (*tem); This comment 'may be' mean the intent was to have the define case sensitive based on debug language context, but sounds to despotically always downcase no matter the 'if' sez. I did try if(case_sensitivity!=case_sensitive_on) <---- Added line for (tem = comname; *tem; tem++) if (isupper (*tem)) *tem = tolower (*tem); And this is enough to get the user-function case sensitive. So my 1st question is: ---------------------- Does this little patch could be ledgitly be incorporated into the mainstream or is there many side effect I don't envision? Note that would make case non-sensitive context like fortran un-able to define 'S' and 's' but I admit I don't care. If we do care, we should do if(1) instead of if(case_sensitivity!=case_sensitive_on) ==================================================================== Another one vital for me is teh ability to 'omit' args for user-function, for instance I would like to define a function 'c' (like xdb 'c') like this define c if $arg0 until $arg0 else continue end end Doing this right now and issuing the gdb command 'c' gives (gdb) c Missing argument 0 in user function. This is anoying as doing variable args function is a command practice in many languages. In setup_user_args::top.c ..... #if 0 <------------ commented out code if (p == NULL) return old_chain; #endif while (p&&*p) { ..... } while(arg_counta[arg_count].len = 1; user_args->a[arg_count].arg = (char *)xmalloc(2); user_args->a[arg_count].arg[0]='0';user_args->a[arg_count].arg[1]=0; arg_count++; user_args->count++; } return old_chain; } This tiny patch alow missing args to be setup with value "0" that is pretty acceptable, unless you se undesirable side effect. The main inconsistant things is that we don't distinguish true given '0' and unset args, but I don't thinks it is a problem. ======================================================================= Let me know if I should fill an enhancement request if you think this are ledgit requests. Thanx in advance Phi -- mailto:Philippe_Benard@hp.com WTEC HP-UX kernel debugging tools --------------070201000108070609080304--