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/RFA] NetBSD/i386 signal trampoline fixes


This is a companion to the change I just checked in for a bunch of
other NetBSD targets, but since this touches shared-by-other-BSDs code,
I think I need approval for it (the shared-code change is actually to
move the NetBSD-specific bits into a NetBSD-specifc tdep file).

The main reasons for moving the code are:

	1. The shared BSD code is not nearly as applicable to NetBSD
	   today as it once was.

	2. The signal trampoline fixes involve calling a function in
	   nbsd-tdep.c, and having that function call in shared code
	   is not appropriate.

	3. It will make it easier for me to maintain the NetBSD code
	   if it's not in a shared source file (and if it's only
	   applicable to NetBSD, it shouldn't be in a shared source file :-)

Once this change is in, I will be making additional changes to the signal
handling for NetBSD/i386, so I consider bullet #3 above to be pretty
important.

	* Makefile.in (i386nbsd-tdep.o): Add $(arch_utils_h),
	$(i386_tdep_h), and nbsd-tdep.h to dependency list.
	* i386-tdep.h (i386bsd_init_abi): New prototype.
	* i386bsd-tdep.c (i386bsd_init_abi): Remove "static" from
	function declaration.
	(_initialize_i386bsd_tdep): Don't register OS ABI handlers
	for NetBSD-a.out or NetBSD-ELF.
	(i386nbsd_sigtramp_start, i386nbsd_sigtramp_end)
	(i386nbsd_sc_pc_offset, i386nbsd_sc_sp_offset)
	(i386nbsd_init_abi, i386nbsdelf_init_abi): Move to...
	* i386nbsd-tdep.c: ...here.  Include arch-utils.h, i386-tdep.h,
	and nbsd-tdep.h.
	(i386nbsd_pc_in_sigtramp): New function.
	(i386nbsd_init_abi): Set gdbarch_pc_in_sigtramp to
	i386nbsd_pc_in_sigtramp.
	(_initialize_i386nbsd_tdep): Register i386nbsd_init_abi
	and i386nbsdelf_init_abi OS ABI handlers.
	* config/i386/nbsdaout.mt (TDEPFILES): Add nbsd-tdep.o.
	* config/i386/nbsdelf.mt (TDEPFILES): Likewise.

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

Attachment: i386-nbsd-sigtramp-patch
Description: Text document


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