Index: test/tools/lldb-mi/TestMiLibraryLoaded.py =================================================================== --- test/tools/lldb-mi/TestMiLibraryLoaded.py +++ test/tools/lldb-mi/TestMiLibraryLoaded.py @@ -28,7 +28,7 @@ symbols_path = os.path.join(path + ".dSYM", "Contents", "Resources", "DWARF", self.myexe) self.expect([ "=library-loaded,id=\"%s\",target-name=\"%s\",host-name=\"%s\",symbols-loaded=\"1\",symbols-path=\"%s\",loaded_addr=\"-\"" % (path, path, path, symbols_path), - "=library-loaded,id=\"%s\",target-name=\"%s\",host-name=\"%s\",symbols-loaded=\"0\",loaded_addr=\"-\"" % (path, path, path) + "=library-loaded,id=\"%s\",target-name=\"%s\",host-name=\"%s\",symbols-loaded=\"0\",loaded_addr=\"-\",size=\"[0-9]+\"" % (path, path, path) ], exactly = True) if __name__ == '__main__': Index: tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.cpp =================================================================== --- tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.cpp +++ tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.cpp @@ -720,7 +720,7 @@ vwrMiOutOfBandRecord.Add(miValueResult5); } // Build "loaded_addr" field - const lldb::SBAddress sbAddress(vModule.GetObjectFileHeaderAddress()); + lldb::SBAddress sbAddress(vModule.GetObjectFileHeaderAddress()); CMICmnLLDBDebugSessionInfo &rSessionInfo(CMICmnLLDBDebugSessionInfo::Instance()); const lldb::addr_t nLoadAddress(sbAddress.GetLoadAddress(rSessionInfo.GetTarget())); const CMIUtilString strLoadedAddr(nLoadAddress != LLDB_INVALID_ADDRESS ? @@ -728,6 +728,14 @@ const CMICmnMIValueConst miValueConst6(strLoadedAddr); const CMICmnMIValueResult miValueResult6("loaded_addr", miValueConst6); vwrMiOutOfBandRecord.Add(miValueResult6); + bOk = bOk && vwrMiOutOfBandRecord.Add(miValueResult6); + + // Build "size" field + lldb::SBSection sbSection = sbAddress.GetSection(); + const CMIUtilString strSize(CMIUtilString::Format("%PRIu64", sbSection.GetByteSize())); + const CMICmnMIValueConst miValueConst7(strSize); + const CMICmnMIValueResult miValueResult7("size", miValueConst7); + bOk = bOk && vwrMiOutOfBandRecord.Add(miValueResult7); } return bOk;