Skip to content

Commit c74a1e4

Browse files
authored
Remove iex_debugTrap() function (AcademySoftwareFoundation#2151)
This is an ancient utility function that at one point served as a debugging aide, a symbol to set a breakpoint for in the debugger. It's problematic because it's not namespaced so it can lead to symbol collisions when linking multiple versions of the library into a single binary. This is an API change, so it should only go into the next major release. Signed-off-by: Cary Phillips <cary@ilm.com>
1 parent eb0b058 commit c74a1e4

File tree

2 files changed

+0
-19
lines changed

2 files changed

+0
-19
lines changed

src/lib/Iex/IexBaseExc.cpp

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -350,19 +350,3 @@ DEFINE_EXC_EXP_IMPL (IEX_EXPORT, InvalidFpOpExc, MathExc)
350350

351351
IEX_INTERNAL_NAMESPACE_SOURCE_EXIT
352352

353-
#ifdef _WIN32
354-
355-
# pragma optimize("", off)
356-
void
357-
iex_debugTrap ()
358-
{
359-
if (0 != getenv ("IEXDEBUGTHROW")) ::DebugBreak ();
360-
}
361-
#else
362-
void
363-
iex_debugTrap ()
364-
{
365-
// how to in Linux?
366-
if (0 != ::getenv ("IEXDEBUGTHROW")) __builtin_trap ();
367-
}
368-
#endif

src/lib/Iex/IexMacros.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,9 @@
2626
#include "IexExport.h"
2727
#include "IexForward.h"
2828

29-
IEX_EXPORT void iex_debugTrap ();
30-
3129
#define THROW(type, text) \
3230
do \
3331
{ \
34-
iex_debugTrap (); \
3532
std::stringstream _iex_throw_s; \
3633
_iex_throw_s << text; \
3734
throw type (_iex_throw_s); \

0 commit comments

Comments
 (0)