bug-glibc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ppc32 linux uc_mcontext changes


From: Daniel Barlow
Subject: ppc32 linux uc_mcontext changes
Date: Sat, 23 Aug 2003 01:11:05 +0100

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


I hope this is the right place to send this question.  Sorry if I have
the wrong list.

In glibc 2.3.1 on the 32 bit PowerPC, it was possible to access
machine registers in a signal context (e.g. from a SA_SIGINFO signal
handler) by doing something like

   ((context->uc_mcontext.regs)->gpr[offset])

In 2.3.2 this fails with the message

  error: structure has no member named `regs'

It looks from brief inspection as though changes to the ucontext
structure were made for compatibility purposes with ppc64.  So this 
code should now be

   ((context->uc_mcontext.gregs)[offset]);

However, this breaks it in the older revision.  Is there some symbol
in 2.3.2 that I can use to distinguish it from 2.3.1 and so achieve
source compatibility across this minor version change?  Or is there,
he asks hopefully, a cleaner alternative?


- -dan

- -- 

   http://www.cliki.net/ - Link farm for free CL-on-Unix resources 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE/RrEkHDK5ZnWQiRMRAreXAJ0U3b2VlQX0kJEqihzTAflUTVW2uACaAkVF
W8X1fzAOaU+ezr+GFBvTwk4=
=2Uy2
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]