diff options
author | gdb-3.4 <gdb@fsf.org> | 1989-11-05 21:02:37 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2012-06-03 15:36:32 +0100 |
commit | 1c997a4ae86938343edb715efc3fc742c5f668fe (patch) | |
tree | 9e3c70728a3987732436b7fa4b4cfef433a0669a /gdb/valops.c | |
parent | 4187119d59afd156703cfcbc6be287c5085f1867 (diff) | |
download | gdb-1c997a4ae86938343edb715efc3fc742c5f668fe.zip gdb-1c997a4ae86938343edb715efc3fc742c5f668fe.tar.gz gdb-1c997a4ae86938343edb715efc3fc742c5f668fe.tar.bz2 |
gdb-3.4
Diffstat (limited to 'gdb/valops.c')
-rw-r--r-- | gdb/valops.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gdb/valops.c b/gdb/valops.c index c70219f..2e7354b 100644 --- a/gdb/valops.c +++ b/gdb/valops.c @@ -392,9 +392,12 @@ value_ind (arg1) if (TYPE_CODE (VALUE_TYPE (arg1)) == TYPE_CODE_MEMBER) error ("not implemented: member types in value_ind"); - /* Allow * on an integer so we can cast it to whatever we want. */ + /* Allow * on an integer so we can cast it to whatever we want. + This returns an int, which seems like the most C-like thing + to do. "long long" variables are rare enough that + BUILTIN_TYPE_LONGEST would seem to be a mistake. */ if (TYPE_CODE (VALUE_TYPE (arg1)) == TYPE_CODE_INT) - return value_at (BUILTIN_TYPE_LONGEST, + return value_at (builtin_type_int, (CORE_ADDR) value_as_long (arg1)); else if (TYPE_CODE (VALUE_TYPE (arg1)) == TYPE_CODE_PTR) return value_at (TYPE_TARGET_TYPE (VALUE_TYPE (arg1)), |