<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Nightly build &#187; Tools</title>
	<atom:link href="http://slack.codemaniacs.com/blog/category/tools/feed/" rel="self" type="application/rss+xml" />
	<link>http://slack.codemaniacs.com/blog</link>
	<description>&#34;Give me six hours to chop down a tree and I will spend the first four sharpening the axe.&#34; - Abraham Lincoln</description>
	<lastBuildDate>Wed, 16 Dec 2009 12:24:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Shell tip: getting a canonical absolute path from a relative path</title>
		<link>http://slack.codemaniacs.com/blog/2009/11/16/shell-tip-getting-a-canonical-absolute-path-from-a-relative-path/</link>
		<comments>http://slack.codemaniacs.com/blog/2009/11/16/shell-tip-getting-a-canonical-absolute-path-from-a-relative-path/#comments</comments>
		<pubDate>Mon, 16 Nov 2009 17:08:14 +0000</pubDate>
		<dc:creator>slack</dc:creator>
				<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://slack.codemaniacs.com/blog/?p=62</guid>
		<description><![CDATA[$ readlink -f relative/path Gives a full path equivalent to the relative path, and follows every symlink in every component of the name in order to canonicalize it.]]></description>
			<content:encoded><![CDATA[<pre>
$ readlink -f relative/path
</pre>
<p>Gives a full path equivalent to the relative path, and follows every symlink in every component of the name in order to canonicalize it.</p>
]]></content:encoded>
			<wfw:commentRss>http://slack.codemaniacs.com/blog/2009/11/16/shell-tip-getting-a-canonical-absolute-path-from-a-relative-path/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Useful aliases</title>
		<link>http://slack.codemaniacs.com/blog/2009/11/04/useful-aliases/</link>
		<comments>http://slack.codemaniacs.com/blog/2009/11/04/useful-aliases/#comments</comments>
		<pubDate>Wed, 04 Nov 2009 15:23:53 +0000</pubDate>
		<dc:creator>slack</dc:creator>
				<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://slack.codemaniacs.com/blog/?p=53</guid>
		<description><![CDATA[alias top = htop Htop is a top replacement, with colors, per-cpu load indicators, scrolling (specially horizontal scrolling so you can see the whole command line for each process), searching, a nicer interface to kill/renice processes, mouse support, and the ability to call strace/ltrace/lsof easily on the process you want. alias info = pinfo alias [...]]]></description>
			<content:encoded><![CDATA[<pre>alias top = htop</pre>
<p><a href="http://htop.sourceforge.net">Htop</a> is a top replacement, with colors, per-cpu load indicators, scrolling (specially horizontal scrolling so you can see the whole command line for each process), searching, a nicer interface to kill/renice processes, mouse support, and the ability to call strace/ltrace/lsof easily on the process you want.</p>
<pre>alias info = pinfo
alias man  = pinfo -m</pre>
<p><a href="http://pinfo.sourceforge.net">Pinfo</a> is a lynx-style info and man browser. The main reason to use this, IMHO, is that GNU Info simply sucks as a browser. I&#8217;m not so sure about replacing man, as I&#8217;m confortable with less-style keybindings, but the ability to follow links to related manpages is a great feature :D</p>
<p>Both are included in all popular distros, so installation is only a matter of looking for the packages in the distro repositories.</p>
]]></content:encoded>
			<wfw:commentRss>http://slack.codemaniacs.com/blog/2009/11/04/useful-aliases/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Valgrind: tracking the origin of undefined values</title>
		<link>http://slack.codemaniacs.com/blog/2009/10/16/valgrind-tracking-the-origin-of-undefined-values/</link>
		<comments>http://slack.codemaniacs.com/blog/2009/10/16/valgrind-tracking-the-origin-of-undefined-values/#comments</comments>
		<pubDate>Fri, 16 Oct 2009 15:55:49 +0000</pubDate>
		<dc:creator>slack</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://slack.codemaniacs.com/blog/?p=51</guid>
		<description><![CDATA[Today I was wondering if one of those warnings about uninitialized values was located in library code or in my own code, and I noticed a new message in Valgrind&#8217;s output: Use –track-origins=yes to see where uninitialised values come from This feature was first added to Valgrind 3.4.0 back in January, and it&#8217;s great! I [...]]]></description>
			<content:encoded><![CDATA[<p>Today I was wondering if one of those warnings about uninitialized values was located in library code or in my own code, and I noticed a new message in Valgrind&#8217;s output:</p>
<pre>
Use –track-origins=yes to see where uninitialised values come from
</pre>
<p>This feature was first added to Valgrind 3.4.0 back in January, and it&#8217;s great! I wish I had known it before, because it would have spent me a few headaches in the past months, so I decided to write it here just in case I can help someone :)</p>
]]></content:encoded>
			<wfw:commentRss>http://slack.codemaniacs.com/blog/2009/10/16/valgrind-tracking-the-origin-of-undefined-values/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bash tip</title>
		<link>http://slack.codemaniacs.com/blog/2009/10/02/bash-tip/</link>
		<comments>http://slack.codemaniacs.com/blog/2009/10/02/bash-tip/#comments</comments>
		<pubDate>Fri, 02 Oct 2009 15:23:52 +0000</pubDate>
		<dc:creator>slack</dc:creator>
				<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://slack.codemaniacs.com/blog/?p=46</guid>
		<description><![CDATA[Sometimes we have to do something like this: $ generate_things > tmp1 $ generate_other_things > tmp2 $ process_both tmp1 tmp2 With bash, it&#8217;s possible to avoid creating these temporary files: $ process_both &#60;(generate_things) &#60;(generate_other_things) :)]]></description>
			<content:encoded><![CDATA[<p>Sometimes we have to do something like this:</p>
<pre>
$ generate_things > tmp1
$ generate_other_things > tmp2
$ process_both tmp1 tmp2
</pre>
<p>With bash, it&#8217;s possible to avoid creating these temporary files:</p>
<pre>
$ process_both &lt;(generate_things) &lt;(generate_other_things)
</pre>
<p>:)</p>
]]></content:encoded>
			<wfw:commentRss>http://slack.codemaniacs.com/blog/2009/10/02/bash-tip/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Trazas con gdb</title>
		<link>http://slack.codemaniacs.com/blog/2008/02/10/trazas-con-gdb/</link>
		<comments>http://slack.codemaniacs.com/blog/2008/02/10/trazas-con-gdb/#comments</comments>
		<pubDate>Sun, 10 Feb 2008 21:03:06 +0000</pubDate>
		<dc:creator>slack</dc:creator>
				<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://slack.codemaniacs.com/blog/2008/02/10/trazas-con-gdb/</guid>
		<description><![CDATA[Todo programador ha pasado alguna vez por la experiencia de depurar un programa a golpe de printf(), con los inconvenientes que ello supone, sobre todo recompilar cada vez que se quiere cambiar la información que se imprime en la traza. Pues resulta que es posible hacer las cosas &#8220;bien&#8221; :) Con gdb podemos imprimir los [...]]]></description>
			<content:encoded><![CDATA[<p>Todo programador ha pasado alguna vez por la experiencia de depurar un programa a golpe de printf(), con los inconvenientes que ello supone, sobre todo recompilar cada vez que se quiere cambiar la información que se imprime en la traza.</p>
<p>Pues resulta que es posible hacer las cosas &#8220;bien&#8221; :)</p>
<p>Con gdb podemos imprimir los valores de variables de nuestro programa, eso es algo que todos sabemos PERO tambien podemos darle una serie de órdenes a ejecutar al pasar por un breakpoint.</p>
<p>Veamos un ejemplo. Sea el siguiente programa en C:</p>
<pre>
#include &lt;stdio.h&gt;

int main()
{
        int i;
        double x=2.0f;
        for (i=0; i&lt;64; i++)
                x*=2;
        return 0;
}
</pre>
<p>Si compilamos con -g (para debug) y lo lanzamos en gdb podemos visualizar los valores de x así:</p>
<p><code><br />
(gdb) break 8<br />
Breakpoint 1 at 0x400463: file a.c, line 8.<br />
(gdb) commands 1<br />
Type commands for when breakpoint 1 is hit, one per line.<br />
End with a line saying just "end".<br />
&gt;silent<br />
&gt;printf "x=%g\n",x<br />
&gt;cont<br />
&gt;end<br />
(gdb) r<br />
Starting program: /home/slack/a.out<br />
x=2<br />
x=4<br />
x=8<br />
x=16<br />
x=32<br />
x=64<br />
[...]<br />
</code></p>
<p>El &#8220;silent&#8221; del principio es para que gdb no imprima la información que suele mostrar al pararse en un breakpoint (fichero, número de línea, contador de programa, etc) y la traza salga más limpia.</p>
<p>Por supuesto se pueden hacer mas cosas. gdb permite definir variables externas al programa y ejecución condicional, así que podemos contar las veces que pasamos por algun sitio y lanzar órdenes en momentos concretos y tonterías similares :D</p>
<p>Happy coding!</p>
]]></content:encoded>
			<wfw:commentRss>http://slack.codemaniacs.com/blog/2008/02/10/trazas-con-gdb/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.277 seconds -->
