S. freescale IDE 5.7
โฆษณา
โฆษณา
Preference and Target Settings Options
• selected—the IDE requires the framework in addition to the referenced header file.
In the example
#include <Cocoa/CocoaHeaders.h> the IDE requires the presence of Cocoa/ in order to find the CocoaHeaders.h file.
• cleared—the IDE requires only the referenced header file. Using the same example,
Cocoa/
becomes optional.
Revert Panel
Click Revert Panel to revert all modified options in the current preference or settings panel to the values present when the panel was originally opened.
S
438
Save open files before build
Select the Save open files before build option to automatically save files during project operations:
• Preprocess
• Precompile
• Compile
• Disassemble
• Bring Up To Date
• Make
• Run
Save project entries using relative paths
Use the Save project entries using relative paths option to store the location of a file using a relative path from one of the access paths. The settings include:
• enabled–the IDE stores extra location information to distinctly identify different source files with the same name. The IDE remembers the location information even if it needs to re-search for files in the access paths.
• disabled–the IDE remembers project entries only by name. This setting can cause unexpected results if two or more files share the same name. In this case, re-
IDE 5.7 User’s Guide
Preference and Target Settings Options
searching for files could cause the IDE to find the project entry in a different access path.
Script
Choose from the Scripts options the script system (language) used to display text in editor windows. This setting behaves in two different ways, depending on the current IDE state:
• No editor windows open—the setting modifies the default script system. All editor windows take on the default script system.
• Editor windows open—the setting modifies the script system displayed in the frontmost editor window only. Other editor windows remain unaffected. The default script system remains unchanged.
Select stack crawl window when task is stopped
Select the Select stack crawl window when task is stopped option to automatically bring the Thread window to the foreground after the debugger stops a task. Clear the option to leave the Thread window in its previous position.
This option is useful for watching variable values change in multiple Variable windows as the debugger steps through code.
Selection position
Select the Selection position option to remember these items for each editor window:
• visible text
• insertion-point location
• selected text
Clear the option to open each editor window according to default settings and place the insertion point at the first line of text.
NOTE
The IDE must be able to write to the file in order to remember selection position.
Show all locals
Select the Show all locals option to display all local variables in Variable windows. Clear the option to show only variables near the program counter.
The Variables pane uses these display settings:
• Variables: All—shows all local variables in the code.
IDE 5.7 User’s Guide 439
Preference and Target Settings Options
• Variables: Auto—only shows the local variables of the routine to which the currentstatement arrow currently points.
• Variables: None—does not show variables. Use this setting to improve stepping performance for slow remote connections.
Show Code and Data Sizes
Enable this option in the IDE Extras panel of the IDE preferences panels to display the
Code and Data columns in the project manager window.
Show hidden locals
In previous versions of the CodeWarrior debugger, all local variables were displayed at all times in the local variables view. This meant that if there were multiple sub-scopes within a function that contained variables of the same name, all copies of these variables would be shown at all times. This made it difficult at times to determine which copy of a variable was the “current” one.
The CodeWarrior debugger now optionally filters out out-of-scope local variables in the local variables view. It is now possible to make the CodeWarrior debugger only display those variables that are actually “live” for the current location.
A new filter option (live) has been added to the existing options (all, auto, and none). The new option will attempt to filter out variables that are not currently in scope.
A hidden local variable is a variable that is in scope, but is hidden by a variable of the same name in a deeper scope. If the Show hidden locals option is checked, hidden locals are shown dimmed (greyed out).
function:
Listing 29.1 Hidden Locals Example
int main( void )
{ char varA = 'a'; int varB = 111; for (int loop1 = 0; loop1 < 10; loop1++)
{
/* loop-scoped variables that should hide all others */ char varA = 'b';
} float varB = 2.22;
.
.
.
440 IDE 5.7 User’s Guide
Preference and Target Settings Options
}
.
.
.
When debugging this function, the earlier CodeWarrior debugger would show five variables at all times: loop1 : int varA : char varA : char varB : int varB : float
This could be confusing, since the different varA’s were not apparent in the local variables pane. With the new “live” filter, only those variables that are actually active at a given point in the function are displayed. Using the “live” filter, this display will look like this at the beginning of the function: varA : char varB : int and the display will look like this when inside the for loop: loop1 : int varA : char varB : float
Note in the second case that the varA and varB variables declared at the beginning of the function are still “live”, but they are hidden by the same-named variables declared within the for loop. If you would like these hidden variables to be displayed, check the “Show hidden locals” option; the variable list when inside the for loop looks like this: loop1 : int varA : char // displayed as dimmed varA : char varB : int // displayed as dimmed varB : float
NOTE
This feature ONLY works correctly if there is compiler and symbolics plugin support for sub-scopes within functions. At present, there are very few compilers that actually generate sub function-level scope information, so it is entirely possible that you will see no difference between the “live” and “all”
IDE 5.7 User’s Guide 441
Preference and Target Settings Options
settings -- you will continue to have the “classic” CodeWarrior variable display with all variables shown.
Show message after building up-to-date project
Select the Show message after building up-to-date project option to have the IDE display a message after building an up-to-date project.
Show threads in separate windows
Select the Show threads in separate windows option to open a separate Thread window for each task. Clear the option to use one Thread window to display multiple tasks.
Show processes in separate windows
Select the Show processes in separate windows option to open a separate window for each process. Clear the option to use one window to display multiple tasks processes.
Show the component palette when opening a form
Select the Show the component palette when opening a form option to automatically display the Component Palette after opening a form in the Layout Editor. Clear the option to require manual opening of the Component Palette.
Show the object inspector when opening a form
Select the Show the object inspector when opening a form option to automatically open an Object Inspector window when opening a layout in the Layout Editor. Clear the option to require manual opening of the Object Inspector.
Show values as decimal
Select the Show values as decimal instead of hex option to display variable values in decimal form. Clear the option to display the values in hexadecimal form.
Show variable location
Select the Show variable location option to display the Location column in the Variables pane of the Thread window. Clear the option to hide the Location column.
442 IDE 5.7 User’s Guide
Preference and Target Settings Options
Show variable types
Select the Show variable types option to display the type associated with each variable in
Variable windows. Clear the option to hide the variable types.
Show variable values in source code
Select the Show variable values in source code option to show current values for variable names displayed in contextual menus. Clear the option to show variable names only.
Size
Choose from the Size options the font size used to display text in editor windows. This setting behaves in two different ways, depending on the current IDE state:
• No editor windows open—the setting modifies the default font size. All editor windows take on the default font size.
• Editor windows open—the setting modifies the font size displayed in the frontmost editor window only. Other editor windows remain unaffected. The default font size remains unchanged.
Sort functions by method name in symbolics window
Select the Sort functions by method name in symbolics window option to alphabetically sort functions by method name. Clear the option to alphabetically sort by class name. The sorting affects functions of the form className::methodName that appear in the
Symbolics window.
Since most C++ and Java source files contain methods that belong to the same class, select the option to simplify selection of functions by typing method names.
Stop at Watchpoints
Select this option to halt program execution at each watchpoint, regardless of whether the watchpoint value changed. Clear the option to halt execution at watchpoints with changed values.
Stop on application launch
Select this option to halt program execution at a specified point each time a debugging session begins.
IDE 5.7 User’s Guide 443
Preference and Target Settings Options
Strings
Use the Strings option to configure the color of anything that is not a comment, keyword, or custom keyword and displayed in editor windows when the Activate Syntax Coloring option is enabled. Sample strings include literal values, variable names, routine names, and type names.
Click the color swatch next to Strings to set the color.
struct Rect { short short short short
};
Smart Variable Formatting
The Variable Formatter is an IDE plugin that customizes the display of Variables based on format data it reads from an XML format file. For specific types of variables, the Variable
Formatter will replace the text shown next to the variable name to the results of an expression. For example, if you have a struct: top; left; bottom; right; then normally a variable of that type would look like this in the debugger: myRect 0x000DCEA8
If the Variable Formatter is given a format that looks like this:
<variableformat>
<typename>Rect</typename>
<expression>
"{T: " + ^var.top +
" L: " + ^var.left +
" B: " + ^var.bottom +
" R: " + ^var.right +
"}{H: " + (^var.bottom - ^var.top) +
" W: " + (^var.right - ^var.left) + "}"
</expression>
</variableformat> then the variable will be displayed with the result of the expression: myRect {T: 30 L: 30 B: 120 R: 120}{H: 90 W: 90}
When the IDE starts, the variable formatter plugin looks in the plugin's support folder for a
“Variable Formats” folder. It scans this folder for XML files and reads the variable formats for each one.
444 IDE 5.7 User’s Guide
Preference and Target Settings Options
Variable Format Tags:
variableformat - Identifies the start of a variable format record.
osName - Restricts format use to the indicated operating system. OS names are “osMac” and “osWin32”.
runtimename - Restricts format use to the indicated runtime model. Runtime names are
“runtimePPCCFM”, “runtimePPCMacho” and “runtimeWin32”.
cpuname - Restricts format use to the indicated CPU model. CPU names are
“cpuPowerPCBig”, “cpuJava” and “cpux86”.
typename - Identifies the name of the Type this record will format.
condition - Specifies a condition that must be met for the format to be used. This can be used to test for one element of data before attempting to format another element.
typenamematch - Specifies how to match type names to variable types. Possible values are: “ExactMatch”, “BeginsWith”, “EndsWith”, and “Contains”.
expression - Specifies an expression string. The expression will be evaluated and the result displayed next to the variable. Before evaluation, all instances of “^var” in the format string will be replaced with the name of the variable.
expressionformat - Specifies the data format to use when formatting an expression. The format names match the menu item names in the “Data” menu: “Pascal String”, “C
String”, “Character”, “Unicode” etc.
Sort function popup
Select the Sort function popup option to sort function names by alphabetical order in list pop-ups. Clear the option to sort function names by order of appearance in the source file.
Source relative includes
Select to search for dependent files in the same location as the source file. If the dependent file is not found in this location, specified User and System paths are searched. If this option is enabled, the Always Search User Paths should also be enabled. For example, if the compiler is currently scanning the main source file and discovers an include header file statement, the header file is searched for in the same location as the main file. If not found, the specified access paths will be searched. If the header file declared in the main file also contains an include statement for another header file, it too will be searched for in the same sequence.
Success
Choose from the Success options a sound to play after a Bring Up To Date or Make operation succeeds.
IDE 5.7 User’s Guide 445
ดาวน์โหลด
โฆษณา