From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19892 invoked by alias); 6 May 2002 07:57:19 -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 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) Message-ID: <3CD63758.EA3E0F1F@hpfrcu81.france.hp.com> Date: Mon, 06 May 2002 00:57:00 -0000 From: phi 4369 X-Accept-Language: en MIME-Version: 1.0 To: gdb@sources.redhat.com Subject: consult before asking ER. Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2002-05/txt/msg00041.txt.bz2 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