This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH][SPARC64] Fix invalid offsets to access fpregset_t
- From: Mark Kettenis <mark dot kettenis at xs4all dot nl>
- To: jose dot marchesi at oracle dot com
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 13 Feb 2014 20:41:49 +0100 (CET)
- Subject: Re: [PATCH][SPARC64] Fix invalid offsets to access fpregset_t
- Authentication-results: sourceware.org; auth=none
- References: <874n439dgk dot fsf at oracle dot com>
>
> Hi.
>
> I noticed that the %fsr register is not being properly accessed from gdb
> in sparc64. This is because sparc64_supply_fpregset and
> sparc64_collect_fpregset are using the offsets from the
> sparc32_bsd_fpregset constant instead of sparc64_bsd_fpregset.
>
> How to reproduce the problem: set %f32 to some value and see how $fsr is
> modified as well. Also, execute a FCMP* instruction (if (myfloat >
> 3.14)) and see how $fsr does not change to reflect the fp condition
> codes.
>
> I checked and the BSD sparc64 targets are using the proper offsets.
> Ditto for the linux sparc32 target.
>
> This little patch fixes this problem. No noticeable regressions running
> the test suite.
>
> Ok to apply?
Sure!
> 2014-02-13 Jose E. Marchesi <jose.marchesi@oracle.com>
>
> * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Register
> the proper offsets to access fpregset_t.
>