Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jiri Smid <smid@suse.cz>
To: gdb-patches@sources.redhat.com
Subject: [RFA]: x86-64 - remove `sizeof (struct siginfo)'
Date: Mon, 24 Sep 2001 23:49:00 -0000	[thread overview]
Message-ID: <s8vofnzg3z7.fsf@naga.suse.cz> (raw)

  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


             reply	other threads:[~2001-09-24 23:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-24 23:49 Jiri Smid [this message]
2001-09-25  2:53 ` Mark Kettenis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s8vofnzg3z7.fsf@naga.suse.cz \
    --to=smid@suse.cz \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox