<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://kb.rvmgroup.it/index.php?action=history&amp;feed=atom&amp;title=Debug_C%2FC%2B%2B_con_GDB</id>
	<title>Debug C/C++ con GDB - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://kb.rvmgroup.it/index.php?action=history&amp;feed=atom&amp;title=Debug_C%2FC%2B%2B_con_GDB"/>
	<link rel="alternate" type="text/html" href="https://kb.rvmgroup.it/index.php?title=Debug_C/C%2B%2B_con_GDB&amp;action=history"/>
	<updated>2026-05-09T17:25:35Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.2</generator>
	<entry>
		<id>https://kb.rvmgroup.it/index.php?title=Debug_C/C%2B%2B_con_GDB&amp;diff=6536&amp;oldid=prev</id>
		<title>Gabriele.vivinetto at 14:09, 20 October 2009</title>
		<link rel="alternate" type="text/html" href="https://kb.rvmgroup.it/index.php?title=Debug_C/C%2B%2B_con_GDB&amp;diff=6536&amp;oldid=prev"/>
		<updated>2009-10-20T14:09:34Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 14:09, 20 October 2009&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l21&quot;&gt;Line 21:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 21:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Per tornare nella linea di comando:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Per tornare nella linea di comando:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  i (come in vi)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  i (come in vi)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* Per impostare eventuali argomenti da passare al programma:&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; set args -k3 -l out.txt&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Partire con il programma&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Partire con il programma&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l49&quot;&gt;Line 49:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 52:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*[http://stackoverflow.com/questions/233328/how-do-i-print-the-full-value-of-a-long-string-in-gdbHow do I print the full value of a long string in gdb? - Stack Overflow]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*[http://stackoverflow.com/questions/233328/how-do-i-print-the-full-value-of-a-long-string-in-gdbHow do I print the full value of a long string in gdb? - Stack Overflow]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*[http://developer.apple.com/mac/library/documentation/DeveloperTools/gdb/gdb/gdb_2.html#SEC5 Debugging with gdb - A Sample gdb Session]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*[http://developer.apple.com/mac/library/documentation/DeveloperTools/gdb/gdb/gdb_2.html#SEC5 Debugging with gdb - A Sample gdb Session]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;*[http://www.cs.bu.edu/teaching/cs113/spring-2000/caesar/ Inspecting Command Line Arguments with GDB]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Gabriele.vivinetto</name></author>
	</entry>
	<entry>
		<id>https://kb.rvmgroup.it/index.php?title=Debug_C/C%2B%2B_con_GDB&amp;diff=6535&amp;oldid=prev</id>
		<title>Gabriele.vivinetto: New page: * Installare cgdb  sudo apt-get install cgdb  * Compilare il programma con il flag   -g   g++ -g3 -o pippo pippo.cpp  * Lanciare il debug:  cgdb ./pippo  * Impostare il breakpoint all&#039;iniz...</title>
		<link rel="alternate" type="text/html" href="https://kb.rvmgroup.it/index.php?title=Debug_C/C%2B%2B_con_GDB&amp;diff=6535&amp;oldid=prev"/>
		<updated>2009-10-16T10:06:41Z</updated>

		<summary type="html">&lt;p&gt;New page: * Installare cgdb  sudo apt-get install cgdb  * Compilare il programma con il flag   -g   g++ -g3 -o pippo pippo.cpp  * Lanciare il debug:  cgdb ./pippo  * Impostare il breakpoint all&amp;#039;iniz...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;* Installare cgdb&lt;br /&gt;
 sudo apt-get install cgdb&lt;br /&gt;
&lt;br /&gt;
* Compilare il programma con il flag &lt;br /&gt;
 -g&lt;br /&gt;
&lt;br /&gt;
 g++ -g3 -o pippo pippo.cpp&lt;br /&gt;
&lt;br /&gt;
* Lanciare il debug:&lt;br /&gt;
 cgdb ./pippo&lt;br /&gt;
&lt;br /&gt;
* Impostare il breakpoint all&amp;#039;inizio del programma&lt;br /&gt;
 break main&lt;br /&gt;
&lt;br /&gt;
* per passare alla finestra del sorgente&lt;br /&gt;
 &amp;lt;ESC&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Per impostare un breakpoint nella finestra sorgente:&lt;br /&gt;
 &amp;lt;SPACE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Per tornare nella linea di comando:&lt;br /&gt;
 i (come in vi)&lt;br /&gt;
&lt;br /&gt;
* Partire con il programma&lt;br /&gt;
 run&lt;br /&gt;
&lt;br /&gt;
* Fare step di funzione:&lt;br /&gt;
 n &lt;br /&gt;
 next &lt;br /&gt;
&lt;br /&gt;
* Fare step di linea (inside funztions)&lt;br /&gt;
 s&lt;br /&gt;
 step&lt;br /&gt;
&lt;br /&gt;
* stampare una variabile&lt;br /&gt;
 print varname&lt;br /&gt;
&lt;br /&gt;
* stampare espressioni:&lt;br /&gt;
 call printf (&amp;quot;%s&amp;quot;, varname)&lt;br /&gt;
&lt;br /&gt;
* continuare fino a breakpoint o alla fine:&lt;br /&gt;
 c&lt;br /&gt;
 continue&lt;br /&gt;
&lt;br /&gt;
==Riferimenti==&lt;br /&gt;
*[http://bcu.copsewood.net/pcnd3/notes4.html Using the gdb debugger (Gnu DeBugger)]&lt;br /&gt;
*[http://stackoverflow.com/questions/209534/prettify-my-gdb Prettify my gdb - Stack Overflow]&lt;br /&gt;
*[http://www.macdonald.egate.net/CompSci/gdb.html Using gdb]&lt;br /&gt;
*[http://stackoverflow.com/questions/233328/how-do-i-print-the-full-value-of-a-long-string-in-gdbHow do I print the full value of a long string in gdb? - Stack Overflow]&lt;br /&gt;
*[http://developer.apple.com/mac/library/documentation/DeveloperTools/gdb/gdb/gdb_2.html#SEC5 Debugging with gdb - A Sample gdb Session]&lt;/div&gt;</summary>
		<author><name>Gabriele.vivinetto</name></author>
	</entry>
</feed>