Hello Team,
The situation is that I have a list of address where there is either a delay slot or something else due to which hardware breakpoint cannot be put at these locations. If an error(…) is returned by GDB to Eclipse, then the error marker is correctly created
by CDT (10.2) in C/C++ Source Editor but when breakpoint is put in disassembly view then there is no error marker created.
Issue is probably a bug in CDT code. The issue is that the address breakpoint user puts in disassembly window is instance of CAddressBreakpoint which in turn is instance of ICLineBreakpoint and therefore the following ‘if’ condition becomes true for address
breakpoint as well:
if (breakpoint instanceof ICLineBreakpoint)) {...}
But the code inside the if condition will not create a correct error marker in disassembly window because it uses line number for position. I tried using address from the breakpoint object for position attribute but that did not help either.
Can you please guide on HOW TO CREATE ERROR MARKER IN DISASSEMBLY WINDOW ?
Code I tried just above the above mentioned if condition is as following:
if (breakpoint instanceof ICAddressBreakpoint)
{
IMarker marker = fBreakpointMarkerProblems.remove(breakpoint);
if (marker != null) {
try {
marker.delete();
} catch (CoreException e) {
}
}
CAddressBreakpoint addressBreakpoint
= (CAddressBreakpoint) breakpoint;
try {
IMarker breakpointMarker = addressBreakpoint.getMarker();
breakpointMarker.setAttribute(IMarker.MESSAGE,
description);
breakpointMarker.setAttribute(IMarker.SEVERITY,
severity);
addressBreakpoint.setMarker(breakpointMarker);
addressBreakpoint.setEnabled(false);
} catch (CoreException e) { }
} else if (breakpoint instanceof ICLineBreakpoint))
{...}
This works but it does not add a new error marker BUT edits the message in the breakpoint marker itself. Please guide on inserting a new error marker for an address in disassembly view!
Thanks & Best Regards,
Shiva Sharma..