help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to disable the debug slowdown optimizations built with non relea


From: Grisha Levit
Subject: Re: how to disable the debug slowdown optimizations built with non release versions .. ?
Date: Fri, 30 Jun 2023 16:38:31 -0400

On Wed, Aug 17, 2022, 09:30 Chet Ramey <chet.ramey@case.edu> wrote:

> It may not build, since I have been known to keep debugging code enabled in
> pre-release versions where DEBUG is defined by default.
>

How do you feel about adding

diff --git a/error.h b/error.h
index 9a312772..aeda0aef 100644
--- a/error.h
+++ b/error.h
@@ -77,6 +77,7 @@ extern void err_readonly (const char *);
 # define INTERNAL_DEBUG(x) internal_debug x
 #else
 # define INTERNAL_DEBUG(x)
+# define itrace(...)
 #endif

 #endif /* !_ERROR_H_ */


Then you can just leave the itrace calls around and don't even have to `#if
defined(DEBUG)' them

>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]