Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] Suggestions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 06-13-2003, 05:35 AM
Mike-7 Mike-7 is online now
Registered User
 
Join Date: 06-13-2003
Location: St-Petersburg, Russia
Posts: 10
Send a message via ICQ to Mike-7
Numega BoundsChecker support

Currently Visual Builder has no support for Numega BoundsChecker. Support for BoundsChecker is tricky - it requires substitution of link.exe and cl.exe with nmlink.exe and nmcl.exe (Numega BoundsChecker documentation describes this). AFAIK, msdev.exe is not capable to build projectes instrumented with bounds checker from command line.

Is it posible to implement support for BoundsChecker in standard 'Build VC++ Project' action? (e.g. include special option - "Instrument with BoundsChecker")
Reply With Quote
  #2  
Old 11-18-2003, 11:53 AM
HudsonKane HudsonKane is online now
Registered User
 
Join Date: 11-18-2003
Posts: 1
Bounds Checker

for devstudio 6...
we call msdev with /EX BoundsCheckerBuildAndExit
where that is the following macro
Sub BoundsCheckerBuildAndExit()
Application.Visible = False
ExitAppOnBuildFinish = -1
BoundsCheckerBuild
End Sub
sub BoundsCheckerBuild()
ChangeConfigToWin32BoundsChecker
Application.ExecuteCommand "BCBuild"
End Sub
Sub ChangeConfigToWin32BoundsChecker()
ChangeActiveConfiguration "Win32 BoundsChecker"
End Sub
Sub ChangeActiveConfiguration(NewConfigName)
'DESCRIPTION: Change the active configuration to the named one
' Look for a config with the specified name
i = 1
Do While i <= Application.ActiveProject.Configurations.Count
'''' Note that a configuration name is the FULL name of the
'''' configuration, in the format:
'''' ProjectName - ConfigurationName
'''' for example,
'''' Scribble - Win32 Debug
If ActiveProject.Configurations.Item(i).Name = ActiveProject.Name + " - " + NewConfigName Then
set ActiveConfiguration = ActiveProject.Configurations.Item(i)
i = ActiveProject.Configurations.Count + 1 ' e.g. break;
End If
i = i + 1
Loop
End Sub
Reply With Quote
  #3  
Old 11-18-2003, 12:06 PM
Mike-7 Mike-7 is online now
Registered User
 
Join Date: 06-13-2003
Location: St-Petersburg, Russia
Posts: 10
Send a message via ICQ to Mike-7
RE: Bounds Checker

This requires developers to create separate project configuration in EACH *.dsp and support all project settings as they change (e.g. when optimization level (/O) needs to be changed then all configurations have to be reset accordingly). Supporting multiple configurations is very boring and error-prone.

I meant special support for BC, see below:

----- extract from Numega documentation -------------->>>>
Running FinalCheck from the Command Line



You can prepare your program for FinalCheck(tm) using NMAKE and the following BoundsChecker components. The instrumentation process substitutes the NMCL compiler driver for the standard Visual C++ compiler driver.



NMCL.EXE BoundsChecker compiler driver.

Used in place of CL.EXE.

NMLINK.EXE BoundsChecker linker driver.

BCINTERF.LIB BoundsChecker library file required by all instrumented programs.

To run FinalCheck from the command line using a standard Microsoft makefile



1 Specify CPP=NMCL.EXE on the NMAKE command line. For example, assuming that your path statement includes NMCL and NMLINK, the command is:


NMAKE CPP=NMCL.EXE LINK32=NMLINK.EXE


If your makefile uses a name other than MAKEFILE, use the following command syntax:

NMAKE /f filename.MAK CPP=NMCL.EXE LINK32=NMLINK.EXE


Note: If your path statement does not include NMCL and NMLINK, you must specify the full directory path to these programs (located in your BoundsChecker installation directory).




2 Add a target to the makefile that corresponds to the BoundsChecker Project Configuration you created in the Developer Studio IDE. (This step is optional, but recommended.)




To run FinalCheck using a Win32 SDK makefile

If your makefile is based on the original Win32 SDK, the substitution line is slightly different, and you must add it after the line that includes the NTWIN32.MAK file:


!include <ntwin32.mak>

CC=NMCL.EXE

LINK=NMLINK.EXE





To apply NMCL command-line options to a project



Specify NMCL and the appropriate option in quotes. For example:


NMAKE /f TEST.MAK CPP="NMCL /NMopt:TEST.INI"



See the BoundsChecker Basics manual for a description of available NMCL and NMLINK options, or use NMCL /? or NMLINK /?.



To specify NMCL command-line options with an environment variable

You can also specify NMCL command-line options using the NMCL environment variable. You may want to do this for "global" options. For example, the following instructs NMCL to not instrument the specified source file:



set NMCL=/NMignore:StdAfx.cpp



See the BoundsChecker Basics manual for a description of available NMCL and NMLINK options, or use NMCL /? or NMLINK /?.







Copyright © 1997-1998 Compuware Corporation
--------------- cut here ------------------------------>
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 05:23 PM.


Copyright © 1999-2023 Kinook Software, Inc.