This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: reading binarys

I'm not sure what you are asking here.

It appears that you can do system dump of the internal state of the game. In which case the answer is yes.

A programmer plans his memory space when a program is written. Every address in RAM space has a specific variable. The heap (stack) is located at a specific address, etc.

If you have the source and the binaries you must also have the map file.
You can write a program to parse the map file which tells you location of variables and there type. That parse result is then used to parse the system dump (binary file) and output in human readable format.

Hope this answers what you asked.

Jason Erickson wrote:
I'm working on a project where every so often one of our games comes
back and we pull the ram off the game for saving, and sometimes for
anaylisis.  Currently the only varibles in ram that we can physically
look at are the static members.  The information that we would love to
get to is the heap memory and be able to know what dynamically
allocated structure that heap memory belongs to.

I have the source code, I have the binarys, I have the ram dumps, I
have the boards.  Our games have the ability to recover back to the
original state that they were in before a power hit, so even though
the memory is dynamically allocated, our code is the only running code
on the machine and since it runs the code in the same order every
time, the pointers get put into the same memory locations every time.

What I need to know, is there some way to read the binary with some
program to figure out which order everything in memory is being
allocated, so that I can write a program to read the memory dump and
figure out which memory locations belong to which pointer varibles.
Our code is written in C with litteraly tons of pointers.  It runs on
the i960 processor (yeah I know...soo old...but it works and it costs
a lot of money to change once its been approved).

Any ideas would be appricated to be able to read the binary to figure
out the order in which varibles get loaded onto the heap.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]