undefs.
* configure.ac: Use AC_CHECK_MEMBERS to check whether `struct
thread' has a td_pcb member and whether `struct reg' has r_fs and
r_gs members.
* configure, config.in: Regenerate.
and BFD_NEED_DECLARATION. Don't check if a declaration of strdup
is necessary.
* configure, config.in: Regenerate.
* utils.c: Adjust for usage of AC_CHECK_DECLS instead of
BFD_NEED_DECLARATION. Never provide a prototype for
caninicalize_file_name.
* gdb_string.h: Adjust for usage of AC_CHECK_DECLS instead of
BFD_NEED_DECLARATION.
that use that debugging protocol.
Set build_nlm to yes to build NLM stub for Netware targets.
* configure.ac: If build_rdi_share is "yes", then configure the
rdi-share subdirectory.
If build_nlm is "yes", the configure the "nlm" subdirectory.
* configure: Regenerated.
* gdb_curses.h: Include term.h here, prefering ncurses/term.h.
* utils.c: Include gdb_curses.h instead of curses.h and term.h.
* tui/tui.c: Don't include term.h.
* configure, config.in: Rebuilt.
searching for curses library. Check for wborder.
* configure, config.in: Regenerate.
* tui/tui-wingeneral.c (box_win): Use box if wborder isn't
available.
* config/pa/hpux11.mh (MH_CFLAGS): Likewise.
* config/pa/hpux11w.mh (MH_CFLAGS): Likewise.
* configure.in: Improve checks for curses library by checking for
mvwaddstr instead of initscr. Drop HP curses in favour of
standard curses on HP-UX.
* configure: Regenerated.
* configure.in: Let TM_FILE, XM_FILE and NAT_FILE specify a path.
* configure: Re-generate.
* config/arm/nbsd.mt (TM_FILE): Set to "solib.h".
* config/arm/tm-nbsd.h: Delete file.
* config/pa/xm-linux.h: Do not include "floatformat.h".
(HOST_FLOAT_FORMAT, HOST_DOUBLE_FORMAT)
(HOST_LONG_DOUBLE_FORMAT): Delete macros.
* config/i386/xm-i386.h: Do not include "floatformat.h".
(HOST_FLOAT_FORMAT, HOST_DOUBLE_FORMAT)
(HOST_LONG_DOUBLE_FORMAT): Delete macros.
* doublest.c (HOST_FLOAT_FORMAT, HOST_DOUBLE_FORMAT)
(HOST_LONG_DOUBLE_FORMAT): Delete macros. Use
GDB_HOST_FLOAT_FORMAT, GDB_HOST_DOUBLE_FORMAT and
GDB_HOST_LONG_DOUBLE_FORMAT instead.
* configure.in (GDB_HOST_FLOAT_FORMAT, GDB_HOST_DOUBLE_FORMAT)
(GDB_HOST_LONG_DOUBLE_FORMAT): Define.
* configure, config.in: Regenerate.
* configure.host (gdb_host_float_format, gdb_host_double_format)
(gdb_host_long_double_format): Set according to the host.
* configure.in: Always check for curses, including pdcurses.
Warn, instead of error, when no curses are found. Enable TUI when
curses is available.
* configure: Re-generate.
* acconfig.h: Add HAVE_TKILL_SYSCALL definition check.
* config.in: Regenerated.
* configure.in: Add test for syscall function and check for
__NR_tkill macro in <syscall.h> to set HAVE_TKILL_SYSCALL.
* configure: Regenerated.
* lin-lwp.c [HAVE_TKILL_SYSCALL]: Include <unistd.h> and
<sys/syscall.h>.
(kill_lwp): New function that uses tkill syscall or
uses kill, depending on whether threading model is nptl or not.
All callers of kill() changed to use kill_lwp().
(lin_lwp_wait): Make special check when WIFEXITED occurs to
see if all threads have already exited in the nptl model.
(stop_and_resume_callback): New callback function used by the
lin_lwp_wait thread exit handling code.
(stop_wait_callback): Check for threads already having exited and
delete such threads fromt the lwp list when discovered.
(stop_callback): Don't assert retcode of kill call.
Roland McGrath <roland@redhat.com>
* i386-linux-nat.c (ps_get_thread_area): New function needed by
nptl libthread_db.
* configure.in (Makefile): Use the test ${target} != ${host},
instead of the absence of the "nm.h" file, to determine of the
configuration non-native.
* configure: Regenerate.
Check for monstartup and _mcleanup regardless of --enable-profiling.
* maint.c: Check for monstartup and _mcleanup before using them.
* config.in: Regenerated.
* configure: Regenerated.
2003-01-23 Alexander Larsson <alexl@redhat.com>
Jim Blandy <jimb@redhat.com>
Add support for executables whose debug info has been separated
out into a separate file, leaving only a link behind.
* objfiles.h (struct objfile): New fields: separate_debug_objfile
and separate_debug_objfile_backlink.
(put_objfile_before): New declaration.
* symfile.c: #include "filenames.h".
(symbol_file_add_with_addrs_or_offsets): If this objfile has its
debug info in a separate file, read that, too. Save the addrs
argument, so we can use it again to read the separated debug info;
syms_from_objfile modifies the table we pass it.
(reread_symbols): After re-reading an objfile, call
reread_separate_symbols to refresh its separate debug info
objfile, if it has one.
(reread_separate_symbols, find_separate_debug_file,
get_debug_link_info, separate_debug_file_exists): New functions.
(debug_file_directory): New global var.
(_initialize_symfile): Initialize debug_file_directory, and
provide the new `set debug-file-directory' command to let the user
change it.
* objfiles.c (free_objfile): If this objfile has its debug info in
a separate objfile, free that one too. If this is itself a
separate debug info objfile, clear our parent's backlink.
(put_objfile_before): New function.
* utils.c (gnu_debuglink_crc32): New function.
* defs.h (gnu_debuglink_crc32): New declaration.
* Makefile.in (symfile.o): Note dependency on "filenames.h".
* configure.in: Handle --with-separate-debug-dir config option.
* acinclude.m4 (AC_DEFINE_DIR): New macro.
* acconfig.h (DEBUGDIR): New macro.
* configure, aclocal.m4, config.in: Regenerated.
gdb/doc/ChangeLog:
2003-01-23 Jim Blandy <jimb@redhat.com>
* gdb.texinfo (Separate Debug Files): New section.
Jason Molenda <jmolenda@apple.com>.
* Makefile.in (PROFILE_CFLAGS): Substitute from configure.
(INTERNAL_LDFLAGS): Don't include PROFILE_CFLAGS.
* NEWS: Mention profiling.
* configure.in (--enable-gdbtk): Fix typo.
(--enable-profiling): New. Set PROFILE_CFLAGS.
* maint.c (maintenance_set_profile_cmd): Remove NOTYET.
Fill in function.
(profiling_state): New variable.
(mcleanup_wrapper): New function.
(_initialize_maint): Remove NOTYET, fix call to
add_setshow_boolean_cmd for "maint set profile".
* configure: Regenerated.
(config_h): Define.
(osabi.o): Update dependencies.
* configure.tgt: Set gdb_osabi based on target triplet.
* configure.in: Define GDB_OSABI_DEFAULT based on gdb_osabi.
* configure: Regenerated.
* config.in: Regenerated.
* osabi.c: Include "arch-utils.h", "gdbcmd.h", and "command.h".
(GDB_OSABI_DEFAULT): Define if not already defined.
(user_osabi_state, user_selected_osabi, gdb_osabi_available_names)
(set_osabi_string): New variables.
(gdbarch_register_osabi): Add new OS ABI to
gdb_osabi_available_names.
(gdbarch_lookup_osabi): Honor specified and default OS ABIs.
(set_osabi, show_osabi): New functions.
(_initialize_gdb_osabi): Add "set osabi" and "show osabi" commands.
AC_CHECK_FUNCS and remove the old check for pread64.
* acinclude.m4 (AC_GNU_SOURCE): New macro.
* acconfig.h (_GNU_SOURCE): Add.
(HAVE_PREAD64): Remove.
* configure, aclocal.m4, config.in: Regenerated.
directories using the AC_CONFIG_SUBDIRS macro instead. Polish
code providing the --enable-multi-ice option, and move it right in
front of the code that checks whether gdbserver is supported.
Polish that too.
* configure: Regenerated.
* Makefile.in (SUBDIRS): Substitute @subdirs@ instead of
@SUBDIRS@.
--without-included regex option, and move it into the "Checks for
library functions" section. This makes us use the system regex
again by default on systems with version 2 of the GNU C library.
This was apparently broken.
* gdb_regex.h [!USE_INCLUDED_REGEX] (_REGEX_RE_COMP): Define.
* acconfig.h (USE_INCLUDED_REGEX): Remove.
* config.in, configure: Regenerated.
* configure.in: Create "Checks for header files" section, and move
appropriate tests there. Don't check for objlist.h, wchar.h,
wctype.h and asm/debugreg.h. Rewrite Solaris 2.[78] <curses.h>
misdetection fix. Also add "Checks for types", "Checks for
compiler characteristics" and "Checks for library functions"
sections.
* config.in, configure: Regenerated.
the Autoconf manual.
* configure.in: Call AC_HEADER_DIRENT. Remove dirent.h,
sys/ndir.h, sys/dir.h and ndir.h from call to AC_CHECK_HEADERS.
* configure: Regenerated.
before enabling thread support on native AiX.
* configure: Regenerate.
* config/powerpc/aix432.mh (NATDEPFILES): Remove aix-thread.o
from the list of object files as it is now appended by configure
if thread support is enabled.
(NAT_CLIBS): Removed as -lpthdebug is also appended by configure
if thread support is enabled.
canonicalize_file_name Regenerated.
* config.in, configure: Regenerated.
* utils.c: (gdb_realpath) If HAVE_CANONICALIZE_FILE_NAME is
defined use canonicalize_file_name.
* configure.tgt: Configure gdbserver only for known working
targets. Set ${build_gdbserver} instead of modifying ${configdirs}.
* configure.in: Check ${build_gdbserver}. Put gdbserver/ into
SUBDIRS if it is configured. Update comment for ${nativefile}.
* configure: Regenerated.
* config.in: Regenerate.
* configure.in: Update copyright years.
Add test for PT_GETXMMREGS supplied by <sys/ptrace.h>.
* configure: Regenerate.
* i386bsd-nat.c: Update copyright years.
(fill_gregset): Use regcache_collect.
(fetch_inferior_registers): Only fetch integer registers
if requested to do so. Add support for XMM registers
using PT_GETXMMREGS.
(store_inferior_registers): Only store integer registers
if requested to do so. Add support for XMM registers
using PT_SETXMMREGS.
* i386nbsd-nat.c (fetch_inferior_registers): Remove.
(store_inferior_registers): Remove.
(fetch_core_registers): Use supply_gregset and i387_supply_fsave.
(fetch_elfcore_registers): New function.
(i386nbsd_elfcore_fns): New.
(_initialize_i386nbsd_nat): Register i386nbsd_elfcore_fns.
* config/i386/nbsd.mh (NATDEPFILES): Add i387-nat.o and
i386bsd-nat.o.
* config/i386/nbsdelf.mh (NATDEPFILES): Likewise.
* config/i386/nbsd.mt (TDEPFILES): Add i386bsd-nat.o.
* config/i386/nbsdelf.mt (TDEPFILES): Likewise.
* config/i386/tm-nbsd.h: Update copyright years.
(HAVE_SSE_REGS): Define.
(IN_SIGTRAMP): Define as i386bsd_in_sigtramp.
(SIGTRAMP_START): Redefine as i386bsd_sigtramp_start.
(SIGTRAMP_END): Redefine as i386bsd_sigtramp_end.
(SIGCONTEXT_PC_OFFSET): Remove.
(FRAME_SAVED_PC): Define as i386bsd_frame_saved_pc.
* configure.in: Check for realpath.
* defs.h (gdb_realpath): Declare.
* symtab.h (partial_symtab): Added fullname field.
* source.c (openp): Use gdb_realpath.
(forget_cached_source_info): Clear full name of each partial
symtab.
* utils.c (gdb_realpath): New function.
* symtab.c (lookup_symtab): Removed.
(lookup_symtab_1): Renamed to lookup_symtab.
(lookup_symtab): Look for real path.
(lookup_partial_symtab): Likewise.
gratuitious whitespace changes.
[!HAVE_SIGPROCMASK]: Call sigsetmask if HAVE_SIGSETMASK is defined.
* top.c: Remove redundant logic to define HAVE_SIGSETMASK.
(sigsetmask) Don't define macro.
(stop_sig) [HAVE_SIGPROCMASK]: Add bit of code snatched from
async_stop_sig from event-top.c.
[!HAVE_SIGPROCMASK]: Call sigsetmask if HAVE_SIGSETMASK is
defined.
* configure.in (AC_CHECK_FUNCS): Put functions in alphabetical
order. Add sigsetmask.
(AC_FUNC_VFORK, AC_FUNC_ALLOCA): Reorder such that they're in
alphabetical order.
* config/xm-aix4.h, config/alpha/xm-alphalinux.h,
config/i386/xm-cygwin.h, config/rs6000/xm-rs6000.h
(HAVE_SIGSETMASK): Remove.
* aclocal.m4, config.in, configure
give us the absolute path to the source directory.
* configure: Regenerated.
* Makefile.in (GDBTK_SRC_DIR): Add variable so that
autoconf can substitue it in for us.
(gdbtk.o): Pass in GDBTK_SRC_DIR instead of srcdir. We
really do need an absolute pathname.
(AC_FUNC_SETPGRP): Add.
* aclocal.m4, configure, config.in: Regenerated.
* inflow.c (gdb_setpgid): Get rid of NEED_POSIX_SETPGID and
SETPGRP_ARGS. Always use setpgid if it is available, fall back on
setpgrp if it isn't. Use SETPGRP_VOID (defined by autoconf) to
distinguish between the two setpgrp flavours.
* config/xm-sysv4.h, config/arm/xm-linux.h,
config/i386/xm-i386aix.h, config/i386/xm-sco.h,
config/i386/xm-linux.h, config/i386/xm-ptx.h,
config/m68k/xm-linux.h, config/powerpc/xm-linux.h,
config/sparc/xm-linux.h, config/sparc/xm-sun4sol2.h,
config/ia64/xm-linux.h (NEED_POSIX_SETPGID): Remove.
* config/rs6000/xm-rs6000.h (SETPGRP_ARGS): Remove.
* Makefile.in (UIOUT_CFLAGS): New macro. CFLAGS needed for uiout code
to be compiled. Defines UI_OUT.
(SUBDIR_MI_CFLAGS): Defines MI_OUT, not UI_OUT.
(INTERNAL_WARN_CFLAGS): Also include UIOUT_CFLAGS.
* configure.in (UIOUT_CFLAGS): New configuration variable.
(--with-uiout): New configuration option. Causes uiout code to
be compiled, instead of the old *printf one.
* configure: Regenerate.
* top.c (print_gdb_version): Test for and print MI_OUT, not UI_OUT.
* testsuite/lib/mi-support.exp (mi_gdb_start): Test for MI_OUT,
not UI_OUT.
* Makefile.in (CONFIG_LOBS): New macro. Configured to the files
that must be added to the gdblib itself.
(DEPFILES): Use CONFIG_LOBS, not CONFIG_OBS.
(INIT_FILES): Include CONFIG_OBS.
(gdb$(EXEEXT)): Depend on CONFIG_OBS and link with it.
(kdb): Ditto.
* configure.in (CONFIG_LOBS): New variable. Object files that must
be added to gdblib for the specific configuration.
* configure: Regenerate.
* Makefile.in (SUBDIR_GDBTK_OBS, SUBDIR_GDBTK_SRCS,
SUBDIR_GDBTK_DEPS, SUBDIR_GDBTK_INITS, SUBDIR_GDBTK_LDFLAGS,
SUBDIR_GDBTK_CFLAGS): New macros. For gdbtk subdir.
* configure.in: Fix typo. It is CONFIG_OBS not CONFIG_OJS.
Use the SUBDIR_GDBTK_* macros instead of hard coded file names.
* configure: Regenerate.
* configure.in: Fix a couple of typos in the handling of the
enable_gdbcli option. Make it check enableval for the result
of AC_ARG_ENABLE.
* configure: Regenerate.
* cli/cli-decode.c: New file. Handle lists of commands, their decoding
and documentation.
(add_cmd, deprecate_cmd, add_abbrev_cmd, add_alias_cmd, add_prefix_cmd,
add_abbrev_prefix_cmd, not_just_help_class_command, empty_sfunc,
add_set_cmd, add_set_enum_cmd, add_set_auto_boolean_cmd,
add_show_from_set, delete_cmd, apropos_cmd, help_cmd, help_list,
help_all, print_doc_line, help_cmd_list, find_cmd, lookup_cmd_1,
undef_cmd_error, lookup_cmd, deprecated_cmd_warning,
lookup_cmd_composition, complete_on_cmdlist, complete_on_enum):
Moved here from command.c.
(add_info, add_info_alias, add_com, add_com_alias): Moved here from
top.c.
* cli/cli-decode.h: Definitions/declarations for the above.
* cli/cli-cmds.c: New file. GDB CLI commands.
(error_no_arg, info_command, show_command, help_command, show_version,
quit_command, pwd_command, cd_command, echo_command, shell_escape,
make_command, show_user, set_debug, show_debug, init_cmd_lists):
Moved here from top.c.
(apropos_command): Moved here from command.c.
(complete_command, source_command): Moved here (part) from top.c.
(is_complete_command): New function. Checks if a command is the
"complete" command.
(init_cli_cmds): New function. Add commands to the CLI (from code
previously in top.c.
* cli/cli-cmds.h: Definitions/declarations for the above.
* cli/cli-script.c: New file. GDB CLI command scripting.
(build_command_line, get_command_line, print_command_lines,
print_command_line, execute_user_command, execute_control_command,
while_command, if_command, arg_cleanup, setup_user_args, locate_arg,
insert_args, realloc_body_list, read_next_line,
recurse_read_control_structure, read_command_lines, free_command_lines,
do_free_command_lines_cleanup, make_cleanup_free_command_lines,
validate_comname, user_defined_command, define_command,
document_command, source_cleanup_lines, do_fclose_cleanup,
show_user_1): Moved here from top.c.
(script_from_file): New function. Implements execution of a script
contained in a file (part of code for the source_command() that used
to exist in top.c).
* cli/cli-script.h: Definitions/declarations for the above.
* cli/cli-setshow.c: New file. Handle set and show GDB CLI commands.
(parse_auto_binary_operation, parse_binary_operation,
do_setshow_command, cmd_show_list): Moved here from command.c.
* cli/cli-setshow.h: Definitions/declarations for the above.
* top.c: Remove all CLI code, except the command loop.
(gdb_init): Call init_cli_cmds().
* command.c: Remove obsolete file.
* command.h: Mark as DEPRECATED.
* gdbcmd.h: Ditto.
* call-cmds.h: Ditto.
* Makefile.in (SFILES): Remove command.c.
(COMMON_OBS): Remove command.o.
(command.o): Remove obsolete target.
(cli_decode_h, cli_cmds_h, cli_script_h, cli_setshow_h): New macros.
Refer to CLI header files.
(cli-decode.o, cli-cmds.o, cli-setshow.o, cli-script.o): New targets.
(SUBDIR_CLI_OBS, SUBDIR_CLI_SRCS, SUBDIR_CLI_DEPS, SUBDIR_CLI_INITS,
SUBDIR_CLI_LDFLAGS, SUBDIR_CLI_CFLAGS, SUBDIR_CLI_ALL, SUBDIR_CLI_CLEAN,
SUBDIR_CLI_INSTALL, SUBDIR_CLI_UNINSTALL): New macros for new cli
subdirectory.
* configure.in (enable_gdbcli): New option. Include the CLI in the
executable (cannot be disabled yet).
(CONFIG_OBS, CONFIG_DEPS, CONFIG_SRCS, CONFIG_INITS, ENABLE_CFLAGS,
CONFIG_ALL, CONFIG_CLEAN, CONFIG_INSTALL, CONFIG_UNINSTALL): Add
the corresponding SUBDIR_CLI_* macros if CLI requested.
* configure: Regenerate.
* i386-linux-nat.c: Various doc fixes. Include "i387-nat.h".
(GETFPXREGS_SUPPLIES): Renamed from GETXFPREGS_SUPPLIES.
(have_ptrace_getfpxregs): Renamed from have_ptrace_getxfpregs.
(convert_to_gregset): Removed. Moved logic to ...
(fill_gregset): ... here. Simplified function.
(fetch_regs): Use perror_with_name for error reporting.
(store_regs): Add `regno' parameter. Use perror_with_name for
error reporting. Call fill_gregset instead of convert_to_gregset.
(FPREG_ADDR): Remove.
(supply_fpregset): Implement by calling i387_supply_fsave.
(convert_to_fpregset): Remove.
(fill_fpregset): Implement by calling i387_fill_fsave.
(fetch_fpregs): Use perror_with_name fro error reporting.
(store_fpregs) Add `regno' parameter. Use perror_with_name fro
error reporting. Call fill_fpregset instead of
convert_to_fpregset.
(supply_xfpregset, convert_to_xfpregset): Removed.
(supply_fpxregset, fill_fpxregset): New functions.
(fetch_fpxregs): Renamed from fetch_xfpregs. Use perror_with_name
for error reporting. Call supply_fpxregset instead of
supply_xfpregset.
(store_xfpregs): Removed.
(store_fpxregs): New function.
(fetch_inferior_registers): Adjust for xfp -> fpx change. Tweak
message in call to internal_error.
(store_inferior_registers): Adjust for xfp ->fpx change. Pass
REGNO to store_regs, store_fpregs and store_fpxregs.
(fetch_core_registers): Adjust for xfp -> fpx change.
* acconfig.h (HAVE_PTRACE_GETFPXREGS): Renamed from
HAVE_PTRACE_GETXFPREGS.
* config.in: Regenerated.
* configure.in: Replace check for PTRACE_GETXFPREGS with check for
PTRACE_GETFPXREGS. Remove comment about Cygnus SSE extensions.
* configure: Regenerated.
* config/i386/linux.mh (NATDEPFILES): Add i387-nat.o.
* config/i386/tm-linux.h: Base definition of HAVE_SSE_REGS on
HAVE_PTRACE_GETFPXREGS instead of HAVE_PTRACE_GETXFPREGS.