RemedyBG»Forums
2 posts
Watch - How to format a string array?

A bit new here to this tool, and have had some success with formatting some things based on the documentation.

I can't quite figure out how to display columns of strings from a buffer that stores several strings.

In my case I have a pointer to a set of paths.

char paths[10][MAX_PATH];

or sometimes...

char *paths = malloc(MAX_PATH * 10);

I copy strings in with memcpy and iterate along with pointer arithmetic.

I'd love to set something up in the watch window to see a column of strings the length of MAX_PATH with 10 rows.

Appreciate any guidance.

2 posts
Watch - How to format a string array?

Poked at it again, and had some success.

With code like: *void mem = malloc(10 * MAX_PATH);

Watch Window (Using 260 since MAX_PATH isn't recognized)

(char*)mem, 10 { @string (char*)mem + __index * 260 }

Simon Anciaux
1260 posts
Watch - How to format a string array?

For char paths[10][MAX_PATH]; you should be able to just type paths, 10 and expand the display. Or use paths, 10 { @strings $ }