From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14894 invoked by alias); 20 Mar 2002 20:41:59 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 14746 invoked from network); 20 Mar 2002 20:41:50 -0000 Received: from unknown (HELO localhost.redhat.com) (216.138.202.10) by sources.redhat.com with SMTP; 20 Mar 2002 20:41:50 -0000 Received: from cygnus.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id A41873EDC; Wed, 20 Mar 2002 15:41:50 -0500 (EST) Message-ID: <3C98F40E.1000500@cygnus.com> Date: Wed, 20 Mar 2002 12:41:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:0.9.8) Gecko/20020210 X-Accept-Language: en-us MIME-Version: 1.0 To: "Martin M. Hunt" Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] regcache fix References: <200203200228.g2K2Sri16880@localhost.localdomain> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-03/txt/msg00392.txt.bz2 > Currently build_regcache is called 3 times, once at initialization, > before any architectures are registered, once when the host is > registered and once when the target is registered. I don't see > any reason for the first call, and in some non-multiarched > targets it can cause core dumps. (the second time is for bfd's default architecture) Yep, ok! There is no longer a need to do this, and other similar, calls. Will make understanding things a little bit easier. Thanks for testing this on non-multi-arch as well. -- This change got me thinking again about your other post about initialization order and a race condition. You're right, there is one. All the gdbtype info needs to be created before anything else vis: o create base architecture o create gdbtypes from architecture o initialize everything else (like regcache). otherwize, as you were seeing with regcache, there isn't that guarentee that the type info is available. enjoy, Andrew