[PATCH 10/10] Use target_read_code in disassemble.
Doug Evans
dje@google.com
Mon Nov 18 17:12:00 GMT 2013
On Mon, Nov 18, 2013 at 12:21 AM, Yao Qi <yao@codesourcery.com> wrote:
> [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. */
Looks good to me.
I realize there's a few nits remaining, but thanks for persevering!
More information about the Gdb-patches
mailing list