NAME Built-in Kernel Debugger for Linux - v4.4

Size: px
Start display at page:

Download "NAME Built-in Kernel Debugger for Linux - v4.4"

Transcription

1 NAME Built-in Kernel Debugger for Linux - v4.4 Overview This document describes the built-in kernel debugger available for linux. This debugger allows the programmer to interactively examine kernel memory, disassemble kernel functions, set breakpoints in the kernel code and display and modify register contents. A symbol table is included in the kernel image and in modules which enables all non-stack symbols (including static symbols) to be used as arguments to the kernel debugger commands. Getting Started To include the kernel debugger in a linux kernel, use a configuration mechanism (e.g. xconfig, menuconfig, et. al.) to enable the CONFIG_KDB option. Additionally, for accurate stack tracebacks, it is recommended that the CONFIG_FRAME_POINTER option be enabled (if present). CONFIG_FRAME_POINTER changes the compiler flags so that the frame pointer register will be used as a frame pointer rather than a general purpose register. After linux has been configured to include the kernel debugger, make a new kernel with the new configuration file (a make clean is recommended before making the kernel), and install the kernel as normal. You can compile a kernel with kdb support but have kdb off by default, select CONFIG_KDB_OFF. Then the user has to explicitly activate kdb by booting with the kdb=on flag or, after /proc is mounted, by echo "1" > /proc/sys/kernel/kdb Youcan also do the reverse, compile a kernel with kdb on and deactivate kdb with the boot flag kdb=off or, after /proc is mounted, by echo "0" > /proc/sys/kernel/kdb When booting the new kernel, the kdb=early flag may be added after the image name on the boot line to force the kernel to stop in the kernel debugger early in the kernel initialization process. kdb=early implies kdb=on. If the kdb=early flag isn t provided, then kdb will automatically be invoked upon system panic or when the PAUSE key isused from the keyboard, assuming that kdb is on. Older versions of kdb used just a boot flag of kdb to activate kdb early, this is no longer supported. KDB can also be used via the serial port. Set up the system to have a serial console (see Documentation/serial-console.txt), you must also have a user space program such as agetty set up to read from the serial console. The control sequence <esc>kdb on the serial port will cause the kernel debugger to be entered, assuming that kdb is on, that some program is reading from the serial console, at least one cpu is accepting interrupts and the serial console driver isstill usable. Note: When the serial console sequence consists of multiple characters such as <esc>kdb then all but the last character are passed through to the application that is reading from the serial console. After exiting from kdb, you should use backspace to delete the rest of the control sequence. If the console is sitting on the login prompt when you enter kdb, then the login command may switch into upper case mode. This is not a kdb bug, it is a "feature" of login - if the userid is all upper case then login assumes that you using a TeleType (circa 1960) which does not have lower case characters. Wait 60 seconds for login to timeout and it will switch back to lower case mode. Note: Your distributor may have chosen a different kdb activation sequence for the serial console. Consult your distribution documentation. If you have both a keyboard+video and a serial console, you can use either for kdb. Define both video and serial consoles with boot parameters console=tty0 console=ttys0,38400 Any kdb data entered on the keyboard or the serial console will be echoed to both. If you are using a USB keyboard then kdb commands cannot be entered until the kernel has initialised the USB subsystem and recognised the keyboard. Using kdb=early with a USB keyboard will not work, the USB subsystem is initialised too late. September 17,

2 While kdb is active, the keyboard (not serial console) indicators may strobe. The caps lock and scroll lock lights will turn on and off, num lock is not used because it can confuse laptop keyboards where the numeric keypad is mapped over the normal keys. On exit from kdb the keyboard indicators will probably be wrong, they will not match the kernel state. Pressing caps lock twice should get the indicators back in sync with the kernel. Basic Commands There are several categories of commands available to the kernel debugger user including commands providing memory display and modification, register display and modification, instruction disassemble, breakpoints and stack tracebacks. Any command can be prefixed with - which will cause kdb to ignore any errors on that command, this is useful when packaging commands using defcmd. A line whose first non-space character is # is printed and ignored. The following table shows the currently implemented standard commands, these are always available. Other commands can be added by extra debugging modules, type? at the kdb prompt to get a list of all available commands. September 17,

3 Command Description bc Clear Breakpoint bd Disable Breakpoint be Enable Breakpoint bl Display breakpoints bp Set or Display breakpoint bph Set or Display hardware breakpoint bpa Set or Display breakpoint globally bpha Set or Display hardware breakpoint globally bt Stack backtrace for current process btp Stack backtrace for specific process bta Stack backtrace for all processes btc Cycle over all live cpus and backtrace each one cpu Display or switch cpus dmesg Display system messages defcmd Define acommand as a set of other commands ef Print exception frame env Show environment go Restart execution help Display help message id Disassemble Instructions kill Send asignal to a process ll Follow Linked Lists lsmod List loaded modules md Display memory contents mdwcn Display memory contents with width W and count N. mdp Display memory based on a physical address mdr Display raw memory contents mds Display memory contents symbolically mm Modify memory contents, words mmw Modify memory contents, bytes per_cpu Display per_cpu variables pid Change the default process context ps Display process status reboot Reboot the machine rd Display register contents rm Modify register contents set Add/change environment variable sr Invoke SysReq commands ss Single step a cpu ssb Single step a cpu until a branch instruction stackdepth Print the stack depth for selected processes summary Summarize the system Some commands can be abbreviated, such commands are indicated by a non-zero minlen parameter to kdb_register; the value of minlen being the minimum length to which the command can be abbreviated (for example, the go command can be abbreviated legally to g). If an input string does not match a command in the command table, it is treated as an address expression and the corresponding address value and nearest symbol are shown. Some of the commands are described here. Information on the more complicated commands can be found in the appropriate manual pages. cpu With no parameters, it lists the available cpus. * after a cpu number indicates a cpu that did not respond to the kdb stop signal. + after a cpu number indicates a cpu for which kdb has some data, but that cpu is no longer responding to kdb, so you cannot switch to it. This could be a cpu September 17,

4 that has failed after entering kdb, or the cpu may have saved its state for debugging then entered the prom, this is normal for an IA64 MCA event. I after a cpu number means that the cpu was idle before it entered kdb, it is unlikely to contain any useful data. F after a cpu number means that the cpu is offline. There is currenly no way to distinguish between cpus that used to be online but are now offline and cpus that were never online, the kernel does not maintain the information required to separate those two cases. cpu followed by a number will switch to that cpu, you cannot switch to a cpu marked *, + or F. This command is only available if the kernel was configured for SMP. dmesg [lines] [adjust] Displays the system messages from the kernel buffer. If kdb logging is on, it is disabled by dmesg and is left as disabled. With no parameters or a zero value for lines, dmesg dumps the entire kernel buffer. If lines is specified and is positive, dmesg dumps the last lines from the buffer. If lines is specified and is negative, dmesg dumps the first lines from the buffer. If adjust is specified, adjust the starting point for the lines that are printed. When lines is positive, move the starting point back by adjust lines, when lines is negative, move the starting point forward by adjust lines. dmesg -100 will dump 100 lines, from the start of the buffer. dmesg 100 will dump 100 lines, starting 100 lines from the end of the buffer, dmesg will dump 100 lines, starting 200 lines from the end of the buffer. dmesg will dump 100 lines, starting 100 lines from the start of the buffer. defcmd Defines a new command as a set of other commands, all input until endefcmd is saved and executed as a package. defcmd takes three parameters, the command name to be defined and used to invoke the package, a quoted string containing the usage text and a quoted string containing the help text for the command. When using defcmd, it is a good idea to prefix commands that might fail with -, this ignores errors so the following commands are still executed. For example, defcmd diag "" "Standard diagnostics" set LINES 2000 set BTAPROMPT 0 -id %eip-0x40 -cpu -ps -dmesg 80 -bt -bta endefcmd When used with no parameters, defcmd prints all the defined commands. go id kill lsmod Continue normal execution. Active breakpoints are reestablished and the processor(s) allowed to run normally. To continue at a specific address, use rm to change the instruction pointer then go. Disassemble instructions starting at an address. Environment variable IDCOUNT controls how many lines of disassembly output the command produces. Internal command to send a signal (like kill(1)) to a process. kill -signal pid. Internal command to list modules. This does not use any kernel nor user space services so can be used at any time. per_cpu <variable_name> [<length>] [<cpu>] Display the values of a per_cpu variable, the variable_name is specified without the per_cpu prefix. Length is the length of the variable, 1-8, if omitted or 0 it defaults to the size of the machine s register. To display the variable on a specific cpu, the third parameter is the cpu number. When the third parameter is omitted, the variable s value is printed from all cpus, except that zero values are suppressed. For each cpu, per_cpu prints the cpu number, the address of the variable and its value. September 17,

5 pid <number> Change the current process context, with no parameters it displays the current process. The current process is used to display registers, both kernel and user space. It is also used when dumping user pages. reboot Reboot the system, with no attempt to do a clean close down. stackdepth <percentage> Print the stack usage for processes using more than the specified percentage of their stack. If percentage is not supplied, it defaults to 60. This command is only implemented on i386 and ia64 architectures, patches for other architectures will be gratefully accepted. summary Print a summary of the system, including the time (no timezone is applied), uname information and various critical system counters. INITIAL KDB COMMANDS kdb/kdb_cmds is a plain text file where you can define kdb commands which are to be issued during kdb_init(). One command per line, blank lines are ignored, lines starting with # are ignored. kdb_cmds is intended for per user customization of kdb, you can use it to set environment variables to suit your hardware or to set standard breakpoints for the problem you are debugging. This file is converted to a small C object, compiled and linked into the kernel. You must rebuild and reinstall the kernel after changing kdb_cmds. This file will never be shipped with any useful data so you can always override it with your local copy. Sample kdb_cmds: #Initial commands for kdb, alter to suit your needs. #These commands are executed in kdb_init() context, no SMP, no #processes. Commands that require process data (including stack or #registers) are not reliable this early. set and bp commands should #besafe. Global breakpoint commands affect each cpu as it is booted. set LINES=50 set MDCOUNT=25 set RECURSE=1 bp sys_init_module INTERRUPTS AND KDB When a kdb event occurs, one cpu (the initial cpu) enters kdb state. It uses a cross system interrupt to interrupt the other cpus and bring them all into kdb state. All cpus run with interrupts disabled while they are inside kdb, this prevents most external events from disturbing the kernel while kdb is running. Note: Disabled interrupts means that any I/O that relies on interrupts cannot proceed while kdb is in control, devices can time out. The clock tick is also disabled, machines will lose track of time while they are inside kdb. Even with interrupts disabled, some non-maskable interrupt events will still occur, these can disturb the kernel while you are debugging it. The initial cpu will still accept NMI events, assuming that kdb was not entered for an NMI event. Any cpu where you use the SS or SSB commands will accept NMI events, even after the instruction has finished and the cpu is back in kdb. This is an unavoidable side effect of the fact that doing SS[B] requires the cpu to drop all the way out of kdb, including exiting from the event that brought the cpu into kdb. Under normal circumstances the only NMI event is for the NMI oopser and that is kdb aware so it does not disturb the kernel while kdb is running. Sometimes doing SS or SSB on ix86 will allow one interrupt to proceed, even though the cpu is disabled for interrupts. Ihave not been able to track this one down but I suspect that the interrupt was pending when kdb was entered and it runs when kdb exits through IRET even though the popped flags are marked as cli(). If any ix86 hardware expert can shed some light on this problem, please notify the kdb maintainer. RECOVERING FROM KDB ERRORS If a kdb command breaks and kdb has enough of a recovery environment then kdb will abort the command and drop back into mainline kdb code. This means that user written kdb commands can follow bad pointers September 17,

6 without killing kdb. Ideally all code should verify that data areas are valid (using kdb_getarea) before accessing it but lots of calls to kdb_getarea can be clumsy. The sparc64 port does not currently provide this error recovery. If someone would volunteer to write the necessary longjmp/setjmp code, their efforts would be greatly appreciated. In the meantime, it is possible for kdb to trigger a panic by accessing a bad address. DEBUGGING THE DEBUGGER kdb has limited support for debugging problems within kdb. If you suspect that kdb is failing, you can set environment variable KDBDEBUG to a bit pattern which will activate kdb_printf statements within kdb. See include/linux/kdb.h, KDB_DEBUG_FLAG_xxx defines. For example set KDBDEBUG=0x60 activates the event callbacks into kdb plus state tracing in sections of kdb. set KDBDEBUG=0x18 gives lots of tracing as kdb tries to decode the process stack. You can also perform one level of recursion in kdb. If environment variable RECURSE is not set or is 0 then kdb will either recover from an error (if the recovery environment is satisfactory) or kdb will allow the error to percolate, usually resulting in a dead system. When RECURSE is 1 then kdb will recover from an error or, if there is no satisfactory recovery environment, it will drop into kdb state to let you diagnose the problem. When RECURSE is 2 then all errors drop into kdb state, kdb does not attempt recovery first. Errors while in recursive state all drop through, kdb does not even attempt to recover from recursive errors. KEYBOARD EDITING kdb supports a command history, which can be accessed via keyboard sequences. It supports the special keys on PC keyboards, control characters and vt100 sequences on a serial console or a PC keyboard. PC Special keys Control VT100 key Codes Action Backspace ctrl-h Backspace 0x7f Delete character to the left of the cursor Delete ctrl-d Delete \e[3 Delete character to the right of the cursor Home ctrl-a Home \e[1 Go to start of line End ctrl-e End \e[4 Go to end of line Up arrow ctrl-p Up arrow \e[a Up one command in history Down arrow ctrl-n Down arrow \e[b Down one command in history Left arrow ctrl-b Left arrow \e[d Left one character in current command Right arrow ctrl-f Right arrow \e[c Right one character in current command There is no toggle for insert/replace mode, kdb editing is always in insert mode. Use delete and backspace to delete characters. kdb also supports tab completion for kernel symbols Type the start of a kernel symbol and press tab (ctrl-i) to complete the name If there is more than one possible match, kdb will append any common characters and wait for more input, pressing tab a second time will display the possible matches The number of matches is limited by environment variable DTABCOUNT, with a default of 30 if that variable is not set. AUTHORS Scott Lurndal, Richard Bass, Scott Foehner, Srinivasa Thirumalachar, Masahiro Adegawa, Marc Esipovich, TedKline, Steve Lord, Andi Kleen, Sonic Zhang. Keith Owens <kaos@sgi.com> - kdb maintainer. SEE ALSO linux/documentation/kdb/kdb_{bp,bt,env,ll,md,ps,rd,sr,ss}.man September 17,

John A. Ronciak Staff Engineer NCG/NID/LAO Intel Corp.

John A. Ronciak Staff Engineer NCG/NID/LAO Intel Corp. John A. Ronciak Staff Engineer NCG/NID/LAO Corp. February 15-17, 17, 2000 Agenda l Learning the Cross Development Platform l Make the Device Driver IA-64 Clean l Building an IA-64 Linux Driver l Debugging

More information

TDT 1.2 Release Notes and FAQ March 2002

TDT 1.2 Release Notes and FAQ March 2002 TDT 1.2 Release Notes and FAQ March 2002 This document gives additional information about the use of the ARM Trace Debug Tools TDT 1.2 (build 1031) For more information, please see the Trace Debug Tools

More information

NEW CEIBO DEBUGGER. Menus and Commands

NEW CEIBO DEBUGGER. Menus and Commands NEW CEIBO DEBUGGER Menus and Commands Ceibo Debugger Menus and Commands D.1. Introduction CEIBO DEBUGGER is the latest software available from Ceibo and can be used with most of Ceibo emulators. You will

More information

CSCI0330 Intro Computer Systems Doeppner. Lab 02 - Tools Lab. Due: Sunday, September 23, 2018 at 6:00 PM. 1 Introduction 0.

CSCI0330 Intro Computer Systems Doeppner. Lab 02 - Tools Lab. Due: Sunday, September 23, 2018 at 6:00 PM. 1 Introduction 0. CSCI0330 Intro Computer Systems Doeppner Lab 02 - Tools Lab Due: Sunday, September 23, 2018 at 6:00 PM 1 Introduction 0 2 Assignment 0 3 gdb 1 3.1 Setting a Breakpoint 2 3.2 Setting a Watchpoint on Local

More information

CSE 374 Programming Concepts & Tools. Brandon Myers Winter 2015 Lecture 11 gdb and Debugging (Thanks to Hal Perkins)

CSE 374 Programming Concepts & Tools. Brandon Myers Winter 2015 Lecture 11 gdb and Debugging (Thanks to Hal Perkins) CSE 374 Programming Concepts & Tools Brandon Myers Winter 2015 Lecture 11 gdb and Debugging (Thanks to Hal Perkins) Hacker tool of the week (tags) Problem: I want to find the definition of a function or

More information

Basic functions of a debugger

Basic functions of a debugger UNIVERSITY OF CALIFORNIA Department of Electrical Engineering and Computer Sciences Computer Science Division CS61B Spring 1998 P. N. Hilfinger Simple Use of GDB A debugger is a program that runs other

More information

Code::Blocks Student Manual

Code::Blocks Student Manual Code::Blocks Student Manual Lawrence Goetz, Network Administrator Yedidyah Langsam, Professor and Theodore Raphan, Distinguished Professor Dept. of Computer and Information Science Brooklyn College of

More information

Chapter 12 Visual Program Debugger

Chapter 12 Visual Program Debugger Chapter 12 Visual Program Debugger In the previous chapter on programs a section titled Getting programs to do what you want discussed using the log to trace how programs execute. That is a useful technique

More information

Debug for GDB Users. Action Description Debug GDB $debug <program> <args> >create <program> <args>

Debug for GDB Users. Action Description Debug GDB $debug <program> <args> >create <program> <args> Page 1 of 5 Debug for GDB Users Basic Control To be useful, a debugger must be capable of basic process control. This functionally allows the user to create a debugging session and instruct the process

More information

ALD Assembly Language Debugger Copyright (C) Patrick Alken

ALD Assembly Language Debugger Copyright (C) Patrick Alken ALD Assembly Language Debugger 0.1.7 Copyright (C) 2000-2004 Patrick Alken To run type ald help Commands may be abbreviated. If a blank command is entered, the last command is repeated. Type `help '

More information

Laboratory Assignment #4 Debugging in Eclipse CDT 1

Laboratory Assignment #4 Debugging in Eclipse CDT 1 Lab 4 (10 points) November 20, 2013 CS-2301, System Programming for Non-majors, B-term 2013 Objective Laboratory Assignment #4 Debugging in Eclipse CDT 1 Due: at 11:59 pm on the day of your lab session

More information

Using kgdb and the kgdb Internals

Using kgdb and the kgdb Internals Using kgdb and the kgdb Internals Jason Wessel jason.wessel@windriver.com Tom Rini trini@kernel.crashing.org Amit S. Kale amitkale@linsyssoft.com Using kgdb and the kgdb Internals by Jason Wessel by Tom

More information

Command-Line Interfaces

Command-Line Interfaces CHAPTER 2 This chapter describes the CLIs you use to configure the Catalyst 4500 series switch. This chapter includes the following major sections: Accessing the Switch CLI, page 2-1 Performing Command-Line

More information

CSE 374 Programming Concepts & Tools

CSE 374 Programming Concepts & Tools CSE 374 Programming Concepts & Tools Hal Perkins Fall 2017 Lecture 11 gdb and Debugging 1 Administrivia HW4 out now, due next Thursday, Oct. 26, 11 pm: C code and libraries. Some tools: gdb (debugger)

More information

An Introduction to Komodo

An Introduction to Komodo An Introduction to Komodo The Komodo debugger and simulator is the low-level debugger used in the Digital Systems Laboratory. Like all debuggers, Komodo allows you to run your programs under controlled

More information

GDB Tutorial. A Walkthrough with Examples. CMSC Spring Last modified March 22, GDB Tutorial

GDB Tutorial. A Walkthrough with Examples. CMSC Spring Last modified March 22, GDB Tutorial A Walkthrough with Examples CMSC 212 - Spring 2009 Last modified March 22, 2009 What is gdb? GNU Debugger A debugger for several languages, including C and C++ It allows you to inspect what the program

More information

CS/COE 0449 term 2174 Lab 5: gdb

CS/COE 0449 term 2174 Lab 5: gdb CS/COE 0449 term 2174 Lab 5: gdb What is a debugger? A debugger is a program that helps you find logical mistakes in your programs by running them in a controlled way. Undoubtedly by this point in your

More information

The State of Kernel Debugging Technology. Jason Wessel - Product Architect for WR Linux Core Runtime - Kernel.org KDB/KGDB Maintainer

The State of Kernel Debugging Technology. Jason Wessel - Product Architect for WR Linux Core Runtime - Kernel.org KDB/KGDB Maintainer The State of Kernel Debugging Technology Jason Wessel - Product Architect for WR Linux Core Runtime - Kernel.org KDB/KGDB Maintainer August 12 th, 2010 Agenda Brief history of kernel.org kernel debuggers

More information

Introduction to the ThreadX Debugger Plugin for the IAR Embedded Workbench C-SPYDebugger

Introduction to the ThreadX Debugger Plugin for the IAR Embedded Workbench C-SPYDebugger C-SPY plugin Introduction to the ThreadX Debugger Plugin for the IAR Embedded Workbench C-SPYDebugger This document describes the IAR C-SPY Debugger plugin for the ThreadX RTOS. The ThreadX RTOS awareness

More information

Using the Command-Line Interface

Using the Command-Line Interface Information About, page 1 How to Use the CLI to Configure Features, page 5 Information About Command Modes The Cisco IOS user interface is divided into many different modes. The commands available to you

More information

BASICS OF THE RENESAS SYNERGY PLATFORM

BASICS OF THE RENESAS SYNERGY PLATFORM BASICS OF THE RENESAS SYNERGY PLATFORM TM Richard Oed 2018.11 02 CHAPTER 11 EVENT ANALYSIS WITH TRACEX CONTENTS 11 EVENT ANALYSIS WITH TRACEX 03 11.1 An Introduction to TraceX 03 11.2 Built-in Views and

More information

Rose technical support

Rose technical support Rose technical support Firmware download UltraMatrix X-series - UltraMatrix E-series Latest version Rev Date File Program MX22D 05/08/03 MXP22D.HEX Kernel KX20 11/12/01 MXK20.HEX UltraMatrix program revision

More information

UNIVERSITY OF CALIFORNIA Department of Electrical Engineering and Computer Sciences Computer Science Division. P. N. Hilfinger.

UNIVERSITY OF CALIFORNIA Department of Electrical Engineering and Computer Sciences Computer Science Division. P. N. Hilfinger. UNIVERSITY OF CALIFORNIA Department of Electrical Engineering and Computer Sciences Computer Science Division CS164 Spring 2008 P. N. Hilfinger The GJDB Debugger A debugger is a program that runs other

More information

We first learn one useful option of gcc. Copy the following C source file to your

We first learn one useful option of gcc. Copy the following C source file to your Lecture 5 p.1 Faculty of Computer Science, Dalhousie University CSCI 2132 Software Development Lab 5: gcc and gdb tools 10-Oct-2018 Location: Teaching Labs Time: Thursday Instructor: Vlado Keselj Lab 5:

More information

1 Basic functions of a debugger

1 Basic functions of a debugger UNIVERSITY OF CALIFORNIA Department of Electrical Engineering and Computer Sciences Computer Science Division CS61B Fall 2014 P. N. Hilfinger The GJDB Debugger A debugger is a program that runs other programs,

More information

Command-Line Interfaces

Command-Line Interfaces CHAPTER 2 This chapter describes the CLIs you use to configure the Catalyst 4500 series switch. This chapter includes the following major sections: Accessing the Switch CLI, page 2-2 Performing Command-Line

More information

Using nu/tpu on UNIX Last revised: 1/28/00

Using nu/tpu on UNIX Last revised: 1/28/00 Using nu/tpu on UNIX Last revised: 1/28/00 nu/tpu is a general-purpose text editor available on UNIX that simulates the TPU editor available on VMS operating systems. By default nu/tpu emulates the EDT

More information

Practical 5. Linux Commands: Working with Files

Practical 5. Linux Commands: Working with Files Practical 5 Linux Commands: Working with Files 1. Ps The ps command on linux is one of the most basic commands for viewing the processes running on the system. It provides a snapshot of the current processes

More information

Precept 2: Non-preemptive Scheduler. COS 318: Fall 2018

Precept 2: Non-preemptive Scheduler. COS 318: Fall 2018 Precept 2: Non-preemptive Scheduler COS 318: Fall 2018 Project 2 Schedule Precept: Monday 10/01, 7:30pm (You are here) Design Review: Monday 10/08, 3-7pm Due: Sunday 10/14, 11:55pm Project 2 Overview Goal:

More information

1. Allowed you to see the value of one or more variables, or 2. Indicated where you were in the execution of a program

1. Allowed you to see the value of one or more variables, or 2. Indicated where you were in the execution of a program CS0449 GDB Lab What is a debugger? A debugger is a program that helps you find logical mistakes in your programs by running them in a controlled way. Undoubtedly by this point in your programming life,

More information

CSE 351. GDB Introduction

CSE 351. GDB Introduction CSE 351 GDB Introduction Lab 2 Out either tonight or tomorrow Due April 27 th (you have ~12 days) Reading and understanding x86_64 assembly Debugging and disassembling programs Today: General debugging

More information

HOW TO USE CODE::BLOCKS IDE FOR COMPUTER PROGRAMMING LABORATORY SESSIONS

HOW TO USE CODE::BLOCKS IDE FOR COMPUTER PROGRAMMING LABORATORY SESSIONS HOW TO USE CODE::BLOCKS IDE FOR COMPUTER PROGRAMMING LABORATORY SESSIONS INTRODUCTION A program written in a computer language, such as C/C++, is turned into executable using special translator software.

More information

8086 Interrupts and Interrupt Responses:

8086 Interrupts and Interrupt Responses: UNIT-III PART -A INTERRUPTS AND PROGRAMMABLE INTERRUPT CONTROLLERS Contents at a glance: 8086 Interrupts and Interrupt Responses Introduction to DOS and BIOS interrupts 8259A Priority Interrupt Controller

More information

Postmortem Debugging with Coresight HKG18-TR14. Leo Yan, Linaro Support and Solutions Engineering

Postmortem Debugging with Coresight HKG18-TR14. Leo Yan, Linaro Support and Solutions Engineering Postmortem Debugging with Coresight HKG18-TR14 Leo Yan, Linaro Support and Solutions Engineering Introduction This session discusses postmortem debugging techniques in the Linux kernel. Firstly we will

More information

SRI VENKATESWARA COLLEGE OF ENGINEERING AND TECHNOLOGY DEPARTMENT OF ECE EC6504 MICROPROCESSOR AND MICROCONTROLLER (REGULATION 2013)

SRI VENKATESWARA COLLEGE OF ENGINEERING AND TECHNOLOGY DEPARTMENT OF ECE EC6504 MICROPROCESSOR AND MICROCONTROLLER (REGULATION 2013) SRI VENKATESWARA COLLEGE OF ENGINEERING AND TECHNOLOGY DEPARTMENT OF ECE EC6504 MICROPROCESSOR AND MICROCONTROLLER (REGULATION 2013) UNIT I THE 8086 MICROPROCESSOR PART A (2 MARKS) 1. What are the functional

More information

Code::Blocks Student Manual

Code::Blocks Student Manual Code::Blocks Student Manual Lawrence Goetz, Network Administrator Yedidyah Langsam, Professor and Theodore Raphan, Distinguished Professor Dept. of Computer and Information Science Brooklyn College of

More information

SGI Altix Getting Correct Code Reiner Vogelsang SGI GmbH

SGI Altix Getting Correct Code Reiner Vogelsang SGI GmbH SGI Altix Getting Correct Code Reiner Vogelsang SGI GmbH reiner@sgi.com Module Objectives After completing the module, you will able to Find caveats and hidden errors in application codes Handle debuggers

More information

CSCE Operating Systems Interrupts, Exceptions, and Signals. Qiang Zeng, Ph.D. Fall 2018

CSCE Operating Systems Interrupts, Exceptions, and Signals. Qiang Zeng, Ph.D. Fall 2018 CSCE 311 - Operating Systems Interrupts, Exceptions, and Signals Qiang Zeng, Ph.D. Fall 2018 Previous Class Process state transition Ready, blocked, running Call Stack Execution Context Process switch

More information

Unix and C Program Development SEEM

Unix and C Program Development SEEM Unix and C Program Development SEEM 3460 1 Operating Systems A computer system cannot function without an operating system (OS). There are many different operating systems available for PCs, minicomputers,

More information

NAME top display top CPU processes. SYNOPSIS top [ ] [d delay] [p pid] [q] [c] [C] [S] [s] [i] [n iter] [b]

NAME top display top CPU processes. SYNOPSIS top [ ] [d delay] [p pid] [q] [c] [C] [S] [s] [i] [n iter] [b] NAME top display top CPU processes SYNOPSIS top [ ] [d delay] [p pid] [q] [c] [C] [S] [s] [i] [n iter] [b] DESCRIPTION top provides an ongoing look at processor activity in real time. It displays a listing

More information

Debugging Kernel without Debugger

Debugging Kernel without Debugger Debugging Kernel without Debugger Masami Hiramatsu Software Platform Research Dept. Yokohama Research Lab. Hitachi Ltd., 1 Who am I? Masami Hiramatsu Researcher in Hitachi

More information

EW The Source Browser might fail to start data collection properly in large projects until the Source Browser window is opened manually.

EW The Source Browser might fail to start data collection properly in large projects until the Source Browser window is opened manually. EW 25462 The Source Browser might fail to start data collection properly in large projects until the Source Browser window is opened manually. EW 25460 Some objects of a struct/union type defined with

More information

Using Cisco IOS XE Software

Using Cisco IOS XE Software This chapter describes the basics of using the Cisco IOS XE software and includes the following section: Accessing the CLI Using a Router Console, on page 1 Accessing the CLI Using a Router Console Before

More information

PathFinder-XD for MIPS Powered Devices. Simulator

PathFinder-XD for MIPS Powered Devices. Simulator v.1.0.6, 15 th January 2013 PathFinder-XD for MIPS Powered Devices Simulator Contents 1. Introduction 2 2. Installation 2 2.1 Windows Installation 2 2.2 Linux Installation 2 3. Using PathFinder-XD with

More information

RVDS 3.0 Introductory Tutorial

RVDS 3.0 Introductory Tutorial RVDS 3.0 Introductory Tutorial 338v00 RVDS 3.0 Introductory Tutorial 1 Introduction Aim This tutorial provides you with a basic introduction to the tools provided with the RealView Development Suite version

More information

Decoding Those Inscrutable RCU CPU Stall Warnings

Decoding Those Inscrutable RCU CPU Stall Warnings Paul E. McKenney, IBM Distinguished Engineer, Linux Technology Center Member, IBM Academy of Technology Open Source Summit North America, September 12, 2017 Decoding Those Inscrutable RCU CPU Stall Warnings

More information

RVDS 4.0 Introductory Tutorial

RVDS 4.0 Introductory Tutorial RVDS 4.0 Introductory Tutorial 402v02 RVDS 4.0 Introductory Tutorial 1 Introduction Aim This tutorial provides you with a basic introduction to the tools provided with the RealView Development Suite version

More information

Debugging in Small Basic is the process of analysing a program to detect and fix errors or improve functionality in some way.

Debugging in Small Basic is the process of analysing a program to detect and fix errors or improve functionality in some way. How to Debug Introduction Debugging in Small Basic is the process of analysing a program to detect and fix errors or improve functionality in some way. In order to debug a program it must first compile

More information

Login management commands

Login management commands Contents Login management commands 1 CLI login configuration commands 1 display telnet client configuration 1 telnet 1 telnet ipv6 2 telnet server enable 3 User interface configuration commands 3 acl (user

More information

Advanced Magic - GDB

Advanced Magic - GDB Division of Mathematics and Computer Science Maryville College Outline Introduction to GDB 1 Introduction to GDB 2 3 4 What is a debugger? A debugger is a program that helps you find and correcting errors

More information

Phoenix Technologies, Ltd.

Phoenix Technologies, Ltd. Phoenix Technologies, Ltd. AwardBIOS Version 4.51PG Post Codes & Error Messages Table of Contents POST Codes - 2 Error Messages - 7 ----------------------------------------------- Proprietary Notice and

More information

Support Notes for Red Hat Enterprise Linux ES v.4.6 for HP Integrity Servers

Support Notes for Red Hat Enterprise Linux ES v.4.6 for HP Integrity Servers Support Notes for Red Hat Enterprise Linux ES v.4.6 for HP Integrity Servers HP Part Number: 5992-2417 Edition: 1, E0108 Copyright 2007 Hewlett-Packard Development Company, L.P. Legal Notices Confidential

More information

The CMXBug Manual. The CMXBug Manual

The CMXBug Manual. The CMXBug Manual The CMX CMXBug TM debugger provides the ability to view and modify different aspects of the CMX multitasking operating system environment, while application code is running. CMXBug runs as a task, usually

More information

ECE QNX Real-time Lab

ECE QNX Real-time Lab Department of Electrical & Computer Engineering Concordia University ECE QNX Real-time Lab User Guide Dan Li 9/12/2011 User Guide of ECE Real-time QNX Lab Contents 1. About Real-time QNX Lab... 2 Contacts...

More information

Signals: Management and Implementation. Sanjiv K. Bhatia Univ. of Missouri St. Louis

Signals: Management and Implementation. Sanjiv K. Bhatia Univ. of Missouri St. Louis Signals: Management and Implementation Sanjiv K. Bhatia Univ. of Missouri St. Louis sanjiv@aryabhat.umsl.edu http://www.cs.umsl.edu/~sanjiv Signals Mechanism to notify processes of asynchronous events

More information

Managing Rack-Mount Servers

Managing Rack-Mount Servers This chapter includes the following sections: Rack-Mount Server Management, page 1 Guidelines for Removing and Decommissioning Rack-Mount Servers, page 2 Recommendations for Avoiding Unexpected Server

More information

Tape Channel Analyzer Windows Driver Spec.

Tape Channel Analyzer Windows Driver Spec. Tape Channel Analyzer Windows Driver Spec. 1.1 Windows Driver The Driver handles the interface between the Adapter and the Adapter Application Program. The driver follows Microsoft Windows Driver Model

More information

UNIT V SYSTEM SOFTWARE TOOLS

UNIT V SYSTEM SOFTWARE TOOLS 5.1 Text editors UNIT V SYSTEM SOFTWARE TOOLS A text editor is a type of program used for editing plain text files. Text editors are often provided with operating systems or software development packages,

More information

Using Cisco IOS Software

Using Cisco IOS Software APPENDIX A This appendix describes the basics about using the Cisco IOS software that is installed on every Cisco ubr905 and Cisco ubr925 cable access routers: Accessing the Command-Line Interface, page

More information

OS Structure. Hardware protection & privilege levels Control transfer to and from the operating system

OS Structure. Hardware protection & privilege levels Control transfer to and from the operating system OS Structure Topics Hardware protection & privilege levels Control transfer to and from the operating system Learning Objectives: Explain what hardware protection boundaries are. Explain how applications

More information

WLM1200-RMTS User s Guide

WLM1200-RMTS User s Guide WLM1200-RMTS User s Guide Copyright 2011, Juniper Networks, Inc. 1 WLM1200-RMTS User Guide Contents WLM1200-RMTS Publication Suite........................................ 2 WLM1200-RMTS Hardware Description....................................

More information

CS 167 Final Exam Solutions

CS 167 Final Exam Solutions CS 167 Final Exam Solutions Spring 2018 Do all questions. 1. [20%] This question concerns a system employing a single (single-core) processor running a Unix-like operating system, in which interrupts are

More information

int $0x32 // call interrupt number 50

int $0x32 // call interrupt number 50 Kernel Programming: Process isolation, goal to make programs run fast and reliably o Processes should not affect others, unless there s a specific and allowed communication channel o Each process can act

More information

BRIDGEMATE II. Scorer Failure Situations (in conjunction with Jeff Smith Scorer - JSS) COMPUTER SERVER BRIDGEMATE(S) Server Firmware & Memory

BRIDGEMATE II. Scorer Failure Situations (in conjunction with Jeff Smith Scorer - JSS) COMPUTER SERVER BRIDGEMATE(S) Server Firmware & Memory BRIDGEMATE II Scorer Failure Situations (in conjunction with Jeff Smith Scorer - JSS) The main thing in these situations is don t panic. As a last resort you can always revert to travellers for the remainder

More information

Reviewing gcc, make, gdb, and Linux Editors 1

Reviewing gcc, make, gdb, and Linux Editors 1 Reviewing gcc, make, gdb, and Linux Editors 1 Colin Gordon csgordon@cs.washington.edu University of Washington CSE333 Section 1, 3/31/11 1 Lots of material borrowed from 351/303 slides Colin Gordon (University

More information

Signals and Session Management. Signals. Mechanism to notify processes of system events

Signals and Session Management. Signals. Mechanism to notify processes of system events Signals and Session Management Signals Mechanism to notify processes of system events Primitives for communication and synchronization between user processes Signal generation and handling Allow an action

More information

½ Caution! Introduction. Blind.switch 5701/1.0

½ Caution! Introduction. Blind.switch 5701/1.0 Blind.switch 5701/1.0 Introduction General information This software application enables you to program blind/switch actuators using manual mode (referred to below as actuator), control blind and roller

More information

Using a debugger. Segmentation fault? GDB to the rescue!

Using a debugger. Segmentation fault? GDB to the rescue! Using a debugger Segmentation fault? GDB to the rescue! But first... Let's talk about the quiz Let's talk about the previous homework assignment Let's talk about the current homework assignment K findkey(v

More information

Debugging uclinux on Coldfire

Debugging uclinux on Coldfire Debugging uclinux on Coldfire By David Braendler davidb@emsea-systems.com What is uclinux? uclinux is a version of Linux for CPUs without virtual memory or an MMU (Memory Management Unit) and is typically

More information

Debugging Linux systems using GDB and QEMU. Khem Raj

Debugging Linux systems using GDB and QEMU. Khem Raj Debugging Linux systems using GDB and QEMU Khem Raj Agenda Introduction Compiling and debugging Linux kernel using QEMU Creating image file for root file system Compiling and debugging uclibc dynamic linker

More information

Intecom. March

Intecom. March Intecom Intecom Systems PDI-1000S MKO Application Manual March 1994 590-2269-002 COMPANY PROPRIETARY STATEMENT All information contained herein is considered company proprietary and is restricted solely

More information

HPCC - Hrothgar. Getting Started User Guide TotalView. High Performance Computing Center Texas Tech University

HPCC - Hrothgar. Getting Started User Guide TotalView. High Performance Computing Center Texas Tech University HPCC - Hrothgar Getting Started User Guide TotalView High Performance Computing Center Texas Tech University HPCC - Hrothgar 2 Table of Contents *This user guide is under development... 3 1. Introduction...

More information

Process Context & Interrupts. New process can mess up information in old process. (i.e. what if they both use the same register?)

Process Context & Interrupts. New process can mess up information in old process. (i.e. what if they both use the same register?) 1 Process Context 1.1 What is context? A process is sometimes called a task, subroutine or program. Process context is all the information that the process needs to keep track of its state. Registers Temporary

More information

INSTALLING INSTALLING INSTALLING

INSTALLING INSTALLING INSTALLING NightView Version 5.4 Release Notes (PowerMAX) June 2002 0890395-5.4 READ READ READ ME ME ME BEFORE BEFORE BEFORE INSTALLING INSTALLING INSTALLING THIS THIS THIS PRODUCT PRODUCT PRODUCT Copyright Disclaimer

More information

Debugging Nios II Systems with the SignalTap II Logic Analyzer

Debugging Nios II Systems with the SignalTap II Logic Analyzer Debugging Nios II Systems with the SignalTap II Logic Analyzer May 2007, ver. 1.0 Application Note 446 Introduction As FPGA system designs become more sophisticated and system focused, with increasing

More information

A+ Guide to Managing & Maintaining Your PC, 8th Edition. Chapter 12 Troubleshooting Windows and Applications

A+ Guide to Managing & Maintaining Your PC, 8th Edition. Chapter 12 Troubleshooting Windows and Applications Chapter 12 Troubleshooting Windows and Applications Objectives Learn about Windows tools to help you when troubleshooting Windows and application problems Learn about general strategies and steps you can

More information

Configuring Security with Passwords, Privileges, and Logins

Configuring Security with Passwords, Privileges, and Logins Configuring Security with Passwords, Privileges, and Logins Cisco IOS based networking devices provide several features that can be used to implement basic security for CLI sessions using only the operating

More information

CAD-CARE TROUBLESHOOTING GUIDE

CAD-CARE TROUBLESHOOTING GUIDE CAD-CARE TROUBLESHOOTING GUIDE CAD-Care is a stable and error free system. The biggest problem encountered with CAD-Care is when something stops CAD-Care during a system sort. Windows Screen Savers have

More information

CST8207: GNU/Linux Operating Systems I Lab Ten Boot Process and GRUB. Boot Process and GRUB

CST8207: GNU/Linux Operating Systems I Lab Ten Boot Process and GRUB. Boot Process and GRUB Student Name: Lab Section: Boot Process and GRUB 1 Due Date - Upload to Blackboard by 8:30am Monday April 16, 2012 Submit the completed lab to Blackboard following the Rules for submitting Online Labs

More information

Date and Time The date is factory set to the date of the BIOS build. The date and time are editable. NumLock

Date and Time The date is factory set to the date of the BIOS build. The date and time are editable. NumLock EPIC-2 CMOS SETUP PARAMETERS This article provides reference information and tips for setting CMOS Setup parameters on the EPIC-2 (Gecko). Start CMOS Setup by pressing Delete during the early boot cycle.

More information

Introduction to EMACS. Harriet Borton Academic and Research Computing

Introduction to EMACS. Harriet Borton Academic and Research Computing Introduction to EMACS Harriet Borton Academic and Research Computing Contents Starting Emacs 2 Parts of the Emacs Screen 3 Basic Editing 4 Entering text 4 Moving around in a file 4 Deleting text 4 Undoing

More information

Section 1: Tools. Contents CS162. January 19, Make More details about Make Git Commands to know... 3

Section 1: Tools. Contents CS162. January 19, Make More details about Make Git Commands to know... 3 CS162 January 19, 2017 Contents 1 Make 2 1.1 More details about Make.................................... 2 2 Git 3 2.1 Commands to know....................................... 3 3 GDB: The GNU Debugger

More information

A.N.A.L.O.G. #15, January 1984 TRANSPORTING ATARI COMPUTER PROGRAMS TO THE ATARI by Claus Buchholz 6502 CPU 16K RAM ANTIC

A.N.A.L.O.G. #15, January 1984 TRANSPORTING ATARI COMPUTER PROGRAMS TO THE ATARI by Claus Buchholz 6502 CPU 16K RAM ANTIC A.N.A.L.O.G. #15, January 1984 TRANSPORTING ATARI COMPUTER PROGRAMS TO THE ATARI 5200 by Claus Buchholz Annotations by Dan Boris 4/2002 When Atari designed the 5200 "Supersystem" as a successor to the

More information

T Jarkko Turkulainen, F-Secure Corporation

T Jarkko Turkulainen, F-Secure Corporation T-110.6220 2010 Emulators and disassemblers Jarkko Turkulainen, F-Secure Corporation Agenda Disassemblers What is disassembly? What makes up an instruction? How disassemblers work Use of disassembly In

More information

Embedded Resource Manager (ERM)

Embedded Resource Manager (ERM) Embedded Resource Manager (ERM) The Embedded Resource Manager (ERM) feature allows you to monitor internal system resource utilization for specific resources such as the buffer, memory, and CPU ERM monitors

More information

A Tutorial for ECE 175

A Tutorial for ECE 175 Debugging in Microsoft Visual Studio 2010 A Tutorial for ECE 175 1. Introduction Debugging refers to the process of discovering defects (bugs) in software and correcting them. This process is invoked when

More information

This is Lab Worksheet 13 - not an Assignment. Boot Process and GRUB

This is Lab Worksheet 13 - not an Assignment. Boot Process and GRUB This is Lab Worksheet 13 - not an Assignment This Lab Worksheet contains some practical examples that will prepare you to complete your Assignments. You do not have to hand in this Lab Worksheet. Make

More information

CSE 410: Systems Programming

CSE 410: Systems Programming CSE 410: Systems Programming Recitation 4: Introduction to gdb Introduction The GNU Debugger, or gdb, is a powerful symbolic debugger. Symbolic debuggers are available for many languages and platforms,

More information

CMSC 313 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 09, SPRING 2013

CMSC 313 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 09, SPRING 2013 CMSC 313 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 09, SPRING 2013 TOPICS TODAY I/O Architectures Interrupts Exceptions FETCH EXECUTE CYCLE 1.7 The von Neumann Model This is a general

More information

OMEN Alpha / issue 4. Technical Documentation

OMEN Alpha / issue 4. Technical Documentation OMEN Alpha / issue 4 Technical Documentation OMEN Computers - - - https://github.com/osmibity - - - Page: 1 INTRODUCTION == The OMEN Alpha computer kit is a low-cost computer trainer, based on the Intel

More information

Source level debugging. October 18, 2016

Source level debugging. October 18, 2016 Source level debugging October 18, 2016 Source level debugging Source debugging is a nice tool for debugging execution problems; it can be particularly useful when working with crashed programs that leave

More information

Using the Command-Line Interface

Using the Command-Line Interface CHAPTER 2 This chapter describes the Cisco IOS command-line interface (CLI) and how to use it to configure your Cisco ME 3400 Ethernet Access switch. It contains these sections: Understanding Command Modes,

More information

EXPERIMENT 1. FAMILIARITY WITH DEBUG, x86 REGISTERS and MACHINE INSTRUCTIONS

EXPERIMENT 1. FAMILIARITY WITH DEBUG, x86 REGISTERS and MACHINE INSTRUCTIONS EXPERIMENT 1 FAMILIARITY WITH DEBUG, x86 REGISTERS and MACHINE INSTRUCTIONS Pre-lab: This lab introduces you to a software tool known as DEBUG. Before the lab session, read the first two sections of chapter

More information

52 Remote Target. Simulation. Chapter

52 Remote Target. Simulation. Chapter Chapter 52 Remote Target Simulation This chapter describes how to run a simulator on a target and connect it to the SDL simulator interface (SimUI) on the host via TCP/IP communication. July 2003 Telelogic

More information

Using Microsoft Word. Getting Started With Word. Exercise 1 Starting the Program

Using Microsoft Word. Getting Started With Word. Exercise 1 Starting the Program Using Microsoft Word Getting Started With Word Exercise 1 Starting the Program There are several ways to start a program in Microsoft Windows and they may include the following: Clicking an icon on the

More information

GDB cheatsheet - page 1

GDB cheatsheet - page 1 Running # gdb [core dump] Start GDB (with optional core dump). # gdb --args Start GDB and pass arguments # gdb --pid Start GDB and attach to process. set args

More information

2.5 Hardware Protection

2.5 Hardware Protection 2.5 Hardware Protection 2.5.1 Dual-Mode Operation To ensure proper operation, we must protect the operating system and all other programs and their data from any malfunctioning program. Protection is needed

More information

There are different characteristics for exceptions. They are as follows:

There are different characteristics for exceptions. They are as follows: e-pg PATHSHALA- Computer Science Computer Architecture Module 15 Exception handling and floating point pipelines The objectives of this module are to discuss about exceptions and look at how the MIPS architecture

More information

Digitakt OS 1.07 Release Information

Digitakt OS 1.07 Release Information Digitakt OS 1.07 Release Information Elektron Music Machines March 9, 2018 How to upgrade: Upgrading from within the OS Select SYSTEM in the SETTINGS menu, and then select OS UPGRADE. Send the SysEx firmware

More information

Visual Profiler. User Guide

Visual Profiler. User Guide Visual Profiler User Guide Version 3.0 Document No. 06-RM-1136 Revision: 4.B February 2008 Visual Profiler User Guide Table of contents Table of contents 1 Introduction................................................

More information