This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: SKIP_PROLOGUE() and prologue insn scheduling
- To: jtc at redback dot com, gdb at sourceware dot cygnus dot com
- Subject: Re: SKIP_PROLOGUE() and prologue insn scheduling
- From: Kevin Buettner <kevinb at cygnus dot com>
- Date: Wed, 18 Jul 2001 14:21:30 -0700
- References: <5msnfv9nsp.fsf@orac.redback.com>
On Jul 17, 3:46pm, J.T. Conklin wrote:
> A coworker asked me what the prefered behavior of the SKIP_PROLOGUE()
> macro when the compiler schedules the function prologue in with user
> insns. I didn't have a good answer and the internals documentation
> doesn't address this, so I'm shooting the question to the list.
>
> The choice is whether SKIP_PROLOGUE() returns:
> 1) 1st user insn even though more prologue insns remain?
> 2) 1st user insn after final prologue insn?
>
> Of these two, I think #1 is the most conservative choice. However,
> gdb may may not be able to print function arguments correctly until
> the user steps beyond the remainder of the prologue. While #2 does
> not have that problem, having user insns execute as part of the
> prologue could also be confusing --- Especially those that have
> observable side effects (e.g. writes to a memory mapped device).
>
> What is the common wisdom? At the very least, I think we need to
> flesh out this issue in the internals document.
In the prologue scanners that I've worked on, I've tried to implement
option #2.
Kevin