aboutsummaryrefslogtreecommitdiff
path: root/gdb/avr-tdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/avr-tdep.c')
-rw-r--r--gdb/avr-tdep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c
index df1ffdd..e9d5996 100644
--- a/gdb/avr-tdep.c
+++ b/gdb/avr-tdep.c
@@ -486,7 +486,7 @@ avr_scan_prologue (struct frame_info *fi)
frame pointer, adjust the stack pointer, and save registers. */
get_frame_extra_info (fi)->framesize = 0;
- prologue_len = prologue_end - prologue_start;
+ prologue_len = min (prologue_end - prologue_start, AVR_MAX_PROLOGUE_SIZE);
read_memory (prologue_start, prologue, prologue_len);
/* Scanning main()'s prologue