Web lists-archives.org

[Mingw-users] Disassembly of stack frame




Hi All:

First of all, I have to admit that my English is poor. However, I will try my best to explain my problem. Pardon me.

I am debugging a win32 program, I want to disassemble a stack frame.If the stack frame has debug info (means have source code), I can use the pc value directly with "disas" command of GDB. This command will dump the function surrounding the program counter of the selected frame. But if the stack frame does not have debug info, using pc value is not safe, because maybe there is no function limits surrounding the pc value(for example, in kernel32.dll). In this condition I can dump a rang address surrounding the pc value. For instance, the pc value is 0x40100, I can disassemble from 0x40000 to 0x40100, and disassemble from 0x40100 to 0x40200. The serious problem is that maybe 0x40000 is not a start of a instruction, because of the instructions of intel x86 can change their length, and in worst condition this will make the instructions from 0x40000 to 0x40100 are all wrong. If I disassemble from code section beginning to pc value, it may take me a long time. How can I get the cor
 rect context(disassembly) in this condition rapidly.

Thanks.

Fiveight
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
MinGW-users mailing list
MinGW-users@xxxxxxxxxxxxxxxxxxxxx

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users