diff options
author | bde <bde@FreeBSD.org> | 1998-01-17 17:07:53 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1998-01-17 17:07:53 +0000 |
commit | a909b80bf1b408bad3f554b9072f26ff3a3b94fb (patch) | |
tree | 6e012089a2fc2c9e5cc613b0bb9f8ccc52626607 | |
parent | 965464cfca187e55ba822a4cd9ea777832613f1c (diff) | |
download | FreeBSD-src-a909b80bf1b408bad3f554b9072f26ff3a3b94fb.zip FreeBSD-src-a909b80bf1b408bad3f554b9072f26ff3a3b94fb.tar.gz |
Pass the system name to dmesg. Rev.1.7 only works when the symbols in
/kernel aren't too different form those in the kernel being debugged.
-rw-r--r-- | gnu/usr.bin/binutils/gdb/i386/kvm-fbsd.c | 11 | ||||
-rw-r--r-- | gnu/usr.bin/binutils/gdb/kvm-fbsd.c | 11 | ||||
-rw-r--r-- | gnu/usr.bin/gdb/gdb/kvm-fbsd.c | 11 |
3 files changed, 27 insertions, 6 deletions
diff --git a/gnu/usr.bin/binutils/gdb/i386/kvm-fbsd.c b/gnu/usr.bin/binutils/gdb/i386/kvm-fbsd.c index 5f93334..ed1504e 100644 --- a/gnu/usr.bin/binutils/gdb/i386/kvm-fbsd.c +++ b/gnu/usr.bin/binutils/gdb/i386/kvm-fbsd.c @@ -30,6 +30,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "frame.h" /* required by inferior.h */ #include "inferior.h" #include "symtab.h" +#include "symfile.h" +#include "objfiles.h" #include "command.h" #include "bfd.h" #include "target.h" @@ -339,13 +341,18 @@ kcore_open (filename, from_tty) *cp = '\0'; if (buf[0] != '\0') printf ("panicstr: %s\n", buf); + } + /* Print all the panic messages if possible. */ + if (symfile_objfile != NULL) + { printf ("panic messages:\n---\n"); snprintf (buf, sizeof buf, - "/sbin/dmesg -M %s | \ + "/sbin/dmesg -N %s -M %s | \ /usr/bin/awk '/^(panic:|Fatal trap) / { printing = 1 } \ { if (printing) print $0 }'", - filename); + symfile_objfile->name, filename); + fflush(stdout); system (buf); printf ("---\n"); } diff --git a/gnu/usr.bin/binutils/gdb/kvm-fbsd.c b/gnu/usr.bin/binutils/gdb/kvm-fbsd.c index 5f93334..ed1504e 100644 --- a/gnu/usr.bin/binutils/gdb/kvm-fbsd.c +++ b/gnu/usr.bin/binutils/gdb/kvm-fbsd.c @@ -30,6 +30,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "frame.h" /* required by inferior.h */ #include "inferior.h" #include "symtab.h" +#include "symfile.h" +#include "objfiles.h" #include "command.h" #include "bfd.h" #include "target.h" @@ -339,13 +341,18 @@ kcore_open (filename, from_tty) *cp = '\0'; if (buf[0] != '\0') printf ("panicstr: %s\n", buf); + } + /* Print all the panic messages if possible. */ + if (symfile_objfile != NULL) + { printf ("panic messages:\n---\n"); snprintf (buf, sizeof buf, - "/sbin/dmesg -M %s | \ + "/sbin/dmesg -N %s -M %s | \ /usr/bin/awk '/^(panic:|Fatal trap) / { printing = 1 } \ { if (printing) print $0 }'", - filename); + symfile_objfile->name, filename); + fflush(stdout); system (buf); printf ("---\n"); } diff --git a/gnu/usr.bin/gdb/gdb/kvm-fbsd.c b/gnu/usr.bin/gdb/gdb/kvm-fbsd.c index 5f93334..ed1504e 100644 --- a/gnu/usr.bin/gdb/gdb/kvm-fbsd.c +++ b/gnu/usr.bin/gdb/gdb/kvm-fbsd.c @@ -30,6 +30,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "frame.h" /* required by inferior.h */ #include "inferior.h" #include "symtab.h" +#include "symfile.h" +#include "objfiles.h" #include "command.h" #include "bfd.h" #include "target.h" @@ -339,13 +341,18 @@ kcore_open (filename, from_tty) *cp = '\0'; if (buf[0] != '\0') printf ("panicstr: %s\n", buf); + } + /* Print all the panic messages if possible. */ + if (symfile_objfile != NULL) + { printf ("panic messages:\n---\n"); snprintf (buf, sizeof buf, - "/sbin/dmesg -M %s | \ + "/sbin/dmesg -N %s -M %s | \ /usr/bin/awk '/^(panic:|Fatal trap) / { printing = 1 } \ { if (printing) print $0 }'", - filename); + symfile_objfile->name, filename); + fflush(stdout); system (buf); printf ("---\n"); } |