This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH , all targets] Fix order of prologue instructions for varargs functions with -O0 and -m32
- From: Luis Machado <luisgpm at linux dot vnet dot ibm dot com>
- To: Dave Korn <dave dot korn dot cygwin at googlemail dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Daniel Jacobowitz <drow at false dot org>
- Date: Mon, 02 Mar 2009 12:00:49 -0300
- Subject: Re: [PATCH , all targets] Fix order of prologue instructions for varargs functions with -O0 and -m32
- References: <1235662822.14604.13.camel@gargoyle> <49A6C418.6040604@gmail.com> <1235666529.14604.17.camel@gargoyle> <1235666740.14604.18.camel@gargoyle> <1235756394.6602.14.camel@gargoyle> <49A9161A.9010305@gmail.com> <20090228174746.GA19361@caradoc.them.org> <49AAF9FC.7090607@gmail.com>
- Reply-to: luisgpm at linux dot vnet dot ibm dot com
Hi,
On Sun, 2009-03-01 at 21:11 +0000, Dave Korn wrote:
> Daniel Jacobowitz wrote:
> > On Sat, Feb 28, 2009 at 10:46:50AM +0000, Dave Korn wrote:
> >>> 2 - GDB stops right after the branch, due to an additional line number
> >>> entry that is (forcibly) generated because GCC saw a different Basic
> >>> Block.
> >> Ah. I wonder if there's an implicit assumption in GDB that the prologue is
> >> only a single basic block?
> >
> > Irrelevant, but it has to be a single "line". That's how prologue
> > analysis has worked in GDB for probably 20 years. It's improved a lot
> > in that time, but the basic assumption remains.
> >
> >> Hmm, but shouldn't GDB really be paying attention to the information it
> >> receives from RTX_FRAME_RELATED_P?
> >
> > GDB does not receive this information.
> >
>
> Ok, so I guess Luis' suggestion:
>
> Luis Machado wrote:
>
> > The other way around this problem, without changing the ordering of
> > instructions in more general code is to omit the output of that
> > additional Line Number Entry. Does it sound like a better solution for
> > mainline?
>
> ... must be the right thing to do.
>
> cheers,
> DaveK
Considering this path, would it be a bad idea to output a new line
number entry just when the line number changes?
This way, even though we're forcing GCC to emit a new line number, if
the line number is the same, we'll hold back on doing so.
I have this working with a condition change on
final.c:notice_source_line, but wanted to have some input on how
acceptable this is. Am i overlooking something here?
Regards,
Luis