SlideShare a Scribd company logo
1 of 9
Download to read offline
Talks on adb
    Day 1



            mariah@tmax.co.kr
                     2010.07
Debugger

Java Debugging

Android
Debugging Tools

adb (Day 2)
Debugger는
개발자들의 고민을
덜어주고 자유 시간을
보장한다.
Debugger의 작동 원리는 그리 어렵지 않다



                    Debug Symbol
                    (PDB)
                     Line table
                     for Profiling
                     for Dump

                    Event Request
                     Set Breakpoint
                     Single Step

                    Event
                     Breakpoint hit
                     Module loaded
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
Java (Remote) Debugging: JPDA


   Components          Debugger Interfaces
                                                  JVMTI
                                                   agent
           VM                                       JNI
        ----------     Java VM Tool Interface       javaagent (BCI)
        back-end
                                                  JDWP
                                                   command packet
comm channel           Java Debug Wire Protocol
                                                   transport


        front-end                                 JDI (com.sun.jdi)
        ----------     Java Debug Interface        .connect
            UI                                     .event
                                                   .request
                                                   Listener
javadt 데모 및 Set Breakpoint 시나리오
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
traceview
  DDMS
  Logcat
        jdwp

More Related Content

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Recently uploaded (20)

Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 

Featured

Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Featured (20)

Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 

Talks on adb - Day 1 (pdf version)

  • 1. Talks on adb Day 1 mariah@tmax.co.kr 2010.07
  • 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
  • 6. Java (Remote) Debugging: JPDA Components Debugger Interfaces JVMTI agent VM JNI ---------- Java VM Tool Interface javaagent (BCI) back-end JDWP command packet comm channel Java Debug Wire Protocol transport front-end JDI (com.sun.jdi) ---------- Java Debug Interface .connect UI .event .request Listener
  • 7. javadt 데모 및 Set Breakpoint 시나리오
  • 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
  • 9. traceview DDMS Logcat jdwp