ocamlPackages.spacetime_lib: patch for compat with owee 0.6

This commit is contained in:
Ali Caglayan 2023-03-23 18:37:20 +01:00
parent 1d9610bb93
commit d1833117a8
No known key found for this signature in database
GPG key ID: 59DD99D26B71EC5E
2 changed files with 17 additions and 2 deletions

View file

@ -6,8 +6,7 @@ lib.throwIfNot (lib.versionAtLeast "4.12" ocaml.version)
buildDunePackage rec {
pname = "spacetime_lib";
version = "0.3.0";
useDune2 = true;
duneVersion = "2";
src = fetchFromGitHub {
owner = "lpw25";
@ -16,6 +15,8 @@ buildDunePackage rec {
sha256 = "0biisgbycr5v3nm5jp8i0h6vq76vzasdjkcgh8yr7fhxc81jgv3p";
};
patches = [ ./spacetime.diff ];
propagatedBuildInputs = [ owee ];
preConfigure = ''

View file

@ -0,0 +1,14 @@
diff --git a/src/elf_locations.ml b/src/elf_locations.ml
index a08b359..0db9274 100644
--- a/src/elf_locations.ml
+++ b/src/elf_locations.ml
@@ -37,7 +37,8 @@ let resolve_from_dwarf t ~program_counter =
| Some section ->
let body = Owee_buf.cursor (Owee_elf.section_body t.map section) in
let rec aux () =
- match Owee_debug_line.read_chunk body with
+ let pointers_to_other_sections = Owee_elf.debug_line_pointers t.map t.sections in
+ match Owee_debug_line.read_chunk body ~pointers_to_other_sections with
| None -> ()
| Some (header, chunk) ->
(* CR-soon mshinwell: fix owee .mli to note that [state] is