This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] i386nbsd_pc_in_sigtramp robustness


The strategy of comparing against hard-coded addresses to find the
signal trampoline is a bad one; it is possible for the user to change
the VM layout, and thus the location of the signal trampoline, with a
kernel option.

The following patch changes the i386-netbsd* targets to disassemble to
find the trampoline, as is done for other NetBSD targets.

Committed to trunk.

	* i386nbsd-tdep.c (i386nbsd_sigtramp_offset): New function.
	(i386nbsd_pc_in_sigtramp): Rewrite to use i386nbsd_sigtramp_offset.
	(i386nbsd_init_abi): Don't initialize tdep->sigtramp_start or
	tdep->sigtramp_end.
	(i386nbsd_sigtramp_start, i386nbsd_sigtramp_end): Remove.
	* config/i386/tm-nbsd.h (SIGTRAMP_START, SIGTRAMP_END)
	(i386bsd_sigtramp_start, i386bsd_sigtramp_end): Remove.

-- 
        -- Jason R. Thorpe <thorpej@wasabisystems.com>

Attachment: i386nbsd-sig-patch
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]