Replying to this on-list just incase other people have this problem.<div><br></div><div>Not sure if I ever submit this patch back to the list, but I added support for backtraces so you can see the function call stack for traced functions.</div>
<div><br></div><div>The problem with this feature is that I didn't take the time to fix the configure script so that it would disable that code if you don't have libunwind on your system.</div><div><br></div><div>
There are two solutions:</div><div><br></div><div>1.) The simplest solution (until I or some one else fixes the configure script) is to install libunwind library and header files on your system and try building my branch again.</div>
<div><br></div><div>or</div><div><br></div><div>2.) Rewind the source tree in git to before that commit was made. To do this you can just: git checkout a95f1 -b before_unwind</div><div><br></div><div>That will create a local branch called "before_unwind" (the first byte of the sha before the libunwind commit are a95f1).</div>
<div><br></div><div>The downside is that if you do this you lose some of the man page cleanup and a small bugfix.</div><div><br></div><div>Sorry for the pain.</div><div><br></div><div>joe</div><div><br><div class="gmail_quote">
On Tue, Mar 30, 2010 at 11:11 AM, Rodrigo Dominguez <span dir="ltr"><<a href="mailto:roddomi@hotmail.com">roddomi@hotmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">Thanks. I was able to checkout your code.</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">I am getting the following errors after ‘./configure
&& make’</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">make -C sysdeps/linux-gnu</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">make[1]: Entering directory
`/home/rdomingu/ltrace/sysdeps/linux-gnu'</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">gcc -Wall -g -O2 -iquote /home/rdomingu/ltrace -iquote
/home/rdomingu/ltrace/sysdeps/linux-gnu
-DSYSCONFDIR=\"/usr/local/etc\" -I /usr/include/libelf
-I/home/rdomingu/ltrace/sysdeps/linux-gnu/x86_64 -c -o events.o events.c</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">In file included from events.c:12:</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">/home/rdomingu/ltrace/common.h:1:23: error: libunwind.h: No such
file or directory</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">In file included from /home/rdomingu/ltrace/common.h:11,</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">
from events.c:12:</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">/home/rdomingu/ltrace/elf.h:4:18: error: gelf.h: No such file or
directory</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">In file included from /home/rdomingu/ltrace/common.h:11,</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">
from events.c:12:</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">/home/rdomingu/ltrace/elf.h:9: error: expected
specifier-qualifier-list before âElfâ</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">/home/rdomingu/ltrace/elf.h:50: error: expected â=â,
â,â, â;â, âasmâ or â__attribute__â
before âarch_plt_sym_valâ</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">In file included from events.c:12:</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">/home/rdomingu/ltrace/common.h:193: error: expected
specifier-qualifier-list before âunw_addr_space_tâ</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">In file included from events.c:12:</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">/home/rdomingu/ltrace/common.h:234: error: expected declaration
specifiers or â...â before âGElf_Symâ</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">/home/rdomingu/ltrace/common.h:236: error: expected
â)â before âaddrâ</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">make[1]: *** [events.o] Error 1</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">make[1]: Leaving directory
`/home/rdomingu/ltrace/sysdeps/linux-gnu'</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">make: *** [sysdeps/sysdep.o] Error 2</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"> </span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt">From:</span></b><span style="font-size:10.0pt"> Joe Damato
[mailto:<a href="mailto:ice799@gmail.com" target="_blank">ice799@gmail.com</a>] <br>
<b>Sent:</b> Tuesday, March 30, 2010 1:12 PM</span></p><div><div></div><div class="h5"><br>
<b>To:</b> Rodrigo Dominguez<br>
<b>Cc:</b> <a href="mailto:ltrace-devel@lists.alioth.debian.org" target="_blank">ltrace-devel@lists.alioth.debian.org</a><br>
<b>Subject:</b> Re: [Ltrace-devel] Tracing dependent libraries</div></div><p></p>
</div>
</div><div><div></div><div class="h5">
<p class="MsoNormal"> </p>
<p class="MsoNormal">Not a dumb question at all. My code isn't part of the
official repository, but it is on github at: git://<a href="http://github.com/ice799/ltrace.git" target="_blank">github.com/ice799/ltrace.git</a>
</p>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">My code is in the branch "libdl"</p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">So you should:</p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">git clone git://<a href="http://github.com/ice799/ltrace.git" target="_blank">github.com/ice799/ltrace.git</a></p>
</div>
<div>
<p class="MsoNormal">git checkout -b libdl origin/libdl</p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">and you will be sitting in the libdl branch.</p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">You can take a look at the commits on that branch by doing
git log. If a particular commit interests you, you can git show <sha> to
look at the diff.</p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">If you have any other questions/issues getting my code or
getting it to build feel free to email me off list.</p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">joe</p>
</div>
<div>
<p class="MsoNormal"> </p>
<div>
<p class="MsoNormal">On Tue, Mar 30, 2010 at 9:35 AM, Rodrigo Dominguez <<a href="mailto:roddomi@hotmail.com" target="_blank">roddomi@hotmail.com</a>>
wrote:</p>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">Joe,</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">I am sorry for the dumb question but how
do you checkout a branch from github. I am not familiar with git. I ran:</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">git clone git://<a href="http://git.debian.org/git/collab-maint/ltrace.git" target="_blank">git.debian.org/git/collab-maint/ltrace.git</a></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">but this only gets me the master branch.</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">Thank you.</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"> </span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt">From:</span></b><span style="font-size:10.0pt"> Joe
Damato [mailto:<a href="mailto:ice799@gmail.com" target="_blank">ice799@gmail.com</a>]
<br>
<b>Sent:</b> Tuesday, March 09, 2010 5:20 PM<br>
<b>To:</b> Rodrigo Dominguez<br>
<b>Cc:</b> <a href="mailto:ltrace-devel@lists.alioth.debian.org" target="_blank">ltrace-devel@lists.alioth.debian.org</a><br>
<b>Subject:</b> Re: [Ltrace-devel] Tracing dependent libraries</span></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"> </p>
<p class="MsoNormal" style="margin-bottom:12.0pt">I
implemented support for libdl and you can get that tree from github: <a href="http://github.com/ice799/ltrace/tree/libdl" target="_blank">http://github.com/ice799/ltrace/tree/libdl</a></p>
<div>
<p class="MsoNormal">I
have *not* implemented tracing calls from libraries to other libraries, though.
doing that should be pretty straightforward. i don't really have the cycles
right now to implement that in the near term but I am willing to point people
in the right direction if they are interested in implementing it.</p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">otherwise
as soon as i have time to do it (probably later this month), i can implement it.</p>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">joe </p>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">On
Tue, Mar 9, 2010 at 2:13 PM, Rodrigo Dominguez <<a href="mailto:roddomi@hotmail.com" target="_blank">roddomi@hotmail.com</a>>
wrote:</p>
<p class="MsoNormal">How
can I get ltrace to trace dependent libraries (libraries called from<br>
within libraries)? All I was able to find was this old post:<br>
<br>
<a href="http://sourceware.org/ml/binutils/2006-09/msg00009.html" target="_blank">http://sourceware.org/ml/binutils/2006-09/msg00009.html</a><br>
<br>
Has this been implemented since then?<br>
<br>
Thank you.<br>
<br>
<br>
_______________________________________________<br>
Ltrace-devel mailing list<br>
<a href="mailto:Ltrace-devel@lists.alioth.debian.org" target="_blank">Ltrace-devel@lists.alioth.debian.org</a><br>
<a href="http://lists.alioth.debian.org/mailman/listinfo/ltrace-devel" target="_blank">http://lists.alioth.debian.org/mailman/listinfo/ltrace-devel</a></p>
</div>
<p class="MsoNormal"> </p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p class="MsoNormal"> </p>
</div>
</div></div></div>
</div>
</div>
</blockquote></div><br></div>