This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: PR corefiles/11467: amd64 gdb generates corrupted 32bit core file


On Tue, Apr 13, 2010 at 11:40 AM, Mark Kettenis <mark.kettenis@xs4all.nl> wrote:
>
> Anyway, there is a somewhat fundamental flaw in
> linux-nat.c:linux_nat_do_thread_registers() in that it always passes
> the size of 64-bit version of gregset_t in the
> gdbarch_regset_from_core_section() call. ?That's wrong, and probably
> the ultimate reason why the 64x32 gcore case isn't working properly.
>

That is problematic. For GP registers, total size of GP registers
may not be the size of the note section of GP registers. So we
can't use that section size. For x86, we can use

size >= tdep->sizeof_gregset

with a comment saying something like "size of 64bit version
of gregset_t may be passed down."

-- 
H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]