We can have in a register an address that points to/into some variable
in the data segment, but db_print_loc_and_inst only looks for
functions, so it will misprint it as something unrelated from libkern
+ huge offset. E.g. instead of netbsd:cpu_info_store it would print
netbsd:prop_string_create_cstring+0xdeadbeef
Worse, if the address happens to be odd (char field in a struct, an
element of char array), attempt at printing the "instruction" at that
address will cause a fault and will abort "mach frame".
Disassemly is not really that useful in "mach frame" listing anyway
and more often just clutters things by overflowing 80 columns.
Dreamcast does not use SuperH on-chip RTC, so do it seprately from
other sh3 ports. Convert dreamcast rtc code into a real device
instead of searching/attaching it manually.
Tested by Nick Hudson.
Use __builtin_va_* instead of hand written code in va-sh.h that uses
LHS casts. Slightly worse code is generated by gcc 3.3.3, but LHS
casts are outlawed in gcc 3.3.6 and gcc 4.
Build-tested on hpcsh (le) and mmeye (be), run-tested on hpcsh.
gcc versions and "char *" otherwise. This is what most other arches
use, modulo different __GNUC_PREREQ__.
This is in preparation for replacing stdarg.h and varargs.h with
versions based on __builtin_* instead of handwritten code that gcc
3.3.6 and up refuse to compile b/c of lhs casts.
Identical binary code produced.
modifies machine/db_machdep.h: BKPT_SET(inst) to BKPT_SET(inst, addr) for all archs ie; passess the
breakpoint address as well.
Patch from cherry@mahiti.org
The only information to be compensated is text section start address.
The default value is set arch-wise as DEFTEXTADDR. Each kernel config
can override the default value by setting TEXTADDR.
Tested on COMPUTEXEVB (evbsh3).
Reviewed By: uwe
trace_is_enabled() to return TRUE if SYSCALL_DEBUG is defined, and g/c
all of the SYSCALL_DEBUG handling from individual system call dispatch
routines.
- proc_is_traced_p() -> trace_is_enabled(), to match trace_enter() and
trace_exit().
- trace_is_enabled() becomes a real function.
- Remove unnecessary include files from various files that used to care
about KTRACE and SYSTRACE, but do no more.