Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6342931
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T20:20:22+00:00 2026-05-24T20:20:22+00:00

What are the available commands for gdb in Xcode 4 which I can use

  • 0

What are the available commands for gdb in Xcode 4 which I can use to debug my app?

(Although a relatively seasoned developer, I’m looking to expand my skills with this question.)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T20:20:22+00:00Added an answer on May 24, 2026 at 8:20 pm

    You can start from here http://darkdust.net/files/GDB%20Cheat%20Sheet.pdf, come is very handy.

    Points worth mentioning

    • You can attach gdb to an already running process, there by start
      debugging
    • Enter on gdb command line will execute last instruction, comes in
      very handy
    • You can do some amount of scripting with GDB, use -x falg to point to
      your script suppose you want to connect to a target over ip (remote
      debugging), and you dont want to remember its ip / kepp entering it
      every time. Starting from gdb 7.1 Python scripts are also supported
      so much more powerful now

      echo “target remote 192.168.XX.XX:1234” > gscript
      gdb -x gscript application

    Ok some niche stuffs –

    (gdb)start
    (gdb)layout split               // list the assembly and c
    (gdb)ni                         // exec next instruction in assembly
    (gdb)print $pc                  // prints the contents of register PC(use $)
    

    you can try doing some unit testing on the go

    (gdb)start
    (gdb)call factorial(5)
    

    Suppose you dont want to disturb the the application timing (reatime behaviour) but still want to view some variable updates, you can try following

    (gdb)start
    (gdb)break <func>:<line>
    (gdb)commands 1                  // '1' is the break number
    > silent
    > printf "var1 = %d\t var2 =%d\n",var1,var2
    > continue
    > end
    

    data break points, conditional breakpoints can be very useful when debugging memory corruptions

    (gdb)start
    (gdb)watch var
    (gdb)watch 0x80001212
    

    debugging threads

    (gdb)info threads
    (gdb)thread 2                      // switch to thread '2'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How to know which commands are available? I tried looking up in the Java
Is there command which can show me list of all available commands in GIT?
Which parsers are available for parsing C# code? I'm looking for a C# parser
How can I list all available UNIX commands from Perl?
To know which PowerShell modules are available on a machine I use the command
I have perl installed, but many commands ( perl utilities) are not available. I
I have a context menu attached to a panel, that should mirror commands available
does anyone know where i can get the official list of all AT COMMANDS
What are the new commands & or equivalents of: python_select -L (shows available python
I'm interested in creating commands that are available from anywhere in my WPF application.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.