From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 87754 invoked by alias); 19 Aug 2019 19:18:43 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 87740 invoked by uid 89); 19 Aug 2019 19:18:43 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=HX-Languages-Length:519 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 19 Aug 2019 19:18:42 +0000 Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4FC7581106 for ; Mon, 19 Aug 2019 19:18:41 +0000 (UTC) Received: by mail-wm1-f70.google.com with SMTP id g2so56616wmk.5 for ; Mon, 19 Aug 2019 12:18:41 -0700 (PDT) Received: from ?IPv6:2001:8a0:f913:f700:4c97:6d52:2cea:997b? ([2001:8a0:f913:f700:4c97:6d52:2cea:997b]) by smtp.gmail.com with ESMTPSA id e9sm14425465wrt.69.2019.08.19.12.18.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 19 Aug 2019 12:18:39 -0700 (PDT) Subject: Re: Function used by GDB to access target sim memory To: William Tambe , gdb@sourceware.org References: From: Pedro Alves Message-ID: Date: Mon, 19 Aug 2019 19:18:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2019-08/txt/msg00026.txt.bz2 On 8/18/19 6:55 PM, William Tambe wrote: > What function does GDB use to access the simulator memory when "target > sim" is in use ? The interface between gdb and the sim is all in gdb/remote-sim.c. Sounds like you're looking for gdbsim_xfer_memory. > > For instance, to implement the access to the simulator registers, one must use: > CPU_REG_FETCH() > CPU_REG_STORE() > > Are there similar functions for accessing the simulator memory ? > Thanks, Pedro Alves