News:

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

qeditor and %1

Started by herge, November 17, 2011, 07:51:29 AM

Previous topic - Next topic

herge


Hi :

I have been having some problems with some batch files and maybe menus.ini
and qeditor. I am not sure what's going on?

VS90COMNTOOLS=C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools\
windir=C:\WINDOWS
_debug_this=C:\masm32\bin\"C:\masm32\bin\ctzn".exe
_NT_ALT_SYMBOL_PATH=C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN;c:\masm3
2\bin;
_NT_SYMBOL_PATH=D:\Windows\Symbols

C:\masm32\bin>dir "C:\masm32\bin\ctzn".*
Volume in drive C is SYSTEM
Volume Serial Number is 9C02-C33F

Directory of C:\masm32\bin

11/16/2011  09:18 PM             1,292 ctzn.asm
11/17/2011  02:00 AM             3,383 ctzn.exe
11/17/2011  02:00 AM           267,869 ctzn.obj
11/17/2011  02:00 AM           353,280 ctzn.pdb
               4 File(s)        625,824 bytes
               0 Dir(s)  60,930,240,512 bytes free

C:\masm32\bin>pause
Press any key to continue . . .

REM MAKPDB.BAT Tuesday, November 15, 2011 10:29:45 AM
REM From Masm Forum
c:\masm32\bin\ml /c /coff /Zi /Zd %1.asm
c:\masm32\bin\link /SUBSYSTEM:CONSOLE /OPT:NOREF /RELEASE /NOLOGO /DEBUG /PDB:%1.pdb %1.obj
set _debug_this=C:\masm32\bin\%1.exe
set
dir %1.*
pause

From a dos box ie icon after printer on qeditor accross the top.
makpdb ctzn
works and _debug_this is set correctlly with out the quotes!

in Qeditor I have Makpdb in the projects menu
We start Makpdb ctzn
It adds quotes to _debug_this and we will get a silent dos error
later on. I think %1 definition has changed.

Help?

Regards Herge

// Herge born  Brussels, Belgium May 22, 1907
// Died March 3, 1983
// Cartoonist of Tintin and Snowy

ToutEnMasm


Not very clear but i will try to give you some answers:
First:
_NT_ALT_SYMBOL_PATH      >>> debugger = windbg ? correct ?
dir "C:\masm32\bin\ctzn".*     >>> you have put your source code in the bin directory of masm32 ?
                               This one isn't very good,put your source code in anothe directory.for example
                               ctzn that you create.
The linker is perhaps the one in masm32\bin.Bad thing,he must be the one in:
        C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN
Link /?  give you the version number of the linker.Verify them ,the most recent ,must be the one in use.
You can also made a build without the debug options.If it work ,you hve to change  the one in masm32 by the one in the vctools (you need to copy also the ms*.dll)




herge


Hi ToutEnMasm:

The Link works!
ctzn.exe works!
ctzn.pdb works!
windbg works!
The Assembler works!

But the enviornment variable _debug_this is malformed ie trash, garbage.

Regards Herge
// Herge born  Brussels, Belgium May 22, 1907
// Died March 3, 1983
// Cartoonist of Tintin and Snowy

herge


Hi:

set _debug_this=%MASMDIR%\BIN\%1.exe

Have to use another Enviornmental variable.
All most there!

Regards Herge
// Herge born  Brussels, Belgium May 22, 1907
// Died March 3, 1983
// Cartoonist of Tintin and Snowy

hutch--

Just look up your rules for naming environment variables as it looks like your batch files are not working correctly.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

mineiro

hello Sr herge, I have done this bat file and posting here, maybe can help you. Change the paths to yours.

REM Saving actual path to be restored later
set actual_path=%path%
set PATH=%PATH%;\masm32\bin;\masm32\include;\masm32\lib
ml /c /coff /Zi /Zd %1.asm
link /SUBSYSTEM:CONSOLE /OPT:NOREF /RELEASE /NOLOGO /DEBUG /PDB:%1.pdb %1.obj
dir %1.*
set dbg_dir="C:\path with spaces\some_place\another\odbg201d\ollydbg.exe"
REM invoking debugger to launch program in actual path
%dbg_dir% "%CD%\%1.exe"
REM seting path to null
set path=
REM restoring the old path
set path=%actual_path%
REM clearing actual path
set actual_path=
pause

herge

Hi mineiro:

REM GOWINDBG.BAT Monday, November 14, 2011 11:08:04 AM
REM http://www.computerhope.com/call.htm
REM SETLOCAL so we get back to where we started
REM Directory wise
SETLOCAL
C:
cd \
cd \"Program Files\Debugging Tools for Windows (x86)"
Windbg.exe %~d1%~p1%~n1%~x1
pause
REM << End of File D BAT GOWINDBG.BAT >>



We can also lose _debug_this hurrah!

Regards Herge
// Herge born  Brussels, Belgium May 22, 1907
// Died March 3, 1983
// Cartoonist of Tintin and Snowy