summaryrefslogtreecommitdiffstats
path: root/gnu
diff options
context:
space:
mode:
authorsjg <sjg@FreeBSD.org>2013-04-12 20:48:55 +0000
committersjg <sjg@FreeBSD.org>2013-04-12 20:48:55 +0000
commit97d8b9495668afa398ab17c8c5f7e223b5fd2e89 (patch)
tree54038c9ac32a45f8741dcc23fb9a8ffc0e15ff89 /gnu
parent5ee3bfdb338e7c80af29a67f4425c4be24c7b866 (diff)
parent086d73aef6d0ab7d21daa2076fdc8d25961f9b05 (diff)
downloadFreeBSD-src-97d8b9495668afa398ab17c8c5f7e223b5fd2e89.zip
FreeBSD-src-97d8b9495668afa398ab17c8c5f7e223b5fd2e89.tar.gz
sync from head
Diffstat (limited to 'gnu')
-rw-r--r--gnu/lib/libgcc/Makefile6
-rw-r--r--gnu/lib/libstdc++/config.h19
-rw-r--r--gnu/lib/libsupc++/Makefile11
-rw-r--r--gnu/usr.bin/gdb/kgdb/kgdb.14
-rw-r--r--gnu/usr.bin/gdb/kgdb/kgdb.h2
-rw-r--r--gnu/usr.bin/gdb/kgdb/kld.c6
-rw-r--r--gnu/usr.bin/gdb/kgdb/kthr.c9
-rw-r--r--gnu/usr.bin/gdb/kgdb/main.c19
-rw-r--r--gnu/usr.bin/gdb/kgdb/trgt.c17
-rw-r--r--gnu/usr.bin/gdb/kgdb/trgt_amd64.c6
-rw-r--r--gnu/usr.bin/gdb/kgdb/trgt_arm.c6
-rw-r--r--gnu/usr.bin/gdb/kgdb/trgt_i386.c6
-rw-r--r--gnu/usr.bin/gdb/kgdb/trgt_ia64.c12
-rw-r--r--gnu/usr.bin/gdb/kgdb/trgt_mips.c6
-rw-r--r--gnu/usr.bin/gdb/kgdb/trgt_powerpc.c6
-rw-r--r--gnu/usr.bin/gdb/kgdb/trgt_powerpc64.c6
-rw-r--r--gnu/usr.bin/gdb/kgdb/trgt_sparc64.c6
-rw-r--r--gnu/usr.bin/groff/tmac/mdoc.local1
18 files changed, 122 insertions, 26 deletions
diff --git a/gnu/lib/libgcc/Makefile b/gnu/lib/libgcc/Makefile
index 73d9213..a06daa7 100644
--- a/gnu/lib/libgcc/Makefile
+++ b/gnu/lib/libgcc/Makefile
@@ -123,10 +123,10 @@ CFLAGS+= -fheinous-gnu-extensions
LIB1ASMSRC = lib1funcs.asm
LIB1ASMFUNCS = _dvmd_tls _bb_init_func
.if ${MK_ARM_EABI} != "no"
-LIB1ASMFUNCS+= _addsubdf3 _addsubsf3 _cmpdf2 _cmpsf2 _fixdfsi _fixsfsi \
- _fixunsdfsi _fixunsdfsi _muldivdf3 _muldivsf3 _udivsi3
-
LIB2ADDEH = unwind-arm.c libunwind.S pr-support.c unwind-c.c
+# Some compilers generate __aeabi_ functions libgcc_s is missing
+DPADD+= ${LIBGCC}
+LDADD+= -lgcc
.else
LIB2FUNCS_EXTRA = floatunsidf.c floatunsisf.c
.endif
diff --git a/gnu/lib/libstdc++/config.h b/gnu/lib/libstdc++/config.h
index 7955ab6..3351419 100644
--- a/gnu/lib/libstdc++/config.h
+++ b/gnu/lib/libstdc++/config.h
@@ -22,7 +22,7 @@
#define HAVE_ATAN2F 1
/* Define to 1 if you have the `atan2l' function. */
-/* #undef HAVE_ATAN2L */
+#define HAVE_ATAN2L 1
/* Define to 1 if you have the `atanf' function. */
#define HAVE_ATANF 1
@@ -67,7 +67,7 @@
#define HAVE_EXPF 1
/* Define to 1 if you have the `expl' function. */
-/* #undef HAVE_EXPL */
+#define HAVE_EXPL 1
/* Define to 1 if you have the `fabsf' function. */
#define HAVE_FABSF 1
@@ -100,7 +100,7 @@
#define HAVE_FMODF 1
/* Define to 1 if you have the `fmodl' function. */
-/* #undef HAVE_FMODL */
+#define HAVE_FMODL 1
/* Define to 1 if you have the `fpclass' function. */
/* #undef HAVE_FPCLASS */
@@ -134,7 +134,7 @@
#define HAVE_HYPOTF 1
/* Define to 1 if you have the `hypotl' function. */
-/* #undef HAVE_HYPOTL */
+#define HAVE_HYPOTL 1
/* Define to 1 if you have the `iconv' function. */
/* #undef HAVE_ICONV */
@@ -293,7 +293,7 @@
#define HAVE_SQRTF 1
/* Define to 1 if you have the `sqrtl' function. */
-/* #undef HAVE_SQRTL */
+#define HAVE_SQRTL 1
/* Define to 1 if you have the <stdbool.h> header file. */
#define HAVE_STDBOOL_H 1
@@ -304,6 +304,12 @@
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
+/* Define if strerror_l is available in <string.h>. */
+/* #undef HAVE_STRERROR_L */
+
+/* Define if strerror_r is available in <string.h>. */
+#define HAVE_STRERROR_R 1
+
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
@@ -316,6 +322,9 @@
/* Define to 1 if you have the `strtold' function. */
#define HAVE_STRTOLD 1
+/* Define if strxfrm_l is available in <string.h>. */
+/* #undef HAVE_STRXFRM_L */
+
/* Define to 1 if you have the <sys/filio.h> header file. */
#define HAVE_SYS_FILIO_H 1
diff --git a/gnu/lib/libsupc++/Makefile b/gnu/lib/libsupc++/Makefile
index 9068615..ee6c601 100644
--- a/gnu/lib/libsupc++/Makefile
+++ b/gnu/lib/libsupc++/Makefile
@@ -1,5 +1,7 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
GCCVER= 4.2
GCCDIR= ${.CURDIR}/../../../contrib/gcc
GCCLIB= ${.CURDIR}/../../../contrib/gcclibs
@@ -20,6 +22,9 @@ SRCS+= del_op.cc del_opnt.cc del_opv.cc del_opvnt.cc eh_alloc.cc eh_arm.cc \
SRCS+= cp-demangle.c
CFLAGS+= -DIN_GLIBCPP_V3 -DHAVE_CONFIG_H
+.if ${MACHINE_CPUARCH} == "arm" && ${MK_ARM_EABI} == "no"
+CFLAGS+= -D_GLIBCXX_SJLJ_EXCEPTIONS=1
+.endif
CFLAGS+= -I${GCCLIB}/include -I${SRCDIR} -I${GCCDIR}
CFLAGS+= -I${.CURDIR}/../libstdc++ -I.
CFLAGS+= -frandom-seed=RepeatabilityConsideredGood
@@ -30,7 +35,13 @@ HDRS= exception new typeinfo cxxabi.h exception_defines.h
INCS= ${HDRS:S;^;${SRCDIR}/;}
INCSDIR=${INCLUDEDIR}/c++/${GCCVER}
+.if ${MACHINE_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no"
+unwind.h: ${GCCDIR}/config/arm/unwind-arm.h
+.else
unwind.h: ${GCCDIR}/unwind-generic.h
+.endif
+
+unwind.h:
ln -sf ${.ALLSRC} ${.TARGET}
SRCS+= unwind.h
diff --git a/gnu/usr.bin/gdb/kgdb/kgdb.1 b/gnu/usr.bin/gdb/kgdb/kgdb.1
index 4073d70..58d0786 100644
--- a/gnu/usr.bin/gdb/kgdb/kgdb.1
+++ b/gnu/usr.bin/gdb/kgdb/kgdb.1
@@ -33,6 +33,7 @@
.Sh SYNOPSIS
.Nm
.Op Fl a | Fl f | Fl fullname
+.Op Fl b Ar rate
.Op Fl q | Fl quiet
.Op Fl v
.Op Fl w
@@ -62,6 +63,9 @@ The
or
.Fl fullname
options are supported for backward compatibility as well.
+.It Fl b Ar rate
+Set the baudrate to
+.Ar rate .
.It Fl q
Suppress printing of the banner when the debugger starts.
The
diff --git a/gnu/usr.bin/gdb/kgdb/kgdb.h b/gnu/usr.bin/gdb/kgdb/kgdb.h
index e828f56..1a32d8a 100644
--- a/gnu/usr.bin/gdb/kgdb/kgdb.h
+++ b/gnu/usr.bin/gdb/kgdb/kgdb.h
@@ -49,6 +49,8 @@ extern struct kthr *curkthr;
void initialize_kld_target(void);
void initialize_kgdb_target(void);
void kgdb_dmesg(void);
+CORE_ADDR kgdb_trgt_core_pcb(u_int);
+CORE_ADDR kgdb_trgt_stop_pcb(u_int, u_int);
void kgdb_trgt_new_objfile(struct objfile *);
void kgdb_trgt_fetch_registers(int);
void kgdb_trgt_store_registers(int);
diff --git a/gnu/usr.bin/gdb/kgdb/kld.c b/gnu/usr.bin/gdb/kgdb/kld.c
index d5ba20a..50f0797 100644
--- a/gnu/usr.bin/gdb/kgdb/kld.c
+++ b/gnu/usr.bin/gdb/kgdb/kld.c
@@ -78,6 +78,7 @@ kld_ok (char *path)
*/
static const char *kld_suffixes[] = {
".debug",
+ ".symbols",
"",
NULL
};
@@ -382,7 +383,10 @@ kld_current_sos (void)
* Try to read the pathname (if it exists) and store
* it in so_name.
*/
- if (off_pathname != 0) {
+ if (find_kld_path(new->so_original_name, new->so_name,
+ sizeof(new->so_name))) {
+ /* we found the kld */;
+ } else if (off_pathname != 0) {
target_read_string(read_pointer(kld + off_pathname),
&path, sizeof(new->so_name), &error);
if (error != 0) {
diff --git a/gnu/usr.bin/gdb/kgdb/kthr.c b/gnu/usr.bin/gdb/kgdb/kthr.c
index b12d07c..713b93b 100644
--- a/gnu/usr.bin/gdb/kgdb/kthr.c
+++ b/gnu/usr.bin/gdb/kgdb/kthr.c
@@ -44,12 +44,10 @@ __FBSDID("$FreeBSD$");
#include <frame-unwind.h>
#include "kgdb.h"
-#include <machine/pcb.h>
static CORE_ADDR dumppcb;
static int dumptid;
-static CORE_ADDR stoppcbs;
static cpuset_t stopped_cpus;
static struct kthr *first;
@@ -98,10 +96,9 @@ kgdb_thr_add_procs(uintptr_t paddr)
kt->kaddr = addr;
if (td.td_tid == dumptid)
kt->pcb = dumppcb;
- else if (td.td_state == TDS_RUNNING && stoppcbs != 0 &&
+ else if (td.td_state == TDS_RUNNING &&
CPU_ISSET(td.td_oncpu, &stopped_cpus))
- kt->pcb = (uintptr_t)stoppcbs +
- sizeof(struct pcb) * td.td_oncpu;
+ kt->pcb = kgdb_trgt_core_pcb(td.td_oncpu);
else
kt->pcb = (uintptr_t)td.td_pcb;
kt->kstack = td.td_kstack;
@@ -152,8 +149,6 @@ kgdb_thr_init(void)
addr != 0)
kvm_read(kvm, addr, &stopped_cpus, cpusetsize);
- stoppcbs = kgdb_lookup("stoppcbs");
-
kgdb_thr_add_procs(paddr);
addr = kgdb_lookup("zombproc");
if (addr != 0) {
diff --git a/gnu/usr.bin/gdb/kgdb/main.c b/gnu/usr.bin/gdb/kgdb/main.c
index 45a3dc0..aa062a2 100644
--- a/gnu/usr.bin/gdb/kgdb/main.c
+++ b/gnu/usr.bin/gdb/kgdb/main.c
@@ -83,7 +83,7 @@ usage(void)
{
fprintf(stderr,
- "usage: %s [-afqvw] [-d crashdir] [-c core | -n dumpnr | -r device]\n"
+ "usage: %s [-afqvw] [-b rate] [-d crashdir] [-c core | -n dumpnr | -r device]\n"
"\t[kernel [core]]\n", getprogname());
exit(1);
}
@@ -338,19 +338,18 @@ main(int argc, char *argv[])
case 'a':
annotation_level++;
break;
- case 'b':
- {
- int i;
- char *p;
+ case 'b': {
+ int i;
+ char *p;
- i = strtol (optarg, &p, 0);
- if (i == 0 && p == optarg)
+ i = strtol(optarg, &p, 0);
+ if (*p != '\0' || p == optarg)
warnx("warning: could not set baud rate to `%s'.\n",
optarg);
- else
- baud_rate = i;
- }
+ else
+ baud_rate = i;
break;
+ }
case 'c': /* use given core file. */
if (vmcore != NULL) {
warnx("option %c: can only be specified once",
diff --git a/gnu/usr.bin/gdb/kgdb/trgt.c b/gnu/usr.bin/gdb/kgdb/trgt.c
index 14449b9..85065cc 100644
--- a/gnu/usr.bin/gdb/kgdb/trgt.c
+++ b/gnu/usr.bin/gdb/kgdb/trgt.c
@@ -53,6 +53,8 @@ __FBSDID("$FreeBSD$");
#include "kgdb.h"
+static CORE_ADDR stoppcbs;
+
static void kgdb_core_cleanup(void *);
static char *vmcore;
@@ -352,3 +354,18 @@ initialize_kgdb_target(void)
add_com ("tid", class_obscure, kgdb_set_tid_cmd,
"Set current thread context");
}
+
+CORE_ADDR
+kgdb_trgt_stop_pcb(u_int cpuid, u_int pcbsz)
+{
+ static int once = 0;
+
+ if (stoppcbs == 0 && !once) {
+ once = 1;
+ stoppcbs = kgdb_lookup("stoppcbs");
+ }
+ if (stoppcbs == 0)
+ return 0;
+
+ return (stoppcbs + pcbsz * cpuid);
+}
diff --git a/gnu/usr.bin/gdb/kgdb/trgt_amd64.c b/gnu/usr.bin/gdb/kgdb/trgt_amd64.c
index cdab775..cb13d71 100644
--- a/gnu/usr.bin/gdb/kgdb/trgt_amd64.c
+++ b/gnu/usr.bin/gdb/kgdb/trgt_amd64.c
@@ -44,6 +44,12 @@ __FBSDID("$FreeBSD$");
#include "kgdb.h"
+CORE_ADDR
+kgdb_trgt_core_pcb(u_int cpuid)
+{
+ return (kgdb_trgt_stop_pcb(cpuid, sizeof(struct pcb)));
+}
+
void
kgdb_trgt_fetch_registers(int regno __unused)
{
diff --git a/gnu/usr.bin/gdb/kgdb/trgt_arm.c b/gnu/usr.bin/gdb/kgdb/trgt_arm.c
index f2e292e..ca18ae3 100644
--- a/gnu/usr.bin/gdb/kgdb/trgt_arm.c
+++ b/gnu/usr.bin/gdb/kgdb/trgt_arm.c
@@ -47,6 +47,12 @@ __FBSDID("$FreeBSD$");
#include "kgdb.h"
+CORE_ADDR
+kgdb_trgt_core_pcb(u_int cpuid)
+{
+ return (kgdb_trgt_stop_pcb(cpuid, sizeof(struct pcb)));
+}
+
void
kgdb_trgt_fetch_registers(int regno __unused)
{
diff --git a/gnu/usr.bin/gdb/kgdb/trgt_i386.c b/gnu/usr.bin/gdb/kgdb/trgt_i386.c
index aba8b65..02c9918 100644
--- a/gnu/usr.bin/gdb/kgdb/trgt_i386.c
+++ b/gnu/usr.bin/gdb/kgdb/trgt_i386.c
@@ -49,6 +49,12 @@ __FBSDID("$FreeBSD$");
static int ofs_fix;
+CORE_ADDR
+kgdb_trgt_core_pcb(u_int cpuid)
+{
+ return (kgdb_trgt_stop_pcb(cpuid, sizeof(struct pcb)));
+}
+
void
kgdb_trgt_fetch_registers(int regno __unused)
{
diff --git a/gnu/usr.bin/gdb/kgdb/trgt_ia64.c b/gnu/usr.bin/gdb/kgdb/trgt_ia64.c
index 4efa6eb..6ba800b 100644
--- a/gnu/usr.bin/gdb/kgdb/trgt_ia64.c
+++ b/gnu/usr.bin/gdb/kgdb/trgt_ia64.c
@@ -52,6 +52,18 @@ __FBSDID("$FreeBSD$");
#include "kgdb.h"
+CORE_ADDR
+kgdb_trgt_core_pcb(u_int cpuid)
+{
+ CORE_ADDR addr;
+ char *expr;
+
+ asprintf(&expr, "&cpuid_to_pcpu[%d]->pc_md.pcb", cpuid);
+ addr = kgdb_parse(expr);
+ free(expr);
+ return (addr);
+}
+
void
kgdb_trgt_fetch_registers(int regno __unused)
{
diff --git a/gnu/usr.bin/gdb/kgdb/trgt_mips.c b/gnu/usr.bin/gdb/kgdb/trgt_mips.c
index 423cacd..6ad2274 100644
--- a/gnu/usr.bin/gdb/kgdb/trgt_mips.c
+++ b/gnu/usr.bin/gdb/kgdb/trgt_mips.c
@@ -52,6 +52,12 @@ __FBSDID("$FreeBSD$");
#include "kgdb.h"
+CORE_ADDR
+kgdb_trgt_core_pcb(u_int cpuid)
+{
+ return (kgdb_trgt_stop_pcb(cpuid, sizeof(struct pcb)));
+}
+
void
kgdb_trgt_fetch_registers(int regno __unused)
{
diff --git a/gnu/usr.bin/gdb/kgdb/trgt_powerpc.c b/gnu/usr.bin/gdb/kgdb/trgt_powerpc.c
index a83c2d0..ef8d7f1 100644
--- a/gnu/usr.bin/gdb/kgdb/trgt_powerpc.c
+++ b/gnu/usr.bin/gdb/kgdb/trgt_powerpc.c
@@ -49,6 +49,12 @@ __FBSDID("$FreeBSD$");
#include "kgdb.h"
+CORE_ADDR
+kgdb_trgt_core_pcb(u_int cpuid)
+{
+ return (kgdb_trgt_stop_pcb(cpuid, sizeof(struct pcb)));
+}
+
void
kgdb_trgt_fetch_registers(int regno __unused)
{
diff --git a/gnu/usr.bin/gdb/kgdb/trgt_powerpc64.c b/gnu/usr.bin/gdb/kgdb/trgt_powerpc64.c
index d20a4d6..65f7ab5 100644
--- a/gnu/usr.bin/gdb/kgdb/trgt_powerpc64.c
+++ b/gnu/usr.bin/gdb/kgdb/trgt_powerpc64.c
@@ -44,6 +44,12 @@ __FBSDID("$FreeBSD$");
#include "kgdb.h"
+CORE_ADDR
+kgdb_trgt_core_pcb(u_int cpuid)
+{
+ return (kgdb_trgt_stop_pcb(cpuid, sizeof(struct pcb)));
+}
+
void
kgdb_trgt_fetch_registers(int regno __unused)
{
diff --git a/gnu/usr.bin/gdb/kgdb/trgt_sparc64.c b/gnu/usr.bin/gdb/kgdb/trgt_sparc64.c
index 8fece24..070194a 100644
--- a/gnu/usr.bin/gdb/kgdb/trgt_sparc64.c
+++ b/gnu/usr.bin/gdb/kgdb/trgt_sparc64.c
@@ -46,6 +46,12 @@ __FBSDID("$FreeBSD$");
#include "kgdb.h"
+CORE_ADDR
+kgdb_trgt_core_pcb(u_int cpuid)
+{
+ return (kgdb_trgt_stop_pcb(cpuid, sizeof(struct pcb)));
+}
+
void
kgdb_trgt_fetch_registers(int regno __unused)
{
diff --git a/gnu/usr.bin/groff/tmac/mdoc.local b/gnu/usr.bin/groff/tmac/mdoc.local
index 0d689ce..343209e 100644
--- a/gnu/usr.bin/groff/tmac/mdoc.local
+++ b/gnu/usr.bin/groff/tmac/mdoc.local
@@ -50,6 +50,7 @@
.\" FreeBSD releases not found in doc-common
.ds doc-operating-system-FreeBSD-7.4 7.4
.ds doc-operating-system-FreeBSD-8.3 8.3
+.ds doc-operating-system-FreeBSD-8.4 8.4
.ds doc-operating-system-FreeBSD-9.1 9.1
.ds doc-operating-system-FreeBSD-10.0 10.0
.
OpenPOWER on IntegriCloud