update buildroot to 2017.02.11
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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, ®s) != 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, ®s) != 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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
From 12a0b8d81e1fda6ba98abdce8d6f09f9555ebcf5 Mon Sep 17 00:00:00 2001
|
||||
From: Andre McCurdy <amccurdy@gmail.com>
|
||||
Date: Sat, 30 Apr 2016 15:29:06 -0700
|
||||
Subject: [PATCH] use <asm/sgidefs.h>
|
||||
|
||||
Build fix for MIPS with musl libc
|
||||
|
||||
The MIPS specific header <sgidefs.h> is provided by glibc and uclibc
|
||||
but not by musl. Regardless of the libc, the kernel headers provide
|
||||
<asm/sgidefs.h> which provides the same definitions, so use that
|
||||
instead.
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
[Vincent:
|
||||
Taken from https://sourceware.org/bugzilla/show_bug.cgi?id=21070
|
||||
Patch has been adapted to apply on 7.10.1.]
|
||||
|
||||
Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
|
||||
---
|
||||
gdb/mips-linux-nat.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gdb/mips-linux-nat.c b/gdb/mips-linux-nat.c
|
||||
index 9f6d697..8f57bb2 100644
|
||||
--- a/gdb/mips-linux-nat.c
|
||||
+++ b/gdb/mips-linux-nat.c
|
||||
@@ -31,7 +31,7 @@
|
||||
#include "gdb_proc_service.h"
|
||||
#include "gregset.h"
|
||||
|
||||
-#include <sgidefs.h>
|
||||
+#include <asm/sgidefs.h>
|
||||
#include <sys/ptrace.h>
|
||||
#include <asm/ptrace.h>
|
||||
|
||||
--
|
||||
2.13.1
|
||||
|
||||
@@ -0,0 +1,155 @@
|
||||
From 7a09ed68e203a813d88fb7fc6eeb1e92209561a5 Mon Sep 17 00:00:00 2001
|
||||
From: Mike Frysinger <vapier@gentoo.org>
|
||||
Date: Mon, 8 Aug 2016 13:06:49 +0800
|
||||
Subject: [PATCH] sim: bfin: split out common mach/model defines into arch.h
|
||||
[PR sim/20438]
|
||||
|
||||
The current machs.h mixes common enums with Blackfin-specific defines.
|
||||
This causes us troubles with header inclusion order such that we can't
|
||||
drop the old SIM_CPU typedef (which is duplicated in common code). By
|
||||
splitting the two up, we can unwind this dependency chain, and drop the
|
||||
old typedef. It also fixes building with older gcc versions.
|
||||
|
||||
[Romain: backport from gdb 7.12]
|
||||
Signed-off-by: Romain Naour <romain.naour@gmail.com>
|
||||
|
||||
---
|
||||
sim/bfin/ChangeLog | 9 +++++++++
|
||||
sim/bfin/arch.h | 44 ++++++++++++++++++++++++++++++++++++++++++++
|
||||
sim/bfin/machs.h | 20 --------------------
|
||||
sim/bfin/sim-main.h | 8 ++------
|
||||
4 files changed, 55 insertions(+), 26 deletions(-)
|
||||
create mode 100644 sim/bfin/arch.h
|
||||
|
||||
diff --git a/sim/bfin/ChangeLog b/sim/bfin/ChangeLog
|
||||
index 3dea7c9..a995436 100644
|
||||
--- a/sim/bfin/ChangeLog
|
||||
+++ b/sim/bfin/ChangeLog
|
||||
@@ -1,3 +1,12 @@
|
||||
+2016-08-13 Mike Frysinger <vapier@gentoo.org>
|
||||
+
|
||||
+ PR sim/20438
|
||||
+ * machs.h (MODEL_TYPE, MACH_ATTR, BFIN_INSN_*): Move ...
|
||||
+ * arch.h: ... to this new header file.
|
||||
+ * sim-main.h (SIM_CPU): Delete.
|
||||
+ Include arch.h before sim-base.h, and move sim-base.h before
|
||||
+ bfin-sim.h.
|
||||
+
|
||||
2016-01-10 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* config.in, configure: Regenerate.
|
||||
diff --git a/sim/bfin/arch.h b/sim/bfin/arch.h
|
||||
new file mode 100644
|
||||
index 0000000..b86d3e9
|
||||
--- /dev/null
|
||||
+++ b/sim/bfin/arch.h
|
||||
@@ -0,0 +1,44 @@
|
||||
+/* Simulator for Analog Devices Blackfin processors.
|
||||
+
|
||||
+ Copyright (C) 2005-2016 Free Software Foundation, Inc.
|
||||
+ Contributed by Analog Devices, Inc.
|
||||
+
|
||||
+ This file is part of simulators.
|
||||
+
|
||||
+ 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 BFIN_ARCH_H
|
||||
+#define BFIN_ARCH_H
|
||||
+
|
||||
+typedef enum model_type {
|
||||
+#define P(n) MODEL_BF##n,
|
||||
+#include "proc_list.def"
|
||||
+#undef P
|
||||
+ MODEL_MAX
|
||||
+} MODEL_TYPE;
|
||||
+
|
||||
+typedef enum mach_attr {
|
||||
+ MACH_BASE,
|
||||
+ MACH_BFIN,
|
||||
+ MACH_MAX
|
||||
+} MACH_ATTR;
|
||||
+
|
||||
+enum {
|
||||
+#define I(insn) BFIN_INSN_##insn,
|
||||
+#include "insn_list.def"
|
||||
+#undef I
|
||||
+ BFIN_INSN_MAX
|
||||
+};
|
||||
+
|
||||
+#endif
|
||||
diff --git a/sim/bfin/machs.h b/sim/bfin/machs.h
|
||||
index 0372982..36819ae 100644
|
||||
--- a/sim/bfin/machs.h
|
||||
+++ b/sim/bfin/machs.h
|
||||
@@ -21,19 +21,6 @@
|
||||
#ifndef _BFIN_MACHS_H_
|
||||
#define _BFIN_MACHS_H_
|
||||
|
||||
-typedef enum model_type {
|
||||
-#define P(n) MODEL_BF##n,
|
||||
-#include "proc_list.def"
|
||||
-#undef P
|
||||
- MODEL_MAX
|
||||
-} MODEL_TYPE;
|
||||
-
|
||||
-typedef enum mach_attr {
|
||||
- MACH_BASE,
|
||||
- MACH_BFIN,
|
||||
- MACH_MAX
|
||||
-} MACH_ATTR;
|
||||
-
|
||||
#define CPU_MODEL_NUM(cpu) MODEL_NUM (CPU_MODEL (cpu))
|
||||
|
||||
/* XXX: Some of this probably belongs in CPU_MODEL. */
|
||||
@@ -46,13 +33,6 @@ void bfin_model_cpu_init (SIM_DESC, SIM_CPU *);
|
||||
bu32 bfin_model_get_chipid (SIM_DESC);
|
||||
bu32 bfin_model_get_dspid (SIM_DESC);
|
||||
|
||||
-enum {
|
||||
-#define I(insn) BFIN_INSN_##insn,
|
||||
-#include "insn_list.def"
|
||||
-#undef I
|
||||
- BFIN_INSN_MAX
|
||||
-};
|
||||
-
|
||||
#define BFIN_COREMMR_CEC_BASE 0xFFE02100
|
||||
#define BFIN_COREMMR_CEC_SIZE (4 * 5)
|
||||
#define BFIN_COREMMR_CTIMER_BASE 0xFFE03000
|
||||
diff --git a/sim/bfin/sim-main.h b/sim/bfin/sim-main.h
|
||||
index 51fb87e..34fd153 100644
|
||||
--- a/sim/bfin/sim-main.h
|
||||
+++ b/sim/bfin/sim-main.h
|
||||
@@ -23,17 +23,13 @@
|
||||
|
||||
#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 "arch.h"
|
||||
+#include "sim-base.h"
|
||||
|
||||
#include "bfin-sim.h"
|
||||
|
||||
#include "machs.h"
|
||||
|
||||
-#include "sim-base.h"
|
||||
-
|
||||
struct _sim_cpu {
|
||||
/* ... simulator specific members ... */
|
||||
struct bfin_cpu_state state;
|
||||
--
|
||||
2.9.3
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
From 12a0b8d81e1fda6ba98abdce8d6f09f9555ebcf5 Mon Sep 17 00:00:00 2001
|
||||
From: Andre McCurdy <amccurdy@gmail.com>
|
||||
Date: Sat, 30 Apr 2016 15:29:06 -0700
|
||||
Subject: [PATCH] use <asm/sgidefs.h>
|
||||
|
||||
Build fix for MIPS with musl libc
|
||||
|
||||
The MIPS specific header <sgidefs.h> is provided by glibc and uclibc
|
||||
but not by musl. Regardless of the libc, the kernel headers provide
|
||||
<asm/sgidefs.h> which provides the same definitions, so use that
|
||||
instead.
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
[Vincent:
|
||||
Taken from: https://sourceware.org/bugzilla/show_bug.cgi?id=21070]
|
||||
|
||||
Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
|
||||
---
|
||||
gdb/mips-linux-nat.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gdb/mips-linux-nat.c b/gdb/mips-linux-nat.c
|
||||
index f2df1b9907..d24664cb56 100644
|
||||
--- a/gdb/mips-linux-nat.c
|
||||
+++ b/gdb/mips-linux-nat.c
|
||||
@@ -31,7 +31,7 @@
|
||||
#include "gdb_proc_service.h"
|
||||
#include "gregset.h"
|
||||
|
||||
-#include <sgidefs.h>
|
||||
+#include <asm/sgidefs.h>
|
||||
#include "nat/gdb_ptrace.h"
|
||||
#include <asm/ptrace.h>
|
||||
#include "inf-ptrace.h"
|
||||
--
|
||||
2.13.1
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
From 09a2c3e0164545324a1ddee70f5c9fdee71e2079 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
Date: Sun, 18 Jun 2017 23:09:43 +0200
|
||||
Subject: [PATCH] nat/linux-ptrace.c: add missing gdb_byte* cast
|
||||
|
||||
On noMMU platforms, the following code gets compiled:
|
||||
|
||||
child_stack = xmalloc (STACK_SIZE * 4);
|
||||
|
||||
Where child_stack is a gdb_byte*, and xmalloc() returns a void*. While
|
||||
the lack of cast is valid in C, it is not in C++, causing the
|
||||
following build failure:
|
||||
|
||||
../nat/linux-ptrace.c: In function 'int linux_fork_to_function(gdb_byte*, int (*)(void*))':
|
||||
../nat/linux-ptrace.c:273:29: error: invalid conversion from 'void*' to 'gdb_byte* {aka unsigned char*}' [-fpermissive]
|
||||
child_stack = xmalloc (STACK_SIZE * 4);
|
||||
|
||||
Therefore, this commit adds the appropriate cast.
|
||||
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
[Upstream commit: ffce45d2243e5f52f411e314fc4e1a69f431a81f]
|
||||
---
|
||||
gdb/nat/linux-ptrace.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gdb/nat/linux-ptrace.c b/gdb/nat/linux-ptrace.c
|
||||
index 3447e07..33833e2 100644
|
||||
--- a/gdb/nat/linux-ptrace.c
|
||||
+++ b/gdb/nat/linux-ptrace.c
|
||||
@@ -270,7 +270,7 @@ linux_fork_to_function (gdb_byte *child_stack, int (*function) (void *))
|
||||
#define STACK_SIZE 4096
|
||||
|
||||
if (child_stack == NULL)
|
||||
- child_stack = xmalloc (STACK_SIZE * 4);
|
||||
+ child_stack = (gdb_byte*) xmalloc (STACK_SIZE * 4);
|
||||
|
||||
/* Use CLONE_VM instead of fork, to support uClinux (no MMU). */
|
||||
#ifdef __ia64__
|
||||
--
|
||||
2.9.4
|
||||
|
||||
72
bsp/buildroot-2017.02.11/package/gdb/Config.in
Normal file
72
bsp/buildroot-2017.02.11/package/gdb/Config.in
Normal file
@@ -0,0 +1,72 @@
|
||||
comment "gdb/gdbserver needs a toolchain w/ threads, threads debug"
|
||||
depends on !BR2_nios2 && !BR2_bfin
|
||||
depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_TOOLCHAIN_HAS_THREADS_DEBUG
|
||||
|
||||
config BR2_PACKAGE_GDB
|
||||
bool "gdb"
|
||||
# When the external toolchain gdbserver is copied to the
|
||||
# target, we don't allow building a separate gdbserver. The
|
||||
# one from the external toolchain should be used.
|
||||
select BR2_PACKAGE_GDB_SERVER if \
|
||||
(!BR2_PACKAGE_GDB_DEBUGGER && !BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY)
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS && BR2_TOOLCHAIN_HAS_THREADS_DEBUG
|
||||
depends on !BR2_nios2 && !BR2_bfin
|
||||
help
|
||||
GDB, the GNU Project debugger, allows you to see what is
|
||||
going on `inside' another program while it executes -- or
|
||||
what another program was doing at the moment it crashed.
|
||||
|
||||
This option allows to build gdbserver and/or the gdb
|
||||
debugger for the target.
|
||||
|
||||
For embedded development, the most common solution is to
|
||||
build only 'gdbserver' for the target, and use a cross-gdb
|
||||
on the host. See BR2_PACKAGE_HOST_GDB in the Toolchain menu
|
||||
to enable one. Notice that external toolchains often provide
|
||||
their own pre-built cross-gdb and gdbserver binaries.
|
||||
|
||||
http://www.gnu.org/software/gdb/
|
||||
|
||||
if BR2_PACKAGE_GDB
|
||||
|
||||
config BR2_PACKAGE_GDB_SERVER
|
||||
bool "gdbserver"
|
||||
depends on !BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY
|
||||
help
|
||||
Build the gdbserver stub to run on the target.
|
||||
A full gdb is needed to debug the progam.
|
||||
|
||||
config BR2_PACKAGE_GDB_DEBUGGER
|
||||
bool "full debugger"
|
||||
select BR2_PACKAGE_NCURSES
|
||||
depends on BR2_USE_WCHAR
|
||||
depends on !BR2_sh && !BR2_microblaze
|
||||
|
||||
comment "full gdb on target needs a toolchain w/ wchar"
|
||||
depends on !BR2_sh && !BR2_microblaze
|
||||
depends on !BR2_USE_WCHAR
|
||||
|
||||
if BR2_PACKAGE_GDB_DEBUGGER
|
||||
|
||||
config BR2_PACKAGE_GDB_TUI
|
||||
bool "TUI support"
|
||||
help
|
||||
This option enables terminal user interface (TUI) for gdb
|
||||
|
||||
"The GDB Text User Interface (TUI) is a terminal interface
|
||||
which uses the curses library to show the source file, the
|
||||
assembly output, the program registers and GDB commands in
|
||||
separate text windows."
|
||||
|
||||
https://sourceware.org/gdb/current/onlinedocs/gdb/TUI.html
|
||||
|
||||
config BR2_PACKAGE_GDB_PYTHON
|
||||
bool "Python support"
|
||||
# Only Python 2.x is supported by gdb for now
|
||||
depends on BR2_PACKAGE_PYTHON
|
||||
help
|
||||
This option enables Python support in the target gdb.
|
||||
|
||||
endif
|
||||
|
||||
endif
|
||||
63
bsp/buildroot-2017.02.11/package/gdb/Config.in.host
Normal file
63
bsp/buildroot-2017.02.11/package/gdb/Config.in.host
Normal file
@@ -0,0 +1,63 @@
|
||||
comment "Host GDB Options"
|
||||
|
||||
config BR2_PACKAGE_HOST_GDB
|
||||
bool "Build cross gdb for the host"
|
||||
# When the external toolchain gdbserver is used, we shouldn't
|
||||
# allow to build a cross-gdb, as the one of the external
|
||||
# toolchain should be used.
|
||||
depends on !BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY
|
||||
depends on !BR2_nios2
|
||||
help
|
||||
Build a cross gdb that runs on the host machine and debugs
|
||||
programs running on the target. It requires 'gdbserver'
|
||||
installed on the target, see BR2_PACKAGE_GDB_SERVER to
|
||||
enable it.
|
||||
|
||||
if BR2_PACKAGE_HOST_GDB
|
||||
|
||||
config BR2_PACKAGE_HOST_GDB_TUI
|
||||
bool "TUI support"
|
||||
help
|
||||
This option enables terminal user interface (TUI) for gdb
|
||||
|
||||
config BR2_PACKAGE_HOST_GDB_PYTHON
|
||||
bool "Python support"
|
||||
help
|
||||
This option enables the Python support in the cross gdb.
|
||||
|
||||
config BR2_PACKAGE_HOST_GDB_SIM
|
||||
bool "Simulator support"
|
||||
depends on !BR2_arc && !BR2_microblaze
|
||||
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_11
|
||||
help
|
||||
Select the version of gdb you wish to use.
|
||||
|
||||
config BR2_GDB_VERSION_7_10
|
||||
bool "gdb 7.10.x"
|
||||
|
||||
config BR2_GDB_VERSION_7_11
|
||||
bool "gdb 7.11.x"
|
||||
|
||||
config BR2_GDB_VERSION_7_12
|
||||
bool "gdb 7.12.x"
|
||||
|
||||
endchoice
|
||||
|
||||
endif
|
||||
|
||||
# If cross-gdb is not enabled, the latest working version is chosen.
|
||||
config BR2_GDB_VERSION
|
||||
string
|
||||
depends on BR2_PACKAGE_GDB || BR2_PACKAGE_HOST_GDB
|
||||
default "arc-2016.09-release-gdb" if BR2_arc
|
||||
default "6be65fb56ea6694a9260733a536a023a1e2d4d57" if BR2_microblaze
|
||||
default "7.10.1" if BR2_GDB_VERSION_7_10
|
||||
default "7.11.1" if BR2_GDB_VERSION_7_11 || !BR2_PACKAGE_HOST_GDB
|
||||
default "7.12.1" if BR2_GDB_VERSION_7_12
|
||||
36
bsp/buildroot-2017.02.11/package/gdb/gdb-python-config
Executable file
36
bsp/buildroot-2017.02.11/package/gdb/gdb-python-config
Executable file
@@ -0,0 +1,36 @@
|
||||
#!/bin/sh
|
||||
|
||||
# This shell script is used to fake Python. Gdb wants to be passed a
|
||||
# Python interpreter, to run its own python-config.py program, which
|
||||
# uses sysconfig. However, when cross-compiling, this doesn't work
|
||||
# well since we would have to use the host Python, whose sysconfig
|
||||
# module would return host values.
|
||||
#
|
||||
# As recommended at
|
||||
# https://sourceware.org/gdb/wiki/CrossCompilingWithPythonSupport,
|
||||
# this wrapper shell script can be used as a replacement. It ignores
|
||||
# the python-config.py script passed as first arguments, and
|
||||
# "emulates" its behavior.
|
||||
|
||||
if [ $# -ne 2 ] ; then
|
||||
echo "Bad # args." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# The first argument is the path to python-config.py, ignore it.
|
||||
|
||||
case "$2" in
|
||||
--includes)
|
||||
echo "-I${STAGING_DIR}/usr/include/python2.7"
|
||||
;;
|
||||
--ldflags)
|
||||
echo "-lpthread -ldl -lutil -lm -lpython2.7"
|
||||
;;
|
||||
--exec-prefix)
|
||||
echo "/usr"
|
||||
;;
|
||||
*)
|
||||
echo "Bad arg $2." >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
8
bsp/buildroot-2017.02.11/package/gdb/gdb.hash
Normal file
8
bsp/buildroot-2017.02.11/package/gdb/gdb.hash
Normal file
@@ -0,0 +1,8 @@
|
||||
# From ftp://gcc.gnu.org/pub/gdb/releases/sha512.sum
|
||||
sha512 17a5138277a31685a5c2a841cb47ed9bc4626ea617b8ca77750513b300299f4fbbffe504958b5372de610dcb952c679cf8fa9c1bdadd380294fbf59b6e366010 gdb-7.10.1.tar.xz
|
||||
sha512 f80ec6c8a0f0b54c8b945666e875809174402b7e121efb378ebac931a91f9a1cc0048568f8e2f42ae8ae2392ff8d144c2e51d41c7398935017450aaf29838360 gdb-7.11.1.tar.xz
|
||||
sha512 0ac8d0a495103611ef41167a08313a010dce6ca4c6d827cbe8558a0c1a1a8a6bfa53f1b7704251289cababbfaaf9e075550cdf741a54d6cd9ca3433d910efcd8 gdb-7.12.1.tar.xz
|
||||
|
||||
# Locally calculated (fetched from Github)
|
||||
sha512 0a467091d4b01fbecabb4b8da1cb743025c70e7f4874a0b5c8fa2ec623569a39bde6762b91806de0be6e63711aeb6909715cfbe43860de73d8aec6159a9f10a7 gdb-6be65fb56ea6694a9260733a536a023a1e2d4d57.tar.gz
|
||||
sha512 3b204108821ba687974e61bb47f0ab91621ac233503cec6c82913bcb665a8c0cea0c8b992177b2fb6befade774c2491d94c72a1bf859f9b79d44755be05dcd64 gdb-arc-2016.09-release-gdb.tar.gz
|
||||
235
bsp/buildroot-2017.02.11/package/gdb/gdb.mk
Normal file
235
bsp/buildroot-2017.02.11/package/gdb/gdb.mk
Normal file
@@ -0,0 +1,235 @@
|
||||
################################################################################
|
||||
#
|
||||
# gdb
|
||||
#
|
||||
################################################################################
|
||||
|
||||
GDB_VERSION = $(call qstrip,$(BR2_GDB_VERSION))
|
||||
GDB_SITE = $(BR2_GNU_MIRROR)/gdb
|
||||
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
|
||||
GDB_FROM_GIT = y
|
||||
endif
|
||||
|
||||
GDB_LICENSE = GPLv2+, LGPLv2+, GPLv3+, LGPLv3+
|
||||
GDB_LICENSE_FILES = COPYING COPYING.LIB COPYING3 COPYING3.LIB
|
||||
|
||||
# We only want gdbserver and not the entire debugger.
|
||||
ifeq ($(BR2_PACKAGE_GDB_DEBUGGER),)
|
||||
GDB_SUBDIR = gdb/gdbserver
|
||||
HOST_GDB_SUBDIR = .
|
||||
else
|
||||
GDB_DEPENDENCIES = ncurses \
|
||||
$(if $(BR2_PACKAGE_LIBICONV),libiconv)
|
||||
endif
|
||||
|
||||
# For the host variant, we really want to build with XML support,
|
||||
# which is needed to read XML descriptions of target architectures. We
|
||||
# also need ncurses.
|
||||
HOST_GDB_DEPENDENCIES = host-expat host-ncurses
|
||||
|
||||
# Disable building documentation
|
||||
GDB_MAKE_OPTS += MAKEINFO=true
|
||||
GDB_INSTALL_TARGET_OPTS += MAKEINFO=true DESTDIR=$(TARGET_DIR) install
|
||||
HOST_GDB_MAKE_OPTS += MAKEINFO=true
|
||||
HOST_GDB_INSTALL_OPTS += MAKEINFO=true install
|
||||
|
||||
# Apply the Xtensa specific patches
|
||||
XTENSA_CORE_NAME = $(call qstrip, $(BR2_XTENSA_CORE_NAME))
|
||||
ifneq ($(XTENSA_CORE_NAME),)
|
||||
define GDB_XTENSA_PRE_PATCH
|
||||
tar xf $(BR2_XTENSA_OVERLAY_DIR)/xtensa_$(XTENSA_CORE_NAME).tar \
|
||||
-C $(@D) --strip-components=1 gdb
|
||||
endef
|
||||
GDB_PRE_PATCH_HOOKS += GDB_XTENSA_PRE_PATCH
|
||||
HOST_GDB_PRE_PATCH_HOOKS += GDB_XTENSA_PRE_PATCH
|
||||
endif
|
||||
|
||||
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,
|
||||
# so we disable it (additionally the option --disable-install-libbfd
|
||||
# prevents the un-wanted installation of libobcodes.so and libbfd.so).
|
||||
GDB_DISABLE_BINUTILS_CONF_OPTS = \
|
||||
--disable-binutils \
|
||||
--disable-install-libbfd \
|
||||
--disable-ld \
|
||||
--disable-gas
|
||||
|
||||
GDB_CONF_ENV = \
|
||||
ac_cv_type_uintptr_t=yes \
|
||||
gt_cv_func_gettext_libintl=yes \
|
||||
ac_cv_func_dcgettext=yes \
|
||||
gdb_cv_func_sigsetjmp=yes \
|
||||
bash_cv_func_strcoll_broken=no \
|
||||
bash_cv_must_reinstall_sighandlers=no \
|
||||
bash_cv_func_sigsetjmp=present \
|
||||
bash_cv_have_mbstate_t=yes \
|
||||
gdb_cv_func_sigsetjmp=yes
|
||||
|
||||
# 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. It needs to be passed to GDB_CONF_ENV to build
|
||||
# gdbserver only but also to GDB_MAKE_ENV, because otherwise it does
|
||||
# not get passed to the configure script of nested packages while
|
||||
# building gdbserver with full debugger.
|
||||
GDB_CONF_ENV += gl_cv_func_gettimeofday_clobber=no
|
||||
GDB_MAKE_ENV = 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.
|
||||
GDB_CONF_OPTS = \
|
||||
--without-uiout \
|
||||
--disable-gdbtk \
|
||||
--without-x \
|
||||
--disable-sim \
|
||||
$(GDB_DISABLE_BINUTILS_CONF_OPTS) \
|
||||
$(if $(BR2_PACKAGE_GDB_SERVER),--enable-gdbserver) \
|
||||
--with-curses \
|
||||
--without-included-gettext \
|
||||
--disable-werror \
|
||||
--enable-static
|
||||
|
||||
# When gdb is built as C++ application for ARC it segfaults at runtime
|
||||
# So we pass --disable-build-with-cxx config option to force gdb not to
|
||||
# be built as C++ app.
|
||||
ifeq ($(BR2_arc),y)
|
||||
GDB_CONF_OPTS += --disable-build-with-cxx
|
||||
endif
|
||||
|
||||
# gdb 7.12+ by default builds with a C++ compiler, which doesn't work
|
||||
# when we don't have C++ support in the toolchain
|
||||
ifneq ($(BR2_INSTALL_LIBSTDCPP),y)
|
||||
GDB_CONF_OPTS += --disable-build-with-cxx
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_GDB_TUI),y)
|
||||
GDB_CONF_OPTS += --enable-tui
|
||||
else
|
||||
GDB_CONF_OPTS += --disable-tui
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_GDB_PYTHON),y)
|
||||
GDB_CONF_OPTS += --with-python=$(TOPDIR)/package/gdb/gdb-python-config
|
||||
GDB_DEPENDENCIES += python
|
||||
else
|
||||
GDB_CONF_OPTS += --without-python
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_EXPAT),y)
|
||||
GDB_CONF_OPTS += --with-expat
|
||||
GDB_CONF_OPTS += --with-libexpat-prefix=$(STAGING_DIR)/usr
|
||||
GDB_DEPENDENCIES += expat
|
||||
else
|
||||
GDB_CONF_OPTS += --without-expat
|
||||
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
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_ZLIB),y)
|
||||
GDB_CONF_OPTS += --with-zlib
|
||||
GDB_DEPENDENCIES += zlib
|
||||
else
|
||||
GDB_CONF_OPTS += --without-zlib
|
||||
endif
|
||||
|
||||
# This removes some unneeded Python scripts and XML target description
|
||||
# files that are not useful for a normal usage of the debugger.
|
||||
define GDB_REMOVE_UNNEEDED_FILES
|
||||
$(RM) -rf $(TARGET_DIR)/usr/share/gdb
|
||||
endef
|
||||
|
||||
GDB_POST_INSTALL_TARGET_HOOKS += GDB_REMOVE_UNNEEDED_FILES
|
||||
|
||||
# This installs the gdbserver somewhere into the $(HOST_DIR) so that
|
||||
# it becomes an integral part of the SDK, if the toolchain generated
|
||||
# by Buildroot is later used as an external toolchain. We install it
|
||||
# in debug-root/usr/bin/gdbserver so that it matches what Crosstool-NG
|
||||
# does.
|
||||
define GDB_SDK_INSTALL_GDBSERVER
|
||||
$(INSTALL) -D -m 0755 $(TARGET_DIR)/usr/bin/gdbserver \
|
||||
$(HOST_DIR)/usr/$(GNU_TARGET_NAME)/debug-root/usr/bin/gdbserver
|
||||
endef
|
||||
|
||||
ifeq ($(BR2_PACKAGE_GDB_SERVER),y)
|
||||
GDB_POST_INSTALL_TARGET_HOOKS += GDB_SDK_INSTALL_GDBSERVER
|
||||
endif
|
||||
|
||||
# A few notes:
|
||||
# * --target, because we're doing a cross build rather than a real
|
||||
# host build.
|
||||
# * --enable-static because gdb really wants to use libbfd.a
|
||||
HOST_GDB_CONF_OPTS = \
|
||||
--target=$(GNU_TARGET_NAME) \
|
||||
--enable-static \
|
||||
--without-uiout \
|
||||
--disable-gdbtk \
|
||||
--without-x \
|
||||
--enable-threads \
|
||||
--disable-werror \
|
||||
--without-included-gettext \
|
||||
--with-curses \
|
||||
$(GDB_DISABLE_BINUTILS_CONF_OPTS)
|
||||
|
||||
ifeq ($(BR2_PACKAGE_HOST_GDB_TUI),y)
|
||||
HOST_GDB_CONF_OPTS += --enable-tui
|
||||
else
|
||||
HOST_GDB_CONF_OPTS += --disable-tui
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_HOST_GDB_PYTHON),y)
|
||||
HOST_GDB_CONF_OPTS += --with-python=$(HOST_DIR)/usr/bin/python2
|
||||
HOST_GDB_DEPENDENCIES += host-python
|
||||
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 && \
|
||||
ln -snf $(GNU_TARGET_NAME)-gdb $(ARCH)-linux-gdb
|
||||
endef
|
||||
|
||||
HOST_GDB_POST_INSTALL_HOOKS += HOST_GDB_ADD_SYMLINK
|
||||
|
||||
HOST_GDB_POST_INSTALL_HOOKS += gen_gdbinit_file
|
||||
|
||||
$(eval $(autotools-package))
|
||||
$(eval $(host-autotools-package))
|
||||
Reference in New Issue
Block a user