Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
GHC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gesh
GHC
Commits
ea88a4f7
Commit
ea88a4f7
authored
27 years ago
by
sof
Browse files
Options
Downloads
Patches
Plain Diff
[project @ 1997-06-09 07:39:20 by sof]
tidy up for irix6
parent
2d5214c0
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ghc/runtime/main/Signals.lc
+36
-12
36 additions, 12 deletions
ghc/runtime/main/Signals.lc
with
36 additions
and
12 deletions
ghc/runtime/main/Signals.lc
+
36
−
12
View file @
ea88a4f7
...
...
@@ -172,16 +172,37 @@ install_segv_handler(void)
#endif
}
# el
se /* Not SunOS 4, FreeBSD, or Linux(a.out) */
# el
if defined(irix6_TARGET_OS)
# if defined(irix_TARGET_OS)
# ifndef irix6_TARGET_OS /* will this do for irix-6.x ? ToDo: check. (SOF 5/97) */
/* certainly BOGUS (WDP 94/05) -- copied from /usr/include/sys/siginfo.h */
# define si_addr _data._fault._addr
# endif
# endif
static void
segv_handler(int sig, siginfo_t *sip, void *dummy)
{
fflush(stdout);
if (sip == NULL) {
fprintf(stderr, "Segmentation fault caught, address unknown\n");
} else {
if (sip->si_addr >= (void *) stks_space
&& sip->si_addr < (void *) (stks_space + RTSflags.GcFlags.stksSize))
StackOverflow();
fprintf(stderr, "Segmentation fault caught, address = %08lx\n", (W_) sip->si_addr);
}
abort();
}
int
install_segv_handler(STG_NO_ARGS)
{
struct sigaction action;
action.sa_sigaction = segv_handler;
sigemptyset(&action.sa_mask);
action.sa_flags = SA_SIGINFO;
return sigaction(SIGSEGV, &action, NULL);
}
# elif defined(cygwin32_TARGET_OS)
#if defined(cygwin32_TARGET_OS)
/*
The signal handlers in cygwin32 (beta14) are only passed the signal
number, no sigcontext/siginfo is passed as event data..sigh. For
...
...
@@ -217,7 +238,12 @@ install_segv_handler()
}
#else /* !defined(cygwin32_TARGET_OS) */
# else /* ! (cygwin32|irix6|sunos4|linux*|*bsd|aix) */
# if defined(irix_TARGET_OS)
/* certainly BOGUS (WDP 94/05) -- copied from /usr/include/sys/siginfo.h */
# define si_addr _data._fault._addr
# endif
static void
segv_handler(int sig, siginfo_t *sip)
...
...
@@ -248,9 +274,7 @@ install_segv_handler(STG_NO_ARGS)
return sigaction(SIGSEGV, &action, NULL);
}
#endif /* not cygwin32_TARGET_OS */
# endif /* not SunOS 4 */
# endif /* ! (cygwin32|irix6|sunos4|linux*|*bsd|aix) */
#endif /* STACK_CHECK_BY_PAGE_FAULT */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment