Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Christophe LYON <christophe.lyon@st.com>
To: gdb-patches@sources.redhat.com
Subject: Re: [RFC] add offset support to DWARF2_FRAME_REG_CFA
Date: Fri, 25 Nov 2005 17:54:00 -0000	[thread overview]
Message-ID: <43871694.3050200@st.com> (raw)
In-Reply-To: <200511242237.jAOMbpxi014472@elgar.sibelius.xs4all.nl>


> Thanks!  You seemed to have forgotten about my suggestion to introduce
> DWARF2_FRAME_REG_CFA_OFFSET.  The problem is that as-is, your patch
> seems to break sparc64 and cris.  By introducing
> DWARF2_FRAME_CFA_OFFSET all existing code will be safe.
> 

I see.

So here is an updated patch.

Is it OK now?

Thanks,

Christophe.


2005-11-25    Christophe Lyon <christophe.lyon@st.com>

     * dwarf2-frame.c: (dwarf2_frame_prev_register): handle 
DWARF2_FRAME_REG_CFA_OFFSET
     * dwarf2-frame.h: add DWARF2_FRAME_REG_CFA_OFFSET
  to enum dwarf2_frame_reg_rule

Index: dwarf2-frame.c
===================================================================
--- dwarf2-frame.c	(revision 96)
+++ dwarf2-frame.c	(working copy)
@@ -918,6 +921,19 @@
  	}
        break;

+    case DWARF2_FRAME_REG_CFA_OFFSET:
+      *optimizedp = 0;
+      *lvalp = not_lval;
+      *addrp = 0;
+      *realnump = -1;
+      if (valuep)
+	{
+	  /* Store the value.  */
+	  store_typed_address (valuep, builtin_type_void_data_ptr,
+			       cache->cfa + cache->reg[regnum].loc.offset);
+	}
+      break;
+
      case DWARF2_FRAME_REG_RA_OFFSET:
        *optimizedp = 0;
        *lvalp = not_lval;

Index: dwarf2-frame.h
===================================================================
--- dwarf2-frame.h	(revision 96)
+++ dwarf2-frame.h	(working copy)
@@ -55,7 +55,8 @@
       used internally by GDB.  */
    DWARF2_FRAME_REG_RA,		/* Return Address.  */
    DWARF2_FRAME_REG_RA_OFFSET,	/* Return Address with offset.  */
-  DWARF2_FRAME_REG_CFA		/* Call Frame Address.  */
+  DWARF2_FRAME_REG_CFA,	/* Call Frame Address.  */
+  DWARF2_FRAME_REG_CFA_OFFSET	/* Call Frame Address with offset.  */
  };

  /* Register state.  */


  reply	other threads:[~2005-11-25 13:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-22 17:07 Christophe LYON
2005-11-22 19:32 ` Mark Kettenis
2005-11-23 15:59   ` Christophe LYON
2005-11-25  8:27     ` Mark Kettenis
2005-11-25 17:54       ` Christophe LYON [this message]
2005-11-25 17:57         ` M.M. Kettenis
2005-11-25 18:25         ` Daniel Jacobowitz
2005-11-28 21:32           ` Christophe LYON
2005-11-25 18:17       ` Daniel Jacobowitz

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=43871694.3050200@st.com \
    --to=christophe.lyon@st.com \
    --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