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.

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

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.

2 (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. 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.

3 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.. 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.

4 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.

5 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.

6 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.. 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.

7 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.. Using Trace Files..20714 Debugging Programs That Use How Overlays Work.

8 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.

9 Objective-C.. Method Names in Commands.. The Print Command With Objective-C.. OpenCL C.. OpenCL C Datatypes.. OpenCL C Expressions.. OpenCL C Operators.. 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.

10 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.. Calling Program Functions.. Calling functions with no debug info.. Patching Programs.. Compiling and injecting code ingdb..269viDebugging Compilation options for thecompilecommand.


Related search queries