This is the mail archive of the gdb-testers@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] scm-symbol.c: Add (domain_enum) casts


*** TEST RESULTS FOR COMMIT 74ef968fbaab0bd52335314abdb3e0eb04020fb1 ***

Author: Simon Marchi <simon.marchi@polymtl.ca>
Branch: master
Commit: 74ef968fbaab0bd52335314abdb3e0eb04020fb1

scm-symbol.c: Add (domain_enum) casts

We currently pass integers as domain_enums to lookup_symbol.  The
most obvious fix is to add casts there.

I first thought of changing the type of the domain variables to
domain_enum.  However, because we pass a pointer to them to
gdbscm_parse_function_args, which expects them to be integers (because
of the format string), I don't think it would be correct.  If the enum
does not have the same size as an int, gdbscm_parse_function_args could
write past the memory of domain, overwriting something else on the
stack.

gdb/ChangeLog:

	* guile/scm-symbol.c (gdbscm_lookup_global_symbol): Add
	domain_enum cast.
	(gdbscm_lookup_symbol): Likewise.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]