Debugging with GDB the Gnu Source-Level Debugger

Total Page:16

File Type:pdf, Size:1020Kb

Debugging with GDB the Gnu Source-Level Debugger Debugging with GDB The gnu Source-Level Debugger Eighth Edition, for GDB version 5.0 March 2000 Richard Stallman, Roland Pesch, Stan Shebs, et al. (Send bugs and comments on GDB to [email protected].) Debugging with GDB TEXinfo 1999-09-25.10 Copyright c 1988-2000 Free Software Foundation, Inc. Published by the Free Software Foundation 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA ISBN 1-882114-77-9 Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies. Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided also that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. Permission is granted to copy and distribute translations of this manual into another lan- guage, under the above conditions for modified versions. i Table of Contents Summary of GDB............................. 1 Free software ................................................ 1 Contributors to GDB......................................... 1 1 A Sample GDB Session .................... 5 2 Getting In and Out of GDB ................ 9 2.1 Invoking GDB .......................................... 9 2.1.1 Choosing files ................................. 10 2.1.2 Choosing modes ............................... 11 2.2 Quitting GDB ......................................... 13 2.3 Shell commands ........................................ 13 3 GDB Commands ......................... 15 3.1 Command syntax ...................................... 15 3.2 Command completion .................................. 15 3.3 Getting help ........................................... 17 4 Running Programs Under GDB ........... 21 4.1 Compiling for debugging ................................ 21 4.2 Starting your program .................................. 21 4.3 Your program's arguments .............................. 22 4.4 Your program's environment ............................ 23 4.5 Your program's working directory ....................... 24 4.6 Your program's input and output........................ 24 4.7 Debugging an already-running process ................... 25 4.8 Killing the child process ................................ 26 4.9 Debugging programs with multiple threads ............... 26 4.10 Debugging programs with multiple processes ............ 28 5 Stopping and Continuing .................. 31 5.1 Breakpoints, watchpoints, and catchpoints ............... 31 5.1.1 Setting breakpoints ............................ 32 5.1.2 Setting watchpoints ............................ 35 5.1.3 Setting catchpoints ............................ 37 5.1.4 Deleting breakpoints ........................... 38 5.1.5 Disabling breakpoints .......................... 39 5.1.6 Break conditions............................... 40 5.1.7 Breakpoint command lists ...................... 41 5.1.8 Breakpoint menus ............................. 42 5.1.9 \Cannot insert breakpoints" .................... 43 ii Debugging with GDB 5.2 Continuing and stepping ................................ 44 5.3 Signals ................................................ 46 5.4 Stopping and starting multi-thread programs ............. 48 6 Examining the Stack ...................... 51 6.1 Stack frames ........................................... 51 6.2 Backtraces............................................. 52 6.3 Selecting a frame ....................................... 53 6.4 Information about a frame .............................. 54 7 Examining Source Files ................... 55 7.1 Printing source lines .................................... 55 7.2 Searching source files ................................... 56 7.3 Specifying source directories ............................ 57 7.4 Source and machine code ............................... 57 8 Examining Data .......................... 61 8.1 Expressions ............................................ 61 8.2 Program variables ...................................... 62 8.3 Artificial arrays ........................................ 63 8.4 Output formats ........................................ 64 8.5 Examining memory..................................... 65 8.6 Automatic display...................................... 66 8.7 Print settings .......................................... 68 8.8 Value history .......................................... 73 8.9 Convenience variables .................................. 74 8.10 Registers ............................................. 75 8.11 Floating point hardware ............................... 76 9 Using GDB with Different Languages ...... 77 9.1 Switching between source languages ..................... 77 9.1.1 List of filename extensions and languages ........ 77 9.1.2 Setting the working language ................... 78 9.1.3 Having GDB infer the source language .......... 78 9.2 Displaying the language ................................ 78 9.3 Type and range checking................................ 79 9.3.1 An overview of type checking ................... 79 9.3.2 An overview of range checking .................. 80 9.4 Supported languages ................................... 81 9.4.1 C and C++ .................................... 81 9.4.1.1 C and C++ operators .................. 82 9.4.1.2 C and C++ constants .................. 83 9.4.1.3 C++ expressions ....................... 84 9.4.1.4 C and C++ defaults ................... 85 9.4.1.5 C and C++ type and range checks ...... 85 9.4.1.6 GDB and C .......................... 86 9.4.1.7 GDB features for C++ ................. 86 iii 9.4.2 Modula-2 ..................................... 87 9.4.2.1 Operators ............................ 87 9.4.2.2 Built-in functions and procedures ...... 89 9.4.2.3 Constants ............................ 90 9.4.2.4 Modula-2 defaults ..................... 90 9.4.2.5 Deviations from standard Modula-2 .... 90 9.4.2.6 Modula-2 type and range checks........ 91 9.4.2.7 The scope operators :: and . .......... 91 9.4.2.8 GDB and Modula-2 ................... 91 9.4.3 Chill.......................................... 92 9.4.3.1 How modes are displayed .............. 92 9.4.3.2 Locations and their accesses ........... 94 9.4.3.3 Values and their Operations ........... 94 9.4.3.4 Chill type and range checks ............ 96 9.4.3.5 Chill defaults ......................... 97 10 Examining the Symbol Table ............. 99 11 Altering Execution ..................... 103 11.1 Assignment to variables .............................. 103 11.2 Continuing at a different address ...................... 104 11.3 Giving your program a signal ......................... 105 11.4 Returning from a function ............................ 105 11.5 Calling program functions ............................ 106 11.6 Patching programs ................................... 106 12 GDB Files ............................. 107 12.1 Commands to specify files ............................ 107 12.2 Errors reading symbol files ............................ 111 13 Specifying a Debugging Target .......... 113 13.1 Active targets........................................ 113 13.2 Commands for managing targets ...................... 113 13.3 Choosing target byte order............................ 115 13.4 Remote debugging ................................... 115 13.4.1 The GDB remote serial protocol .............. 116 13.4.1.1 What the stub can do for you ........ 117 13.4.1.2 What you must do for the stub ...... 117 13.4.1.3 Putting it all together ............... 119 13.4.1.4 Communication protocol ............ 120 13.4.1.5 Using the gdbserver program ....... 132 13.4.1.6 Using the gdbserve.nlm program .... 133 13.5 Kernel Object Display ................................ 134 iv Debugging with GDB 14 Configuration-Specific Information....... 135 14.1 Native .............................................. 135 14.1.1 HP-UX ..................................... 135 14.1.2 SVR4 process information .................... 135 14.2 Embedded Operating Systems......................... 136 14.2.1 Using GDB with VxWorks ................... 136 14.2.1.1 Connecting to VxWorks ............. 136 14.2.1.2 VxWorks download ................. 137 14.2.1.3 Running tasks ...................... 137 14.3 Embedded Processors ................................ 138 14.3.1 AMD A29K Embedded ...................... 138 14.3.1.1 A29K UDI ......................... 138 14.3.1.2 EBMON protocol for AMD29K ...... 138 14.3.1.3 Communications setup .............. 138 14.3.1.4 EB29K cross-debugging ............. 140 14.3.1.5 Remote log ......................... 140 14.3.2 ARM ....................................... 140 14.3.3 Hitachi H8/300.............................. 141 14.3.3.1 Connecting to Hitachi boards ........ 141 14.3.3.2 Using the E7000 in-circuit emulator .. 143 14.3.3.3 Special GDB commands for Hitachi micros ........................................ 143 14.3.4 H8/500 ..................................... 143 14.3.5 Intel i960 ................................... 143 14.3.5.1 Startup with Nindy ................. 144 14.3.5.2 Options for Nindy .................. 144 14.3.5.3 Nindy reset command ............... 145 14.3.6 Mitsubishi M32R/D ......................... 145 14.3.7 M68k ....................................... 145 14.3.8 M88K ...................................... 145 14.3.9 MIPS Embedded ............................ 146 14.3.10 PowerPC .................................. 147 14.3.11 HP PA Embedded .......................... 148 14.3.12 Hitachi SH
Recommended publications
  • The Birth, Evolution and Future of Microprocessor
    The Birth, Evolution and Future of Microprocessor Swetha Kogatam Computer Science Department San Jose State University San Jose, CA 95192 408-924-1000 [email protected] ABSTRACT timed sequence through the bus system to output devices such as The world's first microprocessor, the 4004, was co-developed by CRT Screens, networks, or printers. In some cases, the terms Busicom, a Japanese manufacturer of calculators, and Intel, a U.S. 'CPU' and 'microprocessor' are used interchangeably to denote the manufacturer of semiconductors. The basic architecture of 4004 same device. was developed in August 1969; a concrete plan for the 4004 The different ways in which microprocessors are categorized are: system was finalized in December 1969; and the first microprocessor was successfully developed in March 1971. a) CISC (Complex Instruction Set Computers) Microprocessors, which became the "technology to open up a new b) RISC (Reduced Instruction Set Computers) era," brought two outstanding impacts, "power of intelligence" and "power of computing". First, microprocessors opened up a new a) VLIW(Very Long Instruction Word Computers) "era of programming" through replacing with software, the b) Super scalar processors hardwired logic based on IC's of the former "era of logic". At the same time, microprocessors allowed young engineers access to "power of computing" for the creative development of personal 2. BIRTH OF THE MICROPROCESSOR computers and computer games, which in turn led to growth in the In 1970, Intel introduced the first dynamic RAM, which increased software industry, and paved the way to the development of high- IC memory by a factor of four.
    [Show full text]
  • Oral History Panel on the Development and Promotion of the Zilog Z8000 Microprocessor
    Oral History Panel on the Development and Promotion of the Zilog Z8000 Microprocessor Moderator: Michael Slater Panelists: Federico Faggin Bernard Peuto Masatoshi Shima Ralph Ungermann Recorded: April 27, 2007 Mountain View, California CHM Reference number: X4022.2007 © 2007 Computer History Museum Michael Slater: We have with us today [April 27, 2007] four people who were involved in its [Zilog Z8000 microprocessor] creation: Ralph Ungermann, Bernard Peuto, Federico Faggin, and Masatoshi Shima. We’ve heard about the backgrounds from Shima-san, Federico and Ralph in the previous tape [oral history by the Z80 team], so we’ll start with Bernard. Could you tell us about your educational background, your experience before you came to this project? Bernard Peuto: Yes. I was born in France where I got an engineering education in radio and in computers in 1967 and 1968. I came to Berkeley to do a Ph.D. In 1969, I had my Master of Arts from Berkeley in computer science and I passed my prelim. I went back to do my military duties and then I came back and got a Ph.D. in computer science in 1974. My dissertation was about memory protection, which will come back as a subject later. As my first job I joined Amdahl Corporation from 1973 to 1976. The reason I joined Amdahl Corporation was that Charlie Bass was sharing an office with me when he was an assistant professor at Berkeley and I was a Ph.D. student and Charlie Bass had a good friend of his that was working at Fujitsu so through that connection I was hired as a computer architect at Amdahl Corporation.
    [Show full text]
  • Appendix A: Microprocessor Data Sheets
    Appendix A: Microprocessor Data Sheets Intel8085 Zilog Z80 MOS Technology 6502 Motorola 6809 Microcontrollers (Single-chip Microcomputers) Intel 8086 ( & 80186 & 80286) Zilog Z8000 Motorola 68000 32-bit Microprocessors lnmos Transputer 184 Appendix A 185 Intel 8085 Followed on from the 8080, which was a two-chip equivalent of the 8085. Not used in any home computers, but was extremely popular in early (late 1970s) industrial control systems. A15-A8 A B c D E Same register AD7-ADO H L set is used in SP 8080 PC ALE Flags Multiplexed d ata bus and lower half of address bus (require 8212 to split data and address buses) Start addresses of Interrupt P/Os Service Routines: 8155- 3 ports, 256 bytes RAM RESET-()()()(J 8255 - 3 ports TRAP- 0024 8355 - 2 ports, 2K ROM RST5.5- 002C 8755 - 2 ports, 2K EPROM RST6.5 - ()(J34 RST7.5- <XJ3C INTR - from interrupting device Other 8251- USART 8202 - Dynamic RAM controller support 8253- CTC (3 counters) 8257 - DMA controller devices: 8271 - FDC 8257 - CRT controller Intel DMA Control System Character CPU buses­ de-multiplexed Video signal to CRT 186 Microcomputer Fault-finding and Design Zilog Z80 Probably the most popular 8-bit microprocessor. Used in home computers (Spectrum, Amstrad, Tandy), office computers and industrial controllers. A F A' F' B c B' C' D E D' E' H L H' L' 8 data Interrupt Memory lines vector I refresh R Index register IX Index register IY (to refresh dynamic RAMI Stack pointer Based on the Intel 8085, but possesses second set of registers.
    [Show full text]
  • Programmable Digital Microcircuits - a Survey with Examples of Use
    - 237 - PROGRAMMABLE DIGITAL MICROCIRCUITS - A SURVEY WITH EXAMPLES OF USE C. Verkerk CERN, Geneva, Switzerland 1. Introduction For most readers the title of these lecture notes will evoke microprocessors. The fixed instruction set microprocessors are however not the only programmable digital mi• crocircuits and, although a number of pages will be dedicated to them, the aim of these notes is also to draw attention to other useful microcircuits. A complete survey of programmable circuits would fill several books and a selection had therefore to be made. The choice has rather been to treat a variety of devices than to give an in- depth treatment of a particular circuit. The selected devices have all found useful ap• plications in high-energy physics, or hold promise for future use. The microprocessor is very young : just over eleven years. An advertisement, an• nouncing a new era of integrated electronics, and which appeared in the November 15, 1971 issue of Electronics News, is generally considered its birth-certificate. The adver• tisement was for the Intel 4004 and its three support chips. The history leading to this announcement merits to be recalled. Intel, then a very young company, was working on the design of a chip-set for a high-performance calculator, for and in collaboration with a Japanese firm, Busicom. One of the Intel engineers found the Busicom design of 9 different chips too complicated and tried to find a more general and programmable solu• tion. His design, the 4004 microprocessor, was finally adapted by Busicom, and after further négociation, Intel acquired marketing rights for its new invention.
    [Show full text]
  • 2.19 Historical Perspective and Further Reading 2.19
    2.19 Historical Perspective and Further Reading 2.19 This section surveys the history of instruction set architraves over time, and we give a short history of programming languages and compilers. ISAs include accu- mulator architectures, general-purpose register architectures, stack architectures, and a brief history of the IA-32. We also review the controversial subjects of high- level-language computer architectures and reduced instruction set computer architectures. The history of programming languages includes Fortran, Lisp, Algol, C, Cobol, Pascal, Simula, Smalltalk, C++, and Java, and the history of com- pilers includes the key milestones and the pioneers who achieved them. Accumulator Architectures accumulator:Archaic term for register. On-line use of it Hardware was precious in the earliest stored-program computers. Consequently, as a synonym for “register” is computer pioneers could not afford the number of registers found in today’s a fairly reliable indication machines. In fact, these machines had a single register for arithmetic instructions. that the user has been Since all operations would accumulate in a single register, it was called the accu- around quite a while. mulator, and this style of instruction set is given the same name. For example, EDSAC in 1949 had a single accumulator. Eric Raymond, The New The three-operand format of MIPS suggests that a single register is at least two Hacker’s Dictionary, 1991 registers shy of our needs. Having the accumulator as both a source operand and as the destination of the operation fills part of the shortfall, but it still leaves us one operand short. That final operand is found in memory.
    [Show full text]
  • Extracting and Mapping Industry 4.0 Technologies Using Wikipedia
    Computers in Industry 100 (2018) 244–257 Contents lists available at ScienceDirect Computers in Industry journal homepage: www.elsevier.com/locate/compind Extracting and mapping industry 4.0 technologies using wikipedia T ⁎ Filippo Chiarelloa, , Leonello Trivellib, Andrea Bonaccorsia, Gualtiero Fantonic a Department of Energy, Systems, Territory and Construction Engineering, University of Pisa, Largo Lucio Lazzarino, 2, 56126 Pisa, Italy b Department of Economics and Management, University of Pisa, Via Cosimo Ridolfi, 10, 56124 Pisa, Italy c Department of Mechanical, Nuclear and Production Engineering, University of Pisa, Largo Lucio Lazzarino, 2, 56126 Pisa, Italy ARTICLE INFO ABSTRACT Keywords: The explosion of the interest in the industry 4.0 generated a hype on both academia and business: the former is Industry 4.0 attracted for the opportunities given by the emergence of such a new field, the latter is pulled by incentives and Digital industry national investment plans. The Industry 4.0 technological field is not new but it is highly heterogeneous (actually Industrial IoT it is the aggregation point of more than 30 different fields of the technology). For this reason, many stakeholders Big data feel uncomfortable since they do not master the whole set of technologies, they manifested a lack of knowledge Digital currency and problems of communication with other domains. Programming languages Computing Actually such problem is twofold, on one side a common vocabulary that helps domain experts to have a Embedded systems mutual understanding is missing Riel et al. [1], on the other side, an overall standardization effort would be IoT beneficial to integrate existing terminologies in a reference architecture for the Industry 4.0 paradigm Smit et al.
    [Show full text]
  • Using As the Gnu Assembler
    Using as The gnu Assembler Version 2.14.90.0.7 The Free Software Foundation Inc. thanks The Nice Computer Company of Australia for loaning Dean Elsner to write the first (Vax) version of as for Project gnu. The proprietors, management and staff of TNCCA thank FSF for distracting the boss while they got some work done. Dean Elsner, Jay Fenlason & friends Using as Edited by Cygnus Support Copyright c 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001, 2002 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled \GNU Free Documentation License". Chapter 1: Overview 1 1 Overview This manual is a user guide to the gnu assembler as. Here is a brief summary of how to invoke as. For details, see Chapter 2 [Command-Line Options], page 15. as [-a[cdhlns][=file]] [-D][{defsym sym=val] [-f][{gstabs][{gstabs+] [{gdwarf2][{help] [-I dir][-J][-K][-L] [{listing-lhs-width=NUM][{listing-lhs-width2=NUM] [{listing-rhs-width=NUM][{listing-cont-lines=NUM] [{keep-locals][-o objfile][-R][{statistics][-v] [-version][{version][-W][{warn][{fatal-warnings] [-w][-x][-Z][{target-help][target-options] [{|files ...] Target Alpha options: [-mcpu] [-mdebug | -no-mdebug] [-relax][-g][-Gsize] [-F][-32addr] Target ARC options: [-marc[5|6|7|8]] [-EB|-EL] Target ARM
    [Show full text]
  • Using As the Gnu Assembler
    Using as The gnu Assembler Version 2.14 The Free Software Foundation Inc. thanks The Nice Computer Company of Australia for loaning Dean Elsner to write the first (Vax) version of as for Project gnu. The proprietors, management and staff of TNCCA thank FSF for distracting the boss while they got some work done. Dean Elsner, Jay Fenlason & friends Using as Edited by Cygnus Support Copyright °c 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001, 2002 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled “GNU Free Documentation License”. Chapter 1: Overview 1 1 Overview This manual is a user guide to the gnu assembler as. Here is a brief summary of how to invoke as. For details, see Chapter 2 [Command-Line Options], page 15. as [-a[cdhlns][=file]] [-D][–defsym sym=val] [-f][–gstabs][–gdwarf2][–help][-I dir] [-J][-K][-L] [–listing-lhs-width=NUM][–listing-lhs-width2=NUM] [–listing-rhs-width=NUM][–listing-cont-lines=NUM] [–keep-locals][-o objfile][-R][–statistics][-v] [-version][–version][-W][–warn][–fatal-warnings] [-w][-x][-Z][–target-help][target-options] [–|files ...] Target Alpha options: [-mcpu] [-mdebug | -no-mdebug] [-relax][-g][-Gsize] [-F][-32addr] Target ARC options: [-marc[5|6|7|8]] [-EB|-EL] Target ARM options: [-mcpu=processor[+extension...]]
    [Show full text]
  • Gnu Assembler
    Using as The gnu Assembler January 1994 The Free Software Foundation Inc. thanks The Nice Computer Company of Australia for loaning Dean Elsner to write the first (Vax) version of as for Project gnu. The proprietors, management and staff of TNCCA thank FSF for distracting the boss while they got some work done. Dean Elsner, Jay Fenlason & friends Using as Edited by Cygnus Support Copyright c 1991, 92, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies. Permission is granted to copy and distribute modified versions of this manual under the con- ditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. Permission is granted to copy and distribute translations of this manual into another lan- guage, under the above conditions for modified versions. Chapter 1: Overview 1 1 Overview This manual is a user guide to the gnu assembler as. Here is a brief summary of how to invoke as. For details, see Chapter 2 [Comand-Line Options], page 9. as [ -a[cdhlns][=file] ] [ -D ] [ --defsym sym=val ] [ -f ] [ --gstabs ] [ --help ] [ -I dir ] [ -J ] [ -K ] [ -L ] [ --keep-locals ] [ -o objfile ] [ -R ] [ --statistics ] [ -v ] [ -version ] [ --version ] [ -W ] [ -w ] [ -x ] [ -Z ] [ -mbig-endian | -mlittle-endian ] [ -m[arm]1 | -m[arm]2 | -m[arm]250 | -m[arm]3 | -m[arm]6 | -m[arm]7[t][[d]m[i]] ] [ -m[arm]v2 | -m[arm]v2a | -m[arm]v3 | -m[arm]v3m | -m[arm]v4 | -m[arm]v4t ] [ -mthumb | -mall ] [ -mfpa10 | -mfpa11 | -mfpe-old | -mno-fpu ] [ -EB | -EL ] [ -mapcs-32 | -mapcs-26 ] [ -O ] [ -Av6 | -Av7 | -Av8 | -Asparclet | -Asparclite -Av8plus | -Av8plusa | -Av9 | -Av9a ] [ -xarch=v8plus | -xarch=v8plusa ] [ -bump ] [ -32 | -64 ] [ -ACA | -ACA_A | -ACB | -ACC | -AKA | -AKB | -AKC | -AMC ] [ -b ] [ -no-relax ] [ -l ] [ -m68000 | -m68010 | -m68020 | ..
    [Show full text]
  • Debugging with GDB the Gnu Source-Level Debugger
    Debugging with GDB The gnu Source-Level Debugger Ninth Edition, for GDB version 5.3 December 2001 Richard Stallman, Roland Pesch, Stan Shebs, et al. (Send bugs and comments on GDB to [email protected].) Debugging with GDB TEXinfo 2002-06-04.06 Copyright c 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Published by the Free Software Foundation 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA ISBN 1-882114-77-9 Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the Invariant Sections being \Free Software" and \Free Software Needs Free Documentation", with the Front-Cover Texts being \A GNU Manual," and with the Back-Cover Texts as in (a) below. (a) The Free Software Foundation's Back-Cover Text is: \You have freedom to copy and modify this GNU Manual, like GNU software. Copies published by the Free Software Foundation raise funds for GNU development." i Table of Contents Summary of GDB............................. 1 Free software ................................................ 1 Free Software Needs Free Documentation ...................... 1 Contributors to GDB......................................... 3 1 A Sample GDB Session .................... 7 2 Getting In and Out of GDB ............... 11 2.1 Invoking GDB ......................................... 11 2.1.1 Choosing files ................................. 12 2.1.2 Choosing modes ............................... 13 2.2 Quitting GDB ......................................... 15 2.3 Shell commands ........................................ 15 3 GDB Commands ......................... 17 3.1 Command syntax ...................................... 17 3.2 Command completion .................................
    [Show full text]
  • In Addition to This Innovation, Zilog Also Came up with Another
    HISTORY OF THE MICROPROCESSOR/APPLICATION o^ In addition to this innovation, Zilog also came Yet a further boost came in the UK when Acorn up with another important commercial advantage, produced its BBC Micro, also based on this chip. Whereas the Intel chip depended on a special The BBC had originally specified a Z80, but no clock generator chip as well as a system controller British manufacturer was able to come up with a :hip, the Zilog team managed to combine all the suitable design in the time limit set. logic needed for a microprocessor-based Chip Count computer onto a single chip. Even though it was Sophisticated chips reduce the relatively expensive, the fact that it could replace number ct chips needed on a circuit board. When Apple several other chips made it very attractive to upgraded the Apple II, the new manufacturers. Ile iersion had half the number Although the 6800 had not fared well of major chips compared with the 8080, it was still popular among some designers and programmers. Motorola eventually designed a highly sophisticated eight-bit microprocessor called the 6809 that enhanced the 6800. Unfortunately, by the time the 6809 hit the market, a rival company called MOS Technology had come out with a further 6800 enhancement called the 6502. This is the most popular of a number of processors known as the 6500 series. All the members of this series use the same instruction set, but differ in their power and capabilities. MOS Technology's 6502 follows a design philosophy very close in spirit to Motorola's 6800, While the 6502 chip established its dominance but it is not compatible with the 6800 either in of eight-bit computer design, 16-bit computers terms of hardware requirements, or software began to appear on the market.
    [Show full text]
  • Debugging with Gdb the Gnu Source-Level Debugger
    Debugging with gdb The gnu Source-Level Debugger Ninth Edition, for gdb version 6.8.50.20090520 PACKAGE (GDB) Richard Stallman, Roland Pesch, Stan Shebs, et al. (Send bugs and comments on gdb to http://www.gnu.org/software/gdb/bugs/.) Debugging with gdb TEXinfo 2003-02-03.16 Published by the Free Software Foundation 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA ISBN 1-882114-77-9 Copyright c 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the Invariant Sections being “Free Software” and “Free Software Needs Free Documentation”, with the Front-Cover Texts being “A GNU Manual,” and with the Back-Cover Texts as in (a) below. (a) The FSF’s Back-Cover Text is: “You are free to copy and modify this GNU Man- ual. Buying copies from GNU Press supports the FSF in developing GNU and promoting software freedom.” This edition of the GDB manual is dedicated to the memory of Fred Fish. Fred was a long-standing contributor to GDB and to Free software in general. We will miss him. i Table of Contents ii Debugging with gdb Summary of gdb 1 Summary of gdb The purpose of a debugger such as gdb is to allow you to see what is going on “inside” another program while it executes—or what another program was doing at the moment it crashed.
    [Show full text]