Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > determing function arguments from data on the stack

Reply
Thread Tools

determing function arguments from data on the stack

 
 
jonny
Guest
Posts: n/a
 
      03-08-2005
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

 
Reply With Quote
 
 
 
 
Jack Klein
Guest
Posts: n/a
 
      03-08-2005
On 7 Mar 2005 19:46:55 -0800, "jonny" <(E-Mail Removed)> 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/~a...FAQ-acllc.html
 
Reply With Quote
 
 
 
 
Walter Roberson
Guest
Posts: n/a
 
      03-08-2005
In article <(E-Mail Removed) .com>,
jonny <(E-Mail Removed)> 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!
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Function call arguments in stack trace? Dun Peal Python 6 06-08-2011 02:45 AM
C/C++ compilers have one stack for local variables and return addresses and then another stack for array allocations on the stack. Casey Hawthorne C Programming 3 11-01-2009 08:23 PM
how to pass a function name and its arguments inside the arguments of other function? jmborr Python 1 11-03-2007 08:20 AM
any STL/string function available for determing string contains numeric nishit.gupta@st.com C++ 14 04-06-2007 01:00 PM
function call with arguments which takes no arguments Neo C Programming 10 01-20-2005 06:31 AM



Advertisments