diff options
author | Doug Evans <dje@google.com> | 2009-10-23 17:12:25 +0000 |
---|---|---|
committer | Doug Evans <dje@google.com> | 2009-10-23 17:12:25 +0000 |
commit | bcbfd75943661d391dea442519ed619513beeaf2 (patch) | |
tree | 958abba46bd013dc3e994f62d6beac6fddcf2f17 | |
parent | 240e538ad8ae0d7cbb6e0c22c3bed49717027ac0 (diff) | |
download | binutils-bcbfd75943661d391dea442519ed619513beeaf2.zip binutils-bcbfd75943661d391dea442519ed619513beeaf2.tar.gz binutils-bcbfd75943661d391dea442519ed619513beeaf2.tar.bz2 |
* record.c (record_core_xfer_partial): Pass correct offset to
record_beneath_to_xfer_partial.
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/record.c | 9 |
2 files changed, 11 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 0d67b09..9986875 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2009-10-23 Doug Evans <dje@google.com> + + * record.c (record_core_xfer_partial): Pass correct offset to + record_beneath_to_xfer_partial. + 2009-10-23 Michael Snyder <msnyder@vmware.com> * record.c (netorder64): Use BFD_ENDIAN_LITTLE not LITTLE_ENDIAN. diff --git a/gdb/record.c b/gdb/record.c index 98c794f..946ebf1 100644 --- a/gdb/record.c +++ b/gdb/record.c @@ -1629,6 +1629,7 @@ record_core_xfer_partial (struct target_ops *ops, enum target_object object, if (offset >= p->addr) { struct record_core_buf_entry *entry; + ULONGEST sec_offset; if (offset >= p->endaddr) continue; @@ -1636,7 +1637,7 @@ record_core_xfer_partial (struct target_ops *ops, enum target_object object, if (offset + len > p->endaddr) len = p->endaddr - offset; - offset -= p->addr; + sec_offset = offset - p->addr; /* Read readbuf or write writebuf p, offset, len. */ /* Check flags. */ @@ -1673,7 +1674,8 @@ record_core_xfer_partial (struct target_ops *ops, enum target_object object, record_core_buf_list = entry; } - memcpy (entry->buf + offset, writebuf, (size_t) len); + memcpy (entry->buf + sec_offset, writebuf, + (size_t) len); } else { @@ -1683,7 +1685,8 @@ record_core_xfer_partial (struct target_ops *ops, enum target_object object, object, annex, readbuf, writebuf, offset, len); - memcpy (readbuf, entry->buf + offset, (size_t) len); + memcpy (readbuf, entry->buf + sec_offset, + (size_t) len); } return len; |