This is the mail archive of the gdb@sourceware.cygnus.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]

Re: IA32: printing FP register variables



STABS's live range splitting notation can certainly do the job
correctly, but I wonder whether it can do it efficiently.  For every
instruction that changes TOP, you have to start a new range for every
variable.  So the size of debug info is O(number of insns * average
number of live variables).

Without knowing too much about how the FPU register allocation works,
I'd guess that GCC could simply emit a stab after each instruction
which changes the depth, whose value is the code address and whose
`desc' is the distance from TOP to the base used for register
numbering.

That is, if we've got an N_RSYM saying that foo lives in ST(2), and
we've just seen an N_FPSTACK stab with a value of 3, then we'll look
for foo in ST(5).  Or change the sign of things as appropriate.

This means the size of the debug info is O(number of insns).  On the
other hand, it's more work to implement in GDB.

In either case, GCC needs to be fixed to propagate the register
numbers through the stackifier.  At that point, if it is
straightforward to get GCC to emit LRS info, we could give that a try
(no work for me, assuming GDB's LRS code works!).  If that's too big,
then maybe we could try implementing a depth stab.

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