aboutsummaryrefslogtreecommitdiff
path: root/dev/top_printers.ml
diff options
context:
space:
mode:
authorherbelin2012-02-01 08:57:50 +0000
committerherbelin2012-02-01 08:57:50 +0000
commit3be4b91c09e6ec816aada997fc245484abfa1f05 (patch)
tree93bf666115190587026f183325b508f549d5d7ef /dev/top_printers.ml
parentf7dba1c53fec7fe7ecefc4758e5a39c0010118b6 (diff)
Debugger vs tracer: Two different behaviors wrt printing: The debugger
runs in separate process. It has no access to the global env and it should not request it. The tracer runs in the same process as Coq and has full access to the global env and to regular pretty-printing of global names. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@14958 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'dev/top_printers.ml')
-rw-r--r--dev/top_printers.ml4
1 files changed, 4 insertions, 0 deletions
diff --git a/dev/top_printers.ml b/dev/top_printers.ml
index 3fc90761d1..3116cbf225 100644
--- a/dev/top_printers.ml
+++ b/dev/top_printers.ml
@@ -487,5 +487,9 @@ let short_string_of_ref loc = function
[id_of_label (pi3 (repr_mind kn));id_of_string ("_"^string_of_int i)]
(id_of_string ("_"^string_of_int j))
+(* Anticipate that printers can be used from ocamldebug and that
+ pretty-printer should not make calls to the global env since ocamldebug
+ runs in a different process and does not have the proper env at hand *)
+let _ = Constrextern.in_debugger := true
let _ = Constrextern.set_debug_global_reference_printer
(if !rawdebug then raw_string_of_ref else short_string_of_ref)