This is the mail archive of the dwarf2@corp.sgi.com mailing list for the dwarf2 project.


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

DW_OP_call: more functionality


I like the new DW_OP_call* operators for DWARF expressions.  But as I'm
thinking how I would go about using them, I realize that there's no way to do
a subroutine call using a locdesc from another compile unit.  I think that
would be valuable.

In our Ada implementations, there are several "suffix" locdescs that are
piled into one special unit (the language-defined standard unit).  Currently,
they're on special attributes that are just known by the debugger, and are
automagically appended by the debugger.  It's a fairly non-standard thing
that we chose to do to try to keep the DWARF small (well, less big).

In DWARF2.1, we could use the DW_OP_call* operators to achieve this.  That
will make our locdescs bigger, but not outrageously so.  So, maybe it's a
reasonable price to pay for obeying the standard.

But because the DW_OP_call* operators can't call subroutines in other units,
we're stuck replicating the suffix locdescs in each compile unit.  That means
the DWARF is bloating again.  I'd rather not have it do that.

I'm not sure what the right approach would be to allowing DW_OP_call*
operators to reference subroutines in other compile units.  Maybe something
like DW_OP_call_addr to parallel DW_FORM_ref_addr?  Or perhaps it should be
integrated with the DW_TAG_import_subunit somehow?

I'm not writing a proposal right now, because I don't have a clear impression
of the best way to do it.  Any thoughts?

-- 
Todd Allen
Concurrent Computer Corporation


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