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]

[PATCH] Undeprecation for AMD64


This also fixes a bug; The register number `1' was overlooked when the
registers were re-ordered, so %rdx became %rbx.

Mark


Index: ChangeLog
from  Mark Kettenis  <kettenis@gnu.org>

	* x86-64-tdep.c (x86_64_store_return_value): Don't use
	DEPRECATED_REGISTER_RAW_SIZE.  Use symbolic names for register
	names for return values.  This fixes a bug since we looked at %rbx
	instead of %rdx.

Index: x86-64-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/x86-64-tdep.c,v
retrieving revision 1.97
diff -u -p -r1.97 x86-64-tdep.c
--- x86-64-tdep.c 5 Oct 2003 22:02:49 -0000 1.97
+++ x86-64-tdep.c 5 Oct 2003 22:08:09 -0000
@@ -796,8 +796,8 @@ x86_64_store_return_value (struct type *
   /* XXX: What about complex floating point types?  */
   else
     {
-      int low_size = DEPRECATED_REGISTER_RAW_SIZE (0);
-      int high_size = DEPRECATED_REGISTER_RAW_SIZE (1);
+      int low_size = register_size (current_gdbarch, X86_64_RAX_REGNUM);
+      int high_size = register_size (current_gdbarch, X86_64_RDX_REGNUM);
 
       if (len <= low_size)
         regcache_cooked_write_part (regcache, 0, 0, len, valbuf);


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