0

Is there a way, in any programing language to get all the value inside de processor regitrers?

For Example:

Getting all the value (regardless of format and type, hex, bin) that resides in the processor registrers in the exact moment the funcion call, and copying it to the ram?

ghaschel
  • 1,313
  • 3
  • 20
  • 41
  • 2
    Run an emulator, look at what's inside. Beyond that, did you want logical registers or physical registers? Very often hardware has more registers than can be described in machine code. See http://en.wikipedia.org/wiki/Register_renaming for more. But debuggers have tricks to walk through all of the contents of the register. – btilly Jun 05 '13 at 04:11
  • 1
    See http://stackoverflow.com/questions/5429137/how-to-print-register-values-in-gdb – btilly Jun 05 '13 at 04:14
  • @btilly phisical registrers. I gyess gbd will do the trick. Thanks! – ghaschel Jun 05 '13 at 04:31
  • Physical registers you can't get at. They exist in the CPU, but the CPU is responsible for pretending to software running on the CPU that they don't exist. – btilly Jun 05 '13 at 05:32

2 Answers2

0

Do you mean doing a core dump? If you want the information on the current state you can do it through a debugger such as gdb.

If you wanted it at compilation you would probably have to write an assembly function that returns the information you want. There might be a library function that does it but im not too sure.

Community
  • 1
  • 1
Darcys22
  • 1,204
  • 2
  • 11
  • 20
0

Only ever seen it in the Ketman Interpreter which is the only assembly interpreter/debugger I have ever seen in 30 years

The entire DOS industry from 1980 to 1995 failed to make one

The entire Windows industry from 1995 to today has failed to make one

ady
  • 155
  • 1
  • 8