This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] Fix avr issues: handle 'next' and avr6


> 2009-05-26  Tristan Gingold  <gingold@adacore.com>
> 
> 	* avr-tdep.c (struct gdbarch_tdep): Replace the unused field with
> 	call_length field.
> 	(avr_register_name): Add const to register_names.
> 	(avr_scan_arg_moves): Move inside avr_scan_prologue.
> 	(avr_scan_prologue): Add pc_end argument.
> 	Only read prologue bytes that can be read.
> 	Limit the scan to the known prologue length.
> 	Makes pattern variables static and const.
> 	Fix indentation.
> 	(avr_skip_prologue): Pass func_end argument to avr_scan_prologue.
> 	Fix indentation.
> 	(avr_breakpoint_from_pc): Contify avr_break_insn.
> 	(avr_extract_return_value): Fix function comment.
> 	(avr_frame_unwind_cache): Fix GNU style violations.
> 	Pass current_pc argument to avr_scan_prologue to stop prologue
> 	analysis to the current pc.  This fixes the bug with the 'next'
> 	command.
> 	Correctly set the SP register of the previous frame (use call_length).
> 	(avr_frame_prev_register): Fix indentation.
> 	Correctly read PC from the stack on avr6 architectures.
> 	(avr_push_dummy_call): Fix indentation.
> 	(avr_gdbarch_init): Set call_length according to the architecture.

I'm going to trust you on the AVR bits since I know nothing of this
chip, but the code itself looks good. For avr_skip_prologue, I might
have named the parameters start_pc rather than pc_beg is the former
is more commonly used, or I even might have left it as "pc" (I'm used
to seeing "pc/current_pc" being used), but that's not important.

OK.

-- 
Joel


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]