the directory name
* Merge (lots) with foundry-971118-build
* Makefile.in (install-only): install the new gdbtk, not the old
* top.h: add declaration of get_prompt
* top.c (get_prompt): new function
* gdbtk.c (gdbtk_call_command): also run idle hooks for class_trace
commands
(gdbtk_init): add new commands "gdb_get_locals", "gdb_get_args",
"gdb_get_function", "gdb_get_line", "gdb_get_file",
"gdb_tracepoint_exists", "gdb_get_tracepoint_info", "gdb_actions",
and "gdb_prompt"
(gdb_get_vars_command): new function
(gdb_get_line_command): new function
(gdb_get_file_command): new function
(gdb_get_function_command): new function
(gdb_get_tracepoint_info): new function
(gdbtk_create_tracepoint): new function
(gdbtk_delete_tracepoint): new function
(tracepoint_notify): new function
(tracepoint_exists): new function
(gdb_actions_command): new function
(gdb_tracepoint_exists_command): new function
(gdb_prompt_command): new function
* main.tcl: initialize gdbtk_state(readline)
* console.tcl (invoke): get realine working
(activate): add prompt argument for readline
(setprompt): add prompt argument for readline
* interface.tcl (gdbtk_tcl_readline): hack to get readline working
* lots: Merge with foundry-971118-build
* console.tcl (setprompt): get prompt from gdb
* prefs.tcl (pref_set_defaults): add tracepoint defaults
* interface.tcl (gdbtk_tcl_tracepoint): new function
* src.tcl (constructor): set default behavior of left click, make
a tracepoint dot, too
(fill_files): "new" function: ripped out of "location"
(location): use fill_files instead
(do_bp): add support for tracepoints
(bp_line): add support for tracepoints
(set_tracepoint): new function
(config_win): add "Set tracepoint here" to right-click menu
* actiondlg.tcl: new file to help with tracepoint data collection actions
* tracedlg.tcl: new file to help with tracepoints
* findvar.c (registers_changed): Likewise.
Fixes memory "leak" reported by HP. Call from execute_command is for general
alloca cleanup; call from registers_changed is to fix hp's specific problem.
* Makefile.in, configure.in, aclocal.m4: Add Itcl, Tix, and
IDE configuration information.
* gdbtk.c (breakpoint_notify): Send address, linenumber and
filename when a breakpoint is set. Avoids call to bp_info.
(gdbtk_init): Call Tcl_FindExecutable(). Add code to handle
Itcl, Tix and IDE initialization.
* defs.h (init_ui_hook): Change prototype to accept one arg.
* main.c (gdb_init): Change prototype to accept one arg.
* top.c (gdb_init): Accepts one argument which it uses to
call (*init_ui_hook), which will be gdbtk_init(). This is
used for calling Tcl_FindExecutable().
* gdbtcl/breakpoint.tcl (gdbtk_tcl_breakpoint): Change to
accept variable number of args for compatibility with
cchanges in gdbtk.c.
* configure: Regenerated.
* gdbtcl/tclIndex: Regenerated.
that directory.
* defs.h utils.c (error warning): Make message be const.
* main.c (fputs_unfiltered): Only send gdb_stdout and gdb_stderr
to hook. Otherwise send it to fputs.
* monitor.c monitor.h (monitor_get_dev_name): New function. Does
the obvious.
* remote-e7000.c: Remove debugify stuff. Change printf, fprintf
to _filtered forms to make output appear in GUIs. Replace all
uses of SERIAL_READCHAR with readchar, which has better error
checking.
* (e7000_parse_device): Add prototype.
* (readchar): Improve doc. Handle random serial errors.
* (expect): Disable notice_quit code. It's busted. Remove
serial error handling (it's now handled in readchar). Remove
remote_debug echoing. That's handled in readchar as well.
* (e7000_parse_device): Remove serial_flag arg. It's not
necessary.
* (e7000_open): Split into two pieces. Second part is
e7000_start_remote, and is error protected. Now, when we connect
to the target, we setup the initial frame and registers so that
the user gets an immediate indication of where the target is.
* (gch): Remove debug output. That's handled by readchar.
* (e7000_read_inferior_memory): Handle errors better.
* (_initialize_remote_e7000): Get rid of `<xxx>' things from
command names. They show up when doing completion and confuse
things horribly.
* ser-e7kpc.c: Remove the last seven months of brain damage. Get
rid of the DLL's since we can access the device directly from Win32s
and Win95. Get rid of debugify crud.
* serial.c: Remove debugify cruft.
* (serial_logchar serial_log_command serial_write serial_readchar
serial_send_break serial_close): Merge common functionality into
serial_logchar. Clean up rest of routines.
* sparclet-rom.c: Disembowel. Leave only download routine.
Download routine now switches to remote target automatically.
* top.c (disconnect): Only define if SIGHUP is defined. Cleans
up MSVC/Win32 problem.
* utils.c (gdb_flush): Don't call hook unless it's for gdb_stdout
or gdb_stderr.
* config/sh/tm-sh.h: Define TARGET_SH for WinGDB.
* config/sparc/tm-sparclet.h: Remove override for prompt.
bpstat_stop_status): Do not disable watchpoints going out of scope.
(insert_breakpoints): Make sure that the current frame is valid
before calling find_frame_addr_in_frame_chain.
* top.c (setup_user_args): Handle quotes and backslashes.
(print_gdb_version): Update copyright year.
Add prototypes for make_final_cleanup (and the other cleanup
routines.
* remote-e7000.c: Fix sync code to timeout if unable to sync.
Change sync code to report status while trying to sync-up
with hardware. Add debugging output and document.
* ser-e7kpc.c: Swap order of len & offset to match implementation.
Add debugging output and document.
* serial.c: Add debugging output.
* top.c: Add call to do_final_cleanups.
Remove conditionals preventing Win32 from getting SIGQUIT.
* utils.c: (*_cleanup): Modify cleanup routines to accept a cleanup
chain as a parameter. Extract this generic code from the cleanup
routines into separate funtions (*_my_cleanup). Keep old
functionality by passing "cleanup_chain" to the new funtions.
Define the cleanup chain "final_cleanup_chain" to be a cleanup
chain which will be executed only when gdb exits. Add functions
(*_final_cleanup) to match the original (*_cleanup) functions.
(pollquit, quit, notice_quit): Fix to read cntl-C from the
Windows message queue.
standards for the --version option.
(print_gnu_advertisement): Remove, now part of print_gdb_version.
(show_version): Remove call to print_gnu_advertisement.
* top.h (print_gnu_advertisement): Remove prototype.
* main.c (print_gdb_help): Move help to static function and
add prototype.
(main): Call print_gdb_help rather than inlining it.
(main): Remove call to print_gnu_advertisement.
* gdbtk.tcl (create_copyright_window): Increase timeout from
15 seconds to 30 seconds.
mswin/libwingdb.a and remote-wiggler.o.
* breakpoint.c (breakpoint_here_p): Clean up bp enabled test.
* (breakpoint_inserted_here_p): New func, just like
breakpoint_here_p, except it's honest. Honestly.
* breakpoint.h: Proto for above.
start-sanitize-gdbtk
* configure configure.in: Add host *windows* to list of hosts
that don't support GDBtk.
end-sanitize-gdbtk
* configure configure.in: Add mswin to configdirs if host is
i[3456]86-*-windows.
* core-aout.c (fetch_core_registers register_addr) gdbcore.h:
Change all vars that can contain addresses to type CORE_ADDR.
* findvar.c (supply_register): Allow val to be NULL. This means
that regno is unsupported.
* (read_pc read_pc_pid write_pc write_pc_pid): Make non-pid forms
just call pid forms with inferior_pid so that there's only once
place to hack PC's and such.
* infrun.c (proceed): Don't skip breakpoints if user changed PC.
* remote-wiggler.c: New file. Support for BDM interface from
Macraigor Systems.
* serial.c: Enhance serial logging capability. Add hex and octal
output modes (set remotelogbase {hex|octal|ascii}. Also log
breaks, timeouts, errors, and eofs.
* serial.h: Redefine SERIAL_SEND_BREAK to go through a wrapper
function so that we can log breaks. Don't export serial_logfile
or serial_logfp.
* top.c (execute_command): Don't test for serial_logfp here.
Just call serial_log_comand, and let serial.c sort it out.
* valops.c (value_of_variable): Don't attempt to establish frames
for static and global variables. This makes things work a bit
better if the stack or frame pointer is trashed.
* config/m68k/monitor.mt (TDEPFILES): Add remote-wiggler.o.
* config/m68k/tm-m68k.h: Define STACK_ALIGN. CPU32 can't hack
misaligned stacks during function calls.
mdebugread.c os9kread.c source.c top.c utils.c: Don't
include param.h or sys/file.h (or unistd.h in some cases).
* defs.h exec.c inflow.c remote-array.c remote-e7000.c
sparcl-tdep.c terminal.h utils.c: Replace all occurances of
__WIN32__, WINGDB, WIN32, etc... with _WIN32.
* main.c: Remove #ifndef WINGDB around option processing. Fix
bug with passing argc==0 and argv==NULL to getopt.
* (main) Remove calls to access() before source_command. Let
soure_command handle access errors.
* maint.c (maintenance_dump_me): #ifdef out for _WIN32.
* symtab.c (operator_chars): Make this global for wingdb.
* top.c (disconnect): #ifdef out for _WIN32.
* (source_command): If got an error and from_tty, then call print
error, else just return quietly.
* utils.c (fatal_dump_core): Can't kill ourselves under windows.
Just exit.
* (pollquit notice_quit): #ifdef out stuff that doesn't exist
under windows.
(readline_begin_hook, readline_hook, readline_end_hook): Declare.
* breakpoint.c (commands_command): Build message in temporary buffer
and pass that, as well as tty control flag, to read_command_lines.
* top.c (readline_begin_hook, readline_hook, readline_end_hook):
Define here.
(command_loop): Check for non-NULL instream before looping.
(command_line_input): Use readline_hook when appropriate, to get
user input from a GUI window.
(read_next_line): Also build prompt if getting user input from a GUI.
(recurse_read_control_structure): Fix typo in comment.
(read_command_lines): Use passed in prompt and tty flag to decide how
to build message. Use readline_begin_hook when appropriate, to set
up a GUI interaction window. Just return head, whether NULL or not,
after using readline_end_hook to complete GUI interaction.
(define_command, document_command): Build message in a temporary
buffer and pass it to read_command_lines, along with tty flag.
* gdbtk.c (gdbtk_readline_begin, gdbtk_readline, gdbtk_readline_end):
New functions.
(tk_command_loop): Set instream to NULL to enable Tk user interaction.
(gdbtk_init): Set readline_begin_hook, readline_hook,
and readline_end_hook.
* gdbtk.tcl (gdbtk_tcl_readline_begin, gdbtk_tcl_readline,
gdbtk_tcl_readline_end): New functions.
(tclsh): Pack scroll bar on right side of window, not left.
PR 9385
* configure.in (AC_CHECK_FUNCS): Also check for sbrk.
* configure: Regenerate with autoconf.
* config.in: Regenerate with autoheader.
* main.c (main): Only use sbrk() when HAVE_SBRK is defined.
* top.c (command_loop): Ditto.
before testing against reg_ptr.
* eval.c (evaluate_subexp_standard): Cast type of
TYPE_FN_FIELD_VOFFSET to int.
* findvar.c (extract_signed_integer, extract_unsigned_integer,
extract_long_unsigned_integer): Cast type of sizeof to int.
* values.c (unpack_field_as_long, modify_field): Ditto.
* valops.c (value_assign, call_function_by_hand): Ditto.
* infcmd.c (do_registers_info): Ditto.
* ser-tcp.c (tcp_open): Ditto
* remote.c (putpkt): Ditto.
* dcache.c (dcache_peek): Ditto.
* dcache.c (dcache_poke): Ditto.
* m2-exp.y (yylex): Ditto.
* gnu-regex.c (re_match_2): Ditto.
* f-lang.c (ADD_BF_SYMNUM, saved_bf_list_end, tmp_bf_ptr): Ifdef
out unused macro definition and variables.
* inftarg.c (proc_wait): Move from main.c to here, and make static.
* valprint.c (val_print_string): Change bufsize from int to unsigned.
* main.c (wait.h): Include
* top.c (command_line_input): Remove unused variable "c".
* f-typeprint.c (f_type_print_varspec_prefix): Add missing enum
value TYPE_CODE_TYPEDEF to switch statement.
(f_type_print_varspec_suffix): Add missing enum value
TYPE_CODE_TYPEDEF to switch statement.
* ch-exp.c (parse_primval): Add remaining enumeration values to
switch statement, with no specific action.
(ch_lex): Add LOC_UNRESOLVED in switch statement.
(pushback_token): Ifdef out, since code using it is ifdef'd out.
* stabsread.c (cleanup_undefined_types): Remove unused label
"badtype".
* objfiles.h (print_symbol_bcache_statistics): Add prototype.
* maint.c (objfiles.h): Include.
(maintenance_print_statistics): Remove unused variable "temp".
* minsyms.c (lookup_minimal_symbol_solib_trampoline): Remove
unused variable "found_file_symbol".
* m2-exp.y (yylex): Add LOC_UNRESOLVED case to switch.
* language.c (lang_bool_type): Use existing function local type
variable rather than create block local variables.
* solib.c (disable_break): Enclose in ifndef SVR4_SHARED_LIBS.
* infptrace.c (wait.h, command.h): Include.
* ser-tcp.c (gdb_string.h): Include
* i386-tdep.c (codestream_seek): Change "place" to CORE_ADDR.
(i386_get_frame_setup): Change "pc" from int to CORE_ADDR.
* command.c (complete_on_enum): Make assignment used as truth value
explictly check against NULL.
(wait.h): Include.
* infrun.c (wait_for_inferior): Ifdef out prologue_pc since code
that uses it is ifdef'd out.
* parser-defs.h: Add prototype for write_dollar_variable.
* infrun.c: Add prototype for write_pc_pid.
* breakpoint.h: Add prototype for re_enable_breakpoints_in_shlibs.
* symmisc.c (bcache.h): Include.
* bcache.h: Add prototype for print_bcache_statistics.
* symfile.c: Include <time.h>.
* printcmd.c (print_scalar_formatted): Change len to unsigned int.
* valarith.c (value_equal): Cast result of TYPE_LENGTH to int.
* valarith.c (value_binop): Change result_len, promoted_len1,
and promoted_len2 to unsigned int.
* valarith.c (value_subscripted_rvalue): Change elt_offs and
elt_size to unsigned int.
* valops.c (value_array): Change typelength to unsigned int.
(destructor_name_p): Change len to unsigned int.
* scm-lang.h (scm_parse): Add prototype for scm_unpack.
* symfile.c (decrement_reading_symtab): Change return type to void.
* valarith.c (value_subscript): Remove unused variable "word".
(value_subscript): Remove unused variable "tint".
* valops.c (auto_abandon): Ifdef out, since code using it is also
ifdef'd out.
* eval.c (init_array_element): Remove unused variable "val".
* Makefile.in (values.o): Depends on scm-lang.h.
(command.o): Depends upon wait_h.
(ser-tcp.o): Depends upon gdb_string.h.
(infptrace.o): Depends upon wait_h and command_h.
(maint.o): Depends on objfiles.h and symfile.h.
* values.c (allocate_repeat_value): Remove unused variable
"element_type".
(scm-lang.h): Include.
* breakpoint.c (create_longjmp_breakpoint): Enclose in
GET_LONGJMP_TARGET define, unused otherwise.
* config/i386/nm-linux.h: Add prototypes for i386_insert_watchpoint,
i386_remove_watchpoint and i386_stopped_by_watchpoint.
AT_name tag is missing.
* procfs.c (procfs_stopped_by_watchpoint): Fix logic when
FLTWATCH and FLTKWATCH are defined.
* remote.c (remote_read_bytes): Advance memaddr for transfers,
return number of bytes transferred for partial reads.
* top.c (init_signals): Reset SIGTRAP to SIG_DFL.
around calls to create_longjmp_breakpoint. Why install the
breakpoints if we can't find the longjmp target?
* infrun.c (wait_for_inferior): Cleanup comments near call test.
* remote-mips.c: Fixed a bunch of prototypes to avoid char/int
complaint from picky compilers. Add comment to mips_expect.
Replace all instances of sr_get_debug with remote_debug.
* (mips_readchar): Don't jam init string to monitor.
mips_initialize() handles that.
* (mips_receive_header): Print better message when we get too
much garbage.
* (mips_request): Allow caller to pass in buff to allow them to
analyze the returned message.
* (mips_initialize): Re-do initialization to try sending a BREAK,
a ^C, and then a download escape sequence. Cleanup protocol
startup. Eliminate sleeps. Clear breakpoints (if using monitor
breakpoints). Re-init frame.
* (mips_detach): Close down target.
start-sanitize-gm
* (mips_resume): Pass signal down to target.
* (mips_create_inferior): Start target with TARGET_SIGNAL_PWR.
end-sanitize-gm
* (mips_wait): Handle return status with registers, or breakpoint stuff.
* (mips_kill): Add ^C handling.
* (mips_insert_breakpoint mips_remove_breakpoint): Call new
breakpoint stuff if enabled.
* (calculate_mask remote_mips_set_watchpoint
remote_mips_remove_watchpoint remote_mips_stopped_by_watchpoint):
Hardware watchpoint/breakpoint stuff.
* (common_breakpoint): Common code for new monitor breakpoint commands.
* (mips_load): Don't use `prompt'. It's a global variable.
* top.c (dont_repeat_command): New command for use in
user-defined commands to suppress auto-repeat (by hittin return key).
start-sanitize-gm
* utils.c (request_quit): Call target_kill here. Good idea.
Needs a better implementation.
end-sanitize-gm
* valops.c: Add start of auto function-call abandonment capability.
start-sanitize-gm
* c-exp.y: Add code (currently disabled) to handle GM dynamic
structures (it conflicts with @!).
* eval.c (evaluate_subexp_standard): ditto.
* expprint.c (print_subexp dump_expression): ditto.
* expression.h (enum exp_opcode): ditto.
* parse.c (length_of_subexp): ditto.
* configure, configure.in: Add mip*-*-magic* target.
* magic.c magic.h: Special routines to handle GM stuff (like
stepping through dispatcher).
end-sanitize-gm
Determine signedness of enum type from enumerators.
(parse_type): Handle btIndirect types, handle fBitfield for
some non-member types.
(upgrade_type): Use TYPE_FLAG_TARGET_STUB for arrays with
unknown length.
(cross_ref): Handle stIndirect forward reference to btTypedef.
* stabsread.c (read_enum_type): Determine signedness of enum
type from enumerators.
* top.c (execute_command): Remove trailing whitespace from
command arguments, except for `set' and `complete' commands.
(validate_comname): Allow underscores in user defined command
names.
* values.c (modify_field): Change `Value does not fit in %d bits'
error to a warning. Exclude sign extension bits of negative field
values from fit check.
* infrun.c (wait_for_inferior): Set the convenience variable
$_exitcode to the termination code of the inferior.
* top.c (quit_command): Accept optional expression to use
as parameter to exit().
to char, since everything passed in and out of dcache is char or casted
to appropriate type anyway.
(dcache_alloc): Move assignment of db out of test and combine separate
tests into if-else.
(dcache_peek_byte): Change ptr from unsigned char* to char*.
(dcache_peek_byte): Remove now unnecessary cast in read_memory call.
(dcache_peek): Change cast of incoming data arg.
(dcache_poke): Change cast of addr of incoming data arg.
(dcache_info): Mask data passed to printf_filtered to lsbyte only.
(dcache_info): Change printf_filtered arg from "% 2x" to " %2x".
* target.c (debug_to_thread_alive): Change return type to int and
return zero, for type compatibility with other *_thread_alive funcs.
(cleanup_target): Change cast of ignore function to match type of the
to_thread_alive member.
* defs.h (error_hook): Add ATTR_NORETURN.
* defs.h (NORETURN, ATTR_NORETURN): Switch from volatile to
__attribute__ method with gcc 2.7, to avoid gcc 2.6.3 bug.
* remote.c (remote_wait): Cast first arg to strtol, strchr, and strncmp
to "const char *" from "unsigned char *".
(remote_wait): Cast arg to putpkt and strcpy from "unsigned char *" to
"char *".
(remote_wait): Change printf format for long arg from "%d" to "%ld".
(getpkt): Remove unused variable "bp".
(remote_fetch_word, remote_store_word): Ifdef out apparently unused
functions.
* breakpoint.c (watchpoint_check): Removed unused variables
"saved_level" and "saved_frame".
* valops.c (value_arg_coerce): Add other enum TYPE_CODE_* and
default cases to switch for completeness.
* infrun.c (wait_for_inferior): Enclose "have_waited" label
in #ifdef that matches the one in which it is referenced.
* ser-unix.c (hardwire_noflush_set_tty_state): Enclose otherwise
unused variable "state" in #ifdef that matches one in which it is
referenced.
* eval.c (evaluate_subexp_standard): Remove unused variable "var".
* eval.c (evaluate_subexp_standard): Remove unused variable "tmp_symbol".
* valarith.c (value_subscript): Remove unused variable "lowerbound",
which is redeclared in a nested scope prior to use.
* printcmd.c (print_frame_nameless_args): Use "%ld" to print long
arg, not "%d".
* {mem-break.c, remote-pa.c, remote.c, saber.suppress}:
Remove unused static var "check_break_insn_size".
* buildsym.c (finish_block): Add other enum LOC_* and default
cases to switch for completeness.
ch-lang.c (type_lower_upper): Removed unused label "retry".
Add other enum TYPE_* and default cases to switch for completeness.
* f-typeprint.c (f_type_print_args): Ifdef out unused function
that may be used someday when Fortran support is complete.
* ch-valprint.c (chill_print_type_scalar): Add other enum
TYPE_* and default cases to switch for completeness.
(chill_val_print): Remove unused local var "high_bound" that
is redeclared in a nested scope prior to use.
(chill_var_print): Use "%ld" to print long arg, not "%d".
* regex.c (re_compile_fastmap, re_match_2): Add remaining enum types
and default to switches for completeness.
* minsyms.c (lookup_minimal_symbol_text): Delete unused variable
"trampoline_symbol".
(prim_record_minimal_symbol_and_info): Return NULL rather than trash.
* elfread.c (elf_symtab_read): Don't dereference NULL returns from
record_minimal_symbol_and_info.
* f-lang.c (saved_function_list_end): Ifdef out unused variable
that may be used someday.
* f-valprint.c (f_val_print): Remove unused local variable "straddr".
* monitor.c: Turn on caching.
(monitor_printf): If a ^C was sent, don't expect to see its
echo.
(monitor_open): Enable caching.
(monitor_resume, monitor_load): Flush cache.
(monitor_xfer_memory): Call cache routine.
(monitor_dump_regs): New.
(monitor_fetch_registers): If monitor_dump_regs available
then use it.
(monitor_load): Don't ref exec_bfd if it's NULL.
(monitor_load_srec): Use new monitor_make_srec calling convention.
(monitor_make_srec): Rewrite to cope with two, three and four byte
addresses.
* remote-hms.c (hms_cmds): Initialze end-of-command delim.
* dcache.h, dcache.h: Rewritten.
* remote.c: Reenable caching.
(getpkt): Reduce MAX_TRIES to 3.
(remote_xfer_memory): Use dcache_xfer_memory.
* defs.h (error_hook): New.
* top.c (error_hook): New definition.
* utils.c (error): Use error_hook if initialized.
* sparcl-tdep.c (HAVE_SOCKETS): Don't define if GO32 or WIN32. Use
HAVE_SOCKETS in place of #ifndef GO32.
* defs.h: Don't declare strchr and friends if WIN32.
(DIRNAME_SEPARATOR): Move here from source.c.
(SLASH_P, SLASH_CHAR, SLASH_STRING, ROOTED_P): New macros,
symbolic definitions for filename bits.
* top.c (cd_command): Use these.
* source.c (mod_path, openp): Ditto.
* terminal.h: Disable termio/sgtty definitions if WIN32.
* findvar.c (registers_changed): Call registers_changed_hook
if it is defined.
attribute when compiled by gcc.
* defs.h, language.h, monitor.h: Changed many function
declarations to use ATTR_FORMAT.
* breakpoint.c (delete_command); source.c (directory_command);
top.c (define_command): Changed call to query() that had too
many arguments.
* printcmd.c (address_info): Changed call to printf_filtered()
that had too many arguments.
symbols, their value is the displacement from the procedure address.
* top.c (init_main): Add missing newlines to help strings for
`if' and `while' commands, fix help string for `show commands'.
enable/disable_breakpoint_hook with modify_breakpoint_hook.
* gdbtk.c: General cleanups, get rid of unused variables. Redo
handling of stdout/stderr to just return output as the result of
the tcl command that caused the output. Cleanup -Wall stuff.
* (breakpoint_notify): Now returns just action and breakpoint
number.
* (gdb_get_breakpoint_list): New routine. Does the obvious.
* (gdb_get_breakpoint_info): Mostly derived from the old
breakpoint_notify, but returns lots more info.
* (dsprintf_append_element): Helper routine, works like printf,
but appends a tcl element onto the specified DString. Good for
building up lists as return values.
* (gdbtk_enable/disable_breakpoint): Go away. Replaced with
gdbtk_modify_breakpoint.
* (*many routines*): Use new result protocol.
* (call_wrapper): Make sure that recursive calls don't trash results.
* gdbtk.tcl: New windows, autocmd, and breakpoints.
* (gdbtk_tcl_fputs): Don't use $current_output_win redirection
anymore. It's not needed (in fact, this routine may not be needed
anymore).
* (gdbtk_tcl_breakpoint): Change to reflect new breakpoint
notification protocol.
* (gdbtk_tcl_busy gdbtk_tcl_idle): Straighten out buttons, remove
catches.
* (interactive_cmd): Use this wrapper around button invocations
of many commands. This will catch errors and put the results into
the command window. It also updates all the other windows.
* Also, change reliefs of most things to sunken. This actually
looks better.
* (create_file_win): Fix margin binding to allow breakpoints to
work again.
* (create_asm_win): Use return value of gdb_disassemble instead
of implicit I/O to the command window.
* (create_command_window): Use new result protocol to get output
from commands.
top.c : Get rid of dis_asm_read_memory_hook. We can now call the
disassemblers directly and have no need for this hook anymore.
* defs.h, printcmd.c: Make print_insn be static.
* ser-go32.c (dos_comisr): Make this 8 bit clean.
* (dos_open dos_close): Allow multiple opens to the same device.
Use a ref count to prevent unwanted deallocations.
* sparcl-tdep.c: Put #ifdefs around all socket stuff to make GO32
happy.
* (sparclite_ops): Switch to download_stratum.
* target.h (enum strata): Move download_stratum before
process_stratum so that executable targets get pushed on top of
download targets.
* breakpoint.h (disable_breakpoint, enable_breakpoint):
New declarations.
(enum bpdisp): Change name of 'delete' member to 'del'.
(struct bpstat): Changed name to 'bpstats'.
* breakpoint.c (disable_breakpoint, enable_breakpoint,
breakpoint_chain): Made globally visible.
(bpstat_stop_status): Use new name for bpstat.
(break_command_1, watch_command_1, catch_command_1,
breakpoint_auto_delete, denable_delete_breakpoint): Use 'del'
instead of 'delete'.
(set_breakpoint_sal): New function.
* defs.h (registers_changed_hook): New declaration.
* infcmd.c (run_stack_dummy): 'delete' is now 'del'.
* inflow.c (new_tty): Treat WIN32 in same way as __GO32__
* main.c (main): Don't scan options when in WIN32 and exit
without entering main loop.
* m2-exp.y (m2_elx): Member 'class' is now 'aclass'.
* symtab.h (struct symbol, struct partial_symbol): Changed name of
member 'class' to 'aclass'.
(SYMBOL_CLASS, PSYMBOL_CLASS): Reflect change.
* top.c (registers_changed_hook): New definition.
* utils.c (quit, notice_quit, initialize_utils): Treate WIN32
in same way as __GO32__.
* value.h (c_typedef_print): Rename 'new' argument.
defined command (including control structures).
* top.c (init_main): Change documentation for user defined
commands to indicate they may accept up to ten arguments.
* core.c (dis_asm_read_memory): Add call to
dis_asm_read_memory_hook to provide alternate way for disassembler
to read memory.
* defs.h: Protect from multiple inclusion. Add decl for
dis_asm_read_memory_hook.
* gdbtk.c (finish_saving_output): Don't do anything if not saving
output.
* (breakpoint_notify): Don't send null filename to tcl.
* (gdb_eval): New tcl command to eval an expression.
* (gdb_disassemble): New tcl command to do disassembly. This
allows tcl code to choose between exec file and target memeory,
and can also do mixed source and assembly.
* (gdbtk_init): Move reading of gdbtk.tcl to the end to make sure
that more of the environment is set up. Also, create link between
gdb and tcl vars disassemble{-_}from{-_}exec.
* gdbtk.tcl: New expression window support.
* Make assembly window be 80 columns wide.
* Use new disassembly method. Add menu items to select
disassembly from exec file or target.
* Change View menubar item to Options.
* Get rid of Stack, Breakpoints, Signals, and Variables Windows,
since they don't exist yet.
* Pop up a copyright window on startup.
* top.c: Make window startup be the default.
* Add dis_asm_read_memory_hook.
commands.
* top.c (struct user_args): Structure for holding arguments to
user defined commands.
(print_command_line): Delete unused "tmp_chain" variable. Clean
up flow control by having cases exit in the same manner.
Before executing a command or evaluating an expression, substitute
the current $arg0..$arg9 values if the command/expression uses them.
(arg_cleanup): New function.
(setup_user_args, locate_arg, insert_args): Likewise.
(execute_user_command): Allow arguments to user defined commands.
* Allow if/while commands to be used within a breakpoint command
list.
* breakpoint.c (bpstat_do_actions): Call execute_control_command
rather than execute_command (passes entire command structure rather
than just the command line text).
(breakpoint_1): Use "print_command_line" to print a breakpoint
command line (including control structures).
* gdbcmd.h (execute_control_command): Provide extern decl.
(print_command_line): Likewise.
* top.c (execute_control_command): No longer static.
(print_command_line): New function to recursively print a command
line, including control structures.
to fputs_unfiltered_hook. Differentiate stdout from stderr when
passing text into tcl land.
* defs.h, top.c, utils.c (error): Add error_hook.
* gdbtk.c: Improve mechanism for capturing output values.
* (full_filename): Remove.
* (gdb_cmd call_wrapper gdbtk_init): Protect all calls from tcl
land with call_wrapper. This prevents longjmps (usually via
error()) from jumping out of tcl/tk and leaving things in an
indeterminate state.
* gdbtk.tcl: New view option to disable line numbers. Put catch
around most uses of gdb_cmd. Add update button to reg config
window. Stop doing immediate updates when selecting registers.
Change register view values into checkbuttons.
* main.c (display_time, display_space): New globals.
(main): Add argument --statistics to enable reporting, display
time and space after startup is done.
* maint.c (maintenance_time_display, maintenance_space_display):
New commands.
* top.c (command_loop): Display time and space after command
execution.
* top.c (pre_init_ui_hook): New global.
(gdb_init): If pre_init_ui_hook set, call before all other init.
symbol_completion_function, takes the line buffer and the
point in the line buffer as additional arguments.
(readline_line_completion_function): New function, interface
between readline and line_completion_function.
(init_main): Use it.
(complete_command): Use line_completion_function instead of
abusing rl_line_buffer. Free completion strings after printing
them.
* symtab.c (completion_list_add_name): Recheck for duplicates
if we intend to add a modified symbol.
* gdbtypes.h (cplus_struct_type): nfn_fields_total no longer
includes the number of methods from the baseclasses.
* stabsread.c (attach_fn_fields_to_type): No longer add the
number of methods from the baseclasses to TYPE_NFN_FIELDS_TOTAL,
the baseclass type might not have been completely filled in yet.
* symtab.c (total_number_of_methods): New function to compute
the total number of methods for a type, including the methods
from baseclasses.
(decode_line_1): Use it instead of TYPE_NFN_FIELDS_TOTAL to
allocate the symbol array for find_methods.
* stabsread.c (scan_file_globals): Add default case to minimal
symbol type switch, to avoid gcc -Wall warnings.
* config/rs6000/tm-rs6000.h (INIT_EXTRA_FRAME_INFO):
Don't test for zero backchain pointer to recognize a signal
handler frame, if read() gets interrupted by a signal, the
backchain will be non zero.
(SIG_FRAME_FP_OFFSET): Move to here from rs6000-tdep.c,
improve comment.
(SIG_FRAME_PC_OFFSET): New definition.
(FRAME_SAVED_PC): Return saved pc from sigcontext if this
is a signal handler frame.
* rs6000-tdep.c (function_frame_info): Do not error out
if we can't access the instructions.
* config/rs6000/tm-rs6000.h (CONVERT_FROM_FUNC_PTR_ADDR):
New definition to get the function address from a function pointer.
* valops.c (find_function_addr): Use it when calling a user
function through a function pointer.
target_wait_hook to allow GUI to handle blocking for inferior. Call
call_command_hook in execute_command to provide means for wrapping
commands with GUI state change updates.
* gdbtk.c (gdb_cmd): Force GUI into idle mode when errors occur.
* (gdb_stop): New tcl command to stop the target process.
* (x_event, gdbtk_wait): Allow GUI to interrupt gdb out of target
waits.
* (gdbtk_call_command): Wrapper around command processing to
alert GUI of target state changes.
* (gdbtk_init): Get the fd of X server for doing async
notification of X events (via x_event). Setup new hooks.
* gdbtk.tcl: Add scrollbars to assembly and command windows.
* Change window foreground & background colors.
* Create margin tag for breakpoints in source and assembly windows.
* Add new routines to be invoked when target state changes to/from
idle.
* Add start of expression window.
* Change bindings of mouse button 1 in assembly and source window
to just set or clear breakpoints when in the margin tag.
* Change shape of register window to be more vertical to better
reflect it's contents.
* Add stop button.
* Cleanup some code around command window bindings.
* infrun.c (wait_for_inferior): Make sure
through_sigtramp_breakpoint is non-null before deleting.
(set_endian): Mention that ``auto'' is permitted.
(set_endian_auto): New static function.
(show_endian): Change message based on target_byte_order_auto.
(set_endian_from_file): New function.
(init_main): Add command ``auto'' to endianlist.
* exec.c (exec_file_command): Call set_endian_from_file.
* defs.h (set_endian_from_file): Declare.
define TARGET_BYTE_ORDER as target_byte_order, and declare
target_byte_order as an extern int, and define BITS_BIG_ENDIAN as
a test of TARGET_BYTE_ORDER.
* top.c: Several additions if TARGET_BYTE_ORDER_SELECTABLE is
defined:
(endianlist, target_byte_order): New variables.
(set_endian, set_endian_big, set_endian_little): New functions.
(show_endian): New function.
(init_cmd_lists): Initialize endianlist.
(init_main): Add commands ``set endian big'', ``set endian
little'', and ``show endian''.
* a29k-pinsn.c: Rewrite uses of TARGET_BYTE_ORDER and
BITS_BIG_ENDIAN to switch at run time rather than at compile time.
* coffread.c, dwarfread.c, findvar.c, mips-tdep.c: Likewise.
* remote-os9k.c, stabsread.c, valarith.c, valprint.c: Likewise.
* values.c: Likewise.
* mips-tdep.c: Rewrite uses of GDB_TARGET_IS_MIPS64 to switch at
run time rather than at compile time.
Also, add decl for symtab_to_filename.
* gdbtk.c: Replace calls to full_filename with symtab_to_filename.
* gdbtk.tcl: New routine pc_to_line replaces in line code. New
routine decr replaces in line code.
* (create_file_win): Use catch to handle open failures more
elegantly. Also, create special window to display file open
failure message. Move opening of file prior to creation of text
widget.
* (create_asm_win): Add PC as argument. We now base disassembly
on PC instead of function name, since function names can be
ambiguous (usually seen with shared libs). Also, use catch to
simplify code where we don't care about failures.
* source.c (symtab_to_filename): New. Returns the file
associated with a symtab.
* top.c: Define interactive_hook. Called during QUIT to animate
the GUI.
for describing the command and control types.
(struct command_line): Add new fields to keep track of the command
type and body associated with the command.
* top.c: Include value.h. Delete whitespace at the end of lines.
(build_command_line, get_command_line): New functions.
(execute_control_command, while_command, if_command): Likewise.
(realloc_body_list, read_next_line): Likewise.
(recurse_read_control_structure): Likewise.
(execute_user_command): Call execute_control_command.
(read_command_lines): Simplify by calling read_next_line, call
read_control_structure for "if" and "while" commands.
(free_command_lines): Free new fields in the command structure.
(define_command): Reset control_level to zero.
(init_main): Install command handlers for "if" and "while" commands.
--enable-xxx configure option by adding ENABLE_{CLIBS DEPFILES}
where appropriate.
* General hackery to support alternate user-interface.
* breakpoint.c (mention, delete_breakpoint, enable_breakpoint,
disable_breakpoint): Call hooks for alternate user-interface.
* defs.h: Add declarations for alternate user-interface hooks.
* main.c (main): Add --nw (and --nowindows) options to disable
the GUI.
* (near call to command_loop): Call command_loop_hook if set.
* (fputs_unfiltered): Call fputs_unfiltered_hook if set.
* stack.c: Call print_frame_info_listing_hook if set.
* top.c (gdb_init): Initialize targets.c and utils.c prior to
other files to make sure that calls to error and warning will
work. Call init_ui_hook after everything else.
* utils.c (query): Call query_hook if set.
* (gdb_flush): Call flush_hook if set.
* Change _initialize_utils to initialize_utils cuz we don't use
automatic initialization of utils.c anymore.
* Support for TK GUI.
* Makefile.in: Add rule for gdbtk.o.
* configure.in: Add support for --enable-gdbtk.
* gdbtk.c: New file. Contains support routines for TK interface.
* gdbtk.tcl: New file. Implements GUI policy.
* remote.c: Get rid of #ifdef DONT_USE_REMOTE. It's no longer
necessary.
to new file top.c. Make things extern instead of static and
similar rearrangements to deal with this.
* top.h: New file.
* utils.c: Move fputs_unfiltered to main.c. Remove
FPUTS_UNFILTERED_OVERRIDE ifndef.
* Makefile.in: Change so that gdb uses main.c, utils.c, and top.c,
and libgdb uses utils.c and top.c.