This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
gdb and binutils branch master updated. b597c318b86b5ad2bca1f72ee8c0fbe33cbb7dad
- From: qiyao at sourceware dot org
- To: gdb-cvs at sourceware dot org
- Date: 8 Jan 2015 13:05:45 -0000
- Subject: gdb and binutils branch master updated. b597c318b86b5ad2bca1f72ee8c0fbe33cbb7dad
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 b597c318b86b5ad2bca1f72ee8c0fbe33cbb7dad (commit)
from 3565cf8fedf2bae2b383fae66dde62c3bdae51c9 (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=b597c318b86b5ad2bca1f72ee8c0fbe33cbb7dad
commit b597c318b86b5ad2bca1f72ee8c0fbe33cbb7dad
Author: Yao Qi <yao@codesourcery.com>
Date: Sun Dec 28 16:12:53 2014 +0800
always read synthetic pointers as signed integers
I see the error message "access outside bounds of object referenced
via synthetic pointer" in the two fails below of mips gdb testing
print d[-2]^M
access outside bounds of object referenced via synthetic pointer^M
(gdb) FAIL: gdb.dwarf2/implptrconst.exp: print d[-2]
(gdb) print/d p[-1]^M
access outside bounds of object referenced via synthetic pointer^M
(gdb) FAIL: gdb.dwarf2/implptrpiece.exp: print/d p[-1]
in the first test, 'd[-2]' is processed by GDB as '* (&d[-2])'. 'd'
is a synthetic pointer, so its value is zero, the address of 'd[-2]'
is -2. In dwarf2loc.c:indirect_pieced_value,
/* This is an offset requested by GDB, such as value subscripts.
However, due to how synthetic pointers are implemented, this is
always presented to us as a pointer type. This means we have to
sign-extend it manually as appropriate. */
byte_offset = value_as_address (value);
if (TYPE_LENGTH (value_type (value)) < sizeof (LONGEST))
byte_offset = gdb_sign_extend (byte_offset,
8 * TYPE_LENGTH (value_type (value)));
byte_offset += piece->v.ptr.offset;
We know that the value is really an offset instead of address, so the
fix is to extract the value as an (signed) offset.
gdb:
2015-01-08 Pedro Alves <palves@redhat.com>
Yao Qi <yao@codesourcery.com>
* dwarf2loc.c (indirect_pieced_value): Don't call
gdb_sign_extend. Call extract_signed_integer instead.
* utils.c (gdb_sign_extend): Remove.
* utils.h (gdb_sign_extend): Remove declaration.
-----------------------------------------------------------------------
Summary of changes:
gdb/ChangeLog | 8 ++++++++
gdb/dwarf2loc.c | 16 +++++++++++-----
gdb/utils.c | 17 -----------------
gdb/utils.h | 5 -----
4 files changed, 19 insertions(+), 27 deletions(-)
hooks/post-receive
--
gdb and binutils