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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T17:33:35+00:00 2026-05-22T17:33:35+00:00

Quiz : How to generate the backtrace by looking at the stack values? 0xf3e2de34

  • 0

Quiz : How to generate the backtrace by looking at the stack values?

0xf3e2de34 f3e2de70 c0135351 401ef021 00000000   p.bsQS...p......
0xf3e2de44 f3e2de81 00000021 f3e2c000 f7950924   ..bs......bs...w
0xf3e2de54 00000000 401ef000 00000246 00000246   .....p..F...F...
0xf3e2de64 00000001 00000001 f7950000 f3e2df18   ...........w..bs
0xf3e2de74 c02898b5 322d7875 23203235 00007820   5...ux.252...x..
0xf3e2de84 f3e2de98 00000000 f7950bd0 bffff0ec   ..bs....P..wlp..
0xf3e2de94 c70cf660 00000000 00000000 bffff0ec   .v.G........lp..
0xf3e2dea4 f3e2c000 f7950930 7fffffff 00000000   ..bs0..w........
0xf3e2deb4 00000000 00000001 00000000 bffff07b   .............p..
0xf3e2dec4 f5cfd880 bffff07b 00000000 f5f24740   .XOu.p.......Gru
0xf3e2ded4 c0124f87 00000000 00000000 00200200   .O..............
0xf3e2dee4 f3e2defc 067b3067 00000000 f5f24740   ..bsg0.......Gru
0xf3e2def4 c0124f87 f7950934 f7950934 c028331b   .O..4..w4..w.3..
0xf3e2df04 00000000 c01b0fe8 f5cfd880 f7950000   ....h....XOu...w
0xf3e2df14 fffffffb f3e2df50 c0283642 00000001   ....P.bsB6......
0xf3e2df24 00000001 00000001 f3e2c000 f6fe30d0   ..........bsP0.v

Hint – the current function can always be determined from EIP

I found this question at kernelnewbies/ABI documentation.
I really dont understand the hint given there?(Maybe because i have no idea about this thing).

Could somebody explain me how to solve these kinda questions.

  • 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-22T17:33:36+00:00Added an answer on May 22, 2026 at 5:33 pm

    In this case, you can do it quite reliably, since that code has been compiled with frame pointers enabled.

    What you need to know:

    • EIP is a register that points at the next instruction to execute.
    • When calling a function, the arguments and then EIP (so the called function knows where to return to) are saved on the stack.

    • When the compiler has been told (explicitly or implicitly) to use frame pointers, it then saves the frame pointer (in the EBP register) on the stack (so it can later restore the frame pointer to the value it had on the calling function), and then sets the frame pointer to point to the current top of the stack. This allows accessing easily arguments and local variables from a known point of reference (the frame pointer), and greatly simplifies debugging.

    • Then, space is reserved for local variables, and the function is executed.
    • When returning from the function, the previous frame pointer and instruction pointer are restored.

    So, to generate a backtrace, you would follow the frame pointers, looking at the corresponding saved EIPS. So:

    current function was called from c0135351
    follow f3e2de70 → was called from c02898b5
    follow f3e2df18 → was called from c0283642
    

    Of course, this was the easy case. When you don’t have frame pointers, you have to guess whether a given value on the stack corresponds to an instruction pointer.

    The missing part is how to translate this numbers to function names. Having an unstripped vmlinux (note the x, not a z) file is invaluable. System.map just contains some symbols, so very often you’ll only end up knowing that the relevant function was between function A and function B.

    Edit:

    A function call on x86 looks something like:

                                            ...
    int main()                              add  $-0x8,%esp ; alignment
    {                                       push $0x2       ; arg 2
            ...                             push $0x1       ; arg 1
            func(1, 2);                     call func       ; function call
            ...                             add  $0x10,%esp ; pop args from stack
    }                                       ...
    

    And the called function looks something like:

    void func(int arg1, int arg2)           push %ebp       ;\
    {                                       mov  %esp,%ebp  ;/ create stack frame
            int local1;                     sub  $0x18,%esp ; reserves space
            ...                             ...
    }                                       mov  %ebp,%esp  ;\
                                            pop  %ebp       ;/ destroys frame
                                            ret             ; returns
    

    So, the stack will look similar to:

              :           :
              +-----------+
              : alignment :
              +-----------+
    12(%ebp)  |   arg2    |
              +-----------+
     8(%ebp)  |   arg1    |
              +-----------+
     4(%ebp)  |    ret    | -----> return address
              +-----------+
      (%ebp)  |    ebp    | -----> previous ebp
              +-----------+
    -4(%ebp)  |  local1   | -----> local vars
              +-----------+
              : alignment :
              +-----------+
              :           :
    

    (Lower addresses are lower on the ASCII-art)

    So, if you keep following the saved EBP pointers, you can get the saved EIP pointers (ret above), which point to instructions in the call chain (in the return chain, to be precise).

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

Sidebar

Related Questions

i am trying to generate random number for my mental math quiz game. But
I have a project to create an asp.net mvc site to generate a quiz.
I am making an iPhone app that will generate something based on quiz answers.
I am building a quiz and i need to calculate the total time taken
I have a basic quiz/survey type application I'm working on, and I'd like to
I have this quiz application where I match what people type with the right
I have a simple quiz application and I want display a nice timer /
So I made some timers for a quiz. The thing is, I just realized
I'm making a small quiz-application in Flash (and ActionScript 3). Decided to use the
I'm making a little vocabulary-quiz app, and the basic model for a word is

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.