x64 instructions

Hello,

I’m not able to put x64 instructions into memory - could you please help me?

Thanks, Petr

kd> a

fffff800`01936f00 sub rsp, 10h

sub rsp, 10h

^ Couldn’t resolve ‘sub rsp, 10h’

fffff800`01936f00 xor rax,rax

xor rax,rax

^ Couldn’t resolve ‘xor rax,rax’

kd> .effmach

Effective machine: x64 (AMD64)

It is a known issue that the assembler in WinDbg hasn’t been updated for the x64 architecture.

I inquired the WinDbg team about this issue one year ago and they said there is no planned support for this. I asked them to at least update the documentation to reflect the lack of support for assembling x64 instructions, but nothing changed so far.

Bottom line: WinDbg can only assemble x86 instructions.

Regards,
Razvan

Unfortunately, DbgEng’s assembler doesn’t support other than x86 at the moment.

I usually assemble the opcode bytes in a standalone assembler (personally I have always used HIEW), and from there, just directly enter them in with the eb command.

  • S

From: Petr Kurtin
Sent: Friday, July 31, 2009 04:55
To: Kernel Debugging Interest List
Subject: [windbg] x64 instructions

Hello,
I?m not able to put x64 instructions into memory ? could you please help me?
Thanks, Petr

kd> a
fffff80001936f00 sub rsp, 10h<br>sub rsp, 10h<br> ^ Couldn't resolve 'sub rsp, 10h'<br>fffff80001936f00 xor rax,rax
xor rax,rax
^ Couldn’t resolve ‘xor rax,rax’

kd> .effmach
Effective machine: x64 (AMD64)


WINDBG is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

What is it with microsoft’s hate of x64 assembly? They made life hell for a lot of us when they decided not to support inline assembly for x64. That was a huge regression if you ask me. Looks like their laziness is spreading to other products.

-Jeff

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Skywing
Sent: Friday, July 31, 2009 1:06 PM
To: Kernel Debugging Interest List
Subject: RE: [windbg] x64 instructions

Unfortunately, DbgEng’s assembler doesn’t support other than x86 at the moment.

I usually assemble the opcode bytes in a standalone assembler (personally I have always used HIEW), and from there, just directly enter them in with the eb command.

  • S

From: Petr Kurtin
Sent: Friday, July 31, 2009 04:55
To: Kernel Debugging Interest List
Subject: [windbg] x64 instructions

Hello,

I?m not able to put x64 instructions into memory ? could you please help me?

Thanks, Petr

kd> a

fffff80001936f00 sub rsp, 10h<br><br>sub rsp, 10h<br><br>^ Couldn't resolve 'sub rsp, 10h'<br><br>fffff80001936f00 xor rax,rax

xor rax,rax

^ Couldn’t resolve ‘xor rax,rax’

kd> .effmach

Effective machine: x64 (AMD64)


WINDBG is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


WINDBG is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

And then someone would demand inline asm for Itanium and ARM.
MS did excellent work adding C intrinsics for many useful instructions.
( and who is not lazy, outside of Google? )

-pa

“Jeff Curless” wrote in message news:xxxxx@windbg…
> What is it with microsoft’s hate of x64 assembly? They made life hell for
> a lot of us when they decided not to support inline assembly for x64.
> That was a huge regression if you ask me. Looks like their laziness is
> spreading to other products.
>
> -Jeff
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Skywing
> Sent: Friday, July 31, 2009 1:06 PM
> To: Kernel Debugging Interest List
> Subject: RE: [windbg] x64 instructions
>
> Unfortunately, DbgEng’s assembler doesn’t support other than x86 at the
> moment.
>
> I usually assemble the opcode bytes in a standalone assembler (personally
> I have always used HIEW), and from there, just directly enter them in with
> the eb command.
>
> - S
>
>
> ________________________________
>
> From: Petr Kurtin
> Sent: Friday, July 31, 2009 04:55
> To: Kernel Debugging Interest List
> Subject: [windbg] x64 instructions
>
>
>
> Hello,
>
> I’m not able to put x64 instructions into memory - could you please help
> me?
>
> Thanks, Petr
>
>
>
>
>
> kd> a
>
> fffff80001936f00 sub rsp, 10h<br>&gt;<br>&gt; sub rsp, 10h<br>&gt;<br>&gt; ^ Couldn't resolve 'sub rsp, 10h'<br>&gt;<br>&gt; fffff80001936f00 xor rax,rax
>
> xor rax,rax
>
> ^ Couldn’t resolve ‘xor rax,rax’
>
>
>
> kd> .effmach
>
> Effective machine: x64 (AMD64)
>
>
> —
> WINDBG is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
> —
> WINDBG is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>

But it’s the debugger. x64 assembler would seem like a pretty basic thing to support.

Whoever demanded support for the Itanium could be told to get lost, unless it was some important enough customer, in which case, whether x64 were supported or not would probably have nothing to do with it.

mm

Intrinsics don’t help for everything, nor do they have intrinsics for
everything I need. Also using masm doesn’t solve the issue in all
cases. Luckily there are still a few tricks you can use to get around
the issue.

-Jeff

On Jul 31, 2009, at 5:32 PM, “Pavel A.” wrote:

> And then someone would demand inline asm for Itanium and ARM.
> MS did excellent work adding C intrinsics for many useful
> instructions.
> ( and who is not lazy, outside of Google? )
>
> -pa
>
>
> “Jeff Curless” wrote in message news:
> xxxxx@windbg…
>> What is it with microsoft’s hate of x64 assembly? They made life
>> hell for
>> a lot of us when they decided not to support inline assembly for x64.
>> That was a huge regression if you ask me. Looks like their
>> laziness is
>> spreading to other products.
>>
>> -Jeff
>>
>> -----Original Message-----
>> From: xxxxx@lists.osr.com
>> [mailto:xxxxx@lists.osr.com] On Behalf Of Skywing
>> Sent: Friday, July 31, 2009 1:06 PM
>> To: Kernel Debugging Interest List
>> Subject: RE: [windbg] x64 instructions
>>
>> Unfortunately, DbgEng’s assembler doesn’t support other than x86 at
>> the
>> moment.
>>
>> I usually assemble the opcode bytes in a standalone assembler
>> (personally
>> I have always used HIEW), and from there, just directly enter them
>> in with
>> the eb command.
>>
>> - S
>>
>>
>> ________________________________
>>
>> From: Petr Kurtin
>> Sent: Friday, July 31, 2009 04:55
>> To: Kernel Debugging Interest List
>> Subject: [windbg] x64 instructions
>>
>>
>>
>> Hello,
>>
>> I’m not able to put x64 instructions into memory - could you please
>> help
>> me?
>>
>> Thanks, Petr
>>
>>
>>
>>
>>
>> kd> a
>>
>> fffff80001936f00 sub rsp, 10h<br>&gt;&gt;<br>&gt;&gt; sub rsp, 10h<br>&gt;&gt;<br>&gt;&gt; ^ Couldn't resolve 'sub rsp, 10h'<br>&gt;&gt;<br>&gt;&gt; fffff80001936f00 xor rax,rax
>>
>> xor rax,rax
>>
>> ^ Couldn’t resolve ‘xor rax,rax’
>>
>>
>>
>> kd> .effmach
>>
>> Effective machine: x64 (AMD64)
>>
>>
>> —
>> WINDBG is sponsored by OSR
>>
>> For our schedule of WDF, WDM, debugging and other seminars visit:
>> http://www.osr.com/seminars
>>
>> To unsubscribe, visit the List Server section of OSR Online at
>> http://www.osronline.com/page.cfm?name=ListServer
>>
>> —
>> WINDBG is sponsored by OSR
>>
>> For our schedule of WDF, WDM, debugging and other seminars visit:
>> http://www.osr.com/seminars
>>
>> To unsubscribe, visit the List Server section of OSR Online at
>> http://www.osronline.com/page.cfm?name=ListServer
>>
>
> —
> WINDBG is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer