This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 10/10] Use target_read_code in disassemble.
- From: Yao Qi <yao at codesourcery dot com>
- To: <gdb-patches at sourceware dot org>
- Cc: Doug Evans <dje at google dot com>
- Date: Mon, 18 Nov 2013 16:21:31 +0800
- Subject: [PATCH 10/10] Use target_read_code in disassemble.
- Authentication-results: sourceware.org; auth=none
- References: <1383458049-20893-1-git-send-email-yao at codesourcery dot com>
[Patch 10/10 is not sent out by git send-email. Send it now.]
This patch teaches "disassembly" use code cache mechanism to read
target code.
gdb:
2013-11-18 Yao Qi <yao@codesourcery.com>
* disasm.c (dis_asm_read_memory): Call target_read_code
instead of target_read_memory.
---
gdb/disasm.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/gdb/disasm.c b/gdb/disasm.c
index e643c2d..522e25f 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. */
--
1.7.7.6