https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106813

Rainer Orth <ro at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ro at gcc dot gnu.org

--- Comment #1 from Rainer Orth <ro at gcc dot gnu.org> ---
FWIW I had a similar patch in my local tree for years, but neglected to submit
it (among others because it lacked dumpregs support.

While going over the remaining go.test failures recently, I noted some that
might be related, so I completed the patch (attached).  A few notes:

* I've used the customary __sun__ && __svr4__ guard for Solaris-specific code,
  not __sun && __SVR4 which is only used in runtime/go-libmain.c.

* I've reused the Linux/x86_64 code in dumpregs for Solaris.  Only a few
  adjustments were necessary, but this still seemed better than replicating
  the whole section.

* I've added SPARC support, too.  Since gregs[] is almost identical between
  32 and 64-bit, I've just used different formats for printing 32 and 64-bit
  registers, again to avoid massive duplication.

* When testing on Debian/sparc64, the 64-bit version there reguired an ugly
  variation: the general-purpose member of mcontext_t is called mc_gregs
  instead of gregs, and the indices are named MC_* instead of REG_* (although
  the names are identical with one exception).  I have no idea what rid them
  to do this, but at least my code does compile and run there.

The patch has been tested on i386-pc-solaris2.11, sparc-sun-solaris2.11,
x86_64-pc-linux-gnu, and sparc64-unknown-linux-gnu (32 and 64-bit each).

There were no regressions, but compared to a vanilla tree there where no new
PASSes either.

Reply via email to