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.
This commit is contained in:
Yao Qi 2013-11-01 12:28:54 +08:00
parent 29453a1455
commit 283f7163ec
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
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.

View File

@ -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. */