If you change the
fprintf(pc->saved_fp, buf);
lines to
print_verbatim(pc->saved_fp, buf);
Then I won't get:
crash> sk_buff.head ffff88012014dc80
Segmentation fault
When I need to get:
crash> sk_buff.head ffff88012014dc80
head = 0xffff880121267000 "\"%s %s %s\", got type \"%s\""
Patch attached (6.0.8).
I suspect performance will suffer a bit when I try to print
2 million of these...
Thanks,
Bob Montgomery
--- symbols.c.orig 2012-06-29 08:59:18.000000000 -0600
+++ symbols.c 2012-08-09 16:07:38.000000000 -0600
@@ -6817,17 +6817,17 @@ next_item:
if (!indent) {
if ((p1 = strstr(buf, ", \n")))
sprintf(p1, "\n");
- fprintf(pc->saved_fp, buf);
+ print_verbatim(pc->saved_fp, buf);
break;
}
if (strstr(buf, "}") &&
(count_leading_spaces(buf) == indent)) {
if ((p1 = strstr(buf, "}, \n")))
sprintf(p1, "}\n");
- fprintf(pc->saved_fp, buf);
+ print_verbatim(pc->saved_fp, buf);
break;
}
- fprintf(pc->saved_fp, buf);
+ print_verbatim(pc->saved_fp, buf);
on++;
}
}
--
Crash-utility mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/crash-utility