Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Wait for the next character forever as kgdb wants.
details: https://anonhg.NetBSD.org/src/rev/6347579906fc
branches: trunk
changeset: 339088:6347579906fc
user: christos <christos%NetBSD.org@localhost>
date: Fri Jun 26 14:26:38 2015 +0000
description:
Wait for the next character forever as kgdb wants.
diffstat:
sys/kern/kgdb_stub.c | 17 +++++++++++++----
1 files changed, 13 insertions(+), 4 deletions(-)
diffs (38 lines):
diff -r 842ab92d3a4a -r 6347579906fc sys/kern/kgdb_stub.c
--- a/sys/kern/kgdb_stub.c Fri Jun 26 14:20:11 2015 +0000
+++ b/sys/kern/kgdb_stub.c Fri Jun 26 14:26:38 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kgdb_stub.c,v 1.28 2014/09/21 17:17:15 christos Exp $ */
+/* $NetBSD: kgdb_stub.c,v 1.29 2015/06/26 14:26:38 christos Exp $ */
/*
* Copyright (c) 1990, 1993
@@ -45,7 +45,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kgdb_stub.c,v 1.28 2014/09/21 17:17:15 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kgdb_stub.c,v 1.29 2015/06/26 14:26:38 christos Exp $");
#include "opt_ddb.h"
#include "opt_kgdb.h"
@@ -85,8 +85,17 @@
static u_char buffer[KGDB_BUFLEN];
static kgdb_reg_t gdb_regs[KGDB_NUMREGS];
-#define GETC() ((*kgdb_getc)(kgdb_ioarg))
-#define PUTC(c) ((*kgdb_putc)(kgdb_ioarg, c))
+#define GETC() kgdb_waitc(kgdb_ioarg)
+#define PUTC(c) (*kgdb_putc)(kgdb_ioarg, c)
+
+static int
+kgdb_waitc(void *arg)
+{
+ int c;
+ while ((c = (*kgdb_getc)(arg)) == -1)
+ continue;
+ return c;
+}
/*
* db_trap_callback can be hooked by MD port code to handle special
Home |
Main Index |
Thread Index |
Old Index