sedna icon indicating copy to clipboard operation
sedna copied to clipboard

gdbstub direct reference to R5MemoryAccessException

Open feherneoh opened this issue 3 years ago • 3 comments

Contents of the li.cil.sedna.riscv package are referenced from the following closely related part of the project:

  • Package li.cil.sedna.riscv
  • Test package li.cil.sedna.riscv
  • Class li.cil.sedna.Sedna
  • Class li.cil.sedna.serialization.serializers.R5CPUSerializer

Other than these, li.cil.sedna.riscv.exception.R5MemoryAccessException is also referenced by:

  • Class li.cil.sedna.gdbstub.GDBStub
  • Class li.cil.sedna.gdbstub.CPUDebugInterface

As far as I can tell adding an CPU-independent parent exception to use in these classes and making R5MemoryAccessException extend that would make li.cil.sedna.gdbstub reusable for other /CPUs/architectures.

feherneoh avatar Aug 31 '22 08:08 feherneoh

Interesting. Is it expected that Sedna might support other architectures someday or this just a hypothetical? Just curious

SamuelWAnderson45 avatar Oct 02 '22 00:10 SamuelWAnderson45

Thanks for pointing this out! Yeah, theoretically Sedna should be able to support this, at least it's something I tried to keep in mind when making API/interface split decisions. It's likely to fall apart in other places, too, when actually trying to add a new arch, but it also leads to cleaner cuts, I find. I'll have a look at this after #14 merged.

fnuecke avatar Oct 02 '22 10:10 fnuecke

I haven't finished implementing my core yet, but the other parts of the code seemed fine for now

feherneoh avatar Oct 02 '22 19:10 feherneoh