flat assembler
Message board for the users of flat assembler.

Index > Main > 64 bit debugger

Author
Thread Post new topic Reply to topic
fafastrungen



Joined: 12 Aug 2006
Posts: 27
fafastrungen
Hi, I'm making binary format programs with "use64" option. Fasm generates a .BIN file, I rename it to .EXE and I test it with the debug that comes with XP (debug.exe) but code is not legible becouse "use64" option.
If I use "use16" option there's no problem and the code is correct, so where can I get a 64 bit debugger.
I'm using XP 32 bits.

Another question is how the processor knows that the code is 16, 32 or 64 bits ?, if I open the binary file (that fasm creates) with a hex editor I see the code of the instrucctions (Mov, Lea, Add, so on) but no code for the use16/32/64 option, so how the processor knows the kinf of code ?
Post 27 May 2007, 18:48
View user's profile Send private message Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2140
Location: Estonia
Madis731
You can't really debug 64-bit code under 32-bit OS Smile
The only way is to emulate it all, but generally debuggers rely on just-in-time execution of the program at hand. Find a 64-bit OS or just boot some 64-bit OS in QEMU and execute your code there. The latter one means A LOT of pain.

The second question is what is answered when you do some assembly Smile A few weeks help I guess. The most basic explanation is that when you put USE16 in your code, then your other code must prepare CPU for this mode. Same goes for USE64. Usually in 64-bit Windows you don't use other code than 64-bit, but exceptions exist...
Post 27 May 2007, 22:22
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
fafastrungen



Joined: 12 Aug 2006
Posts: 27
fafastrungen
Madis731 wrote:
You can't really debug 64-bit code under 32-bit OS Smile
The only way is to emulate it all, but generally debuggers rely on just-in-time execution of the program at hand. Find a 64-bit OS or just boot some 64-bit OS in QEMU and execute your code there. The latter one means A LOT of pain.

The second question is what is answered when you do some assembly Smile A few weeks help I guess. The most basic explanation is that when you put USE16 in your code, then your other code must prepare CPU for this mode. Same goes for USE64. Usually in 64-bit Windows you don't use other code than 64-bit, but exceptions exist...


Thanks alot.
Post 28 May 2007, 19:57
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.