View | Details | Raw Unified | Return to bug 95705 | Differences between
and this patch

Collapse All | Expand All

(-)MIInfoSharedLibraryInfo.java (-1 / +76 lines)
Lines 21-26 Link Here
21
	MIShared[] shared;
21
	MIShared[] shared;
22
	boolean isUnixFormat = true;
22
	boolean isUnixFormat = true;
23
	boolean hasProcessHeader = false;
23
	boolean hasProcessHeader = false;
24
	
25
	// FIX : HP-UX shared library view
26
	private boolean isHPUXFormat;
27
	static String mergestr=null;
28
	//end fix
24
29
25
	public MIInfoSharedLibraryInfo(MIOutput out) {
30
	public MIInfoSharedLibraryInfo(MIOutput out) {
26
		super(out);
31
		super(out);
Lines 57-64 Link Here
57
			if (str.startsWith("DLL")) { //$NON-NLS-1$
62
			if (str.startsWith("DLL")) { //$NON-NLS-1$
58
				isUnixFormat = false;
63
				isUnixFormat = false;
59
			}
64
			}
65
			// FIX : HP-UX shared library view
66
			else if(str.startsWith("Shared Object Libraries"))			
67
			{
68
              // it is hpux format
69
				isHPUXFormat = true;
70
				
71
			}
72
			//end fix
60
			hasProcessHeader = true;
73
			hasProcessHeader = true;
61
		} else if (isUnixFormat) {
74
		}
75
		// FIX : HP-UX shared library view
76
		else if (isHPUXFormat) 
77
		{
78
			if(str.startsWith("0x"))
79
			{
80
               //merging...
81
				mergestr +=" "+str;
82
				parseHPUXShared(mergestr, aList);
83
				return;
84
			}
85
			else if(str.startsWith("tstart"))
86
			{
87
				return;
88
			}
89
			else
90
			{
91
               // new shareed library entry...;
92
				mergestr = new String(str);
93
				return;
94
			}
95
			
96
		}
97
		// end FIX
98
		else if (isUnixFormat) {
62
			parseUnixShared(str, aList);
99
			parseUnixShared(str, aList);
63
		} else {
100
		} else {
64
			parseWinShared(str, aList);
101
			parseWinShared(str, aList);
Lines 111-116 Link Here
111
		}
148
		}
112
	}
149
	}
113
150
151
	// FIX : HP-UX shared library view
152
	void parseHPUXShared(String str, List aList) {
153
		if (str.length() > 0) {
154
			// Pass the header
155
			int index = -1;
156
			String from = ""; //$NON-NLS-1$
157
			String to = ""; //$NON-NLS-1$
158
			boolean syms = false;
159
			String name = ""; //$NON-NLS-1$
160
161
			for (int i = 0;(index = str.indexOf(' ')) != -1 || i < 3; i++) 
162
			{
163
				if (index == -1) {
164
					index = 0;
165
				}
166
167
				String sub = str.substring(0,index).trim();
168
				str= str.substring(index).trim();
169
				switch (i) {
170
					case 0 :
171
						name = sub;
172
						break;
173
					case 2 : // second column is "To"
174
							to = sub;
175
						break;
176
					case 1 : // first column is "From"
177
							from = sub;
178
						break;
179
				}
180
			}
181
			syms=true;
182
			if (name.length() > 0) {
183
				MIShared s = new MIShared(from, to, syms, name);
184
				aList.add(s);
185
			}
186
		}
187
	} // end fo fix
188
114
	void parseWinShared(String str, List aList) {
189
	void parseWinShared(String str, List aList) {
115
		String from = ""; //$NON-NLS-1$
190
		String from = ""; //$NON-NLS-1$
116
		String to = ""; //$NON-NLS-1$
191
		String to = ""; //$NON-NLS-1$

Return to bug 95705