From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19330 invoked by alias); 6 Feb 2003 18:14:24 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 19323 invoked from network); 6 Feb 2003 18:14:23 -0000 Received: from unknown (HELO localhost.redhat.com) (172.16.49.200) by 172.16.49.205 with SMTP; 6 Feb 2003 18:14:23 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 5793D3CC9; Thu, 6 Feb 2003 13:14:16 -0500 (EST) Message-ID: <3E42A5F8.9080708@redhat.com> Date: Thu, 06 Feb 2003 18:14:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.1) Gecko/20021211 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Michal Ludvig Cc: gdb@sources.redhat.com, Michael Elizabeth Chastain , Mark Kettenis Subject: Re: regcache (Re: GDB respin) References: <200302031615.h13GFVP26477@duracef.shout.net> <3E3EA35D.3080300@redhat.com> <3E427169.5010702@suse.cz> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-02/txt/msg00131.txt.bz2 > diff -u -p -r1.33 -r1.34 > --- gdb/x86-64-tdep.c 26 Oct 2002 10:37:45 -0000 1.33 > +++ gdb/x86-64-tdep.c 26 Oct 2002 16:56:34 -0000 1.34 > @@ -925,11 +925,35 @@ x86_64_init_abi (struct gdbarch_info inf > + set_gdbarch_long_double_bit (gdbarch, 128); > + set_gdbarch_ps_regnum (gdbarch, 17); /* %eflags */ > + set_gdbarch_stab_reg_to_regnum (gdbarch, x86_64_dwarf2_reg_to_regnum); > + set_gdbarch_dwarf_reg_to_regnum (gdbarch, x86_64_dwarf2_reg_to_regnum); > + set_gdbarch_extract_return_value (gdbarch, NULL); > + set_gdbarch_store_return_value (gdbarch, NULL); > + set_gdbarch_extract_struct_value_address (gdbarch, NULL); > > If I comment out last three lines (those return_value related), the testsuite performs much better. But all the other lines seem have some influence on the results. Hmm, at least extract_return_value shouldn't be set to NULL. It should be doing: extract-return-value() -> legacy-extract-return-value() -> deprecated-extract-return-value() -> x86-64-extract-return-value So I'd at least remove the setting of that one. Since it is trying to restore the default, try setting it to legacy_...(). Same goes for store_return_value. I think extract_struct_value_address is puzzling but ok. > I'm about to convert x86-64 target to use regcache, but am not sure what must be done for it. Could someone please briefly explain me what is regcache all about and what must be changed in order to have the target regcache-compilant? Where previously the code wrote (directly or implicitly) to a global buffer, it how is given an explicit object (the regcache). You can use any *cooked*{read,write}* function you want in regcache.h. Typically the transformation is very direct: write_register() -> regcache_cooked_write(). > As I was looking to the sources I believe, that only x86_64_store_return_value() and x86_64_extract_return_value() must be modified. Am I right or not? Per above, yes, I think this is correct. Thanks! Andrew