[Dwarf-Discuss] Vendor extensions in .debug_macinfo

David Anderson davea42@earthlink.net
Sat Jul 30 00:40:02 GMT 2011


I wrote, earlier today, a longer discussion of why I want the 
.debug_macro section
to be readable on its own.  I guess I never actually sent it, operator 
error on my part.

We have several sections that are not readable on their own.  
Implementors (writing
objects and executables) are allowed to insert arbitrary unused bytes , 
making reading
the sections on their own problematic.

       .debug_abbrev,  .debug_loc,  .debug_ranges,  .debug_macinfo
are examples.

It's annoying that while early compiler implementations let me print some
sections independently
(in spite of a lack of any guarantee) current compiler implementations 
sometimes
do not, though they violate no DWARF constraint.

I think there is value in assuring that a section, on its own, is 
complete and consistent
with DWARF rules.

Implementors do (now and always) have to make sure the 'garbage bytes' 
are not
referenced from elsewhere, but that is a fairly weak guarantee.

I am requesting that in any new sections we not allow garbage to sneak in.
There is little reason to allow it.      Well-formed but unused data
in a given section would, in my view, be no problem at all, just a minor
Quality Of Implementation issue.

I see no reason to rework existing sections, I am merely requesting
that new sections be slightly more constrained.  When that is
reasonable to do.

As in .debug_macro.    My earlier comments addressed this issue
in ISSUE 3 of the previous email, but that did not offer any
of my reasoning as to 'why', hence this email.

DavidA.

-- 
Beware of bugs in the above code; I have only proved it correct, not tried it. -- Don Knuth





More information about the Dwarf-discuss mailing list