<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Hi, Pawel. Unfortunately, this is what happens to inlinable code in debug builds (not just for LLDB, Xcode, or the Swift compiler). The debugger doesn’t have the body of inlinable functions, and the binary doesn’t have a copy of the code (since it was always inlined away). You have a handful of options here:</div><div class=""><br class=""></div><div class="">1. Poke at the members of SmallVectorImpl directly. (BeginX and EndX are the useful ones.)</div><div class="">2. Load the “data formatters” provided with LLVM into your LLDB session: `command script import llvm/utils/lldbDataFormatters.py`. This very conveniently shows formatted views of certain LLVM types, including SmallVector, without running code in the process you’re debugging. (This also isn’t magic; you can write your own for your own types, and we totally could write some for Swift types.)</div><div class="">3. Use a debug compiler, where nothing will get inlined away. Sometimes this is necessary anyway because it’s <i class="">always</i>&nbsp;hard to debug optimized code, but it does have its downsides.</div><div class=""><br class=""></div><div class="">Some day we’ll also have</div><div class=""><br class=""></div><div class="">4. `expr @import LLVMADT` (or similar), to have LLDB pull in all the declarations from the LLVM ADT headers using the&nbsp;<a href="http://clang.llvm.org/docs/Modules.html" class="">modules</a>&nbsp;feature. Support for C++ modules is still pretty shaky, but it should still be possible to do this with LLVM, which has its headers properly grouped into modules. I haven’t tried it, though, and Swift hasn’t undergone this treatment yet.</div><div class=""><br class=""></div><div class="">Hope that helps,</div><div class="">Jordan</div><div class=""><br class=""></div><br class=""><div><blockquote type="cite" class=""><div class="">On Mar 8, 2017, at 00:00, Pawel Szot (PGS Software) via swift-dev &lt;<a href="mailto:swift-dev@swift.org" class="">swift-dev@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Hi,<br class="">I’m using LLDB when debugging in Xcode. `p x-&gt;dump()` works fine, but what about vectors? For example `SmallVectorImpl` doesn’t offer `dump()`, and I can’t even get it’s size:<br class="">```<br class="">error: Couldn't lookup symbols:<br class=""> &nbsp;__ZNK4llvm25SmallVectorTemplateCommonIN5swift11constraints8SolutionEE4sizeEv<br class="">```<br class="">_______________________________________________<br class="">swift-dev mailing list<br class=""><a href="mailto:swift-dev@swift.org" class="">swift-dev@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-dev<br class=""></div></div></blockquote></div><br class=""></body></html>