lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame^] | 1 | ; Linux specific menu
|
| 2 |
|
| 3 | add
|
| 4 | menu
|
| 5 | (
|
| 6 | popup "&Linux"
|
| 7 | (
|
| 8 | default
|
| 9 | menuitem "Display &Processes" "TASK.Process"
|
| 10 | menuitem "Display &ps-like" "TASK.PS"
|
| 11 | menuitem "Display &Tasks" "TASK.DTask"
|
| 12 | menuitem "Display &Modules" "TASK.MODule"
|
| 13 | popup "Display &File System"
|
| 14 | (
|
| 15 | menuitem "Display FS Types" "TASK.FS.Types"
|
| 16 | menuitem "Display Mount Points" "TASK.FS.Mount"
|
| 17 | menuitem "Display Mounted Devices" "TASK.FS.MountDevs"
|
| 18 | menuitem "Display /proc" "TASK.FS.PROC"
|
| 19 | menuitem "Display /sys" "TASK.FS.SYS"
|
| 20 | )
|
| 21 | separator
|
| 22 | popup "&Process Debugging"
|
| 23 | (
|
| 24 | menuitem "&Load Symbols..."
|
| 25 | (
|
| 26 | dialog
|
| 27 | (
|
| 28 | header "TASK.sYmbol.LOAD"
|
| 29 | pos 0. 0. 30. 3.
|
| 30 | box "Process name"
|
| 31 | pos 1. 1. 20. 1.
|
| 32 | procl: defedit "" ""
|
| 33 | pos 22. 1. 7. 1.
|
| 34 | button "Browse..."
|
| 35 | (
|
| 36 | dialog.file "*"
|
| 37 | entry %line &file
|
| 38 | dialog.set procl "&file"
|
| 39 | )
|
| 40 | pos 6. 3. 7. 1.
|
| 41 | defbutton "Ok"
|
| 42 | (
|
| 43 | local &procl &cwd
|
| 44 | &procl=dialog.string(procl)
|
| 45 | TASK.sYmbol.LOAD "&procl"
|
| 46 | dialog.end
|
| 47 | )
|
| 48 | pos 17. 3. 7. 1.
|
| 49 | button "Cancel" "dialog.end"
|
| 50 | )
|
| 51 | )
|
| 52 | menuitem "&Delete Symbols..."
|
| 53 | (
|
| 54 | dialog
|
| 55 | (
|
| 56 | header "TASK.sYmbol.DELete"
|
| 57 | pos 0. 0. 30. 3.
|
| 58 | box "Process name"
|
| 59 | pos 1. 1. 20. 1.
|
| 60 | procd: defedit "" ""
|
| 61 | pos 22. 1. 7. 1.
|
| 62 | button "Browse..."
|
| 63 | (
|
| 64 | dialog.file "*"
|
| 65 | entry %line &file
|
| 66 | dialog.set procd "&file"
|
| 67 | )
|
| 68 | pos 6. 3. 7. 1.
|
| 69 | defbutton "Ok"
|
| 70 | (
|
| 71 | local &procd
|
| 72 | &procd=dialog.string(procd)
|
| 73 | TASK.sYmbol.DELete "&procd"
|
| 74 | dialog.end
|
| 75 | )
|
| 76 | pos 17. 3. 7. 1.
|
| 77 | button "Cancel" "dialog.end"
|
| 78 | )
|
| 79 | )
|
| 80 | menuitem "Debug Process on main..."
|
| 81 | (
|
| 82 |
|
| 83 | &cpufamily=string.lwr(cpufamily())
|
| 84 | do ~~/demo/&cpufamily/kernel/linux/app_debug /dialog
|
| 85 |
|
| 86 | )
|
| 87 | addhere
|
| 88 | popup "&Watch Processes"
|
| 89 | (
|
| 90 | menuitem "&Add..."
|
| 91 | (
|
| 92 | dialog
|
| 93 | (
|
| 94 | header "TASK.Watch.Add"
|
| 95 | pos 0. 0. 24. 3.
|
| 96 | box "Process name"
|
| 97 | pos 1. 1. 22. 1.
|
| 98 | wproca: defedit "" ""
|
| 99 | pos 2. 3. 7. 1.
|
| 100 | defbutton "Ok"
|
| 101 | (
|
| 102 | local &wproca
|
| 103 | &wproca=dialog.string(wproca)
|
| 104 | TASK.Watch.View "&wproca"
|
| 105 | dialog.end
|
| 106 | )
|
| 107 | pos 15. 3. 7. 1.
|
| 108 | button "Cancel" "dialog.end"
|
| 109 | )
|
| 110 | )
|
| 111 | menuitem "&Remove..."
|
| 112 | (
|
| 113 | dialog
|
| 114 | (
|
| 115 | header "TASK.Watch.DELete"
|
| 116 | pos 0. 0. 24. 3.
|
| 117 | box "Process name"
|
| 118 | pos 1. 1. 22. 1.
|
| 119 | wprocd: defedit "" ""
|
| 120 | pos 2. 3. 7. 1.
|
| 121 | defbutton "Ok"
|
| 122 | (
|
| 123 | local &wprocd
|
| 124 | &wprocd=dialog.string(wprocd)
|
| 125 | TASK.Watch.DELete "&wprocd"
|
| 126 | dialog.end
|
| 127 | )
|
| 128 | pos 15. 3. 7. 1.
|
| 129 | button "Cancel" "dialog.end"
|
| 130 | )
|
| 131 | )
|
| 132 | )
|
| 133 | separator
|
| 134 | menuitem "Scan Process MMU Pages..."
|
| 135 | (
|
| 136 | dialog
|
| 137 | (
|
| 138 | header "MMU.SCAN TaskPageTable"
|
| 139 | pos 0. 0. 24. 3.
|
| 140 | box "Process name"
|
| 141 | pos 1. 1. 22. 1.
|
| 142 | wproca: defedit "" ""
|
| 143 | pos 2. 3. 7. 1.
|
| 144 | defbutton "Ok"
|
| 145 | (
|
| 146 | local &wproca
|
| 147 | &wproca=dialog.string(wproca)
|
| 148 | MMU.SCAN TaskPageTable "&wproca"
|
| 149 | dialog.end
|
| 150 | )
|
| 151 | pos 15. 3. 7. 1.
|
| 152 | button "Cancel" "dialog.end"
|
| 153 | )
|
| 154 | )
|
| 155 | menuitem "Scan All MMU Tables" "MMU.SCAN.ALL"
|
| 156 | ;separator
|
| 157 | ;menuitem "Help Process Debugging" "HELP __RTOS_LINUX__S_User_Processes"
|
| 158 | )
|
| 159 | popup "&Module Debugging"
|
| 160 | (
|
| 161 | menuitem "&Load Symbols..."
|
| 162 | (
|
| 163 | dialog
|
| 164 | (
|
| 165 | header "TASK.sYmbol.LOADMod"
|
| 166 | pos 0. 0. 30. 3.
|
| 167 | box "Module name"
|
| 168 | pos 1. 1. 20. 1.
|
| 169 | modl: defedit "" ""
|
| 170 | pos 22. 1. 7. 1.
|
| 171 | button "Browse..."
|
| 172 | (
|
| 173 | dialog.file "*.ko"
|
| 174 | entry %line &file
|
| 175 | dialog.set modl "&file"
|
| 176 | )
|
| 177 | pos 6. 3. 7. 1.
|
| 178 | defbutton "Ok"
|
| 179 | (
|
| 180 | local &modl
|
| 181 | &modl=dialog.string(modl)
|
| 182 | TASK.sYmbol.LOADMod "&modl"
|
| 183 | dialog.end
|
| 184 | )
|
| 185 | pos 17. 3. 7. 1.
|
| 186 | button "Cancel" "dialog.end"
|
| 187 | )
|
| 188 | )
|
| 189 | menuitem "&Delete Symbols..."
|
| 190 | (
|
| 191 | dialog
|
| 192 | (
|
| 193 | header "TASK.sYmbol.DELeteMod"
|
| 194 | pos 0. 0. 30. 3.
|
| 195 | box "Module name"
|
| 196 | pos 1. 1. 20. 1.
|
| 197 | modd: defedit "" ""
|
| 198 | pos 22. 1. 7. 1.
|
| 199 | button "Browse..."
|
| 200 | (
|
| 201 | dialog.file "*.ko"
|
| 202 | entry %line &file
|
| 203 | dialog.set modd "&file"
|
| 204 | )
|
| 205 | pos 6. 3. 7. 1.
|
| 206 | defbutton "Ok"
|
| 207 | (
|
| 208 | local &modd
|
| 209 | &modd=dialog.string(modd)
|
| 210 | TASK.sYmbol.DELeteMod "&modd"
|
| 211 | dialog.end
|
| 212 | )
|
| 213 | pos 17. 3. 7. 1.
|
| 214 | button "Cancel" "dialog.end"
|
| 215 | )
|
| 216 | )
|
| 217 | menuitem "Debug Module on init..."
|
| 218 | (
|
| 219 |
|
| 220 | &cpufamily=string.lwr(cpufamily())
|
| 221 | do ~~/demo/&cpufamily/kernel/linux/mod_debug /dialog
|
| 222 |
|
| 223 | )
|
| 224 | separator
|
| 225 | menuitem "Scan All MMU Tables" "MMU.SCAN.ALL"
|
| 226 | )
|
| 227 | popup "&Library Debugging"
|
| 228 | (
|
| 229 | menuitem "&Load Symbols..."
|
| 230 | (
|
| 231 | dialog
|
| 232 | (
|
| 233 | header "TASK.sYmbol.LOADLib"
|
| 234 | pos 0. 0. 30. 3.
|
| 235 | box "Process name"
|
| 236 | pos 1. 1. 28. 1.
|
| 237 | libpl: defedit "" ""
|
| 238 | pos 0. 3. 30. 3.
|
| 239 | box "Library name"
|
| 240 | pos 1. 4. 20. 1.
|
| 241 | libll: defedit "" ""
|
| 242 | pos 22. 4. 7. 1.
|
| 243 | button "Browse..."
|
| 244 | (
|
| 245 | dialog.file "*.so*"
|
| 246 | entry %line &file
|
| 247 | dialog.set libll "&file"
|
| 248 | )
|
| 249 | pos 6. 6. 7. 1.
|
| 250 | defbutton "Ok"
|
| 251 | (
|
| 252 | local &libpl &libll
|
| 253 | &libpl=dialog.string(libpl)
|
| 254 | &libll=dialog.string(libll)
|
| 255 | TASK.sYmbol.LOADLib "&libpl" "&libll"
|
| 256 | dialog.end
|
| 257 | )
|
| 258 | pos 17. 6. 7. 1.
|
| 259 | button "Cancel" "dialog.end"
|
| 260 | )
|
| 261 | )
|
| 262 | menuitem "&Delete Symbols..."
|
| 263 | (
|
| 264 | dialog
|
| 265 | (
|
| 266 | header "TASK.sYmbol.DELeteLib"
|
| 267 | pos 0. 0. 30. 3.
|
| 268 | box "Process name"
|
| 269 | pos 1. 1. 28. 1.
|
| 270 | libpd: defedit "" ""
|
| 271 | pos 0. 3. 30. 3.
|
| 272 | box "Library name"
|
| 273 | pos 1. 4. 20. 1.
|
| 274 | libld: defedit "" ""
|
| 275 | pos 22. 4. 7. 1.
|
| 276 | button "Browse..."
|
| 277 | (
|
| 278 | dialog.file "*.so*"
|
| 279 | entry %line &file
|
| 280 | dialog.set libld "&file"
|
| 281 | )
|
| 282 | pos 6. 6. 7. 1.
|
| 283 | defbutton "Ok"
|
| 284 | (
|
| 285 | local &libpd &libld
|
| 286 | &libpd=dialog.string(libpd)
|
| 287 | &libld=dialog.string(libld)
|
| 288 | TASK.sYmbol.DELeteLib "&libpd" "&libld"
|
| 289 | dialog.end
|
| 290 | )
|
| 291 | pos 17. 6. 7. 1.
|
| 292 | button "Cancel" "dialog.end"
|
| 293 | )
|
| 294 | )
|
| 295 | separator
|
| 296 | menuitem "Scan Process MMU Pages..."
|
| 297 | (
|
| 298 | dialog
|
| 299 | (
|
| 300 | header "MMU.SCAN TaskPageTable"
|
| 301 | pos 0. 0. 24. 3.
|
| 302 | box "Process name"
|
| 303 | pos 1. 1. 22. 1.
|
| 304 | wproca: defedit "" ""
|
| 305 | pos 2. 3. 7. 1.
|
| 306 | defbutton "Ok"
|
| 307 | (
|
| 308 | local &wproca
|
| 309 | &wproca=dialog.string(wproca)
|
| 310 | MMU.SCAN TaskPageTable "&wproca"
|
| 311 | dialog.end
|
| 312 | )
|
| 313 | pos 15. 3. 7. 1.
|
| 314 | button "Cancel" "dialog.end"
|
| 315 | )
|
| 316 | )
|
| 317 | menuitem "Scan All MMU Tables" "MMU.SCAN.ALL"
|
| 318 | )
|
| 319 | separator
|
| 320 | popup "Symbol &Autoloader"
|
| 321 | (
|
| 322 | menuitem "List Components" "sYmbol.AutoLoad.List"
|
| 323 | menuitem "Check Now!" "sYmbol.AutoLoad.CHECK"
|
| 324 | menuitem "Set Components Checked"
|
| 325 | (
|
| 326 | dialog
|
| 327 | (
|
| 328 | header "TASK.sYmbol.Option AutoLoad"
|
| 329 | pos 0. 0. 25.
|
| 330 | proc: checkbox "Process (Processes)"
|
| 331 | (
|
| 332 | if dialog.boolean(proc)
|
| 333 | TASK.sYmbol.Option AutoLoad Process
|
| 334 | else
|
| 335 | TASK.sYmbol.Option AutoLoad NoProcess
|
| 336 | )
|
| 337 | mod: checkbox "Module (Modules)"
|
| 338 | (
|
| 339 | if dialog.boolean(mod)
|
| 340 | TASK.sYmbol.Option AutoLoad Module
|
| 341 | else
|
| 342 | TASK.sYmbol.Option AutoLoad NoModule
|
| 343 | )
|
| 344 | lib: checkbox "Library (All Libraries)"
|
| 345 | (
|
| 346 | if dialog.boolean(lib)
|
| 347 | TASK.sYmbol.Option AutoLoad Library
|
| 348 | else
|
| 349 | TASK.sYmbol.Option AutoLoad NoLibrary
|
| 350 | dialog.set clib "FALSE"
|
| 351 | )
|
| 352 | clib: checkbox "CurrLib (Libraries of Current Process)"
|
| 353 | (
|
| 354 | if dialog.boolean(clib)
|
| 355 | TASK.sYmbol.Option AutoLoad CurrLib
|
| 356 | else
|
| 357 | TASK.sYmbol.Option AutoLoad NoLibrary
|
| 358 | dialog.set lib "FALSE"
|
| 359 | )
|
| 360 | )
|
| 361 | dialog.set proc ((task.y.o(autoload)&0x1)!=0)
|
| 362 | dialog.set mod ((task.y.o(autoload)&0x4)!=0)
|
| 363 | dialog.set lib ((task.y.o(autoload)&0x2)!=0)
|
| 364 | dialog.set clib ((task.y.o(autoload)&0x8)!=0)
|
| 365 | )
|
| 366 | separator
|
| 367 | menuitem "Set Loader Script"
|
| 368 | (
|
| 369 | dialog
|
| 370 | (
|
| 371 | header "sYmbol.AutoLoad.CHECKLINUX"
|
| 372 | pos 0. 0. 40. 3.
|
| 373 | box "autoload batch script"
|
| 374 | pos 1. 1. 30. 1
|
| 375 | cmmfile: edit "autoload.cmm" ""
|
| 376 | pos 32. 1. 7. 1.
|
| 377 | button "Browse..."
|
| 378 | (
|
| 379 | dialog.file "*.cmm"
|
| 380 | entry %line &file
|
| 381 | dialog.set cmmfile "&file"
|
| 382 | )
|
| 383 | pos 1. 3. 16. 1.
|
| 384 | checkon: checkbox "automatic check" ""
|
| 385 | pos 4. 4.5 8.
|
| 386 | defbutton "Ok"
|
| 387 | (
|
| 388 | local &log &cmm
|
| 389 | &cmm=dialog.string(cmmfile)
|
| 390 | sYmbol.AutoLoad.CHECKLINUX "do &cmm "
|
| 391 | sYmbol.AutoLoad.CHECK ; trigger check manually
|
| 392 | if dialog.boolean(checkon)
|
| 393 | sYmbol.AutoLoad.CHECK ON ; automatic check enabled
|
| 394 | else
|
| 395 | sYmbol.AutoLoad.CHECK OFF ; automatic check disabled
|
| 396 | dialog.end
|
| 397 | )
|
| 398 | pos 16. 4.5 8.
|
| 399 | button "Cancel" "dialog.end"
|
| 400 | pos 28. 4.5 8.
|
| 401 | button "Help" "HELP __RTOS_LINUX_S_Y_ALOAD"
|
| 402 | )
|
| 403 | )
|
| 404 | menuitem "Set Target Root Path"
|
| 405 | (
|
| 406 | dialog
|
| 407 | (
|
| 408 | header "TASK.sYmbol.Option ROOTPATH"
|
| 409 | pos 0. 0. 40. 3.
|
| 410 | box "target root path on host"
|
| 411 | pos 1. 1. 30. 1
|
| 412 | rootdir: edit "" ""
|
| 413 | pos 32. 1. 7. 1.
|
| 414 | button "Browse..."
|
| 415 | (
|
| 416 | dialog.dir "*"
|
| 417 | entry %line &dir
|
| 418 | dialog.set rootdir "&dir"
|
| 419 | )
|
| 420 | pos 4. 3.5 8.
|
| 421 | defbutton "Ok"
|
| 422 | (
|
| 423 | local &dir
|
| 424 | &dir=dialog.string(rootdir)
|
| 425 | TASK.sYmbol.Option ROOTPATH "&dir"
|
| 426 | dialog.end
|
| 427 | )
|
| 428 | pos 16. 3.5 8.
|
| 429 | button "Cancel" "dialog.end"
|
| 430 | pos 28. 3.5 8.
|
| 431 | button "Help" "HELP __RTOS_LINUX__TASK_Y_O_ROOTPATH"
|
| 432 | )
|
| 433 | )
|
| 434 | separator
|
| 435 | menuitem "Symbol Autoloader Help" "HELP __RTOS_LINUX_S_Y_ALOAD"
|
| 436 | )
|
| 437 | separator
|
| 438 | menuitem "&Linux Terminal"
|
| 439 | (
|
| 440 | if !window.name(term)
|
| 441 | (
|
| 442 | winpos ,,,,,, term
|
| 443 | TERM
|
| 444 | )
|
| 445 | else
|
| 446 | wintop term
|
| 447 | )
|
| 448 | menuitem "Configure Terminal..."
|
| 449 | (
|
| 450 | if window.name(term)
|
| 451 | dialog.ok "Please close terminal window first!"
|
| 452 | else
|
| 453 | (
|
| 454 | dialog
|
| 455 | (
|
| 456 | header "TERM.Protocol"
|
| 457 | pos 0. 0. 9.
|
| 458 | tp.be: choosebox "BufferE"
|
| 459 | (
|
| 460 | dialog.disable tp.com.dev
|
| 461 | dialog.disable tp.com.bd
|
| 462 | dialog.enable tp.be.out
|
| 463 | dialog.enable tp.be.in
|
| 464 | )
|
| 465 | pos 10. 0. 5.
|
| 466 | text "out:"
|
| 467 | pos 15. 0. 6.
|
| 468 | tp.be.out: edit "T32OUTBUF" ""
|
| 469 | pos 23. 0. 6.
|
| 470 | text "in:"
|
| 471 | pos 29. 0. 6.
|
| 472 | tp.be.in: edit "T32INBUF" ""
|
| 473 | pos 0. 1. 9.
|
| 474 | tp.dcc: choosebox "DCC"
|
| 475 | (
|
| 476 | dialog.disable tp.com.dev
|
| 477 | dialog.disable tp.com.bd
|
| 478 | dialog.disable tp.be.out
|
| 479 | dialog.disable tp.be.in
|
| 480 | )
|
| 481 | pos 0. 2. 9.
|
| 482 | tp.com: choosebox "COM"
|
| 483 | (
|
| 484 | dialog.disable tp.be.out
|
| 485 | dialog.disable tp.be.in
|
| 486 | dialog.enable tp.com.dev
|
| 487 | dialog.enable tp.com.bd
|
| 488 | )
|
| 489 | pos 10. 2. 5.
|
| 490 | text "device:"
|
| 491 | pos 15. 2. 6.
|
| 492 | tp.com.dev: edit "COM1" ""
|
| 493 | pos 23. 2. 6.
|
| 494 | text "baudrate:"
|
| 495 | pos 29. 2. 6.
|
| 496 | tp.com.bd: edit "115200." ""
|
| 497 | pos 9. 3.5 7.
|
| 498 | defbutton "Ok"
|
| 499 | (
|
| 500 | &tpbeout=dialog.string(tp.be.out)
|
| 501 | &tpbein=dialog.string(tp.be.in)
|
| 502 | &tpcomdev=dialog.string(tp.com.dev)
|
| 503 | &tpcombd=dialog.string(tp.com.bd)
|
| 504 | if dialog.boolean(tp.be)
|
| 505 | TERM.METHOD BufferE &tpbeout &tpbein
|
| 506 | else if dialog.boolean(tp.dcc)
|
| 507 | TERM.METHOD DCC
|
| 508 | else if dialog.boolean(tp.com)
|
| 509 | TERM.METHOD COM &tpcomdev &tpcombd 8 NONE 1STOP NONE
|
| 510 | dialog.end
|
| 511 | )
|
| 512 | pos 19. 3.5 7.
|
| 513 | button "Cancel" "dialog.end"
|
| 514 | )
|
| 515 | dialog.disable tp.be.out
|
| 516 | dialog.disable tp.be.in
|
| 517 | dialog.disable tp.com.dev
|
| 518 | dialog.disable tp.com.bd
|
| 519 | if cpufamily()!="ARM"
|
| 520 | dialog.disable tp.dcc
|
| 521 | )
|
| 522 | )
|
| 523 | ;separator
|
| 524 | ;popup "&Stack Coverage"
|
| 525 | ;(
|
| 526 | ; menuitem "&List Stacks"
|
| 527 | ; (
|
| 528 | ; if icd()||simulator()
|
| 529 | ; TASK.STacK.PATtern 0
|
| 530 | ; TASK.STacK
|
| 531 | ; )
|
| 532 | ; menuitem "Add Task" "TASK.STacK.ADD"
|
| 533 | ; menuitem "Remove Task" "TASK.STacK.ReMove"
|
| 534 | ; enable ice()||fire()
|
| 535 | ; menuitem "&Reset Coverage" "TASK.STacK.RESet"
|
| 536 | ;)
|
| 537 | separator
|
| 538 | menuitem "Help Linux Awareness" "HELP __RTOS_LINUX_S_"
|
| 539 | )
|
| 540 | popup "Trace"
|
| 541 | (
|
| 542 | popup "List"
|
| 543 | (
|
| 544 | separator
|
| 545 | menuitem "&Task Switches" "Trace.List List.TASK"
|
| 546 | menuitem "&Default and Tasks" "Trace.List List.TASK DEFault"
|
| 547 | )
|
| 548 | )
|
| 549 | popup "Perf"
|
| 550 | (
|
| 551 | separator
|
| 552 | popup "&Task Runtime"
|
| 553 | (
|
| 554 | menuitem "&Prepare"
|
| 555 | (
|
| 556 | if t.method.analyzer()
|
| 557 | (
|
| 558 | Analyzer.AutoInit on
|
| 559 | )
|
| 560 | if (ice()||fire())&&!a.mode.flow()
|
| 561 | (
|
| 562 | Analyzer.ReProgram
|
| 563 | (
|
| 564 | Sample.Enable if AlphaBreak&&Write
|
| 565 | )
|
| 566 | Break.Delete /Alpha
|
| 567 | Break.Set task.config(magic)++(task.config(magicsize)-1) /Alpha
|
| 568 | )
|
| 569 | if a.mode.flow()
|
| 570 | (
|
| 571 | Break.Delete /TraceEnable
|
| 572 | Break.Set task.config(magic) /TraceEnable
|
| 573 | )
|
| 574 | )
|
| 575 | menuitem "[:perf]Show &Numerical" "Trace.STATistic.TASK"
|
| 576 | menuitem "[:achart]Show as &Timing" "Trace.CHART.TASK"
|
| 577 | menuitem "[:achart]Tracking with Trace &List"
|
| 578 | (
|
| 579 | Trace.List List.TASK DEFault /Track
|
| 580 | Trace.CHART.TASK /Track
|
| 581 | )
|
| 582 | )
|
| 583 | popup "Task &Function Runtime"
|
| 584 | (
|
| 585 | menuitem "&Prepare"
|
| 586 | (
|
| 587 | if t.method.analyzer()
|
| 588 | (
|
| 589 | Analyzer.AutoInit on
|
| 590 | Analyzer.STATistic.PreFetch on
|
| 591 | )
|
| 592 |
|
| 593 | if (ice()||fire())&&!a.mode.flow()
|
| 594 | (
|
| 595 | if a.config.hac()
|
| 596 | (
|
| 597 | Analyzer.ReProgram
|
| 598 | (
|
| 599 | Sample.Enable if AlphaBreak
|
| 600 | Sample.Enable if BetaBreak
|
| 601 | Mark.A if AlphaBreak
|
| 602 | Mark.B if BetaBreak
|
| 603 | )
|
| 604 | )
|
| 605 | else
|
| 606 | (
|
| 607 | Analyzer.ReProgram
|
| 608 | (
|
| 609 | Sample.Enable if AlphaBreak||BetaBreak
|
| 610 | Mark.A if AlphaBreak
|
| 611 | Mark.B if BetaBreak
|
| 612 | )
|
| 613 | )
|
| 614 | Break.Delete /Alpha /Beta /Charly
|
| 615 | Break.SetFunc
|
| 616 | Break.Set task.config(magic)++(task.config(magicsize)-1) /Alpha
|
| 617 | )
|
| 618 | if a.mode.flow()
|
| 619 | (
|
| 620 | Break.Delete /TraceData
|
| 621 | Break.Set task.config(magic) /TraceData
|
| 622 | )
|
| 623 | )
|
| 624 | menuitem "[:perf]Show &Numerical" "Trace.STATistic.TASKFUNC"
|
| 625 | menuitem "[:perf]Show as &Tree" "Trace.STATistic.TASKTREE"
|
| 626 | menuitem "[:perf]Show &Detailed Tree" "Trace.STATistic.TASKTREE ALL"
|
| 627 | menuitem "[:achart]Show as &Timing" "Trace.CHART.TASKFUNC"
|
| 628 | menuitem "[:alist]Show N&esting" "Trace.List List.TASK FUNC TI.FUNC"
|
| 629 | )
|
| 630 | popup "Task &Status"
|
| 631 | (
|
| 632 | menuitem "&Prepare"
|
| 633 | (
|
| 634 | if t.method.analyzer()
|
| 635 | (
|
| 636 | Analyzer.AutoInit on
|
| 637 | )
|
| 638 | if (ice()||fire())&&!a.mode.flow()
|
| 639 | (
|
| 640 | Analyzer.ReProgram
|
| 641 | (
|
| 642 | Sample.Enable if AlphaBreak&&Write
|
| 643 | )
|
| 644 | Break.Delete /Alpha
|
| 645 | Break.Set task.config(magic)++(task.config(magicsize)-1) /Alpha
|
| 646 | TASK.TASKState
|
| 647 | )
|
| 648 | )
|
| 649 | menuitem "[:perf]Show &Numerical" "Trace.STATistic.TASKSTATE"
|
| 650 | menuitem "[:achart]Show as &Timing" "Trace.CHART.TASKSTATE"
|
| 651 | menuitem "[:achart]Tracking with Trace &List"
|
| 652 | (
|
| 653 | Trace.List List.TASK DEFault /Track
|
| 654 | Trace.CHART.TASKSTATE /Track
|
| 655 | )
|
| 656 | )
|
| 657 | )
|
| 658 | popup "&Help"
|
| 659 | (
|
| 660 | menuitem "Linux Awareness Manual" "HELP __RTOS_LINUX_S_"
|
| 661 | )
|
| 662 | )
|
| 663 |
|
| 664 |
|
| 665 | menu "task.dt"
|
| 666 | (
|
| 667 | default
|
| 668 | menuitem "Display detailed"
|
| 669 | (
|
| 670 | &address=address.offset(track.address())
|
| 671 | TASK.DTask &address
|
| 672 | )
|
| 673 | menuitem "Display task struct"
|
| 674 | (
|
| 675 | &address=task.proc.tcb(address.offset(track.address()))
|
| 676 | Var.View %m %s (struct task_struct)*&address
|
| 677 | )
|
| 678 | separator
|
| 679 | menuitem "Display Stack Frame" "Var.Frame /Locals /Caller /Task track.address()"
|
| 680 | menuitem "Display Registers" "Register /Task track.address()"
|
| 681 | menuitem "Switch Context" "Register.TASK track.address()"
|
| 682 | separator
|
| 683 | menuitem "Load Process Symbols" "TASK.sYmbol.LOAD track.address()"
|
| 684 | menuitem "Delete Process Symbols" "TASK.sYmbol.DELete track.address()"
|
| 685 | menuitem "Add Libraries to Symbol Autoloader"
|
| 686 | (
|
| 687 | TASK.sYmbol.Option AutoLoad ProcLib track.address()
|
| 688 | sYmbol.AutoLOAD.CHECK
|
| 689 | )
|
| 690 | menuitem "Add to Watched Processes"
|
| 691 | (
|
| 692 | &address=address.offset(track.address())
|
| 693 | TASK.Watch.View &address
|
| 694 | )
|
| 695 | menuitem "Delete from Watched Processes" "TASK.Watch.DELete track.address()"
|
| 696 | ;separator
|
| 697 | ;menuitem "Add to Stack Cov" "TASK.STK.ADD address.offset(track.address())"
|
| 698 | ;menuitem "Rm from Stack Cov" "TASK.STK.RM address.offset(track.address())"
|
| 699 | separator
|
| 700 | menuitem "Scan MMU Pages"
|
| 701 | (
|
| 702 | &address=address.offset(track.address())
|
| 703 | MMU.SCAN TaskPageTable &address
|
| 704 | )
|
| 705 | separator
|
| 706 | menuitem "Dump task entry"
|
| 707 | (
|
| 708 | &address=task.proc.tcb(address.offset(track.address()))
|
| 709 | Data.dump &address /l /dialog
|
| 710 | )
|
| 711 | separator
|
| 712 | menuitem "Kill task"
|
| 713 | (
|
| 714 | local &rkmagic &rktname
|
| 715 | &rkmagic=task.proc.tcb(address.offset(track.address()))
|
| 716 | &rktname=task.proc.name(&rkmagic)
|
| 717 | dialog.yesno "Really kill task &rktname?"
|
| 718 | entry &yn
|
| 719 | if &yn
|
| 720 | (
|
| 721 | var.set ((struct task_struct)*&rkmagic).pending.signal.sig[0]=0x100
|
| 722 | print "Signal SIGKILL sent to task &rktname"
|
| 723 | )
|
| 724 | )
|
| 725 | separator
|
| 726 | enable t.method.analyzer()
|
| 727 | menuitem "Trace this task"
|
| 728 | (
|
| 729 | local &magic
|
| 730 | if run()
|
| 731 | break
|
| 732 | &magic=address.offset(track.address())
|
| 733 | &sid=task.proc.magic2sid(&magic)
|
| 734 | if etm.contextcomp()>0
|
| 735 | (
|
| 736 | TrOnchip.ContextID ON
|
| 737 | Break.Set &sid:0--0xffffffff /Program /TraceEnable /TASK &magic
|
| 738 | )
|
| 739 | else
|
| 740 | (
|
| 741 | Break.Set task.config(magic) /Write /Data &magic /TraceON
|
| 742 | Break.Set task.config(magic) /Write /Data !&magic /TraceOFF
|
| 743 | )
|
| 744 | )
|
| 745 | )
|
| 746 |
|
| 747 |
|
| 748 | menu "task.mod"
|
| 749 | (
|
| 750 | default
|
| 751 | ;menuitem "Display detailed"
|
| 752 | ;(
|
| 753 | ; &address=address.offset(track.address())
|
| 754 | ; TASK.MODule &address
|
| 755 | ;)
|
| 756 | menuitem "Display module struct"
|
| 757 | (
|
| 758 | &address=task.mod.mcb(address.offset(track.address()))
|
| 759 | Var.View %m %s (struct module)*&address
|
| 760 | )
|
| 761 | separator
|
| 762 | menuitem "Load Module Symbols" "TASK.sYmbol.LOADMod track.address()"
|
| 763 | menuitem "Delete Module Symbols" "TASK.sYmbol.DELeteMod track.address()"
|
| 764 | separator
|
| 765 | menuitem "Dump module entry"
|
| 766 | (
|
| 767 | &address=address.offset(track.address())
|
| 768 | Data.dump &address /l /dialog
|
| 769 | )
|
| 770 | )
|
| 771 |
|
| 772 |
|
| 773 | menu "task.fs.t"
|
| 774 | (
|
| 775 | default
|
| 776 | menuitem "Display detailed"
|
| 777 | (
|
| 778 | &address=address.offset(track.address())
|
| 779 | TASK.FS.Types &address
|
| 780 | )
|
| 781 | menuitem "Display type struct"
|
| 782 | (
|
| 783 | &address=address.offset(track.address())
|
| 784 | Var.View %m %s (struct file_system_type)*&address
|
| 785 | )
|
| 786 | separator
|
| 787 | menuitem "Dump type entry"
|
| 788 | (
|
| 789 | &address=address.offset(track.address())
|
| 790 | Data.dump &address /l /dialog
|
| 791 | )
|
| 792 | )
|
| 793 |
|
| 794 |
|
| 795 | menu "task.fs.md"
|
| 796 | (
|
| 797 | default
|
| 798 | menuitem "Display detailed"
|
| 799 | (
|
| 800 | &address=address.offset(track.address())
|
| 801 | TASK.FS.MountDevs &address
|
| 802 | )
|
| 803 | menuitem "Display superblock struct"
|
| 804 | (
|
| 805 | &address=address.offset(track.address())
|
| 806 | Var.View %m %s (struct super_block)*&address
|
| 807 | )
|
| 808 | separator
|
| 809 | menuitem "Dump superblock entry"
|
| 810 | (
|
| 811 | &address=address.offset(track.address())
|
| 812 | Data.dump &address /l /dialog
|
| 813 | )
|
| 814 | )
|
| 815 |
|
| 816 |
|
| 817 | menu "task.fs.proc"
|
| 818 | (
|
| 819 | ;default
|
| 820 | ;menuitem "Display detailed"
|
| 821 | ;(
|
| 822 | ; &address=address.offset(track.address())
|
| 823 | ; TASK.FS.PROC &address
|
| 824 | ;)
|
| 825 | menuitem "Display proc struct"
|
| 826 | (
|
| 827 | &address=address.offset(track.address())
|
| 828 | Var.View %m %s (struct proc_dir_entry)*&address
|
| 829 | )
|
| 830 | separator
|
| 831 | menuitem "Dump proc dir entry"
|
| 832 | (
|
| 833 | &address=address.offset(track.address())
|
| 834 | Data.dump &address /l /dialog
|
| 835 | )
|
| 836 | )
|
| 837 |
|
| 838 |
|
| 839 | menu "task.fs.m"
|
| 840 | (
|
| 841 | default
|
| 842 | ;menuitem "Display detailed"
|
| 843 | ;(
|
| 844 | ; &address=address.offset(track.address())
|
| 845 | ; TASK.FS.Mount &address
|
| 846 | ;)
|
| 847 | menuitem "Display mount struct"
|
| 848 | (
|
| 849 | &address=address.offset(track.address())
|
| 850 | Var.View %o %h %s (struct vfsmount)*&address
|
| 851 | )
|
| 852 | separator
|
| 853 | menuitem "Dump mount entry"
|
| 854 | (
|
| 855 | &address=address.offset(track.address())
|
| 856 | Data.dump &address /l /dialog
|
| 857 | )
|
| 858 | )
|
| 859 |
|
| 860 |
|
| 861 | menu "task.lib"
|
| 862 | (
|
| 863 | default
|
| 864 | ;menuitem "Display detailed"
|
| 865 | ;(
|
| 866 | ; &address=address.offset(track.address())
|
| 867 | ; TASK.DTask &address
|
| 868 | ;)
|
| 869 | menuitem "Display Library struct"
|
| 870 | (
|
| 871 | &address=address.offset(track.address())
|
| 872 | Var.View %m %s (struct vm_area_struct)*&address
|
| 873 | )
|
| 874 | separator
|
| 875 | menuitem "Load Library Symbols" "TASK.sYmbol.LOADLib track.string() track.address()"
|
| 876 | menuitem "Delete Library Symbols" "TASK.sYmbol.DELeteLib track.string() track.address()"
|
| 877 | separator
|
| 878 | menuitem "Dump Library entry"
|
| 879 | (
|
| 880 | &address=address.offset(track.address())
|
| 881 | Data.dump &address /l /dialog
|
| 882 | )
|
| 883 | )
|
| 884 |
|
| 885 |
|
| 886 | menu "task.w"
|
| 887 | (
|
| 888 | default
|
| 889 | menuitem "Display Process"
|
| 890 | (
|
| 891 | &address=address.offset(track.address())
|
| 892 | TASK.DTask &address
|
| 893 | )
|
| 894 | menuitem "Delete from List"
|
| 895 | (
|
| 896 | &name=track.string()
|
| 897 | TASK.Watch.DELete "&name"
|
| 898 | )
|
| 899 | )
|
| 900 |
|
| 901 |
|