<div dir="ltr"><div class="gmail_extra">On Tue, Jul 2, 2013 at 11:20 AM, Greg Clayton <span dir="ltr"><<a href="mailto:gclayton@apple.com" target="_blank">gclayton@apple.com</a>></span> wrote:<br><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">That sounds fine to me. Since the symbol's start address is already in section/offset format, it will be a really quick lookup within the module itself to resolve the function.</blockquote>
</div><br>Something like the below look ok?</div><div class="gmail_extra"><br></div><div class="gmail_extra">Thanks Greg.</div><div class="gmail_extra"> -Mike</div><div class="gmail_extra"><br></div><div class="gmail_extra">
uint32_t</div><div class="gmail_extra">Symbol::GetPrologueByteSize ()<br></div><div class="gmail_extra">{</div><div class="gmail_extra"> ...</div><div class="gmail_extra"> const Address &base_address = m_addr_range.GetBaseAddress();<br>
</div><div class="gmail_extra"><div class="gmail_extra"> Function *function = base_address.CalculateSymbolContextFunction();</div><div class="gmail_extra"> if (function)</div><div class="gmail_extra">
{</div><div class="gmail_extra"> // Functions have line entries which can also potentially have end of prologue information.</div><div class="gmail_extra"> // So if this symbol points to a function, use the prologue information from there.</div>
<div class="gmail_extra"> m_type_data = function->GetPrologueByteSize();</div><div class="gmail_extra"> }</div><div class="gmail_extra"> else</div></div><div class="gmail_extra"> {<br>
</div><div class="gmail_extra"> ... do regular symbol prologue calculations ...<br></div></div>