[all-commits] [llvm/llvm-project] 10b851: [lldb] Fix JSON parser to allow empty arrays

Alex Cameron via All-commits all-commits at lists.llvm.org
Mon Nov 18 06:14:35 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 10b851434324f82e9ad11d39f501f2d8b921642a
      https://github.com/llvm/llvm-project/commit/10b851434324f82e9ad11d39f501f2d8b921642a
  Author: Alex Cameron <ascottcameron at gmail.com>
  Date:   2019-11-18 (Mon, 18 Nov 2019)

  Changed paths:
    M lldb/tools/debugserver/source/JSON.cpp
    M lldb/tools/debugserver/source/JSON.h
    M lldb/unittests/debugserver/CMakeLists.txt
    A lldb/unittests/debugserver/JSONTest.cpp

  Log Message:
  -----------
  [lldb] Fix JSON parser to allow empty arrays

Summary:
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
```

Reviewers: xbolva00, davide, labath

Reviewed By: davide, labath

Subscribers: mgorny, jingham, labath, davide, JDevlieghere, lldb-commits

Tags: #llvm, #lldb

Differential Revision: https://reviews.llvm.org/D68179




More information about the All-commits mailing list