This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA 4/5] New port: CR16: gdbserver
- From: Pedro Alves <palves at redhat dot com>
- To: Kaushik Phatak <Kaushik dot Phatak at kpitcummins dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Tue, 25 Jun 2013 19:42:19 +0100
- Subject: Re: [RFA 4/5] New port: CR16: gdbserver
- References: <C6CA53A2A46BA7469348BDBD663AB65845B2FF84 at KCHJEXMB03 dot kpit dot com> <50CB742E dot 9090506 at redhat dot com> <C6CA53A2A46BA7469348BDBD663AB65848564536 at KCHJEXMB02 dot kpit dot com> <50F97ABF dot 4060203 at redhat dot com> <C6CA53A2A46BA7469348BDBD663AB65848577553 at KCHJEXMB02 dot kpit <50FEAAB2 dot 9090903 at redhat dot com> <C6CA53A2A46BA7469348BDBD663AB65848578991 at KCHJEXMB02 dot kpit dot com> <50FFE596 dot 20303 at redhat dot com> <C6CA53A2A46BA7469348BDBD663AB65848578A02 at KCHJEXMB02 dot kpit dot com> <50FFF730 dot 9050108 at redhat dot com> <C6CA53A2A46BA7469348BDBD663AB6585308FA32 at KCHJEXMB02 dot kpit dot com>
On 06/19/2013 02:28 PM, Kaushik Phatak wrote:
> The below gdbserver port has following changes,
> 1. Remove register pair access over remote protocol in the .dat file.
> This allows for matching of the register numbers in the gdbserver with those
> in linux-tdep.c. This was done by simplifying the PTRACE_GETREGS inside kernel
> to read single registers.
> 2. Remove support for "r0r1_orig" register. This is a kernel internal register
> and need not be user visible.
> 3. Set cr16_num_regs to 20 and PC_REGNUM to 16. This will now match the gdb port.
> 4. Add registers pc,usp,ra to the "expedite" set.
> 5. Move the ptrace macro defines like PT_TEXT_ADDR from linux-low.c to the kernel's
> ptrace.h
I'm not clear on point #2, but the rest sounds excellent. Thanks!
> +
> +/* We only place breakpoints in empty marker functions, and thread locking
> + is outside of the function. So rather than importing software single-step,
> + we can just run until exit. */
> +static CORE_ADDR
Add empty line between describing comment and function definition.
> +cr16_reinsert_addr (void)
> +{
> + struct regcache *regcache = get_thread_regcache (current_inferior, 1);
> + unsigned long pc;
> +
> + /* R14/Ra is return address register */
"... is the return ..."
Other than that, this looks good.
--
Pedro Alves