determing function arguments from data on the stack

Discussion in 'C Programming' started by jonny, Mar 8, 2005.

  1. jonny

    jonny Guest

    I want to find a tool or make one that can tell me what the values of
    my functions arguments are by looking at the stack. In addition to the
    disassembly it can use the source, a map, a pdb file, whatever it
    needs, its just got do it from looking at the stack. I basically want
    to do something similar to a debugger but log it out. Any ideas?

    -Jonathan
     
    jonny, Mar 8, 2005
    #1
    1. Advertisements

  2. jonny

    Jack Klein Guest

    On 7 Mar 2005 19:46:55 -0800, "jonny" <> wrote in
    comp.lang.c:

    > I want to find a tool or make one that can tell me what the values of
    > my functions arguments are by looking at the stack. In addition to the
    > disassembly it can use the source, a map, a pdb file, whatever it
    > needs, its just got do it from looking at the stack. I basically want
    > to do something similar to a debugger but log it out. Any ideas?
    >
    > -Jonathan


    None of this is defined by the C language. You need to ask in a group
    that supports your particular compiler/OS combination.

    --
    Jack Klein
    Home: http://JK-Technology.Com
    FAQs for
    comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
    comp.lang.c++ http://www.parashift.com/c++-faq-lite/
    alt.comp.lang.learn.c-c++
    http://www.contrib.andrew.cmu.edu/~ajo/docs/FAQ-acllc.html
     
    Jack Klein, Mar 8, 2005
    #2
    1. Advertisements

  3. In article <>,
    jonny <> wrote:
    :I want to find a tool or make one that can tell me what the values of
    :my functions arguments are by looking at the stack.

    Any such thing would be platform and ABI dependant... and you don't
    happen to mention which platform you are running on.

    Some libraries provide a function for this purpose. Others...
    in others the easiest way would be to run the debugger as a script
    (maybe with an 'expect' script). In some systems you would probably have
    to go as far as essentially implimenting your own debugger in order
    to get the controls you need.

    :In addition to the
    :disassembly it can use the source, a map, a pdb file

    pdb file? PalmOs?


    Speaking of implimenting your own debugger: if you are using
    gcc / gdb then you could at worst case grab the gdb source and hack
    it for your purposes.
    --
    This signature intentionally left... Oh, darn!
     
    Walter Roberson, Mar 8, 2005
    #3
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Neo
    Replies:
    10
    Views:
    965
    sushant
    Jan 20, 2005
  2. tutmann
    Replies:
    4
    Views:
    683
  3. Replies:
    14
    Views:
    934
    Jacek Dziedzic
    Apr 6, 2007
  4. jmborr
    Replies:
    1
    Views:
    657
    Stargaming
    Nov 3, 2007
  5. Replies:
    3
    Views:
    1,106
  6. Navaneeth
    Replies:
    4
    Views:
    762
    Kenny McCormack
    Nov 20, 2010
  7. Dun Peal
    Replies:
    6
    Views:
    1,072
    Gabriel Genellina
    Jun 8, 2011
  8. Replies:
    20
    Views:
    627
    Ethan Furman
    Nov 16, 2012
Loading...