Re: gdb out of sync with kernel/glibc?


Subject: Re: gdb out of sync with kernel/glibc?
From: Hollis (hollis-lists@austin.rr.com)
Date: Wed Jul 04 2001 - 11:12:01 MDT


On Wednesday 04 July 2001 03:19, you wrote:
>
> I have run into some sort of out of sync condition with gdb and the kernel,
> or glibc which will be a showstopper for me unless it get fixed so any help
> would be greatly appreciated:

[snip]

> [kbhend@localhost kbhend]$ gdb -c core
> GNU gdb 5.0
> Copyright 2000 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you
> are welcome to change it and/or distribute copies of it under certain
> conditions.Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB. Type "show warranty" for details.
> This GDB was configured as "ppc-yellowdog-linux".
> Core was generated by `kdeinit: kdesktop'.
> Program terminated with signal 11, Segmentation fault.
>
> warning: wrong size gregset struct in core file
>
> warning: wrong size fpregset struct in core file
>
> warning: wrong size gregset struct in core file
>
> warning: wrong size fpregset struct in core file
> #0 0x0 in ?? ()
> (gdb)

I get this exact problem with a simple test case. This is disappointing
because I had (different) gdb problems earlier in the development cycle which
were resolved.

> So gdb seems to have been built using either a glibc or a kernel that is
> using different structure for the core file and register sets.
>
> possible explanations:
>
> 1. I am using the default 2.2.19 kernel but glibc and gdb compiled against
> 2.4.X? Does 2.2.19 build a different core structure than 2.4.4? I know
> that glibc will build differently if a 2.4.X kernel is enabled versus
> a 2.2.X kernel. How was our glibc built?

I am running the YDL2 2.4.4 kernel, which seems to rule out this problem.

> 2. Altivec support was compiled into kernel, perhaps gdb does not support
> altivec and wrong register set sizes result?

I do seem to recall problems with gdb, altivec, and core files. I don't
remember specifics. CONFIG_ALTIVEC is enabled in both YDL2 kernels, and I
suspect that may be the problem. Perhaps you should try compiling a kernel
(any kernel) with Altivec disabled?

> Either way, should we be building and running apps against 2.4.X headers
> when we are actually running a 2.2.19 kernel?

I'm not an expert in this area, but I believe it has been vehemently stated
that no user-land application should include kernel headers (and this is the
purpose of '#ifdef __KERNEL__').

> What is the solution here? If I upgrade to the 2.4.X kernel, will gdb
> start working again or should I rebuild gdb against 2.2.19 headers?

2.4.4 won't help. You could try rebuilding gdb for 2.2.19, but I suspect that
won't help for the same reason.

> And how stable is the 2.4.X kernel? I have read horrow stores about file
> system and vm issues with those kernels on x86? Is 2.4.X stable enough to
> be used for all day-to-day operations including development?

I use the TSS 2.4.4 (which contains many patches beyond "normal" 2.4.4)
daily. I think most of the VM complaints began shortly after this, though I'm
not sure.

-Hollis



This archive was generated by hypermail 2a24 : Wed Jul 04 2001 - 10:15:20 MDT