diff options
author | Yao Qi <yao@codesourcery.com> | 2013-11-01 12:28:54 +0800 |
---|---|---|
committer | Yao Qi <yao@codesourcery.com> | 2013-11-24 14:56:51 +0800 |
commit | 283f7163ecb9e36c817ded1c7306650d1dc44c11 (patch) | |
tree | 55e05c6b1a518f2309c92f9bcfe5ed30313bd75b /gdb | |
parent | 29453a14557af65ed7a0867722b0145bb9f0e0c2 (diff) | |
download | gdb-283f7163ecb9e36c817ded1c7306650d1dc44c11.zip gdb-283f7163ecb9e36c817ded1c7306650d1dc44c11.tar.gz gdb-283f7163ecb9e36c817ded1c7306650d1dc44c11.tar.bz2 |
Use target_read_code in disassemble.
This patch teaches "disassembly" use code cache mechanism to read
target code.
gdb:
2013-11-24 Yao Qi <yao@codesourcery.com>
* disasm.c (dis_asm_read_memory): Call target_read_code
instead of target_read_memory.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/disasm.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index b91eb51..aec0768 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2013-11-24 Yao Qi <yao@codesourcery.com> + * disasm.c (dis_asm_read_memory): Call target_read_code + instead of target_read_memory. + +2013-11-24 Yao Qi <yao@codesourcery.com> + * NEWS: Add note on new "set code-cache" option. * target-dcache.c (code_cache_enabled_1): New variable. (code_cache_enabled): New variable. diff --git a/gdb/disasm.c b/gdb/disasm.c index 1690395..09ae465 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. */ |