<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Software Breakpoints</title>
	<atom:link href="http://www.technochakra.com/software-breakpoints/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.technochakra.com/software-breakpoints/</link>
	<description>Wheels Of Technology</description>
	<lastBuildDate>Tue, 27 Jul 2010 03:08:27 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: tsp</title>
		<link>http://www.technochakra.com/software-breakpoints/comment-page-1/#comment-2278</link>
		<dc:creator>tsp</dc:creator>
		<pubDate>Tue, 20 Jul 2010 06:01:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.technochakra.com/?p=192#comment-2278</guid>
		<description>At the run time, we are attaching a process to the GDB and at time time we are setting a break point (in a specified file and a specfic line number), how the GDB know the exact opcode in the ELF file.is there any mapping application is there inside GDB</description>
		<content:encoded><![CDATA[<p>At the run time, we are attaching a process to the GDB and at time time we are setting a break point (in a specified file and a specfic line number), how the GDB know the exact opcode in the ELF file.is there any mapping application is there inside GDB</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Debugging &#8211; Modifying Code At Runtime - technochakra.com</title>
		<link>http://www.technochakra.com/software-breakpoints/comment-page-1/#comment-1519</link>
		<dc:creator>Debugging &#8211; Modifying Code At Runtime - technochakra.com</dc:creator>
		<pubDate>Sat, 09 Jan 2010 19:16:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.technochakra.com/?p=192#comment-1519</guid>
		<description>[...] The debugger&#8217;s access to a program&#8217;s memory and registers not only allows users to view the state of the program but also set software breakpoints. Software breakpoints are set by altering and restoring the instructions in memory and has already been covered indepth in an earlier article. [...]</description>
		<content:encoded><![CDATA[<p>[...] The debugger&#8217;s access to a program&#8217;s memory and registers not only allows users to view the state of the program but also set software breakpoints. Software breakpoints are set by altering and restoring the instructions in memory and has already been covered indepth in an earlier article. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tc</title>
		<link>http://www.technochakra.com/software-breakpoints/comment-page-1/#comment-1160</link>
		<dc:creator>tc</dc:creator>
		<pubDate>Fri, 04 Sep 2009 18:59:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.technochakra.com/?p=192#comment-1160</guid>
		<description>@John, Nice approach.   It also does not assume Intel as the underlying platform so will work for a lot of Unix variants.</description>
		<content:encoded><![CDATA[<p>@John, Nice approach.   It also does not assume Intel as the underlying platform so will work for a lot of Unix variants.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John</title>
		<link>http://www.technochakra.com/software-breakpoints/comment-page-1/#comment-1159</link>
		<dc:creator>John</dc:creator>
		<pubDate>Fri, 04 Sep 2009 09:56:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.technochakra.com/?p=192#comment-1159</guid>
		<description>For an alternative approach on a unix platform, assuming gdb, one can use raise(SIGTRAP). In fact, using a signal gives you a way to only stop execution if you are within gdb:

struct sigaction oldAct;
struct sigaction newAct;

newAct.sa_handler = SIG_IGN;
sigaction(SIGTRAP, &amp;newAct, &amp;oldAct);
raise(SIGTRAP);
sigaction(SIGTRAP, &amp;oldAct, NULL);

Wrap that up in a function which takes a bool, and the process will send itself a signal that it will ignore. Crucially, gdb will *not* ignore it, and will take a break.</description>
		<content:encoded><![CDATA[<p>For an alternative approach on a unix platform, assuming gdb, one can use raise(SIGTRAP). In fact, using a signal gives you a way to only stop execution if you are within gdb:</p>
<p>struct sigaction oldAct;<br />
struct sigaction newAct;</p>
<p>newAct.sa_handler = SIG_IGN;<br />
sigaction(SIGTRAP, &amp;newAct, &amp;oldAct);<br />
raise(SIGTRAP);<br />
sigaction(SIGTRAP, &amp;oldAct, NULL);</p>
<p>Wrap that up in a function which takes a bool, and the process will send itself a signal that it will ignore. Crucially, gdb will *not* ignore it, and will take a break.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tc</title>
		<link>http://www.technochakra.com/software-breakpoints/comment-page-1/#comment-1065</link>
		<dc:creator>tc</dc:creator>
		<pubDate>Tue, 18 Aug 2009 18:26:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.technochakra.com/?p=192#comment-1065</guid>
		<description>@Rohit,
I am assuming you are asking this for the Windows platform.
Inline assembly (__asm) is not allowed in Visual Studio&#039;s x64 bit compilers.  You can either create your own asm file with a function that invokes &quot;int 3&quot; and call that function from your C/C++ code or simply invoke the ::DebugBreak() Windows API that internally invokes &quot;int 3&quot;.</description>
		<content:encoded><![CDATA[<p>@Rohit,<br />
I am assuming you are asking this for the Windows platform.<br />
Inline assembly (__asm) is not allowed in Visual Studio&#8217;s x64 bit compilers.  You can either create your own asm file with a function that invokes &#8220;int 3&#8243; and call that function from your C/C++ code or simply invoke the ::DebugBreak() Windows API that internally invokes &#8220;int 3&#8243;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rohit Kulshreshtha</title>
		<link>http://www.technochakra.com/software-breakpoints/comment-page-1/#comment-1064</link>
		<dc:creator>Rohit Kulshreshtha</dc:creator>
		<pubDate>Tue, 18 Aug 2009 14:55:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.technochakra.com/?p=192#comment-1064</guid>
		<description>Any clue on how one may achieve this on x86_64?</description>
		<content:encoded><![CDATA[<p>Any clue on how one may achieve this on x86_64?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
