summaryrefslogtreecommitdiff
path: root/dev/top_printers.ml
diff options
context:
space:
mode:
authorGravatar Stephane Glondu <steph@glondu.net>2012-06-04 12:07:52 +0200
committerGravatar Stephane Glondu <steph@glondu.net>2012-06-04 12:07:52 +0200
commit61dc740ed1c3780cccaec00d059a28f0d31d0052 (patch)
treed88d05baf35b9b09a034233300f35a694f9fa6c2 /dev/top_printers.ml
parent97fefe1fcca363a1317e066e7f4b99b9c1e9987b (diff)
Imported Upstream version 8.4~gamma0+really8.4beta2upstream/8.4_gamma0+really8.4beta2
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 3fc90761..3116cbf2 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)