ALD Assembly Language Debugger Copyright (C) Patrick Alken

Similar documents
Source level debugging. October 18, 2016

Princeton University COS 217: Introduction to Programming Systems GDB Tutorial and Reference for x86-64 Assembly Language

CSE 351. GDB Introduction

GDB QUICK REFERENCE GDB Version 4

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

GDB cheatsheet - page 1

Program Design: Using the Debugger

Migrating from Inspect to Native Inspect

Jackson State University Department of Computer Science CSC / Advanced Information Security Spring 2013 Lab Project # 5

Princeton University COS 217: Introduction to Programming Systems GDB Tutorial and Reference

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

RVDS 4.0 Introductory Tutorial

An Introduction to Komodo

Using gdb to find the point of failure

Using the KD30 Debugger

NEW CEIBO DEBUGGER. Menus and Commands

Name (10) # Student. Student. 2017, Microprocessors 1 / 11

When the AT breakpoint is reached, the AT Display screen shows your sourceless program in dump format.

RVDS 3.0 Introductory Tutorial

CS201 Lecture 2 GDB, The C Library

CMPSC 311- Introduction to Systems Programming Module: Debugging

LAB WORK NO. 3 TURBO DEBUGGER ENVIRONMENT

ARM DS-5. Using the Debugger. Copyright 2010 ARM. All rights reserved. ARM DUI 0446A (ID070310)

Advanced Magic - GDB

The following content has been imported from Legacy Help systems and is in the process of being checked for accuracy.

CMPSC 311- Introduction to Systems Programming Module: Debugging

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

This chapter introduces how to use the emulator of TOPICE quickly.

GDB 1 GDB 2 GDB. Fortran Pascal GDB 4. hoge.c. Fig. 1. calc.c. Fig GDB. GDB Debian. # apt-get install gdb

Using the Debugger. Michael Jantz Dr. Prasad Kulkarni

18-600: Recitation #3

API for Auxiliary Processing Unit

System Debug. This material exempt per Department of Commerce license exception TSU Xilinx, Inc. All Rights Reserved

Programming Studio #9 ECE 190

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

Intro to MS Visual C++ Debugging

Systems/DBG Debugger Version 2.20

Constants and Expressions. Lecture 7: Assembly Language Programs. Constants and Expressions (cont.) Statements. Names. Assembly Directives

Computer Organization and Assembly Language. Lab Session 01

TABLE OF CONTENTS 2 CHAPTER 1 3 CHAPTER 2 4 CHAPTER 3 5 CHAPTER 4. Algorithm Design & Problem Solving. Data Representation.

Debug Tool: Introduction. Performance Objectives

dbx90: Fortran debugger March 9, 2009

DS-5 ARM. Debugger Command Reference. Version Copyright ARM. All rights reserved. ARM DUI 0452P (ID091713)

Lab 03 - x86-64: atoi

Constants and. Lecture 7: Assembly Language Programs. Expressions (cont.) Constants and. Statements. Expressions

NYU SCPS X Section 1 Unix Tools. Fall 2004 Handout 5

ARM DS-5. Debugger Command Reference. Copyright 2010 ARM. All rights reserved. ARM DUI 0452A (ID070310)

Should you know scanf and printf?

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

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

CA IDMS Online. Online Debugger Guide. Release

DS-5 ARM. Debugger Command Reference. Version 5.3. Copyright 2010 ARM. All rights reserved. ARM DUI 0452C (ID112910)

Computer Programming C++ (wg) CCOs

Simulavr. A simulator for the Atmel AVR family of microcontrollers. For simulavr version , 18 January by Theodore A.

Your code must have been compiled with the -g compiler option. Example:

Intel Architecture Segment:Offset Memory Addressing

T Hands-on 2. User-mode debuggers OllyDbg

mp2 Warmup Instructions (Updated 1/25/2016 by Ron Cheung for using VMs)

CS 270 Systems Programming. Debugging Tools. CS 270: Systems Programming. Instructor: Raphael Finkel

Experiment N o 1. Introduction to Assembly Language Programming

MPATE-GE 2618: C Programming for Music Technology. Unit 4.1

VARDHAMAN COLLEGE OF ENGINEERING (AUTONOMOUS) Shamshabad, Hyderabad

FUJITSU SEMICONDUCTOR CM E CONTROLLER MANUAL FR-FAMILY SOFTUNE TM WORKBENCH COMMAND REFERENCE MANUAL. for V6

CS356: Discussion #5 Debugging with GDB. Marco Paolieri

TRACE32 Debugger Getting Started... ICD Tutorial About the Tutorial... 2

Reverse Engineering with IDA Pro. CS4379/5375 Software Reverse Engineering Dr. Jaime C. Acosta

The Arnor products for the Amstrad CPC and Amstrad PCW are Copyright Brian Watson. All rights reserved.

The ThreadX C-SPY plugin

Lab 3-2: Exploring the Heap

Lab 10 CST8214 Ian! D. Allen Fall 2007

Computer Science and Engineering 331. Midterm Examination #1. Fall Name: Solutions S.S.#:

Binghamton University. CS-220 Spring X86 Debug. Computer Systems Section 3.11

Intro x86 Part 3: Linux Tools & Analysis

CS2: Debugging in Java

CS354 gdb Tutorial Written by Chris Feilbach

A Fast Review of C Essentials Part I

GDB Linux GNU Linux Distribution. gdb gcc g++ -g gdb EB_01.cpp

TotalView. Debugging Tool Presentation. Josip Jakić

buffer overflow exploitation

A Tutorial for ECE 175

CS401 - Computer Architecture and Assembly Language Programming Glossary By

M A S S A C H U S E T T S I N S T I T U T E O F T E C H N O L O G Y DEPARTMENT OF ELECTRICAL ENGINEERING AND COMPUTER SCIENCE

CSE 361S Intro to Systems Software Lab Assignment #4

Enhanced Debugging with Traces

ZAP Cross Debuggers for STMicroelectronics Microcontrollers

Exercise Session 6 Computer Architecture and Systems Programming

COMMAND REFERENCE MANUAL

Project Debugging with MDK-ARM

CS3210: Tutorial Session 2. Kyuhong Park-- edited by Kyle Harrigan

Your code must have been compiled with the -g compiler option. Example:

CS/COE 0449 term 2174 Lab 5: gdb

Chapter 12 Visual Program Debugger

EUROScope lite 16FX Reference Manual

Implementation of Breakpoints in GDB for Sim-nML based Architectures

CSc 10200! Introduction to Computing. Lecture 4-5 Edgardo Molina Fall 2013 City College of New York

Unix and C Program Development SEEM

Topic 2: More Shell Skills. Sub-Topic 1: Quoting. Sub-Topic 2: Shell Variables. Difference Between Single & Double Quotes

Binghamton University. CS-220 Spring X86 Debug. Computer Systems Section 3.11

2010 Summer Answers [OS I]

Experiment N o 1. 1 Introduction to Assembly Language Programming

Transcription:

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 <command>' for more specific information on <command>. General commands attach continue detach disassemble display enter examine file help ldisplay load next quit register run set step undisplay unload Breakpoint related commands break dbreak disable enable ignore lbreak tbreak General commands help attach attach: Attach to a running process Usage: attach <pid> <pid> - process id to attach to help enter enter: Change the contents of the program's memory Usage: enter <address> [value] <address> - Memory address to change [value] - New value If no value is given, you will be prompted for values for successive memory addresses until a blank value is input. Alias: store help load load: Loads a new file into memory for debugging Usage: load <filename> Previous file, if any, is unloaded first

help set set: Configure various settings Usage: set [option] [value] Options: args disasm-show-syms entry-point file-offset output pause-print prompt step-display-regs step-display-fpregs step-display-mmxregs Type "help set <option>" for more information on <option> help continue continue: Continue execution of debugged process Usage: continue Alias: c help examine examine: Examine the contents of the program's memory Usage: examine [start] [register] [section] [symbol] [stop] [-num <num>] [-size <value>] [-output <letter>] [start] - Memory address to start from [register] - Memory dump begins at register contents [section] - Memory dump begins at section start [symbol] - Memory dump begins at symbol start [stop] - Memory address to stop dump [-num <num>] - Number of elements to dump (default: 20) [-size <value>] - Size of each element in bytes (default: 1) [-output <letter>] - Output format for each element (default: x) 'x' = hexadecimal 'o' = octal 'd' = decimal Example: examine -n 50 -s 1 -o x 0xABCD Dumps 50 elements each of size 1 byte in hexadecimal format, starting at location 0xABCD. If no starting address is given, the address specified in "set entry-point" is used. A register name, section name,

or symbol name may be given in place of a starting address. Aliases: e, dump [start] - Memory address to start from [register] - Memory dump begins at register contents [section] - Memory dump begins at section start [symbol] - Memory dump begins at symbol start [stop] - Memory address to stop dump [-num <num>] - Number of elements to dump (default: 20) [-size <value>] - Size of each element in bytes (default: 1) [-output <letter>] - Output format for each element (default: x) 'x' = hexadecimal 'o' = octal 'd' = decimal Example: examine -n 50 -s 1 -o x 0xABCD Dumps 50 elements each of size 1 byte in hexadecimal format, starting at location 0xABCD. If no starting address is given, the address specified in "set entry-point" is used. A register name, section name, or symbol name may be given in place of a starting address. Aliases: e, dump ald> help next next: Step one instruction, stepping over any subroutines Usage: next [num] [num] - number of instructions to step over (default: 1) Alias: n ald> help step step: Step one instruction, stepping into any subroutines Usage: step [num] [num] - number of instructions to step through (default: 1) Alias: s ald> help detach detach: Detach from current process

Usage: detach Detaches the debugger from the current process (see help attach) ald> help file file: Outputs specified information on current file Usage: file <header secinfo syminfo> header - Output information about the file's object header secinfo [name] - Output information about the file's sections. If [name] is given, output information about that specific section. syminfo [sym] - Output information about the file's symbols, if any. If [sym] is given, output information about that specific symbol. ald> help quit quit: Exit the debugger Usage: quit ald> help undisplay undisplay: Remove a display address Usage: undisplay <number all> number - number (can be obtained from "ldisplay") all - Delete all display addresses See also: display, ldisplay ald> help disassemble disassemble: Disassembles machine code into assembly language instructions Usage: disassemble [start [stop]] [-num <number>] [flags] [start [stop]] - Starting and stopping memory locations - All opcodes inside this range will be disassembled. For this to work, you must be working with an executable file. [-num <num>] - Number of instructions to disassemble (default: all) [flags] - Various flags Flags: -section <name> - disassemble specific section <name> - you can use the "file secinfo" command to get a list of available sections. The output of this command is as follows: <offset> <opcode> <instruction>

<offset> - Virtual offset from beginning of file, or memory address <opcode> - Machine language instruction <instruction> - Assembly language instruction Disassembly begins at the address specified by "set file-offset", unless a start/stop memory address is given. Alias: d ald> help help help: Displays commands, or gives specific help on commands Usage: help [optional commands] ald> help register register: Display and/or manipulate the process' registers Usage: register [-all] [name [value]] [-all] - display all registers [name] - name of a specific register [[value]] - if a name is given, it is set to this value With no arguments, the most common registers are displayed along with their values. ald> help unload unload: Unloads the current debug file from memory Usage: unload ald> help display display: Display memory after single steps Usage: display [start] [register] [section] [symbol] [stop] [-num <num>] [-size <value>] [-output <letter>] [start] - Memory address to start from [register] - Memory dump begins at register contents [section] - Memory dump begins at section start [symbol] - Memory dump begins at symbol start [stop] - Memory address to stop dump [-num <num>] - Number of elements to dump (default: 20) [-size <value>] - Size of each element in bytes (default: 1) [-output <letter>] - Output format for each element (default: x) 'x' = hexadecimal 'o' = octal 'd' = decimal Example: display -n 50 -s 1 -o x 0xABCD

After each single step, 50 bytes of memory starting at location 0xABCD will be printed. See also: ldisplay, undisplay ald> help ldisplay ldisplay: Print list of memory addresses to be displayed after single stepping Usage: ldisplay See also: display, undisplay ald> help run run: Start program from beginning Usage: run [arguments] [arguments] - runtime arguments to pass to program - if not supplied, the arguments given with "set args" are used. Alias: r Breakpoint related commands help break break: Set a breakpoint Usage: break <address symbol> <address> - This is the break address. It must be set at the first byte of the instruction where you wish to break. You can use the "disassemble" command to determine where a specific instruction begins. <symbol> - Alternatively, you can specify a debugging symbol such as the name of a function. The executable must have been compiled with debugging symbols enabled. ald> help lbreak lbreak: List all breakpoints Usage: lbreak ald> help dbreak dbreak: Delete a breakpoint Usage: dbreak <number all> all - Delete all breakpoints

Alias: delete ald> help tbreak tbreak: Set a temporary breakpoint Usage: tbreak <address> <address> - Breakpoint address A temporary breakpoint is cleared after the first time it is hit. ald> help disable disable: Disable a breakpoint Usage: disable <number all> all - Disable all breakpoints When a breakpoint is disabled, it has no effect until it is reactivated using the "enable" command. ald> help enable enable: Reenable a breakpoint Usage: enable <number all> all - Enable all breakpoints This reverses the effect of the "disable" command. ald> help ignore ignore: Set the ignore count for a breakpoint Usage: ignore <number> <count> count - New ignore count When a breakpoint has an ignore count set, it will not be triggered until it has been hit <count> times. ald>