From owner-svn-src-stable-10@freebsd.org Thu Nov 5 21:22:24 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F1244A2776A; Thu, 5 Nov 2015 21:22:24 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A38151A20; Thu, 5 Nov 2015 21:22:24 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA5LMNdl036087; Thu, 5 Nov 2015 21:22:23 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA5LMN5r036086; Thu, 5 Nov 2015 21:22:23 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201511052122.tA5LMN5r036086@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 5 Nov 2015 21:22:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r290413 - in stable: 10/gnu/usr.bin/gdb/kgdb 9/gnu/usr.bin/gdb/kgdb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 21:22:25 -0000 Author: jhb Date: Thu Nov 5 21:22:23 2015 New Revision: 290413 URL: https://svnweb.freebsd.org/changeset/base/290413 Log: MFC 288371: 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. Modified: stable/10/gnu/usr.bin/gdb/kgdb/trgt_amd64.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/gnu/usr.bin/gdb/kgdb/trgt_amd64.c Directory Properties: stable/9/gnu/usr.bin/gdb/kgdb/ (props changed) Modified: stable/10/gnu/usr.bin/gdb/kgdb/trgt_amd64.c ============================================================================== --- stable/10/gnu/usr.bin/gdb/kgdb/trgt_amd64.c Thu Nov 5 20:24:56 2015 (r290412) +++ stable/10/gnu/usr.bin/gdb/kgdb/trgt_amd64.c Thu Nov 5 21:22:23 2015 (r290413) @@ -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