diff options
author | Sandra Loosemore <sandra@codesourcery.com> | 2013-05-07 01:09:29 +0000 |
---|---|---|
committer | Sandra Loosemore <sandra@codesourcery.com> | 2013-05-07 01:09:29 +0000 |
commit | a1217d97c4b0449d052fad3d2df2ab58b48f918c (patch) | |
tree | 98066c44279440ecd359a4ed516c02afd22a9eae /gdb/features | |
parent | 3b7bacacfd7689e3dc00b8eea809eb7a13010ab9 (diff) | |
download | gdb-a1217d97c4b0449d052fad3d2df2ab58b48f918c.zip gdb-a1217d97c4b0449d052fad3d2df2ab58b48f918c.tar.gz gdb-a1217d97c4b0449d052fad3d2df2ab58b48f918c.tar.bz2 |
2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
Andrew Jenner <andrew@codesourcery.com>
Chung-Lin Tang <cltang@codesourcery.com>
Julian Brown <julian@codesourcery.com>
Based on the nios2-elf port from Altera Corporation.
gdb/
* Makefile.in (ALL_TARGET_OBS): Add nios2-tdep.o and
nios2-linux-tdep.o.
(HFILES_NO_SRCDIR): Add nios2-tdep.h.
(ALLDEPFILES): Add nios2-tdep.c and nios2-linux-tdep.c.
* configure.tgt: Add nios2*-*-linux* and nios2*-*-* targets.
* nios2-tdep.h: New.
* nios2-tdep.c: New.
* nios2-linux-tdep.c: New.
* 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.c: New (autogenerated).
* features/nios2-linux.c: New (autogenerated).
* regformats/nios2-linux.dat: New (autogenerated).
* NEWS (Changes since GDB 7.6): Add new Nios II targets
and commands.
gdb/doc/
* gdb.texinfo (Nios II): New section.
(Nios II Features): New section.
Diffstat (limited to 'gdb/features')
-rw-r--r-- | gdb/features/Makefile | 2 | ||||
-rw-r--r-- | gdb/features/nios2-cpu.xml | 59 | ||||
-rw-r--r-- | gdb/features/nios2-linux.c | 71 | ||||
-rw-r--r-- | gdb/features/nios2-linux.xml | 13 | ||||
-rw-r--r-- | gdb/features/nios2.c | 69 | ||||
-rw-r--r-- | gdb/features/nios2.xml | 12 |
6 files changed, 226 insertions, 0 deletions
diff --git a/gdb/features/Makefile b/gdb/features/Makefile index 4ba5cc3..e3a07e7 100644 --- a/gdb/features/Makefile +++ b/gdb/features/Makefile @@ -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 = sp,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 diff --git a/gdb/features/nios2-cpu.xml b/gdb/features/nios2-cpu.xml new file mode 100644 index 0000000..a4146a6 --- /dev/null +++ b/gdb/features/nios2-cpu.xml @@ -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="zero" bitsize="32" type="uint32"/> + <reg name="at" 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="et" bitsize="32" type="uint32"/> + <reg name="bt" bitsize="32" type="uint32"/> + <reg name="gp" bitsize="32" type="uint32"/> + <reg name="sp" bitsize="32" type="data_ptr"/> + <reg name="fp" bitsize="32" type="uint32"/> + <reg name="ea" bitsize="32" type="uint32"/> + <reg name="ba" bitsize="32" type="uint32"/> + <reg name="ra" 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="pteaddr" bitsize="32" type="uint32"/> + <reg name="tlbacc" bitsize="32" type="uint32"/> + <reg name="tlbmisc" bitsize="32" type="uint32"/> + <reg name="eccinj" 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> diff --git a/gdb/features/nios2-linux.c b/gdb/features/nios2-linux.c new file mode 100644 index 0000000..d384d7f --- /dev/null +++ b/gdb/features/nios2-linux.c @@ -0,0 +1,71 @@ +/* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro: + 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, "zero", 0, 1, NULL, 32, "uint32"); + tdesc_create_reg (feature, "at", 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, "et", 24, 1, NULL, 32, "uint32"); + tdesc_create_reg (feature, "bt", 25, 1, NULL, 32, "uint32"); + tdesc_create_reg (feature, "gp", 26, 1, NULL, 32, "uint32"); + tdesc_create_reg (feature, "sp", 27, 1, NULL, 32, "data_ptr"); + tdesc_create_reg (feature, "fp", 28, 1, NULL, 32, "uint32"); + tdesc_create_reg (feature, "ea", 29, 1, NULL, 32, "uint32"); + tdesc_create_reg (feature, "ba", 30, 1, NULL, 32, "uint32"); + tdesc_create_reg (feature, "ra", 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, "pteaddr", 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, "eccinj", 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; +} diff --git a/gdb/features/nios2-linux.xml b/gdb/features/nios2-linux.xml new file mode 100644 index 0000000..f262df2 --- /dev/null +++ b/gdb/features/nios2-linux.xml @@ -0,0 +1,13 @@ +<?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 target SYSTEM "gdb-target.dtd"> +<target> + <architecture>nios2</architecture> + <osabi>GNU/Linux</osabi> + <xi:include href="nios2-cpu.xml"/> +</target> diff --git a/gdb/features/nios2.c b/gdb/features/nios2.c new file mode 100644 index 0000000..cb7246d --- /dev/null +++ b/gdb/features/nios2.c @@ -0,0 +1,69 @@ +/* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro: + 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, "zero", 0, 1, NULL, 32, "uint32"); + tdesc_create_reg (feature, "at", 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, "et", 24, 1, NULL, 32, "uint32"); + tdesc_create_reg (feature, "bt", 25, 1, NULL, 32, "uint32"); + tdesc_create_reg (feature, "gp", 26, 1, NULL, 32, "uint32"); + tdesc_create_reg (feature, "sp", 27, 1, NULL, 32, "data_ptr"); + tdesc_create_reg (feature, "fp", 28, 1, NULL, 32, "uint32"); + tdesc_create_reg (feature, "ea", 29, 1, NULL, 32, "uint32"); + tdesc_create_reg (feature, "ba", 30, 1, NULL, 32, "uint32"); + tdesc_create_reg (feature, "ra", 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, "pteaddr", 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, "eccinj", 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; +} diff --git a/gdb/features/nios2.xml b/gdb/features/nios2.xml new file mode 100644 index 0000000..25849bb --- /dev/null +++ b/gdb/features/nios2.xml @@ -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> |