[debugging] Fix gdb script koid refs & panic CPU display

Two minor debugging helpers:

- the GDB script was still referencing m_koid on objects, switched to
  the replacement m_obj_id instead.
- finally gave in and made panic print 1-based CPU ids like GDB uses
  instead of 0-based like the hardware and LITERALLY EVERYTHING ELSE
This commit is contained in:
Justin C. Miller
2023-02-10 17:46:21 -08:00
parent 4884a624d9
commit df6d5b3b16
2 changed files with 6 additions and 6 deletions

View File

@@ -38,7 +38,7 @@ print_cpu(serial_port &out, cpu_data &cpu)
{
out.write("\n \e[0;31m==[ CPU: ");
char cpuid[7];
util::format({cpuid, sizeof(cpuid)}, "%4x", cpu.id);
util::format({cpuid, sizeof(cpuid)}, "%4d", cpu.id + 1); // gdb uses 1-based CPU indices
out.write(cpuid);
out.write(" ]====================================================================\n");
}