Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 311855

Summary: Find / Replace Memory: last two addresses of memory region are excluded from search
Product: [Tools] CDT Reporter: saman <saman_ishtiaq>
Component: cdt-memoryAssignee: cdt-debug-inbox <cdt-debug-inbox>
Status: NEW --- QA Contact: Jonah Graham <jonah>
Severity: normal    
Priority: P3    
Version: 0 DD 1.1   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description saman CLA 2010-05-06 07:22:01 EDT
Build Identifier: 20100218-1602

When tried to find a data via Find / Replace, elements present at the last or second last location of the address range provided are not found. It seems the search excludes the last two address locations from the search

Reproducible: Always

Steps to Reproduce:
1. Make sure an image is loaded to target/Simlator
2. Open Memory Browser View from Window > Show view > Memory Browser.
3. Set Memory Browser to show 1 byte Hex values. Right click in view and select Radix > Hexadecimal. Again Right click and select Cell Size > 1 Byte.
4. Now I'm searching for 1 byte hexadecimal value 'AA' which is present at 0x00, 0x02, 0x04, 0x06.

I filled in the Find / Replace Memory dialog as follows:

Find:     AA
Replace:  FF
Direction: Forward
Range:-
Start address:  0x00000000 // the starting address of memory being searched.
End address:    0x00000006 // the end address of memory being searched.

Format:  Hexadecimal

6. When i Click 'Find All' button. 'Search View' opens up with the following locations listed 
0x0
0x2
0x4

It did not find the data at 0x6 address location.

If i increase the address range by one i.e. 0x00000000 - 0x00000007 ,still the same result, does not find data at 0x06.
9. Again increment range by one i.e. make it 0x00000000 - 0x00000008. Now it shows up 4 locations. including the last one ( 0x06) 

It is excluding last two addresses of the address range provided for the search.

Moreover If you try with Direction:Backward and Address range: 0x00000000 - 0x00000006
It starts excluding the start address as well. The Search View will show only two addresses.

0x2
0x4