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: [RFA] Dwarf2 fix


Andreas Jaeger wrote:
> thanks for the explanation.  I wanted to see a comment in the code...

I see :-))

static void
context_cpy (struct context *dst, struct context *src)
{
   int regs_size = sizeof (struct context_reg) * NUM_REGS;
   struct context_reg *dreg;

   /* Save a pointer to an already allocated dst->reg
      before overriding dst by src.  */
   dreg = dst->reg;
   *dst = *src;
   dst->reg = dreg;

   memcpy (dst->reg, src->reg, regs_size);
}

Better now? ;-)

Michal Ludvig
-- 
* SuSE CR, s.r.o     * mludvig@suse.cz
* +420 2 9654 5373   * http://www.suse.cz


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