<?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>Ponton&#039;s site &#187; Open Source</title>
	<atom:link href="http://www.ponton.srednikpe.org/category/opensource/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ponton.srednikpe.org</link>
	<description>blog głównie matematyczno-informatyczny (nie chce mi się pisać o życiu)</description>
	<lastBuildDate>Mon, 18 Jan 2010 22:23:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Glade vs QT Designer</title>
		<link>http://www.ponton.srednikpe.org/2009/05/31/glade-vs-qt-designer/</link>
		<comments>http://www.ponton.srednikpe.org/2009/05/31/glade-vs-qt-designer/#comments</comments>
		<pubDate>Sun, 31 May 2009 22:45:23 +0000</pubDate>
		<dc:creator>ponton</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Polskie]]></category>
		<category><![CDATA[glade]]></category>
		<category><![CDATA[gtk+]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[qt]]></category>
		<category><![CDATA[qt designer]]></category>

		<guid isPermaLink="false">http://www.ponton.srednikpe.org/?p=228</guid>
		<description><![CDATA[Ostatnimi czasy miałem okazję bliżej przyjrzeć się dwóch narzędziom do projektowania interfejsu. Postaram się w skrócie opisać, co mi się w nich podobało, a co nie. Na początek Qt Designer, bo jego wcześniej się nauczyłem. Interfejs jest podobny do GIMP-a, czyli dużo niezadokowanych okienek: z kontrolkami, z właściwościami, ze slotami, z hierarchią kontrole i oczywiście [...]]]></description>
			<content:encoded><![CDATA[<p>Ostatnimi czasy miałem okazję bliżej przyjrzeć się dwóch narzędziom do projektowania interfejsu. Postaram się w skrócie opisać, co mi się w nich podobało, a co nie.</p>
<p>Na początek Qt Designer, bo jego wcześniej się nauczyłem. Interfejs jest podobny do GIMP-a, czyli dużo niezadokowanych okienek: z kontrolkami, z właściwościami, ze slotami, z hierarchią kontrole i oczywiście okno naszego projektu. Glade natomiast to w całości jedno okno. Wiele osób narzeka na ten &#8220;gimpowy&#8221; interfejs, jednak w tym przypadku Qt Designer ładnej wygląda, chociaż może niestaranności wykonania Glade&#8217;a (głównie chodzi o okno z właściwościami, które, jak to trafnie pan w video tutorialu ujął, <em>it&#8217;s never wide enough</em>).</p>
<p>Wśród kontrolek Designera mamy pełen zasób biblioteki Qt (w tym np. kontrolka przeglądarki WWW opartej na WebKicie), jednak są to tylko stricte widżety. Nie będziemy mogli zdefiniować modelu dla *View (TreeView, ListView, etc.), a na tych kontrolkach miałem oparte oba interfejsy projektów (w sumie obie były pewnym interfejsem bazy danych). Glade potrafi tworzyć modele (o ile oczywiście wybierzemy projekt GtkBuilder, ale libglade nie jest już rozwijana, więc wybór tego pierwszego powinien być jasny), jednak chwilę musiałem pogooglać, jak to się robi. Jest to póki co mało intuicyjne (przynajmniej dla mnie). Natomiast w Designerze łatwiej udało mi się ustawić &#8220;sortowalność&#8221; kolumn (w sumie to w Glade jeszcze do tego nie doszedłem, choć próbowałem).</p>
<p>Ogólnie lepsze wrażenie sprawia jednak Designer. Jest bardziej intuicyjny, pozwala przenosić kontrolki myszką (nie trzeba ich wycinać albo zmieniać albo wpisywać pozycji we właściwościach) i edytować je na oknie. Od razu mamy także podgląd naszego okna. O wiele prościej się też moim zdaniem obsługuje kontenery, choć na początku miałem trochę trudności. W Glade trzeba trochę się namęczyć, żeby stworzyć pożądany efekt na okienku, żeby wszystko było równiutko.</p>
<p>To, co mi się jeszcze spodobało w Designerze, to sloty, chociaż to bardziej kwestia Qt niż samego Designera. Sloty bardzo ułatwiają podpinanie sygnałów. Możemy np. sygnał &#8220;clicked()&#8221; przycisku podpiąć pod slot &#8220;show()&#8221; okienka bez pisania żadnej procedury obsługi. Natomiast sygnały niestandardowe, które wymagają odrobiny naszego kodu, trzeba podpinać ręcznie (w kodzie). Glade potrafi zapamiętać nazwy naszych handlerów i automatycznie je podpiąć (w Pythonie trzeba jednak podać mu słownik odwzorowań nazw na funkcje jako argument).</p>
<p>Kiedy już stworzymy interfejs, nadchodzi etap programowania. Sama obsługa naszego interfejsu lepsza jest jednak w Glade. Tworzymy obiekt GtkBuilder i ładujemy nasz plik *.glade. Następnie wywołujemy funkcję, której podajemy nazwę widżetu, a ona zwraca nam wskaźnik (w Pythonie referencję) do niego i już możemy go używać. W Qt Designerze musimy odpowiednim narzędziem skonwertować nasz plik *.ui na kod źródłowy z klasą, od której nasze okno dziedziczy (lub enkapsuluje jej obiekt).</p>
<p>Co zatem jest lepsze? Oba programy są dobre. Na obu oparto potężne środowiska graficzne, zatem oba nadadzą się do stworzenia Twojego projektu. Każda ma swoje mocne i słabe strony, więc wybór w tym przypadku będzie indywidualny i często przypadkowy (tzw. kwestia gustu).</p>
<p>UPDATE: Glade jednak potrafi przenosić kontrolki, a Qt dynamicznie ładować interfejs.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ponton.srednikpe.org/2009/05/31/glade-vs-qt-designer/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>HP Pavilion dv6780el on Debian Squeeze</title>
		<link>http://www.ponton.srednikpe.org/2009/05/29/hp-pavilion-dv6780-on-debian-squeeze/</link>
		<comments>http://www.ponton.srednikpe.org/2009/05/29/hp-pavilion-dv6780-on-debian-squeeze/#comments</comments>
		<pubDate>Fri, 29 May 2009 01:07:49 +0000</pubDate>
		<dc:creator>ponton</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[laptop]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[linux on laptop]]></category>

		<guid isPermaLink="false">http://www.ponton.srednikpe.org/?p=214</guid>
		<description><![CDATA[Recently I bought a laptop HP Pavilion dv6780el. It was shipped with Vista, but was used only once for download Debian Testing snapshot: two horrible hours for searching CD burning program for Windows (this is shareware, this is demo, this is adware, oh, this is freeware, but actually it can&#8217;t burn CD image onto DVD [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I bought a laptop HP Pavilion dv6780el. It was shipped with Vista, but was used only once for download Debian Testing snapshot: two horrible hours for searching CD burning program for Windows (this is shareware, this is demo, this is adware, oh, this is freeware, but actually it can&#8217;t burn CD image onto DVD disk *sigh*). In the end I copied the image to my old laptop and after 5 minutes I&#8217;ve got a CD ready to install.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">%</span> <span style="color: #c20cb9; font-weight: bold;">lspci</span>
00:<span style="color: #000000;">00.0</span> Host bridge: Intel Corporation Mobile PM965<span style="color: #000000; font-weight: bold;">/</span>GM965<span style="color: #000000; font-weight: bold;">/</span>GL960 Memory Controller Hub <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">rev</span> 0c<span style="color: #7a0874; font-weight: bold;">&#41;</span>
00:<span style="color: #000000;">01.0</span> PCI bridge: Intel Corporation Mobile PM965<span style="color: #000000; font-weight: bold;">/</span>GM965<span style="color: #000000; font-weight: bold;">/</span>GL960 PCI Express Root Port <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">rev</span> 0c<span style="color: #7a0874; font-weight: bold;">&#41;</span>
00:1a.0 USB Controller: Intel Corporation 82801H <span style="color: #7a0874; font-weight: bold;">&#40;</span>ICH8 Family<span style="color: #7a0874; font-weight: bold;">&#41;</span> USB UHCI Controller <span style="color: #666666; font-style: italic;">#4 (rev 03)</span>
00:1a.1 USB Controller: Intel Corporation 82801H <span style="color: #7a0874; font-weight: bold;">&#40;</span>ICH8 Family<span style="color: #7a0874; font-weight: bold;">&#41;</span> USB UHCI Controller <span style="color: #666666; font-style: italic;">#5 (rev 03)</span>
00:1a.7 USB Controller: Intel Corporation 82801H <span style="color: #7a0874; font-weight: bold;">&#40;</span>ICH8 Family<span style="color: #7a0874; font-weight: bold;">&#41;</span> USB2 EHCI Controller <span style="color: #666666; font-style: italic;">#2 (rev 03)</span>
00:1b.0 Audio device: Intel Corporation 82801H <span style="color: #7a0874; font-weight: bold;">&#40;</span>ICH8 Family<span style="color: #7a0874; font-weight: bold;">&#41;</span> HD Audio Controller <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">rev</span> 03<span style="color: #7a0874; font-weight: bold;">&#41;</span>
00:1c.0 PCI bridge: Intel Corporation 82801H <span style="color: #7a0874; font-weight: bold;">&#40;</span>ICH8 Family<span style="color: #7a0874; font-weight: bold;">&#41;</span> PCI Express Port <span style="color: #000000;">1</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">rev</span> 03<span style="color: #7a0874; font-weight: bold;">&#41;</span>
00:1c.1 PCI bridge: Intel Corporation 82801H <span style="color: #7a0874; font-weight: bold;">&#40;</span>ICH8 Family<span style="color: #7a0874; font-weight: bold;">&#41;</span> PCI Express Port <span style="color: #000000;">2</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">rev</span> 03<span style="color: #7a0874; font-weight: bold;">&#41;</span>
00:1c.5 PCI bridge: Intel Corporation 82801H <span style="color: #7a0874; font-weight: bold;">&#40;</span>ICH8 Family<span style="color: #7a0874; font-weight: bold;">&#41;</span> PCI Express Port <span style="color: #000000;">6</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">rev</span> 03<span style="color: #7a0874; font-weight: bold;">&#41;</span>
00:1d.0 USB Controller: Intel Corporation 82801H <span style="color: #7a0874; font-weight: bold;">&#40;</span>ICH8 Family<span style="color: #7a0874; font-weight: bold;">&#41;</span> USB UHCI Controller <span style="color: #666666; font-style: italic;">#1 (rev 03)</span>
00:1d.1 USB Controller: Intel Corporation 82801H <span style="color: #7a0874; font-weight: bold;">&#40;</span>ICH8 Family<span style="color: #7a0874; font-weight: bold;">&#41;</span> USB UHCI Controller <span style="color: #666666; font-style: italic;">#2 (rev 03)</span>
00:1d.2 USB Controller: Intel Corporation 82801H <span style="color: #7a0874; font-weight: bold;">&#40;</span>ICH8 Family<span style="color: #7a0874; font-weight: bold;">&#41;</span> USB UHCI Controller <span style="color: #666666; font-style: italic;">#3 (rev 03)</span>
00:1d.7 USB Controller: Intel Corporation 82801H <span style="color: #7a0874; font-weight: bold;">&#40;</span>ICH8 Family<span style="color: #7a0874; font-weight: bold;">&#41;</span> USB2 EHCI Controller <span style="color: #666666; font-style: italic;">#1 (rev 03)</span>
00:1e.0 PCI bridge: Intel Corporation <span style="color: #000000;">82801</span> Mobile PCI Bridge <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">rev</span> f3<span style="color: #7a0874; font-weight: bold;">&#41;</span>
00:1f.0 ISA bridge: Intel Corporation 82801HEM <span style="color: #7a0874; font-weight: bold;">&#40;</span>ICH8M<span style="color: #7a0874; font-weight: bold;">&#41;</span> LPC Interface Controller <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">rev</span> 03<span style="color: #7a0874; font-weight: bold;">&#41;</span>
00:1f.1 IDE interface: Intel Corporation 82801HBM<span style="color: #000000; font-weight: bold;">/</span>HEM <span style="color: #7a0874; font-weight: bold;">&#40;</span>ICH8M<span style="color: #000000; font-weight: bold;">/</span>ICH8M-E<span style="color: #7a0874; font-weight: bold;">&#41;</span> IDE Controller <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">rev</span> 03<span style="color: #7a0874; font-weight: bold;">&#41;</span>
00:1f.2 SATA controller: Intel Corporation 82801HBM<span style="color: #000000; font-weight: bold;">/</span>HEM <span style="color: #7a0874; font-weight: bold;">&#40;</span>ICH8M<span style="color: #000000; font-weight: bold;">/</span>ICH8M-E<span style="color: #7a0874; font-weight: bold;">&#41;</span> SATA AHCI Controller <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">rev</span> 03<span style="color: #7a0874; font-weight: bold;">&#41;</span>
00:1f.3 SMBus: Intel Corporation 82801H <span style="color: #7a0874; font-weight: bold;">&#40;</span>ICH8 Family<span style="color: #7a0874; font-weight: bold;">&#41;</span> SMBus Controller <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">rev</span> 03<span style="color: #7a0874; font-weight: bold;">&#41;</span>
01:<span style="color: #000000;">00.0</span> VGA compatible controller: nVidia Corporation GeForce 8400M GS <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">rev</span> a1<span style="color: #7a0874; font-weight: bold;">&#41;</span>
02:<span style="color: #000000;">00.0</span> Network controller: Intel Corporation PRO<span style="color: #000000; font-weight: bold;">/</span>Wireless 3945ABG <span style="color: #7a0874; font-weight: bold;">&#91;</span>Golan<span style="color: #7a0874; font-weight: bold;">&#93;</span> Network Connection <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">rev</span> 02<span style="color: #7a0874; font-weight: bold;">&#41;</span>
06:<span style="color: #000000;">00.0</span> Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101E<span style="color: #000000; font-weight: bold;">/</span>RTL8102E PCI Express Fast Ethernet controller <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">rev</span> 01<span style="color: #7a0874; font-weight: bold;">&#41;</span>
07:<span style="color: #000000;">09.0</span> FireWire <span style="color: #7a0874; font-weight: bold;">&#40;</span>IEEE <span style="color: #000000;">1394</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>: Ricoh Co Ltd R5C832 IEEE <span style="color: #000000;">1394</span> Controller <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">rev</span> 05<span style="color: #7a0874; font-weight: bold;">&#41;</span>
07:<span style="color: #000000;">09.1</span> SD Host controller: Ricoh Co Ltd R5C822 SD<span style="color: #000000; font-weight: bold;">/</span>SDIO<span style="color: #000000; font-weight: bold;">/</span>MMC<span style="color: #000000; font-weight: bold;">/</span>MS<span style="color: #000000; font-weight: bold;">/</span>MSPro Host Adapter <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">rev</span> <span style="color: #000000;">22</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
07:<span style="color: #000000;">09.2</span> System peripheral: Ricoh Co Ltd R5C843 MMC Host Controller <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">rev</span> <span style="color: #000000;">12</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
07:<span style="color: #000000;">09.3</span> System peripheral: Ricoh Co Ltd R5C592 Memory Stick Bus Host Adapter <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">rev</span> <span style="color: #000000;">12</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
07:<span style="color: #000000;">09.4</span> System peripheral: Ricoh Co Ltd xD-Picture Card Controller <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">rev</span> ff<span style="color: #7a0874; font-weight: bold;">&#41;</span></pre></div></div>

<p>I installed <strong>Debian Squeeze amd64</strong> and almost everythinng worked out-of-box, except few things.</p>
<p><strong>Wi-Fi</strong><br />
I had to install binary firmware for Intel 3945 since non-free packages are not in default Debian installation.  Fortunately I was able to connect with wire:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">aptitude</span> <span style="color: #c20cb9; font-weight: bold;">install</span> firmware-iwlwifi</pre></div></div>

<p><strong>NVIDIA drivers</strong><br />
The default X driver is <emph>nv</emph> which performance is poor. Again, I had to manually install non-free software. Just googled &#8220;nvidia drivers linux&#8221; and followed the instructions. The good news is that the quailty of the official NVIDIA drivers for X server is very satisfactionary.</p>
<p><strong>Muting speakers when headphones are plugged-in</strong><br />
This is one I haven&#8217;t solved yet. I just mutted the front speakers in ALSA Mixer, but that&#8217;s only a workaround.<br />
UPDATE: It works after updating <emph>alsa-base</emph> to version 1.0.20</p>
<p><strong>ACPI</strong><br />
I noticed that when I tried first time to exhaust the battery it didn&#8217;t show any notification like &#8220;Low battery level&#8221;; it just died out of energy. Maybe it&#8217;s just a GNOME setting, dunno.</p>
<p>What I haven&#8217;t tested is fax modem and card bus.</p>
<p>The battery works for 2h15m which is quite short time.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ponton.srednikpe.org/2009/05/29/hp-pavilion-dv6780-on-debian-squeeze/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>gdb</title>
		<link>http://www.ponton.srednikpe.org/2008/08/30/gdb/</link>
		<comments>http://www.ponton.srednikpe.org/2008/08/30/gdb/#comments</comments>
		<pubDate>Fri, 29 Aug 2008 22:54:40 +0000</pubDate>
		<dc:creator>ponton</dc:creator>
				<category><![CDATA[Computer science and math]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Polskie]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[gdb]]></category>

		<guid isPermaLink="false">http://www.ponton.srednikpe.org/?p=52</guid>
		<description><![CDATA[Debuggowanie potrafi niemal wykładniczo skrócić czas szukania błędów w programie, więc warto nauczyć się sprawnie obsługiwać debugger. Dotychczas GNU Debugger był dla mnie czarną magią, a wzorem &#8212; ten  z Visual Studio. Tylko gdzieś słyszałem/czytałem, że gdb ma takie same możliwości, ale nie dane mi było się o tym przekonać. Niedawno musiałem się nauczyć jego [...]]]></description>
			<content:encoded><![CDATA[<p>Debuggowanie potrafi niemal wykładniczo skrócić czas szukania błędów w programie, więc warto nauczyć się sprawnie obsługiwać debugger. Dotychczas GNU Debugger był dla mnie czarną magią, a wzorem &#8212; ten  z Visual Studio. Tylko gdzieś słyszałem/czytałem, że gdb ma takie same możliwości, ale nie dane mi było się o tym przekonać. Niedawno musiałem się nauczyć jego obsługi, dlatego napiszę sobie ściągawkę (nie, żeby z niej korzystać, ale żeby utrwalić).</p>
<p><strong>Zanim zaczniesz</strong></p>
<p>Musisz najpierw skompilować program z informacjami dla gdb. Robi opcja -g dla gcc.</p>
<p><strong>Komendy</strong></p>
<p>Zamiast miłego interfejsu graficznego, jest miły wiersz poleceń (co dla programisty jest wygodniejsze, bo nie musi odrywać rąk od klawiatury :&gt;), w którym wpisujesz polecenia. Nie musisz podawać jej pełnej nazwy, wystarczy jednoznaczny początek (najczęstsze polecenia mają jedno/dwuliterowe synonimy). Działa dopełnienie tabulatorem! W razie czego: <strong>help komenda</strong>.</p>
<p><strong>Start</strong></p>
<p><strong></strong>Pierwszy paremtr to nazwa pliku wynikowego programu. Drugim może być numer procesu tego programu, jeśli chcesz zacząć debuggować już działający program.</p>
<p>Przydatne komendy:</p>
<ul>
<li><strong>run [argumenty]</strong> &#8211;  uruchamia program z podanymi (opcjonalnymi) argumentami</li>
<li><strong>continue</strong> &#8211; jeśli program jest zatrzymany, wznawia jego działanie</li>
<li><strong>finish</strong> &#8211; program się wykonuje aż do napotkania &#8220;return&#8221;; innymi słowy program działa aż do końca aktualnej ramki stosu</li>
</ul>
<p><strong>Stop</strong></p>
<p>Żeby się gdzieś zatrzymać, trzeba ustawić breakpointy:</p>
<ul>
<li><strong>breakpoint funkcja</strong> &#8211; ustala breakpoint na początek funkcji</li>
<li><strong>breakpoint [plik:]linia</strong> &#8211; ustala breakpoint na określoną linię pliku</li>
<li><strong>info breakpoints</strong> &#8211; wypisuje utawione breakpointy</li>
<li><strong>delete n</strong> &#8211; usuwa n-ty breakpoint</li>
<li><strong>condition n cond</strong> &#8211; ustala warunek dla n-tego breakpointa (program zatrzyma się na nim, jeśli zostanie spełniony warunek cond)</li>
<li><strong>^C </strong>- czyli przerwanie z klawiatury, również zatrzymuje działający program i oddaje kontrolę gdb</li>
</ul>
<p><strong>Co się dzieje?</strong></p>
<p>Kilka przydatnych komend, aby zorientować się, co się aktualnie dzieje:</p>
<ul>
<li><strong>list</strong> &#8211; listing kodu (10 linii obecnego kontekstu, podana nazwa funkcji, numer linii, etc.)</li>
<li><strong>frame</strong> &#8211; aktualna ramka stosu oraz aktualna instrukcja</li>
<li><strong>backtrace</strong> &#8211; ślad stosu</li>
<li><strong>print x</strong> &#8211; wypisanie wartości x (to może być dowolne wyrażenie, razem ze zmiennymi w programie)</li>
</ul>
<p><strong>Tropimy</strong></p>
<p>To, co najważniejsze, czyli śledzimy program krok po kroku:</p>
<ul>
<li><strong>next</strong> &#8211; następna instrukcja (lub n instrukcji), bez wchodzenia wgłąb procedur</li>
<li><strong>step</strong> &#8211; j/w, ale z wchodzeniem wgłąb</li>
</ul>
<p><strong>Psujemy</strong></p>
<p>Można przetestować kilka rzeczy w trakcie trwania programu:</p>
<ul>
<li><strong>set x wartość</strong> &#8211; ustawiamy zmiennej x wartość</li>
<li><strong>call f(x)</strong> &#8211; wywołujemy funkcję f z argumentami (w tym wypadku tylko x)</li>
</ul>
<p><strong>Format zapisu zmiennych, funkcji i adresów.</strong></p>
<p>Czasem chcemy się odwołać do zmiennej z jakiegoś innego zakresu albo funkcji składowej, wtedy piszemy zakres::x, jeśli np. zakres jest klasą, a x jej metodą/polem, albo zakres jest funkcją, a x jej zmienną lokalną. Odwołanie do konkretnej linii ma składnię plik:linia, np. test.c:244. Adres zapisujemy z gwiazdką na początku, np. *0&#215;000000.</p>
<p>A na koniec: <strong>quit</strong>. I tyle. To było zaledwie 1/5 możliwości gdb, mimo to spokojnie wystarczy do efektywnego debuggowania. Chociaż dziesiątki printfów mają swój urok. ;)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ponton.srednikpe.org/2008/08/30/gdb/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Open source? A po cholerę mi kod źródłowy?</title>
		<link>http://www.ponton.srednikpe.org/2008/02/07/open-source-a-po-cholere-mi-kod-zrodlowy/</link>
		<comments>http://www.ponton.srednikpe.org/2008/02/07/open-source-a-po-cholere-mi-kod-zrodlowy/#comments</comments>
		<pubDate>Wed, 06 Feb 2008 22:58:24 +0000</pubDate>
		<dc:creator>ponton</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Polskie]]></category>
		<category><![CDATA[Przemyślenia]]></category>
		<category><![CDATA[free software]]></category>
		<category><![CDATA[gnu]]></category>
		<category><![CDATA[mam rację]]></category>
		<category><![CDATA[narzekanie]]></category>
		<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://www.ponton.srednikpe.org/2008/02/07/open-source-a-po-cholere-mi-kod-zrodlowy/</guid>
		<description><![CDATA[Ostatnio często czytam stwierdzenia, że dostęp do kodu źródłowy nie jest przydatny zwykłym użytkownikom, którzy nie mają zielonego pojęcia o programowaniu. Krew mnie powoli zalewa, gdy o tym słyszę, więc powiem tak: otwarty kod źródłowy wolnego oprogramowania umożliwia innym programistom (niezależnym od autorów oprogramowania) analizować dany program, wykrywać i naprawiać jego błędy oraz tworzyć rozszerzenia [...]]]></description>
			<content:encoded><![CDATA[<p>Ostatnio często czytam stwierdzenia, że dostęp do kodu źródłowy nie jest przydatny zwykłym użytkownikom, którzy nie mają zielonego pojęcia o programowaniu. Krew mnie powoli zalewa, gdy o tym słyszę, więc powiem tak: <strong>otwarty kod źródłowy wolnego oprogramowania umożliwia innym programistom (niezależnym od autorów oprogramowania) analizować dany program, wykrywać i naprawiać jego błędy oraz tworzyć rozszerzenia i inne dodatki, dzięki czemu wszyscy użytkownicy (cała <em>społeczność</em></strong><strong>) ZYSKUJĄ </strong>(uff&#8230; długie zdanie).</p>
<p>Załóżmy,  że jakiegoś programu używa 200000 osób, jedna na tysiąc programuje, więc daje nam 200 programistów, zdolnych przejrzeć i poprawić nasz program. Korzystają wszyscy, nie tylko informatycy. Na tym to polega. Jasne? Mam nadzieję, że cześć osób zrozumie.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ponton.srednikpe.org/2008/02/07/open-source-a-po-cholere-mi-kod-zrodlowy/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Jak ptak lub jak żółw</title>
		<link>http://www.ponton.srednikpe.org/2007/12/26/jak-ptak-lub-jak-zolw/</link>
		<comments>http://www.ponton.srednikpe.org/2007/12/26/jak-ptak-lub-jak-zolw/#comments</comments>
		<pubDate>Wed, 26 Dec 2007 14:14:39 +0000</pubDate>
		<dc:creator>ponton</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Polskie]]></category>
		<category><![CDATA[Przemyślenia]]></category>
		<category><![CDATA[free software]]></category>
		<category><![CDATA[hehe]]></category>

		<guid isPermaLink="false">http://www.ponton.srednikpe.org/2007/12/26/jak-ptak-lub-jak-zolw/</guid>
		<description><![CDATA[Zwolennicy wolnego oprogramowania mają zwykle problem z jego nazwą. Po angielsku &#8220;free&#8221; może znaczyć również darmowy, dlatego zaznacza się, że &#8220;free as in freedom&#8221;, a nie &#8220;free as in free beer&#8221;. Po polsku &#8220;wolny&#8221; to także przeciwieństwo &#8220;szybkiego&#8221;. Dzisiaj w nocy wymyśliłem fajne tłumaczenie: &#8220;wolny jak ptak&#8221; i &#8220;wolny jak żółw&#8221;. Fajne, prawda? Programy wolne [...]]]></description>
			<content:encoded><![CDATA[<p>Zwolennicy wolnego oprogramowania mają zwykle problem z jego nazwą. Po angielsku &#8220;free&#8221; może znaczyć również darmowy, dlatego zaznacza się, że &#8220;free as in freedom&#8221;, a nie &#8220;free as in free beer&#8221;. Po polsku &#8220;wolny&#8221; to także przeciwieństwo &#8220;szybkiego&#8221;. Dzisiaj w nocy wymyśliłem fajne tłumaczenie: &#8220;wolny jak ptak&#8221; i &#8220;wolny jak żółw&#8221;. Fajne, prawda? Programy wolne jak ptak. ;)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ponton.srednikpe.org/2007/12/26/jak-ptak-lub-jak-zolw/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Mailu-Mailu</title>
		<link>http://www.ponton.srednikpe.org/2007/11/03/mailu-mailu/</link>
		<comments>http://www.ponton.srednikpe.org/2007/11/03/mailu-mailu/#comments</comments>
		<pubDate>Sat, 03 Nov 2007 18:29:47 +0000</pubDate>
		<dc:creator>ponton</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Polskie]]></category>
		<category><![CDATA[jabber]]></category>
		<category><![CDATA[propaganda]]></category>

		<guid isPermaLink="false">http://www.ponton.srednikpe.org/2007/11/03/mailu-mailu/</guid>
		<description><![CDATA[Jabberowej reklamy ciąg dalszy: poczta Mailu-mailu.]]></description>
			<content:encoded><![CDATA[<p>Jabberowej reklamy ciąg dalszy: <a title="poczta Mailu-mailu" href="http://paweldejko.blogspot.com/2007/11/mailu-mailu.html">poczta Mailu-mailu</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ponton.srednikpe.org/2007/11/03/mailu-mailu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JZW Interpreter source and examples</title>
		<link>http://www.ponton.srednikpe.org/2007/09/09/jzw-interpreter-source-and-examples/</link>
		<comments>http://www.ponton.srednikpe.org/2007/09/09/jzw-interpreter-source-and-examples/#comments</comments>
		<pubDate>Sun, 09 Sep 2007 18:00:49 +0000</pubDate>
		<dc:creator>ponton</dc:creator>
				<category><![CDATA[Computer science and math]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[haskell]]></category>
		<category><![CDATA[interpreter]]></category>
		<category><![CDATA[jzwi]]></category>
		<category><![CDATA[my code]]></category>

		<guid isPermaLink="false">http://www.ponton.srednikpe.org/2007/09/09/jzw-interpreter-source-and-examples/</guid>
		<description><![CDATA[All right. I said I&#8217;ll show my jzwi source and here it is: http://www.srednikpe.org/src/jzwi/ It is almost ended. It doesn&#8217;t only check local variable if they have unique names. I&#8217;m too lazy to do that. But after all it works fine and quite fast (compared to other interpreters written by my colleagues). To run jzwi [...]]]></description>
			<content:encoded><![CDATA[<p>All right. I said I&#8217;ll show my jzwi source and here it is: <a title="JZW interpreter source and examples" href="http://www.srednikpe.org/src/jzwi/">http://www.srednikpe.org/src/jzwi/</a></p>
<p>It is almost ended. It doesn&#8217;t only check local variable if they have unique names. I&#8217;m too lazy to do that. But after all it works fine and quite fast (compared to other interpreters written by my colleagues).</p>
<p>To run jzwi program just run  &#8220;jzwi program.jzw argument1 argument2 &#8230;&#8221;.</p>
<p>It&#8217;s all licensed on GPL (any version). There is no guarantee that it&#8217;ll work. ;)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ponton.srednikpe.org/2007/09/09/jzw-interpreter-source-and-examples/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
