]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Merge bde improvements for ddb on x86, mostly for single-stepping and
authorkib <kib@FreeBSD.org>
Mon, 7 Nov 2016 12:10:17 +0000 (12:10 +0000)
committerkib <kib@FreeBSD.org>
Mon, 7 Nov 2016 12:10:17 +0000 (12:10 +0000)
commit664c82e536131bd88cdfa97cb2b4859c20f222a4
tree9718576c2fcbdd55f946b5b10383d6a15996d840
parente83371ccf28a104b7d819fb6f0b7e927374dae47
Merge bde improvements for ddb on x86, mostly for single-stepping and
vm86 mode.

MFC r304085 (by bde):
Fix the variables $esp, $ds, $es, $fs, $gs and $ss in vm86 mode.  Fix
PC_REGS() so that printing of instructions works in some useful cases.

MFC r304962 (by bde):
Expand error messages: print symbol names, parentheses and shift tokens,
and negative shift counts.  Fix error messages.

MFC r305612 (by bde):
Fix single-stepping of instructions emulated by vm86.

MFC r305661 (by bde):
Give the full syntax of the 'count' arg for all commmands that support
it. Give the full syntax of the 'addr' arg for these commands and some
others.  Rename it from 'address' for the generic command. Fix
description of how 'count' is supposed to work for the 'break'
command.

Don't (mis)describe the syntax of the comma for the 'step' command.

Expand the description for the generic command.

Give the full syntax for the 'examine' command.  It was also missing
the possible values for the modifier.

MFC r305663 (by bde):
Fix stopping when the specified breakpoint count is reached.

MFC r305665 (by bde):
Pass the trap type and code down from db_trap() to db_stop_at_pc() so
that the latter can easily determine what the trap type actually is
after callers are fixed to encode the type unambigously.

MFC r305807 (by bde):
Use the MI macro TRAPF_USERMODE() instead of open-coded checks for
SEL_UPL and sometimes PSL_VM.  Fix logic errors in treating vm86
bioscall mode as kernel mode.  The main place checked all the
necessary flags, but put the necessary parentheses for the PSL_VM and
PCB_VM86CALL checks in the wrong place.

MFC r305811 (by bz):
Try to fix LINT builds after r305807.

MFC r305840 (by bde):
Abort single stepping in ddb if the trap is not for single-stepping.

MFC r305862 (by bde):
Ifdef the new dr6 variable for KDB.

MFC r305864 (by bde):
Statically initialize the run mode to the one that will become current
on first entry. Don't reset to the run mode to STEP_NONE when
stopping, and remove STEP_NONE.

MFC r305865 (by bde):
Fix decoding of tf_rsp on amd64, and move TF_HAS_STACKREGS() to the
i386-only section, and fix a comment about the amd64 kernel trapframe
not having stackregs.

MFC r305897 (by bde):
Silently ignore unexpected single-step traps.

MFC r306311 (by bde):
Determine the operand/address size of %cs in a new function
db_segsize().  Use db_segsize() to set the default operand/address
size for disassembling.

Fix db_print_loc_and_inst() to ask for the normal format and not the
alternate in normal operation. Use db_segsize() to avoid trying to
print a garbage stack trace if %cs is 16 bits.
15 files changed:
share/man/man4/ddb.4
sys/amd64/amd64/trap.c
sys/amd64/include/db_machdep.h
sys/ddb/db_examine.c
sys/ddb/db_expr.c
sys/ddb/db_main.c
sys/ddb/db_run.c
sys/ddb/ddb.h
sys/i386/i386/db_disasm.c
sys/i386/i386/db_interface.c
sys/i386/i386/db_trace.c
sys/i386/i386/trap.c
sys/i386/i386/vm86.c
sys/i386/include/db_machdep.h
sys/x86/include/frame.h