Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFA]: x86-64 - remove `sizeof (struct siginfo)'
@ 2001-09-24 23:49 Jiri Smid
  2001-09-25  2:53 ` Mark Kettenis
  0 siblings, 1 reply; 2+ messages in thread
From: Jiri Smid @ 2001-09-24 23:49 UTC (permalink / raw)
  To: gdb-patches

  The folowing patch removes `sizeof (struct siginfo)' from x86-64
target file to avoid problems when building a cross-debugger.

  OK to commit?

Index: gdb/ChangeLog
from  Jiri Smid  <smid@naga.suse.cz>

	* x86-64-linux-tdep.c (LINUX_SIGINFO_SIZE): Add.
	(x86_64_linux_sigcontext_addr): Replace `sizeof (struct siginfo)'
	by LINUX_SIGINFO_SIZE.

Index: gdb/x86-64-linux-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/x86-64-linux-tdep.c,v
retrieving revision 1.2
diff -c -3 -p -r1.2 x86-64-linux-tdep.c
*** x86-64-linux-tdep.c	2001/09/21 22:57:29	1.2
--- x86-64-linux-tdep.c	2001/09/24 08:39:09
*************** x86_64_linux_sigtramp_start (CORE_ADDR p
*** 66,71 ****
--- 66,73 ----
    return pc;
  }
  
+ #define LINUX_SIGINFO_SIZE 128
+ 
  /* Offset to struct sigcontext in ucontext, from <asm/ucontext.h>.  */
  #define LINUX_UCONTEXT_SIGCONTEXT_OFFSET (36)
  
*************** x86_64_linux_sigcontext_addr (struct fra
*** 83,94 ****
  	/* If this isn't the top frame, the next frame must be for the
  	   signal handler itself.  The sigcontext structure is part of
  	   the user context. */
! 	return frame->next->frame + sizeof (struct siginfo) +
  	  LINUX_UCONTEXT_SIGCONTEXT_OFFSET;
  
  
        /* This is the top frame. */
!       return read_register (SP_REGNUM) + sizeof (struct siginfo) +
  	LINUX_UCONTEXT_SIGCONTEXT_OFFSET;
  
      }
--- 85,96 ----
  	/* If this isn't the top frame, the next frame must be for the
  	   signal handler itself.  The sigcontext structure is part of
  	   the user context. */
! 	return frame->next->frame + LINUX_SIGINFO_SIZE +
  	  LINUX_UCONTEXT_SIGCONTEXT_OFFSET;
  
  
        /* This is the top frame. */
!       return read_register (SP_REGNUM) + LINUX_SIGINFO_SIZE +
  	LINUX_UCONTEXT_SIGCONTEXT_OFFSET;
  
      }

-- 
Jiri Smid

---------------------------------------------------------------------
SuSE CR, s.r.o.                                 e-mail: smid@suse.cz
Drahobejlova 27                                tel:+420 2 96542 373
190 00 Praha 9                                 fax:+420 2 96542 374
Ceska republika                                http://www.suse.cz


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-09-25  2:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-09-24 23:49 [RFA]: x86-64 - remove `sizeof (struct siginfo)' Jiri Smid
2001-09-25  2:53 ` Mark Kettenis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox