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 /gdb/record.c | |
parent | 240e538ad8ae0d7cbb6e0c22c3bed49717027ac0 (diff) | |
download | binutils-gdb-bcbfd75943661d391dea442519ed619513beeaf2.tar.gz |
* record.c (record_core_xfer_partial): Pass correct offset to
record_beneath_to_xfer_partial.
Diffstat (limited to 'gdb/record.c')
-rw-r--r-- | gdb/record.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gdb/record.c b/gdb/record.c index 98c794fbfa4..946ebf1108d 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; |