[RFA/m32r] Fix m32r frame analyzer
Wed Oct 6 17:24:00 GMT 2004
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);
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.
More information about the Gdb-patches