[Lldb-commits] [lldb] r349128 - Remove unused variable.
Author: rtrieu Date: Thu Dec 13 21:40:30 2018 New Revision: 349128 URL: http://llvm.org/viewvc/llvm-project?rev=349128&view=rev Log: Remove unused variable. Modified: lldb/trunk/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp Modified: lldb/trunk/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp?rev=349128&r1=349127&r2=349128&view=diff == --- lldb/trunk/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp (original) +++ lldb/trunk/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp Thu Dec 13 21:40:30 2018 @@ -1892,7 +1892,6 @@ size_t SymbolFileNativePDB::ParseVariabl lldbassert(sc.function || sc.comp_unit); VariableListSP variables; - PdbSymUid sym_uid; if (sc.block) { PdbSymUid block_id(sc.block->GetID()); ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r362035 - Use correct format specifier to silence -Wformat warning.
Author: rtrieu Date: Wed May 29 14:25:15 2019 New Revision: 362035 URL: http://llvm.org/viewvc/llvm-project?rev=362035&view=rev Log: Use correct format specifier to silence -Wformat warning. Modified: lldb/trunk/source/Utility/Timer.cpp Modified: lldb/trunk/source/Utility/Timer.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Utility/Timer.cpp?rev=362035&r1=362034&r2=362035&view=diff == --- lldb/trunk/source/Utility/Timer.cpp (original) +++ lldb/trunk/source/Utility/Timer.cpp Wed May 29 14:25:15 2019 @@ -144,7 +144,8 @@ void Timer::DumpCategoryTimes(Stream *s) llvm::sort(sorted.begin(), sorted.end(), CategoryMapIteratorSortCriterion); for (const auto &stats : sorted) -s->Printf("%.9f sec (total: %.3fs; child: %.3fs; count: %llu) for %s\n", +s->Printf("%.9f sec (total: %.3fs; child: %.3fs; count: %" PRIu64 + ") for %s\n", stats.nanos / 10., stats.nanos_total / 10., (stats.nanos_total - stats.nanos) / 10., stats.count, stats.name); ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r362194 - Fix problem with r362192
Author: rtrieu Date: Thu May 30 22:55:07 2019 New Revision: 362194 URL: http://llvm.org/viewvc/llvm-project?rev=362194&view=rev Log: Fix problem with r362192 The string returned only sometimes ends in NULL. Explicitly check for the NULL and pop off the NULL if it is there. Modified: lldb/trunk/source/Host/posix/DomainSocket.cpp Modified: lldb/trunk/source/Host/posix/DomainSocket.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/posix/DomainSocket.cpp?rev=362194&r1=362193&r2=362194&view=diff == --- lldb/trunk/source/Host/posix/DomainSocket.cpp (original) +++ lldb/trunk/source/Host/posix/DomainSocket.cpp Thu May 30 22:55:07 2019 @@ -132,11 +132,14 @@ std::string DomainSocket::GetSocketName( saddr_un.sun_family = AF_UNIX; socklen_t sock_addr_len = sizeof(struct sockaddr_un); if (::getpeername(m_socket, (struct sockaddr *)&saddr_un, &sock_addr_len) == -0) - return std::string(saddr_un.sun_path + GetNameOffset(), - sock_addr_len - - offsetof(struct sockaddr_un, sun_path) - - GetNameOffset() - 1); +0) { + std::string name(saddr_un.sun_path + GetNameOffset(), + sock_addr_len - + offsetof(struct sockaddr_un, sun_path) - + GetNameOffset()); + if (name.back() == '\0') name.pop_back(); + return name; +} } return ""; } ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r362192 - Fix off-by-one error.
Author: rtrieu Date: Thu May 30 22:06:54 2019 New Revision: 362192 URL: http://llvm.org/viewvc/llvm-project?rev=362192&view=rev Log: Fix off-by-one error. The created string is one char too large, so it pulls the terminating NULL as the last character of the string. This later causes SocketTest.cpp to fail. Modified: lldb/trunk/source/Host/posix/DomainSocket.cpp Modified: lldb/trunk/source/Host/posix/DomainSocket.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/posix/DomainSocket.cpp?rev=362192&r1=362191&r2=362192&view=diff == --- lldb/trunk/source/Host/posix/DomainSocket.cpp (original) +++ lldb/trunk/source/Host/posix/DomainSocket.cpp Thu May 30 22:06:54 2019 @@ -136,7 +136,7 @@ std::string DomainSocket::GetSocketName( return std::string(saddr_un.sun_path + GetNameOffset(), sock_addr_len - offsetof(struct sockaddr_un, sun_path) - - GetNameOffset()); + GetNameOffset() - 1); } return ""; } ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r367386 - Change '|' to '&' in conditional.
Author: rtrieu Date: Tue Jul 30 21:41:05 2019 New Revision: 367386 URL: http://llvm.org/viewvc/llvm-project?rev=367386&view=rev Log: Change '|' to '&' in conditional. Bitwise-or with a non-zero constant will always evaluate to true. Switch to bitwise-and which will only evalute to true if the specified bit is set in the other operand. Modified: lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp Modified: lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp?rev=367386&r1=367385&r2=367386&view=diff == --- lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp (original) +++ lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp Tue Jul 30 21:41:05 2019 @@ -735,7 +735,7 @@ SymbolFilePDB::ResolveSymbolContext(cons resolve_scope & eSymbolContextLineEntry) { auto cu_sp = GetCompileUnitContainsAddress(so_addr); if (!cu_sp) { - if (resolved_flags | eSymbolContextVariable) { + if (resolved_flags & eSymbolContextVariable) { // TODO: Resolve variables } return 0; ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits