Script
Script
Copyright © 1983-2016 by Green Hills Software. All rights reserved. No part of this publication may be reproduced, stored
in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or
otherwise, without prior written permission from Green Hills Software.
Green Hills, the Green Hills logo, CodeBalance, GMART, GSTART, INTEGRITY, MULTI, and Slingshot are registered
trademarks of Green Hills Software. AdaMULTI, Built with INTEGRITY, EventAnalyzer, G-Cover, GHnet, GHnetLite,
Green Hills Probe, Integrate, ISIM, u-velOSity, PathAnalyzer, Quick Start, ResourceAnalyzer, Safety Critical Products,
SuperTrace Probe, TimeMachine, TotalDeveloper, DoubleCheck, and velOSity are trademarks of Green Hills Software.
All other company, product, or service names mentioned in this book may be trademarks or service marks of their respective
owners.
For a listing of Green Hills Software's periodically updated patent marking information, please visit
http://www.ghs.com/copyright_patent.html.
PubID: script_no_wmaade-558975
Branch: http://toolsvc/branches/release-branch-70
Date: May 6, 2016
Contents
Preface xxi
About This Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxii
The MULTI 7 Document Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiii
Conventions Used in the MULTI Document Set . . . . . . . . . . . . . . . . . . . xxiv
3. MULTI-Python Tutorials 51
Manipulating Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Manipulating the Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Manipulating the Debugger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Using Tcl/Tk to Create a Graphical Interface . . . . . . . . . . . . . . . . . . . . 78
iv MULTI: Scripting
Contents
GHS_RunShellCommands() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
GHS_System() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
6. Basic Functions 91
GHS_IdeObject Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
CleanCmdExecVariables() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
IsAlive() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
7. Window Functions 95
GHS_Window Basic Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
GetCwd() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
GetInfo() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
GetPid() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
IsSameWindow() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
IsWindowAlive() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
RunCommands() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
GHS_Window Configuration Functions . . . . . . . . . . . . . . . . . . . . . . . . 99
ClearDefaultConfigFile() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
LoadConfigFile() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
SaveConfig() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
ShowConfigWindow() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
GHS_Window Directory Functions . . . . . . . . . . . . . . . . . . . . . . . . . . 101
GetIntegrityDistributionDir() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
SetIntegrityDistributionDir() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
GetUvelosityDistributionDir() . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
SetUvelosityDistributionDir() . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
GetLatestDir() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
SetLatestDir() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
GHS_Window Interactive Functions . . . . . . . . . . . . . . . . . . . . . . . . . . 104
Beep() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
ChooseDir() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
ChooseFile() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
ChooseFromList() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
ChooseWindowFromGui() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
ChooseYesNo() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
GetInput() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
ShowMessage() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Wait() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
GHS_Window Menu Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
DumpMenu() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
DumpMenuBar() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
GetCommandToDumpMenu() . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
GetCommandToDumpMenuBar() . . . . . . . . . . . . . . . . . . . . . . . . 111
GetCommandToSelectMenu() . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
GetCommandToSelectMenuPath() . . . . . . . . . . . . . . . . . . . . . . . 113
GetCommandToSelectSubMenu() . . . . . . . . . . . . . . . . . . . . . . . . 113
GetCommandToSelectSubSubMenu() . . . . . . . . . . . . . . . . . . . . 114
IsMenuItemActive() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
IsMenuItemTicked() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
IsSubMenuItemActive() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
IsSubMenuItemTicked() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
SelectMenu() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
SelectSubMenu() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
SelectSubSubMenu() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
WaitForMenuItem() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
GHS_Window Modal Dialog Functions . . . . . . . . . . . . . . . . . . . . . . . 120
GetCommandToRegisterModalDialogCommands() . . . . . . . . . 120
RegisterModalDialogCommands() . . . . . . . . . . . . . . . . . . . . . . . 121
RegisterModalDialogToChangePullDownValue() . . . . . . . . . . 121
RegisterModalDialogToClickButton() . . . . . . . . . . . . . . . . . . . . 122
RegisterModalDialogToDoubleClickMslCell() . . . . . . . . . . . . . 123
RegisterModalDialogToDumpWidget() . . . . . . . . . . . . . . . . . . . 123
RegisterModalDialogToDumpWindow() . . . . . . . . . . . . . . . . . . 124
RegisterModalDialogToSelectMslCell() . . . . . . . . . . . . . . . . . . 125
RegisterModalDialogToSelectMslCellByValue() . . . . . . . . . . . 125
RegisterModalDialogToSelectPullDownMenu() . . . . . . . . . . . . 126
RegisterModalDialogToShowWidgets() . . . . . . . . . . . . . . . . . . . 127
RegisterModalDialogToSortMsl() . . . . . . . . . . . . . . . . . . . . . . . . 127
RemoveRegisteredModalDialogCommands() . . . . . . . . . . . . . . 128
ShowRegisteredModalDialogCommands() . . . . . . . . . . . . . . . . 128
GHS_Window Record Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
RecordGuiOperations() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
GHS_Window Window Attribute and Manipulation Functions . . . 130
CloseWindow() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
GetDimension() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
vi MULTI: Scripting
Contents
GetName() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
GetPosition() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
IconifyWindow() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
IsIconified() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
MoveWindow() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
RenameWindow() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
ResizeWindow() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
RestoreWindow() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
ShowAttributes() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
GetCommandToSelectPullDownMenu() . . . . . . . . . . . . . . . . . . 174
GetPullDownMenu() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
GetPullDownValue() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
SelectPullDownValue() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
GHS_Window Tab Widget Functions . . . . . . . . . . . . . . . . . . . . . . . . . 176
DumpTabContents() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
DumpTabSelection() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
DumpTabValue() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
GetCommandToDumpTab() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
GetCommandToDumpTabSelection() . . . . . . . . . . . . . . . . . . . . . 178
GetCommandToDumpTabValue() . . . . . . . . . . . . . . . . . . . . . . . . 179
GetCommandToSelectTab() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
GetTabNames() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
GetTabSelection() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
SelectTab() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
GHS_Window Text Widget Functions . . . . . . . . . . . . . . . . . . . . . . . . 181
GetCommandToDumpText() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
GetTextValue() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
GHS_Window TextCell Widget Functions . . . . . . . . . . . . . . . . . . . . . 183
DumpTextCellValue() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
GetTextCellValue() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
IsTextCellReadOnly() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
GHS_Window TextField Widget Functions . . . . . . . . . . . . . . . . . . . . 184
ChangeTextFieldValue() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
DumpTextFieldValue() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
GetCommandToChangeTextFieldValue() . . . . . . . . . . . . . . . . . . 185
GetCommandToDumpTextField() . . . . . . . . . . . . . . . . . . . . . . . . 186
GetCommandToReturnOnTextField() . . . . . . . . . . . . . . . . . . . . . 187
GetTextFieldValue() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
IsTextFieldReadOnly() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
ReturnOnTextField() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
CheckWindowObject() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
IsWindowInList() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
GHS_WindowRegister Get Window Functions . . . . . . . . . . . . . . . . . 193
GetCheckoutBrowserWindow() . . . . . . . . . . . . . . . . . . . . . . . . . . 193
GetConnectionOrganizerWindow() . . . . . . . . . . . . . . . . . . . . . . . 194
GetDebuggerWindow() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
GetDialogByName() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
GetDiffViewerWindow() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
GetEditorWindow() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
GetEventAnalyzerWindow() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
GetHelpViewerWindow() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
GetLauncherWindow() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
GetOsaExplorerWindow() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
GetProjectManagerWindow() . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
GetPythonGuiWindow() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
GetResourceAnalyzerWindow() . . . . . . . . . . . . . . . . . . . . . . . . . 197
GetTaskManagerWindow() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
GetTerminalWindow() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
GetTraceWindow() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
GetWindowByIndex() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
GetWindowByName() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
GetWindowList() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
ShowWindowList() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
GHS_WindowRegister Interactive Functions . . . . . . . . . . . . . . . . . . 201
Beep() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
ChooseDir() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
ChooseFile() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
ChooseFromList() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
ChooseWindowFromGui() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
ChooseYesNo() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
GetInput() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
ShowMessage() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
GHS_WindowRegister Window Manipulation Functions . . . . . . . . 206
CloseAllWindows() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
IconifyAllWindows() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
RestoreAllWindows() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
GHS_WindowRegister Wait Functions . . . . . . . . . . . . . . . . . . . . . . . . 207
WaitForWindow() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
x MULTI: Scripting
Contents
WaitForWindowFromClass() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
WaitForWindowGoAway() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
WaitForWindowObjectGoAway() . . . . . . . . . . . . . . . . . . . . . . . . 209
ChangeDebugOnTaskCreation() . . . . . . . . . . . . . . . . . . . . . . . . . 227
ChangeHaltOnAttach() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
ChangeInheritProcessBits() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
ChangeRunOnDetach() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
ChangeStopAfterExec() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230
ChangeStopAfterFork() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231
ChangeStopOnTaskCreation() . . . . . . . . . . . . . . . . . . . . . . . . . . . 231
CheckBreakpointInheritance() . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
CheckDebugChildren() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
CheckDebugOnTaskCreation() . . . . . . . . . . . . . . . . . . . . . . . . . . 233
CheckHaltOnAttach() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
CheckInheritProcessBits() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
CheckRunOnDetach() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
CheckStopAfterExec() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
CheckStopAfterFork() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
CheckStopOnTaskCreation() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
GHS_DebuggerApi Host Information Functions . . . . . . . . . . . . . . . 235
GetHostOsName() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
GetMultiVersion() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
GHS_DebuggerApi Memory Access Functions . . . . . . . . . . . . . . . . 236
ReadIndirectValue() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
ReadIntegerFromMemory() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
ReadStringFromMemory() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
WriteIntegerToMemory() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
WriteStringToMemory() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
GHS_DebuggerApi Run Control Attributes and Functions . . . . . . . 238
DebugProgram() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
GetPc() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
GetProgram() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
GetStatus() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
GetTargetPid() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
Halt() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
IsHalted() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
IsRunning() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
IsStarted() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
Kill() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242
Next() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242
Resume() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
Step() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
WaitToStop() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
GHS_DebuggerApi Symbol Functions . . . . . . . . . . . . . . . . . . . . . . . . 244
CheckSymbol() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
GetSymbolAddress() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
GetSymbolSize() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
GHS_DebuggerApi Target Information Functions . . . . . . . . . . . . . . 245
BigEndianTarget() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
GetCpuFamily() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
GetCpuMinor() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
GetTargetCoProcessor() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
GetTargetCpuFamilyName() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
GetTargetId() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
GetTargetOsMinorType() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
GetTargetOsName() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
GetTargetOsType() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248
GetTargetSeries() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248
IsFreezeMode() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248
IsNativeDebugging() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
IsRunMode() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
GHS_DebuggerApi Window Display Functions . . . . . . . . . . . . . . . . 249
ShowOsaExplorerWindow() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
ShowTaskManagerWindow() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250
ShowTraceWindow() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250
GHS_DebuggerWindow Basic Functions . . . . . . . . . . . . . . . . . . . . . 251
RunCommands() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
GHS_DebuggerWindow Breakpoint Functions . . . . . . . . . . . . . . . . . 251
RemoveBreakpoint() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
SetBreakpoint() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
SetGroupBreakpoint() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
ShowBreakpoints() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
ShowBreakpointWindow() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
GHS_DebuggerWindow Print Functions . . . . . . . . . . . . . . . . . . . . . . 254
DumpToFile() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254
PrintFile() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254
PrintWindow() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
Undo() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270
GHS_EditorWindow File Functions . . . . . . . . . . . . . . . . . . . . . . . . . . 271
CloseCurrentFile() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
GotoNextFile() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
GotoPrevFile() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
OpenFile() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
SaveAsFile() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
SaveIntoFile() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
GHS_EditorWindow Selection and Cursor Functions . . . . . . . . . . . 273
FlashCursor() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
GetSelection() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
GetSelectedString() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
MoveCursor() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
SelectAll() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
SelectRange() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
GHS_EditorWindow Version Control Functions . . . . . . . . . . . . . . . . 276
Checkin() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276
Checkout() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276
PlaceUnderVC() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276
ViewRange() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285
ZoomIn() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285
ZoomOut() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285
ZoomToSelection() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285
GHS_EventAnalyzerWindow Miscellaneous Functions . . . . . . . . . 286
AutoTimeUnit() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
ChangeTimeUnit() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
NewWindow() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
SaveMevConfiguration() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
ShowLegend() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
DeleteWorkspace() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304
GetWorkspaceInformation() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304
GetWorkspaces() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305
LoadWorkspaceFile() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305
SaveWorkspaceIntoFile() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306
SelectWorkspace() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307
GHS_LauncherWindow Variable Functions . . . . . . . . . . . . . . . . . . . 308
AddVariable() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308
ChangeVariable() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309
DeleteVariable() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309
NextFile() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321
GHS_ProjectManagerWindow Debug and Edit Functions . . . . . . . 322
DebugSelectedProjects() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322
EditSelectedProjects() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322
GHS_ProjectManagerWindow Tree Expansion/Contraction
Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323
ContractAll() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323
ContractSelected() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323
ExpandAll() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324
ExpandSelected() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324
PrintAll() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324
PrintView() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325
GHS_ProjectManagerWindow Selection Functions . . . . . . . . . . . . . 325
DoubleClickTreeRow() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325
SelectAll() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326
SelectProject() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326
SelectTreeRow() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327
ToggleLineupColumns() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335
ToggleNumber() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336
ToggleWordDiff() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336
Index 351
Contents
About This Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxii
The MULTI 7 Document Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiii
Conventions Used in the MULTI Document Set . . . . . . . . . . . . . . . . . . . . . . . xxiv
Preface
This preface discusses the purpose of this manual, the MULTI documentation set,
and typographical conventions used.
Note
New or updated information may have become available while this book
was in production. For additional material that was not available at press
time, or for revisions that may have become necessary since this book
was printed, please check your installation directory for release notes,
README files, and other supplementary documentation.
For a comprehensive list of the books provided with your MULTI installation, see
the Help → Manuals menu accessible from most MULTI windows.
• Print
• Online help, accessible from most MULTI windows via the Help → Manuals
menu
• PDF, available in the manuals subdirectory of your IDE or Compiler installation
• gxyz is a command.
• The option -option should either be replaced with one or more appropriate
options or be omitted.
• The word filename should be replaced with the actual filename of an
appropriate file.
The square brackets and the ellipsis should not appear in the actual command you
enter.
MULTI Scripting
Chapter 1
Contents
Script Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Creating a MULTI Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Checking the Syntax of Your Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Running a Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Chapter 1. Using MULTI Scripts
This chapter describes the basic conventions for writing, editing, and running scripts.
Script Overview
A script is a list of commands and expressions in a file. MULTI reads and executes
this file as if you entered each command and expression individually in the Debugger
command pane. Most script files end in an .rc extension and can be run as startup
files. For more information, see “Using Script Files” in Chapter 7, “Configuring
and Customizing MULTI” in the MULTI: Managing Projects and Configuring the
IDE book.
Scripts can automate common tasks and regression testing. For example, a script
file can compare a program variable to a constant value and then perform some
action based on the result. A script file can also execute parts of a program and then
check to see whether the process ran correctly. You can use such a script to verify
that your process still runs as expected even after you change the program.
Scripts can contain macros (see “Using Macros” on page 5) and flow control
statements, such as if (expr) { ... } else { ... } or while(expr) {
... }. You can use these types of statements to control the execution of specific
commands within a script.
You can use board setup scripts to configure your target board automatically before
you download and debug code. Board setup scripts end in an .mbs extension. For
information about using and editing board setup scripts, see Chapter 6, “Configuring
Your Target Hardware” in the MULTI: Debugging book.
4 MULTI: Scripting
Creating a MULTI Script
• Enter the > [file] command to record commands entered in the MULTI
Debugger command pane. For more information, see Chapter 15, “Scripting
Command Reference” in the MULTI: Debugging Command Reference book.
• Use a text editor.
For commands that are particularly useful for writing scripts, see Chapter 15,
“Scripting Command Reference” in the MULTI: Debugging Command Reference
book. You can also use debug server commands in your script if they are preceded
by the target command. For more information about the target command, see
“General Target Connection Commands” in Chapter 17, “Target Connection
Command Reference” in the MULTI: Debugging Command Reference book. For
a list of debug server commands, see the documentation about Green Hills debug
server scripts and commands in the MULTI: Configuring Connections book for
your target processor family. Additionally, the debug server that supports your
specific target may accept other commands. For additional debug server commands,
see the relevant chapter in the MULTI: Configuring Connections book for your
target processor family.
Using Macros
Use the define command to create macros that you can include in MULTI scripts.
(See the define command in “Command Manipulation and Debugger Macro
Commands” in Chapter 15, “Scripting Command Reference” in the MULTI:
Debugging Command Reference book.) The define command is similar to the C
preprocessor directive #define. It gives you the ability to create a macro inside
MULTI. You can later run that macro from the Debugger command pane or from
a script. For an example of a script that references define macros, see
Example 1.1. Regression Testing on page 6.
Example Scripts
The following examples show ways in which you can use scripts to automate
common tasks.
The following regression test example consists of a program that converts Fahrenheit
temperatures to Celsius.
Suppose the source file, temp.c, of the program you are debugging contains the
code:
#include <stdio.h>
#define CONV (5.0/9.0)
extern int mytotal;
int celsius (int fahrenheit) {
int rval = (int) ((fahrenheit - 32) * CONV);
return rval;
}
void main (void) {
int some_degrees;
int some_celsius;
LABEL:
some_celsius = celsius(some_degrees);
printf("some_celsius = %i", some_celsius);
}
You define a script file, temp.rc, that MULTI loads every time you debug temp.
The temp.rc file contains:
debugbutton RegTest1 c="<regtest.rc" i=”letter_r”
define check_celsius(arg) {
if (some_celsius != arg) {
print "Failed!"
printf ("Failed!\n actual:%d\n expected:%d\n", some_celsius, arg);
} else {
print "Pass";
printf ("Pass!\n actual:%d\n expected:%d\n", some_celsius, arg);
}
}
In a script file named regtest.rc, you define the commands that MULTI runs when
you click the RegTest1 button. The regtest.rc file contains:
b main##LABEL
rb
some_degrees = 45;
S
6 MULTI: Scripting
Example Scripts
wait
check_celsius(7);
cb
Now, when you start the MULTI Debugger on temp, MULTI runs the script temp.rc
automatically. The script creates a button with the name RegTest1 and the built-in
icon letter_r with the shape of the letter “R.” The script also defines the macro
check_celsius. When you click the RegTest1 button, MULTI runs the commands
in regtest.rc as if you entered them directly in the Debugger command pane. You
must be connected to a target before running these commands.
The following example script single-steps 100 times and writes executed lines to
the MULTI command pane, allowing you to see exactly what lines of source code
and which instructions were executed. This process is similar to collecting and
analyzing trace data, but is much slower and requires manual analysis. As a result,
it is typically only useful if your target does not support trace.
This script works well for stepping through code that you do not have the source
to (library code, for example). It does not work well if your program has timing
requirements or if your program requires that interrupts be enabled.
$i = 100;
while ($i > 0){
$i--;
si;
printline;
wait;
}
You can insert other commands into the loop, as shown below:
$i = 100;
while ($i > 0) {
$i--;
si;
wait;
$r3;
printline;
wait;
}
In addition to single-stepping 100 times and writing executed lines to the MULTI
command pane, the preceding script reads and prints register r3 at each step,
allowing you to easily track its value.
For greater flexibility, you can define a macro such as the following:
> define step_and_record($n){$m = $n; while ($m > 0) {
si; wait; printline; eval $m=$m-1 } }
> step_and_record(1000)
Rather than printing execution information as the preceding example does, the
following script updates the source pane as MULTI steps through source code (press
Esc to abort).
while(1){
s;
wait;
E;
update;
wait -time 100;
}
The following script reads from and writes to a variable in memory. You can also
use the MULTI commands memread and memwrite to do this. For information
8 MULTI: Scripting
Example Scripts
about these commands, see “General Memory Commands” in Chapter 10, “Memory
Command Reference” in the MULTI: Debugging Command Reference book.
> $a = *(unsigned int *)0x8000f0000
> *(unsigned int *)0x8000f0000 = $a + 1
The following script gets the uppercase version of a string and prints the string to
the command pane:
define $m_toupper($str) {
eval $i=0;
while (( *($str+$i) ) !=0 ){
eval ($func_char = (*($str+$i)));
if (($func_char>='a') && ($func_char<='z')) {
eval ((*($str+$i)) = $func_char + ('A'-'a'));
}
eval $i++;
}
mprintf("%s\n",$str);
}
By default, strings that you use are stored in target memory. This can be quite useful
when you are debugging because it allows you to do things like make a command
line function call, passing in as an argument a variable you invent during run time.
However, at times you may want to use a string that does not exist on the target but
that you can use in the course of a script or other debug action. To work around the
default behavior, you can define a macro that returns a string. Because you cannot
actually allocate a string, use the mprintf command to simply echo the string to
the screen (see the mprintf command in Chapter 8, “Display and Print Command
Reference” in the MULTI: Debugging Command Reference book). Then use the
substitute command to make use of the echoed value. The substitute command
replaces the expression %EVAL{command} with the output of command. (See the
substitute command in “Command Manipulation and Debugger Macro Commands”
in Chapter 15, “Scripting Command Reference” in the MULTI: Debugging Command
Reference book.)
This script uses ip_addr() as a string variable and creates a Debugger button with
two occurrences of ip_addr() in it.
Note
Use the bpSyntaxChecking configuration option to control whether
MULTI checks the syntax of the commands associated with breakpoints.
By default, MULTI checks the syntax of a breakpoint's command list
when the breakpoint is set and also when you enter the sc command. For
more information about the bpSyntaxChecking configuration option,
see Chapter 8, “Configuration Options” in the MULTI: Managing Projects
and Configuring the IDE book.
1. When you use the bu command to set a breakpoint, the sc command cannot
check syntax errors in commands associated with the breakpoint. The bu
command sets up-level breakpoints; the context of the breakpoint depends on
dynamic execution. For example, if you enter bu { print varA }, MULTI
cannot determine the up-level function until it actually encounters the bu
command while running the script. When syntax checking the script, MULTI
has no way to check if the variable varA is a valid reference.
10 MULTI: Scripting
Running a Script
2. The sc command cannot check for syntax errors in the body of a macro.
3. The sc command treats all local variable references that are not located in a
breakpoint command as errors. The following script contains an example of
this.
b main#10 {if (argc>2) {print argc+i;} else {print "Too few arguments"}};
print argc+i;
print global_var;
If the function main contains the number variables argc and i, and there is
a global variable global_var, the sc command accepts the first and the third
lines. However, the sc command treats the second line as an error because
MULTI cannot determine the context in which it performs the print argc+i
statement.
Running a Script
To run a script, you can:
• Enter the < command followed by the file argument. For more information,
see Chapter 15, “Scripting Command Reference” in the MULTI: Debugging
Command Reference book.
• Enter the -p or -rc option when starting MULTI from the command line. For
more information, see Appendix C, “Command Line Reference” in the MULTI:
Debugging book.
• Create a button or menu item that uses the < command to execute the script.
For information, see “Configuring and Customizing Toolbar Buttons” in Chapter
7, “Configuring and Customizing MULTI” in the MULTI: Managing Projects
and Configuring the IDE book.
• Save the script as one of the following types of startup scripts, which MULTI
runs automatically at specific times:
○ User script file (multi.irc, multi.prc, or multi.rc)
○ Program script file (executable_name.rc)
For more information about these file types, their locations, and the order in
which they run at startup, see “Using Script Files” in Chapter 7, “Configuring
12 MULTI: Scripting
Part II
MULTI-Python Scripting
Chapter 2
Introduction to the
MULTI-Python Integration
Contents
Python Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
MULTI-Python Compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Overview of MULTI-Python Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
MULTI-Python Utility Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
MULTI-Python Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
MULTI-Python Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
The mpythonrun Utility Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Creating a Graphical Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Chapter 2. Introduction to the MULTI-Python Integration
The documentation for the MULTI-Python integration assumes that you have a
basic knowledge of Python. To learn more about Python, see the Python Web site
[http://www.python.org].
The MULTI-Python integrated system allows you to use Python code to drive all
MULTI IDE components, including the MULTI Project Manager, Debugger, and
Editor.
• Classes enabling you to access the functions of each MULTI IDE component
• Classes enabling you to access the functions of many MULTI IDE windows
• A general MULTI IDE window class that provides common functions for
windows
• Python utility functions and variables for the MULTI IDE
• GUI and non-GUI interfaces in which to run MULTI-Python statements
For examples that demonstrate how to use MULTI-Python to access the MULTI
IDE, see Chapter 3, “MULTI-Python Tutorials” on page 51.
Python Installation
After you have installed MULTI, you should be able to use Python immediately.
On Windows and Linux, the MULTI IDE installation contains a complete 32-bit
Python 2.7.3 installation. On Solaris, the Python 2.7.3 installation does not include
the ctypes package (which is required by the TimeMachine API) or the Tcl/Tk
interpreter and GUI package. To work around this, you can:
1. Download Python 2.7.3 (which includes the ctypes module and Tcl/Tk
interpreter) from the Python Web site [http://www.python.org].
2. Compile and install Python on your 32-bit Solaris machine.
3. Install the Tcl/Tk GUI package if you want to use Tcl/Tk.
4. Follow the instructions in “Using a Customized Python Installation”
on page 18.
16 MULTI: Scripting
The Default Python Installation
Note
A few Python script files in the Python installation that is shipped with
the IDE have been modified to fix bugs.
• Windows — defaults\python
• Linux/Solaris — defaults/python
• On 32-bit Windows:
○ HKEY_LOCAL_MACHINE\Software\Python\PythonCore\2.7\InstallPath
○ HKEY_LOCAL_MACHINE\Software\Python\PythonCore\2.7\PythonPath
• On 64-bit Windows:
○ HKEY_LOCAL_MACHINE\Software\Wow6432Node\Python\PythonCore\2.7\InstallPath
○ HKEY_LOCAL_MACHINE\Software\Wow6432Node\Python\PythonCore\2.7\PythonPath
ide_install_dir\python
Note
If GHS_PYTHONHOME points to a release that is not officially
supported by MULTI's customized Python interpreter (see the next
section for compatibility information), the MULTI-Python integration
may not work.
Variables will take effect the next time you start a MULTI session.
MULTI-Python Compatibility
MULTI-Python's customized Python interpreter is intended for the 32-bit Python
2.7.3 release. 64-bit modules/libraries are not supported.
GHS_IdeObject Attributes
GHS_IdeObject is the base class of all MULTI-Python service classes, window
classes, and Debugger object classes. It contains the following attributes. Many of
the attributes refer to services. Each MULTI IDE component is usually implemented
as a service.
18 MULTI: Scripting
MULTI-Python Service Classes
For information about the functions defined for a MULTI-Python class (if any), see
Part III. MULTI-Python API Reference on page 81.
GHS_Window Attributes
The MULTI-Python class GHS_Window, which is derived from the GHS_IdeObject
class, can represent all MULTI windows.
20 MULTI: Scripting
MULTI-Python Window Classes
The MULTI-Python integrated system provides Python classes for select MULTI
windows. The following table lists these Python classes, which are referred to as
window classes, and the corresponding MULTI windows.
Python Window Class Corresponding MULTI Window
GHS_CoBrowseWindow Checkout Browser
GHS_ConnectionOrganizerWindow Connection Organizer (used in the Debugger)
GHS_DebuggerWindow Debugger
GHS_DiffViewWindow Diff Viewer
GHS_EditorWindow Editor
GHS_EventAnalyzerWindow EventAnalyzer
GHS_HelpViewerWindow Help Viewer
GHS_LauncherWindow Launcher
GHS_OsaWindow OSA Explorer (used in the Debugger)
For information about the functions defined for a MULTI-Python class (if any), see
Part III. MULTI-Python API Reference on page 81.
For information about the functions defined for a MULTI-Python class, see
Part III. MULTI-Python API Reference on page 81.
For information about the functions defined for a MULTI-Python class, see
Part III. MULTI-Python API Reference on page 81.
22 MULTI: Scripting
MULTI-Python Miscellaneous Classes
For information about the functions defined for a MULTI-Python class, see
Part III. MULTI-Python API Reference on page 81.
The following diagram includes classes related to MULTI windows, the Editor, the
Launcher, and the Python GUI.
24 MULTI: Scripting
MULTI-Python Class Hierarchy
object
GHS_IdeObject
GHS_Window
GHS_Window GHS_Editor
Register
GHS_Python
GHS_Launcher
Gui
The following diagram includes classes related to the Project Manager, MULTI
windows, the Debugger, debug servers, and tasks.
object
GHS_IdeObject
GHS_Project GHS_Debugger
GHS_Window
Manager Api
GHS_Project
GHS_Debugger GHS_Debug
Manager GHS_Debugger
Window Server
Window
GHS_Task
26 MULTI: Scripting
MULTI-Python Class Hierarchy
The following diagram includes classes related to MULTI windows, the Trace List,
the Task Manager, the Connection Organizer, and the OSA Explorer.
object
GHS_IdeObject
GHS_Window
object
GHS_IdeObject
GHS_Event
GHS_Window GHS_Terminal GHS_CoBrowse
Analyzer
GHS_Event
GHS_Terminal GHS_Co
Analyzer
Window BrowseWindow
Window
28 MULTI: Scripting
MULTI-Python Class Hierarchy
The following diagram includes classes related to the Diff Viewer, MULTI windows,
and the Help Viewer.
object
GHS_IdeObject
GHS_DiffView GHS_Window
GHS_DiffView GHS_Help
Window ViewerWindow
Note
Utility functions are documented in mixed case for readability, but you
may also enter them in all lowercase letters. For example,
GHS_ExecFile() and ghs_execfile() are equivalent and are both
valid.
When a Python script is executed via the mpythonrun utility program or via
the MULTI Debugger python command, the script is actually run with the
GHS_ExecFile() function.
• GHS_PrintObject() — Prints the given list, tuple or dictionary object
in better format than the standard print statement. This utility function prints
one element per line and indents nested objects.
• GHS_RunShellCommands() — Executes shell commands, captures their
status, grabs output from stdout and/or stderr on request (grabbing output
from stderr is supported only in POSIX environments), and returns a tuple
such as the following:
(exitCode, stdoutOutput, stderrOutput)
30 MULTI: Scripting
MULTI-Python Variables
MULTI-Python Variables
Pre-Set Variables
The MULTI-Python integrated system includes the following pre-set variables.
The third column in the table notes whether the specified object has been pre-created.
If an object is pre-created, you can use it immediately in Python statements or scripts
that are executed in the MULTI-Python environment. If an object is not pre-created,
its value is None.
32 MULTI: Scripting
Reserved Variable Names
After the MULTI-Python context is initialized, the following Python scripts are
executed (if they exist) in the order listed:
You can also extend the MULTI-Python environment by running Python statements
or scripts via the interfaces described in the next section.
34 MULTI: Scripting
MULTI-Python Interfaces
MULTI-Python Interfaces
MULTI provides the following interfaces from which you can execute Python
statements:
• The Debugger's Py pane, which you can access by clicking the Py tab located
at the bottom of the Debugger window.
36 MULTI: Scripting
MULTI-Python Interfaces
• The stand-alone Python GUI, which you can open from the Launcher by
selecting Components → Open Python GUI or from the host machine's
command line by running mpythongui.
In addition to executing Python statements via one of the preceding interfaces, you
can:
• Run the python command in the Debugger command pane. This command
can accept a Python statement string or a Python script. For information about
the python command, see Chapter 15, “Scripting Command Reference” in the
MULTI: Debugging Command Reference book.
• Add a Python Statement or Python Script action to your workspace. For
information about creating actions, see “Creating or Modifying an Action” in
Chapter 3, “Managing Workspaces and Shortcuts with the Launcher” in the
MULTI: Managing Projects and Configuring the IDE book.
• Send Python statements (via your program or a third-party tool such as telnet)
to the socket servers provided by the mpythonrun program. See “The
mpythonrun Utility Program” on page 42.
Interface Comparison
The stand-alone Python GUI and the Debugger's Py pane and Py Window provide
similar interfaces where you can run Python statements. A comparison between the
Python GUI and the Debugger's Py pane/Py Window follows.
Note
The Py Window provides more space than the Py pane, but they are
otherwise the same.
The Py pane, which is present in the Debugger window, the Py Window, and the
Python GUI provide the following features:
• Syntax coloring and automatic indentation. You can manually adjust indentation
by using the keystrokes provided later in this section.
• Line numbers in the command prompt for:
○ Compound statement blocks containing multiple lines.
○ Statements pasted into the Py pane.
If an error occurs on one of these lines, the Python interpreter reports the line
number so that you can easily find the error location.
• The commands and keyboard shortcuts described in the next section.
38 MULTI: Scripting
Py Pane/Py Window Commands and Keyboard Shortcuts
The following table lists an equivalent alias with each command, and it lists keyboard
shortcuts where applicable.
Note
These commands are recognized only when no other text precedes them
on the command line. Spaces or tabs preceding the commands are okay.
$clear [-pane]
$c [-pane]
Clears buffered Python statements (that is, input to the Py pane or Py Window) if you do not
specify the -pane option. Clears the content of the pane/window if you do specify the -pane
option.
$display [-new]
$d [-new]
Displays Python statements that have already executed. If you specify the -new option, this
command displays Python statements that have not yet executed.
$execute
$e
Executes Python statements that have not yet executed.
By default, this command is bound to:
• Ctrl+Enter
$getinteractive
$gi
Prints whether interactive mode is enabled (On) or disabled (Off).
$help arguments
$h arguments
Displays help information in the Py pane, Py Window, or Help Viewer. The arguments that
you pass to the command determine where the help appears. For a list of available arguments,
run the $help command without any arguments.
By default, this command is bound to:
• Ctrl+h
• Ctrl+s
• Ctrl+Shift+s
40 MULTI: Scripting
Py Pane/Py Window Commands and Keyboard Shortcuts
The Py pane and Py Window support the following keyboard shortcuts, which are
bound to the preceding commands.
Ctrl+h
Prints available arguments to the Py pane or Py Window.
By default, this keyboard shortcut is bound to:
• $help
Ctrl+i
Indents the defined number of spaces. Indent size is configured in the Options window. For
more information about the Indent size option, see “MULTI Editor Configuration Options” in
Chapter 8, “Configuration Options” in the MULTI: Managing Projects and Configuring the
IDE book.
Ctrl+Shift+i
Un-indents the defined number of spaces. Indent size is configured in the Options window.
For more information about the Indent size option, see “MULTI Editor Configuration Options”
in Chapter 8, “Configuration Options” in the MULTI: Managing Projects and Configuring the
IDE book.
Ctrl+Enter
Executes Python statements that have not yet executed.
By default, this keyboard shortcut is bound to:
• $execute
Esc
Aborts execution of pending Python statements.
Ctrl+s
Saves buffered Python statements (that is, input to the Py pane or Py Window) in the file you
specify.
By default, this keyboard shortcut is bound to:
• $save
Ctrl+Shift+s
Saves buffered Python statements (that is, input to the Py pane or Py Window) in the file you
specify, and opens the saved file in the MULTI Editor.
By default, this keyboard shortcut is bound to:
• $save -open
• The host operating system's command line (see “Running Python Statements
and Scripts” on page 44)
• A telnet socket or plain socket connection (see “Starting Socket Servers”
on page 45)
To start mpythonrun from the host operating system's command line, enter the
path to mpythonrun.exe. The mpythonrun executable is located in your MULTI
IDE installation. For a complete list of mpythonrun command line options, see
the next section.
Note
For examples and for more information about many of the following
command line options, see “Running Python Statements and Scripts”
on page 44 and “Starting Socket Servers” on page 45.
42 MULTI: Scripting
mpythonrun Command Line Options
-statement Python_statement(s)
-s Python_statement(s)
Specifies the Python statement(s) to be run.
-telnet port
Specifies the telnet socket server. If you do not specify a port number, the system automatically
allocates one and prints it out. See also the -socket option earlier in this table.
-verbose yes|no
Turns on/off verbose mode. In verbose mode (the default), extra messages are printed to separate
output from Python statements or scripts given on the command line.
• Begin Python statement strings with the -statement or -s command line option.
For example:
mpythonrun -s "import time" -s "print('Current Time:'); print time.asctime()"
Note
In the MULTI-Python GUI environment, you can abort an executing
Python statement by pressing Esc. You cannot abort an executing Python
statement in the mpythonrun utility program; you can only kill the
process. As a result, you should be careful not to submit Python statements
containing infinite loops.
44 MULTI: Scripting
Starting Socket Servers
For example, to run a single script and argument list, you could enter:
mpythonrun -f pr.py -args haha -a -9 --
or
mpythonrun -f pr.py -args haha -a -9 -- -
To run two scripts, one with an argument list, you could enter:
mpythonrun -f pr.py -args haha -a -9 -- - -f pr.py
If you specify multiple Python statements or Python script files on the command
line, they execute sequentially.
• Plain sockets — Enter the -socket command line option followed by a port
number. If you do not specify a port number after this option, the system
dynamically allocates one and prints it to the console (Windows) or to stdout
(Linux/Solaris).
• Telnet sockets — Enter the -telnet command line option followed by a port
number. If you do not specify a port number after this option, the system
dynamically allocates one and prints it to the console (Windows) or to stdout
(Linux/Solaris).
Note
The mpythonrun telnet socket server supports well-programmed
telnet clients. (A well-programmed telnet client should be able to
adjust its settings to work with the telnet socket server.) The
Windows telnet client and some others are not well supported. A
plain socket is not meant to support telnet protocol, but should work
well if your program treats it as a normal socket.
If you establish two socket servers at the same time, they share the same Python
context. Python statements coming from the two sockets are executed sequentially,
but the socket order is not specified. Any Python statements or Python script files
46 MULTI: Scripting
Socket Server Commands
that you specify on the command line execute first. The mpythonrun utility program
uses the resulting execution context to execute Python statements from the sockets.
Note
These commands are recognized only when no other text precedes them
on the command line. Spaces or tabs preceding the commands are okay.
Using these mechanisms, you can write an interactive script to drive the MULTI
IDE. However, if you are trying to create a complex GUI, the basic mechanisms
that MULTI-Python provides may not be sufficient. In this case, you can use a
Python GUI package, such as the Tcl/Tk GUI package. For information about this
package, see the Python Web site [http://www.python.org].
The Python GUI package for Tcl/Tk requires extra third-party tools, including
Tcl/Tk and, for Linux on x86, the BLT extension. The MULTI IDE installation
contains the following third-party tools for your convenience; you should install
any software additionally required in your environment:
To use Tcl/Tk on Solaris, download Python 2.7.3 (which includes the Tcl/Tk
interpreter) from the Python Web site [http://www.python.org], compile it on your
32-bit Solaris machine, install the Tcl/Tk GUI package, and follow the instructions
in “Using a Customized Python Installation” on page 18.
48 MULTI: Scripting
Troubleshooting
To view a simple GUI demo that was created with Tcl/Tk, run the following Python
statement:
execfile(__ghs_site_default_python_dir+os.sep+"ghs_guidemo.py")
Troubleshooting
• The MULTI-Python integrated system does not support Python input functions
(such as input() and raw_input()) or getting input from stdin.
MULTI-Python provides its own set of functions to handle input. See
“GHS_Window Interactive Functions” on page 104.
• If, when you are executing Python statements from the MULTI-Python
integration context, you get an error message for the undefined symbol
PyUnicodeUCS2_FromUnicode or PyUnicodeUCS4_FromUnicode, install
Python 2.7.3 from the Python Web site [http://www.python.org]. Follow the
Python installation instructions, but give the argument:
--enable-unicode=ucs2
or
--enable-unicode=ucs4
The Python installation included with the MULTI IDE installation is compiled
with ucs2 (the default setting on a 32-bit host).
MULTI-Python Tutorials
Contents
Manipulating Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Manipulating the Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Manipulating the Debugger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Using Tcl/Tk to Create a Graphical Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
Chapter 3. MULTI-Python Tutorials
Because these examples were run in the MULTI Py pane, the Python> prompt is
listed before each Python statement.
Manipulating Windows
The following sequential examples demonstrate how to use MULTI-Python to
manipulate windows. Many of the examples use the context created by a preceding
example. Where this is the case, the appropriate example is referenced.
Note
The following are only examples. You may see different results in your
MULTI environment.
This example lists all the MULTI windows that are currently open.
Python> winreg.ShowWins(False)
Py Out: Index Class Name Window Name
Py Out: ===== ========== ===========
Py Out: 0 Debuggers mpythonrun.exe
Py Out: 1 Debuggers me.exe
Py Out: 2 None Py Window
Py Out: 3 None References of pySystem
Py Out: 4 Python GUI MULTI Python GUI
Py Out: 5 Editors multi_ide_script.xml
Py Out: 6 Editors ghs_window.py
Py Out:
Py Out: Total number of windows: 7
where:
52 MULTI: Scripting
Manipulating Windows
This example opens a modal dialog box that allows the user to select a window for
display. In this example, the stand-alone Python GUI was selected.
Python> w = winreg.ChooseWin()
Python> print w.windowName
Py Out: MULTI Python GUI
where:
• The variable w stores the Python object of class GHS_Window for the selected
window.
• winreg is a pre-created object for class GHS_WindowRegister. See “Reserved
Variable Names” on page 32.
• ChooseWin() allows you to choose a window from a window list and then
returns an object for the chosen window. For more information, see
“ChooseWindowFromGui()” on page 203.
• The operation print w.windowName prints the name of the returned Python
object (which is kept in the variable w).
• MULTI Python GUI is the name of the window represented by the Python
object.
This example creates a window object for the window with index 5 in
Example 3.1. Listing All MULTI IDE Windows on page 52.
Python> w = winreg.GetWinByIdx(5)
Python> print w.windowName
Py Out: multi_ide_script.xml
where:
• The variable w stores the Python object of class GHS_EditorWindow for the
specified Editor window.
• winreg is a pre-created object for class GHS_WindowRegister. See “Reserved
Variable Names” on page 32.
• GetWinByIdx() gets a GHS_Window object from an entry in a window list
and returns the created GHS_Window object. For more information, see
“GetWindowByIndex()” on page 199.
• The argument 5 specifies that the window object is created for the window
indexed as 5 in Example 3.1. Listing All MULTI IDE Windows on page 52.
For more arguments to GetWinByIdx(), see “GetWindowByIndex()”
on page 199.
• The operation print w.windowName prints the name of the returned Python
object (which is kept in the variable w).
• multi_ide_script.xml is the name of the window represented by the Python
object, which is an instance of class GHS_EditorWindow. Refer to
Example 3.1. Listing All MULTI IDE Windows on page 52: the window
indexed as 5 belongs to the class Editors.
54 MULTI: Scripting
Manipulating Windows
Python> w = winreg.GetDebugger()
Python> print w.windowName
Py Out: mpythonrun.exe
where:
This example creates a GHS_Window object for the MULTI window whose name
contains multi.
Python> w = winreg.GetWin("multi")
Python> print w.windowName
Py Out: multi_ide_script.xml
where:
• The variable w stores the Python object of class GHS_EditorWindow for the
window whose name contains multi.
• winreg is a pre-created object for class GHS_WindowRegister. See “Reserved
Variable Names” on page 32.
• GetWin() gets a MULTI IDE window from its name, which is a regular
expression, and returns the created GHS_Window object. For more information,
see “GetWindowByName()” on page 199.
• The argument multi is the name of the existing window for which the object
is created. For more arguments to GetWin(), see “GetWindowByName()”
on page 199.
• The operation print w.windowName prints the name of the returned Python
object (which is kept in the variable w).
• multi_ide_script.xml is the name of the window represented by the Python
object, which is an instance of class GHS_EditorWindow. Refer to
Example 3.1. Listing All MULTI IDE Windows on page 52: the window
named multi_ide_script.xml belongs to the Editors class.
This example brings the specified window to the foreground. Within the context of
these sequential examples, the GHS_Window object w specifies the window named
multi_ide_script.xml gotten in Example 3.5. Creating a GHS_Window Object By
Window Name on page 55.
Python> w.RestoreWin()
where:
This example moves the specified window right 100 pixels and down 200 pixels.
Within the context of these sequential examples, the window object w specifies the
window named multi_ide_script.xml gotten in Example 3.5. Creating a
GHS_Window Object By Window Name on page 55.
Python> w.MoveWin(100, 200)
where:
56 MULTI: Scripting
Manipulating Windows
• The arguments 100 and 200 specify the number of pixels to move the window.
For more arguments to MoveWin(), see “MoveWindow()” on page 132.
This example positions the left side of the window in the middle of the screen and
the top side 100 pixels from the top of the screen. Within the context of these
sequential examples, the window object w specifies the window named
multi_ide_script.xml gotten in Example 3.5. Creating a GHS_Window Object By
Window Name on page 55.
Python> w.MoveWin(__ghs_display_width/2, 100, False)
where:
This example resizes the specified window so that its width is one-third of the screen
and its height is one-half of the screen. Within the context of these sequential
examples, the window object w specifies the window named multi_ide_script.xml
gotten in Example 3.5. Creating a GHS_Window Object By Window Name
on page 55.
Python> w.ResizeWin(__ghs_display_width/3,
.....2 __ghs_display_height/2, False)
where:
This example displays a modal dialog box that prompts the user for confirmation.
where:
58 MULTI: Scripting
Manipulating Windows
This example displays a modal dialog box that prompts the user to choose between
Yes and No. In this example, Yes was clicked.
where:
• The variable ret stores your choice (True for Yes and False for No).
• w is the Python object of class GHS_EditorWindow created in
Example 3.5. Creating a GHS_Window Object By Window Name on page 55.
• YesNo() displays the specified message in a modal dialog box that prompts
the user to choose between Yes and No. This function returns True for Yes
and False for No. For more information, see “ChooseYesNo()” on page 107.
• The string enclosed in quotation marks is the message that the dialog box
displays. For more arguments to YesNo(), see “ChooseYesNo()” on page 107.
• The operation print ret prints the returned value.
• True is the returned value and indicates that the dialog's Yes button was clicked.
This example displays a modal dialog box that asks for user input. In the dialog
box that appears, the user can enter a value or select one from the given list. In this
example, 93117 was selected from the list of pre-defined values.
where:
• The variable ret stores the string that you choose from the given list or that
you type in.
• w is the Python object of class GHS_EditorWindow created in
Example 3.5. Creating a GHS_Window Object By Window Name on page 55.
• GetInput() displays the specified values in a modal dialog box and returns
user input or an empty string ("") upon failure or cancellation. For more
information, see “GetInput()” on page 108.
• The empty string ("") indicates that the dialog box does not contain a default
value.
• 93101, 93117, 93118 specify the dialog box's pre-defined values.
• False indicates that in addition to choosing from the list of pre-defined values,
the user can enter their own value.
• Zip Code is the prompt that is given in the dialog box. Because no title is
specified for the dialog box, the Zip Code prompt is also used for the title.
• The operation print ret prints the returned value.
• 93117 is the returned value.
60 MULTI: Scripting
Manipulating Windows
This example displays a modal dialog box that prompts you to choose a value from
a two-column list.
When you select a value in a multiple-column list, the value from the first column
is returned. In this example, the Recruiting entry was selected.
where:
• The variable ret stores the string from the first column of the row you choose.
• w is the Python object of class GHS_EditorWindow created in
Example 3.5. Creating a GHS_Window Object By Window Name on page 55.
• ChooseFromList() displays the specified list values in a modal dialog box
and returns the string selected from the list, or it returns an empty string ("")
upon failure or cancellation. For more information, see “ChooseFromList()”
on page 106.
• The argument 0 specifies the index of the default value.
• MULTI#100, Compiler#200, INTEGRITY#300, Probe#400, and
Recruiting#500 are the pre-defined values present in the dialog box.
where:
• The variable ret stores the path for the file you choose.
• w is the Python object of class GHS_EditorWindow created in
Example 3.5. Creating a GHS_Window Object By Window Name on page 55.
• ChooseFile() allows you to select a file path via MULTI's file chooser. This
function returns the selected file path or an empty string ("") upon failure or
cancellation. For more information, see “ChooseFile()” on page 105.
• The operation print ret prints the path to the selected file.
• /home/puma/devl/src/indgen.cc is the returned value.
where:
• The variable ret stores the path for the directory you choose.
• w is the Python object of class GHS_EditorWindow created in
Example 3.5. Creating a GHS_Window Object By Window Name on page 55.
62 MULTI: Scripting
Manipulating Windows
where:
• The variable ret stores the string from the first column of the row you choose.
• winreg is a pre-created object for class GHS_WindowRegister. See “Reserved
Variable Names” on page 32.
• ChooseFromList() returns the string selected from the list or returns an
empty string ("") upon failure or cancellation. For information about the
arguments, see Example 3.13. Displaying a Multiple-Column List on page 61.
For more information about the function, see “ChooseFromList()” on page 203.
This example lists a window's widgets. You can use a widget name to view and
change the widget's value. See Example 3.18. Displaying the Value of a PullDown
Widget on page 65.
Python> w.Widgets()
Py Out: EditMenuBar: MenuBar
Py Out: : Rectangle
Py Out: EditBtns: ButtonSet
where:
64 MULTI: Scripting
Manipulating Windows
This example displays the value of the PullDown widget that appears in
Example 3.17. Listing a Window's Widgets on page 63.
Python> print w.GetPdVal("pulldown")
Py Out: multi_ide_script.xml
where:
This example closes the specified window. Within the context of these sequential
examples, the window object w specifies the window named multi_ide_script.xml.
See Example 3.5. Creating a GHS_Window Object By Window Name on page 55.
Python> w.CloseWin()
Python> winreg.ShowWins(False)
Py Out: Index Class Name Window Name
Py Out: ===== ========== ===========
Py Out: 0 Debuggers mpythonrun.exe
Py Out: 1 Debuggers me.exe
Py Out: 2 None Py Window
Py Out: 3 None References of pySystem
Py Out: 4 Python GUI MULTI Python GUI
Py Out: 5 Editors ghs_window.py
Py Out:
Py Out: Total number of windows: 6
where:
For information about specifying the service name and working directory of the
Editor service object, see “__init__()” on page 266.
This example opens the specified file (test.gpy) in the MULTI Editor.
Python> ew = editor.OpenFile("test.gpy")
where:
• The variable ew stores the Python object of class GHS_EditorWindow for the
open file.
• editor is the object created in Example 3.20. Creating an Editor Service
Object on page 66.
66 MULTI: Scripting
Manipulating the Editor
This example selects text from line 1, column 2 to line 10, column 7 (both line and
column numbers start at 1). Within the context of these sequential examples, the
GHS_EditorWindow object ew specifies the test.gpy Editor window. See
Example 3.21. Opening a File in the Editor on page 66.
Python> ew.Select(1, 2, 10, 7)
where:
where:
where:
This example pastes the clipboard selection to the current cursor position.
Python> ew.Paste()
where:
This example undoes the last change to the current file. In the context of these
sequential examples, the paste operation is undone.
Python> ew.Undo()
where:
68 MULTI: Scripting
Manipulating the Debugger
For information about specifying the working directory of the Debugger service
object, see “__init__()” on page 225.
where:
This example demonstrates how you can use the pre-defined variable self_dbw
in one of the Debugger's MULTI-Python interfaces to refer to the Debugger window
itself. The Debugger's MULTI-Python interfaces include:
• The Py pane
• The Cmd pane when Python statements are executed by the python or py
command (for information about these commands, see “MULTI-Python Script
Commands” in Chapter 15, “Scripting Command Reference” in the MULTI:
Debugging Command Reference book)
Python> self_dbw.IsConnected()
where:
Python> fm = dw.Connect("isimppc")
where:
70 MULTI: Scripting
Manipulating the Debugger
This example demonstrates how you can use the pre-defined variable self_dbs.
When used in one of the Debugger's MULTI-Python interfaces, this variable refers
to the debug server that is connected to the program selected in the Debugger's
target list. The value of self_dbs may change if you select a different entry in the
target list. If no debug server is connected, self_dbs has the value None. For
information about the Debugger's MULTI-Python interfaces, see
Example 3.29. Referring to a Debugger Window with a Pre-Created Variable
on page 70.
Python> if self_dbs:
.....2 self_dbs.Step()
where:
This example runs the program currently being debugged on the target (here the
kernel program).
Python> dw.Run()
where:
This example accesses the value of ASP_Log2PageSize from the program being
debugged on the target.
where:
This example establishes a run-mode connection between the local host and the
rtserv debug server.
Python> rm = dw.Rtserv()
where:
72 MULTI: Scripting
Manipulating the Debugger
where:
where:
This example changes the Task Manager display from hierarchy view (the default)
into flat view. See also Example 3.38. Selecting the Task Manager's Hierarchy View
on page 74.
Python> tw.SelectMenu("&View", "F&lat View", True)
Py Out: You can't switch to a customized group in flat view mode.
where:
This example changes the Task Manager display back to hierarchy view. See also
Example 3.37. Selecting the Task Manager's Flat View on page 73.
Python> tw.SelectMenu("&View", "F&lat View", True)
where:
74 MULTI: Scripting
Manipulating the Debugger
where:
Use GHS_MslTree to dump and display a better-formatted task list. In this example,
the Stack column is hidden so that the output fits onto one page, and the environment
is different from that of the previous example, so task IDs do not match those shown
above.
Python> mt = tw.GetMslTree("Obj_List")
Python> mt.Dump()
Py Out: Row# Contents of Obj_List (Expansion Name: [Column0] [Column1]...)
Py Out: 0 - pizzahut: [pizzahut] [] [] []
Py Out: 1 |_ Initial: [Initial] [0x705000] [Halted] [127]
Py Out: 2 - information: [information] [] [] []
Py Out: 3 |_ Initial: [Initial] [0x73f000] [Halted] [127]
Py Out: 4 - engineer: [engineer] [] [] []
Py Out: 5 |_ Initial: [Initial] [0x778000] [Halted] [127]
Py Out: 6 - phonecompany: [phonecompany] [] [] []
where:
• The variable mt is the returned Python object of class GHS_MslTree for the
contents of the Obj_List widget.
where:
• The variable eng stores the created Python object of class GHS_Task.
• GHS_Task implements functions for debugging tasks or threads in RTOS
run-mode debugging environments.
• rm.component stores the identifier string for the debug server component.
• The argument engineer specifies the AddressSpace.
• The argument Initial specifies the task name.
where:
76 MULTI: Scripting
Manipulating the Debugger
This example attaches to the task created in Example 3.40. Creating a Task Object
on page 76.
Python> eng.Attach()
Py Out: Target cpu: PowerPC 860 (PowerQUICC)
where:
where:
where:
where:
where:
78 MULTI: Scripting
Using Tcl/Tk to Create a Graphical Interface
The resulting demo window contains a number of buttons, a text field for Python
statements, and a pane that displays instructions and output.
The window's buttons guide you through an action sequence that sets up a dual-mode
debugging environment (freeze mode and run mode) on INTEGRITY. If you do
not have an INTEGRITY installation, you can debug and run a stand-alone program
instead. Apart from the Quit button, one other button (at most) is available at any
given time.
The text field displays the Python statement that is executed when you click the
button (other than Quit) that is available. Some statements require user adjustments,
such as a change to a program path or name. If you debug and run a stand-alone
program instead of debugging on INTEGRITY, you must change the statements
for the first three buttons.
After you click a button to execute a statement, the output is displayed in the window.
To view the demo's source code, run the following Python statements:
if not editor: editor = GHS_Editor()
tkew = editor.EditFile(__ghs_site_default_python_dir+
os.sep+"ghs_guidemo.py")
MULTI-Python API
Reference
Chapter 4
• Functions and aliases are documented in mixed case, but you may also enter
them in all lowercase letters (except where it is noted otherwise). For example,
ShowWindowList() and showwindowlist() are equivalent and are both
valid.
• Many argument descriptions refer to blocked mode. In blocked mode, Python
waits for a MULTI operation to finish before continuing on to the next Python
statement. In non-blocking mode, Python sends a request to MULTI and then
continues immediately to the next statement.
84 MULTI: Scripting
Chapter 5
MULTI-Python Utility
Function Prototypes
Contents
Utility Function Prototypes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Chapter 5. MULTI-Python Utility Function Prototypes
GHS_ExecFile()
GHS_ExecFile(fileName, gd={}, ld={})
Executes the specified Python script file. This function is similar to Python's built-in
execfile() function. However, as illustrated below, GHS_ExexFile() allows
you to raise a GHS_AbortExecFile() exception at any place (inside the script
file or in one of the nested script files) to abort the execution normally.
if exitCode != 0:
raise GHS_AbortExecFile("Exit code: " + str(exitCode));
Arguments are:
86 MULTI: Scripting
GHS_PrintObject()
GHS_PrintObject()
GHS_PrintObject(obj, printIdx=True)
Prints the given list, tuple, or dictionary object in better format than the
standard print statement. This utility function prints one element per line, indents
correctly, etc.
Arguments are:
GHS_RunShellCommands()
GHS_RunShellCommands(commands, grabStdout=True,
grabStderr=False, printErrMsg=True)
Executes the specified shell commands, captures their status, grabs output from
stdout and/or stderr on request (grabbing output from stderr is supported only in
POSIX environments), and returns a tuple such as the following:
(exitCode, stdoutOutput, stderrOutput)
Arguments are:
GHS_System()
GHS_System(commands, grabStdout=True, grabStderr=False,
printErrMsg=True)
Executes the specified shell commands, grabs output from stdout and stderr on
request, and returns a string containing the requested output. If GHS_System()
does not grab the output from stdout or stderr, the corresponding output is displayed
on the console (Windows) or in the xterm (Linux/Solaris).
Arguments are:
88 MULTI: Scripting
GHS_System()
• printErrMsg — If True, prints an error message when the exit code is not
zero (0). If False, does not print an error message when the exit code is not
zero (0).
Basic Functions
Contents
GHS_IdeObject Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
Chapter 6. Basic Functions
This chapter documents the GHS_IdeObject class, which is the base class of all
MULTI-Python service classes, window classes, and Debugger object classes (see
“Overview of MULTI-Python Classes” on page 18).
GHS_IdeObject Functions
The following sections describe functions from class GHS_IdeObject.
CleanCmdExecVariables()
CleanCmdExecVariables(status=1, output="", obj=None,
cmdPath="")
Modifies the attributes related to command execution. The default values of the
arguments are the default values of the attributes.
Arguments are:
92 MULTI: Scripting
IsAlive()
IsAlive()
IsAlive()
Checks if the corresponding MULTI IDE service (if any) of a Python object is alive
(that is, not down).
Window Functions
Contents
GHS_Window Basic Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
GHS_Window Configuration Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
GHS_Window Directory Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
GHS_Window Interactive Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
GHS_Window Menu Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
GHS_Window Modal Dialog Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
GHS_Window Record Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
GHS_Window Window Attribute and Manipulation Functions . . . . . . . . . . . 130
Chapter 7. Window Functions
Note
This chapter documents only a subset of the functions from class
GHS_Window. For information about other GHS_Window functions, see
Chapter 8, “Widget Functions” on page 137.
Note
level is an argument of some GHS_Window functions. This argument
specifies the nested level of a modal dialog box and is only applicable if
the argument dialog is set to True. Each MULTI IDE window and
dialog box has a name and an internal ID, which MULTI-Python uses to
identify the window. Modal dialog boxes are identified by the name
ModalDialog and by a number that represents their nested level in a
sequence of MULTI IDE commands. The most recent modal dialog box
has a nested level of zero (0), the second most recent has a nested level
of one (1), and so on. MULTI-Python ignores a nested level of zero (0)
in a modal dialog box's name. As a result, ModalDialog and
ModalDialog0 are equivalent; both of them identify the most recent
modal dialog box.
96 MULTI: Scripting
GHS_Window Basic Functions
GetCwd()
GetCwd()
Gets the current working directory of the window's process and returns a string
containing the directory.
GetInfo()
GetInfo(printOut=True)
• printOut — If True, prints the string. If False, does not print the string.
GetPid()
GetPid()
Gets the process ID (PID) of the window's process. This function returns the PID
as an integer, or it returns 0 (zero) upon error.
IsSameWindow()
IsSameWindow(winObj)
Determines whether the current window object is the same as the specified window
object. This function returns True if the window objects are the same, and False
otherwise.
IsWindowAlive()
IsWindowAlive(clearIfNotAlive=True)
Determines whether the window for the object still exists and returns True if yes,
and False otherwise.
• clearIfNotAlive — If True and if the window does not exist, clears window
information kept in the window object. If False, does not clear window
information.
RunCommands()
RunCommands(cmd, block=True, printOutput=True)
Runs the specified command(s) in the corresponding MULTI IDE component. The
output (if any) is kept in the window object's cmdExecOutput attribute.
Arguments are:
98 MULTI: Scripting
GHS_Window Configuration Functions
ClearDefaultConfigFile()
ClearDefaultConfigFile(block=True, printOutput=True)
Removes MULTI's default user configuration file. This function returns True on
success and False on failure.
Arguments are:
LoadConfigFile()
LoadConfigFile(fileName="", block=True, printOutput=True)
Loads the MULTI IDE configuration from a file. This function returns True on
success and False on failure.
Arguments are:
SaveConfig()
SaveConfig(fileName="", saveToDftFile=False, block=True,
printOutput=True)
Saves the current MULTI IDE configuration to a file and returns True on success
and False on failure.
Arguments are:
• fileName — Specifies the file to save to. If fileName is an empty string ("")
and saveToDftFile is False (both are defaults), a MULTI file chooser
appears so that you can select a file.
• saveToDftFile — If True, saves the MULTI IDE configuration to the default
configuration file (this is effective only when fileName is an empty string).
If False, you must either specify fileName or choose a file from the file
chooser. For more information, see “Saving Configuration Settings” in Chapter
7, “Configuring and Customizing MULTI” in the MULTI: Managing Projects
and Configuring the IDE book.
ShowConfigWindow()
ShowConfigWindow(block=True, printOutput=True)
Displays the Options dialog box, which provides access to many MULTI
configuration settings. This function returns True on success and False on failure.
The window object for the Options dialog box is kept in the host object's
cmdExecObj attribute.
Arguments are:
GetIntegrityDistributionDir()
GetIntegrityDistributionDir()
Gets the INTEGRITY distribution directory and returns a string with the directory
or returns an empty string ("") upon failure or cancellation.
SetIntegrityDistributionDir()
SetIntegrityDistributionDir(newDir)
Sets the INTEGRITY distribution directory. This function returns a string for the
old INTEGRITY distribution directory, or it returns an empty string ("") upon
error.
• newDir — Specifies the full path to the new INTEGRITY distribution directory.
GetUvelosityDistributionDir()
GetUvelosityDistributionDir()
Gets the u-velOSity distribution directory and returns a string with the directory or
returns an empty string ("") upon failure or cancellation.
SetUvelosityDistributionDir()
SetUvelosityDistributionDir(newDir)
Sets the u-velOSity distribution directory. This function returns a string for the old
u-velOSity distribution directory, or it returns an empty string ("") upon error.
• newDir — Specifies the full path to the new u-velOSity distribution directory.
GetLatestDir()
GetLatestDir(dirType="?")
Gets the latest value for a directory type maintained by the MULTI IDE. This
function returns the directory that was most recently used for the specified directory
type, or it returns an empty string ("") upon error.
SetLatestDir()
SetLatestDir(dirType="?", newDir="")
Sets the latest value for a directory type maintained by the MULTI IDE. This
function returns a string with the existing, most recently used directory of the
specified directory type, or it returns an empty string ("") upon error.
Arguments are:
• dirType — Specifies the directory type. For a list of supported directory types,
see “GetLatestDir()” on page 103.
• newDir — Specifies a new directory for the directory type.
Beep()
Beep(count=1, block=False)
Beeps the specified number of times and returns True on success and False on
failure.
Arguments are:
ChooseDir()
ChooseDir(dftDir="", prompt="Choose directory:",
title="Directory Chooser")
Allows you to choose a directory via MULTI's directory chooser. This function
returns the selected directory, or it returns an empty string ("") upon failure or
cancellation.
Arguments are:
ChooseFile()
ChooseFile(dftFile="", dftDir="", label="OK", forOpen=True,
existingFile=False, extension="", fileTypes="",
eraseFilenameWhenDirChange=False, title="File Chooser")
Allows you to choose a file path via MULTI's file chooser. This function returns
the selected file path, or it returns an empty string ("") upon failure or cancellation.
Arguments are:
ChooseFromList()
ChooseFromList(dftValueIdx=0, valList=[], colValueSep="",
colNames=[], prompt="Select value from the list:",
title="Choose Value from List", helpkey="")
Allows you to choose a value from a list displayed in a modal dialog box. This
function returns the string selected from the list, or it returns an empty string ("")
upon failure or cancellation. New lines are not permitted in string values.
Arguments are:
ChooseWindowFromGui()
ChooseWindowFromGui(msg="Choose a window:", title="Choose
Window from List", wins=None)
Allows you to choose a window from a window list displayed in a modal dialog
box. This function returns an object for the chosen window, or it returns None upon
failure or cancellation.
Arguments are:
ChooseYesNo()
ChooseYesNo(msg, dftChoice=0, printOutput=True)
Displays the specified message in a modal dialog box that prompts you to choose
between Yes and No. This function returns True for Yes and False for No.
Arguments are:
GetInput()
GetInput(dftValue="", valList=[], onlyFromList=False,
prompt="Your input", title="", helpkey="")
Gets user input via a modal dialog box. This function returns the input string, or it
returns an empty string ("") upon failure or cancellation.
Arguments are:
ShowMessage()
ShowMessage(msg, inDialog=False, error=False, permanent=False)
Displays the specified message in the window or in a dialog box and returns True
on success and False on failure.
Arguments are:
Wait()
Wait(timeout, local=True, block=False)
Blocks the corresponding MULTI IDE component from accepting any commands
for the specified amount of time. This function returns True on success and False
on failure.
Arguments are:
Note
Many of the following functions require that you specify a menu name,
submenu name, menu item, etc. When you do so, place an ampersand
(&) before any letter that is underlined in the GUI. For example, given
the following graphic, the Components menu would be typed as
Com&ponents.
DumpMenu()
DumpMenu(menu="", block=True, printOutput=True)
Dumps a menu that is defined in the window and returns True on success and
False on failure. The string containing the menu is kept in the window object's
cmdExecOutput attribute.
Arguments are:
• menu — Specifies the name of the menu to dump. For more information, see
the note at the beginning of “GHS_Window Menu Functions” on page 109.
• block — If True, executes DumpMenu() in blocked mode and grabs the output
(if any). If False, neither executes the function in blocked mode nor grabs the
output.
• printOutput — If True, prints the output. If False, does not print the output.
DumpMenuBar()
DumpMenuBar(block=True, printOutput=True)
Dumps the window's menu bar and returns True on success and False on failure.
The string containing the menu bar is kept in the window object's cmdExecOutput
attribute.
Arguments are:
GetCommandToDumpMenu()
GetCommandToDumpMenu(menu="", dialog=False, level=0)
Gets the command that dumps the specified menu of the window or of a modal
dialog box. This function returns a string for the command. The command that is
returned is not documented and should not be relied upon between MULTI IDE
releases.
Arguments are:
• menu — Specifies the name of the menu to dump. For more information, see
the note at the beginning of “GHS_Window Menu Functions” on page 109.
• dialog — If True, specifies that the menu is defined in a modal dialog box.
If False, specifies that the menu is defined in the window.
• level — Specifies the nested level of the modal dialog box. For more
information, see the note at the beginning of this chapter (Chapter 7, “Window
Functions” on page 95).
GetCommandToDumpMenuBar()
GetCommandToDumpMenuBar(dialog=False, level=0)
Gets the command that dumps the menu bar of the window or of a modal dialog
box. This function returns a string for the command. The command that is returned
is not documented and should not be relied upon between MULTI IDE releases.
Arguments are:
• dialog — If True, specifies that the menu bar is located in a modal dialog
box. If False, specifies that the menu bar is located in the window.
• level — Specifies the nested level of the modal dialog box. For more
information, see the note at the beginning of this chapter (Chapter 7, “Window
Functions” on page 95).
GetCommandToSelectMenu()
GetCommandToSelectMenu(menuName, menuItemName, dialog=False,
level=0)
Gets the command that selects a menu item defined in the window or in a modal
dialog box. This function returns a string for the command. The command that is
returned is not documented and should not be relied upon between MULTI IDE
releases.
Arguments are:
For more information about specifying menuName and menuItemName, see the
note at the beginning of “GHS_Window Menu Functions” on page 109.
GetCommandToSelectMenuPath()
GetCommandToSelectMenuPath(menuPath, dialog=False, level=0)
Gets the command that selects a menu item defined in the window or in a modal
dialog box. This function returns a string for the command. The command that is
returned is not documented and should not be relied upon between MULTI IDE
releases.
Arguments are:
• menuPath — Specifies the path (formatted as a Python list) to the menu item.
Begin with the main menu and proceed to the menu item. For more information,
see the note at the beginning of “GHS_Window Menu Functions” on page 109.
• dialog — If True, specifies that the menu item is defined in a modal dialog
box. If False, specifies that the menu item is defined in the window.
• level — Specifies the nested level of the modal dialog box. For more
information, see the note at the beginning of this chapter (Chapter 7, “Window
Functions” on page 95).
GetCommandToSelectSubMenu()
GetCommandToSelectSubMenu(menuName, subMenuName, menuItemName,
dialog=False, level=0)
Gets the command that selects a submenu item defined in the window or in a modal
dialog box. This function returns a string for the command. The command that is
returned is not documented and should not be relied upon between MULTI IDE
releases.
Arguments are:
• dialog — If True, specifies that the submenu item is defined in a modal dialog
box. If False, specifies that the submenu item is defined in the window.
• level — Specifies the nested level of the modal dialog box. For more
information, see the note at the beginning of this chapter (Chapter 7, “Window
Functions” on page 95).
GetCommandToSelectSubSubMenu()
GetCommandToSelectSubSubMenu(menuName, subMenuName,
subSubMenuName, menuItemName, dialog=False, level=0)
Gets the command that selects a sub-submenu item defined in the window or in a
modal dialog box. This function returns a string for the command. The command
that is returned is not documented and should not be relied upon between MULTI
IDE releases.
Arguments are:
IsMenuItemActive()
IsMenuItemActive(menuName, menuItemName)
Determines whether the specified menu item is active (not dimmed) or inactive
(dimmed). This function returns True if the menu item is active and False if it is
inactive.
Arguments are:
For more information about specifying menuName and menuItemName, see the
note at the beginning of “GHS_Window Menu Functions” on page 109.
IsMenuItemTicked()
IsMenuItemTicked(menuName, menuItemName)
Determines whether the specified menu item is ticked. This function returns True
if the menu item is ticked and False if it is not ticked.
Arguments are:
For more information about specifying menuName and menuItemName, see the
note at the beginning of “GHS_Window Menu Functions” on page 109.
IsSubMenuItemActive()
IsSubMenuItemActive(menuName, subMenuName, menuItemName)
Determines whether the specified submenu item is active (not dimmed) or inactive
(dimmed). This function returns True if the menu item is active and False if it is
inactive.
Arguments are:
IsSubMenuItemTicked()
IsSubMenuItemTicked(menuName, subMenuName, menuItemName)
Determines whether the specified submenu item is ticked. This function returns
True if the submenu item is ticked and False if it is not ticked.
Arguments are:
SelectMenu()
SelectMenu(menuName, menuItemName, block=True,
printOutput=True)
Selects a menu item defined in the window and returns True on success and False
on failure. The string containing the menu item selection is kept in the window
object's cmdExecOutput attribute.
Arguments are:
For more information about specifying menuName and menuItemName, see the
note at the beginning of “GHS_Window Menu Functions” on page 109.
SelectSubMenu()
SelectSubMenu(menuName, subMenuName, menuItemName, block=True,
printOutput=True)
Selects a submenu item defined in the window and returns True on success and
False on failure. The string containing the submenu item selection is kept in the
window object's cmdExecOutput attribute.
Arguments are:
SelectSubSubMenu()
SelectSubSubMenu(menuName, subMenuName, subSubMenuName,
menuItemName, block=True, printOutput=True)
Selects a sub-submenu item defined in the window and returns True on success
and False on failure. The string containing the menu item selection is kept in the
window object's cmdExecOutput attribute.
Arguments are:
WaitForMenuItem()
WaitForMenuItem(menuName, menuItemName, active=True,
duration=-1.0, interval=0.3)
Waits for a menu item to attain the specified status: active (not dimmed) or inactive
(dimmed). This function returns True if the menu item has already attained the
specified status or if it attains the specified status before the timeout; it returns
False otherwise.
Arguments are:
For more information about specifying menuName and menuItemName, see the
note at the beginning of “GHS_Window Menu Functions” on page 109.
The most recent modal dialog box has a nested level of zero (0), the second most
recent has a nested level of one (1), and so on. If you specify a negative number for
the nested level, the commands are executed whenever the MULTI IDE executes
modal dialog commands, regardless of the modal dialog nesting level.
Where applicable, the functions in the following sections also allow you to specify
a count. With the count argument, you can register commands to execute a
specified number of times (but only once per modal dialog), after which they are
automatically removed. By specifying a negative number for the count, you can
register commands to execute until you explicitly remove them. In this case, the
commands are executed whenever the MULTI IDE executes registered modal dialog
commands and they are applicable (determined by the modal dialog box nesting
level).
GetCommandToRegisterModalDialogCommands()
GetCommandToRegisterModalDialogCommands(cmdList, level=-1,
count=1)
Gets the command that registers modal dialog box commands. This function returns
a string for the command. The command that is returned is not documented and
should not be relied upon between MULTI IDE releases.
Arguments are:
For more information about the level and count, see “GHS_Window Modal
Dialog Functions” on page 120.
RegisterModalDialogCommands()
RegisterModalDialogCommands(cmdList, level=-1, count=1)
Registers commands so that they execute whenever modal dialog boxes are nested
to the specified level. This function returns True on success and False on failure.
Arguments are:
For more information about the level and count, see “GHS_Window Modal
Dialog Functions” on page 120.
RegisterModalDialogToChangePullDownValue()
RegisterModalDialogToChangePullDownValue(widgetName, value,
dlgLevel=0, level=-1, count=1)
Arguments are:
• level — Specifies the modal dialog nesting level at which the command is
executed.
• count — Specifies the number of times that the command is executed.
For more information about the level and count, see “GHS_Window Modal
Dialog Functions” on page 120.
RegisterModalDialogToClickButton()
RegisterModalDialogToClickButton(widgetName, dlgLevel=0,
level=-1, count=1)
Arguments are:
For more information about the level and count, see “GHS_Window Modal
Dialog Functions” on page 120.
RegisterModalDialogToDoubleClickMslCell()
RegisterModalDialogToDoubleClickMslCell(widgetName, row, col=0,
dlgLevel=0, level=-1, count=1)
Arguments are:
For more information about the level and count, see “GHS_Window Modal
Dialog Functions” on page 120.
RegisterModalDialogToDumpWidget()
RegisterModalDialogToDumpWidget(widgetName, option="",
dlgLevel=0, level=-1, count=1)
Arguments are:
• option — Gives more information about what to be dumped if the widget has
more items to be dumped. For more information, see
“GetCommandToDumpWidget()” on page 146.
• dlgLevel — Specifies the nested level of the modal dialog box whose widget
contents are dumped.
• level — Specifies the modal dialog nesting level at which the command is
executed.
• count — Specifies the number of times that the command is executed.
For more information about the level and count, see “GHS_Window Modal
Dialog Functions” on page 120.
RegisterModalDialogToDumpWindow()
RegisterModalDialogToDumpWindow(dlgLevel=0, level=-1, count=1)
Registers a command to dump the specified modal dialog box. This function returns
True on success and False on failure.
Arguments are:
• dlgLevel — Specifies the nested level of the modal dialog box whose contents
are dumped.
• level — Specifies the modal dialog nesting level at which the command is
executed.
• count — Specifies the number of times that the command is executed.
For more information about the level and count, see “GHS_Window Modal
Dialog Functions” on page 120.
RegisterModalDialogToSelectMslCell()
RegisterModalDialogToSelectMslCell(widgetName, row, col=-1,
dlgLevel=0, level=-1, count=1)
Arguments are:
For more information about the level and count, see “GHS_Window Modal
Dialog Functions” on page 120.
RegisterModalDialogToSelectMslCellByValue()
RegisterModalDialogToSelectMslCellByValue(widgetName,
cellValue, col=0, dlgLevel=0, level=-1, count=1)
Arguments are:
For more information about the level and count, see “GHS_Window Modal
Dialog Functions” on page 120.
RegisterModalDialogToSelectPullDownMenu()
RegisterModalDialogToSelectPullDownMenu(widgetName, valIdx,
dlgLevel=0, level=-1, count=1)
Arguments are:
For more information about the level and count, see “GHS_Window Modal
Dialog Functions” on page 120.
RegisterModalDialogToShowWidgets()
RegisterModalDialogToShowWidgets(dlgLevel=0, level=-1, count=1)
Registers a command to display the widgets of a modal dialog box. This function
returns True on success and False otherwise.
Arguments are:
• dlgLevel — Specifies the nested level of the modal dialog box whose widgets
are displayed.
• level — Specifies the modal dialog nesting level at which the command is
executed.
• count — Specifies the number of times that the command is executed.
For more information about the level and count, see “GHS_Window Modal
Dialog Functions” on page 120.
RegisterModalDialogToSortMsl()
RegisterModalDialogToSortMsl(widgetName, col=0, dlgLevel=0,
level=-1, count=1)
Arguments are:
• dlgLevel — Specifies the nested level of the modal dialog box whose
MScrollList widget is sorted.
• level — Specifies the modal dialog nesting level at which the command is
executed.
• count — Specifies the number of times that the command is executed.
For more information about the level and count, see “GHS_Window Modal
Dialog Functions” on page 120.
RemoveRegisteredModalDialogCommands()
RemoveRegisteredModalDialogCommands(level=-1, printOutput=True)
Removes commands registered at the specified modal dialog nesting level. This
function returns True on success and False on failure.
Arguments are:
• level — Specifies the modal dialog nesting level at which commands are
registered. If the level is negative, all commands registered to all modal dialog
nesting levels are applicable. For more information, see “GHS_Window Modal
Dialog Functions” on page 120.
• printOutput — If True, prints the output (if any). If False, does not print
output.
ShowRegisteredModalDialogCommands()
ShowRegisteredModalDialogCommands(level=-1, printOutput=True)
Displays commands registered at the specified modal dialog nesting level. This
function returns True on success and False on failure.
Arguments are:
• level — Specifies the modal dialog nesting level at which commands are
registered. If the level is negative, all commands registered to all modal dialog
nesting levels are applicable. For more information, see “GHS_Window Modal
Dialog Functions” on page 120.
• printOutput — If True, prints the output (if any). If False, does not print
output.
RecordGuiOperations()
RecordGuiOperations(fileName="", append=False, block=True,
printOutput=True)
Records the Python command equivalents of certain GUI operations executed from
the window or from all windows, or stops recording.
Examples of GUI operations that can be recorded include: selecting a menu from
a menu bar, selecting a Tab widget, clicking a Button or MScrollList widget,
or modifying a PullDown or TextField widget. Many other operations, such as
selecting a menu option from a right-click menu, or clicking in the Debugger source
pane, cannot be recorded.
Arguments are:
• fileName — Specifies the file to record commands to. An empty string ("")
stops any ongoing recording.
• append — If True, adds recorded commands after any pre-existing text in the
specified file. If False, overwrites pre-existing information when recording.
CloseWindow()
CloseWindow(block=True, printOutput=True)
Closes the window and returns True on success and False on failure.
Arguments are:
GetDimension()
GetDimension(printOutput=True)
Gets the window's dimensions. This function returns the dimensions as a tuple such
as (width, height), or it returns None upon error.
GetName()
GetName(printOutput=True)
Gets the window's registered name. The registered name is the name that MULTI
uses internally; it may not be the name shown on the window's title bar. This function
returns the window's name as a string, or it returns an empty string ("") upon error.
GetPosition()
GetPosition(printOutput=True)
Gets the window's position. This function returns the position as a tuple such as
(x, y), or it returns None upon error. The position (0, 0) is in the upper-left
corner of the display.
IconifyWindow()
IconifyWindow(block=True, printOutput=True)
Minimizes the window and returns True on success and False on failure.
Arguments are:
IsIconified()
IsIconified(printOutput=True)
Determines whether the window is minimized and returns True if yes, and False
otherwise.
• printOutput — If True, prints the output. If False, does not print the output.
MoveWindow()
MoveWindow(x, y, relative=True)
Moves the window by the specified deltas or to the specified position in the display.
This function returns True on success and False on failure.
Arguments are:
Note
MULTI's window docking feature may affect the final position of the
window. For more information, see “Configuring Window Docking” in
Chapter 7, “Configuring and Customizing MULTI” in MULTI: Managing
Projects and Configuring the IDE.
RenameWindow()
RenameWindow(winName, winTitle="", iconTitle="")
Allows you to rename the window. This function returns True on success and
False on failure.
Arguments are:
• winName — Specifies the window's new registered name. The registered name
is the name that MULTI uses internally, and it is the name that is displayed in
the Windows menu of many MULTI tools. The registered name may not be
the name shown on the window's title bar.
• winTitle — Specifies the name that is displayed in the window's title bar. If
you do not specify winTitle, the value of winName is displayed in the title
bar.
• iconTitle (Linux/Solaris only) — Specifies the name of the window icon.
If you do not specify iconTitle, the value of winName is used for the window
icon.
ResizeWindow()
ResizeWindow(width, height, relative=True)
Resizes the window by the specified deltas or to the specified dimensions. This
function returns True on success and False on failure.
Arguments are:
• width — Specifies the change in the window's current width or specifies the
window's width dimension. Whether a delta is specified or a dimension is
specified depends on the argument relative.
• height — Specifies the change in the window's current height or specifies
the window's height dimension. Whether a delta is specified or a dimension is
specified depends on the argument relative.
• relative — If True, indicates that the given values are deltas to the window's
existing dimensions. If False, indicates that the given values are dimensions.
RestoreWindow()
RestoreWindow(block=True, printOutput=True)
Brings the window to the foreground and returns True on success and False on
failure.
Arguments are:
• printOutput — If True, prints the output (if any). If False, does not print
output.
ShowAttributes()
ShowAttributes(printOutput=True)
Widget Functions
Contents
GHS_MslTree Attributes and Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
GHS_Window Basic Widget Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
GHS_Window Button Widget Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
GHS_Window ColumnHeader Widget Functions . . . . . . . . . . . . . . . . . . . . . . . 154
GHS_Window Edit and Terminal Widget Functions . . . . . . . . . . . . . . . . . . . . 156
GHS_Window MScrollList Widget Functions . . . . . . . . . . . . . . . . . . . . . . . . . 157
GHS_Window PullDown Widget Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
GHS_Window Tab Widget Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
GHS_Window Text Widget Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
GHS_Window TextCell Widget Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
GHS_Window TextField Widget Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
Chapter 8. Widget Functions
This class inherits from object and is a utility class for GHS_Window. See
“GHS_MslTree Attributes and Functions” on page 139.
Note
This chapter documents only a subset of the functions from class
GHS_Window. For information about other GHS_Window functions,
see Chapter 7, “Window Functions” on page 95.
Note
level is an argument of some GHS_Window functions. This
argument specifies the nested level of a modal dialog box and is only
applicable if the argument dialog is set to True. Each MULTI IDE
window and dialog box has a name and an internal ID, which
MULTI-Python uses to identify the window. Modal dialog boxes
are identified by the name ModalDialog and by a number that
represents their nested level in a sequence of MULTI IDE commands.
The most recent modal dialog box has a nested level of zero (0), the
second most recent has a nested level of one (1), and so on.
MULTI-Python ignores a nested level of zero (0) in a modal dialog
box's name. As a result, ModalDialog and ModalDialog0 are
equivalent; both of them identify the most recent modal dialog box.
• nodeName — Stores the name of the node represented by the object. The name
is the value of the column (usually column 0) on which the MScrollList tree
is built.
• columnValues — Stores a list of column values for the MScrollList widget
node represented by the object.
• parent — Stores the GHS_MslTree object representing the enclosing node
in the MScrollList tree.
• depth — Stores the depth of the node in the MScrollList tree.
• row — Stores the row index of the node in the MScrollList tree.
• children — Stores a list of GHS_MslTree objects representing the direct
children of the node in the MScrollList tree.
• expandMark — Stores whether the tree node is, or can be, expanded. The
expandMark attribute may be:
○ "+" — Indicates that the node can be expanded.
○ "-" — Indicates that the node is expanded.
○ "" — Indicates that the node does not expand.
DumpTree()
DumpTree(recursive=True, treeLine=True, printHead=True,
printRow=True)
Arguments are:
• recursive — If True, the dump continues until the operation has no effect.
If False, this function only dumps the content of the current node.
• treeLine — If True, lines such as | and _ are printed to show the hierarchy
of the dumped information. If False, the lines are not printed. For an example,
see “DumpTree()” on page 291.
• printHead — If True, prints the header in the dumped content. If False,
does not print the header.
• printRow — If True, prints the row number in the dumped content. If False,
does not print the row number.
GetChildrenNumber()
GetChildrenNumber(directChildren=False)
IsExpandable()
IsExpandable()
IsExpanded()
IsExpanded()
IsTopTree()
IsTopTree()
Determines whether the GHS_MslTree node is the top node. This function returns
True if the GHS_MslTree object represents the abstract top node of the
MScrollList tree, and False otherwise. The abstract top node of the
MScrollList tree logically contains the nodes in the MScrollList as its children.
SearchByColumnValue()
SearchByColumnValue(value, column=-1, match=False, all=False,
recursive=True)
Searches by column value for one or more nodes within the current tree (includes
the node and its children). This function returns one or more qualified nodes, or it
returns an empty list or None on failure (see the description of all for more
information).
Arguments are:
SearchByName()
SearchByName(nodeName, match=False, all=False, recursive=True)
Searches by name for one or more nodes within the current tree (includes the node
and its children). This function returns one or more qualified nodes, or it returns an
empty list or None on failure (see the description of all for more information).
Arguments are:
• nodeName — Specifies the name of the node, which can be a regular expression.
• match — If True, uses Python's regular expression match() function to check
the specified name. If False, uses Python's regular expression search()
function.
• all — If True, this function returns a list of all qualified nodes upon success.
Upon failure, it returns an empty list. If False, this function returns the first
qualified node upon success. Upon failure, it returns None.
• recursive — If True, searches all descendants of the MScrollList node,
if necessary. If False, only checks the current node's name.
SearchChildByColumnValue()
SearchChildByColumnValue(value, column=-1, match=False,
all=False, recursive=True)
Searches by column value for one or more child nodes of the current tree. This
function returns one or more qualified nodes, or it returns an empty list or None on
failure (see the description of all for more information).
Arguments are:
SearchChildByName()
SearchChildByName(nodeName, match=False, all=False,
recursive=True)
Searches by name for one or more child nodes. This function returns one or more
qualified nodes, or it returns an empty list or None on failure (see the description
of all for more information).
Arguments are:
• nodeName — Specifies the name of the node, which can be a regular expression.
• match — If True, uses Python's regular expression match() function to check
the specified name. If False, uses Python's regular expression search()
function.
• all — If True, this function returns a list of all qualified nodes upon success.
Upon failure, it returns an empty list. If False, this function returns the first
qualified node upon success. Upon failure, it returns None.
• recursive — If True, searches all descendants of the MScrollList node,
if necessary. If False, only searches the direct children of the MScrollList
node.
SearchRow()
SearchRow(row)
Searches within the current MScrollList tree (includes the node and its children)
for a node on the specified row and returns the node or returns None if no node
exists.
• row — Specifies the row number. If the current MScrollList tree is a sub-tree,
base the row number on the entire tree. The index starts at 0 (zero).
Tip
Many of the following functions require you to specify a widget name.
You can list widget names with the ShowWidgets() function. See
“ShowWidgets()” on page 148.
DumpAll()
DumpAll(block=True, printOutput=True)
Dumps the content of the window and returns True on success and False on failure.
The string containing the window content is kept in the window object's
cmdExecOutput attribute.
Arguments are:
• block — If True, executes DumpAll() in blocked mode and grabs the output
(if any). If False, neither executes the function in blocked mode nor grabs the
output.
• printOutput — If True, prints the output. If False, does not print the output.
DumpWidget()
DumpWidget(widgetName="", option="", block=True,
printOutput=True)
Dumps the content of a widget defined in the window and returns True on success
and False on failure. The string containing the widget's content is kept in the
window object's cmdExecOutput attribute.
Arguments are:
• option — Gives additional information about what to dump if the widget has
more items to be dumped. The following list gives available options for some
widget types:
○ MScrollList — selection, highlight, or value
○ PullDown — menu or value
○ TabControl — selection, content, or value
○ OmniView — selection or value
• block — If True, executes DumpWidget() in blocked mode and grabs the
output (if any). If False, neither executes the function in blocked mode nor
grabs the output.
• printOutput — If True, prints the output. If False, does not print the output.
GetCommandToDumpWidget()
GetCommandToDumpWidget(widgetName="", option="", dialog=False,
level=0)
Gets the command that dumps the contents of a widget defined in the window or
in a modal dialog box. This function returns a string for the command. The command
that is returned is not documented and should not be relied upon between MULTI
IDE releases.
Arguments are:
GetCommandToDumpWindow()
GetCommandToDumpWindow(dialog=False, level=0)
Gets the command that dumps the contents of the window or of a modal dialog box.
This function returns a string for the command. The command that is returned is
not documented and should not be relied upon between MULTI IDE releases.
Arguments are:
• dialog — If True, gets the command that dumps the contents of a modal
dialog box. If False, gets the command that dumps the contents of the window.
• level — Specifies the nested level of the modal dialog box. For more
information, see the note at the beginning of this chapter (Chapter 8, “Widget
Functions” on page 137).
GetCommandToShowWidgets()
GetCommandToShowWidgets(dialog=False, level=0)
Gets the command that displays information about all widgets defined in the window
or in a modal dialog box. This function returns a string for the command. The
command that is returned is not documented and should not be relied upon between
MULTI IDE releases.
Arguments are:
• dialog — If True, gets the command that displays information about a modal
dialog box's widgets. If False, gets the command that displays information
about the window's widgets.
• level — Specifies the nested level of the modal dialog box. For more
information, see the note at the beginning of this chapter (Chapter 8, “Widget
Functions” on page 137).
ShowWidgets()
ShowWidgets(block=True, printOutput=True)
Displays information about all widgets defined in the window and returns True on
success and False on failure. The string containing the information is kept in the
window object's cmdExecOutput attribute.
Arguments are:
where:
Tip
Many of the following functions require you to specify a widget name.
You can list widget names with the ShowWidgets() function. See
“ShowWidgets()” on page 148.
DumpButton()
DumpButton(widgetName, block=True, printOutput=True)
Dumps the status of a button defined in the window. This function returns True on
success and False otherwise.
Arguments are:
GetCommandToClickButton()
GetCommandToClickButton(widgetName, dialog=False, level=0)
Gets the command that simulates clicking a button. The button may be defined in
the window or in a modal dialog box. This function returns a string for the command.
The command that is returned is not documented and should not be relied upon
between MULTI IDE releases.
Arguments are:
GetCommandToDumpButton()
GetCommandToDumpButton(widgetName, dialog=False, level=0)
Gets the command that dumps the value of a button defined in the window or in a
modal dialog box. This function returns a string for the command. The command
that is returned is not documented and should not be relied upon between MULTI
IDE releases.
Arguments are:
IsButtonDimmed()
IsButtonDimmed(widgetName)
Determines whether a button in the window is dimmed. This function returns True
if the button is dimmed or if the button does not exist, and it returns False otherwise.
IsButtonDown()
IsButtonDown(widgetName)
Determines whether a button in the window is in the “on” state (that is, you have
clicked the mouse over the button graphic so that the button appears to be pushed
down, or the command to simulate this action has been executed successfully). This
function returns True if the button is pushed down. It returns False if the button
is not pushed down or if the button does not exist.
SelectButton()
SelectButton(widgetName, block=True, printOutput=True)
Simulates clicking the specified button and returns True on success and False
otherwise.
Arguments are:
WaitButtonInStatus()
WaitButtonInStatus(widgetName, dimmed, isDown=False,
duration=-1.0, checkInterval=0.5, verbose=True)
Waits until the specified button reaches the specified status. This function returns
True if the button has reached the specified status, and it returns False otherwise.
Arguments are:
Tip
The following functions require you to specify a widget name. You can
list widget names with the ShowWidgets() function. See
“ShowWidgets()” on page 148.
GetCommandToGetColumnsOfColumnHeader()
GetCommandToGetColumnsOfColumnHeader(widgetName, dialog=False,
level=0)
Gets the command that gets the columns of a ColumnHeader widget. This function
returns a string for the command. The command that is returned is not documented
and should not be relied upon between MULTI IDE releases.
Arguments are:
GetColumnIndexInColumnHeader()
GetColumnIndexInColumnHeader(widgetName, columnName,
warningOnError=False)
Arguments are:
GetColumnsOfColumnHeader()
GetColumnsOfColumnHeader(widgetName, warningOnError=False)
Gets the columns of a ColumnHeader widget. This function returns a list of column
names or an empty list upon error.
Arguments are:
Tip
Many of the following functions require you to specify a widget name.
You can list widget names with the ShowWidgets() function. See
“ShowWidgets()” on page 148.
GetEditTextLines()
GetEditTextLines(widgetName, removeCrs=True)
Returns a list of strings for the text in an Edit or Terminal widget. Each string
in the list is a separate line of text. An empty list is returned upon error.
Arguments are:
GetEditTextString()
GetEditTextString(widgetName)
Returns a single string for the text in an Edit or Terminal widget. An empty string
("") is returned upon error.
Tip
Many of the following functions require you to specify a widget name.
You can list widget names with the ShowWidgets() function. See
“ShowWidgets()” on page 148.
ChangeMslTree()
ChangeMslTree(widgetName, row, col=-1, expand=True, block=True,
printOutput=True)
Arguments are:
ChangeWholeMslTree()
ChangeWholeMslTree(widgetName, col=-1, expand=True,
recursive=False)
Expands or contracts all nodes in the tree of an MScrollList widget cell. This
function returns True on success and False on failure.
Arguments are:
DoubleClickMslCell()
DoubleClickMslCell(widgetName, row, col, block=True,
printOutput=True)
Arguments are:
DoubleClickMslCellByValue()
DoubleClickMslCellByValue(widgetName, cellValue, col,
block=True, printOutput=True)
Double-clicks the MScrollList widget cell with the specified value. This function
returns True on success and False on failure.
Arguments are:
DumpMslHighlight()
DumpMslHighlight(widgetName, block=True, printOutput=True)
Dumps the contents of an MScrollList widget defined in the window and indicates
which cells are highlighted. This function returns True on success and False
otherwise. The dumped contents are kept in the object's cmdExecOutput attribute.
Arguments are:
DumpMslSelection()
DumpMslSelection(widgetName, block=True, printOutput=True)
Arguments are:
DumpMslValue()
DumpMslValue(widgetName, block=True, printOutput=True)
Arguments are:
ExtendMslSelection()
ExtendMslSelection(widgetName, row, col=-1, block=True,
printOutput=True)
Arguments are:
If both the row and column numbers are less than 0, all cells of the MScrollList
widget are selected.
Note
This function simulates the behavior of the Ctrl+left-click operation,
which clears existing selections (if any) on applicable cells.
GetCommandToChangeMslTree()
GetCommandToChangeMslTree(widgetName, row, col, expand=True,
dialog=False, level=0)
Gets the command that expands or collapses the sub-tree associated with an
MScrollList widget cell. The widget may be defined in the window or in a modal
dialog box. This function returns a string for the command. The command that is
returned is not documented and should not be relied upon between MULTI IDE
releases.
Arguments are:
GetCommandToDoubleClickMslCell()
GetCommandToDoubleClickMslCell(widgetName, row, col,
dialog=False, level=0)
Gets the command that double-clicks one or more cells of an MScrollList widget
defined in the window or in a modal dialog box. This function returns a string for
the command. The command that is returned is not documented and should not be
relied upon between MULTI IDE releases.
Arguments are:
GetCommandToDoubleClickMslCellByValue()
GetCommandToDoubleClickMslCellByValue(widgetName, cellValue,
col, dialog=False, level=0)
Gets the command that double-clicks the MScrollList widget cell with the
specified value. The widget may be defined in the window or in a modal dialog
box. This function returns a string for the command. The command that is returned
is not documented and should not be relied upon between MULTI IDE releases.
Arguments are:
GetCommandToDumpMsl()
GetCommandToDumpMsl(widgetName, dialog=False, level=0)
Gets the command that dumps the contents of an MScrollList widget defined in
the window or in a modal dialog box. This function returns a string for the command.
The command that is returned is not documented and should not be relied upon
between MULTI IDE releases.
Arguments are:
GetCommandToDumpMslHighlight()
GetCommandToDumpMslHighlight(widgetName, dialog=False, level=0)
Gets the command that dumps the contents of an MScrollList widget defined in
the window or in a modal dialog box and that indicates which cells are highlighted.
This function returns a string for the command. The command that is returned is
not documented and should not be relied upon between MULTI IDE releases.
Arguments are:
• level — Specifies the nested level of the modal dialog box. For more
information, see the note at the beginning of this chapter (Chapter 8, “Widget
Functions” on page 137).
GetCommandToDumpMslSelection()
GetCommandToDumpMslSelection(widgetName, dialog=False, level=0)
Gets the command that dumps selected cells of an MScrollList widget defined
in the window or in a modal dialog box. This function returns a string for the
command. The command that is returned is not documented and should not be relied
upon between MULTI IDE releases.
Arguments are:
GetCommandToExtendMslSelection()
GetCommandToExtendMslSelection(widgetName, row, col=-1,
dialog=False, level=0)
Gets the command that extends the selection in an MScrollList widget. The
widget may be defined in the window or in a modal dialog box. This function returns
a string for the command. The command that is returned is not documented and
should not be relied upon between MULTI IDE releases.
Arguments are:
If both the row and column numbers are less than 0, all cells of the MScrollList
widget are selected.
Note
The command simulates the behavior of the Ctrl+left-click operation,
which clears existing selections (if any) on applicable cells.
GetCommandToSelectMslCell()
GetCommandToSelectMslCell(widgetName, row, col=-1,
dialog=False, level=0)
Gets the command that selects cells of an MScrollList widget defined in the
window or in a modal dialog box. This function returns a string for the command.
The command that is returned is not documented and should not be relied upon
between MULTI IDE releases.
Arguments are:
• row — Specifies the index of the row to select. The index starts at 0 (zero). If
the row number is less than 0 and the widget supports single-cell selection and
multiple-row selection, the specified column is selected in all rows.
• col — Specifies the index of the column to select. The index starts at 0 (zero).
If the column number is less than 0, all columns of the specified row are
selected.
• dialog — If True, specifies that the widget is defined in a modal dialog box.
If False, specifies that the widget is defined in the window.
• level — Specifies the nested level of the modal dialog box. For more
information, see the note at the beginning of this chapter (Chapter 8, “Widget
Functions” on page 137).
GetCommandToSelectMslCellByValue()
GetCommandToSelectMslCellByValue(widgetName, cellValue, col=0,
dialog=False, level=0)
Gets the command that selects an MScrollList widget cell by value. The widget
may be defined in the window or in a modal dialog box. This function returns a
string for the command. The command that is returned is not documented and should
not be relied upon between MULTI IDE releases.
Arguments are:
GetCommandToSortMsl()
GetCommandToSortMsl(widgetName, col, dialog=False, level=0)
Gets the command that sorts an MScrollList widget defined in the window or in
a modal dialog box. This function returns a string for the command. The command
that is returned is not documented and should not be relied upon between MULTI
IDE releases.
Arguments are:
GetMslRowNumber()
GetMslRowNumber(widgetName)
GetMslTree()
GetMslTree(widgetName, treeNodeColumn=0)
Arguments are:
SelectMslCell()
SelectMslCell(widgetName, row, col=-1, block=True,
printOutput=True)
Arguments are:
SelectMslCellByValue()
SelectMslCellByValue(widgetName, cellValue, col=0, block=True,
printOutput=True)
Arguments are:
SortMslByColumn()
SortMslByColumn(widgetName, col, block=True, printOutput=True)
Arguments are:
Tip
Many of the following functions require you to specify a widget name.
You can list widget names with the ShowWidgets() function. See
“ShowWidgets()” on page 148.
ChangePullDownValue()
ChangePullDownValue(widgetName, value)
Changes the value of a PullDown widget defined in the window and returns True
on success and False otherwise.
Arguments are:
DumpPullDownMenu()
DumpPullDownMenu(widgetName, block=True, printOutput=True)
Dumps the name, menu, etc. of a PullDown widget defined in the window and
returns True on success and False otherwise.
Arguments are:
DumpPullDownValue()
DumpPullDownValue(widgetName, block=True, printOutput=True)
Dumps the name, value, etc. of a PullDown widget defined in the window and
returns True on success and False otherwise.
Arguments are:
GetCommandToChangePullDownValue()
GetCommandToChangePullDownValue(widgetName, value,
dialog=False, level=0)
Gets the command that changes the value of a PullDown widget defined in the
window or in a modal dialog box. This function returns a string for the command.
The command that is returned is not documented and should not be relied upon
between MULTI IDE releases.
Arguments are:
GetCommandToDumpPullDownMenu()
GetCommandToDumpPullDownMenu(widgetName, dialog=False, level=0)
Gets the command that dumps a PullDown widget's menu. The widget may be
defined in the window or in a modal dialog box. This function returns a string for
the command. The command that is returned is not documented and should not be
relied upon between MULTI IDE releases.
Arguments are:
GetCommandToDumpPullDownValue()
GetCommandToDumpPullDownValue(widgetName, dialog=False,
level=0)
Gets the command that dumps the value of a PullDown widget defined in the
window or in a modal dialog box. This function returns a string for the command.
The command that is returned is not documented and should not be relied upon
between MULTI IDE releases.
Arguments are:
GetCommandToSelectPullDownMenu()
GetCommandToSelectPullDownMenu(widgetName, valIdx,
dialog=False, level=0)
Gets the command that selects a PullDown widget's menu item. The widget may
be defined in the window or in a modal dialog box. This function returns a string
for the command. The command that is returned is not documented and should not
be relied upon between MULTI IDE releases.
Arguments are:
• level — Specifies the nested level of the modal dialog box. For more
information, see the note at the beginning of this chapter (Chapter 8, “Widget
Functions” on page 137).
GetPullDownMenu()
GetPullDownMenu(widgetName)
Gets the menu entries of a PullDown widget defined in the window. This function
returns the widget's menu entries as a list, or it returns an empty list upon error.
GetPullDownValue()
GetPullDownValue(widgetName)
Gets the value of a PullDown widget defined in the window. This function returns
the widget's value as a string, or it returns an empty string ("") upon error.
SelectPullDownValue()
SelectPullDownValue(widgetName, valIdx)
Selects a PullDown widget's value from the value list (menu) in the window. This
function returns True on success and False otherwise.
Arguments are:
Tip
Many of the following functions require you to specify a widget name.
You can list widget names with the ShowWidgets() function. See
“ShowWidgets()” on page 148.
DumpTabContents()
DumpTabContents(widgetName="", block=True, printOutput=True)
Dumps the current tab contents of a Tab widget defined in the window. This function
returns True on success and False otherwise.
Arguments are:
DumpTabSelection()
DumpTabSelection(widgetName="", block=True, printOutput=True)
Dumps the current tab name of a Tab widget defined in the window. As shown in
the following example output, the tab name is preceded by a short description:
Py Out: Selected tab name: Debugger
If you only want the tab name (and not the description), use GetTabSelection()
instead. See “GetTabSelection()” on page 180.
Arguments are:
DumpTabValue()
DumpTabValue(widgetName="", block=True, printOutput=True)
Dumps the tab names of a Tab widget defined in the window. This function returns
a string for the tab names. As shown in the following example output, the tab names
are preceded by a short description:
Py Out: Tabs: General, Project Manager, Debugger
If you only want the tab names (and not the description), use GetTabNames()
instead. See “GetTabNames()” on page 180.
Arguments are:
GetCommandToDumpTab()
GetCommandToDumpTab(widgetName, dialog=False, level=0)
Gets the command that dumps the contents of a Tab widget's current page. The
widget may be defined in the window or in a modal dialog box. This function returns
a string for the command. The command that is returned is not documented and
should not be relied upon between MULTI IDE releases.
Arguments are:
GetCommandToDumpTabSelection()
GetCommandToDumpTabSelection(widgetName, dialog=False, level=0)
Gets the command that dumps a descriptive string and the current tab name of a
Tab widget. The widget may be defined in the window or in a modal dialog box.
This function returns a string for the command. The command that is returned is
not documented and should not be relied upon between MULTI IDE releases. For
more information about the descriptive string, see “DumpTabSelection()”
on page 177.
Arguments are:
GetCommandToDumpTabValue()
GetCommandToDumpTabValue(widgetName, dialog=False, level=0)
Gets the command that dumps the tab names of a Tab widget that is defined in the
window or in a modal dialog box. This function returns a string for the command.
The command that is returned is not documented and should not be relied upon
between MULTI IDE releases.
Arguments are:
GetCommandToSelectTab()
GetCommandToSelectTab(widgetName, tabName, dialog=False,
level=0)
Gets the command that selects a tab of a Tab widget defined in the window or in a
modal dialog box. This function returns a string for the command. The command
that is returned is not documented and should not be relied upon between MULTI
IDE releases.
Arguments are:
GetTabNames()
GetTabNames(widgetName)
Gets the tab names of a Tab widget defined in the window. This function returns a
list of tab names or an empty list upon error.
GetTabSelection()
GetTabSelection(widgetName)
Gets the name for the current tab of a Tab widget defined in the window. This
function returns a string for the current tab or an empty string ("") upon error.
SelectTab()
SelectTab(widgetName, tabName, block=True, printOutput=True)
Selects the tab of a Tab widget by name. The widget should be defined in the
window. This function returns True on success and False otherwise.
Arguments are:
Tip
The following functions require you to specify a widget name. You can
list widget names with the ShowWidgets() function. See
“ShowWidgets()” on page 148.
GetCommandToDumpText()
GetCommandToDumpText(widgetName, dialog=False, level=0)
Gets the command that dumps the value of a Text widget defined in the window
or in a modal dialog box. This function returns a string for the command. The
command that is returned is not documented and should not be relied upon between
MULTI IDE releases.
Arguments are:
GetTextValue()
GetTextValue(widgetName)
Gets the value of a Text widget defined in the window. This function returns the
widget's value as a string, or it returns an empty string ("") upon error.
Tip
Many of the following functions require you to specify a widget name.
You can list widget names with the ShowWidgets() function. See
“ShowWidgets()” on page 148.
DumpTextCellValue()
DumpTextCellValue(widgetName, block=True, printOutput=True)
Dumps the value, widget name, etc. of a TextCell widget defined in the window.
This function returns True on success and False otherwise.
Arguments are:
GetTextCellValue()
GetTextCellValue(widgetName)
Gets the value of a TextCell widget defined in the window. This function returns
the widget's value as a string, or it returns an empty string ("") upon error.
IsTextCellReadOnly()
IsTextCellReadOnly(widgetName)
Tip
Many of the following functions require you to specify a widget name.
You can list widget names with the ShowWidgets() function. See
“ShowWidgets()” on page 148.
ChangeTextFieldValue()
ChangeTextFieldValue(widgetName, value, hitReturn=True,
block=True, printOutput=True)
Changes the value of a TextField widget defined in the window. This function
returns True on success and False otherwise.
Arguments are:
DumpTextFieldValue()
DumpTextFieldValue(widgetName, block=True, printOutput=True)
Dumps the value, widget name, etc. of a TextField widget defined in the window.
This function returns True on success and False otherwise.
Arguments are:
GetCommandToChangeTextFieldValue()
GetCommandToChangeTextFieldValue(widgetName, value,
hitReturn=True, dialog=False, level=0)
Gets the command that changes the value of a TextField widget defined in the
window or in a modal dialog box. This function returns a string for the command.
The command that is returned is not documented and should not be relied upon
between MULTI IDE releases.
Arguments are:
GetCommandToDumpTextField()
GetCommandToDumpTextField(widgetName, dialog=False, level=0)
Gets the command that dumps the value of a TextField widget defined in the
window or in a modal dialog box. This function returns a string for the command.
The command that is returned is not documented and should not be relied upon
between MULTI IDE releases.
Arguments are:
GetCommandToReturnOnTextField()
GetCommandToReturnOnTextField(widgetName, dialog=False,
level=0)
Gets the command that simulates pressing Enter on a TextField widget defined
in the window or in a modal dialog box. This function returns a string for the
command. The command that is returned is not documented and should not be relied
upon between MULTI IDE releases.
Arguments are:
GetTextFieldValue()
GetTextFieldValue(widgetName)
Gets the value of a TextField widget defined in the window. This function returns
the widget's value as a string, or it returns an empty string ("") upon error.
Arguments are:
IsTextFieldReadOnly()
IsTextFieldReadOnly(widgetName)
ReturnOnTextField()
ReturnOnTextField(widgetName, block=True, printOutput=True)
Arguments are:
Contents
GHS_WindowRegister Basic Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
GHS_WindowRegister Check Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
GHS_WindowRegister Get Window Functions . . . . . . . . . . . . . . . . . . . . . . . . . 193
GHS_WindowRegister Interactive Functions . . . . . . . . . . . . . . . . . . . . . . . . . . 201
GHS_WindowRegister Window Manipulation Functions . . . . . . . . . . . . . . . . 206
GHS_WindowRegister Wait Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
Chapter 9. Window Tracking Functions
__init__()
__init__(workingDir="")
CheckWindow()
CheckWindow(winName, winId=0, winClass="", winRegSvcName="",
pid=0, fromWinList=None, notInWinList=None)
Checks that a MULTI IDE window is in one window list and not in another. If this
is the case, this function returns a GHS_Window object; otherwise, it returns None.
Arguments are:
• winName — Specifies the name of the window. An empty string ("") matches
any window name.
• winId — Specifies the internal ID of the window. A 0 (zero) matches any
window ID.
• winClass — Specifies the class of the window. An empty string ("") matches
any window class.
• winRegSvcName — Specifies the internal ID of the component to which the
window belongs. An empty string ("") matches any internal ID.
• pid — Specifies the PID of the process to which the window belongs. A 0
(zero) matches any PID.
• fromWinList — Specifies the window list that should contain the given
window. If an empty window list is given, the window list for the current system
is used.
• notInWinList — Specifies the window list that should not contain the given
window.
CheckWindowObject()
CheckWindowObject(winObj)
Checks whether a specified GHS_Window object exists in the system. If yes, this
function returns the GHS_Window object; otherwise, it returns None.
IsWindowInList()
IsWindowInList(winList, winName, winId=0, winClass="", pid=0,
winRegSvcName="")
Checks whether the specified window exists in a window list. This function returns
True if yes, and False otherwise.
Arguments are:
GetCheckoutBrowserWindow()
GetCheckoutBrowserWindow(winName="", pid=0, fromWinList=None,
notInWinList=None, warnIfNotFound=True)
Gets a MULTI Checkout Browser window from the given window list and returns
the created GHS_CoBrowseWindow object.
GetConnectionOrganizerWindow()
GetConnectionOrganizerWindow(winName="", pid=0,
fromWinList=None, notInWinList=None, warnIfNotFound=True)
Gets a MULTI Connection Organizer window from the given window list and
returns the created GHS_ConnectionOrganizerWindow object.
GetDebuggerWindow()
GetDebuggerWindow(winName="", pid=0, fromWinList=None,
notInWinList=None, warnIfNotFound=True)
Gets a MULTI Debugger window from the given window list and returns the created
GHS_DebuggerWindow object.
GetDialogByName()
GetDialogByName(winName="", pid=0, fromWinList=None,
notInWinList=None, warnIfNotFound=True)
Gets a MULTI IDE dialog box by its name and returns the created GHS_Window
object.
GetDiffViewerWindow()
GetDiffViewerWindow(winName="", pid=0, fromWinList=None,
notInWinList=None, warnIfNotFound=True)
Gets a MULTI Diff Viewer window from the given window list and returns the
created GHS_DiffViewWindow object.
GetEditorWindow()
GetEditorWindow(winName="", pid=0, fromWinList=None,
notInWinList=None, warnIfNotFound=True)
Gets a MULTI Editor window from the given window list and returns the created
GHS_EditorWindow object.
GetEventAnalyzerWindow()
GetEventAnalyzerWindow(winName="", pid=0, fromWinList=None,
notInWinList=None, warnIfNotFound=True)
Gets a MULTI EventAnalyzer window from the given window list and returns the
created GHS_EventAnalyzerWindow object.
GetHelpViewerWindow()
GetHelpViewerWindow(winName="", pid=0, fromWinList=None,
notInWinList=None, warnIfNotFound=True)
Gets a MULTI Help Viewer window from the given window list and returns the
created GHS_HelpViewerWindow object.
GetLauncherWindow()
GetLauncherWindow(winName="", pid=0, fromWinList=None,
notInWinList=None, warnIfNotFound=True)
Gets a MULTI Launcher window from the given window list and returns the created
GHS_LauncherWindow object.
GetOsaExplorerWindow()
GetOsaExplorerWindow(winName="", pid=0, fromWinList=None,
notInWinList=None, warnIfNotFound=True)
Gets a MULTI OSA Explorer window from the given window list and returns the
created GHS_OsaWindow object.
GetProjectManagerWindow()
GetProjectManagerWindow(winName="", pid=0, fromWinList=None,
notInWinList=None, warnIfNotFound=True)
Gets a MULTI Project Manager window from the given window list and returns
the created GHS_ProjectManagerWindow object.
GetPythonGuiWindow()
GetPythonGuiWindow(winName="", pid=0, fromWinList=None,
notInWinList=None, warnIfNotFound=True)
Gets a Python GUI window from the given window list and returns the created
GHS_PyGuiWindow object.
GetResourceAnalyzerWindow()
GetResourceAnalyzerWindow(winName="", pid=0, fromWinList=None,
notInWinList=None, warnIfNotFound=True)
Gets a MULTI ResourceAnalyzer window from the given window list and returns
the created GHS_ResourceAnalyzerWindow object.
GetTaskManagerWindow()
GetTaskManagerWindow(winName="", pid=0, fromWinList=None,
notInWinList=None, warnIfNotFound=True)
Gets a MULTI Task Manager window from the given window list and returns the
created GHS_TaskManagerWindow object.
GetTerminalWindow()
GetTerminalWindow(winName="", pid=0, fromWinList=None,
notInWinList=None, warnIfNotFound=True)
Gets an MTerminal window from the given window list and returns the created
GHS_TerminalWindow object.
GetTraceWindow()
GetTraceWindow(winName="", pid=0, fromWinList=None,
notInWinList=None, warnIfNotFound=True)
Gets a MULTI Trace List window from the given window list and returns the created
GHS_TraceWindow object.
GetWindowByIndex()
GetWindowByIndex(idx, winList=None)
Gets a GHS_Window object from an entry in a window list and returns the created
GHS_Window object.
Arguments are:
GetWindowByName()
GetWindowByName(winName="", pid=0, fromWinList=None,
notInWinList=None, warnIfNotFound=True)
Gets a MULTI IDE window by its name and returns the created GHS_Window object.
GetWindowList()
GetWindowList(showIt=False, showPid=True, showClassName=True,
showWinId=False, showServiceName=False, showParentWin=False,
showGuiClass=False)
Gets the window list for the current MULTI IDE session and returns a window list
object.
Arguments are:
• showIt — If True, displays the window list. The remaining arguments control
what items are displayed. If False, does not display the window list.
MULTI windows have two class names: one for their actual category, and
another for the category they are shown as in the GUI (such as in menus). The
two class names are usually the same, but they differ for some windows. For
example, the MULTI Project Manager's progress window is a normal window
but should be shown in menus as being part of the Project Manager category.
ShowWindowList()
ShowWindowList(showPid=True, showClassName=True,
showWinId=False, showServiceName=False, showParentWin=False,
showGuiClass=False)
Beep()
Beep(count=1, block=False, hostWin=None)
Beeps the specified number of times and returns True on success and False on
failure.
Arguments are:
ChooseDir()
ChooseDir(dftDir="", prompt="Choose directory:",
title="Directory Chooser", hostWin=None)
Allows you to choose a directory via MULTI's directory chooser. This function
returns the selected directory, or it returns an empty string ("") upon failure or
cancellation.
Arguments are:
• hostWin — Specifies the host window from which the directory chooser is
shown. If the argument is None or if it is not a GHS_Window object, a window
is randomly selected as the host window.
ChooseFile()
ChooseFile(dftFile="", dftDir="", label="OK", forOpen=True,
existingFile=False, extension="", fileTypes="",
eraseFilenameWhenDirChange=False, title="File Chooser",
hostWin=None)
Allows you to choose a file path via MULTI's file chooser. This function returns
the selected file path, or it returns an empty string ("") upon failure or cancellation.
Arguments are:
ChooseFromList()
ChooseFromList(dftValueIdx=0, valList=[], colValueSep="",
colNames=[], prompt="Select value from the list:",
title="Choose Value from List", helpkey="", hostWin=None)
Allows you to choose a value from a list displayed in a modal dialog box. This
function returns the string selected from the list, or it returns an empty string ("")
upon failure or cancellation. See also “ChooseFromList()” on page 106.
Arguments are:
ChooseWindowFromGui()
ChooseWindowFromGui(msg="Choose a window:", title="Choose
Window from List", wins=None, hostWin=None)
Allows you to choose a window from a window list displayed in a modal dialog
box. This function returns an object for the chosen window, or it returns None upon
failure or cancellation.
Arguments are:
ChooseYesNo()
ChooseYesNo(msg, dftChoice=0, printOutput=True, hostWin=None)
Displays the specified message in a dialog box that prompts you to choose between
Yes and No. This function returns True for Yes and False for No.
Arguments are:
GetInput()
GetInput(dftValue="", valList=[], onlyFromList=False,
prompt="Your input", title="", helpkey="", hostWin=None)
Gets user input via a modal dialog box. This function returns the input string, or it
returns an empty string ("") upon failure or cancellation.
Arguments are:
ShowMessage()
ShowMessage(msg, hostWin=None)
Displays the specified message in a dialog box and returns True on success and
False on failure.
Arguments are:
CloseAllWindows()
CloseAllWindows()
Closes all windows and returns True on success and False on failure.
IconifyAllWindows()
IconifyAllWindows()
Minimizes all windows and returns True on success and False on failure.
RestoreAllWindows()
RestoreAllWindows()
Restores all minimized windows and returns True on success and False on failure.
WaitForWindow()
WaitForWindow(oldWinListInfo, duration=0.0, winClass="",
winRegSvcName="", winName="", winId=0, warnIfNotFound=False)
Waits for the specified MULTI IDE window to appear and register. This function
returns a GHS_Window object for the given window, or it returns None if the window
does not register before the specified timeout.
Arguments are:
WaitForWindowFromClass()
WaitForWindowFromClass(oldWinListInfo, duration=0.0,
winClass="", winRegSvcName="", warnIfNotFound=False)
Waits for a MULTI IDE window from a certain class to show up and register. This
function returns a GHS_Window object for the given window, or it returns None if
the window does not register before the specified timeout.
WaitForWindowGoAway()
WaitForWindowGoAway(duration, winName, winId=0, winClass="",
winRegSvcName="", pid=0, notInWinList=None)
Waits for the specified MULTI IDE window to remove registration and disappear.
This function returns True if the specified MULTI IDE window does not exist (that
is, registration has been removed) when the function returns, and False otherwise.
Arguments are:
• duration — Specifies how long the function waits, if at all. The duration
may be:
○ A negative number — Indicates that the function waits until the window
disappears.
○ 0.0 — Indicates that the function does not wait.
○ A positive number — Specifies the maximum number of seconds that the
function waits.
• winName — Specifies the name of the window. This may be a regular
expression. An empty string ("") matches any window name.
WaitForWindowObjectGoAway()
WaitForWindowObjectGoAway(winObj, duration=0.0,
notInWinList=None)
Waits for the specified MULTI IDE window to remove registration and disappear.
This function returns True if the specified MULTI IDE window does not exist (that
is, registration has been removed) when the function returns, and False otherwise.
Arguments are:
• notInWinList — Specifies a window list that does not contain the window
you are waiting for. Windows in the list are ignored when this function attempts
to determine whether the specified window has disappeared.
Connection Functions
Contents
GHS_DebuggerApi Target Connection Functions . . . . . . . . . . . . . . . . . . . . . . 213
GHS_DebuggerApi Window Display Functions . . . . . . . . . . . . . . . . . . . . . . . . 215
GHS_DebugServer Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
GHS_Terminal Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
GHS_TerminalWindow Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
Chapter 10. Connection Functions
Note
This chapter documents only a subset of the functions from class
GHS_DebuggerApi. For information about other GHS_DebuggerApi
functions, see Chapter 11, “Debug Functions” on page 223.
ConnectToRtserv()
ConnectToRtserv(target="", setupScript="", setupScriptArgs="",
multiLog="", rtservLog="", moreOpts="", printOutput=True)
Connects to an RTOS target with the rtserv debug server. On success, this function
returns a GHS_DebugServer object for the rtserv run-mode debug connection.
Upon failure, it returns None.
Arguments are:
ConnectToRtserv2()
ConnectToRtserv2(target="", setupScript="", setupScriptArgs="",
multiLog="", rtservLog="", moreOpts="", printOutput=True)
Connects to an RTOS target with the rtserv2 debug server. On success, this function
returns a GHS_DebugServer object for the rtserv2 run-mode debug connection.
Upon failure, it returns None.
ConnectToTarget()
ConnectToTarget(dbserver, setupScript="", setupScriptArgs="",
multiLog="", stickToTheDebugger=True, moreOpts="",
printOutput=True)
Connects to a target with the specified debug server and options. On success, this
function returns a GHS_DebugServer object for the established debug server
connection. Upon failure, it returns None.
Arguments are:
Disconnect()
Disconnect(printOutput=True)
Disconnects the debug server connection associated with the current MULTI
Debugger process. This function returns True on success and False on failure.
• printOutput — If True, prints the output (if any). If False, does not print
output.
IsConnected()
IsConnected()
Checks whether any debug server connection is established for the current MULTI
Debugger process and returns True if yes and False otherwise.
ShowConnectionOrganizerWindow()
ShowConnectionOrganizerWindow(hardwareRegistryServer="",
printOutput=True)
Arguments are:
GHS_DebugServer Functions
The following sections describe functions from class GHS_DebugServer.
__init__()
__init__(component, winName="", winId="", winClassName="",
winRegSvcName="")
Arguments are:
• component — Stores the Debugger component's identifier string for the debug
server connection.
• winName — Stores the name that is registered for the window. This name may
not be the same as the name shown on the window's title bar.
• winId — Stores the window's internal ID.
• winClassName — Stores the window's class. For a list of window classes,
see “MULTI-Python Window Classes” on page 21.
• winRegSvcName — Specifies the internal ID of the component to which the
window belongs.
Disconnect()
Disconnect(printOutput=True)
Disconnects the debug server connection and returns True on success and False
on failure.
• printOutput — If True, prints the output (if any). If False, does not print
output.
GetComponent()
GetComponent()
Gets the MULTI Debugger component ID for the debug server connection. This
function returns the debug server connection's component ID.
LoadProgram()
LoadProgram(progName="", block=True)
Loads a dynamic download module to the target if this feature is supported and if
the target was configured with a dynamic loader (for example, the LoaderTask on
INTEGRITY). This function returns True on success and False on failure.
Arguments are:
RunCommands()
RunCommands(cmds, block=True, printOutput=True)
Executes MULTI Debugger commands in the context of the debug server connection.
This function returns True on success and False on failure.
Arguments are:
ShowTaskManagerWindow()
ShowTaskManagerWindow()
In a run-mode debugging environment, displays the Task Manager (if any) for the
debug server. In a freeze-mode debugging environment, displays the OSA Explorer
if the target is halted.
GHS_Terminal Functions
The following sections describe functions from class GHS_Terminal.
__init__()
__init__(workingDir="")
MakeConnection()
MakeConnection(connectCommand="")
GHS_TerminalWindow Functions
The following sections describe functions from class GHS_TerminalWindow.
ChangeBaudRate()
ChangeBaudRate(value, block=False)
Changes the current baud rate and returns True on success and False on failure.
Arguments are:
Connect()
Connect(block=False)
Connects to a serial port and returns True on success and False on failure.
• block — If True, executes Connect() in blocked mode and grabs and prints
the output (if any). If False, neither executes the function in blocked mode
nor grabs and prints the output.
Disconnect()
Disconnect(block=False)
Disconnects the current connection and returns True on success and False on
failure.
SendBreak()
SendBreak(block=False)
Sends a break to the serial port. This function returns True on success and False
on failure.
Debug Functions
Contents
GHS_Debugger Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225
GHS_DebuggerApi Debug Flag Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226
GHS_DebuggerApi Host Information Functions . . . . . . . . . . . . . . . . . . . . . . . 235
GHS_DebuggerApi Memory Access Functions . . . . . . . . . . . . . . . . . . . . . . . . 236
GHS_DebuggerApi Run Control Attributes and Functions . . . . . . . . . . . . . . . 238
GHS_DebuggerApi Symbol Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
GHS_DebuggerApi Target Information Functions . . . . . . . . . . . . . . . . . . . . . . 245
GHS_DebuggerApi Window Display Functions . . . . . . . . . . . . . . . . . . . . . . . . 249
GHS_DebuggerWindow Basic Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
GHS_DebuggerWindow Breakpoint Functions . . . . . . . . . . . . . . . . . . . . . . . . . 251
GHS_DebuggerWindow Print Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254
GHS_MemorySpaces Attributes and Functions . . . . . . . . . . . . . . . . . . . . . . . . 255
GHS_OsTypes Attributes and Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256
GHS_TargetIds Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257
GHS_Task Basic Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258
GHS_Task Run Control Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260
GHS_TraceWindow Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263
Chapter 11. Debug Functions
Note
Target connection functions and additional window display functions
of class GHS_DebuggerApi are documented in Chapter 10,
“Connection Functions” on page 211.
GHS_Debugger Functions
The following sections describe functions from class GHS_Debugger.
__init__()
__init__(workingDir="")
RunCommands()
RunCommands(cmds, block=True, printOutput=True)
Executes the specified MULTI Debugger commands and returns True on success
and False on failure.
Arguments are:
ChangeBreakpointInheritance()
ChangeBreakpointInheritance(toggle=True, newStatus=False)
Enables or disables software breakpoint inheritance after forking for the current
MULTI Debugger process. This option corresponds to the P b command. For more
information, see the P command in Chapter 2, “General Debugger Command
Reference” in the MULTI: Debugging Command Reference book.
Arguments are:
• toggle — If True, toggles the setting for the option, and ignores newStatus.
If False, does not toggle the setting.
• newStatus — If True, specifies that the option's new status is On. If False,
specifies that the option's new status is Off.
ChangeDebugChildren()
ChangeDebugChildren(toggle=True, newStatus=False)
for the current MULTI Debugger process. This option corresponds to the P c
command. For more information, see the P command in Chapter 2, “General
Debugger Command Reference” in the MULTI: Debugging Command Reference
book.
Arguments are:
• toggle — If True, toggles the setting for the option, and ignores the new
status. If False, does not toggle the setting.
• newStatus — If True, specifies that the option's new status is On. If False,
specifies that the option's new status is Off.
ChangeDebugOnTaskCreation()
ChangeDebugOnTaskCreation(toggle=True, newStatus=False)
for the current MULTI Debugger process. This option corresponds to the P d
command. For more information, see the P command in Chapter 2, “General
Debugger Command Reference” in the MULTI: Debugging Command Reference
book.
Arguments are:
• toggle — If True, toggles the setting for the option, and ignores the new
status. If False, does not toggle the setting.
• newStatus — If True, specifies that the option's new status is On. If False,
specifies that the option's new status is Off.
ChangeHaltOnAttach()
ChangeHaltOnAttach(toggle=True, newStatus=False)
Halt on Attach
for the current MULTI Debugger process. This option corresponds to the P h
command. For more information, see the P command in Chapter 2, “General
Debugger Command Reference” in the MULTI: Debugging Command Reference
book.
Arguments are:
• toggle — If True, toggles the setting for the option, and ignores the new
status. If False, does not toggle the setting.
• newStatus — If True, specifies that the option's new status is On. If False,
specifies that the option's new status is Off.
ChangeInheritProcessBits()
ChangeInheritProcessBits(toggle=True, newStatus=False)
for the current MULTI Debugger process. This option corresponds to the P i
command. For more information, see the P command in Chapter 2, “General
Debugger Command Reference” in the MULTI: Debugging Command Reference
book.
Arguments are:
• toggle — If True, toggles the setting for the option, and ignores the new
status. If False, does not toggle the setting.
• newStatus — If True, specifies that the option's new status is On. If False,
specifies that the option's new status is Off.
ChangeRunOnDetach()
ChangeRunOnDetach(toggle=True, newStatus=False)
Run on Detach
for the current MULTI Debugger process. This option corresponds to the P r
command. For more information, see the P command in Chapter 2, “General
Debugger Command Reference” in the MULTI: Debugging Command Reference
book.
Arguments are:
• toggle — If True, toggles the setting for the option, and ignores the new
status. If False, does not toggle the setting.
• newStatus — If True, specifies that the option's new status is On. If False,
specifies that the option's new status is Off.
ChangeStopAfterExec()
ChangeStopAfterExec(toggle=True, newStatus=False)
for the current MULTI Debugger process. This option corresponds to the P e
command. For more information, see the P command in Chapter 2, “General
Debugger Command Reference” in the MULTI: Debugging Command Reference
book.
Arguments are:
• toggle — If True, toggles the setting for the option, and ignores the new
status. If False, does not toggle the setting.
• newStatus — If True, specifies that the option's new status is On. If False,
specifies that the option's new status is Off.
ChangeStopAfterFork()
ChangeStopAfterFork(toggle=True, newStatus=False)
for the current MULTI Debugger process. This option corresponds to the P f
command. For more information, see the P command in Chapter 2, “General
Debugger Command Reference” in the MULTI: Debugging Command Reference
book.
Arguments are:
• toggle — If True, toggles the setting for the option, and ignores the new
status. If False, does not toggle the setting.
• newStatus — If True, specifies that the option's new status is On. If False,
specifies that the option's new status is Off.
ChangeStopOnTaskCreation()
ChangeStopOnTaskCreation(toggle=True, newStatus=False)
for the current MULTI Debugger process. This option corresponds to the P t
command. For more information, see the P command in Chapter 2, “General
Debugger Command Reference” in the MULTI: Debugging Command Reference
book.
Arguments are:
• toggle — If True, toggles the setting for the option, and ignores the new
status. If False, does not toggle the setting.
• newStatus — If True, specifies that the option's new status is On. If False,
specifies that the option's new status is Off.
CheckBreakpointInheritance()
CheckBreakpointInheritance()
This function returns True if the option is enabled and False otherwise.
CheckDebugChildren()
CheckDebugChildren()
Checks if the option Debug Child Tasks/Processes is enabled for the current
MULTI Debugger process. This option corresponds to the P c command. For more
information, see the P command in Chapter 2, “General Debugger Command
Reference” in the MULTI: Debugging Command Reference book.
This function returns True if the option is enabled and False otherwise.
CheckDebugOnTaskCreation()
CheckDebugOnTaskCreation()
Checks if the option Debug on Task Creation is enabled for the current MULTI
Debugger process. This option corresponds to the P d command. For more
information, see the P command in Chapter 2, “General Debugger Command
Reference” in the MULTI: Debugging Command Reference book.
This function returns True if the option is enabled and False otherwise.
CheckHaltOnAttach()
CheckHaltOnAttach()
Checks if the option Halt on Attach is enabled for the current MULTI Debugger
process. This option corresponds to the P h command. For more information, see
the P command in Chapter 2, “General Debugger Command Reference” in the
MULTI: Debugging Command Reference book.
This function returns True if the option is enabled and False otherwise.
CheckInheritProcessBits()
CheckInheritProcessBits()
Checks if the option Inherit Process Bits in Child is enabled for the
current MULTI Debugger process. This option corresponds to the P i command.
For more information, see the P command in Chapter 2, “General Debugger
Command Reference” in the MULTI: Debugging Command Reference book.
This function returns True if the option is enabled and False otherwise.
CheckRunOnDetach()
CheckRunOnDetach()
Checks if the option Run on Detach is enabled for the current MULTI Debugger
process. This option corresponds to the P r command. For more information, see
the P command in Chapter 2, “General Debugger Command Reference” in the
MULTI: Debugging Command Reference book.
This function returns True if the option is enabled and False otherwise.
CheckStopAfterExec()
CheckStopAfterExec()
Checks if the option Stop After Exec is enabled for the current MULTI Debugger
process. This option corresponds to the P e command. For more information, see
the P command in Chapter 2, “General Debugger Command Reference” in the
MULTI: Debugging Command Reference book.
This function returns True if the option is enabled and False otherwise.
CheckStopAfterFork()
CheckStopAfterFork()
Checks if the option Stop After Fork is enabled for the current MULTI Debugger
process. This option corresponds to the P f command. For more information, see
the P command in Chapter 2, “General Debugger Command Reference” in the
MULTI: Debugging Command Reference book.
This function returns True if the option is enabled and False otherwise.
CheckStopOnTaskCreation()
CheckStopOnTaskCreation()
Checks if the option Stop on Task Creation is enabled for the current MULTI
Debugger process. This option corresponds to the P t command. For more
information, see the P command in Chapter 2, “General Debugger Command
Reference” in the MULTI: Debugging Command Reference book.
This function returns True if the option is enabled and False otherwise.
GetHostOsName()
GetHostOsName()
Gets the host operating system name. This function returns a string for the host
operating system name, or it returns an empty string ("") upon error.
GetMultiVersion()
GetMultiVersion(which=0)
Gets the MULTI IDE's major, minor, or micro version and returns it. Versions are
denoted in the following manner: major.minor.micro. For example, MULTI
1.2.3 indicates major version 1, minor version 2, and micro version 3.
ReadIndirectValue()
ReadIndirectValue(addressPort, addressValue, valuePort,
addressSizeInBytes=4, valueSizeInBytes=4, printError=True)
Arguments are:
ReadIntegerFromMemory()
ReadIntegerFromMemory(address, sizeInBytes=4, printError=True)
Reads an integer from the specified memory location and returns the integer from
memory or returns 0 upon failure.
Arguments are:
ReadStringFromMemory()
ReadStringFromMemory(address, printError=True)
Reads a null-terminated string from the specified memory location and returns the
string from memory or returns an empty string ("") upon failure.
Arguments are:
WriteIntegerToMemory()
WriteIntegerToMemory(address, value, sizeInBytes=4,
printError=True)
Writes an integer to the specified memory location and returns True on success
and False on failure.
Arguments are:
WriteStringToMemory()
WriteStringToMemory(address, stringValue, printError=True)
Writes a string to the specified memory location and returns True on success and
False on failure.
Arguments are:
The following sections describe the run control functions from class
GHS_DebuggerApi.
DebugProgram()
DebugProgram(fileName, newWin=True, block=True,
printOutput=True, expandFileName=True)
Loads a program in the Debugger, replacing the currently selected target list entry
or adding a new target list entry. On success, this function returns a
GHS_DebuggerWindow object for the MULTI Debugger window. On failure, it
returns None.
Arguments are:
with its current working directory if necessary. For more information, see the
expandFileName description in “LoadWorkspaceFile()” on page 305.
GetPc()
GetPc()
Gets the PC value of the program being debugged. On success, this function returns
the PC register's value. On error, it returns -1.
GetProgram()
GetProgram()
Gets the name of the program being debugged and returns a string for the name, or
returns an empty string ("") upon failure.
GetStatus()
GetStatus()
Gets the MULTI process's status as a number and returns the number or returns -1
upon error.
GetTargetPid()
GetTargetPid()
Gets the ID of the process being debugged on the target. This function returns the
ID, or it returns 0 upon error.
Halt()
Halt(block=True, printOutput=True)
Halts the process currently being debugged on the target and returns True on success
and False on failure.
Arguments are:
• block — If True, executes Halt() in blocked mode and grabs the output (if
any). If False, neither executes the function in blocked mode nor grabs the
output.
• printOutput — If True, prints the output. If False, does not print the output.
IsHalted()
IsHalted()
Checks whether the process currently being debugged is halted on the target and
returns True if yes, and False otherwise.
IsRunning()
IsRunning()
Checks whether the process currently being debugged is running on the target and
returns True if yes, and False otherwise.
IsStarted()
IsStarted()
Checks whether the program being debugged has been loaded and started on the
target. This function returns True if yes, and False otherwise.
Kill()
Kill(force=True, block=True, printOutput=True)
Kills the current process being debugged on the target. This function returns True
on success and False on failure.
Arguments are:
• force — If True, forcefully kills the process. If False, does not forcefully
kill the process.
• block — If True, executes Kill() in blocked mode and grabs the output (if
any). If False, neither executes the function in blocked mode nor grabs the
output.
• printOutput — If True, prints the output. If False, does not print the output.
Next()
Next(block=True, printOutput=True, stepIntoFunc=False)
Single-steps the process currently being debugged on the target, stepping over
function calls by default. This function returns True on success and False on
failure.
Arguments are:
• block — If True, executes Next() in blocked mode and grabs the output (if
any). If False, neither executes the function in blocked mode nor grabs the
output.
• printOutput — If True, prints the output. If False, does not print the output.
• stepIntoFunc — If True, steps into functions when the current position is
a function call. If False, steps over functions.
Resume()
Resume(block=True, printOutput=True)
Resumes the process currently being debugged on the target. This function returns
True on success and False on failure.
Arguments are:
• block — If True, executes Resume() in blocked mode and grabs the output
(if any). If False, neither executes the function in blocked mode nor grabs the
output.
• printOutput — If True, prints the output. If False, does not print the output.
Step()
Step(block=True, printOutput=True, stepIntoFunc=True)
Single-steps the process currently being debugged on the target, stepping into
function calls by default. This function returns True on success and False on
failure.
Arguments are:
• block — If True, executes Step() in blocked mode and grabs the output (if
any). If False, neither executes the function in blocked mode nor grabs the
output.
• printOutput — If True, prints the output. If False, does not print the output.
• stepIntoFunc — If True, steps into functions when the current position is
a function call. If False, steps over functions.
WaitToStop()
WaitToStop(duration=-1.0, checkInterval=0.5)
Waits for the process being debugged to stop on the target. This function returns
True if the process has stopped before the timeout, and it returns False otherwise.
Arguments are:
• duration — Specifies how long the function waits, if at all. The duration
may be:
○ A negative number — Indicates that the function waits until the process
is stopped on the target.
○ 0 — Indicates that the function does not wait at all.
○ A positive number — Specifies the maximum number of seconds that the
function waits.
• checkInterval — Specifies the interval (in seconds) between status checks.
CheckSymbol()
CheckSymbol(symbolName="")
Checks whether a symbol exists in the MULTI Debugger process and returns True
if yes and False otherwise.
GetSymbolAddress()
GetSymbolAddress(symbolName="")
Gets the memory address of a symbol in the MULTI Debugger process. This function
returns the symbol's memory address, or it returns 0 upon error.
GetSymbolSize()
GetSymbolSize(symbolName="")
Gets a symbol's size if it exists. This function returns the size (in bytes) of the
symbol, or it returns a 0 upon error.
BigEndianTarget()
BigEndianTarget()
Checks whether the target is big endian or little endian. This function returns True
if the target is big endian and False if it is little endian.
GetCpuFamily()
GetCpuFamily(targetId=0)
Gets the target CPU family ID from the target ID. This function returns the target
CPU family ID (see “GHS_TargetIds Functions” on page 257), or it returns 0 upon
failure.
• targetId — Specifies the target ID. If targetId is 0, the function gets the
target ID by itself.
GetCpuMinor()
GetCpuMinor(targetId=0)
Gets the target CPU minor ID. This function returns the target CPU minor ID (see
“GHS_TargetIds Functions” on page 257), or it returns 0 upon failure.
• targetId — Specifies the target ID. If targetId is 0, the function gets the
target ID by itself.
GetTargetCoProcessor()
GetTargetCoProcessor()
Gets the target coprocessor ID and returns the ID (see “GHS_TargetIds Functions”
on page 257) or returns 0 upon failure.
GetTargetCpuFamilyName()
GetTargetCpuFamilyName()
Gets the target CPU family name, which is the same as the name used in the MULTI
project file. This function returns the target CPU family name, or it returns an empty
string ("") upon failure.
GetTargetId()
GetTargetId()
Gets the target ID. This function returns the ID, or it returns a 0 upon failure. See
the description of _TARGET in “System Variables” in Chapter 14, “Using
Expressions, Variables, and Function Calls” in the MULTI: Debugging book.
GetTargetOsMinorType()
GetTargetOsMinorType()
Gets the target operating system minor type. This function returns the minor type,
or it returns a 0 upon error. For various minor types, see “GHS_OsTypes Attributes
and Functions” on page 256.
GetTargetOsName()
GetTargetOsName(detail=True)
Gets the target operating system name, if any. This function returns the target
operating system name, or it returns "standalone" for stand-alone programs.
• detail — If True, gets the detailed OS name, if any (for example, linux).
If False, gets the generic OS name (for example, unix).
GetTargetOsType()
GetTargetOsType()
Gets the target operating system type. This function returns the operating system
type, or it returns 0 for stand-alone programs. For various operating system types,
see “GHS_OsTypes Attributes and Functions” on page 256.
GetTargetSeries()
GetTargetSeries()
Gets the value of the _TARGET_SERIES system variable, which may contain
information about the target processor series. This function returns the value, or it
returns 0 upon failure. See also the description of _TARGET_SERIES in “System
Variables” in Chapter 14, “Using Expressions, Variables, and Function Calls” in
the MULTI: Debugging book.
IsFreezeMode()
IsFreezeMode()
IsNativeDebugging()
IsNativeDebugging()
Checks whether the program being debugged is for native debugging and returns
True if yes and False otherwise.
IsRunMode()
IsRunMode()
ShowOsaExplorerWindow()
ShowOsaExplorerWindow(haltTargetIfNecessary=True,
printOutput=True)
Arguments are:
• printOutput — If True, prints the output (if any). If False, does not print
output.
ShowTaskManagerWindow()
ShowTaskManagerWindow()
In a run-mode debugging environment, displays the Task Manager (if any) for the
debug server. In a freeze-mode debugging environment, displays the OSA Explorer
if the target is halted.
ShowTraceWindow()
ShowTraceWindow(printOutput=True)
• printOutput — If True, prints the output (if any). If False, does not print
output.
RunCommands()
RunCommands(cmds, block=True, printOutput=True)
Arguments are:
RemoveBreakpoint()
RemoveBreakpoint(location="", grabOutput=False)
Removes software breakpoint set at the specified location. If you do not specify a
location, all software breakpoints set in the MULTI Debugger window are removed.
This function returns True on success and False on failure.
Arguments are:
SetBreakpoint()
SetBreakpoint(location="", bpType="", grabOutput=False)
Sets a non-group software breakpoint at the specified location and returns True on
success and False on failure.
Arguments are:
SetGroupBreakpoint()
SetGroupBreakpoint(location="", hitGrp="", haltGrp="",
grabOutput=False)
Sets a group breakpoint at the specified location. (For information about group
breakpoints, see “Group Breakpoints” in “Run-Mode Debugging” in the MULTI:
Debugging book.) This function returns True on success and False on failure.
Arguments are:
• haltGrp — Specifies the name of the group to halt. If you do not specify a
group, a group consisting only of the current task is used.
• grabOutput — If True, executes SetGroupBreakpoint() in blocked mode
and grabs the output (if any). If False, neither executes the function in blocked
mode nor grabs the output.
ShowBreakpoints()
ShowBreakpoints(block=True, printOutput=True)
Shows information about all software breakpoints visible in the MULTI Debugger
window. This function returns True on success and False on failure.
Arguments are:
ShowBreakpointWindow()
ShowBreakpointWindow(block=True)
Displays the Breakpoints window. If this function is executed successfully and the
block argument is True, the function returns a GHS_Window object for the
Breakpoints window. If this function fails or if the block argument is False, the
function returns None.
DumpToFile()
DumpToFile(fileName="", block=True, printOutput=True)
Writes the contents of the Debugger's source pane into a text file. This function
returns True on success and False on failure.
Arguments are:
• fileName — Specifies the name of the file to write to. If you do not specify
a filename, the Debugger opens a file chooser from which you can select a file.
• block — If True, executes DumpToFile() in blocked mode and grabs the
output (if any). If False, neither executes the function in blocked mode nor
grabs the output.
• printOutput — If True, prints the output (if any). If False, does not print
the output.
PrintFile()
PrintFile(block=True, printOutput=True)
Prints the entire source file currently being viewed in the Debugger window. This
function returns True on success and False on failure.
Arguments are:
PrintWindow()
PrintWindow(block=True, printOutput=True)
Prints the contents currently being viewed in the Debugger window. This function
returns True on success and False on failure.
Arguments are:
__init__()
__init__()
The following list describes the attributes of this class. Major OS types are:
__init__()
__init__()
GHS_TargetIds Functions
Class GHS_TargetIds defines the target IDs supported in the MULTI Debugger.
About 500 such IDs exist. To view a complete list of target IDs and function names,
enter the following statement:
Python> ghs_printobject(dir(targetIds))
Note
The values are constant; do not change them.
__init__()
__init__()
__init__()
__init__(dbcomponent, addressSpace, taskIdOrName,
taskComponent="", wn="", wid="0", cn="", regSvcName="")
Arguments are:
RunCommands()
RunCommands(cmds, block=True, printOutput=True)
Arguments are:
RunCommandsViaDebugServer()
RunCommandsViaDebugServer(cmds, block=True, printOutput=True)
Executes MULTI Debugger commands via the corresponding debug server. This
function returns True on success and False on failure.
Arguments are:
Attach()
Attach(flags="", block=True, printOutput=True)
Attaches to the task and returns a string for the task's component ID.
Arguments are:
Detach()
Detach(flags="", block=False, printOutput=True)
Detaches from the task and returns True on success and False on failure.
Arguments are:
Halt()
Halt(block=True, printOutput=True)
Halts execution of the task. If the task is not attached and the debug server does not
support halting without attaching, the operation fails. This function returns True
on success and False on failure.
Arguments are:
• block — If True, executes Halt() in blocked mode and grabs the output (if
any). If False, neither executes the function in blocked mode nor grabs the
output.
• printOutput — If True, prints the output. If False, does not print the output.
Next()
Next(block=True, printOutput=True, stepIntoFunc=False)
Single-steps the task, stepping over function calls by default. If the task is not
attached and the debug server does not support resuming without attaching, the
operation fails. This function returns True on success and False on failure.
Arguments are:
• block — If True, executes Next() in blocked mode and grabs the output (if
any). If False, neither executes the function in blocked mode nor grabs the
output.
• printOutput — If True, prints the output (if any). If False, does not print
the output.
• stepIntoFunc — If True, steps into functions when the current position is
a function call. If False, steps over functions.
Resume()
Resume(block=True, printOutput=True)
Resumes execution of the task. If the task is not attached and the debug server does
not support resuming without attaching, the operation fails. This function returns
True on success and False on failure.
Arguments are:
• block — If True, executes Resume() in blocked mode and grabs the output
(if any). If False, neither executes the function in blocked mode nor grabs the
output.
• printOutput — If True, prints the output. If False, does not print the output.
Step()
Step(block=True, printOutput=True, stepIntoFunc=True)
Single-steps the task, stepping into function calls by default. If the task is not attached
and the debug server does not support resuming without attaching, the operation
fails. This function returns True on success and False on failure.
Arguments are:
• block — If True, executes Step() in blocked mode and grabs the output (if
any). If False, neither executes the function in blocked mode nor grabs the
output.
• printOutput — If True, prints the output (if any). If False, does not print
the output.
• stepIntoFunc — If True, steps into functions when the current position is
a function call. If False, steps over functions.
GHS_TraceWindow Functions
The following sections describe functions from class GHS_TraceWindow.
FlushTraceBuffer()
FlushTraceBuffer(block=True)
Flushes the trace buffer on the target. This function returns True on success and
False on failure.
JumpToTrigger()
JumpToTrigger(block=True)
Jumps to the trigger and returns True on success and False on failure.
StartTracing()
StartTracing(block=True)
Starts the collection of trace data and returns True on success and False on failure.
StopTracing()
StopTracing(block=True)
Stops the collection of trace data and returns True on success and False on failure.
Editor Functions
Contents
GHS_Editor Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
GHS_EditorWindow Edit Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268
GHS_EditorWindow File Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
GHS_EditorWindow Selection and Cursor Functions . . . . . . . . . . . . . . . . . . . 273
GHS_EditorWindow Version Control Functions . . . . . . . . . . . . . . . . . . . . . . . . 276
Chapter 12. Editor Functions
GHS_Editor Functions
The following sections describe functions from class GHS_Editor.
__init__()
__init__(serviceName="Editor.Multi", workingDir="")
Arguments are:
EditFile()
EditFile(fileName, reuseEditorWindow=True, expandFileName=True)
Loads a file into a MULTI Editor window. On success, this function returns a
GHS_EditorWindow object for the MULTI Editor window. On failure, it returns
None.
Arguments are:
GotoLine()
GotoLine(fileName, lineNo, reuseEditorWindow=True,
expandFileName=True)
Loads a file into a MULTI Editor window and moves the cursor to the specified
line. On success, this function returns a GHS_EditorWindow object for the MULTI
Editor window. On failure, it returns None.
AddString()
AddString(dataStr="", pos=0)
Adds a text string to the file that is open in the Editor. This function returns True
on success and False on failure.
Arguments are:
Copy()
Copy(which=1)
Copies the selected string to the clipboard and returns True on success and False
on failure.
Cut()
Cut(which=1)
Cuts the selected string and stores it on the clipboard. This function returns True
on success and False on failure.
GetTextLines()
GetTextLines(removeCrs=True)
Returns a list of strings for the text in the Editor window. Each string in the list
corresponds to a line in the Editor window. An empty list is returned upon error.
GetTextString()
GetTextString()
Returns a string for the text in the Editor window. An empty string ("") is returned
upon error.
Paste()
Paste(which=1, waitingTime=1.0)
Pastes the clipboard contents to the current cursor position. This function returns
True on success and False on failure.
Arguments are:
The Editor's Paste command returns immediately after the first part is done,
even when the function is executed in blocked mode. Specifying a wait period
allows the second part of the paste to finish.
Redo()
Redo()
Restores the edit that was reversed by Undo() (see “Undo()” on page 270). This
function returns True on success and False on failure.
Undo()
Undo()
Reverses the last change made to the current file and returns True on success and
False on failure.
CloseCurrentFile()
CloseCurrentFile()
Closes the file currently displayed in the MULTI Editor window and returns True
on success and False on failure.
GotoNextFile()
GotoNextFile()
Cycles to the next buffered file. The MULTI Editor keeps a circular list of loaded
files, and you can navigate to each of them (that is, display the file in the MULTI
Editor window). This function returns True on success and False on failure.
GotoPrevFile()
GotoPrevFile()
Cycles to the previous buffered file. The MULTI Editor keeps a circular list of
loaded files, and you can navigate to each of them (that is, display the file in the
MULTI Editor window). This function returns True on success and False on
failure.
OpenFile()
OpenFile(fileName="", newWindow=False, block=True)
Loads a file into a MULTI Editor window. On success, this function returns a
GHS_EditorWindow object for the MULTI Editor window. On failure, it returns
None.
Arguments are:
SaveAsFile()
SaveAsFile(fileName="")
Saves the current file (including changes) to another file. This function returns True
on success and False on failure.
• fileName — Specifies the name of the file to save to. If fileName is an empty
string (""), the MULTI Editor saves changes to the current file into the same
file (that is, it performs a save rather than a save as).
SaveIntoFile()
SaveIntoFile()
Saves changes to the current file and returns True on success and False on failure.
FlashCursor()
FlashCursor()
Makes the location of the cursor obvious by flashing the line where it is located.
This function returns True on success and False on failure.
GetSelection()
GetSelection(printRes=False, getGuiPos=True)
Gets the selection range and returns a tuple with the following components:
(BeginLine, BeginColumn, EndLine, EndColumn)
Line numbering starts at 1. Column numbering starts at 1 for GUI positions and at
0 for string positions.
Arguments are:
• printRes — If True, prints the selection range. If False, does not print the
selection range.
• getGuiPos — If True, the BeginColumn and EndColumn values correspond
to the one-based column positions displayed in the MULTI Editor status bar.
A Tab is counted as the number of characters configured for the Tab width.
If False, the BeginColumn and EndColumn values are string indices, which
are zero-based. A Tab is counted as one character.
GetSelectedString()
GetSelectedString(printRes=False)
Gets the selected string. This function returns the string, or it returns an empty string
("") upon failure.
• printRes — If True, prints the selected string. If False, does not print the
selected string.
MoveCursor()
MoveCursor(line=1, col=1, flash=True)
Moves the cursor to the specified position and returns True on success and False
on failure.
Arguments are:
• line — Specifies the number of the line where you want to move the cursor.
A 0 (zero) or a negative value indicates the end of the file.
• col — Specifies the number of the column where you want to move the cursor.
The cursor is moved before the specified column. col is a GUI position
(one-based, starting from the left-most column). A 0 (zero) or a negative value
indicates the end of the line.
SelectAll()
SelectAll()
Selects all the content in the MULTI Editor window and returns True on success
and False on failure.
SelectRange()
SelectRange(beginLine=-1, beginCol=-1, endLine=-1, endCol=-1,
guiPos=True)
Arguments are:
• beginLine — Specifies the number of the line where the selection begins. A
0 (zero) or a negative value indicates the first line.
• beginCol — Specifies the number of the column where the selection begins.
A 0 (zero) or a negative value indicates the first column.
• endLine — Specifies the number of the line where the selection ends. A 0
(zero) or a negative value indicates the end of the file.
• endCol — Specifies the number of the column where the selection ends. A 0
(zero) or a negative value indicates the end of the line.
• guiPos — If True, interprets beginCol and endCol as corresponding to the
one-based column positions displayed in the MULTI Editor status bar. A Tab
is counted as the number of characters configured for the Tab width.
If False, beginCol and endCol are interpreted as string indices, which are
zero-based. A Tab is counted as one character.
Checkin()
Checkin()
Checks the current file into version control and returns True on success and False
on failure.
Checkout()
Checkout()
Checks the current file out of version control and returns True on success and
False on failure.
PlaceUnderVC()
PlaceUnderVC()
Places the current file under version control and returns True on success and False
on failure.
EventAnalyzer Functions
Contents
GHS_EventAnalyzer Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278
GHS_EventAnalyzerWindow File Functions . . . . . . . . . . . . . . . . . . . . . . . . . . 281
GHS_EventAnalyzerWindow View and Selection Functions . . . . . . . . . . . . . 282
GHS_EventAnalyzerWindow Miscellaneous Functions . . . . . . . . . . . . . . . . . 286
Chapter 13. EventAnalyzer Functions
Note
When all MULTI EventAnalyzer windows opened on an instance
of the class are closed, the instance of the service automatically shuts
down, even if a Python object holds a reference to it.
For more information about the EventAnalyzer, see the EventAnalyzer User's Guide.
GHS_EventAnalyzer Functions
The following sections describe functions from class GHS_EventAnalyzer.
__init__()
__init__(workingDir="")
CloseFile()
CloseFile(dataFile)
Closes the MULTI EventAnalyzer window displaying the specified event data file.
This function returns True on success and False on failure.
GetFileList()
GetFileList(showThem=True, onlyShowBaseName=False)
Gets a list of the data files displayed in MULTI EventAnalyzer windows. On success,
this function returns a list of strings for the data files. On failure, it returns an empty
list.
Arguments are:
• showThem — If True, displays the filenames. If False, does not display the
filenames.
• onlyShowBaseName — If True, only displays the base names. If False,
displays the full path to the filename.
OpenFile()
OpenFile(dataFile="", title=None, newWin=True, raiseWin=True,
reloadData=True)
Displays an event data file in the MULTI EventAnalyzer. On success, the function
returns a GHS_EventAnalyzerWindow object for the MULTI EventAnalyzer
window. On failure, it returns None.
Arguments are:
ScrollToPosition()
ScrollToPosition(dataFile, timeValue, newWin=True,
raiseWin=True, newWinIfNotExist=True, reloadData=True, oid=0)
Displays an event data file in the MULTI EventAnalyzer window and scrolls to the
specified position. On success, this function returns a GHS_EventAnalyzerWindow
object for the MULTI EventAnalyzer window. On failure, it returns None.
• timeValue — Specifies the time (in seconds or ticks) that you want to scroll
to.
• newWinIfNotExist — If True, displays the event data file in a new MULTI
EventAnalyzer window when the data file is not being shown in an existing
MULTI EventAnalyzer window. If False, reuses an existing MULTI
EventAnalyzer window.
• oid — Specifies the ID of the task, thread, etc. that you want to scroll to.
CloseFile()
CloseFile(block=True, printOutput=True)
Closes the file displayed in the MULTI EventAnalyzer window and returns True
on success and False on failure.
Arguments are:
OpenFile()
OpenFile(fileName="", block=True, printOutput=True)
Displays an event file in the MULTI EventAnalyzer window. This function returns
True on success and False on failure.
Arguments are:
GotoFirstView()
GotoFirstView(block=True, printOutput=True)
Displays the earliest view in the history and returns True on success and False
on failure.
Arguments are:
GotoLastView()
GotoLastView(block=True, printOutput=True)
Displays the latest view in the history and returns True on success and False on
failure.
Arguments are:
GotoNextView()
GotoNextView(block=True, printOutput=True)
Displays the next view in the history and returns True on success and False on
failure.
Arguments are:
GotoPrevView()
GotoPrevView(block=True, printOutput=True)
Displays the previous view in the history and returns True on success and False
on failure.
Arguments are:
SelectRange()
SelectRange(begin, end, unit="")
Selects a range in the MULTI EventAnalyzer window. This function returns True
on success and False on failure.
Arguments are:
If you do not specify a time unit, begin and end are assumed to be in seconds
unless the event data does not include timestamps. In this case, ticks are used.
ToggleFlatView()
ToggleFlatView(block=True, printOutput=True)
Toggles the object list between hierarchy and flat view. If the object list has no
hierarchy, the operation has no effect. This function returns True on success and
False on failure.
Arguments are:
ViewRange()
ViewRange(begin, end, unit="")
Allows you to view a range in the MULTI EventAnalyzer window. This function
returns True on success and False on failure.
Arguments are:
ZoomIn()
ZoomIn()
ZoomOut()
ZoomOut()
Zooms out from the MULTI EventAnalyzer window by a factor of 2. This function
returns True on success and False on failure.
ZoomToSelection()
ZoomToSelection()
AutoTimeUnit()
AutoTimeUnit(toggle=True, auto=True)
Changes how the time unit is determined. This function returns True on success
and False on failure.
Arguments are:
• toggle — If True, toggles between automatically adjusting the time unit and
requiring you to manually change the time unit. If False, does not toggle these
settings.
• auto — If True, the EventAnalyzer automatically adjusts to an appropriate
time unit whenever the view is changed. If False, you must manually set the
time unit. This argument is only effective when toggle is False.
ChangeTimeUnit()
ChangeTimeUnit(unit="", gui=False)
Changes the time unit. This function returns True on success and False on failure.
Arguments are:
• unit — Specifies the time unit of the range. If you do not specify a time unit,
unit is set to the next larger time unit. For more information, see
“SelectRange()” on page 284.
• gui — If True, displays a dialog box from which you can choose a time unit.
If False, does not display a dialog box.
NewWindow()
NewWindow()
SaveMevConfiguration()
SaveMevConfiguration(block=True, printOutput=True)
Saves configuration changes to the configuration file. This function returns True
on success and False on failure.
Arguments are:
ShowLegend()
ShowLegend()
Displays the Legend window and returns True on success and False on failure.
Launcher Functions
Contents
GHS_Action Attributes and Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291
GHS_ActionSequence Attributes and Functions . . . . . . . . . . . . . . . . . . . . . . . . 292
GHS_Variable Attributes and Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293
GHS_Workspace Attributes and Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294
GHS_Launcher Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298
GHS_LauncherWindow Action Execution Functions . . . . . . . . . . . . . . . . . . . 298
GHS_LauncherWindow Action Manipulation Functions . . . . . . . . . . . . . . . . 301
GHS_LauncherWindow Workspace Manipulation Functions . . . . . . . . . . . . . 303
GHS_LauncherWindow Variable Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . 308
Chapter 14. Launcher Functions
• name — Stores the action type (for example, Editor or Python Statement).
For more action types, see “Creating or Modifying an Action” in Chapter 3,
“Managing Workspaces and Shortcuts with the Launcher” in the MULTI:
Managing Projects and Configuring the IDE book.
• args — Stores action arguments. The validity of an argument depends on the
value of name. For example, an Editor action may take a file path or a filename
as an argument, while a Python Statement may accept a Python statement
as an argument. For more information, see “Creating or Modifying an Action”
in Chapter 3, “Managing Workspaces and Shortcuts with the Launcher” in the
MULTI: Managing Projects and Configuring the IDE book.
• enabled — Stores the status of the action (that is, whether it's enabled or
disabled). Disabled actions do not run when the action sequence containing
them is executed.
• parent — Stores the GHS_ActionSequence object that contains the action
object.
DumpTree()
DumpTree(treeLine=False)
Dumps the action type, action arguments, and whether the action is enabled or
disabled. This function returns True on success.
• treeLine — If True, lines such as | and _ are printed to show the hierarchy
of the dumped information. For example, one of the three lines below, beginning
with |:
Action Sequence
| Editor test.cc
| Editor test1.cc
|_Python Statement x = 1;
DumpTree()
DumpTree(treeLine=True)
Dumps the action sequence's name and actions and returns True on success.
• treeLine — If True, lines such as | and _ are printed to show the hierarchy
of the dumped information. If False, the lines are not printed. For an example,
see “DumpTree()” on page 291.
Search()
Search(value, column=-1, match=False, all=False)
Arguments are:
• value — Specifies the value (action name or action argument) to search for.
This can be a regular expression.
• column — Specifies whether action names, action arguments, or both names
and arguments are searched. If 0, names are searched. If 1, arguments are
searched. If -1, both names and arguments are searched.
• match — If True, uses Python's regular expression match() function to check
the specified value. If False, uses Python's regular expression search()
function.
• all — If True, a list of action objects satisfying the criteria is returned upon
success. Upon failure, an empty list is returned. If False, the first action object
satisfying the criteria is returned upon success. Upon failure, None is returned.
DumpTree()
DumpTree(treeLine=True)
Dumps the variable's name and value and returns True on success.
• treeLine — If True, lines such as | and _ are printed to show the hierarchy
of the dumped information. If False, the lines are not printed. For an example,
see “DumpTree()” on page 291.
DumpTree()
DumpTree(treeLine=True, mask=0xff)
Dumps the workspace's name, working directory, local variables, global variables,
pre-defined MULTI Launcher variables, action sequences, and actions; or dumps
whichever of these elements you specify. This function returns True on success.
Arguments are:
• treeLine — If True, lines such as | and _ are printed to show the hierarchy
of the dumped information. If False, the lines are not printed. For an example,
see “DumpTree()” on page 291.
• mask — Controls what elements are dumped. You can specify any combination
of the dump* flags listed in “GHS_Workspace Attributes and Functions”
on page 294. If you specify multiple flags, use the OR operation to link them
together. By default, this function dumps all elements of the workspace.
SearchAction()
SearchAction(asName, value, column=-1, match=False, all=False)
Arguments are:
• asName — Specifies the name of the action sequence to search. This can be a
regular expression. If asName is an empty string (""), all action sequences are
searched.
• value — Specifies the value (action name or action argument) to search for.
This can be a regular expression.
• column — Specifies whether action names, action arguments, or both names
and arguments are searched. If 0, names are searched. If 1, arguments are
searched. If -1, names and arguments are searched.
• match — If True, uses Python's regular expression match() function to check
the specified action. If False, uses Python's regular expression search()
function.
• all — If True, a list of action objects satisfying the criteria is returned upon
success. Upon failure, an empty list is returned. If False, the first action
satisfying the criteria is returned upon success. Upon failure, None is returned.
SearchActionSequence()
SearchActionSequence(asName, match=False, all=False)
Arguments are:
• asName — Specifies the name of the action sequence. This can be a regular
expression.
• match — If True, uses Python's regular expression match() function to check
the specified action sequence name. If False, uses Python's regular expression
search() function.
• all — If True, a list of action sequence objects satisfying the criteria is
returned upon success. Upon failure, an empty list is returned. If False, the
first GHS_ActionSequence object satisfying the criteria is returned upon
success. Upon failure, None is returned.
SearchVariable()
SearchVariable(varType, value, column=-1, match=False,
all=False)
Arguments are:
GHS_Launcher Functions
The following section describes the __init__() function from class
GHS_Launcher.
__init__()
__init__(workingDir="")
This function also gets the window's information for the created MULTI Launcher
service and sets up the object with it.
GetRunningActions()
GetRunningActions(show=True)
Gets a list of actions that are currently running. This function returns a list of strings,
where each string corresponds to a running action.
• show — If True, displays the running actions (if any). If False, does not
display running actions.
RunAction()
RunAction(actionType, actionArgs="", workingDir="", wsName="",
waitPeriodToFinish=0.0)
Executes the specified ad hoc action. This function returns True on success and
False on failure.
Arguments are:
If workingDir is specified (that is, it is not an empty string), the action is executed
from the directory specified. Otherwise, if wsName is specified (that is, it is not an
empty string) and the workspace name exists, the action is executed from the
corresponding workspace's working directory. If neither workingDir nor wsName
is specified, the action executes from the working directory of the Launcher's current
workspace.
RunWorkspaceAction()
RunWorkspaceAction(workspaceName="", actionSequenceName="",
actionIndex=-1, waitPeriodToFinish=0.0)
Executes one or more actions in a workspace action sequence and returns True on
success and False on failure.
Arguments are:
WaitForActionsToFinish()
WaitForActionsToFinish(oldActionList, duration=0.0,
warnIfNotFinish=False)
Waits for running actions to finish. This function returns True if the running actions
are finished when the function returns, and False otherwise.
Arguments are:
During the wait, the function checks the running actions every half second.
• warnIfNotFinish — If True and if the function returns when actions are
still running, prints a warning message. If False, does not print a warning
message.
AddAction()
AddAction(actionType, actionArgs="",
actionSequenceName="Startup", indexInActionSequence=-1,
wsName="", workingDir="", block=True, printOutput=True)
Adds an action into a workspace and returns True on success and False on failure.
Arguments are:
• actionType — Specifies the action type. For the list of supported action types,
see “Creating or Modifying an Action” in Chapter 3, “Managing Workspaces
and Shortcuts with the Launcher” in the MULTI: Managing Projects and
Configuring the IDE book.
• actionArgs — Specifies the argument(s) of the action.
• actionSequenceName — Specifies the name of the action sequence to which
the action belongs.
• indexInActionSequence — Specifies the index of the position in the action
sequence where the action is to be inserted. The index starts at 0 (zero). If you
specify a negative value, the action is given the last position in the action
sequence.
• wsName — Specifies the name of the workspace to which the action belongs.
• workingDir — Specifies the working directory of the workspace. This
argument is used only when the specified workspace name does not exist (a
new workspace is created in this case).
• block — If True, executes AddAction() in blocked mode and grabs the
output (if any). If False, neither executes the function in blocked mode nor
grabs the output.
• printOutput — If True, prints the output (if any). If False, does not print
the output.
DeleteAction()
DeleteAction(actionSequenceName="", indexInActionSequence=-1,
wsName="", block=True, printOutput=True)
Deletes the action(s) located at the specified position(s) from the given workspace
action sequence. This function returns True on success and False on failure.
Arguments are:
CreateWorkspace()
CreateWorkspace(wsName="", workingDir="", block=True,
printOutput=True)
Creates a workspace and selects it as the current workspace. This function returns
True on success and False on failure.
Arguments are:
If both the workspace name and working directory are specified, the function creates
an empty workspace with the given information. If the workspace name already
exists, the workspace is selected into the current workspace, and the working
directory (if it is specified) is applied to the existing workspace.
DeleteWorkspace()
DeleteWorkspace(wsName="", delCurrentWs=True, block=True,
printOutput=True)
Deletes the specified workspace and returns True on success and False on failure.
Arguments are:
GetWorkspaceInformation()
GetWorkspaceInformation(wsName="", original=True)
Arguments are:
GetWorkspaces()
GetWorkspaces()
LoadWorkspaceFile()
LoadWorkspaceFile(fileName, block=True, printOutput=True,
expandFileName=True)
Loads a workspace file into the MULTI Launcher and selects the corresponding
workspace as the current workspace. This function returns True on success and
False on failure.
Arguments are:
Note
In the MULTI-Python integrated system, filenames are passed by
clients to MULTI services, which may expand them. Example clients
are: the mpythonrun utility program, the stand-alone Python GUI,
and the MULTI Debugger (the Debugger contains a Py pane and is
capable of running Python statements via buttons, menu items, etc.).
For more information about MULTI services or about clients from
which you can execute Python statements, see Chapter 2,
“Introduction to the MULTI-Python Integration” on page 15.
SaveWorkspaceIntoFile()
SaveWorkspaceIntoFile(fileName="", wsName="", block=True,
printOutput=True, expandFileName=True)
Saves a workspace into a file and returns True on success and False on failure.
Arguments are:
SelectWorkspace()
SelectWorkspace(wsName, block=True, printOutput=True)
Selects the specified workspace as the current workspace. This function returns
True on success and False on failure.
Arguments are:
AddVariable()
AddVariable(varName, varValue, globalVar=False, wsName="",
block=True, printOutput=True)
Adds a local variable to a workspace or a global variable to the system. If the variable
already exists, its existing value is changed to the given value. This function returns
True on success and False on failure.
Arguments are:
ChangeVariable()
ChangeVariable(varName, varValue, globalVar=False, wsName="",
block=True, printOutput=True)
Changes the value of a local workspace variable or a global system variable. If the
variable does not exist, it is added to the workspace or to the system. This function
returns True on success and False on failure.
Arguments are:
DeleteVariable()
DeleteVariable(varName, globalVar=False, wsName="", block=True,
printOutput=True)
Deletes a local variable from a workspace or a global variable from the system.
This function returns True on success and False on failure.
Arguments are:
Contents
GHS_ProjectManager Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312
GHS_ProjectManagerWindow Build Functions . . . . . . . . . . . . . . . . . . . . . . . . 314
GHS_ProjectManagerWindow Edit Functions . . . . . . . . . . . . . . . . . . . . . . . . . 317
GHS_ProjectManagerWindow File Functions . . . . . . . . . . . . . . . . . . . . . . . . . . 319
GHS_ProjectManagerWindow Navigation Functions . . . . . . . . . . . . . . . . . . . 321
GHS_ProjectManagerWindow Debug and Edit Functions . . . . . . . . . . . . . . . 322
GHS_ProjectManagerWindow Tree Expansion/Contraction Functions . . . . . 323
GHS_ProjectManagerWindow Selection Functions . . . . . . . . . . . . . . . . . . . . . 325
Chapter 15. Project Manager Functions
GHS_ProjectManager Functions
The following sections describe functions from class GHS_ProjectManager.
__init__()
__init__(workingDir="")
GetTopProjectFiles()
GetTopProjectFiles(showList=False)
Gets top project files loaded in MULTI Project Manager windows and returns a list
of the top project files.
• showList — If True, displays the top project files. If False, does not display
them.
OpenProject()
OpenProject(fileName, targetsToBuild="", hidden=False,
expandFileName=True)
Loads a MULTI project file into the MULTI Project Manager. On success, this
function returns a GHS_ProjectManagerWindow object for the MULTI Project
Manager window. Otherwise, it returns None.
Arguments are:
BuildAllProjects()
BuildAllProjects(waitBuildFinish=False, duration=-1.0)
Builds all projects and returns True on success and False on failure.
Arguments are:
During the wait, the function checks the status of the build approximately every
0.3 seconds.
BuildFile()
BuildFile(optionsAndFileName, block=True, printOutput=True,
duration=-1)
Builds one or more of the files or projects in the Project Manager and returns True
on success and False on failure.
Arguments are:
BuildProjects()
BuildProjects(buildAll=False, waitBuildFinish=False,
duration=-1.0)
Builds all projects or builds the selected projects. This function returns True on
success and False on failure.
Arguments are:
BuildSelectedProjects()
BuildSelectedProjects(waitBuildFinish=False, duration=-1.0)
Builds selected projects and returns True on success and False on failure.
GetStatus()
GetStatus()
Gets the status of the build. On success, this function returns a string with the status.
Upon failure, it returns None.
HaltBuild()
HaltBuild(waitHaltFinish=False, duration=-1.0)
Halts the build and returns True on success and False on failure.
Arguments are:
• waitHaltFinish — If True, waits for the build to halt. If False, does not
wait.
• duration — Specifies how long the function waits, if at all. The duration
may be:
○ A negative number — Indicates that the function waits until the build is
halted.
○ 0 — Indicates that the function does not wait at all.
○ A positive number — Specifies the maximum number of seconds that the
function waits. If the build has not halted within the given period, the
function returns False, as with function failure.
During the wait, the function checks the status of the build approximately every
0.3 seconds by default.
WaitForBuildingFinish()
WaitForBuildingFinish(duration=-1.0, checkInterval=0)
Waits for the build to finish and returns True on success and False on failure.
Arguments are:
• duration — Specifies how long the function waits, if at all. For more
information, see the duration description in “BuildAllProjects()” on page 314.
• checkInterval — Specifies the interval (in seconds) between status checks.
A 0 or a negative value specifies that the default check interval value of the
MULTI Project Manager window object is used. The default check interval
value (attribute checkInterval) for the MULTI Project Manager window
object is 0.3.
CopySelected()
CopySelected()
Copies the selected project tree entries to a clipboard specific to the MULTI Project
Manager. This function returns True on success and False on failure.
CutSelected()
CutSelected()
Cuts the selected project tree entries and stores them on a clipboard specific to the
MULTI Project Manager. This function returns True on success and False on
failure.
DeleteSelected()
DeleteSelected()
Deletes the selected project tree entries. This function returns True on success and
False on failure.
PasteAfterSelected()
PasteAfterSelected()
Pastes entries stored on the MULTI Project Manager clipboard after the selected
entries. This function returns True on success and False on failure.
CloseProject()
CloseProject()
Closes the current project file in the MULTI Project Manager window. This function
returns True on success and False on failure.
NewWindow()
NewWindow()
Opens a new MULTI Project Manager window. On success, this function returns
a GHS_ProjectManagerWindow object for the new MULTI Project Manager
window. On failure, it returns None.
OpenProject()
OpenProject(projName="", block=True, expandFileName=True)
Loads a project file into the MULTI Project Manager window and returns True on
success and False on failure.
Arguments are:
RevertFromFile()
RevertFromFile(block=True)
Reverts the contents of the MULTI Project Manager window to the corresponding
file saved on disk. This function returns True on success and False on failure.
SaveChanges()
SaveChanges(block=True)
Saves changes made in the MULTI Project Manager window to the corresponding
project file. This function returns True on success and False on failure.
FindFile()
FindFile(fileName, block=True, printOutput=True)
Locates an instance of the specified file or project in the Project Manager window
and returns True on success and False on failure. This is analogous to searching
for a file via the Project Manager's file shortcut bar when Find is enabled. For more
information, see “The File Shortcut Bar” in Chapter 10, “Project Manager GUI
Reference” in the MULTI: Managing Projects and Configuring the IDE book.
Arguments are:
NextFile()
NextFile(fileName, block=True, printOutput=True)
Locates the next instance of the specified file or project in the Project Manager
window and returns True on success and False on failure. This is analogous to
searching for a file via the Project Manager's file shortcut bar when Next is enabled.
For more information, see “The File Shortcut Bar” in Chapter 10, “Project Manager
GUI Reference” in the MULTI: Managing Projects and Configuring the IDE book.
Arguments are:
• block — If True, executes NextFile() in blocked mode and grabs the output
(if any). If False, neither executes the function in blocked mode nor grabs the
output.
• printOutput — If True, prints the output (if any). If False, does not print
output.
DebugSelectedProjects()
DebugSelectedProjects(block=False)
Debugs selected projects, if applicable. This function returns True on success and
False on failure.
EditSelectedProjects()
EditSelectedProjects(block=True)
Edits the selected project files. This function returns True on success and False
on failure.
ContractAll()
ContractAll(block=False)
Contracts the entire project tree and returns True on success and False on failure.
ContractSelected()
ContractSelected(block=False)
Contracts the selected project tree entries and returns True on success and False
on failure.
ExpandAll()
ExpandAll(block=False)
Expands the entire project tree and returns True on success and False on failure.
ExpandSelected()
ExpandSelected(block=False)
Expands the selected project tree entries and returns True on success and False
on failure.
PrintAll()
PrintAll(block=True)
Prints the fully expanded project tree (that is, expands the project tree and then
prints it). This function returns True on success and False on failure.
The alias is: Print() (Note that print() is not a valid alias for this function.)
PrintView()
PrintView(block=True)
Prints the parts of the project tree that have been expanded. This function returns
True on success and False on failure.
DoubleClickTreeRow()
DoubleClickTreeRow(row, block=True)
Simulates double-clicking the specified row in the project tree view. This function
returns True on success and False on failure.
Arguments are:
• row — Specifies the index of the row to be double-clicked. The index starts
at 0 (zero). If the row number is less than 0, all rows are selected.
SelectAll()
SelectAll(block=True)
Selects the entire project tree and returns True on success and False on failure.
SelectProject()
SelectProject(projName, block=True)
Selects an entry by its name. This function returns True on success and False on
failure.
Arguments are:
SelectTreeRow()
SelectTreeRow(row, block=True)
Selects a row in the project tree view and returns True on success and False on
failure.
Arguments are:
• row — Specifies the index of the row to be selected. The index starts at 0 (zero).
If the row number is less than 0, all rows are selected.
• block — If True, executes SelectTreeRow() in blocked mode and grabs
the output (if any). If False, neither executes the function in blocked mode
nor grabs the output.
Contents
GHS_CoBrowse Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330
GHS_DiffView Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331
GHS_DiffViewWindow Basic Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333
GHS_DiffViewWindow Display Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334
Chapter 16. Version Control Functions
GHS_CoBrowse Functions
The following sections describe functions from class GHS_CoBrowse.
__init__()
__init__(workingDir="")
OpenCheckoutBrowserWindow()
OpenCheckoutBrowserWindow(checkoutDir="", scanNow=False)
Arguments are:
GHS_DiffView Functions
The following sections describe functions from class GHS_DiffView.
__init__()
__init__(workingDir="")
DiffFiles()
DiffFiles(fileName1, fileName2, reuse=False, append=False)
Compares two files and displays their differences in a MULTI Diff Viewer window.
This function returns a GHS_DiffViewWindow object for the newly created MULTI
Diff Viewer window, or it returns None.
Arguments are:
OpenChooseWindow()
OpenChooseWindow(fileName1="", fileName2="", reuse=True)
Opens a dialog box in which you can specify two files for comparison. This function
returns a GHS_Window object for the dialog box, or it returns None on failure.
Arguments are:
OpenDiff()
OpenDiff()
Opens a window so that you can specify files for comparison. When you click the
Diff button in the window, the current MULTI Diff Viewer is reused to compare
the specified files.
Returns a GHS_Window object for the window for you to specify files to compare
and None on failure.
OpenNewDiff()
OpenNewDiff()
Opens a dialog box in which you can specify two files for comparison. When you
click the dialog box's Diff button, a new MULTI Diff Viewer window is created to
compare the specified files. This function returns a GHS_Window object for the
dialog box, or it returns None on failure.
ShowCurrentDiff()
ShowCurrentDiff()
Repositions the MULTI Diff Viewer pane to display the current difference (this is
useful if you lose your place while scrolling). This function returns True on success
and False on failure.
ToggleCaseSensitive()
ToggleCaseSensitive()
Toggles the flag for ignoring case differences between two lines. This function
returns True on success and False on failure.
For more information about the flag, see Case Insensitive in “Diff Viewer Menus”
in Chapter 12, “Version Control Tools GUI Reference” in the MULTI: Managing
Projects and Configuring the IDE book.
ToggleCharDiff()
ToggleCharDiff()
Toggles the flag for displaying character changes. This function returns True on
success and False on failure.
For more information about the flag, see Display Changes Within Lines in “Diff
Viewer Menus” in Chapter 12, “Version Control Tools GUI Reference” in the
MULTI: Managing Projects and Configuring the IDE book.
ToggleIgnoreAllWhiteSpace()
ToggleIgnoreAllWhiteSpace()
Toggles the flag for ignoring all whitespace differences between two files. This
function returns True on success and False on failure.
For more information about the flag, see Ignore All Whitespace in “Diff Viewer
Menus” in Chapter 12, “Version Control Tools GUI Reference” in the MULTI:
Managing Projects and Configuring the IDE book.
ToggleIgnoreCWhiteSpace()
ToggleIgnoreCWhiteSpace()
Toggles the flag for ignoring C whitespace differences between two files. This
function returns True on success and False on failure.
For more information about the flag, see Ignore Whitespace for C in “Diff Viewer
Menus” in Chapter 12, “Version Control Tools GUI Reference” in the MULTI:
Managing Projects and Configuring the IDE book.
ToggleIgnoreWhiteSpaceAmount()
ToggleIgnoreWhiteSpaceAmount()
Toggles the flag for ignoring differences in the amounts of whitespace between two
lines. This function returns True on success and False on failure.
For more information about the flag, see Ignore Whitespace Amount in “Diff
Viewer Menus” in Chapter 12, “Version Control Tools GUI Reference” in the
MULTI: Managing Projects and Configuring the IDE book.
ToggleLineupColumns()
ToggleLineupColumns()
Toggles the flag for lining up columns to determine differences within lines. This
function returns True on success and False on failure.
For more information about the flag, see Line up Columns for Changes Within
Lines in “Diff Viewer Menus” in Chapter 12, “Version Control Tools GUI
Reference” in the MULTI: Managing Projects and Configuring the IDE book.
ToggleNumber()
ToggleNumber()
Toggles the flag for ignoring number differences between lines. This function returns
True on success and False on failure.
For more information about the flag, see Ignore Changes in Numbers (0–9) in
“Diff Viewer Menus” in Chapter 12, “Version Control Tools GUI Reference” in
the MULTI: Managing Projects and Configuring the IDE book.
ToggleWordDiff()
ToggleWordDiff()
Toggles the flag for displaying line differences word by word. This function returns
True on success and False on failure.
For more information about the flag, see Display Changes Word by Word Within
Lines in “Diff Viewer Menus” in Chapter 12, “Version Control Tools GUI
Reference” in the MULTI: Managing Projects and Configuring the IDE book.
Miscellaneous Functions
Contents
GHS_AbortExecFile and GHS_AbortExecFileWithStack Functions . . . . . . . 339
GHS_AbortExecOnSignal Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339
GHS_Exception Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340
GHS_WindowClassNames Attributes and Functions . . . . . . . . . . . . . . . . . . . . 340
Chapter 17. Miscellaneous Functions
Note
The GHS_Exception, GHS_AbortExecFile,
GHS_AbortExecFileWithStack, and GHS_AbortExecOnSignal
classes are all used to stop script execution. If the script is executed by
GHS_ExecFile, it is handled more gracefully than if it is executed by
the built-in Python function execfile(). If the script is executed by
execfile(), the execution stack is dumped when execution stops.
__init__()
__init__(value=None)
• value — Stores any value to be printed out when script execution stops. The
value is commonly a string.
GHS_AbortExecOnSignal Functions
The following section describes the __init__() function from class
GHS_AbortExecOnSignal.
__init__()
__init__(value=None)
• value — Usually stores a signal name or number (but can store any value) to
be printed out when script execution stops. If you store an integer, it is
interpreted as a signal number and the signal name is printed out. Python trace
information is always printed out.
GHS_Exception Functions
The following section describes the __init__() function from class
GHS_Exception.
__init__()
__init__(value=None)
• value — Stores any value to be printed out when script execution stops. The
value is commonly a string.
• osaExplorer — Stores the OSA Explorer window's class name. The OSA
Explorer is used in the Debugger.
• projectManager — Stores the Project Manager window's class name.
• pythonGui — Stores the class name for the stand-alone Python GUI window.
• resourceAnalyzer — Stores the ResourceAnalyzer window's class name.
• taskManager — Stores the Task Manager window's class name. The Task
Manager is used in the Debugger.
• terminal — Stores the Serial Terminal window's class name.
• trace — Stores the Trace List window's class name. The Trace List is used
in the Debugger.
__init__()
__init__()
Appendix
Appendix A
Contents
PSF License Agreement for Python 2.7.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346
Tcl/Tk License Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347
BLT Copyright Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348
Appendix A. Third-Party License and Copyright Information
This appendix contains licensing and copyright information for third-party tools
shipped with the MULTI IDE.
The following list contains information about the Python installation included with
the MULTI IDE:
• The IDE installation does not contain the standard Python interpreter. Instead,
it contains a Green Hills interpreter that extends the standard Python interpreter
and supports communication with the Green Hills toolchain.
• A few Python script files in the Python installation that is shipped with the
MULTI IDE have been modified to fix bugs.
• The Tcl/Tk Python module may contain files distributed under the terms of the
GNU General Public License.
The authors hereby grant permission to use, copy, modify, distribute, and license
this software and its documentation for any purpose, provided that existing copyright
notices are retained in all copies and that this notice is included verbatim in any
distributions. No written agreement, license, or royalty fee is required for any of
the authorized uses. Modifications to this software may be copyrighted by their
authors and need not follow the licensing terms described here, provided that the
new terms are clearly indicated on the first page of each file where they apply.
GOVERNMENT USE: If you are acquiring this software on behalf of the U.S.
government, the Government shall have only "Restricted Rights" in the software
and related documentation as defined in the Federal Acquisition Regulations (FARs)
in Clause 52.227.19 (c) (2). If you are acquiring the software on behalf of the
Department of Defense, the software shall be classified as "Commercial Computer
Software" and the Government shall have only "Restricted Rights" as defined in
Clause 252.227-7013 (c) (1) of DFARs. Notwithstanding the foregoing, the authors
grant the U.S. Government and others acting in its behalf permission to use and
distribute the software in accordance with the terms specified in this license.
bltCanvEps.pro
dnd.tcl
dragdrop.tcl
hierbox.tcl
tabnotebook.tcl
tabset.tcl
treeview.tcl
Permission to use, copy, modify, and distribute this software and its documentation
for any purpose and without fee is hereby granted, provided that the above copyright
notice appear in all copies and that both that the copyright notice and warranty
disclaimer appear in supporting documentation, and that the names of Lucent
Technologies any of their entities not be used in advertising or publicity pertaining
to distribution of the software without specific, written prior permission.
Lucent Technologies disclaims all warranties with regard to this software, including
all implied warranties of merchantability and fitness. In no event shall Lucent
Technologies be liable for any special, indirect or consequential damages or any
damages whatsoever resulting from loss of use, data or profits, whether in an action
of contract, negligence or other tortuous action, arising out of or in connection with
the use or performance of this software.
bltGraph.pro
Permission to use, copy, modify, and distribute this software and its documentation
for any purpose and without fee is hereby granted, provided that the above copyright
notice appear in all copies. The University of California makes no representations
about the suitability of this software for any purpose. It is provided "as is" without
express or implied warranty.
Permission to use, copy, modify, and distribute this software and its documentation
for any purpose and without fee is hereby granted, provided that the above copyright
notice appear in all copies and that both that the copyright notice and warranty
disclaimer appear in supporting documentation, and that the names of Lucent
Technologies any of their entities not be used in advertising or publicity pertaining
to distribution of the software without specific, written prior permission.
Lucent Technologies disclaims all warranties with regard to this software, including
all implied warranties of merchantability and fitness. In no event shall Lucent
Technologies be liable for any special, indirect or consequential damages or any
damages whatsoever resulting from loss of use, data or profits, whether in an action
of contract, negligence or other tortuous action, arising out of or in connection with
the use or performance of this software.
dd-color.tcl
dd-file.tcl
dd-number.tcl
dd-text.tcl
stripchart1.tcl
B
Symbols basic functions, 92
__init__() Beep()
GHS_AbortExecFile class, 339 GHS_Window class, 104
GHS_AbortExecOnSignal class, 339 GHS_WindowRegister class, 201
GHS_CoBrowse class, 330 BigEndianTarget(), 245
GHS_Debugger class, 225 blocked mode, 84
GHS_DebugServer class, 216 board setup scripts, 4, 12
GHS_DiffView class, 331 bpSyntaxChecking configuration option, 10
GHS_Editor class, 266 Build(), 315
GHS_EventAnalyzer class, 278 BuildAll(), 314
GHS_Exception class, 340 BuildAllProj(), 314
GHS_Launcher class, 298 BuildAllProjects(), 314
GHS_MemorySpaces class, 256 BuildAllProjs(), 314
GHS_OsTypes class, 257 BuildFile(), 314
GHS_ProjectManager class, 312 BuildProj(), 315
GHS_TargetIds class, 258 BuildProjects(), 315
GHS_Task class, 258 BuildProjs(), 315
GHS_Terminal class, 219 BuildSel(), 316
GHS_WindowClassNames class, 341 BuildSelected(), 316
GHS_WindowRegister class, 190 BuildSelectedProj(), 316
BuildSelectedProjects(), 316
A BuildSelectedProjs(), 316
AddAction(), 301
additional Python modules C
installing, 17 $c Py pane command, 39
AddStr(), 268 Case(), 334
AddString(), 268 ChangeB(), 226
AddVar(), 308 ChangeBaudRate(), 219
AddVariable(), 308 ChangeBpInheritance(), 226
AddWorkspace(), 304 ChangeBreakpointInheritance(), 226
AddWs(), 304 ChangeC(), 227
Alive(), 93 ChangeD(), 228
-args command line option, 43 ChangeDebugChildren(), 227
Attach(), 260 ChangeDebugOnTaskCreation(), 227
attributes ChangeE(), 230
GHS_Action, 291 ChangeF(), 231
GHS_ActionSequence, 292 ChangeH(), 228
GHS_DebuggerApi, 238 ChangeHaltOnAttach(), 228
GHS_IdeObject, 18 ChangeI(), 229
ChangeInheritProcessBits()
Q RegShowWidgets(), 127
RegSortMsl(), 128
$q socket server command, 47
RemoveBp(), 252
$quit socket server command, 47
RemoveBreakpoint(), 251
RemoveRegisteredModalDialogCom...(), 128
R RenameWin(), 134
$r Py pane command, 40 RenameWindow(), 133
RaiseWin(), 135 reserved variable names, 32
RaiseWindow(), 135 ResizeWin(), 134
raw_input() Python function, 49 ResizeWindow(), 134
.rc setup scripts, 4 $restart Py pane command, 40
ReadIndInt(), 236 RestoreAllWindows(), 206
ReadIndirectInt(), 236 RestoreWin(), 135
ReadIndirectInteger(), 236 RestoreWindow(), 134
ReadIndirectValue(), 236 RestoreWindows(), 206
reading from/writing to memory RestoreWins(), 206
example MULTI script, 8 Resume()
ReadInt(), 237 GHS_DebuggerApi class, 243
ReadIntegerFromMemory(), 237 GHS_Task class, 262
ReadStr(), 237 RetOnTf(), 188
ReadStringFromMemory(), 237 ReturnOnTextField(), 188
RecGuiOp(), 130 ReturnOnTf(), 188
RecGuiOps(), 130 Revert(), 320
RecordGuiOperations(), 129 RevertFromFile(), 320
Redo(), 270 RmBp(), 252
RegChangePdVal(), 122 RmDlgCmd(), 128
RegChangePdValue(), 122 RmDlgCmds(), 128
RegClickBut(), 122 Rtserv(), 213
RegClickButton(), 122 Rtserv2(), 214
RegDblClickMslCell(), 123 Run()
RegDlgCmd(), 121 GHS_DebuggerApi class, 243
RegDlgCmds(), 121 GHS_Task class, 262
RegDumpWidget(), 124 RunAction(), 299
RegDumpWin(), 124 RunCmd()
registering Python installation, 17 GHS_Debugger class, 226
RegisterModalDialogCommands(), 121 GHS_DebuggerWindow class, 251
RegisterModalDialogToChangePull...(), 121 GHS_DebugServer class, 218
RegisterModalDialogToClickButton(), 122 GHS_Task class, 259
RegisterModalDialogToDoubleClick...(), 123 GHS_Window class, 99
RegisterModalDialogToDumpWidget(), 123 RunCmds()
RegisterModalDialogToDumpWindow(), 124 GHS_Debugger class, 226
RegisterModalDialogToSelectMslCell(), 125 GHS_DebuggerWindow class, 251
RegisterModalDialogToSelectMslCell...(), 125 GHS_DebugServer class, 218
RegisterModalDialogToSelectPull...(), 126 GHS_Task class, 259
RegisterModalDialogToShowWidgets(), 127 GHS_Window class, 99
RegisterModalDialogToSortMsl(), 127 RunCmdViaDbserv(), 259
regression testing RunCmdViaDebugServer(), 259
example MULTI script, 6 RunCommand()
RegSelMslCell(), 125 GHS_Debugger class, 226
RegSelMslCellByVal(), 126 GHS_DebuggerWindow class, 251
RegSelPdMenu(), 127 GHS_DebugServer class, 218