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 - Watch item list out of order for arrays.
Summary: Watch item list out of order for arrays.
Status: RESOLVED WORKSFORME
Alias: None
Product: cnd
Classification: Unclassified
Component: Debugger (show other bugs)
Version: 8.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: Maria Tishkova
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-06 16:52 UTC by alibabashack
Modified: 2016-08-12 17:09 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.