SlideShare une entreprise Scribd logo
1  sur  20
So you want me to use which debugger ... ?

        Deciphering the CDT debugger alphabet soup



Bruce Griffith                     John Cortell
Partner                            Senior Software Engineer
Sage Electronic Engineering, LLC   Freescale Semiconductor
Bruce.Griffith@se-eng.com
What does a debugger need to do?
1.   Launch new programs
2.   Control program execution (run/stop/breakpoint)
3.   Read/write hardware registers and memory
4.   Interpret stack frames
5.   Disassemble machine instructions
6.   Perform symbol lookup and translate memory and registers into
     program variable values

Additional things a debugger might do:
1. Track remote system status (e.g. process status, CPU utilization)
2. Perform symbol lookup on the remote system (for system calls)
3. Non-stop debug
4. Execution tracing
5. Read/write target flash
6. Edit-and-Continue / code hot-swap
Paradigms: Develop-on-Target




                                        Debugger
           Application
                                                   Application   Application



         Eclipse IDE with CDT


                          Desktop Operating System


                                Hardware Resources


                         Host / Target Machine
Paradigms: kernel debug

                                         JTAG
                                                                      Applications




                              Debugger
                                         Debug
                                         Probe
         Eclipse IDE
          with CDT
                                                           Driver             Driver   Driver
                                         Comm
                             Comm                                  Operating System
                                                  (559) 272-0900
                                         Debug
                                         “stub”            Initial Program Loader (IPL)
  Desktop Operating System

                                                     Debug
    Hardware Resources                               Logic            Hardware Resources
                                                   (Hardware)


      Host Machine                                              Target Machine
Paradigms: Remote Application Debug


                                                       Application



                               Debugger
                                                                            Application
          Eclipse IDE
           with CDT
                                                    Comm   Debug “stub”


                              Comm
                                          Network

   Desktop Operating System                                          RTOS


     Hardware Resources


       Host Machine                                        Target Machine
Which CDT debugger implementation should I extend?
What CDT/Eclipse debugger API should I plug into?
Summary

                                   CDI-GDB             DSF-GDB         DSF-EDC-TCF            TCF-debug

Debug Model                  Standard            Flexible Hierarchy   Flexible Hierarchy   Flexible Hierarchy

Status of Reference
                             Not Active          Mature               Active Development   Incubation
Implementation

Multi-core / Multi-process
                             None                Under Development    Designed In
Extensions

                                                                      EDC
Debugger Backend             gdb                 gdb                                       TCF Agent(s)
                                                                      TCF Agent(s)

Communications Handler       gdb                 gdb                  TCF                  TCF

                             Java                Java                 Java (TCF)           Java (TCF)
Source Language
                             (+GNU components)   (+GNU components)    C (TCF Agents)       C (TCF Agents)

                             Anything gdb        Anything gdb         gdbserver, x86,
Existing Target Support                                                                    Windows, LINUX
                             supports            supports             ARM

Symbol Support               DWARF               DWARF                DWARF                DWARF, PDB
Backup Slides
Some Definitions ...
host:                                   debugger:   (the definition for this talk)
  The system used to compile,             A piece of software that abstracts
  assemble, and link a program. The       access to the resources used by a
  user interface to control symbolic      target program and controls target
  debug often runs on a host.             program flow.

target or debuggee:                       In more concrete terms:
   The system where the compiled            • provides access to registers and
   program will run. For desktop              memory used by the debuggee
   application programs, the host and       • manipulates hardware and
   target are usually the same                software breakpoints and allow
   system. For embedded systems,              user to start/stop debuggee
   the host and target are frequently       • Performs symbol lookup for
   different physical machines.               symbolic names
                                            • Perform instruction
                                              disassembly
Definitions (cont.)
gdb:                                        CDI:   (C/C++ Debugger Interface)
   A command-line debugger                    Serializes communications between
   developed by the GNU Project. gdb          Eclipse debug windows and
   supports several target architectures      gdb. Uses a fixed information
   (e.g. ARM variants, PowerPC, x86,          hierarchy.
   etc.).
                                            DSF:   (Device Services Framework)
gdbserver (or stub):                          Synchronizes communications
   A piece of gdb that runs on the target     between Eclipse debug windows and
   to interact with the target hardware       gdb. Uses flexible hierarchy.
   and OS. Allows gdb to debug a
   remote target.                           TCF:   (Target Communication Framework)
                                              Abstracts communications, can be
EDC:   (Eclipse Debugger for C/C++)           used to make multiple virtual
   Part of the Eclipse CDT project. A         connections between host and target
   lightweight debugger that exploits         (e.g. proprietary debugger
   DSF for message synchronization            connection plus virtualized Ethernet
   and uses TCF for target                    plus virtualized monitor).
   communication.
CDI: C Debugger Interface
(CDI-GDB is the default C debugger implementation for CDT through Galileo)

"The CDI is a Java™-based                    • New development has ceased, but
Application Programming Interface              reference implementations are mature
(API) whose classes and interfaces             and production-ready.
make it possible to access the CDT's         • Serializes debugger access to ensure
debugging framework. An Eclipse                that responses remain associated with
plug-in that uses the CDI can add new          the proper debugger commands.
debuggers to the CDT's operation and         • Uses a fixed hierarchy:
display the debugging results in the              ILauch =>
                                                    IDebugTarget =>
Eclipse/CDT debug perspective."                       IProcess =>
                                                         IThread =>
• CDI provides a standard programming                      IStackFrame
  interface for Eclipse CDT views to         • Events cause all debug views to
  access a custom debugger. CDI-GDB            update
  provides a reference implementation
  using gdb.
DSF: Debugger Services Framework
"Debugger Services Framework (DSF)          • Currently the default debugger
is an API for integrating a debugger          framework for CDT. The existing
with Eclipse's standard debugger              reference implementation for gdb is
views. It is an alternative to Platform's     mature and production-ready.
standard debug model and it                 • Uses a concurrency model to ensure
leverages debugger views' flexible            that responses remain associated with
hierarchy API which was introduced in         the proper debugger commands
Eclipse 3.2. The main design goal of          without serializing requests.
DSF is to allow increased flexibility       • Uses a flexible hierarchy for views
and performance in a debugger                 related to stack frames, threads,
integration."                                 processes, etc.
                                            • DSF-GDB will permit exploitation of
 • DSF provides a standard                    new gdb features such as multi-core /
   programming interface for Eclipse          multi-process and OpenCL support.
   CDT views to access a custom
   debugger. DSF-GDB provides a
   reference implementation using gdb.
TCF: Target Communications Framework
"TCF is a vendor-neutral, lightweight,    • Aggregates and virtualizes host-to-
extensible network protocol mainly for      target communications into a single
communicating with embedded                 physical or virtual connection.
systems (targets). Its most               • Provides for agent discovery
distinguishing feature is that TCF is     • Agents can perform any arbitrary
designed to transparently plug in           service.
value-adding servers between the tool     • Eliminates the need to dedicate
and the target. But even without value-     multiple communications links for
add, the protocol has the potential to      target debug, and can "piggyback"
unify lots of currently independent         debug communications onto an
communication links, thus saving            existing target link.
resources and making setup and
configuration much easier than in
current embedded development
scenarios."
gdb: The GNU Debugger
"GDB is a source-level debugger for      • Variants for ARM, x86, x86_64,
Ada, C, C++, Objective-C, Pascal and       PowerPC, MIPS and several other
many other languages. GDB can              processor architectures
target (i.e., debug programs running     • Executes on LINUX, UNIX, and
on) more than a dozen different            Windows hosts. (Windows
processor architectures, and GDB           supported via Cygwin or MinGW)
itself can run on most popular           • Debugs applications built for
GNU/Linux, Unix and Microsoft              UNIX, LINUX, and Windows
Windows variants."                       • Supports ELF and PE file format
  • Licensed under GPL                   • Supports DWARF symbols
  • Supports C, C++, assembly            • Does NOT support Windows PDB
     language, FORTRAN, and several        symbols
     other languages                     • Emerging multi-process support
  • Actively maintained under the Free   • Emerging support for numeric
     Software Foundation umbrella          processing (NVIDIA and ATI
  • Can be used to debug local and         hardware and OpenCL)
     remote applications
EDC: The Eclipse Debugger for C/C++
"EDC is a Complete Architecture for      • Variants for ARM and x86
C/C++ Debugging in Eclipse/CDT that      • Written in Java with agents written
leverages and connects existing            in C.
Eclipse debug technology (Platform,      • Debugs applications built for
CDT, DSF, TCF). EDC doesn’t require        LINUX, Symbian, and Windows
a debug “back-end”. Completely           • Supports ELF and PE file format
asynchronous for best performance.       • Supports DWARF symbols
Pervasive multi core/context/process     • Multi-process support
support. Provides a collection of core   • Stack deframing based on
debug services. Uses platform specific     dynamic processor modes is
low level debug agents. Reference          possible (for example X86 real
implementations for Windows and            mode to protected mode)
Linux."                                  • Provides additional high-level
 • Licensed under EPL                      features such as snapshots and
 • Supports C and C++                      scripting
TCF-debug
"This code connects Eclipse Debug        • TCF-debug is a debugger
Framework and Target                       reference implementation that
Communication Framework. It allows         demonstrates using TCF agent(s)
to launch Eclipse debug session by         as a full-featured debugger.
connecting to a target running TCF       • Debugger services are
agent, and then perform basic              discovered from within the local
debugging tasks, like resuming,            network.
suspending, single-stepping,             • Existing stubs are written in C and
setting/removing breakpoints, etc. The     available for Windows and LINUX.
code can be used as a reference for        The Windows stub can be used
developing new TCF clients."               with Microsoft toolchains and
                                           understands Microsoft symbols.
                                         • Existing stubs are focused on
                                           remote application debug and can
                                           integrate with Remote System
                                           Explorer (RSE).
                                         • TCF-debug is in "incubation"

Contenu connexe

Tendances

How to implement a simple dalvik virtual machine
How to implement a simple dalvik virtual machineHow to implement a simple dalvik virtual machine
How to implement a simple dalvik virtual machineChun-Yu Wang
 
Microservices for building an IDE – The innards of JetBrains Rider - TechDays...
Microservices for building an IDE – The innards of JetBrains Rider - TechDays...Microservices for building an IDE – The innards of JetBrains Rider - TechDays...
Microservices for building an IDE – The innards of JetBrains Rider - TechDays...Maarten Balliauw
 
Introduction to Android by Demian Neidetcher
Introduction to Android by Demian NeidetcherIntroduction to Android by Demian Neidetcher
Introduction to Android by Demian NeidetcherMatthew McCullough
 
Java vs .net
Java vs .netJava vs .net
Java vs .netTech_MX
 
Skype testing overview
Skype testing overviewSkype testing overview
Skype testing overviewQA Club Kiev
 
Inside Android's Dalvik VM - NEJUG Nov 2011
Inside Android's Dalvik VM - NEJUG Nov 2011Inside Android's Dalvik VM - NEJUG Nov 2011
Inside Android's Dalvik VM - NEJUG Nov 2011Doug Hawkins
 
Debugging Python with gdb
Debugging Python with gdbDebugging Python with gdb
Debugging Python with gdbRoman Podoliaka
 
Understanding the Dalvik bytecode with the Dedexer tool
Understanding the Dalvik bytecode with the Dedexer toolUnderstanding the Dalvik bytecode with the Dedexer tool
Understanding the Dalvik bytecode with the Dedexer toolGabor Paller
 
Jython for embedded software validation
Jython for embedded software validationJython for embedded software validation
Jython for embedded software validationPyCon Italia
 
Software Parallelisation & Platform Generation for Heterogeneous Multicore Ar...
Software Parallelisation & Platform Generation for Heterogeneous Multicore Ar...Software Parallelisation & Platform Generation for Heterogeneous Multicore Ar...
Software Parallelisation & Platform Generation for Heterogeneous Multicore Ar...chiportal
 
LinkedIn - Disassembling Dalvik Bytecode
LinkedIn - Disassembling Dalvik BytecodeLinkedIn - Disassembling Dalvik Bytecode
LinkedIn - Disassembling Dalvik BytecodeAlain Leon
 
Android graphic system (SurfaceFlinger) : Design Pattern's perspective
Android graphic system (SurfaceFlinger) : Design Pattern's perspectiveAndroid graphic system (SurfaceFlinger) : Design Pattern's perspective
Android graphic system (SurfaceFlinger) : Design Pattern's perspectiveBin Chen
 

Tendances (20)

How to implement a simple dalvik virtual machine
How to implement a simple dalvik virtual machineHow to implement a simple dalvik virtual machine
How to implement a simple dalvik virtual machine
 
Microservices for building an IDE – The innards of JetBrains Rider - TechDays...
Microservices for building an IDE – The innards of JetBrains Rider - TechDays...Microservices for building an IDE – The innards of JetBrains Rider - TechDays...
Microservices for building an IDE – The innards of JetBrains Rider - TechDays...
 
Birendra_resume
Birendra_resumeBirendra_resume
Birendra_resume
 
Applied Computer Science Concepts in Android
Applied Computer Science Concepts in AndroidApplied Computer Science Concepts in Android
Applied Computer Science Concepts in Android
 
Build Programming Language Runtime with LLVM
Build Programming Language Runtime with LLVMBuild Programming Language Runtime with LLVM
Build Programming Language Runtime with LLVM
 
Next Stop, Android
Next Stop, AndroidNext Stop, Android
Next Stop, Android
 
Introduction to Android by Demian Neidetcher
Introduction to Android by Demian NeidetcherIntroduction to Android by Demian Neidetcher
Introduction to Android by Demian Neidetcher
 
Java vs .net
Java vs .netJava vs .net
Java vs .net
 
Skype testing overview
Skype testing overviewSkype testing overview
Skype testing overview
 
TOMOYO Linux on Android
TOMOYO Linux on AndroidTOMOYO Linux on Android
TOMOYO Linux on Android
 
Inside Android's Dalvik VM - NEJUG Nov 2011
Inside Android's Dalvik VM - NEJUG Nov 2011Inside Android's Dalvik VM - NEJUG Nov 2011
Inside Android's Dalvik VM - NEJUG Nov 2011
 
Debugging Python with gdb
Debugging Python with gdbDebugging Python with gdb
Debugging Python with gdb
 
Understanding the Dalvik bytecode with the Dedexer tool
Understanding the Dalvik bytecode with the Dedexer toolUnderstanding the Dalvik bytecode with the Dedexer tool
Understanding the Dalvik bytecode with the Dedexer tool
 
TULIKA KESHRI (1)
TULIKA KESHRI (1)TULIKA KESHRI (1)
TULIKA KESHRI (1)
 
Jython for embedded software validation
Jython for embedded software validationJython for embedded software validation
Jython for embedded software validation
 
Java vs .net (beginners)
Java vs .net (beginners)Java vs .net (beginners)
Java vs .net (beginners)
 
Software Parallelisation & Platform Generation for Heterogeneous Multicore Ar...
Software Parallelisation & Platform Generation for Heterogeneous Multicore Ar...Software Parallelisation & Platform Generation for Heterogeneous Multicore Ar...
Software Parallelisation & Platform Generation for Heterogeneous Multicore Ar...
 
Birendra_resume
Birendra_resumeBirendra_resume
Birendra_resume
 
LinkedIn - Disassembling Dalvik Bytecode
LinkedIn - Disassembling Dalvik BytecodeLinkedIn - Disassembling Dalvik Bytecode
LinkedIn - Disassembling Dalvik Bytecode
 
Android graphic system (SurfaceFlinger) : Design Pattern's perspective
Android graphic system (SurfaceFlinger) : Design Pattern's perspectiveAndroid graphic system (SurfaceFlinger) : Design Pattern's perspective
Android graphic system (SurfaceFlinger) : Design Pattern's perspective
 

Similaire à EclipseCon 2011: Deciphering the CDT debugger alphabet soup

Debugging of (C)Python applications
Debugging of (C)Python applicationsDebugging of (C)Python applications
Debugging of (C)Python applicationsRoman Podoliaka
 
Kernel development
Kernel developmentKernel development
Kernel developmentNuno Martins
 
Amoeba - Heterogeneous Multiprocessor Debugging in a Single Session of GDB
Amoeba - Heterogeneous Multiprocessor Debugging in a Single Session of GDBAmoeba - Heterogeneous Multiprocessor Debugging in a Single Session of GDB
Amoeba - Heterogeneous Multiprocessor Debugging in a Single Session of GDBKalpak Shah
 
Advance Android Application Development
Advance Android Application DevelopmentAdvance Android Application Development
Advance Android Application DevelopmentRamesh Prasad
 
Android on IA devices and Intel Tools
Android on IA devices and Intel ToolsAndroid on IA devices and Intel Tools
Android on IA devices and Intel ToolsXavier Hallade
 
.Net Debugging Techniques
.Net Debugging Techniques.Net Debugging Techniques
.Net Debugging TechniquesBala Subra
 
.NET Debugging Tips and Techniques
.NET Debugging Tips and Techniques.NET Debugging Tips and Techniques
.NET Debugging Tips and TechniquesBala Subra
 
Multithreading in Android
Multithreading in AndroidMultithreading in Android
Multithreading in Androidcoolmirza143
 
JIT Spraying Never Dies - Bypass CFG By Leveraging WARP Shader JIT Spraying.pdf
JIT Spraying Never Dies - Bypass CFG By Leveraging WARP Shader JIT Spraying.pdfJIT Spraying Never Dies - Bypass CFG By Leveraging WARP Shader JIT Spraying.pdf
JIT Spraying Never Dies - Bypass CFG By Leveraging WARP Shader JIT Spraying.pdfSamiraKids
 
Typhoon Managed Execution Toolkit
Typhoon Managed Execution ToolkitTyphoon Managed Execution Toolkit
Typhoon Managed Execution ToolkitDimitry Snezhkov
 
Introduction to the Android NDK
Introduction to the Android NDKIntroduction to the Android NDK
Introduction to the Android NDKSebastian Mauer
 
C# Production Debugging Made Easy
 C# Production Debugging Made Easy C# Production Debugging Made Easy
C# Production Debugging Made EasyAlon Fliess
 
Adopting Debug Adapter Protocol in Eclipse IDE: netcoredbg (.NET debugger) ca...
Adopting Debug Adapter Protocol in Eclipse IDE: netcoredbg (.NET debugger) ca...Adopting Debug Adapter Protocol in Eclipse IDE: netcoredbg (.NET debugger) ca...
Adopting Debug Adapter Protocol in Eclipse IDE: netcoredbg (.NET debugger) ca...Mickael Istria
 
Managed DirectX
Managed DirectXManaged DirectX
Managed DirectXA. LE
 
An Introduction To Android
An Introduction To AndroidAn Introduction To Android
An Introduction To Androidnatdefreitas
 
Unmanaged Parallelization via P/Invoke
Unmanaged Parallelization via P/InvokeUnmanaged Parallelization via P/Invoke
Unmanaged Parallelization via P/InvokeDmitri Nesteruk
 
บทที่ 1ภาษาคอมพิวเตอร์และการโปรแกรม
บทที่ 1ภาษาคอมพิวเตอร์และการโปรแกรมบทที่ 1ภาษาคอมพิวเตอร์และการโปรแกรม
บทที่ 1ภาษาคอมพิวเตอร์และการโปรแกรมUng Titaya
 
Android Logging System
Android Logging SystemAndroid Logging System
Android Logging SystemWilliam Lee
 

Similaire à EclipseCon 2011: Deciphering the CDT debugger alphabet soup (20)

Debugging of (C)Python applications
Debugging of (C)Python applicationsDebugging of (C)Python applications
Debugging of (C)Python applications
 
Kernel development
Kernel developmentKernel development
Kernel development
 
Amoeba - Heterogeneous Multiprocessor Debugging in a Single Session of GDB
Amoeba - Heterogeneous Multiprocessor Debugging in a Single Session of GDBAmoeba - Heterogeneous Multiprocessor Debugging in a Single Session of GDB
Amoeba - Heterogeneous Multiprocessor Debugging in a Single Session of GDB
 
Advance Android Application Development
Advance Android Application DevelopmentAdvance Android Application Development
Advance Android Application Development
 
Android on IA devices and Intel Tools
Android on IA devices and Intel ToolsAndroid on IA devices and Intel Tools
Android on IA devices and Intel Tools
 
.Net Debugging Techniques
.Net Debugging Techniques.Net Debugging Techniques
.Net Debugging Techniques
 
.NET Debugging Tips and Techniques
.NET Debugging Tips and Techniques.NET Debugging Tips and Techniques
.NET Debugging Tips and Techniques
 
Multithreading in Android
Multithreading in AndroidMultithreading in Android
Multithreading in Android
 
JIT Spraying Never Dies - Bypass CFG By Leveraging WARP Shader JIT Spraying.pdf
JIT Spraying Never Dies - Bypass CFG By Leveraging WARP Shader JIT Spraying.pdfJIT Spraying Never Dies - Bypass CFG By Leveraging WARP Shader JIT Spraying.pdf
JIT Spraying Never Dies - Bypass CFG By Leveraging WARP Shader JIT Spraying.pdf
 
Typhoon Managed Execution Toolkit
Typhoon Managed Execution ToolkitTyphoon Managed Execution Toolkit
Typhoon Managed Execution Toolkit
 
Introduction to the Android NDK
Introduction to the Android NDKIntroduction to the Android NDK
Introduction to the Android NDK
 
C# Production Debugging Made Easy
 C# Production Debugging Made Easy C# Production Debugging Made Easy
C# Production Debugging Made Easy
 
Adopting Debug Adapter Protocol in Eclipse IDE: netcoredbg (.NET debugger) ca...
Adopting Debug Adapter Protocol in Eclipse IDE: netcoredbg (.NET debugger) ca...Adopting Debug Adapter Protocol in Eclipse IDE: netcoredbg (.NET debugger) ca...
Adopting Debug Adapter Protocol in Eclipse IDE: netcoredbg (.NET debugger) ca...
 
Managed DirectX
Managed DirectXManaged DirectX
Managed DirectX
 
Getting Native with NDK
Getting Native with NDKGetting Native with NDK
Getting Native with NDK
 
An Introduction To Android
An Introduction To AndroidAn Introduction To Android
An Introduction To Android
 
Unmanaged Parallelization via P/Invoke
Unmanaged Parallelization via P/InvokeUnmanaged Parallelization via P/Invoke
Unmanaged Parallelization via P/Invoke
 
บทที่ 1ภาษาคอมพิวเตอร์และการโปรแกรม
บทที่ 1ภาษาคอมพิวเตอร์และการโปรแกรมบทที่ 1ภาษาคอมพิวเตอร์และการโปรแกรม
บทที่ 1ภาษาคอมพิวเตอร์และการโปรแกรม
 
Asp dot net
Asp dot netAsp dot net
Asp dot net
 
Android Logging System
Android Logging SystemAndroid Logging System
Android Logging System
 

Dernier

AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
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...Martijn de Jong
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
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...apidays
 
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.pdfsudhanshuwaghmare1
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbuapidays
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
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 SavingEdi Saputra
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...apidays
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
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 WoodJuan lago vázquez
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 

Dernier (20)

AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
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...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
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...
 
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
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
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
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
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
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 

EclipseCon 2011: Deciphering the CDT debugger alphabet soup

  • 1. So you want me to use which debugger ... ? Deciphering the CDT debugger alphabet soup Bruce Griffith John Cortell Partner Senior Software Engineer Sage Electronic Engineering, LLC Freescale Semiconductor Bruce.Griffith@se-eng.com
  • 2. What does a debugger need to do? 1. Launch new programs 2. Control program execution (run/stop/breakpoint) 3. Read/write hardware registers and memory 4. Interpret stack frames 5. Disassemble machine instructions 6. Perform symbol lookup and translate memory and registers into program variable values Additional things a debugger might do: 1. Track remote system status (e.g. process status, CPU utilization) 2. Perform symbol lookup on the remote system (for system calls) 3. Non-stop debug 4. Execution tracing 5. Read/write target flash 6. Edit-and-Continue / code hot-swap
  • 3. Paradigms: Develop-on-Target Debugger Application Application Application Eclipse IDE with CDT Desktop Operating System Hardware Resources Host / Target Machine
  • 4. Paradigms: kernel debug JTAG Applications Debugger Debug Probe Eclipse IDE with CDT Driver Driver Driver Comm Comm Operating System (559) 272-0900 Debug “stub” Initial Program Loader (IPL) Desktop Operating System Debug Hardware Resources Logic Hardware Resources (Hardware) Host Machine Target Machine
  • 5. Paradigms: Remote Application Debug Application Debugger Application Eclipse IDE with CDT Comm Debug “stub” Comm Network Desktop Operating System RTOS Hardware Resources Host Machine Target Machine
  • 6.
  • 7. Which CDT debugger implementation should I extend?
  • 8. What CDT/Eclipse debugger API should I plug into?
  • 9. Summary CDI-GDB DSF-GDB DSF-EDC-TCF TCF-debug Debug Model Standard Flexible Hierarchy Flexible Hierarchy Flexible Hierarchy Status of Reference Not Active Mature Active Development Incubation Implementation Multi-core / Multi-process None Under Development Designed In Extensions EDC Debugger Backend gdb gdb TCF Agent(s) TCF Agent(s) Communications Handler gdb gdb TCF TCF Java Java Java (TCF) Java (TCF) Source Language (+GNU components) (+GNU components) C (TCF Agents) C (TCF Agents) Anything gdb Anything gdb gdbserver, x86, Existing Target Support Windows, LINUX supports supports ARM Symbol Support DWARF DWARF DWARF DWARF, PDB
  • 11. Some Definitions ... host: debugger: (the definition for this talk) The system used to compile, A piece of software that abstracts assemble, and link a program. The access to the resources used by a user interface to control symbolic target program and controls target debug often runs on a host. program flow. target or debuggee: In more concrete terms: The system where the compiled • provides access to registers and program will run. For desktop memory used by the debuggee application programs, the host and • manipulates hardware and target are usually the same software breakpoints and allow system. For embedded systems, user to start/stop debuggee the host and target are frequently • Performs symbol lookup for different physical machines. symbolic names • Perform instruction disassembly
  • 12. Definitions (cont.) gdb: CDI: (C/C++ Debugger Interface) A command-line debugger Serializes communications between developed by the GNU Project. gdb Eclipse debug windows and supports several target architectures gdb. Uses a fixed information (e.g. ARM variants, PowerPC, x86, hierarchy. etc.). DSF: (Device Services Framework) gdbserver (or stub): Synchronizes communications A piece of gdb that runs on the target between Eclipse debug windows and to interact with the target hardware gdb. Uses flexible hierarchy. and OS. Allows gdb to debug a remote target. TCF: (Target Communication Framework) Abstracts communications, can be EDC: (Eclipse Debugger for C/C++) used to make multiple virtual Part of the Eclipse CDT project. A connections between host and target lightweight debugger that exploits (e.g. proprietary debugger DSF for message synchronization connection plus virtualized Ethernet and uses TCF for target plus virtualized monitor). communication.
  • 13. CDI: C Debugger Interface (CDI-GDB is the default C debugger implementation for CDT through Galileo) "The CDI is a Java™-based • New development has ceased, but Application Programming Interface reference implementations are mature (API) whose classes and interfaces and production-ready. make it possible to access the CDT's • Serializes debugger access to ensure debugging framework. An Eclipse that responses remain associated with plug-in that uses the CDI can add new the proper debugger commands. debuggers to the CDT's operation and • Uses a fixed hierarchy: display the debugging results in the ILauch => IDebugTarget => Eclipse/CDT debug perspective." IProcess => IThread => • CDI provides a standard programming IStackFrame interface for Eclipse CDT views to • Events cause all debug views to access a custom debugger. CDI-GDB update provides a reference implementation using gdb.
  • 14. DSF: Debugger Services Framework "Debugger Services Framework (DSF) • Currently the default debugger is an API for integrating a debugger framework for CDT. The existing with Eclipse's standard debugger reference implementation for gdb is views. It is an alternative to Platform's mature and production-ready. standard debug model and it • Uses a concurrency model to ensure leverages debugger views' flexible that responses remain associated with hierarchy API which was introduced in the proper debugger commands Eclipse 3.2. The main design goal of without serializing requests. DSF is to allow increased flexibility • Uses a flexible hierarchy for views and performance in a debugger related to stack frames, threads, integration." processes, etc. • DSF-GDB will permit exploitation of • DSF provides a standard new gdb features such as multi-core / programming interface for Eclipse multi-process and OpenCL support. CDT views to access a custom debugger. DSF-GDB provides a reference implementation using gdb.
  • 15. TCF: Target Communications Framework "TCF is a vendor-neutral, lightweight, • Aggregates and virtualizes host-to- extensible network protocol mainly for target communications into a single communicating with embedded physical or virtual connection. systems (targets). Its most • Provides for agent discovery distinguishing feature is that TCF is • Agents can perform any arbitrary designed to transparently plug in service. value-adding servers between the tool • Eliminates the need to dedicate and the target. But even without value- multiple communications links for add, the protocol has the potential to target debug, and can "piggyback" unify lots of currently independent debug communications onto an communication links, thus saving existing target link. resources and making setup and configuration much easier than in current embedded development scenarios."
  • 16.
  • 17. gdb: The GNU Debugger "GDB is a source-level debugger for • Variants for ARM, x86, x86_64, Ada, C, C++, Objective-C, Pascal and PowerPC, MIPS and several other many other languages. GDB can processor architectures target (i.e., debug programs running • Executes on LINUX, UNIX, and on) more than a dozen different Windows hosts. (Windows processor architectures, and GDB supported via Cygwin or MinGW) itself can run on most popular • Debugs applications built for GNU/Linux, Unix and Microsoft UNIX, LINUX, and Windows Windows variants." • Supports ELF and PE file format • Licensed under GPL • Supports DWARF symbols • Supports C, C++, assembly • Does NOT support Windows PDB language, FORTRAN, and several symbols other languages • Emerging multi-process support • Actively maintained under the Free • Emerging support for numeric Software Foundation umbrella processing (NVIDIA and ATI • Can be used to debug local and hardware and OpenCL) remote applications
  • 18. EDC: The Eclipse Debugger for C/C++ "EDC is a Complete Architecture for • Variants for ARM and x86 C/C++ Debugging in Eclipse/CDT that • Written in Java with agents written leverages and connects existing in C. Eclipse debug technology (Platform, • Debugs applications built for CDT, DSF, TCF). EDC doesn’t require LINUX, Symbian, and Windows a debug “back-end”. Completely • Supports ELF and PE file format asynchronous for best performance. • Supports DWARF symbols Pervasive multi core/context/process • Multi-process support support. Provides a collection of core • Stack deframing based on debug services. Uses platform specific dynamic processor modes is low level debug agents. Reference possible (for example X86 real implementations for Windows and mode to protected mode) Linux." • Provides additional high-level • Licensed under EPL features such as snapshots and • Supports C and C++ scripting
  • 19.
  • 20. TCF-debug "This code connects Eclipse Debug • TCF-debug is a debugger Framework and Target reference implementation that Communication Framework. It allows demonstrates using TCF agent(s) to launch Eclipse debug session by as a full-featured debugger. connecting to a target running TCF • Debugger services are agent, and then perform basic discovered from within the local debugging tasks, like resuming, network. suspending, single-stepping, • Existing stubs are written in C and setting/removing breakpoints, etc. The available for Windows and LINUX. code can be used as a reference for The Windows stub can be used developing new TCF clients." with Microsoft toolchains and understands Microsoft symbols. • Existing stubs are focused on remote application debug and can integrate with Remote System Explorer (RSE). • TCF-debug is in "incubation"