summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/gdb
diff options
context:
space:
mode:
authorbrooks <brooks@FreeBSD.org>2004-09-03 07:11:42 +0000
committerbrooks <brooks@FreeBSD.org>2004-09-03 07:11:42 +0000
commit230e08557d566cb2ef369f5adbd202d68161ccec (patch)
tree186c4ec2588e36ba92d2cdbbdaa3caeb1d009d72 /gnu/usr.bin/gdb
parentbf40c4e81f824299baab4a3376cdf380b8520aab (diff)
downloadFreeBSD-src-230e08557d566cb2ef369f5adbd202d68161ccec.zip
FreeBSD-src-230e08557d566cb2ef369f5adbd202d68161ccec.tar.gz
If the argument to the -r flag starts with a ':' or a '|', don't try to
make sure it is a device. GDB special cases these prefixes and treats :#### as a tcp port on localhost and executes what ever follows '|'. This allows kgdb to debug via dconschat. Discussed with: marcel
Diffstat (limited to 'gnu/usr.bin/gdb')
-rw-r--r--gnu/usr.bin/gdb/kgdb/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gnu/usr.bin/gdb/kgdb/main.c b/gnu/usr.bin/gdb/kgdb/main.c
index 3209fc9..30dd6a8 100644
--- a/gnu/usr.bin/gdb/kgdb/main.c
+++ b/gnu/usr.bin/gdb/kgdb/main.c
@@ -284,7 +284,7 @@ main(int argc, char *argv[])
if (!S_ISREG(st.st_mode))
errx(1, "%s: not a regular file", path);
vmcore = strdup(path);
- } else if (remote != NULL) {
+ } else if (remote != NULL && remote[0] != ':' && remote[0] != '|') {
if (stat(remote, &st) != 0) {
snprintf(path, sizeof(path), "/dev/%s", remote);
if (stat(path, &st) != 0) {
OpenPOWER on IntegriCloud