Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
halo
ndk
Commits
7d1c6f28
Commit
7d1c6f28
authored
11 years ago
by
Andrew Hsieh
Committed by
Gerrit Code Review
11 years ago
Browse files
Options
Download
Plain Diff
Merge "gabi++: Introduced _GABIXX_HIDDEN macro."
parents
f0d8fa08
ce2be28f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
18 deletions
+31
-18
sources/cxx-stl/gabi++/include/gabixx_config.h
sources/cxx-stl/gabi++/include/gabixx_config.h
+4
-0
sources/cxx-stl/gabi++/src/cxxabi.cc
sources/cxx-stl/gabi++/src/cxxabi.cc
+4
-2
sources/cxx-stl/gabi++/src/cxxabi_defines.h
sources/cxx-stl/gabi++/src/cxxabi_defines.h
+4
-3
sources/cxx-stl/gabi++/src/dwarf_helper.h
sources/cxx-stl/gabi++/src/dwarf_helper.h
+4
-3
sources/cxx-stl/gabi++/src/helper_func_internal.h
sources/cxx-stl/gabi++/src/helper_func_internal.h
+15
-10
No files found.
sources/cxx-stl/gabi++/include/gabixx_config.h
View file @
7d1c6f28
...
...
@@ -46,6 +46,10 @@
# define _GABIXX_NOEXCEPT_(x)
/* nothing */
#endif
// Use _GABIXX_HIDDEN to declare internal functions of GAbi++ that should
// never be exposed to client code.
#define _GABIXX_HIDDEN __attribute__((__visibility__("hidden")))
// Use _GABIXX_ALWAYS_INLINE to declare a function that shall always be
// inlined. Note that the always_inline doesn't make a function inline
// per se.
...
...
This diff is collapsed.
Click to expand it.
sources/cxx-stl/gabi++/src/cxxabi.cc
View file @
7d1c6f28
...
...
@@ -43,7 +43,8 @@ namespace {
return
exc
==
__gxx_exception_class
;
}
void
defaultExceptionCleanupFunc
(
_Unwind_Reason_Code
reason
,
_Unwind_Exception
*
exc
)
{
void
defaultExceptionCleanupFunc
(
_Unwind_Reason_Code
reason
,
_Unwind_Exception
*
exc
)
{
__cxa_free_exception
(
exc
+
1
);
}
...
...
@@ -87,7 +88,8 @@ namespace {
obj
=
malloc
(
sizeof
(
__cxa_eh_globals
));
if
(
!
obj
)
{
// Shouldn't happen, but better be safe than sorry.
__gabixx
::
__fatal_error
(
"Can't allocate thread-specific C++ runtime info block."
);
__gabixx
::
__fatal_error
(
"Can't allocate thread-specific C++ runtime info block."
);
}
memset
(
obj
,
0
,
sizeof
(
__cxa_eh_globals
));
pthread_setspecific
(
__cxa_thread_key
,
obj
);
...
...
This diff is collapsed.
Click to expand it.
sources/cxx-stl/gabi++/src/cxxabi_defines.h
View file @
7d1c6f28
...
...
@@ -317,14 +317,15 @@ struct __cxa_eh_globals {
namespace
__gabixx
{
// Default terminate handler.
_GABIXX_NORETURN
void
__default_terminate
(
void
);
_GABIXX_NORETURN
void
__default_terminate
(
void
)
_GABIXX_HIDDEN
;
// Call |handler| and if it returns, call __default_terminate.
_GABIXX_NORETURN
void
__terminate
(
std
::
terminate_handler
handler
);
_GABIXX_NORETURN
void
__terminate
(
std
::
terminate_handler
handler
)
_GABIXX_HIDDEN
;
// Print a fatal error message to the log+stderr, then call
// std::terminate().
_GABIXX_NORETURN
void
__fatal_error
(
const
char
*
message
);
_GABIXX_NORETURN
void
__fatal_error
(
const
char
*
message
)
_GABIXX_HIDDEN
;
}
// __gabixx
...
...
This diff is collapsed.
Click to expand it.
sources/cxx-stl/gabi++/src/dwarf_helper.h
View file @
7d1c6f28
...
...
@@ -43,6 +43,7 @@
#include <cstdint>
#include <unwind.h>
#include <gabixx_config.h>
namespace
__cxxabiv1
{
...
...
@@ -78,10 +79,10 @@ namespace __cxxabiv1 {
// _URC_HANDLER_FOUND
};
uintptr_t
readULEB128
(
const
uint8_t
**
data
);
intptr_t
readSLEB128
(
const
uint8_t
**
data
);
uintptr_t
readULEB128
(
const
uint8_t
**
data
)
_GABIXX_HIDDEN
;
intptr_t
readSLEB128
(
const
uint8_t
**
data
)
_GABIXX_HIDDEN
;
uintptr_t
readEncodedPointer
(
const
uint8_t
**
data
,
uint8_t
encoding
);
uint8_t
encoding
)
_GABIXX_HIDDEN
;
}
// namespace __cxxabiv1
...
...
This diff is collapsed.
Click to expand it.
sources/cxx-stl/gabi++/src/helper_func_internal.h
View file @
7d1c6f28
...
...
@@ -36,10 +36,10 @@
// Target-independent helper functions
namespace
__cxxabiv1
{
void
call_terminate
(
_Unwind_Exception
*
unwind_exception
);
void
call_terminate
(
_Unwind_Exception
*
unwind_exception
)
_GABIXX_HIDDEN
;
#if __arm__
uint32_t
decodeRelocTarget2
(
uint32_t
ptr
);
uint32_t
decodeRelocTarget2
(
uint32_t
ptr
)
_GABIXX_HIDDEN
;
#endif
// An exception spec acts like a catch handler, but in reverse.
...
...
@@ -50,33 +50,38 @@ namespace __cxxabiv1 {
uint8_t
ttypeEncoding
,
const
std
::
type_info
*
excpType
,
void
*
adjustedPtr
,
_Unwind_Exception
*
unwind_exception
);
_Unwind_Exception
*
unwind_exception
)
_GABIXX_HIDDEN
;
void
setRegisters
(
_Unwind_Exception
*
unwind_exception
,
_Unwind_Context
*
context
,
const
ScanResultInternal
&
results
);
const
ScanResultInternal
&
results
)
_GABIXX_HIDDEN
;
_Unwind_Reason_Code
continueUnwinding
(
_Unwind_Exception
*
ex
,
_Unwind_Context
*
context
);
_Unwind_Context
*
context
)
_GABIXX_HIDDEN
;
void
saveDataToBarrierCache
(
_Unwind_Exception
*
exc
,
_Unwind_Context
*
ctx
,
const
ScanResultInternal
&
results
);
const
ScanResultInternal
&
results
)
_GABIXX_HIDDEN
;
void
loadDataFromBarrierCache
(
_Unwind_Exception
*
exc
,
ScanResultInternal
&
results
);
ScanResultInternal
&
results
)
_GABIXX_HIDDEN
;
void
prepareBeginCleanup
(
_Unwind_Exception
*
exc
);
void
prepareBeginCleanup
(
_Unwind_Exception
*
exc
)
_GABIXX_HIDDEN
;
void
saveUnexpectedDataToBarrierCache
(
_Unwind_Exception
*
exc
,
_Unwind_Context
*
ctx
,
const
ScanResultInternal
&
results
);
const
ScanResultInternal
&
results
)
_GABIXX_HIDDEN
;
void
scanEHTable
(
ScanResultInternal
&
results
,
_Unwind_Action
actions
,
bool
native_exception
,
_Unwind_Exception
*
unwind_exception
,
_Unwind_Context
*
context
);
_Unwind_Context
*
context
)
_GABIXX_HIDDEN
;
// Make it easier to adapt to Itanium PR
#ifdef __arm__
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment