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 Tenth Edition, for gdb version 8.0.50.20171128-git (GNU Tools for Arm Embedded Processors 7-2017-q4-major) 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 2013-09-11.11 Published by the Free Software Foundation 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA ISBN 978-0-9831592-3-0 Copyright c 1988-2017 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.3 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." 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.1.3 What gdb Does During Startup :::::::::::::::::::::::::: 16 2.2 Quitting gdb ::::::::::::::::::::::::::::::::::::::::::::::::: 17 2.3 Shell Commands :::::::::::::::::::::::::::::::::::::::::::::: 17 2.4 Logging Output ::::::::::::::::::::::::::::::::::::::::::::::: 18 3 gdb Commands :::::::::::::::::::::::::::::::: 19 3.1 Command Syntax ::::::::::::::::::::::::::::::::::::::::::::: 19 3.2 Command Completion :::::::::::::::::::::::::::::::::::::::: 19 3.3 Getting Help :::::::::::::::::::::::::::::::::::::::::::::::::: 22 4 Running Programs Under gdb ::::::::::::::: 25 4.1 Compiling for Debugging :::::::::::::::::::::::::::::::::::::: 25 4.2 Starting your Program :::::::::::::::::::::::::::::::::::::::: 26 4.3 Your Program's Arguments ::::::::::::::::::::::::::::::::::: 30 4.4 Your Program's Environment:::::::::::::::::::::::::::::::::: 30 4.5 Your Program's Working Directory :::::::::::::::::::::::::::: 31 4.6 Your Program's Input and Output :::::::::::::::::::::::::::: 32 4.7 Debugging an Already-running Process :::::::::::::::::::::::: 33 4.8 Killing the Child Process :::::::::::::::::::::::::::::::::::::: 34 4.9 Debugging Multiple Inferiors and Programs:::::::::::::::::::: 34 4.10 Debugging Programs with Multiple Threads :::::::::::::::::: 37 4.11 Debugging Forks ::::::::::::::::::::::::::::::::::::::::::::: 41 4.12 Setting a Bookmark to Return to Later::::::::::::::::::::::: 43 4.12.1 A Non-obvious Benefit of Using Checkpoints::::::::::::: 45 ii Debugging with gdb 5 Stopping and Continuing ::::::::::::::::::::: 47 5.1 Breakpoints, Watchpoints, and Catchpoints ::::::::::::::::::: 47 5.1.1 Setting Breakpoints :::::::::::::::::::::::::::::::::::::: 48 5.1.2 Setting Watchpoints:::::::::::::::::::::::::::::::::::::: 54 5.1.3 Setting Catchpoints :::::::::::::::::::::::::::::::::::::: 56 5.1.4 Deleting Breakpoints ::::::::::::::::::::::::::::::::::::: 61 5.1.5 Disabling Breakpoints :::::::::::::::::::::::::::::::::::: 62 5.1.6 Break Conditions::::::::::::::::::::::::::::::::::::::::: 63 5.1.7 Breakpoint Command Lists :::::::::::::::::::::::::::::: 64 5.1.8 Dynamic Printf :::::::::::::::::::::::::::::::::::::::::: 66 5.1.9 How to save breakpoints to a file ::::::::::::::::::::::::: 67 5.1.10 Static Probe Points ::::::::::::::::::::::::::::::::::::: 67 5.1.11 \Cannot insert breakpoints"::::::::::::::::::::::::::::: 69 5.1.12 \Breakpoint address adjusted..." :::::::::::::::::::::::: 69 5.2 Continuing and Stepping :::::::::::::::::::::::::::::::::::::: 70 5.3 Skipping Over Functions and Files :::::::::::::::::::::::::::: 73 5.4 Signals:::::::::::::::::::::::::::::::::::::::::::::::::::::::: 76 5.5 Stopping and Starting Multi-thread Programs ::::::::::::::::: 79 5.5.1 All-Stop Mode ::::::::::::::::::::::::::::::::::::::::::: 79 5.5.2 Non-Stop Mode :::::::::::::::::::::::::::::::::::::::::: 80 5.5.3 Background Execution ::::::::::::::::::::::::::::::::::: 81 5.5.4 Thread-Specific Breakpoints :::::::::::::::::::::::::::::: 82 5.5.5 Interrupted System Calls ::::::::::::::::::::::::::::::::: 83 5.5.6 Observer Mode::::::::::::::::::::::::::::::::::::::::::: 84 6 Running programs backward ::::::::::::::::: 87 7 Recording Inferior's Execution and Replaying It :::::::::::::::::::::::::::::::::::::::::::::: 89 8 Examining the Stack :::::::::::::::::::::::::: 97 8.1 Stack Frames ::::::::::::::::::::::::::::::::::::::::::::::::: 97 8.2 Backtraces :::::::::::::::::::::::::::::::::::::::::::::::::::: 98 8.3 Selecting a Frame :::::::::::::::::::::::::::::::::::::::::::: 100 8.4 Information About a Frame :::::::::::::::::::::::::::::::::: 101 8.5 Management of Frame Filters.:::::::::::::::::::::::::::::::: 102 iii 9 Examining Source Files :::::::::::::::::::::: 105 9.1 Printing Source Lines :::::::::::::::::::::::::::::::::::::::: 105 9.2 Specifying a Location :::::::::::::::::::::::::::::::::::::::: 106 9.2.1 Linespec Locations :::::::::::::::::::::::::::::::::::::: 106 9.2.2 Explicit Locations::::::::::::::::::::::::::::::::::::::: 107 9.2.3 Address Locations::::::::::::::::::::::::::::::::::::::: 108 9.3 Editing Source Files:::::::::::::::::::::::::::::::::::::::::: 108 9.3.1 Choosing your Editor ::::::::::::::::::::::::::::::::::: 109 9.4 Searching Source Files ::::::::::::::::::::::::::::::::::::::: 109 9.5 Specifying Source Directories ::::::::::::::::::::::::::::::::: 109 9.6 Source and Machine Code :::::::::::::::::::::::::::::::::::: 112 10 Examining Data::::::::::::::::::::::::::::: 117 10.1 Expressions ::::::::::::::::::::::::::::::::::::::::::::::::: 119 10.2 Ambiguous Expressions ::::::::::::::::::::::::::::::::::::: 120 10.3 Program Variables :::::::::::::::::::::::::::::::::::::::::: 121 10.4 Artificial Arrays :::::::::::::::::::::::::::::::::::::::::::: 124 10.5 Output Formats :::::::::::::::::::::::::::::::::::::::::::: 124 10.6 Examining Memory ::::::::::::::::::::::::::::::::::::::::: 126 10.7 Automatic Display :::::::::::::::::::::::::::::::::::::::::: 128 10.8 Print Settings::::::::::::::::::::::::::::::::::::::::::::::: 130 10.9 Pretty Printing ::::::::::::::::::::::::::::::::::::::::::::: 138 10.9.1 Pretty-Printer Introduction :::::::::::::::::::::::::::: 138 10.9.2 Pretty-Printer Example :::::::::::::::::::::::::::::::: 139 10.9.3 Pretty-Printer Commands:::::::::::::::::::::::::::::: 139 10.10 Value History:::::::::::::::::::::::::::::::::::::::::::::: 140 10.11 Convenience Variables ::::::::::::::::::::::::::::::::::::: 141 10.12 Convenience Functions::::::::::::::::::::::::::::::::::::: 144 10.13 Registers :::::::::::::::::::::::::::::::::::::::::::::::::: 146 10.14 Floating Point Hardware::::::::::::::::::::::::::::::::::: 148 10.15 Vector Unit:::::::::::::::::::::::::::::::::::::::::::::::: 148 10.16 Operating System Auxiliary Information ::::::::::::::::::: 148 10.17 Memory Region Attributes::::::::::::::::::::::::::::::::: 150 10.17.1 Attributes :::::::::::::::::::::::::::::::::::::::::::: 151 10.17.1.1 Memory Access Mode :::::::::::::::::::::::::::: 151 10.17.1.2 Memory Access Size:::::::::::::::::::::::::::::: 152 10.17.1.3 Data Cache :::::::::::::::::::::::::::::::::::::: 152 10.17.2 Memory Access Checking ::::::::::::::::::::::::::::: 152 10.18 Copy Between Memory and a File ::::::::::::::::::::::::: 152 10.19 How to Produce a Core File from Your Program ::::::::::: 153 10.20 Character Sets::::::::::::::::::::::::::::::::::::::::::::: 154 10.21 Caching Data of Targets ::::::::::::::::::::::::::::::::::: 157 10.22 Search Memory :::::::::::::::::::::::::::::::::::::::::::: 158 10.23 Value Sizes :::::::::::::::::::::::::::::::::::::::::::::::: 159 11 Debugging Optimized Code :::::::::::::::: 161 11.1 Inline Functions :::::::::::::::::::::::::::::::::::::::::::: 161 11.2 Tail Call Frames :::::::::::::::::::::::::::::::::::::::::::: 162 iv Debugging with gdb 12 C Preprocessor Macros::::::::::::::::::::: 165 13 Tracepoints :::::::::::::::::::::::::::::::::: 169 13.1 Commands to Set Tracepoints :::::::::::::::::::::::::::::: 169 13.1.1 Create and Delete Tracepoints ::::::::::::::::::::::::: 170 13.1.2 Enable and Disable Tracepoints :::::::::::::::::::::::: 172 13.1.3 Tracepoint Passcounts ::::::::::::::::::::::::::::::::: 172 13.1.4 Tracepoint Conditions:::::::::::::::::::::::::::::::::: 173 13.1.5 Trace State Variables :::::::::::::::::::::::::::::::::: 173 13.1.6 Tracepoint Action Lists :::::::::::::::::::::::::::::::: 174 13.1.7 Listing Tracepoints :::::::::::::::::::::::::::::::::::: 176 13.1.8 Listing Static Tracepoint Markers :::::::::::::::::::::: 177 13.1.9 Starting and Stopping Trace Experiments :::::::::::::: 178 13.1.10 Tracepoint Restrictions ::::::::::::::::::::::::::::::: 180 13.2 Using the Collected Data ::::::::::::::::::::::::::::::::::: 181 13.2.1 tfind n:::::::::::::::::::::::::::::::::::::::::::::::: 181 13.2.2 tdump:::::::::::::::::::::::::::::::::::::::::::::::::: 183 13.2.3 save tracepoints filename ::::::::::::::::::::::::::: 184 13.3 Convenience Variables
Recommended publications
  • Screenshot Showcase 1
    Volume 125 June, 2017 VirtualBox: Going Retro On PCLinuxOS Inkscape Tutorial: Creating Tiled Clones, Part Three An Un-feh-gettable Image Viewer Game Zone: Sunless Sea PCLinuxOS Family Member Spotlight: arjaybe GOG's Gems: Star Trek 25th Anniversary Tip Top Tips: HDMI Sound On Encrypt VirtualBox Virtual Machines PCLinuxOS Recipe Corner PCLinuxOS Magazine And more inside ... Page 1 In This Issue... 3 From The Chief Editor's Desk... Disclaimer 4 Screenshot Showcase 1. All the contents of The PCLinuxOS Magazine are only for general information and/or use. Such contents do not constitute advice 5 An Un-feh-gettable Image Viewer and should not be relied upon in making (or refraining from making) any decision. Any specific advice or replies to queries in any part of the magazine is/are the person opinion of such 8 Screenshot Showcase experts/consultants/persons and are not subscribed to by The PCLinuxOS Magazine. 9 Inkscape Tutorial: Create Tiled Clones, Part Three 2. The information in The PCLinuxOS Magazine is provided on an "AS IS" basis, and all warranties, expressed or implied of any kind, regarding any matter pertaining to any information, advice 11 ms_meme's Nook: Root By Our Side or replies are disclaimed and excluded. 3. The PCLinuxOS Magazine and its associates shall not be liable, 12 PCLinuxOS Recipe Corner: Skillet Chicken With Orzo & Olives at any time, for damages (including, but not limited to, without limitation, damages of any kind) arising in contract, rot or otherwise, from the use of or inability to use the magazine, or any 13 VirtualBox: Going Retro On PCLinuxOS of its contents, or from any action taken (or refrained from being taken) as a result of using the magazine or any such contents or for any failure of performance, error, omission, interruption, 30 Screenshot Showcase deletion, defect, delay in operation or transmission, computer virus, communications line failure, theft or destruction or unauthorized access to, alteration of, or use of information 31 Tip Top Tips: HDMI Sound On contained on the magazine.
    [Show full text]
  • DOS Virtualized in the Linux Kernel
    DOS Virtualized in the Linux Kernel Robert T. Johnson, III Abstract Due to the heavy dominance of Microsoft Windows® in the desktop market, some members of the software industry believe that new operating systems must be able to run Windows® applications to compete in the marketplace. However, running applications not native to the operating system generally causes their performance to degrade significantly. When the application and the operating system were written to run on the same machine architecture, all of the instructions in the application can still be directly executed under the new operating system. Some will only need to be interpreted differently to provide the required functionality. This paper investigates the feasibility and potential to speed up the performance of such applications by including the support needed to run them directly in the kernel. In order to avoid the impact to the kernel when these applications are not running, the needed support was built as a loadable kernel module. 1 Introduction New operating systems face significant challenges in gaining consumer acceptance in the desktop marketplace. One of the first realizations that must be made is that the majority of this market consists of non-technical users who are unlikely to either understand or have the desire to understand various technical details about why the new operating system is “better” than a competitor’s. This means that such details are extremely unlikely to sway a large amount of users towards the operating system by themselves. The incentive for a consumer to continue using their existing operating system or only upgrade to one that is backwards compatible is also very strong due to the importance of application software.
    [Show full text]
  • Open WATCOM Programmer's Guide
    this document downloaded from... Use of this document the wings of subject to the terms and conditions as flight in an age stated on the website. of adventure for more downloads visit our other sites Positive Infinity and vulcanhammer.net chet-aero.com Watcom FORTRAN 77 Programmer's Guide Version 1.8 Notice of Copyright Copyright 2002-2008 the Open Watcom Contributors. Portions Copyright 1984-2002 Sybase, Inc. and its subsidiaries. All rights reserved. Any part of this publication may be reproduced, transmitted, or translated in any form or by any means, electronic, mechanical, manual, optical, or otherwise, without the prior written permission of anyone. For more information please visit http://www.openwatcom.org/ Portions of this manual are reprinted with permission from Tenberry Software, Inc. ii Preface The Watcom FORTRAN 77 Programmer's Guide includes the following major components: · DOS Programming Guide · The DOS/4GW DOS Extender · Windows 3.x Programming Guide · Windows NT Programming Guide · OS/2 Programming Guide · Novell NLM Programming Guide · Mixed Language Programming · Common Problems Acknowledgements This book was produced with the Watcom GML electronic publishing system, a software tool developed by WATCOM. In this system, writers use an ASCII text editor to create source files containing text annotated with tags. These tags label the structural elements of the document, such as chapters, sections, paragraphs, and lists. The Watcom GML software, which runs on a variety of operating systems, interprets the tags to format the text into a form such as you see here. Writers can produce output for a variety of printers, including laser printers, using separately specified layout directives for such things as font selection, column width and height, number of columns, etc.
    [Show full text]
  • Appendix A: Compiler Porting Tools
    Appendix A: Compiler Porting Tools Vector Pascal is an open-source project. It aims to create a productive and efficient program development environment for SIMD programming. In order to validate the concepts it has been developed initially for the Intel family of processors running Linux and Microsoft Windows. However, it has been intended from the outset that the technology should be portable to other families of CPUs. This Appendix addresses some of the issues involved in porting the compiler to new systems. A.1 Dependencies The Vector Pascal compiler tool-set can be divided along two axes as shown in Figure A.l. 1. Tools can be divided into (a) those provided as part of the release and (b) those provided as part of the operating environment. (a) These are mainly written in Java, the exceptions being a small run-time library in C, a Pascal System unit and several machine descriptions. (b) These are all available as standard under Linux, and Windows versions are freely downloadable from the web. 2. Tools can further be divided into (a) those required for program prepara­ tion and documentation, (b) those for code translation tools and (c) those for code generator preparation. (a) The program preparation tools are the VIPER IDE described in Chapter 16, along with the standard IM_EX document preparation system, DVI viewers and the TTH tool to prepare web-enabled versions of Vector Pascal program descriptions. (b) The program translation tools are: i. The i l c g . p a s c a l Java package which contains the Pascal compiler itself and classes to support Pascal-type declarations.
    [Show full text]
  • Cygwin Information.Pages
    The Cygwin distribution Caia under Windows For those of you, who don’t want to install Linux on your computer, it is possible to install and use Cygwin. Cygwin emulates Linux and starts up with the bash terminal shell. This makes it possible to compile and link GNU sources in the same way as under Linux. You can use the same makefiles and it produces, of course, Windows executables. Some knowledge about Linux is necessary! For more information and downloads, please see: www.cygwin.com. What is Cygwin needed for? Well, for the players, referee and manager it actually doesn’t matter. They can be compiled and linked in the normal way: C source can be build with DJGPP or DEV C++, Pascal source with Freepascal. However, the caiaio must be created with Cygwin in order to let things work properly. Which version of Cygwin do I need? We have precompiled and linked our executables with cygwin1.dll file version 1005.25.0.0. That one was included in the distribution of 29 December 2007. Make sure you use an update of Cygwin which is the same or newer. How to install Caia? In exactly the same way as in the Linux distribution: • tar –xzf caia_<namegame>_cygwin.tar.gz • caia_install_<namegame>/install_game.sh <namegame> Differences The Cygwin distribution is almost the same as the Linux distribution. The differences are: • The executables are compiled and linked for Windows. • The names of the executables need to have .exe as a suffix • The time measurements are less accurate under Cygwin. Whereas under Linux time is measured in microseconds, under Cygwin it is accurate up to 55 milliseconds.
    [Show full text]
  • Using GNU Autotools May 16, 2010 1 / 162 Tool Versions Foreword (2/2)
    Foreword Foreword (1/2) This presentation targets developers familiar with Unix development tools (shell, make, compiler) that want to learn Autotools. The latest version of this document can be retrieved from http://www.lrde.epita.fr/~adl/autotools.html Please mail me corrections and suggestions about this document at [email protected]. Do not send me any general question about the Autotools. Use the appropriate mailing list instead ([email protected], or [email protected]). A. Duret-Lutz Using GNU Autotools May 16, 2010 1 / 162 Tool Versions Foreword (2/2) This document was updated for the following releases of the Autotools: GNU Autoconf 2.65 (November 2009) GNU Automake 1.11.1 (December 2009) GNU Libtool 2.2.6b (November 2009) GNU Gettext 0.17 (November 2007) These were the last releases at the time of writing. The usage of these tools has improved a lot over the last years. Some syntaxes used here will not work with older tools. This a deliberate choice: New users should learn today's recommended usages. Make sure you have up-to-date tools and do not bother with old releases. A. Duret-Lutz Using GNU Autotools May 16, 2010 2 / 162 Title Page Using GNU Autotools Alexandre Duret-Lutz [email protected] May 16, 2010 Copyright c 2010 Alexandre Duret-Lutz http://creativecommons.org/licenses/by-sa/2.0/ Trivial source code examples displayed in this tutorial (such as the C files, Makefile.ams, and configure.acs of all the `amhello' projects) can be reused as if they were in the public domain.
    [Show full text]
  • Gnu-C-Compiler
    25. April 2018 C:\Users\brf09510\svn\doku\trunk\compman\SC-COMP.TEX Bedienung der C-Compiler 1. GNU-C Gnu-C/C++ ist ein Open-Source- und Freeware-Compiler, der bei Beachtung der Benut- zungsbedingungen (siehe Datei COPYING) legal und frei verwendet werden darf. Er wurde als portabler Compiler f¨urUnix-Umgebungen konzipiert. F¨urPCs unter Windows steht er in den zwei Versionen MinGW und Cygwin zur Verf¨ugung. Die DJGPP-Version von DJ Delorie und die emx-Installation von Eberhard Matthes sind veraltet. Unter Linux ist der Compiler meistens bereits installiert; falls er fehlt, helfen die Distribution-packages weiter. Auf einem Mac steht der llvm-Compiler (auch unter dem irref¨uhrendenNamen gcc) bereit. Die Bedienungshandb¨ucher finden sich im Internet unter http://gcc.gnu.org/onlinedocs/ Eine Ubersicht¨ ¨uber alle Optionen finden Sie unter http://gcc.gnu.org/onlinedocs/gcc-4.6.2/gcc/Option-Summary.html#Option-Summary Eine (umfangreiche) hervorragende Beschreibung auf englisch bietet das Buch The Definitive Guide to GCC William von Hagen 2006, 978-1-59059-585-5, 1-59059-585-8 http://sensperiodit.files.wordpress.com/2011/04/hagen-the-definitive-guide-to- gcc-2e-apress-2006.pdf 1.1. Aktivieren und Starten von Cygwin im CIP-Pool Vor dem Start der GNU-Compiler-Collection in den CIP-Pools muß ein Cygwinfenster mit einer Linux-bash-shell gestartet werden. Das geschieht in einem Windows-Kommandofenster (cmd.exe). cygwin Aktivieren des Compilers F:\BAT\cygwin.cmd wenn es mal nicht geht cd /cygdrive/c Wechseln auf (z.B.) Laufwerk C: gcc -std=c99 -pedantic -Wall -o bsp bsp.c Standard-C-Ubersetzung¨ Damit stehen zwei C-Compiler (gcc, clang), zwei C++-Compiler (g++, clang++) und ein Fortran-Compiler (gfortran) zur Verf¨ugung.
    [Show full text]
  • Competition Environment
    Competition Environment Contents 1 General 2 2 Hardware 2 3 Linux 2 4 Windows 4 1 CEOI 2003, Germany Competition environment 1 General Please first check the general information about the competition programming environment from the Competition Rules. The main environment for the contest is Linux. Linux is available as a programming environment (specifications below) and also the servers and evaluation (grading) runs on Linux. However, we provide the contestants with dual-boot computers where you can program either in Linux or in Windows environment. The evaluation is based on source-code submission and the evaluation system compiles the sub- mitted source code. As a consequence, also the programs written in the Windows environment are re-compiled for evaluation in Linux (using the same compiler). This is something that all contes- tants using Windows must be aware of. For example, uninitialized variables may cause undefined behavior when executing for the evaluation. We favor fairly standard operating system installations, but we may modify the installations for hardware support and security fixes. The compilers used in the competition are GCC for C and C++ programs and Freepascal for Pascal programs. Generally, the installations are designed for the following main alternatives: 1. Pascal as the programming language, Freepascal compiler, Freepascal IDE or RHIDE IDE. 2. C/C++ as the programming language, GCC compiler, RHIDE IDE. 3. Editors (emacs, vim, ...), command-line compilation/debugging, a graphical front end ddd for debugging. Option 3 is targeted primarily for Linux, although it is possible to use Windows Edit and command- line compilation. 2 Hardware The competition computers have Pentium III/650 MHz or better processor, 128 MB or more RAM, a standard UK keyboard, a mouse, and a color screen.
    [Show full text]
  • Using GNU Autotools February 21, 2008 1 / 162 Tool Versions Foreword (2/2)
    Foreword Foreword (1/2) This presentation targets developers familiar with Unix development tools (shell, make, compiler) that want to learn Autotools. The latest version of this document can be retrieved from http://www.lrde.epita.fr/∼adl/autotools.html Please mail me corrections and suggestions about this document at [email protected]. Do not send me any general question about the Autotools. Use the appropriate mailing list instead ([email protected], or [email protected]). A. Duret-Lutz Using GNU Autotools February 21, 2008 1 / 162 Tool Versions Foreword (2/2) This document was updated for the following releases of the Autotools: GNU Autoconf 2.61 (November 2006) GNU Automake 1.10.1 (January 2008) GNU Libtool 1.5.26 (February 2008) GNU Gettext 0.17 (November 2007) These were the last releases at the time of writing. The usage of these tools has improved a lot over the last years. Some syntaxes used here will not work with older tools. This a deliberate choice: New users should learn today’s recommended usages. Make sure you have up-to-date tools and do not bother with old releases. A. Duret-Lutz Using GNU Autotools February 21, 2008 2 / 162 Title Page Using GNU Autotools Alexandre Duret-Lutz [email protected] February 21, 2008 Copyright c 2008 Alexandre Duret-Lutz http://creativecommons.org/licenses/by-sa/2.0/ Trivial source code examples displayed in this tutorial (such as the C files, Makefile.ams, and configure.acs of all the ‘amhello’ projects) can be reused as if they were in the public domain.
    [Show full text]
  • Learning the Bash Shell, 3Rd Edition
    1 Learning the bash Shell, 3rd Edition Table of Contents 2 Preface bash Versions Summary of bash Features Intended Audience Code Examples Chapter Summary Conventions Used in This Handbook We'd Like to Hear from You Using Code Examples Safari Enabled Acknowledgments for the First Edition Acknowledgments for the Second Edition Acknowledgments for the Third Edition 1. bash Basics 3 1.1. What Is a Shell? 1.2. Scope of This Book 1.3. History of UNIX Shells 1.3.1. The Bourne Again Shell 1.3.2. Features of bash 1.4. Getting bash 1.5. Interactive Shell Use 1.5.1. Commands, Arguments, and Options 1.6. Files 1.6.1. Directories 1.6.2. Filenames, Wildcards, and Pathname Expansion 1.6.3. Brace Expansion 1.7. Input and Output 1.7.1. Standard I/O 1.7.2. I/O Redirection 1.7.3. Pipelines 1.8. Background Jobs 1.8.1. Background I/O 1.8.2. Background Jobs and Priorities 1.9. Special Characters and Quoting 1.9.1. Quoting 1.9.2. Backslash-Escaping 1.9.3. Quoting Quotation Marks 1.9.4. Continuing Lines 1.9.5. Control Keys 4 1.10. Help 2. Command-Line Editing 2.1. Enabling Command-Line Editing 2.2. The History List 2.3. emacs Editing Mode 2.3.1. Basic Commands 2.3.2. Word Commands 2.3.3. Line Commands 2.3.4. Moving Around in the History List 2.3.5. Textual Completion 2.3.6. Miscellaneous Commands 2.4. vi Editing Mode 2.4.1.
    [Show full text]
  • Tools for Programming in MOOC Context
    Tools for Programming in MOOC Context M.Tech R&D Report Submitted in partial fulfillment of the requirements for the degree of Master of Technology in Computer Science and Engineering Department by Saket Kumar-133050047 under the guidance of Prof. Deepak B Phatak Indian Institute of Technology, Bombay Acknowledgement I wish to express my sincere thanks to Prof. Deepak B Phatak,Professor, Department of Computer Science and Engineering, Indian Institue of Tech- nology, Bombay, for such a wonderful guidance throughout the R&D dura- tion. I also thanks to all those who directly or indirectly have lent their helping hands during the R&D. Saket Kumar Roll No. - 133050047 Abstract A massive open online course (MOOC) is a free Web-based distance learning program that is designed for the participation of large numbers of geograph- ically dispersed students. A MOOC may be patterned on a college or university course or may be less structured. Although MOOCs don't always offer academic cred- its, they provide education that may enable certification, employment or further studies. In my R&D, I am looking here for a compiler (basicaly c & c++), which has simple IDE and easy to use for beginners. Also compiler should run on both windows and linux platform in course CS101X of MOOC. Chapter 1 Introduction In the CS101X, students learn basics of programming. Most of the students have no knowledge of programming and programming language. There were many programming languages which emerged from the first generation of computers. Many of them are not sufficient to bear the load of todays computing environment, but there are some which kept them- selves out from the crowd.
    [Show full text]
  • The Multiple Precision Integers and Rationals Library Edition 1.0
    MPIR The Multiple Precision Integers and Rationals Library Edition 1.0 8 April 2009 This manual describes how to install and use MPIR, the Multiple Precision Integers and Ratio- nals library, version 1.0. Copyright 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. Copyright 2008 William Hart Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, with the Front-Cover Texts being \A GNU Manual", and with the Back-Cover Texts being \You have freedom to copy and modify this GNU Manual, like GNU software". A copy of the license is included in Appendix C [GNU Free Documentation License], page 121. i Table of Contents MPIR Copying Conditions ................................. 1 1 Introduction to MPIR .................................. 2 1.1 How to use this Manual ........................................................ 2 2 Installing MPIR........................................ 3 2.1 Build Options ................................................................. 3 2.2 ABI and ISA.................................................................. 8 2.3 Notes for Package Builds ...................................................... 11 2.4 Notes for Particular Systems .................................................. 12 2.5 Known Build Problems ....................................................... 14 2.6
    [Show full text]