This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

Re: [debug/13267] proposed patch to dwarf2out.c


DJ Delorie wrote:
	* dwarf2out.c (add_location_or_const_value_attribute): Adjust
	for when a variable is stored in a larger-sized memory
	location.

Just grepping dwarf2out.c for BYTES_BIG_ENDIAN, I see that there is already big-endian correction code in rtl_for_decl_location, and the rtl you are trying to fix was generated by rtl_for_decl_location. So it appears that the real problem here is in rtl_for_decl_location, not in add_location_or_const_value_attribute.


The rtl_for_decl_location code incidentally shows a much better way of doing this, by calling plus_constant.

Maybe the problem is that offset is based on UNITS_PER_WORD instead of on the rtl mode size?

By full testsuite, I hope you mean the gdb one in addition to the gcc one. Running the gdb testsuite is necessary to test changes to debugging output.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com



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