[rfc] Improve NetBSD/i386 signal trampoline detection

Nick Hudson nick.hudson@dsl.pipex.com
Fri Oct 19 04:13:00 GMT 2007


I've put together a new patch.

On Thursday 11 October 2007 19:04:28 Daniel Jacobowitz wrote:
> Trivial comments: you've added #includes so Makefile.in needs an
> update (maybe I'll do automatic dependencies sometime soon); please
> include a ChangeLog with all patches;

Both done.

On Thursday 11 October 2007 20:13:14 Mark Kettenis wrote:
> > From: Nick Hudson <nick.hudson@dsl.pipex.com>
> > I think I need to add the instructions for when the
> > setcontext/sigreturn fails as well. Is this correct?
>
> Probably a good idea, since it makes the false positives even less
> likely.

Done.

> By not calling i386bsd_init_abi(), tdep->jb_pc_offset is no longer
> set.  You could initialize tdep->jb_pc_offset in i386nbsd_init_abi(),
> but I'd prefer leaving in the i386bsd_init_abi() call, because it
> shows the inheritance structure a bit more clearly.

OK, no problems - I've put it back.

> It'd also be nice to have some documentation about what versions of
> NetBSD use which sigtramp code (best to stick to official releases
> here).  Perhaps that information could be used to give somewhat more
> meaningfull names to the tramp_frame varaibles.

Each variable is numbered with the NetBSD dot release that the code was first 
seen.

You'll have to forgive the ChangeLog as it's completely alien to me.

Thanks,
Nick
-------------- next part --------------
A non-text attachment was scrubbed...
Name: diff
Type: text/x-diff
Size: 12092 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20071019/d7b4a864/attachment.bin>
-------------- next part --------------
	* i386nbsd-tdep.c: Include "trad-frame.h" and "tramp-frame.h"
	(sigtramp_retcode, i386nbsd_sigtramp_offset, i386nbsd_sigtramp_p):
	Remove
	(i386nbsd_mc_reg_offset): New array.
	(i386nbsd_sigtramp_cache_init): New function.
	(i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2, i386nbsd_sigtramp_si2)
	(i386nbsd_sigtramp_si31, i386nbsd_sigtramp_si4): New signal trampoline
	frame descriptions.
	(i386nbsd_init_abi): Override ABI sigcontext defaults and register
	new signal frame unwinders
	* Makefile.in (i386nbsd-tdep.o): Update dependencies.
	* tramp-frame.h (struct tramp_frame): Allow for 48 instructions


More information about the Gdb-patches mailing list