Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <cagney@gnu.org>
To: Kei Sakamoto <sakamoto.kei@renesas.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFA/m32r] Fix m32r  frame analyzer
Date: Wed, 06 Oct 2004 17:24:00 -0000	[thread overview]
Message-ID: <41642A1C.2010603@gnu.org> (raw)
In-Reply-To: <046601c4aac3$eda73740$5169910a@E5A02646>

     }
   else
     func_end = pc + DEFAULT_SEARCH_LIMIT;
-  decode_prologue (pc, func_end, &sal.end);
+
+  /* If pc's location is not readable, just quit. */
+  if (!safe_read_memory_integer (pc, 4, &return_value))
+    return 0;
+
+  decode_prologue (pc, func_end, &sal.end, NULL);
   return sal.end;
 }

The save_read_memory will need to be in decode_prologue and applied to
every memory read as a fetch of PC+/-4 could equally fail.  That means
more interface changes to decode_prologue (return success/fail?).

On fail, it should also return the old PC and not zero - look at
find_function_start_sal for why.

If you make those changes, you can commit.

Andrew



  reply	other threads:[~2004-10-06 17:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-05 10:13 Kei Sakamoto
2004-10-06 17:24 ` Andrew Cagney [this message]
2004-10-07  1:26   ` Kei Sakamoto

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=41642A1C.2010603@gnu.org \
    --to=cagney@gnu.org \
    --cc=gdb-patches@sources.redhat.com \
    --cc=sakamoto.kei@renesas.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