fixathon created this revision. Herald added a project: All. fixathon requested review of this revision. Herald added a project: LLDB. Herald added a subscriber: lldb-commits.
Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D130939 Files: lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp Index: lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp =================================================================== --- lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp +++ lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp @@ -2536,7 +2536,9 @@ (1024.0 * 1024.0); float packets_per_second = ((float)packet_count) / duration<float>(total_time).count(); - const auto average_per_packet = total_time / packet_count; + const auto average_per_packet = packet_count > 0 + ? total_time / packet_count + : duration<float>::zero(); if (json) { strm.Format("{0}\n {{\"send_size\" : {1,6}, \"recv_size\" : "
Index: lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp =================================================================== --- lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp +++ lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp @@ -2536,7 +2536,9 @@ (1024.0 * 1024.0); float packets_per_second = ((float)packet_count) / duration<float>(total_time).count(); - const auto average_per_packet = total_time / packet_count; + const auto average_per_packet = packet_count > 0 + ? total_time / packet_count + : duration<float>::zero(); if (json) { strm.Format("{0}\n {{\"send_size\" : {1,6}, \"recv_size\" : "
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits