git.annexia.org
/
virt-mem.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bitmatch -> bitstring
[virt-mem.git]
/
lib
/
virt_mem_mmap.ml
diff --git
a/lib/virt_mem_mmap.ml
b/lib/virt_mem_mmap.ml
index
963e10d
..
3b84a26
100644
(file)
--- a/
lib/virt_mem_mmap.ml
+++ b/
lib/virt_mem_mmap.ml
@@
-33,7
+33,7
@@
open Virt_mem_utils
type ('a,'b) t = {
mappings : mapping list;
wordsize : wordsize option;
type ('a,'b) t = {
mappings : mapping list;
wordsize : wordsize option;
- endian : Bit
match
.endian option;
+ endian : Bit
string
.endian option;
}
and mapping = {
start : addr;
}
and mapping = {
start : addr;
@@
-213,9
+213,9
@@
and string_of_addr t addr =
let bits = bits_of_wordsize (get_wordsize t) in
let e = get_endian t in
let bs = BITSTRING { addr : bits : endian (e) } in
let bits = bits_of_wordsize (get_wordsize t) in
let e = get_endian t in
let bs = BITSTRING { addr : bits : endian (e) } in
- Bit
match
.string_of_bitstring bs
+ Bit
string
.string_of_bitstring bs
*)
*)
-(* XXX bit
match
is missing 'construct_int64_le_unsigned' so we
+(* XXX bit
string
is missing 'construct_int64_le_unsigned' so we
* have to force this to 32 bits for the moment.
*)
and string_of_addr t addr =
* have to force this to 32 bits for the moment.
*)
and string_of_addr t addr =
@@
-223,12
+223,12
@@
and string_of_addr t addr =
assert (bits = 32);
let e = get_endian t in
let bs = BITSTRING { Int64.to_int32 addr : 32 : endian (e) } in
assert (bits = 32);
let e = get_endian t in
let bs = BITSTRING { Int64.to_int32 addr : 32 : endian (e) } in
- Bit
match
.string_of_bitstring bs
+ Bit
string
.string_of_bitstring bs
and addr_of_string t str =
let bits = bits_of_wordsize (get_wordsize t) in
let e = get_endian t in
and addr_of_string t str =
let bits = bits_of_wordsize (get_wordsize t) in
let e = get_endian t in
- let bs = Bit
match
.bitstring_of_string str in
+ let bs = Bit
string
.bitstring_of_string str in
bitmatch bs with
| { addr : bits : endian (e) } -> addr
| { _ } -> invalid_arg "addr_of_string"
bitmatch bs with
| { addr : bits : endian (e) } -> addr
| { _ } -> invalid_arg "addr_of_string"
@@
-287,7
+287,7
@@
let get_bytes t addr len =
let get_int32 t addr =
let e = get_endian t in
let str = get_bytes t addr 4 in
let get_int32 t addr =
let e = get_endian t in
let str = get_bytes t addr 4 in
- let bs = Bit
match
.bitstring_of_string str in
+ let bs = Bit
string
.bitstring_of_string str in
bitmatch bs with
| { addr : 32 : endian (e) } -> addr
| { _ } -> invalid_arg "follow_pointer"
bitmatch bs with
| { addr : 32 : endian (e) } -> addr
| { _ } -> invalid_arg "follow_pointer"
@@
-295,7
+295,7
@@
let get_int32 t addr =
let get_int64 t addr =
let e = get_endian t in
let str = get_bytes t addr 8 in
let get_int64 t addr =
let e = get_endian t in
let str = get_bytes t addr 8 in
- let bs = Bit
match
.bitstring_of_string str in
+ let bs = Bit
string
.bitstring_of_string str in
bitmatch bs with
| { addr : 64 : endian (e) } -> addr
| { _ } -> invalid_arg "follow_pointer"
bitmatch bs with
| { addr : 64 : endian (e) } -> addr
| { _ } -> invalid_arg "follow_pointer"
@@
-373,7
+373,7
@@
let follow_pointer t addr =
let e = get_endian t in
let bits = bits_of_wordsize ws in
let str = get_bytes t addr (bytes_of_wordsize ws) in
let e = get_endian t in
let bits = bits_of_wordsize ws in
let str = get_bytes t addr (bytes_of_wordsize ws) in
- let bs = Bit
match
.bitstring_of_string str in
+ let bs = Bit
string
.bitstring_of_string str in
bitmatch bs with
| { addr : bits : endian (e) } -> addr
| { _ } -> invalid_arg "follow_pointer"
bitmatch bs with
| { addr : bits : endian (e) } -> addr
| { _ } -> invalid_arg "follow_pointer"