This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[patch] enhance saved_regs comment in amd64-tdep.c
- From: dje at google dot com (Doug Evans)
- To: gdb-patches at sourceware dot org
- Date: Tue, 20 Oct 2009 12:01:52 -0700 (PDT)
- Subject: [patch] enhance saved_regs comment in amd64-tdep.c
Hi.
I'll check this in in a couple of days if there are no objections.
2009-10-20 Doug Evans <dje@google.com>
* amd64-tdep.c (amd64_init_frame_cache): Enhance comment describing
saved_regs.
Index: amd64-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/amd64-tdep.c,v
retrieving revision 1.65
diff -u -p -r1.65 amd64-tdep.c
--- amd64-tdep.c 17 Aug 2009 18:23:45 -0000 1.65
+++ amd64-tdep.c 20 Oct 2009 18:59:54 -0000
@@ -1402,7 +1402,10 @@ amd64_init_frame_cache (struct amd64_fra
cache->pc = 0;
/* Saved registers. We initialize these to -1 since zero is a valid
- offset (that's where %rbp is supposed to be stored). */
+ offset (that's where %rbp is supposed to be stored).
+ The values start out as being offsets, and are later converted to
+ addresses (at which point -1 is interpreted as an address, still meaning
+ "invalid"). */
for (i = 0; i < AMD64_NUM_SAVED_REGS; i++)
cache->saved_regs[i] = -1;
cache->saved_sp = 0;