Re: set/show remotestopbits

Andrew Cagney
2001-09-26T11:09:00Z

>
> I don't know what happened to Don, but I trust I don't want it to happen
> to me.

Everyone, including me, pulled Don in different directions leading him
to implement the same patch N times :-(

> I put it in cli-cmds.c because that is where set/show remotebaud lives.

I was thinking more of where the command lived within the CLI and its
semantics. As to where to put the code well ...

Ok, cli/cli-cmds.c contains:

> /* If target is open when baud changes, it doesn't take effect until the
> next open (I think, not sure). */
> add_show_from_set (add_set_cmd ("remotebaud", no_class,
> var_zinteger, (char *) &baud_rate,
> "Set baud rate for remote serial I/O.\n\
> This value is used to set the speed of the serial port when debugging\n\
> using remote targets.", &setlist),
> &showlist);

so it only takes effect when the port is opened - lets call this a
feature :-) Things like monitor.c and remote.c then check/set the
baud_rate after doing the serial open.

The convention has been for commands that affect the serial/parallel
port to be called ``set/show remoteXXXX'' eg:

set/show remotebaud
set/show remotelogfile
set/show remotelogbase

so
set/show remotestopbits

certainly follows this convention.

We've also recently gained the convention for:

set/show remote XXXX

to be used for things that relate to the remote targets (using the
remote protocol).

My first thought is that, the ``serial'' (well serial / parallel / ...)
commands should be under:

set/show serial XXXXXX
and
set debug serial

rather than ``set/show remote XXXX'' since they are not specific to the
remote protocol.

Thoughts? I'm pretty easy to convince otherwise.

If there is agreement on this, I can churn out the framework needed so
that you, Mark, can just drop in ``set serial stopbits''.

Andrew