Oh dear. I regret to inform you that commit de52b9607d2623f18b7a7dbee3e1123d8d63f5da might be unfortunate
Message ID | 87vaa15gbn.fsf@redhat.com |
---|---|
State | New, archived |
Headers |
Received: (qmail 38832 invoked by alias); 29 Jun 2018 23:22:08 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: <gdb-patches.sourceware.org> List-Unsubscribe: <mailto:gdb-patches-unsubscribe-##L=##H@sourceware.org> List-Subscribe: <mailto:gdb-patches-subscribe@sourceware.org> List-Archive: <http://sourceware.org/ml/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-help@sourceware.org>, <http://sourceware.org/ml/#faqs> Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 38816 invoked by uid 89); 29 Jun 2018 23:22:07 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-24.7 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=x86-tdesc.h, x86tdesch, UD:x86-tdesc.h X-HELO: mx1.redhat.com Received: from mx3-rdu2.redhat.com (HELO mx1.redhat.com) (66.187.233.73) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 29 Jun 2018 23:22:06 +0000 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7785E40704B7; Fri, 29 Jun 2018 23:22:04 +0000 (UTC) Received: from localhost (unused-10-15-17-196.yyz.redhat.com [10.15.17.196]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5232C2026D68; Fri, 29 Jun 2018 23:22:04 +0000 (UTC) From: Sergio Durigan Junior <sergiodj@redhat.com> To: Joel Brobecker <brobecker@adacore.com> Cc: Pedro Alves <palves@redhat.com>, gdb-patches@sourceware.org Subject: Re: Oh dear. I regret to inform you that commit de52b9607d2623f18b7a7dbee3e1123d8d63f5da might be unfortunate References: <de52b9607d2623f18b7a7dbee3e1123d8d63f5da-master-breakage@gdb-build> <20180629222108.GG2511@adacore.com> <20180629225343.GH2511@adacore.com> Date: Fri, 29 Jun 2018 19:22:04 -0400 In-Reply-To: <20180629225343.GH2511@adacore.com> (Joel Brobecker's message of "Fri, 29 Jun 2018 15:53:43 -0700") Message-ID: <87vaa15gbn.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes |
Commit Message
Sergio Durigan Junior
June 29, 2018, 11:22 p.m. UTC
On Friday, June 29 2018, Joel Brobecker wrote: >> That must be me, so I will take a look now. I think it's because >> I didn't build with --enable-targets=all. > > Attached is the patch I just pushed to master. > > gdb/ChangeLog: > > * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing > parameter in call to amd64_target_description. > * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise. > * amd64-fbsd-tdep.c (amd64fbsd_core_read_description) > (amd64fbsd_init_abi): Likewise. > * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise. > * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise. > * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise. > * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise. > > The change to amd64-fbsd-nat.c was done "blind" (no access to system), > but is reasonably straightforward. The changes to the -tdep.c files > were verify by rebuilding GDB on x86_64-linux when configured with > --enable-targets=all. Hey Joel, 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,
Comments
> 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 <sergiodj@redhat.com> > + > + * linux-x86-tdesc.c (amd64_linux_read_description): Add missing > + parameter in call to 'amd64_create_target_description'. > + > 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com> > > * 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); > }
On Friday, June 29 2018, Joel Brobecker wrote: >> 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. Ah, thanks for the explanation. I should have investigated more before sending the patch; I was doing something else and just wanted to make GDB compile again. Glad I sent it here for your review! > Thanks again! No, I thank you! I pushed the patch with s/false/true/, and your name in the ChangeLog. >> 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 <sergiodj@redhat.com> >> + >> + * linux-x86-tdesc.c (amd64_linux_read_description): Add missing >> + parameter in call to 'amd64_create_target_description'. >> + >> 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com> >> >> * 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
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 <sergiodj@redhat.com> + + * linux-x86-tdesc.c (amd64_linux_read_description): Add missing + parameter in call to 'amd64_create_target_description'. + 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com> * 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); }