This is the mail archive of the gdb-patches@sourceware.cygnus.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]

RFC: Patch to make "set remotebaud" and "-b" work for RDI targets


The baud specified on the target command itself takes precedence, but if
it has not been specified and gdb was invoked with a "-b" argument or
the user (or Insight) have issued a "set remotebaud" command, that
valued is tried (comapared against the list of valid values kept by the
rdi code).

-- 
Fernando Nasser
Cygnus Solutions - Toronto Office       E-Mail:  fnasser@cygnus.com
2323 Yonge Street, Suite #300           Tel:  416-482-2661 ext. 311
Toronto, Ontario   M4P 2C9              Fax:  416-482-6299


Index: rdi-share/serdrv.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/rdi-share/serdrv.c,v
retrieving revision 1.4
diff -c -r1.4 serdrv.c
*** serdrv.c    1999/01/28 03:50:16     1.4
--- serdrv.c    2000/01/05 23:45:25
***************
*** 32,37 ****
--- 32,39 ----
  #include "params.h"
  #include "logging.h"
  
+ extern int baud_rate;   /* From gdb/top.c */
+ 
  #ifdef COMPILING_ON_WINDOWS
  #  undef   ERROR
  #  undef   IGNORE
***************
*** 228,233 ****
--- 230,241 ----
          else
             printf( "could not understand baud rate %s\n", arg );
  #endif
+     }
+     else if (baud_rate > 0)
+     {
+       /* If the user specified a baud rate on the command line "-b" or
via
+          the "set remotebaud" command then try to use that one */
+       process_baud_rate( baud_rate );
      }
  
  #ifdef COMPILING_ON_WINDOWS

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