aboutsummaryrefslogtreecommitdiff
path: root/ide
diff options
context:
space:
mode:
authorMaxime Dénès2020-10-15 15:31:51 +0200
committerGaëtan Gilbert2021-02-24 15:09:15 +0100
commit068031ff7da092c1e2d35db27d713b9606960c42 (patch)
tree2a3e2ae6a82e60a76ef31659ff305d70a4b2ea39 /ide
parent264aba2484312a2172cd36dd9b89ed66e4f38864 (diff)
Infrastructure for fine-grained debug flags
Diffstat (limited to 'ide')
-rw-r--r--ide/coqide/coqide.ml3
-rw-r--r--ide/coqide/coqide_main.ml2
-rw-r--r--ide/coqide/idetop.ml6
-rw-r--r--ide/coqide/microPG.ml2
4 files changed, 6 insertions, 7 deletions
diff --git a/ide/coqide/coqide.ml b/ide/coqide/coqide.ml
index e066fc6292..3fbfbd66d3 100644
--- a/ide/coqide/coqide.ml
+++ b/ide/coqide/coqide.ml
@@ -1374,8 +1374,7 @@ let main files =
let read_coqide_args argv =
let set_debug () =
Minilib.debug := true;
- Flags.debug := true;
- Exninfo.record_backtrace true
+ CDebug.set_debug_all true
in
let rec filter_coqtop coqtop project_files bindings_files out = function
|"-unicode-bindings" :: sfilenames :: args ->
diff --git a/ide/coqide/coqide_main.ml b/ide/coqide/coqide_main.ml
index 0812e00960..a178e72806 100644
--- a/ide/coqide/coqide_main.ml
+++ b/ide/coqide/coqide_main.ml
@@ -35,7 +35,7 @@ let catch_gtk_messages () =
let () = GToolbox.message_box ~title:"Error" (header ^ msg) in
Coqide.crash_save 1
|`ERROR ->
- if !Flags.debug then GToolbox.message_box ~title:"Error" (header ^ msg)
+ if CDebug.(get_flag misc) then GToolbox.message_box ~title:"Error" (header ^ msg)
else Printf.eprintf "%s\n" (header ^ msg)
|`DEBUG -> Minilib.log msg
|level when Sys.os_type = "Win32" -> Minilib.log ~level msg
diff --git a/ide/coqide/idetop.ml b/ide/coqide/idetop.ml
index b42c705add..4b069b09ba 100644
--- a/ide/coqide/idetop.ml
+++ b/ide/coqide/idetop.ml
@@ -35,11 +35,11 @@ let pr_with_pid s = Printf.eprintf "[pid %d] %s\n%!" (Unix.getpid ()) s
let pr_error s = pr_with_pid s
let pr_debug s =
- if !Flags.debug then pr_with_pid s
+ if CDebug.(get_flag misc) then pr_with_pid s
let pr_debug_call q =
- if !Flags.debug then pr_with_pid ("<-- " ^ Xmlprotocol.pr_call q)
+ if CDebug.(get_flag misc) then pr_with_pid ("<-- " ^ Xmlprotocol.pr_call q)
let pr_debug_answer q r =
- if !Flags.debug then pr_with_pid ("--> " ^ Xmlprotocol.pr_full_value q r)
+ if CDebug.(get_flag misc) then pr_with_pid ("--> " ^ Xmlprotocol.pr_full_value q r)
(** Categories of commands *)
diff --git a/ide/coqide/microPG.ml b/ide/coqide/microPG.ml
index 5a4871b70a..9908703cea 100644
--- a/ide/coqide/microPG.ml
+++ b/ide/coqide/microPG.ml
@@ -15,7 +15,7 @@ open GdkKeysyms
open Printf
let eprintf x =
- if !Flags.debug then Printf.eprintf x else Printf.ifprintf stderr x
+ if CDebug.(get_flag misc) then Printf.eprintf x else Printf.ifprintf stderr x
type gui = {
notebook : session Wg_Notebook.typed_notebook;