This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [rfc][2/3] gdbserver bi-arch support: core s390x part
- From: Daniel Jacobowitz <drow at false dot org>
- To: Ulrich Weigand <uweigand at de dot ibm dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 25 Feb 2008 22:55:27 -0500
- Subject: Re: [rfc][2/3] gdbserver bi-arch support: core s390x part
- References: <20080129202548.GA15063@caradoc.them.org> <200801292333.m0TNXXxP020392@d12av02.megacenter.de.ibm.com>
You're welcome to prod me when I drop out in the middle of a
conversation like this. Really. I'm sorry about the delay.
On Wed, Jan 30, 2008 at 12:33:33AM +0100, Ulrich Weigand wrote:
> Yes. Note that there are two different issues: whether we need
> to clear the high bit depends on the architecture of gdbserver,
> but the size of the register depends on the architecture of
> the inferior. To simplify the latter issue, maybe it would be
> nice if generic code had a "collect_register_as_addr" helper
> that would check the register's size and convert its contents
> to CORE_ADDR as appropriate?
Then we'd have room to squabble about whether that function sign
extended or not. Let's hold off on this one.
> * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
> reg-s390.o and reg-s390x.o.
>
> * linux-low.c (new_inferior): New global variable.
> (linux_create_inferior, linux_attach): Set it.
> (linux_wait_for_process): Call the_low_target.arch_setup after the
> target has stopped for the first time.
> (initialize_low): Do not call the_low_target.arch_setup.
>
> * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
> (s390_set_pc): Likewise.
> (s390_arch_setup): New function.
> (the_low_target): Use s390_arch_setup as arch_setup routine.
>
> * regcache.c (realloc_register_cache): New function.
> (set_register_cache): Call it for each existing regcache.
This looks great to me.
--
Daniel Jacobowitz
CodeSourcery