aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorBruce Evans <bde@FreeBSD.org>1998-01-17 17:07:53 +0000
committerBruce Evans <bde@FreeBSD.org>1998-01-17 17:07:53 +0000
commitd76f78c43cf886ee5a85618d6d64b0dd8aa0de9d (patch)
tree71543ae035afd3305ab2200c6823622df0da70df /gnu
parent18e5aee8c1ed558d9aa4c80ae26f9d52d0f106aa (diff)
downloadsrc-d76f78c43cf886ee5a85618d6d64b0dd8aa0de9d.tar.gz
src-d76f78c43cf886ee5a85618d6d64b0dd8aa0de9d.zip
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.
Notes
Notes: svn path=/head/; revision=32597
Diffstat (limited to 'gnu')
-rw-r--r--gnu/usr.bin/binutils/gdb/i386/kvm-fbsd.c11
-rw-r--r--gnu/usr.bin/binutils/gdb/kvm-fbsd.c11
-rw-r--r--gnu/usr.bin/gdb/gdb/kvm-fbsd.c11
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 5f93334c79a4..ed1504ec9ac6 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 5f93334c79a4..ed1504ec9ac6 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 5f93334c79a4..ed1504ec9ac6 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");
}