public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* RFA 0/2 fix for bug with large structure offsets
@ 2014-11-18 16:53 David Taylor
  2014-11-23 19:40 ` Jan Kratochvil
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: David Taylor @ 2014-11-18 16:53 UTC (permalink / raw)
  To: gdb-patches

The following is a fix for bug 17520 (structure offset wrong when 1/4 GB
or greater).

Fixing this touched a lot of files.  The bulk of the changes can be
summarized with one of two lines:

    Change <function arg> from int to LONGEST
or
    Change <local arg> from int to LONGEST.

Occasionally the last part is

    from unsigned int to ULONGEST
or
    from int * to LONGEST *.

As described in bug 17520, if you have a big structure, and try to get
the address of a structure member that is 1/4 GB or more from the start
of the structure, GDB will report the wrong value.  For example, if you
have:

struct big_struct
{
  char first[0x10000000 + 16];
  long second;
} big_struct;

Then GDB will report an address for big_struct.second that is less than
the address of the structure, big_struct.

GDB assumes that the *bit* offset of the member will fit into an int.
Even in a 32-bit environment, that is not a safe assumption.

This patch changes it from int to LONGEST.  

There are a couple of warning messages that are affected.  Since LONGEST
is sometimes a long (LP64 environments) and sometimes a long long (ILP32
environments), I chose to change the format from %d to %lld and cast the
arg to long long.

There were no testsuite regressions on i686 GNU/Linux nor on x86-64
GNU/Linux.

The bulk of the patch is in part 1.  Part 2 is just a trivial testsuite
patch (a new test).  The git diffs are relative to the head of the trunk
as of late last week.

Here are the ChangeLog entries.

gdb/ChangeLog:

2014-11-18  David Taylor  <dtaylor@emc.com>

	* c-lang.h (cp_print_value_fields, cp_print_value_fields_rtti):
	Modify prototypes to match new function definitions.
	* c-valprint.c (c_value_print): Change local top from int to
	LONGEST.
	* cp-abi.c (baseclass_offset): Change embedded_offset from int to
	LONGEST.  (value_rtti_type): Change top from int * to LONGEST *.
	* cp-abi.h (value_rtti_type, baseclass_offset): Modify prototypes
	to match new function definitions.
	(struct cp_abi_ops): For field rtti_type, change type of arg top
	from int * to LONGEST *.  For field baseclass_offset, change type
	of arg embeeded_offset from int to LONGEST.
	* cp-valprint.c (cp_print_value, cp_print_value_fields)
	(cp_print_value_fields_rtti): Change type of function argument
	offset from int to LONGEST.
	(cp_print_value): Change locals thisoffset and boffset from int to
	LONGEST.
	* d-valprint.c (dynamic_array_type): Change local embedded_offset
	from int to LONGEST.
	* dwarf2loc.c (indirect_pieced_value): Change local bit_offset
	from int to LONGEST.
	* eval.c (evaluate_subexp_standard): Change local top from int to
	LONGEST.
	* extension-priv.h (struct extension_language_ops): For member
	apply_val_pretty_printer, change type of arg embedded_offset from
	int to LONGEST.
	* extension.c (apply_ext_lang_val_pretty_printer): Change arg
	embedded_offset from int to LONGEST.
	* extension.h: Ditto.
	* findvar.c (read_frame_register_value): Change types of offset
	and reg_offset from int to LONGEST.
	* gdbtypes.c (recursive_dump_type): In printfi_filtered call
	change format for bitpos from %d to %lld and cast arg to long long
	(arg is a LONGEST which could be either a long or a long long).
	* gdbtypes.h (union field_location): Change member bitpos from int
	to LONGEST.
	* gnu-v2-abi.c (gnuv2_value_rtti_type): Change type of function
	arg top from int * to LONGEST *.  (gnuv2_baseclass_offset): Change
	type of arg embedded_offset from int to LONGEST; change local
	field_offset from int to LONGEST.
	* gnu-v3-abi.c (gnuv3_rtti_type): Change type of arg top_p from
	int * to LONGEST *.  (gnuv3_baseclass_offset): Change type of arg
	embedded_offset from int to LONGEST.
	* go-valprint.c (print_go_string): Change type of arg
	embedded_offset from int to LONGEST.
	* scm-pretty-print.c (gdbscm_apply_val_pretty_printer): Change
	type of arg embedded_offset from int to LONGEST.
	* jv-valprint.c (java_print_value_fields): Change type of arg
	offset from int to LONGEST.
	* opencl-lang.c (lval_func_read): Change locals offset and elsize
	from int to LONGEST.  (lval_func_write): Change type of locals
	offset and elsize from int to LONGEST.
	* p-lang.h (pascal_object_print_value_fields): Modify prototype to
	match new function definition.
	* p-valprint.c (pascal_object_print_value): Change type arg offset
	from int to LONGEST; change locals boffset and thisoffset from int
	to LONGEST. (pascal_object_print_value)
	(pascal_object_print_value_fields): Change type arg offset from
	int to LONGEST.
	* python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Change
	type of arg embedded_offset from int to LONGEST.
	* python/python-internal.h (gdbpy_apply_val_pretty_printer):
	Modify prototype to match new function definition.
	* spu-tdep.c (spu_value_from_register): Change local len from int
	to LONGEST.
	* typeprint.c (whatis_exp): Change type of local top from int to
	LONGEST.
	* valarith.c (value_subscripted_rvalue): Change type of local
	elt_offs from unsigned int to ULONGEST.
	* valops.c (search_struct_method): Change type of arg offset from
	int to LONGEST.  (find_method_list): Change type of offset from
	int to LONGEST; change type of arg boffset from int * to
	LONGEST *.  (value_cast_structs): Change type of local top from
	int to LONGEST.  (dynamic_cast_check_1): Change type of arg
	embedded_offset from int to LONGEST; change type of local offset
	from int to LONGEST.  (dynamic_cast_check_2): Change type of arg
	embedded_offset from int to LONGEST; change type of local offset
	from int to LONGEST.  (value_dynamic_cast): Change type of local
	top from int to LONGEST. (read_value_memory): Change type of arg
	embedded_offset from int to LONGEST.  (value_assign): Change type
	of local offset from int to LONGEST.  (value_arry): Change local
	typelength from unsigned int to ULONGEST.  (update_search_result):
	Change type of arg last_boffset from int * to
	LONGEST *.  (do_search_struct_field): Change type of arg
	last_boffset from int * to LONGEST *; change local new_offset from
	int to LONGEST; change local boffset from int to
	LONGEST.  (search_struct_field): Change local boffset from int to
	LONGEST.  (seach_struct_method): Change arg offset from int to
	LONGEST; change locals base_offset and this_offset from int to
	LONGEST.  (find_method_list): Change arg offset from int to
	LONGEST; change arg boffset from int * to LONGEST *; change local
	base_offset from int to LONGEST.  (value_find_oload_method_list):
	Change arg offset from int to LONGEST; change arg boffset from
	int * to LONGEST *.  (find_overload_match): Change local boffset
	from int to LONGEST.  (value_rtti_indirect_type): change arg top
	from int * to LONGEST *.  (value_full_object): Change type of
	local topt from int to LONGEST.
	* valprint.c (valprint_check_validity): Change type of arg
	embedded_offset from int to LONGEST.  (val_print): Ditto.
	(val_print_scalar_formatted): Ditto.  (val_print_arry_elements):
	Ditto.
	* valprint.h (val_print_array_elements,	val_print_scalar_formatted):
	Modify prototypes to match new function definitions.
	* value.c (struct range): Change members offset and length from
	int to LONGEST.
	(ranges_overlap): Change all args from int to LONGEST.
	(ranges_contain): Change args offset and length from int to
	LONGEST; change local i from int to LONGEST.
	(struct value): Change members offset, bitsize, bitpos,
	embedded_offset, and pointed_to_offset from int to LONGEST.
	(value_bits_available): Change args offset and length from int to
	LONGEST.
	(value_bytes_available): Ditto.  (mark_value_bits_unavailable):
	Ditto.  (mark_value_bytes_unavailable):
	Ditto.  (find_first_range_overlap): Ditto.  (value_offset): Change
	return type from int to LONGEST.  (set_value_offset): Change arg
	offset from int to LONGEST.  (value_bitpos): Change return type
	from int to LONGEST.  (set_value_bitpos): Change arg bit from int
	to LONGEST.  (value_bitsize): Change return type from int to
	LONGEST.  (set_value_bitsize): Change arg bit from int to LONGEST.
	value_contents_copy_raw): Change args dst_offset, src_offset, and
	length from int to LONGEST; change locals src_bit_offset,
	dst_bit_offset, and bit_length from int to
	LONGEST.  (value_contents_copy): Change args dst_offset,
	src_offset, and length from int to
	LONGEST.  (value_bits_synthetic_pointer): Change args offset and
	length from int to LONGEST.  (value_embedded_offset); Change
	return type from int to LONGEST.  (set_value_embedded_offset):
	Change arg val from int to LONGEST.  (value_pointed_to_offset);
	Change return type from int to
	LONGEST.  (set_value_pointed_to_offset): Change arg val from int
	to LONGEST.  (set_internalvar_component): Change args offset,
	bitpos, bitsize from int to LONGEST.  (value_primitive_field):
	Change arg offset from int to LONGEST; change locals bitpos,
	container_bitsize, boffset from int to LONGEST.  (value_fn_field):
	Change arg offset from int to LONGEST.  (unpack_bits_as_long):
	Change locals bytes_read, read_offset from int to LONGEST.
	(unpack_value_field_as_long): Change arg embedded_offset from int
	to LONGEST.  (unpack_value_bitfield): Change arg embedded_offset
	from int to LONGEST.  (value_field_bitfield): Change arg
	embedded_offset from int to LONGEST.  (modify_field): Change args
	bitpos and bitsize from int to LONGEST; change local bytesize from
	int to LONGEST; modify warning to use %lld rather than %d and cast
	corresponding arg to long long int.  (pack_long): Change local len
	from int to LONGEST.  (pack_usigned_long): Ditto.
	* value.h (value_bitsize, set_value_bitsize, value_bitpos)
	(set_value_bitpos, value_offset, set_value_offset)
	(value_pointed_to_offset, set_value_pointed_to_offset)
	(value_embedded_offset, set_value_embedded_offset)
	(valprint_check_validity, value_bits_synthetic_pointer)
	(value_bytes_available, value_bits_available)
	(mark_value_bytes_unavailable, mark_value_bits_unavailable)
	(read_value_memory, unpack_value_field_as_long, value_bitfield)
	(value_field_bitfield, value_contents_copy)
	(value_contents_copy_raw, value_primitive_field)
	(value_rtti_indirect_type, set_internalvar_component)
	(value_fn_field, modify_field, val_print): Modify prototypes to
	match new definitions.

gdb/testsuite/ChangeLog:

2014-11-18  David Taylor  <dtaylor@emc.com>

	* gdb.base/Makefile.in (EXECUTABLES): Add offsets to the list.
	* gdb.base/offsets.exp: New file.  Test large member offsets.
	* gdb.base/offsets.c: New file.  Used in testing large member
	offsets.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: RFA 0/2 fix for bug with large structure offsets
  2014-11-18 16:53 RFA 0/2 fix for bug with large structure offsets David Taylor
@ 2014-11-23 19:40 ` Jan Kratochvil
  2014-12-11 20:26 ` David Taylor
  2014-12-19  2:00 ` David Taylor
  2 siblings, 0 replies; 6+ messages in thread
From: Jan Kratochvil @ 2014-11-23 19:40 UTC (permalink / raw)
  To: David Taylor; +Cc: gdb-patches

Hi,

I have posted for this patchset:

https://sourceware.org/bugzilla/show_bug.cgi?id=17520#c1

Fedora carries for it the patchset:

http://pkgs.fedoraproject.org/cgit/gdb.git/tree/gdb-rhbz795424-bitpos-20of25.patch
http://pkgs.fedoraproject.org/cgit/gdb.git/tree/gdb-rhbz795424-bitpos-21of25.patch
http://pkgs.fedoraproject.org/cgit/gdb.git/tree/gdb-rhbz795424-bitpos-22of25.patch
http://pkgs.fedoraproject.org/cgit/gdb.git/tree/gdb-rhbz795424-bitpos-23of25.patch
http://pkgs.fedoraproject.org/cgit/gdb.git/tree/gdb-rhbz795424-bitpos-25of25-test.patch
http://pkgs.fedoraproject.org/cgit/gdb.git/tree/gdb-rhbz795424-bitpos-25of25.patch
http://pkgs.fedoraproject.org/cgit/gdb.git/tree/gdb-rhbz795424-bitpos-lazyvalue.patch

It was concluded that patching it before GDB is switched to C++ would be fragile as there cannot be done easy sanity checking if the inferior types width has not regressed.  With C++ one can wrap the offset types into sanity-checked classes with overriden operators.

But the GDB switch to C++ takes too many years.


Jan

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: RFA 0/2 fix for bug with large structure offsets
  2014-11-18 16:53 RFA 0/2 fix for bug with large structure offsets David Taylor
  2014-11-23 19:40 ` Jan Kratochvil
@ 2014-12-11 20:26 ` David Taylor
  2014-12-12  3:57   ` Yao Qi
  2014-12-19  2:00 ` David Taylor
  2 siblings, 1 reply; 6+ messages in thread
From: David Taylor @ 2014-12-11 20:26 UTC (permalink / raw)
  To: gdb-patches

Ping.

In the slightly over three weeks since I posted this and the two related
parts, I have seen only two replies off list, nothing on list.

This bug is affecting us and I'd like some version of a fix for it to go
in.  Any chance?

Thanks.

David Taylor <dtaylor@emc.com> wrote:

> The following is a fix for bug 17520 (structure offset wrong when 1/4 GB
> or greater).
> 
> Fixing this touched a lot of files.  The bulk of the changes can be
> summarized with one of two lines:
> 
>     Change <function arg> from int to LONGEST
> or
>     Change <local arg> from int to LONGEST.
> 
> Occasionally the last part is
> 
>     from unsigned int to ULONGEST
> or
>     from int * to LONGEST *.
> 
> As described in bug 17520, if you have a big structure, and try to get
> the address of a structure member that is 1/4 GB or more from the start
> of the structure, GDB will report the wrong value.  For example, if you
> have:
> 
> struct big_struct
> {
>   char first[0x10000000 + 16];
>   long second;
> } big_struct;
> 
> Then GDB will report an address for big_struct.second that is less than
> the address of the structure, big_struct.
> 
> GDB assumes that the *bit* offset of the member will fit into an int.
> Even in a 32-bit environment, that is not a safe assumption.
> 
> This patch changes it from int to LONGEST.
> 
> There are a couple of warning messages that are affected.  Since LONGEST
> is sometimes a long (LP64 environments) and sometimes a long long (ILP32
> environments), I chose to change the format from %d to %lld and cast the
> arg to long long.
> 
> There were no testsuite regressions on i686 GNU/Linux nor on x86-64
> GNU/Linux.
> 
> The bulk of the patch is in part 1.  Part 2 is just a trivial testsuite
> patch (a new test).  The git diffs are relative to the head of the trunk
> as of late last week.
> 
> Here are the ChangeLog entries.
> 
> gdb/ChangeLog:
> 
> 2014-11-18  David Taylor  <dtaylor@emc.com>
> 
>         * c-lang.h (cp_print_value_fields, cp_print_value_fields_rtti):
>         Modify prototypes to match new function definitions.
>         * c-valprint.c (c_value_print): Change local top from int to
>         LONGEST.
>         * cp-abi.c (baseclass_offset): Change embedded_offset from int to
>         LONGEST.  (value_rtti_type): Change top from int * to LONGEST *.
>         * cp-abi.h (value_rtti_type, baseclass_offset): Modify prototypes
>         to match new function definitions.
>         (struct cp_abi_ops): For field rtti_type, change type of arg top
>         from int * to LONGEST *.  For field baseclass_offset, change type
>         of arg embeeded_offset from int to LONGEST.
>         * cp-valprint.c (cp_print_value, cp_print_value_fields)
>         (cp_print_value_fields_rtti): Change type of function argument
>         offset from int to LONGEST.
>         (cp_print_value): Change locals thisoffset and boffset from int to
>         LONGEST.
>         * d-valprint.c (dynamic_array_type): Change local embedded_offset
>         from int to LONGEST.
>         * dwarf2loc.c (indirect_pieced_value): Change local bit_offset
>         from int to LONGEST.
>         * eval.c (evaluate_subexp_standard): Change local top from int to
>         LONGEST.
>         * extension-priv.h (struct extension_language_ops): For member
>         apply_val_pretty_printer, change type of arg embedded_offset from
>         int to LONGEST.
>         * extension.c (apply_ext_lang_val_pretty_printer): Change arg
>         embedded_offset from int to LONGEST.
>         * extension.h: Ditto.
>         * findvar.c (read_frame_register_value): Change types of offset
>         and reg_offset from int to LONGEST.
>         * gdbtypes.c (recursive_dump_type): In printfi_filtered call
>         change format for bitpos from %d to %lld and cast arg to long long
>         (arg is a LONGEST which could be either a long or a long long).
>         * gdbtypes.h (union field_location): Change member bitpos from int
>         to LONGEST.
>         * gnu-v2-abi.c (gnuv2_value_rtti_type): Change type of function
>         arg top from int * to LONGEST *.  (gnuv2_baseclass_offset): Change
>         type of arg embedded_offset from int to LONGEST; change local
>         field_offset from int to LONGEST.
>         * gnu-v3-abi.c (gnuv3_rtti_type): Change type of arg top_p from
>         int * to LONGEST *.  (gnuv3_baseclass_offset): Change type of arg
>         embedded_offset from int to LONGEST.
>         * go-valprint.c (print_go_string): Change type of arg
>         embedded_offset from int to LONGEST.
>         * scm-pretty-print.c (gdbscm_apply_val_pretty_printer): Change
>         type of arg embedded_offset from int to LONGEST.
>         * jv-valprint.c (java_print_value_fields): Change type of arg
>         offset from int to LONGEST.
>         * opencl-lang.c (lval_func_read): Change locals offset and elsize
>         from int to LONGEST.  (lval_func_write): Change type of locals
>         offset and elsize from int to LONGEST.
>         * p-lang.h (pascal_object_print_value_fields): Modify prototype to
>         match new function definition.
>         * p-valprint.c (pascal_object_print_value): Change type arg offset
>         from int to LONGEST; change locals boffset and thisoffset from int
>         to LONGEST. (pascal_object_print_value)
>         (pascal_object_print_value_fields): Change type arg offset from
>         int to LONGEST.
>         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Change
>         type of arg embedded_offset from int to LONGEST.
>         * python/python-internal.h (gdbpy_apply_val_pretty_printer):
>         Modify prototype to match new function definition.
>         * spu-tdep.c (spu_value_from_register): Change local len from int
>         to LONGEST.
>         * typeprint.c (whatis_exp): Change type of local top from int to
>         LONGEST.
>         * valarith.c (value_subscripted_rvalue): Change type of local
>         elt_offs from unsigned int to ULONGEST.
>         * valops.c (search_struct_method): Change type of arg offset from
>         int to LONGEST.  (find_method_list): Change type of offset from
>         int to LONGEST; change type of arg boffset from int * to
>         LONGEST *.  (value_cast_structs): Change type of local top from
>         int to LONGEST.  (dynamic_cast_check_1): Change type of arg
>         embedded_offset from int to LONGEST; change type of local offset
>         from int to LONGEST.  (dynamic_cast_check_2): Change type of arg
>         embedded_offset from int to LONGEST; change type of local offset
>         from int to LONGEST.  (value_dynamic_cast): Change type of local
>         top from int to LONGEST. (read_value_memory): Change type of arg
>         embedded_offset from int to LONGEST.  (value_assign): Change type
>         of local offset from int to LONGEST.  (value_arry): Change local
>         typelength from unsigned int to ULONGEST.  (update_search_result):
>         Change type of arg last_boffset from int * to
>         LONGEST *.  (do_search_struct_field): Change type of arg
>         last_boffset from int * to LONGEST *; change local new_offset from
>         int to LONGEST; change local boffset from int to
>         LONGEST.  (search_struct_field): Change local boffset from int to
>         LONGEST.  (seach_struct_method): Change arg offset from int to
>         LONGEST; change locals base_offset and this_offset from int to
>         LONGEST.  (find_method_list): Change arg offset from int to
>         LONGEST; change arg boffset from int * to LONGEST *; change local
>         base_offset from int to LONGEST.  (value_find_oload_method_list):
>         Change arg offset from int to LONGEST; change arg boffset from
>         int * to LONGEST *.  (find_overload_match): Change local boffset
>         from int to LONGEST.  (value_rtti_indirect_type): change arg top
>         from int * to LONGEST *.  (value_full_object): Change type of
>         local topt from int to LONGEST.
>         * valprint.c (valprint_check_validity): Change type of arg
>         embedded_offset from int to LONGEST.  (val_print): Ditto.
>         (val_print_scalar_formatted): Ditto.  (val_print_arry_elements):
>         Ditto.
>         * valprint.h (val_print_array_elements, val_print_scalar_formatted):
>         Modify prototypes to match new function definitions.
>         * value.c (struct range): Change members offset and length from
>         int to LONGEST.
>         (ranges_overlap): Change all args from int to LONGEST.
>         (ranges_contain): Change args offset and length from int to
>         LONGEST; change local i from int to LONGEST.
>         (struct value): Change members offset, bitsize, bitpos,
>         embedded_offset, and pointed_to_offset from int to LONGEST.
>         (value_bits_available): Change args offset and length from int to
>         LONGEST.
>         (value_bytes_available): Ditto.  (mark_value_bits_unavailable):
>         Ditto.  (mark_value_bytes_unavailable):
>         Ditto.  (find_first_range_overlap): Ditto.  (value_offset): Change
>         return type from int to LONGEST.  (set_value_offset): Change arg
>         offset from int to LONGEST.  (value_bitpos): Change return type
>         from int to LONGEST.  (set_value_bitpos): Change arg bit from int
>         to LONGEST.  (value_bitsize): Change return type from int to
>         LONGEST.  (set_value_bitsize): Change arg bit from int to LONGEST.
>         value_contents_copy_raw): Change args dst_offset, src_offset, and
>         length from int to LONGEST; change locals src_bit_offset,
>         dst_bit_offset, and bit_length from int to
>         LONGEST.  (value_contents_copy): Change args dst_offset,
>         src_offset, and length from int to
>         LONGEST.  (value_bits_synthetic_pointer): Change args offset and
>         length from int to LONGEST.  (value_embedded_offset); Change
>         return type from int to LONGEST.  (set_value_embedded_offset):
>         Change arg val from int to LONGEST.  (value_pointed_to_offset);
>         Change return type from int to
>         LONGEST.  (set_value_pointed_to_offset): Change arg val from int
>         to LONGEST.  (set_internalvar_component): Change args offset,
>         bitpos, bitsize from int to LONGEST.  (value_primitive_field):
>         Change arg offset from int to LONGEST; change locals bitpos,
>         container_bitsize, boffset from int to LONGEST.  (value_fn_field):
>         Change arg offset from int to LONGEST.  (unpack_bits_as_long):
>         Change locals bytes_read, read_offset from int to LONGEST.
>         (unpack_value_field_as_long): Change arg embedded_offset from int
>         to LONGEST.  (unpack_value_bitfield): Change arg embedded_offset
>         from int to LONGEST.  (value_field_bitfield): Change arg
>         embedded_offset from int to LONGEST.  (modify_field): Change args
>         bitpos and bitsize from int to LONGEST; change local bytesize from
>         int to LONGEST; modify warning to use %lld rather than %d and cast
>         corresponding arg to long long int.  (pack_long): Change local len
>         from int to LONGEST.  (pack_usigned_long): Ditto.
>         * value.h (value_bitsize, set_value_bitsize, value_bitpos)
>         (set_value_bitpos, value_offset, set_value_offset)
>         (value_pointed_to_offset, set_value_pointed_to_offset)
>         (value_embedded_offset, set_value_embedded_offset)
>         (valprint_check_validity, value_bits_synthetic_pointer)
>         (value_bytes_available, value_bits_available)
>         (mark_value_bytes_unavailable, mark_value_bits_unavailable)
>         (read_value_memory, unpack_value_field_as_long, value_bitfield)
>         (value_field_bitfield, value_contents_copy)
>         (value_contents_copy_raw, value_primitive_field)
>         (value_rtti_indirect_type, set_internalvar_component)
>         (value_fn_field, modify_field, val_print): Modify prototypes to
>         match new definitions.
> 
> gdb/testsuite/ChangeLog:
> 
> 2014-11-18  David Taylor  <dtaylor@emc.com>
> 
>         * gdb.base/Makefile.in (EXECUTABLES): Add offsets to the list.
>         * gdb.base/offsets.exp: New file.  Test large member offsets.
>         * gdb.base/offsets.c: New file.  Used in testing large member
>         offsets.
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: RFA 0/2 fix for bug with large structure offsets
  2014-12-11 20:26 ` David Taylor
@ 2014-12-12  3:57   ` Yao Qi
  2014-12-12 11:15     ` Pedro Alves
  0 siblings, 1 reply; 6+ messages in thread
From: Yao Qi @ 2014-12-12  3:57 UTC (permalink / raw)
  To: David Taylor; +Cc: gdb-patches

David Taylor <dtaylor@usendtaylorx2l.lss.emc.com> writes:

> In the slightly over three weeks since I posted this and the two related
> parts, I have seen only two replies off list, nothing on list.
>
> This bug is affecting us and I'd like some version of a fix for it to go
> in.  Any chance?

It is worried that we can't verify the type width change like this.
Personally, I don't see the point GDB-switch-to-C++ block the changes,
either from your patch or from Fedora GDB's patches, although I agree
that it is easier to do sanity check in C++.

If it is practical to turn on -Wconversion and people here agree to do
so, we can do it first to pave the way for your patch, and convince
people your patch is safe enough.  Last time I tried turning
-Wconversion on, it causes a huge number of warnings. :-/

-- 
Yao (齐尧)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: RFA 0/2 fix for bug with large structure offsets
  2014-12-12  3:57   ` Yao Qi
@ 2014-12-12 11:15     ` Pedro Alves
  0 siblings, 0 replies; 6+ messages in thread
From: Pedro Alves @ 2014-12-12 11:15 UTC (permalink / raw)
  To: Yao Qi, David Taylor; +Cc: gdb-patches

On 12/12/2014 03:56 AM, Yao Qi wrote:
> David Taylor <dtaylor@usendtaylorx2l.lss.emc.com> writes:
> 
>> In the slightly over three weeks since I posted this and the two related
>> parts, I have seen only two replies off list, nothing on list.
>>
>> This bug is affecting us and I'd like some version of a fix for it to go
>> in.  Any chance?
> 
> It is worried that we can't verify the type width change like this.

Hmm.  Is it really a big problem though?  What's the worse failure mode if we
miss converting some code path?  It seems that even if that happens, we won't
be worse than today?

> Personally, I don't see the point GDB-switch-to-C++ block the changes,
> either from your patch or from Fedora GDB's patches, although I agree
> that it is easier to do sanity check in C++.

Agreed.

> If it is practical to turn on -Wconversion and people here agree to do
> so, we can do it first to pave the way for your patch, and convince
> people your patch is safe enough.  Last time I tried turning
> -Wconversion on, it causes a huge number of warnings. :-/

I'm not even sure it makes sense to have -Wconversion (or its variants)
block this?

If we agree on the types to use, then it seems to me it's more
useful to push the patches in than hold them up.

Thanks,
Pedro Alves

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: RFA 0/2 fix for bug with large structure offsets
  2014-11-18 16:53 RFA 0/2 fix for bug with large structure offsets David Taylor
  2014-11-23 19:40 ` Jan Kratochvil
  2014-12-11 20:26 ` David Taylor
@ 2014-12-19  2:00 ` David Taylor
  2 siblings, 0 replies; 6+ messages in thread
From: David Taylor @ 2014-12-19  2:00 UTC (permalink / raw)
  Cc: gdb-patches

At the request of Joel Brobecker, I have resubmitted this as a single
part rather than multiple pats.  Additionally, I have used git
format-patch to hopefully produce something more palatable.

Some of the files in question have changed since I originally submitted
the patch.  The new patch is relative to the head of the trunk as of
earlier today.  I reran the testsuite on my x86-64 GNU/Linux desktop and
there were no regressions.

If it is still not quite in the right format, please let me know and I
will try again.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-12-19  2:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-18 16:53 RFA 0/2 fix for bug with large structure offsets David Taylor
2014-11-23 19:40 ` Jan Kratochvil
2014-12-11 20:26 ` David Taylor
2014-12-12  3:57   ` Yao Qi
2014-12-12 11:15     ` Pedro Alves
2014-12-19  2:00 ` David Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).