Skip to content

Commit 22ab8d6

Browse files
committed
getting back x86_64 fix,
that I accidentally retracted. Friday evening...
1 parent 435cd89 commit 22ab8d6

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

plugin/frame_trace_plugin.ml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,24 @@ let create_frame_reader path =
2929
Arch_bfd.sexp_of_bfd_architecture reader#get_arch |>
3030
Sexp.to_string |>
3131
String.substr_replace_all ~pattern:"Bfd_arch_" ~with_:"" |>
32-
Arch.of_string
32+
Arch.of_string |>
33+
Option.map ~f:(function
34+
| `x86 when
35+
reader#get_machine = (Int64.of_int Arch_bfd.mach_x86_64) -> `x86_64
36+
| a -> a)
37+
3338

3439
method meta =
3540
let set : 'a. 'a tag -> 'a option -> Dict.t -> Dict.t = fun tag value dict ->
3641
Option.value_map value
3742
~f:(fun value -> Dict.set dict tag value) ~default:dict in
3843
let open Meta in
39-
set tracer self#tracer_meta Dict.empty |>
44+
let meta = if reader#get_trace_version = 1L
45+
then Dict.empty
46+
else match reader#get_frame with
47+
| `meta_frame f -> Frame_events.of_meta_frame f
48+
| _ -> Dict.empty in
49+
set tracer self#tracer_meta meta |>
4050
set arch self#arch_meta
4151

4252
method next () =

0 commit comments

Comments
 (0)