From 0520662c9ecb022842723f56f49d9f326536e240 Mon Sep 17 00:00:00 2001 From: Stephane Glondu Date: Wed, 13 Nov 2013 14:29:30 +0100 Subject: [PATCH] Fix native backtraces on arm* --- ...ces-don-t-work-on-powerpc-and-sparc.patch} | 8 +-- .../0015-Fix-native-backtraces-on-arm.patch | 59 +++++++++++++++++++ debian/patches/series | 3 +- 3 files changed, 65 insertions(+), 5 deletions(-) rename debian/patches/{0014-Native-backtraces-don-t-work-on-powerpc-sparc-and-ar.patch => 0014-Native-backtraces-don-t-work-on-powerpc-and-sparc.patch} (78%) create mode 100644 debian/patches/0015-Fix-native-backtraces-on-arm.patch diff --git a/debian/patches/0014-Native-backtraces-don-t-work-on-powerpc-sparc-and-ar.patch b/debian/patches/0014-Native-backtraces-don-t-work-on-powerpc-and-sparc.patch similarity index 78% rename from debian/patches/0014-Native-backtraces-don-t-work-on-powerpc-sparc-and-ar.patch rename to debian/patches/0014-Native-backtraces-don-t-work-on-powerpc-and-sparc.patch index 35372e9c..eab92804 100644 --- a/debian/patches/0014-Native-backtraces-don-t-work-on-powerpc-sparc-and-ar.patch +++ b/debian/patches/0014-Native-backtraces-don-t-work-on-powerpc-and-sparc.patch @@ -1,13 +1,13 @@ From: Stephane Glondu -Date: Sat, 9 Nov 2013 07:56:39 +0100 -Subject: Native backtraces don't work on powerpc, sparc and arm* +Date: Wed, 13 Nov 2013 14:28:16 +0100 +Subject: Native backtraces don't work on powerpc and sparc --- testsuite/tests/backtrace/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/testsuite/tests/backtrace/Makefile b/testsuite/tests/backtrace/Makefile -index 83f9472..ce563be 100644 +index 83f9472..e71863a 100644 --- a/testsuite/tests/backtrace/Makefile +++ b/testsuite/tests/backtrace/Makefile @@ -18,7 +18,10 @@ OTHERFILES=backtrace2.ml raw_backtrace.ml @@ -16,7 +16,7 @@ index 83f9472..ce563be 100644 $(MAKE) byte - @if $(BYTECODE_ONLY); then : ; else $(MAKE) native; fi + @case `dpkg-architecture -qDEB_BUILD_ARCH` in \ -+ sparc|powerpc|arm*) : ;; \ ++ sparc|powerpc) : ;; \ + *) if $(BYTECODE_ONLY) ; then : ; else $(MAKE) native; fi ;; \ + esac diff --git a/debian/patches/0015-Fix-native-backtraces-on-arm.patch b/debian/patches/0015-Fix-native-backtraces-on-arm.patch new file mode 100644 index 00000000..3e2ca3fc --- /dev/null +++ b/debian/patches/0015-Fix-native-backtraces-on-arm.patch @@ -0,0 +1,59 @@ +From: Stephane Glondu +Date: Wed, 13 Nov 2013 14:28:20 +0100 +Subject: Fix native backtraces on arm* + +Author: Jacques-Henri Jourdan +Bug: http://caml.inria.fr/mantis/view.php?id=6233 +Signed-off-by: Stephane Glondu +--- + asmcomp/linearize.ml | 6 ++++++ + asmcomp/linearize.mli | 3 +++ + asmcomp/schedgen.ml | 3 ++- + 3 files changed, 11 insertions(+), 1 deletion(-) + +diff --git a/asmcomp/linearize.ml b/asmcomp/linearize.ml +index 963ffe9..5095c3a 100644 +--- a/asmcomp/linearize.ml ++++ b/asmcomp/linearize.ml +@@ -86,6 +86,12 @@ let instr_cons d a r n = + { desc = d; next = n; arg = a; res = r; + dbg = Debuginfo.none; live = Reg.Set.empty } + ++(* Cons an instruction (live empty) *) ++ ++let instr_cons_debug d a r dbg n = ++ { desc = d; next = n; arg = a; res = r; ++ dbg = dbg; live = Reg.Set.empty } ++ + (* Cons a simple instruction (arg, res, live empty) *) + + let cons_instr d n = +diff --git a/asmcomp/linearize.mli b/asmcomp/linearize.mli +index ad5dc3a..ca203a7 100644 +--- a/asmcomp/linearize.mli ++++ b/asmcomp/linearize.mli +@@ -42,6 +42,9 @@ val has_fallthrough : instruction_desc -> bool + val end_instr: instruction + val instr_cons: + instruction_desc -> Reg.t array -> Reg.t array -> instruction -> instruction ++val instr_cons_debug: ++ instruction_desc -> Reg.t array -> Reg.t array -> Debuginfo.t -> ++ instruction -> instruction + val invert_test: Mach.test -> Mach.test + + type fundecl = +diff --git a/asmcomp/schedgen.ml b/asmcomp/schedgen.ml +index 885c945..a04ab27 100644 +--- a/asmcomp/schedgen.ml ++++ b/asmcomp/schedgen.ml +@@ -336,7 +336,8 @@ method private reschedule ready_queue date cont = + if son.emitted_ancestors = son.ancestors then + new_queue := son :: !new_queue) + node.sons; +- instr_cons node.instr.desc node.instr.arg node.instr.res ++ instr_cons_debug node.instr.desc node.instr.arg node.instr.res ++ node.instr.dbg + (self#reschedule !new_queue (date + issue_cycles) cont) + end + +-- diff --git a/debian/patches/series b/debian/patches/series index efbcf038..85a784a4 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -11,4 +11,5 @@ 0011-Enable-mkstemp-in-yacc.patch 0012-Fix-ocamlopt-on-sparc.patch 0013-Tune-resource-usage-of-some-tests.patch -0014-Native-backtraces-don-t-work-on-powerpc-sparc-and-ar.patch +0014-Native-backtraces-don-t-work-on-powerpc-and-sparc.patch +0015-Fix-native-backtraces-on-arm.patch -- 2.30.2