Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Michal Ludvig <mludvig@suse.cz>
To: gdb-patches@sources.redhat.com
Subject: [RFA] Dwarf2 fix
Date: Mon, 13 May 2002 09:31:00 -0000	[thread overview]
Message-ID: <3CDFEA7C.7050104@suse.cz> (raw)

Hi all,
this simple patch mysteriously solves problems that we have had on 
x86-64 with stack unwinding. Can I commit? I believe so :-)

2002-05-13  Michal Ludvig  <mludvig@suse.cz>
         * dwarf2cfi.c (context_cpy): Copy registers correctly.
         (update_context): Use __func__ in notes.

Index: dwarf2cfi.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2cfi.c,v
retrieving revision 1.4
diff -c -3 -p -r1.4 dwarf2cfi.c
*** dwarf2cfi.c 7 May 2002 11:22:54 -0000       1.4
--- dwarf2cfi.c 13 May 2002 16:24:00 -0000
*************** static void
*** 318,325 ****
--- 318,329 ----
   context_cpy (struct context *dst, struct context *src)
   {
     int regs_size = sizeof (struct context_reg) * NUM_REGS;
+   struct context_reg *dreg;

+   dreg = dst->reg;
     *dst = *src;
+   dst->reg = dreg;
+
     memcpy (dst->reg, src->reg, regs_size);
   }
   ^L
*************** update_context (struct context *context,
*** 1301,1307 ****
               orig_context->reg[fs->regs.reg[i].loc.reg].loc.addr;
           default:
             internal_error (__FILE__, __LINE__,
!              "cfi_update_context: unknown register rule");
           }
         break;
         case REG_SAVED_EXP:
--- 1305,1311 ----
               orig_context->reg[fs->regs.reg[i].loc.reg].loc.addr;
           default:
             internal_error (__FILE__, __LINE__,
!              "%s: unknown register rule", __func__);
           }
         break;
         case REG_SAVED_EXP:
*************** update_context (struct context *context,
*** 1319,1326 ****
         break;
         default:
         internal_error (__FILE__, __LINE__,
!          "cfi_update_context: unknown register rule");
!
         }
     get_reg ((char *) &context->ra, context, fs->retaddr_column);
     unwind_tmp_obstack_free ();
--- 1323,1329 ----
         break;
         default:
         internal_error (__FILE__, __LINE__,
!          "%s: unknown register rule", __func__);
         }
     get_reg ((char *) &context->ra, context, fs->retaddr_column);
     unwind_tmp_obstack_free ();


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


             reply	other threads:[~2002-05-13 16:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-13  9:31 Michal Ludvig [this message]
2002-05-13  9:43 ` Andreas Jaeger
2002-05-13 10:04   ` Michal Ludvig
2002-05-13 10:21     ` Andreas Jaeger
2002-05-13 10:32       ` Michal Ludvig
2002-05-13 14:10         ` Andrew Cagney
2002-05-14  3:02           ` Michal Ludvig
2002-05-23 19:29   ` Andrew Cagney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3CDFEA7C.7050104@suse.cz \
    --to=mludvig@suse.cz \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox