[PATCH v2] Support structure offsets that are 512K bytes or larger.
Yao Qi
qiyaoltc@gmail.com
Fri Jun 10 08:54:00 GMT 2016
David Taylor <dtaylor@emc.com> writes:
Hi David,
> No regressions on x86-64 GNU/Linux.
I rebuild native i686-w64-mingw32 gdb with your patch, the build is
OK. The patch is good to me, some nits below. You can push it in if no
other comments in 3~4 days.
> * c-typeprint.c (c_type_print_base): When printing offset, use plongest, not %d.
This line is too long.
> @@ -723,11 +723,12 @@ pascal_object_print_value (struct type *type, const gdb_byte *valaddr,
>
> for (i = 0; i < n_baseclasses; i++)
> {
> - int boffset = 0;
> + LONGEST boffset = 0;
> struct type *baseclass = check_typedef (TYPE_BASECLASS (type, i));
> const char *basename = type_name_no_tag (baseclass);
> const gdb_byte *base_valaddr = NULL;
> - int thisoffset;
> + LONGEST thisoffset;
> + volatile struct gdb_exception ex; /* XXX */
'ex' is not used at all.
> diff --git a/gdb/testsuite/gdb.base/offsets.c b/gdb/testsuite/gdb.base/offsets.c
> new file mode 100644
> index 0000000..4923d33
> --- /dev/null
> +++ b/gdb/testsuite/gdb.base/offsets.c
> @@ -0,0 +1,28 @@
> +/* This testcase is part of GDB, the GNU debugger.
> +
> + Copyright 2015 Free Software Foundation, Inc.
2014 - 2016 [we start from 2014 because the test was posted in 2014]
> diff --git a/gdb/testsuite/gdb.base/offsets.exp b/gdb/testsuite/gdb.base/offsets.exp
> new file mode 100644
> index 0000000..42c0c5d
> --- /dev/null
> +++ b/gdb/testsuite/gdb.base/offsets.exp
> @@ -0,0 +1,45 @@
> +# Test big offsets
> +
> +# Copyright (c) 2015 Free Software Foundation, Inc.
2014 - 2016
--
Yao (齐尧)
More information about the Gdb-patches
mailing list