Ladebug Kernel Debugging Tutorial Bob Lidral. Introduction Kinds of kernel debugging How to use Ladebug for kernel debugging Not how to debug a kernel.

Slides:



Advertisements
Similar presentations
© 2003, Cisco Systems, Inc. All rights reserved..
Advertisements

Hp education services education.hp.com 85 System Crash Dump Version C.00 H4264S Module 9 Slides.
 WAN uses Serial ports  Ethernet Ports:  Straight through  Cross over.
Static Routing Exercise. What will the exercise involve?  Unix network interface configuration  Cisco network interface configuration  Static routes.
MCITP Guide to Microsoft Windows Server 2008 Server Administration (Exam #70-646) Chapter 3 Configuring the Windows Server 2008 Environment.
Chapter One The Essence of UNIX.
Managing Your Network Environment © 2004 Cisco Systems, Inc. All rights reserved. Managing Cisco IOS Devices INTRO v2.0—9-1.
CCNA 2 v3.1 Module 2.
1 Chapter Overview Introduction to Windows XP Professional Printing Setting Up Network Printers Connecting to Network Printers Configuring Network Printers.
Module 2: Planning to Install SQL Server. Overview Hardware Installation Considerations SQL Server 2000 Editions Software Installation Considerations.
Lecture 8 Configuring a Printer-using Magic Filter Introduction to IP Addressing.
11 SYSTEMS ADMINISTRATION AND TERMINAL SERVICES Chapter 12.
1 Semester 2 Module 2 Introduction to Routers Yuda college of business James Chen
7/17/2009 rwjBROOKDALE COMMUNITY COLLEGE1 Unix Comp-145 C HAPTER 2.
1 Semester 2 Module 3 Configuring a Router Yuda college of business James Chen
Spring 2014 SILICON VALLEY UNIVERSITY CONFIDENTIAL 1 Introduction to Embedded Systems Dr. Jerry Shiao, Silicon Valley University.
Basic Router Configuration Warren Toomey GCIT. Introduction A Cisco router is simply a computer that receives packets and forwards them on based on what.
Basic Router Configuration Honolulu Community College Cisco Academy Training Center Semester 2 Version 2.1.
Chapter 6 Router Configuration Sem 2V2. Configuration files can come from the console NVRAM TFTP server. The router has several modes:  privileged mode.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment, Enhanced Chapter 9: Implementing and Using Group Policy.
Hands-On Microsoft Windows Server 2008
1 Routing Introduction to Routing Static Routing.
Computer System Laboratory
Objectives Define IP Address To be able to assign an IP address with its Subnet Mask and Default Gateway to a PC that operates using Windows 7 or Fedora.
Introduction to Unix/Linux Chapter One The Essence of UNIX.
Troubleshooting Replication and Geodata Services
IOS110 Introduction to Operating Systems using Windows Session 9 1.
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 1 Third Edition Chapter 5 Windows XP Professional McGraw-Hill.
Microsoft ® Official Course Module XA Using Windows PowerShell ®
®® Microsoft Windows 7 for Power Users Tutorial 13 Using the Command-Line Environment.
Compiling & Debugging Quick tutorial. What is gcc? Gcc is the GNU Project C compiler A command-line program Gcc takes C source files as input Outputs.
MCTS Guide to Microsoft Windows Server 2008 Applications Infrastructure Configuration (Exam # ) Chapter Four Windows Server 2008 Remote Desktop Services,
Using OUI to install Oracle9i Release 2 on an OpenVMS System.
Active-HDL Interfaces Debugging C Code Course 10.
Ch.2 – Introduction to Routers
1 Chapter Overview Creating Drive and Folder Shares Using Distributed File System Installing Network Printers Administering Network Printers Managing Share.
1 Week #10Business Continuity Backing Up Data Configuring Shadow Copies Providing Server and Service Availability.
1 © 2003, Cisco Systems, Inc. All rights reserved. CCNA 2 Module 2 Introduction to Routers.
Static Routing Exercise
Router Fundamentals PJC CCNA Semester 2 Ver. 3.0 by William Kelly.
1 SEEM3460 Tutorial Compiling and Debugging C programs.
© 2008 Cisco Systems, Inc. All rights reserved.Cisco ConfidentialPresentation_ID 1 Chapter 2: Introduction to Switched Networks Routing And Switching 2.0.
Manage Directories and Files in Linux Part 2. 2 Identify File Types in the Linux System The file types in Linux referred to as normal files and directories.
Page 1 Printing & Terminal Services Lecture 8 Hassan Shuja 11/16/2004.
Lesson 3-Touring Utilities and System Features. Overview Employing fundamental utilities. Linux terminal sessions. Managing input and output. Using special.
Administering Microsoft Windows Server 2003 Chapter 2.
Ch.2 – Introduction to Routers CCNA 2 version 3.0 Rick Graziani Cabrillo College.
Administering Groups Chapter Eight. Exam Objectives In this Chapter:  Plan a security group hierarchy based upon delegation requirements  Plan a security.
CN1260 Client Operating System Kemtis Kunanuraksapong MSIS with Distinction MCT, MCITP, MCTS, MCDST, MCP, A+
Unit - V. Debugging GNU Debugger helps you in getting information about the following: 1.If a core dump happened, then what statement or expression did.
PAYware Transact Terminal Interface Manager
Chapter 2: Configure a Network Operating System
Lab 9 Department of Computer Science and Information Engineering National Taiwan University Lab9 - Debugging I 2014/11/4/ 28 1.
© 2002, Cisco Systems, Inc. All rights reserved..
Chapter 4: server services. The Complete Guide to Linux System Administration2 Objectives Configure network interfaces using command- line and graphical.
 Wind River Systems, Inc Chapter - 4 CrossWind.
1 © 2004, Cisco Systems, Inc. All rights reserved. CCNA 2 v3.1 Module 2 Introduction to Routers.
Debugging RTC CLI in Eclipse
SOP for CSD Log Capture Tool V0.1_
Managing Your Network Environment
Lec 3: Introduction to Switched Networks
Chapter 2: Introduction to Switched Networks
CONFIGURING HARDWARE DEVICE & START UP PROCESS
Chapter 2: Introduction to Switched Networks
Software Setup & Validation
Lecture9: Embedded Network Operating System: cisco IOS
Debugging.
Lecture9: Embedded Network Operating System: cisco IOS
Presentation transcript:

Ladebug Kernel Debugging Tutorial Bob Lidral

Introduction Kinds of kernel debugging How to use Ladebug for kernel debugging Not how to debug a kernel

Agenda Preparing a Kernel for Debugging Local Kernel Debugging – Standalone Ladebug – Ladebug With kdbx Crash Dump Analysis – Standalone Ladebug – Ladebug with kdbx Remote Kernel Debugging – Without Gateway System – With Gateway System

Overview Who – System Engineers – System Administrators When and Why – Kernel Development and Debugging – Crash Analysis and Troubleshooting – System Configuration and Tuning

Preparing a Kernel for Debugging (if possible) Not always possible if debugging a running kernel or a crash dump Compile without full optimization Do not strip symbol table information

Local Kernel Debugging (Standalone) Debug running kernel on same node as Ladebug session Must have superuser (root) permissions Enter command: # ladebug -k /vmunix /dev/mem Some Ladebug commands are not available in this mode (e.g., cont, next, rerun, run, step, and stop )

Local Kernel Debugging (with kdbx) Debug running kernel on same node as kdbx session Same restrictions as for standalone Ladebug Enter command: # kdbx –dbx /bin/ladebug \ –k /vmunix /dev/mem Supports all valid Ladebug commands plus some kdbx command extensions

Crash Dump Analysis (Standalone) Determine cause of a crash or panic May not need superuser (root) permissions Crash dump files are created in /var/adm/crash Named vmunix.n and vmcore.n where n is the version number and must match Enter command: # ladebug -k vmunix.1 vmcore.1

Crash Dump Analysis (with kdbx) Determine cause of a crash or panic Same restrictions as for standalone Ladebug Enter command: # kdbx –dbx /bin/ladebug \ -k vmunix.1 vmcore.1 Supports all valid Ladebug commands plus some kdbx extensions

Remote Kernel Debugging Run kernel on a remote node under control of Ladebug running on local node Supports breakpoints in kernel code Requires serial line physical connection between Test System and either Build or Gateway System – Specific communication port (usually COM1) on Test System (see documentation) – Communication port may be configurable on Build or Gateway System

Remote Kernel Debugging Terminology Build System – system on which Ladebug executes Test System – system on which kernel being debugged executes Gateway System (optional) – between Build System and Test System, connected to – Test System by physical serial line – Build System over network

Remote Kernel Debugging System Requirements Test System – Tru64 UNIX Version 2.0 or higher Verify: % uname –a – Kernel Debugging Tools subset Verify: % setld -i | grep -i kernel | \ grep installed – Kernel Breakpoint Debugger kernel option Verify: % /sbin/sysconfig -s kdebug

Remote Kernel Debugging System Requirements Build System – Tru64 UNIX Version 3.2 or higher – Copy of Test System kernel executable image – Copy of kernel source code (optional, recommended) Gateway System – Tru64 UNIX Version 2.0 or higher – Kernel Debugging Tools subset Verify by same methods as for Test System

Serial Line BC16E Cable H8571-J DECconnect Passive Adapter

Remote Kernel Debugging Without Gateway System Specify Build System communication port to use for kdebug by appropriate entry in /etc/remote : – Default (COM1): kdebug:dv=/dev/tty00:br#9600:pa=none: – Override in order to use as any of Build, Gateway, or Test System (COM2): kdebug:dv=/dev/tty01:br#9600:pa=none: Note: the label “ kdebug ” must match the value of the Ladebug debugger variable $kdebug_line

kernel COM1 COM2 kdebug Test System Remote Kernel Debugging Without Gateway System kdebugd COM1 COM2 Ladebug Build System Serial Line

Remote Kernel Debugging With Console Serial Line Connect second serial line – Must be connected to COM1 communication port on Test System – Configurable communication port on Build or Gateway System Test System: redirect console input and output at console prompt >>> set console serial

Remote Kernel Debugging With Console Serial Line Build (or Gateway) System: add entry to /etc/remote for console serial line tstsys:dv=/dev/tty00:br#9600:pa=none: Build (or Gateway) System: create a new window for the Test System console and establish connection % tip tstsys

kernel COM1 COM2 kdebug Test System Remote Kernel Debugging With Console Serial Line kdebugd COM1 COM2 Ladebug Build System kdebug Serial Line Console Serial Line

Remote Kernel Debugging With Console Serial Line Restore Test System console communication to its console: >>> set console graphics Exit from tip session: ~.

Remote Kernel Debugging With Gateway System Gateway System: specify communication port for kdebug by appropriate entry in /etc/remote : – Default (COM1): kdebug:dv=/dev/tty00:br#9600:pa=none: – Override in order to use as any of Build, Gateway, or Test System (COM2): kdebug:dv=/dev/tty01:br#9600:pa=none:

Remote Kernel Debugging With Gateway System Gateway System: open window to display kdebugd/kdebug communication traffic: – execute tty command to get pathname of device corresponding to this window – Use this pathname for the value of the Ladebug debugger variable $kdebug_dbgtty on the Build System

Remote Kernel Debugging With Gateway System Build System: set Ladebug debugger variables describing connections: – $kdebug_host – node name of Gateway System (default: localhost => no Gateway System) – $kdebug_line – label of /etc/remote entry on Gateway System for kdebug communication port (default: kdebug ) – $kdebug_dbgtty – terminal window on Gateway System used to display kdebug communication traffic (output of tty command in that window) (default: null => no Gateway System)

kernel COM1 COM2 kdebug Test System Remote Kernel Debugging With Gateway System kdebugd Ladebug Build System kdebugd COM1 COM2 Gateway System Serial Line Network

Remote Kernel Debugging Startup On Build System % ladebug –remote./vmunix.test (ladebug) stop in ttyretype (ladebug) stop in panic On Test System – If not at console prompt ( >>> ) # shutdown –h now

Remote Kernel Debugging Startup Then, in either order – On Build System (ladebug) run – On Test System >>> boot –flags k Once started, typing ^R on the Test System will trigger the ttyretype breakpoint. There is no way for Ladebug to gain control except at a breakpoint or other interruption of the kernel.

Where to Get More Information Ladebug Debugger Manual – Kernel Debugging Local Kernel Debugging Crash Dump Analysis – Remote Kernel Debugging with the kdebug Debugger Compaq Tru64 Unix Reference Page – ladebug(1)

Other Compaq Tru64 Unix Manuals Kernel Debugging – crashdc – kdbx – kdebug System Administration System Configuration and Tuning

Other Compaq Tru64 Unix Reference Pages crashdc(8) ikdebug(8) kdbx(8)