From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 63064 invoked by alias); 29 Jun 2018 23:35:46 -0000 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 Received: (qmail 63053 invoked by uid 89); 29 Jun 2018 23:35:45 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.0 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:2782, dear X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 29 Jun 2018 23:35:43 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 143B05613A; Fri, 29 Jun 2018 19:35:42 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 66aGuzyx1i+Z; Fri, 29 Jun 2018 19:35:42 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id D23FC56138; Fri, 29 Jun 2018 19:35:41 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 1C3B187940; Fri, 29 Jun 2018 16:35:40 -0700 (PDT) Date: Fri, 29 Jun 2018 23:35:00 -0000 From: Joel Brobecker To: Sergio Durigan Junior Cc: Pedro Alves , gdb-patches@sourceware.org Subject: Re: Oh dear. I regret to inform you that commit de52b9607d2623f18b7a7dbee3e1123d8d63f5da might be unfortunate Message-ID: <20180629233540.GJ2511@adacore.com> References: <20180629222108.GG2511@adacore.com> <20180629225343.GH2511@adacore.com> <87vaa15gbn.fsf@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87vaa15gbn.fsf@redhat.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-SW-Source: 2018-06/txt/msg00755.txt.bz2 > I'm still seeing a breakage here on x86-64 Fedora GNU/Linux, when > building gdbserver: > > ../../../binutils-gdb/gdb/gdbserver/linux-x86-tdesc.c: In function ‘const target_desc* amd64_linux_read_description(uint64_t, bool)’: > ../../../binutils-gdb/gdb/gdbserver/linux-x86-tdesc.c:121:67: error: too few arguments to function ‘target_desc* amd64_create_target_description(uint64_t, bool, bool, bool)’ > *tdesc = amd64_create_target_description (xcr0, is_x32, true); > ^ > In file included from ../../../binutils-gdb/gdb/gdbserver/linux-x86-tdesc.c:26:0: > ../../../binutils-gdb/gdb/gdbserver/../arch/amd64.h:21:14: note: declared here > target_desc *amd64_create_target_description (uint64_t xcr0, bool is_x32, > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > Does the patch below make sense? It fixes the breakage for me. Thanks for looking into it and the patch! I think the parameter should be set to "true". Otherwise, it will not include the fs_base and gs_base register in the list of registers. Although the name of the source file says x86, the code itself is protected by... #ifdef __x86_64__ ... and is inside a function called amd64_linux_read_description. I also verified that this file gets compiled on amd64-linux platforms. See gdb/gdbserver/configure.srv: x86_64-*-linux*) srv_regobj="$srv_amd64_linux_regobj $srv_i386_linux_regobj" The last piece of confirmation is that setting the parameter to "true" provides the behavior before the parameter was added; and the reason for adding the parameter was to remove the {fs,gs}_base registers from the list for Windows only. Otherwise the rest (basically the ChangeLog) looks good. Thanks again! > diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog > index 2fd2d90a49..743d465d81 100644 > --- a/gdb/gdbserver/ChangeLog > +++ b/gdb/gdbserver/ChangeLog > @@ -1,3 +1,8 @@ > +2018-06-29 Sergio Durigan Junior > + > + * linux-x86-tdesc.c (amd64_linux_read_description): Add missing > + parameter in call to 'amd64_create_target_description'. > + > 2018-06-28 Jan Kratochvil > > * x86-tdesc.h: Remove executable permission flag. > diff --git a/gdb/gdbserver/linux-x86-tdesc.c b/gdb/gdbserver/linux-x86-tdesc.c > index 358659b295..7a45953dc9 100644 > --- a/gdb/gdbserver/linux-x86-tdesc.c > +++ b/gdb/gdbserver/linux-x86-tdesc.c > @@ -118,7 +118,7 @@ amd64_linux_read_description (uint64_t xcr0, bool is_x32) > > if (*tdesc == NULL) > { > - *tdesc = amd64_create_target_description (xcr0, is_x32, true); > + *tdesc = amd64_create_target_description (xcr0, is_x32, true, false); > > init_target_desc (*tdesc, amd64_expedite_regs); > } -- Joel