Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* [cli] set <var_boolean> <tab>?
@ 2001-09-22 16:29 Andrew Cagney
  2001-09-23 13:17 ` Andrew Cagney
  0 siblings, 1 reply; 2+ messages in thread
From: Andrew Cagney @ 2001-09-22 16:29 UTC (permalink / raw)
  To: gdb

Hello,

While knocking up ``maint set profile'' I noticed that:

	maint set profile <tab>

(a cli var_boolean) doesn't do what I expected (it does nothing).  I was 
expecting behavour similar to the auto/boolean commands:

(gdb) set remote P-packet <tab>
auto  off   on
(gdb) set remote P-packet disable

Notice how while it suggests ``auto'', ``on'' or ``off'' it will accept 
almost anything.

To get ``maint set profile <tab>'' and other var_boolean commands 
providing similar behavour I just need to mimic what 
add_set_auto_boolean_cmd() does.  However, it begs a question.

I can either:

	o	Add a add_set_boolean_cmd() that is similar
		to add_set_auto_boolean_cmd()

	o	Tweek add_set_cmd() to realise it is
		a var_boolean and set things up accordingly.

If the latter, I should probably eliminate add_set_auto_boolean_cmd() 
and adding it to add_set_cmd().

so?
Andrew


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [cli] set <var_boolean> <tab>?
  2001-09-22 16:29 [cli] set <var_boolean> <tab>? Andrew Cagney
@ 2001-09-23 13:17 ` Andrew Cagney
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Cagney @ 2001-09-23 13:17 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: gdb

> I can either:
> 
>     o    Add a add_set_boolean_cmd() that is similar
>         to add_set_auto_boolean_cmd()
> 
>     o    Tweek add_set_cmd() to realise it is
>         a var_boolean and set things up accordingly.
> 
> If the latter, I should probably eliminate add_set_auto_boolean_cmd() and adding it to add_set_cmd().

Closer inspection reveals the rationale.  add_set_auto_boolean_cmd takes 
an explicit / strongly typed ``enum cmd_auto_boolean'' as the parameter 
that is updated.  add_set_cmd() takes a ``void *''.  I'll cook up a 
patch adding add_set_boolean_cmd().

Andrew



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-09-23 13:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-09-22 16:29 [cli] set <var_boolean> <tab>? Andrew Cagney
2001-09-23 13:17 ` Andrew Cagney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox