From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5376 invoked by alias); 12 Apr 2010 13:05:12 -0000 Received: (qmail 5368 invoked by uid 22791); 12 Apr 2010 13:05:11 -0000 X-SWARE-Spam-Status: No, hits=-1.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SARE_MSGID_LONG45,TW_EG X-Spam-Check-By: sourceware.org Received: from mail-vw0-f41.google.com (HELO mail-vw0-f41.google.com) (209.85.212.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 12 Apr 2010 13:05:06 +0000 Received: by vws14 with SMTP id 14so136833vws.0 for ; Mon, 12 Apr 2010 06:05:04 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.44.198 with HTTP; Mon, 12 Apr 2010 06:05:01 -0700 (PDT) In-Reply-To: <201004120845.56101.pedro@codesourcery.com> References: <201004110252.35997.pedro@codesourcery.com> <201004120845.56101.pedro@codesourcery.com> Date: Mon, 12 Apr 2010 13:05:00 -0000 Received: by 10.220.126.140 with SMTP id c12mr1975208vcs.50.1271077501638; Mon, 12 Apr 2010 06:05:01 -0700 (PDT) Message-ID: Subject: Re: Fix solib-disc.exp regression with x86 gdbserver From: "H.J. Lu" To: Pedro Alves Cc: gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-04/txt/msg00344.txt.bz2 On Mon, Apr 12, 2010 at 12:45 AM, Pedro Alves wrot= e: > On Sunday 11 April 2010 22:12:08, H.J. Lu wrote: >> This patch breaks gdbserver on AVX. We have >> >> 1. Connect from GDB with XML support: >> =A0 =A0 =A0 gdbserver enables XML support. >> 2. Disconnect. >> 3. Reconnect from any GDB >> =A0 =A0 =A0 =A0a. gdberver assumes GDB doesn't support XML sets to >> =A0 =A0 =A0 =A0 =A0 target to Linux without AVX. >> =A0 =A0 =A0 =A0b. Gdbserver =A0aborts when it tries to invalidate regcac= he >> =A0 =A0 =A0 =A0 =A0 =A0since the target doesn't support AVX registers. >> >> I will try to fix it. >> > > Then, this means we're invalidating the regcache too late. > We're flushing the old regcache contents to the threads, that were > created using the previous gdb's register layout, but we're flushing > the data using the _new_ register cache layout and low target > methods. =A0That sounds wrong indeed. > > I think this would help. =A0Or is this still too late? > > -- > Pedro Alves > > 2010-04-12 =A0Pedro Alves =A0 > > =A0 =A0 =A0 =A0gdb/gdbserver/ > =A0 =A0 =A0 =A0* regcache.c (set_register_cache): Invalidate regcaches be= fore > =A0 =A0 =A0 =A0changing the register cache layout. > =A0 =A0 =A0 =A0(regcache_invalidate_one): Allow a NULL regcache. > =A0 =A0 =A0 =A0* linux-x86-low.c (x86_linux_update_xmltarget): Invalidate > =A0 =A0 =A0 =A0regcaches before changing the register cache layout or the= target > =A0 =A0 =A0 =A0regsets. > It works. Thanks. --=20 H.J.