<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Hi Victor, in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/watch-if/m-p/961700#M80518</link>
    <description>Hi Victor,

the condiktional watchpoint syntax is actually the same as for breakpoints in GDB*. Thus in genral something like

(gdb) watch my_arr[3] if my_arr[3] &amp;gt; 10


should work.

In addition the whole syntax as described for setting breakpoint conditions in the GDB* manual 

&lt;A href="http://sourceware.org/gdb/current/onlinedocs/gdb/Conditions.html#Conditions" target="_blank"&gt;http://sourceware.org/gdb/current/onlinedocs/gdb/Conditions.html#Conditions&lt;/A&gt;

also applies - especially if you are looking at more complex conditions.

Where it gets a bit tricky is if you are changing scope during the run. Then you may need to use hardware watchpoints:

(gdb) set can-use-hw-watchpoints

(gdb) watch *(int *)0x41523c0
Hardware watchpoint 1: *(int *)0x41523c0

Thanks, Rob</description>
    <pubDate>Fri, 30 Nov 2012 22:30:28 GMT</pubDate>
    <dc:creator>Rob_Mueller-Albrecht</dc:creator>
    <dc:date>2012-11-30T22:30:28Z</dc:date>
    <item>
      <title>watch if</title>
      <link>https://community.intel.com/t5/Software-Archive/watch-if/m-p/961699#M80517</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I'm using idb in gdb mode to debug a code. I have a REAL*8 variable which is an array of length 50 that is changed a lot through the code. I would like to watch this variable and make the debugger stop only if some position in that array receives a negative value.&lt;/P&gt;
&lt;P&gt;I know that I have to use watch if for doing this, but I don't know what syntax I have to use exactly. Can someone help me?&lt;/P&gt;
&lt;P&gt;Thank you,&lt;/P&gt;
&lt;P&gt;Victor&lt;/P&gt;</description>
      <pubDate>Fri, 30 Nov 2012 17:18:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/watch-if/m-p/961699#M80517</guid>
      <dc:creator>Victor_M_1</dc:creator>
      <dc:date>2012-11-30T17:18:27Z</dc:date>
    </item>
    <item>
      <title>Hi Victor,</title>
      <link>https://community.intel.com/t5/Software-Archive/watch-if/m-p/961700#M80518</link>
      <description>Hi Victor,

the condiktional watchpoint syntax is actually the same as for breakpoints in GDB*. Thus in genral something like

(gdb) watch my_arr[3] if my_arr[3] &amp;gt; 10


should work.

In addition the whole syntax as described for setting breakpoint conditions in the GDB* manual 

&lt;A href="http://sourceware.org/gdb/current/onlinedocs/gdb/Conditions.html#Conditions" target="_blank"&gt;http://sourceware.org/gdb/current/onlinedocs/gdb/Conditions.html#Conditions&lt;/A&gt;

also applies - especially if you are looking at more complex conditions.

Where it gets a bit tricky is if you are changing scope during the run. Then you may need to use hardware watchpoints:

(gdb) set can-use-hw-watchpoints

(gdb) watch *(int *)0x41523c0
Hardware watchpoint 1: *(int *)0x41523c0

Thanks, Rob</description>
      <pubDate>Fri, 30 Nov 2012 22:30:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/watch-if/m-p/961700#M80518</guid>
      <dc:creator>Rob_Mueller-Albrecht</dc:creator>
      <dc:date>2012-11-30T22:30:28Z</dc:date>
    </item>
  </channel>
</rss>

