except.cxx (61dff127) except.cxx (972e694c)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 8 unchanged lines hidden (view full) ---

17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23
24#include <stdio.h>
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 8 unchanged lines hidden (view full) ---

17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23
24#include <stdio.h>
25#include <string.h>
25#include <dlfcn.h>
26#include <cxxabi.h>
27#include <hash_map>
28
29#include <rtl/strbuf.hxx>
30#include <rtl/ustrbuf.hxx>
31#include <osl/diagnose.h>
32#include <osl/mutex.hxx>

--- 125 unchanged lines hidden (view full) ---

158 buf.append( token.getLength() );
159 OString c_token( OUStringToOString( token, RTL_TEXTENCODING_ASCII_US ) );
160 buf.append( c_token );
161 }
162 while (index >= 0);
163 buf.append( 'E' );
164
165 OString symName( buf.makeStringAndClear() );
26#include <dlfcn.h>
27#include <cxxabi.h>
28#include <hash_map>
29
30#include <rtl/strbuf.hxx>
31#include <rtl/ustrbuf.hxx>
32#include <osl/diagnose.h>
33#include <osl/mutex.hxx>

--- 125 unchanged lines hidden (view full) ---

159 buf.append( token.getLength() );
160 OString c_token( OUStringToOString( token, RTL_TEXTENCODING_ASCII_US ) );
161 buf.append( c_token );
162 }
163 while (index >= 0);
164 buf.append( 'E' );
165
166 OString symName( buf.makeStringAndClear() );
166 //rtti = (type_info *)dlsym( m_hApp, symName.getStr() );
167 if (hmod == NULL)
168 hmod = dlopen( "gcc3_uno.dll", 0);
169
167
170 if (hmod)
171 rtti = (type_info *)dlsym( hmod, symName.getStr() );
168 // dll imports have been removed because this breaks the build (they are
169 // forward referenced) and also cygwin ignores this.
172
170
173 if (rtti)
174 {
175 pair< t_rtti_map::iterator, bool > insertion(
176 m_rttis.insert( t_rtti_map::value_type( unoName, rtti ) ) );
177 OSL_ENSURE( insertion.second, "### inserting new rtti failed?!" );
178 }
179 else
180 {
181 // try to lookup the symbol in the generated rtti map
182 t_rtti_map::const_iterator iFind( m_generatedRttis.find( unoName ) );
183 if (iFind == m_generatedRttis.end())
184 {
185 // we must generate it !
186 // symbol and rtti-name is nearly identical,
187 // the symbol is prefixed with __ZTI
188 char const * rttiName = symName.getStr() +5;

--- 17 unchanged lines hidden (view full) ---

206 pair< t_rtti_map::iterator, bool > insertion(
207 m_generatedRttis.insert( t_rtti_map::value_type( unoName, rtti ) ) );
208 OSL_ENSURE( insertion.second, "### inserting new generated rtti failed?!" );
209 }
210 else // taking already generated rtti
211 {
212 rtti = iFind->second;
213 }
171 // try to lookup the symbol in the generated rtti map
172 t_rtti_map::const_iterator iFind( m_generatedRttis.find( unoName ) );
173 if (iFind == m_generatedRttis.end())
174 {
175 // we must generate it !
176 // symbol and rtti-name is nearly identical,
177 // the symbol is prefixed with __ZTI
178 char const * rttiName = symName.getStr() +5;

--- 17 unchanged lines hidden (view full) ---

196 pair< t_rtti_map::iterator, bool > insertion(
197 m_generatedRttis.insert( t_rtti_map::value_type( unoName, rtti ) ) );
198 OSL_ENSURE( insertion.second, "### inserting new generated rtti failed?!" );
199 }
200 else // taking already generated rtti
201 {
202 rtti = iFind->second;
203 }
214 }
215 }
216 else
217 {
218 rtti = iFind->second;
219 }
220
221 return rtti;
222}

--- 123 unchanged lines hidden ---
204 }
205 else
206 {
207 rtti = iFind->second;
208 }
209
210 return rtti;
211}

--- 123 unchanged lines hidden ---