aboutsummaryrefslogtreecommitdiff
path: root/gdb/amd64-tdep.c
diff options
context:
space:
mode:
authorYao Qi <yao@codesourcery.com>2013-10-23 21:49:32 +0800
committerYao Qi <yao@codesourcery.com>2013-12-10 20:27:56 +0800
commitbae8a07ab1793e3c7d4e596906f4d4b87588935e (patch)
treee5cb7505d753b544e71fb4dc9493b26eb5d23ff6 /gdb/amd64-tdep.c
parent0865b04a4dec8a458bee54081b5598a6268b0724 (diff)
downloadgdb-bae8a07ab1793e3c7d4e596906f4d4b87588935e.zip
gdb-bae8a07ab1793e3c7d4e596906f4d4b87588935e.tar.gz
gdb-bae8a07ab1793e3c7d4e596906f4d4b87588935e.tar.bz2
Use target_read_code in skip_prologue (amd64)
gdb: 2013-12-10 Yao Qi <yao@codesourcery.com> * amd64-tdep.c (amd64_analyze_stack_align): Call target_read_code instead of target_read_memory. (amd64_analyze_prologue): Call read_code_unsigned_integer instead of read_memory_unsigned_integer. Call read_code instead of read_memory. (amd64_skip_xmm_prologue): Likewise.
Diffstat (limited to 'gdb/amd64-tdep.c')
-rw-r--r--gdb/amd64-tdep.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c
index 1bb72ca..19968fc 100644
--- a/gdb/amd64-tdep.c
+++ b/gdb/amd64-tdep.c
@@ -1761,7 +1761,7 @@ amd64_analyze_stack_align (CORE_ADDR pc, CORE_ADDR current_pc,
int reg, r;
int offset, offset_and;
- if (target_read_memory (pc, buf, sizeof buf))
+ if (target_read_code (pc, buf, sizeof buf))
return pc;
/* Check caller-saved saved register. The first instruction has
@@ -2104,7 +2104,7 @@ amd64_analyze_prologue (struct gdbarch *gdbarch,
else
pc = amd64_analyze_stack_align (pc, current_pc, cache);
- op = read_memory_unsigned_integer (pc, 1, byte_order);
+ op = read_code_unsigned_integer (pc, 1, byte_order);
if (op == 0x55) /* pushq %rbp */
{
@@ -2117,7 +2117,7 @@ amd64_analyze_prologue (struct gdbarch *gdbarch,
if (current_pc <= pc + 1)
return current_pc;
- read_memory (pc + 1, buf, 3);
+ read_code (pc + 1, buf, 3);
/* Check for `movq %rsp, %rbp'. */
if (memcmp (buf, mov_rsp_rbp_1, 3) == 0
@@ -2185,7 +2185,7 @@ amd64_skip_xmm_prologue (CORE_ADDR pc, CORE_ADDR start_pc)
return pc;
/* START_PC can be from overlayed memory, ignored here. */
- if (target_read_memory (next_sal.pc - 4, buf, sizeof (buf)) != 0)
+ if (target_read_code (next_sal.pc - 4, buf, sizeof (buf)) != 0)
return pc;
/* test %al,%al */