I'm pretty rusty, but I've run into something that I don't understand.
for( str = vimvars[VV_GETCHARTYPE].vv_str; *str != NUL ; str++ ) *str = tolower( *str ); In gdb, it tells me "cannot access memory at address ...." whenever I try to set to *str. The memory at vimvars[VV_GETCHARTYPE].vv_str seems to be a simple alloc(). The string was created with vim_strsave(), but I can't find anything special in that either. The vimvars or vv_str structure is too comlex for gdb to manipulate directly print vimvars[50].vv_str says "There is no member named vv_str.", so I've run out of ideas why a specific memory address is protected(?) even though it is readable (print str shows the correct string). The string was created with vim_strsave(), but I can't find anything special in that either. I can go through the vim_free() and vim_strsave() again, but it seems unnecessary, and the real point is, "WTF?" :-)