<div dir="ltr">On Mon, Jun 17, 2013 at 2:33 PM, Greg Clayton <span dir="ltr"><<a href="mailto:gclayton@apple.com" target="_blank">gclayton@apple.com</a>></span> wrote:<br><div class="gmail_extra"><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">The "symbol.st_info" is in bits 7:0 of the flags, and the "symbol.st_other" is in bits 15:8. So the flags are:<br>


<br>
0x00000002 __printf     STB_LOCAL  | STT_FUNC<br>
0x00000012 _IO_printf   STB_GLOBAL | STT_FUNC<br>
0x00000012 printf       STB_GLOBAL | STT_FUNC<br>
<br>
So there isn't much to be able to do with these symbols. Does anyone know why we have 3 symbols? Are these just aliases? Is there anyway to know that we should use "printf" by inspecting any other sections?<br>

</blockquote><div><br></div><div style>The printf libc source code looks like this:</div><div style><br></div><div style><div>  24 #undef printf</div><div>...<br></div><div>  28 int</div><div>  29 __printf (const char *format, ...)</div>

<div>...<br></div><div>  41 #undef _IO_printf<br></div><div>  42 ldbl_strong_alias (__printf, printf);</div><div>  43 /* This is for libg++.  */</div><div>  44 ldbl_strong_alias (__printf, _IO_printf);</div><div><br></div>

</div><div style>So yes, there are two strong aliases and one local symbol. gdb seems to prefer the local one when running stacktraces and doing "disassemble printf" or "disassemble _IO_printf". I'll investigate this further though.</div>

<div> </div><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">I checked out the line table for printf and found that there is indeed no "prologue_end" marker in the line table state machine, so we are setting a breakpoint on the second line table entry in the sequence which maps to 0x0000000000053864 as we saw in your previous output (which was slid to 0x7f961e2a2864). So everything is working as expected here given the information we have.</blockquote>

<div><br></div><div style>If we have no prologue_end marker, would it make sense to not skip anything?</div><div style><br></div><div style>Thanks Greg.</div><div style> -Mike</div></div></div></div>