Date: Tue, 29 Sep 2015 15:47:42 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288371 - head/gnu/usr.bin/gdb/kgdb Message-ID: <201509291547.t8TFlgfr048468@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Tue Sep 29 15:47:42 2015 New Revision: 288371 URL: https://svnweb.freebsd.org/changeset/base/288371 Log: When XSAVE support was added on amd64, the FPU save area was moved out of 'struct pcb' and into a variable-sized region after the structure. The kgdb code currently only reads the pcb. It does not read in the FPU save area but instead passes stack garbage as the FPU's saved context. Fixing this would mean determining the proper size of the area and fetching it. However, this state is not saved for running CPUs in stoppcbs[], so the callback would also have to know to ignore those pcbs. Instead, just remove the call since it is of limited usefulness. It results in kgdb reporting the state of the FPU/SIMD registers in userland, not their current values in the kernel. In particular, it does not report the correct state for any code in the kernel which does use the FPU and would report incorrect values in that case. Reviewed by: kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D3743 Modified: head/gnu/usr.bin/gdb/kgdb/trgt_amd64.c Modified: head/gnu/usr.bin/gdb/kgdb/trgt_amd64.c ============================================================================== --- head/gnu/usr.bin/gdb/kgdb/trgt_amd64.c Tue Sep 29 15:30:27 2015 (r288370) +++ head/gnu/usr.bin/gdb/kgdb/trgt_amd64.c Tue Sep 29 15:47:42 2015 (r288371) @@ -72,7 +72,6 @@ kgdb_trgt_fetch_registers(int regno __un supply_register(AMD64_R8_REGNUM + 6, (char *)&pcb.pcb_r14); supply_register(AMD64_R15_REGNUM, (char *)&pcb.pcb_r15); supply_register(AMD64_RIP_REGNUM, (char *)&pcb.pcb_rip); - amd64_supply_fxsave(current_regcache, -1, (struct fpusave *)(&pcb + 1)); } void
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201509291547.t8TFlgfr048468>