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 6735861
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:03:45+00:00 2026-05-26T11:03:45+00:00

I am new to debugging an assembly code under gdb.Therefore, I have some question;

  • 0

I am new to debugging an assembly code under gdb.Therefore, I have some question;

  • How can I run my assembly code (At virtual place ) without actually running it ?
  • If it needs a value, how can I insert a value to see how it works for each case in switch statement?

    ex: I couldnot give example on assembly so I give it in c.

        scanf ( "%d",&y);
        while ( y ) {
             ...
             scanf( "%d", &x);
             switch ( x ) {
    
             case 1: ...
             case 2: ...
             case 3: ...
             }
    
         }
    
  • If I need, how can I know what value is stored in a register ?

  • How can I print out all display to my .txt file ? In other words, assume I have started my program and it runs with no break point and then I want print this display to .txt file. So, I can work on paper. As You know, paper is more powerful than computer 🙂

I know some of you will say “go and read gdb tutorial or man page”.But, I could not find any good tutorials, with example to explain how a command works. My brain only works when my eyes see example 🙂

Platform is Linux
Tool is terminal/console

EDIT : Please give me a good website including good documentation, of course If you know

Give me documentation of “how to [catch] fish”, “not how to eat fish”

  • 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-26T11:03:46+00:00Added an answer on May 26, 2026 at 11:03 am

    How can I run my assembly code without actually running it ?

    Umm, err, what?!

    If it needs a value, how can I insert a value to see how it works for each case in switch statement?

    set whatever = some expression

    Remember that registers have a $ sigil (e.g: $eax).

    If I need, how can I know what value is stored in a register ?

    For all registers:

    info reg
    

    For a specific register

    info reg $eax
    

    or

    p $eax
    

    or

    p/x $eax
    

    etc…

    How can I print out all display to my .txt file ? In other words, assume I have started my program and it runs with no break point and then I want print this display to .txt file. So, I can work on paper. As You know, paper is more powerful than computer 🙂

    set logging file foobar.out
    set logging on
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to funcctional programming and have some questions regarding coding style and debugging.
I have this simple code: public void Run() { var invokerThread = new Thread(new
I'm currently integrating some new classes into an existing application. I have a JDialog
I have some code that references an outside DLL which in production will be
I'm using chrome for a new website, and I'm doing some javascript debugging. One
I'm new to using logcat and debugging in Android. I've analyzing someone else's code
i need help in debugging my code. Im new into php and im currently
I am new to debugging and I'm very interested in knowing how to setup
I am rather new to Linux device driver programmring, but for debugging purposes, I
FileStream fileStream = new FileStream(filePath, FileMode.Open, FileAccess.Read); Arguments: << path >> Debugging resource strings

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.