Jump to content

  • Log In with Google      Sign In   
  • Create Account


Idov

Member Since 30 Nov 2006
Offline Last Active Sep 28 2013 06:58 AM
-----

Topics I've Started

Writing a game for mobile phones.

27 September 2013 - 05:54 AM

Hi!
I'm thinking of writing a game for iPhone/android and  I have some questions:
I read that there are a few game engines that help develop games quickly. Shoud I use them or try to develop a game from scretch?
Is there an engine that you would recommend?
I'm thinking of a game in which the user "looks down" on the characters like in "Fallout", "Red Alert", "Dune" etc. Is it considered a 3D or a 2D game?

thanks :)

 

 

 

 


Making a "Busy Loop" not consume that much CPU (without Sleep)

18 May 2013 - 09:13 AM

Hi!

I want to measure a very small period of time ( let's say 0.2 ms).

In order to do this, I'm using busy loop which checks whether or not we waited in the busy loop for the requested time like this:

 

double startTime = MeasureTime();

double endTime = MeasureTime();

while (endTime - startTime < timeToWait)
{

     endTime = MeasureTime();
}

 

 

I'd like to use some functions which don't use much CPU in that loop in order to ease the CPU load.

which functions should I use?

 

thanks :)


Invalid UNWIND_INFO data?

27 April 2013 - 07:44 AM

 

Hi!
I'm trying to read the unwind data of some dlls (in this case: ntdll.dll).
I noticed that in some cases I read the data jsut fine, but in other cases I see "garbage".
I used dumpbin to look at the unwind data in the dll and I noticed that when I read "garbage" - dumbin can't read it either.

This is what I see with dumpbin:

  00006EF4 000442AF 000442C3 0014265D
  00006F00 000442C3 000442CD 00142669
  00006F0C 000442CD 000442D9 001444D5
  00006F18 000442D9 000442FD 00147E95
  00006F24 000442FD 00044376 00144679
  00006F30 00044376 000443D0 001448A1
  00006F3C 000443D0 0004442C 001254B0
    Unwind version: 1
    Unwind flags: None
    Size of prologue: 0x0A
    Count of codes: 4
    Unwind codes:
      0A: ALLOC_LARGE, size=0x1A8
      03: PUSH_NONVOL, register=rdi
      02: PUSH_NONVOL, register=rsi

I also noticed that when I resolve an IP to a "garbaged" runtime function,SymFunctionTableAccess64 does something that couldn't find any documnetation of.
So my questions are:
1. Is this really a garbaged unwind info? If not, how can I read its content?
2. What does SymFunctionTableAccess64 do when it handles such "garbage"? Where can I find some documentation for it?

thanks! smile.png


Finding out which x64 instruction the IP points at

19 April 2013 - 02:36 AM

Hi!
I'm trying to find out if my instruction pointer is in the function's epilog.
To do so I need to know which instruction the IP is pointing at and which parameters the instruction gets.

(From what I understand, I just need to check if it points at a POP, "mov esp,ebp" or a RET instructions - and if it is one of these instruction - I'm in the epilog).

But how can I figure out which instruction the IP is pointing at?

thanks! :)


Finding the epilogue of a x64 function

17 April 2013 - 12:03 PM


Hi!
I want to unwind a x64 callstack, so I'm trying to follow the "UNWIND procedure" I found here:
http://msdn.microsoft.com/en-us/library/8ydc79k6.aspx

I understand that if the RIP is in the epilog, we need to compute the offset of the RSP considering the operations still needed to be done, but it's unclear to me how to find out if the RIP is in the epilog or not (in section 3.a)?
what is the RIP code stream? How do I get it? and how do I match it to a trailing portion of a legitimate epilog?

are there any links or examples I can use?
thanks! :)


PARTNERS