Re: [OT] Re: gdb vs. glibc (glibc-devel-2.0.7-19, aka RedHat 5.1) vs , linux 2.1.124

Michael Meissner (meissner@cygnus.com)
Wed, 7 Oct 1998 08:24:33 -0400


On Wed, Oct 07, 1998 at 10:51:58AM +0200, Clifford Wolf wrote:
>
> On Tue, 6 Oct 1998, Michael Meissner wrote:
>
> > It appears that there is a discrepancy between glibc 2.0.7-19 as
> > shipped with RedHat 5.1 and the current kernel 2.1.124 that prevents
> > native gdb from being built. In particular, gdb includes the
> > following file because it believes the 386 has hardware watchpoints:
> >
> > <sys/debugreg.h>
> >
> > /usr/include/sys/debugreg.h has:
> >
> > #include <linux/debugreg.h>
> >
> > There is no file /usr/src/linux/include/linux/debugreg.h, but there is
> > a version in /usr/src/linux/include/asm-i386 (ie <asm/debugreg.h>).
> > It looks like the change was made in 2.1.113.
>
> To compile gdb 4.17 together with glibc 2.0.96 and kernel 2.1.123 for i386
> I use this little q+d patch to gdb (should work with your versions too):

Speaking personally, not as a Cygnus representative (and in any case, I work on
GCC, not GDB), this patch as presented is not acceptable for inclusion into
gdb, since there are other i386 systems that provide sys/debugreg.h that this
would break (notably sco5). I really think either glibc or the kernel should
provide the right files so that including sys/debugreg.h works as expected.

> --- gdb/i386v-nat.c Thu Jan 4 21:07:50 1996
> +++ gdb/i386v-nat.c Tue Aug 25 17:41:34 1998
> @@ -35,7 +35,7 @@
> #include <fcntl.h>
>
> #ifdef TARGET_HAS_HARDWARE_WATCHPOINTS
> -#include <sys/debugreg.h>
> +#include <asm/debugreg.h>
> #endif
>
> #include <sys/file.h>

-- 
Michael Meissner, Cygnus Solutions (Massachusetts office)
4th floor, 955 Massachusetts Avenue, Cambridge, MA 02139, USA
meissner@cygnus.com,	617-354-5416 (office),	617-354-7161 (fax)

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/