[Lldb-commits] [PATCH] D54454: Be more permissive in what we consider a variable name.

Jim Ingham via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Nov 12 17:25:02 PST 2018


jingham added a comment.

A dotest test can be xfailed if the debug format is not PDB, right?  At least we can xfail them for all the DWARF variants so it should be possible to do that for PDB as well.  So you should be able to write a test for this and then just xfail it till the DWARF parser can be fixed.

About the parsing rules... The name of the children of arrays or array like entities is, for example, "[0]".  So the virtue of the current approach is that we grab a "legal" identifier, and then the next bit we grab will be the name of the child or synthetic child - if there are any.   But we don't actually have to know what the name of the child is, it can be anything so long as it doesn't start with a legal identifier first character.

Your suggest approach will bless useable aggregate child names.  That's probably okay.  These child names should look like the way you would access the element in the languages we support - and this code is really C-ish right now, so just allowing the C/C++ style element accessors isn't a huge restriction.

BTW, I was just using "frame variable" as a example, target variable also supports []:

  (lldb) source list -l 1
     1   	int g_vec[3] = {10, 20, 30};
     2   	
     3   	int main() {
     4   	  return g_vec[0] + g_vec[1]; 
     5   	}
  (lldb) target var g_vec[0]
  (int) g_vec[0] = 10


https://reviews.llvm.org/D54454





More information about the lldb-commits mailing list