<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 --- - po sometimes prints blank instead of object"
   href="https://llvm.org/bugs/show_bug.cgi?id=31308">31308</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>po sometimes prints blank instead of object
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>3.6
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Macintosh
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>MacOS X
          </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>mth@xmission.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>My debug environment is Xcode 8.1 stopped at a breakpoint while debugging an
iOS application (usually 9.3.5 or 10.1) written in Objective C.  Sometimes when
I use po to print an object, all it prints is a blank line. Printing with
different syntax will sometimes make it work.  In this particular example the
object was a property of the argument to a simple method:

- (void)handleDataModelChange: (NSNotification *)nt
{
    NSSet *updatedObjects = [[nt userInfo] objectForKey: NSUpdatedObjectsKey];
    ...
}

The breakpoint was set near the end of the method.  Here is the output of some
po commands I tried.  The last po command prints the object as it should be
printed by the first two po commands.  Instead they just give blank lines.

(lldb) po nt.object

(lldb) po [nt object]

(lldb) po [nt.object class]
NSManagedObjectContext

(lldb) po (NSManagedObject *)nt.object
<NSManagedObjectContext: 0x14576d20>: defaultMainQueueContext



[lldb --version prints lldb-360.1.65]</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>