/* GNU/Linux S/390 specific low level interface, for the remote server
for GDB.
- Copyright (C) 2001-2020 Free Software Foundation, Inc.
+ Copyright (C) 2001-2021 Free Software Foundation, Inc.
This file is part of GDB.
struct emit_ops *emit_ops () override;
+ int get_ipa_tdesc_idx () override;
+
protected:
void low_arch_setup () override;
}
}
-/* Support for hardware single step. */
-
-static int
-s390_supports_hardware_single_step (void)
-{
- return 1;
-}
-
static struct usrregs_info s390_usrregs_info =
{
s390_num_regs,
return 6;
}
-/* Implementation of linux_target_ops method "get_ipa_tdesc_idx". */
+/* Implementation of target ops method "get_ipa_tdesc_idx". */
-static int
-s390_get_ipa_tdesc_idx (void)
+int
+s390_target::get_ipa_tdesc_idx ()
{
struct regcache *regcache = get_thread_regcache (current_thread, 0);
const struct target_desc *tdesc = regcache->tdesc;
0x98, 0x23, 0x10, 0x00, /* lm %r2, %r3, 0(%r1) */
};
if (num < 0x8000 && num >= 0)
- {
add_insns (buf_s, sizeof buf_s);
- }
else
- {
- s390_emit_litpool (8);
- add_insns ((unsigned char *) &n, sizeof n);
- add_insns (buf_l, sizeof buf_l);
- }
+ {
+ s390_emit_litpool (8);
+ add_insns ((unsigned char *) &n, sizeof n);
+ add_insns (buf_l, sizeof buf_l);
+ }
}
/* The "emit_call" emit_ops method for s390. */
0x58, 0x20, 0x10, 0x00, /* l %r2, 0(%r1) */
};
if (arg1 < 0x8000 && arg1 >= -0x8000)
- {
add_insns (buf_s, sizeof buf_s);
- }
else
- {
- s390_emit_litpool (4);
- add_insns ((unsigned char *) &arg1, sizeof arg1);
- add_insns (buf_l, sizeof buf_l);
- }
+ {
+ s390_emit_litpool (4);
+ add_insns ((unsigned char *) &arg1, sizeof arg1);
+ add_insns (buf_l, sizeof buf_l);
+ }
}
/* The "emit_int_call_1" emit_ops method for s390. */
0xe3, 0x20, 0x10, 0x00, 0x00, 0x04, /* lg %r2, 0(%r1) */
};
if (num < 0x8000 && num >= -0x8000)
- {
add_insns (buf_s, sizeof buf_s);
- }
else
- {
- s390_emit_litpool (8);
- add_insns ((unsigned char *) &n, sizeof n);
- add_insns (buf_l, sizeof buf_l);
- }
+ {
+ s390_emit_litpool (8);
+ add_insns ((unsigned char *) &n, sizeof n);
+ add_insns (buf_l, sizeof buf_l);
+ }
}
/* The "emit_call" emit_ops method for s390x. */
return &s390_emit_ops_impl;
}
-struct linux_target_ops the_low_target = {
- s390_supports_hardware_single_step,
- NULL, /* get_syscall_trapinfo */
- s390_get_ipa_tdesc_idx,
-};
-
/* The linux target ops object. */
linux_process_target *the_linux_target = &the_s390_target;