Re: [PATCH v3] gdb: clean up x86 cpuid implementations

Mike Frysinger
2013-06-19T15:20:53Z

[-- Attachment #1: Type: Text/Plain, Size: 2367 bytes --]

On Wednesday 19 June 2013 11:05:57 Pedro Alves wrote:
> On 06/19/2013 03:53 PM, Mike Frysinger wrote:
> > On Wednesday 19 June 2013 07:43:42 Pedro Alves wrote:
> >> On 06/19/2013 03:46 AM, Mike Frysinger wrote:
> >>
> >> However, BTW, I failed to notice this before, but:
> >>> +++ b/gdb/common/i386-cpuid.h
> >>> @@ -0,0 +1,68 @@
> >>> +/*
> >>> + * Copyright (C) 2007-2013 Free Software Foundation, Inc.
> >>> + *
> >>> + * This file is free software; you can redistribute it and/or modify
> >>> it + * under the terms of the GNU General Public License as published
> >>> by the + * Free Software Foundation; either version 3, or (at your
> >>> option) any + * later version.
> >>> + *
> >>> + * This file is distributed in the hope that it will be useful, but
> >>> + * WITHOUT ANY WARRANTY; without even the implied warranty of
> >>> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> >>> + * General Public License for more details.
> >>> + *
> >>> + * Under Section 7 of GPL version 3, you are granted additional
> >>> + * permissions described in the GCC Runtime Library Exception, version
> >>> + * 3.1, as published by the Free Software Foundation.
> >>> + *
> >>> + * You should have received a copy of the GNU General Public License
> >>> and + * a copy of the GCC Runtime Library Exception along with this
> >>> program; + * see the files COPYING3 and COPYING.RUNTIME respectively.
> >>> If not, see + * <http://www.gnu.org/licenses/>.
> >>> + */
> >>
> >> This header only contains gdb bits. I don't see a reason for making
> >> it GPL w/ runtime exception, rather than regular GPLv3+.
> >> Was it just a copy/paste?
> >
> > from the top of the file:
> > /*
> > * Helper cpuid.h file copied from gcc-4.8.0. Code in gdb should not
> > * include this directly, but pull in i386-cpuid.h and use that func.
> > */
>
> That's the header of i386-gcc-cpuid.h. But I'm talking about (and have
> quoted) i386-cpuid.h, the wrapper.

too many cpuids :p

technically, i386-cpuid.h was spawned from the gdb/testsuite/gdb.arch/i386-
cpuid.h which itself was spawned from the gcc sources (and both include the
exception) which is why the header was retained.

then again, FSF owns both, so if we want to drop that, it shouldn't be an
issue. doesn't matter to me either way.
-mike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]