* 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.
* valops.c (value_cast): Indentation fix-up.
* acconfig.h (HAVE_PRGREGSET32_T, HAVE_PRFPREGSET32_T,
HAVE_STRUCT_LINK_MAP32): New configure macros.
* config.in: Ditto.
* configure.in: Test for the above new macros.
* breakpoint.c: Update copyright date.
* core-sol2.c: Include v9/sys/privregs.h directly to
work around a bug in Sun's Solaris 8 header files.
(fetch_core_registers): Use the above new configure macros to
handle cross-debugging of 32-bit core files on a 64-bit host.
* sol-thread.c (ps_pdmodel) New function.
(rw_common): For debugging of 32-bit apps on a 64-bit host,
truncate addresses to 32 bits.
* solib.c (solib_extract_address): Functionize. Make 32/64 aware.
(LM_ADDR, LM_NEXT, LM_NAME): Ditto.
(IGNORE_FIRST_LINK_MAP): Ditto.
(first_link_map_member): Make 32/64 aware.
(open_symbol_file_object): Ditto.
(current_sos): Ditto.
* 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.
(handle_load_dll): Change DLL name to lower case.
(handle_exception): Add a second argument indicating whether a breakpoint
should be ignored. Return a 0 if the breakpoint was ignored.
(get_child_debug_event): Pass argument to handle_exception to control whether a
breakpoint should be ignored.
(child_create_inferior): Use modern cygwin API. Explicitly clear last_sig.
Pass FIRST_EXCEPTION to get_child_debug_event for detection of first
breakpoint.
* configure.in: Eliminate unneeded WINDRES/DLLTOOL tests left over after last change.
* configure: Regenerate.
* acconfig.h (HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T, HAVE_LWPID_T,
HAVE_PSADDR_T): Add them here instead of in config.in.
* acconfig.h (PRFPREGSET_T_BROKEN): New define.
* configure.in: Add check for broken prfpregset_t type.
* lin-thread.c (gdb_prfpregset): New typedef, depends on
definition of PRFPREGSET_T_BROKEN.
(ps_lgetfpregs, ps_lsetfpregs, p_td_thr_getfpregs,
p_td_thr_setfpregs, thread_db_fetch_registers,
thread_db_store_registers): Use gdb_prfpregset_t instead of
prfpregset_t.
* config.in: Regenerated.
* configure: Regenerated.
(NEW_PROC_API): Define on Solaris 7 and 8 as well as 6.
* acconfig.h (_MSE_INT_H): Define on Solaris 7.
* configure: Regenerate.
* config.in: Regenerate.
Allow GDB to run on Linux 2.0 again.
* config.in: Add HAVE_PTRACE_GETREGS.
* configure.in: Check if <sys/ptrace.h> defines PTRACE_GETREGS.
* configure: Regenerated.
* config/i386/nm-linux.h (CANNOT_FETCH_REGISTER,
CANNOT_STORE_REGISTER): New defines.
* i386-linux-nat.c (have_ptrace_getregs): New variable.
(PTRACE_XFER_TYPE, CANNOT_FETCH_REGISTER, fetch_register,
old_fetch_inferior_registers, CANNOT_STORE_REGISTER,
store_register, old_store_inferior_registers): Copied over from
`inptrace.c' as a temporary measure.
(fetch_regs, store_regs, fetch_fpregs, store_fpregs):
Conditionalize on HAVE_PTRACE_GETREGS. Define stubs if
HAVE_PTRACE_GETREGS isn't defined.
(fetch_regs): Reset `have_ptrace_getregs' if ptrace call fails
with EIO.
(fetch_inferior_registers, store_inferior_registers): Fall back on
the method use in `infptrace.c' (by calling
old_fetch_inferior_registers and old_store_inferior_registers) if
`have_ptrace_getregs' isn't set.
Make cross-compilation for the Hurd more friendly.
From Jeff Bailey <jbailey@gnu.org>:
* configure.in: Use AC_CHECK_TOOL to find MiG.
* Makefile.in (MIG): New variable.
* config/i386/i386gnu.mh (MIG): Remove.
* configure: Regenerated.
* configure.in: Check for lwpid_t, psaddr_t, prgregset_t and
prfpregset_t in <sys/procfs.h>.
* config.in: Add HAVE_LWPID_T, HAVE_PSADDR_T, HAVE_PRGREGSET_T,
HAVE_PRFPREGSET_T.
* gdb_proc_service.h: Only provide typedefs for lwpid_t, psaddr_t,
prgregset_t and prfpregset_t if they are not already present.
* configure.in: Remove the addition of sol-thread.c to the
CONFIG_INITS list. This caused problems with init.c, because
sol-thread.c would be grepped twice for _initialize_* functions.
* configure: Ditto.
* Makefile.in: Add FIXME for init.c.
* gnu-regex.c: Check ENABLE_NLS instead of HAVE_LIBINTL_H.
* configure.in: Don't check for libintl.h.
* configure, config.in: Regenerated.
Fixes a problem on debian systems, a conflict between the
/usr/include/libintl.h and the routines that are actually linked in,
up in ../intl.
* Makefile.in: Add GDBTK_CFLAGS - this is now used to hold
-fwritable-strings when compiling with Tk8.1.
* configure.in: Add GDBTK_CFLAGS, set it to -fwritable-strings for
Tcl/Tk8.1 & greater.
* acinclude.m4: Move the rest of the defines to find Itcl, Itk &
Tix from aclocal.m4 to here.
* aclocal.m4: regenerate.
* configure: regenerate.
* gdbtk-hooks.c (x_event): Tcl_ObjGetVar2 was removed from
Tcl8.1. Use Tcl_GetVar2 instead.
* gdbtk-hooks.c (gdbtk_trace_find): Fix up call to
Tcl_GlobalEvalObj for Tcl/Tk 8.1.
* gdbtk-hooks.c (gdbtk_trace_start_stop): Call to Tcl_EvalObj was
inefficient, replace with call to Tcl_GlobalEval.
* gdbtk.c: Don't swap out the Tcl_Alloc calls in gdbtk.c. We took
care of that in Tcl itself for 8.1.
* gdbtk.c: Remove const from the script string since Tcl8.1 has
taken to scribbling sentinals into strings passed to it again...
* gdbtk-cmds.c (wrapped_call): Change declaration of 1st arg from
char * to PTR to eliminate warning.
* gdbtk-cmds.c (perror_with_name_wrapper): Ditto
at run-time. At the moment, the only thing this affects is the
set of registers visible.
* config/rs6000/tm-rs6000.h (REGISTER_NAME): Define this as a call
to the function rs6000_register_name.
(rs6000_register_name): Include extern decl.
(NUM_REGS): Bump to 183. What's the right way to do this?
(FIRST_UISA_SP_REGNUM, LAST_UISA_SP_REGNUM): Renamed from
FIRST_SP_REGNUM, LAST_SP_REGNUM.
(REGISTER_BYTES): Recompute this.
* rs6000-tdep.c: Renamed all uses of FIRST_SP_REGNUM and
LAST_SP_REGNUM to FIRST_UISA_SP_REGNUM and LAST_UISA_SP_REGNUM, with
some concomitant formatting changes.
#include "gdbcmd.h", so we can define commands here.
(struct variant): New structure.
(COMMON_UISA_REG_NAMES, PPC_UISA_SPR_NAMES, PPC_SEGMENT_REG_NAMES,
PPC_32_OEA_SPR_NAMES, num_registers): New macros.
(register_names_rs6000, register_names_uisa, register_names_403,
register_names_403GC, register_names_505, register_names_860,
register_names_601, register_names_602, register_names_603,
register_names_604, register_names_750, variants): New variables.
(rs6000_register_name, install_variant, find_variant_by_name,
install_variant_by_name, list_variants, show_current_variant,
set_processor, show_processor): New functions.
(_initialize_rs6000_tdep): Define new commands `set processor' and
`show processor', and call install_variant_by_name to set the
default variant.
* rs6000-nat.c: Renamed all uses of FIRST_SP_REGNUM and
LAST_SP_REGNUM to FIRST_UISA_SP_REGNUM and LAST_UISA_SP_REGNUM, with
some concomitant formatting changes.
* configure.in: Accept the `--with-cpu' flag, to specify a default
processor variant.
* acconfig.h: Provide a blurb for TARGET_CPU_DEFAULT, which is set
by configure's `--with-cpu' flag.
* config.in, configure: Regenerated.