4. Debugger의 작동 원리는 그리 어렵지 않다
Debug Symbol
(PDB)
Line table
for Profiling
for Dump
Event Request
Set Breakpoint
Single Step
Event
Breakpoint hit
Module loaded
5. Java에서의 Debugging이라고 크게
다르지도 않을 것이다
Debug Debug
Symbol(class) Symbol(PDB)
Line table Line table
for Profiling for Profiling
for Dump for Dump
Event Request Event Request
Set Breakpoint Set Breakpoint
Single Step Single Step
Event Event
Breakpoint hit Breakpoint hit
Class loaded DLL loaded
8. Java (Remote) Debugging: JPDA
Debugger Debugging Server
register SourceListener listen for a connection
register DebugListener
suspend
TransportService
- Socket
- SharedMemory Attaches by socket to other VMs
Agent on the target VM
- Supports JDWP to
com.sun.jdi. Gets a mirror of VM communicate with the debugger
VirtualMachine
start debugger loop
(JDIEventSource thread) VM start
ClassPrepareEvent for a class Classes loaded
VirtualMachine
#eventQueue()
Resolve & Create Breakpoint Request
SetBreakpoint(jvmtiEnv* env…
JDWP.EventRequ (send packetstream)
est.Set
Agent Event Callbacks
!View slide note
BreakpointEvent
for event log
(resolve)
breakpoint hit
show it
Request resume
!Confer to
debug-related
objects