diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-07-03 05:44:22 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-07-03 05:44:22 +0000 |
commit | 15aa690ac143712a88f0431e43421a782dbe8162 (patch) | |
tree | 4d81feba2d389ab95404820d49e0fad6c8948690 /gcc/melt-runtime.h | |
parent | 3ef08531a600da260697d15a15402d9e8b3de33c (diff) | |
download | gcc-15aa690ac143712a88f0431e43421a782dbe8162.tar.gz |
2013-07-03 Basile Starynkevitch <basile@starynkevitch.net>
* melt-runtime.h (Melt_CallFrame): Declare _dbgcall_count_ when
debugging and use it.
* melt-runtime.c (Melt_CallFrame::_dbgcall_count_): Define.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@200632 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/melt-runtime.h')
-rw-r--r-- | gcc/melt-runtime.h | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/gcc/melt-runtime.h b/gcc/melt-runtime.h index fa48537becb..37ab5632e3a 100644 --- a/gcc/melt-runtime.h +++ b/gcc/melt-runtime.h @@ -2834,6 +2834,7 @@ class Melt_CallFrame { static Melt_CallFrame* _top_call_frame_; #if MELT_HAVE_DEBUG static FILE* _dbgcall_file_; + static long _dbgcall_count_; #endif /*MELT_HAVE_DEBUG*/ virtual void melt_forward_values (void) =0; virtual void melt_mark_ggc_data (void) =0; @@ -2869,7 +2870,9 @@ protected: _meltcf_dbgfile(file), _meltcf_dbgline(lin), mcfr_flocs(NULL), mcfr_clos(clos) { if (MELT_UNLIKELY( _dbgcall_file_ != NULL)) { - fprintf (_dbgcall_file_, "+ %s:%d Siz%d Clo%p\n", file, lin, (int)sz, (void*)clos); + _dbgcall_count_++; + fprintf (_dbgcall_file_, "+ %s:%d #%ld Siz%d Clo%p\n", + file, lin, _dbgcall_count_, (int)sz, (void*)clos); fflush (_dbgcall_file_); } melt_clear_rest_of_frame (sz); @@ -2880,7 +2883,9 @@ protected: _meltcf_dbgfile(file), _meltcf_dbgline(lin), mcfr_flocs(NULL), mcfr_hook(hook) { if (MELT_UNLIKELY( _dbgcall_file_ != NULL)) { - fprintf (_dbgcall_file_, "+ %s:%d Siz%d Hook%p\n", file, lin, (int)sz, (void*)hook); + _dbgcall_count_++; + fprintf (_dbgcall_file_, "+ %s:%d #%ld Siz%d Hook%p\n", + file, lin, _dbgcall_count_, (int)sz, (void*)hook); fflush (_dbgcall_file_); } melt_clear_rest_of_frame (sz); @@ -2894,7 +2899,9 @@ protected: #endif /*MELT_HAVE_DEBUG*/ mcfr_flocs(NULL), mcfr_clos(clos) { if (MELT_UNLIKELY( _dbgcall_file_ != NULL)) { - fprintf (_dbgcall_file_, "+ * Siz%d Clo%p\n", (int)sz, (void*)clos); + _dbgcall_count_++; + fprintf (_dbgcall_file_, "+ * #%ld Siz%d Clo%p\n", + _dbgcall_count_, (int)sz, (void*)clos); fflush (_dbgcall_file_); } melt_clear_rest_of_frame (sz); @@ -2907,7 +2914,9 @@ protected: #endif /*MELT_HAVE_DEBUG*/ mcfr_flocs(NULL), mcfr_hook(hook) { if (MELT_UNLIKELY( _dbgcall_file_ != NULL)) { - fprintf (_dbgcall_file_, "+ * Siz%d Hook%p\n", (int)sz, (void*)hook); + _dbgcall_count_++; + fprintf (_dbgcall_file_, "+ * #%ld Siz%d Hook%p\n", + _dbgcall_count_, (int)sz, (void*)hook); fflush (_dbgcall_file_); } melt_clear_rest_of_frame (sz); @@ -2929,7 +2938,7 @@ public: if (MELT_UNLIKELY( _dbgcall_file_ != NULL)) { fflush (_dbgcall_file_); if (f == NULL) { - fprintf (_dbgcall_file_, "#eof\n"); + fprintf (_dbgcall_file_, "#eof #%ld\n", _dbgcall_count_); fclose (_dbgcall_file_); } } |