Well, I think it's more a question of whether that's part of the remote GDB protocol. If it is (even if it's dumb), then we should probably leave it that way.
That said, I haven't found any evidence that it *is* part of the protocol. I'm not sure why it's that way currently, although I haven't looked into it very deeply. I've looked at the stub in the Linux kernel and at the documentation for the GDB remote serial protocol, and neither mentions or handles specially the case where address is zero. I'm about to look at the history in gem5 to see if I can get a clue what's going on, although I expect that code will have just shown up without a specific explanation a long time ago. Gabe On Wed, Mar 11, 2020 at 11:48 AM Boris Shingarov <[email protected]> wrote: > Does anyone actually need the GDB RSP server's non-orthogonal treatment of > addresses below 10 such as in > > https://gem5.googlesource.com/public/gem5/+/refs/heads/master/src/base/remote_gdb.cc#614 > and > > https://gem5.googlesource.com/public/gem5/+/refs/heads/master/src/base/remote_gdb.cc#645 > ? > This just caused me two days of frustration before I debugged to the root > of the issue, I was kind of trusting that if I ask the debugger what's at > address 0x0004, the debugger will not give me some other random value. > But maybe this is a case of Chesterton fence, and this is actually > needed. If not, I will create a code review to remove this. > [Re-send from March 8 -- perhaps this time the message goes through] > > > > > > > _______________________________________________ > gem5-dev mailing list > [email protected] > http://m5sim.org/mailman/listinfo/gem5-dev _______________________________________________ gem5-dev mailing list [email protected] http://m5sim.org/mailman/listinfo/gem5-dev
