- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is there any way to set a conditional breakpoint in the NIOS IDE tool.
I would like to set a breakpoint during a condition within an if statement. For example for(i = 0; i < 0x1ffffff; i++) Set a break point at 0x1000000 There is an option in the properties menu of the breakpoint (image attached) to set a condition but it does not appear to break if I enter a value in the field. Is this type of breakpoint possible? Thanks file:///C:/DOCUME%7E1/EBrown/LOCALS%7E1/Temp/moz-screenshot.pngLink Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have never tried setting a true conditional break point in Nios II IDE. However, a technique I have used before with many architectures is to simply add a NOP to your code with an IF statement on your condition. Then you can set a regular break point on the NOP.
So for your example, you could do something like:for(i = 0; i < 0x1ffffff; i++)
{
.
.
.
if(i == 0x1000000)
__asm__ volatile("nop"); <-- set break point here
.
.
.
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The only way such a breakpoint could be done would be for the debugger to break on every iteration and then perform the the required data test - continuing execution is the test wasn't met. I think gdb can do this, but you probably need to find the gdb command prompt!
So putting a breakpoint on a 'nop' is probably easier.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page