PERFORCE change 134352 for review
Kip Macy
kmacy at FreeBSD.org
Mon Jan 28 20:54:56 PST 2008
http://perforce.freebsd.org/chv.cgi?CH=134352
Change 134352 by kmacy at kmacy:storage:toehead on 2008/01/29 04:54:53
IFC 134350
Affected files ...
.. //depot/projects/toehead/etc/defaults/rc.conf#5 integrate
.. //depot/projects/toehead/etc/rc.d/ipfw#3 integrate
.. //depot/projects/toehead/gnu/usr.bin/gdb/kgdb/kgdb.h#4 integrate
.. //depot/projects/toehead/gnu/usr.bin/gdb/kgdb/kld.c#2 integrate
.. //depot/projects/toehead/gnu/usr.bin/gdb/kgdb/kthr.c#3 integrate
.. //depot/projects/toehead/gnu/usr.bin/gdb/kgdb/main.c#3 integrate
.. //depot/projects/toehead/gnu/usr.bin/gdb/kgdb/trgt.c#4 integrate
.. //depot/projects/toehead/gnu/usr.bin/gdb/kgdb/trgt_i386.c#2 integrate
.. //depot/projects/toehead/lib/msun/src/s_exp2f.c#3 integrate
.. //depot/projects/toehead/sbin/ffsinfo/ffsinfo.c#2 integrate
.. //depot/projects/toehead/share/man/man4/ath.4#2 integrate
.. //depot/projects/toehead/share/man/man4/awi.4#2 integrate
.. //depot/projects/toehead/share/man/man4/ed.4#3 integrate
.. //depot/projects/toehead/share/man/man4/man4.i386/snc.4#2 integrate
.. //depot/projects/toehead/share/man/man4/wi.4#2 integrate
.. //depot/projects/toehead/share/man/man5/rc.conf.5#4 integrate
.. //depot/projects/toehead/sys/amd64/amd64/dump_machdep.c#2 integrate
.. //depot/projects/toehead/sys/amd64/amd64/minidump_machdep.c#2 integrate
.. //depot/projects/toehead/sys/arm/arm/dump_machdep.c#2 integrate
.. //depot/projects/toehead/sys/cam/cam_xpt.c#4 integrate
.. //depot/projects/toehead/sys/dev/acpica/acpi.c#2 integrate
.. //depot/projects/toehead/sys/dev/bfe/if_bfe.c#2 integrate
.. //depot/projects/toehead/sys/dev/bfe/if_bfereg.h#2 integrate
.. //depot/projects/toehead/sys/dev/ciss/ciss.c#2 integrate
.. //depot/projects/toehead/sys/dev/mxge/if_mxge.c#4 integrate
.. //depot/projects/toehead/sys/i386/i386/dump_machdep.c#2 integrate
.. //depot/projects/toehead/sys/i386/i386/minidump_machdep.c#2 integrate
.. //depot/projects/toehead/sys/ia64/ia64/dump_machdep.c#2 integrate
.. //depot/projects/toehead/sys/kern/kern_shutdown.c#4 integrate
.. //depot/projects/toehead/sys/kern/subr_bus.c#3 integrate
.. //depot/projects/toehead/sys/netgraph/netflow/netflow.c#2 integrate
.. //depot/projects/toehead/sys/netgraph/netflow/ng_netflow.c#2 integrate
.. //depot/projects/toehead/sys/netgraph/ng_bpf.c#2 integrate
.. //depot/projects/toehead/sys/netinet/sctp_auth.c#2 integrate
.. //depot/projects/toehead/sys/netinet/sctp_bsd_addr.c#3 integrate
.. //depot/projects/toehead/sys/netinet/sctp_indata.c#2 integrate
.. //depot/projects/toehead/sys/netinet/sctp_pcb.c#2 integrate
.. //depot/projects/toehead/sys/security/audit/audit.c#2 integrate
.. //depot/projects/toehead/sys/security/mac_mls/mac_mls.c#2 integrate
.. //depot/projects/toehead/sys/sparc64/sparc64/dump_machdep.c#2 integrate
.. //depot/projects/toehead/sys/sun4v/sun4v/dump_machdep.c#2 integrate
.. //depot/projects/toehead/sys/sys/bus.h#2 integrate
.. //depot/projects/toehead/sys/sys/conf.h#2 integrate
.. //depot/projects/toehead/usr.bin/top/machine.c#4 integrate
.. //depot/projects/toehead/usr.bin/xargs/xargs.1#3 integrate
.. //depot/projects/toehead/usr.sbin/adduser/adduser.8#2 integrate
.. //depot/projects/toehead/usr.sbin/adduser/adduser.sh#2 integrate
Differences ...
==== //depot/projects/toehead/etc/defaults/rc.conf#5 (text+ko) ====
@@ -15,7 +15,7 @@
# For a more detailed explanation of all the rc.conf variables, please
# refer to the rc.conf(5) manual page.
#
-# $FreeBSD: src/etc/defaults/rc.conf,v 1.324 2008/01/25 05:23:01 mtm Exp $
+# $FreeBSD: src/etc/defaults/rc.conf,v 1.326 2008/01/27 15:15:11 mtm Exp $
##############################################################
### Important initial Boot-time options ####################
@@ -122,6 +122,7 @@
firewall_nat_enable="NO" # Enable kernel NAT (if firewall_enable == YES)
firewall_nat_interface="" # Public interface or IPaddress to use
firewall_nat_flags="" # Additional configuration parameters
+dummynet_enable="NO" # Load the dummynet(4) module
ip_portrange_first="NO" # Set first dynamically allocated port
ip_portrange_last="NO" # Set last dynamically allocated port
ike_enable="NO" # Enable IKE daemon (usually racoon or isakmpd)
@@ -560,7 +561,7 @@
watchdogd_enable="NO" # Start the software watchdog daemon
devfs_rulesets="/etc/defaults/devfs.rules /etc/devfs.rules" # Files containing
# devfs(8) rules.
-devfs_system_ruleset="" # The name of a ruleset to apply to /dev
+devfs_system_ruleset="" # The name (NOT number) of a ruleset to apply to /dev
devfs_set_rulesets="" # A list of /mount/dev=ruleset_name settings to
# apply (must be mounted already, i.e. fstab(5))
performance_cx_lowest="HIGH" # Online CPU idle state
==== //depot/projects/toehead/etc/rc.d/ipfw#3 (text+ko) ====
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $FreeBSD: src/etc/rc.d/ipfw,v 1.16 2008/01/26 14:02:19 mtm Exp $
+# $FreeBSD: src/etc/rc.d/ipfw,v 1.17 2008/01/27 15:15:12 mtm Exp $
#
# PROVIDE: ipfw
@@ -14,9 +14,17 @@
name="ipfw"
rcvar="firewall_enable"
start_cmd="ipfw_start"
+start_precmd="ipfw_prestart"
stop_cmd="ipfw_stop"
required_modules="ipfw"
+ipfw_prestart()
+{
+ if checkyesno dummynet_enable; then
+ required_modules="$required_modules dummynet"
+ fi
+}
+
ipfw_start()
{
# set the firewall rules script if none was specified
==== //depot/projects/toehead/gnu/usr.bin/gdb/kgdb/kgdb.h#4 (text+ko) ====
@@ -23,7 +23,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $FreeBSD: src/gnu/usr.bin/gdb/kgdb/kgdb.h,v 1.8 2008/01/24 19:11:13 jhb Exp $
+ * $FreeBSD: src/gnu/usr.bin/gdb/kgdb/kgdb.h,v 1.9 2008/01/28 21:40:10 jhb Exp $
*/
#ifndef _KGDB_H_
@@ -48,6 +48,7 @@
extern struct kthr *curkthr;
void kgdb_add_kld_cmd(char *, int);
+void kgdb_auto_load_klds(void);
void kgdb_target(void);
void kgdb_trgt_fetch_registers(int);
void kgdb_trgt_store_registers(int);
==== //depot/projects/toehead/gnu/usr.bin/gdb/kgdb/kld.c#2 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/gnu/usr.bin/gdb/kgdb/kld.c,v 1.1 2008/01/24 19:11:13 jhb Exp $");
+__FBSDID("$FreeBSD: src/gnu/usr.bin/gdb/kgdb/kld.c,v 1.3 2008/01/28 21:45:09 jhb Exp $");
#include <sys/param.h>
#include <sys/stat.h>
@@ -41,6 +41,16 @@
#include "kgdb.h"
+/*
+ * TODO
+ *
+ * - Use 'target_read_memory()' instead of kvm_read().
+ * - Hook into the solib stuff perhaps?
+ */
+
+/* Offsets of fields in linker_file structure. */
+static CORE_ADDR off_address, off_filename, off_pathname, off_next;
+
static int
kld_ok (char *path)
{
@@ -52,68 +62,72 @@
}
/*
- * Look for a matching file in the following order:
+ * Look for a matching file checking for debug suffixes before the raw file:
* - filename + ".symbols" (e.g. foo.ko.symbols)
* - filename + ".debug" (e.g. foo.ko.debug)
* - filename (e.g. foo.ko)
- * - dirname(kernel) + filename + ".symbols" (e.g. /boot/kernel/foo.ko.symbols)
- * - dirname(kernel) + filename + ".debug" (e.g. /boot/kernel/foo.ko.debug)
- * - dirname(kernel) + filename (e.g. /boot/kernel/foo.ko)
- * - iterate over each path in the module path looking for:
- * - dir + filename + ".symbols" (e.g. /boot/modules/foo.ko.symbols)
- * - dir + filename + ".debug" (e.g. /boot/modules/foo.ko.debug)
- * - dir + filename (e.g. /boot/modules/foo.ko)
+ */
+static const char *kld_suffixes[] = {
+ ".symbols",
+ ".debug",
+ "",
+ NULL
+};
+
+static int
+check_kld_path (char *path, size_t path_size)
+{
+ const char **suffix;
+ char *ep;
+
+ ep = path + strlen(path);
+ suffix = kld_suffixes;
+ while (*suffix != NULL) {
+ if (strlcat(path, *suffix, path_size) < path_size) {
+ if (kld_ok(path))
+ return (1);
+ }
+
+ /* Restore original path to remove suffix. */
+ *ep = '\0';
+ suffix++;
+ }
+ return (0);
+}
+
+/*
+ * Try to find the path for a kld by looking in the kernel's directory and
+ * in the various paths in the module path.
*/
static int
find_kld_path (char *filename, char *path, size_t path_size)
{
CORE_ADDR module_path_addr;
- char module_path[PATH_MAX];
+ char *module_path;
char *kernel_dir, *module_dir, *cp;
+ int error;
- snprintf(path, path_size, "%s.symbols", filename);
- if (kld_ok(path))
- return (1);
- snprintf(path, path_size, "%s.debug", filename);
- if (kld_ok(path))
- return (1);
- snprintf(path, path_size, "%s", filename);
- if (kld_ok(path))
- return (1);
kernel_dir = dirname(kernel);
if (kernel_dir != NULL) {
- snprintf(path, path_size, "%s/%s.symbols", kernel_dir,
- filename);
- if (kld_ok(path))
- return (1);
- snprintf(path, path_size, "%s/%s.debug", kernel_dir, filename);
- if (kld_ok(path))
- return (1);
snprintf(path, path_size, "%s/%s", kernel_dir, filename);
- if (kld_ok(path))
+ if (check_kld_path(path, path_size))
return (1);
}
module_path_addr = kgdb_parse("linker_path");
- if (module_path_addr != 0 &&
- kvm_read(kvm, module_path_addr, module_path, sizeof(module_path)) ==
- sizeof(module_path)) {
- module_path[PATH_MAX - 1] = '\0';
- cp = module_path;
- while ((module_dir = strsep(&cp, ";")) != NULL) {
- snprintf(path, path_size, "%s/%s.symbols", module_dir,
- filename);
- if (kld_ok(path))
- return (1);
- snprintf(path, path_size, "%s/%s.debug", module_dir,
- filename);
- if (kld_ok(path))
- return (1);
- snprintf(path, path_size, "%s/%s", module_dir,
- filename);
- if (kld_ok(path))
- return (1);
+ if (module_path_addr != 0) {
+ target_read_string(module_path_addr, &module_path, PATH_MAX,
+ &error);
+ if (error == 0) {
+ make_cleanup(xfree, module_path);
+ cp = module_path;
+ while ((module_dir = strsep(&cp, ";")) != NULL) {
+ snprintf(path, path_size, "%s/%s", module_dir,
+ filename);
+ if (check_kld_path(path, path_size))
+ return (1);
+ }
}
- }
+ }
return (0);
}
@@ -150,36 +164,29 @@
static int
find_kld_address (char *arg, CORE_ADDR *address)
{
- CORE_ADDR kld, filename_addr;
- CORE_ADDR off_address, off_filename, off_next;
- char kld_filename[PATH_MAX];
+ CORE_ADDR kld;
+ char *kld_filename;
char *filename;
- size_t filelen;
+ int error;
- /* Compute offsets of relevant members in struct linker_file. */
- off_address = kgdb_parse("&((struct linker_file *)0)->address");
- off_filename = kgdb_parse("&((struct linker_file *)0)->filename");
- off_next = kgdb_parse("&((struct linker_file *)0)->link.tqe_next");
if (off_address == 0 || off_filename == 0 || off_next == 0)
return (0);
filename = basename(arg);
- filelen = strlen(filename) + 1;
- kld = kgdb_parse("linker_files.tqh_first");
- while (kld != 0) {
+ for (kld = kgdb_parse("linker_files.tqh_first"); kld != 0;
+ kld = read_pointer(kld + off_next)) {
/* Try to read this linker file's filename. */
- filename_addr = read_pointer(kld + off_filename);
- if (filename_addr == 0)
- goto next_kld;
- if (kvm_read(kvm, filename_addr, kld_filename, filelen) !=
- filelen)
- goto next_kld;
+ target_read_string(read_pointer(kld + off_filename),
+ &kld_filename, PATH_MAX, &error);
+ if (error)
+ continue;
/* Compare this kld's filename against our passed in name. */
- if (kld_filename[filelen - 1] != '\0')
- goto next_kld;
- if (strcmp(kld_filename, filename) != 0)
- goto next_kld;
+ if (strcmp(kld_filename, filename) != 0) {
+ xfree(kld_filename);
+ continue;
+ }
+ xfree(kld_filename);
/*
* We found a match, use its address as the base
@@ -189,116 +196,212 @@
if (*address == 0)
return (0);
return (1);
-
- next_kld:
- kld = read_pointer(kld + off_next);
}
return (0);
}
+struct add_section_info {
+ struct section_addr_info *section_addrs;
+ int sect_index;
+ CORE_ADDR base_addr;
+ int add_kld_command;
+};
+
+static void
+add_section (bfd *bfd, asection *sect, void *arg)
+{
+ struct add_section_info *asi = arg;
+ CORE_ADDR address;
+ char *name;
+
+ /* Ignore non-resident sections. */
+ if ((bfd_get_section_flags(bfd, sect) & (SEC_ALLOC | SEC_LOAD)) == 0)
+ return;
+
+ name = xstrdup(bfd_get_section_name(bfd, sect));
+ make_cleanup(xfree, name);
+ address = asi->base_addr + bfd_get_section_vma(bfd, sect);
+ asi->section_addrs->other[asi->sect_index].name = name;
+ asi->section_addrs->other[asi->sect_index].addr = address;
+ asi->section_addrs->other[asi->sect_index].sectindex = sect->index;
+ if (asi->add_kld_command)
+ printf_unfiltered("\t%s_addr = %s\n", name,
+ local_hex_string(address));
+ asi->sect_index++;
+}
+
static void
-add_section(struct section_addr_info *section_addrs, int *sect_indexp,
- char *name, CORE_ADDR address)
+load_kld (char *path, CORE_ADDR base_addr, int from_tty, int add_kld_command)
{
- int sect_index;
+ struct add_section_info asi;
+ struct cleanup *cleanup;
+ bfd *bfd;
+
+ /* Open the kld. */
+ bfd = bfd_openr(path, gnutarget);
+ if (bfd == NULL)
+ error("\"%s\": can't open: %s", path,
+ bfd_errmsg(bfd_get_error()));
+ cleanup = make_cleanup_bfd_close(bfd);
+
+ if (!bfd_check_format(bfd, bfd_object))
+ error("\%s\": not an object file", path);
+
+ /* Make sure we have a .text section. */
+ if (bfd_get_section_by_name (bfd, ".text") == NULL)
+ error("\"%s\": can't find text section", path);
+
+ if (add_kld_command)
+ printf_unfiltered("add symbol table from file \"%s\" at\n",
+ path);
+
+ /* Build a section table for symbol_file_add() from the bfd sections. */
+ asi.section_addrs = alloc_section_addr_info(bfd_count_sections(bfd));
+ cleanup = make_cleanup(xfree, asi.section_addrs);
+ asi.sect_index = 0;
+ asi.base_addr = base_addr;
+ asi.add_kld_command = add_kld_command;
+ bfd_map_over_sections(bfd, add_section, &asi);
+
+ if (from_tty && (!query("%s", "")))
+ error("Not confirmed.");
+
+ symbol_file_add(path, from_tty, asi.section_addrs, 0,
+ add_kld_command ? OBJF_USERLOADED : 0);
- sect_index = *sect_indexp;
- section_addrs->other[sect_index].name = name;
- section_addrs->other[sect_index].addr = address;
- printf_unfiltered("\t%s_addr = %s\n", name,
- local_hex_string(address));
- sect_index++;
- *sect_indexp = sect_index;
+ do_cleanups(cleanup);
}
void
kgdb_add_kld_cmd (char *arg, int from_tty)
{
- struct section_addr_info *section_addrs;
- struct cleanup *cleanup;
char path[PATH_MAX];
- asection *sect;
CORE_ADDR base_addr;
- bfd *bfd;
- CORE_ADDR text_addr, data_addr, bss_addr, rodata_addr;
- int sect_count, sect_index;
+
+ /* Try to open the raw path to handle absolute paths first. */
+ snprintf(path, sizeof(path), "%s", arg);
+ if (!check_kld_path(path, sizeof(path))) {
- if (!find_kld_path(arg, path, sizeof(path))) {
- error("unable to locate kld");
- return;
+ /*
+ * If that didn't work, look in the various possible
+ * paths for the module.
+ */
+ if (!find_kld_path(arg, path, sizeof(path))) {
+ error("Unable to locate kld");
+ return;
+ }
}
if (!find_kld_address(arg, &base_addr)) {
- error("unable to find kld in kernel");
+ error("Unable to find kld in kernel");
return;
}
- /* Open the kld and find the offsets of the various sections. */
- bfd = bfd_openr(path, gnutarget);
- if (bfd == NULL) {
- error("\"%s\": can't open: %s", path,
- bfd_errmsg(bfd_get_error()));
- return;
+ load_kld(path, base_addr, from_tty, 1);
+
+ reinit_frame_cache();
+}
+
+static void
+dummy_cleanup (void *arg)
+{
+}
+
+static void
+load_single_kld (CORE_ADDR kld)
+{
+ CORE_ADDR address;
+ char kldpath[PATH_MAX];
+ char *path, *filename;
+ int errcode, path_ok;
+
+ /* Try to read this linker file's filename. */
+ target_read_string(read_pointer(kld + off_filename), &filename,
+ PATH_MAX, &errcode);
+ if (errcode)
+ error("Unable to read kld filename");
+
+ make_cleanup(xfree, filename);
+ path_ok = 0;
+
+ /* Try to read this linker file's pathname. */
+ if (off_pathname != 0) {
+ target_read_string(read_pointer(kld + off_pathname), &path,
+ PATH_MAX, &errcode);
+ if (errcode == 0) {
+ make_cleanup(xfree, path);
+
+ /*
+ * If we have a pathname, try to load the kld
+ * from there.
+ */
+ strlcpy(kldpath, path, sizeof(kldpath));
+ if (check_kld_path(kldpath, sizeof(kldpath)))
+ path_ok = 1;
+ }
}
- cleanup = make_cleanup_bfd_close(bfd);
+
+ /*
+ * If we didn't get a pathname from the linker file path, try
+ * to find this kld in the various search paths.
+ */
+ if (!path_ok && !find_kld_path(filename, kldpath, sizeof(kldpath)))
+ error("Unable to find kld file for \"%s\".", filename);
- if (!bfd_check_format(bfd, bfd_object)) {
- do_cleanups(cleanup);
- error("\%s\": not an object file", path);
- return;
- }
+ /* Read this kld's base address and add its symbols. */
+ address = read_pointer(kld + off_address);
+ if (address == 0)
+ error("Invalid address for kld \"%s\"", filename);
- data_addr = bss_addr = rodata_addr = 0;
- sect = bfd_get_section_by_name (bfd, ".text");
- if (sect == NULL) {
- do_cleanups(cleanup);
- error("\"%s\": can't find text section", path);
- return;
- }
- text_addr = bfd_get_section_vma(bfd, sect);
- sect_count = 1;
+ load_kld(kldpath, address, 0, 0);
- /* Save the offsets of relevant sections. */
- sect = bfd_get_section_by_name (bfd, ".data");
- if (sect != NULL) {
- data_addr = bfd_get_section_vma(bfd, sect);
- sect_count++;
- }
+ printf_unfiltered("Loaded symbols for kld \"%s\" from \"%s\"\n",
+ filename, path);
+}
- sect = bfd_get_section_by_name (bfd, ".bss");
- if (sect != NULL) {
- bss_addr = bfd_get_section_vma(bfd, sect);
- sect_count++;
- }
+static int
+load_kld_stub (void *arg)
+{
+ CORE_ADDR kld = *(CORE_ADDR *)arg;
- sect = bfd_get_section_by_name (bfd, ".rodata");
- if (sect != NULL) {
- rodata_addr = bfd_get_section_vma(bfd, sect);
- sect_count++;
- }
+ load_single_kld(kld);
- do_cleanups(cleanup);
+ return (1);
+}
- printf_unfiltered("add symbol table from file \"%s\" at\n", path);
+void
+kgdb_auto_load_klds (void)
+{
+ struct cleanup *cleanup;
+ CORE_ADDR kld, kernel;
+ int loaded_kld;
- /* Build a section table for symbol_file_add(). */
- section_addrs = alloc_section_addr_info(sect_count);
- cleanup = make_cleanup(xfree, section_addrs);
- sect_index = 0;
- add_section(section_addrs, §_index, ".text", base_addr + text_addr);
- if (data_addr != 0)
- add_section(section_addrs, §_index, ".data",
- base_addr + data_addr);
- if (bss_addr != 0)
- add_section(section_addrs, §_index, ".bss",
- base_addr + bss_addr);
- if (rodata_addr != 0)
- add_section(section_addrs, §_index, ".rodata",
- base_addr + rodata_addr);
+ /* Compute offsets of relevant members in struct linker_file. */
+ off_address = kgdb_parse("&((struct linker_file *)0)->address");
+ off_filename = kgdb_parse("&((struct linker_file *)0)->filename");
+ off_pathname = kgdb_parse("&((struct linker_file *)0)->pathname");
+ off_next = kgdb_parse("&((struct linker_file *)0)->link.tqe_next");
+ if (off_address == 0 || off_filename == 0 || off_next == 0)
+ return;
- symbol_file_add(path, from_tty, section_addrs, 0, OBJF_USERLOADED);
+ /* Walk the list of linker files auto-loading klds. */
+ cleanup = make_cleanup(dummy_cleanup, NULL);
+ loaded_kld = 0;
+ kld = kgdb_parse("linker_files.tqh_first");
+ kernel = kgdb_parse("linker_kernel_file");
+ for (kld = kgdb_parse("linker_files.tqh_first"); kld != 0;
+ kld = read_pointer(kld + off_next)) {
+ /* Skip the main kernel file. */
+ if (kld == kernel)
+ continue;
- reinit_frame_cache();
+ if (catch_errors(load_kld_stub, &kld,
+ "Error while reading kld symbols:\n", RETURN_MASK_ALL))
+ loaded_kld = 1;
+ }
do_cleanups(cleanup);
+
+ if (loaded_kld)
+ reinit_frame_cache();
}
==== //depot/projects/toehead/gnu/usr.bin/gdb/kgdb/kthr.c#3 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/gnu/usr.bin/gdb/kgdb/kthr.c,v 1.9 2008/01/18 18:57:27 emaste Exp $");
+__FBSDID("$FreeBSD: src/gnu/usr.bin/gdb/kgdb/kthr.c,v 1.10 2008/01/28 20:33:19 jhb Exp $");
#include <sys/param.h>
#include <sys/proc.h>
@@ -60,10 +60,8 @@
nl[0].n_name = (char *)(uintptr_t)sym;
nl[1].n_name = NULL;
- if (kvm_nlist(kvm, nl) != 0) {
- warnx("kvm_nlist(%s): %s", sym, kvm_geterr(kvm));
+ if (kvm_nlist(kvm, nl) != 0)
return (0);
- }
return (nl[0].n_value);
}
@@ -82,13 +80,17 @@
uintptr_t addr, paddr;
addr = kgdb_lookup("_allproc");
- if (addr == 0)
+ if (addr == 0) {
+ warnx("kvm_nlist(_allproc): %s", kvm_geterr(kvm));
return (NULL);
+ }
kvm_read(kvm, addr, &paddr, sizeof(paddr));
dumppcb = kgdb_lookup("_dumppcb");
- if (dumppcb == 0)
+ if (dumppcb == 0) {
+ warnx("kvm_nlist(_dumppcb): %s", kvm_geterr(kvm));
return (NULL);
+ }
addr = kgdb_lookup("_dumptid");
if (addr != 0)
==== //depot/projects/toehead/gnu/usr.bin/gdb/kgdb/main.c#3 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/gnu/usr.bin/gdb/kgdb/main.c,v 1.12 2008/01/17 21:43:12 jhb Exp $");
+__FBSDID("$FreeBSD: src/gnu/usr.bin/gdb/kgdb/main.c,v 1.13 2008/01/28 20:31:30 jhb Exp $");
#include <sys/param.h>
#include <sys/stat.h>
@@ -72,6 +72,7 @@
static char kvm_err[_POSIX2_LINE_MAX];
static int dumpnr;
+static int quiet;
static int verbose;
static char crashdir[PATH_MAX];
@@ -239,6 +240,8 @@
* Display the unread portion of the message buffer. This gives the
* user a some initial data to work from.
*/
+ if (quiet)
+ return;
bufp = kgdb_parse("msgbufp->msg_ptr");
size = (int)kgdb_parse("msgbufp->msg_size");
rseq = (int)kgdb_parse("msgbufp->msg_rseq");
@@ -302,7 +305,7 @@
struct stat st;
struct captured_main_args args;
char *s;
- int a, ch, quiet, writecore;
+ int a, ch, writecore;
dumpnr = -1;
==== //depot/projects/toehead/gnu/usr.bin/gdb/kgdb/trgt.c#4 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/gnu/usr.bin/gdb/kgdb/trgt.c,v 1.7 2008/01/24 19:11:13 jhb Exp $");
+__FBSDID("$FreeBSD: src/gnu/usr.bin/gdb/kgdb/trgt.c,v 1.8 2008/01/28 21:40:10 jhb Exp $");
#include <sys/param.h>
#include <sys/proc.h>
@@ -239,4 +239,5 @@
add_com ("add-kld", class_files, kgdb_add_kld_cmd,
"Usage: add-kld FILE\n\
Load the symbols from the kernel loadable module FILE.");
+ kgdb_auto_load_klds();
}
==== //depot/projects/toehead/gnu/usr.bin/gdb/kgdb/trgt_i386.c#2 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/gnu/usr.bin/gdb/kgdb/trgt_i386.c,v 1.7 2007/11/16 22:17:37 jhb Exp $");
+__FBSDID("$FreeBSD: src/gnu/usr.bin/gdb/kgdb/trgt_i386.c,v 1.8 2008/01/28 20:33:19 jhb Exp $");
#include <sys/param.h>
#include <sys/proc.h>
@@ -141,8 +141,10 @@
*/
if (trunc_page(tss) == 0xffc00000) {
addr = kgdb_lookup("_cpu0prvpage");
- if (addr == 0)
+ if (addr == 0) {
+ warnx("kvm_nlist(_cpu0prvpage): %s", kvm_geterr(kvm));
return (0);
+ }
if (kvm_read(kvm, addr, &cpu0prvpage, sizeof(cpu0prvpage)) !=
sizeof(cpu0prvpage)) {
warnx("kvm_read: %s", kvm_geterr(kvm));
==== //depot/projects/toehead/lib/msun/src/s_exp2f.c#3 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/msun/src/s_exp2f.c,v 1.3 2008/01/19 21:37:14 bde Exp $");
+__FBSDID("$FreeBSD: src/lib/msun/src/s_exp2f.c,v 1.4 2008/01/28 01:19:07 das Exp $");
#include <float.h>
@@ -93,12 +93,12 @@
exp2f(float x)
{
double tv;
- float r, t, z;
- uint32_t hx, hr, ix, i0;
+ float t, z;
+ uint32_t hx, htv, ix, i0;
int32_t k;
/* Filter out exceptional cases. */
- GET_FLOAT_WORD(hx,x);
+ GET_FLOAT_WORD(hx, x);
ix = hx & 0x7fffffff; /* high word of |x| */
if(ix >= 0x43000000) { /* |x| >= 128 */
if(ix >= 0x7f800000) {
@@ -119,25 +119,19 @@
STRICT_ASSIGN(float, t, x + redux);
GET_FLOAT_WORD(i0, t);
i0 += TBLSIZE / 2;
- k = (i0 >> TBLBITS) << 23;
+ k = (i0 >> TBLBITS) << 20;
i0 &= TBLSIZE - 1;
t -= redux;
z = x - t;
/* Compute r = exp2(y) = exp2ft[i0] * p(z). */
tv = exp2ft[i0];
- r = tv + tv * (z * (P1 + z * (P2 + z * (P3 + z * P4))));
+ tv = tv + tv * (z * (P1 + z * (P2 + z * (P3 + z * P4))));
- /* Scale by 2**(k>>23). */
- if(k >= -125 << 23) {
- if (k != 0) {
- GET_FLOAT_WORD(hr, r);
- SET_FLOAT_WORD(r, hr + k);
- }
- return (r);
- } else {
- GET_FLOAT_WORD(hr, r);
- SET_FLOAT_WORD(r, hr + (k + (100 << 23)));
- return (r * twom100);
+ /* Scale by 2**(k>>20). */
+ if (k != 0) {
+ GET_HIGH_WORD(htv, tv);
+ SET_HIGH_WORD(tv, htv + k);
}
+ return (tv);
}
==== //depot/projects/toehead/sbin/ffsinfo/ffsinfo.c#2 (text+ko) ====
@@ -48,7 +48,7 @@
#ifndef lint
static const char rcsid[] =
- "$FreeBSD: src/sbin/ffsinfo/ffsinfo.c,v 1.13 2007/02/14 23:22:33 brian Exp $";
+ "$FreeBSD: src/sbin/ffsinfo/ffsinfo.c,v 1.14 2008/01/29 00:20:00 delphij Exp $";
#endif /* not lint */
/* ********************************************************** INCLUDES ***** */
@@ -141,7 +141,7 @@
cfg_lv = 0xff;
cfg_in = -2;
cfg_cg = -2;
- out_file = "-";
+ out_file = strdup("-");
while ((ch = getopt(argc, argv, "g:i:l:o:")) != -1) {
switch (ch) {
==== //depot/projects/toehead/share/man/man4/ath.4#2 (text+ko) ====
@@ -29,7 +29,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
.\" THE POSSIBILITY OF SUCH DAMAGES.
.\"
-.\" $FreeBSD: src/share/man/man4/ath.4,v 1.43 2007/07/01 10:25:06 thompsa Exp $
+.\" $FreeBSD: src/share/man/man4/ath.4,v 1.44 2008/01/28 18:08:40 brueffer Exp $
.\"/
.Dd December 7, 2006
.Dt ATH 4
@@ -256,7 +256,6 @@
.Xr an 4 ,
.Xr arp 4 ,
.Xr ath_hal 4 ,
-.Xr card 4 ,
.Xr netintro 4 ,
.Xr pcic 4 ,
.Xr wi 4 ,
==== //depot/projects/toehead/share/man/man4/awi.4#2 (text+ko) ====
@@ -1,5 +1,5 @@
.\" $NetBSD: awi.4,v 1.6 2000/03/22 11:24:33 onoe Exp $
-.\" $FreeBSD: src/share/man/man4/awi.4,v 1.23 2007/01/30 08:40:03 brueffer Exp $
+.\" $FreeBSD: src/share/man/man4/awi.4,v 1.24 2008/01/28 18:08:40 brueffer Exp $
.\"
.Dd July 16, 2005
.Dt AWI 4
@@ -126,7 +126,6 @@
.Sh SEE ALSO
.Xr altq 4 ,
.Xr arp 4 ,
-.Xr card 4 ,
.Xr cnw 4 ,
.Xr miibus 4 ,
.Xr netintro 4 ,
==== //depot/projects/toehead/share/man/man4/ed.4#3 (text+ko) ====
@@ -28,9 +28,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $FreeBSD: src/share/man/man4/ed.4,v 1.55 2008/01/01 21:41:39 imp Exp $
+.\" $FreeBSD: src/share/man/man4/ed.4,v 1.57 2008/01/29 00:13:20 trhodes Exp $
.\"
-.Dd January 1, 2008
+.Dd January 27, 2008
.Dt ED 4
.Os
.Sh NAME
@@ -309,9 +309,6 @@
C-Bus, ISA, PCI and PC Card devices are supported.
.Sh DIAGNOSTICS
.Bl -diag
-.It "ed%d: kernel configured irq %d doesn't match board configured irq %d."
-The IRQ number that was specified in the kernel config file (and then compiled
-into the kernel) differs from the IRQ that has been set on the interface card.
.It "ed%d: failed to clear shared memory at %x - check configuration."
When the card was probed at system boot time, the
.Nm
@@ -321,12 +318,14 @@
Ethernet card's shared memory.
Either find the offending card and change its BIOS
ROM to be at an address that does not conflict, or change the
-.Cd iomem
-option in the kernel config file so that the card's shared memory is mapped at a
+settings in
+.Xr device.hints 5
+that the card's shared memory is mapped at a
non-conflicting address.
.It "ed%d: Invalid irq configuration (%d) must be 2-5 for 3c503."
-The IRQ number that was specified in the kernel config file is not valid for
-the 3Com 3c503 card.
+The IRQ number that was specified in the
+.Xr device.hints 5
+file is not valid for the 3Com 3c503 card.
The 3c503 can only be assigned to IRQs 2 through 5.
.It "ed%d: Cannot find start of RAM."
.It "ed%d: Cannot find any RAM, start : %d, x = %d."
@@ -355,6 +354,14 @@
has failed to properly complete.
Usually caused by the ISA bus speed being set
too fast.
+.It "ed%d: Invalid irq configuration (%ld) must be %s for %s"
+Indicates the device has a different IRQ than supported or expected.
+.It "ed%d: Cannot locate my ports!"
+The device is using a different I/O port than the driver knows about.
+.It "ed%d: Cannot extract MAC address"
+Attempts to get the MAC address failed.
+.It "ed%d: Missing mii!"
+Probing for an MII bus has failed.
.El
.Sh CAVEATS
Early revision DS8390 chips have problems.
@@ -389,6 +396,7 @@
.Xr miibus 4 ,
.Xr netintro 4 ,
.Xr ng_ether 4 ,
+.Xr device.hints 5 ,
.Xr ifconfig 8
.Sh HISTORY
The
==== //depot/projects/toehead/share/man/man4/man4.i386/snc.4#2 (text+ko) ====
@@ -23,7 +23,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $FreeBSD: src/share/man/man4/man4.i386/snc.4,v 1.5 2005/07/31 03:30:45 keramida Exp $
+.\" $FreeBSD: src/share/man/man4/man4.i386/snc.4,v 1.6 2008/01/28 18:08:41 brueffer Exp $
.\"
.Dd September 4, 2004
.Dt SNC 4 i386
@@ -113,7 +113,6 @@
invalid packet length.
.El
.Sh SEE ALSO
-.Xr card 4 ,
.Xr netintro 4 ,
.Xr bus_alloc_resource_any 9
.Sh HISTORY
==== //depot/projects/toehead/share/man/man4/wi.4#2 (text+ko) ====
@@ -28,7 +28,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
.\" THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.\" $FreeBSD: src/share/man/man4/wi.4,v 1.73 2007/07/11 04:17:02 imp Exp $
+.\" $FreeBSD: src/share/man/man4/wi.4,v 1.74 2008/01/28 18:08:41 brueffer Exp $
.\" $OpenBSD: wi.4tbl,v 1.14 2002/04/29 19:53:50 jsyn Exp $
.\"
.Dd July 16, 2005
@@ -351,7 +351,6 @@
.Xr an 4 ,
.Xr arp 4 ,
.Xr ath 4 ,
-.Xr card 4 ,
.Xr netintro 4 ,
.Xr pccard 4 ,
.Xr pccbb 4 ,
@@ -420,9 +419,6 @@
This tells the PC Card system to use PCI interrupts for this odd beast.
It is not possible to know automatically which kind of interrupts to use.
OLDCARD devices
-.Xr ( pcic 4
-and
-.Xr card 4 )
support this device.
NEWCARD devices
.Xr ( pccbb 4
==== //depot/projects/toehead/share/man/man5/rc.conf.5#4 (text+ko) ====
@@ -22,9 +22,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $FreeBSD: src/share/man/man5/rc.conf.5,v 1.333 2008/01/23 16:08:35 chinsan Exp $
+.\" $FreeBSD: src/share/man/man5/rc.conf.5,v 1.334 2008/01/27 15:15:12 mtm Exp $
.\"
-.Dd January 23, 2008
+.Dd January 27, 2008
.Dt RC.CONF 5
.Os
.Sh NAME
@@ -509,6 +509,16 @@
.It Va firewall_nat_flags
>>> TRUNCATED FOR MAIL (1000 lines) <<<
More information about the p4-projects
mailing list