Macros in config files.

Pierre Muller
2009-05-14T15:32:26Z

Concerning the macros defined in config directory,
this patch changes the counts:

Before patch:
27 macros for a total of 57 occurrences
After the patch:
21 macros for a total of 26 occurrences.

This is the list of remaining defines in config files:

nm CODESET
nm ADD_SHARED_SYMBOL_FILES
nm CANNOT_STEP_HW_WATCHPOINTS
nm DEPRECATED_IBM6000_TARGET
nm FILL_FPXREGSET
nm GDB_FPREGSET_T
nm GDB_GREGSET_T
nm GET_THREAD_SIGNALS
nm PC_SOLIB
nm PROCFS_DONT_TRACE_FAULTS
nm PROCFS_NEED_CLEAR_CURSIG_FOR_KILL
nm REALTIME_HI
nm REALTIME_LO
nm SOLIB_ADD
nm SOLIB_CREATE_INFERIOR_HOOK
nm START_INFERIOR_TRAPS_EXPECTED
nm TARGET_HAS_HARDWARE_WATCHPOINTS
nm THREAD_STATE_CLEAR_TRACED
nm THREAD_STATE_FLAVOR
nm THREAD_STATE_SET_TRACED
nm THREAD_STATE_SIZE

I will try to narrow this list down further.
Anyone else interested?

Pierre Muller

Here is a list of all occurrences of these macros
(Chang* file pattern excluded)

>>>>>>>>>>>>>>>>>>
Macro CODESET
charset.c:819: auto_host_charset_name = nl_langinfo (CODESET);
config/djgpp/config.sed:28:# We have an emulation of nl_langinfo in
go32-nat.c that supports CODESET.
config/djgpp/langinfo.h:26: CODESET,
config/djgpp/langinfo.h:31:#define CODESET CODESET
config.in:192:/* Define if you have <langinfo.h> and nl_langinfo(CODESET).
*/
configure:15975: echo "$as_me:$LINENO: checking for nl_langinfo and
CODESET" >&5
configure:15976:echo $ECHO_N "checking for nl_langinfo and CODESET...
$ECHO_C" >&6
configure:15990:char* cs = nl_langinfo(CODESET);
go32-nat.c:1026: case CODESET:
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
Macro ADD_SHARED_SYMBOL_FILES
config/i386/nm-cygwin.h:19:#define ADD_SHARED_SYMBOL_FILES
dll_symbol_command
config/i386/nm-cygwin64.h:18:#define ADD_SHARED_SYMBOL_FILES
dll_symbol_command
symfile.c:2240:#ifdef ADD_SHARED_SYMBOL_FILES
symfile.c:2241: ADD_SHARED_SYMBOL_FILES (args, from_tty);
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
Macro CANNOT_STEP_HW_WATCHPOINTS
config/i386/nm-i386sol2.h:31:#define CANNOT_STEP_HW_WATCHPOINTS
doc/gdbint.texinfo:789:@findex CANNOT_STEP_HW_WATCHPOINTS
doc/gdbint.texinfo:790:@item CANNOT_STEP_HW_WATCHPOINTS
infrun.c:178:#ifndef CANNOT_STEP_HW_WATCHPOINTS
infrun.c:179:#define CANNOT_STEP_HW_WATCHPOINTS 0
infrun.c:181:#undef CANNOT_STEP_HW_WATCHPOINTS
infrun.c:182:#define CANNOT_STEP_HW_WATCHPOINTS 1
infrun.c:1015: if (CANNOT_STEP_HW_WATCHPOINTS && step)
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
Macro DEPRECATED_IBM6000_TARGET
config/rs6000/nm-rs6000.h:50:#define DEPRECATED_IBM6000_TARGET
doc/gdbint.texinfo:4696:@item DEPRECATED_IBM6000_TARGET
doc/gdbint.texinfo:4697:@findex DEPRECATED_IBM6000_TARGET
exec.c:243:#ifdef DEPRECATED_IBM6000_TARGET
exec.c:255:#endif /* DEPRECATED_IBM6000_TARGET */
symfile.c:2267:#ifdef DEPRECATED_IBM6000_TARGET
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
Macro FILL_FPXREGSET
config/i386/nm-linux.h:29:#define FILL_FPXREGSET
gregset.h:59:#ifdef FILL_FPXREGSET
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
Macro GDB_FPREGSET_T
config/nm-linux.h:30:#define GDB_FPREGSET_T elf_fpregset_t
config/sparc/nm-sol2.h:24:#define GDB_FPREGSET_T prfpregset_t
gregset.h:26:#ifndef GDB_FPREGSET_T
gregset.h:27:#define GDB_FPREGSET_T fpregset_t
gregset.h:31:typedef GDB_FPREGSET_T gdb_fpregset_t;
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
Macro GDB_GREGSET_T
config/nm-linux.h:29:#define GDB_GREGSET_T elf_gregset_t
config/sparc/nm-sol2.h:23:#define GDB_GREGSET_T prgregset_t
gregset.h:22:#ifndef GDB_GREGSET_T
gregset.h:23:#define GDB_GREGSET_T gregset_t
gregset.h:30:typedef GDB_GREGSET_T gdb_gregset_t;
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
Macro GET_THREAD_SIGNALS
config/nm-linux.h:24:#define GET_THREAD_SIGNALS(mask)
lin_thread_get_thread_signals (mask)
linux-thread-db.c:563:#ifdef GET_THREAD_SIGNALS
linux-thread-db.c:569: GET_THREAD_SIGNALS (&mask);
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
Macro PC_SOLIB
breakpoint.c:4587:#ifdef PC_SOLIB
breakpoint.c:4588: && PC_SOLIB (loc->address)
config/rs6000/nm-rs6000.h:46:#define PC_SOLIB(PC)
xcoff_solib_address(PC)
gdbtk/generic/gdbtk-cmds.c:2220:#ifdef PC_SOLIB
gdbtk/generic/gdbtk-cmds.c:2222: Tcl_NewStringObj
(PC_SOLIB (pc), -1));
gdbtk/generic/gdbtk-stack.c:589:#ifdef PC_SOLIB
gdbtk/generic/gdbtk-stack.c:592: char *lib = PC_SOLIB (get_frame_pc
(fi));
stack.c:812:#ifdef PC_SOLIB
stack.c:813: char *lib = PC_SOLIB (get_frame_pc (frame));
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
Macro PROCFS_DONT_TRACE_FAULTS
config/alpha/nm-osf3.h:31:#define PROCFS_DONT_TRACE_FAULTS
procfs.c:3482:#ifdef PROCFS_DONT_TRACE_FAULTS
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
Macro PROCFS_NEED_CLEAR_CURSIG_FOR_KILL
config/alpha/nm-osf3.h:34:#define PROCFS_NEED_CLEAR_CURSIG_FOR_KILL
procfs.c:4711:#ifdef PROCFS_NEED_CLEAR_CURSIG_FOR_KILL
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
Macro REALTIME_HI
common/signals.c:44:# define REALTIME_HI (__SIGRTMAX + 1)
common/signals.c:47:# define REALTIME_HI (SIGRTMAX + 1)
common/signals.c:497: if (hostsig >= REALTIME_LO && hostsig < REALTIME_HI)
common/signals.c:777: if (retsig >= REALTIME_LO && retsig <
REALTIME_HI)
config/nm-nto.h:27:#define REALTIME_HI 56
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
Macro REALTIME_LO
common/signals.c:41:#ifndef REALTIME_LO
common/signals.c:43:# define REALTIME_LO __SIGRTMIN
common/signals.c:46:# define REALTIME_LO SIGRTMIN
common/signals.c:496:#if defined (REALTIME_LO)
common/signals.c:497: if (hostsig >= REALTIME_LO && hostsig < REALTIME_HI)
common/signals.c:753:#if defined (REALTIME_LO)
common/signals.c:777: if (retsig >= REALTIME_LO && retsig <
REALTIME_HI)
config/nm-nto.h:26:#define REALTIME_LO 41
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
Macro SOLIB_ADD
breakpoint.c:7710: over a dlopen call and SOLIB_ADD is resetting the
breakpoints.
config/rs6000/nm-rs6000.h:32:#define SOLIB_ADD(a, b, c, d) \
doc/gdbint.texinfo:5445:@item SOLIB_ADD (@var{filename}, @var{from_tty},
@var{targ}, @var{readsyms})
doc/gdbint.texinfo:5446:@findex SOLIB_ADD
infcmd.c:406:#ifdef SOLIB_ADD
infcmd.c:407: SOLIB_ADD (NULL, from_tty, target, auto_solib_add);
infrun.c:2319: exec_ops to SOLIB_ADD. This is because current GDB is
infrun.c:2327:#ifdef SOLIB_ADD
infrun.c:2328: SOLIB_ADD (NULL, 0, &current_target, auto_solib_add);
infrun.c:3282: exec_ops to SOLIB_ADD. This is because current GDB is
infrun.c:3290:#ifdef SOLIB_ADD
infrun.c:3291: SOLIB_ADD (NULL, 0, &current_target, auto_solib_add);
infrun.c:3371:#if defined(SOLIB_ADD)
solib-frv.c:442: SOLIB_ADD. SOLIB_ADD eventually calls this this
function,
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
Macro SOLIB_CREATE_INFERIOR_HOOK
config/rs6000/nm-rs6000.h:24:#define SOLIB_CREATE_INFERIOR_HOOK(PID) \
doc/gdbint.texinfo:5452:@item SOLIB_CREATE_INFERIOR_HOOK
doc/gdbint.texinfo:5453:@findex SOLIB_CREATE_INFERIOR_HOOK
infcmd.c:417:#ifdef SOLIB_CREATE_INFERIOR_HOOK
infcmd.c:418: SOLIB_CREATE_INFERIOR_HOOK (PIDGET (inferior_ptid));
infrun.c:401:#ifdef SOLIB_CREATE_INFERIOR_HOOK
infrun.c:402: SOLIB_CREATE_INFERIOR_HOOK (PIDGET (inferior_ptid));
solib-frv.c:440: by SOLIB_CREATE_INFERIOR_HOOK(), however, in the case
of core
solib-frv.c:444: SOLIB_CREATE_INFERIOR_HOOK(). (See
post_create_inferior() in
solib-frv.c:952: SOLIB_CREATE_INFERIOR_HOOK.
solib-irix.c:385: SOLIB_CREATE_INFERIOR_HOOK.
solib-sunos.c:701: SOLIB_CREATE_INFERIOR_HOOK.
solib-svr4.c:1539: SOLIB_CREATE_INFERIOR_HOOK.
solib.c:943: SOLIB_CREATE_INFERIOR_HOOK. */
solib.c:1037:#ifdef SOLIB_CREATE_INFERIOR_HOOK
solib.c:1038: SOLIB_CREATE_INFERIOR_HOOK (PIDGET (inferior_ptid));
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
Macro START_INFERIOR_TRAPS_EXPECTED
config/alpha/nm-osf3.h:22:#define START_INFERIOR_TRAPS_EXPECTED 3
darwin-nat.c:923: startup_inferior (START_INFERIOR_TRAPS_EXPECTED);
doc/gdbint.texinfo:5457:@item START_INFERIOR_TRAPS_EXPECTED
doc/gdbint.texinfo:5458:@findex START_INFERIOR_TRAPS_EXPECTED
inf-ptrace.c:160: /* START_INFERIOR_TRAPS_EXPECTED is defined in
inferior.h, and will
inf-ptrace.c:163: startup_inferior (START_INFERIOR_TRAPS_EXPECTED);
inf-ttrace.c:656: /* START_INFERIOR_TRAPS_EXPECTED is defined in
inferior.h, and will
inf-ttrace.c:659: startup_inferior (START_INFERIOR_TRAPS_EXPECTED);
inferior.h:383: START_INFERIOR_TRAPS_EXPECTED in tm.h. */
inferior.h:385:#if !defined(START_INFERIOR_TRAPS_EXPECTED)
inferior.h:386:#define START_INFERIOR_TRAPS_EXPECTED 2
procfs.c:4900: startup_inferior (START_INFERIOR_TRAPS_EXPECTED);
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
Macro TARGET_HAS_HARDWARE_WATCHPOINTS
config/i386/nm-i386sol2.h:21:#define TARGET_HAS_HARDWARE_WATCHPOINTS
config/mips/nm-irix5.h:21:#define TARGET_HAS_HARDWARE_WATCHPOINTS
config/sparc/nm-sol2.h:31:#define TARGET_HAS_HARDWARE_WATCHPOINTS
doc/gdbint.texinfo:697:@findex TARGET_HAS_HARDWARE_WATCHPOINTS
doc/gdbint.texinfo:698:@item TARGET_HAS_HARDWARE_WATCHPOINTS
doc/gdbint.texinfo:5000:@item TARGET_HAS_HARDWARE_WATCHPOINTS
procfs.c:2905:#if !defined (TARGET_HAS_HARDWARE_WATCHPOINTS)
procfs.c:5297:#ifndef TARGET_HAS_HARDWARE_WATCHPOINTS
procfs.c:6020:#ifdef TARGET_HAS_HARDWARE_WATCHPOINTS
remote.17to18.diff:400:< #ifdef TARGET_HAS_HARDWARE_WATCHPOINTS
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
Macro THREAD_STATE_CLEAR_TRACED
config/i386/nm-i386gnu.h:35:#define THREAD_STATE_CLEAR_TRACED(state) \
gnu-nat.c:530: THREAD_STATE_CLEAR_TRACED (state);
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
Macro THREAD_STATE_FLAVOR
config/i386/nm-i386gnu.h:31:#define THREAD_STATE_FLAVOR
i386_REGS_SEGS_STATE
gnu-nat.c:271: err = thread_set_state (proc->port, THREAD_STATE_FLAVOR,
gnu-nat.c:377: thread_get_state (proc->port, THREAD_STATE_FLAVOR,
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
Macro THREAD_STATE_SET_TRACED
config/i386/nm-i386gnu.h:33:#define THREAD_STATE_SET_TRACED(state) \
gnu-nat.c:527: THREAD_STATE_SET_TRACED (state);
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
Macro THREAD_STATE_SIZE
config/i386/nm-i386gnu.h:32:#define THREAD_STATE_SIZE
i386_THREAD_STATE_COUNT
gnu-nat.c:272: (thread_state_t) &proc->state,
THREAD_STATE_SIZE);
gnu-nat.c:375: mach_msg_type_number_t state_size = THREAD_STATE_SIZE;
>>>>>>>>>>>>>>>>>>