Beispiel #1
0
static void
iq2000_address_to_pointer (struct type *type, void *buf, CORE_ADDR addr)
{
    enum type_code target = TYPE_CODE (TYPE_TARGET_TYPE (type));

    if (target == TYPE_CODE_FUNC || target == TYPE_CODE_METHOD)
        addr = insn_ptr_from_addr (addr);
    store_unsigned_integer (buf, TYPE_LENGTH (type), addr);
}
Beispiel #2
0
static void
iq2000_address_to_pointer (struct gdbarch *gdbarch,
			   struct type *type, gdb_byte *buf, CORE_ADDR addr)
{
  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
  enum type_code target = TYPE_CODE (TYPE_TARGET_TYPE (type));

  if (target == TYPE_CODE_FUNC || target == TYPE_CODE_METHOD)
    addr = insn_ptr_from_addr (addr);
  store_unsigned_integer (buf, TYPE_LENGTH (type), byte_order, addr);
}