* [PATCH 2/4] Add a check to ensure that a type may fit into host memory
@ 2012-09-27 13:55 Siddhesh Poyarekar
2012-11-09 18:02 ` Jan Kratochvil
0 siblings, 1 reply; 2+ messages in thread
From: Siddhesh Poyarekar @ 2012-09-27 13:55 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 248 bytes --]
Hi,
This is part two of the bitpos expansion patch. This implements checks
in some places in the code to ensure that a type size in ULONGEST is
small enough to fit into host memory. Tested for regressions on x86_64
Fedora 16.
Regards,
Siddhesh
[-- Attachment #2: ChangeLog-ensure_sizet --]
[-- Type: text/plain, Size: 905 bytes --]
gdb/ChangeLog
* alpha-tdep.c (alpha_push_dummy_call) Check for underflow in
SP.
* cp-valprint (cp_print_value): Ensure BASECLASS fits into
size_t.
* dwarf2loc.c (read_pieced_value): Ensure that THIS_SIZE fits
into size_t.
(write_pieced_value): Likewise.
* findcmd.c (parse_find_args): Ensure PATTERN_BUF_SIZE fits into
size_t.
* p-valprint (pascal_object_print_value): Ensure BASECLASS fits
into size_t.
* utils.c (ulongest_fits_host_or_error): New function to find if
a ULONGEST number fits into size_t.
* utils.h: Declare ulongest_fits_host_or_error.
* valops.c (search_struct_method): Ensure BASECLASS fits into
size_t.
* value.c (allocate_value_lazy): Ensure TYPE fits into size_t.
(allocate_value_contents): Likewise.
(set_value_enclosing_type): Ensure NEW_ENCL_TYPE fits into
size_t.
* vax-tdep.c (vax_return_value): Ensure that TYPE fits into
size_t.
[-- Attachment #3: bitpos-ensure-size_t.patch --]
[-- Type: text/x-patch, Size: 5572 bytes --]
diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c
index e5b75d2..ff719d8 100644
--- a/gdb/alpha-tdep.c
+++ b/gdb/alpha-tdep.c
@@ -414,6 +414,13 @@ alpha_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
accumulate_size = 0;
else
accumulate_size -= sizeof(arg_reg_buffer);
+
+ /* Check for underflow. */
+ if (sp - accumulate_size > sp)
+ error (_("Insufficient memory in GDB host for arguments, "
+ "need %s bytes, but less than %s bytes available."),
+ plongest (accumulate_size), plongest (CORE_ADDR_MAX - sp));
+
sp -= accumulate_size;
/* Keep sp aligned to a multiple of 16 as the ABI requires. */
diff --git a/gdb/cp-valprint.c b/gdb/cp-valprint.c
index 8bc329e..2373419 100644
--- a/gdb/cp-valprint.c
+++ b/gdb/cp-valprint.c
@@ -558,6 +558,8 @@ cp_print_value (struct type *type, struct type *real_type,
gdb_byte *buf;
struct cleanup *back_to;
+ ulongest_fits_host_or_error (TYPE_LENGTH (baseclass));
+
buf = xmalloc (TYPE_LENGTH (baseclass));
back_to = make_cleanup (xfree, buf);
diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c
index bef4355..7106805 100644
--- a/gdb/dwarf2loc.c
+++ b/gdb/dwarf2loc.c
@@ -1593,6 +1593,8 @@ read_pieced_value (struct value *v)
this_size = (this_size_bits + source_offset_bits % 8 + 7) / 8;
source_offset = source_offset_bits / 8;
+ ulongest_fits_host_or_error (this_size);
+
if (buffer_size < this_size)
{
buffer_size = this_size;
@@ -1784,6 +1786,7 @@ write_pieced_value (struct value *to, struct value *from)
}
else
{
+ ulongest_fits_host_or_error (this_size);
if (buffer_size < this_size)
{
buffer_size = this_size;
diff --git a/gdb/findcmd.c b/gdb/findcmd.c
index 116e0b0..baaee92 100644
--- a/gdb/findcmd.c
+++ b/gdb/findcmd.c
@@ -187,6 +187,7 @@ parse_find_args (char *args, ULONGEST *max_countp,
size_t current_offset = pattern_buf_end - pattern_buf;
pattern_buf_size = pattern_buf_size_need * 2;
+ ulongest_fits_host_or_error (pattern_buf_size);
pattern_buf = xrealloc (pattern_buf, pattern_buf_size);
pattern_buf_end = pattern_buf + current_offset;
}
diff --git a/gdb/p-valprint.c b/gdb/p-valprint.c
index 7be1c17..49c3a16 100644
--- a/gdb/p-valprint.c
+++ b/gdb/p-valprint.c
@@ -790,6 +790,7 @@ pascal_object_print_value (struct type *type, const gdb_byte *valaddr,
gdb_byte *buf;
struct cleanup *back_to;
+ ulongest_fits_host_or_error (TYPE_LENGTH (baseclass));
buf = xmalloc (TYPE_LENGTH (baseclass));
back_to = make_cleanup (xfree, buf);
diff --git a/gdb/utils.c b/gdb/utils.c
index 6026450..090c1d2 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -3169,6 +3169,18 @@ host_address_to_string (const void *addr)
return str;
}
+/* Ensure that the input NUM is not larger than the maximum capacity of the
+ host system. We choose SIZE_MAX / 8 as a conservative estimate of the size
+ of a resource that a system may allocate. */
+void
+ulongest_fits_host_or_error (ULONGEST num)
+{
+ if (num > SIZE_MAX / 8)
+ error (_("Insufficient memory in host GDB for object of size %s bytes, "
+ "maximum allowed %s bytes."), pulongest (num),
+ pulongest (SIZE_MAX / 8));
+}
+
char *
gdb_realpath (const char *filename)
{
diff --git a/gdb/utils.h b/gdb/utils.h
index 4bb6ac8..d7d2e1a 100644
--- a/gdb/utils.h
+++ b/gdb/utils.h
@@ -23,6 +23,8 @@
#include "cleanups.h"
+extern void ulongest_fits_host_or_error (ULONGEST num);
+
extern void initialize_utils (void);
/* String utilities. */
diff --git a/gdb/valops.c b/gdb/valops.c
index 4458f6b..94e8f67 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -2273,6 +2273,7 @@ search_struct_method (const char *name, struct value **arg1p,
struct cleanup *back_to;
CORE_ADDR address;
+ ulongest_fits_host_or_error (TYPE_LENGTH (baseclass));
tmp = xmalloc (TYPE_LENGTH (baseclass));
back_to = make_cleanup (xfree, tmp);
address = value_address (*arg1p);
diff --git a/gdb/value.c b/gdb/value.c
index 79a89bb..4524221 100644
--- a/gdb/value.c
+++ b/gdb/value.c
@@ -662,6 +662,7 @@ allocate_value_lazy (struct type *type)
description correctly. */
check_typedef (type);
+ ulongest_fits_host_or_error (TYPE_LENGTH (type));
val = (struct value *) xzalloc (sizeof (struct value));
val->contents = NULL;
val->next = all_values;
@@ -693,6 +694,8 @@ allocate_value_lazy (struct type *type)
void
allocate_value_contents (struct value *val)
{
+ ulongest_fits_host_or_error (TYPE_LENGTH (val->enclosing_type));
+
if (!val->contents)
val->contents = (gdb_byte *) xzalloc (TYPE_LENGTH (val->enclosing_type));
}
@@ -2601,8 +2604,12 @@ void
set_value_enclosing_type (struct value *val, struct type *new_encl_type)
{
if (TYPE_LENGTH (new_encl_type) > TYPE_LENGTH (value_enclosing_type (val)))
- val->contents =
- (gdb_byte *) xrealloc (val->contents, TYPE_LENGTH (new_encl_type));
+ {
+ ulongest_fits_host_or_error (TYPE_LENGTH (new_encl_type));
+
+ val->contents =
+ (gdb_byte *) xrealloc (val->contents, TYPE_LENGTH (new_encl_type));
+ }
val->enclosing_type = new_encl_type;
}
diff --git a/gdb/vax-tdep.c b/gdb/vax-tdep.c
index 550b56b..04a3d9a 100644
--- a/gdb/vax-tdep.c
+++ b/gdb/vax-tdep.c
@@ -224,6 +224,7 @@ vax_return_value (struct gdbarch *gdbarch, struct value *function,
ULONGEST addr;
regcache_raw_read_unsigned (regcache, VAX_R0_REGNUM, &addr);
+ ulongest_fits_host_or_error (len);
read_memory (addr, readbuf, len);
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 2/4] Add a check to ensure that a type may fit into host memory
2012-09-27 13:55 [PATCH 2/4] Add a check to ensure that a type may fit into host memory Siddhesh Poyarekar
@ 2012-11-09 18:02 ` Jan Kratochvil
0 siblings, 0 replies; 2+ messages in thread
From: Jan Kratochvil @ 2012-11-09 18:02 UTC (permalink / raw)
To: Siddhesh Poyarekar; +Cc: gdb-patches
On Thu, 27 Sep 2012 15:21:00 +0200, Siddhesh Poyarekar wrote:
> --- a/gdb/value.c
> +++ b/gdb/value.c
> @@ -662,6 +662,7 @@ allocate_value_lazy (struct type *type)
> description correctly. */
> check_typedef (type);
>
> + ulongest_fits_host_or_error (TYPE_LENGTH (type));
> val = (struct value *) xzalloc (sizeof (struct value));
> val->contents = NULL;
> val->next = all_values;
This ulongest_fits_host_or_error placement is excessive. Any problematic case
is caught by allocate_value_lazy.
This has caused unnecessary
Insufficient memory in host GDB for object of size 4278190082 bytes, maximum allowed 536870911 bytes.
for 32-bit host GDB accessing 64-bit ELF file; which is uncommon but
technically principle it is perfectly valid.
The modified testcase in the patch below is just "for the record", I do not
think raw binaries are suitable for FSF GDB.
> @@ -693,6 +694,8 @@ allocate_value_lazy (struct type *type)
> void
> allocate_value_contents (struct value *val)
> {
> + ulongest_fits_host_or_error (TYPE_LENGTH (val->enclosing_type));
> +
> if (!val->contents)
> val->contents = (gdb_byte *) xzalloc (TYPE_LENGTH (val->enclosing_type));
> }
That is here it gets caught later anyway if needed.
Jan
gdb/
2012-11-09 Jan Kratochvil <jan.kratochvil@redhat.com>
* value.c (allocate_value_lazy): Remove ulongest_fits_host_or_error.
gdb/testsuite/
2012-11-09 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.base/longest-types.exp: New file.
* gdb.base/longest-types.c: New file.
* gdb.base/longest-types-64bit.S: New file.
* gdb.base/longest-types-64bit.bz2.uu: New file.
--- gdb-7.5.0.20120926-m64/gdb/value.c-orig 2012-11-09 17:08:52.137406118 +0100
+++ gdb-7.5.0.20120926-m64/gdb/value.c 2012-11-09 17:32:38.324199230 +0100
@@ -663,7 +663,6 @@ allocate_value_lazy (struct type *type)
description correctly. */
check_typedef (type);
- ulongest_fits_host_or_error (TYPE_LENGTH (type));
val = (struct value *) xzalloc (sizeof (struct value));
val->contents = NULL;
val->next = all_values;
--- /dev/null 2012-10-18 11:08:13.202328239 +0200
+++ gdb-7.5.0.20120926-m64-test/gdb/testsuite/gdb.base/longest-types.exp 2012-11-09 18:13:56.286587994 +0100
@@ -0,0 +1,59 @@
+# This testcase is part of GDB, the GNU debugger.
+
+# Copyright 2012 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+standard_testfile .c longest-types-64bit.S
+
+proc test { name } { with_test_prefix $name {
+ # 64-bit array size should not overflow
+ gdb_test "print &f->buf" {= \(char \(\*\)\[1099494850560\]\) 0x0}
+
+ # The offset should not overflow
+ gdb_test "print &f->buf2" {= \(char \(\*\)\[2\]\) 0xffff000000}
+}}
+
+
+# Test 64-bit file first as it is not compiled so its compilation never fails.
+
+set file64bitbz2uu ${srcdir}/${subdir}/${testfile}-64bit.bz2.uu
+set file64bit ${objdir}/${subdir}/${testfile}-64bit
+
+if {[catch "system \"uudecode -o - ${file64bitbz2uu} | bzip2 -dc >${file64bit}\""] != 0} {
+ untested "failed uudecode or bzip2"
+ return -1
+}
+file stat ${file64bit} file64bitstat
+if {$file64bitstat(size) != 9501} {
+ untested "uudecode or bzip2 produce invalid result"
+ return -1
+}
+
+clean_restart ${file64bit}
+
+#if { [prepare_for_testing ${testfile}.exp ${testfile}-64bit $srcfile2 {nodebug}] } {
+# return -1
+#}
+
+test "64bit"
+
+
+# And here is the native build test.
+
+if { [prepare_for_testing ${testfile}.exp ${testfile} $srcfile {debug quiet}] } {
+ return -1
+}
+
+test "native"
--- /dev/null 2012-10-18 11:08:13.202328239 +0200
+++ ./gdb/testsuite/gdb.base/longest-types.c 2012-11-09 17:08:51.374406344 +0100
@@ -0,0 +1,28 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2012 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+struct foo
+{
+ char buf[0xffff000000];
+ char buf2[2];
+} *f;
+
+int
+main (void)
+{
+ return 0;
+}
--- /dev/null 2012-10-18 11:08:13.202328239 +0200
+++ ./gdb/testsuite/gdb.base/longest-types-64bit.S 2012-11-09 17:51:37.597846130 +0100
@@ -0,0 +1,249 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2012 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+ .file "longest-types-64bit.c"
+ .text
+.Ltext0:
+ .globl main
+main:
+ .comm f,8,8
+.Letext0:
+ .file 1 "gdb.base/longest-types-64bit.c"
+ .section .debug_info,"",@progbits
+.Ldebug_info0:
+ .4byte 0x9a /* Length of Compilation Unit Info */
+ .2byte 0x2 /* DWARF version number */
+ .4byte .Ldebug_abbrev0 /* Offset Into Abbrev. Section */
+ .byte 0x8 /* Pointer Size (in bytes) */
+ .uleb128 0x1 /* (DIE (0xb) DW_TAG_compile_unit) */
+ .4byte .LASF3 /* DW_AT_producer: "GNU C 4.7.3 20121109 (prerelease)" */
+ .byte 0x1 /* DW_AT_language */
+ .4byte .LASF4 /* DW_AT_name: "gdb.base/longest-types-64bit.c" */
+ .4byte .LASF5 /* DW_AT_comp_dir: "" */
+ .4byte .Ldebug_line0 /* DW_AT_stmt_list */
+ .uleb128 0x2 /* (DIE (0x1d) DW_TAG_structure_type) */
+ .ascii "foo\0" /* DW_AT_name */
+ .4byte 0xff000002 /* DW_AT_byte_size */
+ .byte 0x1 /* DW_AT_decl_file (gdb.base/longest-types-64bit.c) */
+ .byte 0x12 /* DW_AT_decl_line */
+ .4byte 0x4e /* DW_AT_sibling */
+ .uleb128 0x3 /* (DIE (0x2c) DW_TAG_member) */
+ .ascii "buf\0" /* DW_AT_name */
+ .byte 0x1 /* DW_AT_decl_file (gdb.base/longest-types-64bit.c) */
+ .byte 0x14 /* DW_AT_decl_line */
+ .4byte 0x4e /* DW_AT_type */
+ .byte 0x2 /* DW_AT_data_member_location */
+ .byte 0x23 /* DW_OP_plus_uconst */
+ .uleb128 0
+ .uleb128 0x4 /* (DIE (0x3a) DW_TAG_member) */
+ .4byte .LASF0 /* DW_AT_name: "buf2" */
+ .byte 0x1 /* DW_AT_decl_file (gdb.base/longest-types-64bit.c) */
+ .byte 0x15 /* DW_AT_decl_line */
+ .4byte 0x73 /* DW_AT_type */
+ .byte 0x7 /* DW_AT_data_member_location */
+ .byte 0x23 /* DW_OP_plus_uconst */
+ .uleb128 0xffff000000
+ .byte 0 /* end of children of DIE 0x1d */
+ .uleb128 0x5 /* (DIE (0x4e) DW_TAG_array_type) */
+ .4byte 0x6c /* DW_AT_type */
+ .4byte 0x65 /* DW_AT_sibling */
+ .uleb128 0x6 /* (DIE (0x57) DW_TAG_subrange_type) */
+ .4byte 0x65 /* DW_AT_type */
+ .quad 0xfffeffffff /* DW_AT_upper_bound */
+ .byte 0 /* end of children of DIE 0x4e */
+ .uleb128 0x7 /* (DIE (0x65) DW_TAG_base_type) */
+ .byte 0x8 /* DW_AT_byte_size */
+ .byte 0x7 /* DW_AT_encoding */
+ .4byte .LASF1 /* DW_AT_name: "sizetype" */
+ .uleb128 0x7 /* (DIE (0x6c) DW_TAG_base_type) */
+ .byte 0x1 /* DW_AT_byte_size */
+ .byte 0x6 /* DW_AT_encoding */
+ .4byte .LASF2 /* DW_AT_name: "char" */
+ .uleb128 0x5 /* (DIE (0x73) DW_TAG_array_type) */
+ .4byte 0x6c /* DW_AT_type */
+ .4byte 0x83 /* DW_AT_sibling */
+ .uleb128 0x8 /* (DIE (0x7c) DW_TAG_subrange_type) */
+ .4byte 0x65 /* DW_AT_type */
+ .byte 0x1 /* DW_AT_upper_bound */
+ .byte 0 /* end of children of DIE 0x73 */
+ .uleb128 0x9 /* (DIE (0x83) DW_TAG_variable) */
+ .ascii "f\0" /* DW_AT_name */
+ .byte 0x1 /* DW_AT_decl_file (gdb.base/longest-types-64bit.c) */
+ .byte 0x16 /* DW_AT_decl_line */
+ .4byte 0x97 /* DW_AT_type */
+ .byte 0x1 /* DW_AT_external */
+ .byte 0x9 /* DW_AT_location */
+ .byte 0x3 /* DW_OP_addr */
+ .quad f
+ .uleb128 0xa /* (DIE (0x97) DW_TAG_pointer_type) */
+ .byte 0x8 /* DW_AT_byte_size */
+ .4byte 0x1d /* DW_AT_type */
+ .byte 0 /* end of children of DIE 0xb */
+ .section .debug_abbrev,"",@progbits
+.Ldebug_abbrev0:
+ .uleb128 0x1 /* (abbrev code) */
+ .uleb128 0x11 /* (TAG: DW_TAG_compile_unit) */
+ .byte 0x1 /* DW_children_yes */
+ .uleb128 0x25 /* (DW_AT_producer) */
+ .uleb128 0xe /* (DW_FORM_strp) */
+ .uleb128 0x13 /* (DW_AT_language) */
+ .uleb128 0xb /* (DW_FORM_data1) */
+ .uleb128 0x3 /* (DW_AT_name) */
+ .uleb128 0xe /* (DW_FORM_strp) */
+ .uleb128 0x1b /* (DW_AT_comp_dir) */
+ .uleb128 0xe /* (DW_FORM_strp) */
+ .uleb128 0x10 /* (DW_AT_stmt_list) */
+ .uleb128 0x6 /* (DW_FORM_data4) */
+ .byte 0
+ .byte 0
+ .uleb128 0x2 /* (abbrev code) */
+ .uleb128 0x13 /* (TAG: DW_TAG_structure_type) */
+ .byte 0x1 /* DW_children_yes */
+ .uleb128 0x3 /* (DW_AT_name) */
+ .uleb128 0x8 /* (DW_FORM_string) */
+ .uleb128 0xb /* (DW_AT_byte_size) */
+ .uleb128 0x6 /* (DW_FORM_data4) */
+ .uleb128 0x3a /* (DW_AT_decl_file) */
+ .uleb128 0xb /* (DW_FORM_data1) */
+ .uleb128 0x3b /* (DW_AT_decl_line) */
+ .uleb128 0xb /* (DW_FORM_data1) */
+ .uleb128 0x1 /* (DW_AT_sibling) */
+ .uleb128 0x13 /* (DW_FORM_ref4) */
+ .byte 0
+ .byte 0
+ .uleb128 0x3 /* (abbrev code) */
+ .uleb128 0xd /* (TAG: DW_TAG_member) */
+ .byte 0 /* DW_children_no */
+ .uleb128 0x3 /* (DW_AT_name) */
+ .uleb128 0x8 /* (DW_FORM_string) */
+ .uleb128 0x3a /* (DW_AT_decl_file) */
+ .uleb128 0xb /* (DW_FORM_data1) */
+ .uleb128 0x3b /* (DW_AT_decl_line) */
+ .uleb128 0xb /* (DW_FORM_data1) */
+ .uleb128 0x49 /* (DW_AT_type) */
+ .uleb128 0x13 /* (DW_FORM_ref4) */
+ .uleb128 0x38 /* (DW_AT_data_member_location) */
+ .uleb128 0xa /* (DW_FORM_block1) */
+ .byte 0
+ .byte 0
+ .uleb128 0x4 /* (abbrev code) */
+ .uleb128 0xd /* (TAG: DW_TAG_member) */
+ .byte 0 /* DW_children_no */
+ .uleb128 0x3 /* (DW_AT_name) */
+ .uleb128 0xe /* (DW_FORM_strp) */
+ .uleb128 0x3a /* (DW_AT_decl_file) */
+ .uleb128 0xb /* (DW_FORM_data1) */
+ .uleb128 0x3b /* (DW_AT_decl_line) */
+ .uleb128 0xb /* (DW_FORM_data1) */
+ .uleb128 0x49 /* (DW_AT_type) */
+ .uleb128 0x13 /* (DW_FORM_ref4) */
+ .uleb128 0x38 /* (DW_AT_data_member_location) */
+ .uleb128 0xa /* (DW_FORM_block1) */
+ .byte 0
+ .byte 0
+ .uleb128 0x5 /* (abbrev code) */
+ .uleb128 0x1 /* (TAG: DW_TAG_array_type) */
+ .byte 0x1 /* DW_children_yes */
+ .uleb128 0x49 /* (DW_AT_type) */
+ .uleb128 0x13 /* (DW_FORM_ref4) */
+ .uleb128 0x1 /* (DW_AT_sibling) */
+ .uleb128 0x13 /* (DW_FORM_ref4) */
+ .byte 0
+ .byte 0
+ .uleb128 0x6 /* (abbrev code) */
+ .uleb128 0x21 /* (TAG: DW_TAG_subrange_type) */
+ .byte 0 /* DW_children_no */
+ .uleb128 0x49 /* (DW_AT_type) */
+ .uleb128 0x13 /* (DW_FORM_ref4) */
+ .uleb128 0x2f /* (DW_AT_upper_bound) */
+ .uleb128 0x7 /* (DW_FORM_data8) */
+ .byte 0
+ .byte 0
+ .uleb128 0x7 /* (abbrev code) */
+ .uleb128 0x24 /* (TAG: DW_TAG_base_type) */
+ .byte 0 /* DW_children_no */
+ .uleb128 0xb /* (DW_AT_byte_size) */
+ .uleb128 0xb /* (DW_FORM_data1) */
+ .uleb128 0x3e /* (DW_AT_encoding) */
+ .uleb128 0xb /* (DW_FORM_data1) */
+ .uleb128 0x3 /* (DW_AT_name) */
+ .uleb128 0xe /* (DW_FORM_strp) */
+ .byte 0
+ .byte 0
+ .uleb128 0x8 /* (abbrev code) */
+ .uleb128 0x21 /* (TAG: DW_TAG_subrange_type) */
+ .byte 0 /* DW_children_no */
+ .uleb128 0x49 /* (DW_AT_type) */
+ .uleb128 0x13 /* (DW_FORM_ref4) */
+ .uleb128 0x2f /* (DW_AT_upper_bound) */
+ .uleb128 0xb /* (DW_FORM_data1) */
+ .byte 0
+ .byte 0
+ .uleb128 0x9 /* (abbrev code) */
+ .uleb128 0x34 /* (TAG: DW_TAG_variable) */
+ .byte 0 /* DW_children_no */
+ .uleb128 0x3 /* (DW_AT_name) */
+ .uleb128 0x8 /* (DW_FORM_string) */
+ .uleb128 0x3a /* (DW_AT_decl_file) */
+ .uleb128 0xb /* (DW_FORM_data1) */
+ .uleb128 0x3b /* (DW_AT_decl_line) */
+ .uleb128 0xb /* (DW_FORM_data1) */
+ .uleb128 0x49 /* (DW_AT_type) */
+ .uleb128 0x13 /* (DW_FORM_ref4) */
+ .uleb128 0x3f /* (DW_AT_external) */
+ .uleb128 0xc /* (DW_FORM_flag) */
+ .uleb128 0x2 /* (DW_AT_location) */
+ .uleb128 0xa /* (DW_FORM_block1) */
+ .byte 0
+ .byte 0
+ .uleb128 0xa /* (abbrev code) */
+ .uleb128 0xf /* (TAG: DW_TAG_pointer_type) */
+ .byte 0 /* DW_children_no */
+ .uleb128 0xb /* (DW_AT_byte_size) */
+ .uleb128 0xb /* (DW_FORM_data1) */
+ .uleb128 0x49 /* (DW_AT_type) */
+ .uleb128 0x13 /* (DW_FORM_ref4) */
+ .byte 0
+ .byte 0
+ .byte 0
+ .section .debug_aranges,"",@progbits
+ .4byte 0x1c /* Length of Address Ranges Info */
+ .2byte 0x2 /* DWARF Version */
+ .4byte .Ldebug_info0 /* Offset of Compilation Unit Info */
+ .byte 0x8 /* Size of Address */
+ .byte 0 /* Size of Segment Descriptor */
+ .2byte 0 /* Pad to 16 byte boundary */
+ .2byte 0
+ .quad 0
+ .quad 0
+ .section .debug_line,"",@progbits
+.Ldebug_line0:
+ .section .debug_str,"MS",@progbits,1
+.LASF4:
+ .string "gdb.base/longest-types-64bit.c"
+.LASF3:
+ .string "GNU C 4.7.3 20121109 (prerelease)"
+.LASF0:
+ .string "buf2"
+.LASF1:
+ .string "sizetype"
+.LASF5:
+ .string ""
+.LASF2:
+ .string "char"
+ .ident "GCC: (GNU) 4.7.3 20121109 (prerelease)"
+ .section .note.GNU-stack,"",@progbits
--- /dev/null 2012-10-18 11:08:13.202328239 +0200
+++ gdb-7.5.0.20120926-m64-test/gdb/testsuite/gdb.base/longest-types-64bit.bz2.uu 2012-11-09 18:04:52.995692771 +0100
@@ -0,0 +1,67 @@
+begin 755 gdb.base/longest-types-64bit.bz2
+M0EIH.3%!62936<'N#OH`"G/________^______?_Y______//]7SQD5'^/_%
+M=VY7?F_[X`F]]SG7531-==V:Z-.FW;M.U7=';:UH@<&FD31,E3]J'HE-/TR@
+M]4_5/32;%/U3]1--HU/U$#$R'I'J,FC0T-,)B'J#:CU,F@]0`/4:>F@C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6P#%,4K%HTIC[*O
+M6"4S,;RN&@=NP7@72:=U#&JPBQ-60OEAWY;CUYF+$73.R>T5HD,G=G!KTF3D
+M94"&ZA-F,.19=8`\(Q;A07Q%!19*3#*F9Q+D(0K@V87@O.=7EJIM6`!4`>D!
+M)49QHA!BV+:4O@K00$$!5*6>A@2@4D)@R\"%$2F"O:24J*L(RP#N;O4K7I&2
+M[#)KR47H-N[<O^S-)"_Q\>VJ%3>$`9,AF8QID&I3G+D`*]BX98B$2K":A7_\
+M_]7LT!4,$NL5)NE>9[:MK2_/'GO:7"P`=<X'"U9""0<PJ`3`.:*(Z]-.GQ,9
+M>P(\L]O?"-APH(834$,W!IJS+U1F1C.!D$!&KS^-6%F90PQ[F]F=$^QE\X+-
+M@.W*LPH_78B>MHH@69RU[*'1J@8QAC\KSV@IG\(;_CUW:ZR2.,0$E3LZ_^P=
+M<_DCP"Q<`;+_;YP#^U%&E^#2M%,T?F3UN^>TSH)GFL"\%RF[KNZ+[R+@<&.$
+MC42)B96\1-.O_I).K7)X]W>EQ):4C(XB*+:S%0_37D^EBP+1HU(D?3"%_O2R
+M6-#X>AU#<$*!/,W6QC^;O^%]LR&_X'<8X$<3CUU_QFAJ;">H)2443GD4W!4#
+?<55!2^6_8J$)-O<>\H0U/6Q^>UG0%W)%.%"0P>X.^@``
+`
+end
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-11-09 18:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-27 13:55 [PATCH 2/4] Add a check to ensure that a type may fit into host memory Siddhesh Poyarekar
2012-11-09 18:02 ` Jan Kratochvil
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox