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

  • Home
  • SEARCH
  • 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 7172647
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T15:39:28+00:00 2026-05-28T15:39:28+00:00

So I am debugging an x86 program using GDB. I am in a certain

  • 0

So I am debugging an x86 program using GDB. I am in a certain function called func1.

I would like to examine the stack and see the arguments passed into it. So by doing the following:

(gdb) info frame 0
Stack frame at 0x7fffffffe1f0:
 rip = 0x400e70 in func4; saved rip 0x40115a
 called by frame at 0x7fffffffe210
 Arglist at 0x7fffffffe1e0, args: 
 Locals at 0x7fffffffe1e0, Previous frame's sp is 0x7fffffffe1f0
 Saved registers:
  rip at 0x7fffffffe1e8

I know that the arguments are in 0x7fffffffe1e0. By doing:

(gdb) x/8x 0x7fffffffe1e0
0x7fffffffe1e0: 0x08    0xe3    0xff    0xff    0xff    0x7f    0x00    0x00

So why does this address contain all those hex numbers? What are they? Also how would I know how many arguments are there? Doing info locals or info args says no symbol table loaded.

Also, I know that the first argument would be at 0x7fffffffe1e0 + 0x8 and the second at 0x7fffffffe1e0 + 0xc etc… But how would I know how many arguments are there?

By doing:

(gdb) x 0x7fffffffe1e0 + 0x8
0x7fffffffe1e8: 0x5a
(gdb) x/d 0x7fffffffe1e0 + 0x8
0x7fffffffe1e8: 90
(gdb) x/c 0x7fffffffe1e0 + 0x8
0x7fffffffe1e8: 90 'Z'

I know that the first argument is either a Z or a 90. Is there any way to figure out which one it is?

And by doing

(gdb) x 0x7fffffffe1e8 + 0xc
0x7fffffffe1f4: -1 '\377'
(gdb) x/s 0x7fffffffe1e8 + 0xc
0x7fffffffe1f4:  "\377\177"
(gdb) x/d 0x7fffffffe1e8 + 0xc
0x7fffffffe1f4: -1

I know that the second argument could be -1.

Doing

(gdb) x 0x7fffffffe1e8 + 0x10
0x7fffffffe1f8: 10

I know that the third argument “could” be 10.

So how would I know how many arguments are there? And if I found a number or a character, is there a way to determine which one it is?

Thank you!

  • 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-28T15:39:28+00:00Added an answer on May 28, 2026 at 3:39 pm

    I would like to examine the stack and see the arguments passed into it.

    You apparently are on an x86_64 platform.

    You should learn the calling convention used. In particular, note that function arguments are not passed on the stack (except if you have more than 6 of them), so your question starts with a bad assumption.

    You can’t examine stack to see the arguments as they aren’t there to begin with.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got an x86 assembler program which I'm debugging with gdb. Is there a
Debugging with gdb, any c++ code that uses STL/boost is still a nightmare. Anyone
Debugging a PHP program, is there any add-on/plug-in for browser which I can view
I receive this message (see image below) when I try to edit in debugging.
I am trying to get the current date using assembly (x86) on Linux. I
We're a great fan of using ADPlus in the Debugging Tools for Windows for
I have noticed that sizzeof() on my program structure is different on x86 and
I have this gdb macro, which is used to print meaningful stacktraces when debugging
When I run GDB against a program which loads a .so which is linked
I'm debugging a program right now in visual C#, and in the program I

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.