This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] Try to enhanced backtrace on i386 machines.


At 21:35 03/12/2001 , Christopher Faylor a écrit:
>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.

This patch does nothing yet in that direction :(

>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.


Sorry, but I don't really see what you mean here...
I looked at i386-dis.c code but its not clear to me 
how we could use this...



Pierre Muller
Institut Charles Sadron
6,rue Boussingault
F 67083 STRASBOURG CEDEX (France)
mailto:muller@ics.u-strasbg.fr
Phone : (33)-3-88-41-40-07  Fax : (33)-3-88-41-40-99


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]