-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from ADKaster/package-version-download
Changes to allow build from a fresh clone on current master
- Loading branch information
Showing
3 changed files
with
57 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
From acb36717d8dd76b5cb755edc53aa5cea7f24db01 Mon Sep 17 00:00:00 2001 | ||
From: Bruno Haible <[email protected]> | ||
Date: Fri, 12 May 2023 21:28:47 +0200 | ||
Subject: sigsegv: Add tentative support for Hurd/x86_64. | ||
|
||
Reported by Samuel Thibault <[email protected]>. | ||
|
||
* lib/sigsegv.c: Update from libsigsegv/src/fault-hurd-i386.h. | ||
--- | ||
ChangeLog | 6 ++++++ | ||
lib/sigsegv.c | 20 +++++++++++++++++--- | ||
2 files changed, 23 insertions(+), 3 deletions(-) | ||
|
||
diff --git a/lib/sigsegv.c b/lib/sigsegv.c | ||
index 5e943e4..aadba4e 100644 | ||
--- a/lib/sigsegv.c | ||
+++ b/lib/sigsegv.c | ||
@@ -365,12 +365,26 @@ int libsigsegv_version = LIBSIGSEGV_VERSION; | ||
# define SIGSEGV_FAULT_ADDRESS (unsigned long) code | ||
# define SIGSEGV_FAULT_CONTEXT scp | ||
|
||
-# if defined __i386__ | ||
+# if defined __x86_64__ | ||
+/* 64 bit registers */ | ||
+ | ||
+/* scp points to a 'struct sigcontext' (defined in | ||
+ glibc/sysdeps/mach/hurd/x86_64/bits/sigcontext.h). | ||
+ The registers, at the moment the signal occurred, get pushed on the stack | ||
+ through gnumach/x86_64/locore.S:alltraps and then copied into the struct | ||
+ through glibc/sysdeps/mach/hurd/x86/trampoline.c. */ | ||
+/* sc_rsp is unused (not set by gnumach/x86_64/locore.S:alltraps). We need | ||
+ to use sc_ursp. */ | ||
+# define SIGSEGV_FAULT_STACKPOINTER scp->sc_ursp | ||
+ | ||
+# elif defined __i386__ | ||
+/* 32 bit registers */ | ||
|
||
/* scp points to a 'struct sigcontext' (defined in | ||
glibc/sysdeps/mach/hurd/i386/bits/sigcontext.h). | ||
- The registers of this struct get pushed on the stack through | ||
- gnumach/i386/i386/locore.S:trapall. */ | ||
+ The registers, at the moment the signal occurred, get pushed on the stack | ||
+ through gnumach/i386/i386/locore.S:alltraps and then copied into the struct | ||
+ through glibc/sysdeps/mach/hurd/x86/trampoline.c. */ | ||
/* Both sc_esp and sc_uesp appear to have the same value. | ||
It appears more reliable to use sc_uesp because it is labelled as | ||
"old esp, if trapped from user". */ | ||
-- | ||
cgit v1.1 | ||
|