#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"
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
{
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);
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]);
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);
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. */
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. */