summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
af4b367)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@5221
48e7efb5-ca39-0410-a469-
dd3cf9ba447f
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "xbt/ex.h"
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "xbt/ex.h"
-#include "xbt/ex_private.h"
+#include "xbt_modinter.h"
/* Module creation/destruction */
void xbt_backtrace_init(void) { }
/* Module creation/destruction */
void xbt_backtrace_init(void) { }
/* ebp points on stack base */
/* esp points on stack pointer, ie on last stacked element (current element) */
/* ebp points on stack base */
/* esp points on stack pointer, ie on last stacked element (current element) */
-// asm ("call $ + 5"); FIXME: this does not works when cross-compiling. Is this really mandatory?
- asm ("pop %eax");
- asm ("mov context.Eip, %eax");
- asm ("mov %eax, %esp");
- asm ("mov context.Esp, %eax");
- asm ("mov context.Ebp, %ebp");
-
+ _asm call $ + 5
+ _asm pop %eax
+ _asm mov context.Eip, %eax
+ _asm mov %eax, %esp
+ _asm mov context.Esp, %eax
+ _asm mov context.Ebp, %ebp
+
if ((NULL == hlp_dbg_instance) || (size <= 0) || (NULL == buffer)) {
errno = EINVAL;
return 0;
if ((NULL == hlp_dbg_instance) || (size <= 0) || (NULL == buffer)) {
errno = EINVAL;
return 0;
# define HAVE_BACKTRACE 1 /* Hello linux box */
#endif
# define HAVE_BACKTRACE 1 /* Hello linux box */
#endif
-#if defined(WIN32) && defined(_M_IX86)
+#if defined(WIN32) && defined(_M_IX86) && !defined(__GNUC__)
# define HAVE_BACKTRACE 1 /* Hello x86 windows box */
#endif
# define HAVE_BACKTRACE 1 /* Hello x86 windows box */
#endif
#if defined(HAVE_EXECINFO_H) && defined(HAVE_POPEN) && defined(ADDR2LINE)
# include "backtrace_linux.c"
#if defined(HAVE_EXECINFO_H) && defined(HAVE_POPEN) && defined(ADDR2LINE)
# include "backtrace_linux.c"
-#elif (defined(WIN32) && defined (_M_IX86))
+#elif (defined(WIN32) && defined (_M_IX86)) && !defined(__GNUC__)
# include "backtrace_windows.c"
#else
# include "backtrace_dummy.c"
# include "backtrace_windows.c"
#else
# include "backtrace_dummy.c"