Uniquefy gdb.threads/attach-into-signal.exp
[deliverable/binutils-gdb.git] / gdb / i386-tdep.c
index 6304591662fcff85665ba6e46059f8cc5ac53cf4..371a2828df37cfea7a8e743bf37bc8c051c9cc9c 100644 (file)
@@ -50,8 +50,6 @@
 
 #include "record.h"
 #include "record-full.h"
-#include <stdint.h>
-
 #include "features/i386/i386.c"
 #include "features/i386/i386-avx.c"
 #include "features/i386/i386-mpx.c"
@@ -8678,12 +8676,15 @@ i386_mpx_get_bt_entry (CORE_ADDR ptr, CORE_ADDR bd_base)
 
   if (gdbarch_ptr_bit (gdbarch) == 64)
     {
-      mpx_bd_mask = MPX_BD_MASK;
+      mpx_bd_mask = (CORE_ADDR) MPX_BD_MASK;
       bd_ptr_r_shift = 20;
       bd_ptr_l_shift = 3;
       bt_select_r_shift = 3;
       bt_select_l_shift = 5;
-      bt_mask = MPX_BT_MASK;
+      bt_mask = (CORE_ADDR) MPX_BT_MASK;
+
+      if ( sizeof (CORE_ADDR) == 4)
+       error (_("operation not supported"));
     }
   else
     {
@@ -8717,7 +8718,7 @@ static void
 i386_mpx_print_bounds (const CORE_ADDR bt_entry[4])
 {
   struct ui_out *uiout = current_uiout;
-  long long int size;
+  LONGEST size;
   struct gdbarch *gdbarch = get_current_arch ();
   CORE_ADDR onecompl = ~((CORE_ADDR) 0);
   int bounds_in_map = ((~bt_entry[1] == 0 && bt_entry[0] == onecompl) ? 1 : 0);
@@ -8752,7 +8753,7 @@ i386_mpx_print_bounds (const CORE_ADDR bt_entry[4])
 
       size = (size > -1 ? size + 1 : size);
       ui_out_text (uiout, ", size = ");
-      ui_out_field_fmt (uiout, "size", "%lld", size);
+      ui_out_field_fmt (uiout, "size", "%s", plongest (size));
 
       ui_out_text (uiout, ", metadata = ");
       ui_out_field_core_addr (uiout, "metadata", gdbarch, bt_entry[3]);
@@ -8774,11 +8775,17 @@ i386_mpx_info_bounds (char *args, int from_tty)
   struct type *data_ptr_type = builtin_type (gdbarch)->builtin_data_ptr;
 
   if (!i386_mpx_enabled ())
-    error (_("Intel(R) Memory Protection Extensions not\
- supported on this target."));
+    {
+      printf_unfiltered (_("Intel(R) Memory Protection Extensions not "
+                          "supported on this target.\n"));
+      return;
+    }
 
   if (args == NULL)
-    error (_("Address of pointer variable expected."));
+    {
+      printf_unfiltered (_("Address of pointer variable expected.\n"));
+      return;
+    }
 
   addr = parse_and_eval_address (args);
 
@@ -8853,7 +8860,7 @@ static struct cmd_list_element *mpx_set_cmdlist, *mpx_show_cmdlist;
 static void
 set_mpx_cmd (char *args, int from_tty)
 {
-  help_list (mpx_set_cmdlist, "set mpx", all_commands, gdb_stdout);
+  help_list (mpx_set_cmdlist, "set mpx ", all_commands, gdb_stdout);
 }
 
 /* Helper function for the CLI commands.  */
@@ -8898,7 +8905,7 @@ is \"default\"."),
 
   add_prefix_cmd ("mpx", class_support, set_mpx_cmd, _("\
 Set Intel(R) Memory Protection Extensions specific variables."),
-                 &mpx_set_cmdlist, "set tdesc ",
+                 &mpx_set_cmdlist, "set mpx ",
                  0 /* allow-unknown */, &setlist);
 
   /* Add "mpx" prefix for the show commands.  */
This page took 0.024605 seconds and 4 git commands to generate.