git://git.jankratochvil.net
/
gnokii.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
6944356
)
Some stackchecking fixes
author
short
<>
Tue, 5 Mar 2002 21:37:34 +0000
(21:37 +0000)
committer
short
<>
Tue, 5 Mar 2002 21:37:34 +0000
(21:37 +0000)
gnokii/cleanup.c
patch
|
blob
|
history
diff --git
a/gnokii/cleanup.c
b/gnokii/cleanup.c
index
2a0b51e
..
e93075d
100644
(file)
--- a/
gnokii/cleanup.c
+++ b/
gnokii/cleanup.c
@@
-8,9
+8,11
@@
void _cleanup(void)
{
/* hack for pic32 gcc */
{
/* hack for pic32 gcc */
+#if 0
#ifdef LIVE
LIVE;
#endif /* LIVE */
#ifdef LIVE
LIVE;
#endif /* LIVE */
+#endif
}
#ifdef STACKCHECK
}
#ifdef STACKCHECK
@@
-54,17
+56,24
@@
void live_disable(int how)
void stackcheck(void)
{
void stackcheck(void)
{
+volatile static inside=0;
volatile void *func;
volatile int fp_alloc;
asm("movel %%d0,%0" : "=r" (fp_alloc) : /* input */ : "d0");
asm("movel %%sp@,%0" : "=r" (func) : /* input */);
volatile void *func;
volatile int fp_alloc;
asm("movel %%d0,%0" : "=r" (fp_alloc) : /* input */ : "d0");
asm("movel %%sp@,%0" : "=r" (func) : /* input */);
+ if (inside)
+ return;
+ inside++;
+
if (live_check_disable<=0)
printf("mcount(func=0x%08lX,fp_alloc=%d)\n",((long)func)-STACKCHECK_HEADER_PC_OFFSET,-fp_alloc);
#ifdef LIVE_ALLOC
LIVE_ALLOC((-fp_alloc)+4);
#endif /* LIVE_ALLOC */
if (live_check_disable<=0)
printf("mcount(func=0x%08lX,fp_alloc=%d)\n",((long)func)-STACKCHECK_HEADER_PC_OFFSET,-fp_alloc);
#ifdef LIVE_ALLOC
LIVE_ALLOC((-fp_alloc)+4);
#endif /* LIVE_ALLOC */
+
+ inside--;
}
#endif /* STACKCHECK */
}
#endif /* STACKCHECK */