Re: [PATCH] WTF is VLI?

From: Avi Kivity
Date: Thu Nov 18 2004 - 11:16:46 EST


Keith Owens wrote:

So for VLI code, ksymoops splits the code line into two separate pieces
and processes each one seperately. ksymoops prints the first bit with
a warning that it may not be reliable. The second bit, and all the
code line for non-VLI architectures, is reliable and is printed without
a warning.



ksymoops can disasemble the entire code line, but starting at different offsets (up to the maximum instruction length) from the start. the first disassembly to include the program counter in the output would be deemed correct.

this would work for all architectures, and might improve reliability for i386.

in case I'm not communicating well:

for (offset = 0; offset < max_instr_len; ++offset) {
create_object_file(code + offset, len - offset);
disassemble();
if (disassembly_includes_eip())
break;
}

the likelyhood of the first section containing garbage is reduced; and the code works for VLI and FLI.

--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/