patch-1.3.60 linux/scripts/ksymoops.cc

Next file: linux/scripts/lxdialog/BIG.FAT.WARNING
Previous file: linux/scripts/header.tk
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.59/linux/scripts/ksymoops.cc linux/scripts/ksymoops.cc
@@ -254,6 +254,7 @@
 int
 main(int argc, char** argv)
 {
+    char c;
     program_name = (argc--, *argv++);
 
     NameList names;
@@ -280,9 +281,9 @@
 	cin >> buffer;
 	if (strequ(buffer, "EIP:") && names.valid()) {
 	    cin >> ::hex >> eip_addr;
-	    cin >> buffer[0];
+	    cin >> c >> c >> c;
 	    cin >> ::hex >> eip_addr;
-	    cin >> buffer;
+	    cin >> c >> c >> buffer;
 	    if (!strequ(buffer, "EFLAGS:")) {
 		clog << "Please strip the line-prefixes and rerun " << program_name << endl;
 		exit(1);
@@ -292,7 +293,9 @@
 		cout << ">>EIP: " << *ksym << endl;
 	} else if (strequ(buffer, "Trace:") && names.valid()) {
 	    long address;
-	    while ((cin >> ::hex >> address) && address > 0xc) {
+	    while ((cin >> buffer) && 
+		   (sscanf(buffer, " [<%x>]", &address) == 1) &&
+		   address > 0xc) {
 		cout << "Trace: ";
 		KSym* ksym = names.find(address);
 		if (ksym)

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this