Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Alexandre Oliva <aoliva@redhat.com>
To: gdb-patches@sources.redhat.com
Subject: mn10300: skip movm checks if PC is on movm
Date: Wed, 02 Jun 2004 21:50:00 -0000	[thread overview]
Message-ID: <orllj5sk7g.fsf@free.redhat.lsd.ic.unicamp.br> (raw)

[-- Attachment #1: Type: text/plain, Size: 284 bytes --]

When we attempt to set up a frame while PC is on the initial movm
instruction of a function, and then read the saved PC from it, we get
the wrong value, because we fail to disregard the offsets introduced
by movm, that hasn't run yet.  This patch fixes this problem.  Ok to
install?


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: mn10300-gdb-pc-on-movm.patch --]
[-- Type: text/x-patch, Size: 783 bytes --]

Index: gdb/ChangeLog
from  Alexandre Oliva  <aoliva@redhat.com>

	* mn10300-tdep.c (mn10300_analyze_prologue): Don't compute saved
	regs if PC is on movm.

Index: gdb/mn10300-tdep.c
===================================================================
RCS file: /cvs/uberbaum/gdb/mn10300-tdep.c,v
retrieving revision 1.105
diff -u -p -r1.105 mn10300-tdep.c
--- gdb/mn10300-tdep.c 8 May 2004 22:19:30 -0000 1.105
+++ gdb/mn10300-tdep.c 2 Jun 2004 21:46:41 -0000
@@ -457,8 +457,8 @@ mn10300_analyze_prologue (struct frame_i
   addr = func_addr;
 
   /* Suck in two bytes.  */
-  status = read_memory_nobpt (addr, buf, 2);
-  if (status != 0)
+  if (addr + 2 >= stop
+      || (status = read_memory_nobpt (addr, buf, 2)) != 0)
     {
       fix_frame_pointer (fi, 0);
       return addr;

[-- Attachment #3: Type: text/plain, Size: 188 bytes --]


-- 
Alexandre Oliva             http://www.ic.unicamp.br/~oliva/
Red Hat Compiler Engineer   aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist  oliva@{lsd.ic.unicamp.br, gnu.org}

             reply	other threads:[~2004-06-02 21:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-02 21:50 Alexandre Oliva [this message]
2004-06-07 15:24 ` 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=orllj5sk7g.fsf@free.redhat.lsd.ic.unicamp.br \
    --to=aoliva@redhat.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