<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<title></title>
<meta name="Generator" content="Cocoa HTML Writer">
<meta name="CocoaVersion" content="1038.35">
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #3a8288}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo}
span.s1 {color: #000000}
span.s2 {color: #cd00a3}
span.s3 {color: #3a8288}
span.s4 {color: #205a5e}
</style>


<p class="p1"><font class="Apple-style-span" color="#000000">I was working on a patch that experimentally adds __attribute__(format(printf, ...))) annotations to the various logging and printing functions and cleaning up some of the warnings that that generated.  In doing so, I noticed that this code:</font></p>
<p class="p1"><font class="Apple-style-span" color="#000000"><br></font></p><p class="p1">WatchpointLocation<span class="s1">::</span>WatchpointLocation<span class="s1"> (</span>lldb<span class="s1">::</span>addr_t<span class="s1"> </span>addr<span class="s1">, </span>lldb<span class="s1">::</span>tid_t<span class="s1"> tid, </span><span class="s2">bool</span><span class="s1"> hardware) :</span></p>

<p class="p2">    <span class="s3">StoppointLocation</span> (<span class="s4">GetNextID</span>(), <span class="s3">addr</span>, tid, hardware),</p><p class="p2"><br></p><p class="p2">Seems a bit wrong ...</p><p class="p2">
<br></p><p class="p2">It is taking the tid and passing it to StoppointLocation, but StoppointLocation's constructor interprets that as a size parameter instead.  (Then, later, WatchpointLocation has a log message that should include the TID, but it doesn't, resulting in too few arguments to the printf statement.)</p>
<p class="p2"><br></p><p class="p2"> - Bruce</p><p class="p2"><br></p>