Fix PR#6841

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16022 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Jacques Garrigue 2015-04-20 07:30:58 +00:00
parent 98b4109c7d
commit 8cbc2b6781
3 changed files with 8 additions and 1 deletions

View File

@ -206,6 +206,7 @@ Bug fixes:
- PR#6812: -short-paths and -no-alias-deps can create inconsistent assumptions
- PR#6817: GADT exhaustiveness breakage with modules
- PR#6836: Assertion failure using -short-paths
- PR#6841: Changing compilation unit name with -o breaks ocamldebug
- GPR#143: fix getsockopt behaviour for boolean socket options
(Anil Madhavapeddy and Andrew Ray)
- ocamlbuild on cygwin cannot find ocamlfind

View File

@ -639,8 +639,12 @@ let instr_break ppf lexbuf =
let module_name = convert_module (module_of_longident mdle) in
new_breakpoint
(try
let ev = event_at_pos module_name 0 in
let ev_pos =
{Lexing.dummy_pos with
pos_fname = (Events.get_pos ev).pos_fname} in
let buffer =
try get_buffer Lexing.dummy_pos module_name with
try get_buffer ev_pos module_name with
| Not_found ->
eprintf "No source file for %s.@." module_name;
raise Toplevel

View File

@ -21,6 +21,8 @@ let source_extensions = [".ml"]
(*** Conversion function. ***)
let source_of_module pos mdle =
let pos_fname = pos.Lexing.pos_fname in
if Sys.file_exists pos_fname then pos_fname else
let is_submodule m m' =
let len' = String.length m' in
try