This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
gdb and binutils branch master updated. 9f7132948dd9a08e020e6409ebe790d8fd9c6d5d
- From: qiyao at sourceware dot org
- To: gdb-cvs at sourceware dot org
- Date: 29 Nov 2013 13:34:23 -0000
- Subject: gdb and binutils branch master updated. 9f7132948dd9a08e020e6409ebe790d8fd9c6d5d
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gdb and binutils".
The branch, master has been updated
via 9f7132948dd9a08e020e6409ebe790d8fd9c6d5d (commit)
from 5425b0d80b3f883115ae120124625cb4f040e17c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=9f7132948dd9a08e020e6409ebe790d8fd9c6d5d
commit 9f7132948dd9a08e020e6409ebe790d8fd9c6d5d
Author: Yao Qi <yao@codesourcery.com>
Date: Wed Nov 27 18:01:05 2013 +0800
Delegate to target_ops->beneath for TARGET_OBJECT_RAW_MEMORY
GDB on x86_64-linux is unable to disassemble on core-file target.
$ ./gdb ./testsuite/gdb.base/corefile
(gdb) core-file ./testsuite/gdb.base/corefile.core
(gdb) disassemble main
Dump of assembler code for function main:
0x0000000000400976 <+0>: Cannot access memory at address 0x400976
However, it works if we turn code-cache off.
(gdb) set code-cache off
(gdb) disassemble main,+4
Dump of assembler code from 0x400976 to 0x40097a:
0x0000000000400976 <main+0>: push %rbp
0x0000000000400977 <main+1>: mov %rsp,%rbp
End of assembler dump.
When code-cache is off, GDB will iterate target_ops from top to bottom
and call to_xfer_partial. When current_target is "core", it will call
to_xfer_partial of target "exec", which reads the contents for
disassemble. However, dcache uses TARGET_OBJECT_RAW_MEMORY to read,
but target_xfer_partial doesn't delegate requests to beneath for
TARGET_OBJECT_RAW_MEMORY.
This patch factors out the iteration from top to bottom to a new
function, raw_memory_xfer_partial, and use it for
TARGET_OBJECT_RAW_MEMORY.
Regression tested on x86_64-linux.
gdb:
2013-11-29 Yao Qi <yao@codesourcery.com>
Pedro Alves <palves@redhat.com>
* dcache.c (dcache_read_line): Use current_target.beneath
instead of ¤t_target.
* target.c (memory_xfer_partial_1): Factor code out to ...
(raw_memory_xfer_partial): ... it. New function.
(target_xfer_partial): Call raw_memory_xfer_partial if OBJECT
is TARGET_OBJECT_RAW_MEMORY.
-----------------------------------------------------------------------
Summary of changes:
gdb/ChangeLog | 10 ++++++++
gdb/dcache.c | 4 +-
gdb/target.c | 67 +++++++++++++++++++++++++++++++-------------------------
3 files changed, 49 insertions(+), 32 deletions(-)
hooks/post-receive
--
gdb and binutils