[VTA, PR41473] drop NULL locations from lists

Jack Howarth howarth@bromo.med.uc.edu
Mon Nov 23 21:50:00 GMT 2009


On Mon, Nov 23, 2009 at 01:22:44PM -0800, Cary Coutant wrote:
> >   I have tested this but on the gdb mailing list it was suggested that
> > in resolve_addr() we change...
> >
> > a->dw_attr_val.v.val_loc = NULL;
> >
> > to
> >
> > a->dw_attr_val.v.val_loc = DW_OP_nop;
> >
> > http://sourceware.org/ml/gdb/2009-11/msg00176.html
> >
> > I haven't had a chance to test this patch on darwin yet...
> 
> What I suggested doesn't quite translate to this -- DW_OP_nop isn't
> something you can assign to dw_attr_val.v.val_loc. You need to create
> an expression containing that single opcode, and set
> dw_attr_val.v.val_loc to point to that expression.
> 
> But Alexandre's patch, I think, is a better approach -- don't create
> the empty expressions in the first place.
> 
> -cary

Cary,
   What would you gain from having the empty expressions in the first
place? Wouldn't those provide nothing more than a just list of symbols that
have been optimized out existence from the original source code?
               Jack



More information about the Gcc-patches mailing list