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 4/5] New port: CR16: gdbserver


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


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