This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 262703

Summary: Watch item list out of order for arrays.
Product: cnd Reporter: alibabashack <alibabashack>
Component: DebuggerAssignee: Maria Tishkova <mromashova>
Status: RESOLVED WORKSFORME    
Severity: normal    
Priority: P3    
Version: 8.1   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:

Description alibabashack 2016-07-06 16:52:22 UTC
In a C++ project stop the debugger in the scope of a pointer holding the first location of an array:

void foo(uint8_t * const bar){
[...]
}

Add a watch expression casting the pointer to an array of a specific size s, where s>10, e.g.: 
"(uint8_t[500])bar"

The watch window correctly displays the content of the array, but the order of the elements is in alphabetical order of the array index:

* (uint8_t[500])bar[0]
* (uint8_t[500])bar[10]
* (uint8_t[500])bar[11]
* [...]

 It should be in numerical order:
* (uint8_t[500])bar[0]
* (uint8_t[500])bar[1]
* (uint8_t[500])bar[2]
* [...]
Comment 1 alibabashack 2016-07-06 17:00:47 UTC
I just realized that a click to the "Name" column header seems to toggle the ordering behaviour (numerical <-> alphabetical). That's nice and seems to handle this case very well. For me this renders this ticket superfluous. Sorry for the noise.
Comment 2 Martin Entlicher 2016-08-12 17:09:59 UTC
O.K. Thanks.