watch window: attempt to resolve pointers to symbol names
Here's a handy feature present in a mid-1990s IDE (Microsoft VisualC++ v6.0) that Rowley Crossworks might benefit from adding.
When the Watch window is monitoring a pointer, the IDE checks to see if the pointer points to an entry in the symbol table, and if it does, it displays the symbol name.
Below is a quick and dirty contrived code example to illustrate. There are also screenshots of how VisualC++ displays the watch window versus Rowley Crossworks.
Rowley Crossworks has an assortment of extra checkbox options under the gear button to display various quantities, but nothing yet exists that is of comparable utility.
Anyway, it seemed worth making the suggestion.
struct foo_struct
{
const char *name;
int val;
};
static const struct foo_struct apple = { "apple", 0 };
static const struct foo_struct orange = { "orange", 0 };
static const struct foo_struct pear = { "pear", 1 };
static const struct foo_struct *registry[] =
{
&apple,
&orange,
&pear,
};
void main(void)
{
int i;
for (i = 0; i < (sizeof(registry) / sizeof(*registry)); i++)
printf("%s\n", registry[i]->name);
}
Please sign in to leave a comment.
Comments
0 comments