This is the mail archive of the
mailing list for the GDB project.
Re: [PATCH] Activate extract_struct_value_address for SPARC and UltraSPARC
- From: Andrew Cagney <cagney at gnu dot org>
- To: Mark Kettenis <kettenis at chello dot nl>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Sun, 11 Jan 2004 16:12:34 -0500
- Subject: Re: [PATCH] Activate extract_struct_value_address for SPARC and UltraSPARC
- References: <200401112048.i0BKm0rv004191@elgar.kettenis.dyndns.org>
Andrews -Wunused-function message pointed out that this wasn't hooked
up. So some of my previous patches were absolutely useless. Anyway,
this corrects the problem, and hooks things up. No regressions in
structs.exp on NetBSD/sparc and FreeBSD/sparc64.
+ (gdbarch, sparc32_extract_struct_value_address);
Is this one ever called?
+/* Extract from REGCACHE, which contains the (raw) register state, the
+ address in which a function should return its structure value, as a
+ CORE_ADDR. */
+sparc64_extract_struct_value_address (struct regcache *regcache)
+ ULONGEST addr;
+ regcache_cooked_read_unsigned (regcache, SPARC_O0_REGNUM, &addr);
+ return addr;
and does this work reliably?