SlideShare a Scribd company logo
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"

More Related Content

What's hot

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
Chun-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
 
Applied Computer Science Concepts in Android
Applied Computer Science Concepts in AndroidApplied Computer Science Concepts in Android
Applied Computer Science Concepts in Android
National Cheng Kung University
 
Build Programming Language Runtime with LLVM
Build Programming Language Runtime with LLVMBuild Programming Language Runtime with LLVM
Build Programming Language Runtime with LLVM
National Cheng Kung University
 
Next Stop, Android
Next Stop, AndroidNext Stop, Android
Next Stop, Android
National Cheng Kung University
 
Introduction to Android by Demian Neidetcher
Introduction to Android by Demian NeidetcherIntroduction to Android by Demian Neidetcher
Introduction to Android by Demian Neidetcher
Matthew McCullough
 
Java vs .net
Java vs .netJava vs .net
Java vs .netTech_MX
 
Skype testing overview
Skype testing overviewSkype testing overview
Skype testing overview
QA 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 2011
Doug Hawkins
 
Debugging Python with gdb
Debugging Python with gdbDebugging Python with gdb
Debugging Python with gdb
Roman 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 tool
Gabor Paller
 
Jython for embedded software validation
Jython for embedded software validationJython for embedded software validation
Jython for embedded software validation
PyCon Italia
 
Java vs .net (beginners)
Java vs .net (beginners)Java vs .net (beginners)
Java vs .net (beginners)
Ravi Vishwakarma
 
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 perspective
Bin Chen
 

What's hot (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
 

Similar to 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 applications
Roman Podoliaka
 
Kernel development
Kernel developmentKernel development
Kernel development
Nuno 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 Development
Ramesh 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 Techniques
Bala Subra
 
.NET Debugging Tips and Techniques
.NET Debugging Tips and Techniques.NET Debugging Tips and Techniques
.NET Debugging Tips and Techniques
Bala Subra
 
Multithreading in Android
Multithreading in AndroidMultithreading in Android
Multithreading in Android
coolmirza143
 
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
SamiraKids
 
Typhoon Managed Execution Toolkit
Typhoon Managed Execution ToolkitTyphoon Managed Execution Toolkit
Typhoon Managed Execution Toolkit
Dimitry Snezhkov
 
Introduction to the Android NDK
Introduction to the Android NDKIntroduction to the Android NDK
Introduction to the Android NDK
Sebastian Mauer
 
C# Production Debugging Made Easy
 C# Production Debugging Made Easy C# Production Debugging Made Easy
C# Production Debugging Made Easy
Alon 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 DirectX
A. LE
 
Getting Native with NDK
Getting Native with NDKGetting Native with NDK
Getting Native with NDK
ナム-Nam Nguyễn
 
An Introduction To Android
An Introduction To AndroidAn Introduction To Android
An Introduction To Android
natdefreitas
 
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
 
Asp dot net
Asp dot netAsp dot net
Asp dot net
husnara mohammad
 
Android Logging System
Android Logging SystemAndroid Logging System
Android Logging System
William Lee
 

Similar to 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
 

Recently uploaded

UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
g2nightmarescribd
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 

Recently uploaded (20)

UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 

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"