[Crash-utility] [PATCH] Expanded search capability for crash

Bob Montgomery bob.montgomery at hp.com
Wed Feb 23 22:23:19 UTC 2011


This patch adds options to crash's search command that allow searches
for character strings (-c), unsigned hexadecimal integer values (-w),
and unsigned hexadecimal short values (-h).   The integer and short
values are searched on integer and short alignments respectively.

Strings are searched across contiguous page boundaries, which can cause
possibly confusing behavior since contiguity is affected by the type of
search.  For example, a page-crossing string found in a user virtual
address search might not be found in a kernel virtual address search if
the kernel pages mapped to the user address space are not contiguous.

The patch is for crash-5.1.2 and has been tested on an x86_64 system.


Some last minute caveats on with search due to the parser (worth putting
in help?):

All numbers are interpreted as hex numbers, regardless of starting
character.

Double quotes are magic to crash's parser, so strings of almost anything
can be enclosed in "", for example: "can't".

Single quotes mean nothing, so searching for 'dog' is the same as
searching for "'dog'".


Bob Montgomery
-------------- next part --------------
A non-text attachment was scrubbed...
Name: crash_int_short_str_search7.patch
Type: text/x-patch
Size: 20565 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/crash-utility/attachments/20110223/d6394a01/attachment.bin>


More information about the Crash-utility mailing list