This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Support for Xilinx MicroBlaze


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]