Change boolean options to bool instead of int
[deliverable/binutils-gdb.git] / gdb / tracepoint.c
index c7585c67839d97cd39e7cf7b58f08708d0397847..c2c5f4224622b3c141c819b0d26432309acd3bd3 100644 (file)
 #include "cli/cli-utils.h"
 #include "probe.h"
 #include "ctf.h"
-#include "common/filestuff.h"
-#include "common/rsp-low.h"
+#include "gdbsupport/filestuff.h"
+#include "gdbsupport/rsp-low.h"
 #include "tracefile.h"
 #include "location.h"
 #include <algorithm>
 
-/* readline include files */
-#include "readline/readline.h"
-#include "readline/history.h"
-
-/* readline defines this.  */
-#undef savestring
-
 #include <unistd.h>
 
 /* Maximum length of an agent aexpression.
@@ -138,12 +131,12 @@ static struct cmd_list_element *tfindlist;
 /* List of expressions to collect by default at each tracepoint hit.  */
 char *default_collect;
 
-static int disconnected_tracing;
+static bool disconnected_tracing;
 
 /* This variable controls whether we ask the target for a linear or
    circular trace buffer.  */
 
-static int circular_trace_buffer;
+static bool circular_trace_buffer;
 
 /* This variable is the requested trace buffer size, or -1 to indicate
    that we don't care and leave it up to the target to set a size.  */
@@ -2000,8 +1993,8 @@ trace_status_mi (int on_stop)
            {
              uiout->field_string ("stop-reason", stop_reason);
              if (stopping_tracepoint != -1)
-               uiout->field_int ("stopping-tracepoint",
-                                 stopping_tracepoint);
+               uiout->field_signed ("stopping-tracepoint",
+                                    stopping_tracepoint);
              if (ts->stop_reason == tracepoint_error)
                uiout->field_string ("error-description",
                                     ts->stop_desc);
@@ -2010,16 +2003,16 @@ trace_status_mi (int on_stop)
     }
 
   if (ts->traceframe_count != -1)
-    uiout->field_int ("frames", ts->traceframe_count);
+    uiout->field_signed ("frames", ts->traceframe_count);
   if (ts->traceframes_created != -1)
-    uiout->field_int ("frames-created", ts->traceframes_created);
+    uiout->field_signed ("frames-created", ts->traceframes_created);
   if (ts->buffer_size != -1)
-    uiout->field_int ("buffer-size", ts->buffer_size);
+    uiout->field_signed ("buffer-size", ts->buffer_size);
   if (ts->buffer_free != -1)
-    uiout->field_int ("buffer-free", ts->buffer_free);
+    uiout->field_signed ("buffer-free", ts->buffer_free);
 
-  uiout->field_int ("disconnected",  ts->disconnected_tracing);
-  uiout->field_int ("circular",  ts->circular_buffer);
+  uiout->field_signed ("disconnected",  ts->disconnected_tracing);
+  uiout->field_signed ("circular",  ts->circular_buffer);
 
   uiout->field_string ("user-name", ts->user_name);
   uiout->field_string ("notes", ts->notes);
@@ -2183,8 +2176,8 @@ tfind_1 (enum trace_find_type type, int num,
       if (uiout->is_mi_like_p ())
        {
          uiout->field_string ("found", "1");
-         uiout->field_int ("tracepoint", tracepoint_number);
-         uiout->field_int ("traceframe", traceframe_number);
+         uiout->field_signed ("tracepoint", tracepoint_number);
+         uiout->field_signed ("traceframe", traceframe_number);
        }
       else
        {
@@ -3665,7 +3658,7 @@ print_one_static_tracepoint_marker (int count,
 
   /* A counter field to help readability.  This is not a stable
      identifier!  */
-  uiout->field_int ("count", count);
+  uiout->field_signed ("count", count);
 
   uiout->field_string ("marker-id", marker.str_id.c_str ());
 
@@ -3713,7 +3706,7 @@ print_one_static_tracepoint_marker (int count,
       else
        uiout->field_skip ("fullname");
 
-      uiout->field_int ("line", sal.line);
+      uiout->field_signed ("line", sal.line);
     }
   else
     {
@@ -3741,12 +3734,12 @@ print_one_static_tracepoint_marker (int count,
            if (ix > 0)
              uiout->text (", ");
            uiout->text ("#");
-           uiout->field_int ("tracepoint-id", tracepoints[ix]->number);
+           uiout->field_signed ("tracepoint-id", tracepoints[ix]->number);
          }
       }
 
       if (uiout->is_mi_like_p ())
-       uiout->field_int ("number-of-tracepoints", tracepoints.size ());
+       uiout->field_signed ("number-of-tracepoints", tracepoints.size ());
       else
        uiout->text ("\n");
     }
@@ -4001,7 +3994,7 @@ _initialize_tracepoint (void)
   tracepoint_number = -1;
 
   add_info ("scope", info_scope_command,
-           _("List the variables local to a scope"));
+           _("List the variables local to a scope."));
 
   add_cmd ("tracepoints", class_trace,
           _("Tracing of program execution without stopping the program."),
@@ -4024,16 +4017,14 @@ If no arguments are supplied, delete all variables."), &deletelist);
   /* FIXME add a trace variable completer.  */
 
   add_info ("tvariables", info_tvariables_command, _("\
-Status of trace state variables and their values.\n\
-"));
+Status of trace state variables and their values."));
 
   add_info ("static-tracepoint-markers",
            info_static_tracepoint_markers_command, _("\
-List target static tracepoints markers.\n\
-"));
+List target static tracepoints markers."));
 
   add_prefix_cmd ("tfind", class_trace, tfind_command, _("\
-Select a trace frame;\n\
+Select a trace frame.\n\
 No argument means forward by one frame; '-' means backward by one frame."),
                  &tfindlist, "tfind ", 1, &cmdlist);
 
@@ -4134,8 +4125,8 @@ depending on target's capabilities."));
   default_collect = xstrdup ("");
   add_setshow_string_cmd ("default-collect", class_trace,
                          &default_collect, _("\
-Set the list of expressions to collect by default"), _("\
-Show the list of expressions to collect by default"), NULL,
+Set the list of expressions to collect by default."), _("\
+Show the list of expressions to collect by default."), NULL,
                          NULL, NULL,
                          &setlist, &showlist);
 
@@ -4175,22 +4166,22 @@ disables any attempt to set the buffer size and lets the target choose."),
 
   add_setshow_string_cmd ("trace-user", class_trace,
                          &trace_user, _("\
-Set the user name to use for current and future trace runs"), _("\
-Show the user name to use for current and future trace runs"), NULL,
+Set the user name to use for current and future trace runs."), _("\
+Show the user name to use for current and future trace runs."), NULL,
                          set_trace_user, NULL,
                          &setlist, &showlist);
 
   add_setshow_string_cmd ("trace-notes", class_trace,
                          &trace_notes, _("\
-Set notes string to use for current and future trace runs"), _("\
-Show the notes string to use for current and future trace runs"), NULL,
+Set notes string to use for current and future trace runs."), _("\
+Show the notes string to use for current and future trace runs."), NULL,
                          set_trace_notes, NULL,
                          &setlist, &showlist);
 
   add_setshow_string_cmd ("trace-stop-notes", class_trace,
                          &trace_stop_notes, _("\
-Set notes string to use for future tstop commands"), _("\
-Show the notes string to use for future tstop commands"), NULL,
+Set notes string to use for future tstop commands."), _("\
+Show the notes string to use for future tstop commands."), NULL,
                          set_trace_stop_notes, NULL,
                          &setlist, &showlist);
 }
This page took 0.030395 seconds and 4 git commands to generate.