The unpac monorepo manager self-hosting as a monorepo using unpac
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Print a message about an wrong magic number in debugger (#14375)

authored by

Alex1005a and committed by
GitHub
03d5b6ad e6d70197

+17
+4
Changes
··· 1484 1484 LLDB support for them. 1485 1485 (Nick Barnes, review by Tim McGilchrist and Gabriel Scherer) 1486 1486 1487 + - #14375: More accurate error message in the ocamldebug in case of incorrect or 1488 + missing magic number. 1489 + (Alex Asafov, review by Gabriel Scherer) 1490 + 1487 1491 ### Toplevel: 1488 1492 1489 1493 - #12891: Improved styling for initial prompt
+13
debugger/symbols.ml
··· 68 68 let ic = open_in_bin bytecode_file in 69 69 let toc = 70 70 try 71 + let open Misc.Magic_number in 72 + let pos_trailer = in_channel_length ic - magic_length in 73 + let () = seek_in ic pos_trailer in 74 + match read_current_info ~expected_kind:(Some Exec) ic with 75 + | Error (Parse_error err) -> 76 + prerr_string bytecode_file; prerr_string " load error: "; 77 + prerr_endline (explain_parse_error (Some Exec) err); 78 + raise Toplevel 79 + | Error (Unexpected_error err) -> 80 + prerr_string bytecode_file; prerr_string " load error: "; 81 + prerr_endline (explain_unexpected_error err); 82 + raise Toplevel 83 + | Ok _ -> (); 71 84 let toc = Bytesections.read_toc ic in 72 85 ignore(Bytesections.seek_section toc ic Bytesections.Name.SYMB); 73 86 toc