Update buidlroot to version 2016.08.1

This commit is contained in:
2016-11-16 22:07:29 +01:00
parent 807ab03547
commit a1061efbc2
3636 changed files with 59539 additions and 25783 deletions

View File

@@ -0,0 +1,90 @@
From d41401ace01c234f42697e190a2ac95991780626 Mon Sep 17 00:00:00 2001
From: Doug Evans <dje@google.com>
Date: Mon, 26 Oct 2015 13:20:12 -0700
Subject: [PATCH] Add some casts for building on musl.
gdb/ChangeLog:
* linux-thread-db.c (find_new_threads_callback): Cast ti.ti_tid to
unsigned long for debug_printf.
(thread_db_pid_to_str): Ditto.
gdb/gdbserver/ChangeLog:
* thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
for debug_printf.
(attach_thread, find_new_threads_callback): Ditto.
[Arnout: removed the parts that don't apply, including ChangeLog]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
gdb/ChangeLog | 5 +++++
gdb/gdbserver/ChangeLog | 6 ++++++
gdb/gdbserver/thread-db.c | 9 +++++----
gdb/linux-thread-db.c | 5 +++--
4 files changed, 19 insertions(+), 6 deletions(-)
diff --git a/gdb/gdbserver/thread-db.c b/gdb/gdbserver/thread-db.c
index ffe722d..3df10ff 100644
--- a/gdb/gdbserver/thread-db.c
+++ b/gdb/gdbserver/thread-db.c
@@ -278,7 +278,7 @@ find_one_thread (ptid_t ptid)
if (debug_threads)
debug_printf ("Found thread %ld (LWP %d)\n",
- ti.ti_tid, ti.ti_lid);
+ (unsigned long) ti.ti_tid, ti.ti_lid);
if (lwpid != ti.ti_lid)
{
@@ -319,12 +319,12 @@ attach_thread (const td_thrhandle_t *th_p, td_thrinfo_t *ti_p)
if (debug_threads)
debug_printf ("Attaching to thread %ld (LWP %d)\n",
- ti_p->ti_tid, ti_p->ti_lid);
+ (unsigned long) ti_p->ti_tid, ti_p->ti_lid);
err = linux_attach_lwp (ptid);
if (err != 0)
{
warning ("Could not attach to thread %ld (LWP %d): %s\n",
- ti_p->ti_tid, ti_p->ti_lid,
+ (unsigned long) ti_p->ti_tid, ti_p->ti_lid,
linux_ptrace_attach_fail_reason_string (ptid, err));
return 0;
}
@@ -392,7 +392,8 @@ find_new_threads_callback (const td_thrhandle_t *th_p, void *data)
glibc PR17707. */
if (debug_threads)
debug_printf ("thread_db: skipping exited and "
- "joined thread (0x%lx)\n", ti.ti_tid);
+ "joined thread (0x%lx)\n",
+ (unsigned long) ti.ti_tid);
return 0;
}
diff --git a/gdb/linux-thread-db.c b/gdb/linux-thread-db.c
index 66e9595..41db29a 100644
--- a/gdb/linux-thread-db.c
+++ b/gdb/linux-thread-db.c
@@ -1585,7 +1585,8 @@ find_new_threads_callback (const td_thrhandle_t *th_p, void *data)
if (libthread_db_debug)
fprintf_unfiltered (gdb_stdlog,
"thread_db: skipping exited and "
- "joined thread (0x%lx)\n", ti.ti_tid);
+ "joined thread (0x%lx)\n",
+ (unsigned long) ti.ti_tid);
return 0;
}
@@ -1816,7 +1817,7 @@ thread_db_pid_to_str (struct target_ops *ops, ptid_t ptid)
tid = thread_info->priv->tid;
snprintf (buf, sizeof (buf), "Thread 0x%lx (LWP %ld)",
- tid, ptid_get_lwp (ptid));
+ (unsigned long) tid, ptid_get_lwp (ptid));
return buf;
}
--
1.9.4

View File

@@ -0,0 +1,63 @@
From 963843d4d07aef6caa296dacf191f8adc9518596 Mon Sep 17 00:00:00 2001
From: Doug Evans <dje@google.com>
Date: Mon, 26 Oct 2015 13:24:01 -0700
Subject: [PATCH] musl: Move W_STOPCODE to common/gdb_wait.h.
gdb/ChangeLog:
* common/gdb_wait.h (W_STOPCODE): Define, moved here from
gdbserver/linux-low.c.
(WSETSTOP): Simplify.
gdb/gdbserver/ChangeLog:
* linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
[Arnout: removed the parts that don't apply, including ChangeLog]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
gdb/ChangeLog | 6 ++++++
gdb/common/gdb_wait.h | 8 ++++----
gdb/gdbserver/ChangeLog | 4 ++++
gdb/gdbserver/linux-low.c | 4 ----
4 files changed, 14 insertions(+), 8 deletions(-)
diff --git a/gdb/common/gdb_wait.h b/gdb/common/gdb_wait.h
index 9b250d2..412f813 100644
--- a/gdb/common/gdb_wait.h
+++ b/gdb/common/gdb_wait.h
@@ -85,12 +85,12 @@
# endif
#endif
+#ifndef W_STOPCODE
+#define W_STOPCODE(sig) ((sig) << 8 | 0x7f)
+#endif
+
#ifndef WSETSTOP
-# ifdef W_STOPCODE
#define WSETSTOP(w,sig) ((w) = W_STOPCODE(sig))
-# else
-#define WSETSTOP(w,sig) ((w) = (0177 | ((sig) << 8)))
-# endif
#endif
/* For native GNU/Linux we may use waitpid and the __WCLONE option.
diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
index 0c552b8..7ed67c7 100644
--- a/gdb/gdbserver/linux-low.c
+++ b/gdb/gdbserver/linux-low.c
@@ -70,10 +70,6 @@
#define O_LARGEFILE 0
#endif
-#ifndef W_STOPCODE
-#define W_STOPCODE(sig) ((sig) << 8 | 0x7f)
-#endif
-
/* This is the kernel's hard limit. Not to be confused with
SIGRTMIN. */
#ifndef __SIGRTMIN
--
1.9.4

View File

@@ -0,0 +1,58 @@
From 682b25469e66ea45b214e95962671373983c118f Mon Sep 17 00:00:00 2001
From: Doug Evans <dje@google.com>
Date: Mon, 26 Oct 2015 13:30:57 -0700
Subject: [PATCH] Move __SIGRTMIN.
gdb/ChangeLog:
* nat/linux-nat.h (__SIGRTMIN): Move here from gdbserver/linux-low.c.
gdb/gdbserver/ChangeLog:
* linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
[Arnout: removed the parts that don't apply, including ChangeLog]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
gdb/ChangeLog | 4 ++++
gdb/gdbserver/ChangeLog | 4 ++++
gdb/gdbserver/linux-low.c | 6 ------
gdb/nat/linux-nat.h | 5 +++++
4 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
index 7ed67c7..e778c4c 100644
--- a/gdb/gdbserver/linux-low.c
+++ b/gdb/gdbserver/linux-low.c
@@ -70,12 +70,6 @@
#define O_LARGEFILE 0
#endif
-/* This is the kernel's hard limit. Not to be confused with
- SIGRTMIN. */
-#ifndef __SIGRTMIN
-#define __SIGRTMIN 32
-#endif
-
/* Some targets did not define these ptrace constants from the start,
so gdbserver defines them locally here. In the future, these may
be removed after they are added to asm/ptrace.h. */
diff --git a/gdb/nat/linux-nat.h b/gdb/nat/linux-nat.h
index 0633fa9..70e6274 100644
--- a/gdb/nat/linux-nat.h
+++ b/gdb/nat/linux-nat.h
@@ -25,6 +25,11 @@
struct lwp_info;
struct arch_lwp_info;
+/* This is the kernel's hard limit. Not to be confused with SIGRTMIN. */
+#ifndef __SIGRTMIN
+#define __SIGRTMIN 32
+#endif
+
/* Unlike other extended result codes, WSTOPSIG (status) on
PTRACE_O_TRACESYSGOOD syscall events doesn't return SIGTRAP, but
instead SIGTRAP with bit 7 set. */
--
1.9.4

View File

@@ -0,0 +1,267 @@
From d4eb69fc4b50f9a0babd70b28d0601b40f31bd0f Mon Sep 17 00:00:00 2001
From: Max Filippov <jcmvbkbc@gmail.com>
Date: Thu, 2 Jul 2015 15:10:58 +0300
Subject: [PATCH] xtensa: implement NPTL helpers
These changes allow debugging multithreaded NPTL xtensa applications.
2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
gdb/gdbserver/
* configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
* linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
#includes.
(ps_get_thread_area): New function.
2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
gdb/
* arch/xtensa.h: New file.
* xtensa-linux-nat.c (gdb_proc_service.h): New #include.
(ps_get_thread_area): New function.
* xtensa-linux-tdep.c (xtensa_linux_init_abi): Add call to
set_gdbarch_fetch_tls_load_module_address to enable TLS support.
* xtensa-tdep.c (osabi.h): New #include.
(xtensa_gdbarch_init): Call gdbarch_init_osabi to register
xtensa-specific hooks.
* xtensa-tdep.h (struct xtensa_elf_gregset_t): Add threadptr
member and move the structure to arch/xtensa.h.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
Backported from: 40045d91812b25c88c8275b8c08d27c234b68ba8
Changes to ChangeLog files are dropped.
gdb/arch/xtensa.h | 46 ++++++++++++++++++++++++++++++++++++++++
gdb/gdbserver/configure.srv | 1 +
gdb/gdbserver/linux-xtensa-low.c | 21 ++++++++++++++++++
gdb/xtensa-linux-nat.c | 22 ++++++++++++++++++
gdb/xtensa-linux-tdep.c | 4 ++++
gdb/xtensa-tdep.c | 4 ++++
gdb/xtensa-tdep.h | 24 ++------------------
7 files changed, 100 insertions(+), 22 deletions(-)
create mode 100644 gdb/arch/xtensa.h
diff --git a/gdb/arch/xtensa.h b/gdb/arch/xtensa.h
new file mode 100644
index 0000000..fe96584
--- /dev/null
+++ b/gdb/arch/xtensa.h
@@ -0,0 +1,46 @@
+/* Common Target-dependent code for the Xtensa port of GDB, the GNU debugger.
+
+ Copyright (C) 2003-2015 Free Software Foundation, Inc.
+
+ This file is part of GDB.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef XTENSA_H
+#define XTENSA_H
+
+/* Xtensa ELF core file register set representation ('.reg' section).
+ Copied from target-side ELF header <xtensa/elf.h>. */
+
+typedef uint32_t xtensa_elf_greg_t;
+
+typedef struct
+{
+ xtensa_elf_greg_t pc;
+ xtensa_elf_greg_t ps;
+ xtensa_elf_greg_t lbeg;
+ xtensa_elf_greg_t lend;
+ xtensa_elf_greg_t lcount;
+ xtensa_elf_greg_t sar;
+ xtensa_elf_greg_t windowstart;
+ xtensa_elf_greg_t windowbase;
+ xtensa_elf_greg_t threadptr;
+ xtensa_elf_greg_t reserved[7+48];
+ xtensa_elf_greg_t ar[64];
+} xtensa_elf_gregset_t;
+
+#define XTENSA_ELF_NGREG (sizeof (xtensa_elf_gregset_t) \
+ / sizeof (xtensa_elf_greg_t))
+
+#endif
diff --git a/gdb/gdbserver/configure.srv b/gdb/gdbserver/configure.srv
index 0b18d1d..320c26a 100644
--- a/gdb/gdbserver/configure.srv
+++ b/gdb/gdbserver/configure.srv
@@ -352,6 +352,7 @@ case "${target}" in
xtensa*-*-linux*) srv_regobj=reg-xtensa.o
srv_tgtobj="$srv_linux_obj linux-xtensa-low.o"
srv_linux_regsets=yes
+ srv_linux_thread_db=yes
;;
tilegx-*-linux*) srv_regobj=reg-tilegx.o
srv_regobj="${srv_regobj} reg-tilegx32.o"
diff --git a/gdb/gdbserver/linux-xtensa-low.c b/gdb/gdbserver/linux-xtensa-low.c
index 4daccee..debe467 100644
--- a/gdb/gdbserver/linux-xtensa-low.c
+++ b/gdb/gdbserver/linux-xtensa-low.c
@@ -26,6 +26,8 @@ extern const struct target_desc *tdesc_xtensa;
#include <asm/ptrace.h>
#include <xtensa-config.h>
+#include "arch/xtensa.h"
+#include "gdb_proc_service.h"
#include "xtensa-xtregs.c"
@@ -179,6 +181,25 @@ xtensa_breakpoint_at (CORE_ADDR where)
xtensa_breakpoint, xtensa_breakpoint_len) == 0;
}
+/* Called by libthread_db. */
+
+ps_err_e
+ps_get_thread_area (const struct ps_prochandle *ph,
+ lwpid_t lwpid, int idx, void **base)
+{
+ xtensa_elf_gregset_t regs;
+
+ if (ptrace (PTRACE_GETREGS, lwpid, NULL, &regs) != 0)
+ return PS_ERR;
+
+ /* IDX is the bias from the thread pointer to the beginning of the
+ thread descriptor. It has to be subtracted due to implementation
+ quirks in libthread_db. */
+ *base = (void *) ((char *) regs.threadptr - idx);
+
+ return PS_OK;
+}
+
static struct regsets_info xtensa_regsets_info =
{
xtensa_regsets, /* regsets */
diff --git a/gdb/xtensa-linux-nat.c b/gdb/xtensa-linux-nat.c
index 77ad3e0..5538d5b 100644
--- a/gdb/xtensa-linux-nat.c
+++ b/gdb/xtensa-linux-nat.c
@@ -37,6 +37,9 @@
#include "gregset.h"
#include "xtensa-tdep.h"
+/* Defines ps_err_e, struct ps_prochandle. */
+#include "gdb_proc_service.h"
+
/* Extended register set depends on hardware configs.
Keeping these definitions separately allows to introduce
hardware-specific overlays. */
@@ -280,6 +283,25 @@ xtensa_linux_store_inferior_registers (struct target_ops *ops,
store_xtregs (regcache, regnum);
}
+/* Called by libthread_db. */
+
+ps_err_e
+ps_get_thread_area (const struct ps_prochandle *ph,
+ lwpid_t lwpid, int idx, void **base)
+{
+ xtensa_elf_gregset_t regs;
+
+ if (ptrace (PTRACE_GETREGS, lwpid, NULL, &regs) != 0)
+ return PS_ERR;
+
+ /* IDX is the bias from the thread pointer to the beginning of the
+ thread descriptor. It has to be subtracted due to implementation
+ quirks in libthread_db. */
+ *base = (void *) ((char *) regs.threadptr - idx);
+
+ return PS_OK;
+}
+
void _initialize_xtensa_linux_nat (void);
void
diff --git a/gdb/xtensa-linux-tdep.c b/gdb/xtensa-linux-tdep.c
index 61ea9b0..99e0d3e 100644
--- a/gdb/xtensa-linux-tdep.c
+++ b/gdb/xtensa-linux-tdep.c
@@ -106,6 +106,10 @@ xtensa_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
xtensa_linux_gdb_signal_from_target);
set_gdbarch_gdb_signal_to_target (gdbarch,
xtensa_linux_gdb_signal_to_target);
+
+ /* Enable TLS support. */
+ set_gdbarch_fetch_tls_load_module_address (gdbarch,
+ svr4_fetch_objfile_link_map);
}
/* Provide a prototype to silence -Wmissing-prototypes. */
diff --git a/gdb/xtensa-tdep.c b/gdb/xtensa-tdep.c
index 55e7d98..4b693ed 100644
--- a/gdb/xtensa-tdep.c
+++ b/gdb/xtensa-tdep.c
@@ -28,6 +28,7 @@
#include "value.h"
#include "dis-asm.h"
#include "inferior.h"
+#include "osabi.h"
#include "floatformat.h"
#include "regcache.h"
#include "reggroups.h"
@@ -3273,6 +3274,9 @@ xtensa_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_solib_svr4_fetch_link_map_offsets
(gdbarch, svr4_ilp32_fetch_link_map_offsets);
+ /* Hook in the ABI-specific overrides, if they have been registered. */
+ gdbarch_init_osabi (info, gdbarch);
+
return gdbarch;
}
diff --git a/gdb/xtensa-tdep.h b/gdb/xtensa-tdep.h
index caa2988..5b28cab 100644
--- a/gdb/xtensa-tdep.h
+++ b/gdb/xtensa-tdep.h
@@ -18,6 +18,8 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "arch/xtensa.h"
+
/* XTENSA_TDEP_VERSION can/should be changed along with XTENSA_CONFIG_VERSION
whenever the "tdep" structure changes in an incompatible way. */
@@ -81,28 +83,6 @@ typedef enum
} xtensa_target_flags_t;
-/* Xtensa ELF core file register set representation ('.reg' section).
- Copied from target-side ELF header <xtensa/elf.h>. */
-
-typedef uint32_t xtensa_elf_greg_t;
-
-typedef struct
-{
- xtensa_elf_greg_t pc;
- xtensa_elf_greg_t ps;
- xtensa_elf_greg_t lbeg;
- xtensa_elf_greg_t lend;
- xtensa_elf_greg_t lcount;
- xtensa_elf_greg_t sar;
- xtensa_elf_greg_t windowstart;
- xtensa_elf_greg_t windowbase;
- xtensa_elf_greg_t reserved[8+48];
- xtensa_elf_greg_t ar[64];
-} xtensa_elf_gregset_t;
-
-#define XTENSA_ELF_NGREG (sizeof (xtensa_elf_gregset_t) \
- / sizeof (xtensa_elf_greg_t))
-
/* Mask. */
typedef struct
--
1.8.1.4

View File

@@ -0,0 +1,30 @@
From cd68d0ebe7748a5448c86eb021b717df6fe83f35 Mon Sep 17 00:00:00 2001
From: Doug Evans <xdje42@gmail.com>
Date: Sun, 22 Nov 2015 17:24:03 -0800
Subject: [PATCH] target.h: #include <sys/types.h>.
For musl.
[Romain:
rebase on gdb 7.10.1 from upstream (7.11)
remove ChangeLog entry]
Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
gdb/gdbserver/target.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/gdb/gdbserver/target.h b/gdb/gdbserver/target.h
index 9a40867..6af043c 100644
--- a/gdb/gdbserver/target.h
+++ b/gdb/gdbserver/target.h
@@ -21,6 +21,7 @@
#ifndef TARGET_H
#define TARGET_H
+#include <sys/types.h> /* for mode_t */
#include "target/target.h"
#include "target/resume.h"
#include "target/wait.h"
--
2.5.5

View File

@@ -0,0 +1,372 @@
From 4d913bb73965fdb9c756e8d5916a829b60aa3a44 Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Thu, 4 Aug 2016 23:44:24 +0200
Subject: [PATCH] Revert "sim: unify SIM_CPU definition"
This reverts commit 20bca71d82598a015de0991196e45f0b5f7ead81.
This change causes a redefinition of SIM_CPU on the Blackfin
architecture, as it is defined in both the common sim/common/sim-base.h
and the architecture specific sim/bfin/sim-main.h.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
sim/arm/sim-main.h | 3 +++
sim/avr/sim-main.h | 2 ++
sim/bfin/sim-main.h | 2 --
sim/common/sim-base.h | 2 --
sim/cr16/sim-main.h | 2 ++
sim/cris/sim-main.h | 5 +++++
sim/d10v/sim-main.h | 2 ++
sim/frv/sim-main.h | 10 ++++++++++
sim/ft32/sim-main.h | 2 ++
sim/h8300/sim-main.h | 3 +++
sim/iq2000/sim-main.h | 5 +++++
sim/lm32/sim-main.h | 5 +++++
sim/m32r/sim-main.h | 5 +++++
sim/m68hc11/sim-main.h | 3 +++
sim/mcore/sim-main.h | 2 ++
sim/microblaze/sim-main.h | 3 +++
sim/mips/sim-main.h | 3 +++
sim/mn10300/sim-main.h | 2 ++
sim/moxie/sim-main.h | 3 +++
sim/msp430/sim-main.h | 3 +++
sim/sh/sim-main.h | 3 +++
sim/sh64/sim-main.h | 5 +++++
sim/v850/sim-main.h | 3 +++
23 files changed, 74 insertions(+), 4 deletions(-)
diff --git a/sim/arm/sim-main.h b/sim/arm/sim-main.h
index 9a37b98..ae622bd 100644
--- a/sim/arm/sim-main.h
+++ b/sim/arm/sim-main.h
@@ -20,6 +20,9 @@
#define SIM_MAIN_H
#include "sim-basics.h"
+
+typedef struct _sim_cpu SIM_CPU;
+
#include "sim-base.h"
#include "bfd.h"
diff --git a/sim/avr/sim-main.h b/sim/avr/sim-main.h
index e0cac22..52904e3 100644
--- a/sim/avr/sim-main.h
+++ b/sim/avr/sim-main.h
@@ -23,6 +23,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
extern unsigned int pc;
+typedef struct _sim_cpu SIM_CPU;
+
#include "sim-base.h"
struct _sim_cpu {
diff --git a/sim/bfin/sim-main.h b/sim/bfin/sim-main.h
index 806fe15..53e1774 100644
--- a/sim/bfin/sim-main.h
+++ b/sim/bfin/sim-main.h
@@ -24,8 +24,6 @@
#include "sim-basics.h"
#include "sim-signal.h"
-/* TODO: Delete this. Need to convert bu32/etc... to common sim types
- and unwind the bfin-sim.h/machs.h include below first though. */
typedef struct _sim_cpu SIM_CPU;
#include "bfin-sim.h"
diff --git a/sim/common/sim-base.h b/sim/common/sim-base.h
index 21f61f4..e90e07c 100644
--- a/sim/common/sim-base.h
+++ b/sim/common/sim-base.h
@@ -72,8 +72,6 @@ typedef address_word sim_cia;
#define INVALID_INSTRUCTION_ADDRESS ((address_word)0 - 1)
#endif
-/* TODO: Probably should just delete SIM_CPU. */
-typedef struct _sim_cpu SIM_CPU;
typedef struct _sim_cpu sim_cpu;
#include "sim-module.h"
diff --git a/sim/cr16/sim-main.h b/sim/cr16/sim-main.h
index a63b93e..1a80229 100644
--- a/sim/cr16/sim-main.h
+++ b/sim/cr16/sim-main.h
@@ -24,6 +24,8 @@
typedef long int word;
typedef unsigned long int uword;
+typedef struct _sim_cpu SIM_CPU;
+
#include "sim-base.h"
#include "bfd.h"
diff --git a/sim/cris/sim-main.h b/sim/cris/sim-main.h
index 4dc04a2..fec0039 100644
--- a/sim/cris/sim-main.h
+++ b/sim/cris/sim-main.h
@@ -24,6 +24,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#ifndef SIM_MAIN_H
#define SIM_MAIN_H
+#define USING_SIM_BASE_H
+
+struct _sim_cpu;
+typedef struct _sim_cpu SIM_CPU;
+
#include "symcat.h"
#include "sim-basics.h"
#include "cgen-types.h"
diff --git a/sim/d10v/sim-main.h b/sim/d10v/sim-main.h
index 0b87811..a7d59dd 100644
--- a/sim/d10v/sim-main.h
+++ b/sim/d10v/sim-main.h
@@ -24,6 +24,8 @@
typedef long int word;
typedef unsigned long int uword;
+typedef struct _sim_cpu SIM_CPU;
+
#include "sim-base.h"
#include "bfd.h"
diff --git a/sim/frv/sim-main.h b/sim/frv/sim-main.h
index d5a67cb..fd12c4f 100644
--- a/sim/frv/sim-main.h
+++ b/sim/frv/sim-main.h
@@ -19,6 +19,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* Main header for the frv. */
+#define USING_SIM_BASE_H /* FIXME: quick hack */
+
+struct _sim_cpu; /* FIXME: should be in sim-basics.h */
+typedef struct _sim_cpu SIM_CPU;
+
+/* Set the mask of unsupported traces. */
+#define WITH_TRACE \
+ (~(TRACE_alu | TRACE_decode | TRACE_memory | TRACE_model | TRACE_fpu \
+ | TRACE_branch | TRACE_debug))
+
/* sim-basics.h includes config.h but cgen-types.h must be included before
sim-basics.h and cgen-types.h needs config.h. */
#include "config.h"
diff --git a/sim/ft32/sim-main.h b/sim/ft32/sim-main.h
index b27a690..a270a5d 100644
--- a/sim/ft32/sim-main.h
+++ b/sim/ft32/sim-main.h
@@ -25,6 +25,8 @@
#include "sim-base.h"
#include "bfd.h"
+typedef struct _sim_cpu SIM_CPU;
+
#include "ft32-sim.h"
struct _sim_cpu {
diff --git a/sim/h8300/sim-main.h b/sim/h8300/sim-main.h
index 6dbc1ac..e95c4d9 100644
--- a/sim/h8300/sim-main.h
+++ b/sim/h8300/sim-main.h
@@ -87,6 +87,9 @@ enum h8_typecodes {
};
#include "sim-basics.h"
+
+typedef struct _sim_cpu SIM_CPU;
+
#include "sim-base.h"
/* Structure used to describe addressing */
diff --git a/sim/iq2000/sim-main.h b/sim/iq2000/sim-main.h
index 992520a..ce3baba 100644
--- a/sim/iq2000/sim-main.h
+++ b/sim/iq2000/sim-main.h
@@ -4,6 +4,11 @@
#ifndef SIM_MAIN_H
#define SIM_MAIN_H
+#define USING_SIM_BASE_H /* FIXME: quick hack */
+
+struct _sim_cpu; /* FIXME: should be in sim-basics.h */
+typedef struct _sim_cpu SIM_CPU;
+
/* sim-basics.h includes config.h but cgen-types.h must be included before
sim-basics.h and cgen-types.h needs config.h. */
#include "config.h"
diff --git a/sim/lm32/sim-main.h b/sim/lm32/sim-main.h
index 4894e8d..210bb8b 100644
--- a/sim/lm32/sim-main.h
+++ b/sim/lm32/sim-main.h
@@ -23,6 +23,11 @@
#ifndef SIM_MAIN_H
#define SIM_MAIN_H
+#define USING_SIM_BASE_H /* FIXME: quick hack */
+
+struct _sim_cpu; /* FIXME: should be in sim-basics.h */
+typedef struct _sim_cpu SIM_CPU;
+
#include "symcat.h"
#include "sim-basics.h"
#include "cgen-types.h"
diff --git a/sim/m32r/sim-main.h b/sim/m32r/sim-main.h
index cd39e98..74bb513 100644
--- a/sim/m32r/sim-main.h
+++ b/sim/m32r/sim-main.h
@@ -3,6 +3,11 @@
#ifndef SIM_MAIN_H
#define SIM_MAIN_H
+#define USING_SIM_BASE_H /* FIXME: quick hack */
+
+struct _sim_cpu; /* FIXME: should be in sim-basics.h */
+typedef struct _sim_cpu SIM_CPU;
+
#include "symcat.h"
#include "sim-basics.h"
#include "cgen-types.h"
diff --git a/sim/m68hc11/sim-main.h b/sim/m68hc11/sim-main.h
index d1fc582..4f41db9 100644
--- a/sim/m68hc11/sim-main.h
+++ b/sim/m68hc11/sim-main.h
@@ -25,6 +25,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#define SIM_HANDLES_LMA 1
#include "sim-basics.h"
+
+typedef struct _sim_cpu SIM_CPU;
+
#include "sim-signal.h"
#include "sim-base.h"
diff --git a/sim/mcore/sim-main.h b/sim/mcore/sim-main.h
index be50ec1..25698c1 100644
--- a/sim/mcore/sim-main.h
+++ b/sim/mcore/sim-main.h
@@ -24,6 +24,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
typedef long int word;
typedef unsigned long int uword;
+typedef struct _sim_cpu SIM_CPU;
+
#include "sim-base.h"
#include "bfd.h"
diff --git a/sim/microblaze/sim-main.h b/sim/microblaze/sim-main.h
index 6781374..6b7b776 100644
--- a/sim/microblaze/sim-main.h
+++ b/sim/microblaze/sim-main.h
@@ -20,6 +20,9 @@
#include "microblaze.h"
#include "sim-basics.h"
+
+typedef struct _sim_cpu SIM_CPU;
+
#include "sim-base.h"
/* The machine state.
diff --git a/sim/mips/sim-main.h b/sim/mips/sim-main.h
index 8d698ad..9729804 100644
--- a/sim/mips/sim-main.h
+++ b/sim/mips/sim-main.h
@@ -29,6 +29,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
mips_core_signal ((SD), (CPU), (CIA), (MAP), (NR_BYTES), (ADDR), (TRANSFER), (ERROR))
#include "sim-basics.h"
+
+typedef struct _sim_cpu SIM_CPU;
+
#include "sim-base.h"
#include "bfd.h"
diff --git a/sim/mn10300/sim-main.h b/sim/mn10300/sim-main.h
index 847506e..2ddbfb9 100644
--- a/sim/mn10300/sim-main.h
+++ b/sim/mn10300/sim-main.h
@@ -42,6 +42,8 @@
#include "itable.h"
#include "idecode.h"
+typedef struct _sim_cpu SIM_CPU;
+
#define WITH_WATCHPOINTS 1
#define SIM_CORE_SIGNAL(SD,CPU,CIA,MAP,NR_BYTES,ADDR,TRANSFER,ERROR) \
diff --git a/sim/moxie/sim-main.h b/sim/moxie/sim-main.h
index b1a64fc..c60437e 100644
--- a/sim/moxie/sim-main.h
+++ b/sim/moxie/sim-main.h
@@ -21,6 +21,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#define SIM_MAIN_H
#include "sim-basics.h"
+
+typedef struct _sim_cpu SIM_CPU;
+
#include "sim-base.h"
#include "bfd.h"
diff --git a/sim/msp430/sim-main.h b/sim/msp430/sim-main.h
index 19c8cca..37bb42d 100644
--- a/sim/msp430/sim-main.h
+++ b/sim/msp430/sim-main.h
@@ -23,6 +23,9 @@
#include "sim-basics.h"
#include "sim-signal.h"
+
+typedef struct _sim_cpu SIM_CPU;
+
#include "msp430-sim.h"
#include "sim-base.h"
diff --git a/sim/sh/sim-main.h b/sim/sh/sim-main.h
index e67df28..e2e17d7 100644
--- a/sim/sh/sim-main.h
+++ b/sim/sh/sim-main.h
@@ -20,6 +20,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#define SIM_MAIN_H
#include "sim-basics.h"
+
+typedef struct _sim_cpu SIM_CPU;
+
#include "sim-base.h"
typedef struct
diff --git a/sim/sh64/sim-main.h b/sim/sh64/sim-main.h
index 7b24ab0..8fb595e 100644
--- a/sim/sh64/sim-main.h
+++ b/sim/sh64/sim-main.h
@@ -3,6 +3,11 @@
#ifndef SIM_MAIN_H
#define SIM_MAIN_H
+#define USING_SIM_BASE_H /* FIXME: quick hack */
+
+struct _sim_cpu; /* FIXME: should be in sim-basics.h */
+typedef struct _sim_cpu SIM_CPU;
+
/* sim-basics.h includes config.h but cgen-types.h must be included before
sim-basics.h and cgen-types.h needs config.h. */
#include "config.h"
diff --git a/sim/v850/sim-main.h b/sim/v850/sim-main.h
index 5127d28..16cbd97 100644
--- a/sim/v850/sim-main.h
+++ b/sim/v850/sim-main.h
@@ -16,6 +16,9 @@
#include "sim-basics.h"
#include "sim-signal.h"
#include "sim-fpu.h"
+
+typedef struct _sim_cpu SIM_CPU;
+
#include "sim-base.h"
#include "simops.h"
--
2.7.4

View File

@@ -0,0 +1,355 @@
From 77080d5f7fd47dd567f22807d336bc9111f93d7b Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Thu, 4 Aug 2016 23:44:24 +0200
Subject: [PATCH] Revert "sim: unify SIM_CPU definition"
This reverts commit 20bca71d82598a015de0991196e45f0b5f7ead81.
This change causes a redefinition of SIM_CPU on the Blackfin
architecture, as it is defined in both the common sim/common/sim-base.h
and the architecture specific sim/bfin/sim-main.h.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
sim/arm/sim-main.h | 3 +++
sim/avr/sim-main.h | 2 ++
sim/bfin/sim-main.h | 2 --
sim/common/sim-base.h | 2 --
sim/cr16/sim-main.h | 2 ++
sim/cris/sim-main.h | 3 +++
sim/d10v/sim-main.h | 2 ++
sim/frv/sim-main.h | 3 +++
sim/ft32/sim-main.h | 2 ++
sim/h8300/sim-main.h | 3 +++
sim/iq2000/sim-main.h | 3 +++
sim/lm32/sim-main.h | 3 +++
sim/m32r/sim-main.h | 3 +++
sim/m68hc11/sim-main.h | 3 +++
sim/mcore/sim-main.h | 2 ++
sim/microblaze/sim-main.h | 3 +++
sim/mips/sim-main.h | 3 +++
sim/mn10300/sim-main.h | 2 ++
sim/moxie/sim-main.h | 3 +++
sim/msp430/sim-main.h | 3 +++
sim/sh/sim-main.h | 3 +++
sim/sh64/sim-main.h | 3 +++
sim/v850/sim-main.h | 3 +++
23 files changed, 57 insertions(+), 4 deletions(-)
diff --git a/sim/arm/sim-main.h b/sim/arm/sim-main.h
index 3620810..f644122 100644
--- a/sim/arm/sim-main.h
+++ b/sim/arm/sim-main.h
@@ -20,6 +20,9 @@
#define SIM_MAIN_H
#include "sim-basics.h"
+
+typedef struct _sim_cpu SIM_CPU;
+
#include "sim-base.h"
#include "bfd.h"
diff --git a/sim/avr/sim-main.h b/sim/avr/sim-main.h
index 47155e3..cd41045 100644
--- a/sim/avr/sim-main.h
+++ b/sim/avr/sim-main.h
@@ -21,6 +21,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "sim-basics.h"
+typedef struct _sim_cpu SIM_CPU;
+
#include "sim-base.h"
struct _sim_cpu {
diff --git a/sim/bfin/sim-main.h b/sim/bfin/sim-main.h
index 51fb87e..cf1ed57 100644
--- a/sim/bfin/sim-main.h
+++ b/sim/bfin/sim-main.h
@@ -24,8 +24,6 @@
#include "sim-basics.h"
#include "sim-signal.h"
-/* TODO: Delete this. Need to convert bu32/etc... to common sim types
- and unwind the bfin-sim.h/machs.h include below first though. */
typedef struct _sim_cpu SIM_CPU;
#include "bfin-sim.h"
diff --git a/sim/common/sim-base.h b/sim/common/sim-base.h
index 350b352..1b849f4 100644
--- a/sim/common/sim-base.h
+++ b/sim/common/sim-base.h
@@ -72,8 +72,6 @@ typedef address_word sim_cia;
#define INVALID_INSTRUCTION_ADDRESS ((address_word)0 - 1)
#endif
-/* TODO: Probably should just delete SIM_CPU. */
-typedef struct _sim_cpu SIM_CPU;
typedef struct _sim_cpu sim_cpu;
#include "sim-module.h"
diff --git a/sim/cr16/sim-main.h b/sim/cr16/sim-main.h
index 208f917..78e3996 100644
--- a/sim/cr16/sim-main.h
+++ b/sim/cr16/sim-main.h
@@ -24,6 +24,8 @@
typedef long int word;
typedef unsigned long int uword;
+typedef struct _sim_cpu SIM_CPU;
+
#include "sim-base.h"
#include "bfd.h"
diff --git a/sim/cris/sim-main.h b/sim/cris/sim-main.h
index 8aab970..0ff907f 100644
--- a/sim/cris/sim-main.h
+++ b/sim/cris/sim-main.h
@@ -29,6 +29,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
one of -scache/-pbb. */
#define WITH_SCACHE_PBB 1
+struct _sim_cpu;
+typedef struct _sim_cpu SIM_CPU;
+
#include "symcat.h"
#include "sim-basics.h"
#include "cgen-types.h"
diff --git a/sim/d10v/sim-main.h b/sim/d10v/sim-main.h
index 76f06d8..fd5bd51 100644
--- a/sim/d10v/sim-main.h
+++ b/sim/d10v/sim-main.h
@@ -24,6 +24,8 @@
typedef long int word;
typedef unsigned long int uword;
+typedef struct _sim_cpu SIM_CPU;
+
#include "sim-base.h"
#include "bfd.h"
diff --git a/sim/frv/sim-main.h b/sim/frv/sim-main.h
index f95c1cc..701e208 100644
--- a/sim/frv/sim-main.h
+++ b/sim/frv/sim-main.h
@@ -19,6 +19,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* Main header for the frv. */
+struct _sim_cpu; /* FIXME: should be in sim-basics.h */
+typedef struct _sim_cpu SIM_CPU;
+
/* sim-basics.h includes config.h but cgen-types.h must be included before
sim-basics.h and cgen-types.h needs config.h. */
#include "config.h"
diff --git a/sim/ft32/sim-main.h b/sim/ft32/sim-main.h
index a15b247..eef0201 100644
--- a/sim/ft32/sim-main.h
+++ b/sim/ft32/sim-main.h
@@ -25,6 +25,8 @@
#include "sim-base.h"
#include "bfd.h"
+typedef struct _sim_cpu SIM_CPU;
+
#include "ft32-sim.h"
struct _sim_cpu {
diff --git a/sim/h8300/sim-main.h b/sim/h8300/sim-main.h
index 6dbc1ac..e95c4d9 100644
--- a/sim/h8300/sim-main.h
+++ b/sim/h8300/sim-main.h
@@ -87,6 +87,9 @@ enum h8_typecodes {
};
#include "sim-basics.h"
+
+typedef struct _sim_cpu SIM_CPU;
+
#include "sim-base.h"
/* Structure used to describe addressing */
diff --git a/sim/iq2000/sim-main.h b/sim/iq2000/sim-main.h
index 829f9bb..a770dc5 100644
--- a/sim/iq2000/sim-main.h
+++ b/sim/iq2000/sim-main.h
@@ -4,6 +4,9 @@
#ifndef SIM_MAIN_H
#define SIM_MAIN_H
+struct _sim_cpu; /* FIXME: should be in sim-basics.h */
+typedef struct _sim_cpu SIM_CPU;
+
/* sim-basics.h includes config.h but cgen-types.h must be included before
sim-basics.h and cgen-types.h needs config.h. */
#include "config.h"
diff --git a/sim/lm32/sim-main.h b/sim/lm32/sim-main.h
index 20e2b71..eeffde3 100644
--- a/sim/lm32/sim-main.h
+++ b/sim/lm32/sim-main.h
@@ -25,6 +25,9 @@
#define WITH_SCACHE_PBB 1
+struct _sim_cpu; /* FIXME: should be in sim-basics.h */
+typedef struct _sim_cpu SIM_CPU;
+
#include "symcat.h"
#include "sim-basics.h"
#include "cgen-types.h"
diff --git a/sim/m32r/sim-main.h b/sim/m32r/sim-main.h
index 5b24ce8..39f7ecc 100644
--- a/sim/m32r/sim-main.h
+++ b/sim/m32r/sim-main.h
@@ -8,6 +8,9 @@
one of -scache/-pbb. */
#define WITH_SCACHE_PBB 1
+struct _sim_cpu; /* FIXME: should be in sim-basics.h */
+typedef struct _sim_cpu SIM_CPU;
+
#include "symcat.h"
#include "sim-basics.h"
#include "cgen-types.h"
diff --git a/sim/m68hc11/sim-main.h b/sim/m68hc11/sim-main.h
index b940df7..0aa096f 100644
--- a/sim/m68hc11/sim-main.h
+++ b/sim/m68hc11/sim-main.h
@@ -21,6 +21,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#define _SIM_MAIN_H
#include "sim-basics.h"
+
+typedef struct _sim_cpu SIM_CPU;
+
#include "sim-signal.h"
#include "sim-base.h"
diff --git a/sim/mcore/sim-main.h b/sim/mcore/sim-main.h
index fce26e8..fa7ee9f 100644
--- a/sim/mcore/sim-main.h
+++ b/sim/mcore/sim-main.h
@@ -24,6 +24,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
typedef long int word;
typedef unsigned long int uword;
+typedef struct _sim_cpu SIM_CPU;
+
#include "sim-base.h"
#include "bfd.h"
diff --git a/sim/microblaze/sim-main.h b/sim/microblaze/sim-main.h
index 3a7b088..9e6bf01 100644
--- a/sim/microblaze/sim-main.h
+++ b/sim/microblaze/sim-main.h
@@ -20,6 +20,9 @@
#include "microblaze.h"
#include "sim-basics.h"
+
+typedef struct _sim_cpu SIM_CPU;
+
#include "sim-base.h"
/* The machine state.
diff --git a/sim/mips/sim-main.h b/sim/mips/sim-main.h
index 0ea1234..eedbfc9 100644
--- a/sim/mips/sim-main.h
+++ b/sim/mips/sim-main.h
@@ -27,6 +27,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
mips_core_signal ((SD), (CPU), (CIA), (MAP), (NR_BYTES), (ADDR), (TRANSFER), (ERROR))
#include "sim-basics.h"
+
+typedef struct _sim_cpu SIM_CPU;
+
#include "sim-base.h"
#include "bfd.h"
diff --git a/sim/mn10300/sim-main.h b/sim/mn10300/sim-main.h
index 7171c03..3a917e7 100644
--- a/sim/mn10300/sim-main.h
+++ b/sim/mn10300/sim-main.h
@@ -38,6 +38,8 @@
#include "itable.h"
#include "idecode.h"
+typedef struct _sim_cpu SIM_CPU;
+
#define SIM_CORE_SIGNAL(SD,CPU,CIA,MAP,NR_BYTES,ADDR,TRANSFER,ERROR) \
mn10300_core_signal ((SD), (CPU), (CIA), (MAP), (NR_BYTES), (ADDR), (TRANSFER), (ERROR))
diff --git a/sim/moxie/sim-main.h b/sim/moxie/sim-main.h
index 7091f21..b6b5ca3 100644
--- a/sim/moxie/sim-main.h
+++ b/sim/moxie/sim-main.h
@@ -21,6 +21,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#define SIM_MAIN_H
#include "sim-basics.h"
+
+typedef struct _sim_cpu SIM_CPU;
+
#include "sim-base.h"
#include "bfd.h"
diff --git a/sim/msp430/sim-main.h b/sim/msp430/sim-main.h
index 4a2ab22..c7cdc5e 100644
--- a/sim/msp430/sim-main.h
+++ b/sim/msp430/sim-main.h
@@ -23,6 +23,9 @@
#include "sim-basics.h"
#include "sim-signal.h"
+
+typedef struct _sim_cpu SIM_CPU;
+
#include "msp430-sim.h"
#include "sim-base.h"
diff --git a/sim/sh/sim-main.h b/sim/sh/sim-main.h
index 4af7b03..6ab42a6 100644
--- a/sim/sh/sim-main.h
+++ b/sim/sh/sim-main.h
@@ -20,6 +20,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#define SIM_MAIN_H
#include "sim-basics.h"
+
+typedef struct _sim_cpu SIM_CPU;
+
#include "sim-base.h"
typedef struct
diff --git a/sim/sh64/sim-main.h b/sim/sh64/sim-main.h
index da8f516..5fd7095 100644
--- a/sim/sh64/sim-main.h
+++ b/sim/sh64/sim-main.h
@@ -3,6 +3,9 @@
#ifndef SIM_MAIN_H
#define SIM_MAIN_H
+struct _sim_cpu; /* FIXME: should be in sim-basics.h */
+typedef struct _sim_cpu SIM_CPU;
+
/* sim-basics.h includes config.h but cgen-types.h must be included before
sim-basics.h and cgen-types.h needs config.h. */
#include "config.h"
diff --git a/sim/v850/sim-main.h b/sim/v850/sim-main.h
index e7276a6..1a45f97 100644
--- a/sim/v850/sim-main.h
+++ b/sim/v850/sim-main.h
@@ -9,6 +9,9 @@
#include "sim-basics.h"
#include "sim-signal.h"
#include "sim-fpu.h"
+
+typedef struct _sim_cpu SIM_CPU;
+
#include "sim-base.h"
#include "simops.h"
--
2.7.4

View File

@@ -1,36 +0,0 @@
From cbc39812c1721d7edd20285134fdf748d0f26127 Mon Sep 17 00:00:00 2001
From: Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
Date: Fri, 23 May 2014 09:01:14 +0100
Subject: [PATCH] Include asm/ptrace.h for linux-aarch64-low.c
A recent change to glibc removed asm/ptrace.h from user.h for AArch64.
This meant that cross-native builds of gdbserver using trunk glibc broke
because linux-aarch64-low.c because user_hwdebug_state couldn't be found.
This is like commit #036cd38182bde32d8297b630cd5c861d53b8949e
2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
* linux-aarch64-low.c (asm/ptrace.h): Include.
[Romain:
- rebase on top of 7.7.1]
Signed-off-by: Romain Naour <romain.naour@openwide.fr>
---
gdb/gdbserver/linux-aarch64-low.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/gdb/gdbserver/linux-aarch64-low.c b/gdb/gdbserver/linux-aarch64-low.c
index 1b0da6c..ba66bc8 100644
--- a/gdb/gdbserver/linux-aarch64-low.c
+++ b/gdb/gdbserver/linux-aarch64-low.c
@@ -26,6 +26,7 @@
#include <signal.h>
#include <sys/user.h>
#include <sys/ptrace.h>
+#include <asm/ptrace.h>
#include <sys/uio.h>
#include "gdb_proc_service.h"
--
1.9.3

View File

@@ -1,37 +0,0 @@
From 9c45794265a9dc9aebfbdc520d378dfc8fb7b694 Mon Sep 17 00:00:00 2001
From: Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
Date: Thu, 22 May 2014 16:07:20 +0100
Subject: [PATCH] Include asm/ptrace.h in aarch64-linux-nat.c
A recent change to glibc removed asm/ptrace.h from user.h for
AArch64. This meant that cross-native builds of gdb using trunk
glibc broke because aarch64-linux-nat.c because user_hwdebug_state
couldn't be found.
Fixed by including asm/ptrace.h like other ports.
2014-05-22 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
* aarch64-linux-nat.c (asm/ptrace.h): Include.
[Romain: rebase on top of 7.7.1]
Signed-off-by: Romain Naour <romain.naour@openwide.fr>
---
gdb/aarch64-linux-nat.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/gdb/aarch64-linux-nat.c b/gdb/aarch64-linux-nat.c
index 31c26c6..710aa9b 100644
--- a/gdb/aarch64-linux-nat.c
+++ b/gdb/aarch64-linux-nat.c
@@ -33,6 +33,7 @@
#include <sys/ptrace.h>
#include <sys/utsname.h>
+#include <asm/ptrace.h>
#include "gregset.h"
--
1.9.3

View File

@@ -1,34 +0,0 @@
From 59432cbfe267ad89b7cfc73dcd702b8282ef4e9d Mon Sep 17 00:00:00 2001
From: Romain Naour <romain.naour@openwide.fr>
Date: Fri, 10 Apr 2015 22:58:07 +0200
Subject: [PATCH] gdbserver: fix uClibc whithout MMU.
Since commit d86d4aafd4fa22fa4cccb83253fb187b03f97f48, the pid
must be retrieved from current_inferior.
The change has not been made in the function linux_read_offsets().
Fixes:
http://autobuild.buildroot.net/results/9e4/9e4df085319e346803c26c65478accb27eb950ae/build-end.log
Signed-off-by: Romain Naour <romain.naour@openwide.fr>
---
gdb/gdbserver/linux-low.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
index 1a40897..71d078a 100644
--- a/gdb/gdbserver/linux-low.c
+++ b/gdb/gdbserver/linux-low.c
@@ -4933,7 +4933,7 @@ static int
linux_read_offsets (CORE_ADDR *text_p, CORE_ADDR *data_p)
{
unsigned long text, text_end, data;
- int pid = lwpid_of (get_thread_lwp (current_inferior));
+ int pid = lwpid_of (current_inferior);
errno = 0;
--
1.9.3

View File

@@ -1,47 +0,0 @@
From deb44829ecc1dd38275af0fcf91acd319e227a89 Mon Sep 17 00:00:00 2001
From: Max Filippov <jcmvbkbc@gmail.com>
Date: Fri, 17 Apr 2015 03:07:41 +0300
Subject: [PATCH 1/2] gdbserver/xtensa: drop xtensa_usrregs_info
xtensa_usrregs_info refers to undefined variables xtensa_num_regs and
xtensa_regmap. Drop xtensa_usrregs_info and replace pointer to usrregs
in regs_info with NULL since all registers are read/set through regsets.
2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
gdb/gdbserver/
* linux-xtensa-low.c (xtensa_usrregs_info): Remove.
(regs_info): Replace usrregs pointer with NULL.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
Backported from: deb44829ecc1dd38275af0fcf91acd319e227a89
Changes to ChangeLog are dropped.
gdb/gdbserver/linux-xtensa-low.c | 8 +-------
2 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/gdb/gdbserver/linux-xtensa-low.c b/gdb/gdbserver/linux-xtensa-low.c
index f7fafaf..e786da5 100644
--- a/gdb/gdbserver/linux-xtensa-low.c
+++ b/gdb/gdbserver/linux-xtensa-low.c
@@ -186,16 +186,10 @@ static struct regsets_info xtensa_regsets_info =
NULL, /* disabled_regsets */
};
-static struct usrregs_info xtensa_usrregs_info =
- {
- xtensa_num_regs,
- xtensa_regmap,
- };
-
static struct regs_info regs_info =
{
NULL, /* regset_bitmap */
- &xtensa_usrregs_info,
+ NULL, /* usrregs */
&xtensa_regsets_info
};
--
1.8.1.4

View File

@@ -1,46 +0,0 @@
From a2d5a9d76f2366ed93095fc5a63eafa06b22f808 Mon Sep 17 00:00:00 2001
From: Max Filippov <jcmvbkbc@gmail.com>
Date: Fri, 17 Apr 2015 02:52:50 +0300
Subject: [PATCH 2/2] gdbserver/xtensa: fix typo in XCHAL_HAVE_LOOPS
This fixes lbeg/lend/lcount registers handling through gdbserver.
2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
gdb/gdbserver/
* linux-xtensa-low.c (xtensa_fill_gregset)
(xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
XCHAL_HAVE_LOOP.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
Backported from: a2d5a9d76f2366ed93095fc5a63eafa06b22f808
Changes to ChangeLog are dropped.
gdb/gdbserver/linux-xtensa-low.c | 4 ++--
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/gdb/gdbserver/linux-xtensa-low.c b/gdb/gdbserver/linux-xtensa-low.c
index e786da5..4daccee 100644
--- a/gdb/gdbserver/linux-xtensa-low.c
+++ b/gdb/gdbserver/linux-xtensa-low.c
@@ -59,7 +59,7 @@ xtensa_fill_gregset (struct regcache *regcache, void *buf)
/* Loop registers, if hardware has it. */
-#if XCHAL_HAVE_LOOP
+#if XCHAL_HAVE_LOOPS
collect_register_by_name (regcache, "lbeg", (char*)&rset[R_LBEG]);
collect_register_by_name (regcache, "lend", (char*)&rset[R_LEND]);
collect_register_by_name (regcache, "lcount", (char*)&rset[R_LCOUNT]);
@@ -94,7 +94,7 @@ xtensa_store_gregset (struct regcache *regcache, const void *buf)
/* Loop registers, if hardware has it. */
-#if XCHAL_HAVE_LOOP
+#if XCHAL_HAVE_LOOPS
supply_register_by_name (regcache, "lbeg", (char*)&rset[R_LBEG]);
supply_register_by_name (regcache, "lend", (char*)&rset[R_LEND]);
supply_register_by_name (regcache, "lcount", (char*)&rset[R_LCOUNT]);
--
1.8.1.4

View File

@@ -0,0 +1,70 @@
From d41401ace01c234f42697e190a2ac95991780626 Mon Sep 17 00:00:00 2001
From: Doug Evans <dje@google.com>
Date: Mon, 26 Oct 2015 13:20:12 -0700
Subject: [PATCH] Add some casts for building on musl.
gdb/ChangeLog:
* linux-thread-db.c (find_new_threads_callback): Cast ti.ti_tid to
unsigned long for debug_printf.
(thread_db_pid_to_str): Ditto.
gdb/gdbserver/ChangeLog:
* thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
for debug_printf.
(attach_thread, find_new_threads_callback): Ditto.
[Arnout: removed the parts that don't apply, including ChangeLog]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
gdb/ChangeLog | 5 +++++
gdb/gdbserver/ChangeLog | 6 ++++++
gdb/gdbserver/thread-db.c | 9 +++++----
gdb/linux-thread-db.c | 5 +++--
4 files changed, 19 insertions(+), 6 deletions(-)
diff --git a/gdb/gdbserver/thread-db.c b/gdb/gdbserver/thread-db.c
index ffe722d..3df10ff 100644
--- a/gdb/gdbserver/thread-db.c
+++ b/gdb/gdbserver/thread-db.c
@@ -278,7 +278,7 @@ find_one_thread (ptid_t ptid)
if (debug_threads)
debug_printf ("Found thread %ld (LWP %d)\n",
- ti.ti_tid, ti.ti_lid);
+ (unsigned long) ti.ti_tid, ti.ti_lid);
if (lwpid != ti.ti_lid)
{
@@ -319,12 +319,12 @@ attach_thread (const td_thrhandle_t *th_p, td_thrinfo_t *ti_p)
if (debug_threads)
debug_printf ("Attaching to thread %ld (LWP %d)\n",
- ti_p->ti_tid, ti_p->ti_lid);
+ (unsigned long) ti_p->ti_tid, ti_p->ti_lid);
err = linux_attach_lwp (ptid);
if (err != 0)
{
warning ("Could not attach to thread %ld (LWP %d): %s\n",
- ti_p->ti_tid, ti_p->ti_lid,
+ (unsigned long) ti_p->ti_tid, ti_p->ti_lid,
linux_ptrace_attach_fail_reason_string (ptid, err));
return 0;
}
diff --git a/gdb/linux-thread-db.c b/gdb/linux-thread-db.c
index 66e9595..41db29a 100644
--- a/gdb/linux-thread-db.c
+++ b/gdb/linux-thread-db.c
@@ -1816,7 +1817,7 @@ thread_db_pid_to_str (struct target_ops *ops, ptid_t ptid)
tid = thread_info->priv->tid;
snprintf (buf, sizeof (buf), "Thread 0x%lx (LWP %ld)",
- tid, ptid_get_lwp (ptid));
+ (unsigned long) tid, ptid_get_lwp (ptid));
return buf;
}
--
1.9.4

View File

@@ -0,0 +1,63 @@
From 963843d4d07aef6caa296dacf191f8adc9518596 Mon Sep 17 00:00:00 2001
From: Doug Evans <dje@google.com>
Date: Mon, 26 Oct 2015 13:24:01 -0700
Subject: [PATCH] musl: Move W_STOPCODE to common/gdb_wait.h.
gdb/ChangeLog:
* common/gdb_wait.h (W_STOPCODE): Define, moved here from
gdbserver/linux-low.c.
(WSETSTOP): Simplify.
gdb/gdbserver/ChangeLog:
* linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
[Arnout: removed the parts that don't apply, including ChangeLog]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
gdb/ChangeLog | 6 ++++++
gdb/common/gdb_wait.h | 8 ++++----
gdb/gdbserver/ChangeLog | 4 ++++
gdb/gdbserver/linux-low.c | 4 ----
4 files changed, 14 insertions(+), 8 deletions(-)
diff --git a/gdb/common/gdb_wait.h b/gdb/common/gdb_wait.h
index 9b250d2..412f813 100644
--- a/gdb/common/gdb_wait.h
+++ b/gdb/common/gdb_wait.h
@@ -85,12 +85,12 @@
# endif
#endif
+#ifndef W_STOPCODE
+#define W_STOPCODE(sig) ((sig) << 8 | 0x7f)
+#endif
+
#ifndef WSETSTOP
-# ifdef W_STOPCODE
#define WSETSTOP(w,sig) ((w) = W_STOPCODE(sig))
-# else
-#define WSETSTOP(w,sig) ((w) = (0177 | ((sig) << 8)))
-# endif
#endif
/* For native GNU/Linux we may use waitpid and the __WCLONE option.
diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
index 0c552b8..7ed67c7 100644
--- a/gdb/gdbserver/linux-low.c
+++ b/gdb/gdbserver/linux-low.c
@@ -70,10 +70,6 @@
#define O_LARGEFILE 0
#endif
-#ifndef W_STOPCODE
-#define W_STOPCODE(sig) ((sig) << 8 | 0x7f)
-#endif
-
/* This is the kernel's hard limit. Not to be confused with
SIGRTMIN. */
#ifndef __SIGRTMIN
--
1.9.4

View File

@@ -0,0 +1,58 @@
From 682b25469e66ea45b214e95962671373983c118f Mon Sep 17 00:00:00 2001
From: Doug Evans <dje@google.com>
Date: Mon, 26 Oct 2015 13:30:57 -0700
Subject: [PATCH] Move __SIGRTMIN.
gdb/ChangeLog:
* nat/linux-nat.h (__SIGRTMIN): Move here from gdbserver/linux-low.c.
gdb/gdbserver/ChangeLog:
* linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
[Arnout: removed the parts that don't apply, including ChangeLog]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
gdb/ChangeLog | 4 ++++
gdb/gdbserver/ChangeLog | 4 ++++
gdb/gdbserver/linux-low.c | 6 ------
gdb/nat/linux-nat.h | 5 +++++
4 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
index 7ed67c7..e778c4c 100644
--- a/gdb/gdbserver/linux-low.c
+++ b/gdb/gdbserver/linux-low.c
@@ -70,12 +70,6 @@
#define O_LARGEFILE 0
#endif
-/* This is the kernel's hard limit. Not to be confused with
- SIGRTMIN. */
-#ifndef __SIGRTMIN
-#define __SIGRTMIN 32
-#endif
-
/* Some targets did not define these ptrace constants from the start,
so gdbserver defines them locally here. In the future, these may
be removed after they are added to asm/ptrace.h. */
diff --git a/gdb/nat/linux-nat.h b/gdb/nat/linux-nat.h
index 0633fa9..70e6274 100644
--- a/gdb/nat/linux-nat.h
+++ b/gdb/nat/linux-nat.h
@@ -25,6 +25,11 @@
struct lwp_info;
struct arch_lwp_info;
+/* This is the kernel's hard limit. Not to be confused with SIGRTMIN. */
+#ifndef __SIGRTMIN
+#define __SIGRTMIN 32
+#endif
+
/* Unlike other extended result codes, WSTOPSIG (status) on
PTRACE_O_TRACESYSGOOD syscall events doesn't return SIGTRAP, but
instead SIGTRAP with bit 7 set. */
--
1.9.4

View File

@@ -23,27 +23,29 @@ config BR2_PACKAGE_HOST_GDB_PYTHON
help
This option enables the Python support in the cross gdb.
config BR2_PACKAGE_HOST_GDB_SIM
bool "Simulator support"
depends on !BR2_arc
help
This option enables the simulator support in the cross gdb.
choice
prompt "GDB debugger Version"
depends on !BR2_arc
depends on !BR2_microblaze
default BR2_GDB_VERSION_7_9
default BR2_GDB_VERSION_7_10
help
Select the version of gdb you wish to use.
config BR2_GDB_VERSION_7_7
bool "gdb 7.7.x"
depends on BR2_DEPRECATED_SINCE_2015_05
config BR2_GDB_VERSION_7_8
bool "gdb 7.8.x"
config BR2_GDB_VERSION_7_9
bool "gdb 7.9.x"
config BR2_GDB_VERSION_7_10
bool "gdb 7.10.x"
config BR2_GDB_VERSION_7_11
bool "gdb 7.11.x"
endchoice
endif
@@ -52,9 +54,8 @@ endif
config BR2_GDB_VERSION
string
depends on BR2_PACKAGE_GDB || BR2_PACKAGE_HOST_GDB
default "arc-2015.12-gdb" if BR2_arc
default "arc-2016.03-gdb" if BR2_arc
default "6be65fb56ea6694a9260733a536a023a1e2d4d57" if BR2_microblaze
default "7.7.1" if BR2_GDB_VERSION_7_7
default "7.8.2" if BR2_GDB_VERSION_7_8
default "7.9.1" if BR2_GDB_VERSION_7_9 || !BR2_PACKAGE_HOST_GDB
default "7.10.1" if BR2_GDB_VERSION_7_10
default "7.9.1" if BR2_GDB_VERSION_7_9
default "7.10.1" if BR2_GDB_VERSION_7_10 || !BR2_PACKAGE_HOST_GDB
default "7.11.1" if BR2_GDB_VERSION_7_11

View File

@@ -1,8 +1,8 @@
# From ftp://gcc.gnu.org/pub/gdb/releases/sha512.sum
sha512 887b9b726dae8f6e3e5e41574460a67e4f9002b0d47bc985dcf63bdf3518397a90b6a208cb5b19e5ed2341715ad75cfeed4df4fb423f39f74218e36bc87f1cab gdb-7.7.1.tar.bz2
sha512 face5bf1b4ce144fc8604fc84620beed956177a11fd632b4e41906fc7f632910b2b43a50e6cfdfd6cbd876ee527c813bddab8df29dc560a6c36694cdb8edc4e4 gdb-7.8.2.tar.xz
sha512 eebdf88b24e52e792b8a4b89ea85790de72b462a7810b44975fdf4232c068f353b15506071f450102a9d4bcecdde8e93dc3748a10699b7f73f3e04fb2d9d8414 gdb-7.9.1.tar.xz
sha512 17a5138277a31685a5c2a841cb47ed9bc4626ea617b8ca77750513b300299f4fbbffe504958b5372de610dcb952c679cf8fa9c1bdadd380294fbf59b6e366010 gdb-7.10.1.tar.xz
# No hash for the ARC & microblaze variants, comes from the github-helper:
none xxx gdb-arc-2015.12-gdb.tar.gz
none xxx gdb-6be65fb56ea6694a9260733a536a023a1e2d4d57.tar.gz
sha512 f80ec6c8a0f0b54c8b945666e875809174402b7e121efb378ebac931a91f9a1cc0048568f8e2f42ae8ae2392ff8d144c2e51d41c7398935017450aaf29838360 gdb-7.11.1.tar.xz
# Locally calculated (fetched from Github)
sha512 0a467091d4b01fbecabb4b8da1cb743025c70e7f4874a0b5c8fa2ec623569a39bde6762b91806de0be6e63711aeb6909715cfbe43860de73d8aec6159a9f10a7 gdb-6be65fb56ea6694a9260733a536a023a1e2d4d57.tar.gz
sha512 1abef1357896c2b57cfa7f7414eedc49d0de26b54321c680c2d027b1a27ec453d421e7f89a5281336047542379fd4820685802059efbd32b87c5ccffbaf2bd16 gdb-arc-2016.03-gdb.tar.gz

View File

@@ -11,16 +11,13 @@ GDB_SOURCE = gdb-$(GDB_VERSION).tar.xz
ifeq ($(BR2_arc),y)
GDB_SITE = $(call github,foss-for-synopsys-dwc-arc-processors,binutils-gdb,$(GDB_VERSION))
GDB_SOURCE = gdb-$(GDB_VERSION).tar.gz
GDB_FROM_GIT = y
endif
ifeq ($(BR2_microblaze),y)
GDB_SITE = $(call github,Xilinx,gdb,$(GDB_VERSION))
GDB_SOURCE = gdb-$(GDB_VERSION).tar.gz
endif
# Use .tar.bz2 for 7.7.x since there was no .tar.xz release back then
ifneq ($(filter 7.7.%,$(GDB_VERSION)),)
GDB_SOURCE = gdb-$(GDB_VERSION).tar.bz2
GDB_FROM_GIT = y
endif
GDB_LICENSE = GPLv2+, LGPLv2+, GPLv3+, LGPLv3+
@@ -40,6 +37,13 @@ endif
# also need ncurses.
HOST_GDB_DEPENDENCIES = host-expat host-ncurses
# Starting with gdb 7.10, gdb wants to re-generate its documentation.
# We were trying to avoid that by patching the Makefiles, but it wasn't
# working in all situations. So, we simply add a dependency on
# host-texinfo in all case.
GDB_DEPENDENCIES += host-texinfo
HOST_GDB_DEPENDENCIES += host-texinfo
# Apply the Xtensa specific patches
XTENSA_CORE_NAME = $(call qstrip, $(BR2_XTENSA_CORE_NAME))
ifneq ($(XTENSA_CORE_NAME),)
@@ -51,18 +55,10 @@ GDB_PRE_PATCH_HOOKS += GDB_XTENSA_PRE_PATCH
HOST_GDB_PRE_PATCH_HOOKS += GDB_XTENSA_PRE_PATCH
endif
# Prevent gdb to build the documentation
define GDB_DISABLE_DOC
$(SED) '/^SUBDIRS =/ s/doc//' $(@D)/gdb/Makefile.in
if test -e $(@D)/bfd/doc/Makefile.in ; then \
$(SED) 's/^INFO_DEPS =.*$$/INFO_DEPS =/' $(@D)/bfd/doc/Makefile.in ; \
fi
if test -e $(@D)/gprof/Makefile.in ; then \
$(SED) 's/^INFO_DEPS =.*$$/INFO_DEPS =/' $(@D)/gprof/Makefile.in ; \
fi
endef
GDB_PRE_CONFIGURE_HOOKS += GDB_DISABLE_DOC
HOST_GDB_PRE_CONFIGURE_HOOKS += GDB_DISABLE_DOC
ifeq ($(GDB_FROM_GIT),y)
GDB_DEPENDENCIES += host-flex host-bison
HOST_GDB_DEPENDENCIES += host-flex host-bison
endif
# When gdb sources are fetched from the binutils-gdb repository, they
# also contain the binutils sources, but binutils shouldn't be built,
@@ -72,6 +68,13 @@ GDB_DISABLE_BINUTILS_CONF_OPTS = \
--disable-ld \
--disable-gas
# Starting with gdb 7.11, the bundled gnulib tries to use
# rpl_gettimeofday (gettimeofday replacement) due to the code being
# unable to determine if the replacement function should be used or
# not when cross-compiling with uClibc or musl as C libraries. So use
# gl_cv_func_gettimeofday_clobber=no to not use rpl_gettimeofday,
# assuming musl and uClibc have a properly working gettimeofday
# implementation.
GDB_CONF_ENV = \
ac_cv_type_uintptr_t=yes \
gt_cv_func_gettext_libintl=yes \
@@ -81,7 +84,8 @@ GDB_CONF_ENV = \
bash_cv_must_reinstall_sighandlers=no \
bash_cv_func_sigsetjmp=present \
bash_cv_have_mbstate_t=yes \
gdb_cv_func_sigsetjmp=yes
gdb_cv_func_sigsetjmp=yes \
gl_cv_func_gettimeofday_clobber=no
# The shared only build is not supported by gdb, so enable static build for
# build-in libraries with --enable-static.
@@ -120,6 +124,7 @@ endif
ifeq ($(BR2_PACKAGE_XZ),y)
GDB_CONF_OPTS += --with-lzma
GDB_CONF_OPTS += --with-liblzma-prefix=$(STAGING_DIR)/usr
GDB_DEPENDENCIES += xz
else
GDB_CONF_OPTS += --without-lzma
@@ -167,8 +172,7 @@ HOST_GDB_CONF_OPTS = \
--enable-threads \
--disable-werror \
--without-included-gettext \
$(GDB_DISABLE_BINUTILS_CONF_OPTS) \
--disable-sim
$(GDB_DISABLE_BINUTILS_CONF_OPTS)
ifeq ($(BR2_PACKAGE_HOST_GDB_TUI),y)
HOST_GDB_CONF_OPTS += --enable-tui
@@ -183,6 +187,20 @@ else
HOST_GDB_CONF_OPTS += --without-python
endif
# workaround a bug if in-tree build is used for bfin sim
define HOST_GDB_BFIN_SIM_WORKAROUND
$(RM) $(@D)/sim/common/tconfig.h
endef
ifeq ($(BR2_PACKAGE_HOST_GDB_SIM),y)
HOST_GDB_CONF_OPTS += --enable-sim
ifeq ($(BR2_bfin),y)
HOST_GDB_PRE_CONFIGURE_HOOKS += HOST_GDB_BFIN_SIM_WORKAROUND
endif
else
HOST_GDB_CONF_OPTS += --disable-sim
endif
# legacy $arch-linux-gdb symlink
define HOST_GDB_ADD_SYMLINK
cd $(HOST_DIR)/usr/bin && \