This is the mail archive of the
mailing list for the GDB project.
Re: [RFA] Fix avr issues: handle 'next' and avr6
- From: Tristan Gingold <gingold at adacore dot com>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: gdb-patches at sourceware dot org, Eric Weddington <eweddington at cso dot atmel dot com>
- Date: Tue, 16 Jun 2009 11:22:36 +0200
- Subject: Re: [RFA] Fix avr issues: handle 'next' and avr6
- References: <20090526122205.GA29886@chinon.act-europe.fr> <20090611153255.GH25703@adacore.com>
On Jun 11, 2009, at 5:32 PM, Joel Brobecker wrote:
2009-05-26 Tristan Gingold <email@example.com>
* avr-tdep.c (struct gdbarch_tdep): Replace the unused field with
(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.
(avr_skip_prologue): Pass func_end argument to avr_scan_prologue.
(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'
Correctly set the SP register of the previous frame (use
(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.
I will do the renaming in the next patch.