News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

RadASM 3.0 bugtest

Started by KetilO, May 31, 2010, 12:28:11 PM

Previous topic - Next topic

donkey

#285
Added Spy and StopSpy, missed this set mostly because I don't use them but someone might find them useful. Spy allows you to monitor a variable  while single stepping through code until the matching StopSpy is reached. I would advise against including any API calls within the Spy/StopSpy block as they can take quite a long time to step through. Do not use Try/EndTry within a spy block although you can nest a spy block inside a Try/EndTry block.

EDIT: Should mention the syntax

Spy(SPY_TYPE_DWORDHEX,SomeVar)
...
StopSpy


The first parameter selects the size and radix to use, the allowable values can be found in Debug64.a. The second parameter is a label, do not use square brackets or offset, just the label name. If you are using one of the SPY_TYPE_REGxx types do not include a second parameter Spy(SPY_TYPE_REGRAX)

SPY_TYPE_FLOAT = 0
SPY_TYPE_DOUBLE = 1
SPY_TYPE_QWORD = 2
SPY_TYPE_DWORD = 3
SPY_TYPE_QWORDHEX = 4
SPY_TYPE_DWORDHEX = 5
SPY_TYPE_STRING = 6

Register types (single parameter only)
SPY_TYPE_REGRAX = 7
SPY_TYPE_REGRBX = 8
SPY_TYPE_REGRCX = 9
SPY_TYPE_REGRDX = 10
SPY_TYPE_REGRSI = 11
SPY_TYPE_REGRDI = 12
SPY_TYPE_REGRSP = 13
SPY_TYPE_REGRBP = 14
SPY_TYPE_REGR8 = 15
SPY_TYPE_REGR9 = 16
SPY_TYPE_REGR10 = 17
SPY_TYPE_REGR11 = 18
SPY_TYPE_REGR12 = 19
SPY_TYPE_REGR13 = 20
SPY_TYPE_REGR14 = 21
SPY_TYPE_REGR15 = 22

Sample output
Begin spying SomeVar
Address 000000000040112F: SomeVar = ff98
Address 0000000000401131: SomeVar = ff98
Address 0000000000401133: SomeVar = ff98
Address 0000000000401135: SomeVar = ff98
Address 000000000040113F: SomeVar = 1
Address 0000000000401141: SomeVar = 1
Address 0000000000401143: SomeVar = 1
Address 0000000000401145: SomeVar = 1
Address 0000000000401147: SomeVar = 1
Address 0000000000401149: SomeVar = 1
End spying SomeVar


New upload, there were 7 from the previous one. I will not be adding any more functions to this project but I will fix any bugs that are reported.
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

donkey

#286
Well, I said I wouldn't add any more functions, famous last words. Added Disassemble:

Disassemble(pTarget,nLines) - Disassembles nLines of code beginning at pTarget

For example:

Disassemble(OFFSET KLA, 10)

Output:
----------------------------------------
Disassembling 10 lines beginning at 0000000000401114
----------------------------------------
00000000`00401114 48894c2408      mov     qword ptr [rsp+8],rcx
00000000`00401119 4889542410      mov     qword ptr [rsp+10h],rdx
00000000`0040111e 4c89442418      mov     qword ptr [rsp+18h],r8
00000000`00401123 4c894c2420      mov     qword ptr [rsp+20h],r9
00000000`00401128 55              push    rbp
00000000`00401129 4889e5          mov     rbp,rsp
00000000`0040112c 4881ec88000000  sub     rsp,88h
00000000`00401133 c745b050000000  mov     dword ptr [rbp-50h],50h
00000000`0040113a c745b403000000  mov     dword ptr [rbp-4Ch],3
00000000`00401141 48c745b8fa124000 mov     qword ptr [rbp-48h],offset test64+0x12fa (00000000`004012fa)
----------------------------------------
Disassembly ended, next instruction at 0000000000401149
----------------------------------------


This one uses dbgeng.dll and I can't test it except on Win7 Ultimate X64 since thats the only 64 bit OS I have. It might have the following problems:

dbgeng.dll not found
GPF when executed
No output
Failure to attach to process
No such interface

Some of the errors above will prevent the lib file from working at all since it will terminate your application when included, for that reason I left the lib in the post above, it has none of the Disassemble code. I would really appreciate it if I could get some feedback as to what OS versions it works on (obviously no 32 bit OSes). Please just PM me, no need to pollute Ketil's thread with a bunch of GoAsm X64 specific stuff.

EDIT: I have gotten rid of a few message boxes that were left over from testing and redirected their output to RadAsm. Just error messages that I needed during development but I didn't want a message box to pop up if there was a problem. Added DumpSymbols that dumps the symbol table to the output window. The library routines have been renamed with an RDBG prefix and all data labels that are used by the library are prefixed with a %. These are filtered out of the symbol dump, likewise any symbols that are in your code that begin with one of those prefixes will not be displayed. The symbols require that you do a debug build with COFF embedded symbols, the build should look something like this:

GoRC /fo rsrc.obj /Machine X64 "test64.Rc"
GoAsm /c /x64 "test64.Asm"
GoLink /mix "test64.obj"  "rsrc.obj" /Debug coff


Sample output:

----------------------------------------
Dumping symbol table
----------------------------------------
0x0000000000401057 : CODE : START
0x00000000004010DD : CODE : WinMain
0x00000000004012C3 : CODE : DlgProc
0x00000000004012E6 : CODE : DlgProc.WM_COMMAND
0x000000000040131F : CODE : DlgProc.WM_DESTROY
0x000000000040133D : CODE : DlgProc.DEFPROC
0x0000000000401369 : CODE : DlgProc.EXIT
0x0000000000405878 : DATA : hInstance
0x0000000000406000 : CNST : TestConstant
----------------------------------------


There were 5 previous downloads.

<moved this to its own thread>
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

jcfuller

KetilO,

Would it be possible to get an explanation of the [Parse] and [CodeBlock] sections of the *.ini files?

Thank You,
James

ragdog

Hi KetilO

Can you update the masm32.ini for trigger call?

[CodeComplete]
Trig=invoke,call

And Can you fix the Resouces?
Like this from Remus
http://www.masm32.com/board/index.php?topic=14100.msg130556#msg130556

And in Radasm have i a trigger for includes

example Include kern.. then popup the windows with the includes

Have this not Radasm 3.x?

ragdog

What if this?

Project option>> Api files (if changed,reopen project)

winraeMsg.api,winraeConst.api

What can i make with it?

donkey

The api files contain the information for syntax hilighting and hint text. You can edit them to add anything you are missing.
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

ragdog

Hi

Can you by code complete window the widh (da.win.ccwt) bigger



howList:
invoke ShowWindow,ha.hTT,SW_HIDE
invoke GetCaretPos,addr pt
invoke ClientToScreen,ha.hEdt,addr pt
invoke ScreenToClient,ha.hWnd,addr pt
invoke GetClientRect,ha.hWnd,addr rect
mov eax,pt.y
add eax,da.win.ccht
add eax,20
.if eax>rect.bottom
mov eax,da.win.ccht
add eax,5
sub pt.y,eax
.else
add pt.y,20
               mov           da.win.ccwt,319        <<<<<<<<<<<<<<<<<<<<<<
.endif
invoke SetWindowPos,ha.hCC,HWND_TOP,pt.x,pt.y,da.win.ccwt,da.win.ccht,SWP_SHOWWINDOW or SWP_NOACTIVATE


Or calc from string size i 'm not sure if that's possible?

By Radasm2 works this fine



donkey

Hi Ragdog,

I agree that the initial size is an annoyance, the code complete window only remembers its size until you close RadAsm then its back to the tiny window again. This is definitely something Ketil should take a look at, perhaps save the size in RadAsm.ini [tools] or another section.

One huge annoyance for me is RadAsm changing text without asking. For example try typing this and pressing enter, or just copy and paste it into a project:

mov eax, SIZEOF INITCOMMONCONTROLSEX

Also, if you get it to stay all caps then go back and press enter at the end of the line to insert a new one, it will change the text. I have typed lines of code without thinking and then had to go back and try to edit them without RadAsm changing them to some other case. The secret is not to use copy/paste and do not press enter at the end of the line. The problem does not happen when copy/pasting multiple lines.
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

donkey

Hi Ketil,

A bug in api hints:

"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

ragdog

Hi Donkey

I have not this bug in APi hints

to my Question

I have download the source of radasm and have add this for the size of code complete window

mov           da.win.ccwt,319

This is a good proportion

And i have change all resource bugs like proportion of controls Radio button ,static controls...

I can upload my RadASM30.rc

And i have change my Menü
in the old Radasm style

File
New Project
Open Project
Close Project
Seperator (----------)
  New File
  Open File
...
..

I have very long work with Radasm2 and have used to it

And i ilove the old Project Wizard and try it to change the new WIzard to the old
Or a complete new like visual studio :bg

Can i make this with a addin?

KetilO

Hi all

The size of the code complete list has ALWAYS been saved to RadASM.ini on exit.
Maybe there are some windows version problems. It works as it should on my Vista.

KetilO

KetilO

Hi all, new upload.

Version 3.0.0.7l 2011-04-11
---------------------------
o Added option to turn on / off auto case convert (Option / Code Editor / Auto Case Convert).
o Fixed an MASM structure code complete bug in .if statements.
o Fixed an asemw bug where RadASM could crash on an new empty project.

KetilO

donkey

Quote from: KetilO on April 11, 2011, 10:19:16 AM
Hi all

The size of the code complete list has ALWAYS been saved to RadASM.ini on exit.
Maybe there are some windows version problems. It works as it should on my Vista.

KetilO

Hi Ketil,

Weird, I got the last update and its working now, Win7 Ult. X64. I did overwrite the RadAsm.ini file this time, but can't see anything different and when I copy the old one it it continues to work. I don't understand it but its perfect now.

Turning off "Auto Case Convert" option solves my problem with INITCOMMONCONTROLSEX nicely, thanks.
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

donkey

Hi Ketil,

A possible bug I noticed, not sure how long its been there but the Tab Index on controls is not working. It does not change the order of the controls in the DIALOGEX  structure of the RC file, as a work around I'm editing the RC file directly for now. (Win7 Ult. X64, RA ver. 3.0.0.7l)

Edgar
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

ragdog

Thanks for this code complete and auto case convert :U