4 ; DLLManager dump utility
6 ; © 1994-1998 Straylight
9 ;----- Licensing note -------------------------------------------------------
11 ; This file is part of Straylight's Dynamic Linking System (SDLS)
13 ; SDLS is free software; you can redistribute it and/or modify
14 ; it under the terms of the GNU General Public License as published by
15 ; the Free Software Foundation; either version 2, or (at your option)
18 ; SDLS is distributed in the hope that it will be useful,
19 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
20 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ; GNU General Public License for more details.
23 ; You should have received a copy of the GNU General Public License
24 ; along with SDLS. If not, write to the Free Software Foundation,
25 ; 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
34 AREA |!!!Foonly|,CODE,READONLY
36 start STMFD R13!,{R14}
44 DCB "*** Dump of DLLManager workspace at &",0
49 DCB "[DLL list]",13,10
52 ; --- Dump out DLL list ---
61 LDR R0,[R7,#dl_version]
64 DCB 13,10," Handle: ",0
68 DCB 13,10," Links: ",0
75 DCB 13,10," Ref count: ",0
76 LDR R0,[R7,#dl_clients]
86 notent SWI XOS_NewLine
91 modname DCB "DLLManager",0
93 ; --- Dump out application data ---
95 dump_apps SWI XOS_WriteS
96 DCB "[App data]",13,10
98 DCB "Cached handle: ",0
103 DCB "Cached pointer: ",0
109 DCB "[App list]",13,10
112 ; --- Dump out application list ---
122 DCB " External handle: ",0
123 LDR R0,[R7,#app_handle]
127 DCB " Internal handle: ",0
133 LDR R0,[R7,#app_next]
136 LDR R0,[R7,#app_prev]
140 DCB " Stack entries: ",0
141 LDR R0,[R7,#app_stackPtr]
142 MOV R0,R0,LSR #3 ;Divide it by 8
146 DCB " Cached DLL handle: ",0
147 LDR R0,[R7,#app_cachedll]
151 DCB " Cached DLL link: ",0
152 LDR R0,[R7,#app_cacheptr]
156 DCB " DLL list",13,10,0
158 ; --- Dump out DLL list quickly ---
160 LDR R8,[R7,#app_dlls]
171 LDR R0,[R9,#dl_version]
178 LDR R0,[R8,#lk_flags]
185 floop SWI XOS_NewLine
189 app_end SWI XOS_NewLine
190 LDR R7,[R7,#app_next]
193 ; --- Dump sub_alloc information ---
195 dump_sub LDMFD R13!,{PC}
197 writeHex STMFD R13!,{R1,R2,R14}
202 LDMFD R13!,{R1,R2,PC}^
204 writeDec STMFD R13!,{R1,R2,R14}
207 SWI XOS_ConvertInteger4
209 LDMFD R13!,{R1,R2,PC}^