Display selected information from the MTE and SMTE of one or more loaded modules. Optionally format the associated STE or OTE.
Syntax:
────.LM ────┬───────┬───┬───────┬────┬──────────┬───────────── └── O ──┘ ├── I ──┤ ├── hmte ──┤ ├── L ──┤ ├── addr ──┤ ├── P ──┤ └── name ──┘ ├── V ──┤ └── X ──┘
Parameters:
O
For 16-bit modules selected fields from the Segment Table Entry (STE) are displayed.
I
This option requires the SMTE to be present in storage. See below for information on how to make the SMTE present.
The default specification is to scan the entire MTE chain without formatting corresponding STEs or OTEs.
Results & Notes:
From fix pack 29 for Warp V3 and base Warp V4 the following changes have been made:
the I parameter has been introduced.
with some previous version of the Dump Formatter the .LMP and .LMV commands did not always display output.
From OS/2 Warp V3.0 fix pack 40, OS/2 Warp V4.0 fix pack 10 and OS/2 Warp E-Server the swappable stuctures referenced by .LM can be forced to be allocated from resident memory by using the OTE option of the RASKDATA CONFIG.SYS statement. This will avoid the possibilty that .LM might not be able to display information some modules.
The MTE chain is scanned from global symbol:
_mte_h
When OTE/STE formatting is not requested output appears as follows:
.lm hmte=0293 pmte=%fdfd1a38 mflags=06903140 e:\os2tools\mrfile32.exe hmte=027f pmte=%fdfd1c80 mflags=06903142 !pulse hmte=0272 pmte=%fdfd1db4 mflags=06903152 c:\os2\cmd.exe hmte=00a0 pmte=%fe0177a8 mflags=0698b194 c:\os2\dll\display.dll hmte=017a pmte=%fe015abc mflags=0698b198 c:\os2\dll\bvhwndw.dll hmte=010e pmte=%fef282dc mflags=0691b180 ??? hmte=0101 pmte=%fe016b6c mflags=0691b180 ??? hmte=00f9 pmte=%fe016cd4 mflags=0691b180 c:\os2\mdos\vdma.sys hmte=00f5 pmte=%fe016de0 mflags=0691b180 c:\os2\mdos\vbios.sys hmte=0072 pmte=%fff2c919 mflags=0002b180 mvdm.dll hmte=0006 pmte=%fff2bde0 mflags=0000b980 doscalls.dll hmte=01c8 pmte=%fdf45e78 mflags=0698b1c8 c:\os2\dll\times.fon hmte=01c6 pmte=%fe017718 mflags=0698b1c8 c:\os2\dll\helv.fon hmte=00d5 pmte=%fdf32e60 mflags=0608f1ca c:\os2\pmdd.sys hmte=00d6 pmte=%fdf32f04 mflags=0608f1c9 c:\os2\dos.sys hmte=00cd pmte=%fdf49f64 mflags=0608f1c9 c:\os2\testcfg.sys hmte=00cc pmte=%fdf4fb40 mflags=0628a1c9 c:\os2\hpfs.ifs hmte=00a2 pmte=%fdf45fb8 mflags=0408e1c9 c:\os2dasd.dmd hmte=00a1 pmte=%fdf32f8c mflags=0408e1c9 c:\ibm2scsi.add hmte=009f pmte=%fdf2ff18 mflags=0408e1c9 c:\ibm2flpy.add hmte=0096 pmte=%fdf41f60 mflags=0408e1c9 c:\print02.sys hmte=0093 pmte=%fdf2efb8 mflags=0408e1c9 c:\clock02.sys #
The fields formatted have the following meaning:
hmte
┌────────────────┬──────────┬────────────────────────────────────────┐ │name │bit mask │description │ ├────────────────┼──────────┼────────────────────────────────────────┤ │NOAUTODS │0x00000000│No Auto DS exists │ ├────────────────┼──────────┼────────────────────────────────────────┤ │SOLO │0x00000001│Auto DS is shared │ ├────────────────┼──────────┼────────────────────────────────────────┤ │INSTANCEDS │0x00000002│Auto DS is not shared │ ├────────────────┼──────────┼────────────────────────────────────────┤ │INSTLIBINIT │0x00000004│Per-instance Libinit │ ├────────────────┼──────────┼────────────────────────────────────────┤ │GINISETUP │0x00000008│Global Init has been setup │ ├────────────────┼──────────┼────────────────────────────────────────┤ │NOINTERNFIXUPS │0x00000010│internal fixups in .EXE-.DLL applied │ ├────────────────┼──────────┼────────────────────────────────────────┤ │NOEXTERNFIXUPS │0x00000020│external fixups in .EXE-.DLL applied │ ├────────────────┼──────────┼────────────────────────────────────────┤ │CLASS_PROGRAM │0x00000040│Program class │ ├────────────────┼──────────┼────────────────────────────────────────┤ │CLASS_GLOBAL │0x00000080│Global class │ ├────────────────┼──────────┼────────────────────────────────────────┤ │CLASS_SPECIFIC │0x000000C0│Specific class, as against global │ ├────────────────┼──────────┼────────────────────────────────────────┤ │CLASS_ALL │0x00000000│nonspecific class - all modules │ ├────────────────┼──────────┼────────────────────────────────────────┤ │CLASS_MASK │0x00000000│ │ ├────────────────┼──────────┼────────────────────────────────────────┤ │MTEPROCESSED │0x00000100│MTE being loaded │ ├────────────────┼──────────┼────────────────────────────────────────┤ │USED │0x00000200│MTE is referenced │ ├────────────────┼──────────┼────────────────────────────────────────┤ │DOSLIB │0x00000400│set if DOSCALL1 │ ├────────────────┼──────────┼────────────────────────────────────────┤ │DOSMOD │0x00000800│set if DOSCALLS │ ├────────────────┼──────────┼────────────────────────────────────────┤ │MTE_MEDIAFIXED │0x00001000│File Media permits discarding │ ├────────────────┼──────────┼────────────────────────────────────────┤ │LDRINVALID │0x00002000│module not loadable │ ├────────────────┼──────────┼────────────────────────────────────────┤ │PROGRAMMOD │0x00000000│program module │ ├────────────────┼──────────┼────────────────────────────────────────┤ │DEVDRVMOD │0x00004000│device driver module │ ├────────────────┼──────────┼────────────────────────────────────────┤ │LIBRARYMOD │0x00008000│DLL module │ ├────────────────┼──────────┼────────────────────────────────────────┤ │VDDMOD │0x00010000│VDD module │ ├────────────────┼──────────┼────────────────────────────────────────┤ │MVDMMOD │0x00020000│Set if VDD Helper MTE (MVDM.DLL) │ ├────────────────┼──────────┼────────────────────────────────────────┤ │INGRAPH │0x00040000│In Module Graph │ ├────────────────┼──────────┼────────────────────────────────────────┤ │GINIDONE │0x00080000│Global Init has finished │ ├────────────────┼──────────┼────────────────────────────────────────┤ │MTEADDRALLOCED │0x00100000│Allocate specific or not │ ├────────────────┼──────────┼────────────────────────────────────────┤ │FSDMOD │0x00200000│FSD MTE │ ├────────────────┼──────────┼────────────────────────────────────────┤ │FSHMOD │0x00400000│FS helper MTE │ ├────────────────┼──────────┼────────────────────────────────────────┤ │MTELONGNAMES │0x00800000│Module supports long-names │ ├────────────────┼──────────┼────────────────────────────────────────┤ │MTE_MEDIACONTIG │0x01000000│File Media contiguous memory req │ ├────────────────┼──────────┼────────────────────────────────────────┤ │MTE_MEDIA16M │0x02000000│File Media requires mem below 16M │ ├────────────────┼──────────┼────────────────────────────────────────┤ │MTEIOPLALLOWED │0x04000000│Module has IOPL privilege │ ├────────────────┼──────────┼────────────────────────────────────────┤ │MTEPORTHOLE │0x08000000│porthole module │ ├────────────────┼──────────┼────────────────────────────────────────┤ │MTEMODPROT │0x10000000│Module has shared memory protected │ ├────────────────┼──────────┼────────────────────────────────────────┤ │MTENEWMOD │0x20000000│Newly added module │ ├────────────────┼──────────┼────────────────────────────────────────┤ │MTEDLLTERM │0x40000000│Gets instance termination │ ├────────────────┼──────────┼────────────────────────────────────────┤ │MTESYMLOADED │0x80000000│Set if debugger symbols loaded │ └────────────────┴──────────┴────────────────────────────────────────┘name
Where no path information is given then the module is predefined by the system and does not exist separately as a load module file.
The STE and OTE are displayed when the O option is specified. These tables are accessed from the address at SMTE+0x1c. This requires that the SMTE be present in storage. If it is not then the following is returned:
swappable
MTE - swapped
To page in the SMTE use .LM without parameters to obtain the MTE address from the pmte field. The SMTE address is at MTE + 0x4. Use the .I command to page in the SMTE storage.
Under the Dump Formatter nothing can be done, however use of the OTE option of the RASKDATA CONFIG.SYS statement will guarabtee that structures used by .LM are retained in resident memory.
For a 16-bit module the STE is formatted as follows:
#.lmo 'hpfs' hmte=00cc pmte=%fdf4fb40 mflags=0628a1c9 c:\os2\hpfs.ifs seg sect psiz vsiz hob sel flags 0001 0003 eb24 eb24 0000 0668 8d60 code shr prel rel 0002 0079 d22f d230 0000 0670 8d60 code shr prel rel 0003 00e3 07b5 07b8 0000 0678 8d60 code shr prel rel 0004 00e8 0d8a 0d8c 0000 0680 8d60 code shr prel rel 0005 00f0 0d6e 19c2 0000 0688 8d41 data prel rel 0006 00f7 03fb 03fc 0000 0690 8c41 data prel 0007 00f9 0084 0084 0000 0698 8d41 data prel rel 0008 00fa 0010 0014 0000 06a0 8d41 data prel rel 0009 00fb 0238 0238 0000 06a8 8d41 data prel rel #
The STE fields formatted have the following meaning:
seg
┌──────────────┬───────┬───────┬───────────────────────────────────┐ │name │bit │.lmo │description │ │ │mask │msg │ │ ├──────────────┼───────┼───────┼───────────────────────────────────┤ │STE_CODE │0x0000 │code │code segment type │ ├──────────────┼───────┼───────┼───────────────────────────────────┤ │STE_DATA │0x0001 │data │data segment type │ ├──────────────┼───────┼───────┼───────────────────────────────────┤ │STE_PACKED │0x0002 │ │segment is packed │ ├──────────────┼───────┼───────┼───────────────────────────────────┤ │STE_SEMAPHORE │0x0004 │ │segment semaphore │ ├──────────────┼───────┼───────┼───────────────────────────────────┤ │STE_ITERATED │0x0008 │iter │segment data is iterated │ ├──────────────┼───────┼───────┼───────────────────────────────────┤ │STE_WAITING │0x0010 │move │segment is waiting on semephore │ ├──────────────┼───────┼───────┼───────────────────────────────────┤ │STE_SHARED │0x0020 │shr │segment can be shared │ ├──────────────┼───────┼───────┼───────────────────────────────────┤ │STE_PRELOAD │0x0040 │prel │segment is preload │ ├──────────────┼───────┼───────┼───────────────────────────────────┤ │STE_ERONLY │0x0080 │EO │execute only if code segment │ ├──────────────┼───────┼───────┼───────────────────────────────────┤ │STE_ERONLY │0x0080 │RO │read only if data segment │ ├──────────────┼───────┼───────┼───────────────────────────────────┤ │STE_RELOCINFO │0x0100 │rel │if segment has reloc records │ ├──────────────┼───────┼───────┼───────────────────────────────────┤ │STE_CONFORM │0x0200 │conf │segment is conforming │ ├──────────────┼───────┼───────┼───────────────────────────────────┤ │STE_RING_2 │0x0800 │iopl │ring 2 selector │ ├──────────────┼───────┼───────┼───────────────────────────────────┤ │STE_RING_3 │0x0C00 │ │ring 3 selector │ ├──────────────┼───────┼───────┼───────────────────────────────────┤ │STE_HUGE │0x1000 │disc │huge segment │ ├──────────────┼───────┼───────┼───────────────────────────────────┤ │STE_PAGEABLE │0x2000 │ │just a page can be faulted in │ ├──────────────┼───────┼───────┼───────────────────────────────────┤ │STE_PRESENT │0x2000 │ │packed segment already loaded │ ├──────────────┼───────┼───────┼───────────────────────────────────┤ │STE_SELALLOC │0x4000 │ │used to indicate sel allocated │ ├──────────────┼───────┼───────┼───────────────────────────────────┤ │STE_GDTSEG │0x8000 │ │used to indicate GTD sel alloc │ └──────────────┴───────┴───────┴───────────────────────────────────┘
For a 32-bit module the OTE is formatted as follows:
#.lmo 'doscall1' hmte=00a7 pmte=%fdf59f58 mflags=0698b594 c:\os2\dll\doscall1.dll obj vsize vbase flags ipagemap cpagemap hob sel 0001 00001354 1a010000 80009025 00000001 00000002 00ad d00e r-x shr alias iopl 0002 0000cde8 1a020000 80002025 00000003 0000000d 00ac d017 r-x shr big 0003 00001844 1a030000 80001025 00000010 00000002 00ab d01f r-x shr alias 0004 000002ce 1a040000 80001025 00000012 00000001 00aa d027 r-x shr alias 0005 000054d0 1a050000 8000d025 00000013 00000006 00a9 d02e r-x shr alias conf iopl 0006 00000270 1a060000 80001023 00000019 00000001 00a8 d037 rw- shr alias 0007 00001b40 1a070000 80001003 0000001a 00000002 0000 d03f rw- alias
The OTE fields formatted have the following meaning:
obj
┌────────────┬──────────┬─────┬──────────────────────────────┐ │name │bit mask │.lmo │description │ │ │ │msg │ │ ├────────────┼──────────┼─────┼──────────────────────────────┤ │OBJREAD │0x00000001│r │Readable Object │ ├────────────┼──────────┼─────┼──────────────────────────────┤ │OBJWRITE │0x00000002│w │Writeable Object │ ├────────────┼──────────┼─────┼──────────────────────────────┤ │OBJEXEC │0x00000004│x │Executable Object │ ├────────────┼──────────┼─────┼──────────────────────────────┤ │OBJRSRC │0x00000008│rsrc │Resource Object │ ├────────────┼──────────┼─────┼──────────────────────────────┤ │OBJDISCARD │0x00000010│disc │Object is Discardable │ ├────────────┼──────────┼─────┼──────────────────────────────┤ │OBJSHARED │0x00000020│shr │Object is Shared │ ├────────────┼──────────┼─────┼──────────────────────────────┤ │OBJPRELOAD │0x00000040│prel │Object has preload pages │ ├────────────┼──────────┼─────┼──────────────────────────────┤ │OBJINVALID │0x00000080│inv │Object has invalid pages │ ├────────────┼──────────┼─────┼──────────────────────────────┤ │OBJZEROFIL │0x00000100│zfill│Object has zero-filled pages │ ├────────────┼──────────┼─────┼──────────────────────────────┤ │OBJRESIDENT │0x00000200│ │Object is resident │ ├────────────┼──────────┼─────┼──────────────────────────────┤ │OBJALIAS16 │0x00001000│alias│16:16 alias required │ ├────────────┼──────────┼─────┼──────────────────────────────┤ │OBJBIGDEF │0x00002000│big │Big/Default bit setting │ ├────────────┼──────────┼─────┼──────────────────────────────┤ │OBJCONFORM │0x00004000│conf │Object is conforming for code │ ├────────────┼──────────┼─────┼──────────────────────────────┤ │OBJIOPL │0x00008000│iopl │Object I/O privilege level │ ├────────────┼──────────┼─────┼──────────────────────────────┤ │OBJMADEPRIV │0x40000000│ │Object is made private for │ │ │ │ │debug │ ├────────────┼──────────┼─────┼──────────────────────────────┤ │OBJALLOC │0x80000000│ │Object is allocates used by │ │ │ │ │the loader │ └────────────┴──────────┴─────┴──────────────────────────────┘ipagemap
If either the segment table or object is not in storage then the following message is issued:
%nnnnnnnnx - swapped