diff --git a/tools/fuzzing/ipc/IPCFuzzController.cpp b/tools/fuzzing/ipc/IPCFuzzController.cpp index 7ea63d67d67c..f31d9a3606d2 100644 --- a/tools/fuzzing/ipc/IPCFuzzController.cpp +++ b/tools/fuzzing/ipc/IPCFuzzController.cpp @@ -229,6 +229,7 @@ void IPCFuzzController::AddToplevelActor(PortName name, ProtocolId protocolId) { } uint8_t portIndex = result->second; portNames[portIndex].push_back(name); + portNameToProtocolName[name] = std::string(protocolName); } bool IPCFuzzController::ObserveIPCMessage(mozilla::ipc::NodeChannel* channel, @@ -506,11 +507,12 @@ bool IPCFuzzController::MakeTargetDecision( *is_cons = true; } -#ifdef FUZZ_DEBUG MOZ_FUZZING_NYX_PRINTF( - "DEBUG: MakeTargetDecision: Protocol: %s msgType: %s\n", - ProtocolIdToName(ids.second), IPC::StringFromIPCMessageType(*type)); -#endif + "DEBUG: MakeTargetDecision: Top-Level Protocol: %s Protocol: %s msgType: " + "%s (%u %u %d)\n", + portNameToProtocolName[*name].c_str(), ProtocolIdToName(ids.second), + IPC::StringFromIPCMessageType(*type), actorIndex, actors.size(), + *actorId); return true; } diff --git a/tools/fuzzing/ipc/IPCFuzzController.h b/tools/fuzzing/ipc/IPCFuzzController.h index c4e84444b2d1..756a68f38f03 100644 --- a/tools/fuzzing/ipc/IPCFuzzController.h +++ b/tools/fuzzing/ipc/IPCFuzzController.h @@ -123,6 +123,10 @@ class IPCFuzzController { std::unordered_map portNodeName; + // This is a mapping from port name to protocol name, purely for debugging. + std::unordered_map + portNameToProtocolName; + // This maps each ProtocolId (IPCMessageStart) to the number of valid // messages for that particular type. std::unordered_map validMsgTypes;