mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-23 03:29:47 +08:00
Almost, but not quite, deprecate STREQ, STREQN, STRCMP and QUIT.
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
Mon Mar 13 21:21:41 2000 Andrew Cagney <cagney@b1.cygnus.com>
|
||||||
|
|
||||||
|
* defs.h (STREQ, STRCMP, STREQN): Document that these macros are
|
||||||
|
somewhat redundant.
|
||||||
|
(QUIT): Note that this can probably be replaced by a function.
|
||||||
|
|
||||||
2000-03-13 James Ingham <jingham@leda.cygnus.com>
|
2000-03-13 James Ingham <jingham@leda.cygnus.com>
|
||||||
|
|
||||||
Add support for a variable object that tries to evaluate itself in
|
Add support for a variable object that tries to evaluate itself in
|
||||||
@ -21,7 +27,6 @@
|
|||||||
variable is one of these "current frame" variables. Also protect
|
variable is one of these "current frame" variables. Also protect
|
||||||
call to parse_exp_1 from long jumping.
|
call to parse_exp_1 from long jumping.
|
||||||
|
|
||||||
|
|
||||||
2000-03-13 Eli Zaretskii <eliz@is.elta.co.il>
|
2000-03-13 Eli Zaretskii <eliz@is.elta.co.il>
|
||||||
|
|
||||||
* go32-nat.c (struct env387): Remove declaration.
|
* go32-nat.c (struct env387): Remove declaration.
|
||||||
|
26
gdb/defs.h
26
gdb/defs.h
@ -117,8 +117,23 @@ extern int core_addr_greaterthan (CORE_ADDR lhs, CORE_ADDR rhs);
|
|||||||
#define max(a, b) ((a) > (b) ? (a) : (b))
|
#define max(a, b) ((a) > (b) ? (a) : (b))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Gdb does *lots* of string compares. Use macros to speed them up by
|
/* Macros to do string compares.
|
||||||
avoiding function calls if the first characters are not the same. */
|
|
||||||
|
NOTE: cagney/2000-03-14:
|
||||||
|
|
||||||
|
While old code can continue to refer to these macros, new code is
|
||||||
|
probably better off using strcmp() directly vis: ``strcmp() == 0''
|
||||||
|
and ``strcmp() != 0''.
|
||||||
|
|
||||||
|
This is because modern compilers can directly inline strcmp()
|
||||||
|
making the original justification for these macros - avoid function
|
||||||
|
call overhead by pre-testing the first characters
|
||||||
|
(``*X==*Y?...:0'') - redundant.
|
||||||
|
|
||||||
|
``Even if [...] testing the first character does have a modest
|
||||||
|
performance improvement, I'd rather that whenever a performance
|
||||||
|
issue is found that we spend the effort on algorithmic
|
||||||
|
optimizations than micro-optimizing.'' J.T. */
|
||||||
|
|
||||||
#define STRCMP(a,b) (*(a) == *(b) ? strcmp ((a), (b)) : (int)*(a) - (int)*(b))
|
#define STRCMP(a,b) (*(a) == *(b) ? strcmp ((a), (b)) : (int)*(a) - (int)*(b))
|
||||||
#define STREQ(a,b) (*(a) == *(b) ? !strcmp ((a), (b)) : 0)
|
#define STREQ(a,b) (*(a) == *(b) ? !strcmp ((a), (b)) : 0)
|
||||||
@ -153,6 +168,13 @@ extern int sevenbit_strings;
|
|||||||
|
|
||||||
extern void quit (void);
|
extern void quit (void);
|
||||||
|
|
||||||
|
/* FIXME: cagney/2000-03-13: It has been suggested that the peformance
|
||||||
|
benefits of having a ``QUIT'' macro rather than a function are
|
||||||
|
marginal. If the overhead of a QUIT function call is proving
|
||||||
|
significant then its calling frequency should probably be reduced
|
||||||
|
[kingdon]. A profile analyzing the current situtation is
|
||||||
|
needed. */
|
||||||
|
|
||||||
#ifdef QUIT
|
#ifdef QUIT
|
||||||
/* do twice to force compiler warning */
|
/* do twice to force compiler warning */
|
||||||
#define QUIT_FIXME "FIXME"
|
#define QUIT_FIXME "FIXME"
|
||||||
|
Reference in New Issue
Block a user