From ed036b4052193ba6790ba7ee94a33a364ace3b55 Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Fri, 19 Aug 2016 12:07:45 +0100 Subject: x32: gdbserver's agent bytecode JIT: fix "call" emission Running fast tracepoint tests on x32 exposes a latent bug in the agent bytecode jitting. There's a code path that forgets to emit the call opcode... Whoops. Fixes a bunch of gdb.trace/trace-condition.exp FAILs, like: (gdb) continue Continuing. Thread 1 "trace-condition" received signal SIGSEGV, Segmentation fault. 0x7ffec016 in ?? () (gdb) FAIL: gdb.trace/trace-condition.exp: ftrace: $rip == *set_point: advance through tracing gdb/gdbserver/ChangeLog: 2016-08-19 Pedro Alves * linux-x86-low.c (amd64_emit_call): Emit missing call opcode. --- gdb/gdbserver/linux-x86-low.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gdb/gdbserver/linux-x86-low.c') diff --git a/gdb/gdbserver/linux-x86-low.c b/gdb/gdbserver/linux-x86-low.c index 1ba98ba..d847b93 100644 --- a/gdb/gdbserver/linux-x86-low.c +++ b/gdb/gdbserver/linux-x86-low.c @@ -1842,6 +1842,8 @@ amd64_emit_call (CORE_ADDR fn) else { int offset32 = offset64; /* we know we can't overflow here. */ + + buf[i++] = 0xe8; /* call */ memcpy (buf + i, &offset32, 4); i += 4; } -- cgit v1.1