Talks on adb - Day 1 (pdf version)
-
Upload
kangho-kim -
Category
Technology
-
view
600 -
download
0
description
Transcript of Talks on adb - Day 1 (pdf version)
DebuggerDebugger
Java DebuggingJava Debugging
Android Android
Debugging ToolsDebugging Tools
adbadb (Day 2)(Day 2)
DebuggerDebugger는는개발자들의개발자들의 고민을고민을덜어주고덜어주고 자유자유 시간을시간을보장한다보장한다..
DebuggerDebugger의의 작동작동 원리는원리는 그리그리 어렵지어렵지 않다않다
Debug Symbol Debug Symbol (PDB)(PDB)Line tableLine tablefor Profilingfor Profilingfor Dumpfor Dump
Event RequestEvent RequestSet BreakpointSet BreakpointSingle StepSingle Step
EventEventBreakpoint hitBreakpoint hitModule loadedModule loaded
JavaJava에서의에서의 DebuggingDebugging이라고이라고 크게크게다르지도다르지도 않을않을 것이다것이다
Debug Debug Symbol(PDBSymbol(PDB))Line tableLine tablefor Profilingfor Profilingfor Dumpfor Dump
Event RequestEvent RequestSet BreakpointSet BreakpointSingle StepSingle Step
EventEventBreakpoint hitBreakpoint hitDLL loadedDLL loaded
Debug Debug Symbol(classSymbol(class))Line tableLine tablefor Profilingfor Profilingfor Dumpfor Dump
Event RequestEvent RequestSet BreakpointSet BreakpointSingle StepSingle Step
EventEventBreakpoint hitBreakpoint hitClass loadedClass loaded
Java (Remote) Debugging: JPDAJava (Remote) Debugging: JPDA
JVMTIJVMTIagentagent
JNIJNIjavaagentjavaagent (BCI)(BCI)
JDWPJDWPcommand packetcommand packettransporttransport
JDI (JDI (com.sun.jdicom.sun.jdi)).connect.connect.event.event.request.requestListenerListener
VM----------back-end
front-end----------
UIJava Debug Interface
Java Debug Wire Protocol
Java VM Tool Interface
Components Debugger Interfaces
comm channel
javadtjavadt 데모데모 및및 Set Breakpoint Set Breakpoint 시나리오시나리오
Java (Remote) Debugging: JPDAJava (Remote) Debugging: JPDA
Debugger Debugging Server
Attaches by socket to other VMsAgent on the target VM- Supports JDWP to communicate with the debugger
suspendTransportService- Socket- SharedMemory
Gets a mirror of VMcom.sun.jdi.VirtualMachine
start debugger loop(JDIEventSource thread)
ClassPrepareEvent for a classVirtualMachine#eventQueue() Resolve & Create Breakpoint Request
JDWP.EventRequest.Set
(send packetstream)
!View slide note for event log
breakpoint hitshow it
!Confer to debug-related objects
register SourceListenerregister DebugListener
BreakpointEvent
(resolve)
Request resume
VM startClasses loaded
SetBreakpoint(jvmtiEnv* env…
Agent Event Callbacks
listen for a connection
traceviewtraceviewDDMSDDMSLogcatLogcat
jdwp