Example: marketing

Debugging with gdb - sourceware.org

Debugging withgdbThegnuSource-Level DebuggerTenth Edition, forgdbversion (GDB)Richard Stallman, Roland Pesch, Stan Shebs, et al.(Send bugs and comments ) Debugging withgdbTEXinfo by the Free Software Foundation51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USAISBN 978-0-9831592-3-0 Copyrightc 1988-2022 Free Software Foundation, is granted to copy, distribute and/or modify this document under the termsof the GNU Free Documentation License, Version or any later version published bythe Free Software Foundation; with the Invariant Sections being Free Software and FreeSoftware 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 promotingsoftware freedom.

Debugging with gdb The gnu Source-Level Debugger Tenth Edition, for gdb version 12.0.50.20220102-git (GDB) Richard Stallman, Roland Pesch, Stan Shebs, et al.

Tags:

  Debugging

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Advertisement

Transcription of Debugging with gdb - sourceware.org

1 Debugging withgdbThegnuSource-Level DebuggerTenth Edition, forgdbversion (GDB)Richard Stallman, Roland Pesch, Stan Shebs, et al.(Send bugs and comments ) Debugging withgdbTEXinfo by the Free Software Foundation51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USAISBN 978-0-9831592-3-0 Copyrightc 1988-2022 Free Software Foundation, is granted to copy, distribute and/or modify this document under the termsof the GNU Free Documentation License, Version or any later version published bythe Free Software Foundation; with the Invariant Sections being Free Software and FreeSoftware 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 promotingsoftware freedom.

2 ITable of ContentsSummary Software..1 Free Software Needs Free Documentation..1 Contributors togdb..31 A Getting In and Out Invokinggdb.. Choosing Files.. Choosing Modes.. WhatgdbDoes During Startup.. Initialization Files.. Home directory early initialization files.. System wide initialization files.. Home directory initialization file.. Local directory initialization file.. Quittinggdb.. Shell Commands.. Logging Output.. Command Syntax.. Command Settings.. Command Completion.. Command options.. Getting Help..284 Running Programs Compiling for Debugging .. Starting your Program.. Your Program s Arguments.. Your Program s Environment.. Your Program s Working Directory.. Your Program s Input and Output.. Debugging an Already-running Process.. Killing the Child Process.. Debugging Multiple Inferiors Connections and Programs.

3 Debugging Programs with Multiple Threads.. Debugging Forks.. Setting aBookmarkto Return to Later.. A Non-obvious Benefit of Using Checkpoints..53iiDebugging withgdb5 Stopping and Breakpoints, Watchpoints, and Catchpoints.. Setting Breakpoints.. Setting Watchpoints.. Setting Catchpoints.. Deleting Breakpoints.. Disabling Breakpoints.. Break Conditions.. Breakpoint Command Lists.. Dynamic Printf.. How to save breakpoints to a file.. Static Probe Points.. Cannot insert breakpoints .. Breakpoint address .. Continuing and Stepping.. Skipping Over Functions and Files.. Signals.. Stopping and Starting Multi-thread Programs.. All-Stop Mode.. Non-Stop Mode.. Background Execution.. Thread-Specific Breakpoints.. Interrupted System Calls.. Observer Mode..946 Running programs Recording Inferior s Executionand Replaying Examining the Stack Frames.

4 Backtraces.. Selecting a Frame.. Information About a Frame.. Applying a Command to Several .. Management of Frame ..1169 Examining Source Printing Source Lines.. Specifying a Location.. Linespec Locations.. Explicit Locations.. Address Locations.. Editing Source Files.. Choosing your Editor.. Searching Source Files.. Specifying Source Directories.. Source and Machine Code.. Disable Reading Source Code..13210 Examining Expressions.. Ambiguous Expressions.. Program Variables.. Artificial Arrays.. Output Formats.. Examining Memory.. Memory Tagging.. Automatic Display.. Print Settings.. Pretty Printing.. Pretty-Printer Introduction.. Pretty-Printer Example.. Pretty-Printer Commands.. Value History.. Convenience Variables.. Convenience Functions.. Registers.. Floating Point Hardware.

5 Vector Unit.. Operating System Auxiliary Information.. Memory Region Attributes.. Attributes.. Memory Access Mode.. Memory Access Size.. Data Cache.. Memory Access Checking.. Copy Between Memory and a File.. How to Produce a Core File from Your Program.. Character Sets.. Caching Data of Targets.. Search Memory.. Value Sizes..18211 Debugging Optimized Inline Functions.. Tail Call Frames..18412 C Preprocessor withgdb13 Commands to Set Tracepoints.. Create and Delete Tracepoints.. Enable and Disable Tracepoints.. Tracepoint Passcounts.. Tracepoint Conditions.. Trace State Variables.. Tracepoint Action Lists.. Listing Tracepoints.. Listing Static Tracepoint Markers.. Starting and Stopping Trace Experiments.. Tracepoint Restrictions.. Using the Collected Data.. tracepointsfilename.. Convenience Variables for Tracepoints.

6 Using Trace Files..20714 Debugging Programs That Use How Overlays Work.. Overlay Commands.. Automatic Overlay Debugging .. Overlay Sample Program..21315 Usinggdbwith Different Switching Between Source Languages.. List of Filename Extensions and Languages.. Setting the Working Language.. HavinggdbInfer the Source Language.. Displaying the Language.. Type and Range Checking.. An Overview of Type Checking.. An Overview of Range Checking.. Supported Languages.. C and C++.. C and C++Operators.. C and C++Constants.. C++Expressions.. C and C++Defaults.. C and C++Type and Range Checks.. C.. for C++.. Decimal Floating Point format.. D.. Go.. Objective-C.. Method Names in Commands.. The Print Command With Objective-C.. OpenCL C.. OpenCL C Datatypes.. OpenCL C Expressions.. OpenCL C Operators.

7 Fortran.. Fortran Operators and Expressions.. Fortran Defaults.. Special Fortran Commands.. Pascal.. Rust.. Modula-2.. Operators.. Built-in Functions and Procedures.. Constants.. Modula-2 Types.. Modula-2 Defaults.. Deviations from Standard Modula-2.. Modula-2 Type and Range Checks.. The Scope .. Modula-2.. Ada.. Introduction.. Omissions from Ada.. Additions to Ada.. Overloading support for Ada.. Stopping at the Very Beginning.. Ada Exceptions.. Extensions for Ada Tasks.. Tasking Support when Debugging Core Files.. Tasking Support when using the Ravenscar Profile.. Ada Settings.. Known Peculiarities of Ada Mode.. Unsupported Languages..24616 Examining the Symbol Altering Assignment to Variables.. Continuing at a Different Address.. Giving your Program a Signal.. Returning from a Function.

8 Calling Program Functions.. Calling functions with no debug info.. Patching Programs.. Compiling and injecting code ingdb..269viDebugging Compilation options for thecompilecommand.. Caveats when using thecompilecommand.. Compiler search for thecompilecommand.. Commands to Specify Files.. File Caching.. Debugging Information in Separate Files.. Debugging information in a special section.. Index Files Speed Upgdb.. Automatic symbol index cache.. Errors Reading Symbol Files.. GDB Data Files..29119 Specifying a Debugging Active Targets.. Commands for Managing Targets.. Choosing Target Byte Order..29620 Debugging Remote Connecting to a Remote Target.. Types of Remote Connections.. Host and Target Files.. Remote Connection Commands.. Sending files to a remote system.. Using thegdbserverProgram.. Runninggdbserver.

9 Attaching to a Running Program.. TCP port allocation lifecycle ofgdbserver.. Other Command-Line Arguments forgdbserver.. Connecting togdbserver.. Monitor Commands forgdbserver.. Tracepoints support ingdbserver.. Remote Configuration.. Implementing a Remote Stub.. What the Stub Can Do for You.. What You Must Do for the Stub.. Putting it All Together..31621 Configuration-Specific Native.. BSD libkvm Interface.. Process Information.. Features for DebuggingdjgppPrograms.. Features for Debugging MS Windows PE Executables.. Support for DLLs without Debugging Symbols.. DLL Name Prefixes.. Working with Minimal Symbols.. Commands Specific tognuHurd Systems.. Darwin.. FreeBSD.. Embedded Operating Systems.. Embedded Processors.. Synopsys ARC.. ARM.. BPF.. M68k.. MicroBlaze.. OpenRISC 1000.. PowerPC Embedded.

10 Atmel AVR.. CRIS.. Renesas Super-H.. Architectures.. AArch64.. AArch64 .. AArch64 Pointer .. AArch64 Memory Tagging .. x86 Architecture-specific Issues.. IntelMemory Protection Extensions(MPX).. Alpha.. HPPA.. PowerPC.. Nios II.. Sparc64.. ADI Support.. S12Z..34222 Prompt.. Command Editing.. Command History.. Screen Size.. Output Styling.. Numbers.. Configuring the Current ABI.. Automatically loading associated files.. Automatically loading init file in the current directory.. Automatically loading thread Debugging library.. Security restriction for auto-loading.. Displaying files tried for auto-load.. Optional Warnings and Messages..355viiiDebugging Optional Messages about Internal Happenings.. Other Miscellaneous Settings..36223 Canned Sequences of Commands.


Related search queries