freebsd-skq/sys/ddb
bde 254458ab34 Fix printing of negative offsets (typically from frame pointers) again.
I fixed this in 1997, but the fix was over-engineered and fragile and
was broken in 2003 if not before.  i386 parameters were copied to 8
other arches verbatim, mostly after they stopped working on i386, and
mostly without the large comment saying how the values were chosen on
i386.  powerpc has a non-verbatim copy which just changes the uncritical
parameter and seems to add a sign extension bug to it.

Just treat negative offsets as offsets if they are no more negative than
-db_offset_max (default -64K), and remove all the broken parameters.

-64K is not very negative, but it is enough for frame and stack pointer
offsets since kernel stacks are small.

The over-engineering was mainly to go more negative than -64K for the
negative offset format, without affecting printing for more than a
single address.

Addresses in the top 64K of a (full 32-bit or 64-bit) address space
are now printed less well, but there aren't many interesting ones.
For arches that have many interesting ones very near the top (e.g.,
68k has interrupt vectors there), there would be no good limit for
the negative offset format and -64K is a good as anything.
2017-03-26 18:46:35 +00:00
..
db_access.c
db_access.h
db_break.c
db_break.h
db_capture.c
db_command.c Correct the type of db_cmd_loop_done. 2016-09-09 04:16:53 +00:00
db_command.h
db_examine.c Determine the operand/address size of %cs in a new function 2016-09-25 16:30:29 +00:00
db_expr.c Fix right shifts on arches with db_expr_t larger than u_int (LP64 arches 2017-03-18 07:01:18 +00:00
db_input.c Revert r311952. 2017-01-14 22:06:25 +00:00
db_lex.c Add a small set of logical operators to DDB command language. 2016-05-16 19:42:38 +00:00
db_lex.h Add a small set of logical operators to DDB command language. 2016-05-16 19:42:38 +00:00
db_main.c Pass the trap type and code down from db_trap() to db_stop_at_pc() so 2016-09-09 15:53:42 +00:00
db_output.c sys: Make use of our rounddown() macro when sys/param.h is available. 2016-04-30 14:41:18 +00:00
db_output.h
db_print.c
db_ps.c Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
db_run.c Silently ignore unexpected single-step traps (except for turning 2016-09-17 11:43:51 +00:00
db_script.c
db_sym.c Fix printing of negative offsets (typically from frame pointers) again. 2017-03-26 18:46:35 +00:00
db_sym.h
db_textdump.c Add support for encrypted kernel crash dumps. 2016-12-10 16:20:39 +00:00
db_thread.c
db_variables.c Indentation issues. 2016-04-20 16:19:44 +00:00
db_variables.h
db_watch.c
db_watch.h
db_write_cmd.c
ddb.h Revert crap accidentally committed 2017-01-28 16:31:23 +00:00