This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA/m32r] Fix m32r frame analyzer
- From: Andrew Cagney <cagney at gnu dot org>
- To: Kei Sakamoto <sakamoto dot kei at renesas dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Wed, 06 Oct 2004 13:23:40 -0400
- Subject: Re: [RFA/m32r] Fix m32r frame analyzer
- References: <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