History log of /haiku/headers/private/kernel/arch/x86/arch_user_debugger.h
Revision Date Author Comments
# 1f39d6dd 18-Jul-2019 Augustin Cavalier <waddlesplash@gmail.com>

arch_user_debugger: Restore the use of size_t for dr7.

The prior change broke the build with some cryptic "invalid
instruction mov" messages. So it must have been correct before.


# a2161324 17-Jul-2019 Adrien Destugues <pulkomandy@pulkomandy.tk>

PVS V784: fix size of DR7 register

Even on 64bit CPUs it's a 32bit register.

Change-Id: I9a4de6eec225de19a90d70fae1382b662e530629
Reviewed-on: https://review.haiku-os.org/c/1625
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 735f6748 16-Dec-2013 Pawel Dziepak <pdziepak@quarnos.org>

x86: Debugger can now use dr3


# 8a190335 07-Aug-2012 Alex Smith <alex@alex-smith.me.uk>

Implemented user debugging support for x86_64.

Reused x86 arch_user_debugger.cpp, with a few minor changes to make
the code work for both 32 and 64 bit. Something isn't quite working
right, if a breakpoint is hit the kernel will hang. Other than that
everything appears to work correctly.


# 4535495d 10-Jan-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Merged the signals branch into trunk, with these changes:
* The team and thread kernel structures have been renamed to Team and Thread
respectively and moved into the new BKernel namespace.
* Several (kernel add-on) sources have been converted from C to C++ since
private kernel headers are included that are no longer C compatible.

Changes after merging:
* Fixed gcc 2 build (warnings mainly in the scary firewire bus manager).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40196 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b0f12d64 23-Jun-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Added transparent software breakpoint support for user debuggers:
* The bulk of the work -- i.e. juggling the software and hardware breakpoints,
watchpoints, and memory reads/writes -- is done in the new class
BreakpointManager.
* For the architectures a few capability macros have to be defined, one
pointing to the software breakpoint instruction opcode. Done for x86.
* Some more simplifications in the user debugger code, made possible by the
recently introduced debugger_changed_condition attribute.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31214 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 34b3b26b 10-Jan-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Merged branch haiku/branches/developer/bonefish/optimization revision
23139 into trunk, with roughly the following changes (for details svn
log the branch):
* The int 99 syscall handler is now fully in assembly.
* Added a sysenter/sysexit handler and use it on Pentiums that support
it (via commpage).
* Got rid of i386_handle_trap(). A bit of functionality was moved into
the assembly handler which now uses a jump table to call C functions
handling the respective interrupt.
* Some optimizations to get user debugger support code out of the
interrupt handling path.
* Introduced a thread::flags fields which allows to skip handling of
rare events (signals, user debug enabling/disabling) on the
common interrupt handling path.
* Got rid of the explicit iframe stack. The iframes can still be
retrieved by iterating through the stack frames.
* Made the commpage an architecture independent feature. It's used for
the real time data stuff (instead of creating a separate area).
* The x86 CPU modules can now provide processor optimized versions for
common functions (currently memcpy() only). They are used in the
kernel and are provided to the userland via commpage entries.
* Introduced build system feature allowing easy use of C structure
member offsets in assembly code.

Changes after merging:
* Fixed merge conflict in src/system/kernel/arch/x86/arch_debug.cpp
(caused by refactoring and introduction of "call" debugger command).



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23370 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 85001a7c 25-Mar-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

* Fixed checking for DR6 bits after a debug exception (we were and'ing
with the bit number, not the respective mask).
* Added a small hack to allow single stepping to work in qemu.
Apparently the BS bit in DR6 is not set when the debug exception
is handled. So we always assume that a single step event occurred,
when we couldn't recognize any other event, if the hack is enabled.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@11998 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 935486a0 02-Mar-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Added some more EFLAGS bits.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11533 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 86cc7224 01-Mar-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

* DR3 is used for holding the pointer to the current struct thread*, so
we only have 3 debug registers available for break-/watchpoints.
* Added definitions for debug status register DR6. Reordered DR7 defs to
ascending order. Added definitions for the EFLAGS flags we need.
* Added arch_thread_debug_info structure and related definitions.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11525 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8ae64a82 27-Feb-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

x86 specific user debugging support definitions.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11508 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 735f67481fa904ae6bb5d0763f515fd7b93d5529 16-Dec-2013 Pawel Dziepak <pdziepak@quarnos.org>

x86: Debugger can now use dr3


# 8a1903353eedd95266c7241aada3a314c5d35a55 07-Aug-2012 Alex Smith <alex@alex-smith.me.uk>

Implemented user debugging support for x86_64.

Reused x86 arch_user_debugger.cpp, with a few minor changes to make
the code work for both 32 and 64 bit. Something isn't quite working
right, if a breakpoint is hit the kernel will hang. Other than that
everything appears to work correctly.


# 4535495d80c86e19e2610e7444a4fcefe3e0f8e6 10-Jan-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Merged the signals branch into trunk, with these changes:
* The team and thread kernel structures have been renamed to Team and Thread
respectively and moved into the new BKernel namespace.
* Several (kernel add-on) sources have been converted from C to C++ since
private kernel headers are included that are no longer C compatible.

Changes after merging:
* Fixed gcc 2 build (warnings mainly in the scary firewire bus manager).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40196 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b0f12d64f42dc8f5bbabf4cbcdf25178b3eb3749 23-Jun-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Added transparent software breakpoint support for user debuggers:
* The bulk of the work -- i.e. juggling the software and hardware breakpoints,
watchpoints, and memory reads/writes -- is done in the new class
BreakpointManager.
* For the architectures a few capability macros have to be defined, one
pointing to the software breakpoint instruction opcode. Done for x86.
* Some more simplifications in the user debugger code, made possible by the
recently introduced debugger_changed_condition attribute.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31214 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 34b3b26b3b8c46ba46ddde037b10dd173f4936d6 10-Jan-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Merged branch haiku/branches/developer/bonefish/optimization revision
23139 into trunk, with roughly the following changes (for details svn
log the branch):
* The int 99 syscall handler is now fully in assembly.
* Added a sysenter/sysexit handler and use it on Pentiums that support
it (via commpage).
* Got rid of i386_handle_trap(). A bit of functionality was moved into
the assembly handler which now uses a jump table to call C functions
handling the respective interrupt.
* Some optimizations to get user debugger support code out of the
interrupt handling path.
* Introduced a thread::flags fields which allows to skip handling of
rare events (signals, user debug enabling/disabling) on the
common interrupt handling path.
* Got rid of the explicit iframe stack. The iframes can still be
retrieved by iterating through the stack frames.
* Made the commpage an architecture independent feature. It's used for
the real time data stuff (instead of creating a separate area).
* The x86 CPU modules can now provide processor optimized versions for
common functions (currently memcpy() only). They are used in the
kernel and are provided to the userland via commpage entries.
* Introduced build system feature allowing easy use of C structure
member offsets in assembly code.

Changes after merging:
* Fixed merge conflict in src/system/kernel/arch/x86/arch_debug.cpp
(caused by refactoring and introduction of "call" debugger command).



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23370 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 85001a7cc645cd9397e25de66321080a354da1f7 25-Mar-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

* Fixed checking for DR6 bits after a debug exception (we were and'ing
with the bit number, not the respective mask).
* Added a small hack to allow single stepping to work in qemu.
Apparently the BS bit in DR6 is not set when the debug exception
is handled. So we always assume that a single step event occurred,
when we couldn't recognize any other event, if the hack is enabled.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@11998 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 935486a09fc06cef79f8f6c9a597affa52722dc1 02-Mar-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Added some more EFLAGS bits.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11533 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 86cc722477a3e462b1f0ac4442fec7e79596745d 01-Mar-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

* DR3 is used for holding the pointer to the current struct thread*, so
we only have 3 debug registers available for break-/watchpoints.
* Added definitions for debug status register DR6. Reordered DR7 defs to
ascending order. Added definitions for the EFLAGS flags we need.
* Added arch_thread_debug_info structure and related definitions.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11525 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8ae64a82ebfc630602c2fda01cba64aad7ad2af3 27-Feb-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

x86 specific user debugging support definitions.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11508 a95241bf-73f2-0310-859d-f6bbb57e9c96