This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: RFA: [ser-unix.c] Fix handling of baud rates


Eli Zaretskii wrote:
> 
> > Date: Thu, 26 Apr 2001 10:15:15 -0400
> > From: Fernando Nasser <fnasser@redhat.com>
> >
> > The problem with the error message is that:
> > 1) there is nothing very nice to set the errno to (suggestions?)
> 
> EINVAL comes to mind, although it is admittedly not very specific.
> 

Yes, but it is good enough if we show the warning first.  Thank you.


> > But as we are adding a warning(), why not just say:
> >   "Illegal baud rate %d; using %d instead."
> 
> Can you prompt for another value (after making sure this is an
> interactive session)?
> 

We already prompt for many things, but I believe we want to get rid of
these prompts outside the interpreters.  It complicates the
interpreter<->libgdb protocol, I've heard.  The idea is that idempotent
libgdb operations fail and the interpreter (after asking the user what
to do) retries them with the proper values.


> (Btw, saying ``illegal'' is discouraged by the GNU standards, unless
> you are talking about actions that break the law.  ``Invalid'' is the
> suggested alternative.)

Thanks, I didn't know that.  Please read is as "invalid".




I just though of another problem with the fall back:  most of the boards
do no accept connection at different speeds and GDB current has a very
annoying behavior of keep trying these impossible connections for ages. 
If it would quickly realize that the communication is not good and give
up this would be a good thing.  Actually, I have many requests from
users that want GDB to stop being so stubborn.  But until that is fixed,
we may end up getting into that trap.  So, we would have to go with the
error solution until that is fixed.

Is that right?






-- 
Fernando Nasser
Red Hat Canada Ltd.                     E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]