Skip to content
  1. Nov 10, 2012
  2. Jan 17, 2012
    • Benjamin Kramer's avatar
      Add an LLDB data formatter script for llvm::SmallVector, maybe this is helpful to someone else. · 50b78ec0
      Benjamin Kramer authored
      This lets lldb give sane output for SmallVectors, e.g.
      Before:
      (lldb) p sv
      (llvm::SmallVector<int, 10>) $0 = {
        (llvm::SmallVectorImpl<int>) llvm::SmallVectorImpl<int> = {
          (llvm::SmallVectorTemplateBase<int>) llvm::SmallVectorTemplateBase<int> = {
            (llvm::SmallVectorTemplateCommon<int>) llvm::SmallVectorTemplateCommon<int> = {
              (llvm::SmallVectorBase) llvm::SmallVectorBase = {
                (void *) BeginX = 0x00007fff5fbff960
      ...
      }
      
      After:
      (lldb) p sv
      (llvm::SmallVector<int, 10>) $0 = {
        (int) [0] = 42
        (int) [1] = 23
      ...
      }
      
      The script is still a bit rough so expect crashes for vectors of complex types.
      Synthetic children are _not_ available in xcode 4.2, newer LLDBs should work though.
      
      llvm-svn: 148308
      50b78ec0
Loading