From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25762 invoked by alias); 18 Nov 2013 08:23:26 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 25751 invoked by uid 89); 18 Nov 2013 08:23:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.8 required=5.0 tests=AWL,BAYES_05,RDNS_NONE,URIBL_BLOCKED autolearn=no version=3.3.2 X-HELO: relay1.mentorg.com Received: from Unknown (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 18 Nov 2013 08:23:24 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1ViK6u-00015O-Gy from Yao_Qi@mentor.com ; Mon, 18 Nov 2013 00:23:08 -0800 Received: from SVR-ORW-FEM-04.mgc.mentorg.com ([147.34.97.41]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Mon, 18 Nov 2013 00:23:08 -0800 Received: from qiyao.dyndns.org (147.34.91.1) by svr-orw-fem-04.mgc.mentorg.com (147.34.97.41) with Microsoft SMTP Server id 14.2.247.3; Mon, 18 Nov 2013 00:23:07 -0800 Message-ID: <5289CE0B.30709@codesourcery.com> Date: Mon, 18 Nov 2013 08:39:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: CC: Doug Evans Subject: [PATCH 10/10] Use target_read_code in disassemble. References: <1383458049-20893-1-git-send-email-yao@codesourcery.com> In-Reply-To: <1383458049-20893-1-git-send-email-yao@codesourcery.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2013-11/txt/msg00455.txt.bz2 [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 * 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