Support structure offsets that are 512K or larger.
authorDavid Taylor <dtaylor@emc.com>
Tue, 12 Apr 2016 19:02:57 +0000 (15:02 -0400)
committerDavid Taylor <david.taylor@emc.com>
Sat, 25 Jun 2016 01:02:36 +0000 (21:02 -0400)
commit6b8505468e64c2be8d0eea1f2b8db86fa3897600
tree81de3154cfc05d9811239c11ef05cbb3a6fec06d
parente0204c4d4ceb9be0b0ccf8f92ab683aab54f67cd
Support structure offsets that are 512K or larger.

GDB computes structure byte offsets using a 32 bit integer.  And,
first it computes the offset in bits and then converts to bytes.  The
result is that any offset that if 512K bytes or larger overflows.
This patch changes GDB to use LONGEST for such calculations.

PR gdb/17520 Structure offset wrong when 1/4 GB or greater.
* c-lang.h: Change all parameters, variables, and struct or union
members used as struct or union fie3ld offsets from int to
LONGEST.
* c-valprint.c: Likewise.
* cp-abi.c: Likewise.
* cp-abi.h: Likewise.
* cp-valprint.c: Likewise.
* d-valprint.c: Likewise.
* dwarf2loc.c: Likewise.
* eval.c: Likewise.
* extension-priv.h: Likewise.
* extension.c: Likewise.
* extension.h: Likewise.
* findvar.c: Likewise.
* gdbtypes.h: Likewise.
* gnu-v2-abi.c: Likewise.
* gnu-v3-abi.c: Likewise.
* go-valprint.c: Likewise.
* guile/guile-internal.h: Likewise.
* guile/scm-pretty-print.c: Likewise.
* jv-valprint.c Likewise.
* opencl-lang.c: Likewise.
* p-lang.h: Likewise.
* python/py-prettyprint.c: Likewise.
* python/python-internal.h: Likewise.
* spu-tdep.c: Likewise.
* typeprint.c: Likewise.
* valarith.c: Likewise.
* valops.c: Likewise.
* valprint.c: Likewise.
* valprint.h: Likewise.
* value.c: Likewise.
* value.h: Likewise.
* p-valprint.c: Likewise.
* c-typeprint.c (c_type_print_base): When printing offset, use
plongest, not %d.
* gdbtypes.c (recursive_dump_type): Ditto.
38 files changed:
gdb/ChangeLog
gdb/c-lang.h
gdb/c-typeprint.c
gdb/c-valprint.c
gdb/cp-abi.c
gdb/cp-abi.h
gdb/cp-valprint.c
gdb/d-valprint.c
gdb/dwarf2loc.c
gdb/eval.c
gdb/extension-priv.h
gdb/extension.c
gdb/extension.h
gdb/findvar.c
gdb/gdbtypes.c
gdb/gdbtypes.h
gdb/gnu-v2-abi.c
gdb/gnu-v3-abi.c
gdb/go-valprint.c
gdb/guile/guile-internal.h
gdb/guile/scm-pretty-print.c
gdb/jv-valprint.c
gdb/opencl-lang.c
gdb/p-lang.h
gdb/p-valprint.c
gdb/python/py-prettyprint.c
gdb/python/python-internal.h
gdb/spu-tdep.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/offsets.c [new file with mode: 0644]
gdb/testsuite/gdb.base/offsets.exp [new file with mode: 0644]
gdb/typeprint.c
gdb/valarith.c
gdb/valops.c
gdb/valprint.c
gdb/valprint.h
gdb/value.c
gdb/value.h
This page took 0.050293 seconds and 4 git commands to generate.