This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [rfc] [0/8] Get rid of current_gdbarch
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: deuling at de dot ibm dot com (Markus Deuling)
- Cc: gdb-patches at sourceware dot org (GDB Patches), brobecker at adacore dot com (Joel Brobecker), drow at false dot org (Daniel Jacobowitz), maxim at tensilica dot com (Maxim Grigoriev)
- Date: Tue, 9 Oct 2007 20:22:45 +0200 (CEST)
- Subject: Re: [rfc] [0/8] Get rid of current_gdbarch
Markus Deuling wrote:
> this is the next series of 8 mostly mechnical patches to get rid of of some trivial to replace occurences of current_gdbarch.
I've checked in all of those except:
- the xtensa-tdep.c patch (to give Maxim a chance to comment), and
- the stack.c patch, because of this:
@@ -1854,10 +1856,11 @@ If you continue, the return value that y
if (return_value != NULL)
{
struct type *return_type = value_type (return_value);
- gdb_assert (gdbarch_return_value (current_gdbarch, return_type,
+ gdb_assert (gdbarch_return_value (get_frame_arch (get_current_frame ()),
+ return_type,
NULL, NULL, NULL)
== RETURN_VALUE_REGISTER_CONVENTION);
- gdbarch_return_value (current_gdbarch, return_type,
+ gdbarch_return_value (get_frame_arch (get_current_frame ()), return_type,
get_current_regcache (), NULL /*read*/,
value_contents (return_value) /*write*/);
}
At this point, there's no need to involve get_current_frame. The
routine operates on the current regcache, and should simply consult
its architecture.
Thanks,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com