<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:"Yu Gothic";
panose-1:2 11 4 0 0 0 0 0 0 0;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"\@Yu Gothic";
panose-1:2 11 4 0 0 0 0 0 0 0;}
@font-face
{font-family:EPNNMP+TimesNewRoman;
panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-ligatures:standardcontextual;}
span.EmailStyle18
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;
font-family:"Calibri",sans-serif;
mso-ligatures:none;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:2.0cm 42.5pt 2.0cm 3.0cm;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link="#0563C1" vlink="#954F72" style='word-wrap:break-word'><div class=WordSection1><p class=MsoNormal>Please help me interpret the DWARF spec regarding the DW_AT_frame_base. Quoted by spec v3, section 3.5.5, but similar wording in v4 and v5:<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span style='font-size:11.5pt;color:black'>“A subroutine or entry point entry may also have a </span><span style='font-size:11.5pt;color:blue'>DW_AT_frame_base </span><span style='font-size:11.5pt;color:black'>attribute, whose value is a location description that computes the “frame base” for the subroutine or entry point. If the location description is a register operation, the given register contains the frame base address. If the location description is a DWARF expression, the result of evaluating that expression is the frame base address. Finally, for a location list, this interpretation applies to each location expression contained in the list of location list entries.”<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.5pt;color:black'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.5pt;color:black'>So what does “location description that is a register operation” mean here? Since the option of a DWARF expression block is covered by the second option, that rather suggests to me that “register operation” is not a DWARF operation. I mean, the wording “if A is X, then Y. If A is P, then Q” usually means that P is distinct from X, right?<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.5pt;color:black'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.5pt;color:black'>On a more practical note, I’m currently staring at a crash report with a DWARF attribute parsing failure. DWARF v3 Linux ELF binary, produced by NASM. DW_AT_frame_base, form DW_FORM_data4, value 0. The code assumes it’s a loclist pointer, but the binary doesn’t contain a loclist section.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.5pt;color:black'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.5pt;color:black'>Zero as a loclist pointer in a v3 binary could make sense. As a “register operation” – I’m not sure. Could be a compiler quirk, but I’m admitting the possibility that I’m misreading something.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.5pt;color:black'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.5pt;color:black'><o:p> </o:p></span></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>