freebsd-skq/sys/ddb
royger 494dc32ba6 ddb: allow specifying the exact address of the symtab and strtab
When the FreeBSD kernel is loaded from Xen the symtab and strtab are
not loaded the same way as the native boot loader. This patch adds
three new global variables to ddb that can be used to specify the
exact position and size of those tables, so they can be directly used
as parameters to db_add_symbol_table. A new helper is introduced, so callers
that used to set ksym_start and ksym_end can use this helper to set the new
variables.

It also adds support for loading them from the Xen PVH port, that was
previously missing those tables.

Sponsored by: Citrix Systems R&D
Reviewed by:	kib

ddb/db_main.c:
 - Add three new global variables: ksymtab, kstrtab, ksymtab_size that
   can be used to specify the position and size of the symtab and
   strtab.
 - Use those new variables in db_init in order to call db_add_symbol_table.
 - Move the logic in db_init to db_fetch_symtab in order to set ksymtab,
   kstrtab, ksymtab_size from ksym_start and ksym_end.

ddb/ddb.h:
 - Add prototype for db_fetch_ksymtab.
 - Declate the extern variables ksymtab, kstrtab and ksymtab_size.

x86/xen/pv.c:
 - Add support for finding the symtab and strtab when booted as a Xen
   PVH guest. Since Xen loads the symtab and strtab as NetBSD expects
   to find them we have to adapt and use the same method.

amd64/amd64/machdep.c:
arm/arm/machdep.c:
i386/i386/machdep.c:
mips/mips/machdep.c:
pc98/pc98/machdep.c:
powerpc/aim/machdep.c:
powerpc/booke/machdep.c:
sparc64/sparc64/machdep.c:
 - Use the newly introduced db_fetch_ksymtab in order to set ksymtab,
   kstrtab and ksymtab_size.
2014-09-25 08:28:10 +00:00
..
db_access.c
db_access.h
db_break.c
db_break.h ddb: Minor style cleanups. 2014-03-31 16:37:41 +00:00
db_capture.c
db_command.c handle longer commands so that lines don't overflow... people who added 2014-06-02 23:50:19 +00:00
db_command.h
db_examine.c
db_expr.c
db_input.c
db_lex.c
db_lex.h
db_main.c ddb: allow specifying the exact address of the symtab and strtab 2014-09-25 08:28:10 +00:00
db_output.c
db_output.h
db_print.c
db_ps.c
db_run.c ins is only set and unused, but only when we're not doing software 2014-08-14 16:01:51 +00:00
db_script.c
db_sym.c
db_sym.h ddb: Minor style cleanups. 2014-03-31 16:37:41 +00:00
db_textdump.c
db_thread.c
db_variables.c
db_variables.h ddb: Minor style cleanups. 2014-03-31 16:37:41 +00:00
db_watch.c
db_watch.h
db_write_cmd.c
ddb.h ddb: allow specifying the exact address of the symtab and strtab 2014-09-25 08:28:10 +00:00