This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC/RFT] Use core regset iterators on Sparc Solaris
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Ulrich Weigand <uweigand at de dot ibm dot com>
- Cc: gdb-patches at sourceware dot org, davem at redhat dot com
- Date: Wed, 3 Dec 2014 08:01:40 +0400
- Subject: Re: [RFC/RFT] Use core regset iterators on Sparc Solaris
- Authentication-results: sourceware.org; auth=none
- References: <201411281548 dot sASFmPd9001359 at d03av02 dot boulder dot ibm dot com>
Hi Ulrich,
> Sparc/Solaris is another native target still does not use the new-style
> iterate_over_regset_sections core file logic (allowing cross-debugging
> of core files and core file generation).
>
> Fortunately, it should be straightforward to enable to generic sparc logic
> here by simply providing an appropriate register map. In fact, the map
> itself is already present, and can just be reused. The only remaining
> parameters needed are the total sizes of the register sections in core
> files, which I've taken from public OpenSolaris sources.
>
> The patch is untested so far since I don't have access to a Sparc/Solaris
> system. Testing by Solaris maintainers would be much appreciated.
>
> Bye,
> Ulrich
>
> gdb/
> * config/sparc/sol2.mh (NATDEPFILES): Remove core-regset.o.
> * sparc-sol2-tdep.c: Include "regset.h".
> (sparc32_sol2_supply_core_gregset): New function.
> (sparc32_sol2_collect_core_gregset): Likewise.
> (sparc32_sol2_supply_core_fpregset): Likewise.
> (sparc32_sol2_collect_core_fpregset): Likewise.
> (sparc32_sol2_gregset, sparc32_sol2_fpregset): New variables.
> (sparc32_sol2_init_abi): Set tdep->gregset/sizeof_gregset and
> tdep->fpregset/sizeof_fpregset.
> * sparc64-sol2-tdep.c: Include "regset.h".
> (sparc64_sol2_supply_core_gregset): New function.
> (sparc64_sol2_collect_core_gregset): Likewise.
> (sparc64_sol2_supply_core_fpregset): Likewise.
> (sparc64_sol2_collect_core_fpregset): Likewise.
> (sparc64_sol2_gregset, sparc64_sol2_fpregset): New variables.
> (sparc64_sol2_init_abi): Set tdep->gregset/sizeof_gregset and
> tdep->fpregset/sizeof_fpregset.
I will try to test your patch with AdaCore's testsuite, but
currently, GDB does not build on Solaris, probably because of
the gnulib update. I will try focusing on that first, and then
do the testing.
--
Joel