summaryrefslogtreecommitdiff
path: root/gcc/melt-runtime.h
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2013-06-28 10:59:05 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2013-06-28 10:59:05 +0000
commitf33bfcbc96020779bffb17a843469d06bd84af03 (patch)
treeddd194dd1797e82d6ee09b382e84b9909e63f1d0 /gcc/melt-runtime.h
parent0d5f6c2249c71b0144f39a67ffaf8fd8bdb3467c (diff)
downloadgcc-f33bfcbc96020779bffb17a843469d06bd84af03.tar.gz
2013-06-28 Basile Starynkevitch <basile@starynkevitch.net>
* melt-runtime.h (melt_low_stderr_value) (melt_low_stderr_value_at): New macros. (Melt_CallFrame): current_closure, current_hook: New member functions. * melt-runtime.c (melt_errprint_dladdr): New utility function. (melt_dbgbacktrace, melt_dbgshortbacktrace): Show backtrace with classy frames. Use melt_errprint_dladdr. * melt/warmelt-modes.melt (generate_runtypesupport_enum_objmagic): Emit newline. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@200514 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/melt-runtime.h')
-rw-r--r--gcc/melt-runtime.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/melt-runtime.h b/gcc/melt-runtime.h
index b1cca82d68b..fae1dfdfe5b 100644
--- a/gcc/melt-runtime.h
+++ b/gcc/melt-runtime.h
@@ -316,6 +316,24 @@ extern "C" int melt_flag_bootstrapping;
#endif /*MELT_HAVE_DEBUG*/
+/* Low level stderr output of value, using the melt_debug_fun; see the
+ hook_low_stderr_value_at in warmelt-hooks.melt file. */
+#define melt_low_stderr_value(Msg,Val)\
+ melt_low_stderr_value_at(__FILE__,__LINE__,(Msg),(Val))
+
+#define melt_low_stderr_value_at(Fil,Lin,Msg,Val) do { \
+ static long _meltlowstderrcount_##Lin; \
+ _meltlowstderrcount_##Lin++; \
+ if (melt_need_debug(0)) \
+ { \
+ melthookproc_HOOK_LOW_STDERR_VALUE_AT \
+ ((Val), \
+ melt_basename((Fil)), (Lin), \
+ (Msg), \
+ _meltlowdebugcount_##Lin); \
+ }; \
+ } while(0)
+
@@ -2838,6 +2856,8 @@ public:
Melt_CallFrame* previous_frame() const { return _meltcf_prev; };
const char* srcloc() const { return mcfr_flocs; };
melt_ptr_t current() const { return mcfr_current; };
+ meltclosure_ptr_t current_closure() const { return meltcast_closure_st (mcfr_current); };
+ melthook_ptr_t current_hook() const { return meltcast_hook_st (mcfr_current); };
protected:
Melt_CallFrame(size_t sz, meltclosure_ptr_t clos=NULL)
: _meltcf_prev (_top_call_frame_), mcfr_flocs(NULL), mcfr_clos(clos) {