From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 872 invoked by alias); 14 Oct 2009 18:01:34 -0000 Received: (qmail 720 invoked by uid 22791); 14 Oct 2009 18:01:33 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from shell4.BAYAREA.NET (HELO shell4.bayarea.net) (209.128.82.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 14 Oct 2009 18:01:27 +0000 Received: (qmail 27787 invoked from network); 14 Oct 2009 11:01:24 -0700 Received: from 209-128-106-254.bayarea.net (HELO redwood.eagercon.com) (209.128.106.254) by shell4.bayarea.net with SMTP; 14 Oct 2009 11:01:24 -0700 Message-ID: <4AD611F2.6030507@eagercon.com> Date: Wed, 14 Oct 2009 18:01:00 -0000 From: Michael Eager User-Agent: Thunderbird 2.0.0.23 (X11/20090825) MIME-Version: 1.0 To: Michael Eager , Joel Brobecker , "gdb-patches@sourceware.org" , Eli Zaretskii Subject: Re: [PATCH] Support for Xilinx MicroBlaze References: <4ACA9EE8.1040007@eagercon.com> <20091014014655.GL5272@adacore.com> <4AD60F09.6020607@eagercon.com> <20091014175615.GA27572@caradoc.them.org> In-Reply-To: <20091014175615.GA27572@caradoc.them.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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 X-SW-Source: 2009-10/txt/msg00309.txt.bz2 Daniel Jacobowitz wrote: > On Wed, Oct 14, 2009 at 10:48:57AM -0700, Michael Eager wrote: >>>> + struct regcache *regcache = get_current_regcache (); >>> This one raised a red flag, as we try to avoid depending on global >>> variables. But I'm not sure what the kosher way of getting the regcache >>> would be. I thought there would be method to get the regcache from >>> a frame, but apparently not. Perhaps the right way is to use >>> get_thread_arch_regcache (inferior_ptid, gdbarch), but I'm not sure. >>> I'll ask Ulrich, who knows this area a lot better. >> I wasn't able to find a better way to get the regcache either. Perhaps >> it's known farther up the call tree, but it isn't passed to the >> software single step routine. > > Why do you need the regcache, rather than getting registers from the > frame? Not sure, offhand. It's the way the routine was originally written. But this is moot -- the code isn't needed and will be removed. -- Michael Eager eager@eagercon.com 1960 Park Blvd., Palo Alto, CA 94306 650-325-8077