From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4800 invoked by alias); 5 May 2003 21:09:57 -0000 Mailing-List: contact insight-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: insight-owner@sources.redhat.com Received: (qmail 4793 invoked from network); 5 May 2003 21:09:57 -0000 Received: from unknown (HELO localhost.redhat.com) (207.219.125.105) by sources.redhat.com with SMTP; 5 May 2003 21:09:57 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id C6A6C2B2F; Mon, 5 May 2003 17:09:54 -0400 (EDT) Message-ID: <3EB6D322.1040304@redhat.com> Date: Mon, 05 May 2003 21:09:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030223 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Liang, James" Cc: "'insight@sources.redhat.com'" Subject: Re: xfer_memory instead of target_read_memory in gdbtk_dis_asm_read_m emory References: <71251C7D5FB1D2119C8F0008C7A44ED10379207F@es07snlnt.sandia.gov> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-q2/txt/msg00060.txt.bz2 > Why is it that > gdbtk_dis_asm_read_memory uses xfer_memory instead of target_read_memory?? > I see the documented assumption, but why is that > assumption made? Performance. Accessing the local executable's text section is faster than a remote target's memory. However, the assumption has problems. Insight can't disassemble stuff in the BSS section or on the stack. GDB's gdb_disassemble() function was recent changed to not do this performance tweak, instead ``set trust read-only-sections on'' can be used. Insight should also just use gdb_disassemble(). Andrew