Add in support for downloading and building the latest snapshot of GDB. If you want...
author"Steven J. Hill" <sjhill@realitydiluted.com>
Tue, 30 Aug 2005 03:37:12 +0000 (03:37 -0000)
committer"Steven J. Hill" <sjhill@realitydiluted.com>
Tue, 30 Aug 2005 03:37:12 +0000 (03:37 -0000)
toolchain/gdb/Config.in
toolchain/gdb/gdb.mk
toolchain/gdb/snapshot/400-mips32r2-rdhwr-disassemble-hack.patch [new file with mode: 0644]

index 1e44dbde7802342d723a8a752c86d96172d55fe7..3ca91e97a6a7a99028ff85d17a6a058fc0b9fef1 100644 (file)
@@ -33,11 +33,15 @@ choice
        config BR2_GDB_VERSION_6_3
                bool "gdb 6.3"
 
+       config BR2_GDB_VERSION_SNAPSHOT
+               bool "gdb snapshot"
+
 endchoice
 
 config BR2_GDB_VERSION
        string
        default "6.2.1"    if BR2_GDB_VERSION_6_2_1
        default "6.3"      if BR2_GDB_VERSION_6_3
+       default "snapshot" if BR2_GDB_VERSION_SNAPSHOT
 
 
index 86264b58313a0ca614d96de06b2e19c08f18bfa3..6ae6fab368a9374f1d1be30166f318b354f26f0c 100644 (file)
@@ -6,17 +6,33 @@
 GDB_VERSION:=$(strip $(subst ",, $(BR2_GDB_VERSION)))
 #"
 
+ifeq ($(GDB_VERSION),snapshot)
+# Be aware that this changes daily....
+GDB_SITE:=ftp://sources.redhat.com/pub/gdb/snapshots/current
+GDB_SOURCE:=gdb.tar.bz2
+GDB_CAT:=bzcat
+GDB_DIR:=$(TOOL_BUILD_DIR)/gdb-$(GDB_VERSION)
+else
 GDB_SITE:=http://ftp.gnu.org/gnu/gdb
 GDB_SOURCE:=gdb-$(GDB_VERSION).tar.bz2
 GDB_CAT:=bzcat
 
 GDB_DIR:=$(TOOL_BUILD_DIR)/gdb-$(GDB_VERSION)
 
+# NOTE: This option should not be used with newer gdb versions.
+DISABLE_GDBMI:=--disable-gdbmi
+endif
+
 $(DL_DIR)/$(GDB_SOURCE):
        $(WGET) -P $(DL_DIR) $(GDB_SITE)/$(GDB_SOURCE)
 
 $(GDB_DIR)/.unpacked: $(DL_DIR)/$(GDB_SOURCE)
        $(GDB_CAT) $(DL_DIR)/$(GDB_SOURCE) | tar -C $(TOOL_BUILD_DIR) $(TAR_OPTIONS) -
+ifeq ($(GDB_VERSION),snapshot)
+       GDB_REAL_DIR=$(shell \
+               tar jtf $(DL_DIR)/$(GDB_SOURCE) | head -1 | cut -d"/" -f1)
+       ln -sf $(TOOL_BUILD_DIR)/$(shell tar jtf $(DL_DIR)/$(GDB_SOURCE) | head -1 | cut -d"/" -f1) $(GDB_DIR)
+endif
        toolchain/patch-kernel.sh $(GDB_DIR) toolchain/gdb/$(GDB_VERSION) \*.patch
        # Copy a config.sub from gcc.  This is only necessary until
        # gdb's config.sub supports <arch>-linux-uclibc tuples.
@@ -54,7 +70,7 @@ $(GDB_TARGET_DIR)/.configured: $(GDB_DIR)/.unpacked
                --target=$(REAL_GNU_TARGET_NAME) \
                --prefix=/usr \
                $(DISABLE_NLS) \
-               --without-uiout --disable-gdbmi \
+               --without-uiout $(DISABLE_GDBMI) \
                --disable-tui --disable-gdbtk --without-x \
                --disable-sim --enable-gdbserver \
                --without-included-gettext \
@@ -111,7 +127,7 @@ $(GDB_SERVER_DIR)/.configured: $(GDB_DIR)/.unpacked
                --infodir=/usr/info \
                --includedir=$(STAGING_DIR)/include \
                $(DISABLE_NLS) \
-               --without-uiout --disable-gdbmi \
+               --without-uiout $(DISABLE_GDBMI) \
                --disable-tui --disable-gdbtk --without-x \
                --without-included-gettext \
        );
@@ -155,7 +171,7 @@ $(GDB_CLIENT_DIR)/.configured: $(GDB_DIR)/.unpacked
                --host=$(GNU_HOST_NAME) \
                --target=$(REAL_GNU_TARGET_NAME) \
                $(DISABLE_NLS) \
-               --without-uiout --disable-gdbmi \
+               --without-uiout $(DISABLE_GDBMI) \
                --disable-tui --disable-gdbtk --without-x \
                --without-included-gettext \
                --enable-threads \
diff --git a/toolchain/gdb/snapshot/400-mips32r2-rdhwr-disassemble-hack.patch b/toolchain/gdb/snapshot/400-mips32r2-rdhwr-disassemble-hack.patch
new file mode 100644 (file)
index 0000000..1d6be1b
--- /dev/null
@@ -0,0 +1,12 @@
+diff -ur gdb-6.3.50.20050827/opcodes/mips-opc.c gdb-6.3.50.20050827-patched/opcodes/mips-opc.c
+--- gdb-6.3.50.20050827/opcodes/mips-opc.c     2005-08-25 13:12:43.000000000 -0500
++++ gdb-6.3.50.20050827-patched/opcodes/mips-opc.c     2005-08-29 17:48:10.000000000 -0500
+@@ -954,7 +954,7 @@
+ {"remu",    "z,s,t",    0x0000001b, 0xfc00ffff, RD_s|RD_t|WR_HILO,      0,            I1      },
+ {"remu",    "d,v,t",  0,    (int) M_REMU_3,   INSN_MACRO,             0,              I1      },
+ {"remu",    "d,v,I",  0,    (int) M_REMU_3I,  INSN_MACRO,             0,              I1      },
+-{"rdhwr",   "t,K",    0x7c00003b, 0xffe007ff, WR_t,                   0,              I33     },
++{"rdhwr",   "t,K",    0x7c00003b, 0xffe007ff, WR_t,                   0,              I33|I1  },
+ {"rdpgpr",  "d,w",    0x41400000, 0xffe007ff, WR_d,                   0,              I33     },
+ {"rfe",     "",               0x42000010, 0xffffffff, 0,                      0,              I1|T3   },
+ {"rnas.qh", "X,Q",    0x78200025, 0xfc20f83f, WR_D|RD_T|FP_D,         RD_MACC,        MX      },