This is the mail archive of the gdb-patches@sourceware.org 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] enhance saved_regs comment in amd64-tdep.c


> Date: Tue, 20 Oct 2009 12:01:52 -0700 (PDT)
> From: dje@google.com (Doug Evans)
> 
> 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.

Probably clarifies things, so ok with me.

> 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;
> 


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