Revert "gdb: change dwarf_die_debug to bool"
authorSimon Marchi <simon.marchi@polymtl.ca>
Thu, 27 May 2021 03:31:29 +0000 (23:31 -0400)
committerSimon Marchi <simon.marchi@polymtl.ca>
Thu, 27 May 2021 03:32:24 +0000 (23:32 -0400)
This was wrong: dwarf_die_debug is used as an integer, for example where
it is passed to dump_die.  It is documented in the command's help, which
I missed the first time.

This reverts commit 749369c430d88c4abc9acde5cfc7b5218651de10.

Change-Id: I1d09c3da57f8885f4f9fe9f4eae0cf86006e617a

gdb/ChangeLog
gdb/dwarf2/read.c

index 36491171d5af224550d769740d7ec505a8d02a05..39f444e1f78ebf289534aee5a445f5b0c189e441 100644 (file)
@@ -1,8 +1,3 @@
-2021-05-26  Simon Marchi  <simon.marchi@polymtl.ca>
-
-       * dwarf2/read.c (dwarf_die_debug): Change type to bool.
-       (_initialize_dwarf2_read): Update.
-
 2021-05-26  Simon Marchi  <simon.marchi@efficios.com>
 
        * regcache.c (reg_buffer::reg_buffer): Default-initialize
index b40d3a7aa2cba776738add784fa74140ad4b8930..d3b5b89c1c3282a967e27d46d9b6b4259aefd5f6 100644 (file)
@@ -107,8 +107,8 @@ static unsigned int dwarf_read_debug = 0;
   debug_prefixed_printf_cond (dwarf_read_debug >= 2, "dwarf-read", fmt, \
                              ##__VA_ARGS__)
 
-/* When true, dump DIEs after they are read in.  */
-static bool dwarf_die_debug = false;
+/* When non-zero, dump DIEs after they are read in.  */
+static unsigned int dwarf_die_debug = 0;
 
 /* When non-zero, dump line number entries as they are read in.  */
 unsigned int dwarf_line_debug = 0;
@@ -24735,14 +24735,14 @@ information.  A value greater than 1 provides more verbose information."),
                            NULL,
                            &setdebuglist, &showdebuglist);
 
-  add_setshow_boolean_cmd ("dwarf-die", no_class, &dwarf_die_debug, _("\
+  add_setshow_zuinteger_cmd ("dwarf-die", no_class, &dwarf_die_debug, _("\
 Set debugging of the DWARF DIE reader."), _("\
 Show debugging of the DWARF DIE reader."), _("\
-When enabled, DIEs are dumped after they are read in.\n\
+When enabled (non-zero), DIEs are dumped after they are read in.\n\
 The value is the maximum depth to print."),
-                          NULL,
-                          NULL,
-                          &setdebuglist, &showdebuglist);
+                            NULL,
+                            NULL,
+                            &setdebuglist, &showdebuglist);
 
   add_setshow_zuinteger_cmd ("dwarf-line", no_class, &dwarf_line_debug, _("\
 Set debugging of the dwarf line reader."), _("\
This page took 0.036494 seconds and 4 git commands to generate.