[Lldb-commits] [PATCH] D66654: Prevent D66398 `TestDataFormatterStdList`-like regressions in the future

Jan Kratochvil via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Sun Aug 25 23:14:36 PDT 2019


jankratochvil updated this revision to Diff 217079.
jankratochvil added a comment.

Testcase for the regex sanity check is failing - `ValueObject::m_error` remains set even after `type summary clear`. `ValueObject::UpdateValueIfNeeded` will find `did_change_formats==true` but it does not help it. I think there is some bug in `ValueObject` updating but maybe that setting of `ValueObject::m_error` is a wrong idea.

  runCmd: type summary clear
  output:
  
  runCmd: type summary add --summary-string "${var[0-1]}" -x "int \[[0-9]\]"
  output:
  
  runCmd: frame variable int_array
  output: (int [5]) int_array = [-1,2]
  
  
  Expecting sub string: 1,2
  Matched
  
  runCmd: type summary add --summary-string "${var[0-1]}" "int []"
  output:
  
  runCmd: frame variable int_array
  output: (int [5]) int_array = <Two regexes ("int \[[0-9]+\]" and "int \[[0-9]\]") ambiguously match the same string "int [5]".>
  
  Expecting pattern: int_array = <Two regexes \(("int\ \\\[\[0\-9\]\\\]" and "int\ \\\[\[0\-9\]\+\\\]"|"int\ \\\[\[0\-9\]\+\\\]" and "int\ \\\[\[0\-9\]\\\]")\) ambiguously match the same string "int\ \[5\]".>
  Matched
  
  runCmd: type summary clear
  output:
  
  runCmd: type summary add --summary-string "${var[0-1]}" "int []"
  output:
  
  runCmd: frame variable int_array
  output: (int [5]) int_array = <Two regexes ("int \[[0-9]+\]" and "int \[[0-9]\]") ambiguously match the same string "int [5]".>
  
  Expecting sub string: 1,2
  Not matched
  
  FAIL


Repository:
  rLLDB LLDB

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D66654/new/

https://reviews.llvm.org/D66654

Files:
  lldb/include/lldb/Core/ValueObject.h
  lldb/include/lldb/DataFormatters/FormatClasses.h
  lldb/include/lldb/DataFormatters/FormattersContainer.h
  lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-advanced/TestDataFormatterAdv.py
  lldb/source/API/SBTypeCategory.cpp
  lldb/source/DataFormatters/FormatClasses.cpp
  lldb/source/DataFormatters/TypeCategory.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66654.217079.patch
Type: text/x-patch
Size: 24387 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190826/2d5a61b2/attachment-0001.bin>


More information about the lldb-commits mailing list