This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix RT signal frames on s390


Hello,

the s390 signal trampoline unwinder doesn't work with RT signal
frames, because I neglected to take struct member alignment 
padding into account.   Fixed by the following patch.

[B.t.w. we have now gotten the approval for a full 'future'
copyright assignment for gdb;  the letter was already sent
to the FSF copyright clerk.  This should simplify future
patches, I hope ... ]

Bye,
Ulrich

ChangeLog:

	* s390-tdep.c (s390_sigtramp_frame_unwind_cache): Account for
	alignment padding when accessing ucontext struct members.


Index: gdb/s390-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/s390-tdep.c,v
retrieving revision 1.130
diff -c -p -r1.130 s390-tdep.c
*** gdb/s390-tdep.c	22 Mar 2004 22:33:33 -0000	1.130
--- gdb/s390-tdep.c	23 Apr 2004 16:15:19 -0000
*************** s390_sigtramp_frame_unwind_cache (struct
*** 2153,2159 ****
  	ucontext (contains sigregs at offset 5 words)  */
    if (next_ra == next_cfa)
      {
!       sigreg_ptr = next_cfa + 8 + 128 + 5*word_size;
      }
  
    /* Old-style RT frame and all non-RT frames:
--- 2153,2159 ----
  	ucontext (contains sigregs at offset 5 words)  */
    if (next_ra == next_cfa)
      {
!       sigreg_ptr = next_cfa + 8 + 128 + align_up (5*word_size, 8);
      }
  
    /* Old-style RT frame and all non-RT frames:
-- 
  Dr. Ulrich Weigand
  weigand@informatik.uni-erlangen.de


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]