From: Yao Qi Date: Fri, 1 Nov 2013 04:28:54 +0000 (+0800) Subject: Use target_read_code in disassemble. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=283f7163ecb9e36c817ded1c7306650d1dc44c11;p=binutils-gdb.git Use target_read_code in disassemble. This patch teaches "disassembly" use code cache mechanism to read target code. gdb: 2013-11-24 Yao Qi * disasm.c (dis_asm_read_memory): Call target_read_code instead of target_read_memory. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index b91eb51f9b0..aec07687c65 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2013-11-24 Yao Qi + + * disasm.c (dis_asm_read_memory): Call target_read_code + instead of target_read_memory. + 2013-11-24 Yao Qi * NEWS: Add note on new "set code-cache" option. diff --git a/gdb/disasm.c b/gdb/disasm.c index 16903952519..09ae465b52a 100644 --- a/gdb/disasm.c +++ b/gdb/disasm.c @@ -47,7 +47,7 @@ static int dis_asm_read_memory (bfd_vma memaddr, gdb_byte *myaddr, unsigned int len, struct disassemble_info *info) { - return target_read_memory (memaddr, myaddr, len); + return target_read_code (memaddr, myaddr, len); } /* Like memory_error with slightly different parameters. */