[Lldb-commits] [PATCH] D68179: [lldb] Fix JSON parser to allow empty arrays

Alex Cameron via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Sep 27 19:35:54 PDT 2019


tetsuo-cpp created this revision.
tetsuo-cpp added a reviewer: xbolva00.
tetsuo-cpp added projects: LLVM, LLDB.
Herald added subscribers: lldb-commits, JDevlieghere.

Bugzilla: https://bugs.llvm.org/show_bug.cgi?id=39405

  alexc at kitty:~/work/wiredtiger/build_posix$ cat breakpoint.json
  [{"Breakpoint" : {"BKPTOptions" : {"AutoContinue" : false,"ConditionText" : "","EnabledState" : true,"IgnoreCount" : 0,"OneShotState" : false},"BKPTResolver" : {"Options" : {"NameMask" : [56],"Offset" : 0,"SkipPrologue" : true,"SymbolNames" : ["__wt_btcur_search"]},"Type" : "SymbolName"},"Hardware" : false,"SearchFilter" : {"Options" : {},"Type" : "Unconstrained","Foo" : []}}}]

**Before**

  (lldb) breakpoint read --file breakpoint.json
  error: Invalid JSON from input file: /home/alexc/work/wiredtiger/build_posix/breakpoint.json.

**After**

  (lldb) breakpoint read --file breakpoint.json
  New breakpoints:
  Breakpoint 1: where = libwiredtiger-3.2.2.so`__wt_btcur_search + 15 at bt_cursor.c:522:5, address = 0x00007ffff576ab2f


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D68179

Files:
  lldb/include/lldb/Utility/JSON.h
  lldb/source/Utility/JSON.cpp
  lldb/source/Utility/StructuredData.cpp
  lldb/tools/debugserver/source/JSON.cpp
  lldb/tools/debugserver/source/JSON.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68179.222278.patch
Type: text/x-patch
Size: 5344 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190928/d3b00047/attachment-0001.bin>


More information about the lldb-commits mailing list