Beispiel #1
0
static wxString GetValueByRowCol(int row, int col)
{
  if (row == 0)
  {
    // Column Labels
    switch (col)
    {
    case 0:
      return _("Label");
    case 1:
      return _("Address");
    case 2:
      return _("Hexadecimal");
    case 3:
      // i18n: The base 10 numeral system. Not related to non-integer numbers
      return _("Decimal");
    case 4:
      // i18n: Data type used in computing
      return _("String");
    default:
      return wxEmptyString;
    }
  }
  else if (row <= static_cast<int>(PowerPC::debug_interface.GetWatches().size()))
  {
    if (Core::IsRunning())
    {
      switch (col)
      {
      case 0:
        return wxString::Format("%s", GetWatchName(row));
      case 1:
        return wxString::Format("%08x", GetWatchAddr(row));
      case 2:
        return wxString::Format("%08x", GetWatchValue(row));
      case 3:
        return wxString::Format("%u", GetWatchValue(row));
      case 4:
      {
        u32 addr = GetWatchAddr(row);
        if (PowerPC::HostIsRAMAddress(addr))
          return PowerPC::HostGetString(addr, 32).c_str();
        else
          return wxEmptyString;
      }
      default:
        return wxEmptyString;
      }
    }
  }
  return wxEmptyString;
}
Beispiel #2
0
static wxString GetValueByRowCol(int row, int col)
{
  if (row == 0)
  {
    // Column Labels
    switch (col)
    {
    case 0:
      return _("Label");
    case 1:
      return _("Address");
    case 2:
      return _("Hexadecimal");
    case 3:
      return _("Decimal");
    case 4:
      // i18n: Data type used in computing
      return _("String");
    default:
      return wxEmptyString;
    }
  }
  else if (row <= (int)PowerPC::watches.GetWatches().size())
  {
    if (Core::IsRunning())
    {
      switch (col)
      {
      case 0:
        return wxString::Format("%s", GetWatchName(row));
      case 1:
        return wxString::Format("%08x", GetWatchAddr(row));
      case 2:
        return wxString::Format("%08x", GetWatchValue(row));
      case 3:
        return wxString::Format("%u", GetWatchValue(row));
      case 4:
      {
        u32 addr = GetWatchAddr(row);
        if (PowerPC::HostIsRAMAddress(addr))
          return PowerPC::HostGetString(addr, 32).c_str();
        else
          return wxEmptyString;
      }
      default:
        return wxEmptyString;
      }
    }
  }
  return wxEmptyString;
}
Beispiel #3
0
static void SetWatchValue(int count, u32 value)
{
  PowerPC::HostWrite_U32(value, GetWatchAddr(count));
}
Beispiel #4
0
static u32 GetWatchValue(int count)
{
  return PowerPC::HostRead_U32(GetWatchAddr(count));
}