This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA 6/8] New port: TI C6x: gdbserver
- From: Pedro Alves <pedro at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Cc: Yao Qi <yao at codesourcery dot com>
- Date: Wed, 20 Jul 2011 18:55:08 +0100
- Subject: Re: [RFA 6/8] New port: TI C6x: gdbserver
- References: <4E2638CE.7050205@codesourcery.com>
On Wednesday 20 July 2011 03:09:18, Yao Qi wrote:
> +static CORE_ADDR
> +tic6x_get_pc (struct regcache *regcache)
> +{
> + union tic6x_register pc;
> + collect_register_by_name (regcache, "PC", pc.buf);
Empty line missing after declaration. At least one more instance.
> +int *tic6x_regmap;
> +
...
> +unsigned int tic6x_breakpoint;
Could be static?
> s390-linux32-expedite = r14,r15,pswa
> s390-linux64-expedite = r14l,r15l,pswa
> s390x-linux64-expedite = r14,r15,pswa
> +tic6x-linux-expedite = A15,PC
Stupid question: is there a reason all register
names are all caps in C6x?
> +++ b/gdb/features/tic6x-linux.xml
> @@ -0,0 +1,12 @@
> +<?xml version="1.0"?>
> +<!-- Copyright (C) 2010, 2011 Free Software Foundation, Inc.
> +
> + Copying and distribution of this file, with or without modification,
> + are permitted in any medium without royalty provided the copyright
> + notice and this notice are preserved. -->
> +
> +<!DOCTYPE target SYSTEM "gdb-target.dtd">
> +<target>
> + <architecture>tic6x</architecture>
Since this is for linux only, add:
<osabi>GNU/Linux</osabi>
> + <xi:include href="tic6x-cpu.xml"/>
> +</target>
> +#elif defined(__TMS320C6X__)
> +#define PT_TEXT_ADDR 0x10000*4
> +#define PT_DATA_ADDR 0x10004*4
> +#define PT_TEXT_END_ADDR 0x10008*4
Surround with parens as principle to avoid precedence
surprises:
#define PT_TEXT_ADDR (0x10000*4)
> +<!DOCTYPE feature SYSTEM "gdb-target.dtd">
> +<feature name="org.gnu.gdb.tic6x.cpu">
> + <reg name="A0" bitsize="32"/>
> + <reg name="A1" bitsize="32"/>
> + <reg name="A2" bitsize="32"/>
...
These are all general purpose, core registers, right?
Otherwise looks fine to me.
--
Pedro Alves