longjmp() (and friends) is trapped because it causes a
non-local transfer of control. Basically, it can go
anywhere. the "p foo()" would then not return to the prompt.
What we know is that longjmp() will leave the function (it
goes to where the setjmp() was called from).
Also, look into libffi for how to call a C function by building a call.