Re: gdb support for Linux vsyscall DSO

Roland McGrath
2003-05-16T02:25:44Z

> I'm not really sure. The code I referred to seems to be written for
> BSD-style signal trampolines, where the signal trampoline will call
> the signal handler. The Linux kernel calls the signal trampoline
> directly, so perhaps it doesn't need this code.

I assume you meant "calls the signal handler directly" here. I don't know
off hand what other systems do. Linux does point the PC directly at the
signal handler, but the return address on its stack is the sigreturn code.
So once the handler function is entered, the register and stack state looks
like that code was the caller.

> If the `z' augmentation doesn't confuse older libgcc's, I don't see
> why adding another augmentation would do so. But we should first
> determine if we really need it before adding it.

Oh, I see. It hadn't occurred to me you meant an augmentation addition,
and I was thinking of new opcodes or something like that.

> Well, GDB will do exactly that when the user gives the "return"
> command in a signal trampoline.

Does that need to work? Does it really work now? (Using "return" in a
signal handler function should work fine, and that is what seems like it
would matter.)