static int
i386_darwin_sstep_at_sigreturn (x86_thread_state_t *regs)
{
+ enum bfd_endian byte_order = gdbarch_byte_order (target_gdbarch);
static const gdb_byte darwin_syscall[] = { 0xcd, 0x80 }; /* int 0x80 */
gdb_byte buf[sizeof (darwin_syscall)];
ULONGEST flags_addr;
unsigned int eflags;
- uctx_addr = read_memory_unsigned_integer (regs->uts.ts32.__esp + 4, 4);
- mctx_addr = read_memory_unsigned_integer (uctx_addr + 28, 4);
+ uctx_addr = read_memory_unsigned_integer
+ (regs->uts.ts32.__esp + 4, 4, byte_order);
+ mctx_addr = read_memory_unsigned_integer
+ (uctx_addr + 28, 4, byte_order);
flags_addr = mctx_addr + 12 + 9 * 4;
read_memory (flags_addr, (gdb_byte *) &eflags, 4);
static int
amd64_darwin_sstep_at_sigreturn (x86_thread_state_t *regs)
{
+ enum bfd_endian byte_order = gdbarch_byte_order (target_gdbarch);
static const gdb_byte darwin_syscall[] = { 0x0f, 0x05 }; /* syscall */
gdb_byte buf[sizeof (darwin_syscall)];
ULONGEST flags_addr;
unsigned int rflags;
- mctx_addr = read_memory_unsigned_integer (regs->uts.ts64.__rdi + 48, 8);
+ mctx_addr = read_memory_unsigned_integer
+ (regs->uts.ts64.__rdi + 48, 8, byte_order);
flags_addr = mctx_addr + 16 + 17 * 8;
/* AMD64 is little endian. */