* sparc64obsd-tdep.c: Tweak comments.
(sparc64obsd_sigreturn_offset): Add offset for new OpenBSD 3.8 signal trampoline.
This commit is contained in:
parent
2f168eed4b
commit
47b4f8300a
2 changed files with 24 additions and 10 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2005-08-09 Mark Kettenis <kettenis@gnu.org>
|
||||||
|
|
||||||
|
* sparc64obsd-tdep.c: Tweak comments.
|
||||||
|
(sparc64obsd_sigreturn_offset): Add offset for new OpenBSD 3.8
|
||||||
|
signal trampoline.
|
||||||
|
|
||||||
2005-08-09 Andrew Cagney <cagney@gnu.org>
|
2005-08-09 Andrew Cagney <cagney@gnu.org>
|
||||||
|
|
||||||
* linux-nat.h (linux_proc_xfer_memory): Change type of "myaddr" a
|
* linux-nat.h (linux_proc_xfer_memory): Change type of "myaddr" a
|
||||||
|
|
|
@ -68,19 +68,27 @@ sparc64obsd_supply_gregset (const struct regset *regset,
|
||||||
|
|
||||||
/* Signal trampolines. */
|
/* Signal trampolines. */
|
||||||
|
|
||||||
/* The OpenBSD kernel maps the signal trampoline at some random
|
/* Since OpenBSD 3.2, the sigtramp routine is mapped at a random page
|
||||||
location in user space, which means that the traditional BSD way of
|
in virtual memory. The randomness makes it somewhat tricky to
|
||||||
detecting it won't work.
|
detect it, but fortunately we can rely on the fact that the start
|
||||||
|
of the sigtramp routine is page-aligned. We recognize the
|
||||||
|
trampoline by looking for the code that invokes the sigreturn
|
||||||
|
system call. The offset where we can find that code varies from
|
||||||
|
release to release.
|
||||||
|
|
||||||
The signal trampoline will be mapped at an address that is page
|
By the way, the mapping mentioned above is read-only, so you cannot
|
||||||
aligned. We recognize the signal trampoline by the looking for the
|
place a breakpoint in the signal trampoline. */
|
||||||
sigreturn system call. The offset where we can find the code that
|
|
||||||
makes this system call varies from release to release. For OpenBSD
|
|
||||||
3.6 and later releases we can find the code at offset 0xec. For
|
|
||||||
OpenBSD 3.5 and earlier releases, we find it at offset 0xe8. */
|
|
||||||
|
|
||||||
|
/* Default page size. */
|
||||||
static const int sparc64obsd_page_size = 8192;
|
static const int sparc64obsd_page_size = 8192;
|
||||||
static const int sparc64obsd_sigreturn_offset[] = { 0xec, 0xe8, -1 };
|
|
||||||
|
/* Offset for sigreturn(2). */
|
||||||
|
static const int sparc64obsd_sigreturn_offset[] = {
|
||||||
|
0xf0, /* OpenBSD 3.8 */
|
||||||
|
0xec, /* OpenBSD 3.6 */
|
||||||
|
0xe8, /* OpenBSD 3.2 */
|
||||||
|
-1
|
||||||
|
};
|
||||||
|
|
||||||
static int
|
static int
|
||||||
sparc64obsd_pc_in_sigtramp (CORE_ADDR pc, char *name)
|
sparc64obsd_pc_in_sigtramp (CORE_ADDR pc, char *name)
|
||||||
|
|
Loading…
Add table
Reference in a new issue