This is the mail archive of the gdb-patches@sources.redhat.com 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]

Re: [PATCH] Activate extract_struct_value_address for SPARC and UltraSPARC


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.

Um,


+  set_gdbarch_extract_struct_value_address
+    (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.  */
+
+static 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?


Andrew



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