Dynamic loading is discussed at more length in the idbg(1M) and ml(1M) reference pages.# ml ld -i /var/sysgen/boot/idbg.o
When the support modules are loaded, idbg can be invoked in three styles.
Example 11-5 : Invoking idbg Interactively
# idbg idbg> plist 187 pid 187 is in proc slot 31 idbg> quit #The command terminates when the command quit is entered, or when control-D (standard input end of file) is typed.
Example 11-6 : Invoking idbg with a Log File
# idbg -r /var/tmp/idbg.save idbg> plist 187 pid 187 is in proc slot 31 idbg> proc 31 proc: slot 31 addr 0x8832db30 pid 187 ppid 1 uid 0 abi IRIX5 SLEEP flags: load uload siglck recalc sv ... idbg> ^D # cat /var/tmp/idbg.save pid 187 is in proc slot 31 proc: slot 31 addr 0x8832db30 pid 187 ppid 1 uid 0 abi IRIX5 SLEEP flags: load uload siglck recalc sv ... #You can use this method to collect a series of displays in a single file as you test a driver.
Example 11-7 : Invoking idbg for a Single Command
# idbg plist | fgrep -c tcsh 3 #Since the displays of idbg are very rich, there are endless opportunities to use this mode to generate data within shell scripts, and to process it using tools such as awk and perl. Using perl you could write an intelligent display routine that showed the status of your driver's private data structures using your own terminology and display format.