Bug 143792 - Address breakpoint doesn't reflect modified source code
Summary: Address breakpoint doesn't reflect modified source code
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug (show other bugs)
Version: 3.0.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: cdt-debug-inbox@eclipse.org CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-25 14:21 EDT by Patrick Chuong CLA
Modified: 2020-09-04 15:21 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Chuong CLA 2006-05-25 14:21:22 EDT
When you set a breakpoint in the disassembly view and the breakpoint icon is visible in both the disassembly view and the editor. However, when you modify the source code in the editor, recompile, re-launch, the breakpoint is set at the old address (i.e 0x20), however, the source line the you modified is relocated to a new address (i.e 0xff). But the breakpoint at address 0x20 is still visible in the editor. The editor's breakpoint icon shouldn't be visible, because at address 0x20, there is no source associated at the location.

I am using this piece of code and modify the i, j, and k in the loops.. the address is relocated after recompile.

#include <stdio.h>
void main()
{
	int i, j ,k;
	for (i=0; i<10; i++)
	{
		for (j=0; j<100; j++)
		{
			for (k=0; k<1000; k++)
			{
				i=k+j;
				printf("a%d\n", k); // change k to k++
				j=i+k;
				printf("b%d\n", j); // change j to j++
				k=j+i;
				printf("c%d\n", i); // change i to i++
			}
		}
	}
}