예제 #1
0
파일: graphics.cpp 프로젝트: aroulin/citra
QVariant GPUCommandStreamItemModel::data(const QModelIndex& index, int role) const
{
    if (!index.isValid())
        return QVariant();

    int command_index = index.row();
    const GSP_GPU::Command& command = GetDebugger()->ReadGXCommandHistory(command_index);
    if (role == Qt::DisplayRole)
    {
        std::map<GSP_GPU::CommandId, const char*> command_names = {
            { GSP_GPU::CommandId::REQUEST_DMA, "REQUEST_DMA" },
            { GSP_GPU::CommandId::SET_COMMAND_LIST_FIRST, "SET_COMMAND_LIST_FIRST" },
            { GSP_GPU::CommandId::SET_MEMORY_FILL, "SET_MEMORY_FILL" },
            { GSP_GPU::CommandId::SET_DISPLAY_TRANSFER, "SET_DISPLAY_TRANSFER" },
            { GSP_GPU::CommandId::SET_TEXTURE_COPY, "SET_TEXTURE_COPY" },
            { GSP_GPU::CommandId::SET_COMMAND_LIST_LAST, "SET_COMMAND_LIST_LAST" }
        };
        const u32* command_data = reinterpret_cast<const u32*>(&command);
        QString str = QString("%1 %2 %3 %4 %5 %6 %7 %8 %9").arg(command_names[command.id])
                        .arg(command_data[0], 8, 16, QLatin1Char('0'))
                        .arg(command_data[1], 8, 16, QLatin1Char('0'))
                        .arg(command_data[2], 8, 16, QLatin1Char('0'))
                        .arg(command_data[3], 8, 16, QLatin1Char('0'))
                        .arg(command_data[4], 8, 16, QLatin1Char('0'))
                        .arg(command_data[5], 8, 16, QLatin1Char('0'))
                        .arg(command_data[6], 8, 16, QLatin1Char('0'))
                        .arg(command_data[7], 8, 16, QLatin1Char('0'));
        return QVariant(str);
    }
    else
    {
        return QVariant();
    }
}
예제 #2
0
//++ ------------------------------------------------------------------------------------
// Details: Get current target.
// Type:    Method.
// Args:    None.
// Return:  lldb::SBTarget   - current target.
// Throws:  None.
//--
lldb::SBTarget
CMICmnLLDBDebugSessionInfo::GetTarget() const
{
    return GetDebugger().GetSelectedTarget();
}