On PowerPC, this is needed in order for the debugger to find out
the memory offset where the kernel image was loaded on the remote
target.
This fixes symbol resolution when remote debugging a PowerPC kernel.
Differential D22767
[PPC] Handle qOffsets packet luporl on Dec 11 2019, 7:11 PM. Authored by Tags Referenced Files
Details
On PowerPC, this is needed in order for the debugger to find out This fixes symbol resolution when remote debugging a PowerPC kernel.
Diff Detail
Event TimelineComment Actions It’s kind of ugly, but because it only impacts ppc I don’t think it’s risky for other arch. Mechanically the change looks fine; I didn’t verify the qOffsets response packet syntax but if it works, it works. Thanks!
Comment Actions There is some precedent for putting MD gdb code paths in, e.g., sys/powerpc/powerpc/gdb_machdep.c. The naming convention appears to be something like, gdb_cpu_do_offsets(). If you want to put the current gdb_do_offses code there, that would be cool. I would be fine leaving #ifdef __powerpc__ around the qOffsets handler and not implementing it everywhere, given it doesn't seem to be needed on other platforms. It is also fine with me to gdb_do_offset here, until/unless a second arch shows up needing to provide another implementation. Comment Actions Right, thanks for the feedback. Moving gdb_do_offsets() to powerpc/gdb_machdep.c really seems a better option. |