Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correctly stack debuginfo for inlined body in classic mode #1152

Merged
merged 8 commits into from
Mar 13, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix test
  • Loading branch information
Gbury committed Mar 9, 2023
commit 5790001d74e763c0c8a999e9378d41911d10b266
2 changes: 1 addition & 1 deletion ocaml/testsuite/tests/backtrace-multifiles/foo.ml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ let[@inline never] print s = (print_endline[@inlined never]) s

let[@inline] print_stack () =
let st = Printexc.get_callstack 100 in
Printexc.print_raw_backtrace stdout st
(Printexc.print_raw_backtrace[@inlined never]) stdout st

let[@inline] f s =
print_stack ();
Expand Down
34 changes: 17 additions & 17 deletions ocaml/testsuite/tests/backtrace-multifiles/main.ml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(* TEST_BELOW *)

let test s =
let[@inline never] test s =
let s' = (String.cat[@inlined never]) "! " s in
(Foo.h[@inlined]) s'; (* CR gbury: remove [@inlined] *)
Gbury marked this conversation as resolved.
Show resolved Hide resolved
(Foo.print_stack[@inlined]) (); (* CR gbury: remove [@inlined] *)
Expand All @@ -14,57 +14,57 @@ let () =

readonly_files ="foo.ml"

* setup-ocamlopt.byte-build-env
* setup-ocamlopt.opt-build-env
compiler_directory_suffix = ".O3"
** ocamlopt.byte
** ocamlopt.opt
module = "foo.ml"
flags = "-g -O3"
*** ocamlopt.byte
*** ocamlopt.opt
module = "main.ml"
flags = "-g -O3"
**** ocamlopt.byte
**** ocamlopt.opt
module = ""
all_modules = "foo.cmx main.cmx"
***** run
****** check-program-output

* setup-ocamlopt.byte-build-env
* setup-ocamlopt.opt-build-env
compiler_directory_suffix = ".Oclassic"
** ocamlopt.byte
** ocamlopt.opt
module = "foo.ml"
flags = "-g -Oclassic"
*** ocamlopt.byte
*** ocamlopt.opt
module = "main.ml"
flags = "-g -Oclassic"
**** ocamlopt.byte
**** ocamlopt.opt
module = ""
all_modules = "foo.cmx main.cmx"
***** run
****** check-program-output

* setup-ocamlopt.byte-build-env
* setup-ocamlopt.opt-build-env
compiler_directory_suffix = ".O3-Oclassic"
** ocamlopt.byte
** ocamlopt.opt
module = "foo.ml"
flags = "-g -O3"
*** ocamlopt.byte
*** ocamlopt.opt
module = "main.ml"
flags = "-g -Oclassic"
**** ocamlopt.byte
**** ocamlopt.opt
module = ""
all_modules = "foo.cmx main.cmx"
***** run
****** check-program-output

* setup-ocamlopt.byte-build-env
* setup-ocamlopt.opt-build-env
compiler_directory_suffix = ".Oclassic-O3"
** ocamlopt.byte
** ocamlopt.opt
module = "foo.ml"
flags = "-g -Oclassic"
*** ocamlopt.byte
*** ocamlopt.opt
module = "main.ml"
flags = "-g -O3"
**** ocamlopt.byte
**** ocamlopt.opt
module = ""
all_modules = "foo.cmx main.cmx"
***** run
Expand Down