<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - std::string has no value"
   href="https://llvm.org/bugs/show_bug.cgi?id=25205">25205</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>std::string has no value
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>lldb
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>All Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>lldb-dev@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>berykubik@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=15088" name="attach_15088" title="C++ source with test program">attachment 15088</a> <a href="attachment.cgi?id=15088&action=edit" title="C++ source with test program">[details]</a></span>
C++ source with test program

std::string variables have value "None" when I access them using the Python
scripting API. They only have one child, which also has a value of None. Is
there another way to get the string value, or am I doing something wrong? I
could probably print the string into the terminal and get the result from the
command interpreter, but it would be nice to access the string directly.

I've attached a simple C++ program that demonstrates this.

I'm using LLDB 3.8 compiled from trunk. The program was compiled using clang++
with libc++ (I also tried g++ and -fstandalone-debug switch with similar
results).

import lldb
import os

debugger = lldb.SBDebugger.Create()
debugger.SetAsync(False)
target = debugger.CreateTarget("./test")
target.BreakpointCreateByLocation("test.cpp", 7)
process = target.LaunchSimple([], [], os.getcwd())

thread = process.GetSelectedThread()
frame = thread.GetSelectedFrame()
for var in frame.vars:
    if var.name == "a":
        print(var.value) # None

debugger.Terminate()</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>