aboutsummaryrefslogtreecommitdiff
path: root/gdb/remote-utils.h
diff options
context:
space:
mode:
authorStu Grossman <grossman@cygnus>1993-10-21 00:49:42 +0000
committerStu Grossman <grossman@cygnus>1993-10-21 00:49:42 +0000
commitd0d8484a4a8b7c803473eaadb4a30513cd8b8d09 (patch)
treedf9a1980445b2eca7743d5f58970c8fae8947c5c /gdb/remote-utils.h
parentfc81adb803b6f43bc80ebb049472b660bd2e33fa (diff)
downloadgdb-d0d8484a4a8b7c803473eaadb4a30513cd8b8d09.zip
gdb-d0d8484a4a8b7c803473eaadb4a30513cd8b8d09.tar.gz
gdb-d0d8484a4a8b7c803473eaadb4a30513cd8b8d09.tar.bz2
* main.c: Make baud_rate and remote_debug be global variables,
remove #include "remote-utils.h". This makes it possible to build GDB without remote-utils.c. Also, move setting of remote_debug into main, so that all remote*.c files can use it (not just the serial line ones). And, make baud_rate be an int. * remote-udi.c: Change kiodebug to remote_debug. * remote-utils.c: Move setting of baud rate and debug into main.c. * remote-utils.h: Redefine sr_{get set}_debug and sr_{get set}_baud to use baud_rate and remote_debug globals for compatibility. * remote.c: Use remote_debug and baud_rate globals directly, instead of sr_ functions, so that we don't need to load remote-utils.c.
Diffstat (limited to 'gdb/remote-utils.h')
-rw-r--r--gdb/remote-utils.h18
1 files changed, 6 insertions, 12 deletions
diff --git a/gdb/remote-utils.h b/gdb/remote-utils.h
index 758ce3d..59f4d3b 100644
--- a/gdb/remote-utils.h
+++ b/gdb/remote-utils.h
@@ -29,14 +29,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
remote targets. */
struct _sr_settings {
- /* Debugging level. 0 is off, and non-zero values mean to print
- some debug information (higher values, more information). */
- unsigned int debug;
-
- /* Baud rate specified for talking to remote target systems via a
- serial port. */
- unsigned int baud_rate;
-
unsigned int timeout;
int retries;
@@ -47,14 +39,16 @@ struct _sr_settings {
};
extern struct _sr_settings sr_settings;
+extern int remote_debug;
+extern int baud_rate;
/* get and set debug value. */
-#define sr_get_debug() (sr_settings.debug)
-#define sr_set_debug(newval) (sr_settings.debug = (newval))
+#define sr_get_debug() (remote_debug)
+#define sr_set_debug(newval) (remote_debug = (newval))
/* get and set baud rate. */
-#define sr_get_baud_rate() (sr_settings.baud_rate)
-#define sr_set_baud_rate(newval) (sr_settings.baud_rate = (newval))
+#define sr_get_baud_rate() (baud_rate)
+#define sr_set_baud_rate(newval) (baud_rate = (newval))
/* get and set timeout. */
#define sr_get_timeout() (sr_settings.timeout)