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]

[patch 2/4] Nios II target descriptions


This part of the Altera Nios II port includes the target and register descriptions. OK to commit?

-Sandra

2013-04-21  Julian Brown  <julian@codesourcery.com>
	    Sandra Loosemore  <sandra@codesourcery.com>

	gdb/
	* features/Makefile (WHICH): Add nios2-linux.
	(nios2-linux-expedite): Set.
	* features/nios2-cpu.xml: New.
	* features/nios2.xml: New.
	* features/nios2-linux.xml: New.
	* features/nios2-linux.c: New (autogenerated).
	* features/nios2.c: New (autogenerated).
	* regformats/nios2-linux.dat: New (autogenerated).

Index: gdb/features/Makefile
===================================================================
RCS file: /cvs/src/src/gdb/features/Makefile,v
retrieving revision 1.30
diff -u -p -r1.30 Makefile
--- gdb/features/Makefile	4 Feb 2013 12:48:37 -0000	1.30
+++ gdb/features/Makefile	20 Apr 2013 21:32:50 -0000
@@ -42,6 +42,7 @@ WHICH = aarch64 aarch64-without-fpu \
 	i386/x32-avx i386/x32-avx-linux \
 	mips-linux mips-dsp-linux \
 	mips64-linux mips64-dsp-linux \
+	nios2-linux \
 	rs6000/powerpc-32 \
 	rs6000/powerpc-32l rs6000/powerpc-altivec32l rs6000/powerpc-e500l \
 	rs6000/powerpc-64l rs6000/powerpc-altivec64l rs6000/powerpc-vsx32l \
@@ -73,6 +74,7 @@ mips-expedite = r29,pc
 mips-dsp-expedite = r29,pc
 mips64-expedite = r29,pc
 mips64-dsp-expedite = r29,pc
+nios2-linux-expedite = r27,pc
 powerpc-expedite = r1,pc
 rs6000/powerpc-cell32l-expedite = r1,pc,r0,orig_r3,r4
 rs6000/powerpc-cell64l-expedite = r1,pc,r0,orig_r3,r4
Index: gdb/features/nios2-cpu.xml
===================================================================
RCS file: gdb/features/nios2-cpu.xml
diff -N gdb/features/nios2-cpu.xml
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ gdb/features/nios2-cpu.xml	20 Apr 2013 21:32:50 -0000
@@ -0,0 +1,59 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2012, 2013 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 feature SYSTEM "gdb-target.dtd">
+<feature name="org.gnu.gdb.nios2.cpu">
+  <reg name="r0" bitsize="32" type="uint32"/>
+  <reg name="r1" bitsize="32" type="uint32"/>
+  <reg name="r2" bitsize="32" type="uint32"/>
+  <reg name="r3" bitsize="32" type="uint32"/>
+  <reg name="r4" bitsize="32" type="uint32"/>
+  <reg name="r5" bitsize="32" type="uint32"/>
+  <reg name="r6" bitsize="32" type="uint32"/>
+  <reg name="r7" bitsize="32" type="uint32"/>
+  <reg name="r8" bitsize="32" type="uint32"/>
+  <reg name="r9" bitsize="32" type="uint32"/>
+  <reg name="r10" bitsize="32" type="uint32"/>
+  <reg name="r11" bitsize="32" type="uint32"/>
+  <reg name="r12" bitsize="32" type="uint32"/>
+  <reg name="r13" bitsize="32" type="uint32"/>
+  <reg name="r14" bitsize="32" type="uint32"/>
+  <reg name="r15" bitsize="32" type="uint32"/>
+  <reg name="r16" bitsize="32" type="uint32"/>
+  <reg name="r17" bitsize="32" type="uint32"/>
+  <reg name="r18" bitsize="32" type="uint32"/>
+  <reg name="r19" bitsize="32" type="uint32"/>
+  <reg name="r20" bitsize="32" type="uint32"/>
+  <reg name="r21" bitsize="32" type="uint32"/>
+  <reg name="r22" bitsize="32" type="uint32"/>
+  <reg name="r23" bitsize="32" type="uint32"/>
+  <reg name="r24" bitsize="32" type="uint32"/>
+  <reg name="r25" bitsize="32" type="uint32"/>
+  <reg name="r26" bitsize="32" type="uint32"/>
+  <reg name="r27" bitsize="32" type="data_ptr"/>
+  <reg name="r28" bitsize="32" type="uint32"/>
+  <reg name="r29" bitsize="32" type="uint32"/>
+  <reg name="r30" bitsize="32" type="uint32"/>
+  <reg name="r31" bitsize="32" type="uint32"/>
+  <reg name="pc" bitsize="32" type="code_ptr"/>
+  <reg name="status" bitsize="32" type="uint32"/>
+  <reg name="estatus" bitsize="32" type="uint32"/>
+  <reg name="bstatus" bitsize="32" type="uint32"/>
+  <reg name="ienable" bitsize="32" type="uint32"/>
+  <reg name="ipending" bitsize="32" type="uint32"/>
+  <reg name="cpuid" bitsize="32" type="uint32"/>
+  <reg name="ctl6" bitsize="32" type="uint32"/>
+  <reg name="exception" bitsize="32" type="uint32"/>
+  <reg name="ptraddr" bitsize="32" type="uint32"/>
+  <reg name="tlbacc" bitsize="32" type="uint32"/>
+  <reg name="tlbmisc" bitsize="32" type="uint32"/>
+  <reg name="ctl11" bitsize="32" type="uint32"/>
+  <reg name="badaddr" bitsize="32" type="uint32"/>
+  <reg name="config" bitsize="32" type="uint32"/>
+  <reg name="mpubase" bitsize="32" type="uint32"/>
+  <reg name="mpuacc" bitsize="32" type="uint32"/>
+</feature>
Index: gdb/features/nios2.xml
===================================================================
RCS file: gdb/features/nios2.xml
diff -N gdb/features/nios2.xml
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ gdb/features/nios2.xml	20 Apr 2013 21:32:50 -0000
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2013 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>nios2</architecture>
+  <xi:include href="nios2-cpu.xml"/>
+</target>
Index: gdb/features/nios2-linux.xml
===================================================================
RCS file: gdb/features/nios2-linux.xml
diff -N gdb/features/nios2-linux.xml
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ gdb/features/nios2-linux.xml	20 Apr 2013 21:32:50 -0000
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2012 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>nios2</architecture>
+  <osabi>GNU/Linux</osabi>
+  <xi:include href="nios2-cpu.xml"/>
+</target>
Index: gdb/features/nios2-linux.c
===================================================================
RCS file: gdb/features/nios2-linux.c
diff -N gdb/features/nios2-linux.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ gdb/features/nios2-linux.c	20 Apr 2013 21:32:50 -0000
@@ -0,0 +1,70 @@
+/* THIS FILE IS GENERATED.  Original: nios2-linux.xml */
+
+#include "defs.h"
+#include "osabi.h"
+#include "target-descriptions.h"
+
+struct target_desc *tdesc_nios2_linux;
+static void
+initialize_tdesc_nios2_linux (void)
+{
+  struct target_desc *result = allocate_target_description ();
+  struct tdesc_feature *feature;
+
+  set_tdesc_architecture (result, bfd_scan_arch ("nios2"));
+
+  set_tdesc_osabi (result, osabi_from_tdesc_string ("GNU/Linux"));
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.nios2.cpu");
+  tdesc_create_reg (feature, "r0", 0, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r2", 2, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r3", 3, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r4", 4, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r5", 5, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r6", 6, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r7", 7, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r8", 8, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r9", 9, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r10", 10, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r11", 11, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r12", 12, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r13", 13, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r14", 14, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r15", 15, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r16", 16, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r17", 17, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r18", 18, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r19", 19, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r20", 20, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r21", 21, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r22", 22, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r23", 23, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r24", 24, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r25", 25, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r26", 26, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r27", 27, 1, NULL, 32, "data_ptr");
+  tdesc_create_reg (feature, "r28", 28, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r29", 29, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r30", 30, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r31", 31, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "pc", 32, 1, NULL, 32, "code_ptr");
+  tdesc_create_reg (feature, "status", 33, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "estatus", 34, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "bstatus", 35, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "ienable", 36, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "ipending", 37, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "cpuid", 38, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "ctl6", 39, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "exception", 40, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "ptraddr", 41, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "tlbacc", 42, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "tlbmisc", 43, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "ctl11", 44, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "badaddr", 45, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "config", 46, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "mpubase", 47, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "mpuacc", 48, 1, NULL, 32, "uint32");
+
+  tdesc_nios2_linux = result;
+}
Index: gdb/features/nios2.c
===================================================================
RCS file: gdb/features/nios2.c
diff -N gdb/features/nios2.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ gdb/features/nios2.c	20 Apr 2013 21:32:50 -0000
@@ -0,0 +1,68 @@
+/* THIS FILE IS GENERATED.  Original: nios2.xml */
+
+#include "defs.h"
+#include "osabi.h"
+#include "target-descriptions.h"
+
+struct target_desc *tdesc_nios2;
+static void
+initialize_tdesc_nios2 (void)
+{
+  struct target_desc *result = allocate_target_description ();
+  struct tdesc_feature *feature;
+
+  set_tdesc_architecture (result, bfd_scan_arch ("nios2"));
+
+  feature = tdesc_create_feature (result, "org.gnu.gdb.nios2.cpu");
+  tdesc_create_reg (feature, "r0", 0, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r2", 2, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r3", 3, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r4", 4, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r5", 5, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r6", 6, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r7", 7, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r8", 8, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r9", 9, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r10", 10, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r11", 11, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r12", 12, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r13", 13, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r14", 14, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r15", 15, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r16", 16, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r17", 17, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r18", 18, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r19", 19, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r20", 20, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r21", 21, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r22", 22, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r23", 23, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r24", 24, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r25", 25, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r26", 26, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r27", 27, 1, NULL, 32, "data_ptr");
+  tdesc_create_reg (feature, "r28", 28, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r29", 29, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r30", 30, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "r31", 31, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "pc", 32, 1, NULL, 32, "code_ptr");
+  tdesc_create_reg (feature, "status", 33, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "estatus", 34, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "bstatus", 35, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "ienable", 36, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "ipending", 37, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "cpuid", 38, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "ctl6", 39, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "exception", 40, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "ptraddr", 41, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "tlbacc", 42, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "tlbmisc", 43, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "ctl11", 44, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "badaddr", 45, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "config", 46, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "mpubase", 47, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "mpuacc", 48, 1, NULL, 32, "uint32");
+
+  tdesc_nios2 = result;
+}
Index: gdb/regformats/nios2-linux.dat
===================================================================
RCS file: gdb/regformats/nios2-linux.dat
diff -N gdb/regformats/nios2-linux.dat
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ gdb/regformats/nios2-linux.dat	20 Apr 2013 21:32:50 -0000
@@ -0,0 +1,53 @@
+# DO NOT EDIT: generated from nios2-linux.xml
+name:nios2_linux
+xmltarget:nios2-linux.xml
+expedite:r27,pc
+32:r0
+32:r1
+32:r2
+32:r3
+32:r4
+32:r5
+32:r6
+32:r7
+32:r8
+32:r9
+32:r10
+32:r11
+32:r12
+32:r13
+32:r14
+32:r15
+32:r16
+32:r17
+32:r18
+32:r19
+32:r20
+32:r21
+32:r22
+32:r23
+32:r24
+32:r25
+32:r26
+32:r27
+32:r28
+32:r29
+32:r30
+32:r31
+32:pc
+32:status
+32:estatus
+32:bstatus
+32:ienable
+32:ipending
+32:cpuid
+32:ctl6
+32:exception
+32:ptraddr
+32:tlbacc
+32:tlbmisc
+32:ctl11
+32:badaddr
+32:config
+32:mpubase
+32:mpuacc

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