- get_frame_extra_info (fi)->framereg = AVR_SP_REGNUM;
-
- if (find_pc_partial_function
- (get_frame_pc (fi), &name, &prologue_start, &prologue_end))
- {
- struct symtab_and_line sal = find_pc_line (prologue_start, 0);
-
- if (sal.line == 0) /* no line info, use current PC */
- prologue_end = get_frame_pc (fi);
- else if (sal.end < prologue_end) /* next line begins after fn end */
- prologue_end = sal.end; /* (probably means no prologue) */
- }
- else
- /* We're in the boondocks: allow for */
- /* 19 pushes, an add, and "mv fp,sp" */
- prologue_end = prologue_start + AVR_MAX_PROLOGUE_SIZE;
-
- prologue_end = min (prologue_end, get_frame_pc (fi));
-
- /* Search the prologue looking for instructions that set up the
- frame pointer, adjust the stack pointer, and save registers. */
-
- get_frame_extra_info (fi)->framesize = 0;
- prologue_len = min (prologue_end - prologue_start, AVR_MAX_PROLOGUE_SIZE);
- read_memory (prologue_start, prologue, prologue_len);
+ /* FIXME: TRoth/2003-06-11: This could be made more efficient by only
+ reading in the bytes of the prologue. The problem is that the figuring
+ out where the end of the prologue is is a bit difficult. The old code
+ tried to do that, but failed quite often. */
+ read_memory (pc, prologue, AVR_MAX_PROLOGUE_SIZE);