* consult before asking ER.
@ 2002-05-06 0:57 phi 4369
2002-05-06 1:07 ` phi 4369
2002-09-26 17:28 ` Andrew Cagney
0 siblings, 2 replies; 3+ messages in thread
From: phi 4369 @ 2002-05-06 0:57 UTC (permalink / raw)
To: gdb
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_count<MAXUSERARGS) <------- Added code after the loop
{ user_args->a[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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: consult before asking ER.
2002-05-06 0:57 consult before asking ER phi 4369
@ 2002-05-06 1:07 ` phi 4369
2002-09-26 17:28 ` Andrew Cagney
1 sibling, 0 replies; 3+ messages in thread
From: phi 4369 @ 2002-05-06 1:07 UTC (permalink / raw)
To: gdb
phi 4369 wrote:
>
> 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)
You all corected I meant 'if(0)' (if dislexia)
Cheers,
Phi
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: consult before asking ER.
2002-05-06 0:57 consult before asking ER phi 4369
2002-05-06 1:07 ` phi 4369
@ 2002-09-26 17:28 ` Andrew Cagney
1 sibling, 0 replies; 3+ messages in thread
From: Andrew Cagney @ 2002-09-26 17:28 UTC (permalink / raw)
To: phi 4369; +Cc: gdb, Fernando Nasser
[-- Attachment #1: Type: text/plain, Size: 50 bytes --]
Fernando,
This is really a CLI question.
Andrew
[-- Attachment #2: mailbox-message://ac131313@movemail/fsf/gdb/misc#6985 --]
[-- Type: message/rfc822, Size: 5301 bytes --]
From: phi 4369 <phi@hpfrcu81.france.hp.com>
To: gdb@sources.redhat.com
Subject: consult before asking ER.
Date: Mon, 06 May 2002 09:57:12 +0200
Message-ID: <3CD63758.EA3E0F1F@hpfrcu81.france.hp.com>
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_count<MAXUSERARGS) <------- Added code after the loop
{ user_args->a[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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-09-27 0:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-06 0:57 consult before asking ER phi 4369
2002-05-06 1:07 ` phi 4369
2002-09-26 17:28 ` Andrew Cagney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox