Results 1 to 2 of 2

Thread: parameters

  1. #1
    death
    Guest

    parameters

    if it was written in C++ most likely it uses classes..
    when you call a class member function (that is not static), the first parameter pushed is the pointer to the class object (this).. if you notice this somewhere in the executable, it's C++..

    [er. this was supposed to be a reply to foxthree's solaris executable question, wrong button pressed]
    I promise that I have read the FAQ and tried to use the Search to answer my question.

  2. #2
    notbob
    Guest

    Re: parameters

    Originally posted by death
    if it was written in C++ most likely it uses classes..
    when you call a class member function (that is not static), the first parameter pushed is the pointer to the class object (this).. if you notice this somewhere in the executable, it's C++..
    This isn't entirely true. Generally speaking, non-static class member functions have their this pointer passed as an implicit argument 0, but it isn't necessarily passed on the stack.

    MSVC6 for example passes this in the ECX register. It's a pretty solid hint that that's what is happening when a function uses ECX extensively without first preserving it somewhere.

    I know the original post was in reference to Solaris (and presumably a SPARC processor), but my point is to be aware of parameter-passing in registers.

    cheers,
    -notbob
    I promise that I have read the FAQ and tried to use the Search to answer my question.

Similar Threads

  1. parameters
    By Shadlol in forum OllyDbg Support Forums
    Replies: 1
    Last Post: January 11th, 2009, 15:13
  2. load exe with parameters
    By bOU in forum OllyDbg Support Forums
    Replies: 1
    Last Post: May 3rd, 2005, 13:06
  3. Rocognizing calls parameters?
    By Anonymous in forum OllyDbg Support Forums
    Replies: 2
    Last Post: August 27th, 2003, 10:33
  4. parameters passed to a call
    By The Keeper in forum Advanced Reversing and Programming
    Replies: 4
    Last Post: March 7th, 2002, 12:22
  5. MSComm32/Read parameters
    By JohnnyBoy in forum Malware Analysis and Unpacking Forum
    Replies: 11
    Last Post: November 21st, 2001, 11:04

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •