type ('a,'b) t = {
mappings : mapping list;
wordsize : wordsize option;
- endian : Bitmatch.endian option;
+ endian : Bitstring.endian option;
}
and mapping = {
start : addr;
let bits = bits_of_wordsize (get_wordsize t) in
let e = get_endian t in
let bs = BITSTRING { addr : bits : endian (e) } in
- Bitmatch.string_of_bitstring bs
+ Bitstring.string_of_bitstring bs
*)
-(* XXX bitmatch is missing 'construct_int64_le_unsigned' so we
+(* XXX bitstring is missing 'construct_int64_le_unsigned' so we
* have to force this to 32 bits for the moment.
*)
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
- Bitmatch.string_of_bitstring bs
+ Bitstring.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
- let bs = Bitmatch.bitstring_of_string str in
+ let bs = Bitstring.bitstring_of_string str in
bitmatch bs with
| { addr : bits : endian (e) } -> addr
| { _ } -> invalid_arg "addr_of_string"
let get_int32 t addr =
let e = get_endian t in
let str = get_bytes t addr 4 in
- let bs = Bitmatch.bitstring_of_string str in
+ let bs = Bitstring.bitstring_of_string str in
bitmatch bs with
| { addr : 32 : endian (e) } -> addr
| { _ } -> invalid_arg "follow_pointer"
let get_int64 t addr =
let e = get_endian t in
let str = get_bytes t addr 8 in
- let bs = Bitmatch.bitstring_of_string str in
+ let bs = Bitstring.bitstring_of_string str in
bitmatch bs with
| { addr : 64 : endian (e) } -> addr
| { _ } -> invalid_arg "follow_pointer"
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 = Bitmatch.bitstring_of_string str in
+ let bs = Bitstring.bitstring_of_string str in
bitmatch bs with
| { addr : bits : endian (e) } -> addr
| { _ } -> invalid_arg "follow_pointer"