• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
EclipseCon 2011: Deciphering the CDT debugger alphabet soup
 

EclipseCon 2011: Deciphering the CDT debugger alphabet soup

on

  • 4,876 views

CDT: So you want me to use which debugger ... ? ...

CDT: So you want me to use which debugger ... ?
Deciphering the CDT debugger alphabet soup.

Bruce Griffith
John Cortell (Freescale Semiconductor)

As the developer of an IDE based on CDT, you can choose to support:

The GNU debugger (gdb)
The Eclipse Debugger for C/C++ (EDC)
Debug Services Framework (DSF)
Target Communication Framework (TCF) agents
How do you decide which ones are right for your application?

This talk will present a guide describing how the current choices for remote debugging work together (or don’t) and a consumer’s view of the advantages of some of the possible combinations.

Statistics

Views

Total Views
4,876
Views on SlideShare
4,164
Embed Views
712

Actions

Likes
0
Downloads
0
Comments
0

6 Embeds 712

http://www.eclipsecon.org 467
http://eclipsecon.org 233
https://www.eclipsecon.org 6
http://www.techgig.com 4
http://static.slidesharecdn.com 1
http://translate.googleusercontent.com 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

CC Attribution-NonCommercial-ShareAlike LicenseCC Attribution-NonCommercial-ShareAlike LicenseCC Attribution-NonCommercial-ShareAlike License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    EclipseCon 2011: Deciphering the CDT debugger alphabet soup EclipseCon 2011: Deciphering the CDT debugger alphabet soup Presentation Transcript

    • So you want me to use which debugger ... ? Deciphering the CDT debugger alphabet soupBruce Griffith John CortellPartner Senior Software EngineerSage Electronic Engineering, LLC Freescale SemiconductorBruce.Griffith@se-eng.com
    • What does a debugger need to do?1. Launch new programs2. Control program execution (run/stop/breakpoint)3. Read/write hardware registers and memory4. Interpret stack frames5. Disassemble machine instructions6. Perform symbol lookup and translate memory and registers into program variable valuesAdditional 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 debug4. Execution tracing5. Read/write target flash6. 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-debugDebug Model Standard Flexible Hierarchy Flexible Hierarchy Flexible HierarchyStatus of Reference Not Active Mature Active Development IncubationImplementationMulti-core / Multi-process None Under Development Designed InExtensions EDCDebugger 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 ARMSymbol 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 beEDC: (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, butApplication Programming Interface reference implementations are mature(API) whose classes and interfaces and production-ready.make it possible to access the CDTs • Serializes debugger access to ensuredebugging framework. An Eclipse that responses remain associated withplug-in that uses the CDI can add new the proper debugger commands.debuggers to the CDTs 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 debuggeris an API for integrating a debugger framework for CDT. The existingwith Eclipses standard debugger reference implementation for gdb isviews. It is an alternative to Platforms mature and production-ready.standard debug model and it • Uses a concurrency model to ensureleverages debugger views flexible that responses remain associated withhierarchy API which was introduced in the proper debugger commandsEclipse 3.2. The main design goal of without serializing requests.DSF is to allow increased flexibility • Uses a flexible hierarchy for viewsand 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 singlecommunicating with embedded physical or virtual connection.systems (targets). Its most • Provides for agent discoverydistinguishing feature is that TCF is • Agents can perform any arbitrarydesigned to transparently plug in service.value-adding servers between the tool • Eliminates the need to dedicateand the target. But even without value- multiple communications links foradd, the protocol has the potential to target debug, and can "piggyback"unify lots of currently independent debug communications onto ancommunication links, thus saving existing target link.resources and making setup andconfiguration much easier than incurrent embedded developmentscenarios."
    • 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 othermany other languages. GDB can processor architecturestarget (i.e., debug programs running • Executes on LINUX, UNIX, andon) more than a dozen different Windows hosts. (Windowsprocessor architectures, and GDB supported via Cygwin or MinGW)itself can run on most popular • Debugs applications built forGNU/Linux, Unix and Microsoft UNIX, LINUX, and WindowsWindows 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 x86C/C++ Debugging in Eclipse/CDT that • Written in Java with agents writtenleverages and connects existing in C.Eclipse debug technology (Platform, • Debugs applications built forCDT, DSF, TCF). EDC doesn’t require LINUX, Symbian, and Windowsa debug “back-end”. Completely • Supports ELF and PE file formatasynchronous for best performance. • Supports DWARF symbolsPervasive multi core/context/process • Multi-process supportsupport. Provides a collection of core • Stack deframing based ondebug services. Uses platform specific dynamic processor modes islow level debug agents. Reference possible (for example X86 realimplementations 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 debuggerFramework and Target reference implementation thatCommunication 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 areagent, and then perform basic discovered from within the localdebugging tasks, like resuming, network.suspending, single-stepping, • Existing stubs are written in C andsetting/removing breakpoints, etc. The available for Windows and LINUX.code can be used as a reference for The Windows stub can be useddeveloping 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"