base: Do not treat addresses < 10 specially
The RSP stub (base/remote_gdb.cc) treats virtual addresses below 0x000A as meaning "the address used in the previous m-packet". This leads to nasty surprises, and is not justified by neither the RSP protocol documentation nor other existing RSP implementations. Jira Issue: https://gem5.atlassian.net/browse/GEM5-407 Change-Id: I5fccc10a58d9af856eeee6d45418905c0f47ffab Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/26605 Maintainer: Gabe Black <gabeblack@google.com> Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Gabe Black <gabeblack@google.com>
This commit is contained in:
committed by
Boris Shingarov
parent
e0937d9443
commit
bdfbd9b9bc
@@ -604,14 +604,6 @@ BaseRemoteGDB::send(const char *bp)
|
||||
bool
|
||||
BaseRemoteGDB::read(Addr vaddr, size_t size, char *data)
|
||||
{
|
||||
static Addr lastaddr = 0;
|
||||
static size_t lastsize = 0;
|
||||
|
||||
if (vaddr < 10) {
|
||||
DPRINTF(GDBRead, "read: reading memory location zero!\n");
|
||||
vaddr = lastaddr + lastsize;
|
||||
}
|
||||
|
||||
DPRINTF(GDBRead, "read: addr=%#x, size=%d", vaddr, size);
|
||||
|
||||
PortProxy &proxy = tc->getVirtProxy();
|
||||
@@ -635,14 +627,6 @@ BaseRemoteGDB::read(Addr vaddr, size_t size, char *data)
|
||||
bool
|
||||
BaseRemoteGDB::write(Addr vaddr, size_t size, const char *data)
|
||||
{
|
||||
static Addr lastaddr = 0;
|
||||
static size_t lastsize = 0;
|
||||
|
||||
if (vaddr < 10) {
|
||||
DPRINTF(GDBWrite, "write: writing memory location zero!\n");
|
||||
vaddr = lastaddr + lastsize;
|
||||
}
|
||||
|
||||
if (DTRACE(GDBWrite)) {
|
||||
DPRINTFN("write: addr=%#x, size=%d", vaddr, size);
|
||||
if (DTRACE(GDBExtra)) {
|
||||
|
||||
Reference in New Issue
Block a user