This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFC] Try to enhanced backtrace on i386 machines.
- From: Christopher Faylor <cgf at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Mon, 3 Dec 2001 15:35:10 -0500
- Subject: Re: [RFC] Try to enhanced backtrace on i386 machines.
- References: <4.2.0.58.20011203112721.01921430@ics.u-strasbg.fr>
On Mon, Dec 03, 2001 at 11:28:07AM +0100, Pierre Muller wrote:
>GCC for i386 does several optimization to allow correct pairing of
>instructions.
>
>This leads in particular to mix loading of constants into registers
>with usual prologue instructions.
>
>The major effect is that the backtrace shows some 'pseudo' trace
>levels, which are due to a failure to get the correct prologue. One of
>the nastiest effect of this is that if you use 'return' on that
>function, it sets a temporary breakpoint on a wrong location and you
>program continues without stopping when frame is left.
>
>I started to implement some code that tries to deal with that issue.
>Its far from perfect, but it gives already some result (when debugging
>GDB with itself compiled with -O2, it reduces the number of those false
>frame levels).
>
>This code might probably be used at several other position.
>
>All comments and suggestions welcome.
It would be nice to improve backtraces on x86. What would really be
wonderful is to do this with frame pointerless functions.
Regarding your implementation, I wonder if it would be better to define
the opcodes as constants in the opcodes directory and use the defines in
both the opcodes and gdb directories? I realize that it is more work
but it seems like we've already got most of the information in this
directory.
cgf