public inbox for gdb-testers@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Add casts for legitimate integer to enum conversions
@ 2015-08-06 21:34 sergiodj+buildbot
  2015-08-06 21:34 ` Failures on Debian-s390x-native-gdbserver-m64, branch master sergiodj+buildbot
                   ` (16 more replies)
  0 siblings, 17 replies; 18+ messages in thread
From: sergiodj+buildbot @ 2015-08-06 21:34 UTC (permalink / raw)
  To: gdb-testers

*** TEST RESULTS FOR COMMIT aead7601eb0ddc3fa51d43747bdad0e02abda342 ***

Author: Simon Marchi <simon.marchi@ericsson.com>
Branch: master
Commit: aead7601eb0ddc3fa51d43747bdad0e02abda342

Add casts for legitimate integer to enum conversions
This patch is mostly extracted from Pedro's C++ branch.  It adds explicit
casts from integer to enum types, where it is really the intention to do
so.  This could be because we are ...

 * iterating on enum values (we need to iterate on an equivalent integer)
 * converting from a value read from bytes (dwarf attribute, agent
 expression opcode) to the equivalent enum
 * reading the equivalent integer value from another language (Python/Guile)

An exception to that is the casts in regcache.c.  It seems to me like
struct regcache's register_status field could be a pointer to an array of
enum register_status.  Doing so would waste a bit of memory (4 bytes
used by the enum vs 1 byte used by the current signed char, for each
register).  If we switch to C++11 one day, we can define the underlying
type of an enum type, so we could have the best of both worlds.

gdb/ChangeLog:

	* arm-tdep.c (set_fp_model_sfunc): Add cast from integer to enum.
	(arm_set_abi): Likewise.
	* ax-general.c (ax_print): Likewise.
	* c-exp.y (exp : string_exp): Likewise.
	* compile/compile-loc2c.c (compute_stack_depth_worker): Likewise.
	(do_compile_dwarf_expr_to_c): Likewise.
	* cp-name-parser.y (demangler_special : DEMANGLER_SPECIAL start):
	Likewise.
	* dwarf2expr.c (execute_stack_op): Likewise.
	* dwarf2loc.c (dwarf2_compile_expr_to_ax): Likewise.
	(disassemble_dwarf_expression): Likewise.
	* dwarf2read.c (dwarf2_add_member_fn): Likewise.
	(read_array_order): Likewise.
	(abbrev_table_read_table): Likewise.
	(read_attribute_value): Likewise.
	(skip_unknown_opcode): Likewise.
	(dwarf_decode_macro_bytes): Likewise.
	(dwarf_decode_macros): Likewise.
	* eval.c (value_f90_subarray): Likewise.
	* guile/scm-param.c (gdbscm_make_parameter): Likewise.
	* i386-linux-tdep.c (i386_canonicalize_syscall): Likewise.
	* infrun.c (handle_command): Likewise.
	* memory-map.c (memory_map_start_memory): Likewise.
	* osabi.c (set_osabi): Likewise.
	* parse.c (operator_length_standard): Likewise.
	* ppc-linux-tdep.c (ppc_canonicalize_syscall): Likewise, and use
	single return point.
	* python/py-frame.c (gdbpy_frame_stop_reason_string): Likewise.
	* python/py-symbol.c (gdbpy_lookup_symbol): Likewise.
	(gdbpy_lookup_global_symbol): Likewise.
	* record-full.c (record_full_restore): Likewise.
	* regcache.c (regcache_register_status): Likewise.
	(regcache_raw_read): Likewise.
	(regcache_cooked_read): Likewise.
	* rs6000-tdep.c (powerpc_set_vector_abi): Likewise.
	* symtab.c (initialize_ordinary_address_classes): Likewise.
	* target-debug.h (target_debug_print_signals): Likewise.
	* utils.c (do_restore_current_language): Likewise.


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

end of thread, other threads:[~2015-08-12  7:32 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-06 21:34 [binutils-gdb] Add casts for legitimate integer to enum conversions sergiodj+buildbot
2015-08-06 21:34 ` Failures on Debian-s390x-native-gdbserver-m64, branch master sergiodj+buildbot
2015-08-06 21:38 ` Failures on Fedora-i686, " sergiodj+buildbot
2015-08-06 21:39 ` Failures on Fedora-x86_64-m32, " sergiodj+buildbot
2015-08-06 21:42 ` Failures on Fedora-x86_64-native-extended-gdbserver-m32, " sergiodj+buildbot
2015-08-06 21:52 ` Failures on Fedora-s390x-m64, " sergiodj+buildbot
2015-08-06 21:52 ` Failures on Fedora-x86_64-native-gdbserver-m64, " sergiodj+buildbot
2015-08-06 21:54 ` Failures on AIX-POWER7-plain, " sergiodj+buildbot
2015-08-07 13:28 ` Failures on Fedora-ppc64be-cc-with-index, " sergiodj+buildbot
2015-08-07 13:48 ` Failures on Fedora-ppc64be-m64, " sergiodj+buildbot
2015-08-07 14:04 ` Failures on Fedora-ppc64be-native-gdbserver-m64, " sergiodj+buildbot
2015-08-07 14:22 ` Failures on Fedora-ppc64be-native-extended-gdbserver-m64, " sergiodj+buildbot
2015-08-07 19:47 ` Failures on Debian-x86_64-m64, " sergiodj+buildbot
2015-08-07 20:31 ` Failures on Fedora-ppc64le-native-extended-gdbserver-m64, " sergiodj+buildbot
2015-08-07 21:07 ` Failures on Fedora-ppc64le-native-gdbserver-m64, " sergiodj+buildbot
2015-08-08  4:24 ` Failures on Debian-i686, " sergiodj+buildbot
2015-08-08  6:59 ` Failures on Debian-i686-native-extended-gdbserver, " sergiodj+buildbot
2015-08-12  7:32 ` Failures on Debian-MIPS-m64, " sergiodj+buildbot

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).