Changeset View
Changeset View
Standalone View
Standalone View
head/gnu/usr.bin/gdb/kgdb/main.c
Show All 35 Lines | |||||
#include <sys/time.h> | #include <sys/time.h> | ||||
#include <sys/wait.h> | #include <sys/wait.h> | ||||
#include <errno.h> | #include <errno.h> | ||||
#include <err.h> | #include <err.h> | ||||
#include <inttypes.h> | #include <inttypes.h> | ||||
#include <kvm.h> | #include <kvm.h> | ||||
#include <limits.h> | #include <limits.h> | ||||
#include <paths.h> | #include <paths.h> | ||||
#ifdef CROSS_DEBUGGER | |||||
#include <proc_service.h> | |||||
#endif | |||||
#include <stdio.h> | #include <stdio.h> | ||||
#include <stdlib.h> | #include <stdlib.h> | ||||
#include <string.h> | #include <string.h> | ||||
#include <unistd.h> | #include <unistd.h> | ||||
/* libgdb stuff. */ | /* libgdb stuff. */ | ||||
#include <defs.h> | #include <defs.h> | ||||
#include <frame.h> | #include <frame.h> | ||||
Show All 20 Lines | |||||
static char crashdir[PATH_MAX]; | static char crashdir[PATH_MAX]; | ||||
static char *kernel; | static char *kernel; | ||||
static char *remote; | static char *remote; | ||||
static char *vmcore; | static char *vmcore; | ||||
static struct ui_file *parse_gdberr; | static struct ui_file *parse_gdberr; | ||||
static void (*kgdb_new_objfile_chain)(struct objfile * objfile); | static void (*kgdb_new_objfile_chain)(struct objfile * objfile); | ||||
#ifdef CROSS_DEBUGGER | |||||
ps_err_e | |||||
ps_pglobal_lookup(struct ps_prochandle *ph, const char *obj, const char *name, | |||||
psaddr_t *sym_addr) | |||||
{ | |||||
struct minimal_symbol *ms; | |||||
CORE_ADDR addr; | |||||
ms = lookup_minimal_symbol (name, NULL, NULL); | |||||
if (ms == NULL) | |||||
return PS_NOSYM; | |||||
addr = SYMBOL_VALUE_ADDRESS (ms); | |||||
store_typed_address(sym_addr, builtin_type_void_data_ptr, addr); | |||||
return PS_OK; | |||||
} | |||||
#endif | |||||
static void | static void | ||||
usage(void) | usage(void) | ||||
{ | { | ||||
fprintf(stderr, | fprintf(stderr, | ||||
"usage: %s [-afqvw] [-b rate] [-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()); | "\t[kernel [core]]\n", getprogname()); | ||||
▲ Show 20 Lines • Show All 394 Lines • Show Last 20 Lines |