 Wind River Systems, Inc. 1997 Chapter - 4 CrossWind.

Slides:



Advertisements
Similar presentations
Introduction to Eclipse. Start Eclipse Click and then click Eclipse from the menu: Or open a shell and type eclipse after the prompt.
Advertisements

© 2003, Cisco Systems, Inc. All rights reserved..
Utilizing the GDB debugger to analyze programs Background and application.
® 4-2 CrossWind 4.1Overview Starting A Debugging Session Basic Debugging System-Level Debugging.
Debugging What can debuggers do? Run programs Make the program stops on specified places or on specified conditions Give information about current variables’
Chapter One The Essence of UNIX.
1 Tornado: An Embedded System Development Tool Maung Wynn Aung Han CIS 642, Spring 2001 Prof. Insup Lee.
Georgia Institute of Technology DrJava Appendix A Barb Ericson Georgia Institute of Technology May 2006.
Visual Basic 2010 How to Program. © by Pearson Education, Inc. All Rights Reserved.2.
Guide to Oracle10G1 Introduction To Forms Builder Chapter 5.
A Guide to Oracle9i1 Introduction To Forms Builder Chapter 5.
A Guide to Oracle9i1 Creating an Integrated Database Application Chapter 8.
CS 225 Lab #2 - Pointers, Copy Constructors, Destructors, and DDD.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
Getting Started with Linux: Novell’s Guide to CompTIA’s Linux+ (Course 3060) Section 2 Use the Linux Desktop.
This material exempt per Department of Commerce license exception TSU Debugging.
Introduction Purpose Objectives Content Learning Time
2. Introduction to the Visual Studio.NET IDE 2. Introduction to the Visual Studio.NET IDE Ch2 – Deitel’s Book.
Embedded Systems Principle of Debugger. Reference Materials kl.de/avr_projects/arm_projects/#winarmhttp://
Debugging techniques in Linux Debugging Techniques in Linux Chetan Kumar S Wipro Technologies.
Debugging Cluster Programs using symbolic debuggers.
Introduction Purpose This training course covers debugging an application on an SH target in the Renesas HEW (High-performance Embedded Workshop) development.
Memory & Storage Architecture Seoul National University GDB commands Hyeon-gyu School of Computer Science and Engineering.
SUSE Linux Enterprise Desktop Administration Chapter 2 Use the Linux Desktop.
The VPO Operator. [vpo_operator] 2 The VPO Operator Section Overview The role of the VPO operator Starting and stopping the Motif GUI The VPO Operator.
Renesas Technology America Inc. 1 SKP8CMINI Tutorial 2 Creating A New Project Using HEW.
CPSC1301 Computer Science 1 Overview of Dr. Java.
® 2-2 Projects 2.1Projects Overview Bootable Projects and VxWorks Configuration Integrated Simulator Downloadable Projects Build Specifications.
Chapter One An Introduction to Visual Basic 2010 Programming with Microsoft Visual Basic th Edition.
Introduction Purpose This training course covers debugging an application on an SH target in the Renesas HEW (High-performance Embedded Workshop) development.
Debugging Dwight Deugo Nesa Matic
Debugging. 2 © 2003, Espirity Inc. Module Road Map 1.Eclipse Debugging  Debug Perspective  Debug Session  Breakpoint  Debug Views  Breakpoint Types.
Chapter 19: Visual Lisp. After completing this Chapter, you will be able to do the following: What is AutoLISP Launching Visual LISP Terminology and Fundamental.
Active-HDL Interfaces Debugging C Code Course 10.
9/2/ CS171 -Math & Computer Science Department at Emory University.
Allegro CL Certification Program Lisp Programming Series Level I Session Basic Lisp Development in the IDE.
Debugging parallel programs. Breakpoint debugging Probably the most widely familiar method of debugging programs is breakpoint debugging. In this method,
Bit-DSP-MicrocontrollerTMS320F2812 Texas Instruments Incorporated European Customer Training Center University of Applied Sciences Zwickau (FH)
3 Copyright © 2004, Oracle. All rights reserved. Working in the Forms Developer Environment.
CSE 351 GDB Introduction. Lab 1 Status? How is Lab 1 going? I’ll be available at the end of class to answer questions There are office hours later today.
Data Display Debugger (DDD)
Chapter Eleven The X Window System. 2 Lesson A Starting and Navigating an X Window System.
HPCC Mid-Morning Break Dirk Colbry, Ph.D. Research Specialist Institute for Cyber Enabled Discovery TotalView Parallel Debugger.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 1 Slide 1 What we'll cover here l Using the debugger: Starting the debugger Setting.
Chapter 5 Introduction To Form Builder. Lesson A Objectives  Display Forms Builder forms in a Web browser  Use a data block form to view, insert, update,
CSI605 Introduction to ddd. ddd ddd stands for the Data Display Debugger ddd is a graphical environment that resides on top of gdb We recall that gdb.
COP 3530 Spring 12 Discussion Session 1. Agenda 1.Introduction 2.Remote programming 3.Separate code 4.Compile -- g++,makefile 5.Debug -- gdb 6.Questions?
Object-Oriented Application Development Using VB.NET 1 Chapter 2 The Visual Studio.NET Development Environment.
Debugging tools in Flash CIS 126. Debugging Flash provides several tools for testing ActionScript in your SWF files. –The Debugger, lets you find errors.
Ladebug Kernel Debugging Tutorial Bob Lidral. Introduction Kinds of kernel debugging How to use Ladebug for kernel debugging Not how to debug a kernel.
Lab 9 Department of Computer Science and Information Engineering National Taiwan University Lab9 - Debugging I 2014/11/4/ 28 1.
Chapter – 8 Software Tools.
15 Copyright © 2004, Oracle. All rights reserved. Debugging Triggers.
XP New Perspectives on Macromedia Dreamweaver MX 2004 Tutorial 5 1 Adding Shared Site Elements.
Debugging Lab Antonio Gómez-Iglesias Texas Advanced Computing Center.
Embedded Real-Time Systems Introduction to embedded software development Lecturer Department University.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  This training course demonstrates the use of the High-performance.
Using the GNU Debugger (GDB)‏ Techzemplary Pvt.Ltd February 24 th 2008 Pranav Peshwe.
Gnu Debugger (gdb) Debuggers are used to: Find semantic errors Locate seg faults and bus errors Prepared by Dr. Spiegel.
Gnu Debugger (gdb) Debuggers are used to: Find semantic errors
Appendix A Barb Ericson Georgia Institute of Technology May 2006
Debugging Dwight Deugo
DEBUGGING JAVA PROGRAMS USING ECLIPSE DEBUGGER
GNU DEBUGGER TOOL. What is the GDB ? GNU Debugger It Works for several languages – including C/C++ [Assembly, Fortran,Go,Objective-C,Pascal]
Tornado Training Workshop
Debugging Dwight Deugo
Tornado Training Workshop
Code Composer Essentials 3.0
Makefiles, GDB, Valgrind
Presentation transcript:

 Wind River Systems, Inc Chapter - 4 CrossWind

4-2 CrossWind Overview Starting A Debugging Session Basic Debugging Customizing CrossWind System-level Debugging

4-3 Overview CrossWind executes on host; code executes on target. Allows debugging at source and assembly levels. Graphical interface Command line interface. WindSh functionality is available from CrossWind Tcl allows customization of GUI and creation of user- defined commands. Choice of user interfaces:

4-4 Host - Target Interaction Crosswind WDB Agent tgtsvr back end VxWorks

4-5 CrossWind Overview Starting A Debugging Session Basic Debugging Customizing CrossWind System-level Debugging

4-6 Executing CrossWind Compile code with the the -g option to generate debug symbols. Use the Launcher. (UNIX Hosts) To invoke the debugger. To exit the debugger : Start a target server with the appropriate back-end communication strategy. Use the Tools menu.(PC Hosts) Select File => Quit from the debugger Menu. (UNIX) Select Debug => Stop Debugging from the Tornado menu bar. (PC)

4-7 Connecting to a Target CrossWind connects automatically when invoked from the Launcher (UNIX) or Tornado IDE (WINDOWS). Example output : (UNIX Host) Connecting to target server... …. Connected to VxWorks : (no debugging symbols found)...ok foo.o... ok prog.o... ok newprog.o: newprog.o: No such file or directory. Done. Output gives information about modules found on target.

4-8 Source Path Source path - a list of directories to search for object modules and source code modules. The default source path includes the current working directory and the directory containing VxWorks image. To add another directory: (gdb) directory dirName Typically done in initialization file.gdbinit in home directory. To display current source path (gdb) show dir Source directories searched: c:\Tornado\target\config\mv162;$cdir;$cwd

4-9 Loading Additional Modules To load modules after attaching to the target: Causes three loads: Executable code & dataVxWorks target Symbols & module infoTarget Server Debug informationDebugger The debugger will search its source path for modules to load. Select File => Download from CrossWind menu bar. (UNIX Host) Select Debug => Download from Tornado menu bar, or use the download button in the debugger toolbar.(PC Host)

4-10 Listing Source Displays the C or/and assembly source code centered at location. Examples, using argument : (gdb) list foo.c:1First few lines of foo.c (gdb) list 25Line 25 in foo.c (gdb) list mySubLocation can be a function. Without argument, fills display panel with source : (gdb) list Used to get source into debugger display panel. list location

4-11 Selecting A Task To Debug To spawn a task for debugging : To debug a task which is already running : Select Target => Attach Task... from the CrossWind menu. (UNIX Host) You can only debug one task per debugger session. Use the run command from the (gdb) prompt. Select Debug => Run from Tornado menu (PC Host). The task spawned will be called tDbgTask. Select Debug => Attach... from the Tornado menu.(PC Host) For Windows host, a separate Tornado environment must be initiated for each debugger session.

4-12 Getting Help Help can be obtained by selecting Help => GDB Online from the CrossWind menu bar.(UNIX Host) The Tornado User’s Guide and Debugging with GDB manuals document how to use the debugger. Help can be obtained by selecting Help => Manuals => Tornado User’s Guide => Debugger from the Tornado menu bar.(PC Host)

4-13 CrossWind Overview Starting A Debugging Session Basic Debugging Customizing CrossWind System-level Debugging

4-14 Debugging Tools Examples of debugger functionality : Continue Program execution. Set / Delete breakpoints. Step to next line of code. Step over a function call. Finish current subroutine. For a complete list of debugger tools and GUI access methods see the Tornado User’s Guide. Move up/down subroutine stack. Monitor variables. De-reference pointers. Call up editor.

4-15 Conceptual View of Stack foo1 () foo2 () foo3 () foo4 () Frame Number Bottom of Stack Entry Point Current Frame Top of Stack

4-16 UNIX: The Graphical Interface Menu Bar Button Bar Program-Display Panel Command Panel

4-17 PC: The Graphical Interface Menu Bar Button Bar Program-Display Panel GDB Command Window

4-18 CrossWind Overview Starting A Debugging Session Basic Debugging Customizing CrossWind System-level Debugging

4-19 Customization Overview The Debugger is easy to customize: Extend or modify user-interface. Add new debugger commands. Put commands in crosswind.tcl. WRS extensions provide access to the WTX protocol via Tcl functions. To customize the debug engine: To customize the user-interface: Use Tcl language. Put Tcl commands in gdb.tcl. Put gdb commands in.gdbinit. Use any GDB commands.

4-20 The Debugger’s Components The Remote Debugger consists of a GUI which interacts with a debugging “engine”. Tcl interpreter GUI Engine Tcl Interpreter GDB Debugger Engine User Interface Debug Engine You can customize the GUI or the debug “engine”.

4-21 CrossWind Overview Starting A Debugging Session Basic Debugging Customizing CrossWind System-level Debugging

4-22 Overview System-level debugging : System-level debugging supports: Debugging ISR’s. Debugging before the kernel is started. In system-mode, VxWorks, all application tasks and ISR’s stop when a breakpoint is hit. Uses the external agent. Debugs VxWorks and your application. The netrom and wdbserial back ends support system-level debugging. Configure WDB agent for dual or external mode.

4-23 Debugging in System Mode To enter system mode: (gdb) attach system Attaching to system. 0x407ae in wdbSuspendSystemHere () Configure your communication channel for system mode. Select an appropriate tgtsvr back end (wdbserial or netrom). Configure the WDB Agent for WDB_MODE_DUAL or WDB_MODE_EXTERN To exit system mode: (gdb) detach

4-24 Selecting a Thread to Debug To display all threads (the GDB term for VxWorks contexts): (gdb) info threads 6 System + 0x407ae in wdbSuspendSystemHere() 5 task 0x3de3d0 tExcTask 0x490da in qJobGet() 4 task 0x3dbabc tLogTask 0x490da in qJobGet() * 3 task 0x3d7788 tNetTask 0x40ec4 in semQPut() 2 task 0x3bcc64 tFtpTask 0x40ec4 in semQPut() 1 task 0x3a1340 tWdbTask 0x40ec4 in semQPut() Select a thread to debug: (gdb) thread 4 [Switching to task 0x3dbabc tLogTask ] #0 0x490da in qJobGet()

4-25 Examining a Thread Use normal Debugger tools to examine a thread. To set a thread-specific breakpoint : (gdb) break location thread threadNumber Resume execution of the system with Step, Next, Finish, or Continue from the Debugger menu. Stepping a thread inserst a breakpoint after the next line or instruction, and lets the entire system run until any thread hits a breakpoint.

4-26 Caveats Cannot create a new task with run. Can only step or continue from where system is stopped. Cannot use multiple debuggers per target.

4-27 Summary Executes on host while code executes on target. Tornado supports a source-code debugger which : Provides source-level debugging. Code must be compiled with -g option. Uses serial or NetROM communication link. System-level debugging: Is useful for debugging ISR’s and BSP’s. Requires configuring communication mode : - WDB agent. - Target server back end