Question regarding storing/restoring data during inferior function call
Mark Kettenis
mark.kettenis@xs4all.nl
Tue Oct 18 20:00:00 GMT 2005
> Date: Tue, 18 Oct 2005 15:12:08 -0400
> From: Daniel Jacobowitz <drow@false.org>
> > Right now, the inferior function call is made AT_ENTRY_POINT. One
> > way to solve my problem that might work is to make the call ON_STACK.
> > Not sure if that's allowed on this chip. But this way, I can
> > dynamically create a small piece of code that does the branch to the
> > target function, which would implicitly cause the BSP update that
> > we're currently doing ourselves. This does open a whole can of worms,
> > though, as I think I'll need to revisit the entire dummy frame unwinder,
> > won't I?
>
> Maybe, maybe not. Might be the easiest answer. I'd suspect ia64
> dislikes executable stacks, though. Can you (ew) poke the necessary
> code into the entry point, assuming it is small enough? If it's just a
> jump to register...
On PA-RISC the C startup code provided some help here by providing
some of the code to do the branch with setting up the registers
correctly. I think libgcc also had some code to deal with it.
Perhaps there is some magic help on ia64 too?
Mark
More information about the Gdb-patches
mailing list