Quote:
Originally Posted by jggimi
Are you using the built-in version 6.3, or the 7.12 package? If installed, the latter is executed with egdb(1).
I have never set watch points, just break points, so I don't have any direct experience with this issue.
|
Thanks for replying. I was confused as to why the version numbers were different.
I was using the built in version however when I tried egdb just now, the watchpoints worked when I used them on simple code like below, but when I tried it with the SDL code above, it locked up when a function was called, so it might be fighting SDL, or perhaps it doesn't like libraries.
Code:
#include <stdio.h>
#include <stdlib.h>
int wib(int no1, int no2)
{
int result, diff;
diff = no1 - no2;
result = no1 / diff;
return result;
}
int main(int argc, char *argv[])
{
int value, div, result, i, total;
value = 10;
div = 6;
total = 0;
for(i = 0; i < 10; i++)
{
result = wib(value, div);
total += result;
div++;
value--;
}
printf("%d wibed by %d equals %d\n", value, div, total);
return 0;
}