* 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.
* utils.c: <readline/readline.h> instead of "readline/readline.h".
* configure.in (TERM_LIB): Search for the appropriate term library
on the host system.
* configure: Regenerated.
* Makefile.in (TERMCAP): Set based on autoconf check.
* config/*/*.mh: Don't override TERMCAP setting.
* configure.in (with-sim-gpu2): Do not emit a -L argument without
an associated pathname. Link in the math library after the gpu2
library.
Assumes that libm is around (and doesn't take advantage of the
AC_CHECK_LIB(m) that is already in configure.in), but this is a
minor point and unlikely to cause problems.
Changes to account for name change from cygwin32 to cygwin and
clean up Win32-related ifdefs.
* configure.tgt: check for cygwin* instead of cygwin32.
New cygwin gdb_target variable loses the "32".
* configure.host: check for cygwin* instead of cygwin32.
New cygwin gdb_host variable loses the "32".
* configure.in: test __CYGWIN__ instead of __CYGWIN32__,
rename gdb_cv_os_cygwin32 variable to drop the "32". Call
AM_EXEEXT instead of AC_EXEEXT since that isn't in a released
autoconf yet.
* configure: regenerate.
* main.c: drop "32" from cygwin_ funcs, include sys/cygwin.h
where
cygwin path conv protos live, instead of adding a proto here
for
them here.
* {main.c, ser-tcp.c, ser-unix.c, top.c}: check __CYGWIN__
instead of __CYGWIN32__.
* source.c: thoughout, check _WIN32 instead of WIN32.
* config/i386/cygwin32.mh: delete.
* config/i386/cygwin.mh: new file, was cygwin32.mh.
* config/i386/cygwin32.mt: delete.
* config/i386/cygwin.mt: new file, was cygwin32.mt.
* config/i386/tm-cygwin32.h: delete.
* config/i386/tm-cygwin.h: new file, was tm-cygwin32.h.
* config/i386/xm-cygwin32.h: delete.
* config/i386/xm-cygwin.h: new file, was xm-cygwin32.h.
* config/i386/xm-windows.h: #include xm-cygwin.h now.
* config/powerpc/cygwin32.mh: delete.
* config/powerpc/cygwin.mh: new file, was cygwin32.mh.
* config/powerpc/cygwin32.mt: delete.
* config/powerpc/cygwin.mt: new file, was cygwin32.mt.
* config/powerpc/tm-cygwin32.h: delete.
* config/powerpc/tm-cygwin.h: new file, was tm-cygwin32.h.
* config/powerpc/xm-cygwin32.h: delete.
* config/powerpc/xm-cygwin.h: new file, was xm-cygwin32.h.
* rdi-share/aclocal.m4: regenerate with aclocal.
* rdi-share/configure: regenerate with autoconf.
* rdi-share/{host.h, hostchan.c, hostchan.h, serdrv.c,
* serpardr.c,
unixcomm.c}: check __CYGWIN__ instead of __CYGWIN32__.
* patch approved by shebs
Wed Oct 28 12:33:52 EST 1998 Frank Ch. Eigler <fche@cygnus.com>
* configure.in: Accept both -skyb- and -sky- for
--with-sim-funit/gpu2 options.
* configure: Rebuilt.
* configure.in (AM_EXEEXT): Use AC_EXEEXT instead.
* configure: Regenerated.
Geoff just removed the AM_EXEEXT definition from ../binutils/aclocal.m4
so we would have been hosed in the near future.
* defs.h: Move _initialize_printcmd, _initialize_stack,
_initialize_blockframe out of here and in to their respective .c files.
* blockframe.c: Move _initialize_blockframe prototype to here.
* printcmd.c: Move _initialize_printcmd prototype to here.
* stack.c: Move _initialize_stack prototype to here.
* source.c, symtab.h: Move _initialize_source prototype to the .c file.
* values.c, value.h: Move _initialize_values prototype to the .c file.
* gdbthread.h, thread.c: Move _initialize_thread prototype to the .c
file.
* breakpoint.c, breakpoint.h: Move _initialize_breakpoint prototype
to the .c file.
* abug-rom.c alpha-nat.c alpha-tdep.c annotate.c ax-gdb.c bcache.c:
Standardize comments for the prototype section of these files.
* configure.in: Look in libc for wctype before looking for it in libc.
The last one is to fix the GNU ld (~2.9.1) + Solaris 2.6 interaction problem
where an empty stub library (libw) causes a core dump when we call vasprintf
(e.g. `info br') in the final linked gdb.
version didn't work for sol2.6; pushed it to autoconf.
* configure.in (gdb_cv_proc_service_is_old): new test.
* acconfig.h (PROC_SERVICE_IS_OLD): new define.
* configure, config.in: regenerate.
* configure.in: Check for sys/debugreg.h, asm/debugreg.h.
* i386v-nat.c: Include asm/debugreg.h, sys/debugreg.h if it is not
present.
This is to work around a conflict where the Linux 2.1.x kernel and glibc
2.0.x are not in sync; including <sys/debugreg.h> will result in an error.
With luck, these losers will get their act together and we can trash
this hack in the near future.
* configure.in: Add --enable-warnings.
Adjust whitespace of other --with and --enable options so that
configure --help lines up correctly.
* aclocal.m4: Ditto.
* Makefile.in (WARN_CFLAGS): Add. Set by configure.
* configure: Regenerated.
* configure.in: Add more header files to AC_CHECK_HEADERS.
* configure: Regenerated.
* command.c: Include wait.h or sys/wait.h if present.
* inftarg.c: Ditto.
* core-aout.c: Include ptrace.h or sys/ptrace.h if present, based
on autoconf test.
* infptrace.c: Ditto.
* expprint.c: Include ctype.h for isprint prototype.
* i386aix-nat.c: Include sys/reg.h if autoconf says it is present.
* i386v-nat.c: Include ptrace.h, sys/ptrace.h, and sys/reg.h if
present, based on autoconf test.
* utils.c: Include curses.h and term.h if present.
(puts_debug): Change 'carriage_return' local variable to return_p
to avoid name clash.
* config/m68k/nm-apollo68b.h: Don't define PTRACE_IN_WRONG_PLACE,
determine it with autoconf.
* config/i386/nm-linux.h: Don't define NO_SYS_REG_H, determine it
with autoconf.
* config/i386/nm-i386sco.h: Don't define NO_PTRACE_H, determine it
with autoconf.
* config/i386/nm-i386v.h: Ditto.
* config/i386/nm-symmetry.h: Ditto.
* config/m88k/xm-cxux.h: Ditto.
* config/m88k/xm-dgux.h: Ditto.
* config/m68k/delta68.mh (NAT_FILE): nm-delta68.h no longer necessary.
* config/m68k/nm-delta68.h: Removed.
* Moved gdbtk_hooks.c & gdbtk_cmds.c to gdbtk-hooks.c &
gdbtk-cmds.c to comply with the gdb conventions. Changed the
configure & makefile to reflect the change...
* main.tcl (gdbtk_preloop): Call gdbtk_idle on spec. If there was an
error in loading an executible specified on the command line,
then the pre_add_symbol hook would have called gdbtk_busy but
the corresponding call to gdbtk_idle would not have occured.
Also changed some catch calls so they didn't use
"catch {set foo [real_command]}"
but rather the more efficient:
"catch {real_command} foo"
* register.tcl: more catch cleanups
* src.tcl: more catch cleanups
* stack.tcl: more catch cleanups
* target.tcl: more catch cleanups
* tdump.tcl: more catch cleanups
* variables.tcl: more catch cleanups
* watch.tcl: more catch cleanups
* gdbtk.c (gdbtk_init): Fixed a bug in the startup code on Windows
that caused gdbtk not to find the share directory unless
GDBTK_LIBRARY was set.
* gdbtk.c: removed all the commands and hooks from this file so
now it contains only the startup code.
* gdbtk_cmds.c: New file - this contains all the Tcl commands that
gdb defines. All the old commands were moved here, the
string-based commands were converted to object commands, and the
object-based commands were all converted to uniformly use the
call_wrapper. A new function, Gdbtk_Init was added to centralize
initializing the gdb package. Also added gdbtk as a package
into gdbtk_interp.
* gdbtk_hooks.c: New file - All the hooks were moved here, and a new
function, gdbtk_add_hooks was added to centralize adding all these
hook functions. gdbtk_fputs was also modified to handle the new
result_ptr structure. See the comments in gdbtk.h for more
details.
* gdbtk.h: New file - this contains all the defines and globals
shared by gdbtk.c, gdbtk_cmds.c & gdbtk_hooks.c
* Makefile.in, configure.in & configure: mutatis mutandi for the
new files.