6 Jul 2010 23:28
Re: support biarch gcore?
Mark Kettenis <mark.kettenis <at> xs4all.nl>
2010-07-06 21:28:46 GMT
2010-07-06 21:28:46 GMT
> Date: Tue, 6 Jul 2010 22:48:44 +0200 (CEST) > From: "Ulrich Weigand" <uweigand <at> de.ibm.com> > > Mark Kettenis wrote: > > > Fixing the code in linux-nat.c is a bit nasty: > > > > * The definition of the 32-bit version of gdb_gregset_t isn't readily > > available on 64-bit systems. > > > > * The code is used on all Linux platforms and only a few of them are > > bi-arch. > > This was really supposed to be fixed by the gdbarch_core_regset_sections > mechanism, which provides the names and sizes of all register sets > expected in a core file for the current architecture. > > However, it seems that this mechanism isn't currently used for .reg > itself, only for the other sections. While it is true that .reg needs > to be handled somewhat specially, it should still be possible to get > its size from gdbarch_core_regset_sections, and thus avoid the need > to use the gdb_gregset_t type. > > Unfortunately, it also turned out that the section sizes provided for > .reg in those targets that have gdbarch_core_regset_sections, while > currently unused, were also nearly all wrong ... > > The following patch fixes those sizes, and changes linux-nat.c to > use them. > > Tested on powerpc64-linux (-m64 / -m32), amd64-linux (-m64 / -m32), > and i386-linux with no regressions. In fact, it appears to fix all > pre-existing gcore-related failures on amd64 -m32 ... > > Thoughts? Although I don't feel qualified to judge the powerpc bits, this makes quite a bit of sense to me. And yes, the value for amd64-linux is obviously wrong.
RSS Feed