From bba66b87eff7244120daed405cf524916e1652a4 Mon Sep 17 00:00:00 2001 From: Doug Evans Date: Thu, 5 Nov 2009 21:17:00 +0000 Subject: [PATCH] * amd64-tdep.c (amd64_init_frame_cache): Enhance comment describing saved_regs. --- gdb/ChangeLog | 5 +++++ gdb/amd64-tdep.c | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index b30cb8c9654..659e9d12a6a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2009-11-05 Doug Evans + + * amd64-tdep.c (amd64_init_frame_cache): Enhance comment describing + saved_regs. + 2009-11-05 Daniel Jacobowitz * top.c (execute_command): Select a frame before checking the current diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c index 51560cf3382..b47c4c3160d 100644 --- a/gdb/amd64-tdep.c +++ b/gdb/amd64-tdep.c @@ -1402,7 +1402,10 @@ amd64_init_frame_cache (struct amd64_frame_cache *cache) 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; -- 2.30.2