aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>2000-01-06 03:07:20 +0000
committerJason Molenda <jmolenda@apple.com>2000-01-06 03:07:20 +0000
commitc3f6f71df382eaaaac4440a91e6f310d03fb8da6 (patch)
treef4c8a0660080321182558bd52319654a94e01ea5 /gdb
parent1b45fe546b666d1bd83d474b66525f1a69dbd92f (diff)
downloadgdb-c3f6f71df382eaaaac4440a91e6f310d03fb8da6.zip
gdb-c3f6f71df382eaaaac4440a91e6f310d03fb8da6.tar.gz
gdb-c3f6f71df382eaaaac4440a91e6f310d03fb8da6.tar.bz2
import gdb-2000-01-05 snapshot
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog8749
-rw-r--r--gdb/ChangeLog-998815
-rw-r--r--gdb/Makefile.in10
-rw-r--r--gdb/acconfig.h8
-rw-r--r--gdb/breakpoint.c423
-rw-r--r--gdb/config.in6
-rw-r--r--gdb/config/alpha/alpha-osf2.mh3
-rw-r--r--gdb/config/alpha/alpha-osf3.mh4
-rw-r--r--gdb/config/i386/i386dgux.mh3
-rw-r--r--gdb/config/i386/i386sol2.mh3
-rw-r--r--gdb/config/i386/i386v4.mh3
-rw-r--r--gdb/config/i386/i386v42mp.mh4
-rw-r--r--gdb/config/i386/ncr3000.mh3
-rw-r--r--gdb/config/m68k/m68kv4.mh3
-rw-r--r--gdb/config/m88k/delta88v4.mh3
-rw-r--r--gdb/config/mips/irix4.mh5
-rw-r--r--gdb/config/mips/irix5.mh4
-rw-r--r--gdb/config/mips/mipsv4.mh3
-rw-r--r--gdb/config/mips/nm-irix4.h10
-rw-r--r--gdb/config/mips/nm-irix5.h16
-rw-r--r--gdb/config/powerpc/solaris.mh3
-rw-r--r--gdb/config/sparc/sun4sol2.mh3
-rwxr-xr-xgdb/configure221
-rw-r--r--gdb/configure.in29
-rw-r--r--gdb/dbxread.c10
-rw-r--r--gdb/defs.h5
-rw-r--r--gdb/doc/ChangeLog4
-rw-r--r--gdb/doc/gdb.texinfo24
-rw-r--r--gdb/infrun.c28
-rwxr-xr-xgdb/proc_api.c784
-rwxr-xr-xgdb/proc_events.c1785
-rwxr-xr-xgdb/proc_flags.c275
-rwxr-xr-xgdb/proc_why.c158
-rw-r--r--gdb/procfs.c9391
-rw-r--r--gdb/rdi-share/ardi.c6
-rw-r--r--gdb/rdi-share/devsw.c30
-rw-r--r--gdb/rdi-share/devsw.h2
-rw-r--r--gdb/rdi-share/etherdrv.c7
-rw-r--r--gdb/sol-thread.c1
-rw-r--r--gdb/testsuite/ChangeLog13
-rw-r--r--gdb/testsuite/gdb.base/callfuncs.exp2
-rw-r--r--gdb/testsuite/gdb.base/ptype.c2
-rw-r--r--gdb/testsuite/gdb.c++/annota2.exp2
43 files changed, 16762 insertions, 14101 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 878e2d1..c286719 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,8744 +1,27 @@
-1999-12-21 Stan Shebs <shebs@andros.cygnus.com>
+2000-01-05 Fernando Nasser <fnasser@totem.to.cygnus.com>
- * blockframe.c (generic_pop_current_frame): Cosmetic changes to
- clarify.
+ From Grant Edwards <grante@visi.com> (original patch from Thomas
+ Zenker ):
+ * rdi-share/ardi.c: Allow interruption of interruptible
+ targets with a <CNTL-C>.
-
-1999-12-21 Jim Blandy <jimb@cygnus.com>
+2000-01-04 Fernando Nasser <fnasser@totem.to.cygnus.com>
- * Makefile.in (elf_bfd_h): Look for elf-bfd.h in BFD_SRC, not
- BFD_DIR. Unlike bfd.h, it is not a generated file.
-
-Fri Dec 17 18:24:58 1999 David Taylor <taylor@texas.cygnus.com>
+ * rdi-share/etherdrv.c (fetch_ports): Send extra words on request
+ to control port to accommodate some versions of Angel.
- * language.c (_initialize_language): move settings of language,
- range, and type and corresponding function calls
- set_language_command, set_type_command, and set_range_command
- closer together to match the model of having the user set the
- variable via the 'set {language | range | type}' commands.
- This eliminates startup noise introduced by Jimmy Guo's change
- of Dec 13th.
+2000-01-04 Fernando Nasser <fnasser@totem.to.cygnus.com>
-1999-12-17 Michael Snyder <msnyder@cleaver.cygnus.com>
+ * rdi-share/devsw.c (dumpPacket): Fix source of channel information.
+ Add interpretation for C Support Library packets.
- * configure.in: test for <stdint.h>, which is not available
- on earlier versions of Linux.
- * config.in: define HAVE_STDINT_H if it's present.
- * configure: autoconfiscate.
- * lin-thread.c: if not HAVE_STDINT_H, stub out the entire module.
-
-Fri Dec 17 20:45:21 1999 Andrew Cagney <cagney@b1.cygnus.com>
+2000-01-04 Fernando Nasser <fnasser@totem.to.cygnus.com>
- * target.c (find_target_beneath): Change ``='' in if to ``==''.
+ * rdi-share/devsw.c (DevSW_Close): Remove const from argument that
+ is now being modified.
+ * rdi-share/devsw.h: Adjust declaration of the above funtion.
-1999-12-16 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * defs.h (TIDGET): add default definition.
- * lin-thread.c (check_for_thread_event): for now, just provide
- an empty definition (to be filled in later).
-
-1999-12-16 Fernando Nasser <fnasser@totem.to.cygnus.com>
-
- * varobj.c (varobj_list): Improve the test and the text of the
- assertion that guards against wrong tally of root varobjs.
- (uninstall_variable): Fix for a bug in which the number of root
- varobjs was not decremented if the first one in the list was deleted.
-
-1999-12-16 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * linux-thread.c: Remove printf-debugging code.
- * lin-thread.c: ditto.
- * config/alpha/nm-linux.h: protect with NM_LINUX_H.
- * testsuite/gdb.threads/linux-dp.exp: Make test for "New Thread"
- message more forgiving. Ditto test for "info threads".
-
-1999-12-16 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * lin-thread.c: new file. Implements multi-thread debugging on
- Linux using the thread_db API first implemented on Solaris. This
- frees GDB from any dependency on the internal implementation of
- the thread library. Future versions of the thread library will
- implement a libthread_db API for debuggers, which GDB will use.
- * config/i386/linux.mh: add lin-thread.o to the link, and add
- -ldl and -rdynamic since libthread_db is a dynamic library.
- * config/alpha/alpha-linux.mh: ditto.
- * configure.in: test for thread_db.h, proc_service.h
- * configure: autoconf.
- * config.in: conditionally define HAVE_THREAD_DB_H
- and HAVE_PROC_SERVICE_H
- * gdb_thread_db.h: new file, used when the system doesn't have it.
- * gdb_proc_service.h: ditto.
-
-1999-12-16 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * linux-thread.c: changes to accomodate the new lin-thread.c
- module based on the thread_db API. These changes make parts of
- linux-thread.c shareable with lin-thread.c.
- (linuxthreads_wait_mask): replace with linuxthreads_block_mask.
- (using_thread_db): new variable. Allows linux-thread module to
- detect when lin-thread (thread_db API) module is in use.
- (save_inferior_pid, restore_inferior_pid): make 32/64 bit safe.
- (check_all_signal_numbers) make extern, shared with lin-thead.c.
- (linuxthreads_new_objfile): use target_new_objfile_chain to share
- this hook with the lin-thread module. Call the other module FIRST.
- If using_thread_db is turned on by the other thread module, do not
- set linuxthreads_debug and do not call update_stop_threads. Do call
- check_all_signal_numbers, to be sure it gets set before target_wait.
- (linux_child_wait): new function. Abstracts out the "child_wait"
- functionality, so that it can be shared with the lin-thread module.
- (linuxthreads_wait): call linux_child_wait, instead of doing the
- waiting inline. If using_thread_db, do not call update_stop_threads
- and do not turn on linuxthreads_debug.
- (linuxthreads_mourn_inferior): abstract out the clearing of global
- state, so that it can be shared with the lin-thread.c module.
- (_initialize_linuxthreads): use linuxthreads_wait_mask to block
- SIGCHLD exactly ONCE, and leave it blocked! Then linux_child_wait
- will call sigsuspend when it wants to wait for this signal.
- (thread_attach): abstract out ptrace attach to share with lin-thread.c
-
-1999-12-16 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- Make target_pid_to_str a target_ops vector.
- * target.h (target_pid_to_str): redefine to use a target_ops vector.
- (target_tid_to_str): default to using target_pid_to_str.
- (target_pid_or_tid_to_str): ditto.
- * target.c (update_current_target): inherit to_pid_to_str method.
- (find_target_beneath): new function. Find target stratum below
- the given one.
- * config/nm-gnu.h: don't define target_pid_to_str.
- * config/i386/tm-i386sol2.h: ditto.
- * config/sparc/tm-sun4sol2.h: ditto.
- * gnu-nat.c (init_gnu_ops): initialize to_pid_to_str vector.
- * linux-thread.c (init_linuxthreads_ops): ditto.
- * sol-thread.c (init_sol_thread_ops: ditto.
- * procfs.c (init_procfs_ops): ditto.
- * win32-nat.c (init_child_ops): ditto.
- * config/i386/tm-cygwin.h: don't define target_pid_to_str.
- * inftarg.c (child_pid_to_str): new function, used to initialize
- to_pid_to_str vector. May be suppressed by defining CHILD_PID_TO_STR.
- (init_child_ops): initialize to_pid_to_str using child_pid_to_str.
- Derivative modules may substitute their own child_pid_to_str func
- by defining CHILD_PID_TO_STR.
- * lynx-nat.c (lynx_pid_to_str): rename to child_pid_to_str.
- * config/nm-lynx.h: define CHILD_PID_TO_STR.
- Don't define target_pid_to_str.
- * hppah-nat.c (hppa_pid_to_str): rename to child_pid_to_str.
- * infttrace.c (hppa_pid_or_tid_to_str): call child_pid_to str
- instead of hppa_pid_to_str.
- * config/pa/nm-hppah.h: define CHILD_PID_TO_STR.
- Don't define target_pid_to_str.
-
-1999-12-16 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * i386-linux-nat.c: introduce PIDGET/TIDGET macros as on Solaris,
- preparatory to using the thread_db debugging API for Linux.
- (fill_gregset): guard against invalid input.
- (fetch_regs): add a pid/thread_id argument, so we can fetch regs
- from multiple processes/clones/threads. (store_regs): ditto.
- (fetch_fpregs): ditto. (store_fpregs): ditto.
- (fetch_xfpregs): ditto. (store_xfpregs): ditto.
- (fetch_inferior_registers): use TIDGET to extract an appropriate
- thread/clone/process id from inferior_pid, if there's one there,
- and pass it to fetch_regs etc. (store_inferior_registers): ditto.
-
- * infptrace.c: include every available version of wait.h.
- introduce PIDGET/TIDGET macros for use with thread_db API on Linux.
- (call_ptrace): rearrange lines that were split by an ifdef.
- (fetch_register): use TIDGET to extract an appropriate process ID
- from inferior_pid, in case we are debugging more than one process.
- (store_register): ditto. This is for Linux.
- (child_xfer_memory): use PIDGET to extract the main process id from
- inferior_pid, in case we are debugging multiple processes that share
- the same address space (as on Linux).
-
-1999-12-16 Christopher Faylor <cgf@cygnus.com>
-
- * win32-nat.c: Add a missing register to mappings array.
- (child_fetch_inferior_registers): Use precalculated index into mappings
- array as supply_registers argument.
- (handle_output_debug_string): Avoid considering every debug string as a
- cygwin signal.
- (handle_exception): Trap first chance exceptions.
- (child_create_inferior): Initialize Microsoft thread walking API.
- (sgmb): New function. Used by Microsoft API for stack walking.
- (child_frame_chain): New function. Uses Microsoft API for stack
- walking.
- (child_frame_chain_saved_pc): Ditto.
- * config/i386/tm-cygwin.h: Define frame handling stuff.
-
-1999-12-15 Stan Shebs <shebs@andros.cygnus.com>
-
- ARM GNU/Linux support and general ARM target fixes/cleanup from
- Scott Bambrough <scottb@netwinder.org>, plus obsoletion of the old
- RISCix support.
- * NEWS: Mention addition and obsoletion.
- * configure.host: Recognize arm* instead of just arm.
- (arm*-*-linux*): Recognize.
- * configure.tgt: Ditto, plus assume arm*-*-* is embedded.
- * config/arm/arm.mh, config/arm/arm.mt, config/arm/nm-arm.h,
- config/arm/xm-arm.h: Mark as OBSOLETE.
- * config/arm/embed.mt, config/arm/tm-embed.h: New files.
- * config/arm/linux.mh, config/arm/linux.mt, config/arm/nm-linux.h,
- config/arm/tm-linux.h, config/arm/xm-linux.h: Ditto.
- * config/arm/tm-arm.h: Add more comments, eliminate PARAMS.
- (STACK_END_ADDR): Remove.
- (ARM_LE_BREAKPOINT, ARM_BE_BREAKPOINT, THUMB_LE_BREAKPOINT,
- THUMB_BE_BREAKPOINT): Move to here from arm-tdep.c.
- (NUM_REGS): Define as sum.
- (NUM_FREGS, NUM_SREGS, NUM_GREGS): New definitions.
- (FP_REGISTER_RAW_SIZE, FP_REGISTER_VIRTUAL_SIZE,
- STATUS_REGISTER_SIZE): Define.
- (REGISTER_BYTES, REGISTER_BYTE, REGISTER_RAW_SIZE,
- REGISTER_VIRTUAL_SIZE): Rewrite to use symbolic values.
- (REGISTER_CONVERTIBLE, REGISTER_CONVERT_TO_VIRTUAL,
- REGISTER_CONVERT_TO_RAW, USE_STRUCT_CONVENTION,
- EXTRACT_RETURN_VALUE): Rewrite to use new functions.
- (IN_SIGTRAMP): Remove definition.
- * arm-convert.s: Mark as OBSOLETE.
- * arm-linux-nat.c: New file.
- * Makefile.in: Add build rule for it.
- * arm-tdep.c (struct frame_extra_info): New struct.
- (arm_use_struct_convention): Rewrite.
- (arm_push_arguments): Rewrite to handle more cases.
- (arm_register_convertible, arm_register_convert_to_virtual,
- arm_register_convert_to_raw, arm_extract_return_value): New
- functions.
- (LITTLE_BREAKPOINT, BIG_BREAKPOINT): Remove.
- * arm-xdep.c: Mark as OBSOLETE.
-
-1999-12-15 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * infcmd.c (run_stack_dummy): Temporarily lie about the target
- ability to support asynchronous execution.
-
- * remote.c (remote_can_async_p, remote_is_async_p): Return true
- iff to_async_mask_value is true too.
- (remote_async): Error out if called when to_async_mask_value is 0.
- (init_remote_async_ops): Initialize to_async_mask_value to 1.
- (remote_async_detach, remote_async_resume, remote_async_wait,
- remote_async_kill): Change SERIAL_IS_ASYNC_P call to
- target_is_async_p call.
- (remote_async_resume): Change SERIAL_CAN_ASYNC_P call to
- target_can_async_p call.
-
- * target.c (update_current_target): Inherit to_async_mask_value.
- (target_async_mask): New function. To temporarily turn the target
- into a synchronous one for inferior function calls, and back to
- asynchronous.
-
- * target.h (to_async_mask_value): New entry in the target
- vector.
- (target_async_mask): Export.
- (target_async_mask_value): Define.
-
-Wed Dec 15 11:24:32 1999 Jeffrey A Law (law@cygnus.com)
-
- * hp-psymtab-read.c (trans_lang): Use HP_LANGUAGE_FORTRAN instead
- of HP_LANGUAGE_F77.
-
-Wed Dec 15 13:37:55 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * gdb-events.h, gdb-events.c (set_gdb_event_hooks): Return the old
- event hooks vector.
-
-1999-08-13 Jim Kingdon <http://developer.redhat.com/>
-
- * breakpoint.c (bpstat_stop_status): Revert 1998-09-08 change
- to ->frame matching. The change did not match the ChangeLog
- entry, looked fishy, and caused infinite stepping when running
- "next" from main on sparc w/ RH Linux. Thanks to Jakub for the
- report.
-
-1999-12-14 Stan Shebs <shebs@andros.cygnus.com>
-
- * arm-tdep.c (arm_get_next_pc): Add argument to shifted_reg_val
- call.
-
-1999-12-14 Mark Salter <msalter@cygnus.com>
-
- * mips-tdep.c (mips_print_register): Fix printing of individual
- registers when REGISTER_VIRTUAL_SIZE != REGISTER_RAW_SIZE.
-
-Tue Dec 14 23:29:19 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * defs.h (mcalloc): Delcare.
- * utils.c (xcalloc, mcalloc): New functions.
-
-1999-12-13 Stan Shebs <shebs@andros.cygnus.com>
-
- * config/arm/tm-arm.h: Reformat comments, in preparation for
- real changes.
- * arm-tdep.c: Similarly, plus change function definitions to
- modern form.
-
-1999-12-13 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * breakpoint.h (enum bptype): add new BP type bp_thread_event.
- This will be used when a target needs to set an invisible
- breakpoint to detect events such as thread creation.
- * breakpoint.c (interlan_breakpoint_number): remove ifdefs.
- (create_thread_event_breakpoint): new function.
- (remove_thread_event_breakpoints): new function.
- (bpstat_what): don't stop at invisible thread_event breakpoints.
- (update_breakpoints_after_exec): if bp_thread_event breakpoins
- still exist after an exec, delete them. They'll need to be
- found and installed anew anyway.
- (print_it_typical): don't announce bp_thread_event breakpoints.
- (print_one_breakpoint): account for new breakpoint type.
- (mention): don't mention invisible bp_thread_event breakpoints.
- (delete_command): don't delete invisible bp_thread_event bp's.
- (breakpoint_re_set_one): don't touch bp_thread_event bp's.
-
-Mon Dec 13 11:10:59 1999 Jimmy Guo <guo@cup.hp.com>
-
- * language.h (longest_raw_hex_string, longest_local_hex_string,
- longest_local_hex_string_custom): Declare.
- * language.c: New functions, and misc. fixes.
- (longest_raw_hex_string, longest_local_hex_string,
- longest_local_hex_string_custom): New functions.
-
- * c-typeprint.c
- (c_type_print_varspec_prefix,c_type_print_varpsec_suffix): Add
- TYPE_CODE_TEMPLATE case and default case.
- (c_type_print_base): Revise how demangled_no_class is found;
- print '}' before printing local file:line info.
- * c-valprint.c (c_value_print): print reference type to class.
-
- * valarith.c (value_binop): Add support for exponentiation,
- equal, not equal.
- (my_strcmp): New function.
- (value_equal,value_less): Add string equality comparison support.
-
- * m2-exp.y (lex): add default case statement to capture
- unhandled token and call error().
-
-1999-12-13 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * main.c (main): Remove unused variable.
-
- From Hubert VERSTRAETE (hubertV@bigfoot.com):
- * main.c (captured_main): Disambiguate command line option '-d' by
- preferring --directory over --dbx.
-
- * top.c (return_to_top_level): Do not do exec cleanups if the
- target is executing. Those cleanups are supposed to be done when
- the target has stopped.
-
-Mon Dec 13 20:52:37 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * breakpoint.c (do_captured_breakpoint_query,
- gdb_breakpoint_query): New functions. Implement a breakpoint
- query.
-
- * defs.h (enum gdb_rc): Declare.
- (gdb_breakpoint_query): Declare.
-
-Mon Dec 13 14:18:06 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * gdb-events.h: Fix typo in description of breakpoint events.
- * gdb-events.sh: Update.
-
-Mon Dec 13 13:57:26 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * breakpoint.c (ep_type_description_t): Delete.
- (print_one_breakpoint): Add local declaration of struct
- ep_type_description.
-
-Mon Dec 13 12:38:31 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * top.h: Delete #include <setjmp.h>. Moved to top.c.
- (SIGJMP_BUF, SIGSETJMP, SIGLONGJMP, SIGJMP_BUF, SIGSETJMP,
- SIGLONGJMP): Delete. Moved to top.c
- (error_return, quit_return): Delete extern declarations.
-
- * top.c: #include <setjmp.h>.
- (error_return, quit_return): Make static.
- (SIGJMP_BUF, SIGSETJMP, SIGLONGJMP, SIGJMP_BUF, SIGSETJMP,
- SIGLONGJMP): Define.
-
-Mon Dec 13 11:54:12 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * tracepoint.c (trace_start_command, tracepoints_info): Print
- step_count using %ld.
- * Makefile.in (tracepoint.o): Compile tracepoint.o with -Werror.
-
-1999-12-12 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * target.h (enum target_waitkind): Add new enumeration value
- TARGET_WAITKIND_IGNORE. For inferior events that we should do
- nothing about.
-
- * remote.c (remote_async_wait): After each character of console
- output from the inferior, return to the event loop with an event
- kind of TARGET_WAITKIND_IGNORE instead of looping here.
-
- * infrun.c (handle_inferior_event): In case of
- TARGET_WAITKIND_IGNORE, return immediately, and set things up so
- that we are still waiting for the inferior.
-
-1999-12-12 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * event-loop.c (handle_timer_event): When calling the timer
- procedure, use the saved_timer data, not the timer_ptr data,
- because the latter has been already freed.
-
-Fri Dec 10 12:01:43 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * eval.c (evaluate_subexp): Only inline when GNUC and not STDC.
-
-Sat Dec 11 17:52:03 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * breakpoint.c (print_one_breakpoint): New function. Move
- breakpoint print code to here.
- (breakpoint_1): From here.
-
-Mon Dec 6 20:31:28 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * gdbarch.sh: Replace field init_p with invalid_p.
- (TARGET_BFD_VMA_BIT): New architecture vector method. Defaults to
- architecture bits_per_address.
- * gdbarch.h, gdbarch.c: Update.
- * defs.h (TARGET_BFD_VMA_BIT): Provide default of TARGET_PTR_BIT
- for non- multi-arch case.
-
- * gdbtypes.h (builtin_type_bfd_vma, builtin_type_ptr,
- builtin_type_CORE_ADDR): New GDB specific address types.
- * gdbtypes.c (_initialize_gdbtypes, build_gdbtypes): Initialize
- new builtin types.
-
-Wed Dec 8 17:48:56 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * config/sparc/nm-nbsd.h (FETCH_INFERIOR_REGISTERS): Delete
- definition. Already defined in config/nm-nbsd.h. Include the
- more explicit config/nm-nbsd.h.
-
- * config/sparc/nbsd.mt (TDEPFILES): Move solib.o from here.
- * config/sparc/nbsd.mh (NATDEPFILES): To here.
- * config/xm-nbsd.h: #include <sys/param.h> to get definition of
- NGROUPS needed by <limits.h> and missing on some systems.
- * config/nm-nbsd.h: Only macro's that match NetBSD definitions
- with what is expected by solib.c when not SVR4_SHARED_LIBS.
-
- * configure.host: Add patterns for sparc-*-netbsdaout* and
- sparc-*-netbsdelf*.
- * config/sparc/nm-nbsdelf.h: New file.
- * config/sparc/nbsdelf.mh: New file.
-
-Wed Dec 8 19:56:48 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * frame.h, blockframe.c: Rename default_frame_chain_valid to
- file_frame_chain_valid. Rename alternate_frame_chain_valid to
- func_frame_chain_valid.
-
- * config/sparc/tm-sparclite.h, config/mips/tm-mipsv4.h,
- config/m88k/tm-delta88v4.h, config/m68k/tm-m68kv4.h,
- config/m68k/tm-monitor.h, config/i386/tm-i386nw.h,
- config/i386/tm-i386v4.h, config/h8300/tm-h8300.h: Update.
- * mips-tdep.c (mips_gdbarch_init): Update.
-
-Wed Dec 8 19:12:17 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * blockframe.c (generic_file_frame_chain_valid): Rename
- generic_file_frame_chain_valid.
- * frame.h: Update.
- * config/fr30/tm-fr30.h, config/m32r/tm-m32r.h,
- config/mn10200/tm-mn10200.h, config/mn10300/tm-mn10300.h,
- config/sh/tm-sh.h, config/v850/tm-v850.h, config/mcore/tm-mcore.h:
- Update.
-
- * blockframe.c (generic_func_frame_chain_valid): New function.
- Implement dummy-frame equivalent of function based frame chain
- valid.
- * frame.h (generic_func_frame_chain_valid): Declare.
-
-Wed Dec 8 16:26:27 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * blockframe.c (alternate_frame_chain_valid,
- default_frame_chain_valid): Swap implementations. The change Mon
- Nov 30 11:18:48 1998 Andrew Cagney <cagney@chook> which converted
- several macros to functions was backwards.
-
- * mips-tdep.c (mips_gdbarch_init): Update. Call
- alternate_frame_chain_valid and not default_frame_chain_valid.
-
-Wed Dec 8 15:29:48 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * infptrace.c: Simplify handling of <sys/wait.h>. Always include
- "wait.h" from the ../include/wait.h directory. #include
- <sys/wait.h> was added as part of Mon Nov 29 12:14:10 1999 Andrew
- Cagney <cagney@b1.cygnus.com> but the ChangeLog was omitted.
-
-1999-12-07 Jim Blandy <jimb@cygnus.com>
-
- Add support for SSE registers in core files.
- * corelow.c (get_core_register_section): New function.
- (get_core_registers): Fetch the new ".reg-xfp" sections,
- in addition to the traditional ".reg" and ".reg2" sections.
- Check for per-thread variants of all three. Use
- get_core_register_section, instead of writing it out over and over
- again.
- * i386-linux-nat.c (i386_linux_fetch_core_registers): New function.
- (i386_linux_nat_core_fns): New core_fns structure. We do our own
- core handling now, instead of using the generic code in core-regset.c.
- (_initialize_i386_linux_nat): New function, needed to register
- i386_linux_nat_core_fns.
- * config/i386/linux.mh (NATDEPFILES): Remove core-regset.o;
- i386-linux-nat.c has its own sniffer now.
- * gdbcore.h: (struct core_fns): Doc fix.
-
- * i386v-nat.c (i386_float_info): Definition is #if 0'd; delete it
- altogether. This should use the function i387-tdep.c.
-
- Patch from Mark Kettenis <kettenis@gnu.org>:
-
- * config/i386/tm-i386.h (FLOAT_INFO): New define.
- * i387-tdep.c (print_i387_value, print_i387_ext,
- print_i387_status_word, print_i387_control_word, i387_float_info):
- New functions, used to implement generic `info float' command.
-
-1999-12-06 Christopher Faylor <cgf@cygnus.com>
-
- * dcache.c (set_dcache_state): New function.
- * dcache.h: Declare set_dcache_state().
-
-Sat Dec 4 15:17:44 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote.c (build_remote_packet_sizes): Reduce the default packet
- size of 400 bytes by one to 399. Stops GDB trashing stubs that
- append a trailing NUL to an already full buffer.
-
-Sat Dec 4 01:16:47 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * tracepoint.c (remote_get_noisy_reply): Add parameter sizeof_buf.
- (finish_tfind_command): Add parameter sizeof_msg.
-
- * remote.c (remote_threads_info): Move assignment operator to
- outside of function call.
- (remote_send): Add parameter sizeof_buf.
- (getpkt): Add parameter sizeof_buf. Call read_frame passing in
- sizeof_buf.
-
- * remote.h (getpkt): Update.
-
- * tracepoint.c (remote_set_transparent_ranges,
- remote_get_noisy_reply, trace_start_command, trace_stop_command,
- trace_status_command, finish_tfind_command, trace_find_pc_command,
- trace_find_tracepoint_command, trace_find_line_command,
- trace_find_range_command, trace_find_outside_command): Update.
-
- * remote.c (set_thread, remote_thread_alive,
- remote_get_threadinfo, remote_get_threadlist,
- remote_current_thread, remote_threads_info,
- extended_remote_restart, get_offsets, remote_open_1,
- remote_async_open_1, remote_wait, remote_async_wait,
- remote_fetch_registers, check_binary_download, remote_write_bytes,
- remote_read_bytes, remote_send, remote_detach,
- remote_async_detach, remote_fetch_registers,
- store_register_using_P, store_register_using_P,
- remote_fetch_registers, remote_store_registers, putpkt_binary,
- remote_insert_breakpoint, remote_remove_breakpoint,
- compare_sections_command, remote_rcmd, packet_command,
- remote_info_process, remote_query, remote_insert_watchpoint,
- remote_search, remote_remove_watchpoint,
- remote_insert_hw_breakpoint, remote_remove_hw_breakpoint): Update.
-
-Fri Dec 3 17:38:06 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * (read_frame): Add sizeof_buf parameter. Don't allow repeat when
- first character. Always leave space at the end of the buffer.
- Return size of packet or -1.
- (getpkt): Update. Pass in PBUFSIZ.
-
-Thu Dec 2 17:14:53 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * ser-pipe.c: Include <string.h> for memset().
-
-1999-12-01 Jim Blandy <jimb@cygnus.com>
-
- * gdbtypes.c (builtin_type_v4si, builtin_type_v8qi,
- builtin_type_v4hi, builtin_type_v2si): New SIMD types.
- (build_gdbtypes): Initialize them.
- (_initialize_gdbtypes): Gdbarch_swap them.
- * gdbtypes.h (builtin_type_v4si, builtin_type_v8qi,
- builtin_type_v4hi, builtin_type_v2si): Declare them.
-
- * findvar.c (read_register_bytes, write_register_bytes): Correctly
- determine how the region the caller is writing overlaps with each
- register's bytes.
-
- * value.h (struct value): Doc fixes.
-
- * valops.c (value_assign): Clarify error message.
-
-1999-12-01 Christopher Faylor <cgf@cygnus.com>
-
- * config/i386/tm-cygwin.h: Change tm-i386.h include back to tm-i386v.h.
-
-1999-12-01 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * inf-loop.c (inferior_event_handler): In case of
- INF_EXEC_CONTINUE, don't do all the regular continuations, but
- just the intermediate ones.
-
- * infcmd.c (step_once): Add the continuation to the
- intermediate_continuation list instead of the regular continuation
- list.
-
- * utils.c (add_intermediate_continuation): New function, to add
- continuations to the intermedite_continuation list.
- (do_all_intermediate_continuations): New function, do all the
- continuations in the intermediate list.
- (discard_all_intermediate_continuations): New function, discard
- all the continuations in the intermediate list.
- (intermediate_continuation): New global list for use by step_1().
-
- * defs.h: Export intermediate_continuation,
- add_intermediate_continuation, do_all_intermediate_continuations,
- discard_all_intermediate_continuations.
-
-1999-11-30 Christopher Faylor <cgf@cygnus.com>
-
- * win32-nat.c (mappings): Reorganize slightly for new uniform i386
- register configuration.
- (do_child_fetch_inferior_registers): Handle special case floating point
- registers.
- (handle_output_debug_string): Handle cygwin-specific signals broadcast
- from the cygwin DLL.
- (handle_exceptions): Add code to properly allow continuation after a
- CTRL-C.
- (child_continue): Accept propagated "continue_status" which controls
- how the inferior should be continued.
- (get_child_debug_event): New function.
- (child_wait): Use above function to handle debug events.
- (child_create_inferior): Add more intelligent method for running the
- inferior to the appropriate point before handing it off to the rest of
- gdb.
- (child_stop): Specifically send a CTRL-C to the debugged process.
- (child_kill_inferior): Set global continue status here to cause
- inferior to run to completion.
- (child_resume): Eliminate code which attempts to decide how to continue
- the inferior. This is now handled by child_continue.
- * config/i386/tm-cygwin.h: Gut and reorganize for consistency with new
- tm-i386.h.
-
- Patch from Egor Duda (deo@logos-m.ru)
- * win32-nat.c (psapi_get_dll_name): New function.
- (handle_load_dll): Correctly load DLL symbol tables after attaching to
- a running pid.
-
-1999-11-30 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * infrun.c (handle_inferior_pid): revert 11-29 change: resuming
- a thread other than the current thread with a signal. Apparently
- target_resume with a specific pid, a specific signal, and no step
- means to continue ALL threads but to only send the signal to one
- (and not, as I had assumed, to continue only the specified thread).
- * i386-linux-nat.c (fill_gregset): guard against invalid input.
-
-1999-11-30 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * infcmd.c (step_once): New function. Used to do just one step
- operation.
- (step_1_continuation): New function. Figure out if we need to step
- again before returning control to the user.
- (step_1): If we are in asynchronous mode, don't do the for loop,
- but rather delegate to continuations the task of repeating the
- step operation.
-
- * utils.c (do_all_continuations): Copy the continuation list aside
- before working on it.
-
- * target.h (enum inferior_event_type): Add new enum
- INF_EXEC_CONTINUE.
-
- * inf-loop.c (inferior_event_handler): Handle new case
- INF_EXEC_CONTINUE.
-
- * infrun.c (fetch_inferior_event): If we are in the middle of a
- 'step n' type command, don't say that the execution is complete,
- but that it will have to continue.
-
-1999-11-30 Kevin Buettner <kevinb@cygnus.com>
-
- * utils.c (verror): Don't traverse va_list argument twice. Also,
- removed extraneous va_end() call.
-
-1999-11-29 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * infrun.c (handle_inferior_pid): If a child thread stops on a
- signal that we are ignoring, and GDB silently resumes the child,
- resume ALL threads (not just the one that got the signal). All
- threads are stopped, so all must be resumed.
- (handle_inferior_event): on detecting a thread context switch,
- swap infrun_state ONLY if both the old thread and the new one
- are in the thread list. Otherwise state information will be lost!
- Problem may arise with flaky back-ends.
-
-1999-11-29 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * breakpoint.c (bpstat_stop_status): Don't decrease hit_count
- in case of a wp that has not changed.
-
-Mon Nov 29 12:14:10 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * gdbtypes.c (init_simd_type): Make static.
-
- * configure.in (AC_CHECK_HEADERS): Check for <sys/ioctl.h>.
- * configure, config.h: Re-generate.
- * inflow.c: Include <sys/ioctl.h>
-
- * i386b-nat.c: Include "gdbcore.h".
- * fork-child.c: Include "command.h".
-
- * remote.c (remote_cisco_section_offsets,
- remote_start_remote_dummy, store_register_using_P,
- remote_info_process, remote_cisco_open, remote_cisco_close,
- readsocket, readtty, minitelnet, remote_cisco_wait,
- init_remote_async_ops, init_extended_async_remote_ops,
- set_remote_cmd), infrun.c (default_skip_permanent_breakpoint): Use
- ISO-C syntax for function definition.
-
-Mon Nov 29 11:28:21 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * stabsread.c: Revert 1999-11-09 Jim Blandy
- <jimb@zwingli.cygnus.com> and 1999-11-08 Jim Blandy
- <jimb@cygnus.com>. Broken on non-Linux targets.
-
-1999-11-26 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * symfile.c (show_load_progress): Add total sent so far to the
- information passsed to the hook users.
- (generic_load): Collect total sent so far and pass that to the
- progress hook.
-
- * defs.h (show_load_progress): Update.
-
-1999-11-25 Nick Clifton <nickc@cygnus.com>
-
- * coffread.c (coff_symfile_read): Treat "epoc-pe" targets as "pe"
- targets.
- * dbxread.c (dbx_read_symfile): Treat "epoc-pe" targets as "pe"
- targets.
-
-Wed Nov 24 17:07:28 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * Makefile.in (init.c): Add SUBDIR_INIT_FILES so that sub
- directories can hook in extra init files.
-
-1999-11-23 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * defs.h (show_load_progress): Export.
-
- * symfile.c (show_load_progress): New hook for download.
- (generic_load): Collect total size of executable to load.
- Call progress hook when downloading.
-
-Thu Nov 18 11:54:24 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * arc-tdep.c (codestream_fill): Rewrite byte swap code using
- function extract_unsigned_integer.
-
-Wed Nov 17 17:01:06 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * arm-xdep.c: #include "arm-opcode.h" -> "opcode/arm.h".
-
-1999-11-22 Jim Blandy <jimb@cygnus.com>
-
- * Makefile.in (i386-tdep.o): Update list of dependencies.
-
-1999-11-22 Jim Blandy <jimb@cygnus.com>
-
- * config/i386/tm-i386v.h (NUM_REGS, REGISTER_NAMES,
- REGISTER_BYTES, REGISTER_BYTE, REGISTER_RAW_SIZE,
- REGISTER_VIRTUAL_SIZE, MAX_REGISTER_RAW_SIZE,
- MAX_REGISTER_VIRTUAL_SIZE, REGISTER_VIRTUAL_TYPE): Deleted. All
- of these should inherit identical or compatible values from
- tm-i386.h, as long as you don't define HAVE_SSE_REGS or
- HAVE_I387_REGS, which are new anyway.
-
-Mon Nov 22 21:39:27 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * target.c (do_target_signal_to_host): New function. Indicate of
- the conversion was successful to the caller via an additional
- parameter.
- (target_signal_to_host_p): New function. Return non-zero if the
- GDB signal exists on the host system.
- (target_signal_to_host): Rewrite. Use do_target_signal_to_host.
- * target.h (target_signal_to_host_p): Add declaration. Document
- target_singal vs host signal vs target OS signal confusion.
-
- From 1999-11-08 Jimmy Guo <guo@cup.hp.com>:
- * hppah-nat.c (require_notification_of_events): Start by ignoring
- all signals and then adding back in ones we're interested in.
-
-Thu Nov 18 18:12:48 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * jv-typeprint.c (java_type_print_base), kod-cisco.c
- (cisco_kod_open), kod.c (kod_set_os), xcoffread.c
- (process_linenos), symfile.c (add_symbol_file_command),
- remote-rdi.c (arm_rdi_open, rdilogfile_command), main.c
- (captured_main), go32-nat.c (go32_create_inferior), exec.c
- (exec_file_attach), corefile.c (core_file_command,
- reopen_exec_file): Replace strdup with xstrdup.
-
-Mon Nov 22 12:02:47 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * bcache.c (print_bcache_statistics): Fix printf_filtered
- arguments.
- (print_percentage): Make function void.
-
-1999-11-21 Jim Blandy <jimb@cygnus.com>
-
- Make the bcache hash table grow.
- * bcache.h (BCACHE_NUM_BUCKETS): Delete definition.
- (struct bcache): Add new element: num_buckets. Make bucket be a
- pointer to an array, not an array.
- (free_bcache): New extern declaration.
- * bcache.c (CHAIN_LENGTH_THRESHOLD): New constant.
- (expand_hash_table): New function.
- (bcache): Grow the hash table if the average chain length reaches
- CHAIN_LENGTH_THRESHOLD.
- (free_bcache): New function.
- (print_bcache_statistics): Don't assume that the number of buckets
- is constant any more.
- (BSTRING_SIZE): Moved down to just above 'bcache' function, where
- it's used.
- * objfiles.c (free_objfile): Call free_bcache, instead of just
- freeing the bcache's obstack directly.
- * symfile.c (reread_symbols): Same.
-
-1999-11-20 Jim Blandy <jimb@cygnus.com>
-
- * bcache.c, bcache.h: Rewritten. New version imposes less memory
- overhead, and has a more effective hash function, so it's probably
- faster, too.
-
- * config/nm-linux.h: No need to check whether __STDC__ is
- #defined --- GDB requires ANSI C now.
-
- * config/i386/nm-linux.h (linuxthreads_pid_to_str,
- linuxthreads_prepare_to_proceed): Delete declarations --- they're
- provided by config/nm-linux.h now.
-
-1999-11-19 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * top.c (print_command_lines): Remove unused var.
-
-1999-11-19 Jim Kingdon <kingdon@redhat.com>
-
- Patch applied by Jim Blandy <jimb@cygnus.com>:
-
- Enable threads for all linux architectures:
- * config/nm-linux.h: New file.
- config/alpha/nm-linux.h, config/i386/nm-linux.h,
- config/m68k/nm-linux.h, config/sparc/nm-linux.h: Use it.
- * config/tm-linux.h: New file.
- * config/i386/tm-linux.h, config/m68k/tm-linux.h,
- config/sparc/tm-linux.h, config/alpha/tm-alphalinux.h: Use it.
- * config/m68k/linux.mh, config/sparc/linux.mh,
- config/alpha/alpha-linux.mh: Add linux-thread.o.
-
-1999-11-18 Tom Tromey <tromey@cygnus.com>
-
- * tracepoint.h (get_tracepoint_by_number): Updated declaration.
- * tracepoint.c (trace_pass_command): Better error message. Fixed
- logic when `all' not specified.
- (get_tracepoint_by_number): Added `optional_p' argument. Fixed
- all callers.
-
-Wed Nov 17 17:40:30 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * findvar.c (SWAP_FLOATING): Delete macro. Unused.
-
-1999-11-16 Mark Salter <msalter@cygnus.com>
-
- * monitor.c (monitor_supply_register): Initialize value to zero.
-
-1999-11-15 Eli Zaretskii <eliz@is.elta.co.il>
-
- (Patches applied by Jim Blandy <jimb@zwingli.cygnus.com>)
-
- Change DJGPP target use the common register layout in
- config/i386/tm-i386.h.
- * config/i386/tm-go32.h: #include "i386/tm-i386.h", not
- "i386/tm-i386v.h".
- (HAVE_I387_REGS): Define.
- (HAVE_SSE_REGS): Undefine.
- (NUM_FREGS, NUM_REGS, REGISTER_NAMES, FP_REGNUM, SP_REGNUM,
- PS_REGNUM, PC_REGNUM, FP0_REGNUM, FPC_REGNUM, FPCWD_REGNUM,
- FPSWD_REGNUM, FPTWD_REGNUM, FPIPO_REGNUM, FPIPS_REGNUM,
- FPOOS_REGNUM, FPOPS_REGNUM, REGISTER_BYTES, REGISTER_BYTE,
- REGBYTE_0, REGBYTE_10 REGBYTE_16, REGBYTE_24, REGBYTE_29,
- REGISTER_RAW_SIZE, REGISTER_VIRTUAL_SIZE, MAX_REGISTER_RAW_SIZE,
- MAX_REGISTER_VIRTUAL_SIZE, REGISTER_CONVERTIBLE): Definitions
- deleted.
- (i387_to_double, double_to_i387): Declarations deleted.
- (REGISTER_CONVERT_TO_VIRTUAL, REGISTER_CONVERT_TO_RAW,
- REGISTER_VIRTUAL_TYPE): Use definitions from
- config/i386/tm-i386.h, unless LD_I387 is #defined.
-
- * go32-nat.c (go32_fetch_registers, store_register)
- (go32_create_inferior, init_go32_ops): Replace fatal with
- internal_error.
- (sig_map): Map exception 7 to TARGET_SIGNAL_EMT.
-
- * utils.c (notice_quit): Doc fixes.
-
-1999-11-15 Kevin Buettner <kevinb@cygnus.com>
-
- * gdbserver/server.h (initialize_low): Declare this target
- specific function.
- * gdbserver/server.c (main): Call initialize_low.
- * gdbserver/low-hppabsd.c, gdbserver/low-linux.c,
- gdbserver/low-sim.c, gdbserver/low-sparc.c, gdbserver/low-sun3.c
- (initialize_low): Renamed from initialize. Also removed
- initialization of inferior_pid.
- (have_inferior_p): Removed.
- * gdbserver/low-lynx.c (initialize_low): New function.
-
-1999-11-12 Fernando Nasser <fnasser@totem.to.cygnus.com>
-
- * remote-rdi.c: Fix indentation accordingly to GNU standards.
-
-Thu Oct 28 00:28:51 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * d10v-tdep.c (d10v_gdbarch_init): Make the d10v:ts3 the default.
-
-Tue Oct 26 09:57:29 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * gdbarch.sh: Re-sync with Cagney's earlier const change.
-
-Sun Oct 24 20:07:31 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * d10v-tdep.c (struct gdbarch_tdep): Replace nr_a_regs,
- imap0_regnum, nr_imap_regs, dmap0_regnum, with dmap_register and
- imap_register.
- (R0_REGNUM, LR_REGNUM, PSW_REGNUM, NR_IMAP_REGS, NR_A_REGS):
- Convert to enums.
- (TS2_NR_A_REGS, TS2_NR_IMAP_REGS, TS3_NR_IMAP_REGS,
- TS3_NR_A_REGS): Delete.
- (d10v_ts2_dmap_register, d10v_ts3_dmap_register,
- d10v_ts2_imap_register, d10v_ts3_imap_register): New functions.
- (d10v_dmap_register, d10v_imap_register,
- d10v_ts2_register_sim_regno, d10v_ts3_register_sim_regno,
- show_regs): Update.
- (remote_d10v_translate_xfer_address): Rewrite. Use
- sim_d10v_translate_addr to translate addresses.
- (d10v_gdbarch_init): Initialize tdep members dmap_register and
- imap_register.
-
-Sun Oct 24 00:12:44 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * d10v-tdep.c (struct gdbarch_tdep): Declare.
- (NR_IMAP_REGS, NR_DMAP_REGS, A0_REGNUM, NR_A_REGS): Redefine using
- value in gdbarch_tdep.
- (d10v_dmap_register, d10v_imap_register): Ditto.
- (d10v_ts2_register_name, d10v_ts2_register_sim_regno): Rename
- d10v_register_name and d10v_register_sim_regno
- (enum ts3_regnums, d10v_ts3_register_name,
- d10v_ts3_register_sim_regno, d10v_register_sim_regno): New.
- (d10v_gdbarch_init): Configure registers and G packet according to
- d10v/ts2 and d10v/ts3.
-
-Sat Oct 23 21:28:02 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * config/d10v/tm-d10v.h (IMAP0_REGNUM, IMAP1_REGNUM, DMAP_REGNUM):
- Delete macro.
- (R0_REGNUM, LR_REGNUM, PSW_REGNUM, A0_REGNUM): Move from here.
- * d10v-tdep.c: To here.
-
- * d10v-tdep.c: (NR_DMAP_REGS, NR_IMAP_REGS, NR_A_REGS): Define.
- (d10v_dmap_register, d10v_imap_register): New functions.
- (remote_d10v_translate_xfer_address): Make static.
- (d10v_register_virtual_size): Use TYPE_LENGTH of
- REGISTER_VIRTUAL_TYPE.
- (d10v_register_byte, do_d10v_pop_frame,
- remote_d10v_translate_xfer_address, show_regs,
- d10v_register_raw_size): Ditto.
- (d10v_register_virtual_type): Ditto. Use explicitly sized builtin
- types.
-
-Sat Oct 23 19:08:39 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * d10v-tdep.c: Include "sim-d10v.h".
- (enum ts2_regnums): Declare.
- (d10v_register_sim_regno): New function.
-
- * config/d10v/tm-d10v.h: Delete pre multi-arch code.
- (REGISTER_SIM_REGNO): Define.
- (d10v_register_sim_regno): Declare.
-
-Sat Oct 23 16:39:34 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * gdbarch.c (initialize_current_architecture): Make ``choice''
- const.
-
-Wed Nov 10 16:10:22 1999 Jeffrey A Law (law@cygnus.com)
-
- * hppa-tdep.c (hppa_fix_call_dummy): Fix typo in error message.
-
-Wed Nov 10 16:47:06 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * utils.c (error_last_message): Use gdb_file_xstrdup.
-
- * defs.h (verror, internal_verror): Declare.
-
- * utils.c (verror, internal_error): New functions.
- (error, internal_error): Use verror / internal_verror.
- (error_stream): Use gdb_file_xstrdup. Correctly handle %s in
- error message body.
- (error_init): Use mem_fileopen.
-
- * corefile.c (memory_error): Use mem_fileopen instead of
- tui_sfileopen. Don't call error_begin.
- * remote-sim.c (gdb_os_error): Rewrite using verror. Don't call
- error_begin.
-
-Wed Nov 10 14:21:43 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * defs.h (gdb_file_xstrdup): New function.
- * utils.c (gdb_file_xstrdup, do_gdb_file_xstrdup): Implement.
-
-1999-11-09 Stan Shebs <shebs@andros.cygnus.com>
-
- * exec.c (exec_file_attach), irix5-nat.c, osfsolib.c, solib.c
- (info_sharedlibrary_command), pa64solib.c
- (pa64_sharedlibrary_info_command), somsolib.c
- (som_sharedlibrary_info_command): Replace "exec file" with
- "executable file" in messages.
-
-1999-11-09 Jim Blandy <jimb@zwingli.cygnus.com>
-
- Finish the job attempted by the previous change.
- * stabsread.c (read_range_type): Make n2 and n3 LONGEST. Adjust
- the various tests that check for maximum values, bit counts, etc.
- In the long run, it might have been simpler just to give GDB bignums.
-
-Tue Nov 9 18:34:13 1999 Andrew Cagney <cagney@amy.cygnus.com>
-
- * defs.h (gdb_file_put): Add parameter write.
- (gdb_file_put_method_ftype): New typedef.
- * utils.c (gdb_file_put, mem_file_put, tui_file_put,
- null_file_put): Update.
-
- * utils.c (struct gdb_file): Add field magic.
- (gdb_file_new): Initialize.
- (gdb_file_data): Verify.
-
- * utils.c (mem_file_fputs): Delete. Replaced by.
- (mem_file_write): New function. Rewrite mem_file.
- (mem_file_new): Update.
-
-Tue Nov 9 17:51:12 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote-sim.c (gdb_os_write_stdout): Use gdb_file_write.
- (gdb_os_flush_stdout): Flush gdb_stdtarg instead of gdb_stdout.
-
-Tue Nov 9 15:33:43 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * Makefile.in (procfs.o): Don't compile with -Werror for moment.
- * sol-thread.c (info_cb): Move assignments to outside of if
- statement.
- (info_cb): Use paddr when printing addresses.
-
-1999-11-08 Jim Blandy <jimb@cygnus.com>
-
- * defs.h (ULONGEST_MAX, LONGEST_MAX): New definitions.
- * stabsread.c (read_huge_number): Parse and return LONGEST values.
-
-1999-11-08 Mark Salter <msalter@cygnus.com>
-
- * utils.c (floatformat_to_doublest): Fix conversion of denormals.
-
-Mon Nov 8 20:14:13 1999 Andrew Cagney <cagney@amy.cygnus.com>
-
- * remote.c (get_memory_read_packet_size): For moment limit read
- size to PBUFSIZ.
- (putpkt_binary): Remove check on packet size. Allocate ``cnt +
- 6'' characters for output buffer.
- (get_memory_packet_size): When packet size is ``fixed'' and the
- size is zero, return MAX_REMOTE_PACKET_SIZE. Check that packets
- are at least MIN_REMOTE_PACKET_SIZE.
- (set_memory_packet_size): Print usage when ``args'' is NULL.
-
-Mon Nov 8 18:18:07 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * defs.h, utils.c (gdb_file_deallocate): Delete.
- * corefile.c (memory_error): Use make_cleanup_gdb_file_delete.
-
- * defs.h, utils.c (gdb_file_init_astring): Delete.
-
- * defs.h, utils.c (tui_file_get_strbuf): Rename
- gdb_file_get_strbuf.
- (tui_file_adjust_strbuf): Rename gdb_file_adjust_strbuf.
- * utils.c (error_stream, error_last_message): Update.
-
-Mon Nov 8 16:28:00 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * defs.h, utils.c (gdb_fclose): Delete.
- * defs.h (make_cleanup_gdb_file): Declare.
- * utils.c (make_cleanup_gdb_file_delete, do_gdb_file_delete): New
- functions.
-
- * symmisc.c (maintenance_print_symbols,
- maintenance_print_psymbols, maintenance_print_msymbols): Use
- make_cleanup_gdb_file_delete.
- * serial.c (do_serial_close): Use gdb_file_delete.
-
-Mon Nov 8 14:16:32 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * defs.h (gdb_file_write_ftype, set_gdb_file_write,
- gdb_file_write): Declare.
-
- * utils.c (struct gdb_file): Add to_write member.
- (gdb_file_write, set_gdb_file_write): New functions.
- (gdb_file_new): Initialize the write method.
- (null_file_write): New function.
- (null_file_fputs, null_file_write): ``write'' calls ``fputs'' and
- ``fputs'' calls ``write'' when the other is implemented.
- (stdio_file_new): Initialize write method.
- (stdio_file_write): New function.
-
- * utils.c (putchar_unfiltered, fputc_unfiltered): Use
- gdb_file_write.
-
-Thu Nov 4 11:59:24 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote.c (get_memory_packet_size, set_memory_packet_size,
- build_memory_packet_size): New functions. Set / compute / update
- the size of a memory read / write packet.
- (set_memory_read_packet_size, set_memory_write_packet_size): New
- functions. Verify changes to the memory read / write packet size.
- (prefered_memory_write_packet_size,
- current_memory_write_packet_size, prefered_memory_read_packet_size,
- current_memory_read_packet_size): New variables.
- (get_memory_read_packet_size, get_memory_write_packet_size): New
- functions. Determine the current memory read/write packet size. A
- function is needed as ``current_register_packet_size'', a variable
- is used in the calculation.
- (register_remote_packet_sizes, build_remote_packet_sizes):
- Initialize packet sizes according the current architecture.
- (remote_fetch_registers, remote_write_bytes, remote_read_bytes,
- build_remote_gdbarch_data): Update.
- (_initialize_remote): Add the commands ``set remote
- memory-read-packet-size'' and ``set remote
- memory-write-packet-size''. Deprecate ``set remotepacketsize''.
-
-Sun Nov 7 18:09:54 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * target.h, target.c (target_load): Replace macro with a function.
-
- * config/i960/tm-nindy960.h (ADDITIONAL_OPTION_HANDLER): Rewrite
- replacing SET_TOP_LEVEL with catch_command_errors.
- (nindy_open): Add extern declaration.
-
- * top.h (top_level_val, SET_TOP_LEVEL): Delete.
- * defs.h (catch_command_errors_ftype, catch_command_errors): Add
- declarations.
- * top.c (struct captured_command_args): Declare.
- (do_captured_command, catch_command_errors): New functions. Call
- the command function via catch_errors.
- (catch_errors): Add more comments.
-
- * main.c (struct captured_main_args): Define.
- (captured_main): New. Rewrite main. Replace SET_TOP_LEVEL with
- calls to catch_command_errors. Delete calls to do_cleanups which
- are now handled by catch_errors. Call the command loop via
- captured_command_loop and catch_errors.
- (main): Move code body to captured_main. Call captured_main via
- catch_errors.
- (captured_command_loop): New function. Wrap call to command_loop.
-
-1999-11-05 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * procfs.c (unconditionally_kill_inferior) (init_procinfo)
- (create_procinfo) (procfs_exit_handler) (proc_set_exec_trap)
- (do_attach) (do_detach) (procfs_wait) (set_proc_siginfo)
- (procfs_resume) (info_proc_mappings)
- (modify_run_on_last_close_flag) (procfs_lwp_creation_handler)
- (procfs_thread_alive): Remove unused variables, conditionalize
- vars declarations to eliminate compiler warnings.
-
-Fri Nov 5 16:32:04 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * inferior.h (CALL_DUMMY_ADDRESS, CALL_DUMMY_START_OFFSET,
- CALL_DUMMY_BREAKPOINT_OFFSET, CALL_DUMMY_LENGTH,
- CALL_DUMMY_STACK_ADJUST, CALL_DUMMY_WORDS,
- SIZEOF_CALL_DUMMY_WORDS, PUSH_DUMMY_FRAME, FIX_CALL_DUMMY,
- STORE_STRUCT_RETURN), d10v-tdep.c (print_insn), d30v-tdep.c
- (print_insn), target.h (SOFTWARE_SINGLE_STEP): Call internal_error
- instead of abort.
-
- * utils.c (stdio_file_delete, stdio_file_flush, stdio_file_fputs,
- stdio_file_isatty, tui_file_delete, tui_file_isatty,
- tui_file_rewind, tui_file_put, gdb_file_init_astring,
- gdb_file_get_strbuf, gdb_file_adjust_strbuf): Call internal_error
- instead of error.
-
-1999-11-04 Kevin Buettner <kevinb@cygnus.com>
-
- * remote.c (build_remote_gdbarch_data): Set remote_address_size...
- (_initialize_remote) ...but don't set it here. Also, tie
- remote_address_size to the target architecture via call to
- register_gdbarch_swap().
-
-1999-11-04 Jeff Holcomb <jeffh@cygnus.com>
-
- * remote-rdp.c (send_rdp): Fix typo.
-
-1999-11-04 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * breakpoint.c (commands_command): remove unprotected ref to
- args pointer (which may be null).
-
-1999-11-04 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * infcmd.c (print_return_value): New function. Print return value
- from finish command.
- (finish_command_continuation): Call print_return_value().
- (finish_command): Ditto.
-
-1999-11-04 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * infrun.c (handle_inferior_event): Add calls to print_stop_reason()
- for end of stepping range cases.
-
-Thu Nov 4 17:46:36 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * event-loop.c (gdb_do_one_event): Delete SET_TOP_LEVEL call.
- Move error code to start_event_loop.
- (start_event_loop): Call gdb_do_one_event via catch_errors.
- Handle caught errors.
-
-Thu Nov 4 17:36:27 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * breakpoint.c (get_number): Delete static declaration.
-
-1999-11-03 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * breakpoint.c (map_breakpoint_numbers): use a match count
- instead of a goto.
-
-1999-11-03 Nick Clifton <nickc@cygnus.com>
-
- * config/mcore/tm-mcore.h (TARGET_BYTE_ORDER_DEFAULT): Change to
- little endian.
-
-1999-11-02 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * target.h (target_new_objfile) replace macro with function pointer
- hook. Any module needing notification of new objfiles may claim
- this hook. Multiple notification clients must cooperate by saving
- the previous pointer (if any) and calling it.
- * sol-thread.c (_initialize_sol_thread): point new_objfile hook at
- sol_thread_new_objfile. Save old pointer if any.
- (sol_thread_new_objfile): call old owner of event hook if any.
- * hpux-thread.c (_initialize_hpux_thread, hpux_thread_new_objfile):
- ditto.
- * linux-thread.c (_initialize_linux_thread, linux_thread_new_objfile):
- ditto.
- symfile.c (symbol_file_add, clear_symtab_users) call the new
- function pointer hook, instead of the macro.
- * config/sparc/nm-sun4sol2.h: remove define of target_new_objfile.
- * config/pa/nm-hppah.h: ditto.
- * config/i386/nm-i386sol2.h: ditto.
- * config/i386/nm-linux.h: ditto.
-
-1999-11-02 Tom Tromey <tromey@cygnus.com>
-
- * NEWS: Mention breakpoint ranges.
-
-1999-11-02 Fernando Nasser <fnasser@totem.to.cygnus.com>
-
- * rdi-share/devsw.c (openLogFile): Change a call to setlinebuf()
- to an equivalent call to setvbuf() to prevent an unresolved
- reference when building on cygwin.
-
-1999-11-02 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * infrun.c (inferior_stop_reason): New enum, explicitly name the
- resons for which the inferior stops.
- (handle_inferior_event): Case TARGET_WAITKIND_EXITED: replace
- printf's with call to print_stop_reason(). Case
- TARGET_WAITKIND_SIGNALLED: Same. When stopped by random signal:
- Same.
- (print_stop_reason): New static function. Print relevant messages
- when stopping.
-
-1999-11-02 Fernando Nasser <fnasser@totem.to.cygnus.com>
-
- * rdi-share/Makefile.in: Rename dependency from bytesex.o to
- angel_bytesex.o.
-
-1999-11-02 Fernando Nasser <fnasser@totem.to.cygnus.com>
-
- * kod.c: Remove prototype for show_kod() which is no longer used.
-
-1999-11-01 Michael Snyder <msnyder@cygnus.com>
- Tom Tromey <tromey@cygnus.com>
-
- * tracepoint.h (get_tracepoint_by_number): Updated declaration.
- * tracepoint.c (get_tracepoint_by_number): Added `multi_p'
- argument. Now uses get_number_or_range and get_number.
- (trace_pass_command): Allow a tracepoint range.
- * breakpoint.h (get_number, get_number_or_range): Declare.
- * breakpoint.c (get_number_trailer): New function.
- (get_number): Rewrote to use get_number_trailer.
- (get_number_or_range): New function.
- (condition_command): Check `get_number' return value.
- (commands_command): Likewise.
- (ignore_command): Likewise.
- (map_breakpoint_numbers): Use get_number_or_range.
-
-1999-11-01 Fernando Nasser <fnasser@totem.to.cygnus.com>
-
- * remote-rdi.c (_initialize_remote_rdi): Make log commands
- subcommands of maintenance. Remove improper identation from
- command documentation.
-
-1999-11-01 Fernando Nasser <fnasser@totem.to.cygnus.com>
-
- From Grant Edwards <grante@visi.com>:
- * rdi-share/etherdrv.c (fetch_ports): Print out additional TCP/IP
- port information in ethernet driver if the DEBUG flag is set.
- * rdi-share/hostchan.c (Adp_addToQueue): Changed #if statement in
- hostchan.c to avoid compiler complaint when DEBUG macro was
- undefined.
- * rdi-share/unixcomm.c (Unix_ReadSerial): Print system error code
- if read() system call fails.
-
-1999-11-01 Fernando Nasser <fnasser@totem.to.cygnus.com>
-
- * rdi-share/bytesex.h: Deleted. Conflicts with a system header file
- on some systems like Linux Red Hat 5.2.
- * rdi-share/angel_bytesex.h: New file. Replaces the above.
- * rdi-share/bytesex.c: Deleted. Name changed to match the header
- mentioned above (this is the implementation file).
- * rdi-share/angel_bytesex.c: New file. Replaces the above.
- * rdi-share/Makefile.am: Reflect above changes.
- * rdi-share/Makefile.in: Reflect above changes.
-
-1999-11-01 Jimmy Guo <guo@cup.hp.com>
-
- * annotate.c (breakpoints_changed, annotate_ignore_count_change,
- annotate_stopped): Provide annotation for breakpoint ignore_count
- changes but only provide once at annotate_stopped time for
- sucessive ignore_count triggered breakpoint changes, to make GUIs
- happy yet lazy.
- * annotate.h (annotate_ignore_count_change): Declare.
- * breakpoint.c (bpstat_stop_status): Call
- annotate_ignore_count_change when ignore_count changes.
-
-1999-11-01 Fernando Nasser <fnasser@totem.to.cygnus.com>
-
- From Grant Edwards <grante@visi.com>:
- * rdi-share/ardi.c (HandleStoppedMessage): Changed code that
- handles the "stop" message so that unrecognized errors are
- returned as "Error" rather than "NoError". The old code resulted
- in some error conditions not being reported to the user.
-
-1999-11-01 Fernando Nasser <fnasser@totem.to.cygnus.com>
-
- From Grant Edwards <grante@visi.com>:
- * remote-rdi.c (arm_rdi_open): Added a call to Adp_CloseDevice()
- before attempting to open a connection. This allows the user to
- issue the "target rdi" command multiple times (in case the user
- needs to change options or re-initialize the link).
-
-1999-11-01 Fernando Nasser <fnasser@totem.to.cygnus.com>
-
- From Grant Edwards <grante@visi.com>:
- * rdi-share/endian.h: Deleted. Name clash with
- /usr/include/endian.h. This was causing the wrong byte order to
- be used by htons() in the RDI Ethernet driver.
- * rdi-share/angel_endian.h: New file. Replaces the above.
- * rdi-share/ardi.c: Replace include to reflect the above change.
- * rdi-share/etherdrv.c: Ditto.
- * rdi-share/hsys.c: Ditto.
- * rdi-share/msgbuild.c: Ditto.
- * rdi-share/params.c: Ditto.
- * rdi-share/rx.c: Ditto.
- * rdi-share/tx.c: Ditto.
- * rdi-share/Makefile.am: Reflect above changes.
- * rdi-share/Makefile.in: Reflect above changes.
-
-1999-11-01 Fernando Nasser <fnasser@totem.to.cygnus.com>
-
- From Grant Edwards <grante@visi.com>:
- * remote-rdi.c (_initialize_remote_rdi): Added command
- rdilogenable. Allows the user to log ADP packets that are
- exchanged between gdb and the target. Both the raw packets are
- shown and some minimal decoding is attempted. Default state is
- disabled.
- (_initialize_remote_rdi): Added command rdilogfile. Allows the
- user to specify the filename to which the ADP packet log is to be
- written. Default state is "rdi.log".
- (rdilogenable_command): New function. Related to rdilogenable.
- (rdilogfile_command): New function. Related to rdilogfile.
- * rdi-share/devsw.c (openLogFile, closeLogFile,
- DevSW_SetLogEnable, DevSW_SetLogfile, dumpPacket): New
- functions. Implement logging.
- (DevSW_Read): Log if requested.
- (DevSW_Write): Log if requested.
- * rdi-share/devsw.h: Add prototypes for DevSW_SetLogfile and
- DevSW_SetLogEnable.
- * rdi-share/hostchan.c (Adp_SetLogEnable, Adp_SetLogfile): New
- functions. Related to rdilogenable and rdilogfile.
- * rdi-share/hostchan.h: Add prototypes for the above functions.
-
-1999-11-01 Fernando Nasser <fnasser@totem.to.cygnus.com>
-
- From Grant Edwards <grante@visi.com>:
- * remote-rdi.c (arm_rdi_open): Added code to split the arguments
- to the 'target rdi' command at the first space. The first word is
- passed to Adp_OpenDevice as the device name, the tail is passed as
- the "arguments" parameter. This allows user specified baud rates
- -- among other things that still need to be documented [e.g. (gdb)
- target rdi /dev/ttyS1 19200]. NB: With very limited testing, the
- ARM Embedded-ICE seems to run at 19.2K (though it is reported to
- be unreliable above 9600), and the EPI Jeeni seems to run at
- 38.4K.
-
-1999-11-01 Fernando Nasser <fnasser@totem.to.cygnus.com>
-
- From Grant Edwards <grante@visi.com>:
- * remote-rdi.c (_initialize_remote_rdi): Added the boolean
- set/show variable rdiromatzero. Should be set to true if the
- target has ROM at address 0. If true, then gdb will not tell the
- target to trap fetches to interrupt vectors (which are located at
- address 0). Using the Angel monitor, attempting to set
- breakpoints in ROM is an error. Using JTAG debugging of the
- ARM7TDMI, attempting to set more than two breakpoints in ROM is an
- error. Default state is false (vectors will be trapped) -- used to
- be hardwired false.
-
-1999-11-01 Fernando Nasser <fnasser@totem.to.cygnus.com>
-
- From Grant Edwards <grante@visi.com>:
- * remote-rdi.c (_initialize_remote_rdi): Added the boolean
- set/show variable rdiheartbeat. This enables or disables ADP
- link-check "heartbeat" packets sent by the host to the target.
- Heartbeat packets can cause both the ARM Embedded-ICE and the EPI
- Jeeni to malfunction: If a heartbeat packet is received by the
- target while it is sending a packet, that packet will be aborted,
- and the ADP protocol engine then gets very confused. Default state
- is off -- used to hardwired on.
-
-1999-10-29 Kevin Buettner <kevinb@cygnus.com>
-
- * i386-linux-nat.c (dummy_sse_values): Also define for systems
- without PTRACE_GETXFPREGS.
-
-1999-10-29 Jim Blandy <jimb@zwingli.cygnus.com>
-
- Hardware watchpoint fix from Eli Zaretskii <eliz@gnu.org>:
-
- * breakpoint.c (insert_breakpoints): Fetch the value of the
- expression we need to watch. If it's a lazy memory lvalue, then
- we need to fetch it now, before we start the inferior again.
- (insert_breakpoints, remove_breakpoint, bpstat_stop_status,
- can_use_hardware_watchpoint): Only those values representing
- memory we actually fetched need to be watched.
-
-1999-10-29 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * breakpoint.h (bpstat_print): Return 'enum print_stop_action',
- not 'int'.
-
-1999-10-29 Jim Blandy <jimb@zwingli.cygnus.com>
-
- * acconfig.h: Fix entries for HAVE_STRUCT_SAVE_STATE_T,
- HAVE_STRUCT_MEMBER_SS_WIDE, and HAVE_PTRACE_GETXFPREGS.
- * config.h.in: Regenerated.
-
-1999-10-28 Jim Blandy <jimb@zwingli.cygnus.com>
-
- Fixes for warnings from Andreas Jaeger <aj@suse.de>.
- * linux-thread.c (linuxthreads_sig_restart,
- linuxthreads_sig_cancel, linuxthreads_sig_debug): Add missing
- initializers to avoid gcc warnings.
- (resume_thread): Add braces as recommended by gcc -Wparentheses.
- (stop_thread): Likewise.
- (linuxthreads_wait): Likewise.
- (linuxthreads_find_trap): Likewise.
-
-1999-10-28 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * infcmd.c: Fix typo.
-
-1999-10-28 Jim Blandy <jimb@cygnus.com>
-
- * gdbtypes.c (init_simd_type): The upper bound to
- create_range_type is inclusive, not exclusive.
-
- Add preliminary support for the Pentium-III's Streaming SIMD
- Extensions --- specifically, the ability to read the XMM
- registers.
- * Configure.in: Check for PTRACE_GETXFPREGS, and #define
- HAVE_PTRACE_GETXFPREGS if we have it.
- * acconfig.h: Add entry for HAVE_PTRACE_GETXFPREGS.
- * configure, config.in: Regenerated.
- * config/i386/tm-linux.h (HAVE_SSE_REGS): #define, iff the
- configure script #defined HAVE_PTRACE_GETXFPREGS.
- (REGISTER_VIRTUAL_TYPE): Provide the proper types for the pointer
- registers and the SSE registers.
- * i386-linux-nat.c (GETREGS_SUPPLIES, GETFPREGS_SUPPLIES,
- GETXFPREGS_SUPPLIES): New macros.
- (have_ptrace_getxfpregs): New variable.
- (FPREGSET_T_FPREG_ADDR): Renamed from FPREGSET_T_FPREG_OFFSET.
- (supply_fpregset, convert_to_fpregset): Callers changed.
- (supply_xfpregset, convert_to_xfpregset, fetch_xfpregs,
- store_xfpregs, dummy_sse_values): New functions.
- (fetch_inferior_registers, store_inferior_registers): Use the
- *_SUPPLIES macros to decide how to fetch a given register. Use
- {fetch,store}_xfpregs and dummy_sse_values to provide access to
- the SSE registers, on systems where they are present.
-
-1999-10-28 Kevin Buettner <kevinb@cygnus.com>
-
- * gdbserver/gdbreplay.c (config.h, errno.h): Include.
- (perror_with_name): Don't declare sys_nerr, sys_errlist, or errno
- when STDC_HEADERS is defined.
- * gdbserver/utils.c (STDC_HEADERS): Likewise.
-
- * gdbserver/low-hppabsd.c, gdbserver/low-linux.c,
- gdbserver/low-lynx.c, gdbserver/low-sim.c, gdbserver/low-sparc.c,
- gdbserver/low-sun3.c (my_registers): Declare.
- (registers): Changed from array type to pointer type in order
- to match declaration in inferior.h in main gdb sources.
- * gdbserver/server.h (registers): Likewise.
- * gdbserver/remote-utils.c (outreg): Removed declaration of
- registers[].
-
- * gdbserver/low-linux.c (fetch_register): Changed PTRACE_PEEKUSR to
- PTRACE_PEEKUSER. [Note the missing 'E'.]
- (store_inferior_registers): Likewise for PTRACE_POKEUSER.
-
- * gdbserver/low-linux.c (sys/ptrace.h): Move include to
- avoid conflict with #defines coming from <sys/user.h>.
- (sys/reg.h): Only include when HAVE_SYS_REG_H is defined.
- (PTRACE_XFER_TYPE): Provide a default type in case
- the target doesn't define it.
- (fetch_register, read_inferior_memory, write_inferior_memory):
- Use PTRACE_XFER_TYPE instead of int for ptrace() transfers.
- (I386_GNULINUX_TARGET): Use #ifdef with this symbol instead
- of assuming it's an x86 target when it's not a m68k target.
- (i386_register_raw_size, i386_register_byte): Define these arrays
- to match other changes that've been occuring to the x86 target
- in the main gdb sources.
- (initialize_arch): New (static) function for doing target arch
- specific initializations.
-
- * gdbserver/server.h (MAXBUFBYTES, PBUFSIZ): New defines
- [actually stolen from remote.c].
- * gdbserver/remote-utils.c (putpkt): Use PBUFSIZ to make
- sure that buffer is big enough.
- * gdbserver/server.c (main): Ditto.
-
- * gdbserver/remote-utils.c (outreg): Allow register numbers
- bigger than 255.
- (prepare_resume_reply): Provide alternate mechanism,
- GDBSERVER_RESUME_REGS, for defining list of registers to send
- to gdb.
- * gdbserver/Makefile.in (INTERNAL_CFLAGS): Swapped order of
- INCLUDE_CFLAGS and BFD_CFLAGS to ensure that gdb's config.h
- gets found before bfd's config.h. Also added -DGDBSERVER
- switch.
- (INCLUDE_CFLAGS): Added -I.. .
-
-1999-10-27 Nick Clifton <nickc@cygnus.com>
-
- * arm-tdep.c (THUMB_BE_BREAKPOINT): Change to 0xbebe.
- (THUMB_LE_BREAKPOINT): Change to 0xbebe.
-
-Mon Oct 25 18:22:06 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote.c: Document future of compare_sections_command.
- (remote_insert_breakpoint, remote_remove_breakpoint,
- remote_insert_watchpoint, remote_insert_watchpoint,
- remote_remove_watchpoint, remote_insert_hw_breakpoint,
- remote_remove_hw_breakpoint): Use alloca instead of GCC's dynamic
- array feature.
-
-Mon Oct 25 18:08:31 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * gdbarch.h (REGISTER_GDBARCH_SWAP): Define.
- * gdbarch.sh: Update.
-
-Sat Oct 23 16:39:34 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * gdbarch.c (initialize_current_architecture): Make ``choice''
- const.
-
-1999-10-22 Tom Tromey <tromey@cygnus.com>
-
- * gdbarch.sh: Updated for gdbarch.[ch] changes.
- * top.c (gdb_init): Call initialize_current_architecture.
- * gdbarch.h (initialize_current_architecture): Declare.
- * gdbarch.c (initialize_current_architecture): New function.
-
-1999-10-21 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * utils.c (chars_per_line): fix typo in comment.
-
-1999-10-21 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * breakpoint.h (bp_print_how): New enum, used for deciding how to
- print bpstat information when we stop, instead of having 3
- different functions.
- (struct bpstat): Change print_it field to be an enum instead of a
- function pointer.
-
- * breakpoint.c (print_it_typical): New name for print_it_normal().
- (print_bp_stop_message): New function. High level routine for
- printing of why we stopped.
- (bpstat_print): Call print_bp_stop_message instead of using the
- print_it function pointer.
- (print_it_done, print_it_noop): Delete these functions.
-
-1999-10-21 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * breakpoint.c (print_it_normal): Reorganize into a switch
- statement.
-
-1999-10-21 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * Makefile.in (event-top.o): Add dependency on target.h.
- * event-top.c: Make dependency on target.h explicit.
-
- * breakpoint.c (bpstat_print): Clean up logic. Remove recursion.
- (catch_exec_command_1): Surround with appropriate ifdef's,
- to avoid compiler warnings.
- (catch_fork_command_1): Ditto.
-
-1999-10-20 Jim Blandy <jimb@cygnus.com>
-
- * Makefile.in (dwarf2read.o): Note that this depends on bfd/elf-bfd.h.
- (elf_bfd_h): New variable.
-
-1999-10-19 Jim Blandy <jimb@cygnus.com>
-
- * config/i386/tm-i386.h (REGISTER_NAMES): Change names of FPU
- instruction and operand pointer registers to improve consistency,
- following J. T. Conklin's suggestions.
-
-1999-10-18 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * breakpoint.h: Change return type of field print_it of struct
- bpstats to enumeration print_stop_action.
- Define new enumeration print_stop_action.
-
- * breakpoint.c (print_it_normal): Change return type to
- enumeration type print_stop_action. Handle bp_shlib_event here
- instead of in normal_stop().
- (bpstat_print): Change return type to enumeration type
- print_stop_action.
- (print_it_done): Ditto.
- (print_it_noop): Ditto.
-
- * infrun.c (is_internal_shlib_eventpoint): Delete this function.
- (stopped_for_internal_shlib_event): Delete.
- (normal_stop): Move logic to handle bp_shlib_event from here to
- print_it_normal(). Use switch to handle return value from
- bpstat_print().
-
-Mon Oct 18 17:32:51 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * symfile.c (generic_load): Rewrite. Make the size of each
- chunk/block write a run-time option. Check for quit_flag.
- Use target_write_memory_partial for downloads.
-
-1999-10-18 Jim Blandy <jimb@cygnus.com>
-
- Change Linux x86 register support to use the new tm-i386.h layout.
- * config/i386/tm-linux.h (HAVE_I387_REGS): #define this, so we get
- the full set of FP register definitions from tm-i386.h.
- (REGISTER_RAW_SIZE, REGISTER_NAMES, REGISTER_BYTES, REGISTER_BYTE,
- MAX_REGISTER_VIRTUAL_SIZE, MAX_REGISTER_RAW_SIZE, NUM_REGS,
- NUM_FREGS): Remove #undefs and subsequent redefinitions: we're
- using the values from tm-i386.h now.
- (FPSTART_REGNUM, FPCONTROL_REGNUM, FPSTATUS_REGNUM, FPTAG_REGNUM,
- FPDATA_REGNUM, FPEND_REGNUM, FPENV_BYTES, FPREG_RAW_SIZE,
- FPREG_BYTES): Deleted.
- (TARGET_LONG_DOUBLE_BIT): Deleted.
- (REGISTER_CONVERTIBLE, REGISTER_CONVERT_TO_VIRTUAL,
- REGISTER_CONVERT_TO_RAW): Redefine these only if LD_I387 is #defined.
- * i386-linux-nat.c (convert_to_gregset, convert_to_fpregset,
- FPREGSET_T_FPREG_OFFSET): New functions and macros.
- (supply_gregset, fill_gregset, supply_fpregset,
- fill_fpregset, fetch_fpregs, store_fpregs, fetch_regs,
- store_regs, fetch_inferior_registers, store_inferior_registers):
- Adjusted to use new macros from tm-i386.h.
-
- * config/i386/tm-i386.h: Provide a decent x86 FPU description here,
- so that the various i386 targets can share more FPU handling code.
- (NUM_GREGS): New macro.
- (NUM_SSE_REGS): New macro, dependent on HAVE_SSE_REGS
- (NUM_FREGS): Depend on HAVE_I387_REGS.
- (NUM_REGS, REGISTER_BYTES): Define in terms of NUM_GREGS,
- NUM_FREGS, and NUM_SSE_REGS.
- (MAX_NUM_REGS): New macro.
- (REGISTER_NAMES): Expand name list with FPU control registers and
- SSE registers.
- (FP7_REGNUM, FCTRL_REGNUM, FSTAT_REGNUM, FTAG_REGNUM, FCS_REGNUM,
- FCOFF_REGNUM, FDS_REGNUM, FDOFF_REGNUM, FOP_REGNUM,
- FIRST_FPU_CTRL_REGNUM, LAST_FPU_CTRL_REGNUM): New macros, more
- fully describing the FPU register set.
- (XMM0_REGNUM, XMM7_REGNUM, MXCSR_REGNUM): New macros, describing
- the SSE register set.
- (IS_FP_REGNUM, IS_SSE_REGNUM, FPU_REG_RAW_SIZE, SIZEOF_GREGS,
- SIZEOF_FPU_REGS, SIZEOF_FPU_CTRL_REGS, SIZEOF_SSE_REGS): New
- convenience macros.
- (REGISTER_BYTE, REGISTER_RAW_SIZE, REGISTER_VIRTUAL_SIZE): Turn
- these into tables, since the register sizes are pretty irregular.
- (i386_register_byte, i386_register_raw_size,
- i386_register_virtual_size): New extern declarations.
- (TARGET_LONG_DOUBLE_BIT): Define.
- (MAX_REGISTER_RAW_SIZE): Bump to 16, for the SSE registers.
- (REGISTER_VIRTUAL_TYPE, REGISTER_CONVERTIBLE,
- REGISTER_CONVERT_TO_VIRTUAL, REGISTER_CONVERT_TO_RAW): New macros
- for handling floating-point registers.
- (i387_to_double, double_to_i387): New extern declarations.
- * i386-tdep.c (i386_register_byte, i386_register_raw_size,
- i386_register_virtual_size): New arrays.
- (_initialize_i386_tdep): Initialize i386_register_byte and
- i386_register_virtual_size.
-
- * i386-tdep.c (_initialize_i386_tdep): Move new_cmd to a block
- created specially for its use.
-
-Mon Oct 18 23:36:58 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * symfile.c (generic_load): Cleanup the validate code - remove
- #ifdef, use paddr to print address.
- (validate_download): Static, replace VALIDATE_DOWNLOAD
-
- * symfile.c (generic_load): Use strtoul to scan the optional load
- offset. Allocate a filename of the correct size.
-
-Mon Oct 18 17:32:51 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * symfile.c (generic_load): Don't filter output. Use
- print_transfer_performance for summary. Use paddr for addresses.
- (print_transfer_performance): New function. Includes write count.
- (report_transfer_performance): Call
- print_transfer_performance. Deprecate.
-
- * defs.h (print_transfer_performance): Add declaration.
- (generic_load): Move declaration to here.
- * symfile.h (generic_load): From here.
-
-Mon Oct 18 16:29:52 1999 Andrew Cagney <cagney@amy.cygnus.com>
-
- * remote.c (remote_write_bytes): Re-write. Transfer a single
- packet and then return the that packets byte size.
-
-Sun Oct 17 15:09:00 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote.c (remote_console_output): Flush gdb_stdtarg after
- processing an ``O'' packet.
- * remote.h (remote_console_output): Strip PARAMS.
-
-Sun Oct 17 15:12:33 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * target.c (target_xfer_memory_partial): New function. Simple
- implementation of partial memory reads.
- (target_read_memory_partial): New function. Replaces old
- target_read_memory_partial.
- (target_write_memory_partial): New function.
- * target.h: Update.
-
- * valprint.c (partial_memory_read): New function, based on old
- memory_read_partial. Implement partial memory reads the way that
- val_print_string likes.
- (val_print_string): Use partial_memory_read.
-
-Sun Oct 17 13:58:56 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * defs.h (ui_load_progress_hook): Add declaration.
- * dsrec.c (ui_load_progress_hook): Delete extern declaration.
-
- * symfile.c (ui_load_progress_hook): Make first argument const.
- (generic_load): Don't cast the result of bfd_get_section_name.
- Replace ``sect'' with ``sect_name'', use consistently.
-
-1999-10-15 Jim Blandy <jimb@cygnus.com>
-
- Add beginnings of support for SIMD register types.
- * gdbtypes.c (init_simd_type): New function for building
- types for registers consisting of arrays of objects.
- (builtin_type_v4sf): New built-in type.
- (build_gdbtypes): Initialize it.
- (_initialize_gdbtypes): Arrange for gdbarch swapping.
- * gdbtypes.h (builtin_type_v4sf): Add external decl.
-
-Fri Oct 15 18:20:33 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote-hms.c: Commented out H8 code.
-
-Fri Oct 15 17:46:39 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * dcache.c (dcache_p): Rename variable remote_dcache. Make
- static.
- (_initialize_dcache): Fix description of ``set remotecache''.
- Cache is OFF by default.
-
-1999-10-13 Jim Blandy <jimb@cygnus.com>
-
- * valops.c (value_push): Don't forget to initialize container_len.
-
-Wed Oct 13 17:58:20 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * utils.c (tui_file_flush): Don't call flush_hook. Don't try to
- flush ``astring''.
- * gdb-events.sh: Update
- * top.c (flush_hook): Delete.
-
-1999-10-13 Kevin Buettner <kevinb@cygnus.com>
-
- * mem-break.c (memory_insert_breakpoint,
- memory_remove_breakpoint): Added missing return statements.
-
-Wed Oct 13 20:53:42 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * utils.c (mem_fileopen, mem_file_delete, mem_file_new,
- mem_file_rewind, mem_file_put, mem_file_fputs): New functions.
- * defs.h (mem_fileopen): Declare.
-
-1999-10-13 Kevin Buettner <kevinb@cygnus.com>
-
- * mem-break.c (default_memory_insert_breakpoint): Renamed from
- memory_insert_breakpoint.
- (default_memory_remove_breakpoint): Renamed from
- memory_remove_breakpoint.
- (memory_insert_breakpoint, memory_remove_breakpoint,
- MEMORY_INSERT_BREAKPOINT, MEMORY_REMOVE_BREAKPOINT): New
- wrappers.
- * target.h (default_memory_remove_breakpoint,
- default_memory_insert_breakpoint): Added declarations.
- * gdbarch.sh (MEMORY_INSERT_BREAKPOINT, MEMORY_REMOVE_BREAKPOINT):
- New methods.
- * gdbarch.h, gdbarch.c (MEMORY_INSERT_BREAKPOINT,
- MEMORY_REMOVE_BREAKPOINT, gdbarch_memory_insert_breakpoint,
- gdbarch_memory_remove_breakpoint, set_gdbarch_memory_insert_breakpoint,
- set_gdbarch_memory_remove_breakpoint) : Generated from gdbarch.sh.
-
-Wed Oct 13 19:15:51 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * defs.h: Remove PARAMS from all declarations. Re-indent. Clean
- up the gdb_file declarations.
-
-Tue Oct 12 12:19:07 1999 David Taylor <taylor@texas.cygnus.com>
-
- * i386-linux-nat.c (supply_fpregset, fill_fpregset): copy
- from/to start of fpregsetp not start of st_space as the first
- stuff we copy is the FP control registers not the actual FP values.
-
-1999-10-12 Fernando Nasser <fnasser@totem.to.cygnus.com>
-
- * eval.c (evaluate_subexp_standard): Fix gdb invocation of
- inferior C functions when debugging C++ code.
- * valops.c (find_overload_match): Ditto.
- * symtab.c (make_symbol_overload_list): Ditto.
-
-1999-10-11 Jim Blandy <jimb@zwingli.cygnus.com>
-
- * config/pa/tm-hppa.h (SYMBOLS_CAN_START_WITH_DOLLAR): It's not
- enough to #define this; you have to give it a non-zero value.
-
-1999-10-11 Jim Blandy <jimb@cygnus.com>
-
- Fix from Jim Kingdon <kingdon@redhat.com>, with tweaks to make it
- gdbarch- and bigendian-friendly:
- * valops.c (PARM_BOUNDARY): If not #defined, default to zero.
- (value_push): If PARM_BOUNDARY is not zero, align arguments to
- that boundary.
- * config/i386/tm-i386.h: Define PARM_BOUNDARY.
-
-Mon Oct 11 14:23:55 1999 Fred Fish <fnf@cygnus.com>
-
- * config/mips/tm-irix3.h (PS_REGNUM): Don't undef if we aren't
- going to redefine it to something else.
-
-1999-10-11 Jason Merrill <jason@yorick.cygnus.com>
-
- * dwarfread.c (read_func_scope): Don't try to set main_func_*;
- we handle that in blockframe.c:inside_main_func.
- * dwarf2read.c (read_func_scope): Likewise.
- (dwarf2_add_field, dwarf2_add_member_fn): Get member function name
- directly, not from mangled name.
- (skip_member_fn_name): Lose.
-
-Mon Oct 11 12:24:52 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * serial.h (enum serial_rc): Clarify SERIAL_TIMEOUT and
- restrictions on TIMEOUT in ASYNC mode.
-
- * serial.c (serial_readchar): Check for invalid timeout when in
- async mode. Disable test.
-
-Thu Oct 7 17:20:01 1999 Andrew Cagney <cagney@amy.cygnus.com>
-
- * monitor.c (monitor_printable_string): Add length argument. Don't
- return final string length.
- (monitor_printf_noecho, monitor_printf, monitor_expect): Update.
- (monitor_error): Pass real_len to monitor_printable_string.
- (monitor_error): Rewrite. Replace printf fmt string parameter with
- function name and message parameters.
- (monitor_read_memory_single, monitor_read_memory): Update.
-
-1999-10-07 Stan Shebs <shebs@andros.cygnus.com>
-
- * main.c (print_gdb_help): Fix bug reporting address.
- * gnu-regex.h, gnu-regex.c: Ditto.
-
-1999-10-07 Jim Blandy <jimb@zwingli.cygnus.com>
-
- * parse.c (SYMBOLS_CAN_START_WITH_DOLLAR): New macro,
- whose value can be overridden by target files.
- (write_dollar_variable): Don't check the symbol table for
- identifiers beginning with `$' unless
- SYMBOLS_CAN_START_WITH_DOLLAR is non-zero.
- * config/pa/tm-hppa.h (SYMBOLS_CAN_START_WITH_DOLLAR): Define.
- * doc/gdbint.texinfo (SYMBOLS_CAN_START_WITH_DOLLAR): Document.
-
- Remove all traces of the BINOP_SCOPE operator. It's never
- generated, and not implemented.
- * expression.h (enum exp_opcode): Delete BINOP_SCOPE.
- * c-lang.c (c_op_print_tab): Delete entry for BINOP_SCOPE.
- * eval.c (evaluate_subexp_standard): Doc fix.
- * expprint.c (op_name): Remove case for BINOP_SCOPE.
- (dump_subexp): Same.
-
- * dwarf2read.c (dwarf2_const_value): Treat DW_FORM_data1,
- DW_FORM_data2, DW_FORM_data4, and DW_FORM_data8 as signed values,
- since that's what read_var_value will do anyway.
-
-1999-10-07 Fred Fish <fnf@cygnus.com>
-
- * objfiles.h (struct objfile): Delete is_solib member, now handled
- by OBJF_SHARED bit in struct objfile's flags.
- * objfiles.c (objfile_purge_solibs): Check OBJF_SHARED bit in flags
- instead of old is_solib int member in objfile struct.
-
- * objfiles.c (allocate_objfile): Remove is_solib arg. Now passed
- as a bit in combined flags arg.
- * symfile.c (symbol_file_add): Ditto.
- * objfiles.h (allocate_objfile): Adjust prototype after removal
- of is_solib arg.
- * symtab.h (symbol_file_add): Ditto.
-
- * cxux-nat.c (add_shared_symbol_files): Remove zero passed to
- symbol_file_add in old is_solib arg, defaults to zero now in
- flags.
- * irix5-nat.c (symbol_add_stub): Ditto.
- * remote-mm.c (mm_load): Ditto.
- * remote-udi.c (udi_load): Ditto.
- * remote-vx.c (vx_add_symbols): Ditto.
- * symfile.c (symbol_file_command): Ditto.
- (add_symbol_file_command): Ditto.
-
- * coff-solib.c (coff_solib_add): Call symbol_file_add with
- OBJF_SHARED in flags bit, rather than 1 in old is_solib
- arg.
- * osfsolib.c (symbol_add_stub): Ditto.
- * pa64solib.c (pa64_solib_add_solib_objfile): Ditto.
- * solib.c (symbol_add_stub): Ditto.
- * somsolib.c (som_solib_add_solib_objfile): Ditto.
- * win32-nat.c (handle_load_dll): Ditto.
-
- * objfiles.c (allocate_objfile): Remove old args "mapped" and
- "user_loaded". Replaced with new arg "flags" containing specific
- If global var mapped_symbol_files is nonzero
- then set OBJF_MAPPED in flags arg. Check for OBJF_MAPPED bit in
- flags where we used to check mapped arg.
- Pass flags to open_mapped_file instead of mapped arg.
- Ensure that OBJF_MAPPED bit is reset in flags when the objfile
- is not mapped. Add passed flags bits to objfile's flags bits.
- (open_mapped_file): Replace "mapped" arg with new "flags" arg.
- Adjust prototype. Pass flags to open_existing_mapped_file.
- (open_existing_mapped_file): Replace "mapped" arg with new "flags".
- Check flags for OBJF_MAPPED.
- * objfiles.h (allocate_objfile): Adjust prototype.
- * rs6000-nat.c (add_vmap): Pass zero for combined flags, rather
- than separate zero ints for old "mapped" and "user_loaded" flags.
- * symfile.c (symbol_file_add): Pass allocate_objfile combined flags
- rather than individual mapped and user loaded bits.
-
- * symfile.c (symbol_file_add): Delete user_loaded arg.
- * symtab.h (symbol_file_add): Adjust prototype for deleted
- user_loaded arg.
- * objfiles.h (struct objfile): Delete user_loaded member.
- (OBJF_USERLOADED): New flag bit to replace user_loaded.
-
- * symfile.c (symbol_file_command): Add OBJF_USER_LOADED to flags
- passed to symbol_file_add. Delete previous passing of explicit 1
- for user_loaded.
- (add_symbol_file_command): Ditto.
-
- * coff-solib.c (coff_solib_add): No longer pass zero for user loaded,
- now defaults to zero in flags.
- * cxux-nat.c (add_shared_symbol_files): Ditto.
- * irix5-nat.c (symbol_add_stub): Ditto.
- * osfsolib.c (symbol_add_stub): Ditto.
- * remote-mm.c (mm_load): Ditto.
- * pa64solib.c (pa64_solib_add_solib_objfile): Ditto.
- * remote-udi.c (udi_load): Ditto.
- * remote-vx.c (vx_add_symbols): Ditto.
- * solib.c (symbol_add_stub): Ditto.
- * somsolib.c (som_solib_add_solib_objfile): Ditto.
- * win32-nat.c (handle_load_dll): Ditto.
-
-Thu Oct 7 19:24:05 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * Makefile.in (monitor.o): Allow monitor.o to be compiled with
- -Werror.
-
- * monitor.c (monitor_debug_p): New variable. Replaces macro.
- (EXTRA_RDEBUG): Delete. Update all uses.
- (monitor_debug): New function. Replaces macro.
- (RDEBUG): Delete macro. Update all uses.
- debug output to gdb_stdlog and not the console.
-
- * monitor.c: Fix printf formating. Replace printf calls with
- fprintf_unfiltered.
-
-1999-10-06 Stan Shebs <shebs@andros.cygnus.com>
-
- * MAINTAINERS: Switch ARM target maintenance from Elena
- Zannoni to Jim Ingham.
-
-1999-10-06 Frank Ch. Eigler <fche@cygnus.com>
-
- * remote.c (hexnumnstr): New function. Allow setting of width.
- (hexnumstr): Call the above.
- (remote_write_bytes): Fill in X-protocol address field more
- reliably.
-
-1999-10-06 Fred Fish <fnf@cygnus.com>
-
- * xcoffread.c (xcoff_symfile_offsets): Fix typo, addr->addrs.
-
-1999-10-06 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * remote.c (handle_remote_sigint_twice): Make this signal be
- handled by inferior_event_handler, via the wrapper function.
- (async_remote_interrupt_twice): Make not static. Add debug print.
- * remote.h (async_remote_interrupt_twice): Export for use in
- inf-loop.c.
-
- * inf-loop.c (inferior_event_handler_wrapper): New function.
- (inferior_event_handler): Handle a request to quit and kill the
- target.
- Include remote.h.
- * inf-loop.h (inferior_event_handler_wrapper): Export.
-
-1999-10-04 James Ingham <jingham@leda.cygnus.com>
-
- * remote-rdi.c (arm_rdi_open): If the angel_RDI_Open fails, close
- the serial port and raise an error. If you try to go on, you will
- stall forever down in the rdi-share code.
-
-1999-10-04 Fernando Nasser <fnasser@totem.to.cygnus.com>
-
- * printcmd.c (output_command): Makes sure result from the output
- command is printed before the next prompt.
-
-1999-10-04 Fernando Nasser <fnasser@totem.to.cygnus.com>
-
- * printcmd.c (print_formatted): Add missing stream parameter.
- (do_examine, print_command_1, output_command, do_one_display):
- Adjust call to print_formatted().
-
-1999-10-04 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * infcmd.c: Remove include of event-loop.h.
- * utils.c: Ditto.
- * top.c: Ditto.
-
- * infrun.c (fetch_inferior_event): Call inferior_event_handler
- when inferior stops, instead of doing work ourselves.
- (fetch_inferior_event): Use void* instead of gdb_client_data.
- Remove includes of event-top.h and event-loop.h. Add include of
- inf-loop.h.
- (complete_execution): Move from here.
-
- * inf-loop.c (complete_execution): To here.
- (inferior_event_handler): Handle inferior's execution completion
- case as well.
- * inf-loop.h: Add def of INF_LOOP_H.
-
- * event-top.h: Don't use gdb_client_data, use void*, to avoid
- dependency on event-loop.h.
-
- * remote.c (remote_async_resume): Set target_executing only after we
- actually register the inferior with the event loop.
-
-1999-10-04 Fernando Nasser <fnasser@totem.to.cygnus.com>
-
- * corefile.c (memory_error): Use error_stream() and eliminate call
- to return_to_top_level().
-
-1999-10-04 Fernando Nasser <fnasser@totem.to.cygnus.com>
-
- * utils.c (error): Save error message text (w/o new line).
- (error_last_message): New function. Returns the last message
- issued by gdb.
- (error_init): New function. Initializes error handling machinery.
- (error_stream): New function. Allows the error message to be
- passed on a stream buffer.
- * defs.h: Add prototypes for error_stream() and
- error_last_message().
- * main.c (main): Add call to error_init().
-
-1999-10-04 Fernando Nasser <fnasser@totem.to.cygnus.com>
-
- * utils.c (tui_sfileopen): New function. Replaces
- gdb_file_init_astring().
- * defs.h: Add prototype for the above.
-
-Mon Oct 4 19:25:55 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * symfile.c (add_symbol_file_command): Fix -Wformat on query call.
-
-1999-10-01 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * target.c (cleanup_target): Type of to_async param is now
- function with enum inferior_event_type param.
-
- * target.h (target_ops): Adjust to_async accordingly. Move enum
- inferior_event_type to this file. Don't have a typedef for
- inferior_event_type. Add more enumeration constants INF_QUIT_REQ,
- INF_EXEC_COMPLETE. Remove INF_SIGINT_FIRST, INF_SIGINT_SECOND.
-
- * inf-loop.c (inferior_event_handler): Change first param to tell
- the type of event we are dealing with. Deal with INF_ERROR and
- INF_REG_EVENT, for the moment.
- Include target.h.
-
- * inf-loop.h (inferior_event_handler): Adjust prototype. Remove
- enum inferior_event_type from here.
-
- * remote.c (remote_async_serial_handler): Pass INF_REG_EVENT to
- the client callback.
- (remote_async): Change callback's param type to inferior_event_type.
- (async_client_callback): Change type as above.
-
-1999-10-01 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * event-top.c (stdin_event_handler): Delete fd parameter, use
- input_fd instead.
- * event-top.h (stdin_event_handler): Delete fd parameter.
-
- * inf-loop.c (inferior_event_handler): Delete fd parameter. Use
- target_async() to unregister the inferior fd in case of errors.
- * inf-loop.h(inferior_event_handler): Delete fd parameter.
-
- * ser-unix.c (fd_event): Delete fd parameter. Use scb->fd,
- instead.
-
- * remote.c (async_client_callback): Delete fd parameter.
- (remote_async_serial_handler): Ditto.
- (remote_async): Adjust to new type of callback function.
-
- * target.c (cleanup_target): Adjust parameters for to_async
- default case.
- * target.h (*to_async): Delete fd parameter from cb function.
-
- * event-loop.h (handler_func): Delete fd parameter.
- * event-loop.c (handle_file_event): Delete fd param from call to
- proc. Do not include inferior.h.
-
-1999-10-01 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * event-loop.c (inferior_event_handler,
- inferior_event_handler_wrapper): Move from here.
- * inf-loop.c: To here. New file.
-
- * event-loop.h (inferior_event_handler): Move from here.
- * inf-loop.h: To here. New file.
-
- * remote.c: Include inf-loop.h.
- (set_extende_protocol): Remove unused prototpye.
-
- * Makefile.in (SFILES): Add inf-loop.c.
- (inf_loop_h): Define.
- (COMMON_OBS): Add inf-loop.o.
- (inf-loop.o): Add rule.
- (remote.o): Add dependency on inf-loop.h.
-
-Fri Oct 1 19:59:31 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * ser-unix.c: Add some notes on how the async code works.
-
-Fri Oct 1 01:45:32 1999 Jeffrey A Law (law@cygnus.com)
-
- * somread.c (som_symfile_offsets): Fix typo in last change.
-
-1999-09-30 Fred Fish <fnf@cygnus.com>
-
- * coff-solib.c (coff_solib_add): Adjust call to symbol_file_add.
- * cxux-nat.c (add_shared_symbol_files): Ditto.
- * irix5-nat.c (symbol_add_stub): Ditto.
- * osfsolib.c (symbol_add_stub): Ditto.
- * pa64solib.c (pa64_solib_add_solib_objfile): Ditto.
- * remote-mm.c (mm_load): Ditto.
- * remote-udi.c (udi_load): Ditto.
- * remote-vx.c (vx_add_symbols): Ditto.
- * solib.c (symbol_add_stub): Ditto.
- * somsolib.c (som_solib_add_solib_objfile): Ditto.
- * win32-nat.c (handle_load_dll): Ditto.
-
- * irix5-nat.c (symbol_add_stub): Add section_addrs, zero it.
- * cxux-nat.c (add_shared_symbol_files): Ditto.
- * osfsolib.c (symbol_add_stub): Ditto.
- * pa64solib.c (pa64_solib_add_solib_objfile): Ditto.
- * solib.c (symbol_add_stub): Ditto.
- * somsolib.c (som_solib_add_solib_objfile): Ditto.
- * symfile.c (symbol_file_command): Ditto.
- * win32-nat.c (handle_load_dll): Ditto.
-
- * irix5-nat.c (symbol_add_stub): Use section_addrs to pass text addr.
- * cxux-nat.c (add_shared_symbol_files): Ditto.
- * osfsolib.c (symbol_add_stub): Ditto.
- * pa64solib.c (pa64_solib_add_solib_objfile): Ditto.
- * solib.c (symbol_add_stub): Ditto.
- * somsolib.c (som_solib_add_solib_objfile): Ditto.
- * symfile.c (symbol_file_command): Ditto.
- * win32-nat.c (handle_load_dll): Ditto.
-
- * coff-solib.c (coff_solib_add): Call symbol_file_add with NULL ptr.
- * cxux-nat.c (add_shared_symbol_files): Ditto.
- * remote-udi.c (udi_load): Ditto.
- * remote-vx.c (vx_add_symbols): Ditto.
- * symfile.c (symbol_file_command): Ditto.
-
- * dstread.c (dst_symfile_offsets): Take "section_addr_info *"
- instead of CORE_ADDR.
- * somread.c (som_symfile_offsets): Ditto.
- * symfile.c (default_symfile_offsets): Ditto.
- * xcoffread.c (xcoff_symfile_offsets): Ditto.
-
- * symfile.h (default_symfile_offsets): Adjust prototype.
- (syms_from_objfile): Ditto.
- * symtab.h (symbol_file_add): Ditto.
-
- * rs6000-nat.c (objfile_symbol_add): Call syms_from_objfile with NULL.
- * xcoffsolib.c (solib_add): Ditto.
- * gdb-stabs.h (SECT_OFF_MAX): Increase from 4 to 16.
- * symtab.h (MAX_SECTIONS): Define.
- (struct section_addr_info): New struct for better control over
- changing load addresses of sections.
- * objfiles.h (OBJF_READNOW): Add new flag bit.
- * symfile.h (sym_offsets): Change second param from CORE_ADDR to
- "section_addr_info *".
-
- * symfile.c (symbol_file_add): Replace scalar arg "CORE_ADDR addr"
- with "struct section_addr_info *addrs".
- (syms_from_objfile): Ditto.
- (add_symbol_file_command): Remove local variables "readnow" and
- "mapped". Replaced with general "flags" variable.
- (symbol_file_command): Ditto.
- (add_symbol_file_command): Add local variables i, sec_num, argcnt,
- expecting_option, option_index, and opt. Rework option parsing code
- to handle additional options.
- (_initialize_symfile): Adjust add-symbol-file usage to match new
- option handling.
- (symbol_file_add): Remove parameters "mapped" and "readnow",
- replace with general "flags".
- (symbol_file_add): In call to allocate_objfile, replace "mapped"
- with extracted OBJF_MAPPED bit from flags.
- (symbol_file_add): Use OBJF_READNOW bit from flags, instead of
- "readnow" variable.
- (symbol_file_command): Set OBJF_MAPPED and OBJF_READNOW bits
- from parsed options. Pass flags to symbol_file_add.
- (add_symbol_file_command): Ditto.
- (syms_from_objfile): Add local variables i, sect, lower_sect,
- lower_offset, and local_addr. Substitute local_addr for addrs
- when addrs is NULL. Find lowest loadable section to be used as
- starting point for contiguous sections. Adjust offsets if segments
- are not contiguous. Call sym_offsets with section_addr_info
- instead of single addr.
- (default_symfile_offsets): Initialize objfile's section_offsets
- with user specified offsets.
- (symbol_file_add): Call syms_from_objfile with offsets.
- (unknown_option_complaint): Add.
- (add_symbol_file_command): Add "section_addrs", zero it with memset.
-
-1999-09-30 Jason Molenda (jsm@bugshack.cygnus.com)
-
- * configure.in: Call config.sub explicitly instead of misusing the
- autoconf internal variable $ac_config_sub.
- * configure: Regenerated.
-
-Thu Sep 30 15:53:59 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote.c (readchar): When EOF mourn the inferior.
- (getpkt): Try QUIT. Might not be a watchdog timer timeout.
- (remote_async_serial_handler): Pass ``-1'' as the dummy FD. Safer
- than ZERO == STDIN.
-
- * serial.h (enum serial_rc): Replace #define SERIAL_ERROR,
- SERIAL_TIMEOUT and SERIAL_EOF.
- (struct _serial_t): Add more notes on termios specific fields.
-
- * ser-unix.c (generic_readchar): Make SERIAL_ERROR sticky.
- (do_hardwire_readchar, do_unix_readchar): Don't use bufcnt as a
- tempoary for the return-value from read.
-
- * serial.c (serial_logchar): Add a stream parameter.
- (serial_readchar, serial_write, serial_send_break): Update.
- (serial_readchar): Add serial debug trace.
-
-Thu Sep 30 12:07:03 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * serial.h (struct _serial_t): Add field async_state. Better
- document field bufcnt.
- (SERIAL_ERROR): Delete comment about errno.
- * serial.c (serial_open, serial_fdopen): Initialize async_state.
-
- * ser-unix.c (push_event, fd_event, reschedule): New functions.
- Handle ASYNC serial input.
- (ser_unix_async): Update.
- (generic_readchar): New function. Handle event scheduling. Make
- EOF condition sticky.
- (do_unix_readchar): Rename ser_unix_readchar.
- (ser_unix_readchar): New function, call do_unix_readchar via
- generic_readchar.
- (do_hardwire_readchar, hardwire_readchar): Ditto.
-
- * ser-unix.c (ser_unix_readchar): Delete code working around ASYNC
- fifo bugs.
- (hardwire_readchar): Delete code working around ASYNC fifo bugs.
-
-Wed Sep 29 21:27:16 1999 Jeffrey A Law (law@cygnus.com)
-
- * breakpoint.c (insert_breakpoints): Addresses are CORE_ADDRs,
- not "int"s.
- (remove_breakpoint): Likewise.
-
-1999-09-29 Fred Fish <fnf@cygnus.com>
-
- * breakpoint.c (breakpoint_1): Replace cast "(CORE_ADDR) - 1"
- with the more obviously intended expression "(CORE_ADDR) -1".
- * dwarf2read.c (scan_partial_symbols, read_file_scope): Ditto.
- * gnu-nat.c (gnu_create_inferior): Ditto.
- * go32-nat.c (go32_create_inferior): Ditto.
- * hppa-tdep.c (hppa_pop_frame): Ditto.
- * infcmd.c (continue_command, step_1, signal_command): Ditto.
- (until_next_command, finish_command): Ditto.
- * infrun.c (proceed): Ditto.
- * inftarg.c (child_create_inferior): Ditto.
- * m3-nat.c (m3_create_inferior): Ditto.
- * mac-nat.c (child_create_inferior): Ditto.
- * procfs.c (procfs_create_inferior): Ditto.
- * remote-sim.c (gdbsim_create_inferior): Ditto.
- * target.c (target_link): Ditto.
- * win32-nat.c (child_create_inferior): Ditto.
-
-Thu Sep 30 10:36:19 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * ser-unix.c (ser_unix_flush_input): New function. Discard input
- buffer.
- (hardwire_flush_input): Use ser_unix_flush_input.
- (ser_unix_nop_flush_input): Delete.
- * ser-unix.h (ser_unix_flush_input): Update.
- ser-tcp.c (_initialize_ser_tcp), ser-pipe.c
- (_initialize_ser_pipe): Update.
-
- * ser-unix.c (hardwire_write): Delete.
- (_initialize_ser_hardwire): Update, use ser_unix_write.
-
-Thu Sep 30 10:16:50 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * ser-pipe.c (pipe_open): Don't make the FD non-blocking. Already
- being handled in ser_unix_wait_for by a select.
-
-Thu Sep 30 10:00:32 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * serial.h (struct _serial_t): Add field debug_p.
- (SERIAL_DEBUG, SERIAL_DEBUG_P): Define.
-
- * serial.c (serial_open, serial_fdopen): Initialize debug_p.
- (serial_debug, serial_debug_p): New functions.
- (global_serial_debug_p): New variable.
- (_initialize_serial): Add ``set serialdebug'' command.
-
-Thu Sep 30 09:09:38 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * serial.h (serial_event_ftype): Replace FD and ERROR args with
- SERRIAL_T arg.
- * ser-unix.c (ser_unix_event): Update.
-
- * remote.c (remote_async_serial_handler): New function. Handle
- serial events.
- (remote_async): Pass remote_async_serial_handler to SERIAL.
- (async_client_callback, async_client_context): New variables.
-
- * remote.c (extended_remote_async_create_inferior): Use
- target_async to register the inferior event handler.
-
-Thu Sep 30 00:02:03 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * configure.in (AC_CHECK_FUNCS): Test for sigprocmask.
- * configure, config.in: Re-generate.
- * event-top.c (async_stop_sig): Use sigprocmask when available.
-
-1999-09-29 Doug Evans <devans@casey.cygnus.com>
-
- * sh-stub.c (handle_exception): Fix typo in patch of 1999-08-26.
- * m68k-stub.c (handle_exception): Ditto.
-
-1999-09-28 Fred Fish <fnf@cygnus.com>
-
- * alpha-nat.c (alpha_osf_core_fns, alpha_elf_core_fns):
- Add default entries for check_format and core_sniffer.
- * core-aout.c (aout_core_fns): Ditto.
- * core-regset.c (regset_core_fns): Ditto.
- * core-sol2.c (solaris_core_fns): Ditto.
- * i386aix-nat.c (i386aix_core_fns): Ditto.
- * i386mach-nat.c (i386mach_core_fns): Ditto.
- * irix4-nat.c (irix4_core_fns): Ditto.
- * irix5-nat.c (irix5_core_fns): Ditto.
- * lynx-nat.c (lynx_core_fns): Ditto.
- * mips-nat.c (mips_core_fns): Ditto.
- * ns32knbsd-nat.c (nat_core_fns): Ditto.
- * rs6000-nat.c (rs6000_core_fns): Ditto.
- * sparc-nat.c (sparc_core_fns): Ditto.
- * sun-nat.c (sun3_core_fns): Ditto.
- * ultra3-nat.c (ultra3_core_fns): Ditto.
-
- * corelow.c (core_vec): New, for selected core file handler.
- (sniff_core_bfd): New function.
- (gdb_check_format): New function.
- (default_check_format): New function.
- (default_core_sniffer): New function.
- (sniff_core_bfd): New function.
- (core_close): Reset core_vec to NULL.
- (core_open): Fall back to gdb_check_format if bfd_check_format
- does not identify the file format. Call sniff_core_bfd to pick
- a core file handler.
- (get_core_registers): Remove code that is now in sniff_core_bfd.
- Use current core_vec.
-
- * gdbcore.h (check_format): New core_fns function, points to function
- to try and identify a core file format.
- (core_sniffer): New core_fns function, points to function to select
- a specific handler for the selected core file format.
- (default_core_sniffer): Add prototype.
- (default_check_format): Add prototype.
-
- * i960-tdep.c (inferior.h): Include.
- * mips-tdep.c (read_next_frame_reg): Use ADDR_BITS_REMOVE
- on addresses pulled from stack.
-
-1999-09-29 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * event-loop.c (poll_timers): Check whether the timer list has any
- element on it by looking at the first element pointer, instead of
- num_timers.
-
-Wed Sep 29 18:02:31 1999 Andrew Cagney <cagney@amy.cygnus.com>
-
- * command.c: Attempt to include POSIX <sys/wait.h> before
- <wait.h>.
-
- * ser-unix.c (hardwire_print_tty_state): Ditto.
- * inflow.c (child_terminal_info): Fix printf args.
-
-1999-09-28 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * remote.c (remote_async_resume): Register the inferior with the
- event loop.
- (remote_async_open_1): Don't put the target in async mode here,
- just do it when executing.
-
- * infrun.c (complete_execution): Unregister the inferior from the
- event loop.
-
- * event-top.c (async_disable_stdin): Don't add
- async_enable_stdin() to the exec_cleanups chain.
-
-Tue Sep 28 11:08:34 1999 Jeffrey A Law (law@cygnus.com)
-
- * hppa-tdep.c (hppa_fix_call_dummy): Ignore IMPORT_SHLIB stubs
- except for hpux11 native. Break out of the loop to find a
- stub as soon as we find an IMPORT stub.
- (skip_prologue_hard_way): Also recognize copy %ret1,target and
- all PA64 argument stores as prologue instructions.
-
-1999-09-28 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * breakpoint.c, defs.h, event-top.c, infcmd.c, infrun.c, main.c,
- remote.c, top.c, tracepoint.c, utils.c (async_p): Change var name
- to event_loop_p.
-
-1999-09-28 Jim Blandy <jimb@cygnus.com>
-
- * hppa-tdep.c (skip_prologue_hard_way): Recognize ldo insns
- which generate pointers into the argument list.
-
-Tue Sep 28 13:56:49 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote.h (cleanup_sigint_signal_handler,
- initialize_sigint_signal_handler): Delete extern declarations.
- * event-top.c, infrun.c: No longer need to include "remote.h".
- * remote.c (cleanup_sigint_signal_handler,
- initialize_sigint_signal_handler): Make static.
- * Makefile.in (event-top.o): Delete dependency on "remote.h".
-
- * remote.c (remote_async_terminal_ours_p): New static global. Keep
- track of who currently owns the terminal.
- (remote_async_open_1): Initialize.
- (remote_async_terminal_inferior): Test
- remote_async_terminal_ours_p. Claim CNTRL-C handler as part of
- transfering the terminal to the target.
- (remote_async_terminal_ours): Similar.
-
-Mon Sep 27 12:33:45 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote.c (async_interrupt_query): Delete function. Merged into
- interrupt_query. Async cases handled by target_terminal_ours,
- target_terminal_inferior and SERIAL_CLOSE.
- (async_remote_interrupt_twice): Update.
- (remote_async_terminal_ours, remote_async_terminal_inferior): New
- functions. Steal STDIN from GDB's CLI.
- (init_remote_async_ops): Initialize to_terminal_ours and
- to_terminal_inferior.
-
- * event-top.c (async_disable_stdin, async_disable_stdin): Use
- target_terminal_ours / target_terminal_inferior to transfer
- ownership of the terminal between GDB and the target.
-
-1999-09-27 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * infcmd.c (run_command): Call async_disable_stdin() only if
- dealing with an asynchronous target.
-
-Mon Sep 27 11:48:38 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * target.h (struct target_ops): Add to_can_async_p, to_is_async_p,
- to_async. Delete to_has_async. These correspond well with
- SERIAL* async methods.
- (target_can_async_p, target_is_async_p, target_async): Define.
- * target.c (update_current_target, cleanup_target): Update.
-
- * remote.c (remote_async_open_1): Change target to async using
- target_async.
- (remote_can_async_p, remote_is_async_p, remote_async): New
- functions.
- (remote_async_wait, remote_async_open_1): Add FIXME about how
- wait_forever_enabled_p can almost be deleted once the client can
- enable/disable target_async.
-
- * breakpoint.c (until_break_command), infrun.c (proceed), infcmd.c
- (run_command, continue_command, step_1, jump_command,
- until_command, finish_command, interrupt_target_command), top.c
- (return_to_top_level, execute_command), event-top.c
- (command_handler): Replace target_has_async with
- target_can_async_p.
-
-Sun Sep 26 02:10:47 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote.c (remote_async_open_1): If we go into async mode, never
- wait for ever.
-
- * infcmd.c: Include "event-top.h".
- (run_command, continue_command, jump_command, until_command,
- finish_command): Use async_disable_stdin to disable the console
- for synchronous commands.
-
- * remote.c (async_interrupt_query): Only disconnect the console
- from the terminal when sync_execution.
-
- * remote.c (initialize_sigint_signal_handler): Move declaration
- from here.
- * remote.h: To here. Make non-static.
-
- * remote.c (remote_async_resume, async_interrupt_query): Move
- prompt code from here.
- * event-top.c (async_disable_stdin, async_enable_stdin): To
- here. New function.
-
- * infrun.c (start_remote): Delete commented out code.
-
-Fri Sep 24 12:38:31 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote.c (remote_async_open_1): Perform the initial async_open
- using only synchronous calls. Only after the target is fully
- connected, switch to async mode. Include FIXME about now it
- currently works VS how it should be working.
- (remote_async_open_1, set_extended_protocol): Delete function
- set_extended_protocol. All open communication is now done
- synchronously.
- (forever_enabled_p): New variable. Determine if remote_async_wait
- should block FOREVER when fetching target information.
- (remote_cisco_open, remote_open_1): Set forever_enabled_p.
-
- * infrun.c (start_remote): During the initial connect, always use
- a synchronous wait.
-
-Sat Sep 25 18:13:38 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * Makefile.in (event-top.o): Add dependency.
- * event-top.c: Include "remote.h".
- * remote.c (async_interrupt_query), event-top.c:
- (async_enable_stdin): Pass dummy parameter to
- cleanup_sigint_signal_handler.
- * remote.c (cleanup_sigint_signal_handler), remote.h
- (cleanup_sigint_signal_handler), event-top.c (async_enable_stdin),
- event-top.h (async_enable_stdin): Change signature to match
- make_exec_error_cleanup handler pararameter.
-
-Thu Sep 23 20:48:22 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * defs.h (enum command_class): Move from here.
- * command.h (command_class): To here.
-
-1999-09-24 Kevin Buettner <kevinb@cygnus.com>
- * breakpoint.c (bpstat_stop_status): Use not_a_breakpoint to
- help properly set bp_addr.
- * infrun.c (handle_inferior_event): Simplify calls to
- bp_stop_status.
-
-1999-09-24 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * top.c (return_to_top_level): Do exec_error cleanups if are
- interrupting a simulated synchronous execution command.
-
- * infrun.c (start_remote): Create a cleanup to enable stdin in
- case of error from this command.
- (complete_execution): Do the enabling of stdin via the exec_error
- cleanups, when needed.
-
- * remote.c (remote_async_resume): Make sure we re-enable stdin in
- case of error from the target.
- (handle_remote_sigint_twice): The handler to be set is
- async_remote_interrupt_twice, not async_remote_interrupt.
- (async_remote_interrupt_twice): Don't do anything if the target
- has been killed already. Call async_interrupt_query, instead of
- interrupt_query.
- (async_interrupt_query): New function. Async case of
- interrupt_query().
-
- * event-top.c (async_enable_stdin): New function. Reinstate stdin
- with the event loop.
- * event-top.h (async_enable_stdin): Export.
-
- * utils.c (exec_error_cleanup_chain): New cleanup chain.
- (make_exec_error_cleanup, do_exec_error_cleanups,
- discard_exec_error_cleanups): New functions.
- * defs.h (make_exec_error_cleanup, do_exec_error_cleanups,
- discard_exec_error_cleanups): Export.
-
-1999-09-24 Jim Blandy <jimb@zwingli.cygnus.com>
-
- * ax-gdb.c (expr_to_agent): Don't forget to pass argument to
- new_agent_expr.
-
-1999-09-24 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * event-loop.c (fetch_inferior_event_wrapper): New
- function. Wrapper to pass to catch_errors.
- (inferior_event_handler): Pop the target if things go bad with it.
- Call fetch_inferior_event() from within catch_errors().
-
-1999-09-24 Jim Blandy <jimb@zwingli.cygnus.com>
-
- * ax-gdb.c: Use internal_error instead of error, where
- appropriate.
-
-1999-09-23 James Ingham <jingham@leda.cygnus.com>
-
- * target.c (target_resize_to_sections): New function. Gather the
- resizing code for the to_sections field into one place, and make
- sure you update the other targets that are sharing the to_sections
- structure.
- * target.h: Declare the target_resize_to_sections function.
- * solib.c (solib_add): use target_resize_to_sections.
- * somsolib.c (som_solib_load_symbols): ditto
- * rs6000-nat.c (xcoff_relocate_core): ditto
- * pa64solib.c (pa64_solib_load_symbols): ditto
- * irix5-nat.c (solib_add):ditto
-
- * top.c: Define the attach & detach hooks
- * defs.h: Declare the attach & detach hooks.
- * infcmd.c (attach_command): call the attach hook if it exists.
- (detach_command): call the detach hook if it exists.
-
- * complaints.c (complain): Send the complaints to stderr rather
- than stdout, so they don't get mixed into the result stream from
- commands.
-
-1999-09-23 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * event-loop.c (poll_timers): Use correct timeval field names,
- when setting the notifier timeouts, in case of select() used.
- (gdb_wait_for_event): Pass a pointer to the timeout structure to
- select(), not the structure.
-
-Wed Sep 22 10:35:32 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * Makefile.in (init.c): Change generated file to include "defs.h"
- and "call-cmds.h". Use initialize_file_ftype when declaring
- each initialize functions.
- (call_cmds_h): Add definition.
- (init.o): Add target and dependencies.
- (init.c): Don't grep for _initialize* in init.c.
-
- * defs.h (initialize_file_ftype): Add function typedef.
-
-1999-09-22 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * procfs.c (init_procinfo): move fltset initialization to caller.
- (do_attach, create_procinfo): initialize fltset.
-
-1999-09-22 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * event-loop.c, event-top.c, event-loop.h: Rerun indent.
-
-1999-09-21 Doug Evans <devans@casey.cygnus.com>
-
- * m32r-stub.c (handle_exception): Fix typo in patch of 1999-08-26.
-
-Tue Sep 21 14:55:29 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- From 1999-08-20 J.T. Conklin <jtc@redback.com>:
- * remote.c (read_frame): expand cisco run-length encoding variant
- inline as is done for the standard encoding.
- (remote_cisco_expand): Removed.
-
-1999-09-20 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * event-loop.c: Include <sys/time.h>.
-
-1999-09-20 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * ser-ocd.c: (ser_ocd_open, ser_ocd_raw, ser_ocd_readchar,
- ser_ocd_setbaudrate, ser_ocd_write, ser_ocd_close,
- ser_ocd_get_tty_state, ser_ocd_set_tty_state): Remove unused
- prototypes.
- (ocd_readremote): Remove.
- (ocd_write): Remove unused var 'c'.
-
-1999-09-20 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * event-top.c (change_line_handler): Cleanup dead code. Add comments.
- * event-loop.c: Cleanup #if 0 code.
-
- * event-loop.h (timer_handler_func): New function type.
- (create_timer): Export function.
- (delete_timer): Export function.
-
- * event-loop.c: Add timeout and timeout_valid fields to
- gdb_notifier. New structures gdb_timer and timer_list.
- (gdb_do_one_event): Check whether there are any timers tht are
- ready, before going to wait.
- (gdb_wait_for_event): If the timeout structure is meaningful, pass
- that to select()/poll().
- (create_timer): New function. Creates a timer.
- (delete_timer): New function. Deletes a timer.
- (handle_timer_event): New function. Deals with timers that are ready.
- (poll_timers): New Function. Chack whether timers have expired.
-
-Mon Sep 20 17:00:06 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote.c (getpkt, putpkt, remote_console_output): Move
- declaration from here.
- * remote.h: To here. New file.
- * tracepoint.c(putpkt, getpkt, remote_console_output): Delete
- declarations. Moved to "remote.h".
- * Makefile.in (remote_h): Define.
- * remote.c, tracepoint.c: Include "remote.h".
- * Makefile.in (tracepoint.o, remote.o): Add dependency on
- "remote.h".
-
- * remote.h (remote_cisco_objfile_relocate,
- cleanup_sigint_signal_handler): Add declaration. Include FIXME.
- * infrun.c: Include "remote.h".
- (complete_execution): Delete local extern declaration
- of ``cleanup_sigint_signal_handler''.
- * Makefile.in (infrun.o): Add dependency on remote.h.
-
-Mon Sep 20 13:41:04 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * kod.c (ecos_kod_open, ecos_kod_request, ecos_kod_close,
- cisco_kod_open, cisco_kod_request, cisco_kod_close): Move
- declarations from here.
- * kod.h: To here. New file.
- * kod-cisco.c, kod.c: Include "kod.h".
- * Makefile.in (kod-cisco.o, kod.o): Add dependency on "kod.h".
-
- * kod.h (kod_display_callback_ftype, kod_query_callback_ftype):
- New function types.
- * kod.h (kod_cisco_open): Use in declaration.
- * kod.c (gdb_kod_open): Update definition.
- * kod-cisco.c (cisco_kod_open): Update definition.
-
-Mon Sep 20 12:13:27 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * mn10300-tdep.c (_initialize_mn10300_tdep): Add declaration.
-
- * breakpoint.c (until_break_command_continuation): Add
- declaration. Make static.
- * event-top.c (rl_callback_read_char_wrapper): Ditto.
-
-Fri Sep 17 19:28:17 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * source.c: Include "source.h".
- (open_source_file, find_source_lines): Move declaration from here.
- * source.h: New file. To here.
- * Makefile.in (source.o): Add dependency on source.h.
-
- * breakpoints.c (delete_command): Move declaration from here.
- * breakpoints.h (delete_command): To here.
-
-1999-09-18 Jim Blandy <jimb@cygnus.com>
-
- * hppa-tdep.c (in_solib_call_trampoline): If we can't recognize
- the instruction we're at, we're not in a stub.
-
-Sat Sep 18 07:13:03 1999 Jeffrey A Law (law@cygnus.com)
-
- * dwarf2read.c (dwarf_decode_lines): Correctly handle
- DW_LNS_const_add_pc.
-
-1999-09-18 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * remote.c (remote_async_open_1): Use inferior_event_handler to
- handle inferior events.
- (extended_remote_async_create_inferior): Ditto.
-
- * serial.h (serial_event_ftype): Add two pars.
-
- * ser-unix.c (ser_unix_event): Add two parameters, error and fd.
- Pass those into the call to the actual inferior event handler.
-
- * infrun.c (complete_execution): Stdin handler is stdin_event_handler.
-
- * event-top.h (stdin_event_handler): Export new function.
-
- * event-top.c (stdin_event_handler): New function. Smarter handler
- for events on stdin.
- (change_line_handler): Don't need to update the handler for stdin
- here anymore.
- (_initialize_event_loop): Stdin handler is now stdin_event_handler.
-
- * event-loop.h: (handler_func): Change signature, adding two new
- args.
- (sig_handler_func): New function type. It is the old handler_func.
- (create_async_signal_handler): Update to use sig_handler_func.
- (delete_async_signal_handler): Prototype for new function.
-
- * event-loop.c: Include "inferior.h".
- (struct file_handler): Add field error, to indicate error
- condition on fd.
- (struct async_signal_handler): Rename type of proc field.
- (add_file_handler): Add exception condition as something select()
- should report.
- (handle_file_event): In case of error on the fd, record this in
- the file_handler structure. Update call to (*proc)() to match new
- signature.
- (gdb_wait_for_event): If select() or poll() return error, report
- this to user.
- (create_async_signal_handler): Change first param type to
- sig_handler_func*.
- (inferior_event_handler): New function. Smarter inferior event
- handling.
-
-1999-09-18 Jim Blandy <jimb@cygnus.com>
-
- * pa64solib.c (pa64_solib_create_inferior_hook): Remove code which
- tries to set __d_pid; it's not relevant to PA64 shared libraries.
-
- A psymtab's texthigh element, and a block's endaddr element, are
- the address past the end of the address range, never the address
- of the last byte. These data structures mean the same thing on
- forty different architectures; there's no reason they should be
- different on HP/UX.
- * symtab.c (find_pc_sect_psymtab): Remove special case for HP/UX.
- (find_pc_sect_symtab): Same.
- * objfiles.c (find_pc_sect_section): Same.
-
-Sat Sep 18 07:13:03 1999 Jeffrey A Law (law@cygnus.com)
-
- * hppa-tdep.c (internalize_unwinds): Handle PA64 shared libraries
- correctly
-
- * hppa-tdep.c (in_solib_call_trampoline): Handle PA64 shared library
- trampolines.
-
-1999-09-17 Jim Blandy <jimb@zwingli.cygnus.com>
-
- * breakpoint.c (permanent_breakpoint_here_p): Delete.
- Accidentally left over from previous changes.
-
-1999-09-17 Jim Blandy <jimb@cygnus.com>
-
- * config/pa/tm-hppa64.h (ARGS_GROW_DOWNWARD): Deleted. There are
- many more differences between the 32- and 64-bit ABI's than the
- direction the arguments grow, so this name is misleading.
- (PA20W_CALLING_CONVENTIONS): Define this instead.
- * config/pa/tm-hppa.h (ARGS_GROW_DOWNWARD): Delete.
- * hppa-tdep.c (hppa_push_arguments): Split into two separate
- functions, depending on whether PA20W_CALLING_CONVENTIONS is
- #defined. These implement completely separate specifications,
- they don't really share that much code anyway, and this is much
- more readable. Specifically: leave a 16-byte, not 32-byte, frame
- marker; correctly align objects larger than eight bytes; promote
- all integral scalar arguments smaller than eight bytes to a full
- register width; pad aggregates smaller than eight bytes on the
- right.
-
-Thu Sep 16 17:33:35 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote.c (remote_async_open_1): Use SERIAL_ASYNC to
- enable/disable async event callback on serial port. Use
- SERIAL_CAN_ASYNC_P / SERIAL_IS_ASYNC_P to determine if / when
- async mode.
- (remote_async_resume, remote_async_detach, remote_async_kill,
- extended_remote_async_create_inferior, remote_async_wait): Ditto.
-
- * ser-unix.c (hardwire_readchar): When ASYNC, only read a single
- character.
- (ser_unix_readchar): Ditto. Problems occure with back-to-back
- data from a target. The ASYNC code can loose the second data
- chunk.
-
- * serial.c (serial_fdopen): Initialize async_handler and
- async_context.
-
-1999-09-16 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * utils.c (discard_all_continuations): New function.
- * defs.h: (discard_all_continuations): Add prototype.
-
-1999-09-16 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * valops.c: Remove prototype for search_struct_field_aux(). THe
- function was nowhere in the file.
- (value_ind): Remove unused var real_val.
- (value_find_oload_method_list): Remove unused var v.
- (find_overload_match): Remove extra declaration of var jj.
-
- * Makefile.in (event_top_h): Define. Add dependency on this for
- every file that includes event-top.h.
-
-Thu Sep 16 17:33:35 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * serial.c (serial_open): Delete ``&'' device.
- * ser-unix.c (_initialize_ser_hardwire): Make the "hardwire"
- device async. Delete temporary "async-hardwire" device.
-
-Thu Sep 16 16:27:13 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * serial.h (SERIAL_IS_ASYNC_P): Define. Non-zero when serial
- device is in async mode.
- (SERIAL_CAN_ASYNC_P): Rename SERIAL_ASYNC_P.
- * serial.c (serial_is_async_p): Implement.
- (serial_can_async_p): Rename serial_async_p.
- (serial_open): Initialize ASYNC_HANDLER and ASYNC_CONTEXT. Save
- the original name in SCB instead of the stripped name.
-
-Thu Sep 16 12:20:11 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * serial.h (struct serial_ops): Add field ASYNC.
- (SERIAL_ASYNC, SERIAL_ASYNC_P): New macros.
- (struct _serial_t): Add fields async_context and async_handler.
- * serial.c (serial_async, serial_async_p): Implement.
-
- * ser-unix.c: Include "event-loop.h".
- (ser_unix_async), ser-unix.c: New function. Implement async mode.
- (async_event): Handle async events.
- * ser-unix.c (_initialize_ser_hardwire), ser-tcp.c
- (_initialize_ser_tcp), ser-pipe.c (_initialize_ser_pipe): Enable
- ASYNC.
-
- * serial.c (serial_open): Discard leading ``|'' before opening a
- pipe device.
- * ser-pipe.c (pipe_open): Adjust.
- * serial.c (serial_open): Add ``&'' prefix so that
- "async-hardwire" device can be explicitly selected. Work in
- progress.
- * ser-unix.c: Register "async-hardwire" device.
-
-Thu Sep 16 09:04:53 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * ser-unix.h: New file. Declare generic ser_unix functions.
- * ser-unix.c (ser_unix_nop_get_tty_state,
- ser_unix_nop_set_tty_state, ser_unix_nop_raw, ser_unix_wait_for,
- ser_unix_readchar, ser_unix_nop_noflush_set_tty_state,
- ser_unix_nop_print_tty_state, ser_unix_nop_setbaudrate,
- ser_unix_nop_setstopbits, ser_unix_write,
- ser_unix_nop_flush_output, ser_unix_nop_flush_input,
- ser_unix_nop_send_break, ser_unix_nop_drain_output): New
- functions.
- * ser-unix.c: Include <sys/wait.h>, <sys/socket.h>,
- "gdb_string.h".
-
- * ser-tcp.c (_initialize_ser_tcp), ser-unix.c
- (_initialize_ser_hardwire), ser-pipe.c (_initialize_ser_tcp):
- Initialize ops vector using assignment.
-
- * ser-pipe.c, ser-tcp.c, ser-unix.c: Include ser-unix.h.
-
- * ser-pipe.c (pipe_get_tty_state, pipe_set_tty_state,
- pipe_return_0, pipe_raw, wait_for, pipe_readchar,
- pipe_noflush_set_tty_state, pipe_print_tty_state,
- pipe_setbaudrate, pipe_setstopbits, pipe_write), ser-tcp.c
- (tcp_get_tty_state, tcp_set_tty_state, tcp_return_0, tcp_raw,
- wait_for, tcp_readchar, tcp_noflush_set_tty_state,
- tcp_print_tty_state, tcp_setbaudrate, tcp_setstopbits, tcp_write):
- Delete functions.
-
-1999-09-15 Stan Shebs <shebs@andros.cygnus.com>
-
- * d10v-tdep.c (remote_d10v_translate_xfer_address): Move to here
- from remote-d10v.c, also change the memory translation to its
- previous version.
- * remote-d10v.c: Remove.
- * config/d10v/d10v.mt (TDEPFILES): Remove remote-d10v.o.
-
-1999-09-15 Jim Blandy <jimb@cygnus.com>
-
- * breakpoint.c (remove_breakpoint): Return zero, not nothing.
-
-1999-09-14 Jim Blandy <jimb@cygnus.com>
-
- * hppa-tdep.c (frame_chain): If the unwind info says we've saved
- r3, don't trust it. Call get_frame_saved_regs and see if we can
- actually find an address for r3 there.
-
- * pa64solib.c (pa64_sharedlibrary_info_command): Text fix.
-
-Tue Sep 14 14:34:28 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * serial.h (DEPRECATED_SERIAL_FD): Define.
- * serial.c (deprecated_serial_fd): New function.
-
- * remote.c (remote_async_open_1, remote_async_open_1,
- remote_async_detach, remote_async_kill,
- extended_remote_async_create_inferior, minitelnet): Update.
- * remote-es.c (es1800_open, es1800_close, es1800_transparent): Update.
-
- * remote-st.c (connect_command), remote-os9k.c (connect_command):
- Fix. Call FD_SET et.al. with FD instead of serial_t.
-
-1999-09-14 Jim Blandy <jimb@cygnus.com>
-
- * hppa-tdep.c (hppa_frame_find_saved_regs): The two possible
- instructions for saving the return pointer (32- and 64-bit) save
- it at different offsets.
-
- * config/pa/tm-hppa64.h: Doc fix.
-
- * defs.h (continuation): Make this a typedef.
-
- * Makefile.in (gdbtk.o, gdbtk-cmds.o): Depend on $(top_h).
-
- * Makefile.in (i386-linux-nat.o): Depend on symfile.h, not
- $(symfile_h); the latter has no definition.
-
- * breakpoint.c (breakpoint_here_p): Remove meaningless code,
- testing b->enable against shlib_disabled and call_disabled after
- we know it is enabled.
-
- Implement "permanent breakpoints" --- breakpoints that are
- hardwired into the inferior's code. GDB knows they're there, but
- doesn't try to insert or remove them, etc.
- * breakpoint.h (enum enable): Add `permanent' enablement state.
- * breakpoint.c (make_breakpoint_permanent): New function.
- * breakpoint.h (make_breakpoint_permanent): Add declaration.
- * breakpoint.c (insert_breakpoints): Don't bother to insert
- permanent breakpoints...
- (remove_breakpoint): ... or remove them.
- (breakpoint_here_p): Handle `permanent' like `enabled'. Change
- return value to indicate whether it's a permanent breakpoint here,
- or an ordinary breakpoint.
- * breakpoint.h (enum breakpoint_here): New enum.
- (breakpoint_here_p): Change declaration.
- * breakpoint.h (breakpoint_1): Extend bpenables to cover all the
- enablement states.
- (describe_other_breakpoints): Describe permanent breakpoints.
- (check_duplicates): If one of the breakpoints at ADDRESS is a
- permanent breakpoint, treat all the others as the duplicates, so
- we don't try to insert or remove any of them. Verify that only
- the permanent breakpoint is actually inserted.
- (delete_breakpoint): Complain if we discover that another
- breakpoint was inserted at the same place as a permanent
- breakpoint.
- (disable_breakpoint): Fail silently if asked to disable a
- permanent breakpoint.
- (do_enable_breakpoint): Don't change a permanent breakpoint's
- enablement to ordinary `enabled'. Leave it alone.
- (create_solib_event_breakpoint): Return the
- breakpoint object created.
- * breakpoint.h (create_solib_event_breakpoint): Fix declaration.
- * pa64solib.c (pa64_solib_create_inferior_hook): Do turn on the
- DT_HP_DEBUG_CALLBACK flag in the dynamic linker, so it will call
- __dld_break, which contains the permanent breakpoint, when interesting
- things happen. Tell GDB that the breakpoint in __dld_break is
- permanent.
- * gdbtk-cmds.c (gdb_get_breakpoint_info): Report a permanent
- breakpoint as enabled.
- * infrun.c (SKIP_PERMANENT_BREAKPOINT): Provide default definition.
- (default_skip_permanent_breakpoint): New function.
- (resume): If we're trying to resume at a permanent breakpoint, use
- SKIP_PERMANENT_BREAKPOINT to step over it.
- * hppa-tdep.c (hppa_skip_permanent_breakpoint): New function.
- * config/pa/tm-hppa.h (hppa_skip_permanent_breakpoint): Declare.
- (SKIP_PERMANENT_BREAKPOINT): Define.
-
-1999-09-14 Kevin Buettner <kevinb@cygnus.com>
-
- * symtab.h, minsyms.c (find_stab_function_addr): Changed
- type of second parameter from partial_symtab * to char *.
- Fixed all callers.
- * minsyms.c (find_stab_function_addr): Look for minimal
- symbol without filename if filename based search fails.
- * dbxread.c (process_one_symbol): Call find_stab_function_addr()
- in place of inline code with identical functionality.
- * partial-stab.h (case N_FUN, descriptors 'F' and 'f'): Look
- up symbol's address from minimal symbol table when N_FUN
- address is missing. Also, make sure this value is used for
- calculating the value of the texthigh field.
-
-1999-09-14 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * event-loop.c (create_file_handler): Increment the total number
- of file descriptors for the poll case, only if this is a new file
- desc.
-
-1999-09-14 Eli Zaretskii <eliz@is.elta.co.il>
-
- * go32-nat.c: misc minor cleanups and fixes missed in last patch.
-
-Tue Sep 14 12:37:33 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * serial.h (SERIAL_PRINT_TTY_STATE): Add STREAM parameter.
- (union serial_ops): Update.
-
- * ser-unix.c (hardwire_print_tty_state, ser-tcp.c
- (tcp_print_tty_state), ser-pipe.c (pipe_print_tty_state,
- ser-go32.c (dos_print_tty_state, ser-mac.c (mac_print_tty_state,
- ser-ocd.c (ocd_print_tty_state, ser-e7kpc.c
- (e7000pc_print_tty_state): Update.
- * inflow.c (child_terminal_info): Update.
- * serial.c (serial_print_tty_state): Update.
-
-Tue Sep 14 11:41:37 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * serial.c, serial.h, ser-tcp.c, ser-unix.c, ser-pipe.c: Convert
- all functions to ISO-C.
- * serial.h, serial.c: Move all indirect macro function calls from
- serial.h into serial.c.
- (serial_drain_output, serial_flush_output, serial_flush_input,
- serial_raw, serial_get_tty_state, serial_set_tty_state,
- serial_print_tty_state, serial_noflush_set_tty_state,
- serial_setbaudrate, serial_setstopbits): New functions.
- (do_serial_close): Rename serial_close.
- (serial_close, serial_un_fdopen): New functions. Call
- do_serial_close.
-
-1999-09-13 James Ingham <jingham@leda.cygnus.com>
-
- * symtab.c (decode_line_1): Find the rightmost parenthesis in the
- expression, not the leftmost. This allows us to parse function
- declarations with embedded function prototypes.
-
-Mon Sep 13 18:39:31 1999 Jeffrey A Law (law@cygnus.com)
-
- * pa64solib.c (pa64_sharedlibrary_info_command): Fix typos.
-
-1999-09-13 Kevin Buettner <kevinb@cygnus.com>
-
- * i386-tdep.c (i386_extract_return_value): ifdef'd so that
- non-linux targets will work again.
- (i386_do_registers_info, i386_print_register): Revert changes
- of 1999-09-03; these functions have been removed because they
- are Linux specific and break non-Linux builds. This functionality
- will be restored after FP support unification has been achieved.
- * i387-tdep.c (i387_print_register, void i387_float_info):
- Likewise.
- * config/i386/tm-linux.h (i387_float_info, FLOAT_INFO,
- DO_REGISTERS_INFO, i386_do_registers_info,
- i387_print_register): Likewise.
-
-1999-09-13 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * event-top.c (call_readline): Change to accept gdb_client_data as
- param.
- (rl_callback_read_char_wrapper): New function to match what the
- event loop expects and what readline expects.
- (change_line_handler): Make call_readline point to
- rl_callback_read_char_wrapper, instead of rl_callback_read_char.
- (_initialize_event_loop): Ditto.
- (gdb_readline2): Change parameter to gdb_client_data.
- * event-top.h (call_readline, gdb_readline2): Change accordingly.
-
- * event-loop.c (add_file_handler): Change 2nd par to
- handler_func*. No more need for casting.
- * event-loop.h (create_async_signal_handler): Change accordingly.
-
- * inferior.h (fetch_inferior_event): Change parameter to void*.
- * infrun.c (fetch_inferior_event): Ditto.
-
-1999-09-13 Stan Shebs <shebs@andros.cygnus.com>
-
- * infrun.c (step_into_function): New function, broken out from the
- step_into_function label in handle_inferior_event.
- (handle_inferior_event): Change a goto into a function call.
-
-1999-09-13 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * event-top.h: New file. All the exported vars and functions from
- event-top.c.
-
- * event-loop.h (struct gdb_event, event_handler_func,
- file_handler, async_signal_handler, SELECT_MASK, fd_mask, NBBY,
- FD_SETSIZE, howmany, NFDBITS, MASK_SIZE): Move to event-loop.c.
- (struct prompts, PROMPT, PREFIX, SUFFIX, display_gdb_prompt,
- async_init_signals, set_async_editing_command,
- set_async_annotation_level, set_async_prompt, handle_stop_sig,
- handle_sigint, pop_prompt, push_prompt, gdb_readline2,
- mark_async_signal_handler_wrapper, async_request_quit,
- async_command_editing_p, exec_done_display_p,
- async_annotation_suffix, new_async_prompt, the_prompts,
- call_readline, input_handler, input_fd): Move to event-top.h.
- (All function prototypes): Don't use PARAMS anymore.
-
- * event-loop.c: (struct gdb_event, event_handler_func,
- file_handler, async_signal_handler, SELECT_MASK, fd_mask, NBBY,
- FD_SETSIZE, howmany, NFDBITS, MASK_SIZE): Move to here from
- event-loop.h.
- Include event-top.h. Remove use of PARAMS. ANSIfy functions headers.
-
- * event-top.c: Include event-top.h. Include "signals.h", not
- <signals.h>.
- Remove use of PARAMS. ANSIfy functions headers.
- (handle_stop_sig): move prototype to event-top.h.
-
- * remote.c: Include event-top.h. Make it understand
- async_signal_handler type.
- * infrun.c: Include event-top.h.
- * mi-main.c: Ditto.
- * top.c Ditto.
- * utils.c: Ditto.
-
-Mon Sep 13 18:54:05 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * gdbarch.sh: Describe each of the fields.
-
-Mon Sep 13 17:51:28 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- From 1999-09-12 Jim Blandy <jimb@cygnus.com>:
- * gdbarch.sh (generating setters): Use sed to generate the proper
- indentation, not tr; tr's behavior is notoriously unportable.
-
-1999-09-10 Jim Blandy <jimb@zwingli.cygnus.com>
-
- * i387-tdep.c (print_387_control_bits): Don't print newline; the
- callers take care of that. (Thanks to H.J. Lu.)
-
-1999-09-09 Stan Shebs <shebs@andros.cygnus.com>
-
- * d10v-tdep.c (DMEM_START): Set to 0x2000000.
- (itrace, iuntrace, info itrace, itdisassemble, itracedisplay,
- itracesource): Add 'i' prefix to commands, so as not to conflict
- with generic trace commands.
-
-1999-09-09 Fernando Nasser <fnasser@totem.to.cygnus.com>
-
- * remote.c (_initialize_remote): Fix the specification of the
- "remote" prefix to set and show commands.
-
-1999-09-09 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * event-loop.c (create_file_event): New function. Creates a gdb
- event for a given fd.
- (gdb_wait_for_event): Use create_file_event().
- * event-loop.h: export create_file_event().
-
- * event-loop.c (delete_file_handler): Move the clearing of the
- mask to later on in the function, because we need it in order to
- deactivate the correct fd when using select().
-
- * m32r-tdep.c (decode_prologue): Fix typo. Instructions starting
- with 0xf are branch instructions.
- (m32r_scan_prologue): Initialize framesize to 0.
-
-1999-09-07 J.T. Conklin <jtc@redback.com>
-
- * i386-stub.c (exceptionHook, oldExceptionHook): Removed.
- (handle_exception): Removed #if'd out exception hook code.
-
- * i386-stub.c, m68k-stub.c (error): Removed unused variable.
-
- * i386-stub.c, m68k-stub.c, sh-stub.c, sparc-stub.c,
- sparcl-stub.c, sparclet-stub.c (remcomInBuffer, remcomOutBuffer):
- Make static.
-
-Tue Sep 7 14:06:22 1999 Kevin Buettner <kevinb@cygnus.com>
-
- * config/i386/tm-linux.h (SOFUN_ADDRESS_MAYBE_MISSING):
- Define.
-
-Tue Sep 7 08:18:01 1999 Kevin Buettner <kevinb@cygnus.com>
-
- From Jim Blandy <jimb@cygnus.com>:
-
- Step into calls to functions in shared libraries properly. See
- the comments for SKIP_SOLIB_RESOLVER atop infrun.c for details.
- * infrun.c (SKIP_SOLIB_RESOLVER): New macro.
-
-1999-09-05 Fred Fish <fnf@cygnus.com>
-
- * elfread.c (elf_symtab_read): Remove separately passed bfd
- pointer and offset. Pick up bfd pointer from objfile, and
- get offset from objfile's section_offsets.
-
-Fri Sep 3 22:29:39 1999 Kevin Buettner <kevinb@cygnus.com>
-
- * config/i386/tm-linux.h (REGISTER_NAMES): Changed register
- named "foo" to "fopo" which more accurately describes the FPU
- Operand Pointer Offset. The real reason for this change, of
- course, is that many programmers use $foo as a convenience
- variable and are likely to be unpleasantly surprised to find
- that they're unwittingly changing the state of their ia32 FPU.
-
-1999-09-03 Jason Molenda (jsm@bugshack.cygnus.com)
-
- * monitor.c (monitor_supply_register): Stop scanning val string
- if a newline is encountered.
-
-1999-09-03 Jason Molenda (jsm@bugshack.cygnus.com)
-
- monitor.c (TARGET_BUF_SIZE): New macro, defined to 2048.
- (monitor_expect_regexp, monitor_wait, monitor_dump_reg_block,
- monitor_dump_reg_block): Dump hard-coded constants in favor
- of TARGET_BUF_SIZE.
-
- (readchar): Re-enable output of characters read from monitor when
- remotedebug is set.
-
- (monitor_supply_register): Use ULONGEST to hold value.
- Replace strtoul() call with hand-coded loop to handle values
- larger than 'long'.
-
- (monitor_store_register): Use ULONGEST to hold value.
-
-Fri Sep 3 00:47:44 1999 Kevin Buettner <kevinb@cygnus.com>
-
- [Merged linux/x86 floating point code from Bill Metzenthen,
- Jim Blandy, Anthony Green, H. J. Lu, and possibly others. The
- following remarks are Jim Blandy's.]
-
- * findvar.c (extract_floating): Call TARGET_EXTRACT_FLOATING, if
- #defined.
- (store_floating): Call TARGET_STORE_FLOATING, if #defined.
-
- * i386-tdep.c (i386_print_register, i386_do_registers_info): New
- functions.
- (i386_extract_return_value): GNU/Linux returns floating point
- values in a floating point register too.
- (set_disassembly_flavor): Add prototype.
- (i386_extract_return_value): Use FPDATA_REGNUM, not FP0_REGNUM (
- which wasn't the first FP data register).
- (i386_do_registers_info): Use FPSTART_REGNUM and FPEND_REGNUM as
- the limits of the FPU-related registers.
- (i386_extract_return_value): Tell GDB how to find return values
- larger than four bytes. (Thanks to Paul N. Hilfinger for the bug
- report.)
-
- * i387-tdep.c (print_387_control_word): Break out bit-splitting into...
- (print_387_control_bits): New function.
- (print_387_status_word): Break out bit-splitting into...
- (print_387_status_bits): New function.
- (i387_print_register, i387_float_info, i387_hex_float_input): New
- functions.
- (i387_extract_floating, i387_store_floating): New functions.
-
- * valprint.c (print_floating): Use macro TARGET_ANALYZE_FLOATING,
- if it's #defined. Tolerate values of `nonnegative' other than
- zero and one.
-
- * i386-linux-nat.c: New file.
- * Makefile.in (ALLDEPFILES): Mention i386-linux-nat.c.
- (i386-linux-nat.o): New rule, listing dependencies.
- * config/i386/linux.mh (NATDEPFILES): Use i386-linux-nat.o, not
- the plain i386v4-nat.o.
- * config/i386/nm-linux.h (FETCH_INFERIOR_REGISTERS): Define.
- * config/i386/xm-linux.h: Define HOST_I386.
-
- * config/i386/tm-linux.h (FP0_REGNUM): Replaced by...
- (FPSTART_REGNUM, FPCONTROL_REGNUM, FPSTATUS_REGNUM, FPTAG_REGNUM,
- FPDATA_REGNUM, FPEND_REGNUM): New definitions.
- (REGISTER_BYTES): Changed accordingly.
- (SKIP_SOLIB_RESOLVER): #define this.
- (i386_linux_skip_solib_resolver): New declaration.
- (i387_float_info): Added extern decl for this function.
- (TARGET_EXTRACT_FLOATING, TARGET_STORE_FLOATING,
- TARGET_ANALYZE_FLOATING): Define.
- (i387_extract_floating, i387_store_floating): New extern decls.
- (I386_GNULINUX_TARGET): Define.
- (NUM_REGS, NUM_FREGS, REGISTER_NAMES, FP0_REGNUM, FPDATA_REGNUM,
- FPENV_BYTES, FPREG_RAW_SIZE, FPREG_BYTES, REGISTER_BYTES,
- REGISTER_BYTE, REGISTER_RAW_SIZE, REGISTER_VIRTUAL_SIZE,
- MAX_REGISTER_RAW_SIZE, MAX_REGISTER_VIRTUAL_SIZE,
- TARGET_LONG_DOUBLE_BIT, FLOAT_INFO, DO_REGISTERS_INFO): New
- definitions, perhaps overriding those inherited from
- config/i386/tm-i386.h.
- (i386_do_registers_info, i387_print_register, double_to_i387,
- i387_to_double): New declarations.
- (LD_I387): Define iff both the host and target are using i387
- FPU's.
- (HEX_FLOAT_INPUT, REGISTER_CONVERTIBLE,
- REGISTER_CONVERT_TO_VIRTUAL, REGISTER_CONVERT_TO_RAW,
- REGISTER_VIRTUAL_TYPE): Define these if LD_I387 is defined.
-
- * source.c (list_command): List the right number of source lines,
- even if we're at the top of the file.
-
-1999-09-02 Stan Shebs <shebs@andros.cygnus.com>
-
- * infrun.c (step_over_function): New function, broken out from the
- step_over_function label in handle_inferior_event.
- (handle_inferior_event): Change a goto into a function call.
-
-Thu Sep 2 18:26:04 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * Makefile.in (GDB_WERROR_CFLAGS, GBB_WARN_CFLAGS): Define.
- (INTERNAL_CFLAGS): Update
- * configure.in (WERROR_CFLAGS, WARN_CFLAGS): Sync with
- ../sim/common/aclocal.m4.
- * configure: Re-generate.
-
-Thu Sep 2 00:27:36 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * Makefile.in (z8k-tdep.o): For moment, don't try to compile with
- -Werror. See Makefile.in.
- * z8k-tdep.c (z8k_set_pointer_size): Document problem.
-
- * config/z8k/tm-z8k.h (z8k_print_register_hook, z8k_frame_chain,
- z8k_saved_pc_after_call, z8k_frame_saved_pc,
- z8k_set_pointer_size): Declare.
- (z8k_skip_prologue): Fix typo. Was mz8k_skip_prologue.
- (FRAME_CHAIN, PRINT_REGISTER_HOOK, FRAME_SAVED_PC,
- SAVED_PC_AFTER_CALL): Update.
- * z8k-tdep.c (z8k_print_register_hook): Rename
- z8k_print_register_hook.
- (z8k_frame_chain): Rename frame_chain.
- (z8k_saved_pc_after_call): Rename saved_pc_after_call.
- (z8k_frame_saved_pc): Rename frame_saved_pc.
- (z8k_print_register_hook): Fix printf.
- (read_memory_pointer): Add declaration.
- ("value.h"): Include.
- * Makefile.in (z8k-tdep.o): Add dependency on value.h.
-
- * config/sparc/tm-sparc.h (PRINT_EXTRA_FRAME_INFO): Fix
- printf. calls
- * Makefile.in (remote-e7000.o): For moment, don't try to compile
- with -Werror. See Makefile.in.
- * sh-tdep.c (sh_show_regs): Fix printf calls.
- * xcoffsolib.c (solib_info): Fix Printf calls.
- * dink32-rom.c: #include "symfile.h" for generic_load and
- "inferior.h" for write_pc.
- * Makefile.in (dink32-rom.o): Update.
-
- * config/mn10300/tm-mn10300.h (mn10300_store_struct_return),
- config/mn10200/tm-mn10200.h (mn10200_store_struct_return): Add
- declarations.
-
-Tue Aug 31 00:48:27 1999 Andrew Cagney <cagney@amy.cygnus.com>
-
- * config/mips/tm-tx49el.h (REGISTER_SIM_REGNO): Define.
-
- * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
- Pass REGISTER_SIM_REGNO converted register number to the
- simulator.
-
-1999-09-01 Tom Tromey <tromey@cygnus.com>
-
- * config/i386/nm-linux.h (PREPARE_TO_PROCEED): Added argument.
-
-1999-09-01 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * values.c (value_virtual_fn_field): Remove unused var(s).
- * thread.c (prune_threads): Ditto.
- * symtab.c (lookup_transparent_type): Ditto.
- (decode_line_1): Ditto.
- (make_symbol_overload_list): Ditto.
- * rs6000-tdep.c (frame_get_saved_regs): Ditto.
- (set_processor): Ditto.
- * remote.c (remote_remove_breakpoint): Ditto.
- (remote_query): Ditto.
- (readtty): Ditto.
- * remote-sds.c (sds_fetch_registers): Ditto.
- (putmessage): Ditto.
- * ppcbug-rom.c (ppcbug_supply_register): Ditto.
- (ppcbug_open): Remove unused prototype.
- * parse.c (parse_nested_classes_for_hpacc): Remove unused var(s).
- * ocd.c (ocd_open): Ditto.
- (ocd_get_packet): Ditto.
- * monitor.c (monitor_error): Ditto.
- (monitor_wait_srec_ack): Ditto.
- * main.c (main): Ditto.
- * gdbtypes.c (count_virtual_fns): Ditto.
- * exec.c (exec_file_command): Ditto.
-
- * event-top.c: Include handle_sigwinch() function prototype within
- appropriate #ifdef.
-
- * eval.c (evaluate_subexp_standard): Remove unused variable.
- (evaluate_subexp_standard): Remove unused variables.
- * dink32-rom.c (dink32_supply_register): Remove unused variable.
- * dbxread.c (elfstab_build_psymtabs): Ditto.
- * command.c (do_setshow_command): Ditto.
- * breakpoint.c (solib_load_unload_1): Remove unused variables 'i'
- and 'sal'.
- (until_break_command): Remove unused variables 'arg1' and 'arg2'.
- (create_exception_catchpoint): Remove unused variable 'i'.
- * ax-gdb.c (gen_sub): Remove unused variable.
- (_initialize_ax_gdb): Ditto.
-
- * ser-pipe.c (pipe_readchar): If timeout is expired return
- SERIAL_TIMEOUT.
- * ser-tcp.c (tcp_readchar): If timeout is expired return
- SERIAL_TIMEOUT.
-
-Wed Sep 1 15:07:25 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * version.h: New file.
- * Makefile.in (version_h): Define.
- (version.o): Add target.
-
- * remote-array.c: #include "version.h".
- (version): Delete extern declarations.
- * Makefile.in (remote-array.o): Add dependency on version.h.
-
- * top.c: #include "version.h".
- (version, host_name, target_name): Delete extern declarations.
- * Makefile.in (top.o): Add dependency on version.h.
-
- * remote.c (remote_remove_watchpoint, remote_insert_watchpoint),
- remote-array.c (array_open), remote-mips.c (send_srec),
- dve3900-rom.c (store_bitmapped_register): Fix Printfs.
-
- * mips-tdep.c (mips_print_extra_frame_info, print_unpack),
- m32r-rom.c (m32r_load_section), m32r-tdep.c (m32r_frame_chain),
- dsrec.c (load_srec): Fix printf problems.
-
-Wed Sep 1 13:16:49 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * Makefile.in (monitor.o): For moment, don't try to compile with
- -Werror. monitor.c has -Wformat problems. See Makefile.in for
- more info.
-
-Tue Aug 31 21:23:38 1999 Jeffrey A Law (law@cygnus.com)
-
- * hppa-tdep.c (prologue_inst_adjust_sp): Correct offset computation
- for doubleword store instructions.
- (hppa_frame_find_saved_regs): Similarly.
-
-Wed Sep 1 09:22:50 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * d30v-tdep.c (d30v_print_register):
- (tdisassemble_command):
-
- * d10v-tdep.c (show_regs, trace_info, tdisassemble_command): Fix
- printf problems.
-
- * remote-sim.c (dump_mem), remote-rdi.c (arm_rdi_create_inferior):
- Fix printf arguments.
-
- * remote-mips.c, mips-tdep.c: Move declaration of
- ``mips_set_processor_type_command'' from here.
- * config/mips/tm-mips.h: To here.
- * remote-array.c: #include "inferior.h".
- * config/mips/tm-embed.h (remote_mips_stopped_by_watchpoint): Add
- declaration.
- * remote-mips.c (remote_mips_stopped_by_watchpoint): Define using
- ISO-C prototype.
- (monitor_supports_breakpoints): Integer variable.
-
- * m32r-rom.c: #include "inferior.h" and <ctype.h>
- * config/m32r/tm-m32r.h (m32r_write_sp): Add declaration.
-
- * config/i960/tm-i960.h (leafproc_return, i960_pop_frame): Add
- declaration.
- (POP_FRAME): Call i960_pop_frame.
- * i960-tdep.c (i960_pop_frame): Rename pop_frame.
- * mon960-rom.c: #include "inferior.h" for declaration of write_pc.
-
-1999-08-15 Fred Fish <fnf@cygnus.com>
-
- * objfiles.c (objfile_relocate): Use SIZEOF_SECTION_OFFSETS when
- allocating section_offsets array.
- * remote-os9k.c (rombug_wait): Ditto.
- * remote-vx.c (vx_add_symbols): Ditto.
- * remote.c (get_offsets): Ditto.
- (remote_cisco_objfile_relocate): Ditto.
- * rs6000-nat.c (vmap_symtab): Ditto.
-
- * dstread.c (dst_symfile_offsets): Set section_offsets directly instead
- of returning a pointer to section offsets.
- * somread.c (som_symfile_offsets): Ditto.
- * xcoffread.c (xcoff_symfile_offsets): Ditto.
- * symfile.c (default_symfile_offsets): Ditto.
- (syms_from_objfile): The sym_offsets function has already set section
- offsets and no longer returns a value.
-
- * xcoffread.c (scan_xcoff_symtab): Eliminate section_offsets passed
- separate from objfile.
- (xcoff_start_psymtab): Ditto.
- (START_PSYMTAB): Ditto.
- * os9kread.c (read_minimal_symbols): Ditto.
- (read_os9k_psymtab): Ditto.
- (os9k_start_psymtab): Ditto.
- (record_minimal_symbol): Ditto.
- * dbxread.c (START_PSYMTAB): Ditto.
- (start_psymtab): Ditto.
- * mdebugread.c (START_PSYMTAB): Ditto.
- (elfmdebug_build_psymtabs): Ditto.
- (mdebug_build_psymtabs): Ditto.
- (parse_partial_symbols): Ditto.
- (new_psymtab): Ditto.
- * dwarfread.c (dwarf_build_psymtabs): Ditto.
- * partial-stab.h (START_PSYMTAB): Ditto.
- * stabsread.h (start_psymtab): Ditto.
- * dwarf2read.c (dwarf2_build_psymtabs): Ditto.
- (dwarf2_build_psymtabs_easy): Ditto.
- (dwarf2_build_psymtabs_hard): Ditto.
- * hp-psymtab-read.c (hpread_build_psymtabs): Ditto.
- (hpread_quick_traverse): Ditto.
- (hpread_start_psymtab): Ditto.
- (scan_procs): Ditto.
- * hpread.c (hpread_build_psymtabs): Ditto.
- * symfile.h (dwarf2_build_psymtabs): Ditto.
-
- * dbxread.c (read_dbx_symtab): Use ANOFFSET to access section
- offsets.
- * coffread.c (enter_linenos): Pass objfile instead of section
- offsets.
-
- * dbxread.c (dbx_symfile_read): No need to explicitly pass
- text addr and size. Let read_dbx_symtab find them.
- (read_dbx_symtab): Get text addr and size from objfile.
- (dbx_symfile_read): Remove dead code (call to strlen);
-
-1999-08-31 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * Makefile.in: add rule for sol-thread.o.
- Add rule for linux-thread.o.
-
-1999-08-13 Jim Kingdon <kingdon@redhat.com>
-
- Threads code from gdb 4.18-codefusion-990706
- [Thanks to Eric Paire, H. J. Lu, Jim Blandy and others]
- * infrun.c (signal_stop_update, signal_print_update,
- signal_pass_update): new functions.
- * inferior.h: new prototypes for above functions.
- * target.h (enum strata): add thread stratum.
- * linux-thread.c: new file. Support for debugging linux threads.
- * config/i386/nm-linux.h: several new prototypes for above.
- * config/i386/linux.mh: add linux-thread.o to NATDEPFILES.
-
- More threads code from the same place:
- * config/i386/tm-linux.h (REALTIME_LO, REALTIME_HI): Add
- definitions.
- * target.h (enum target_signal): Add TARGET_SIGNAL_REALTIME_32.
- * target.c (signals, target_signal_from_host,
- target_signal_to_host): Add clauses for
- TARGET_SIGNAL_REALTIME_32.
-
-1999-08-31 Neil Schellenberger <neil.schellenberger@crosskeys.com>
-
- * sol-thread.c (sol_thread_detach): strip thread-id out of
- inferior_pid, so that procfs_detach can't choke on it.
-
-1999-08-31 J.T. Conklin <jtc@redback.com>
-
- * i386-stub.c, m32r-stub.c, m68k-stub.c, sh-stub.c, sparc-stub.c,
- sparcl-stub.c, sparclet-stub.c (getpacket): Remove 'buffer' arg,
- define it as a pointer to &remcomInBuffer[0].
- (handle_exception): Update.
-
- * sparc-stub.c, sparcl-stub.c, sparclet-stub.c (handle_exception):
- Removed #ifdef'd out code which implements the non-standard 'b'
- (set baud rate) command.
-
-1999-08-31 Stan Shebs <shebs@andros.cygnus.com>
-
- * infrun.c (keep_going): New function, broken out from the
- keep_going label in handle_inferior_event.
- (handle_inferior_event): Change more gotos into function calls.
-
-Tue Aug 31 02:29:27 1999 Jeffrey A Law (law@cygnus.com)
-
- * hppa-tdep.c (read_unwind_info): Handle multiple unwind sections.
-
-Tue Aug 31 15:28:44 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * config/alpha/tm-alpha.h (PRINT_EXTRA_FRAME_INFO): Fix printf
- format argument.
- * alpha-tdep.c (heuristic_proc_start): Ditto.
-
- From Stan Shebs <shebs@andros.cygnus.com>:
- * defs.h (strlen_paddr): Fix prototype - add void argument list.
-
-Tue Aug 31 14:02:12 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * defs.h (gdb_print_host_address), utils.c
- (gdb_print_host_address): Rename gdb_print_address.
-
- * expprint.c, gdbtypes.c, symmisc.c: Update.
-
- *expprint.c: Use gdb_print_host_address when displaying native
- pointers.
-
-Sat Aug 28 14:23:29 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * scm-valprint.c (scm_ipruk), jv-valprint.c (java_value_print),
- cp-valprint.c (cp_print_class_member), exec.c (exec_files_info),
- remote.c (putpkt_binary, compare_sections_command,
- remote_cisco_section_offsets), dcache.c (dcache_info),
- breakpoint.c (break_at_finish_at_depth_command_1,
- break_at_finish_command_1), symfile.c (generic_load),
- (report_transfer_performance), top.c (get_prompt_1), f-valprint.c
- (f_val_print), maint.c (maintenance_translate_address): Fix printf
- -Wformat warnings. Use paddr, paddr_nz, sizeof_paddr, paddr_u and
- paddr_d to print addresses. Change ``d'' to ``ld''.
-
- * utils.c (strlen_paddr): New function.
-
-Tue Aug 31 01:36:44 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * config/d30v/tm-d30v.h (d30v_frame_chain,
- d30v_init_frame_pc): Add declaration.
-
- * arc-tdep.c (arc_pop_frame): Rename pop_frame.
- (arc_push_dummy_frame): Rename push_dummy_frame.
- (arc_set_cpu_type_command): Add declaration.
-
- * config/arc/tm-arc.h (arc_pop_frame, arc_push_dummy_frame): Add
- declaration.
-
-1999-08-30 Stan Shebs <shebs@andros.cygnus.com>
-
- * infrun.c (prepare_to_wait): New function, broken out from the
- wfi_continue label in handle_inferior_event.
- (handle_inferior_event): Change more gotos into function calls.
-
-1999-08-30 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * tracepoint.c: -Wall warning cleanup.
- (parse_and_eval_memrange): remove (unused).
- (output_command, args_info, locals_info, registers_info): add decls.
- (getpkt, putpkt, remote_console_output): add decls.
- (isalnum, isspace): cast arg to avoid warning.
- (printf, fprintf, sprintf): use [fs]printf_vma for printing addrs.
-
-Mon Aug 30 21:47:58 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * d10v-tdep.c: #include "language.h".
-
-Mon Aug 30 20:38:57 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * configure.in (AC_CHECK_HEADERS): Check for <time.h>.
- * configure, acconfig.in: Re-generate.
-
- * remote-rdp.c: #include <time.h>
-
- * config/arm/tm-arm.h (arm_float_info): Add declaration.
-
- * arm-tdep.c (convert_from_extended, convert_to_extended): Change
- double ptr arg to void ptr arg.
-
- * config/arm/tm-arm.h (arm_frameless_function_invocation): Add
- declaration.
- (arm_frame_find_saved_regs): Rename frame_find_saved_regs.
- (convert_from_extended, convert_to_extended): Add declaration.
-
-Mon Aug 30 19:05:32 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * configure.in (WERR_CFLAGS): Separate the -Werror flag.
- * configure: Re-generate.
-
- * Makefile.in (INTERNAL_CFLAGS): Re-define using
- INTERNAL_WARN_CFLAGS.
- (INTERNAL_WARN_CFLAGS): Define. Leave off WERR_CFLAGS.
- (tracepoint.o): Add explicit rule.
- (WERR_CFLAGS): Add definition.
-
-Mon Aug 30 17:52:17 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * utils.c: #include "event-loop.h" for declaration of
- async_request_quit.
- * Makefile.in (utils.o): Add dependency on event-loop.h.
-
- * event-top.c (mark_async_signal_handler_wrapper,
- async_request_quit): Move declaration from here.
- * event-loop.h: To here.
-
- * defs.h: Add declaration of exec.c:exec_set_section_offsets.
-
- * event-top.c: #include "gdbcmd.h" which includes "command.h" and
- hence expose declaration of function dont_repeat.
-
- * top.c (ISATTY), tracepoint.c (ISATTY), utils.c (ISATTY),
- event-top.c (ISATTY): Move definitions from here.
- * defs.h (ISATTY): To here. #include <unistd.h>.
-
- * sol-thread.c, solib.c, source.c, sparcl-tdep.c, tracepoint.c,
- utils.c, win32-nat.c, wince.c, top.c, symfile.c, ser-unix.c,
- ser-tcp.c, procfs.c, maint.c, infttrace.c, hppa-tdep.c,
- ser-pipe.c, remote-rdp.c, main.c, inftarg.c, inflow.c,
- hpux-thread.c, hp-psymtab-read.c, go32-nat.c, fork-child.c,
- corelow.c, command.c: Do not #include <unistd.h>, moved to defs.h.
-
-Mon Aug 30 15:14:43 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * defs.h (struct tui_stream, enum streamtype): Move from here.
- * utils.c: To here.
-
- * main.c (tui_file_fputs): Move from here.
- * utils.c: To here.
-
-Sun Aug 29 10:03:32 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * gdb-events.h, gdb-events.c, gdb-events.sh: New files.
-
-1999-08-27 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * solib.c (open_symbol_file_object): new function.
- Called when attaching to a new process, if there is no loaded
- symbol file. Attempts to locate the executable file for the
- attached process and load symbols from it.
- (solib_add): Call open_symbol_file_object if attaching to a
- new process and no open symbol file.
-
-1999-08-27 Jason Molenda (jsm@bugshack.cygnus.com)
-
- * config/i386/tm-sun386.h (GDB_TARGET_IS_SUN386): Definition
- removed--no longer checked anywhere in gdb.
-
-1999-08-27 Stan Shebs <shebs@andros.cygnus.com>
-
- * infrun.c (stop_stepping): New function, broken out from
- stop_stepping label in handle_inferior_event.
- (handle_inferior_event): Change gotos into function calls.
-
-Fri Aug 27 20:13:22 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * defs.h (LONGEST): Move definition to earlier in file - to just
- after BFD.
- (paddr_u, paddr_d): Declare.
- * utils.c (decimal2str): New function.
- (paddr_u, paddr_d): Define.
-
- * remote.c (remote_cisco_section_offsets,
- compare_sections_command): Fix XprintfX arguments. Use paddr...
- (putpkt_binary): Fix XprintfX arguments.
-
-Tue Aug 24 21:30:36 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * arm-tdep.c (arm_init_extra_frame_info): Add braces. Recommended
- by gcc -Wparentheses.
-
-1999-08-26 Stan Shebs <shebs@andros.cygnus.com>
-
- * infrun.c (check_sigtramp2): New function, broken out from
- check_sigtramp2 label in handle_inferior_event.
- (handle_inferior_event): Change gotos into function calls.
-
- Declare Tahoe configuration obsolete.
- * configure.host, configure.tgt: Comment out Tahoe configs.
- * Makefile.in: Comment out Tahoe-related action.
- * tahoe-tdep.c, config/tahoe/*: Comment out.
- * NEWS: Mention obsolete status.
-
-1999-08-26 J.T. Conklin <jtc@redback.com>
-
- * i386-stub.c, m32r-stub.c, m68k-stub.c, sh-stub.c, sh-stub.c,
- sparc-stub, sparcl-stub.c sparclet-stub.c (getpacket): If '$',
- the packet start character is received in the 'middle' of a
- packet, assume that packet end character has been lost and
- start a new packet.
-
- * i386-stub.c, m32r-stub.c, m68k-stub.c, sh-stub.c, sparc-stub.c,
- sparcl-stub.c sparclet-stub.c (getpacket): Changed to return ptr
- to first character of input buffer. Removed & 0x7f masks.
- (handle_exception): Don't access remcomInBuffer directly.
-
-1999-08-25 Stan Shebs <shebs@andros.cygnus.com>
-
- * breakpoint.c (disable_breakpoints_in_shlibs): Only disable
- enabled breakpoints.
-
-Tue Aug 24 14:59:23 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * tracepoint.c, remote.c, pa64solib.h, value.h, somsolib.h,
- solib.h, scm-lang.h, language.h, inferior.h, defs.h, coff-solib.h,
- ch-lang.h, breakpoint.h, annotate.h: Remove #if __STDC__ wrapping
- struct declarations.
-
- * config/sparc/nm-sun4sol2.h, config/mn10300/tm-mn10300.h,
- config/mn10200/tm-mn10200.h, config/i386/tm-i386.h,
- config/i386/tm-i386v.h, config/i386/nm-i386sol2.h,
- config/pa/nm-hppah.h, config/rs6000/nm-rs6000.h,
- config/sparc/tm-sp64.h, config/v850/tm-v850.h,
- config/tic80/tm-tic80.h, config/sparc/tm-sparc.h,
- config/sh/tm-sh.h, config/rs6000/tm-rs6000.h, config/pa/tm-hppa.h,
- config/mips/tm-mips.h, config/m68k/tm-m68k.h,
- config/m32r/tm-m32r.h, config/i960/tm-mon960.h,
- config/fr30/tm-fr30.h, config/h8300/tm-h8300.h,
- config/arm/tm-arm.h, config/alpha/tm-alpha.h,
- config/a29k/tm-a29k.h: Ditto.
-
-Wed Aug 25 10:45:33 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * Makefile.in (gdb$(EXEEXT)): Add dependency on TDEPLIBS.
-
- * config/arm/arm.mt (TDEPLIBS): Define. Move libangsd.a to here.
- (TDEPFILES): From here.
-
-1999-08-24 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * top.c (init_main): Add new set/show command exec-done-display,
- default value is off.
- * event-loop.h: Export exec_done_display_p.
- * event-top.c: New variable exec_done_display_p.
- * infrun.c (complete_execution): Print completion message if
- corresponding flag is set.
-
- * top.c (DEFAULT_PROMPT): Add space after "(gdb)" at end of prompt.
-
- From: J.T. Conklin <jtc@redback.com>
- * top.c (DEFAULT_PROMPT): Set to "(gdb)" if not already defined.
- (init_main): Always use DEFAULT_PROMPT.
-
-Tue Aug 24 03:23:31 1999 Jeffrey A Law (law@cygnus.com)
-
- * hppa-tdep.c: Remove useless "purecov: deadcode" comments.
- (hppa_use_struct_convention): Update for PA64.
- (hppa_frame_saved_pc): Properly extract the saved PC in a call
- dummy frame.
- (in_solib_call_trampoline): Return nonzero if we are in a function
- called ".stub".
- (prologue_inst_adjust_sp): Handle std,ma.
- (skip_prologue_hard_way): Handle more PA2.0/PA64 insns.
- (hppa_frame_find_saved_regs): Similarly. Handle indirect save of
- %r3 into the stack.
-
- * config/pa/tm-hppa64.h (CALL_DUMMY_BREAKPOINT_OFFSET_P): Define.
- (CALL_DUMMY_BREAKPOINT_OFFSET): Define.
-
-Tue Aug 24 14:59:23 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * Makefile.in (gdb$(EXEEXT)): Add dependency on main.o that was
- lost when libgdb.a was added.
-
-Tue Aug 24 14:26:34 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * gdbarch.c, gdbarch.h: Convert to pure ISO-C.
-
- * gdbarch.sh: New file.
- * gdbarch.c, gdbarch.h: Add note describing gdbarch.sh
-
-Mon Aug 23 19:36:17 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * Makefile.in (libgdb.a): New target.
- (gdb$(EXEEXT)): Add dependency on libgdb.a.
- (libgdb-files, LIBGDB_OBS, libgdb, LIBGDBDEPS, LIBGDBFILES): Delete.
-
-Mon Aug 23 10:16:32 1999 Jeffrey A Law (law@cygnus.com)
-
- * infttrate.c (child_pid_to_exec_file): Find the correct base
- of the stack for PA64.
-
- * pa64solib.c: Fix some minor whitespace problems.
- (bfd_lookup_symbol): New function.
- (pa64_solib_create_inferior_hook): Find the address __dld_break
- in the dynamic linker. Try to set a shlib event breakpoint in
- that function.
- (add_to_solist): Do not add the same shared library to the shlib
- list more than once.
-
-Sun Aug 22 14:49:40 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * value.h (enum lval_type): Move declaration from here.
- * defs.h (enum lval_type): To here.
- * frame.h, gdbarch.h: Delete incomplete declaration of ``enum
- lval_type''.
-
-1999-08-20 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * breakpoint.c (can_use_hardware_watchpoint): reject expressions
- that refer to registers or register variables.
-
-Fri Aug 20 10:53:38 1999 Jeffrey A Law (law@cygnus.com)
-
- * hppa-tdep.c (hppa_fix_call_dummy): Provide PA2.0W aware code.
-
- * pa64solib.c pa64solib.h: New files.
-
- * config/pa/hppa64.mt: Delete commented out code that is and
- never will be appropriate for this target.
- * config/pa/hpux11w.mt (TDEPFILES): Remove SOM references. Also
- remove pa64solib.o.
- * config/pa/hpux11w.mh (NATDEPFILES): Remove SOM references.
-
- * configure.host; Use "hpux11w" and "hpux11" instead of
- "hpux1100w" and "hpux1100" respectively
- * config/pa/hpux11w.mh: Renamed from hpux1100w.mh.
- * config/pa/hpux11w.mt, config/pa/hpux11.mh: Likewise.
- * config/pa/hpux11.mt: Likewise.
-
-1999-08-19 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * breakpoint.h (target_hw_bp_type): new enum.
- * breakpoint.c (insert_breakpoints): use enum instead of consts.
- (remove_breakpoint): use enum instead of consts.
- (throughout): use "warning" instead of "fprintf(stderr, ..."
- [Also clean up a bunch of excessively long lines.]
-
-1999-08-19 J.T. Conklin <jtc@redback.com>
-
- * i386-stub.c (waitabit): Removed.
- (breakpoint): Update.
-
- * i386-stub.c, m32r-stub.c, sparc-stub.c, sparcl-stub.c,
- sparclet-stub.c (set_debug_traps): Don't send gratuitous ACK.
-
- * m68k-stub.c (putpacket): Restore code so that packets are sent
- until an ACK is received.
-
-1999-08-19 Eli Zaretskii <eliz@is.elta.co.il>
-
- * breakpoint.c (bpstat_stop_status): Accept triggered addresses
- anywhere inside the region occupied by a watched variable as a
- sign that the watchpoint fired. Don't stop if some watchpoint
- was triggered, but its address doesn't match the address of this
- watchpoint.
- (TARGET_REGION_OK_FOR_HW_WATCHPOINT): New macro.
- Default definition is to call TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT.
- (can_use_hardware_watchpoint): Call TARGET_REGION_OK_FOR_HW_WATCHPOINT;
- if it returns zero, return zero immediately.
- (insert_breakpoints): Try to insert watchpoints for all the values
- on the value chain, even if some of them fail to insert. Remove
- the breakpoint if parts of its value chain couldn't be inserted.
-
-1999-08-19 Eli Zaretskii <eliz@is.elta.co.il>
-
- * go32-nat.c (go32_stopped_by_watchpoint): Remove unused code.
-
-1999-08-19 Eli Zaretskii <eliz@is.elta.co.il>
-
- * go32-nat.c (tcgetpgrp, tcsetpgrp): New functions.
-
-1999-08-19 Eli Zaretskii <eliz@is.elta.co.il>
-
- * go32-nat.c (go32_wait): If we are in a single-step mode, and the
- next instruction is INT nn or INTO, use a temporary breakpoint to
- simulate single-step mode, and reset the trace flag.
-
-1999-08-19 Eli Zaretskii <eliz@is.elta.co.il>
-
- * go32-nat.c (wp_op): New typedef.
- (SHOW_DR): Print the length of watched region as well.
- (go32_insert_aligned_watchpoint): Remove unused argument PID. All
- callers and the prototype changed.
- (go32_handle_nonaligned_watchpoint): Renamed from
- go32_insert_nonaligned_watchpoint. Now handles all operations on
- non-aligned watchpoints: insertion, deletion, and counting. If
- called with wp_count as the first argument, return the count of
- debug registers needed to watch the region. Don't break out of
- the loop before all the addresses in the region are processed.
- (go32_remove_watchpoint): Call go32_remove_aligned_watchpoint to
- do the actual work.
- (go32_remove_aligned_watchpoint): New function, modeled after
- go32_insert_aligned_watchpoint. Removes watchpoints that watch
- regions of arbitrary length by calling
- go32_handle_nonaligned_watchpoint as needed.
- (go32_region_ok_for_watchpoint): New function, called from
- can_use_hardware_watchpoint via the new macro
- TARGET_REGION_OK_FOR_HW_WATCHPOINT.
-
- * config/i386/nm-go32.h (TARGET_REGION_OK_FOR_HW_WATCHPOINT):
- Define to call go32_region_ok_for_watchpoint.
- (DECR_PC_AFTER_HW_BREAK): Define back to zero (previous redefinition
- to 1 was due to a bug in go32-nat.c).
-
-1999-08-19 Eli Zaretskii <eliz@is.elta.co.il>
-
- * go32-nat.c (cleanup_dregs): New function.
- (go32_mourn_inferior): Call it.
- (IS_REG_FREE, LOCAL_ENABLE_REG, GLOBAL_ENABLE_REG, DISABLE_REG,
- SET_BREAK, SET_WATCH, IS_WATCH, WATCH_HIT): Protect arguments with
- parentheses.
- (SET_BREAK): Increment the debug register's reference count.
- (DR_DEF): New macro, returns the access and length bits of the
- breakpoint.
- (SHOW_DR): Print the reference count of each register. Disable or
- enable print-out depending on an environment variable GDB_SHOW_DR.
- (go32_insert_aligned_watchpoint): Look for an occupied debug
- register with the same address and access/length bits, and reuse
- it by incrementing reference the count, before occupying another
- register. Return zero upon success.
- (go32_insert_nonaligned_watchpoint): Pass the read/write bits to
- go32_remove_watchpoint.
- (go32_remove_watchpoint): Accept an additional parameter: the
- read/write bits of the watchpoint to remove, and only remove a
- watchpoint if it's occupied and its address and read/write bits
- match. Only disable the register if its reference count is zero;
- otherwise just decrease the reference count.
- (go32_remove_hw_breakpoint): Only decrease reference count and
- disable the debug register if it is occupied and its access bits
- match those of an instruction breakpoint.
- (go32_insert_hw_breakpoint): Before occupying another debug
- register, look for an already occupied register that defines an
- instruction breakpoint with the same address. If found, increment
- its reference count. Call SHOW_DR even if failed to insert a
- breakpoint.
-
- * config/i386/nm-go32.h (target_remove_watchpoint): Accept the
- TYPE argument as well.
-
-Wed Aug 18 17:47:25 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * mips-tdep.c: Add more comments.
-
-1999-08-17 Stan Shebs <shebs@andros.cygnus.com>
-
- * blockframe.c: Don't use PARAMS anymore, remove obsolete comment
- about frameless functions.
-
-1999-08-16 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * thread.c (delete_thread): delete any step_resume breakpoint
- held by the thread. (prune_threads): call delete_thread.
- * breakpoint.c (breakpoint_init_inferior): if startup, then
- delete any remaining step_resume breakpoints.
- * infrun.c (handle_inferior_event): add cautionary comment.
-
-1999-08-16 Fernando Nasser <fnasser@totem.to.cygnus.com>
-
- * remote.c (remote_async_mourn): New function. Async version of
- remote_mourn().
-
-1999-08-16 Eli Zaretskii <eliz@is.elta.co.il>
-
- * terminal.h [__GO32__]: Remove conditional; DJGPP now supports
- termios.
-
-1999-08-16 Eli Zaretskii <eliz@is.elta.co.il>
-
- * command.c (CANT_FORK) [__MSDOS__]: Define.
- (shell_escape) [CANT_FORK]: If ARG is NULL, pass an empty string
- to `system'.
- [__DJGPP__]: Return to the original directory after the shell
- exits.
-
-1999-08-16 Eli Zaretskii <eliz@is.elta.co.il>
-
- * config/i386/xm-go32.h (ROOTED_P): Don't reference X[1] if X[0]
- is a null character.
-
- * config/i386/nm-go32.h (DECR_PC_AFTER_HW_BREAK): Define to 1.
-
-1999-08-16 Eli Zaretskii <eliz@is.elta.co.il>
-
- * go32-nat.c (redir_cmdline_parse, redir_cmdline_delete,
- redir_to_child, redir_to_debugger, redir_debug_init)
- [__DJGPP_MINOR__ < 3]: Dummy stubs for redirecting debuggee's
- standard handles.
- (print_387_status): Print "last FP instruction", not "last
- exception". Restore the upper 5 bits of the opcode that aren't
- stored in the FPU state. Print the FPU stack in its physical
- order, not relative to ST(0). Print "special", not "trap" for
- unnormals and infinities. Print all 10 bytes of each FP register,
- and print them with 19 significant digits.
- (regno_mapping): Make the mapping consistent with tm-go32.h.
- (sig_map): Add mappings for SIGQUIT, SIGFPE, SIGALRM. Map NMI to
- SIGBUS.
- (excep_map): New variable, maps GDB signals to DJGPP exceptions.
- (go32_attach): Signal an error: we cannot attach to other
- processes.
- (go32_resume): Record the signal with which the inferior should be
- resumed, mapped to the DJGPP exception number.
- (go32_wait): Pass the signal recorded in go32_resume to the
- debuggee. Save and restore debugger's and debuggee's current
- working directory.
- [__DJGPP_MINOR__ < 3]: Save and restore inferior's FPU state.
- (store_register): FPU regsiters have numbers less than 31.
- (go32_kill_inferior): Delete the parsed command-line storage.
- (go32_create_inferior): Initialize the parsed command-line
- storage. Parse the command line and create the redirections for
- inferior's standard handles.
- [__DJGPP_MINOR__ < 3]: Init the inferior's FPU state.
- (ignore2): Function deleted.
- (device_mode): New function, switches a character device between
- raw and cooked mode.
- (go32_terminal_init): Invalidate the raw/cooked mode information.
- (go32_terminal_info): Print whether the inferior's terminal is in
- raw or cooked mode.
- [__DJGPP_MINOR__ > 2]: Say if standard handles are redirected or
- closed by the inferior.
- (go32_terminal_inferior): Switch standard handles to the
- inferior's files/devices. Put the inferior's input device to
- raw/cooked mode, exactly like we found it last time.
- (go32_terminal_ours): Restore debugger's standard handles and put
- the terminal into cooked mode. Save the mode of inferior's input
- device.
- (init_go32_ops): Assign go32_ops.to_attach,
- go32_ops.to_terminal_info, go32_ops.to_terminal_ours_for_output.
- Initialize inferior's cwd and the command-line storage.
-
-Mon Aug 16 14:29:30 1999 Jeffrey A Law (law@cygnus.com)
-
- * config/pa/tm-hppa.h (ARGS_GROW_DOWNWARD): Define.
- * config/pa/tm-hppa64.h (ARGS_GROW_DOWNWARD): Undefine.
- * hppa-tdep.c (hppa_push_arguments): Handle arguments growing in
- both directions depending ARGS_GROW_DOWNWARD.
- (hppa_find_saved_regs): Update for 64bit wide registers & pointers
- and PA64 ABI.
-
- * hppa-tdep.c (hppa_pop_frame): Various fixes for 64bit wide
- registers and pointers.
- (hppa_fix_call_dummy, skip_trampoline_code): Likewise.
- (restore_pc_queue): Update tests for width of memory loads.
- (hppa_push_arguments): Delete version that was #if 0'd out.
-
- * hppa-tdep.c (push_dummy_frame): Handle the new 64it ABI.
- (find_dummy_frame_regs): Corresponding changes.
-
- * hppa-tdep.c (read_unwind_info): Initialize obj_private->dp.
- (internalize_unwinds): Improve test for when to use segment
- relative code for unwinder bounds.
- (rp_saved): Fix offset of saved return pointer for the 64bit ABI.
- (hppa_frame_saved_pc): Various updates to handle 64bit registers
- and pointers.
- (frame_chain, restore_pc_queue): Likewise.
-
- * hppa-tdep.c (rp_saved): RP is saved at frame-16 when
- pointers are 64bits wide.
-
- * hppa-tdep.c (record_text_segment_lowaddr): New function.
- (internalize_unwinds): Use it if addressess are 8 bytes wide.
-
- * symfile.c (syms_from_objfile): No longer warn if the lowest
- section does not have SEC_CODE set.
-
- * Makefile.in (pa64solib.o): Add dependencies.
-
- * hppah-nat.c (store_inferior_registers): Do not try to write a
- nonzero value to the high part of IPSW. Fix typo in unable to store
- warning.
-
- * config/pa/tm-hppa.h (opd_data structure): Delete. Not actually
- needed.
- (struct obj_private_struct): Add new entry for the objfile's DP
- value.
- * config/pa/tm-hppa64.h (CALL_DUMMY): Add a nop to make it an even
- number of instructions. Pack the dummy into word sized hunks.
- (CALL_DUMMY_LENGTH): Update appropriately.
- (PC_IN_CALL_DUMMY, CALL_DUMMY_LOCATION_AFTER_TEXT_END): Delete.
-
-Mon Aug 16 19:08:19 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * configure.in: Try -lsocket when looking for socketpair.
- * configure, config.h: Re-generate.
-
-1999-08-13 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- From Christopher Faylor <cgf@cygnus.com>:
-
- * event-loop.c (gdb_wait_for_event): Before going to wait for
- another event with select or poll, flush the error and the output
- streams.
-
- * event-top.c (gdb_readline2): Do not buffer the input, because
- doing so can interfere with select/poll in bad ways.
-
-Fri Aug 13 17:36:56 1999 Eli Zaretskii <eliz@is.elta.co.il>
-
- * maint.c (maintenance_dump_me) [__DJGPP__]: Simulate a core dump
- with SIGABRT.
- * utils.c (quit) [__MSDOS__]: Don't mention SIGINT, since it's not
- gonna happen.
- (notice_quit): No need to define this function for the DJGPP port.
-
-1999-08-13 James Ingham <jingham@leda.cygnus.com>
-
- * arm-tdep.c (arm_frameless_function_invocation): SKIP_PROLOGUE
- macro no longer modifies its argument. Update uses to accord.
-
- * config/arm/arm.mt (TDEPFILES): Add the remote-rdi.o to the
- TDEPFILES.
- * configure.tgt: Add rdi-share to configdir for the Arm targets.
-
-Fri Aug 13 11:16:32 1999 Jeffrey A Law (law@cygnus.com)
-
- * hppah-nat.c (store_inferior_registers): Revamp to be PA2.0W
- aware.
-
- * infttrace.c (ttrace_write_reg_64): New function.
-
- * hp-symtab-read.c (is_in_import_list): Delete extern declaration.
- * somread.c (is_in_import_list): Delete function.
- * objfiles.c (is_in_import_list): New function.
- * objfiles.h (is_in_import_list): Declare.
-
- * config/pa/tm-hppa64.h (GDB_TARGET_IS_HPPA20W): Define before
- including tm-hppah.h.
- (PC_IN_CALL_DUMMY): Define.
- (HPUX_1100): Similarly.
- * config/pa/tm-hppa.h (somsolib.h, pa64solib.h): Conditionalize
- includes on GDB_TARGET_IS_HPPA20W.
-
- * configure.host: Distinguish between wide and narrow modes
- for hpux11.
- * config/pa/hpux1100w.mh, config/pa/hpux1100w.mt: New files.
-
- * config/pa/tm-hppa64.h (STACK_ALIGN): Redefine.
- (REG_PARM_STACK_SPACE): Likewise.
-
- * config/pa/tm-hppa.h (CLEAN_UP_REGISTER_VALUE): Handle 64bit
- PA target correctly.
- (REG_PARM_STACK_SPACE): Define.
- (struct unwind_table_entry): region_start and region_end are
- CORE_ADDRs.
- (typedef opd_data): New.
- (obj_private_data_t): Include pointer to opd_data structure.
-
-1999-08-13 Keith Seitz <keiths@cygnus.com>
-
- * stabsread.c (stabsread_clear_cache): New funciton which clears
- an optimization cache of the reader.
-
- * coffread.c (coff_symfile_finish): Give stabs reader a chance to
- clean up.
-
- * win32-nat.c (handle_load_dll): Don't suppress re-reading symbols
- from a DLL if an objfile for it already exists. (Not that this should
- happen anymore anyway...)
-
-1999-08-13 Keith Seitz <keiths@cygnus.com>
-
- * config/mcore/tm-mcore.h (SAVE_DUMMY_FRAME_TOS): Define for MCore,
- which also requires that the stack pointer be saved for call
- dummies BEFORE arguments get pushed onto it.
-
-1999-08-12 Stan Shebs <shebs@andros.cygnus.com>
-
- From Eli Zaretskii <eliz@is.elta.co.il>:
- * source.c (mod_path) [_WIN32 || __DJGPP__]: Don't remove trailing
- slash from "d:/". Don't overstep the beginning of name.
- [_WIN32 || __MSDOS__]: Convert "d:" to "d:.", otherwise appending
- a slash changes its meaning.
- (openp): Use SLASH_P, not equality with SLASH_CHAR.
- (print_source_lines_base) [CRLF_SOURCE_FILES]: Skip \r only before
- a \n.
- (forward_search_command) [CRLF_SOURCE_FILES]: Remove \r at the end
- of all lines.
- (reverse_search_command) [CRLF_SOURCE_FILES]: Likewise.
-
- * gnu-regex.c (CHAR_CLASS_MAX_LENGTH): Don't use wide characters
- unless HAVE_BTOWC is defined.
-
-Fri Aug 13 10:20:12 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- From J.T. Conklin <jtc@redback.com>:
- * gdbinit.in: Change the template .gdbinit to match the recent
- fatal error handling change.
-
-1999-08-11 Keith Seitz <keiths@cygnus.com>
-
- * maint.c (maintenance_internal_error): Fix typo in prototype.
-
-Wed Aug 11 15:38:05 1999 Andrew Cagney <cagney@amy.cygnus.com>
-
- * remote.c (remote_rcmd): Pass an empty command across to the
- target. Check for and handle an ``Enn'' return status.
-
-Tue Aug 10 13:59:45 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * maint.c (_initialize_maint_cmds): Add ``maintenance
- internal-error'' command.
- (maintenance_internal_error): New function.
-
-1999-08-10 James Ingham <jingham@leda.cygnus.com>
-
- * top.c: Remove the disassembly_flavor_hook, use the new set_hook
- instead.
- * defs.h: Ditto.
- * arm-tdep.c (set_disassembly_flavor_sfunc): Ditto.
-
-1999-08-10 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * config/i386/nm-i386sol2.h (FIND_NEW_THREADS): remove, obsolete.
- * config/sparc/nm-sun4sol2.h (FIND_NEW_THREADS): remove, obsolete.
-
-1999-08-10 J.T. Conklin <jtc@redback.com>
-
- * configure.tgt (i[3456]86-*-aout*, i[3456]86-*-coff*,
- i[3456]86-*-elf*): Use embed.mt.
- * config/i386/embed.mt: New file.
-
-1999-08-10 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * remote.c (remote_async_open_1): Remove casting in call to
- add_file_handler.
- (extended_remote_async_create_inferior): Ditto.
-
- * event-top.c (change_line_handler): Ditto.
- (_initialize_event_loop): Ditto.
-
- * infrun.c (complete_execution): Ditto.
-
- * event-loop.c (add_file_handler): Change proc parameter to be ptr
- to func with void parameter, rather than void*. Coerce second
- paramter in calls to create_file_handler. Replace
- async_handler_func and file_handler_func with handler_func.
-
- * event-loop.h: Get rid of typedefs for file_handler_func and
- async_handler_func, just have one, and call it handler_func.
- Replace async_handler_func and file_handler_func occurrences with
- handler_func.
-
-Tue Aug 10 03:13:03 1999 Jeffrey A Law (law@cygnus.com)
-
- * hppa-tdep.c: Delete random #if 0 code.
- (is_branch): Handle new branching opcodes from PA2.0
- (inst_saves_gr, inst_saves_fr): Handle additional instructions
- used to save general and floating point registers in the stack.
- (skip_prologue_hard_way): Handle additional instructions to
- save the return pointer in the stack.
- (after_prologue): Fix mis-guided and incorrect code to find
- the end of the prologue using debug symbols.
- (hppa_skip_prologue): Generally clean up comments, lose code
- which does not apply to the PA, etc.
-
-Sun Aug 8 17:53:41 1999 Andrew Cagney <cagney@amy.cygnus.com>
-
- * MAINTAINERS: Make Andrew Cagney the mn10300 maintainer.
- Transfer responsibility for the PowerPC from Andrew Cagney to
- Elena Zannoni.
-
-Tue Aug 10 13:59:45 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- Based on code from J.T. Conklin <jtc@redback.com>:
- * utils.c (internal_error): Make quit? and coredump? separate
- questions so that the user can dump-core and not quit.
- (internal_error): Cleanup error message.
-
-1999-08-09 Tom Tromey <tromey@cygnus.com>
-
- * kod-cisco.c (cisco_kod_open): Removed incorrect `arg' argument.
-
-Sun Aug 8 12:06:47 1999 Fred Fish <fnf@cygnus.com>
-
- * coffread.c (process_coff_symbol): Remove section_offsets from
- prototype and function definition. Get section_offsets from the
- passed objfile and pass it on to callees the same way.
- (coff_symtab_read): Ditto.
- (coff_symfile_read): Ditto.
- * dbxread.c (read_dbx_dynamic_symtab): Ditto.
- (read_dbx_symtab): Ditto.
- (dbx_symfile_read): Ditto.
- (coffstab_build_psymtabs): Ditto.
- (elfstab_build_psymtabs): Ditto.
- (stabsect_build_psymtabs): Ditto.
- * dstread.c (dst_symfile_read): Ditto.
- * elfread.c (elf_symfile_read): Ditto.
- * jv-class.c (jv_class_symfile_read): Ditto.
- * mipsread.c (mipscoff_symfile_read): Ditto.
- * nlmread.c (nlm_symfile_read): Ditto.
- * os9kread.c (os9k_symfile_read): Ditto.
- * somread.c (som_symfile_read): Ditto.
- * stabsread.h (elfstab_build_psymtabs): Ditto.
- * xcoffread.c (xcoff_initial_scan): Ditto.
-
- * symfile.h (sym_read): Remove section_offsets from prototype.
- * symfile.c (syms_from_objfile): Call sym_read without
- section_offsets.
- (reread_symbols): Ditto.
-
- * elfread.c (elfstab_offset_sections): Use SIZEOF_SECTION_OFFSETS
- to allocate sections offsets array.
- * xcoffread.c (xcoff_symfile_offsets): Ditto.
-
- * partial-stab.h (section_offsets): Get from objfile.
- * dbxread.c (read_dbx_symtab): Fix typo that made -1 casted
- to a CORE_ADDR look like an subtraction expression.
- * objfiles.h: Add some comments.
- * symfile.c: Add some comments.
- * objfiles.c: Add some comments.
- (objfile_relocated): Use ALL_OBJFILE_OSECTIONS to iterate over
- sections.
- (find_pc_sect_sections): Use ALL_OBJSECTIONS to iterate over all
- sections in all objfiles.
- * symfile.c (syms_from_objfile): Use ALL_OBJFILE_OSECTIONS.
-
- * irix5-nat.c (symbol_add_stub): Fix typo that made taking the
- address of lowest_sect with '&' look like a bitwise and op.
- * osfsolib.c (symbol_add_stub): Ditto.
- * solib.c (symbol_add_stub): Ditto.
- * symfile.c (syms_from_objfile): Ditto.
-
- * dwarf2read.c (dwarf2_build_psymtabs_hard): Minor format tweak.
- * symfile.c (syms_from_objfile): Ditto, and fix typo.
- * top.c (init_main): Fix typo in comment (DEFULAT_PROMPT).
- * doc/gdbint.texinfo (find_sym_fns): This replaces symfile_init.
-
-1999-08-08 James Ingham <jingham@leda.cygnus.com>
-
- * remote.c (remote_insert_breakpoint): Fix typo in Z packet support.
- Also move Z packet support OUTSIDE of REMOTE_BREAKPOINT ifdef,
- since this is not set for all targets that support the Z packet.
-
-Fri Aug 6 17:17:28 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * defs.h (fatal): Delete declaration.
- (internal_error): Declare.
- * utils.c (nomem): Call internal_error instead of fatal.
- (fatal_dump_core): Delete.
- (malloc_botch): Print message direct to stderr.
- (fatal): Delete definition.
- * utils.c (internal_error): Define.
-
- * gdbarch.h, gdbarch.c, hppah-nat.c, ch-exp.c, dsrec.c, sh-tdep.c,
- infptrace.c, f-lang.c, symm-nat.c, top.c, m3-nat.c, v850-tdep.c,
- remote-vx.c, remote-sim.c, remote-mips.c, source.c, infcmd.c,
- findvar.c, remote.c: Replace fatal with call to internal_error.
-
-Sun Aug 8 15:28:33 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * ser-pipe.c (STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO): Move
- definition from here.
- * defs.h: To here.
-
-Sat Aug 7 21:44:59 1999 Fred Fish <fnf@cygnus.com>
-
- * remote.c (remote_insert_breakpoint): Fix typo, missing ';'.
-
-Sun Aug 8 11:26:57 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * mips-tdep.c (mips_gdbarch_init): Add break; to the default case.
-
-Fri Aug 6 19:26:03 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * defs.h: Delete #if ANSI_PROTOTYPES code, GDB assumes ISO-C.
- * remote-rdp.c (send_rdp), remote-os9k.c (printf_monitor),
- remote-mips.c: (mips_error), remote-array.c: (printf_monitor,
- debuglogs), complaints.c (complain), monitor.c:
- (monitor_printf_noecho, monitor_printf), language.c (type_error,
- range_error), remote-st.c: (printf_stdebug), remote-sim.c
- (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
- gdb_os_evprintf_filtered, gdb_os_error), serial.c (serial_printf),
- utils.c (warning, error, fatal, fatal_dump_core, (query,
- fprintf_filtered, fprintf_unfiltered, fprintfi_filtered,
- printf_filtered, printf_unfiltered, printfi_filtered): Delete
- legacy #ifndef ANSI_PROTOTYPES varargs code.
-
- * defs.h: Don't #include <varargs.h>.
- * remote-rdp.c, remote-os9k.c, remote-mips.c, remote-array.c,
- monitor.c, remote-st.c: Don't include <varargs.h> or <stdarg.h>.
-
-1999-08-06 James Ingham <jingham@leda.cygnus.com>
-
- * configure.in, configure: add the --enable-multi-ice to determine
- whether to configure and build the multi-ice-gdb-server. Note,
- for now this only builds on cygwin, so don't enable it for other
- platforms...
-
-1999-08-06 Tom Tromey <tromey@cygnus.com>
-
- * Makefile.in (SFILES): Added kod.c and kod-cisco.c.
- (COMMON_OBS): Added kod.o and kod-cisco.o.
- (kod-cisco.o): New target.
- (kod.o): New target.
- * kod-cisco.c: New file.
- * kod.c: New file.
-
-1999-08-06 James Ingham <jingham@leda.cygnus.com>
-
- These are some fixups for the Arm, and support for the
- disassembly-flavor for the ARM.
-
- * defs.h: Declare the disassembly_flavor_hook
- * top.c: Define the disassembly_flavor_hook
- * i386-tdep.c: Remove unnecessary declaration of the
- disassembly_flavor_hook.
-
- * config/arm/tm-arm.h: Change definition of
- arm_init_extra_frame_info.
- Add a few more comments.
- * arm-tdep.c (arm_init_extra_frame_info): Listen to and use the
- fromleaf parameter passed into init_extra_frame_info.
- (set_disassembly_flavor_sfunc): New Function.
- (set_disassembly_flavor): New Function.
- (arm_othernames): Use the set_disassembly_flavor.
- (_initialize_arm_tdep): Setup the disassembly flavor commands, and
- initialize the flavor.
- (arm_frameless_function_invocation): Adjust for
- frameless functions that have 1 or 2 instructions that mimic the
- standard APCS form.
- (arm_scan_prologue): Be more careful about scanning the function
- prologue. Don't match things that just have a few of the prologue
- instructions out of order, and don't get thrown by the scheduler
- migrating instructions into the prologue.
-
- Add support for the "Z" and "z" packets to request the stub
- to set a breakpoint.
-
- * remote.c (set_remote_protocol_Z_packet_cmd): New function.
- (show_remote_protocol_Z_packet_cmd): New Function.
- (remote_open_1): Init the Z packet config.
- (remote_async_open_1): Init the Z packet config.
- (remote_insert_breakpoint): Use the "Z" packet if supported.
- (remote_remove_breakpoint): Use the "z" packet if supported.
- (remote_insert_watchpoint): New Function - currently wired to
- nothing.
- (remote_remove_watchpoint): Ditto.
- (remote_insert_hw_breakpoint): Ditto.
- (remote_remove_hw_breakpoint): Ditto.
-
-1999-08-06 Stan Shebs <shebs@andros.cygnus.com>
-
- * infcmd.c: Include parser-defs.h.
- (interrupt_target_command): Declare.
- (stack_dummy_testing): Remove old funky flag.
- (run_stack_dummy): Remove unused reference to old funky flag.
-
-1999-08-06 Tom Tromey <tromey@cygnus.com>
-
- * command.c (do_setshow_command): Call set_hook if not NULL.
- * top.c (set_hook): New hook definition.
- * defs.h (set_hook): Declare.
-
-1999-08-05 Stan Shebs <shebs@andros.cygnus.com>
-
- * infrun.c: Convert code to pure standard C, elim some warnings.
- (stopped_for_shlib_catchpoint): Remove, never used.
-
-1999-08-05 Keith Seitz <keiths@cygnus.com>
-
- * NEWS: Mention new Motorola MCore target.
-
- * sparc-tdep.c (gdb_print_insn_sparc): Print insns of the current
- architecture.
-
-Thu Aug 5 20:41:22 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * configure.in (configdirs): Add check for socketpair.
- * configure, config.in: Re-generate.
-
- From Mon Jul 19 10:46:18 1999 Philippe De Muyter <phdm@macqel.be>:
- * ser-pipe.c (sys/wait.h): Include this file only #if HAVE_SYS_WAIT_H.
- (STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO): Macros defined if needed.
-
-Thu Aug 5 20:04:17 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * target.c (debug_to_open, debug_to_attach, debug_to_post_attach,
- debug_to_require_attach, debug_to_detach, debug_to_require_detach,
- debug_to_wait, debug_to_post_wait, debug_to_fetch_registers,
- debug_to_store_registers, debug_to_prepare_to_store,
- debug_to_xfer_memory, debug_to_files_info,
- debug_to_insert_breakpoint, debug_to_remove_breakpoint,
- debug_to_terminal_init, debug_to_terminal_inferior,
- debug_to_terminal_ours_for_output, debug_to_terminal_ours,
- debug_to_terminal_info, debug_to_kill, debug_to_load,
- debug_to_lookup_symbol, debug_to_create_inferior,
- debug_to_post_startup_inferior,
- debug_to_acknowledge_created_inferior,
- debug_to_clone_and_follow_inferior,
- debug_to_post_follow_inferior_by_clone,
- debug_to_insert_fork_catchpoint, debug_to_remove_fork_catchpoint,
- debug_to_insert_vfork_catchpoint,
- debug_to_remove_vfork_catchpoint, debug_to_has_forked,
- debug_to_has_vforked, debug_to_can_follow_vfork_prior_to_exec,
- debug_to_post_follow_vfork, debug_to_insert_exec_catchpoint,
- debug_to_remove_exec_catchpoint, debug_to_has_execd,
- debug_to_reported_exec_events_per_exec_call,
- debug_to_has_syscall_event, debug_to_has_exited,
- debug_to_mourn_inferior, debug_to_can_run,
- debug_to_notice_signals, debug_to_thread_alive, debug_to_stop,
- debug_to_query, debug_to_rcmd, debug_to_enable_exception_callback,
- debug_to_get_current_exception_event, debug_to_pid_to_exec_file,
- debug_to_core_file_to_sym_file, debug_to_close): Send trace output
- to ``gdb_stdlog'' instead of ``gdb_stderr''.
-
-Thu Aug 5 16:22:10 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote.c (init_remote_ops): Initialize remote_ops.to_rcmd.
- (init_remote_async_ops): Initialize remote_async_ops.to_query.
- (remote_rcmd): New function.
-
- * monitor.c (monitor_rcmd): Rename monitor_command.
- (init_base_monitor_ops): Initialize monitor_ops.to_rcmd.
- (_initialize_remote_monitors): Move "monitor" command from here.
- * target.c (initialize_targets): To here.
- (monitor_command): New function. Implement "monitor" command.
-
- * target.c (cleanup_target): de_fault to_rcmd.
- (update_current_target): INHERIT to_rcmd.
- (debug_to_rcmd): New function.
- (setup_target_debug): Initialize current_target.to_rcmd.
-
- * target.h (struct target_ops): Add field to_rcmd.
- (target_rcmd): Define.
-
-Thu Aug 5 14:24:07 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote.c: Replace comment describing remote protocol with
- pointer to official document.
-
-Thu Aug 5 11:59:06 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote.c (remote_protocol_binary_download): New variable.
- Replace ``remote_binary_download'' and ``remote_binary_checked''.
- (set_remote_protocol_binary_download_cmd,
- show_remote_protocol_binary_download_cmd): New functions.
- (remote_open_1, remote_async_open_1, remote_cisco_open):
- Initialize ``remote_protocol_binary_download'' instead of
- ``remote_binary_download''.
- (check_binary_download): Re-write.
- (remote_write_bytes): Ditto.
- (_initialize_remote): Add ``set remote X-packet'' and ``show
- remote X-packet'' commands. Disable old ``set
- remotebinarydownload'' command.
-
-1999-08-04 Keith Seitz <keiths@cygnus.com>
-
- * remote-rdi.c (arm_rdi_close): Close the transport device, too.
-
-Wed Aug 4 10:42:58 1999 Fred Fish <fnf@cygnus.com>
-
- * xcoffread.c (scan_xcoff_symtab): Change main_aux into
- an array of 5 internal_auxent to leave room for bfd to
- write n_numaux entries. Change code to use the first one.
-
-1999-08-02 Stan Shebs <shebs@andros.cygnus.com>
-
- * c-valprint.c (c_val_print): When printing decimal equivalent
- of a char, cast appropriately.
-
-1999-08-02 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- From Jonathan Larmour <jlarmour@cygnus.co.uk>:
- * main.c (print_gdb_help): Use gdbinit variable to determine file
- name used for --nx help
-
-1999-08-01 Jason Molenda (jsm@bugshack.cygnus.com)
-
- * config/mips/tm-mips.h (BIG_ENDIAN): Don't define here.
-
-1999-08-01 Jim Blandy <jimb@zwingli.cygnus.com>
-
- * stabsread.c (read_range_type): Handle an unsigned range type
- whose length in bytes is any power of two, not just a few
- common ones.
-
- * monitor.c (monitor_expect): When we receive a character that
- isn't part of the string we were expecting, don't just start
- matching again at the beginning of the string --- some shorter
- suffix of the input might be a prefix of the string too.
-
-1999-07-31 Fred Fish <fnf@cygnus.com>
-
- * symfile.c (symbol_file_command): Fix typo that made -1 casted
- to a CORE_ADDR look like an subtraction expression.
- (add_symbol_file_command): Ditto.
-
-1999-07-30 Jim Blandy <jimb@cygnus.com>
-
- * hppa-tdep.c (pa_print_registers): Frob register output some more.
-
-1999-07-29 Jim Blandy <jimb@cygnus.com>
-
- * config/pa/nm-hppah.h (PTRACE_ARG3_TYPE): After more
- consideration, make this a CORE_ADDR, like WDB did.
-
- Rather than casting every single use of really_free_pendings to
- make_cleanup_func, why not actually make it have that type? Golly!
- * buildsym.c (really_free_pendings): Change argument type to PTR.
- buildsym.h (really_free_pendings): Fix declaration.
- * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1),
- dwarf2read.c (psymtab_to_symtab_1), dwarfread
- (psymtab_to_symtab_1), hp-psymtab-read.c (hpread_build_psymtabs),
- os9kread.c (os9k_symfile_read, os9k_psymtab_to_symtab_1),
- xcoffread.c (xcoff_psymtab_to_symtab_1, xcoff_initial_scan):
- Remove casts.
-
- Pass a CORE_ADDR safely through catch_errors.
- * hppa-tdep.c (args_for_find_stub): New member, return_val.
- (cover_find_stub_with_shl_get): Change argument and return type to
- match catch_errors. Save return value of find_stub_with_shl_get
- in *args.
- (initialize_hp_cxx_exception_support): Collect value of
- eh_notify_callback_addr from args.
-
- Get rid of some noise. It would be nice to get helpful warnings
- from the compiler about lossy conversions.
- * hppa-tdep.c (eh_notify_hook_addr, eh_notify_callback_addr,
- eh_break_addr, eh_catch_catch_addr, eh_catch_throw_addr,
- break_callback_sal): Initialize these to zero, not NULL, to shush
- warnings.
- * infttrace.c (thread_fake_step): Compare signal to
- TARGET_SIGNAL_0, not NULL, to avoid warnings.
- (_initialize_infttrace): Add sanity check.
-
- * config/pa/nm-hppah.h (PTRACE_ARG3_TYPE): Define this to be
- long, so we can pass arguments properly to ptrace.
-
- * hppah-nat.c (child_xfer_memory): Correctly compute mask to round
- address to an int boundary.
-
-1999-07-29 Jim Blandy <jimb@cygnus.com>
-
- Change from Ian Lance Taylor <ian@zembu.com>. The
- i386_linux_sigtramp* functions should be moved to
- i386-linux-tdep.c, when that file is introduced.
-
- * config/i386/tm-linux.h (LINUX_SIGCONTEXT_SIZE): Define.
- (LINUX_SIGCONTEXT_PC_OFFSET): Define.
- (LINUX_SIGCONTEXT_SP_OFFSET): Define.
- (SIGCONTEXT_PC_OFFSET): Don't define.
- (I386_LINUX_SIGTRAMP): Define.
- (IN_SIGTRAMP): Define.
- (i386_linux_sigtramp): Declare.
- (sigtramp_saved_pc): Define.
- (i386_linux_sigtramp_saved_pc): Declare.
- (FRAMELESS_SIGNAL): Define.
- (FRAME_CHAIN, FRAME_SAVED_PC): Define after #undef.
- * i386-tdep.c (i386_linux_sigtramp_start): New static function if
- I386_LINUX_SIGTRAMP.
- (i386_linux_sigtramp): New function if I386_LINUX_SIGTRAMP.
- (i386_linux_sigtramp_saved_pc): Likewise.
- (i386_linux_sigtramp_saved_sp): Likewise.
-
-1999-07-28 Jim Blandy <jimb@cygnus.com>
-
- * infrun.c (handle_inferior_event): Don't try to use the code for
- stepping over a function call to also handle stepping out of a
- sigtramp on HP-UX. That ends up trashing step-resume breakpoints.
- This change reverts some of David Taylor's change of 31 Dec 1998.
- The HP-UX maintainer needs to submit a new change for whatever
- problem the original change was trying to fix.
-
-1999-07-28 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * event-top.c (command_line_handler): Don't treat an empty line
- from readline the same way as a multiline command. This avoids
- missing detecting when the user presses just 'enter'.
-
-1999-07-28 Jim Blandy <jimb@cygnus.com>
-
- Provide more sanity checking:
- * infrun.c (handle_inferior_event): Before assigning a new
- breakpoint to step_resume_breakpoint, make sure it's not already
- pointing at one; if it is, that's a bug.
- (check_for_old_step_resume_breakpoint): New function.
-
-1999-07-28 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- From Eli Zaretskii <eliz@is.elta.co.il>:
- * top.c (gdb_init) [__MSDOS__]: Arrange for GDB to return to the
- original directory before exiting.
- (cd_command) [_WIN32 || __MSDOS__]: Canonicalize the new directory
- name explicitly. Handle "d:/" names correctly.
- (init_history) [__MSDOS__]: Use _gdb_history as the default GDB
- history file name.
-
-Mon Jul 26 17:13:39 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote.c (enum packet_support, enum packet_detect, struct
- packet_config): Define.
- (set_packet_config_cmd, show_packet_config_cmd,
- add_packet_config_cmd, init_packet_config): New functions.
- Generic support for optional packets.
- (remote_protocol_P): Replace stub_supports_P.
- (set_remote_protocol_P_packet_cmd, show_remote_protocol_P_packet_cmd):
- New functions.
- (_initialize_remote): Add ``set remote-protocol-P-packet'' command.
- (remote_open_1, remote_async_open_1, remote_cisco_open):
- Initialize ``remote_protocol_P''.
- (remote_store_registers): Re-write ``P'' probe logic.
- (store_register_using_P): New function.
-
- From Ian Lance Taylor <ian@airs.com>:
- (remote_prepare_to_store): Only read registers when ``P'' packet
- is in state unsupported or support-unknown.
-
-1999-07-24 Fred Fish <fnf@cygnus.com>
-
- * symfile.c (default_symfile_offsets): Clear section_offsets
- before filling it in.
-
-1999-07-16 Keith Seitz <keiths@cygnus.com>
-
- * remote.c (_initialize_remote): "remotebreak" should be a var_boolean.
-
-1999-07-15 Jim Blandy <jimb@cygnus.com>
-
- Make the output from "info registers" fit withinin 80 columns.
- * hppa-tdep.c (pa_print_registers): Make it easy to change row and
- column counts. Switch to three columns, instead of four, and
- adjust spacing.
-
- First cut at supporting HPPA2.0 in "wide" (64-bit) mode.
- * configure.tgt: Add hppa2.0w target.
- * config/pa/hppa64.mt, config/pa/tm-hppa64.h: New files.
- * hppa-tdep.c (hppa_fix_call_dummy): Dyke out code to tweak the
- call dummy, if target is PA2.0w. This is temporary, until I get
- function calls working.
- * hppah-nat.c (fetch_register): Rewritten to handle both narrow
- and wide register requests.
- (HPPAH_OFFSETOF): New macro.
-
- * gdbtypes.c (is_integral_type): New function.
- * gdbtypes.h: Prototype for above.
-
-1999-07-15 J.T. Conklin <jtc@redback.com>
-
- * configure.tgt (i[3456]86-*-vxworks*): New target.
- * config/i386/vxworks.mt: New file, x86 VxWorks target
- * config/i386/tm-vxworks.h: New file.
-
- * configure.tgt (powerpc-*-vxworks*): New target.
- * config/powerpc/vxworks.mt: New file, PowerPC VxWorks target
- * config/powerpc/tm-vxworks.h: New file.
-
- * NEWS: Mention the new configs.
-
-1999-07-15 Fernando Nasser <fnasser@cygnus.com>
-
- * target.c (target_preopen): Prevent query when not from_tty.
- * infcmd.c (run_command): Prevent query when not from_tty.
-
-1999-07-15 Fernando Nasser <fnasser@cygnus.com>
-
- * event-loop.c: Fix typo in comment.
-
-Wed Jul 14 17:29:31 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * ser-pipe.c (struct pipe_state): Define.
- (pipe_close): Retain the PID of the sub-process using ``struct
- pipe_state''. Delete #ifdef code that used popen().
- (pipe_close): Kill of the sub-process as part of the cleanup.
-
- * serial.h (struct _serial_t): Add field ``state''.
-
-1999-07-13 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * event-top.c (display_gdb_prompt): Don't display the prompt if we
- are in the middle of an execution command. Also trick readline so
- it doesn't try to display the prompt.
- (command_line_handler): Get rid of change_prompt, unused variable.
- Use {push, pop}_prompt mechanism in case of multiline commands.
-
- * infrun.c (complete_execution): Set target_executing to 0 as
- first thing, so that display_gdb_prompt does the right thing.
-
-Tue Jul 13 20:29:46 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * parse.c (build_parse): Fix conditional increment of num_std_regs
- for SP_REGNUM. Was conditional on FP_REGNUM.
-
-Tue Jul 13 16:44:58 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * gdbarch.h, gdbarch.c: Revert 1999-07-07 Stan Shebs
- <shebs@andros.cygnus.com> indentation change. Don't let indent
- mess with these files.
-
-Mon Jul 12 11:15:09 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * config/mips/tm-mips.h (REGISTER_CONVERT_TO_RAW,
- REGISTER_CONVERT_TO_VIRTUAL, REGISTER_CONVERTIBLE): Define.
- (REGISTER_RAW_SIZE): Re-define as mips_register_convert_to_raw.
- * mips-tdep.c (mips_register_convert_to_raw,
- mips_register_convert_to_virtual, ): New functions.
- (mips_register_raw_size, mips_register_convertible): New
- functions. Handle bug introduced by ``Wed Apr 1 23:13:23 1998
- Andrew Cagney <cagney@b1.cygnus.com>'' where remote mips64 target
- transfers SR as 64 bits yet GDB expected only 32 bits.
- (mips64_transfers_32bit_regs): New static variable.
- (_initialize_mips_tdep): Add obscure command ``set
- remote-mips64-transfers-32bit-regs'' that provides backward
- compatibility.
- (do_gp_register_row): Extract register values from raw buffer.
-
- * NEWS: Document protocol change.
-
-1999-07-12 Keith Seitz <keiths@cygnus.com>
-
- * rdi-share/unixcomm.c (Unix_ResetSerial): Remove CYGWIN32
- conditional. It's no longer needed.
- (SERPORT1, SERPORT2): Linux serial ports are "/dev/ttyX", not
- "/dev/cuaX" (X=0,1,2,3,...).
-
-Mon Jul 12 02:02:00 1999 Andrew Cagney <cagney@amy.cygnus.com>
-
- * defs.h, utils.c (fputstrn_filtered, fputstrn_unfiltered,
- fputstrnn_unfiltered): New functions.
- (gdb_printchar): Delete.
-
- * remote.c (print_packet): Replace gdb_printchar with
- fputstrn_filtered.
- (getpkt): Use fputstrn_unfiltered to dump packet received.
- (putpkt_binary): Use fputstrnn_unfiltered to dump packet sent.
-
-1999-07-09 Keith Seitz <keiths@cygnus.com>
-
- * blockframe.c (blockvector_for_pc_sect): When looking for a block,
- we want the one whose end is greater than our PC, not greater or equal.
-
-1999-07-08 Stan Shebs <shebs@andros.cygnus.com>
-
- * sparcl-tdep.c (init_sparclite_ops): Fix doc strings, remove
- useless inits.
- (sparclite_ops): Remove redundant decl.
-
-Thu Jul 8 16:48:40 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * ser-pipe.c (pipe_open): Bi-directional popen found on both
- NetBSD and OpenBSD.
- * ser-pipe.c: New file. Implement popen() style serial interface.
- * NEWS: Mention.
- * Makefile.in (ALLDEPFILES): Add ser-pipe.c.
- (ser-pipe.o): Add new target. Specify dependencies.
- (SER_HARDWIRE): Add ser-pipe.o.
- * serial.c (serial_open): Recognize a serial pipe ``|''.
-
-1999-07-07 Stan Shebs <shebs@andros.cygnus.com>
-
- * All C files except *-stub.c and *-share/*: Indent to GNU
- standard, using indent 1.9.1.
- * defs.h: Make indent ignore this file, macros confuse it.
-
- * gnu-regex.c, gnu-regex.h: Don't let indent mess with these.
-
-Wed Jul 7 13:06:24 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote-mips.c (fputs_readable): Rename puts_readable, add struct
- gdb_file argument.
- (fputc_readable): Rename putc_readable, add struct gdb_file
- argument.
-
- * remote-mips.c (mips_expect_timeout, mips_receive_header,
- mips_send_packet, mips_receive_packet), remote-rdp.c (put_byte,
- get_byte, put_word, rdp_init, rdp_init), remote-sds.c
- (sds_interrupt, sds_wait, readchar, putmessage, read_frame,
- getmessage), remote-udi.c (udi_store_registers, fetch_register):
- (store_register), xmodem.c (readchar), utils.c (puts_debug),
- gnu-nat.h (debug), parse.c (parse_exp_1): Cleanup - send debug/log
- messages to gdb_stdlog.
-
-1999-07-06 Stan Shebs <shebs@andros.cygnus.com>
-
- * exec.c: Remove long-#ifed-out section of code that confuses
- indent.
- * gdbtypes.c (add_mangled_type): Add some braces to indicate
- grouping better.
- * gnu-nat.c: Remove literal newlines embedded in strings,
- causes indent to weird out.
- * language.c (binop_result_type): Remove extra paren.
- * lynx-nat.c: Add a missing paren to fetch_core_registers decl.
- * nec4102rom.c (vr4102_insert_step): Fix typos.
- (_initialize_vr4102_rom): Remove literal newline in string.
- * config/a29k/tm-a29k.h: Suppress formatting of pictures.
- * config/m68k/xm-3b1.h: Remove excess #endif.
-
- Declare Pyramid configuration obsolete.
- * configure.host, configure.tgt: Comment out Pyramid configs.
- * Makefile.in: Comment out Pyramid-related actions.
- * pyr-xdep.c, pyr-tdep.c, config/pyr/*: Comment out.
- * NEWS: Mention obsolete status.
-
-1999-07-06 Jason Molenda (jsm@bugshack.cygnus.com)
-
- * remote.c: Include <sys/time.h> to pick up FD_SET et al defns on
- some old Linux distributions.
- * remote-os9k.c, remote-st.c, ser-tcp.c, ser-unix.c,
- sparcl-tdep.c, remote.c: Back out inclusion of <sys/select.h>.
- It isn't necessary after all.
-
-1999-07-06 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * infcmd.c (strip_bg_char): Remove assignment from 'if' condition.
-
-1999-07-05 Jason Molenda (jsm@bugshack.cygnus.com)
-
- * remote.c: Include <sys/select.h> if it exists in order to pick up
- FD_SET et al defns.
- * remote-os9k.c: Same.
- * remote-st.c: Same.
- * ser-tcp.c: Same.
- * ser-unix.c: Same.
- * sparcl-tdep.c: Same.
-
-Fri Jul 2 19:38:43 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * top.c (target_output_hook): Delete definition.
- * defs.h (target_output_hook): Delete declaration.
-
- * remote.c (remote_console_output): Delete call to
- target_output_hook(). Send target output to gdb_stdtarg using an
- unfiltered write. Make more robust.
-
- * remote-sim.c (gdb_os_write_stdout, gdb_os_write_stderr):
- Ditto. For moment, do not try to separate target stdout and stderr
- streams.
-
- * defs.h (gdb_stdtarg): New global. Output from target and
- simulators.
-
-1999-07-02 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * top.c (return_to_top_level): Do all the exec_cleanups too.
-
- * event-top.c (command_handler): Set up for a continuation, if we
- are in the middle of running an execution command which will
- finish later on. Do cleanups, an display of time/space only if not
- running with an async target or not running an execution command.
- (command_line_handler_continuation): New function. Continuation
- for command_line_handler.
-
- * utils.c (exec_cleanup_chain): New cleanup chain to be used in
- async mode for the execution commands.
- (make_exec_cleanup): New function. Add a cleanup to the
- exec_cleanup_chain.
- (do_exec_cleanups): New Function. Do cleanups on the
- exec_cleanup_chain.
- (add_continuation): New function. Add a new continuation to the
- cmd_continuation list.
- (do_all_continuations): New function. Do all the continuations on
- the cmd_continuation list.
-
- * top.h (ALL_CLEANUPS): Move from here to defs.h.
-
- * defs.h (struct continuation_arg): New structure. Arg to pass to
- the call to a command continuation.
- (struct continuation): New structure. Continuation for an
- execution command.
- (ALL_CLEANUPS): Move here from top.h.
-
- * remote.c (remote_async_open_1): Set things up for telling the
- target we are running the extended protocol, only after the target
- has stopped.
- (set_extended_protocol): New function. Tell the target we are
- using the extended protocol.
- (remote_async_resume): Set things up for sync execution only if
- this is the first time we are called.
-
- * breakpoint.c (until_break_command_continuation): New function.
- Stuff to be done after the target stops during the 'until'
- command.
- (until_break_command): Set things up for completing the 'until'
- command later on. Do the final cleanups only if not running
- asynchronously or async execution is not supported by the target.
-
- * infcmd.c (until_command): Recognize '&' at end of command and
- handle it properly.
- (finish_command_continuation): New function. Do whatever is needed
- after the target has stopped.
- (finish_command): Recognize '&' at end of command and handle it
- properly. Don't do stuff needed after target has stopped if
- running asynchronously and target has async. Use exec_cleanup_chain
- if running asynchronously and target is asynchronous.
-
- * infrun.c (cmd_continuation): New gloabl variable. Used to
- coplete execution commands in async mode, after the target has
- stoped.
- (fetch_inferior_event): Use exec_cleanup_chain, instead of
- cleanup_chain. Do all the exec cleanups at the end. Do all the
- continuations at the end. Call complete_execution from here,
- instead of normal_stop.
- (complete_execution): Cleanup the signals handlers for SIGINT
- before displaying the prompt.
- (start_remote): Set target_executing to 1.
- (normal_stop): Don't call complete_execution from here.
-
-Thu Jul 1 19:14:30 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * blockframe.c (struct dummy_frame): Add member ``top''.
- (generic_push_dummy_frame): Initialize top to sp.
- (generic_save_dummy_frame_tos): New function. Initialize top.
- (generic_find_dummy_frame): Check for the top of the frame.
-
- * blockframe.c (generic_push_dummy_frame): Free the dummy_frame
- registers.
-
- * config/mn10300/tm-mn10300.h (SAVE_DUMMY_FRAME_TOS): Define.
- (TARGET_READ_FP): Return the SP as a best guess.
-
-Wed Jun 30 15:45:48 1999 Jeffrey A Law (law@cygnus.com)
-
- * configure.host (hppa*-*-hpux11*): Accept any version of hpux11
- instead of hpux11.0*.
-
-1999-06-30 Fernando Nasser <fnasser@totem.to.cygnus.com>
-
- * source.c (directory_command): Add missing test for from_tty.
-
-1999-06-29 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * remote.c: Include event-loop.h.
- (remote_async_ops, extended_async_remote_ops): Define new target
- vector structures for asynchronous debugging.
- (remote_async_open): New function. Asynchronous version of
- remote_open.
- (extended_remote_async_open): New function. Asynchronous version
- of extended_remote_open.
- (remote_async_open_1): New function. Async version of
- remote_open_1.
- (remote_async_detach): New function. Async version of
- remote_detach.
- (remote_async_resume): New function. Async version of
- remote_resume.
- (initialize_sigint_signal_handler, handle_remote_sigint,
- handle_remote_sigint_twice, async_remote_interrupt,
- async_remote_interrupt_twice, cleanup_sigint_signal_handler): New
- functions. Used for handling ^C while target is running.
- (remote_async_wait): New function. Async version of remote_wait.
- (remote_async_kill): New function. Async version of remote_kill.
- (extended_remote_async_create_inferior): New function. Async
- version of extended_remote_create_inferior.
- (init_remote_async_ops): New function. Initialize target vector
- for target async.
- (init_extended_async_remote_ops): New function. Initialize target
- vector for target extended-async.
- (_initialize_remote): Initialize remote_async_ops and
- extended_async_remote_ops.
-
- * infrun.c: Include "event-loop.h".
- (sync_execution): new global variable.
- (proceed): Invoke wait_for_inferior and normal_stop only if not
- running in async mode or if target doesn't support async
- execution.
- (start_remote): Don't call wait_for_inferior and normal_stop if
- not running in async mode or if target not async. If running async
- and target is async, start the target in simulated synchronous
- mode.
- (async_ecss, async_ecs): New global vars, for inferior state.
- (fetch_inferior_event): New function. Async version of
- wait_for_inferior.
- (complete_execution): New function. Reset of gdb prompt and stdin,
- after inferior execution has completed.
- (normal_stop): Call complete_execution at end of asynchronous
- execution.
-
- * infcmd.c (strip_bg_char): New function to detect the background
- execution char '&'.
- (run_command): Modify to support background and foreground
- execution in async mode.
- (continue_command): Ditto.
- (step_1): Ditto.
- (jump_command): Ditto.
- (interrupt_target_command): New function. Interrupt the
- target execution.
- (_initialize_infcmd): Add new command 'interrupt'.
-
- * top.c (target_executing): New global variable.
- (execute_command): Reject commands that cannot be executed while
- the target is running asynchronously.
-
- * event-top.c (push_prompt): Make non static.
- (pop_prompt): Make non static. If the current prompt is empty,
- don't try to copy it over the previous one.
- (handle_sigint): Make non static.
- (command_handler): Do the cleanups only when not executing with an
- asynchronous target.
-
- * event-loop.c (delete_async_signal_handler): Pass a pointer to a
- pointer to a signal handler, so that is can be freed at the end.
-
- * target.c (update_current_target): Inherit to_has_async_exec.
-
- * inferior.h: Add global variables target_executing, and
- sync_execution. Export function fetch_inferior_event.
-
- * event-loop.h: Add push_prompt, pop_prompt, handle_sigint to the
- exported functions. Update prototype for delete_signal_handler.
-
- * target.h (struct target_ops): New target op: to_has_async_exec.
- (target_has_async): New macro.
-
- * Makefile.in (infrun.o): Add dependency on event-loop.h.
- (remote.o): Ditto.
-
-1999-06-28 Jim Blandy <jimb@zwingli.cygnus.com>
-
- * solib.c (clear_solib): Don't disable breakpoints if we're
- running an a.out executable (Solaris's SunOS emulation).
-
-1999-06-25 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * main.c (main): Remove intialization of command_loop_hook, it
- is now done in _initialize_event_loop().
- * event-loop.c (gdb_do_one_event): Make static.
- (start_event_loop): New function. Just start the event loop.
- * event-top.c (cli_command_loop): New name for start_event_loop().
- (gdb_readline2): Make non static.
- (_initialize_event_loop): Set command_loop_hook to cli_command_loop.
- * event-loop.h: Adjust exported functions accordingly.
-
- * top.c (init_main): Move setting of async_command_editing_p from
- here.
- * event-top.c (_initialize_event_loop): To here.
- (change_line_handler): Revert previous change. Add comment.
- (_initialize_event_loop): Revert previous change.
- (cli_command_loop): New name for start_event_loop().
- (start_event_loop): New function. This just starts up the event loop.
- (gdb_readline2): Make non static.
- (_initialize_event_loop): Set command_loop_hook to cli_command_loop.
-
-1999-06-25 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * event-top.c (change_line_handler): Get rid of the global
- variable input_fd, use `fileno (instream)' instead.
- (_initialize_event_loop): Ditto
-
- * event-loop.c (add_file_handler): New function. Wrapper for
- create_file_handler.
- (create_file_handler): Make static.
- * event-top.c (_initialize_event_loop): Call add_file_handler,
- instead of create_file_handler.
- (change_line_handler): Ditto.
- Remove poll.h include.
- * event-loop.h: Export add_file_handler instead of
- create_file_handler.
-
-1999-06-24 Stan Shebs <shebs@andros.cygnus.com>
-
- Declare Altos configuration obsolete.
- * configure.host, configure.tgt: Comment out Altos config.
- * Makefile.in: Comment out Altos-related actions.
- * altos-xdep.c, config/m68k/altos.mh, altos.mt, tm-altos.h,
- xm-altos.h: Comment out.
- * NEWS: Mention obsolete status.
-
-1999-06-24 Jason Molenda (jsm@bugshack.cygnus.com)
-
- * Makefile.in: Add MAKEHTML and MAKEHTMLFLAGS; pass them down;
- recognize html and install-html targets.
- * gdbserver/Makefile.in: Add empty html and install-html targets.
- * nlm/Makefile.in: Ditto.
- * rdi-share/Makefile.in: Ditto.
-
-1999-06-24 Jim Blandy <jimb@zwingli.cygnus.com>
-
- * ax-gdb.c (agent_command): Remove vestigial call to ax_reqs.
-
-1999-06-24 James Ingham <jingham@leda.cygnus.com>
-
- * arm-tdep.c (arm_othernames): Change both gdb's register display
- AND the opcode disassembly register naming if the othernames
- command. Fixes the gdb part of CR 101177.
-
-1999-06-23 Stan Shebs <shebs@andros.cygnus.com>
-
- Declare Convex configuration obsolete.
- * configure.host, configure.tgt: Comment out Convex configs.
- * Makefile.in: Comment out Convex-related actions.
- * convex-xdep.c, convex-tdep.c, config/convex/*: Comment out.
- * NEWS: Mention obsolete status.
-
-1999-06-23 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * main.c: Turn on async by default by setting async_p to 1.
-
-Wed Jun 23 15:44:39 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- From Jimmy Guo <guo@cup.hp.com>:
- * frame.h (enum lval_type): Delcare when an __STDC__ compiler.
- Reverts Mon Aug 11 16:08:52 1997 Fred Fish <fnf@cygnus.com>
- change.
- * utils.c (gdb_file_rewind, gdb_file_put): Fix. A void function
- does not return a result.
-
-Wed Jun 23 15:30:46 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote.c (set_thread, remote_get_threadinfo,
- remote_threads_info, remote_current_thread, remote_get_threadlist,
- extended_remote_restart, get_offsets, remote_open_1,
- remote_detach, remote_resume, remote_wait, remote_fetch_registers,
- remote_store_registers, check_binary_download, remote_write_bytes,
- remote_read_bytes, remote_search, putpkt_binary, putpkt_binary,
- read_frame, compare_sections_command, remote_query,
- packet_command, remote_info_process): Use alloca to create space
- for arrays of size PBUFSIZ.
-
-1999-06-22 Jason Molenda (jsm@bugshack.cygnus.com)
-
- * top.c: Update copyright years to include 1999.
-
-1999-06-18 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * top.c: Move include of event-loop.h, to avoid redefinition of
- NFDBITS.
-
- * event-loop.c (create_file_handler): Do not do a realloc of the
- pollfd structure of the notifier, unless there is already one.
- Include <sys/types.h> for platforms that have no poll.
-
- * event-top.c: Fix prototype for _initialize_event_loop.
- (_initialize_event_loop): Do something only if running in async
- mode.
-
-1999-06-17 Jim Blandy <jimb@zwingli.cygnus.com>
-
- Make the '/c' print format use a true character type. This is
- more appropriate than builtin_type_char for languages other than
- C, and C tolerates it.
- * gdbtypes.c (builtin_type_true_char): New variable.
- (build_gdbtypes): Initialize it.
- * gdbtypes.h (builtin_type_true_char): New declaration.
- * printcmd.c (print_scalar_formatted): When the format is 'c',
- extract the value as a builtin_type_true_char.
-
- * jv-exp.y (yylex): Say character literals are java_char_type, not
- builtin_type_char. Java treats the latter like `byte'.
-
-1999-06-17 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * Makefile.in (top_h): Define.
- (event-loop.o): Add dependencies on top.h and defs.h.
- (event-top.o): Add dependency on terminal.h.
-
- * event-loop.c: Get rid of #include <readline.h>.
-
- * event-loop.h: Get rid of nested #include's.
- * event-loop.c: Rearrange includes to accomodate change in
- event-loop.h. Include poll.h, not sys/poll.h.
- * event-top.c: Ditto.
- * main.c: Ditto.
-
-1999-06-16 David Taylor <taylor@louisiana.cygnus.com>
-
- * alpha-tdep.c (alpha_pop_frame): if frame->proc_desc
- is NULL, call find_proc_desc so we know how to restore
- the registers.
-
-1999-06-15 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * event-top.c (start_event_loop): call get_prompt.
- (display_gdb_prompt): call get_prompt.
- (async_stop_sig): call get_prompt.
-
-1999-06-15 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * event-loop.c (delete_file_handler): When positioning prev_ptr,
- keep looping while the one after is not equal to file_ptr, instead
- of equal.
-
-1999-06-14 Stan Shebs <shebs@andros.cygnus.com>
-
- * MAINTAINERS: Add Jimmy Guo and Jim Blandy as HP testsuite and
- SVR4 solib maintainers, respectively.
-
-1999-06-14 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- Add parameters to the gdb prompt.
- * top.c (prompt): Rename to gdb_prompt_string for clarity.
- (command_line_input): rename "prrompt" to prompt_arg for clarity.
- (gdb_readline): rename "prrompt" to prompt_arg for clarity.
- (read_command_lines): rename "prompt" to prompt_arg for clarity.
- (stop_sig): call get_prompt instead of reading prompt string directly.
- (command_loop): ditto.
- (gdb_prompt_escape): New variable. Esc char for prompt parameters.
- (get_prompt_1): New function, workhorse for get_prompt.
- (get_prompt): Completely rewrite. Add functionality for a
- parameterized prompt, ie. the displayed prompt can change according
- to the value of one or more expressions given as parameters in the
- prompt string.
- (init_main): use renamed variable gdb_prompt_string. Add new
- command "set prompt-escape-char" to set gdb_prompt_escape.
-
-Sun Jun 13 10:44:13 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * defs.h (gdb_stdlog), main.c: Declare.
- * main.c (main): Initialize.
- * gdbarch.c: Write trace messages to the log file.
- * remote.c: Update any debug/log prints.
-
-1999-06-11 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * remote.c (remote_wait): Clean up new thread handling.
- (record_currthread): Announce new threads.
-
-1999-06-11 Jim Blandy <jimb@zwingli.cygnus.com>
-
- * partial-stab.h (case N_LSYM, 'T' descriptor): Don't create
- partial symbol table entries for nameless enums, even if the type
- name is " ". (We still pick up the enum elements, though.)
-
- * partial-stab.h: Remove #if 0'd sections, dating back to 1992,
- which set a variable which exists nowhere else in the source.
- Please examine your test suite output carefully, and report any
- problems to me.
-
-1999-06-11 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * event-top.c (setup_event_loop): Change name to start_event_loop.
- Move the intialization of event-loop variables to
- _initialize_event_loop.
- (_initialize_event_loop): New function. Called at init time, to
- set up important event-loop variables.
-
- * event-loop.h: setup_event_loop is now start_event_loop.
- * main.c (main): Ditto.
-
-Fri Jun 11 18:34:33 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * defs.h (gdb_file_rewind_ftype, gdb_file_rewind,
- set_gdb_file_rewind, gdb_file_put_ftype, gdb_file_put,
- set_gdb_file_put): Declare.
-
- * utils.c (gdb_file_new): Initialize ``rewind'' and ``put''.
- (struct gdb_file): Add to_rewind and to_put.
- (null_file_put, null_file_rewind, gdb_file_put, gdb_file_rewind,
- set_gdb_file_put, set_gdb_file_rewind): New functions.
- (tui_file_rewind, tui_file_put): New functions.
- (tui_file_new): Add rewind and put.
-
-Fri Jun 11 15:10:32 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * d10v-tdep.c (d10v_push_arguments): Fix order of arguments passed
- to store_address.
-
-Fri Jun 11 10:31:29 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote.c (tty_input): Change array to pointer.
- (_initialize_remote): Call build_remote_gdbarch_data.
- (build_remote_gdbarch_data): New function. Allocate space for
- tty_input.
- (readsocket, readtty): Delete extern declaration of tty_input.
-
-1999-06-10 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * event-top.c (gdb_readline2): Call the command handling function
- via the input_handler pointer.
- (change_line_handler): When turning off editing, set input_handler
- as well.
-
- * utils.c (prompt_for_continue): If running asynchronously, call
- async_request_quit, instead of request_quit.
-
- * tracepoint.c (read_actions): If running asynchronously, set the
- signal handler for STOP_SIGNAL to handle_stop_sig.
-
- * top.h: (source_line_number, source_file_name, source_error,
- source_pre_error, history_expansion_p, server_command): export for
- use of event-top.c.
-
- * event-top.c: Include top.h and terminal.h.
- (instream): Remove extern declaration.
- (handle_sigint, handle_sigquit, handle_sighup, handle_sigfpe,
- handle_sigwinch, async_do_nothing, async_disconnect,
- async_float_handler, async_stop_sig): Make static.
- (async_request_quit, async_do_nothing, async_disconnect,
- async_float_handler, async_stop_sig): Add gdb_glient_data
- argument.
- (handle_stop_sig): New function.
- (sigtstp_token): New variable.
- (sigint_token, sigquit_token, sigfpe_token, sigwinch_token):
- Change their type tp PTR.
- (mark_async_signal_handler_wrapper): New function.
- (setup_event_loop): Initialize all the variables used by readline
- only if not already done while reading the .gdbinit file. Display
- the initial gdb prompt, if .gdbinit took care of setting things up
- for readline.
- (change_line_handler): When turning on the use of readline,
- initialize input_handler as well.
- (command_line_handler): Set up the signal handler for STOP_SIGNAL
- to be handle_stop_sig.
- (async_init_signals): Remove coercion of signal handlers in calls
- to create_async_signal_handler. Initialize token for stop signal.
- (handle_sigint): Call async_request_quit using one argument.
- (handle_sigint, handle_sigquit, handle_sighup, handle_sigfpe,
- handle_sigwinch): Call mark_async_signal_handler_wrapper instead
- of mark_async_signal_handler.
-
- * event-loop.h: Add extern declarations for handle_stop_sig,
- async_command_editing_p, async_annotation_suffix,
- new_async_prompt, the_prompts.
-
- * top.c (command_line_input): Set the signal handler to be
- handle_stop_sig, in case gdb is running asynchronously.
- (get_prompt): Return the top of the prompt stack if running
- asynchronously.
- (set_prompt): Set the top of the prompt stack if running
- asynchronously.
- (init_main): Move ``extern'' vars from here to event-loop.h.
-
-1999-06-10 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * values.c (value_from_string): new function. Make a value_ptr
- from a string, with storage in local GDB memory (not in inferior).
- * value.h (value_from_string): add prototype.
- * remote.c (remote_cisco_ops): New remote target, "target cisco".
- (init_remote_cisco_ops): New function, initialize new target.
- (remote_cisco_mourn, remote_cisco_wait, remote_cisco_open,
- remote_cisco_close): New functions, implement new target cisco.
- (minitelnet, readtty, readsocket) New functions, implement the
- I/O pass-through mode for target cisco.
- (remote_wait): Detect special enhanced version of the 'S' packet
- for target cisco.
- (remote_cisco_expand): Perform Cisco variant of RLL decoding.
-
-1999-06-10 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * event-loop.c (gdb_wait_for_event): Initialize num_found to 0.
-
- * top.c (print_prompt): Delete this function.
-
- From: Andrew Cagney <cagney@b1.cygnus.com>
-
- * event-top.c (async_hook): Delete extern declaration.
-
- * defs.h: Replace ``async_hook'' with ``async_p''.
- * top.c (gdb_init, init_main, init_main, init_main, init_main):
- Replace ``async_hook'' with ``async_p''.
-
- * main.c: Rename ``async'' to ``async_p''.
- (main): Add --noasync option.
- (main): Hook in the asynchronous event-loop based CLI using
- command_loop_hook instead of async_hook. Delete call to
- async_hook().
-
-Thu Jun 10 21:14:16 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * mn10300-tdep.c (mn10300_store_return_value,
- mn10300_extract_struct_value_address,
- mn10300_extract_return_value), config/mn10300/tm-mn10300.h: New
- functions.
- * config/mn10300/tm-mn10300.h (EXTRACT_STRUCT_VALUE_ADDRESS,
- STORE_RETURN_VALUE, EXTRACT_RETURN_VALUE): Update.
- (TARGET_MN10300): Delete macro. Not used.
-
-Thu Jun 10 20:04:02 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * mn10300-tdep.c (mn10300_register_names): Make static.
- (STORE_STRUCT_RETURN): Do not modify SP.
-
- * config/mn10300/tm-mn10300.h(mn10300_register_name),
- mn10300-tdep.c : New function.
- * config/mn10300/tm-mn10300.h (REGISTER_NAME): Update.
- * config/mn10300/tm-mn10300.h (mn10300_saved_pc_after_call),
- mn10300-tdep.c: New function.
- * config/mn10300/tm-mn10300.h (SAVED_PC_AFTER_CALL): Update.
-
-1999-06-10 Keith Seitz <keiths@cygnus.com>
-
- * mcore-rom.c (picobug_dumpregs): Return a value. Any value, it
- doesn't matter.
- * mcore-tdep.c (mcore_analyze_prologue): Set NO_MORE_FRAMES
- if the start of the function is the entry point.
- (mcore_analyze_prologue): rotli takes an immediate, not an
- offset immediate.
- (mcore_push_arguments): Fix compiler warning.
-
-1999-06-09 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * rs6000-tdep.c (skip_prologue): Don't mistake a branch for a
- subroutine call.
-
-1999-06-08 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * remote.c (remote_wait): Add 'N' response packet, which is a
- stop with signal number plus section offsets for .text, .data and
- .bss. This is used by Cisco to indicate relocation offsets.
- (remote_cisco_section_offsets, remote_cisco_objfile_relocate):
- new files to support 'N' packet.
- (remote_info_process): New function. Implements the
- "info remote-process" command, by means of which the remote target
- can report anything it wants to about the remote process/app being
- debugged.
- (_initialize_remote): add info remote-proc command.
- (remote_threads_info): New function for "info threads" command.
- Attempts to use new query "qfThreadInfo" instead of the old
- undocumented query.
- * exec.c (exec_set_section_offsets) new files to support 'N' packet.
-
-Tue Jun 8 13:33:42 1999 Andrew Cagney <cagney@amy.cygnus.com>
-
- * inferior.h (generic_target_read_pc, generic_target_write_pc,
- generic_target_read_fp, generic_target_write_fp,
- generic_target_read_sp, generic_target_write_sp): Declare new
- functions.
- * findvar.c (generic_target_read_pc, generic_target_write_pc,
- generic_target_read_fp, generic_target_write_fp,
- generic_target_read_sp, generic_target_write_sp): New functions.
- (TARGET_READ_PC, TARGET_WRITE_PC, TARGET_READ_FP, TARGET_WRITE_FP,
- TARGET_READ_SP, TARGET_WRITE_SP): Default to corresponding generic
- function.
- (write_pc_pid, write_pc_pid, read_sp, write_sp, read_fp,
- write_fp): Simplify.
-
- * gdbarch.c (verify_gdbarch): Always verify TARGET_PTR_BIT,
- TARGET_SHORT_BIT, TARGET_INT_BIT, TARGET_LONG_BIT,
- TARGET_LONG_LONG_BIT, TARGET_FLOAT_BIT, TARGET_DOUBLE_BIT,
- TARGET_LONG_DOUBLE_BIT, TARGET_READ_PC, TARGET_WRITE_PC,
- TARGET_READ_FP, TARGET_WRITE_FP, TARGET_READ_SP, TARGET_WRITE_SP,
- USE_GENERIC_DUMMY_FRAMES, CALL_DUMMY_BREAKPOINT_OFFSET_P,
- CALL_DUMMY_P, CALL_DUMMY_STACK_ADJUST_P, GET_SAVED_REGISTER,
- REGISTER_CONVERTIBLE, PUSH_ARGUMENTS, PUSH_RETURN_ADDRESS,
- FRAME_CHAIN_VALID.
- (GET_GDBARCH, SET_GDBARCH): Delete macros. Implement functions
- directly.
- * gdbarch.h, gdbarch.c: Call fatal() instead of abort(). Identify
- the function / macro with a problem. Always verify a architecture
- attribute before returning it.
- * gdbarch.h, gdbarch.c (generic_register_convertible_not): New
- function.
-
- * mips-tdep.c (mips_push_return_address): New function.
- * config/mips/tm-mips.h (PUSH_RETURN_ADDRESS): Define.
-
- * mips-tdep.c (mips_gdbarch_init): Initialize short_bit,
- double_bit, long_double_bit, read_pc, write_pc, read_fp, write_fp,
- read_sp, write_sp, frame_chain_valid, get_saved_register,
- push_arguments, push_return_address, register_convertible,
- call_dummy_p, use_generic_dummy_frames,
- call_dummy_breakpoint_offset_p, call_dummy_stack_adjust_p,
- call_dummy_words and sizeof_call_dummy_words.
- * config/mips/tm-mips.h: Don't define CALL_DUMMY when multi-arch.
-
-1999-06-07 Keith Seitz <keiths@cygnus.com>
-
- * v850ice.c (init_hidden_window): Do not rely on the existence of
- a gui for window creation. Return boolean status.
- (v850ice_open): Use boolean status of init_hidden_window.
- Allow any ICE execution command to run under CLI. Maybe one
- day gdb will use a real event loop and allow this code to run.
- * configure.tgt: Configure the v850 ice for all cygwin-hosted
- toolchains.
-
-Mon Jun 7 23:37:26 1999 Andrew Cagney <cagney@amy.cygnus.com>
-
- * config/mips/tm-mips.h (EXTRA_FRAME_INFO): Delete.
- * mips-tdep.c (mips_init_extra_frame_info): Allocate saved_regs.
- (temp_saved_regs): Replace struct with a simple pointer.
- (set_reg_offset, mips32_heuristic_proc_desc, heuristic_proc_desc,
- mips_init_extra_frame_info): Update.
-
-Mon Jun 7 21:40:12 1999 Andrew Cagney <cagney@amy.cygnus.com>
-
- * config/mips/tm-mips.h (EXTRA_FRAME_INFO): Move elements from here.
- * mips-tdep.c (struct frame_extra_info): To here.
-
- * mips-tdep.c (mips_print_extra_frame_info, mips_find_saved_regs,
- mips_init_extra_frame_info, mips_pop_frame): Update
- (mips_init_extra_frame_info): Allocate space for the extra info.
-
-Mon Jun 7 21:08:50 1999 Andrew Cagney <cagney@amy.cygnus.com>
-
- * config/mips/tm-mips.h (mips_init_extra_frame_info), mips-tdep.c:
- Rename init_extra_frame_info. Add argument ``fromleaf''.
- mips-tdep.c (mips_gdbarch_init): Add mips_init_extra_frame_info.
-
- * config/mips/tm-mips.h (mips_print_extra_frame_info),
- mips-tdep.c: New function.
- (PRINT_EXTRA_FRAME_INFO): Update definition.
-
-Mon Jun 7 20:11:07 1999 Andrew Cagney <cagney@amy.cygnus.com>
-
- * config/mips/tm-mips.h, config/mips/tm-irix3.h,
- config/mips/tm-tx19.h, config/mips/tm-tx19l.h,
- config/mips/tm-tx39.h, config/mips/tm-tx39l.h: Rename macro
- REGISTER_NAMES to MIPS_REGISTER_NAMES.
-
- * config/mips/tm-mips.h (REGISTER_NAME): Define.
- * mips-tdep.c (mips_processor_reg_names): New static variable.
- (mips_register_name): New function.
- (mips_set_processor_type): Update mips_processor_reg_names.
- (mips_generic_reg_names): Initialize using MIPS_REGISTER_NAMES.
- (mips_gdbarch_init): Add mips_register_name.
-
-Sun Jun 6 11:09:19 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote.c (PBUFSIZ): Re-define so that value is computed at
- run-time.
- (MAXBUFBYTES): Re-define as a macro function.
- * gdbarch.h, gdbarch.c: Add multi-arch support for REGISTER_BYTES.
- * d10v-tdep.c, config/d10v/tm-d10v.h: Update.
-
-1999-06-05 Fernando Nasser <fnasser@totem.to.cygnus.com>
-
- * symtab.c (decode_line_1): Accept filenames with spaces in
- 'linespecs' when enclosed in double quotation marks and handle
- drive specification is DOS format (D:).
-
-1999-06-04 Jim Blandy <jimb@zwingli.cygnus.com>
-
- * parse.c: Don't include <ctype.h> twice.
-
-1999-06-04 David Taylor <taylor@louisiana.cygnus.com>
-
- Sat May 15 12:16:09 1999 Per Bothner <bothner@deneb.cygnus.com>
-
- * eval.c (evaluate_subexp_standard): Remove Gilmore rant.
- (Of course C has "expected types", at least if you allow
- brace-initializer expressions - as in Gcc.)
- Remove NULLing out expect_type. Do pass NULL_TYPE in place
- the incoming expect_type where appropriate.
-
-Fri Jun 4 10:56:23 1999 Jeffrey A Law (law@cygnus.com)
-
- * hppa-tdep.c (hppa_fix_call_dummy): Make it work for GCC compiled
- executables without end.o. Clean up lots of mis-guided comments.
-
-Fri Jun 4 17:10:36 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * parser-defs.h (std_regs): Replace array with pointer.
- * parse.c (build_parse): Build the std_regs table according to the
- standard registers available.
- (_initialize_parse): Register std_regs and num_std_regs as
- architecture specific.
- * gdbarch.h, gdbarch.c: Add multi-arch support for SP_REGNUM,
- FP_REGNUM, PC_REGNUM, NUM_REGS, REGISTER_NAME.
- * d10v-tdep.c, config/d10v/tm-d10v.h: Update.
-
-1999-06-03 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * thread.c: eliminate the target_thread_vector (functionality
- moved into the standard target vector).
- * gdbthread.h: eliminate target_thread_vector. Move all related
- defines into remote.c, since they are no longer shared with thread.c.
- * remote.c: eliminate the target_thread_vector.
- (remote_find_new_threads): change return type to void, consistent
- with the target vector table. (cont_thread): rename continue_thread.
- (record_currthread): remove dead code. (remote_thread_alive):
- clean up and simplify. (threadref etc.): move definitions to here
- from gdbthread.h.
-
-1999-06-02 Jason Molenda (jsm@bugshack.cygnus.com)
-
- * inftarg.c (child_create_inferior): Remove dead HPUX specific code
- which tries to find csh.
- * fork-child.c: Remove DEBUGGING predefine and conditionalized
- printfs.
- (fork_inferior): Remove dead HPUX specific code which assumes shell
- is csh.
-
- * hppa-tdep.c: Remove DEBUGGING and #if 0 debugging printfs.
- * parse.c: Ditto.
- * somread.c: Ditto.
-
- * gdbarch.h: Forward decl of struct value.
-
-Thu Jun 3 10:12:38 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * d10v-tdep.c (do_d10v_pop_frame): Rename d10v_pop_frame. Make
- static.
- * d10v-tdep.c (d10v_pop_frame), config/d10v/tm-d10v.h: New
- function. Call generic_pop_current_frame.
- * config/d10v/tm-d10v.h (POP_FRAME): Update.
- * gdbarch.h, gdbarch.c (frame_num_args_unknown): New function.
- * gdbarch.h, gdbarch.c: Add multi-arch support for POP_FRAME,
- SKIP_PROLOGUE, INNER_THAN, DECR_PC_AFTER_BREAK,
- FUNCTION_START_OFFSET, REMOTE_TRANSLATE_XFER_ADDRESS, FRAME_CHAIN,
- FRAME_CHAIN_VALID, FRAME_SAVED_PC, FRAME_ARGS_ADDRESS,
- FRAME_LOCALS_ADDRESS, FRAME_ARGS_SKIP,
- FRAMELESS_FUNCTION_INVOCATION, REGISTER_BYTE, REGISTER_RAW_SIZE,
- REGISTER_VIRTUAL_SIZE, REGISTER_VIRTUAL_TYPE, SAVED_PC_AFTER_CALL,
- FRAME_NUM_ARGS, MAX_REGISTER_RAW_SIZE, MAX_REGISTER_VIRTUAL_SIZE,
- REGISTER_SIZE.
- * d10v-tdep.c, config/d10v/tm-d10v.h: Update.
- * config/d10v/tm-d10v.h (DMEM_START, IMEM_START, STACK_START,
- ARG1_REGNUM, ARGN_REGNUM, RET1_REGNUM): Move definitions from
- here.
- * d10v-tdep.c: To here.
- * config/d10v/tm-d10v.h (struct type): Move declaration from here.
- * gdbarch.h: To here.
- * config/d10v/tm-d10v.h (struct frame_info, struct
- frame_saved_regs, struct type): Delete declarations.
-
-1999-06-02 Robert Hoehne <robert.hoehne@gmx.net>
-
- * go32-nat.c: go32_terminal_init, go32_terminal_inferior and
- go32_terminal_ours are new functions to save/restore the inferior`s
- stdin/stdout filemodes
-
-1999-06-02 Stan Shebs <shebs@andros.cygnus.com>
-
- * MAINTAINERS: Add Mark Kettenis, Jeff Law, and Philippe De Muyter
- as maintainers for Hurd, HP/UX, and COFF, respectively.
-
-1999-06-02 Mark Kettenis <kettenis@gnu.org>
-
- * gnu-nat.c (inf_continue): New function.
- (struct inf): Use `unsigned int' instead of `int' for bit-fields.
- Add new bit-field named `nomsg'.
- (inf_validate_procinfo): Renamed from inf_validate_stopped, all
- callers changed. Also update the `nomsg' and `traced' fields of
- INF.
- (make_inf): Initialize INF->nomsg.
- (inf_cleanup): Reset INF->nomsg.
- (inf_detach): Call `inf_validate_procinfo'. Call `inf_continue'
- instead of `inf_signal' if the inferior does not have a message
- port.
- (gnu_resume): Likewise.
- (gnu_create_inferior): Reset INF->nomsg in `attach_to_child'.
- Call `inf_validate_procinfo' after returning from `fork_inferior'.
- (gnu_attach): Update signal thread and tracing state.
-
- * config/i386/tm-i386gnu.h: Include "i386/tm-i386.h" instead of
- "i386/tm-i386v.h".
- (STACK_END_ADDR): Remove.
- (SIGCONTEXT_PC_OFFSET): New define.
- Include "tm-sysv4.h".
-
-1999-06-02 J.T. Conklin <jtc@redback.com>
-
- * config/tm-vxworks.h: New file, header for definitions common to
- all vxWorks targets.
- * config/a29k/tm-vx29k.h, config/i960/tm-vx960.h,
- config/m68k/tm-vx68.h, config/mips/tm-vxmips.h,
- config/sparc/tm-vxsparc.h: Include tm-vxworks.h.
-
-Wed Jun 2 17:37:03 1999 Jeffrey A Law (law@cygnus.com)
-
- * config/pa/tm-hppa.h (IMPORT_SHLIB): New unwind stub type.
-
-1999-06-02 Christopher Faylor <cgf@cygnus.com>
-
- * configure.tgt: Alphabetically reorder some targets.
-
-1999-06-02 Keith Seitz <keiths@cygnus.com>
-
- * v850ice.c (v850ice_xfer_memory): Insert lost "break".
-
-1999-06-02 Jim Blandy <jimb@zwingli.cygnus.com>
-
- * rs6000-tdep.c (variants): Fix description of 750 register set.
- (Thanks to J. T. Conklin.)
-
-Wed Jun 2 16:10:08 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * gdbarch.h, gdbarch.c: Add multi-arch support for
- STORE_STRUCT_RETURN, STORE_RETURN_VALUE,
- EXTRACT_STRUCT_VALUE_ADDRESS, USE_STRUCT_CONVENTION,
- FRAME_INIT_SAVED_REGS and INIT_EXTRA_FRAME_INFO.
- * d10v-tdep.c, config/d10v/tm-d10v.h: Update.
-
- * config/d10v/tm-d10v.h (FRAME_INIT_SAVED_REGS): Replace
- FRAME_FIND_SAVED_REGS.
- (d10v_frame_init_saved_regs): Replace d10v_frame_find_saved_regs.
- * d10v-tdep.c (d10v_pop_frame, d10v_frame_chain,
- d10v_frame_init_saved_regs): Update.
- * gdbarch.h: Disallow FRAME_FIND_SAVED_REGS when multi-arch.
-
- * gdbarch.h, gdbarch.c: Add multi-arch support for
- D10V_MAKE_DADDR, D10V_MAKE_IADDR, D10V_DADDR_P, D10V_IADDR_P,
- D10V_CONVERT_DADDR_TO_RAW and D10V_CONVERT_IADDR_TO_RAW.
- * d10v-tdep.c, config/d10v/tm-d10v.h: Update.
-
- * config/d10v/tm-d10v.h (EXTRA_FRAME_INFO): Delete.
- * d10v-tdep.c (struct frame_extra_info): Define.
- (d10v_init_extra_frame_info, d10v_pop_frame, d10v_frame_chain,
- d10v_frame_find_saved_regs): Update.
- * gdbarch.h: Disallow EXTRA_FRAME_INFO when multi-arch.
-
-Tue Jun 1 13:36:31 1999 Philippe De Muyter <phdm@macqel.be>
-
- * config/m68k/tm-delta68.h (FRAME_NUM_ARGS): Macro prototype fixed.
- * config/m68k/tm-news.h, config/ns32k/tm-merlin.h: Ditto.
- * config/ns32k/tm-umax.h (FRAME_NUM_ARGS): Old macro definition
- removed; new macro prototype fixed.
-
-Wed Jun 2 11:18:37 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * gdbarch.h, gdbarch.c: Add multi-arch support for
- EXTRACT_RETURN_VALUE, PUSH_ARGUMENTS, PUSH_DUMMY_FRAME,
- PUSH_RETURN_ADDRESS, POP_FRAME, FRAME_FIND_SAVED_REGS.
- * d10v-tdep.c, config/d10v/tm-d10v.h: Update.
-
- * gdbarch.h, gdbarch.c: Add multi-arch support for
- REGISTER_CONVERTIBLE, REGISTER_CONVERT_TO_VIRTUAL,
- REGISTER_CONVERT_TO_RAW.
- * config/d10v/tm-d10v.h, d10v-tdep.c (d10v_gdbarch_init): Update.
-
- * defs.h (REGISTER_NAME): Move compatibility definition from here.
- * gdbarch.h: To here.
-
- * frame.h, blockframe.c (generic_fix_call_dummy): New
- stub function.
- * gdbarch.h, gdbarch.c: Add multi-arch support for FIX_CALL_DUMMY.
- * config/d10v/tm-d10v.h, d10v-tdep.c (d10v_gdbarch_init): Update.
-
-Tue Jun 1 20:06:38 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * d10v-tdep.c (d10v_gdbarch_init): Set get_saved_register.
- * config/d10v/tm-d10v.h: Update.
-
-Tue Jun 1 19:50:05 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * gdbarch.h, gdbarch.c: Add multi-arch support for TARGET_READ_PC,
- TARGET_WRITE_PC, TARGET_READ_FP, TARGET_WRITE_FP, TARGET_READ_SP
- and TARGET_WRITE_SP.
- * config/d10v/tm-d10v.h, d10v-tdep.c (d10v_gdbarch_init): Update.
-
-Tue Jun 1 19:19:02 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * gdbarch.c (default_gdbarch): Set field GET_SAVED_REGISTER to
- generic_get_saved_register.
- * gdbarch.c: Change update dispatch functions so that they check
- for a NULL function pointer.
-
-Tue Jun 1 19:19:02 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * gdbarch.h, gdbarch.c: Add multi-arch support for TARGET_INT_BIT,
- TARGET_CHAR_BIT, TARGET_SHORT_BIT, TARGET_FLOAT_BIT,
- TARGET_DOUBLE_BIT and TARGET_LONG_DOUBLE_BIT.
- * config/d10v/tm-d10v.h, d10v-tdep.c (d10v_gdbarch_init): Update.
-
-Tue Jun 1 18:47:54 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * parse.c (build_parse): New function. Initialize
- msym_text_symbol_type, msym_data_symbol_type and
- msym_unknown_symbol_type.
- (_initialize_parse): Call build_parse.
- (_initialize_parse): Register variables msym_text_symbol_type,
- msym_data_symbol_type as msym_unknown_symbol_type as
- per-architecture.
-
-Tue Jun 1 11:30:09 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * d10v-tdep.c (_initialize_d10v_tdep): Register d10v as an
- architecture.
- (d10v_gdbarch_init): New function.
- * confg/d10v/tm-d10v.h (GDB_MULTI_ARCH): Define.
-
-Tue Jun 1 10:45:24 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * config/d10v/tm-d10v.h (REGISTER_CONVERTIBLE,
- REGISTER_CONVERT_TO_RAW, REGISTER_CONVERT_TO_VIRTUAL): Convert
- macros into functions.
- * config/d10v/tm-d10v.h, d10v-tdep.c (d10v_register_convertable,
- d10v_register_convert_to_virtual, d10v_register_convert_to_raw):
- The new functions.
-
-1999-05-31 Fernando Nasser <fnasser@totem.to.cygnus.com>
-
- * stack.c (print_args_stub): Add missing stream parameter.
-
-Mon May 31 15:50:08 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- Fri May 28 16:51:00 1999 Martin Dorey <martin.dorey@madge.com>:
- * valops.c, value.h (default_push_arguments): Fix order of
- parameters to match PUSH_ARGUMENTS arguments.
-
-Thu May 27 11:42:55 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * gdbarch.h (EXTRACT_STRUCT_VALUE_ADDRESS): Return 0.
-
- * valops.c (value_assign): Delete redundant test of
- REGISTER_CONVERTIBLE.
-
-Thu May 27 11:33:57 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * config/w65/tm-w65.h, config/tic80/tm-tic80.h, config/sh/tm-sh.h,
- config/i386/tm-i386m3.h, config/i386/tm-go32.h,
- config/i386/tm-cygwin.h, config/h8500/tm-h8500.h,
- config/d30v/tm-d30v.h, config/d10v/tm-d10v.h: Delete definition of
- macro NAMES_HAVE_UNDERSCORE.
-
-Thu May 27 09:31:06 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * gdbarch.h (EXTRACT_STRUCT_VALUE_ADDRESS,
- EXTRACT_STRUCT_VALUE_ADDRESS_P): Provide default definitions.
- * values.c (value_being_returned): Use
- EXTRACT_STRUCT_VALUE_ADDRESS when EXTRACT_STRUCT_VALUE_ADDRESS_P.
-
-Wed May 26 13:51:25 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * utils.c (tui_file_new, tui_file_delete, tui_fileopen): New
- functions.
- (tui_file_isatty): Rename gdb_file_isatty.
- (gdb_file_init_astring): Use tui_file_new to create stream.
- (gdb_file_get_strbuf, gdb_file_adjust_strbuf): Call gdb_file_data
- to access the tui_stream.
- (tui_file_flush): Rename gdb_flush. Call gdb_file_data to access
- the tui_stream. Pass FILE and not STREAM down.
-
- * utils.c (struct stdio_file, stdio_file_flush, stdio_file_fputs,
- stdio_file_isatty, stdio_file_delete, stdio_file_new,
- stdio_fileopen): Define type and functions. Implement a simple
- STDIO based gdb_file.
- (struct gdb_file, gdb_file_new, gdb_file_delete, null_file_isatty,
- null_file_flush, null_file_fputs, null_file_delete, gdb_file_data,
- set_gdb_file_flush, set_gdb_file_isatty, set_gdb_file_fputs,
- set_gdb_file_data, fputs_unfiltered, gdb_flush, gdb_file_isatty):
- Define type and functions. Implement virtual functions for
- gdb_file.
-
- * defs.h (struct gdb_file): Declare.
- (GDB_FILE): Change type to struct gdb_file. Deprecate.
- (gdb_file_flush_ftype, gdb_file_fputs_ftype,
- gdb_file_isatty_ftype, gdb_file_delete_ftype): Add function type
- declarations.
-
- * defs.h (set_gdb_file_flush, set_gdb_file_fputs,
- set_gdb_file_isatty, set_gdb_file_data, gdb_file_new,
- gdb_file_delete, gdb_file_data, stdio_fileopen, tui_fileopen): Add
- function declarations.
- (gdb_fopen): Re-implement. Call stdio_file_new.
- (gdb_fclose): Re-implement. Call gdb_file_delete.
-
- * main.c (tui_file_fputs): Rename fputs_unfiltered. Use
- gdb_file_data to gain access to the tui_stream data. Use FILE
- instead of STREAM where applicable.
- (main): Create gdb_stdout and gdb_stderr using tui_fileopen.
-
- * defs.h (struct tui_stream): Add field ts_magic.
- * utils.c (tui_file_magic): Local variable.
- (tui_file_new): Set field ts_magic.
- (tui_file_delete, tui_file_isatty, gdb_file_init_astring,
- gdb_file_get_strbuf, gdb_file_adjust_strbuf, tui_file_flush):
- Verify ts_magic.
-
-1999-05-25 Jim Blandy <jimb@zwingli.cygnus.com>
-
- * breakpoint.c (insert_breakpoints, remove_breakpoint,
- breakpoint_1): Add a 'default' case, which prints a warning
- message, to remove EGCS warnings.
-
-1999-05-25 Fernando Nasser <fnasser@totem.to.cygnus.com>
-
- * utils.c (gdb_file_adjust_strbuf): Take into account the
- possibility that the buffer has not been allocated yet.
-
-Tue May 25 16:05:11 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * gdbarch.h (REGISTER_CONVERTIBLE, REGISTER_CONVERT_TO_VIRTUAL,
- REGISTER_CONVERT_TO_RAW): Provide default definition.
-
- * valops.c (value_assign), infcmd.c (do_registers_info), findvar.c
- (value_from_register, value_of_register): Remove #ifdef
- REGISTER_CONVERTIBLE. Assume REGISTER_CONVERTIBLE etc defined.
-
-1999-05-25 Keith Seitz <keiths@cygnus.com>
-
- * config/mcore/tm-mcore.h (FRAME_NUM_ARGS): Re-write definition of
- FRAME_NUM_ARGS so that it returns NUM_ARGS as a result instead of
- setting a variable as a side effect.
-
-Tue May 25 16:18:25 1999 Andrew Cagney <cagney@amy.cygnus.com>
-
- * remote-d10v.c (d10v_eva_prepare_to_trace,
- d10v_eva_get_trace_data), remote-sim.c (_initialize_remote_sim):
- Add declaraton. Make static.
-
- * remote-d10v.c (_initialize_remote_d10v), d10v-tdep.c
- (_initialize_d10v_tdep): Add declaration.
- * config/d10v/tm-d10v.h (d10v_frame_chain): Add declaration.
-
-Tue May 25 15:20:58 1999 Andrew Cagney <cagney@amy.cygnus.com>
-
- * main.c (init_proc, proc_remove_foreign): Delete function.
- * inftarg.c (child_mourn_inferior): Update. Delete call to
- proc_remove_foreign().
- * top.c (gdb_init): Update. Delete call to init_proc().
-
- * utils.c (pollquit, fmthex, hexlate): Delete function.
-
-Tue May 25 13:01:43 1999 Andrew Cagney <cagney@amy.cygnus.com>
-
- * main.c (gdb_init): Move declaration from here.
- * top.h: To here.
-
- * defs.h (init_page_info): Add declaration.
-
- * top.c (initialize_utils): Move declaration from here.
- * defs.h: To here.
-
- * infcmd.c (target_map_name_to_register): Move declaration from
- here.
- * parser-defs.h: To here.
-
- * c-typeprint.c (cp_type_print_method_args), target.c
- (nosupport_runtime, normal_target_post_startup_inferior): Add
- declaration. Make static.
-
-Tue May 25 13:53:23 1999 Andrew Cagney <cagney@amy.cygnus.com>
-
- * main.c: Include "event-loop.h".
- * Makefile.in (main.o): Add dependency.
-
- * top.h (setup_event_loop, async_init_signals), top.c
- (set_async_editing_command, set_async_annotation_level,
- set_async_prompt), event-loop.c (display_gdb_prompt): Move
- declarations from here.
- * event-loop.h: To here.
-
- * event-loop.h (delete_async_signal_handler): Add function
- declaration.
-
- * event-top.c (change_annotation_level, command_handler): Add
- declaration. Make static.
-
-Tue May 25 12:44:58 1999 Andrew Cagney <cagney@amy.cygnus.com>
-
- * tracepoint.c (free_actions_list, add_register): Add declaration.
- Make static.
- (free_actions_list_cleanup_wrapper): New function. Wraps
- free_actions_list for make_cleanup.
- (trace_start_command): Pass free_actions_list_cleanup_wrapper
- instead of free_actions_list to make_cleanup.
- (_initialize_tracepoint): Add extern declaration.
-
-Tue May 25 12:23:39 1999 Andrew Cagney <cagney@amy.cygnus.com>
-
- * jv-typeprint.c (java_type_print_base, jv-valprint.c
- (java_print_value_fields): Add static declaration.
-
- * jv-lang.c (java_lookup_type, get_java_utf8_name,
- java_lookup_type): Add static declaration.
- (get_java_class_symtab, java_class_is_primitive,
- java_value_string): Add declaration. Make static.
- (java_rerun_cleanup): Add extern declaration for this stub
- function.
-
-Tue May 25 12:06:29 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * gdbarch.h: When multi-arch, check that REGISTER_NAMES was not
- defined.
-
-Mon May 24 16:16:29 1999 Andrew Cagney <cagney@amy.cygnus.com>
-
- * inflow.c (_initialize_inflow), annotate.c
- (_initialize_annotate), os9kread.c (_initialize_os9kread),
- serial.c (_initialize_serial), nlmread.c (_initialize_nlmread),
- f-valprint.c (_initialize_f_valprint), cp-valprint.c
- (_initialize_cp_valprint), typeprint.c (_initialize_typeprint),
- complaints.c (_initialize_complaints), scm-lang.c
- (_initialize_scheme_language), m2-lang.c
- (_initialize_m2_language), dbxread.c (_initialize_dbxread),
- f-lang.c (_initialize_f_language), ch-lang.c
- (_initialize_chill_language), c-lang.c (_initialize_c_language),
- corefile.c (_initialize_core), stabsread.c
- (_initialize_stabsread), mipsread.c (_initialize_mipsread),
- elfread.c (_initialize_elfread), coffread.c
- (_initialize_coffread), maint.c (_initialize_maint_cmds),
- demangle.c (_initialize_demangler), maint.c
- (_initialize_maint_cmds), language.c (_initialize_language): Add
- external declaration.
-
-Mon May 24 10:04:56 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * config/z8k/tm-z8k.h, config/w65/tm-w65.h, config/v850/tm-v850.h,
- config/tic80/tm-tic80.h, config/tahoe/tm-tahoe.h,
- config/rs6000/tm-rs6000.h, config/sparc/tm-sparc.h,
- config/sh/tm-sh.h, config/pyr/tm-pyr.h, config/pa/tm-hppa.h,
- config/ns32k/tm-merlin.h, config/mn10300/tm-mn10300.h,
- config/mn10200/tm-mn10200.h, config/mips/tm-mips.h,
- config/m88k/tm-m88k.h, config/m68k/tm-news.h,
- config/m68k/tm-delta68.h, config/m68k/tm-isi.h,
- config/m68k/tm-m68k.h, config/m32r/tm-m32r.h,
- config/i960/tm-i960.h, config/i386/tm-i386v.h,
- config/i386/tm-i386.h, config/h8500/tm-h8500.h,
- config/h8300/tm-h8300.h, config/fr30/tm-fr30.h,
- config/d30v/tm-d30v.h, config/d10v/tm-d10v.h,
- config/convex/tm-convex.h, config/arc/tm-arc.h,
- config/arm/tm-arm.h, config/alpha/tm-alpha.h,
- config/a29k/tm-a29k.h: Re-write definition of FRAME_NUM_ARGS so
- that it returns NUM_ARGS as a result instead of setting a variable
- as a side effect.
-
- * ns32k-tdep.c (merlin_frame_num_args), tahoe-tdep.c
- (tahoe_frame_num_args), vax-tdep.c (vax_frame_num_args),
- m68k-tdep.c (news_frame_num_args, delta68_frame_num_args,
- isi_frame_num_args), convex-tdep.c (convex_frame_num_args): New
- functions.
-
- * stack.c (print_args_stub): Update use of FRAME_NUM_ARGS.
-
-Mon May 24 11:57:04 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote.c (remote_xfer_memory): Re-write with assumption that
- REMOTE_TRANSLATE_XFER_ADDRESS is defined. Pass targ_addr and
- targ_len by reference.
- (REMOTE_TRANSLATE_XFER_ADDRESS): Provide default definition.
-
- * remote-d10v.c (remote_d10v_translate_xfer_address): Update.
- * config/d10v/tm-d10v.h (REMOTE_TRANSLATE_XFER_ADDRESS): Update.
-
-Mon May 24 12:10:58 1999 Andrew Cagney <cagney@amy.cygnus.com>
-
- * value.h (default_push_arguments): Add function declaration.
-
- * alpha-tdep.c (alpha_about_to_return), gdbarch.c (verify_gdbarch,
- arch_ok, set_arch), command.c (find_cmd), infrun.c
- (follow_inferior_fork, follow_fork, follow_vfork,
- set_schedlock_func, is_internal_shlib_eventpoint,
- stopped_for_internal_shlib_event, stopped_for_shlib_catchpoint,
- xdb_handle_command), infcmd.c (run_no_args_command, go_command),
- symfile.c (add_filename_language, set_ext_lang_command,
- info_ext_lang_command, init_filename_language_table), symtab.c
- (overload_list_add_symbol), defs.h (default_get_saved_register),
- ax-general.c (grow_expr, append_const, read_const, generic_ext):
- Ditto.
-
- * infrun.c (currently_stepping): Ditto. Make static.
-
- * valops.c (hand_function_call): Explictly type static variable
- ``checked''.
-
-Mon May 24 08:36:18 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * d10v-tdep.c (d10v_breakpoint_from_pc, d10v_register_name,
- d10v_register_byte, d10v_register_raw_size,
- d10v_register_virtual_size, d10v_register_virtual_type,
- d10v_make_daddr, d10v_make_iaddr, d10v_daddr_p, d10v_iaddr_p,
- d10v_convert_iaddr_to_raw, d10v_convert_daddr_to_raw,
- d10v_store_struct_return, d10v_store_return_value,
- d10v_extract_struct_value_address, d10v_frame_saved_pc,
- d10v_frame_args_address, d10v_frame_locals_address,
- d10v_saved_pc_after_call): New functions.
-
- * config/d10v/tm-d10v.h (REGISTER_BYTE, REGISTER_RAW_SIZE,
- REGISTER_VIRTUAL_SIZE, REGISTER_VIRTUAL_TYPE, STORE_STRUCT_RETURN,
- D10V_MAKE_DADDR, D10V_MAKE_IADDR, D10V_DADDR_P, D10V_IADDR_P,
- D10V_CONVERT_DADDR_TO_RAW, D10V_CONVERT_IADDR_TO_RAW,
- STORE_STRUCT_RETURN, STORE_RETURN_VALUE,
- EXTRACT_STRUCT_VALUE_ADDRESS, SAVED_PC_AFTER_CALL, FRAME_SAVED_PC,
- FRAME_ARGS_ADDRESS): Re-define using new functions.
-
- * config/d10v/tm-d10v.h (BREAKPOINT_FROM_PC): Replace BREAKPOINT.
- (REGISTER_NAME): Replace REGISTER_NAMES.
-
- * utils.c (core_addr_lessthan, core_addr_greaterthan): New
- functions.
- * defs.h (core_addr_lessthan, core_addr_greaterthan): Declare.
-
-Sat May 22 16:44:06 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * utils.c (n_spaces): Handle case where first call has N equal to
- zero.
- (print_spaces): Use n_spaces.
-
-Fri May 21 11:23:54 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * valops.c (value_push): Remove conditional definition based on
- absense of macro PUSH_ARGUMENTS. Pass SP and STRUCT_ADDR by
- reference.
- (default_push_arguments): New function.
-
- * config/v850/tm-v850.h, config/tic80/tm-tic80.h,
- config/sparc/tm-sparc.h, config/sparc/tm-sp64.h,
- config/sh/tm-sh.h, config/rs6000/tm-rs6000.h, config/pa/tm-hppa.h,
- config/mn10300/tm-mn10300.h, config/mn10200/tm-mn10200.h,
- config/mips/tm-mips.h, config/m32r/tm-m32r.h,
- config/h8300/tm-h8300.h, config/fr30/tm-fr30.h,
- config/d30v/tm-d30v.h, config/d10v/tm-d10v.h, config/arm/tm-arm.h,
- config/alpha/tm-alpha.h: Update definition of PUSH_ARGUMENTS.
- Return updated SP.
-
- * rs6000-tdep.c (rs6000_push_arguments): Rename push_arguments.
-
-Thu May 20 12:18:28 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * blockframe.c (get_prev_frame): Remove #ifdef around test for
- FRAMELESS_FUNCTION_INVOCATION.
- (get_prev_frame): Change FRAMELESS_FUNCTION_INVOCATION call to a
- function invocation.
- * i386-tdep.c (i386_frame_num_args), stack.c (frame_info): Ditto.
- * config/z8k/tm-z8k.h, config/w65/tm-w65.h, config/vax/tm-vax.h,
- config/sparc/tm-sparc.h, config/sh/tm-sh.h,
- config/rs6000/tm-rs6000.h, config/pa/tm-hppa.h,
- config/mips/tm-mips.h, config/m88k/tm-m88k.h,
- config/m68k/tm-m68k.h, config/i960/tm-i960.h,
- config/i386/tm-sun386.h, config/i386/tm-i386v.h,
- config/i386/tm-i386.h, config/h8500/tm-h8500.h,
- config/h8300/tm-h8300.h, config/fr30/tm-fr30.h,
- config/d30v/tm-d30v.h, config/d10v/tm-d10v.h,
- config/convex/tm-convex.h, config/arm/tm-arm.h,
- config/arc/tm-arc.h, config/alpha/tm-alpha.h,
- config/a29k/tm-a29k.h: Update FRAMELESS_FUNCTION_INVOCATION.
- * fr30-tdep.c (fr30_frameless_function_invocation), convex-tdep.c
- (convex_frameless_function_invocation), arm-tdep.c
- (arm_frameless_function_invocation): New functions.
-
-1999-05-20 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * top.c: Change dates in comments to ISO format.
-
- * event-top.c: Ditto.
- * event-loop.c: Ditto.
- * main.c: Ditto.
-
-1999-05-19 Keith Seitz <keiths@cygnus.com>
-
- * config/mcore/tm-mcore.h (BELIEVE_PCC_PROMOTION): Define. We
- really do want to believe what gcc tells us about types...
-
-1999-05-19 Keith Seitz <keiths@cygnus.com>
-
- * config/mcore/tm-mcore.h (FRAME_ARGS_ADDRESS): Define to a function.
- (FRAME_LOCALS_ADDRESS): Ditto.
- * mcore-tdep.c (mcore_frame_args_addcress): New function.
- (mcore_frame_locals_address): New function.
-
- * monitor.c (monitor_open): Only assume we have eight
- breakpoints if the monitor implementation does not tell
- us how many there really are. Alloc memory for these
- dynamically.
- (monitor_close): Free memory associated with breakpoint
- storage.
- (monitor_insert_breakpoint): Don't rely on a hardcoded
- number of breakpoints.
- (monitor_remove_breakpoint): Ditto.
- (NUM_MONITOR_BREAKPOINTS): Removed and replaced with monitor_ops
- specification.
- * monitor.h (struct monitor_ops): Add new member so that the
- individual monitor implementations can tell us how many
- breakpoints the monitor supports.
-
- * mcore-rom.c (init_picobug_cmds): Add number of breakpoints supported
- by picobug monitor.
-
-1999-05-18 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- From Philippe De Muyter <phdm@macqel.be>:
- * event-loop.h: Include sys/wait.h only if HAVE_SYS_WAIT_H.
-
-1999-05-17 Keith Seitz <keiths@cygnus.com>
-
- * configure.tgt: Add MCore target.
- * Makefile.in: Add mcore-tdep.c and mcore-rom.c
- * config/mcore/tm-mcore.h: New file.
- * config/mcore/mcore.mt: New file.
- * mcore-rom.c: New file.
- * mcore-tdep.c: New file.
-
-1999-05-17 Fernando Nasser <fnasser@totem.to.cygnus.com>
-
- * top.c (print_command_line): Added the missing stream argument.
- * gdbcmd.h: Added argument to prototype.
- * command.c: Fixed call to include extra argument.
- * breakpoint.c: Same.
-
-1999-05-14 Jim Blandy <jimb@zwingli.cygnus.com>
-
- Targets are #defining PREPARE_TO_PROCEED with inconsistent numbers
- of arguments. Since the Mach 3 target needs an argument, we'll
- make things consistent by adding an argument everywhere.
- * infrun.c (proceed): Pass an argument to PREPARE_TO_PROCEED.
- * config/pa/nm-hppah.h (PREPARE_TO_PROCEED): Add ignored argument
- to definition.
-
-1999-05-11 Stan Shebs <shebs@andros.cygnus.com>
-
- Fri Apr 23 13:27:34 PDT 1999 Toshiyasu Morita (tm@netcom.com)
- * sh-stub.c: Mostly localize processor dependencies.
-
-1999-05-10 Martin Hunt <hunt@cygnus.com>
-
- * debugify.c, debugify.h: Removed because they are no
- longer used.
-
-1999-05-08 Jim Blandy <jimb@zwingli.cygnus.com>
-
- * infrun.c (_initialize_infrun): Handle TARGET_SIGNAL_LWP,
- TARGET_SIGNAL_WAITING, and TARGET_SIGNAL_CANCEL like SIGALRM or
- SIGIO --- pass them through to the inferior silently.
- * target.h (enum target_signals): Add TARGET_SIGNAL_CANCEL, for
- Solaris's SIGCANCEL.
- * target.c (target_signal_from_host, target_signal_to_host): Add
- mapping between SIGCANCEL and TARGET_SIGNAL_CANCEL.
- (signals): Add entry for SIGCANCEL.
-
-1999-05-07 Stan Shebs <shebs@andros.cygnus.com>
-
- After years of talking about it, finally break up the
- wait_for_inferior loop.
- * infrun.c (struct execution_control_state): New struct,
- holds what used to be local vars governing wfi behavior.
- (init_execution_control_state): New function, was code in
- wfi that set up execution control state.
- (handle_inferior_event): New function, was body of main
- wfi loop. Rewrite all local var references to go through
- the ecs structure passed into this function.
- (wait_for_inferior): Rewrite to set up and use execution control
- state, and to call the new functions.
- (currently_stepping): New function, was the macro
- CURRENTLY_STEPPING.
- (enum infwait_states): Rename from wfi_states.
- (infwait_normal_state, etc): Similarly.
-
-Thu May 6 15:25:32 1999 Philippe De Muyter <phdm@macqel.be>
-
- * coffread.c (coff_symtab_read): Call `record_line' with the line
- number of the ".bf" symbol only for one-line functions.
-
-1999-05-06 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * Makefile.in: thread.o depends on target.h.
-
-1999-05-06 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * event-top.c (change_line_handler): Use POLLIN instead of
- POLLRDNORM, for compatibility with Linux.
- (setup_event_loop): Ditto.
-
-1999-05-06 Jim Blandy <jimb@zwingli.cygnus.com>
-
- * mips-tdep.c (heuristic_proc_start): Rewrite cryptic error
- message about hitting the "heuristic fence post" with something
- that actually gives the user a fighting chance of figuring out
- why GDB is unhappy.
-
-1999-05-06 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * top.c: Include event-loop.h.
- (init_main): Add async version of 'set prompt' command.
- If in async mode define the editing and annotate set
- commands in a different way.
- Initialize new variable asyn_command_editing_p to 1.
- Initialize the gdb prompt for async mode.
- (quit_cover): Make not static, for use by the event loop.
- (gdb_init): Call async_init_signals for the asynchronous case.
- (source_line_number, source_file_name, source_error,
- source_pre_error, history_expansion_p): Make non-static, so
- event-top.c can use them.
- (command_loop_marker): Make non-static, for use in event-top.c.
- Include event-loop.h.
-
- * top.h: Add prototype for async_init_signals.
- (SET_TOP_LEVEL): Move here from main.c.
- Add setup_event_loop to exported functions.
-
- * defs.h: Add async_hook to exported variables.
-
- * main.c (SET_TOP_LEVEL): Move to top.h, so that it is visible in
- event-loop.c. Add new global variable async to determine whether
- we are running in async mode or not.
- (main): Add support for --async switch. Use async_hook to call
- setup_event_loop, when running in async mode.
-
- * event-top.c: New file. Gdb input line handler and command line
- handler for the event loop. Initialization of signal handlers.
- All the handled signals have handlers called handle_<signalname>.
- Set up all the appropriate tokens for asynchronous signal
- handling.
-
- * event-loop.h: New file. Data structures and definitions for the
- event loop.
-
- * event-loop.c: New file. Functions for the event loop
- implementation.
-
- * config.in: Regenerate with autoheader.
-
- * configure.in (AC_CHECK_FUNCS): Add poll to list of functions
- to be checked for.
-
- * configure: Regenerate.
-
- * Makefile.in (SFILES): Add new source files.
- (eventloop_h): Define.
- (COMMON_OBS): Add new object files.
- (event-loop.o): Add rule for target object.
- (event-top.o): Ditto.
-
-1999-05-05 Stan Shebs <shebs@andros.cygnus.com>
-
- * infrun.c (wait_for_inferior): Transform breaks and continues
- into gotos, move the target_wait to the very top of the loop.
-
-1999-05-05 Jonathan Larmour <jlarmour@cygnus.co.uk>
-
- * configure.in: Ensure that GDB links with libuser32.a under
- cygwin because libreadline requires it.
- * Makefile.in (WIN32LIBS): Substitute in result from configure
- * configure: regenerate
-
-1999-05-04 Jim Blandy <jimb@zwingli.cygnus.com>
-
- Fix from John Rigby. Richard Henderson says it seems okay.
- * alpha-tdep.c (PROC_DUMMY_FRAME): As long as we're abusing fields
- of (proc)->pdr, we ought to at least abuse one large enough to
- hold the value we're trying to store in it. iopt is only 32 bits
- wide; cbLineOffset is a bfd_vma.
-
-1999-05-04 DJ Delorie <dj@cygnus.com>
-
- DJGPP changes from Robert Hoehne <robert.hoehne@gmx.net>
-
- * ser-go32.c: correct includes
- * source.c (openp): use ROOTED_P instead of SLASH_P
- * go32-nat.c: enhance exception and NPX handling
- (go32_kill_inferior): fix small bug killing inferior
- * configure.in: don't look for termcap with djgpp
- * configure: rebuild
-
-1999-05-04 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * main.c (main): Comment out unused and undocumented command line
- option '-'.
-
-1999-04-30 Jim Blandy <jimb@zwingli.cygnus.com>
-
- Cleanup from Philippe De Muyter:
- * configure.in (BFD_NEED_DECLARATION): Check also for strstr.
- * acconfig.h (NEED_DECLARATION_MALLOC, NEED_DECLARATION_REALLOC,
- NEED_DECLARATION_FREE, NEED_DECLARATION_STRERROR): Define slots
- removed; they are now generated automatically.
- * gdb_string.h (strstr): Provide function prototype if
- NEED_DECLARATION_STRSTR.
- * configure, config.in: Regenerated.
-
-Fri Apr 30 11:16:09 1999 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * target.h (to_find_new_threads): new target ops vector.
- (target_find_new_threads): define.
- * target.c (update_current_target): inherit new target ops vector.
- * remote.c: Setup to_find_new_threads vector.
- * sol-thread.c: ditto.
- * thread.c (target_find_new_threads): rename: local_find_new_threads.
- (info_threads_command): call target_find_new_threads by new method,
- as a target ops vector, rather than previous macro definition method.
- * infcmd.c (go_command): define only if in xdb mode.
- * procfs.c: fix typo in comment.
-
-Fri Apr 30 01:02:05 1999 Jeffrey A Law (law@cygnus.com)
-
- * hppah-nat.c: Fix various coding convention violations introduced
- by HP.
- (child_acknowledge_created_inferior): Do nothing if PT_SET_EVENT_MASK
- is not defined.
-
-1999-04-28 Stan Shebs <shebs@andros.cygnus.com>
-
- * TODO: Add some items inspired by review of the manual.
-
-Tue Apr 27 17:38:19 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * config/z8k/tm-z8k.h, config/v850/tm-v850.h,
- config/tic80/tm-tic80.h, config/sparc/tm-sparc.h,
- config/sh/tm-sh.h, config/pyr/tm-pyr.h, config/pa/tm-hppa.h,
- config/mn10300/tm-mn10300.h, config/mn10200/tm-mn10200.h,
- config/mips/tm-mips.h, config/m88k/tm-m88k.h,
- config/m68k/tm-m68k.h, config/m32r/tm-m32r.h,
- config/i960/tm-i960.h, config/i386/tm-i386.h,
- config/h8500/tm-h8500.h, config/h8300/tm-h8300.h,
- config/fr30/tm-fr30.h, config/d30v/tm-d30v.h,
- config/d10v/tm-d10v.h, config/alpha/tm-alpha.h,
- config/arm/tm-arm.h, config/a29k/tm-a29k.h, config/arc/tm-arc.h:
- Change SKIP_PROLOGUE and SKIP_PROLOGUE_FRAMELESS_P macros so that
- they return the new address.
-
- * sparc-tdep.c (sparc_skip_prologue), hppa-tdep.c
- (hppa_skip_prologue), m88k-tdep.c
- (m88k_skip_prologue), i960-tdep.c
- (i960_skip_prologue), arc-tdep.c
- (arc_skip_prologue), a29k-tdep.c (a29k_skip_prologue): Rename
- skip_prologue function.
-
- * config/m68k/tm-isi.h: Convert macro SKIP_PROLOGUE into a new
- function.
- * m68k-tdep.c (isi_skip_prologue): That new function.
- * vax-tdep.c (vax_skip_prologue), config/vax/tm-vax.h: Ditto.
- * tahoe-tdep.c (tahoe_skip_prologue), config/tahoe/tm-tahoe.h: Ditto.
- * rs6000-tdep.c (rs6000_skip_prologue), config/rs6000/tm-rs6000.h:
- Ditto.
- * ns32k-tdep.c (umax_skip_prologue), config/ns32k/tm-umax.h: Ditto.
- * config/ns32k/tm-merlin.h, ns32k-tdep.c (merlin_skip_prologue):
- Ditto.
- * config/m68k/tm-altos.h, m68k-tdep.c (altos_skip_prologue): Ditto.
- * config/convex/tm-convex.h, convex-tdep.c (convex_skip_prologue):
- Ditto.
-
- * symtab.c (in_prologue, find_function_start_sal, decode_line_1),
- infrun.c (wait_for_inferior), blockframe.c
- (frameless_look_for_prologue): Update.
- * config/fr30/tm-fr30.h (FRAMELESS_FUNCTION_INVOCATION): Update.
-
-1999-04-27 Stan Shebs <shebs@andros.cygnus.com>
-
- * TODO: Remove item about DEBUG_EXPRESSIONS, no longer meaningful.
-
- * infrun.c (enum wfi_state): New enum.
- (wait_for_inferior): Merge all but one of the target_wait calls
- into a single call, add a wfi_state variable to encode which of
- the calls is being made.
-
-1999-04-26 Jim Blandy <jimb@zwingli.cygnus.com>
-
- Fix from Dave Holcomb.
- * hpux-thread.c (init_hpux_thread_ops): Use the right function
- name when initializing hpux_thread_ops.to_thread_alive.
-
- * coffread.c (coff_symfile_read): If we have a `.stab' section,
- but no `.stabstr' section, then print an error message; don't
- crash.
-
-1999-04-26 Jim Blandy <jimb@zwingli.cygnus.com>
-
- 1999-04-25 Mark Kettenis <kettenis@gnu.org>
-
- * gnu-nat.c (gnu_attach): Call target_terminal_init before calling
- inf_set_traced, since that function calls code that might try to
- restore the terminal settings.
-
-Mon Apr 26 08:55:46 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * gdbarch.h, gdbarch.c: More format cleanups.
-
-Sun Apr 25 18:54:51 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * gdbarch.h (CALL_DUMMY_STACK_ADJUST_P): Replace
- SIZEOF_CALL_DUMMY_STACK_ADJUST_P.
- (CALL_DUMMY_STACK_ADJUST): Replace
- SIZEOF_CALL_DUMMY_STACK_ADJUST_P.
- * gdbarch.c (gdbarch_call_dummy_stack_adjust,
- set_gdbarch_call_dummy_stack_adjust): Define.
-
-Fri Apr 23 15:00:25 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * gdbarch.c (arch_ok): New function. Fix logic test for a valid
- architecture.
- (set_arch): Use.
-
-1999-04-22 Jason Molenda (jsm@bugshack.cygnus.com)
-
- * README: Note that readline is not installed as a part of
- make install.
-
-Thu Apr 22 21:02:28 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * gdbarch.h, gdbarch.c (GET_SAVED_REGISTER, get_saved_register):
- Add.
- (struct gdbarch, verify_gdbarch, gdbarch_alloc, gdbarch_dump,
- default_gdbarch): Update.
-
- * value.h (get_saved_register): Cleanup prototype.
- * findvar.c (default_get_saved_register): Rename function
- get_saved_register.
- (GET_SAVED_REGISTER): Define as default_get_saved_register when
- undefined.
- (get_saved_register): Always declare. Call GET_SAVED_REGISTER.
-
- * sparc-tdep.c (sparc_get_saved_register): Rename function
- get_saved_register.
- * config/sparc/tm-sparc.h (GET_SAVED_REGISTER): Update.
- * a29k-tdep.c (a29k_get_saved_register): Rename function
- get_saved_register.
- * config/a29k/tm-a29k.h (GET_SAVED_REGISTER): Update.
-
- * config/d10v/tm-d10v.h, config/powerpc/tm-ppc-eabi.h,
- config/h8300/tm-h8300.h, config/m32r/tm-m32r.h,
- config/mn10200/tm-mn10200.h, config/mn10300/tm-mn10300.h,
- config/sh/tm-sh.h, config/tic80/tm-tic80.h, config/v850/tm-v850.h:
- Update macro GET_SAVED_REGISTER so that it calls
- generic_get_saved_register.
- * v850-tdep.c, tic80-tdep.c, sh-tdep.c, mn10300-tdep.c,
- mn10200-tdep.c, m32r-tdep.c, h8300-tdep.c, rs6000-tdep.c: Delete
- function get_saved_register.
-
-Thu Apr 22 13:32:23 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * gdbarch.c: Cleanup. Re-order the definition of the ``struct
- gdbarch'' initialization functions so that maintenance is more
- straightforward.
-
-Thu Apr 22 11:07:21 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * gdbarch.h, gdbarch.c (use_generic_dummy_frames,
- USE_GENERIC_DUMMY_FRAMES): Add.
- (struct gdbarch, verify_gdbarch, gdbarch_alloc, gdbarch_dump,
- default_gdbarch): Update.
-
- * config/v850/tm-v850.h, config/tic80/tm-tic80.h,
- config/sh/tm-sh.h, config/powerpc/tm-ppc-eabi.h,
- config/mn10300/tm-mn10300.h, config/mn10200/tm-mn10200.h,
- config/m32r/tm-m32r.h, config/h8300/tm-h8300.h,
- config/fr30/tm-fr30.h, config/d10v/tm-d10v.h: Give the
- USE_GENERIC_DUMMY_FRAMES macro the value one.
- * inferior.h (USE_GENERIC_DUMMY_FRAMES): Default to a value of
- zero.
-
- * blockframe.c (generic_find_dummy_frame,
- generic_pc_in_call_dummy, generic_read_register_dummy,
- generic_push_dummy_frame, generic_pop_current_frame,
- generic_pop_dummy_frame, generic_frame_chain_valid,
- generic_get_saved_register): Always define.
-
- * breakpoint.c (frame_in_dummy): Convert #ifdef
- USE_GENERIC_DUMMY_FRAMES to runtime test.
-
- * rs6000-tdep.c (pop_frame, push_arguments, push_arguments,
- push_arguments, frame_saved_pc, rs6000_frame_chain,
- rs6000_frame_chain): Convert #ifdef USE_GENERIC_DUMMY_FRAMES to
- runtime test.
- (get_saved_register): Always define.
-
-Wed Apr 21 17:15:52 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * gdbarch.c (gdbarch_dump): Fix robustness check on
- BELIEVE_PCC_PROMOTION_TYPE.
-
-Wed Apr 21 15:39:27 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * gdbarch.h (TARGET_BYTE_ORDER_SELECTABLE_P): When multi-arch,
- force selectable byte order.
- (CALL_DUMMY): Check for CALL_DUMMY definition when multi-arch. Are
- incompatible.
- * gdbarch.c (verify_gdbarch): Check call_dummy_stack_adjust.
-
-Wed Apr 21 14:45:44 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * gdbarch.c (gdbarch_update): Move dump-arch code from here.
- (gdbarch_dump): To here. Make more robust.
- * gdbarch.h (gdbarch_dump): Add prototype.
-
- * gdbarch.c (enum set_arch): Declare.
- (set_arch): Add type parameter. Only disable
- ``target_architecture_auto'' when set_arch_manual.
- (set_architecture, set_architecture_from_arch_mach,
- set_architecture_from_file): Update.
- (set_arch): When ``gdbarch_debug'', gdbarch_dump() the current
- architecture.
-
-Wed Apr 21 10:48:53 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * frame.h (generic_pc_in_call_dummy): Make signature consistent
- with other pc_in_call_dummy functions by adding SP parameter.
- * blockframe.c (generic_pc_in_call_dummy): Update. Pass SP and
- not FP to generic_find_dummy_frame().
- * breakpoint.c (frame_in_dummy): Update.
- * config/v850/tm-v850.h, config/tic80/tm-tic80.h,
- config/sh/tm-sh.h, config/mn10300/tm-mn10300.h,
- config/mn10200/tm-mn10200.h, config/m32r/tm-m32r.h,
- config/h8300/tm-h8300.h, config/fr30/tm-fr30.h,
- config/d10v/tm-d10v.h: Update PC_IN_CALL_DUMMY definition.
-
-Tue Apr 20 12:15:45 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * config/d10v/tm-d10v.h (GDB_TARGET_IS_D10V): Move from here.
- * gdbarch.h (GDB_TARGET_IS_D10V): To here. Implement using
- TARGET_ARCHITECTURE.
- (D10V_MAKE_DADDR, D10V_MAKE_IADDR): Provide fatal default
- definitions.
-
- * valops.c (value_at): Replace #ifdef GDB_TARGET_IS_D10V code with
- runtime test.
- (value_fetch_lazy): Ditto.
- * values.c (unpack_long): Ditto.
- * printcmd.c (print_frame_args): Ditto.
-
-Sat Apr 17 15:39:33 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * gdbarch.h: Cleanup multi-arch comments.
-
-Fri Apr 16 15:39:10 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * gdbarch.h: Provide definition if GDB_MULTI_ARCH > 1 or
- GDB_MULTI_ARCH > 0 and no previous definition.
- * gdbarch.c (verify_gdbarch): Only verify a full multi-arch
- target.
-
-1999-04-15 Stan Shebs <shebs@andros.cygnus.com>
-
- * infrun.c (wait_for_inferior) [HAVE_STEPPABLE_WATCHPOINT,
- HAVE_NONSTEPPABLE_WATCHPOINT, HAVE_CONTINUABLE_WATCHPOINT]: Test
- at runtime instead of compile time.
-
-Thu Apr 15 15:15:07 1999 Andrew Cagney <cagney@amy.cygnus.com>
-
- * mips-tdep.c (struct gdbarch_tdep): Rename elf_abi to
- elf_flags. Check ABFD is elf_flavour before extracting elf_flags.
- Match ARCH against entire elf_flags instead of just the
- EF_MIPS_ABI field.
- (mips_gdbarch_init): Extract/print ef_mips_arch and
- ef_mips_bitptrs and ef_mips_abi fields from elf_flags.
-
-1999-04-14 Philippe De Muyter <phdm@macqel.be>
-
- * breakpoint.c (maintenance_info_breakpoints): Function made
- static to match previous prototype.
-
- * coffread.c (coff_record_line): Static function removed.
- (enter_linenos): Call `record_line' instead of `coff_record_line'.
- (FILE-LEVEL, coff_start_symtab, coff_end_symtab): `coff_record_line'
- -related stuff removed.
- (coff_symfile_read): Redundant statement removed.
- (coff_symtab_read): `record_line' is now called with the first line
- number of each function, given by the ".bf" symbol. This solves
- the line-number bug for one-line functions.
-
-Wed Apr 14 11:09:45 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * gdbarch.h (BELIEVE_PCC_PROMOTION_TYPE, BELIEVE_PCC_PROMOTION):
- Add multi-arch definitions.
- * gdbarch.c (gdbarch_believe_pcc_promotion,
- gdbarch_believe_pcc_promotion_type): New functions.
- (gdbarch_update): Update
- (struct gdbarch default_gdbarch): Update.
-
- * stabsread.c (BELIEVE_PCC_PROMOTION_TYPE): Provide default.
- (define_symbol): Change #if BELIEVE_PCC_PROMOTION_TYPE and #if
- BELIEVE_PCC_PROMOTION to if().
-
-1999-04-13 Jason Molenda (jsm@bugshack.cygnus.com)
-
- * configure.in (HAVE_MULTIPLE_PROC_FDS): Don't define if we're
- on a Solaris host (of any architecture).
- * configure: Regenerated.
-
-Wed Apr 14 08:23:32 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * gdbarch.c (SET_GDBARCH, GET_GDBARCH, FSET_GDBARCH): New macros.
- (gdbarch_byte_order, gdbarch_long_bit, gdbarch_long_long_bit,
- gdbarch_ptr_bit, gdbarch_call_dummy_location,
- gdbarch_call_dummy_address, gdbarch_call_dummy_address,
- gdbarch_call_dummy_breakpoint_offset,
- gdbarch_call_dummy_breakpoint_offset, gdbarch_call_dummy_length,
- gdbarch_pc_in_call_dummy, dbarch_call_dummy_breakpoint_offset_p,
- dbarch_call_dummy_p, dbarch_call_dummy_words,
- dbarch_sizeof_call_dummy_words, dbarch_call_dummy_stack_adjust,
- dbarch_call_dummy_stack_adjust_p): Define using new macros.
-
-1999-04-13 Jason Molenda (jsm@bugshack.cygnus.com)
-
- * rom68k-rom.c (init_rom68k_cmds): Fix an accidental substitution
- in monitor command strings, fix some formatting mistakes.
-
-1999-04-13 Stan Shebs <shebs@andros.cygnus.com>
-
- * configure.tgt (arm-*-*): Whack another vestige of wingdb.
-
-1999-04-12 James Ingham <jingham@cygnus.com>
-
- * arm-tdep.c (arm_pop_frame): don't clobber the previous frame's
- stack pointer (stored in frame->framereg's register) BEFORE
- reading it. This was causing "return" to behave very oddly.
-
-1999-04-12 Stan Shebs <shebs@andros.cygnus.com>
-
- * NEWS: Mention tic80.
-
-1999-04-12 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * a68v-nat.c: Remove reference to 'extern char registers[]' throughout.
- * altos-xdep.c: Ditto.
- * arm-xdep.c: Ditto.
- * convex-xdep.c: Ditto.
- * cxux-nat.c: Ditto.
- * hp300ux-nat.c: Ditto.
- * hppab-nat.c: Ditto.
- * i386aix-nat.c: Ditto.
- * i386mach-nat.c: Ditto.
- * m88k-nat.c: Ditto.
- * ptx4-nat.c: Ditto.
- * pyr-xdep.c: Ditto.
- * rs6000-nat.c: Ditto.
- * sun3-nat.c: Ditto.
- * sun386-nat.c: Ditto.
- * symm-nat.c: Ditto.
- * umax-xdep.c: Ditto.
- * i386v4-nat.c: Ditto. Also include inferior.h.
- * m68k-tdep.c: Ditto. Also include inferior.h.
-
-Mon Apr 12 15:57:16 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * inferior.h (CALL_DUMMY_STACK_ADJUST, CALL_DUMMY_STACK_ADJUST_P):
- Provide default definitions.
- * valops.c (hand_function_call): Replace #ifdef
- CALL_DUMMY_STACK_ADJUST with if (CALL_DUMMY_STACK_ADJUST_P).
-
- * gdbarch.h (SIZEOF_CALL_DUMMY_STACK_ADJUST,
- (SIZEOF_CALL_DUMMY_STACK_ADJUST_P): Define
- * gdbarch.c (struct gdbarch): Add call_dummy_stack_adjust,
- call_dummy_stack_adjust_p.
- (gdbarch_call_dummy_stack_adjust,
- set_gdbarch_call_dummy_stack_adjust,
- gdbarch_call_dummy_stack_adjust_p,
- set_gdbarch_call_dummy_stack_adjust_p): New functions.
- (default_gdbarch): Update.
-
-1999-04-09 Jim Blandy <jimb@zwingli.cygnus.com>
-
- * ax-gdb.c, ax-gdb.h, ax-general.c, ax.h: Remove RCS Id strings.
- They're a pain.
-
- * GDB 4.18 released.
- * Makefile.in (VERSION): Bump to 4.18.1.
-
-Thu Apr 8 16:04:34 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * inferior.h (CALL_DUMMY_P, CALL_DUMMY_WORDS,
- SIZEOF_CALL_DUMMY_WORDS): Define macros.
- (PUSH_DUMMY_FRAME, FIX_CALL_DUMMY, STORE_STRUCT_RETURN): Provide
- fatal default.
-
- * inferior.h, gdbarch.c (call_dummy_words,
- sizeof_call_dummy_words): Declare/Define variables.
- * valops.c (value_arg_coerce, find_function_addr,
- call_function_by_hand): Always define.
- (hand_function_call): Rename CALL_DUMMY version of
- call_function_by_hand. Make static. Add prototype.
- (hand_function_call): Update. Allocate space for *dummy and
- *dummy1 using alloca.
- * breakpoint.c (frame_in_dummy): Update.
-
- * gdbarch.h (CALL_DUMMY_P, CALL_DUMMY_WORDS,
- SIZEOF_CALL_DUMMY_WORDS): Define.
- * gdbarch.c (gdbarch_call_dummy_p, set_gdbarch_call_dummy_p,
- gdbarch_call_dummy_words, set_gdbarch_call_dummy_words,
- gdbarch_sizeof_call_dummy_words,
- set_gdbarch_sizeof_call_dummy_words): New functions.
- (gdbarch_alloc, verify_gdbarch, gdbarch_update, struct
- default_gdbarch): Update.
-
-1999-04-08 Jason Molenda (jsm@bugshack.cygnus.com)
-
- * monitor.c (monitor_read_memory): If a MO_GETMEM_NEEDS_RANGE
- monitor, increase the end address by one byte.
-
-1999-04-08 Jason Molenda (jsm@bugshack.cygnus.com)
-
- * dbug-rom.c (init_dbug_cmds): Fix strings in
- dbug_cmds.{step,clr_break,clr_all_break,fill} to send correct
- commands to the monitor.
-
-1999-04-08 Keith Seitz <keiths@cygnus.com>
-
- * m32r-stub.c (branchDestination): Undo overly ambitious
- sed script's conversion of cast from "char" to "unsigned char".
- Return offset should now be properly computed.
-
-Thu Apr 8 14:13:19 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * inferior.h (CALL_DUMMY_BREAKPOINT_OFFSET_P): New macro.
- Non-zero when CALL_DUMMY_BREAKPOINT_OFFSET is valid.
-
- * infcmd.c (breakpoint_auto_delete_contents): Always define.
- (run_stack_dummy): Update.
- * infrun.c (wait_for_inferior): Update
-
- * gdbarch.h (CALL_DUMMY_BREAKPOINT_OFFSET_P): New macro.
- * gdbarch.c (set_gdbarch_call_dummy_breakpoint_offset_p,
- gdbarch_call_dummy_breakpoint_offset_p): New functions.
- (struct gdbarch, gdbarch_alloc, default_gdbarch, gdbarch_update):
- Update.
-
-1999-04-07 Stan Shebs <shebs@andros.cygnus.com>
-
- * MAINTAINERS: Mark Alexander can no longer maintain
- h8300 and other embedded targets, sniff.
-
-1999-04-06 Stan Shebs <shebs@andros.cygnus.com>
-
- * inftarg.c (child_wait): Initialize execd_pathname.
- * target.c (debug_to_has_execd): Handle NULL execd_pathname.
-
- * solib.c (clear_solib): Don't call disable_breakpoints_in_shlibs,
- this breaks rerunning on sun4 native.
-
-1999-04-06 Jim Blandy <jimb@zwingli.cygnus.com>
-
- * config/sparc/nm-linux.h: Don't redefine PT_ATTACH to use the
- deprecated PTRACE_SUNATTACH compatibility commands. The
- definitions from <sys/ptrace.h> are fine.
-
-1999-04-06 Martin Hunt <hunt@cygnus.com>
-
- * annotate.h: Declare annotate_signal_hook.
-
- * annotate.c (annotate_signal): Add a call to
- annotate_signal_hook().
-
-1999-04-06 Jim Blandy <jimb@zwingli.cygnus.com>
-
- * dwarf2read.c (dwarf_decode_lines): Don't call record_line when
- we hit a DW_LNE_end_sequence instruction.
-
- * README: Note that GDB requires an ANSI C compiler, and explain
- how to get GCC.
-
- * README: Update.
-
-1999-04-05 Stan Shebs <shebs@andros.cygnus.com>
-
- * NEWS: Add more notes about user-visible changes.
-
-Mon Apr 5 14:56:59 1999 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * target.c (target_signal_to_string): check for signal
- number in range; otherwise if the target board returns
- a bogus signal number we might core dump (per David Taylor).
-
-1999-04-05 David Taylor <taylor@ryobi.cygnus.com>
-
- * utils.c (fputs_maybe_filtered): test value of
- pagination_enabled before paginating.
-
-1999-04-02 James Ingham <jingham@cygnus.com>
-
- * blockframe.c (get_prev_frame): Remove the redundant
- get_prev_frame_info. It is now exactly the same as
- get_prev_frame, so there is no reason to have both functions.
-
- * rs6000-tdep.c (rs6000_init_extra_frame_info):
- frame.h:
- a29k-tdep.c (init_extra_frame_info):
- config/a29k/tm-a29k.h:
- i386-tdep.c:
- Change all references to get_prev_frame_info to get_prev_frame.
-
-1999-04-02 Stan Shebs <shebs@andros.cygnus.com>
-
- * bcache.c, bcache.h, breakpoint.c, defs.h, expprint.c,
- expression.h, gdbarch.c, gdbtypes.c, gdbtypes.h, gnu-nat.c,
- gnu-nat.h, hppa-tdep.c, maint.c, monitor.c, objfiles.h, parse.c,
- remote-mips.c, remote-sds.c, remote.c, sol-thread.c, symmisc.c,
- symtab.h, target.c, top.c, typeprint.c, config/nm-gnu.h: Evaporate
- the unused MAINTENANCE_CMDS conditional.
-
-1999-04-02 James Ingham <jingham@cygnus.com>
-
- * config/arm/tm-arm.h: (EXTRACT_STRUCT_VALUE_ADDRESS): This needs
- to call extract_address, not just cast the first 4 bytes, since
- the result will be passed to value_at which expects host-byte
- order.
-
- * arm-tdep.c (arm_scan_prologue): The prologue_start address was
- directly &'ed with 0x03fffffc, rather than using
- ADDR_BITS_REMOVE. This would cause inferior function calls to
- report the stack incorrectly on return.
-
-
-1999-04-02 Keith Seitz <keiths@cygnus.com>
-
- * top.c (ui_loop_hook): Change declaration. Now returns an int.
- * win32-nat.c (child_wait): Timeout WaitForDebugEvent and call
- the ui_loop_hook if there was no debug event.
- * top.c (ui_loop_hook): Change to return an int and include
- on all non-Cygwin builds.
- * v850ice.c: Change prototype of ui_loop_hook.
- (v850ice_wait): Update call to ui_loop_hook.
- * ser-unix.c (hardwire_readchar): Enable ui_loop_hook callbacks
- for non-Cygwin builds. Check return status of ui_loop_hook and
- return a timeout if told to detach. Add more documentation.
- * ser-tcp.c (tcp_readchar): Break up timeouts into one second
- intervals and call ui_loop_hook so that other UIs can
- keep up to date. If ui_loop_hook returns non-zero, then
- return SERIAL_TIMEOUT to facilitate detaching from the
- target.
- * remote.c (remote_interrupted_already): Remove.
- (remote_interrupt_twice): Revive.
- (remote_interrupt): Call remote_stop to interrupt the target
- and install remote_interrupt_twice to take more severe
- actions if this fails.
- (remote_stop): Only attempt to stop the target. This separates
- the command line from other UIs.
- * remote-sim.c (gdb_os_poll_quit): Add a call to ui_loop_hook,
- if it is defined.
-
-1999-04-01 Jim Blandy <jimb@zwingli.cygnus.com>
-
- Fix for cross-debugging on an AIX host from Johanna Svenningsson:
- * ax-gdb.h (enum axs_lvalue_kind): Remove trailing comma from enum.
- * ax.h (enum agent_op): Same.
- * tracepoint.h (enum actionline_type): Same.
- * config/xm-aix4.h: Add declaration for termdef.
-
-1999-03-31 Stan Shebs <shebs@andros.cygnus.com>
-
- * jv-lang.h (dynamics_objfile): Remove decl, conflicts with static
- decl in jv-lang.c.
-
- * infrun.c (follow_inferior_fork): Add ifdefs around
- SOLIB_REMOVE_INFERIOR_HOOK.
-
-Wed Mar 31 11:39:49 1999 David Taylor <taylor@ryobi.cygnus.com>
-
- * valops.c (search_struct_field): revert HP merge change
- to this function -- it causes messages to be printed about
- member class ambiguity when the compiler is happy.
- (search_struct_field_aux): delete -- added as part of HP merge
- change; with aforementioned change it is no longer called.
-
-1999-03-30 Stan Shebs <shebs@andros.cygnus.com>
-
- Make more HPUX-specific code generic.
- * infrun.c: Include top.h.
- (MAY_SWITCH_FROM_INFERIOR_PID, MAY_FOLLOW_EXEC,
- USE_THREAD_STEP_NEEDED): New native macros.
- (may_switch_from_inferior_pid, may_follow_exec,
- use_thread_step_needed): New globals.
- (follow_inferior_fork): Remove HPUXHPPA ifdef.
- (follow_exec): Ditto, also save run target and re-push instead of
- always pushing child_ops, add ifdefs around SOLIB_RESTART and
- SOLIB_CREATE_INFERIOR_HOOK.
- (wait_for_inferior): Use new globals instead of ifdefing HPUXHPPA,
- always use printf_filtered to report new threads.
- (normal_stop): Ditto.
- * target.h, target.c (find_run_target): New function.
- * config/pa/nm-hppah.h: Define new macros.
-
-1999-03-29 Stan Shebs <shebs@andros.cygnus.com>
-
- * top.h: Include setjmp.h here.
- * main.c, top.c: Don't include it here.
-
-1999-03-29 Keith Seitz <keiths@cygnus.com>
-
- * symtab.c (decode_line_1): Take out change which breaks symbols
- which include class names and methods, e.g., "Foo::bar".
-
-1999-03-26 Stan Shebs <shebs@andros.cygnus.com>
-
- * configure.tgt (i[3456]86-*-sysv4.2MP, i[3456]86-*-sysv4.2uw2*):
- Recognize both, as i[3456]86-*-sysv4.2*.
- (i[3456]86-*-sysv5*): Recognize.
-
- * infrun.c (wait_for_inferior): Remove most #if 0 segments.
-
-Fri Mar 26 17:27:27 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * blockframe.c (pc_in_call_dummy_on_stack): Fix. Had copied code
- from at_entry_point.
-
-Thu Mar 25 19:30:02 1999 Andrew Cagney <cagney@amy.cygnus.com>
-
- * gdbarch.c: Include all headers.
- (struct gdbarch), gdbarch.h (CALL_DUMMY_LOCATION,
- CALL_DUMMY_ADDRESS, CALL_DUMMY_START_OFFSET,
- CALL_DUMMY_BREAKPOINT_OFFSET, CALL_DUMMY_LENGTH,
- PC_IN_CALL_DUMMY): Add ``call_dummy_location'',
- ``call_dummy_length'', ``pc_in_call_dummy'',
- ``call_dummy_start_offset'', ``call_dummy_breakpoint_offset'' to
- multi-arch framework.
-
- * inferior.h, blockframe.c (pc_in_call_dummy_before_text_end,
- pc_in_call_dummy_after_text_end, pc_in_call_dummy_on_stack,
- pc_in_call_dummy_at_entry_point): Convert PC_IN_CALL_DUMMY macro's
- into functions.
-
- * mips-tdep.c (mips_gdbarch_init): Initialize above
-
-Tue Mar 23 17:22:57 1999 Philippe De Muyter <phdm@macqel.be>
-
- * remote.c, parse.c: Include ctype.h.
-
-1999-03-24 Stan Shebs <shebs@andros.cygnus.com>
-
- * configure.host (mips-dec-mach3*): Use mipsm3 not mach3.
-
- Attempt to sort out SCO-related configs.
- * configure.host (i[3456]86-*-sysv4.2*): Use instead of
- i[3456]86-*-sysv4.2MP and i[3456]86-*-sysv4.2uw2*.
- (i[3456]86-*-sysv5*): Recognize.
- * configure.tgt (i[3456]86-*-sco3.2v5*, i[3456]86-*-sco3.2v4*):
- Recognize.
-
-Wed Mar 24 16:19:01 1999 Christopher Faylor <cgf@cygnus.com>
-
- * MAINTAINERS: Add DJ Delorie (dj@cygnus.com) as the djgpp
- maintainer.
-
-Wed Mar 24 21:19:57 1999 Andrew Cagney <cagney@amy.cygnus.com>
-
- * target.h (enum target_signal): Do not hardwire values of MACH
- signals.
-
-1999-03-14 Ken Raeburn <raeburn@raeburn.org>
-
- * target.h (enum target_signal): Add TARGET_SIGNAL_INFO.
- * target.c (signals): Add SIGINFO description.
- (target_signal_from_host, target_signal_to_host): Translate
- SIGINFO to/from TARGET_SIGNAL_INFO.
-
-Wed Mar 24 01:01:27 1999 Andrew Cagney <cagney@sludge.cygnus.com>
-
- * rs6000-tdep.c (rs6000_software_single_step): Change SIGNAL to
- unsigned int.
-
- From Rodney Brown <rodneybrown@pmsc.com>
- * target.h (enum thread_control_capabilities), breakpoint.h (enum
- bptype), breakpoint.c (enum insertion_state_t): Strict ISO-C
- doesn't allow trailing comma in enum definition.
-
-Mon Mar 22 15:56:04 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * blockframe.c (inside_entry_file, inside_entry_func): Convert #if
- CALL_DUMMY_LOCATION to if.
- * valops.c (call_function_by_hand): Ditto.
- * infcmd.c (run_stack_dummy): Ditto.
- * inferior.h (CALL_DUMMY_ADDRESS, CALL_DUMMY_START_OFFSET,
- CALL_DUMMY_BREAKPOINT_OFFSET): Provide default.
-
-1999-03-23 Jason Molenda (jsm@bugshack.cygnus.com)
-
- * hppa-tdep.c (pa_register_look_aside): Remove CPU_HPPA_RISC_20
- check, test for presence of struct save_state_t and the ss_wide
- member directly.
- * configure.in: Remove CPU_HPPA_RISC_20 test. Add tests for
- HAVE_STRUCT_SAVE_STATE_T and HAVE_STRUCT_MEMBER_SS_WIDE.
- * acconfig.h: Add HAVE_STRUCT_SAVE_STATE_T HAVE_STRUCT_MEMBER_SS_WIDE.
- * configure, config.in: Regenerated.
-
-Mon Mar 22 13:25:13 1999 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * infttrace.c (proc_wait): rename to ptrace_wait.
-
-1999-03-18 Jim Blandy <jimb@zwingli.cygnus.com>
-
- * dwarf2read.c: Correctly recognize location expressions that
- designate LOC_REF_ARG arguments. Doc fixes.
- (isderef): New global. (Yuck.)
- (dwarf2_complex_location_expr): New complaint.
- (read_func_scope): Reject frame_base attributes that use the
- `deref' opcode as too complex.
- (new_symbol): If both regoff and isderef are set, and the base
- register is the frame pointer, then it's a LOC_REF_ARG argument.
- (decode_locdesc): Recognize the `deref' opcode in location
- expressions. Complain if it's not the last op in the expression.
-
- * config/fr30/tm-fr30.h (COERCE_FLOAT_TO_DOUBLE): #define this to
- be true, or else value_arg_coere won't respect the (accurate)
- information we have about whether a function is prototyped.
-
-1999-03-17 Jim Blandy <jimb@zwingli.cygnus.com>
-
- * config/fr30/tm-fr30.h (STACK_ALIGN): Define this here, so
- calling functions by hand with odd-sized arguments doesn't munge
- the stack.
-
-1999-03-17 Jason Molenda (jsm@bugshack.cygnus.com)
-
- * configure.in (HAVE_MULTIPLE_PROC_FDS): Don't define for Solaris
- hosts--gdb doesn't support this yet.
- * configure: Regenerated.
-
-1999-03-16 Keith Seitz <keiths@cygnus.com>
-
- * remote.c (remote_binary_checked): New file global.
- (check_binary_download): New function to check if
- stub supports binary downloading that works with
- stubs that are not eight bit clean.
- (remote_write_bytes): Check for binary download capability
- and use it if available.
- Remove references to global remote_binary_length. What a hack.
- (putpkt_binary): New function.
- (putpkt): Call putpkt_binary.
- Use xor to escape trouble characters.
- * m32r-stub.c (bin2mem): Follow escape char convention change.
-
-Tue Mar 16 01:11:33 1999 Andrew Cagney <cagney@rhino.cygnus.com>
-
- * target.h (struct target_ops), target.c (debug_to_query),
- remote.c (pack_hex_byte, remote_query): Promote char parameters to
- int. Stops compile problems with pedantic ISO-C compilers.
-
-Tue Mar 16 15:29:04 1999 Stan Shebs <shebs@andros.cygnus.com>
-
- * go32-xdep.c: Remove, no longer used by anything.
- * Makefile.in: Remove references.
-
- * jv-lang.c, jv-lang.h (java_primitive_type): Declare argument
- as int instead of char.
-
-Mon Mar 15 11:42:43 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * d10v-tdep.c (push_stack_item, pop_stack_item): New function.
- (d10v_push_arguments): Use.
-
- From Martin M. Hunt <hunt@cygnus.com>:
- * d10v-tdep.c (d10v_push_arguments): When arguments
- must be pushed onto the stack, they go on in
- reverse order.
-
-1999-03-16 Jim Blandy <jimb@zwingli.cygnus.com>
-
- * symtab.c (make_symbol_overload_list): Don't try to stuff minimal
- or partial symbols into the overload list; we don't know their
- types. (Thanks to Rajiv Mirani.)
-
-1999-03-15 Jason Molenda (jsm@bugshack.cygnus.com)
-
- * acinclude.m4 (--with-itclconfig, --with-itkconfig, --with-tixconfig):
- Fix whitespace so --help messages line up.
- * configure.in (--with-cpu): Fix capitalization for --help messages.
- * configure, aclocal.m4: Regenerated.
-
-Mon Mar 15 11:39:03 1999 Ian Carmichael <iancarm@cygnus.com>
-
- Support building gdb w/o simulator:
- * configure.in: Support --disable-sim. Check for sim directory.
- * Makefile.in (IGNORE_SIM, IGNORE_SIM_OBS): New.
- * acconfig.h (WITH_SIM): Define.
- * configure, config.in: Regenerate.
-
-Mon Mar 15 08:01:33 1999 Elena Zannoni <ezannoni@cygnus.com>
-
- Patch from Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
-
- * top.c (read_command_lines): Reset control_level to 0.
- (define_command): Don't do it here.
-
-Sun Mar 14 16:12:15 1999 Andrew Cagney <cagney@rhino.cygnus.com>
-
- * hppah-nat.c (store_inferior_registers): Delete extern
- registers[] declaration.
-
-Sun Mar 14 19:17:30 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * infrun.c (write_inferior_status_register): New function. Provide
- update access to an inf_status register buffer. Only used by HP.
- * inferior.h (write_inferior_status_register): Add prototype.
-
- * hppa-tdep.c (push_dummy_frame): Use
- write_inferior_status_register when hacking around a sleeping
- inferior. Accidently fix byte-order problem.
-
-Sun Mar 14 16:40:10 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * config/pa/tm-hppa.h (PUSH_DUMMY_FRAME): Fix parameter. Address
- not needed.
-
-Fri Mar 12 13:11:48 1999 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * remote.c (remote_write_bytes): fix 'X' packet protocol so that it
- can't overwrite the end of its buffer with escaped characters.
-
-1999-03-12 Jim Blandy <jimb@zwingli.cygnus.com>
-
- Alpha patches from Richard Henderson:
-
- * alpha-tdep.c (alpha_skip_prologue): Recognize subq.
-
- * config/alpha/tm-alpha.h (REGISTER_NAMES): No f31, but fpcr.
- (FPCR_REGNUM): New.
- (REGISTER_CONVERTIBLE): Don't convert fpcr.
- (REGISTER_VIRTUAL_TYPE): Don't make fpcr a double.
-
- * stabsread.c (define_symbol): Only consider live range extension
- if we have an open parenthesis.
-
-1999-03-11 Jim Blandy <jimb@zwingli.cygnus.com>
-
- * monitor.c (monitor_fetch_register): Print RDEBUG info correctly
- when the register name is null.
-
-Thu Mar 11 19:33:07 1999 Stan Shebs <shebs@andros.cygnus.com>
-
- * infrun.c (wait_for_inferior): Change #if DECR_PC_AFTER_BREAK
- uses to expressions, remove redundant extern decls.
-
-Thu Mar 11 18:05:11 1999 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * infptrace.c (proc_wait): Rename to ptrace_wait.
- * inftarg.c (child_wait): call ptrace_wait instead of proc_wait.
- * inferior.h: Declare ptrace_wait instead of proc_wait.
-
-Thu Mar 11 11:46:25 1999 Andrew Cagney <cagney@amy.cygnus.com>
-
- * breakpoint.c (create_solib_load_unload_event_breakpoint,
- create_fork_vfork_event_catchpoint, tcatch_command,
- create_exception_catchpoint, break_at_finish_at_depth_command_1,
- catch_fork_command_1, ep_skip_leading_whitespace,
- break_at_finish_command_1, catch_exec_command_1,
- catch_exception_command_1, stop_command, stopin_command,
- stopat_command, ep_parse_optional_filename,
- ep_find_event_name_end, ep_parse_optional_if_clause,
- catch_fork_command_1), stack.c (show_and_print_stack_frame_stub,
- print_stack_frame_stub, print_only_stack_frame_stub,
- backtrace_command_1, backtrace_full_command, func_command),
- valprint.c (print_decimal), source.c (print_source_lines_base):
- Add prototype.
-
- * stack.c (print_stack_frame_stub, show_and_print_stack_frame_stub,
- print_only_stack_frame_stub): Make param void*.
-
-Wed Mar 10 19:33:28 1999 Geoffrey Noer <noer@cygnus.com>
-
- * win32-nat.c: If old Cygwin Win32 API headers aren't being used,
- define some gdb-specific defines that shouldn't have been in the
- global headers.
-
-Wed Mar 10 21:20:25 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * findvar.c (registers, register_valid): Replace array with pointer.
- (build_findvar): New function. Allocate space for REGISTERS and
- REGISTER_VALID.
- (_initialize_findvar): Call build_findvar.
- (_initialize_findvar): Register REGISTERS and REGISTER_VALID as
- arch dependant.
-
- * inferior.h (registers, register_valid): Replace array with
- pointer.
-
- * inferior.h (struct inferior_status): Move definition from here.
-
- * infrun.c (struct inferior_status): To here.
- (struct inferior_status): Change ``stop_registers'' and
- ``registers'' to pointers.
- (xmalloc_inferior_status, free_inferior_status): New functions.
- (restore_inferior_status): Call free_inferior_status.
- (save_inferior_status): Call xmalloc_inferior_status.
- (discard_inferior_status): New function, discard inf_status
- buffer. Call free_inferior_status.
-
- * inferior.h (stop_registers): Replace array with pointer.
- * infrun.c (stop_registers): Update.
- (build_infrun): Initialize stop_registers.
- (_initialize_infrun): Call build_infrun.
- (_initialize_infrun): Register ``stop_registers'' as arch dependant.
-
-Wed Mar 10 14:50:42 1999 Andrew Cagney <cagney@amy.cygnus.com>
-
- * alpha-tdep.c (alpha_linux_sigtramp_offset): Only compile when
- LINUXALPHA target. Hack.
-
- * infrun.c (set_follow_fork_mode_command): Make static. Add
- prototype.
- * tracepoint.c (add_register): Ditto.
- * valprint.c (strcat_longest): Comment out. Does not appear to be
- used.
- * valops.c (find_method_list): Make static. Add prototype.
- * thread.c (target_find_new_threads): Make static. Add prototype.
- * stack.c (stack_publish_stopped_with_no_frame,
- select_and_maybe_print_frame): Comment out. Does not appear to be
- used.
- (current_frame_command): Add prototype.
- * breakpoint.c (break_at_finish_command,
- break_at_finish_at_depth_command, tbreak_at_finish_command): Make
- static. Add prototype.
- * findvar.c (read_relative_register_raw_bytes_for_frame): Ditto.
-
-Wed Mar 10 23:38:54 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * corefile.c (registers): Delete redundant variable declaration.
- * inferior.h (run_stack_dummy): Change array argument to pointer.
- * infcmd.c (run_stack_dummy): Update.
- * value.h (value_being_returned): Change RETBUF to a pointer.
- * values.c (value_being_returned): Update.
-
-Wed Mar 10 11:08:16 1999 Andrew Cagney <cagney@amy.cygnus.com>
-
- * source.c (list_command): GCC suggested explicit braces to avoid
- ambiguous `else'.
-
- * jv-typeprint.c: Include "c-lang.h".
- * Makefile.in (jv-typeprint.o): Add dependency.
- * jv-valprint.c: Include "gdbcore.h", "annotate.h".
- * Makefile.in (jv-valprint.o): Add dependencies.
- * objfiles.c: Include "breakpoint.h".
- * Makefile.in (objfiles.o): Add dependency.
- * main.c: Include <unistd.h>.
- * parse.c: Include <ctype.h>.
- * remote.c: Include <ctype.h>.
- * ser-tcp.c: Include <unistd.h>.
- * ax-general.c: Include "value.h".
- * Makefile.in (ax-general.o): Add dependency.
-
- * alpha-tdep.c (alpha_push_arguments): Make ``i'' an int instead
- of a register.
- * frame.h (show_and_print_stack_frame): Add function prototype.
- * language.h (language_enum): Add function prototype.
- * value.h (find_overload_match): Add function prototype.
-
- * defs.h, utils.c (subset_compare): Rename subsetCompare. Add
- prototype.
- * stack.c (backtrace_command): Update.
-
-Wed Mar 10 13:58:36 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * configure.in (AC_CHECK_HEADERS): Check for <sys/select.h>
- * configure, config.in: Re-generate.
- * inflow.c: Conditionally include <sys/select.h>.
-
-Wed Mar 10 13:44:38 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * frame.h (struct dummy_frame): Move from here.
- * blockframe.c (struct dummy_frame): To here.
-
- * blockframe.c (struct dummy_frame): Replace ``regs'' with pointer
- ``registers''.
- (generic_pop_dummy_frame): Free it.
- (generic_push_dummy_frame): Allocate dummy frame register buffer.
-
-Wed Mar 10 11:08:16 1999 Andrew Cagney <cagney@amy.cygnus.com>
-
- * thread.c (_initialize_thread): Delete redundant ``extern struct
- cmd_list_element *cmdlist''.
- * printcmd.c (print_command_1): Ditto for ``objectprint'';
-
-1999-03-09 Stan Shebs <shebs@andros.cygnus.com>
-
- * MAINTAINERS: New file, list of maintainers and areas they
- maintain.
-
-1999-03-09 Rodney Brown <RodneyBrown@pmsc.com>
-
- Get working on UnixWare 2.1.1.
- * acconfig.h: Update for defines for procfs.c.
- * configure.in: Identify defines for procfs.c.
- * configure.host: i386-*-sysv4.2uw2* => i386v42mp
- * configure.tgt: i386-*-sysv4.2uw2* => i386v42mp
- * configure, config.in: Regenerate.
- * procfs.c: Rename HAVE_NO_PRRUN_T to HAVE_PRRUN_T (autoconf
- standard), wrap UNIXWARE difference in THE_PR_LWP macro for
- legibility.
- * config/i386/tm-i386v42mp.h: Remove HAVE_PSTATUS_T,
- HAVE_NO_PRRUN_T; now set by configure.
-
-Tue Mar 9 16:29:24 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * i386-tdep.c (gdb_print_insn_i386): Abort when disassembly_flavor
- undefined..
-
- * fr30-tdep.c (_initialize_fr30_tdep): Add prototype. Fix
- coding style.
-
- * target.c (debug_to_enable_exception_callback,
- debug_to_get_current_exception_event): Return result of call to
- debug_target().
-
-1999-03-09 Jim Blandy <jimb@zwingli.cygnus.com>
-
- Another HURD fix from Mark Kettenis:
- * gnu-nat.c: Include <string.h>. Remove declaration of strerror.
- Include <bits/waitflags.h> instead of <waitflags.h> and define
- _SYS_WAIT_H to prevent the warning that we should not include it.
- (gnu_create_inferior): Change return type of attach_to_child to
- void. Do not return INFERIOR_PID.
- (gnu_pid_to_exec_file): Change return type to char *.
- Return NULL.
-
- Fix for the HURD from Mark Kettenis:
- * configure.in: Add AC_PROG_AWK. Needed by the machine-dependent
- makefile fragments for the Hurd.
- * Makefile.in (AWK): Add. Set by configure.
- * configure: Regenerated.
-
-1999-03-08 Jason Molenda (jsm@bugshack.cygnus.com)
-
- * infttrace.c (hppa_get_process_events): Removed. Function only
- usable on HPUX 10 and above. It is not called by any other part
- of GDB.
- * hppah-nat.c (hppa_get_process_events): Ditto.
- (child_pid_to_exec_file): Only call ptrace with
- PT_GET_PROCESS_PATHNAME if that symbol has been defined.
- * config/pa/nm-hppah.h: Don't set up prototypes et al for
- hppa_get_process_events.
-
- * config/pa/hppahpux.mh (TERM_LIB): Do not initialize, let autoconf
- determine best library automatically.
- * config/pa/hpux1020.mh: Ditto.
- * config/pa/hpux1100.mh: Ditto.
- * configure.in (TERM_LIB): Also check for libHcurses.
- * configure: Regenerated.
-
-Thu Mar 4 17:16:04 1999 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * m32r-stub.c: add support for crc "Compare" command.
-
-1999-03-04 Jim Blandy <jimb@zwingli.cygnus.com>
-
- * fr30-tdep.c (fr30_store_return_value): Allocate zeroes
- dynamically, to save BSS space, and to remove assumptions about
- the size of the largest value we'll return.
-
- * config/fr30/tm-fr30.h (fr30_store_return_value): Use PARAMS in
- prototype.
-
-Thu Mar 4 08:37:35 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * sh3-rom.c (sh3_supply_register, sh3_supply_register),
- mips-tdep.c (mips_push_arguments), m32r-rom.c
- (m32r_upload_command), m32r-tdep.c (decode_prologue), monitor.c
- (longlong_hexchars), tracepoint.c (validate_actionline,
- read_actions), mdebugread.c
- (parse_symbol), jv-typeprint.c
- (java_type_print_base, java_type_print_base), mdebugread.c
- (parse_symbol), top.c (source_command), utils.c
- (floatformat_to_doublest): GCC suggest explicit braces to avoid
- ambiguous `else'.
-
- * tracepoint.c (map_args_over_tracepoints, trace_actions_command),
- m32r-rom.c (m32r_supply_register), win32-nat.c
- (handle_output_debug_string, child_continue), i960-tdep.c
- (pop_frame), m32r-rom.c (m32r_upload_command): GCC suggested
- parentheses around assignment used as truth value.
-
- * remote-sds.c (sds_wait), monitor.c (monitor_fetch_register),
- ser-e7kpc.c, (dosasync_write), arc-tdep.c (arc_get_frame_setup):
- GCC suggested parentheses around operands.
-
- * c-typeprint.c (c_type_print_base): GCC suggested enclosing
- "while" expression in paren.
-
-Wed Mar 3 18:14:33 1999 Andrew Cagney <cagney@chook.cygnus.com>
-
- * sol-thread.c (save_inferior_pid): Cast the saved pid to void*.
- (restore_inferior_pid): Takes void* as required by make_cleanup.
- Casts pid back to an int.
-
- * procfs.c (make_cleanup_close_proc_file,
- close_proc_file_cleanup): Create a proc_file cleanup.
- (info_proc): Use.
-
- * defs.h (make_cleanup_freeargv): Helper function. Establish
- cleanup using freeargv. Can not just typecast/pass freeargv as it
- violates ISO-C.
- * utils.c (do_freeargv): Helper.
- (make_cleanup_freeargv): New function.
-
- * symmisc.c (maintenance_print_symbols,
- maintenance_print_psymbols, maintenance_print_msymbols), symfile.c
- (symbol_file_command), stack.c (backtrace_command), remote-sim.c
- (gdbsim_create_inferior, gdbsim_open), remote-mips.c
- (common_open), procfs.c (info_proc), infrun.c (handle_command,
- xdb_handle_command), exec.c (exec_file_attach): Call
- make_cleanup_freeargv.
-
-1999-03-03 James Ingham <jingham@cygnus.com>
-
- * i386-tdep.c (_initialize_i386_tdep): Set the inital value for
- disassembly flavor at startup, rather than hardcoding it.
-
-1999-03-03 Jim Blandy <jimb@zwingli.cygnus.com>
-
- Put return values in the right place.
- * fr30-tdep.c (fr30_store_return_value): New function.
- * config/fr30/tm-fr30.h (STORE_RETURN_VALUE): Call
- fr30_store_return_value.
-
-Wed Mar 3 18:10:55 1999 Andrew Cagney <cagney@chook.cygnus.com>
-
- * gdbtypes.c (virtual_base_list_aux): Return void. Add prototype.
-
- * breakpoint.c (map_catch_names): Comment out unused function.
-
-1999-03-02 Jason Molenda (jsm@bugshack.cygnus.com)
-
- * hppa-tdep.c (pa_register_look_aside): Only refer to save_state_t
- structure on PA 2.0 systems.
-
-1999-03-02 Stan Shebs <shebs@andros.cygnus.com>
-
- From Gary Thomas <gthomas@cygnus.co.uk>:
- * arm-tdep.c (ARM_LE_BREAKPOINT, ARM_BE_BREAKPOINT,
- THUMB_LE_BREAKPOINT, THUMB_BE_BREAKPOINT): Use illegal instruction
- instead of SWI 24.
- * config/arm/tm-arm.h (CALL_DUMMY): Ditto.
- (IN_SIGTRAMP): Define.
-
-1999-03-02 Nick Clifton <nickc@cygnus.com>
-
- * findvar.c (store_address): Delete incorrect big endian
- code.
-
-Tue Mar 2 18:02:42 1999 Andrew Cagney <cagney@chook>
-
- * configure.in (gdb_cv_os_cygwin): Compat. Continue to reconize
- __CYGWIN32__.
-
-1999-03-01 Jason Molenda (jsm@bugshack.cygnus.com)
-
- * configure.in: Move setting of gdb_cv_os_cygwin to before
- setting of TERM_LIB. Check for __CYGWIN__ instead of __CYGWIN32__.
- * configure: Regenerated.
-
-1999-03-01 DJ Delorie <dj@cygnus.com>
-
- * configure.in: Change -cygwin32* to -cygwin*.
- * configure: Ditto.
-
-1999-02-25 Stan Shebs <shebs@andros.cygnus.com>
-
- * breakpoint.c (SOLIB_LOADED_LIBRARY_PATHNAME,
- SOLIB_UNLOADED_LIBRARY_PATHNAME, SOLIB_CREATE_CATCH_LOAD_HOOK,
- SOLIB_CREATE_CATCH_UNLOAD_HOOK): Supply default definitions.
- * infrun.c (SOLIB_IN_DYNAMIC_LINKER): Ditto.
-
-1999-02-25 Keith Seitz <keiths@cygnus.com>
-
- * corelow.c (core_close): Clear out solib state before
- closing the bfd associated with the core file.
- * solib.c (clear_solib): Mention that clear_solib requires
- an open BFD in order for disable_breakpoints_in_shlibs to
- determine whether breakpoints live in shared libraries.
-
-1999-02-24 Jason Molenda (jsm@bugshack.cygnus.com)
-
- * configure.in: Set CPU_HPPA_RISC_20 if the host CPU is a PA 2.0
- processor.
- * acconfig.h: Add CPU_HPPA_RISC_20
- * config.in, configure: Regenerated.
- * hppa-tdep.c (pa_register_look_aside): Only refer to new
- structure elements if we are on a PA2.0 system.
- * defs.h: Include limits.h.
-
-Tue Feb 23 14:37:08 1999 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * infrun.c (wait_for_inferior): Check scheduler_locking state
- before resuming after a thread-specific breakpoint.
-
-1999-02-23 Jim Blandy <jimb@zwingli.cygnus.com>
-
- * aclocal.m4, config.in, configure: Regenerated with latest
- autotools.
-
-Mon Feb 22 12:32:19 1999 Per Bothner <bothner@cygnus.com>
-
- * jv-valprint.c (java_val_print): Restore line that somehow got lost.
-
- * jv-valprint.c (java_print_value_fields): Check for NULL type.
-
-1999-02-21 Jim Blandy <jimb@zwingli.cygnus.com>
-
- * tm-h8500.h, i386lynx-nat.c: Removed. These files are long
- dead; it seems that they only appeared due to some CVS weirdness.
- If they appear again, we may need to distribute garlic and holy
- water.
-
-1999-02-19 Jason Molenda (jsm@bugshack.cygnus.com)
-
- * configure.in (TERM_LIB): Move checking for TERM_LIB, substituting.
- * configure: Regenerated.
-
-1999-02-19 Robert Hoehne (robert.hoehne@gmx.net)
-
- * configure.host (i[3456]86-*-msdosdjgpp*): New host.
- * configure.tgt (i[3456]86-*-msdosdjgpp*): New target.
- * go32-nat.c: New file, native DJGPP support.
- * config/i386/go32.mh: Rewrite for DJGPP (go32) host.
- * config/i386/go32.mt: New file, DJGPP (go32) target.
- * config/i386/nm-go32.h: New file.
- * config/i386/tm-go32.h: New file.
- * config/i386/xm-go32.h: Rewritten for current DJGPP.
-
-1999-02-18 Jason Molenda (jsm@bugshack.cygnus.com)
-
- * reply_mig_hack.awk, config/nm-gnu.h, config/alpha/nm-linux.h
- config/alpha/xm-alphalinux.h, config/alpha/xm-alphaosf.h
- config/i386/nm-i386sco5.h, config/i386/tm-fbsd.h, config/i386/tm-i386.h
- config/powerpc/nm-aix.h, config/powerpc/tm-macos.h
- config/powerpc/tm-ppc-aix.h, config/powerpc/xm-aix.h
- config/rs6000/tm-rs6000-aix4.h, testsuite/gdb.chill/tests1.ch
- testsuite/gdb.chill/tests2.ch, testsuite/gdb.chill/tests2.exp:
- Update FSF address in copyright notices.
-
-1999-02-18 Jason Molenda (jsm@bugshack.cygnus.com)
-
- * configure.in: Quote "$GCC" correctly.
- * configure: Regenerated.
-
-1999-02-18 Jim Blandy <jimb@zwingli.cygnus.com>
-
- * dbxread.c (elfstab_build_psymtabs): Don't assume that there's a
- section named ".text", which has all the code in it. Instead, look
- at all the sections in the file with the `code' flag set.
- (find_text_range): New function, that does all the work.
-
-Thu Feb 18 17:50:45 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * mips-tdep.c (FP_REGISTER_DOUBLE): Conditionally define.
-
-Fri Jan 29 16:51:11 1999 Andrew Cagney <cagney@chook.cygnus.com>
-
- * mips-tdep.c (return_value_location): New function. Merge/rewrite
- of return-value code in mips_extract_return_value,
- mips_store_return_value. Stop buffer overflow when 64 bit value
- in 32 bit registers. Extract 64bit float from 32 bit register
- pair of correct order.
- (mips_extract_return_value, mips_store_return_value): Call
- return_value_location. For store, ensure that remainder of
- register is zero.
-
-Thu Jan 28 18:58:02 1999 Andrew Cagney <cagney@chook.cygnus.com>
-
- From John Metzler <jmetzler@cygnus.com>:
- * mips-tdep.c (struct gdbarch_tdep): Add mips_saved_regsize.
- (MIPS_SAVED_REGSIZE): Define.
- (mips_find_saved_regs, read_next_frame_reg, mips_pop_frame):
- Read/write MIPS_SAVED_REGSIZE bytes of register on stack instead
- of MIPS_REGSIZE.
- (mips_gdbarch_init): Initialize mips_saved_regsize.
-
- * mips-tdep.c (mips_frame_saved_pc, mips16_heuristic_proc_desc,
- mips_push_arguments, mips_push_dummy_frame,
- mips_use_struct_convention): Ditto. For MIPS_SAVED_REGSIZE <
- REGISTER_RAW_SIZE, handle little/big endian issues from only using
- half the register.
- (STACK_ARGSIZE): Default to MIPS_SAVED_REGSIZE instead of
- MIPS_REGSIZE.
-
- * mips-tdep.c (struct gdbarch_tdep, FP_REGISTER_DOUBLE,
- mips_gdbarch_init): Apply similar changes. Add
- mips_fp_register_double to struct.
-
-Wed Feb 17 10:10:27 1999 Stu Grossman <grossman@babylon-5.cygnus.com>
-
- * gdbtypes.h (get_discrete_bounds): Remove duplicate decl.
-
- * jv-typeprint.c (java_type_print_base): Change fputs => fputs_filtered.
-
-Mon Jan 25 18:30:57 1999 Per Bothner <bothner@cygnus.com>
-
- * jv-lang.h (JAVA_OBJECT_SIZE): Change from hard-wired constant.
- (java_primitive_type_from_name, get_java_object_header_size): Declare.
- * jv-lang.c (java_class_from_object): Use get_java_object_type.
- * jv-lang.c: Update Class field names: dtable->vtable,
- msize->method_count, nfields->field_count, bfsize->size_in_bytes,
- nmethods->method_count.
- (type_from_class): Demangle array type names.
- (java_link_class_type): Array type names are now demangled.
- (get_java_object_type): If not defined yet, try looking it up.
- (get_java_object_header_size): New function.
- (java_primitive_type_from_name): New function.
- (java_demangled_signature_length, java_demangled_signature_copy): New.
- (java_demangle_type_signature): Re-implement using above functions.
- (evaluate_subexp_java): For UNOP_IND, call evaluate_subexp_java
- to evaluate subexp (not evaluate_subexp_standard).
- For BINOP_SUBSCRIPT update for new array type naming scheme.
- * jv-valprint.c (java_value_print): Use java_class_from_object.
- Update array printing to new array type naming convention.
- (java_val_print): Doing check_typedef when printing a pointer is
- is a waste of effort. Also, handle TYPE_CODE_INT, to make sure
- Java bytes as not printed as C chars.
-
-Fri Jan 8 16:58:22 1999 Stu Grossman <grossman@babylon-5.cygnus.com>
-
- * blockframe.c (find_pc_sect_partial_function): Search full symtabs as
- a last ditch effort (after the partial & minimal symtabs).
- * defs.h utils.c: Fixup prototypes for vprintf_filtered,
- vfprintf_filtered, vfprintf_unfiltered and vprintf_unfiltered to return
- ints to match their standard equivalents.
- * defs.h symtab.c top.c: Create skip_prologue_hook to allow Java to
- control the prologue skipping process.
- * jv-typeprint.c (java_type_print_base): Remove extern for
- jv_class_demangle, add new arg for objfile (NULL).
- * symtab.h: Remove struct sourcevector and struct source. Definately
- not needed.
- * values.c (value_virtual_fn_field): Fixes code to handle new vtable
- debug info format. Patch from marka.
-
-Wed Dec 16 23:11:25 1998 Stu Grossman <grossman@fencer.cygnus.com>
-
- * jv-lang.c (java_class_from_object java_class_is_primitive
- is_object_type): Change dtable to vtable.
- * (java_primitive_type): Change arg to type char.
- * (_initialize_java_language): Make java_char_type be unsigned.
- * jv-lang.h: Fixup prototypes.
-
-Mon Dec 7 19:02:15 1998 Stu Grossman <grossman@babylon-5.cygnus.com>
-
- * jv-valprint.c (java_value_print): Fix printing of values where
- run time type != compile time type.
-
-Fri Dec 4 15:23:38 1998 Stu Grossman <grossman@fencer.cygnus.com>
-
- * Makefile.in: Whack out m2-typeprint.c.
- * c-typeprint.c (c_type_print_varspec_suffix) typeprint.h: Make this
- global. It's needed by Java.
- * (c_type_print_base): Whack prefix off of qualified method names
- (names with name spaces).
- * gdbtypes.h (struct cplus_struct_type): Add bits for Java attributes.
- Shrink voffset
- to 16 bits to compensate for added bits above (hopefully this is still
- enough).
- * Add new accessor macros (TYPE_FND_FIELD_PUBLIC, ...) for all new
- attribute bits.
- * jv-typeprint.c (java_type_print_base): Fix printing of method
- attributes. Handle JVM style manglings.
- * (java_print_type): Enable code type print varspec_suffix to allow
- array indices to print out.
- * jv-valprint.c (java_val_print): Minor formatting.
- * m2-lang.c (m2_language_d): Change m2_print_type to c_print_type.
- * stabsread.c (read_member_functions): Save public and static attributes.
-
-Wed Feb 17 15:32:57 1999 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * breakpoint.c (watch_command_1): Reformat comment.
-
- * c-typeprint.c (c_type_print_base): Reformat comments.
-
-1999-02-17 Jim Blandy <jimb@zwingli.cygnus.com>
-
- * Makefile.in (VERSION): Bump version to 4.17.2.
-
-Tue Feb 16 15:48:20 1999 Edith Epstein <eepstein@sophia.cygnus.com>
-
- * config/pa/nm-hppah.h: Added prototype declarations for
- hppa_enable_page_protection_events and
- hppa_disable_page_protection_events.
-
- * inftarg.c (child_wait): Fixed code that checks whether
- or not the target program has done a fork/vfork.
- related_pid does not have a value unless the target
- program has forked/vforked.
-
- * infttrace.c (hppa_insert_hw_watchpoint): Make sure that
- function always returns a value.
- (hppa_remove_hw_watchpoint): Make sure that function always
- returns a value.
-
-Tue Feb 16 06:31:58 1999 Keith Seitz <keiths@cygnus.com>
-
- * config/powerpc/tm-ppc-eabi.h: Do not define PC_IN_CALL_DUMMY,
- let the generic call dummy infrastructure do it.
-
-Sun Feb 14 18:21:08 1999 Mark Alexander <marka@cygnus.com>
-
- * config/sh/tm-sh.h (BELIEVE_PCC_PROMOTION): Define, so that
- coffread.c will correctly handle char or short function parameters.
-
-1999-02-11 Jason Molenda (jsm@bugshack.cygnus.com)
-
- * configure, aclocal.m4: Regenerate with correct version of aclocal.
-
-1999-02-10 Syd Polk <spolk@cygnus.com>
-
- * acinclude.m4: Fix for new location of itclConfig.sh and itkConfig.sh.
- * aclocal.m4: Regnerate.
- * configure: Regenerate.
-
-1999-02-10 Jason Molenda (jsm@bugshack.cygnus.com)
-
- * demangle.c: Fix comments to mention "set demangle-style"
- instead of "set demangle".
- Run through indent to fix minor indenting problems.
-
-Wed Feb 10 17:53:09 1999 Bob Manson <manson@charmed.cygnus.com>
-
- * i386-tdep.c (gdb_print_insn_i386): Add missing returns.
-
-Wed Feb 10 13:17:21 1999 Stan Shebs <shebs@andros.cygnus.com>
-
- Declare Gould configuration obsolete:
- * configure.host, configure.tgt: Comment out Gould configs.
- * Makefile.in: Comment out Gould-related actions.
- * gould-xdep.c, gould-tdep.c, config/gould/*: Comment out.
- * NEWS: Mention obsolete status.
-
-1999-02-09 DJ Delorie <dj@cygnus.com>
-
- * sparcl-tdep.c: UDP download works in cygwin
-
-1999-02-08 Jason Molenda (jsm@bugshack.cygnus.com)
-
- * gnu-regex.c: Check ENABLE_NLS instead of HAVE_LIBINTL_H.
- * configure.in: Don't check for libintl.h.
- * configure, config.in: Regenerated.
-
-Mon Feb 8 18:10:50 1999 Stan Shebs <shebs@andros.cygnus.com>
-
- * NEWS: Mention new X packet and PowerPC variant support.
-
-1999-02-08 Nick Clifton <nickc@cygnus.com>
-
- * configure.host: Add support for StrongARM host.
- * configure.tgt: Add support for StrongARM target.
-
-Mon Feb 8 12:05:05 1999 David Taylor <taylor@texas.cygnus.com>
-
- * dsrec.c (make_srec): Cast targ_addr to int in call to sprintf
- otherwise on big endian machine with a bfd_vma of 64 bits,
- *everything* gets loaded at location 0.
-
-Mon Feb 7 10:05:43 1999 Frank Ch. Eigler <fche@cygnus.com>
-
- * infrun.c (wait_for_inferior): Allow SIGTRAP to be "pass"ed
- to target program.
-
-Fri Feb 5 16:46:14 1999 Stan Shebs <shebs@andros.cygnus.com>
-
- * NEWS: Add mentions of various new things.
-
-Thu Feb 4 00:19:14 1999 Christopher Faylor <cgf@cygnus.com>
-
- * configure.in: Move termcap determination later in the
- file to catch setting of cygwin flag.
- * configure: Regenerate.
-
-Wed Feb 3 14:16:38 1999 Christopher Faylor <cgf@cygnus.com>
-
- * config/i386/cygwin.mh: Move TERMCAP test code to configure.in.
- * configure.in: Treat libtermcap.a detection as a special case
- when hosting on cygwin.
- * configure: Regenerate.
-
-1999-02-03 Keith Seitz <keiths@cygnus.com>
-
- * remote.c (remote_binary_download, remote_binary_length): New
- static globals for dealing with binary transmissions.
- (remote_write_bytes): Add support for binary downloads
- by shadowing the "M" packet with a new "X" packet. This
- defaults to ON; if the stub does not understand this, it
- will fall back to using "M".
- (putpkt): Add support for binary downloading.
- * monitor.c (monitor_expect): The mon2000 monitor
- on the MSA2000 will also emit random DC1/DC3 chars.
- * m32r-stub.c: Change all char's to unsigned char's
- to support binary downloading.
- (handle_exception): Add support for binary downloading
- via a new "X" packet.
- (getpacket): Do NOT strip eighth bit of incoming chars.
- Watch out for escaped characters in the incoming stream.
- (putpacket): Do NOT strip eighth bit of incoming chars.
- (bin2mem): New function to write binary data directly to
- memory.
- * m32r-rom.c: Add new "mon2000" target.
-
-Tue Feb 2 18:40:29 1999 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * hp-psymtab-read.c (hpread_build_psymtabs): Coerce first arg
- passed to make_cleanup to the correct type.
- (hpread_quick_traverse): Change fifth arg to call to
- hpread_end_psymtab to be 0.
- Compare CURR_MODULE_END to 0 rather than NULL.
- Get rid of ifdef'ed out code.
- (scan_procs): Get rid of ifdef'ed out code.
-
- * somread.c (som_symfile_read): Coerce first argument passed to
- make_cleanup to the correct type.
-
-Tue Feb 2 17:36:29 1999 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * hp-psymtab-read.c (do_pxdb): New function. Check whether the
- file needs to be processed by pxdb (an HP debug info massaging
- tool), if so call it.
- (hpread_build_psymtabs): Initialize scan_start to 0 and
- simplify flow of control.
-
- * somread.c (som_symfile_read): Add call to do_pxdb (),
- in hp-psymtab-read.c.
-
- * symfile.c (symbol_file_add): Remove ifdef'ed out HPUX specific
- code.
- (symfile_bfd_open): Remove HPUXHPPA ifdef'ed code. Code is now
- in hp-psymtab-read.c.
-
-1999-02-02 Martin Hunt <hunt@cygnus.com>
-
- * printcmd.c (print_scalar_formatted): Use strcat to concat all
- the output together before calling fprintf_filtered().
-
-1999-02-01 Jason Molenda (jsm@bugshack.cygnus.com)
-
- * configure.in: Require autoconf 2.13.
- (AM_EXEEXT): Replace with new AC_EXEEXT.
- * acinclude.m4: Move itcl header macros from aclocal.m4 to here.
- * aclocal.m4: Regenerated.
- * configure: Regenerated.
-
-1999-02-01 Jim Blandy <jimb@zwingli.cygnus.com>
-
- Allow PPC users to select which PPC/RS6000 variant they're
- debugging 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.
-
-Sun Jan 31 15:24:24 1999 Stan Shebs <shebs@andros.cygnus.com>
-
- * buildsym.h, buildsym.c: Convert to ANSI-only.
-
- * buildsym.h, buildsym.c: Reformat to standard.
-
- * buildsym.c (merge_symbol_lists): Remove unused variable.
- (_initialize_buildsym): Remove, does nothing.
-
-1999-01-31 J.T. Conklin <jtc@redbacknetworks.com>
-
- * i386-stub.c, m32r-stub.c, m68k-stub.c, sh-stub.c, sparc-stub.c,
- sparcl-stub, sparclet-stub.c: Change declaration of putDebugChar
- to include explicit void return type as per documentation. Fix up
- occasions where stubs erroneously checked return type.
-
-Sun Jan 31 13:18:33 1999 Stan Shebs <shebs@andros.cygnus.com>
-
- From J.T. Conklin <jtc@redbacknetworks.com>:
- * remote.c (remote_query): Fix tipo.
-
-Fri Jan 29 15:25:09 1999 Stan Shebs <shebs@andros.cygnus.com>
-
- * configure.tgt (v850): Add wildcard to match.
-
-Fri Jan 29 16:44:01 1999 Edith Epstein <eepstein@sophia.cygnus.com>
-
- * inferior.h: Ran indent.
-
- * fork-child.c: Ran indent.
-
- * infrun.c : Ran indent.
-
-Fri Jan 29 12:57:34 1999 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * infrun.c (_initialize_infrun): Do not stop or print anything
- when a SIGWINCH is received.
-
- * Makefile.in (m2-exp.tab.c): Use YACC not BISON.
- (f-exp.tab.c): Ditto.
- (jv-exp.tab.c): Ditto.
- (c-exp.tab.c): Ditto.
- (YACC): Define as @YACC@.
-
-1999-01-29 Martin Hunt <hunt@cygnus.com>
-
- Changes from Keith Seitz <keiths@cygnus.com>
- * valops.c (value_assign): Add calls to register_changed_hook and
- memory_changed_hook to inform UIs that the user has changed
- the target's registers/memory.
- * findvar.c (write_register_gen): Remove call to pc_changed_hook.
- * defs.h: Remove declaration for pc_changed_hook and
- add declarations for register_changed_hook and
- memory_changed_hook.
- * top.c: Ditto.
-
-1999-01-29 Mark Alexander <marka@cygnus.com>
-
- * procfs.c (wait_fd): Handle deleted threads correctly.
-
-1999-01-28 Jason Molenda (jsm@bugshack.cygnus.com)
-
- * utils.c (init_page_info): Force window size if running under emacs.
-
-1999-01-27 James Ingham <jingham@cygnus.com>
-
- * typeprint.c (whatis_exp): Remove static declaration.
-
-Wed Jan 27 16:50:25 1999 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * hp-psymtab-read.c: Reformat using indent.
-
-Wed Jan 27 13:20:25 1999 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * hp-psymtab-read.c: Reformat comments, update copyright.
-
-Wed Jan 27 15:09:22 1999 Andrew Cagney <cagney@chook.cygnus.com>
-
- * mips-tdep.c (mips_gdbarch_init): Trace e_flags from BFD
- elf_info.
-
-Tue Jan 26 16:02:47 1999 Mark Alexander <marka@cygnus.com>
-
- * v850-tdep.c (v850_generic_reg_names, v850e_reg_names,
- v850_register_names, v850_processor_type_table): Declare tables
- and structures for handling differences in register names for
- v850 and v850e.
- (struct reg_list): Define new structure for creating tables
- of register bit masks in v850e instrutions.
- (handle_prepare, handle_pushm): New helpers for v850_scan_prologue.
- (v850_scan_prologue): Recognize v850e instructions: callt, prepare,
- and pushm.
- (v850_target_architecture_hook): New function to set register
- names based on current machine.
- (_initialize_v850_tdep): Set up target_architecture_hook.
- * config/v850/tm-v850.h (v850_register_names): Declare.
- (REGISTER_NAME): Define to refer to v850_register_names.
- (SR0_REGNUM, CTBP_REGNUM): Define.
- (PS_REGNUM): Redefine in terms of SR0_REGNUM.
-
-Tue Jan 26 18:27:26 1999 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * Makefile.in (c-exp.tab.c): Use BISON instead of YACC, to pick
- the correct value from configure output.
- (jv-exp.tab.c): Ditto.
- (f-exp.tab.c): Ditto.
- (m2-exp.tab.c): Ditto.
-
-1999-01-26 Jason Molenda (jsm@bugshack.cygnus.com)
-
- * breakpoint.h (ep_is_exception_catchpoint): Add prototype.
- * frame.h (select_and_print_frame): Add prototype.
- * stack.c (func_command): Call select_and_print_frame with correct
- number of arguments. Reformat whitespace.
-
-Tue Jan 26 16:53:54 1999 Fernando Nasser <fnasser@cygnus.com>
-
- * remote.c (remote_query): fix maximum packet size to account for
- remote_debug use.
- (putpkt): add comment to alert about extra byte need.
-
-Mon Jan 25 19:55:30 1999 Mark Alexander <marka@cygnus.com>
-
- * sh-tdep.c (sh_target_architecture_hook): Return immediately
- when a matching machine is found.
-
-Fri Jan 22 09:10:35 1999 Mark Alexander <marka@cygnus.com>
-
- * remote-mips.c (mips_initialize): Fix parameters to clear_breakpoint.
- (common_breakpoint): Restore support for instruction breakpoints
- on non-LSI targets.
-
-Thu Jan 21 17:16:19 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * stack.c: Close open comment.
- * symtab.c (find_pc_sect_line): Ditto.
-
-Thu Jan 21 17:51:51 1999 Stan Shebs <shebs@andros.cygnus.com>
-
- * procfs.c (init_procfs_ops): New function, fills in procfs_ops,
- init only nonzero fields, leave to_require_attach and
- to_require_detach empty, not needed for /proc systems yet.
- (_initialize_procfs): Call init_procfs_ops.
-
- From J.T. Conklin <jtc@redbacknetworks.com>:
- * top.c (init_main): Fix tipo in description of the remotetimeout
- variable.
- * breakpoint.c (bpstat_stop_status): Handle systems where
- DECR_PC_AFTER_BREAK != DECR_PC_AFTER_HW_BREAK.
-
-Thu Jan 21 17:25:46 1999 Mark Alexander <marka@cygnus.com>
-
- * mon960-rom.c (_initialize_mon960): Call init_mon960_cmds
- to fill in mon960_cmds structure properly.
-
-Wed Jan 20 17:53:22 1999 Stan Shebs <shebs@andros.cygnus.com>
-
- * remote-sds.c (sds_ops): Define only once.
- (init_sds_ops, sds_command, _initialize_remote_sds): Declare.
- (init_sds_ops): Init only non-zero fields.
-
-Wed Jan 20 15:45:15 1999 Mark Alexander <marka@cygnus.com>
-
- * h8300-tdep.c (original_register_names, h8300h_register_names,
- h8300_register_names): Define new variables.
- (set_register_names): New function to set register names based on
- current CPU type.
- (h8300_command, h8300h_command, h8300s_command): Call
- set_register_names.
- * config/h8300/tm-h8300.h (h8300_register_names): Declare.
- (REGISTER_NAME): Define to refer to h8300_register_names.
-
-1999-01-19 Fernando Nasser <fnasser@totem.to.cygnus.com>
-
- * sol-thread.c abug-rom.c cpu32bug-rom.c dbug-rom.c m32r-rom.c
- mac-nat.c mon960-rom.c op50-rom.c ppc-bdm.c remote-adapt.c
- remote-array.c remote-bug.c remote-e7000.c remote-eb.c remote-es.c
- remote-est.c remote-hms.c remote-mm.c remote-nindy.c remote-nrom.c
- remote-os9k.c remote-rdp.c remote-sds.c remote-sim.c remote-st.c
- remote-udi.c rom68k-rom.c sh3-rom.c sparcl-tdep.c sparclet-rom.c
- v850ice.c win32-nat.c: cosmetic changes to conform to coding
- standards.
-
-1999-01-19 Jim Blandy <jimb@zwingli.cygnus.com>
-
- Use aclocal to generate GDB's aclocal.m4 script.
- * acinclude.m4: New file, containing the hand-written local macro
- definitions that used to be in aclocal.m4. Don't sinclude
- ../bfd/aclocal.m4 any more; running aclocal in this directory will
- get us the definitions we need. HOWEVER: Do sinclude
- ../bfd/acinclude.m4, because we need the definition of
- BFD_NEED_DECLARATION.
- * aclocal.m4: Regenerated by aclocal.
- * configure: Regenerated by autoconf.
-
-Tue Jan 19 10:27:23 1999 David Taylor <taylor@texas.cygnus.com>
-
- * breakpoint.c (disable_breakpoints_in_shlibs): new parameter,
- silent, controls whether to print message about removal of shared
- library breakpoints.
- * breakpoint.h (disable_breakpoints_in_shlibs): decl updated.
- * irix5-nat.c (clear_solib): call disable_breakpoints_in_shlibs.
- * osfsolib.c (clear_solib): ditto.
- * solib.c (clear_solib): ditto.
- * somsolib.c (som_solib_restart): update call to
- disable_breakpoints_in_shlibs.
-
- * target.h (child_post_attach): only declare if CHILD_POST_ATTACH
- is define.
-
-Tue Jan 19 18:07:11 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * corelow.c (solib_add_stub): Ditto.
- (core_file_to_sym_file): Cast make_cleanup parameter.
-
- * solib.c (symbol_add_stub, solib_map_sections): Change argument
- to PTR insted of a char*. Matches catch_errors interface.
-
-Mon Jan 18 14:01:24 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote-array.c (array_open): Don't use fprintf_filtered to send
- data to the log file.
-
- * remote-array.c (handle_load_dll): Change argument type to PTR so
- that it is compatible with catch_errors.
- * ocd.c (ocd_start_remote): Ditto.
- * remote-sds.c (sds_start_remote): Ditto.
-
- * win32-nat.c (win32_child_thread_alive): Namespace proof
- child_thread_alive.
- (init_child_ops): Update.
-
-Mon Jan 18 12:03:47 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote-rdi.c (arm_rdi_open): Set gdb_hostif.hostosarg and
- gdb_hostif.dbgarg to NULL instead of stdout.
- (voiddummy, myprint, mywritec): Use gdb_stdout instead of stdout.
-
-Mon Jan 18 16:40:50 1999 Stan Shebs <shebs@andros.cygnus.com>
-
- * ser-ocd.c (ocd_open): Handle Unix case gracefully.
-
- * target.c (dummy_target): Don't initialize statically.
- (init_dummy_target): New function, fills in dummy_target.
- (initialize_targets): Use it.
- * hpux-thread.c (hpux_thread_ops): Don't initialize statically.
- (init_hpux_thread_ops): New function, fills in hpux_thread_ops.
- (_initialize_hpux_thread): Use it.
- * m3-nat.c (m3_ops): Don't initialize statically.
- (init_m3_ops): New function, fills in m3_ops.
- (_initialize_m3): Use it.
-
-1999-01-18 Fernando Nasser <fnasser@totem.to.cygnus.com>
-
- * sol-thread.c: delete compile time initialization of target_ops
- (_initialize_sol_thread): initialize target_ops at run time.
- * hpux-thread.c: added target_ops entry.
- * m3-nat.c: ditto.
-
-Mon Jan 18 15:19:13 1999 David Taylor <taylor@texas.cygnus.com>
-
- * procfs.c (procfs_ops): delete compile time initialization.
- (_initialize_procfs): initialize procfs_ops at run time.
-
-Mon Jan 18 12:51:44 1999 Christopher Faylor <cgf@cygnus.com>
-
- * configure.in: Ensure that -luser32 is always linked in
- for cygwin build.
- * configure: Regenerated.
-
-Mon Jan 18 08:38:05 1999 Mark Alexander <marka@cygnus.com>
-
- * values.c (value_virtual_fn_field): Clear the pointed-to
- offset when casting to the base class.
-
-Mon Jan 18 10:30:51 1999 David Taylor <taylor@texas.cygnus.com>
-
- * remote-udi.c (init_udi_ops): change non-existant udi_run_ops to
- udi_ops; delete NULL initializers.
-
-Mon Jan 18 12:03:47 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * serial.c (serial_close): gdb_fclose tages gdb_file** arg, not
- gdb_file*.
-
- * f-valprint.c, target.c, gdbarch.c: Pass gdb_stderr not stderr.
-
-Mon Jan 18 10:46:12 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * stack.c (print_frame_info_base): Don't cast call to
- catch_errors.
- (print_args_stub): Change char* arg to PTR.
- * symmisc.c (print_symbol): Ditto.
- * top.c (quit_cover): Ditto.
- * remote.c (remote_open_1, remote_start_remote): Ditto.
- * infrun.c (normal_stop, hook_stop_stub, restore_selected_frame):
- Ditto.
-
- * stack.c (backtrace_command): Cast first arg of make_cleanup to
- make_cleanup_func.
- * remote.c (remote_kill): Cast putpkt arg to catch_errors_ftype.
-
-Mon Jan 18 08:47:02 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * defs.h (catch_errors_ftype): Define.
- (catch_errors): Replace char* arg with PTR arg.
- * top.c (catch_errors): Update
-
- * breakpoint.c (bpstat_stop_status, bpstat_stop_status,
- delete_breakpoint, breakpoint_re_set): Delete all casts in call to
- catch_errors.
- (breakpoint_cond_eval, watchpoint_check,
- cover_target_enable_exception_callback, breakpoint_re_set_one):
- Arg is PTR not char*.
-
- * breakpoint.c (cover_target_enable_exception_callback): Change
- type to int. Check for cast values of 0 and -1. Return a result!
- (insert_breakpoints): Move declaration of SAL and ARGS to where
- they are used.
-
-1999-01-16 Fernando Nasser <fnasser@totem.to.cygnus.com>
-
- * remote.c (remote_query): new function - creates proper interface
- to the remote protocol "q" command.
-
-Fri Jan 15 17:11:48 EST 1999 Zdenek Radouch (radouch@cygnus.com)
-
- * config/fr30/tm-fr30.h: Changed ABI to match GCC change
- (always use pointer for structs passed by value).
-
-1999-01-15 Fernando Nasser <fnasser@totem.to.cygnus.com>
-
- * target.h: added entry for target queries (to_query)
- target.c: ditto.
-
-Thu Jan 14 18:29:17 1999 David Taylor <taylor@texas.cygnus.com>
-
- * mips-tdep.c (mips_gdbarch_init): fix stream arg in
- fprintf_unfiltered calls.
- * remote-mm.c (mm_wait): fix stream arg to gdb_flush.
- * remote-udi.c (udi_wait): fix stream arg to fwrite.
- * symmisc.c (maintenance_check_symtabs): fix stream argument to
- print_address_numeric.
-
-Wed Jan 13 19:33:16 1999 David Taylor <taylor@texas.cygnus.com>
-
- * breakpoint.c (insert_breakpoints): insert cast to eliminate
- warning.
-
-Wed Jan 13 14:59:02 1999 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * infrun.c (set/show scheduler-locking) New command. Set a
- mode bit that will control how GDB attempts to control thread
- scheduling for step, continue, etc. (resume): make use of
- the schedule-locking mode.
- * target.h (struct target_ops): new field to_has_thread_control.
- * sol-thread.c: initialize target_ops to_has_thread_control.
- * procfs.c: ditto.
- * target.c: ditto.
- * m3-nat.c: ditto.
- * remote.c: ditto.
- * hpux-thread.c: ditto.
- * thread.c: cull duplicate prototypes. Move prototypes to top.
- * serial.c: indentation cleanup.
- * breakpoint.c: add casts to eliminate compiler warnings.
-
-Tue Jan 12 17:00:00 1999 Edith Epstein <eepstein@sophia.cygnus.com>
-
- * inftarg.c (child_create_inferior): fixed HPUXHPPA specific
- call to fork_inferior. The shell param is now NULL.
-
-1999-01-12 Jason Molenda (jsm@bugshack.cygnus.com)
-
- * monitor.c (init_base_monitor_ops): Whitespace cleanup.
- (_initialize_remote_monitors): Same.
-
-1999-01-12 Jason Molenda (jsm@bugshack.cygnus.com)
-
- * monitor.c (init_monitor_ops): Initialize the monitor_ops
- structure if it hasn't already been done.
-
-Tue Jan 12 14:50:10 1999 Stan Shebs <shebs@andros.cygnus.com>
-
- * inftarg.c (child_ops): Don't initialize statically.
- (init_child_ops): New function, fills in child_ops.
- (_initialize_inftarg): Use it.
- (child_post_attach): Declare extern.
- (child_wait): Fix ambiguous parens.
- (child_attach_to_process): Remove unused local wstatus.
- (child_insert_fork_catchpoint, child_remove_fork_catchpoint,
- child_insert_vfork_catchpoint, child_remove_vfork_catchpoint,
- child_has_forked, child_insert_exec_catchpoint,
- child_remove_exec_catchpoint): Return a value.
-
-Mon Jan 11 16:43:44 1999 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * remote.c (remote_wait): Add inferior_pid to thread list only
- if it is not already there.
-
-1999-01-11 Jason Molenda (jsm@bugshack.cygnus.com)
-
- * scm-tags.h: Update FSF's address on copyright notice.
- * ser-e7kpc.c: Same.
- * gnu-nat.h: Same.
-
-Mon Jan 11 13:45:57 1999 Stu Grossman <grossman@babylon-5.cygnus.com>
-
- * dwarf2read.c (dump_die): Change stderr to gdb_stderr.
- * expprint.c (print_subexp): fprintf => fprintf_unfiltered.
- * jv-typeprint.c (java_type_print_base): fputs => fputs_filtered.
- * stack.c (struct function_bounds): Remove superfluous `typedef'.
- * symfile.c (list_overlays_command): stdout => gdb_stdout.
- * symmisc.c (maintenance_check_symtabs): stdout => gdb_stdout.
- * utils.c (print_spaces): Make more efficient.
-
-Mon Jan 11 13:55:51 1999 David Taylor <taylor@texas.cygnus.com>
-
- * utils (print_spaces): fix arg to strcat; fix formatting.
-
-Fri Jan 8 11:57:24 1999 Stan Shebs <shebs@andros.cygnus.com>
-
- * exec.c (exec_ops): Don't initialize statically.
- (init_exec_ops): New function, fills in exec_ops.
- (_initialize_exec): Use it.
-
-Thu Jan 7 17:50:15 EST 1999 Zdenek Radouch (radouch@cygnus.com)
-
- Beta FR30 port.
- * fr30-tdep.c
- * config/fr30/tm-fr30.h
-
-Wed Jan 6 12:28:35 1999 David Taylor <taylor@texas.cygnus.com>
-
- * configure.in: Add an --enable-tui argument. Construct
- tui/Makefile from tui/Makefile.in. Use AM_PROG_CC_STDC. If we
- have the GUI, then we need this to process libgui.h.
- (ENABLE_CFLAGS): define and export BUILD_TUI.
- (AC_CHECK_HEADERS): Add check for term.h.
-
- * configure.host (hppa-*-hpux10.20, hppa-*-hpux11.0*): New configs.
-
- * config.in, configure : regenerated.
-
- * Makefile.in: Allow the TUI code to be conditionally enabled.
- (TUI_LIBRARY): New variable, value are set by the configuration
- script. Set to the empty string when the TUI isn't enabled.
- (gdb$(GDBEXT)): Use those, instead of referring to all-tui and
- tui/libtui.a directly.
- (BUILD_TUI): build the tui -- only when configured with
- --enable-tui.
- (YLWRAP): use ylwrap to avoid problems on systems w/o bison.
- (gdb$(EXEEXT)): make it dependent on BUILD_TUI.
- (all-tui): remove dependency from phony target.
- (c-exp.tab.c): use ylwrap instead of bison.
- (jv-exp.tab.c): ditto.
- (f-exp.tab.c): ditto.
- (m2-exp.tab.c): ditto.
- (ALLDEPFILES): add somread.c, hp-psymtab-read.c, hp-symtab-read.c.
- (SFILES): remove the above files
- (COMMON_OBS): remove somread.o
- (SFILES): Add the tui files to this, so they get included in etags
- tables.
- (gdb$(EXEEXT)): Add all-tui to the list of dependencies, and add
- tui/libtui.a to the link list.
- (all-tui): New rule, which does a recursive make in the tui
- subdir.
- (tui/libtui.a): When recursing, pass down ${FLAGS_TO_PASS}. And
- don't echo the make command. This is closer to what the other
- recursions do.
- (HFILES_NO_SRCDIR): add hpread.h
- (COMMON_OBS): add hp-psymtab-read.o, hp-symtab-read.o
- (SFILES): add hp-psymtab-read.c, hp-symtab-read.c add rules for
- the new files. Remove hpread.c, hpread.o
- (gdb$(EXEEXT)): Depend on the actual tui library, not on a
- fictitious target. Since the fictitious target never existed,
- make would always relink.
- (tui/libtui.a): Always recurse to make sure the library is up to
- date.
-
-Wed Jan 6 12:05:12 1999 Stan Shebs <shebs@andros.cygnus.com>
-
- * remote.c: Pacify --enable-build-warnings, reformat code
- to conform to standards, fix spelling errors.
- (ishex, stubhex, record_currthread, etc): Declare.
- (ishex, stubhex): Declare char arg as int.
- (pack_string): Comment out, never used but possibly useful.
- (threadref_to_int, remote_get_threadinfo, etc): Make static.
-
-Wed Jan 6 11:43:32 1999 David Taylor <taylor@texas.cygnus.com>
-
- The following changes were made by Elena Zannoni
- <ezannoni@cygnus.com> and Edith Epstein <eepstein@cygnus.com> as
- part of a project to merge in changes made by HP.
-
- * c-exp.y: use external flag hp_som_som_object_present to decide
- whether code was compiled by HP's compilers. Add two new C++
- tokens for true and false.
- (yylex): check for template name is done differently for the
- HP/aCC compiler case. Change some of the template processing code
- for handling HP aCC templates. Handle true and false tokens.
-
-Tue Jan 5 11:13:36 1999 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * remote.c (record_curthread): Must not modify inferior_pid when
- called from wait_for_inferior. Instead, if a new thread-id is
- detected, call add_thread.
- (MAGIC_NULL_PID): new macro, use instead of the magic number
- "42000".
- (remote_find_new_threads): if inferior_pid is unknown, get and use
- the current thread id.
- (remote_start_remote): on connecting, attempt to get the current
- thread id for inferior_pid.
- (remote_resume): If pid == -1, then resume any-thread (not the
- current thread specifically). Also some cosmetic fixups.
-
- * thread.c (info_threads_command): don't initialize current_pid
- until after call to FIND_NEW_THREADS (which may change inferior_pid).
- Also some cosmetic fixups.
- * infrun.c: cosmetic fixups and casts to avoid warnings.
- * infcmd.c: cosmetic fixups, mainly long lines.
-
-Tue Jan 5 11:55:57 1999 David Taylor <taylor@texas.cygnus.com>
-
- * target.c (noprocess): terminate sentence with a period.
- * breakpoint.c (catch_command_1): ditto.
-
- * c-valprint.c (c_value_print): remove hack^2 from HP; it causes
- testsuite losses with no real gain.
-
- * inferior.h (START_INFERIOR_TRAPS_EXPECTED): restore, but only
- if tm-*.h hasn't overridden default value.
-
-1999-01-04 Jason Molenda (jsm@bugshack.cygnus.com)
-
- * configure.in: Fix whitespace indentation for --help.
- * configure: Regenerated.
-
-1999-01-04 Manuel Bouyer <bouyer@antioche.lip6.fr>
-
- * main.c: Add --write command line option, document -w.
- * gdb.1: Document --write.
-
-1999-01-04 Jason Molenda (jsm@bugshack.cygnus.com)
-
- * configure.in: Require autoconf 2.12.1 or higher.
- * doc/configure.in: Ditto.
- * nlm/configure.in: Ditto.
- * rdi-share/configure.in: Ditto.
- * testsuite/configure.in: Ditto.
- * doc/Makefile.in: Don't hardcode $(SHELL).
- * nlm/Makefile.in: Ditto.
- * rdi-share/Makefile.in: Ditto.
- * testsuite/Makefile.in: Ditto.
-
-Mon Jan 4 12:53:03 1999 Stan Shebs <shebs@andros.cygnus.com>
-
- * remote-vx.c (init_vx_ops, init_vx_run_ops): Remove unneeded
- inits of new fields, including ref to bogus field.
- (vx_ops, vx_run_ops): Make static.
-
-Mon Jan 4 15:05:29 1999 David Taylor <taylor@texas.cygnus.com>
-
- * inferior.h (START_INFERIOR_TRAPS_EXPECTED): delete,
- already defined in tm.h.
-
- * inftarg.c: change <sys/unistd.h> to <unistd.h> and
- conditionalize its inclusion.
- * infttrace.c: ditto.
-
-For older changes see ChangeLog-98
+For older changes see ChangeLog-99
Local Variables:
mode: change-log
diff --git a/gdb/ChangeLog-99 b/gdb/ChangeLog-99
new file mode 100644
index 0000000..005de04
--- /dev/null
+++ b/gdb/ChangeLog-99
@@ -0,0 +1,8815 @@
+Wed Dec 29 17:41:11 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * breakpoint.c (create_breakpoints, parse_breapoint_sals,
+ breakpoint_sals_to_pc): New functions.
+ (break_command_1): Rewrite. Use create_breakpoints,
+ parse_breapoint_sals, breakpoint_sals_to_pcto create the list of
+ breakpoints specified in ``sals''. Delete unused variables.
+ Pre-allocate addr_strings for all breakpoints. Allocate a
+ separate cond and cond_string for each breakpoint.
+ (gdb_breakpoint, do_captured_breakpoint, struct
+ captured_breakpoint_args): Provide a library interface into
+ create_breakpoints.
+
+ * defs.h (gdb_breakpoint): Add declaration.
+
+1999-12-22 Michael Chastain <chastain@cygnus.com>
+
+ * dbxread.c (process_one_symbol): check for nested LBRAC
+ symbols before calling finish_block rather than after. Do not
+ call define_symbol for these symbols.
+
+1999-12-21 Stan Shebs <shebs@andros.cygnus.com>
+
+ * blockframe.c (generic_pop_current_frame): Cosmetic changes to
+ clarify.
+
+1999-12-20 Michael Snyder <msnyder@cleaver.cygnus.com>
+
+ * procfs.c: Completely rewritten. All functions replaced, to make
+ maintainence easier in the presence of two very different versions
+ of /proc (ioctl vs. read/write).
+ * proc_api.c: New file, pretty-print /proc diagnostic trace info.
+ * proc_events.c: New file, pretty-print /proc signals, exceptions.
+ * proc_flags.c: New file, pretty-print /proc flags.
+ * proc_why.c: New file, pretty-print /proc reasons for stopping.
+ * Makefile.in: Add rules for above new files.
+ * config/i386/i386sol2.mh: Add above new files to NATDEPFILES.
+ * config/sparc/sun4sol2.mh: ditto.
+ * config/i386/i386dgux.mh: ditto.
+ * config/i386/i386v4.mh: ditto.
+ * config/i386/i386v42mp.mh: ditto.
+ * config/i386/ncr3000.mh: ditto.
+ * config/m68k/m68kv4.mh: ditto.
+ * config/m88k/delta88v4.mh: ditto.
+ * config/mips/irix4.mh: ditto.
+ * config/mips/irix5.mh: ditto.
+ * config/mips/mipsv4.mh: ditto.
+ * config/powerpc/solaris.mh: ditto.
+ * config/alpha/alpha-osf2.mh: ditto.
+ * config/alpha/alpha-osf3.mh: ditto.
+ * testsuite/gdb.base/callfuncs.exp: make "next" test match the
+ next source line, in case the "next" runs away.
+ * acconfig.h: remove obsolete def HAVE_MULTIPLE_PROC_FDS,
+ add new def NEW_PROC_API
+ * config.in; ditto.
+ * configure.in: Detect sparc solaris 7 and all versions of
+ UnixWare, and define NEW_PROC_API.
+ * configure: auto-generate.
+ * infrun.c (MAY_SWITCH_FROM_INFERIOR_PID): remove define, make it
+ the default behavior. (switched_from_inferior_pid): rename to
+ previous_inferior_pid. (handle_inferior_event): remove the
+ [Switching to thread...] message. (normal_stop): move the
+ [Switching to thread...] message to here.
+ * sol-thread.c (sol_find_new_threads): add a call to
+ procfs_find_new_threads, so that new LWPs are found too.
+ * config/mips/nm-irix5.h (TARGET_CAN_USE_HARDWARE_WATCHPOINT):
+ define to always use. (target_insert_watchpoint) define to use
+ new procfs call (one additional parameter).
+ (target_remove_watchpoint): ditto.
+ (TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT) define always true.
+ * config/mips/nm-irix4.h: ditto.
+
+
+1999-12-21 Jim Blandy <jimb@cygnus.com>
+
+ * Makefile.in (elf_bfd_h): Look for elf-bfd.h in BFD_SRC, not
+ BFD_DIR. Unlike bfd.h, it is not a generated file.
+
+Fri Dec 17 18:24:58 1999 David Taylor <taylor@texas.cygnus.com>
+
+ * language.c (_initialize_language): move settings of language,
+ range, and type and corresponding function calls
+ set_language_command, set_type_command, and set_range_command
+ closer together to match the model of having the user set the
+ variable via the 'set {language | range | type}' commands.
+ This eliminates startup noise introduced by Jimmy Guo's change
+ of Dec 13th.
+
+1999-12-17 Michael Snyder <msnyder@cleaver.cygnus.com>
+
+ * configure.in: test for <stdint.h>, which is not available
+ on earlier versions of Linux.
+ * config.in: define HAVE_STDINT_H if it's present.
+ * configure: autoconfiscate.
+ * lin-thread.c: if not HAVE_STDINT_H, stub out the entire module.
+
+Fri Dec 17 20:45:21 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * target.c (find_target_beneath): Change ``='' in if to ``==''.
+
+1999-12-16 Michael Snyder <msnyder@cleaver.cygnus.com>
+
+ * defs.h (TIDGET): add default definition.
+ * lin-thread.c (check_for_thread_event): for now, just provide
+ an empty definition (to be filled in later).
+
+1999-12-16 Fernando Nasser <fnasser@totem.to.cygnus.com>
+
+ * varobj.c (varobj_list): Improve the test and the text of the
+ assertion that guards against wrong tally of root varobjs.
+ (uninstall_variable): Fix for a bug in which the number of root
+ varobjs was not decremented if the first one in the list was deleted.
+
+1999-12-16 Michael Snyder <msnyder@cleaver.cygnus.com>
+
+ * linux-thread.c: Remove printf-debugging code.
+ * lin-thread.c: ditto.
+ * config/alpha/nm-linux.h: protect with NM_LINUX_H.
+ * testsuite/gdb.threads/linux-dp.exp: Make test for "New Thread"
+ message more forgiving. Ditto test for "info threads".
+
+1999-12-16 Michael Snyder <msnyder@cleaver.cygnus.com>
+
+ * lin-thread.c: new file. Implements multi-thread debugging on
+ Linux using the thread_db API first implemented on Solaris. This
+ frees GDB from any dependency on the internal implementation of
+ the thread library. Future versions of the thread library will
+ implement a libthread_db API for debuggers, which GDB will use.
+ * config/i386/linux.mh: add lin-thread.o to the link, and add
+ -ldl and -rdynamic since libthread_db is a dynamic library.
+ * config/alpha/alpha-linux.mh: ditto.
+ * configure.in: test for thread_db.h, proc_service.h
+ * configure: autoconf.
+ * config.in: conditionally define HAVE_THREAD_DB_H
+ and HAVE_PROC_SERVICE_H
+ * gdb_thread_db.h: new file, used when the system doesn't have it.
+ * gdb_proc_service.h: ditto.
+
+1999-12-16 Michael Snyder <msnyder@cleaver.cygnus.com>
+
+ * linux-thread.c: changes to accomodate the new lin-thread.c
+ module based on the thread_db API. These changes make parts of
+ linux-thread.c shareable with lin-thread.c.
+ (linuxthreads_wait_mask): replace with linuxthreads_block_mask.
+ (using_thread_db): new variable. Allows linux-thread module to
+ detect when lin-thread (thread_db API) module is in use.
+ (save_inferior_pid, restore_inferior_pid): make 32/64 bit safe.
+ (check_all_signal_numbers) make extern, shared with lin-thead.c.
+ (linuxthreads_new_objfile): use target_new_objfile_chain to share
+ this hook with the lin-thread module. Call the other module FIRST.
+ If using_thread_db is turned on by the other thread module, do not
+ set linuxthreads_debug and do not call update_stop_threads. Do call
+ check_all_signal_numbers, to be sure it gets set before target_wait.
+ (linux_child_wait): new function. Abstracts out the "child_wait"
+ functionality, so that it can be shared with the lin-thread module.
+ (linuxthreads_wait): call linux_child_wait, instead of doing the
+ waiting inline. If using_thread_db, do not call update_stop_threads
+ and do not turn on linuxthreads_debug.
+ (linuxthreads_mourn_inferior): abstract out the clearing of global
+ state, so that it can be shared with the lin-thread.c module.
+ (_initialize_linuxthreads): use linuxthreads_wait_mask to block
+ SIGCHLD exactly ONCE, and leave it blocked! Then linux_child_wait
+ will call sigsuspend when it wants to wait for this signal.
+ (thread_attach): abstract out ptrace attach to share with lin-thread.c
+
+1999-12-16 Michael Snyder <msnyder@cleaver.cygnus.com>
+
+ Make target_pid_to_str a target_ops vector.
+ * target.h (target_pid_to_str): redefine to use a target_ops vector.
+ (target_tid_to_str): default to using target_pid_to_str.
+ (target_pid_or_tid_to_str): ditto.
+ * target.c (update_current_target): inherit to_pid_to_str method.
+ (find_target_beneath): new function. Find target stratum below
+ the given one.
+ * config/nm-gnu.h: don't define target_pid_to_str.
+ * config/i386/tm-i386sol2.h: ditto.
+ * config/sparc/tm-sun4sol2.h: ditto.
+ * gnu-nat.c (init_gnu_ops): initialize to_pid_to_str vector.
+ * linux-thread.c (init_linuxthreads_ops): ditto.
+ * sol-thread.c (init_sol_thread_ops: ditto.
+ * procfs.c (init_procfs_ops): ditto.
+ * win32-nat.c (init_child_ops): ditto.
+ * config/i386/tm-cygwin.h: don't define target_pid_to_str.
+ * inftarg.c (child_pid_to_str): new function, used to initialize
+ to_pid_to_str vector. May be suppressed by defining CHILD_PID_TO_STR.
+ (init_child_ops): initialize to_pid_to_str using child_pid_to_str.
+ Derivative modules may substitute their own child_pid_to_str func
+ by defining CHILD_PID_TO_STR.
+ * lynx-nat.c (lynx_pid_to_str): rename to child_pid_to_str.
+ * config/nm-lynx.h: define CHILD_PID_TO_STR.
+ Don't define target_pid_to_str.
+ * hppah-nat.c (hppa_pid_to_str): rename to child_pid_to_str.
+ * infttrace.c (hppa_pid_or_tid_to_str): call child_pid_to str
+ instead of hppa_pid_to_str.
+ * config/pa/nm-hppah.h: define CHILD_PID_TO_STR.
+ Don't define target_pid_to_str.
+
+1999-12-16 Michael Snyder <msnyder@cleaver.cygnus.com>
+
+ * i386-linux-nat.c: introduce PIDGET/TIDGET macros as on Solaris,
+ preparatory to using the thread_db debugging API for Linux.
+ (fill_gregset): guard against invalid input.
+ (fetch_regs): add a pid/thread_id argument, so we can fetch regs
+ from multiple processes/clones/threads. (store_regs): ditto.
+ (fetch_fpregs): ditto. (store_fpregs): ditto.
+ (fetch_xfpregs): ditto. (store_xfpregs): ditto.
+ (fetch_inferior_registers): use TIDGET to extract an appropriate
+ thread/clone/process id from inferior_pid, if there's one there,
+ and pass it to fetch_regs etc. (store_inferior_registers): ditto.
+
+ * infptrace.c: include every available version of wait.h.
+ introduce PIDGET/TIDGET macros for use with thread_db API on Linux.
+ (call_ptrace): rearrange lines that were split by an ifdef.
+ (fetch_register): use TIDGET to extract an appropriate process ID
+ from inferior_pid, in case we are debugging more than one process.
+ (store_register): ditto. This is for Linux.
+ (child_xfer_memory): use PIDGET to extract the main process id from
+ inferior_pid, in case we are debugging multiple processes that share
+ the same address space (as on Linux).
+
+1999-12-16 Christopher Faylor <cgf@cygnus.com>
+
+ * win32-nat.c: Add a missing register to mappings array.
+ (child_fetch_inferior_registers): Use precalculated index into mappings
+ array as supply_registers argument.
+ (handle_output_debug_string): Avoid considering every debug string as a
+ cygwin signal.
+ (handle_exception): Trap first chance exceptions.
+ (child_create_inferior): Initialize Microsoft thread walking API.
+ (sgmb): New function. Used by Microsoft API for stack walking.
+ (child_frame_chain): New function. Uses Microsoft API for stack
+ walking.
+ (child_frame_chain_saved_pc): Ditto.
+ * config/i386/tm-cygwin.h: Define frame handling stuff.
+
+1999-12-15 Stan Shebs <shebs@andros.cygnus.com>
+
+ ARM GNU/Linux support and general ARM target fixes/cleanup from
+ Scott Bambrough <scottb@netwinder.org>, plus obsoletion of the old
+ RISCix support.
+ * NEWS: Mention addition and obsoletion.
+ * configure.host: Recognize arm* instead of just arm.
+ (arm*-*-linux*): Recognize.
+ * configure.tgt: Ditto, plus assume arm*-*-* is embedded.
+ * config/arm/arm.mh, config/arm/arm.mt, config/arm/nm-arm.h,
+ config/arm/xm-arm.h: Mark as OBSOLETE.
+ * config/arm/embed.mt, config/arm/tm-embed.h: New files.
+ * config/arm/linux.mh, config/arm/linux.mt, config/arm/nm-linux.h,
+ config/arm/tm-linux.h, config/arm/xm-linux.h: Ditto.
+ * config/arm/tm-arm.h: Add more comments, eliminate PARAMS.
+ (STACK_END_ADDR): Remove.
+ (ARM_LE_BREAKPOINT, ARM_BE_BREAKPOINT, THUMB_LE_BREAKPOINT,
+ THUMB_BE_BREAKPOINT): Move to here from arm-tdep.c.
+ (NUM_REGS): Define as sum.
+ (NUM_FREGS, NUM_SREGS, NUM_GREGS): New definitions.
+ (FP_REGISTER_RAW_SIZE, FP_REGISTER_VIRTUAL_SIZE,
+ STATUS_REGISTER_SIZE): Define.
+ (REGISTER_BYTES, REGISTER_BYTE, REGISTER_RAW_SIZE,
+ REGISTER_VIRTUAL_SIZE): Rewrite to use symbolic values.
+ (REGISTER_CONVERTIBLE, REGISTER_CONVERT_TO_VIRTUAL,
+ REGISTER_CONVERT_TO_RAW, USE_STRUCT_CONVENTION,
+ EXTRACT_RETURN_VALUE): Rewrite to use new functions.
+ (IN_SIGTRAMP): Remove definition.
+ * arm-convert.s: Mark as OBSOLETE.
+ * arm-linux-nat.c: New file.
+ * Makefile.in: Add build rule for it.
+ * arm-tdep.c (struct frame_extra_info): New struct.
+ (arm_use_struct_convention): Rewrite.
+ (arm_push_arguments): Rewrite to handle more cases.
+ (arm_register_convertible, arm_register_convert_to_virtual,
+ arm_register_convert_to_raw, arm_extract_return_value): New
+ functions.
+ (LITTLE_BREAKPOINT, BIG_BREAKPOINT): Remove.
+ * arm-xdep.c: Mark as OBSOLETE.
+
+1999-12-15 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * infcmd.c (run_stack_dummy): Temporarily lie about the target
+ ability to support asynchronous execution.
+
+ * remote.c (remote_can_async_p, remote_is_async_p): Return true
+ iff to_async_mask_value is true too.
+ (remote_async): Error out if called when to_async_mask_value is 0.
+ (init_remote_async_ops): Initialize to_async_mask_value to 1.
+ (remote_async_detach, remote_async_resume, remote_async_wait,
+ remote_async_kill): Change SERIAL_IS_ASYNC_P call to
+ target_is_async_p call.
+ (remote_async_resume): Change SERIAL_CAN_ASYNC_P call to
+ target_can_async_p call.
+
+ * target.c (update_current_target): Inherit to_async_mask_value.
+ (target_async_mask): New function. To temporarily turn the target
+ into a synchronous one for inferior function calls, and back to
+ asynchronous.
+
+ * target.h (to_async_mask_value): New entry in the target
+ vector.
+ (target_async_mask): Export.
+ (target_async_mask_value): Define.
+
+Wed Dec 15 11:24:32 1999 Jeffrey A Law (law@cygnus.com)
+
+ * hp-psymtab-read.c (trans_lang): Use HP_LANGUAGE_FORTRAN instead
+ of HP_LANGUAGE_F77.
+
+Wed Dec 15 13:37:55 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * gdb-events.h, gdb-events.c (set_gdb_event_hooks): Return the old
+ event hooks vector.
+
+1999-08-13 Jim Kingdon <http://developer.redhat.com/>
+
+ * breakpoint.c (bpstat_stop_status): Revert 1998-09-08 change
+ to ->frame matching. The change did not match the ChangeLog
+ entry, looked fishy, and caused infinite stepping when running
+ "next" from main on sparc w/ RH Linux. Thanks to Jakub for the
+ report.
+
+1999-12-14 Stan Shebs <shebs@andros.cygnus.com>
+
+ * arm-tdep.c (arm_get_next_pc): Add argument to shifted_reg_val
+ call.
+
+1999-12-14 Mark Salter <msalter@cygnus.com>
+
+ * mips-tdep.c (mips_print_register): Fix printing of individual
+ registers when REGISTER_VIRTUAL_SIZE != REGISTER_RAW_SIZE.
+
+Tue Dec 14 23:29:19 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * defs.h (mcalloc): Delcare.
+ * utils.c (xcalloc, mcalloc): New functions.
+
+1999-12-13 Stan Shebs <shebs@andros.cygnus.com>
+
+ * config/arm/tm-arm.h: Reformat comments, in preparation for
+ real changes.
+ * arm-tdep.c: Similarly, plus change function definitions to
+ modern form.
+
+1999-12-13 Michael Snyder <msnyder@cleaver.cygnus.com>
+
+ * breakpoint.h (enum bptype): add new BP type bp_thread_event.
+ This will be used when a target needs to set an invisible
+ breakpoint to detect events such as thread creation.
+ * breakpoint.c (interlan_breakpoint_number): remove ifdefs.
+ (create_thread_event_breakpoint): new function.
+ (remove_thread_event_breakpoints): new function.
+ (bpstat_what): don't stop at invisible thread_event breakpoints.
+ (update_breakpoints_after_exec): if bp_thread_event breakpoins
+ still exist after an exec, delete them. They'll need to be
+ found and installed anew anyway.
+ (print_it_typical): don't announce bp_thread_event breakpoints.
+ (print_one_breakpoint): account for new breakpoint type.
+ (mention): don't mention invisible bp_thread_event breakpoints.
+ (delete_command): don't delete invisible bp_thread_event bp's.
+ (breakpoint_re_set_one): don't touch bp_thread_event bp's.
+
+Mon Dec 13 11:10:59 1999 Jimmy Guo <guo@cup.hp.com>
+
+ * language.h (longest_raw_hex_string, longest_local_hex_string,
+ longest_local_hex_string_custom): Declare.
+ * language.c: New functions, and misc. fixes.
+ (longest_raw_hex_string, longest_local_hex_string,
+ longest_local_hex_string_custom): New functions.
+
+ * c-typeprint.c
+ (c_type_print_varspec_prefix,c_type_print_varpsec_suffix): Add
+ TYPE_CODE_TEMPLATE case and default case.
+ (c_type_print_base): Revise how demangled_no_class is found;
+ print '}' before printing local file:line info.
+ * c-valprint.c (c_value_print): print reference type to class.
+
+ * valarith.c (value_binop): Add support for exponentiation,
+ equal, not equal.
+ (my_strcmp): New function.
+ (value_equal,value_less): Add string equality comparison support.
+
+ * m2-exp.y (lex): add default case statement to capture
+ unhandled token and call error().
+
+1999-12-13 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * main.c (main): Remove unused variable.
+
+ From Hubert VERSTRAETE (hubertV@bigfoot.com):
+ * main.c (captured_main): Disambiguate command line option '-d' by
+ preferring --directory over --dbx.
+
+ * top.c (return_to_top_level): Do not do exec cleanups if the
+ target is executing. Those cleanups are supposed to be done when
+ the target has stopped.
+
+Mon Dec 13 20:52:37 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * breakpoint.c (do_captured_breakpoint_query,
+ gdb_breakpoint_query): New functions. Implement a breakpoint
+ query.
+
+ * defs.h (enum gdb_rc): Declare.
+ (gdb_breakpoint_query): Declare.
+
+Mon Dec 13 14:18:06 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * gdb-events.h: Fix typo in description of breakpoint events.
+ * gdb-events.sh: Update.
+
+Mon Dec 13 13:57:26 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * breakpoint.c (ep_type_description_t): Delete.
+ (print_one_breakpoint): Add local declaration of struct
+ ep_type_description.
+
+Mon Dec 13 12:38:31 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * top.h: Delete #include <setjmp.h>. Moved to top.c.
+ (SIGJMP_BUF, SIGSETJMP, SIGLONGJMP, SIGJMP_BUF, SIGSETJMP,
+ SIGLONGJMP): Delete. Moved to top.c
+ (error_return, quit_return): Delete extern declarations.
+
+ * top.c: #include <setjmp.h>.
+ (error_return, quit_return): Make static.
+ (SIGJMP_BUF, SIGSETJMP, SIGLONGJMP, SIGJMP_BUF, SIGSETJMP,
+ SIGLONGJMP): Define.
+
+Mon Dec 13 11:54:12 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * tracepoint.c (trace_start_command, tracepoints_info): Print
+ step_count using %ld.
+ * Makefile.in (tracepoint.o): Compile tracepoint.o with -Werror.
+
+1999-12-12 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * target.h (enum target_waitkind): Add new enumeration value
+ TARGET_WAITKIND_IGNORE. For inferior events that we should do
+ nothing about.
+
+ * remote.c (remote_async_wait): After each character of console
+ output from the inferior, return to the event loop with an event
+ kind of TARGET_WAITKIND_IGNORE instead of looping here.
+
+ * infrun.c (handle_inferior_event): In case of
+ TARGET_WAITKIND_IGNORE, return immediately, and set things up so
+ that we are still waiting for the inferior.
+
+1999-12-12 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * event-loop.c (handle_timer_event): When calling the timer
+ procedure, use the saved_timer data, not the timer_ptr data,
+ because the latter has been already freed.
+
+Fri Dec 10 12:01:43 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * eval.c (evaluate_subexp): Only inline when GNUC and not STDC.
+
+Sat Dec 11 17:52:03 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * breakpoint.c (print_one_breakpoint): New function. Move
+ breakpoint print code to here.
+ (breakpoint_1): From here.
+
+Mon Dec 6 20:31:28 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * gdbarch.sh: Replace field init_p with invalid_p.
+ (TARGET_BFD_VMA_BIT): New architecture vector method. Defaults to
+ architecture bits_per_address.
+ * gdbarch.h, gdbarch.c: Update.
+ * defs.h (TARGET_BFD_VMA_BIT): Provide default of TARGET_PTR_BIT
+ for non- multi-arch case.
+
+ * gdbtypes.h (builtin_type_bfd_vma, builtin_type_ptr,
+ builtin_type_CORE_ADDR): New GDB specific address types.
+ * gdbtypes.c (_initialize_gdbtypes, build_gdbtypes): Initialize
+ new builtin types.
+
+Wed Dec 8 17:48:56 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * config/sparc/nm-nbsd.h (FETCH_INFERIOR_REGISTERS): Delete
+ definition. Already defined in config/nm-nbsd.h. Include the
+ more explicit config/nm-nbsd.h.
+
+ * config/sparc/nbsd.mt (TDEPFILES): Move solib.o from here.
+ * config/sparc/nbsd.mh (NATDEPFILES): To here.
+ * config/xm-nbsd.h: #include <sys/param.h> to get definition of
+ NGROUPS needed by <limits.h> and missing on some systems.
+ * config/nm-nbsd.h: Only macro's that match NetBSD definitions
+ with what is expected by solib.c when not SVR4_SHARED_LIBS.
+
+ * configure.host: Add patterns for sparc-*-netbsdaout* and
+ sparc-*-netbsdelf*.
+ * config/sparc/nm-nbsdelf.h: New file.
+ * config/sparc/nbsdelf.mh: New file.
+
+Wed Dec 8 19:56:48 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * frame.h, blockframe.c: Rename default_frame_chain_valid to
+ file_frame_chain_valid. Rename alternate_frame_chain_valid to
+ func_frame_chain_valid.
+
+ * config/sparc/tm-sparclite.h, config/mips/tm-mipsv4.h,
+ config/m88k/tm-delta88v4.h, config/m68k/tm-m68kv4.h,
+ config/m68k/tm-monitor.h, config/i386/tm-i386nw.h,
+ config/i386/tm-i386v4.h, config/h8300/tm-h8300.h: Update.
+ * mips-tdep.c (mips_gdbarch_init): Update.
+
+Wed Dec 8 19:12:17 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * blockframe.c (generic_file_frame_chain_valid): Rename
+ generic_file_frame_chain_valid.
+ * frame.h: Update.
+ * config/fr30/tm-fr30.h, config/m32r/tm-m32r.h,
+ config/mn10200/tm-mn10200.h, config/mn10300/tm-mn10300.h,
+ config/sh/tm-sh.h, config/v850/tm-v850.h, config/mcore/tm-mcore.h:
+ Update.
+
+ * blockframe.c (generic_func_frame_chain_valid): New function.
+ Implement dummy-frame equivalent of function based frame chain
+ valid.
+ * frame.h (generic_func_frame_chain_valid): Declare.
+
+Wed Dec 8 16:26:27 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * blockframe.c (alternate_frame_chain_valid,
+ default_frame_chain_valid): Swap implementations. The change Mon
+ Nov 30 11:18:48 1998 Andrew Cagney <cagney@chook> which converted
+ several macros to functions was backwards.
+
+ * mips-tdep.c (mips_gdbarch_init): Update. Call
+ alternate_frame_chain_valid and not default_frame_chain_valid.
+
+Wed Dec 8 15:29:48 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * infptrace.c: Simplify handling of <sys/wait.h>. Always include
+ "wait.h" from the ../include/wait.h directory. #include
+ <sys/wait.h> was added as part of Mon Nov 29 12:14:10 1999 Andrew
+ Cagney <cagney@b1.cygnus.com> but the ChangeLog was omitted.
+
+1999-12-07 Jim Blandy <jimb@cygnus.com>
+
+ Add support for SSE registers in core files.
+ * corelow.c (get_core_register_section): New function.
+ (get_core_registers): Fetch the new ".reg-xfp" sections,
+ in addition to the traditional ".reg" and ".reg2" sections.
+ Check for per-thread variants of all three. Use
+ get_core_register_section, instead of writing it out over and over
+ again.
+ * i386-linux-nat.c (i386_linux_fetch_core_registers): New function.
+ (i386_linux_nat_core_fns): New core_fns structure. We do our own
+ core handling now, instead of using the generic code in core-regset.c.
+ (_initialize_i386_linux_nat): New function, needed to register
+ i386_linux_nat_core_fns.
+ * config/i386/linux.mh (NATDEPFILES): Remove core-regset.o;
+ i386-linux-nat.c has its own sniffer now.
+ * gdbcore.h: (struct core_fns): Doc fix.
+
+ * i386v-nat.c (i386_float_info): Definition is #if 0'd; delete it
+ altogether. This should use the function i387-tdep.c.
+
+ Patch from Mark Kettenis <kettenis@gnu.org>:
+
+ * config/i386/tm-i386.h (FLOAT_INFO): New define.
+ * i387-tdep.c (print_i387_value, print_i387_ext,
+ print_i387_status_word, print_i387_control_word, i387_float_info):
+ New functions, used to implement generic `info float' command.
+
+1999-12-06 Christopher Faylor <cgf@cygnus.com>
+
+ * dcache.c (set_dcache_state): New function.
+ * dcache.h: Declare set_dcache_state().
+
+Sat Dec 4 15:17:44 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * remote.c (build_remote_packet_sizes): Reduce the default packet
+ size of 400 bytes by one to 399. Stops GDB trashing stubs that
+ append a trailing NUL to an already full buffer.
+
+Sat Dec 4 01:16:47 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * tracepoint.c (remote_get_noisy_reply): Add parameter sizeof_buf.
+ (finish_tfind_command): Add parameter sizeof_msg.
+
+ * remote.c (remote_threads_info): Move assignment operator to
+ outside of function call.
+ (remote_send): Add parameter sizeof_buf.
+ (getpkt): Add parameter sizeof_buf. Call read_frame passing in
+ sizeof_buf.
+
+ * remote.h (getpkt): Update.
+
+ * tracepoint.c (remote_set_transparent_ranges,
+ remote_get_noisy_reply, trace_start_command, trace_stop_command,
+ trace_status_command, finish_tfind_command, trace_find_pc_command,
+ trace_find_tracepoint_command, trace_find_line_command,
+ trace_find_range_command, trace_find_outside_command): Update.
+
+ * remote.c (set_thread, remote_thread_alive,
+ remote_get_threadinfo, remote_get_threadlist,
+ remote_current_thread, remote_threads_info,
+ extended_remote_restart, get_offsets, remote_open_1,
+ remote_async_open_1, remote_wait, remote_async_wait,
+ remote_fetch_registers, check_binary_download, remote_write_bytes,
+ remote_read_bytes, remote_send, remote_detach,
+ remote_async_detach, remote_fetch_registers,
+ store_register_using_P, store_register_using_P,
+ remote_fetch_registers, remote_store_registers, putpkt_binary,
+ remote_insert_breakpoint, remote_remove_breakpoint,
+ compare_sections_command, remote_rcmd, packet_command,
+ remote_info_process, remote_query, remote_insert_watchpoint,
+ remote_search, remote_remove_watchpoint,
+ remote_insert_hw_breakpoint, remote_remove_hw_breakpoint): Update.
+
+Fri Dec 3 17:38:06 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * (read_frame): Add sizeof_buf parameter. Don't allow repeat when
+ first character. Always leave space at the end of the buffer.
+ Return size of packet or -1.
+ (getpkt): Update. Pass in PBUFSIZ.
+
+Thu Dec 2 17:14:53 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * ser-pipe.c: Include <string.h> for memset().
+
+1999-12-01 Jim Blandy <jimb@cygnus.com>
+
+ * gdbtypes.c (builtin_type_v4si, builtin_type_v8qi,
+ builtin_type_v4hi, builtin_type_v2si): New SIMD types.
+ (build_gdbtypes): Initialize them.
+ (_initialize_gdbtypes): Gdbarch_swap them.
+ * gdbtypes.h (builtin_type_v4si, builtin_type_v8qi,
+ builtin_type_v4hi, builtin_type_v2si): Declare them.
+
+ * findvar.c (read_register_bytes, write_register_bytes): Correctly
+ determine how the region the caller is writing overlaps with each
+ register's bytes.
+
+ * value.h (struct value): Doc fixes.
+
+ * valops.c (value_assign): Clarify error message.
+
+1999-12-01 Christopher Faylor <cgf@cygnus.com>
+
+ * config/i386/tm-cygwin.h: Change tm-i386.h include back to tm-i386v.h.
+
+1999-12-01 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * inf-loop.c (inferior_event_handler): In case of
+ INF_EXEC_CONTINUE, don't do all the regular continuations, but
+ just the intermediate ones.
+
+ * infcmd.c (step_once): Add the continuation to the
+ intermediate_continuation list instead of the regular continuation
+ list.
+
+ * utils.c (add_intermediate_continuation): New function, to add
+ continuations to the intermedite_continuation list.
+ (do_all_intermediate_continuations): New function, do all the
+ continuations in the intermediate list.
+ (discard_all_intermediate_continuations): New function, discard
+ all the continuations in the intermediate list.
+ (intermediate_continuation): New global list for use by step_1().
+
+ * defs.h: Export intermediate_continuation,
+ add_intermediate_continuation, do_all_intermediate_continuations,
+ discard_all_intermediate_continuations.
+
+1999-11-30 Christopher Faylor <cgf@cygnus.com>
+
+ * win32-nat.c (mappings): Reorganize slightly for new uniform i386
+ register configuration.
+ (do_child_fetch_inferior_registers): Handle special case floating point
+ registers.
+ (handle_output_debug_string): Handle cygwin-specific signals broadcast
+ from the cygwin DLL.
+ (handle_exceptions): Add code to properly allow continuation after a
+ CTRL-C.
+ (child_continue): Accept propagated "continue_status" which controls
+ how the inferior should be continued.
+ (get_child_debug_event): New function.
+ (child_wait): Use above function to handle debug events.
+ (child_create_inferior): Add more intelligent method for running the
+ inferior to the appropriate point before handing it off to the rest of
+ gdb.
+ (child_stop): Specifically send a CTRL-C to the debugged process.
+ (child_kill_inferior): Set global continue status here to cause
+ inferior to run to completion.
+ (child_resume): Eliminate code which attempts to decide how to continue
+ the inferior. This is now handled by child_continue.
+ * config/i386/tm-cygwin.h: Gut and reorganize for consistency with new
+ tm-i386.h.
+
+ Patch from Egor Duda (deo@logos-m.ru)
+ * win32-nat.c (psapi_get_dll_name): New function.
+ (handle_load_dll): Correctly load DLL symbol tables after attaching to
+ a running pid.
+
+1999-11-30 Michael Snyder <msnyder@cleaver.cygnus.com>
+
+ * infrun.c (handle_inferior_pid): revert 11-29 change: resuming
+ a thread other than the current thread with a signal. Apparently
+ target_resume with a specific pid, a specific signal, and no step
+ means to continue ALL threads but to only send the signal to one
+ (and not, as I had assumed, to continue only the specified thread).
+ * i386-linux-nat.c (fill_gregset): guard against invalid input.
+
+1999-11-30 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * infcmd.c (step_once): New function. Used to do just one step
+ operation.
+ (step_1_continuation): New function. Figure out if we need to step
+ again before returning control to the user.
+ (step_1): If we are in asynchronous mode, don't do the for loop,
+ but rather delegate to continuations the task of repeating the
+ step operation.
+
+ * utils.c (do_all_continuations): Copy the continuation list aside
+ before working on it.
+
+ * target.h (enum inferior_event_type): Add new enum
+ INF_EXEC_CONTINUE.
+
+ * inf-loop.c (inferior_event_handler): Handle new case
+ INF_EXEC_CONTINUE.
+
+ * infrun.c (fetch_inferior_event): If we are in the middle of a
+ 'step n' type command, don't say that the execution is complete,
+ but that it will have to continue.
+
+1999-11-30 Kevin Buettner <kevinb@cygnus.com>
+
+ * utils.c (verror): Don't traverse va_list argument twice. Also,
+ removed extraneous va_end() call.
+
+1999-11-29 Michael Snyder <msnyder@cleaver.cygnus.com>
+
+ * infrun.c (handle_inferior_pid): If a child thread stops on a
+ signal that we are ignoring, and GDB silently resumes the child,
+ resume ALL threads (not just the one that got the signal). All
+ threads are stopped, so all must be resumed.
+ (handle_inferior_event): on detecting a thread context switch,
+ swap infrun_state ONLY if both the old thread and the new one
+ are in the thread list. Otherwise state information will be lost!
+ Problem may arise with flaky back-ends.
+
+1999-11-29 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * breakpoint.c (bpstat_stop_status): Don't decrease hit_count
+ in case of a wp that has not changed.
+
+Mon Nov 29 12:14:10 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * gdbtypes.c (init_simd_type): Make static.
+
+ * configure.in (AC_CHECK_HEADERS): Check for <sys/ioctl.h>.
+ * configure, config.h: Re-generate.
+ * inflow.c: Include <sys/ioctl.h>
+
+ * i386b-nat.c: Include "gdbcore.h".
+ * fork-child.c: Include "command.h".
+
+ * remote.c (remote_cisco_section_offsets,
+ remote_start_remote_dummy, store_register_using_P,
+ remote_info_process, remote_cisco_open, remote_cisco_close,
+ readsocket, readtty, minitelnet, remote_cisco_wait,
+ init_remote_async_ops, init_extended_async_remote_ops,
+ set_remote_cmd), infrun.c (default_skip_permanent_breakpoint): Use
+ ISO-C syntax for function definition.
+
+Mon Nov 29 11:28:21 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * stabsread.c: Revert 1999-11-09 Jim Blandy
+ <jimb@zwingli.cygnus.com> and 1999-11-08 Jim Blandy
+ <jimb@cygnus.com>. Broken on non-Linux targets.
+
+1999-11-26 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * symfile.c (show_load_progress): Add total sent so far to the
+ information passsed to the hook users.
+ (generic_load): Collect total sent so far and pass that to the
+ progress hook.
+
+ * defs.h (show_load_progress): Update.
+
+1999-11-25 Nick Clifton <nickc@cygnus.com>
+
+ * coffread.c (coff_symfile_read): Treat "epoc-pe" targets as "pe"
+ targets.
+ * dbxread.c (dbx_read_symfile): Treat "epoc-pe" targets as "pe"
+ targets.
+
+Wed Nov 24 17:07:28 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * Makefile.in (init.c): Add SUBDIR_INIT_FILES so that sub
+ directories can hook in extra init files.
+
+1999-11-23 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * defs.h (show_load_progress): Export.
+
+ * symfile.c (show_load_progress): New hook for download.
+ (generic_load): Collect total size of executable to load.
+ Call progress hook when downloading.
+
+Thu Nov 18 11:54:24 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * arc-tdep.c (codestream_fill): Rewrite byte swap code using
+ function extract_unsigned_integer.
+
+Wed Nov 17 17:01:06 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * arm-xdep.c: #include "arm-opcode.h" -> "opcode/arm.h".
+
+1999-11-22 Jim Blandy <jimb@cygnus.com>
+
+ * Makefile.in (i386-tdep.o): Update list of dependencies.
+
+1999-11-22 Jim Blandy <jimb@cygnus.com>
+
+ * config/i386/tm-i386v.h (NUM_REGS, REGISTER_NAMES,
+ REGISTER_BYTES, REGISTER_BYTE, REGISTER_RAW_SIZE,
+ REGISTER_VIRTUAL_SIZE, MAX_REGISTER_RAW_SIZE,
+ MAX_REGISTER_VIRTUAL_SIZE, REGISTER_VIRTUAL_TYPE): Deleted. All
+ of these should inherit identical or compatible values from
+ tm-i386.h, as long as you don't define HAVE_SSE_REGS or
+ HAVE_I387_REGS, which are new anyway.
+
+Mon Nov 22 21:39:27 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * target.c (do_target_signal_to_host): New function. Indicate of
+ the conversion was successful to the caller via an additional
+ parameter.
+ (target_signal_to_host_p): New function. Return non-zero if the
+ GDB signal exists on the host system.
+ (target_signal_to_host): Rewrite. Use do_target_signal_to_host.
+ * target.h (target_signal_to_host_p): Add declaration. Document
+ target_singal vs host signal vs target OS signal confusion.
+
+ From 1999-11-08 Jimmy Guo <guo@cup.hp.com>:
+ * hppah-nat.c (require_notification_of_events): Start by ignoring
+ all signals and then adding back in ones we're interested in.
+
+Thu Nov 18 18:12:48 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * jv-typeprint.c (java_type_print_base), kod-cisco.c
+ (cisco_kod_open), kod.c (kod_set_os), xcoffread.c
+ (process_linenos), symfile.c (add_symbol_file_command),
+ remote-rdi.c (arm_rdi_open, rdilogfile_command), main.c
+ (captured_main), go32-nat.c (go32_create_inferior), exec.c
+ (exec_file_attach), corefile.c (core_file_command,
+ reopen_exec_file): Replace strdup with xstrdup.
+
+Mon Nov 22 12:02:47 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * bcache.c (print_bcache_statistics): Fix printf_filtered
+ arguments.
+ (print_percentage): Make function void.
+
+1999-11-21 Jim Blandy <jimb@cygnus.com>
+
+ Make the bcache hash table grow.
+ * bcache.h (BCACHE_NUM_BUCKETS): Delete definition.
+ (struct bcache): Add new element: num_buckets. Make bucket be a
+ pointer to an array, not an array.
+ (free_bcache): New extern declaration.
+ * bcache.c (CHAIN_LENGTH_THRESHOLD): New constant.
+ (expand_hash_table): New function.
+ (bcache): Grow the hash table if the average chain length reaches
+ CHAIN_LENGTH_THRESHOLD.
+ (free_bcache): New function.
+ (print_bcache_statistics): Don't assume that the number of buckets
+ is constant any more.
+ (BSTRING_SIZE): Moved down to just above 'bcache' function, where
+ it's used.
+ * objfiles.c (free_objfile): Call free_bcache, instead of just
+ freeing the bcache's obstack directly.
+ * symfile.c (reread_symbols): Same.
+
+1999-11-20 Jim Blandy <jimb@cygnus.com>
+
+ * bcache.c, bcache.h: Rewritten. New version imposes less memory
+ overhead, and has a more effective hash function, so it's probably
+ faster, too.
+
+ * config/nm-linux.h: No need to check whether __STDC__ is
+ #defined --- GDB requires ANSI C now.
+
+ * config/i386/nm-linux.h (linuxthreads_pid_to_str,
+ linuxthreads_prepare_to_proceed): Delete declarations --- they're
+ provided by config/nm-linux.h now.
+
+1999-11-19 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * top.c (print_command_lines): Remove unused var.
+
+1999-11-19 Jim Kingdon <kingdon@redhat.com>
+
+ Patch applied by Jim Blandy <jimb@cygnus.com>:
+
+ Enable threads for all linux architectures:
+ * config/nm-linux.h: New file.
+ config/alpha/nm-linux.h, config/i386/nm-linux.h,
+ config/m68k/nm-linux.h, config/sparc/nm-linux.h: Use it.
+ * config/tm-linux.h: New file.
+ * config/i386/tm-linux.h, config/m68k/tm-linux.h,
+ config/sparc/tm-linux.h, config/alpha/tm-alphalinux.h: Use it.
+ * config/m68k/linux.mh, config/sparc/linux.mh,
+ config/alpha/alpha-linux.mh: Add linux-thread.o.
+
+1999-11-18 Tom Tromey <tromey@cygnus.com>
+
+ * tracepoint.h (get_tracepoint_by_number): Updated declaration.
+ * tracepoint.c (trace_pass_command): Better error message. Fixed
+ logic when `all' not specified.
+ (get_tracepoint_by_number): Added `optional_p' argument. Fixed
+ all callers.
+
+Wed Nov 17 17:40:30 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * findvar.c (SWAP_FLOATING): Delete macro. Unused.
+
+1999-11-16 Mark Salter <msalter@cygnus.com>
+
+ * monitor.c (monitor_supply_register): Initialize value to zero.
+
+1999-11-15 Eli Zaretskii <eliz@is.elta.co.il>
+
+ (Patches applied by Jim Blandy <jimb@zwingli.cygnus.com>)
+
+ Change DJGPP target use the common register layout in
+ config/i386/tm-i386.h.
+ * config/i386/tm-go32.h: #include "i386/tm-i386.h", not
+ "i386/tm-i386v.h".
+ (HAVE_I387_REGS): Define.
+ (HAVE_SSE_REGS): Undefine.
+ (NUM_FREGS, NUM_REGS, REGISTER_NAMES, FP_REGNUM, SP_REGNUM,
+ PS_REGNUM, PC_REGNUM, FP0_REGNUM, FPC_REGNUM, FPCWD_REGNUM,
+ FPSWD_REGNUM, FPTWD_REGNUM, FPIPO_REGNUM, FPIPS_REGNUM,
+ FPOOS_REGNUM, FPOPS_REGNUM, REGISTER_BYTES, REGISTER_BYTE,
+ REGBYTE_0, REGBYTE_10 REGBYTE_16, REGBYTE_24, REGBYTE_29,
+ REGISTER_RAW_SIZE, REGISTER_VIRTUAL_SIZE, MAX_REGISTER_RAW_SIZE,
+ MAX_REGISTER_VIRTUAL_SIZE, REGISTER_CONVERTIBLE): Definitions
+ deleted.
+ (i387_to_double, double_to_i387): Declarations deleted.
+ (REGISTER_CONVERT_TO_VIRTUAL, REGISTER_CONVERT_TO_RAW,
+ REGISTER_VIRTUAL_TYPE): Use definitions from
+ config/i386/tm-i386.h, unless LD_I387 is #defined.
+
+ * go32-nat.c (go32_fetch_registers, store_register)
+ (go32_create_inferior, init_go32_ops): Replace fatal with
+ internal_error.
+ (sig_map): Map exception 7 to TARGET_SIGNAL_EMT.
+
+ * utils.c (notice_quit): Doc fixes.
+
+1999-11-15 Kevin Buettner <kevinb@cygnus.com>
+
+ * gdbserver/server.h (initialize_low): Declare this target
+ specific function.
+ * gdbserver/server.c (main): Call initialize_low.
+ * gdbserver/low-hppabsd.c, gdbserver/low-linux.c,
+ gdbserver/low-sim.c, gdbserver/low-sparc.c, gdbserver/low-sun3.c
+ (initialize_low): Renamed from initialize. Also removed
+ initialization of inferior_pid.
+ (have_inferior_p): Removed.
+ * gdbserver/low-lynx.c (initialize_low): New function.
+
+1999-11-12 Fernando Nasser <fnasser@totem.to.cygnus.com>
+
+ * remote-rdi.c: Fix indentation accordingly to GNU standards.
+
+Thu Oct 28 00:28:51 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * d10v-tdep.c (d10v_gdbarch_init): Make the d10v:ts3 the default.
+
+Tue Oct 26 09:57:29 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * gdbarch.sh: Re-sync with Cagney's earlier const change.
+
+Sun Oct 24 20:07:31 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * d10v-tdep.c (struct gdbarch_tdep): Replace nr_a_regs,
+ imap0_regnum, nr_imap_regs, dmap0_regnum, with dmap_register and
+ imap_register.
+ (R0_REGNUM, LR_REGNUM, PSW_REGNUM, NR_IMAP_REGS, NR_A_REGS):
+ Convert to enums.
+ (TS2_NR_A_REGS, TS2_NR_IMAP_REGS, TS3_NR_IMAP_REGS,
+ TS3_NR_A_REGS): Delete.
+ (d10v_ts2_dmap_register, d10v_ts3_dmap_register,
+ d10v_ts2_imap_register, d10v_ts3_imap_register): New functions.
+ (d10v_dmap_register, d10v_imap_register,
+ d10v_ts2_register_sim_regno, d10v_ts3_register_sim_regno,
+ show_regs): Update.
+ (remote_d10v_translate_xfer_address): Rewrite. Use
+ sim_d10v_translate_addr to translate addresses.
+ (d10v_gdbarch_init): Initialize tdep members dmap_register and
+ imap_register.
+
+Sun Oct 24 00:12:44 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * d10v-tdep.c (struct gdbarch_tdep): Declare.
+ (NR_IMAP_REGS, NR_DMAP_REGS, A0_REGNUM, NR_A_REGS): Redefine using
+ value in gdbarch_tdep.
+ (d10v_dmap_register, d10v_imap_register): Ditto.
+ (d10v_ts2_register_name, d10v_ts2_register_sim_regno): Rename
+ d10v_register_name and d10v_register_sim_regno
+ (enum ts3_regnums, d10v_ts3_register_name,
+ d10v_ts3_register_sim_regno, d10v_register_sim_regno): New.
+ (d10v_gdbarch_init): Configure registers and G packet according to
+ d10v/ts2 and d10v/ts3.
+
+Sat Oct 23 21:28:02 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * config/d10v/tm-d10v.h (IMAP0_REGNUM, IMAP1_REGNUM, DMAP_REGNUM):
+ Delete macro.
+ (R0_REGNUM, LR_REGNUM, PSW_REGNUM, A0_REGNUM): Move from here.
+ * d10v-tdep.c: To here.
+
+ * d10v-tdep.c: (NR_DMAP_REGS, NR_IMAP_REGS, NR_A_REGS): Define.
+ (d10v_dmap_register, d10v_imap_register): New functions.
+ (remote_d10v_translate_xfer_address): Make static.
+ (d10v_register_virtual_size): Use TYPE_LENGTH of
+ REGISTER_VIRTUAL_TYPE.
+ (d10v_register_byte, do_d10v_pop_frame,
+ remote_d10v_translate_xfer_address, show_regs,
+ d10v_register_raw_size): Ditto.
+ (d10v_register_virtual_type): Ditto. Use explicitly sized builtin
+ types.
+
+Sat Oct 23 19:08:39 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * d10v-tdep.c: Include "sim-d10v.h".
+ (enum ts2_regnums): Declare.
+ (d10v_register_sim_regno): New function.
+
+ * config/d10v/tm-d10v.h: Delete pre multi-arch code.
+ (REGISTER_SIM_REGNO): Define.
+ (d10v_register_sim_regno): Declare.
+
+Sat Oct 23 16:39:34 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * gdbarch.c (initialize_current_architecture): Make ``choice''
+ const.
+
+Wed Nov 10 16:10:22 1999 Jeffrey A Law (law@cygnus.com)
+
+ * hppa-tdep.c (hppa_fix_call_dummy): Fix typo in error message.
+
+Wed Nov 10 16:47:06 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * utils.c (error_last_message): Use gdb_file_xstrdup.
+
+ * defs.h (verror, internal_verror): Declare.
+
+ * utils.c (verror, internal_error): New functions.
+ (error, internal_error): Use verror / internal_verror.
+ (error_stream): Use gdb_file_xstrdup. Correctly handle %s in
+ error message body.
+ (error_init): Use mem_fileopen.
+
+ * corefile.c (memory_error): Use mem_fileopen instead of
+ tui_sfileopen. Don't call error_begin.
+ * remote-sim.c (gdb_os_error): Rewrite using verror. Don't call
+ error_begin.
+
+Wed Nov 10 14:21:43 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * defs.h (gdb_file_xstrdup): New function.
+ * utils.c (gdb_file_xstrdup, do_gdb_file_xstrdup): Implement.
+
+1999-11-09 Stan Shebs <shebs@andros.cygnus.com>
+
+ * exec.c (exec_file_attach), irix5-nat.c, osfsolib.c, solib.c
+ (info_sharedlibrary_command), pa64solib.c
+ (pa64_sharedlibrary_info_command), somsolib.c
+ (som_sharedlibrary_info_command): Replace "exec file" with
+ "executable file" in messages.
+
+1999-11-09 Jim Blandy <jimb@zwingli.cygnus.com>
+
+ Finish the job attempted by the previous change.
+ * stabsread.c (read_range_type): Make n2 and n3 LONGEST. Adjust
+ the various tests that check for maximum values, bit counts, etc.
+ In the long run, it might have been simpler just to give GDB bignums.
+
+Tue Nov 9 18:34:13 1999 Andrew Cagney <cagney@amy.cygnus.com>
+
+ * defs.h (gdb_file_put): Add parameter write.
+ (gdb_file_put_method_ftype): New typedef.
+ * utils.c (gdb_file_put, mem_file_put, tui_file_put,
+ null_file_put): Update.
+
+ * utils.c (struct gdb_file): Add field magic.
+ (gdb_file_new): Initialize.
+ (gdb_file_data): Verify.
+
+ * utils.c (mem_file_fputs): Delete. Replaced by.
+ (mem_file_write): New function. Rewrite mem_file.
+ (mem_file_new): Update.
+
+Tue Nov 9 17:51:12 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * remote-sim.c (gdb_os_write_stdout): Use gdb_file_write.
+ (gdb_os_flush_stdout): Flush gdb_stdtarg instead of gdb_stdout.
+
+Tue Nov 9 15:33:43 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * Makefile.in (procfs.o): Don't compile with -Werror for moment.
+ * sol-thread.c (info_cb): Move assignments to outside of if
+ statement.
+ (info_cb): Use paddr when printing addresses.
+
+1999-11-08 Jim Blandy <jimb@cygnus.com>
+
+ * defs.h (ULONGEST_MAX, LONGEST_MAX): New definitions.
+ * stabsread.c (read_huge_number): Parse and return LONGEST values.
+
+1999-11-08 Mark Salter <msalter@cygnus.com>
+
+ * utils.c (floatformat_to_doublest): Fix conversion of denormals.
+
+Mon Nov 8 20:14:13 1999 Andrew Cagney <cagney@amy.cygnus.com>
+
+ * remote.c (get_memory_read_packet_size): For moment limit read
+ size to PBUFSIZ.
+ (putpkt_binary): Remove check on packet size. Allocate ``cnt +
+ 6'' characters for output buffer.
+ (get_memory_packet_size): When packet size is ``fixed'' and the
+ size is zero, return MAX_REMOTE_PACKET_SIZE. Check that packets
+ are at least MIN_REMOTE_PACKET_SIZE.
+ (set_memory_packet_size): Print usage when ``args'' is NULL.
+
+Mon Nov 8 18:18:07 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * defs.h, utils.c (gdb_file_deallocate): Delete.
+ * corefile.c (memory_error): Use make_cleanup_gdb_file_delete.
+
+ * defs.h, utils.c (gdb_file_init_astring): Delete.
+
+ * defs.h, utils.c (tui_file_get_strbuf): Rename
+ gdb_file_get_strbuf.
+ (tui_file_adjust_strbuf): Rename gdb_file_adjust_strbuf.
+ * utils.c (error_stream, error_last_message): Update.
+
+Mon Nov 8 16:28:00 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * defs.h, utils.c (gdb_fclose): Delete.
+ * defs.h (make_cleanup_gdb_file): Declare.
+ * utils.c (make_cleanup_gdb_file_delete, do_gdb_file_delete): New
+ functions.
+
+ * symmisc.c (maintenance_print_symbols,
+ maintenance_print_psymbols, maintenance_print_msymbols): Use
+ make_cleanup_gdb_file_delete.
+ * serial.c (do_serial_close): Use gdb_file_delete.
+
+Mon Nov 8 14:16:32 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * defs.h (gdb_file_write_ftype, set_gdb_file_write,
+ gdb_file_write): Declare.
+
+ * utils.c (struct gdb_file): Add to_write member.
+ (gdb_file_write, set_gdb_file_write): New functions.
+ (gdb_file_new): Initialize the write method.
+ (null_file_write): New function.
+ (null_file_fputs, null_file_write): ``write'' calls ``fputs'' and
+ ``fputs'' calls ``write'' when the other is implemented.
+ (stdio_file_new): Initialize write method.
+ (stdio_file_write): New function.
+
+ * utils.c (putchar_unfiltered, fputc_unfiltered): Use
+ gdb_file_write.
+
+Thu Nov 4 11:59:24 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * remote.c (get_memory_packet_size, set_memory_packet_size,
+ build_memory_packet_size): New functions. Set / compute / update
+ the size of a memory read / write packet.
+ (set_memory_read_packet_size, set_memory_write_packet_size): New
+ functions. Verify changes to the memory read / write packet size.
+ (prefered_memory_write_packet_size,
+ current_memory_write_packet_size, prefered_memory_read_packet_size,
+ current_memory_read_packet_size): New variables.
+ (get_memory_read_packet_size, get_memory_write_packet_size): New
+ functions. Determine the current memory read/write packet size. A
+ function is needed as ``current_register_packet_size'', a variable
+ is used in the calculation.
+ (register_remote_packet_sizes, build_remote_packet_sizes):
+ Initialize packet sizes according the current architecture.
+ (remote_fetch_registers, remote_write_bytes, remote_read_bytes,
+ build_remote_gdbarch_data): Update.
+ (_initialize_remote): Add the commands ``set remote
+ memory-read-packet-size'' and ``set remote
+ memory-write-packet-size''. Deprecate ``set remotepacketsize''.
+
+Sun Nov 7 18:09:54 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * target.h, target.c (target_load): Replace macro with a function.
+
+ * config/i960/tm-nindy960.h (ADDITIONAL_OPTION_HANDLER): Rewrite
+ replacing SET_TOP_LEVEL with catch_command_errors.
+ (nindy_open): Add extern declaration.
+
+ * top.h (top_level_val, SET_TOP_LEVEL): Delete.
+ * defs.h (catch_command_errors_ftype, catch_command_errors): Add
+ declarations.
+ * top.c (struct captured_command_args): Declare.
+ (do_captured_command, catch_command_errors): New functions. Call
+ the command function via catch_errors.
+ (catch_errors): Add more comments.
+
+ * main.c (struct captured_main_args): Define.
+ (captured_main): New. Rewrite main. Replace SET_TOP_LEVEL with
+ calls to catch_command_errors. Delete calls to do_cleanups which
+ are now handled by catch_errors. Call the command loop via
+ captured_command_loop and catch_errors.
+ (main): Move code body to captured_main. Call captured_main via
+ catch_errors.
+ (captured_command_loop): New function. Wrap call to command_loop.
+
+1999-11-05 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * procfs.c (unconditionally_kill_inferior) (init_procinfo)
+ (create_procinfo) (procfs_exit_handler) (proc_set_exec_trap)
+ (do_attach) (do_detach) (procfs_wait) (set_proc_siginfo)
+ (procfs_resume) (info_proc_mappings)
+ (modify_run_on_last_close_flag) (procfs_lwp_creation_handler)
+ (procfs_thread_alive): Remove unused variables, conditionalize
+ vars declarations to eliminate compiler warnings.
+
+Fri Nov 5 16:32:04 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * inferior.h (CALL_DUMMY_ADDRESS, CALL_DUMMY_START_OFFSET,
+ CALL_DUMMY_BREAKPOINT_OFFSET, CALL_DUMMY_LENGTH,
+ CALL_DUMMY_STACK_ADJUST, CALL_DUMMY_WORDS,
+ SIZEOF_CALL_DUMMY_WORDS, PUSH_DUMMY_FRAME, FIX_CALL_DUMMY,
+ STORE_STRUCT_RETURN), d10v-tdep.c (print_insn), d30v-tdep.c
+ (print_insn), target.h (SOFTWARE_SINGLE_STEP): Call internal_error
+ instead of abort.
+
+ * utils.c (stdio_file_delete, stdio_file_flush, stdio_file_fputs,
+ stdio_file_isatty, tui_file_delete, tui_file_isatty,
+ tui_file_rewind, tui_file_put, gdb_file_init_astring,
+ gdb_file_get_strbuf, gdb_file_adjust_strbuf): Call internal_error
+ instead of error.
+
+1999-11-04 Kevin Buettner <kevinb@cygnus.com>
+
+ * remote.c (build_remote_gdbarch_data): Set remote_address_size...
+ (_initialize_remote) ...but don't set it here. Also, tie
+ remote_address_size to the target architecture via call to
+ register_gdbarch_swap().
+
+1999-11-04 Jeff Holcomb <jeffh@cygnus.com>
+
+ * remote-rdp.c (send_rdp): Fix typo.
+
+1999-11-04 Michael Snyder <msnyder@cleaver.cygnus.com>
+
+ * breakpoint.c (commands_command): remove unprotected ref to
+ args pointer (which may be null).
+
+1999-11-04 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * infcmd.c (print_return_value): New function. Print return value
+ from finish command.
+ (finish_command_continuation): Call print_return_value().
+ (finish_command): Ditto.
+
+1999-11-04 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * infrun.c (handle_inferior_event): Add calls to print_stop_reason()
+ for end of stepping range cases.
+
+Thu Nov 4 17:46:36 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * event-loop.c (gdb_do_one_event): Delete SET_TOP_LEVEL call.
+ Move error code to start_event_loop.
+ (start_event_loop): Call gdb_do_one_event via catch_errors.
+ Handle caught errors.
+
+Thu Nov 4 17:36:27 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * breakpoint.c (get_number): Delete static declaration.
+
+1999-11-03 Michael Snyder <msnyder@cleaver.cygnus.com>
+
+ * breakpoint.c (map_breakpoint_numbers): use a match count
+ instead of a goto.
+
+1999-11-03 Nick Clifton <nickc@cygnus.com>
+
+ * config/mcore/tm-mcore.h (TARGET_BYTE_ORDER_DEFAULT): Change to
+ little endian.
+
+1999-11-02 Michael Snyder <msnyder@cleaver.cygnus.com>
+
+ * target.h (target_new_objfile) replace macro with function pointer
+ hook. Any module needing notification of new objfiles may claim
+ this hook. Multiple notification clients must cooperate by saving
+ the previous pointer (if any) and calling it.
+ * sol-thread.c (_initialize_sol_thread): point new_objfile hook at
+ sol_thread_new_objfile. Save old pointer if any.
+ (sol_thread_new_objfile): call old owner of event hook if any.
+ * hpux-thread.c (_initialize_hpux_thread, hpux_thread_new_objfile):
+ ditto.
+ * linux-thread.c (_initialize_linux_thread, linux_thread_new_objfile):
+ ditto.
+ symfile.c (symbol_file_add, clear_symtab_users) call the new
+ function pointer hook, instead of the macro.
+ * config/sparc/nm-sun4sol2.h: remove define of target_new_objfile.
+ * config/pa/nm-hppah.h: ditto.
+ * config/i386/nm-i386sol2.h: ditto.
+ * config/i386/nm-linux.h: ditto.
+
+1999-11-02 Tom Tromey <tromey@cygnus.com>
+
+ * NEWS: Mention breakpoint ranges.
+
+1999-11-02 Fernando Nasser <fnasser@totem.to.cygnus.com>
+
+ * rdi-share/devsw.c (openLogFile): Change a call to setlinebuf()
+ to an equivalent call to setvbuf() to prevent an unresolved
+ reference when building on cygwin.
+
+1999-11-02 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * infrun.c (inferior_stop_reason): New enum, explicitly name the
+ resons for which the inferior stops.
+ (handle_inferior_event): Case TARGET_WAITKIND_EXITED: replace
+ printf's with call to print_stop_reason(). Case
+ TARGET_WAITKIND_SIGNALLED: Same. When stopped by random signal:
+ Same.
+ (print_stop_reason): New static function. Print relevant messages
+ when stopping.
+
+1999-11-02 Fernando Nasser <fnasser@totem.to.cygnus.com>
+
+ * rdi-share/Makefile.in: Rename dependency from bytesex.o to
+ angel_bytesex.o.
+
+1999-11-02 Fernando Nasser <fnasser@totem.to.cygnus.com>
+
+ * kod.c: Remove prototype for show_kod() which is no longer used.
+
+1999-11-01 Michael Snyder <msnyder@cygnus.com>
+ Tom Tromey <tromey@cygnus.com>
+
+ * tracepoint.h (get_tracepoint_by_number): Updated declaration.
+ * tracepoint.c (get_tracepoint_by_number): Added `multi_p'
+ argument. Now uses get_number_or_range and get_number.
+ (trace_pass_command): Allow a tracepoint range.
+ * breakpoint.h (get_number, get_number_or_range): Declare.
+ * breakpoint.c (get_number_trailer): New function.
+ (get_number): Rewrote to use get_number_trailer.
+ (get_number_or_range): New function.
+ (condition_command): Check `get_number' return value.
+ (commands_command): Likewise.
+ (ignore_command): Likewise.
+ (map_breakpoint_numbers): Use get_number_or_range.
+
+1999-11-01 Fernando Nasser <fnasser@totem.to.cygnus.com>
+
+ * remote-rdi.c (_initialize_remote_rdi): Make log commands
+ subcommands of maintenance. Remove improper identation from
+ command documentation.
+
+1999-11-01 Fernando Nasser <fnasser@totem.to.cygnus.com>
+
+ From Grant Edwards <grante@visi.com>:
+ * rdi-share/etherdrv.c (fetch_ports): Print out additional TCP/IP
+ port information in ethernet driver if the DEBUG flag is set.
+ * rdi-share/hostchan.c (Adp_addToQueue): Changed #if statement in
+ hostchan.c to avoid compiler complaint when DEBUG macro was
+ undefined.
+ * rdi-share/unixcomm.c (Unix_ReadSerial): Print system error code
+ if read() system call fails.
+
+1999-11-01 Fernando Nasser <fnasser@totem.to.cygnus.com>
+
+ * rdi-share/bytesex.h: Deleted. Conflicts with a system header file
+ on some systems like Linux Red Hat 5.2.
+ * rdi-share/angel_bytesex.h: New file. Replaces the above.
+ * rdi-share/bytesex.c: Deleted. Name changed to match the header
+ mentioned above (this is the implementation file).
+ * rdi-share/angel_bytesex.c: New file. Replaces the above.
+ * rdi-share/Makefile.am: Reflect above changes.
+ * rdi-share/Makefile.in: Reflect above changes.
+
+1999-11-01 Jimmy Guo <guo@cup.hp.com>
+
+ * annotate.c (breakpoints_changed, annotate_ignore_count_change,
+ annotate_stopped): Provide annotation for breakpoint ignore_count
+ changes but only provide once at annotate_stopped time for
+ sucessive ignore_count triggered breakpoint changes, to make GUIs
+ happy yet lazy.
+ * annotate.h (annotate_ignore_count_change): Declare.
+ * breakpoint.c (bpstat_stop_status): Call
+ annotate_ignore_count_change when ignore_count changes.
+
+1999-11-01 Fernando Nasser <fnasser@totem.to.cygnus.com>
+
+ From Grant Edwards <grante@visi.com>:
+ * rdi-share/ardi.c (HandleStoppedMessage): Changed code that
+ handles the "stop" message so that unrecognized errors are
+ returned as "Error" rather than "NoError". The old code resulted
+ in some error conditions not being reported to the user.
+
+1999-11-01 Fernando Nasser <fnasser@totem.to.cygnus.com>
+
+ From Grant Edwards <grante@visi.com>:
+ * remote-rdi.c (arm_rdi_open): Added a call to Adp_CloseDevice()
+ before attempting to open a connection. This allows the user to
+ issue the "target rdi" command multiple times (in case the user
+ needs to change options or re-initialize the link).
+
+1999-11-01 Fernando Nasser <fnasser@totem.to.cygnus.com>
+
+ From Grant Edwards <grante@visi.com>:
+ * rdi-share/endian.h: Deleted. Name clash with
+ /usr/include/endian.h. This was causing the wrong byte order to
+ be used by htons() in the RDI Ethernet driver.
+ * rdi-share/angel_endian.h: New file. Replaces the above.
+ * rdi-share/ardi.c: Replace include to reflect the above change.
+ * rdi-share/etherdrv.c: Ditto.
+ * rdi-share/hsys.c: Ditto.
+ * rdi-share/msgbuild.c: Ditto.
+ * rdi-share/params.c: Ditto.
+ * rdi-share/rx.c: Ditto.
+ * rdi-share/tx.c: Ditto.
+ * rdi-share/Makefile.am: Reflect above changes.
+ * rdi-share/Makefile.in: Reflect above changes.
+
+1999-11-01 Fernando Nasser <fnasser@totem.to.cygnus.com>
+
+ From Grant Edwards <grante@visi.com>:
+ * remote-rdi.c (_initialize_remote_rdi): Added command
+ rdilogenable. Allows the user to log ADP packets that are
+ exchanged between gdb and the target. Both the raw packets are
+ shown and some minimal decoding is attempted. Default state is
+ disabled.
+ (_initialize_remote_rdi): Added command rdilogfile. Allows the
+ user to specify the filename to which the ADP packet log is to be
+ written. Default state is "rdi.log".
+ (rdilogenable_command): New function. Related to rdilogenable.
+ (rdilogfile_command): New function. Related to rdilogfile.
+ * rdi-share/devsw.c (openLogFile, closeLogFile,
+ DevSW_SetLogEnable, DevSW_SetLogfile, dumpPacket): New
+ functions. Implement logging.
+ (DevSW_Read): Log if requested.
+ (DevSW_Write): Log if requested.
+ * rdi-share/devsw.h: Add prototypes for DevSW_SetLogfile and
+ DevSW_SetLogEnable.
+ * rdi-share/hostchan.c (Adp_SetLogEnable, Adp_SetLogfile): New
+ functions. Related to rdilogenable and rdilogfile.
+ * rdi-share/hostchan.h: Add prototypes for the above functions.
+
+1999-11-01 Fernando Nasser <fnasser@totem.to.cygnus.com>
+
+ From Grant Edwards <grante@visi.com>:
+ * remote-rdi.c (arm_rdi_open): Added code to split the arguments
+ to the 'target rdi' command at the first space. The first word is
+ passed to Adp_OpenDevice as the device name, the tail is passed as
+ the "arguments" parameter. This allows user specified baud rates
+ -- among other things that still need to be documented [e.g. (gdb)
+ target rdi /dev/ttyS1 19200]. NB: With very limited testing, the
+ ARM Embedded-ICE seems to run at 19.2K (though it is reported to
+ be unreliable above 9600), and the EPI Jeeni seems to run at
+ 38.4K.
+
+1999-11-01 Fernando Nasser <fnasser@totem.to.cygnus.com>
+
+ From Grant Edwards <grante@visi.com>:
+ * remote-rdi.c (_initialize_remote_rdi): Added the boolean
+ set/show variable rdiromatzero. Should be set to true if the
+ target has ROM at address 0. If true, then gdb will not tell the
+ target to trap fetches to interrupt vectors (which are located at
+ address 0). Using the Angel monitor, attempting to set
+ breakpoints in ROM is an error. Using JTAG debugging of the
+ ARM7TDMI, attempting to set more than two breakpoints in ROM is an
+ error. Default state is false (vectors will be trapped) -- used to
+ be hardwired false.
+
+1999-11-01 Fernando Nasser <fnasser@totem.to.cygnus.com>
+
+ From Grant Edwards <grante@visi.com>:
+ * remote-rdi.c (_initialize_remote_rdi): Added the boolean
+ set/show variable rdiheartbeat. This enables or disables ADP
+ link-check "heartbeat" packets sent by the host to the target.
+ Heartbeat packets can cause both the ARM Embedded-ICE and the EPI
+ Jeeni to malfunction: If a heartbeat packet is received by the
+ target while it is sending a packet, that packet will be aborted,
+ and the ADP protocol engine then gets very confused. Default state
+ is off -- used to hardwired on.
+
+1999-10-29 Kevin Buettner <kevinb@cygnus.com>
+
+ * i386-linux-nat.c (dummy_sse_values): Also define for systems
+ without PTRACE_GETXFPREGS.
+
+1999-10-29 Jim Blandy <jimb@zwingli.cygnus.com>
+
+ Hardware watchpoint fix from Eli Zaretskii <eliz@gnu.org>:
+
+ * breakpoint.c (insert_breakpoints): Fetch the value of the
+ expression we need to watch. If it's a lazy memory lvalue, then
+ we need to fetch it now, before we start the inferior again.
+ (insert_breakpoints, remove_breakpoint, bpstat_stop_status,
+ can_use_hardware_watchpoint): Only those values representing
+ memory we actually fetched need to be watched.
+
+1999-10-29 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * breakpoint.h (bpstat_print): Return 'enum print_stop_action',
+ not 'int'.
+
+1999-10-29 Jim Blandy <jimb@zwingli.cygnus.com>
+
+ * acconfig.h: Fix entries for HAVE_STRUCT_SAVE_STATE_T,
+ HAVE_STRUCT_MEMBER_SS_WIDE, and HAVE_PTRACE_GETXFPREGS.
+ * config.h.in: Regenerated.
+
+1999-10-28 Jim Blandy <jimb@zwingli.cygnus.com>
+
+ Fixes for warnings from Andreas Jaeger <aj@suse.de>.
+ * linux-thread.c (linuxthreads_sig_restart,
+ linuxthreads_sig_cancel, linuxthreads_sig_debug): Add missing
+ initializers to avoid gcc warnings.
+ (resume_thread): Add braces as recommended by gcc -Wparentheses.
+ (stop_thread): Likewise.
+ (linuxthreads_wait): Likewise.
+ (linuxthreads_find_trap): Likewise.
+
+1999-10-28 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * infcmd.c: Fix typo.
+
+1999-10-28 Jim Blandy <jimb@cygnus.com>
+
+ * gdbtypes.c (init_simd_type): The upper bound to
+ create_range_type is inclusive, not exclusive.
+
+ Add preliminary support for the Pentium-III's Streaming SIMD
+ Extensions --- specifically, the ability to read the XMM
+ registers.
+ * Configure.in: Check for PTRACE_GETXFPREGS, and #define
+ HAVE_PTRACE_GETXFPREGS if we have it.
+ * acconfig.h: Add entry for HAVE_PTRACE_GETXFPREGS.
+ * configure, config.in: Regenerated.
+ * config/i386/tm-linux.h (HAVE_SSE_REGS): #define, iff the
+ configure script #defined HAVE_PTRACE_GETXFPREGS.
+ (REGISTER_VIRTUAL_TYPE): Provide the proper types for the pointer
+ registers and the SSE registers.
+ * i386-linux-nat.c (GETREGS_SUPPLIES, GETFPREGS_SUPPLIES,
+ GETXFPREGS_SUPPLIES): New macros.
+ (have_ptrace_getxfpregs): New variable.
+ (FPREGSET_T_FPREG_ADDR): Renamed from FPREGSET_T_FPREG_OFFSET.
+ (supply_fpregset, convert_to_fpregset): Callers changed.
+ (supply_xfpregset, convert_to_xfpregset, fetch_xfpregs,
+ store_xfpregs, dummy_sse_values): New functions.
+ (fetch_inferior_registers, store_inferior_registers): Use the
+ *_SUPPLIES macros to decide how to fetch a given register. Use
+ {fetch,store}_xfpregs and dummy_sse_values to provide access to
+ the SSE registers, on systems where they are present.
+
+1999-10-28 Kevin Buettner <kevinb@cygnus.com>
+
+ * gdbserver/gdbreplay.c (config.h, errno.h): Include.
+ (perror_with_name): Don't declare sys_nerr, sys_errlist, or errno
+ when STDC_HEADERS is defined.
+ * gdbserver/utils.c (STDC_HEADERS): Likewise.
+
+ * gdbserver/low-hppabsd.c, gdbserver/low-linux.c,
+ gdbserver/low-lynx.c, gdbserver/low-sim.c, gdbserver/low-sparc.c,
+ gdbserver/low-sun3.c (my_registers): Declare.
+ (registers): Changed from array type to pointer type in order
+ to match declaration in inferior.h in main gdb sources.
+ * gdbserver/server.h (registers): Likewise.
+ * gdbserver/remote-utils.c (outreg): Removed declaration of
+ registers[].
+
+ * gdbserver/low-linux.c (fetch_register): Changed PTRACE_PEEKUSR to
+ PTRACE_PEEKUSER. [Note the missing 'E'.]
+ (store_inferior_registers): Likewise for PTRACE_POKEUSER.
+
+ * gdbserver/low-linux.c (sys/ptrace.h): Move include to
+ avoid conflict with #defines coming from <sys/user.h>.
+ (sys/reg.h): Only include when HAVE_SYS_REG_H is defined.
+ (PTRACE_XFER_TYPE): Provide a default type in case
+ the target doesn't define it.
+ (fetch_register, read_inferior_memory, write_inferior_memory):
+ Use PTRACE_XFER_TYPE instead of int for ptrace() transfers.
+ (I386_GNULINUX_TARGET): Use #ifdef with this symbol instead
+ of assuming it's an x86 target when it's not a m68k target.
+ (i386_register_raw_size, i386_register_byte): Define these arrays
+ to match other changes that've been occuring to the x86 target
+ in the main gdb sources.
+ (initialize_arch): New (static) function for doing target arch
+ specific initializations.
+
+ * gdbserver/server.h (MAXBUFBYTES, PBUFSIZ): New defines
+ [actually stolen from remote.c].
+ * gdbserver/remote-utils.c (putpkt): Use PBUFSIZ to make
+ sure that buffer is big enough.
+ * gdbserver/server.c (main): Ditto.
+
+ * gdbserver/remote-utils.c (outreg): Allow register numbers
+ bigger than 255.
+ (prepare_resume_reply): Provide alternate mechanism,
+ GDBSERVER_RESUME_REGS, for defining list of registers to send
+ to gdb.
+ * gdbserver/Makefile.in (INTERNAL_CFLAGS): Swapped order of
+ INCLUDE_CFLAGS and BFD_CFLAGS to ensure that gdb's config.h
+ gets found before bfd's config.h. Also added -DGDBSERVER
+ switch.
+ (INCLUDE_CFLAGS): Added -I.. .
+
+1999-10-27 Nick Clifton <nickc@cygnus.com>
+
+ * arm-tdep.c (THUMB_BE_BREAKPOINT): Change to 0xbebe.
+ (THUMB_LE_BREAKPOINT): Change to 0xbebe.
+
+Mon Oct 25 18:22:06 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * remote.c: Document future of compare_sections_command.
+ (remote_insert_breakpoint, remote_remove_breakpoint,
+ remote_insert_watchpoint, remote_insert_watchpoint,
+ remote_remove_watchpoint, remote_insert_hw_breakpoint,
+ remote_remove_hw_breakpoint): Use alloca instead of GCC's dynamic
+ array feature.
+
+Mon Oct 25 18:08:31 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * gdbarch.h (REGISTER_GDBARCH_SWAP): Define.
+ * gdbarch.sh: Update.
+
+Sat Oct 23 16:39:34 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * gdbarch.c (initialize_current_architecture): Make ``choice''
+ const.
+
+1999-10-22 Tom Tromey <tromey@cygnus.com>
+
+ * gdbarch.sh: Updated for gdbarch.[ch] changes.
+ * top.c (gdb_init): Call initialize_current_architecture.
+ * gdbarch.h (initialize_current_architecture): Declare.
+ * gdbarch.c (initialize_current_architecture): New function.
+
+1999-10-21 Michael Snyder <msnyder@cleaver.cygnus.com>
+
+ * utils.c (chars_per_line): fix typo in comment.
+
+1999-10-21 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * breakpoint.h (bp_print_how): New enum, used for deciding how to
+ print bpstat information when we stop, instead of having 3
+ different functions.
+ (struct bpstat): Change print_it field to be an enum instead of a
+ function pointer.
+
+ * breakpoint.c (print_it_typical): New name for print_it_normal().
+ (print_bp_stop_message): New function. High level routine for
+ printing of why we stopped.
+ (bpstat_print): Call print_bp_stop_message instead of using the
+ print_it function pointer.
+ (print_it_done, print_it_noop): Delete these functions.
+
+1999-10-21 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * breakpoint.c (print_it_normal): Reorganize into a switch
+ statement.
+
+1999-10-21 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * Makefile.in (event-top.o): Add dependency on target.h.
+ * event-top.c: Make dependency on target.h explicit.
+
+ * breakpoint.c (bpstat_print): Clean up logic. Remove recursion.
+ (catch_exec_command_1): Surround with appropriate ifdef's,
+ to avoid compiler warnings.
+ (catch_fork_command_1): Ditto.
+
+1999-10-20 Jim Blandy <jimb@cygnus.com>
+
+ * Makefile.in (dwarf2read.o): Note that this depends on bfd/elf-bfd.h.
+ (elf_bfd_h): New variable.
+
+1999-10-19 Jim Blandy <jimb@cygnus.com>
+
+ * config/i386/tm-i386.h (REGISTER_NAMES): Change names of FPU
+ instruction and operand pointer registers to improve consistency,
+ following J. T. Conklin's suggestions.
+
+1999-10-18 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * breakpoint.h: Change return type of field print_it of struct
+ bpstats to enumeration print_stop_action.
+ Define new enumeration print_stop_action.
+
+ * breakpoint.c (print_it_normal): Change return type to
+ enumeration type print_stop_action. Handle bp_shlib_event here
+ instead of in normal_stop().
+ (bpstat_print): Change return type to enumeration type
+ print_stop_action.
+ (print_it_done): Ditto.
+ (print_it_noop): Ditto.
+
+ * infrun.c (is_internal_shlib_eventpoint): Delete this function.
+ (stopped_for_internal_shlib_event): Delete.
+ (normal_stop): Move logic to handle bp_shlib_event from here to
+ print_it_normal(). Use switch to handle return value from
+ bpstat_print().
+
+Mon Oct 18 17:32:51 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * symfile.c (generic_load): Rewrite. Make the size of each
+ chunk/block write a run-time option. Check for quit_flag.
+ Use target_write_memory_partial for downloads.
+
+1999-10-18 Jim Blandy <jimb@cygnus.com>
+
+ Change Linux x86 register support to use the new tm-i386.h layout.
+ * config/i386/tm-linux.h (HAVE_I387_REGS): #define this, so we get
+ the full set of FP register definitions from tm-i386.h.
+ (REGISTER_RAW_SIZE, REGISTER_NAMES, REGISTER_BYTES, REGISTER_BYTE,
+ MAX_REGISTER_VIRTUAL_SIZE, MAX_REGISTER_RAW_SIZE, NUM_REGS,
+ NUM_FREGS): Remove #undefs and subsequent redefinitions: we're
+ using the values from tm-i386.h now.
+ (FPSTART_REGNUM, FPCONTROL_REGNUM, FPSTATUS_REGNUM, FPTAG_REGNUM,
+ FPDATA_REGNUM, FPEND_REGNUM, FPENV_BYTES, FPREG_RAW_SIZE,
+ FPREG_BYTES): Deleted.
+ (TARGET_LONG_DOUBLE_BIT): Deleted.
+ (REGISTER_CONVERTIBLE, REGISTER_CONVERT_TO_VIRTUAL,
+ REGISTER_CONVERT_TO_RAW): Redefine these only if LD_I387 is #defined.
+ * i386-linux-nat.c (convert_to_gregset, convert_to_fpregset,
+ FPREGSET_T_FPREG_OFFSET): New functions and macros.
+ (supply_gregset, fill_gregset, supply_fpregset,
+ fill_fpregset, fetch_fpregs, store_fpregs, fetch_regs,
+ store_regs, fetch_inferior_registers, store_inferior_registers):
+ Adjusted to use new macros from tm-i386.h.
+
+ * config/i386/tm-i386.h: Provide a decent x86 FPU description here,
+ so that the various i386 targets can share more FPU handling code.
+ (NUM_GREGS): New macro.
+ (NUM_SSE_REGS): New macro, dependent on HAVE_SSE_REGS
+ (NUM_FREGS): Depend on HAVE_I387_REGS.
+ (NUM_REGS, REGISTER_BYTES): Define in terms of NUM_GREGS,
+ NUM_FREGS, and NUM_SSE_REGS.
+ (MAX_NUM_REGS): New macro.
+ (REGISTER_NAMES): Expand name list with FPU control registers and
+ SSE registers.
+ (FP7_REGNUM, FCTRL_REGNUM, FSTAT_REGNUM, FTAG_REGNUM, FCS_REGNUM,
+ FCOFF_REGNUM, FDS_REGNUM, FDOFF_REGNUM, FOP_REGNUM,
+ FIRST_FPU_CTRL_REGNUM, LAST_FPU_CTRL_REGNUM): New macros, more
+ fully describing the FPU register set.
+ (XMM0_REGNUM, XMM7_REGNUM, MXCSR_REGNUM): New macros, describing
+ the SSE register set.
+ (IS_FP_REGNUM, IS_SSE_REGNUM, FPU_REG_RAW_SIZE, SIZEOF_GREGS,
+ SIZEOF_FPU_REGS, SIZEOF_FPU_CTRL_REGS, SIZEOF_SSE_REGS): New
+ convenience macros.
+ (REGISTER_BYTE, REGISTER_RAW_SIZE, REGISTER_VIRTUAL_SIZE): Turn
+ these into tables, since the register sizes are pretty irregular.
+ (i386_register_byte, i386_register_raw_size,
+ i386_register_virtual_size): New extern declarations.
+ (TARGET_LONG_DOUBLE_BIT): Define.
+ (MAX_REGISTER_RAW_SIZE): Bump to 16, for the SSE registers.
+ (REGISTER_VIRTUAL_TYPE, REGISTER_CONVERTIBLE,
+ REGISTER_CONVERT_TO_VIRTUAL, REGISTER_CONVERT_TO_RAW): New macros
+ for handling floating-point registers.
+ (i387_to_double, double_to_i387): New extern declarations.
+ * i386-tdep.c (i386_register_byte, i386_register_raw_size,
+ i386_register_virtual_size): New arrays.
+ (_initialize_i386_tdep): Initialize i386_register_byte and
+ i386_register_virtual_size.
+
+ * i386-tdep.c (_initialize_i386_tdep): Move new_cmd to a block
+ created specially for its use.
+
+Mon Oct 18 23:36:58 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * symfile.c (generic_load): Cleanup the validate code - remove
+ #ifdef, use paddr to print address.
+ (validate_download): Static, replace VALIDATE_DOWNLOAD
+
+ * symfile.c (generic_load): Use strtoul to scan the optional load
+ offset. Allocate a filename of the correct size.
+
+Mon Oct 18 17:32:51 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * symfile.c (generic_load): Don't filter output. Use
+ print_transfer_performance for summary. Use paddr for addresses.
+ (print_transfer_performance): New function. Includes write count.
+ (report_transfer_performance): Call
+ print_transfer_performance. Deprecate.
+
+ * defs.h (print_transfer_performance): Add declaration.
+ (generic_load): Move declaration to here.
+ * symfile.h (generic_load): From here.
+
+Mon Oct 18 16:29:52 1999 Andrew Cagney <cagney@amy.cygnus.com>
+
+ * remote.c (remote_write_bytes): Re-write. Transfer a single
+ packet and then return the that packets byte size.
+
+Sun Oct 17 15:09:00 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * remote.c (remote_console_output): Flush gdb_stdtarg after
+ processing an ``O'' packet.
+ * remote.h (remote_console_output): Strip PARAMS.
+
+Sun Oct 17 15:12:33 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * target.c (target_xfer_memory_partial): New function. Simple
+ implementation of partial memory reads.
+ (target_read_memory_partial): New function. Replaces old
+ target_read_memory_partial.
+ (target_write_memory_partial): New function.
+ * target.h: Update.
+
+ * valprint.c (partial_memory_read): New function, based on old
+ memory_read_partial. Implement partial memory reads the way that
+ val_print_string likes.
+ (val_print_string): Use partial_memory_read.
+
+Sun Oct 17 13:58:56 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * defs.h (ui_load_progress_hook): Add declaration.
+ * dsrec.c (ui_load_progress_hook): Delete extern declaration.
+
+ * symfile.c (ui_load_progress_hook): Make first argument const.
+ (generic_load): Don't cast the result of bfd_get_section_name.
+ Replace ``sect'' with ``sect_name'', use consistently.
+
+1999-10-15 Jim Blandy <jimb@cygnus.com>
+
+ Add beginnings of support for SIMD register types.
+ * gdbtypes.c (init_simd_type): New function for building
+ types for registers consisting of arrays of objects.
+ (builtin_type_v4sf): New built-in type.
+ (build_gdbtypes): Initialize it.
+ (_initialize_gdbtypes): Arrange for gdbarch swapping.
+ * gdbtypes.h (builtin_type_v4sf): Add external decl.
+
+Fri Oct 15 18:20:33 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * remote-hms.c: Commented out H8 code.
+
+Fri Oct 15 17:46:39 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * dcache.c (dcache_p): Rename variable remote_dcache. Make
+ static.
+ (_initialize_dcache): Fix description of ``set remotecache''.
+ Cache is OFF by default.
+
+1999-10-13 Jim Blandy <jimb@cygnus.com>
+
+ * valops.c (value_push): Don't forget to initialize container_len.
+
+Wed Oct 13 17:58:20 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * utils.c (tui_file_flush): Don't call flush_hook. Don't try to
+ flush ``astring''.
+ * gdb-events.sh: Update
+ * top.c (flush_hook): Delete.
+
+1999-10-13 Kevin Buettner <kevinb@cygnus.com>
+
+ * mem-break.c (memory_insert_breakpoint,
+ memory_remove_breakpoint): Added missing return statements.
+
+Wed Oct 13 20:53:42 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * utils.c (mem_fileopen, mem_file_delete, mem_file_new,
+ mem_file_rewind, mem_file_put, mem_file_fputs): New functions.
+ * defs.h (mem_fileopen): Declare.
+
+1999-10-13 Kevin Buettner <kevinb@cygnus.com>
+
+ * mem-break.c (default_memory_insert_breakpoint): Renamed from
+ memory_insert_breakpoint.
+ (default_memory_remove_breakpoint): Renamed from
+ memory_remove_breakpoint.
+ (memory_insert_breakpoint, memory_remove_breakpoint,
+ MEMORY_INSERT_BREAKPOINT, MEMORY_REMOVE_BREAKPOINT): New
+ wrappers.
+ * target.h (default_memory_remove_breakpoint,
+ default_memory_insert_breakpoint): Added declarations.
+ * gdbarch.sh (MEMORY_INSERT_BREAKPOINT, MEMORY_REMOVE_BREAKPOINT):
+ New methods.
+ * gdbarch.h, gdbarch.c (MEMORY_INSERT_BREAKPOINT,
+ MEMORY_REMOVE_BREAKPOINT, gdbarch_memory_insert_breakpoint,
+ gdbarch_memory_remove_breakpoint, set_gdbarch_memory_insert_breakpoint,
+ set_gdbarch_memory_remove_breakpoint) : Generated from gdbarch.sh.
+
+Wed Oct 13 19:15:51 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * defs.h: Remove PARAMS from all declarations. Re-indent. Clean
+ up the gdb_file declarations.
+
+Tue Oct 12 12:19:07 1999 David Taylor <taylor@texas.cygnus.com>
+
+ * i386-linux-nat.c (supply_fpregset, fill_fpregset): copy
+ from/to start of fpregsetp not start of st_space as the first
+ stuff we copy is the FP control registers not the actual FP values.
+
+1999-10-12 Fernando Nasser <fnasser@totem.to.cygnus.com>
+
+ * eval.c (evaluate_subexp_standard): Fix gdb invocation of
+ inferior C functions when debugging C++ code.
+ * valops.c (find_overload_match): Ditto.
+ * symtab.c (make_symbol_overload_list): Ditto.
+
+1999-10-11 Jim Blandy <jimb@zwingli.cygnus.com>
+
+ * config/pa/tm-hppa.h (SYMBOLS_CAN_START_WITH_DOLLAR): It's not
+ enough to #define this; you have to give it a non-zero value.
+
+1999-10-11 Jim Blandy <jimb@cygnus.com>
+
+ Fix from Jim Kingdon <kingdon@redhat.com>, with tweaks to make it
+ gdbarch- and bigendian-friendly:
+ * valops.c (PARM_BOUNDARY): If not #defined, default to zero.
+ (value_push): If PARM_BOUNDARY is not zero, align arguments to
+ that boundary.
+ * config/i386/tm-i386.h: Define PARM_BOUNDARY.
+
+Mon Oct 11 14:23:55 1999 Fred Fish <fnf@cygnus.com>
+
+ * config/mips/tm-irix3.h (PS_REGNUM): Don't undef if we aren't
+ going to redefine it to something else.
+
+1999-10-11 Jason Merrill <jason@yorick.cygnus.com>
+
+ * dwarfread.c (read_func_scope): Don't try to set main_func_*;
+ we handle that in blockframe.c:inside_main_func.
+ * dwarf2read.c (read_func_scope): Likewise.
+ (dwarf2_add_field, dwarf2_add_member_fn): Get member function name
+ directly, not from mangled name.
+ (skip_member_fn_name): Lose.
+
+Mon Oct 11 12:24:52 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * serial.h (enum serial_rc): Clarify SERIAL_TIMEOUT and
+ restrictions on TIMEOUT in ASYNC mode.
+
+ * serial.c (serial_readchar): Check for invalid timeout when in
+ async mode. Disable test.
+
+Thu Oct 7 17:20:01 1999 Andrew Cagney <cagney@amy.cygnus.com>
+
+ * monitor.c (monitor_printable_string): Add length argument. Don't
+ return final string length.
+ (monitor_printf_noecho, monitor_printf, monitor_expect): Update.
+ (monitor_error): Pass real_len to monitor_printable_string.
+ (monitor_error): Rewrite. Replace printf fmt string parameter with
+ function name and message parameters.
+ (monitor_read_memory_single, monitor_read_memory): Update.
+
+1999-10-07 Stan Shebs <shebs@andros.cygnus.com>
+
+ * main.c (print_gdb_help): Fix bug reporting address.
+ * gnu-regex.h, gnu-regex.c: Ditto.
+
+1999-10-07 Jim Blandy <jimb@zwingli.cygnus.com>
+
+ * parse.c (SYMBOLS_CAN_START_WITH_DOLLAR): New macro,
+ whose value can be overridden by target files.
+ (write_dollar_variable): Don't check the symbol table for
+ identifiers beginning with `$' unless
+ SYMBOLS_CAN_START_WITH_DOLLAR is non-zero.
+ * config/pa/tm-hppa.h (SYMBOLS_CAN_START_WITH_DOLLAR): Define.
+ * doc/gdbint.texinfo (SYMBOLS_CAN_START_WITH_DOLLAR): Document.
+
+ Remove all traces of the BINOP_SCOPE operator. It's never
+ generated, and not implemented.
+ * expression.h (enum exp_opcode): Delete BINOP_SCOPE.
+ * c-lang.c (c_op_print_tab): Delete entry for BINOP_SCOPE.
+ * eval.c (evaluate_subexp_standard): Doc fix.
+ * expprint.c (op_name): Remove case for BINOP_SCOPE.
+ (dump_subexp): Same.
+
+ * dwarf2read.c (dwarf2_const_value): Treat DW_FORM_data1,
+ DW_FORM_data2, DW_FORM_data4, and DW_FORM_data8 as signed values,
+ since that's what read_var_value will do anyway.
+
+1999-10-07 Fred Fish <fnf@cygnus.com>
+
+ * objfiles.h (struct objfile): Delete is_solib member, now handled
+ by OBJF_SHARED bit in struct objfile's flags.
+ * objfiles.c (objfile_purge_solibs): Check OBJF_SHARED bit in flags
+ instead of old is_solib int member in objfile struct.
+
+ * objfiles.c (allocate_objfile): Remove is_solib arg. Now passed
+ as a bit in combined flags arg.
+ * symfile.c (symbol_file_add): Ditto.
+ * objfiles.h (allocate_objfile): Adjust prototype after removal
+ of is_solib arg.
+ * symtab.h (symbol_file_add): Ditto.
+
+ * cxux-nat.c (add_shared_symbol_files): Remove zero passed to
+ symbol_file_add in old is_solib arg, defaults to zero now in
+ flags.
+ * irix5-nat.c (symbol_add_stub): Ditto.
+ * remote-mm.c (mm_load): Ditto.
+ * remote-udi.c (udi_load): Ditto.
+ * remote-vx.c (vx_add_symbols): Ditto.
+ * symfile.c (symbol_file_command): Ditto.
+ (add_symbol_file_command): Ditto.
+
+ * coff-solib.c (coff_solib_add): Call symbol_file_add with
+ OBJF_SHARED in flags bit, rather than 1 in old is_solib
+ arg.
+ * osfsolib.c (symbol_add_stub): Ditto.
+ * pa64solib.c (pa64_solib_add_solib_objfile): Ditto.
+ * solib.c (symbol_add_stub): Ditto.
+ * somsolib.c (som_solib_add_solib_objfile): Ditto.
+ * win32-nat.c (handle_load_dll): Ditto.
+
+ * objfiles.c (allocate_objfile): Remove old args "mapped" and
+ "user_loaded". Replaced with new arg "flags" containing specific
+ If global var mapped_symbol_files is nonzero
+ then set OBJF_MAPPED in flags arg. Check for OBJF_MAPPED bit in
+ flags where we used to check mapped arg.
+ Pass flags to open_mapped_file instead of mapped arg.
+ Ensure that OBJF_MAPPED bit is reset in flags when the objfile
+ is not mapped. Add passed flags bits to objfile's flags bits.
+ (open_mapped_file): Replace "mapped" arg with new "flags" arg.
+ Adjust prototype. Pass flags to open_existing_mapped_file.
+ (open_existing_mapped_file): Replace "mapped" arg with new "flags".
+ Check flags for OBJF_MAPPED.
+ * objfiles.h (allocate_objfile): Adjust prototype.
+ * rs6000-nat.c (add_vmap): Pass zero for combined flags, rather
+ than separate zero ints for old "mapped" and "user_loaded" flags.
+ * symfile.c (symbol_file_add): Pass allocate_objfile combined flags
+ rather than individual mapped and user loaded bits.
+
+ * symfile.c (symbol_file_add): Delete user_loaded arg.
+ * symtab.h (symbol_file_add): Adjust prototype for deleted
+ user_loaded arg.
+ * objfiles.h (struct objfile): Delete user_loaded member.
+ (OBJF_USERLOADED): New flag bit to replace user_loaded.
+
+ * symfile.c (symbol_file_command): Add OBJF_USER_LOADED to flags
+ passed to symbol_file_add. Delete previous passing of explicit 1
+ for user_loaded.
+ (add_symbol_file_command): Ditto.
+
+ * coff-solib.c (coff_solib_add): No longer pass zero for user loaded,
+ now defaults to zero in flags.
+ * cxux-nat.c (add_shared_symbol_files): Ditto.
+ * irix5-nat.c (symbol_add_stub): Ditto.
+ * osfsolib.c (symbol_add_stub): Ditto.
+ * remote-mm.c (mm_load): Ditto.
+ * pa64solib.c (pa64_solib_add_solib_objfile): Ditto.
+ * remote-udi.c (udi_load): Ditto.
+ * remote-vx.c (vx_add_symbols): Ditto.
+ * solib.c (symbol_add_stub): Ditto.
+ * somsolib.c (som_solib_add_solib_objfile): Ditto.
+ * win32-nat.c (handle_load_dll): Ditto.
+
+Thu Oct 7 19:24:05 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * Makefile.in (monitor.o): Allow monitor.o to be compiled with
+ -Werror.
+
+ * monitor.c (monitor_debug_p): New variable. Replaces macro.
+ (EXTRA_RDEBUG): Delete. Update all uses.
+ (monitor_debug): New function. Replaces macro.
+ (RDEBUG): Delete macro. Update all uses.
+ debug output to gdb_stdlog and not the console.
+
+ * monitor.c: Fix printf formating. Replace printf calls with
+ fprintf_unfiltered.
+
+1999-10-06 Stan Shebs <shebs@andros.cygnus.com>
+
+ * MAINTAINERS: Switch ARM target maintenance from Elena
+ Zannoni to Jim Ingham.
+
+1999-10-06 Frank Ch. Eigler <fche@cygnus.com>
+
+ * remote.c (hexnumnstr): New function. Allow setting of width.
+ (hexnumstr): Call the above.
+ (remote_write_bytes): Fill in X-protocol address field more
+ reliably.
+
+1999-10-06 Fred Fish <fnf@cygnus.com>
+
+ * xcoffread.c (xcoff_symfile_offsets): Fix typo, addr->addrs.
+
+1999-10-06 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * remote.c (handle_remote_sigint_twice): Make this signal be
+ handled by inferior_event_handler, via the wrapper function.
+ (async_remote_interrupt_twice): Make not static. Add debug print.
+ * remote.h (async_remote_interrupt_twice): Export for use in
+ inf-loop.c.
+
+ * inf-loop.c (inferior_event_handler_wrapper): New function.
+ (inferior_event_handler): Handle a request to quit and kill the
+ target.
+ Include remote.h.
+ * inf-loop.h (inferior_event_handler_wrapper): Export.
+
+1999-10-04 James Ingham <jingham@leda.cygnus.com>
+
+ * remote-rdi.c (arm_rdi_open): If the angel_RDI_Open fails, close
+ the serial port and raise an error. If you try to go on, you will
+ stall forever down in the rdi-share code.
+
+1999-10-04 Fernando Nasser <fnasser@totem.to.cygnus.com>
+
+ * printcmd.c (output_command): Makes sure result from the output
+ command is printed before the next prompt.
+
+1999-10-04 Fernando Nasser <fnasser@totem.to.cygnus.com>
+
+ * printcmd.c (print_formatted): Add missing stream parameter.
+ (do_examine, print_command_1, output_command, do_one_display):
+ Adjust call to print_formatted().
+
+1999-10-04 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * infcmd.c: Remove include of event-loop.h.
+ * utils.c: Ditto.
+ * top.c: Ditto.
+
+ * infrun.c (fetch_inferior_event): Call inferior_event_handler
+ when inferior stops, instead of doing work ourselves.
+ (fetch_inferior_event): Use void* instead of gdb_client_data.
+ Remove includes of event-top.h and event-loop.h. Add include of
+ inf-loop.h.
+ (complete_execution): Move from here.
+
+ * inf-loop.c (complete_execution): To here.
+ (inferior_event_handler): Handle inferior's execution completion
+ case as well.
+ * inf-loop.h: Add def of INF_LOOP_H.
+
+ * event-top.h: Don't use gdb_client_data, use void*, to avoid
+ dependency on event-loop.h.
+
+ * remote.c (remote_async_resume): Set target_executing only after we
+ actually register the inferior with the event loop.
+
+1999-10-04 Fernando Nasser <fnasser@totem.to.cygnus.com>
+
+ * corefile.c (memory_error): Use error_stream() and eliminate call
+ to return_to_top_level().
+
+1999-10-04 Fernando Nasser <fnasser@totem.to.cygnus.com>
+
+ * utils.c (error): Save error message text (w/o new line).
+ (error_last_message): New function. Returns the last message
+ issued by gdb.
+ (error_init): New function. Initializes error handling machinery.
+ (error_stream): New function. Allows the error message to be
+ passed on a stream buffer.
+ * defs.h: Add prototypes for error_stream() and
+ error_last_message().
+ * main.c (main): Add call to error_init().
+
+1999-10-04 Fernando Nasser <fnasser@totem.to.cygnus.com>
+
+ * utils.c (tui_sfileopen): New function. Replaces
+ gdb_file_init_astring().
+ * defs.h: Add prototype for the above.
+
+Mon Oct 4 19:25:55 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * symfile.c (add_symbol_file_command): Fix -Wformat on query call.
+
+1999-10-01 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * target.c (cleanup_target): Type of to_async param is now
+ function with enum inferior_event_type param.
+
+ * target.h (target_ops): Adjust to_async accordingly. Move enum
+ inferior_event_type to this file. Don't have a typedef for
+ inferior_event_type. Add more enumeration constants INF_QUIT_REQ,
+ INF_EXEC_COMPLETE. Remove INF_SIGINT_FIRST, INF_SIGINT_SECOND.
+
+ * inf-loop.c (inferior_event_handler): Change first param to tell
+ the type of event we are dealing with. Deal with INF_ERROR and
+ INF_REG_EVENT, for the moment.
+ Include target.h.
+
+ * inf-loop.h (inferior_event_handler): Adjust prototype. Remove
+ enum inferior_event_type from here.
+
+ * remote.c (remote_async_serial_handler): Pass INF_REG_EVENT to
+ the client callback.
+ (remote_async): Change callback's param type to inferior_event_type.
+ (async_client_callback): Change type as above.
+
+1999-10-01 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * event-top.c (stdin_event_handler): Delete fd parameter, use
+ input_fd instead.
+ * event-top.h (stdin_event_handler): Delete fd parameter.
+
+ * inf-loop.c (inferior_event_handler): Delete fd parameter. Use
+ target_async() to unregister the inferior fd in case of errors.
+ * inf-loop.h(inferior_event_handler): Delete fd parameter.
+
+ * ser-unix.c (fd_event): Delete fd parameter. Use scb->fd,
+ instead.
+
+ * remote.c (async_client_callback): Delete fd parameter.
+ (remote_async_serial_handler): Ditto.
+ (remote_async): Adjust to new type of callback function.
+
+ * target.c (cleanup_target): Adjust parameters for to_async
+ default case.
+ * target.h (*to_async): Delete fd parameter from cb function.
+
+ * event-loop.h (handler_func): Delete fd parameter.
+ * event-loop.c (handle_file_event): Delete fd param from call to
+ proc. Do not include inferior.h.
+
+1999-10-01 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * event-loop.c (inferior_event_handler,
+ inferior_event_handler_wrapper): Move from here.
+ * inf-loop.c: To here. New file.
+
+ * event-loop.h (inferior_event_handler): Move from here.
+ * inf-loop.h: To here. New file.
+
+ * remote.c: Include inf-loop.h.
+ (set_extende_protocol): Remove unused prototpye.
+
+ * Makefile.in (SFILES): Add inf-loop.c.
+ (inf_loop_h): Define.
+ (COMMON_OBS): Add inf-loop.o.
+ (inf-loop.o): Add rule.
+ (remote.o): Add dependency on inf-loop.h.
+
+Fri Oct 1 19:59:31 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * ser-unix.c: Add some notes on how the async code works.
+
+Fri Oct 1 01:45:32 1999 Jeffrey A Law (law@cygnus.com)
+
+ * somread.c (som_symfile_offsets): Fix typo in last change.
+
+1999-09-30 Fred Fish <fnf@cygnus.com>
+
+ * coff-solib.c (coff_solib_add): Adjust call to symbol_file_add.
+ * cxux-nat.c (add_shared_symbol_files): Ditto.
+ * irix5-nat.c (symbol_add_stub): Ditto.
+ * osfsolib.c (symbol_add_stub): Ditto.
+ * pa64solib.c (pa64_solib_add_solib_objfile): Ditto.
+ * remote-mm.c (mm_load): Ditto.
+ * remote-udi.c (udi_load): Ditto.
+ * remote-vx.c (vx_add_symbols): Ditto.
+ * solib.c (symbol_add_stub): Ditto.
+ * somsolib.c (som_solib_add_solib_objfile): Ditto.
+ * win32-nat.c (handle_load_dll): Ditto.
+
+ * irix5-nat.c (symbol_add_stub): Add section_addrs, zero it.
+ * cxux-nat.c (add_shared_symbol_files): Ditto.
+ * osfsolib.c (symbol_add_stub): Ditto.
+ * pa64solib.c (pa64_solib_add_solib_objfile): Ditto.
+ * solib.c (symbol_add_stub): Ditto.
+ * somsolib.c (som_solib_add_solib_objfile): Ditto.
+ * symfile.c (symbol_file_command): Ditto.
+ * win32-nat.c (handle_load_dll): Ditto.
+
+ * irix5-nat.c (symbol_add_stub): Use section_addrs to pass text addr.
+ * cxux-nat.c (add_shared_symbol_files): Ditto.
+ * osfsolib.c (symbol_add_stub): Ditto.
+ * pa64solib.c (pa64_solib_add_solib_objfile): Ditto.
+ * solib.c (symbol_add_stub): Ditto.
+ * somsolib.c (som_solib_add_solib_objfile): Ditto.
+ * symfile.c (symbol_file_command): Ditto.
+ * win32-nat.c (handle_load_dll): Ditto.
+
+ * coff-solib.c (coff_solib_add): Call symbol_file_add with NULL ptr.
+ * cxux-nat.c (add_shared_symbol_files): Ditto.
+ * remote-udi.c (udi_load): Ditto.
+ * remote-vx.c (vx_add_symbols): Ditto.
+ * symfile.c (symbol_file_command): Ditto.
+
+ * dstread.c (dst_symfile_offsets): Take "section_addr_info *"
+ instead of CORE_ADDR.
+ * somread.c (som_symfile_offsets): Ditto.
+ * symfile.c (default_symfile_offsets): Ditto.
+ * xcoffread.c (xcoff_symfile_offsets): Ditto.
+
+ * symfile.h (default_symfile_offsets): Adjust prototype.
+ (syms_from_objfile): Ditto.
+ * symtab.h (symbol_file_add): Ditto.
+
+ * rs6000-nat.c (objfile_symbol_add): Call syms_from_objfile with NULL.
+ * xcoffsolib.c (solib_add): Ditto.
+ * gdb-stabs.h (SECT_OFF_MAX): Increase from 4 to 16.
+ * symtab.h (MAX_SECTIONS): Define.
+ (struct section_addr_info): New struct for better control over
+ changing load addresses of sections.
+ * objfiles.h (OBJF_READNOW): Add new flag bit.
+ * symfile.h (sym_offsets): Change second param from CORE_ADDR to
+ "section_addr_info *".
+
+ * symfile.c (symbol_file_add): Replace scalar arg "CORE_ADDR addr"
+ with "struct section_addr_info *addrs".
+ (syms_from_objfile): Ditto.
+ (add_symbol_file_command): Remove local variables "readnow" and
+ "mapped". Replaced with general "flags" variable.
+ (symbol_file_command): Ditto.
+ (add_symbol_file_command): Add local variables i, sec_num, argcnt,
+ expecting_option, option_index, and opt. Rework option parsing code
+ to handle additional options.
+ (_initialize_symfile): Adjust add-symbol-file usage to match new
+ option handling.
+ (symbol_file_add): Remove parameters "mapped" and "readnow",
+ replace with general "flags".
+ (symbol_file_add): In call to allocate_objfile, replace "mapped"
+ with extracted OBJF_MAPPED bit from flags.
+ (symbol_file_add): Use OBJF_READNOW bit from flags, instead of
+ "readnow" variable.
+ (symbol_file_command): Set OBJF_MAPPED and OBJF_READNOW bits
+ from parsed options. Pass flags to symbol_file_add.
+ (add_symbol_file_command): Ditto.
+ (syms_from_objfile): Add local variables i, sect, lower_sect,
+ lower_offset, and local_addr. Substitute local_addr for addrs
+ when addrs is NULL. Find lowest loadable section to be used as
+ starting point for contiguous sections. Adjust offsets if segments
+ are not contiguous. Call sym_offsets with section_addr_info
+ instead of single addr.
+ (default_symfile_offsets): Initialize objfile's section_offsets
+ with user specified offsets.
+ (symbol_file_add): Call syms_from_objfile with offsets.
+ (unknown_option_complaint): Add.
+ (add_symbol_file_command): Add "section_addrs", zero it with memset.
+
+1999-09-30 Jason Molenda (jsm@bugshack.cygnus.com)
+
+ * configure.in: Call config.sub explicitly instead of misusing the
+ autoconf internal variable $ac_config_sub.
+ * configure: Regenerated.
+
+Thu Sep 30 15:53:59 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * remote.c (readchar): When EOF mourn the inferior.
+ (getpkt): Try QUIT. Might not be a watchdog timer timeout.
+ (remote_async_serial_handler): Pass ``-1'' as the dummy FD. Safer
+ than ZERO == STDIN.
+
+ * serial.h (enum serial_rc): Replace #define SERIAL_ERROR,
+ SERIAL_TIMEOUT and SERIAL_EOF.
+ (struct _serial_t): Add more notes on termios specific fields.
+
+ * ser-unix.c (generic_readchar): Make SERIAL_ERROR sticky.
+ (do_hardwire_readchar, do_unix_readchar): Don't use bufcnt as a
+ tempoary for the return-value from read.
+
+ * serial.c (serial_logchar): Add a stream parameter.
+ (serial_readchar, serial_write, serial_send_break): Update.
+ (serial_readchar): Add serial debug trace.
+
+Thu Sep 30 12:07:03 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * serial.h (struct _serial_t): Add field async_state. Better
+ document field bufcnt.
+ (SERIAL_ERROR): Delete comment about errno.
+ * serial.c (serial_open, serial_fdopen): Initialize async_state.
+
+ * ser-unix.c (push_event, fd_event, reschedule): New functions.
+ Handle ASYNC serial input.
+ (ser_unix_async): Update.
+ (generic_readchar): New function. Handle event scheduling. Make
+ EOF condition sticky.
+ (do_unix_readchar): Rename ser_unix_readchar.
+ (ser_unix_readchar): New function, call do_unix_readchar via
+ generic_readchar.
+ (do_hardwire_readchar, hardwire_readchar): Ditto.
+
+ * ser-unix.c (ser_unix_readchar): Delete code working around ASYNC
+ fifo bugs.
+ (hardwire_readchar): Delete code working around ASYNC fifo bugs.
+
+Wed Sep 29 21:27:16 1999 Jeffrey A Law (law@cygnus.com)
+
+ * breakpoint.c (insert_breakpoints): Addresses are CORE_ADDRs,
+ not "int"s.
+ (remove_breakpoint): Likewise.
+
+1999-09-29 Fred Fish <fnf@cygnus.com>
+
+ * breakpoint.c (breakpoint_1): Replace cast "(CORE_ADDR) - 1"
+ with the more obviously intended expression "(CORE_ADDR) -1".
+ * dwarf2read.c (scan_partial_symbols, read_file_scope): Ditto.
+ * gnu-nat.c (gnu_create_inferior): Ditto.
+ * go32-nat.c (go32_create_inferior): Ditto.
+ * hppa-tdep.c (hppa_pop_frame): Ditto.
+ * infcmd.c (continue_command, step_1, signal_command): Ditto.
+ (until_next_command, finish_command): Ditto.
+ * infrun.c (proceed): Ditto.
+ * inftarg.c (child_create_inferior): Ditto.
+ * m3-nat.c (m3_create_inferior): Ditto.
+ * mac-nat.c (child_create_inferior): Ditto.
+ * procfs.c (procfs_create_inferior): Ditto.
+ * remote-sim.c (gdbsim_create_inferior): Ditto.
+ * target.c (target_link): Ditto.
+ * win32-nat.c (child_create_inferior): Ditto.
+
+Thu Sep 30 10:36:19 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * ser-unix.c (ser_unix_flush_input): New function. Discard input
+ buffer.
+ (hardwire_flush_input): Use ser_unix_flush_input.
+ (ser_unix_nop_flush_input): Delete.
+ * ser-unix.h (ser_unix_flush_input): Update.
+ ser-tcp.c (_initialize_ser_tcp), ser-pipe.c
+ (_initialize_ser_pipe): Update.
+
+ * ser-unix.c (hardwire_write): Delete.
+ (_initialize_ser_hardwire): Update, use ser_unix_write.
+
+Thu Sep 30 10:16:50 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * ser-pipe.c (pipe_open): Don't make the FD non-blocking. Already
+ being handled in ser_unix_wait_for by a select.
+
+Thu Sep 30 10:00:32 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * serial.h (struct _serial_t): Add field debug_p.
+ (SERIAL_DEBUG, SERIAL_DEBUG_P): Define.
+
+ * serial.c (serial_open, serial_fdopen): Initialize debug_p.
+ (serial_debug, serial_debug_p): New functions.
+ (global_serial_debug_p): New variable.
+ (_initialize_serial): Add ``set serialdebug'' command.
+
+Thu Sep 30 09:09:38 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * serial.h (serial_event_ftype): Replace FD and ERROR args with
+ SERRIAL_T arg.
+ * ser-unix.c (ser_unix_event): Update.
+
+ * remote.c (remote_async_serial_handler): New function. Handle
+ serial events.
+ (remote_async): Pass remote_async_serial_handler to SERIAL.
+ (async_client_callback, async_client_context): New variables.
+
+ * remote.c (extended_remote_async_create_inferior): Use
+ target_async to register the inferior event handler.
+
+Thu Sep 30 00:02:03 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * configure.in (AC_CHECK_FUNCS): Test for sigprocmask.
+ * configure, config.in: Re-generate.
+ * event-top.c (async_stop_sig): Use sigprocmask when available.
+
+1999-09-29 Doug Evans <devans@casey.cygnus.com>
+
+ * sh-stub.c (handle_exception): Fix typo in patch of 1999-08-26.
+ * m68k-stub.c (handle_exception): Ditto.
+
+1999-09-28 Fred Fish <fnf@cygnus.com>
+
+ * alpha-nat.c (alpha_osf_core_fns, alpha_elf_core_fns):
+ Add default entries for check_format and core_sniffer.
+ * core-aout.c (aout_core_fns): Ditto.
+ * core-regset.c (regset_core_fns): Ditto.
+ * core-sol2.c (solaris_core_fns): Ditto.
+ * i386aix-nat.c (i386aix_core_fns): Ditto.
+ * i386mach-nat.c (i386mach_core_fns): Ditto.
+ * irix4-nat.c (irix4_core_fns): Ditto.
+ * irix5-nat.c (irix5_core_fns): Ditto.
+ * lynx-nat.c (lynx_core_fns): Ditto.
+ * mips-nat.c (mips_core_fns): Ditto.
+ * ns32knbsd-nat.c (nat_core_fns): Ditto.
+ * rs6000-nat.c (rs6000_core_fns): Ditto.
+ * sparc-nat.c (sparc_core_fns): Ditto.
+ * sun-nat.c (sun3_core_fns): Ditto.
+ * ultra3-nat.c (ultra3_core_fns): Ditto.
+
+ * corelow.c (core_vec): New, for selected core file handler.
+ (sniff_core_bfd): New function.
+ (gdb_check_format): New function.
+ (default_check_format): New function.
+ (default_core_sniffer): New function.
+ (sniff_core_bfd): New function.
+ (core_close): Reset core_vec to NULL.
+ (core_open): Fall back to gdb_check_format if bfd_check_format
+ does not identify the file format. Call sniff_core_bfd to pick
+ a core file handler.
+ (get_core_registers): Remove code that is now in sniff_core_bfd.
+ Use current core_vec.
+
+ * gdbcore.h (check_format): New core_fns function, points to function
+ to try and identify a core file format.
+ (core_sniffer): New core_fns function, points to function to select
+ a specific handler for the selected core file format.
+ (default_core_sniffer): Add prototype.
+ (default_check_format): Add prototype.
+
+ * i960-tdep.c (inferior.h): Include.
+ * mips-tdep.c (read_next_frame_reg): Use ADDR_BITS_REMOVE
+ on addresses pulled from stack.
+
+1999-09-29 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * event-loop.c (poll_timers): Check whether the timer list has any
+ element on it by looking at the first element pointer, instead of
+ num_timers.
+
+Wed Sep 29 18:02:31 1999 Andrew Cagney <cagney@amy.cygnus.com>
+
+ * command.c: Attempt to include POSIX <sys/wait.h> before
+ <wait.h>.
+
+ * ser-unix.c (hardwire_print_tty_state): Ditto.
+ * inflow.c (child_terminal_info): Fix printf args.
+
+1999-09-28 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * remote.c (remote_async_resume): Register the inferior with the
+ event loop.
+ (remote_async_open_1): Don't put the target in async mode here,
+ just do it when executing.
+
+ * infrun.c (complete_execution): Unregister the inferior from the
+ event loop.
+
+ * event-top.c (async_disable_stdin): Don't add
+ async_enable_stdin() to the exec_cleanups chain.
+
+Tue Sep 28 11:08:34 1999 Jeffrey A Law (law@cygnus.com)
+
+ * hppa-tdep.c (hppa_fix_call_dummy): Ignore IMPORT_SHLIB stubs
+ except for hpux11 native. Break out of the loop to find a
+ stub as soon as we find an IMPORT stub.
+ (skip_prologue_hard_way): Also recognize copy %ret1,target and
+ all PA64 argument stores as prologue instructions.
+
+1999-09-28 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * breakpoint.c, defs.h, event-top.c, infcmd.c, infrun.c, main.c,
+ remote.c, top.c, tracepoint.c, utils.c (async_p): Change var name
+ to event_loop_p.
+
+1999-09-28 Jim Blandy <jimb@cygnus.com>
+
+ * hppa-tdep.c (skip_prologue_hard_way): Recognize ldo insns
+ which generate pointers into the argument list.
+
+Tue Sep 28 13:56:49 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * remote.h (cleanup_sigint_signal_handler,
+ initialize_sigint_signal_handler): Delete extern declarations.
+ * event-top.c, infrun.c: No longer need to include "remote.h".
+ * remote.c (cleanup_sigint_signal_handler,
+ initialize_sigint_signal_handler): Make static.
+ * Makefile.in (event-top.o): Delete dependency on "remote.h".
+
+ * remote.c (remote_async_terminal_ours_p): New static global. Keep
+ track of who currently owns the terminal.
+ (remote_async_open_1): Initialize.
+ (remote_async_terminal_inferior): Test
+ remote_async_terminal_ours_p. Claim CNTRL-C handler as part of
+ transfering the terminal to the target.
+ (remote_async_terminal_ours): Similar.
+
+Mon Sep 27 12:33:45 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * remote.c (async_interrupt_query): Delete function. Merged into
+ interrupt_query. Async cases handled by target_terminal_ours,
+ target_terminal_inferior and SERIAL_CLOSE.
+ (async_remote_interrupt_twice): Update.
+ (remote_async_terminal_ours, remote_async_terminal_inferior): New
+ functions. Steal STDIN from GDB's CLI.
+ (init_remote_async_ops): Initialize to_terminal_ours and
+ to_terminal_inferior.
+
+ * event-top.c (async_disable_stdin, async_disable_stdin): Use
+ target_terminal_ours / target_terminal_inferior to transfer
+ ownership of the terminal between GDB and the target.
+
+1999-09-27 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * infcmd.c (run_command): Call async_disable_stdin() only if
+ dealing with an asynchronous target.
+
+Mon Sep 27 11:48:38 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * target.h (struct target_ops): Add to_can_async_p, to_is_async_p,
+ to_async. Delete to_has_async. These correspond well with
+ SERIAL* async methods.
+ (target_can_async_p, target_is_async_p, target_async): Define.
+ * target.c (update_current_target, cleanup_target): Update.
+
+ * remote.c (remote_async_open_1): Change target to async using
+ target_async.
+ (remote_can_async_p, remote_is_async_p, remote_async): New
+ functions.
+ (remote_async_wait, remote_async_open_1): Add FIXME about how
+ wait_forever_enabled_p can almost be deleted once the client can
+ enable/disable target_async.
+
+ * breakpoint.c (until_break_command), infrun.c (proceed), infcmd.c
+ (run_command, continue_command, step_1, jump_command,
+ until_command, finish_command, interrupt_target_command), top.c
+ (return_to_top_level, execute_command), event-top.c
+ (command_handler): Replace target_has_async with
+ target_can_async_p.
+
+Sun Sep 26 02:10:47 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * remote.c (remote_async_open_1): If we go into async mode, never
+ wait for ever.
+
+ * infcmd.c: Include "event-top.h".
+ (run_command, continue_command, jump_command, until_command,
+ finish_command): Use async_disable_stdin to disable the console
+ for synchronous commands.
+
+ * remote.c (async_interrupt_query): Only disconnect the console
+ from the terminal when sync_execution.
+
+ * remote.c (initialize_sigint_signal_handler): Move declaration
+ from here.
+ * remote.h: To here. Make non-static.
+
+ * remote.c (remote_async_resume, async_interrupt_query): Move
+ prompt code from here.
+ * event-top.c (async_disable_stdin, async_enable_stdin): To
+ here. New function.
+
+ * infrun.c (start_remote): Delete commented out code.
+
+Fri Sep 24 12:38:31 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * remote.c (remote_async_open_1): Perform the initial async_open
+ using only synchronous calls. Only after the target is fully
+ connected, switch to async mode. Include FIXME about now it
+ currently works VS how it should be working.
+ (remote_async_open_1, set_extended_protocol): Delete function
+ set_extended_protocol. All open communication is now done
+ synchronously.
+ (forever_enabled_p): New variable. Determine if remote_async_wait
+ should block FOREVER when fetching target information.
+ (remote_cisco_open, remote_open_1): Set forever_enabled_p.
+
+ * infrun.c (start_remote): During the initial connect, always use
+ a synchronous wait.
+
+Sat Sep 25 18:13:38 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * Makefile.in (event-top.o): Add dependency.
+ * event-top.c: Include "remote.h".
+ * remote.c (async_interrupt_query), event-top.c:
+ (async_enable_stdin): Pass dummy parameter to
+ cleanup_sigint_signal_handler.
+ * remote.c (cleanup_sigint_signal_handler), remote.h
+ (cleanup_sigint_signal_handler), event-top.c (async_enable_stdin),
+ event-top.h (async_enable_stdin): Change signature to match
+ make_exec_error_cleanup handler pararameter.
+
+Thu Sep 23 20:48:22 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * defs.h (enum command_class): Move from here.
+ * command.h (command_class): To here.
+
+1999-09-24 Kevin Buettner <kevinb@cygnus.com>
+ * breakpoint.c (bpstat_stop_status): Use not_a_breakpoint to
+ help properly set bp_addr.
+ * infrun.c (handle_inferior_event): Simplify calls to
+ bp_stop_status.
+
+1999-09-24 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * top.c (return_to_top_level): Do exec_error cleanups if are
+ interrupting a simulated synchronous execution command.
+
+ * infrun.c (start_remote): Create a cleanup to enable stdin in
+ case of error from this command.
+ (complete_execution): Do the enabling of stdin via the exec_error
+ cleanups, when needed.
+
+ * remote.c (remote_async_resume): Make sure we re-enable stdin in
+ case of error from the target.
+ (handle_remote_sigint_twice): The handler to be set is
+ async_remote_interrupt_twice, not async_remote_interrupt.
+ (async_remote_interrupt_twice): Don't do anything if the target
+ has been killed already. Call async_interrupt_query, instead of
+ interrupt_query.
+ (async_interrupt_query): New function. Async case of
+ interrupt_query().
+
+ * event-top.c (async_enable_stdin): New function. Reinstate stdin
+ with the event loop.
+ * event-top.h (async_enable_stdin): Export.
+
+ * utils.c (exec_error_cleanup_chain): New cleanup chain.
+ (make_exec_error_cleanup, do_exec_error_cleanups,
+ discard_exec_error_cleanups): New functions.
+ * defs.h (make_exec_error_cleanup, do_exec_error_cleanups,
+ discard_exec_error_cleanups): Export.
+
+1999-09-24 Jim Blandy <jimb@zwingli.cygnus.com>
+
+ * ax-gdb.c (expr_to_agent): Don't forget to pass argument to
+ new_agent_expr.
+
+1999-09-24 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * event-loop.c (fetch_inferior_event_wrapper): New
+ function. Wrapper to pass to catch_errors.
+ (inferior_event_handler): Pop the target if things go bad with it.
+ Call fetch_inferior_event() from within catch_errors().
+
+1999-09-24 Jim Blandy <jimb@zwingli.cygnus.com>
+
+ * ax-gdb.c: Use internal_error instead of error, where
+ appropriate.
+
+1999-09-23 James Ingham <jingham@leda.cygnus.com>
+
+ * target.c (target_resize_to_sections): New function. Gather the
+ resizing code for the to_sections field into one place, and make
+ sure you update the other targets that are sharing the to_sections
+ structure.
+ * target.h: Declare the target_resize_to_sections function.
+ * solib.c (solib_add): use target_resize_to_sections.
+ * somsolib.c (som_solib_load_symbols): ditto
+ * rs6000-nat.c (xcoff_relocate_core): ditto
+ * pa64solib.c (pa64_solib_load_symbols): ditto
+ * irix5-nat.c (solib_add):ditto
+
+ * top.c: Define the attach & detach hooks
+ * defs.h: Declare the attach & detach hooks.
+ * infcmd.c (attach_command): call the attach hook if it exists.
+ (detach_command): call the detach hook if it exists.
+
+ * complaints.c (complain): Send the complaints to stderr rather
+ than stdout, so they don't get mixed into the result stream from
+ commands.
+
+1999-09-23 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * event-loop.c (poll_timers): Use correct timeval field names,
+ when setting the notifier timeouts, in case of select() used.
+ (gdb_wait_for_event): Pass a pointer to the timeout structure to
+ select(), not the structure.
+
+Wed Sep 22 10:35:32 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * Makefile.in (init.c): Change generated file to include "defs.h"
+ and "call-cmds.h". Use initialize_file_ftype when declaring
+ each initialize functions.
+ (call_cmds_h): Add definition.
+ (init.o): Add target and dependencies.
+ (init.c): Don't grep for _initialize* in init.c.
+
+ * defs.h (initialize_file_ftype): Add function typedef.
+
+1999-09-22 Michael Snyder <msnyder@cleaver.cygnus.com>
+
+ * procfs.c (init_procinfo): move fltset initialization to caller.
+ (do_attach, create_procinfo): initialize fltset.
+
+1999-09-22 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * event-loop.c, event-top.c, event-loop.h: Rerun indent.
+
+1999-09-21 Doug Evans <devans@casey.cygnus.com>
+
+ * m32r-stub.c (handle_exception): Fix typo in patch of 1999-08-26.
+
+Tue Sep 21 14:55:29 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ From 1999-08-20 J.T. Conklin <jtc@redback.com>:
+ * remote.c (read_frame): expand cisco run-length encoding variant
+ inline as is done for the standard encoding.
+ (remote_cisco_expand): Removed.
+
+1999-09-20 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * event-loop.c: Include <sys/time.h>.
+
+1999-09-20 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * ser-ocd.c: (ser_ocd_open, ser_ocd_raw, ser_ocd_readchar,
+ ser_ocd_setbaudrate, ser_ocd_write, ser_ocd_close,
+ ser_ocd_get_tty_state, ser_ocd_set_tty_state): Remove unused
+ prototypes.
+ (ocd_readremote): Remove.
+ (ocd_write): Remove unused var 'c'.
+
+1999-09-20 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * event-top.c (change_line_handler): Cleanup dead code. Add comments.
+ * event-loop.c: Cleanup #if 0 code.
+
+ * event-loop.h (timer_handler_func): New function type.
+ (create_timer): Export function.
+ (delete_timer): Export function.
+
+ * event-loop.c: Add timeout and timeout_valid fields to
+ gdb_notifier. New structures gdb_timer and timer_list.
+ (gdb_do_one_event): Check whether there are any timers tht are
+ ready, before going to wait.
+ (gdb_wait_for_event): If the timeout structure is meaningful, pass
+ that to select()/poll().
+ (create_timer): New function. Creates a timer.
+ (delete_timer): New function. Deletes a timer.
+ (handle_timer_event): New function. Deals with timers that are ready.
+ (poll_timers): New Function. Chack whether timers have expired.
+
+Mon Sep 20 17:00:06 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * remote.c (getpkt, putpkt, remote_console_output): Move
+ declaration from here.
+ * remote.h: To here. New file.
+ * tracepoint.c(putpkt, getpkt, remote_console_output): Delete
+ declarations. Moved to "remote.h".
+ * Makefile.in (remote_h): Define.
+ * remote.c, tracepoint.c: Include "remote.h".
+ * Makefile.in (tracepoint.o, remote.o): Add dependency on
+ "remote.h".
+
+ * remote.h (remote_cisco_objfile_relocate,
+ cleanup_sigint_signal_handler): Add declaration. Include FIXME.
+ * infrun.c: Include "remote.h".
+ (complete_execution): Delete local extern declaration
+ of ``cleanup_sigint_signal_handler''.
+ * Makefile.in (infrun.o): Add dependency on remote.h.
+
+Mon Sep 20 13:41:04 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * kod.c (ecos_kod_open, ecos_kod_request, ecos_kod_close,
+ cisco_kod_open, cisco_kod_request, cisco_kod_close): Move
+ declarations from here.
+ * kod.h: To here. New file.
+ * kod-cisco.c, kod.c: Include "kod.h".
+ * Makefile.in (kod-cisco.o, kod.o): Add dependency on "kod.h".
+
+ * kod.h (kod_display_callback_ftype, kod_query_callback_ftype):
+ New function types.
+ * kod.h (kod_cisco_open): Use in declaration.
+ * kod.c (gdb_kod_open): Update definition.
+ * kod-cisco.c (cisco_kod_open): Update definition.
+
+Mon Sep 20 12:13:27 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * mn10300-tdep.c (_initialize_mn10300_tdep): Add declaration.
+
+ * breakpoint.c (until_break_command_continuation): Add
+ declaration. Make static.
+ * event-top.c (rl_callback_read_char_wrapper): Ditto.
+
+Fri Sep 17 19:28:17 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * source.c: Include "source.h".
+ (open_source_file, find_source_lines): Move declaration from here.
+ * source.h: New file. To here.
+ * Makefile.in (source.o): Add dependency on source.h.
+
+ * breakpoints.c (delete_command): Move declaration from here.
+ * breakpoints.h (delete_command): To here.
+
+1999-09-18 Jim Blandy <jimb@cygnus.com>
+
+ * hppa-tdep.c (in_solib_call_trampoline): If we can't recognize
+ the instruction we're at, we're not in a stub.
+
+Sat Sep 18 07:13:03 1999 Jeffrey A Law (law@cygnus.com)
+
+ * dwarf2read.c (dwarf_decode_lines): Correctly handle
+ DW_LNS_const_add_pc.
+
+1999-09-18 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * remote.c (remote_async_open_1): Use inferior_event_handler to
+ handle inferior events.
+ (extended_remote_async_create_inferior): Ditto.
+
+ * serial.h (serial_event_ftype): Add two pars.
+
+ * ser-unix.c (ser_unix_event): Add two parameters, error and fd.
+ Pass those into the call to the actual inferior event handler.
+
+ * infrun.c (complete_execution): Stdin handler is stdin_event_handler.
+
+ * event-top.h (stdin_event_handler): Export new function.
+
+ * event-top.c (stdin_event_handler): New function. Smarter handler
+ for events on stdin.
+ (change_line_handler): Don't need to update the handler for stdin
+ here anymore.
+ (_initialize_event_loop): Stdin handler is now stdin_event_handler.
+
+ * event-loop.h: (handler_func): Change signature, adding two new
+ args.
+ (sig_handler_func): New function type. It is the old handler_func.
+ (create_async_signal_handler): Update to use sig_handler_func.
+ (delete_async_signal_handler): Prototype for new function.
+
+ * event-loop.c: Include "inferior.h".
+ (struct file_handler): Add field error, to indicate error
+ condition on fd.
+ (struct async_signal_handler): Rename type of proc field.
+ (add_file_handler): Add exception condition as something select()
+ should report.
+ (handle_file_event): In case of error on the fd, record this in
+ the file_handler structure. Update call to (*proc)() to match new
+ signature.
+ (gdb_wait_for_event): If select() or poll() return error, report
+ this to user.
+ (create_async_signal_handler): Change first param type to
+ sig_handler_func*.
+ (inferior_event_handler): New function. Smarter inferior event
+ handling.
+
+1999-09-18 Jim Blandy <jimb@cygnus.com>
+
+ * pa64solib.c (pa64_solib_create_inferior_hook): Remove code which
+ tries to set __d_pid; it's not relevant to PA64 shared libraries.
+
+ A psymtab's texthigh element, and a block's endaddr element, are
+ the address past the end of the address range, never the address
+ of the last byte. These data structures mean the same thing on
+ forty different architectures; there's no reason they should be
+ different on HP/UX.
+ * symtab.c (find_pc_sect_psymtab): Remove special case for HP/UX.
+ (find_pc_sect_symtab): Same.
+ * objfiles.c (find_pc_sect_section): Same.
+
+Sat Sep 18 07:13:03 1999 Jeffrey A Law (law@cygnus.com)
+
+ * hppa-tdep.c (internalize_unwinds): Handle PA64 shared libraries
+ correctly
+
+ * hppa-tdep.c (in_solib_call_trampoline): Handle PA64 shared library
+ trampolines.
+
+1999-09-17 Jim Blandy <jimb@zwingli.cygnus.com>
+
+ * breakpoint.c (permanent_breakpoint_here_p): Delete.
+ Accidentally left over from previous changes.
+
+1999-09-17 Jim Blandy <jimb@cygnus.com>
+
+ * config/pa/tm-hppa64.h (ARGS_GROW_DOWNWARD): Deleted. There are
+ many more differences between the 32- and 64-bit ABI's than the
+ direction the arguments grow, so this name is misleading.
+ (PA20W_CALLING_CONVENTIONS): Define this instead.
+ * config/pa/tm-hppa.h (ARGS_GROW_DOWNWARD): Delete.
+ * hppa-tdep.c (hppa_push_arguments): Split into two separate
+ functions, depending on whether PA20W_CALLING_CONVENTIONS is
+ #defined. These implement completely separate specifications,
+ they don't really share that much code anyway, and this is much
+ more readable. Specifically: leave a 16-byte, not 32-byte, frame
+ marker; correctly align objects larger than eight bytes; promote
+ all integral scalar arguments smaller than eight bytes to a full
+ register width; pad aggregates smaller than eight bytes on the
+ right.
+
+Thu Sep 16 17:33:35 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * remote.c (remote_async_open_1): Use SERIAL_ASYNC to
+ enable/disable async event callback on serial port. Use
+ SERIAL_CAN_ASYNC_P / SERIAL_IS_ASYNC_P to determine if / when
+ async mode.
+ (remote_async_resume, remote_async_detach, remote_async_kill,
+ extended_remote_async_create_inferior, remote_async_wait): Ditto.
+
+ * ser-unix.c (hardwire_readchar): When ASYNC, only read a single
+ character.
+ (ser_unix_readchar): Ditto. Problems occure with back-to-back
+ data from a target. The ASYNC code can loose the second data
+ chunk.
+
+ * serial.c (serial_fdopen): Initialize async_handler and
+ async_context.
+
+1999-09-16 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * utils.c (discard_all_continuations): New function.
+ * defs.h: (discard_all_continuations): Add prototype.
+
+1999-09-16 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * valops.c: Remove prototype for search_struct_field_aux(). THe
+ function was nowhere in the file.
+ (value_ind): Remove unused var real_val.
+ (value_find_oload_method_list): Remove unused var v.
+ (find_overload_match): Remove extra declaration of var jj.
+
+ * Makefile.in (event_top_h): Define. Add dependency on this for
+ every file that includes event-top.h.
+
+Thu Sep 16 17:33:35 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * serial.c (serial_open): Delete ``&'' device.
+ * ser-unix.c (_initialize_ser_hardwire): Make the "hardwire"
+ device async. Delete temporary "async-hardwire" device.
+
+Thu Sep 16 16:27:13 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * serial.h (SERIAL_IS_ASYNC_P): Define. Non-zero when serial
+ device is in async mode.
+ (SERIAL_CAN_ASYNC_P): Rename SERIAL_ASYNC_P.
+ * serial.c (serial_is_async_p): Implement.
+ (serial_can_async_p): Rename serial_async_p.
+ (serial_open): Initialize ASYNC_HANDLER and ASYNC_CONTEXT. Save
+ the original name in SCB instead of the stripped name.
+
+Thu Sep 16 12:20:11 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * serial.h (struct serial_ops): Add field ASYNC.
+ (SERIAL_ASYNC, SERIAL_ASYNC_P): New macros.
+ (struct _serial_t): Add fields async_context and async_handler.
+ * serial.c (serial_async, serial_async_p): Implement.
+
+ * ser-unix.c: Include "event-loop.h".
+ (ser_unix_async), ser-unix.c: New function. Implement async mode.
+ (async_event): Handle async events.
+ * ser-unix.c (_initialize_ser_hardwire), ser-tcp.c
+ (_initialize_ser_tcp), ser-pipe.c (_initialize_ser_pipe): Enable
+ ASYNC.
+
+ * serial.c (serial_open): Discard leading ``|'' before opening a
+ pipe device.
+ * ser-pipe.c (pipe_open): Adjust.
+ * serial.c (serial_open): Add ``&'' prefix so that
+ "async-hardwire" device can be explicitly selected. Work in
+ progress.
+ * ser-unix.c: Register "async-hardwire" device.
+
+Thu Sep 16 09:04:53 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * ser-unix.h: New file. Declare generic ser_unix functions.
+ * ser-unix.c (ser_unix_nop_get_tty_state,
+ ser_unix_nop_set_tty_state, ser_unix_nop_raw, ser_unix_wait_for,
+ ser_unix_readchar, ser_unix_nop_noflush_set_tty_state,
+ ser_unix_nop_print_tty_state, ser_unix_nop_setbaudrate,
+ ser_unix_nop_setstopbits, ser_unix_write,
+ ser_unix_nop_flush_output, ser_unix_nop_flush_input,
+ ser_unix_nop_send_break, ser_unix_nop_drain_output): New
+ functions.
+ * ser-unix.c: Include <sys/wait.h>, <sys/socket.h>,
+ "gdb_string.h".
+
+ * ser-tcp.c (_initialize_ser_tcp), ser-unix.c
+ (_initialize_ser_hardwire), ser-pipe.c (_initialize_ser_tcp):
+ Initialize ops vector using assignment.
+
+ * ser-pipe.c, ser-tcp.c, ser-unix.c: Include ser-unix.h.
+
+ * ser-pipe.c (pipe_get_tty_state, pipe_set_tty_state,
+ pipe_return_0, pipe_raw, wait_for, pipe_readchar,
+ pipe_noflush_set_tty_state, pipe_print_tty_state,
+ pipe_setbaudrate, pipe_setstopbits, pipe_write), ser-tcp.c
+ (tcp_get_tty_state, tcp_set_tty_state, tcp_return_0, tcp_raw,
+ wait_for, tcp_readchar, tcp_noflush_set_tty_state,
+ tcp_print_tty_state, tcp_setbaudrate, tcp_setstopbits, tcp_write):
+ Delete functions.
+
+1999-09-15 Stan Shebs <shebs@andros.cygnus.com>
+
+ * d10v-tdep.c (remote_d10v_translate_xfer_address): Move to here
+ from remote-d10v.c, also change the memory translation to its
+ previous version.
+ * remote-d10v.c: Remove.
+ * config/d10v/d10v.mt (TDEPFILES): Remove remote-d10v.o.
+
+1999-09-15 Jim Blandy <jimb@cygnus.com>
+
+ * breakpoint.c (remove_breakpoint): Return zero, not nothing.
+
+1999-09-14 Jim Blandy <jimb@cygnus.com>
+
+ * hppa-tdep.c (frame_chain): If the unwind info says we've saved
+ r3, don't trust it. Call get_frame_saved_regs and see if we can
+ actually find an address for r3 there.
+
+ * pa64solib.c (pa64_sharedlibrary_info_command): Text fix.
+
+Tue Sep 14 14:34:28 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * serial.h (DEPRECATED_SERIAL_FD): Define.
+ * serial.c (deprecated_serial_fd): New function.
+
+ * remote.c (remote_async_open_1, remote_async_open_1,
+ remote_async_detach, remote_async_kill,
+ extended_remote_async_create_inferior, minitelnet): Update.
+ * remote-es.c (es1800_open, es1800_close, es1800_transparent): Update.
+
+ * remote-st.c (connect_command), remote-os9k.c (connect_command):
+ Fix. Call FD_SET et.al. with FD instead of serial_t.
+
+1999-09-14 Jim Blandy <jimb@cygnus.com>
+
+ * hppa-tdep.c (hppa_frame_find_saved_regs): The two possible
+ instructions for saving the return pointer (32- and 64-bit) save
+ it at different offsets.
+
+ * config/pa/tm-hppa64.h: Doc fix.
+
+ * defs.h (continuation): Make this a typedef.
+
+ * Makefile.in (gdbtk.o, gdbtk-cmds.o): Depend on $(top_h).
+
+ * Makefile.in (i386-linux-nat.o): Depend on symfile.h, not
+ $(symfile_h); the latter has no definition.
+
+ * breakpoint.c (breakpoint_here_p): Remove meaningless code,
+ testing b->enable against shlib_disabled and call_disabled after
+ we know it is enabled.
+
+ Implement "permanent breakpoints" --- breakpoints that are
+ hardwired into the inferior's code. GDB knows they're there, but
+ doesn't try to insert or remove them, etc.
+ * breakpoint.h (enum enable): Add `permanent' enablement state.
+ * breakpoint.c (make_breakpoint_permanent): New function.
+ * breakpoint.h (make_breakpoint_permanent): Add declaration.
+ * breakpoint.c (insert_breakpoints): Don't bother to insert
+ permanent breakpoints...
+ (remove_breakpoint): ... or remove them.
+ (breakpoint_here_p): Handle `permanent' like `enabled'. Change
+ return value to indicate whether it's a permanent breakpoint here,
+ or an ordinary breakpoint.
+ * breakpoint.h (enum breakpoint_here): New enum.
+ (breakpoint_here_p): Change declaration.
+ * breakpoint.h (breakpoint_1): Extend bpenables to cover all the
+ enablement states.
+ (describe_other_breakpoints): Describe permanent breakpoints.
+ (check_duplicates): If one of the breakpoints at ADDRESS is a
+ permanent breakpoint, treat all the others as the duplicates, so
+ we don't try to insert or remove any of them. Verify that only
+ the permanent breakpoint is actually inserted.
+ (delete_breakpoint): Complain if we discover that another
+ breakpoint was inserted at the same place as a permanent
+ breakpoint.
+ (disable_breakpoint): Fail silently if asked to disable a
+ permanent breakpoint.
+ (do_enable_breakpoint): Don't change a permanent breakpoint's
+ enablement to ordinary `enabled'. Leave it alone.
+ (create_solib_event_breakpoint): Return the
+ breakpoint object created.
+ * breakpoint.h (create_solib_event_breakpoint): Fix declaration.
+ * pa64solib.c (pa64_solib_create_inferior_hook): Do turn on the
+ DT_HP_DEBUG_CALLBACK flag in the dynamic linker, so it will call
+ __dld_break, which contains the permanent breakpoint, when interesting
+ things happen. Tell GDB that the breakpoint in __dld_break is
+ permanent.
+ * gdbtk-cmds.c (gdb_get_breakpoint_info): Report a permanent
+ breakpoint as enabled.
+ * infrun.c (SKIP_PERMANENT_BREAKPOINT): Provide default definition.
+ (default_skip_permanent_breakpoint): New function.
+ (resume): If we're trying to resume at a permanent breakpoint, use
+ SKIP_PERMANENT_BREAKPOINT to step over it.
+ * hppa-tdep.c (hppa_skip_permanent_breakpoint): New function.
+ * config/pa/tm-hppa.h (hppa_skip_permanent_breakpoint): Declare.
+ (SKIP_PERMANENT_BREAKPOINT): Define.
+
+1999-09-14 Kevin Buettner <kevinb@cygnus.com>
+
+ * symtab.h, minsyms.c (find_stab_function_addr): Changed
+ type of second parameter from partial_symtab * to char *.
+ Fixed all callers.
+ * minsyms.c (find_stab_function_addr): Look for minimal
+ symbol without filename if filename based search fails.
+ * dbxread.c (process_one_symbol): Call find_stab_function_addr()
+ in place of inline code with identical functionality.
+ * partial-stab.h (case N_FUN, descriptors 'F' and 'f'): Look
+ up symbol's address from minimal symbol table when N_FUN
+ address is missing. Also, make sure this value is used for
+ calculating the value of the texthigh field.
+
+1999-09-14 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * event-loop.c (create_file_handler): Increment the total number
+ of file descriptors for the poll case, only if this is a new file
+ desc.
+
+1999-09-14 Eli Zaretskii <eliz@is.elta.co.il>
+
+ * go32-nat.c: misc minor cleanups and fixes missed in last patch.
+
+Tue Sep 14 12:37:33 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * serial.h (SERIAL_PRINT_TTY_STATE): Add STREAM parameter.
+ (union serial_ops): Update.
+
+ * ser-unix.c (hardwire_print_tty_state, ser-tcp.c
+ (tcp_print_tty_state), ser-pipe.c (pipe_print_tty_state,
+ ser-go32.c (dos_print_tty_state, ser-mac.c (mac_print_tty_state,
+ ser-ocd.c (ocd_print_tty_state, ser-e7kpc.c
+ (e7000pc_print_tty_state): Update.
+ * inflow.c (child_terminal_info): Update.
+ * serial.c (serial_print_tty_state): Update.
+
+Tue Sep 14 11:41:37 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * serial.c, serial.h, ser-tcp.c, ser-unix.c, ser-pipe.c: Convert
+ all functions to ISO-C.
+ * serial.h, serial.c: Move all indirect macro function calls from
+ serial.h into serial.c.
+ (serial_drain_output, serial_flush_output, serial_flush_input,
+ serial_raw, serial_get_tty_state, serial_set_tty_state,
+ serial_print_tty_state, serial_noflush_set_tty_state,
+ serial_setbaudrate, serial_setstopbits): New functions.
+ (do_serial_close): Rename serial_close.
+ (serial_close, serial_un_fdopen): New functions. Call
+ do_serial_close.
+
+1999-09-13 James Ingham <jingham@leda.cygnus.com>
+
+ * symtab.c (decode_line_1): Find the rightmost parenthesis in the
+ expression, not the leftmost. This allows us to parse function
+ declarations with embedded function prototypes.
+
+Mon Sep 13 18:39:31 1999 Jeffrey A Law (law@cygnus.com)
+
+ * pa64solib.c (pa64_sharedlibrary_info_command): Fix typos.
+
+1999-09-13 Kevin Buettner <kevinb@cygnus.com>
+
+ * i386-tdep.c (i386_extract_return_value): ifdef'd so that
+ non-linux targets will work again.
+ (i386_do_registers_info, i386_print_register): Revert changes
+ of 1999-09-03; these functions have been removed because they
+ are Linux specific and break non-Linux builds. This functionality
+ will be restored after FP support unification has been achieved.
+ * i387-tdep.c (i387_print_register, void i387_float_info):
+ Likewise.
+ * config/i386/tm-linux.h (i387_float_info, FLOAT_INFO,
+ DO_REGISTERS_INFO, i386_do_registers_info,
+ i387_print_register): Likewise.
+
+1999-09-13 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * event-top.c (call_readline): Change to accept gdb_client_data as
+ param.
+ (rl_callback_read_char_wrapper): New function to match what the
+ event loop expects and what readline expects.
+ (change_line_handler): Make call_readline point to
+ rl_callback_read_char_wrapper, instead of rl_callback_read_char.
+ (_initialize_event_loop): Ditto.
+ (gdb_readline2): Change parameter to gdb_client_data.
+ * event-top.h (call_readline, gdb_readline2): Change accordingly.
+
+ * event-loop.c (add_file_handler): Change 2nd par to
+ handler_func*. No more need for casting.
+ * event-loop.h (create_async_signal_handler): Change accordingly.
+
+ * inferior.h (fetch_inferior_event): Change parameter to void*.
+ * infrun.c (fetch_inferior_event): Ditto.
+
+1999-09-13 Stan Shebs <shebs@andros.cygnus.com>
+
+ * infrun.c (step_into_function): New function, broken out from the
+ step_into_function label in handle_inferior_event.
+ (handle_inferior_event): Change a goto into a function call.
+
+1999-09-13 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * event-top.h: New file. All the exported vars and functions from
+ event-top.c.
+
+ * event-loop.h (struct gdb_event, event_handler_func,
+ file_handler, async_signal_handler, SELECT_MASK, fd_mask, NBBY,
+ FD_SETSIZE, howmany, NFDBITS, MASK_SIZE): Move to event-loop.c.
+ (struct prompts, PROMPT, PREFIX, SUFFIX, display_gdb_prompt,
+ async_init_signals, set_async_editing_command,
+ set_async_annotation_level, set_async_prompt, handle_stop_sig,
+ handle_sigint, pop_prompt, push_prompt, gdb_readline2,
+ mark_async_signal_handler_wrapper, async_request_quit,
+ async_command_editing_p, exec_done_display_p,
+ async_annotation_suffix, new_async_prompt, the_prompts,
+ call_readline, input_handler, input_fd): Move to event-top.h.
+ (All function prototypes): Don't use PARAMS anymore.
+
+ * event-loop.c: (struct gdb_event, event_handler_func,
+ file_handler, async_signal_handler, SELECT_MASK, fd_mask, NBBY,
+ FD_SETSIZE, howmany, NFDBITS, MASK_SIZE): Move to here from
+ event-loop.h.
+ Include event-top.h. Remove use of PARAMS. ANSIfy functions headers.
+
+ * event-top.c: Include event-top.h. Include "signals.h", not
+ <signals.h>.
+ Remove use of PARAMS. ANSIfy functions headers.
+ (handle_stop_sig): move prototype to event-top.h.
+
+ * remote.c: Include event-top.h. Make it understand
+ async_signal_handler type.
+ * infrun.c: Include event-top.h.
+ * mi-main.c: Ditto.
+ * top.c Ditto.
+ * utils.c: Ditto.
+
+Mon Sep 13 18:54:05 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * gdbarch.sh: Describe each of the fields.
+
+Mon Sep 13 17:51:28 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ From 1999-09-12 Jim Blandy <jimb@cygnus.com>:
+ * gdbarch.sh (generating setters): Use sed to generate the proper
+ indentation, not tr; tr's behavior is notoriously unportable.
+
+1999-09-10 Jim Blandy <jimb@zwingli.cygnus.com>
+
+ * i387-tdep.c (print_387_control_bits): Don't print newline; the
+ callers take care of that. (Thanks to H.J. Lu.)
+
+1999-09-09 Stan Shebs <shebs@andros.cygnus.com>
+
+ * d10v-tdep.c (DMEM_START): Set to 0x2000000.
+ (itrace, iuntrace, info itrace, itdisassemble, itracedisplay,
+ itracesource): Add 'i' prefix to commands, so as not to conflict
+ with generic trace commands.
+
+1999-09-09 Fernando Nasser <fnasser@totem.to.cygnus.com>
+
+ * remote.c (_initialize_remote): Fix the specification of the
+ "remote" prefix to set and show commands.
+
+1999-09-09 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * event-loop.c (create_file_event): New function. Creates a gdb
+ event for a given fd.
+ (gdb_wait_for_event): Use create_file_event().
+ * event-loop.h: export create_file_event().
+
+ * event-loop.c (delete_file_handler): Move the clearing of the
+ mask to later on in the function, because we need it in order to
+ deactivate the correct fd when using select().
+
+ * m32r-tdep.c (decode_prologue): Fix typo. Instructions starting
+ with 0xf are branch instructions.
+ (m32r_scan_prologue): Initialize framesize to 0.
+
+1999-09-07 J.T. Conklin <jtc@redback.com>
+
+ * i386-stub.c (exceptionHook, oldExceptionHook): Removed.
+ (handle_exception): Removed #if'd out exception hook code.
+
+ * i386-stub.c, m68k-stub.c (error): Removed unused variable.
+
+ * i386-stub.c, m68k-stub.c, sh-stub.c, sparc-stub.c,
+ sparcl-stub.c, sparclet-stub.c (remcomInBuffer, remcomOutBuffer):
+ Make static.
+
+Tue Sep 7 14:06:22 1999 Kevin Buettner <kevinb@cygnus.com>
+
+ * config/i386/tm-linux.h (SOFUN_ADDRESS_MAYBE_MISSING):
+ Define.
+
+Tue Sep 7 08:18:01 1999 Kevin Buettner <kevinb@cygnus.com>
+
+ From Jim Blandy <jimb@cygnus.com>:
+
+ Step into calls to functions in shared libraries properly. See
+ the comments for SKIP_SOLIB_RESOLVER atop infrun.c for details.
+ * infrun.c (SKIP_SOLIB_RESOLVER): New macro.
+
+1999-09-05 Fred Fish <fnf@cygnus.com>
+
+ * elfread.c (elf_symtab_read): Remove separately passed bfd
+ pointer and offset. Pick up bfd pointer from objfile, and
+ get offset from objfile's section_offsets.
+
+Fri Sep 3 22:29:39 1999 Kevin Buettner <kevinb@cygnus.com>
+
+ * config/i386/tm-linux.h (REGISTER_NAMES): Changed register
+ named "foo" to "fopo" which more accurately describes the FPU
+ Operand Pointer Offset. The real reason for this change, of
+ course, is that many programmers use $foo as a convenience
+ variable and are likely to be unpleasantly surprised to find
+ that they're unwittingly changing the state of their ia32 FPU.
+
+1999-09-03 Jason Molenda (jsm@bugshack.cygnus.com)
+
+ * monitor.c (monitor_supply_register): Stop scanning val string
+ if a newline is encountered.
+
+1999-09-03 Jason Molenda (jsm@bugshack.cygnus.com)
+
+ monitor.c (TARGET_BUF_SIZE): New macro, defined to 2048.
+ (monitor_expect_regexp, monitor_wait, monitor_dump_reg_block,
+ monitor_dump_reg_block): Dump hard-coded constants in favor
+ of TARGET_BUF_SIZE.
+
+ (readchar): Re-enable output of characters read from monitor when
+ remotedebug is set.
+
+ (monitor_supply_register): Use ULONGEST to hold value.
+ Replace strtoul() call with hand-coded loop to handle values
+ larger than 'long'.
+
+ (monitor_store_register): Use ULONGEST to hold value.
+
+Fri Sep 3 00:47:44 1999 Kevin Buettner <kevinb@cygnus.com>
+
+ [Merged linux/x86 floating point code from Bill Metzenthen,
+ Jim Blandy, Anthony Green, H. J. Lu, and possibly others. The
+ following remarks are Jim Blandy's.]
+
+ * findvar.c (extract_floating): Call TARGET_EXTRACT_FLOATING, if
+ #defined.
+ (store_floating): Call TARGET_STORE_FLOATING, if #defined.
+
+ * i386-tdep.c (i386_print_register, i386_do_registers_info): New
+ functions.
+ (i386_extract_return_value): GNU/Linux returns floating point
+ values in a floating point register too.
+ (set_disassembly_flavor): Add prototype.
+ (i386_extract_return_value): Use FPDATA_REGNUM, not FP0_REGNUM (
+ which wasn't the first FP data register).
+ (i386_do_registers_info): Use FPSTART_REGNUM and FPEND_REGNUM as
+ the limits of the FPU-related registers.
+ (i386_extract_return_value): Tell GDB how to find return values
+ larger than four bytes. (Thanks to Paul N. Hilfinger for the bug
+ report.)
+
+ * i387-tdep.c (print_387_control_word): Break out bit-splitting into...
+ (print_387_control_bits): New function.
+ (print_387_status_word): Break out bit-splitting into...
+ (print_387_status_bits): New function.
+ (i387_print_register, i387_float_info, i387_hex_float_input): New
+ functions.
+ (i387_extract_floating, i387_store_floating): New functions.
+
+ * valprint.c (print_floating): Use macro TARGET_ANALYZE_FLOATING,
+ if it's #defined. Tolerate values of `nonnegative' other than
+ zero and one.
+
+ * i386-linux-nat.c: New file.
+ * Makefile.in (ALLDEPFILES): Mention i386-linux-nat.c.
+ (i386-linux-nat.o): New rule, listing dependencies.
+ * config/i386/linux.mh (NATDEPFILES): Use i386-linux-nat.o, not
+ the plain i386v4-nat.o.
+ * config/i386/nm-linux.h (FETCH_INFERIOR_REGISTERS): Define.
+ * config/i386/xm-linux.h: Define HOST_I386.
+
+ * config/i386/tm-linux.h (FP0_REGNUM): Replaced by...
+ (FPSTART_REGNUM, FPCONTROL_REGNUM, FPSTATUS_REGNUM, FPTAG_REGNUM,
+ FPDATA_REGNUM, FPEND_REGNUM): New definitions.
+ (REGISTER_BYTES): Changed accordingly.
+ (SKIP_SOLIB_RESOLVER): #define this.
+ (i386_linux_skip_solib_resolver): New declaration.
+ (i387_float_info): Added extern decl for this function.
+ (TARGET_EXTRACT_FLOATING, TARGET_STORE_FLOATING,
+ TARGET_ANALYZE_FLOATING): Define.
+ (i387_extract_floating, i387_store_floating): New extern decls.
+ (I386_GNULINUX_TARGET): Define.
+ (NUM_REGS, NUM_FREGS, REGISTER_NAMES, FP0_REGNUM, FPDATA_REGNUM,
+ FPENV_BYTES, FPREG_RAW_SIZE, FPREG_BYTES, REGISTER_BYTES,
+ REGISTER_BYTE, REGISTER_RAW_SIZE, REGISTER_VIRTUAL_SIZE,
+ MAX_REGISTER_RAW_SIZE, MAX_REGISTER_VIRTUAL_SIZE,
+ TARGET_LONG_DOUBLE_BIT, FLOAT_INFO, DO_REGISTERS_INFO): New
+ definitions, perhaps overriding those inherited from
+ config/i386/tm-i386.h.
+ (i386_do_registers_info, i387_print_register, double_to_i387,
+ i387_to_double): New declarations.
+ (LD_I387): Define iff both the host and target are using i387
+ FPU's.
+ (HEX_FLOAT_INPUT, REGISTER_CONVERTIBLE,
+ REGISTER_CONVERT_TO_VIRTUAL, REGISTER_CONVERT_TO_RAW,
+ REGISTER_VIRTUAL_TYPE): Define these if LD_I387 is defined.
+
+ * source.c (list_command): List the right number of source lines,
+ even if we're at the top of the file.
+
+1999-09-02 Stan Shebs <shebs@andros.cygnus.com>
+
+ * infrun.c (step_over_function): New function, broken out from the
+ step_over_function label in handle_inferior_event.
+ (handle_inferior_event): Change a goto into a function call.
+
+Thu Sep 2 18:26:04 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * Makefile.in (GDB_WERROR_CFLAGS, GBB_WARN_CFLAGS): Define.
+ (INTERNAL_CFLAGS): Update
+ * configure.in (WERROR_CFLAGS, WARN_CFLAGS): Sync with
+ ../sim/common/aclocal.m4.
+ * configure: Re-generate.
+
+Thu Sep 2 00:27:36 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * Makefile.in (z8k-tdep.o): For moment, don't try to compile with
+ -Werror. See Makefile.in.
+ * z8k-tdep.c (z8k_set_pointer_size): Document problem.
+
+ * config/z8k/tm-z8k.h (z8k_print_register_hook, z8k_frame_chain,
+ z8k_saved_pc_after_call, z8k_frame_saved_pc,
+ z8k_set_pointer_size): Declare.
+ (z8k_skip_prologue): Fix typo. Was mz8k_skip_prologue.
+ (FRAME_CHAIN, PRINT_REGISTER_HOOK, FRAME_SAVED_PC,
+ SAVED_PC_AFTER_CALL): Update.
+ * z8k-tdep.c (z8k_print_register_hook): Rename
+ z8k_print_register_hook.
+ (z8k_frame_chain): Rename frame_chain.
+ (z8k_saved_pc_after_call): Rename saved_pc_after_call.
+ (z8k_frame_saved_pc): Rename frame_saved_pc.
+ (z8k_print_register_hook): Fix printf.
+ (read_memory_pointer): Add declaration.
+ ("value.h"): Include.
+ * Makefile.in (z8k-tdep.o): Add dependency on value.h.
+
+ * config/sparc/tm-sparc.h (PRINT_EXTRA_FRAME_INFO): Fix
+ printf. calls
+ * Makefile.in (remote-e7000.o): For moment, don't try to compile
+ with -Werror. See Makefile.in.
+ * sh-tdep.c (sh_show_regs): Fix printf calls.
+ * xcoffsolib.c (solib_info): Fix Printf calls.
+ * dink32-rom.c: #include "symfile.h" for generic_load and
+ "inferior.h" for write_pc.
+ * Makefile.in (dink32-rom.o): Update.
+
+ * config/mn10300/tm-mn10300.h (mn10300_store_struct_return),
+ config/mn10200/tm-mn10200.h (mn10200_store_struct_return): Add
+ declarations.
+
+Tue Aug 31 00:48:27 1999 Andrew Cagney <cagney@amy.cygnus.com>
+
+ * config/mips/tm-tx49el.h (REGISTER_SIM_REGNO): Define.
+
+ * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
+ Pass REGISTER_SIM_REGNO converted register number to the
+ simulator.
+
+1999-09-01 Tom Tromey <tromey@cygnus.com>
+
+ * config/i386/nm-linux.h (PREPARE_TO_PROCEED): Added argument.
+
+1999-09-01 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * values.c (value_virtual_fn_field): Remove unused var(s).
+ * thread.c (prune_threads): Ditto.
+ * symtab.c (lookup_transparent_type): Ditto.
+ (decode_line_1): Ditto.
+ (make_symbol_overload_list): Ditto.
+ * rs6000-tdep.c (frame_get_saved_regs): Ditto.
+ (set_processor): Ditto.
+ * remote.c (remote_remove_breakpoint): Ditto.
+ (remote_query): Ditto.
+ (readtty): Ditto.
+ * remote-sds.c (sds_fetch_registers): Ditto.
+ (putmessage): Ditto.
+ * ppcbug-rom.c (ppcbug_supply_register): Ditto.
+ (ppcbug_open): Remove unused prototype.
+ * parse.c (parse_nested_classes_for_hpacc): Remove unused var(s).
+ * ocd.c (ocd_open): Ditto.
+ (ocd_get_packet): Ditto.
+ * monitor.c (monitor_error): Ditto.
+ (monitor_wait_srec_ack): Ditto.
+ * main.c (main): Ditto.
+ * gdbtypes.c (count_virtual_fns): Ditto.
+ * exec.c (exec_file_command): Ditto.
+
+ * event-top.c: Include handle_sigwinch() function prototype within
+ appropriate #ifdef.
+
+ * eval.c (evaluate_subexp_standard): Remove unused variable.
+ (evaluate_subexp_standard): Remove unused variables.
+ * dink32-rom.c (dink32_supply_register): Remove unused variable.
+ * dbxread.c (elfstab_build_psymtabs): Ditto.
+ * command.c (do_setshow_command): Ditto.
+ * breakpoint.c (solib_load_unload_1): Remove unused variables 'i'
+ and 'sal'.
+ (until_break_command): Remove unused variables 'arg1' and 'arg2'.
+ (create_exception_catchpoint): Remove unused variable 'i'.
+ * ax-gdb.c (gen_sub): Remove unused variable.
+ (_initialize_ax_gdb): Ditto.
+
+ * ser-pipe.c (pipe_readchar): If timeout is expired return
+ SERIAL_TIMEOUT.
+ * ser-tcp.c (tcp_readchar): If timeout is expired return
+ SERIAL_TIMEOUT.
+
+Wed Sep 1 15:07:25 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * version.h: New file.
+ * Makefile.in (version_h): Define.
+ (version.o): Add target.
+
+ * remote-array.c: #include "version.h".
+ (version): Delete extern declarations.
+ * Makefile.in (remote-array.o): Add dependency on version.h.
+
+ * top.c: #include "version.h".
+ (version, host_name, target_name): Delete extern declarations.
+ * Makefile.in (top.o): Add dependency on version.h.
+
+ * remote.c (remote_remove_watchpoint, remote_insert_watchpoint),
+ remote-array.c (array_open), remote-mips.c (send_srec),
+ dve3900-rom.c (store_bitmapped_register): Fix Printfs.
+
+ * mips-tdep.c (mips_print_extra_frame_info, print_unpack),
+ m32r-rom.c (m32r_load_section), m32r-tdep.c (m32r_frame_chain),
+ dsrec.c (load_srec): Fix printf problems.
+
+Wed Sep 1 13:16:49 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * Makefile.in (monitor.o): For moment, don't try to compile with
+ -Werror. monitor.c has -Wformat problems. See Makefile.in for
+ more info.
+
+Tue Aug 31 21:23:38 1999 Jeffrey A Law (law@cygnus.com)
+
+ * hppa-tdep.c (prologue_inst_adjust_sp): Correct offset computation
+ for doubleword store instructions.
+ (hppa_frame_find_saved_regs): Similarly.
+
+Wed Sep 1 09:22:50 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * d30v-tdep.c (d30v_print_register):
+ (tdisassemble_command):
+
+ * d10v-tdep.c (show_regs, trace_info, tdisassemble_command): Fix
+ printf problems.
+
+ * remote-sim.c (dump_mem), remote-rdi.c (arm_rdi_create_inferior):
+ Fix printf arguments.
+
+ * remote-mips.c, mips-tdep.c: Move declaration of
+ ``mips_set_processor_type_command'' from here.
+ * config/mips/tm-mips.h: To here.
+ * remote-array.c: #include "inferior.h".
+ * config/mips/tm-embed.h (remote_mips_stopped_by_watchpoint): Add
+ declaration.
+ * remote-mips.c (remote_mips_stopped_by_watchpoint): Define using
+ ISO-C prototype.
+ (monitor_supports_breakpoints): Integer variable.
+
+ * m32r-rom.c: #include "inferior.h" and <ctype.h>
+ * config/m32r/tm-m32r.h (m32r_write_sp): Add declaration.
+
+ * config/i960/tm-i960.h (leafproc_return, i960_pop_frame): Add
+ declaration.
+ (POP_FRAME): Call i960_pop_frame.
+ * i960-tdep.c (i960_pop_frame): Rename pop_frame.
+ * mon960-rom.c: #include "inferior.h" for declaration of write_pc.
+
+1999-08-15 Fred Fish <fnf@cygnus.com>
+
+ * objfiles.c (objfile_relocate): Use SIZEOF_SECTION_OFFSETS when
+ allocating section_offsets array.
+ * remote-os9k.c (rombug_wait): Ditto.
+ * remote-vx.c (vx_add_symbols): Ditto.
+ * remote.c (get_offsets): Ditto.
+ (remote_cisco_objfile_relocate): Ditto.
+ * rs6000-nat.c (vmap_symtab): Ditto.
+
+ * dstread.c (dst_symfile_offsets): Set section_offsets directly instead
+ of returning a pointer to section offsets.
+ * somread.c (som_symfile_offsets): Ditto.
+ * xcoffread.c (xcoff_symfile_offsets): Ditto.
+ * symfile.c (default_symfile_offsets): Ditto.
+ (syms_from_objfile): The sym_offsets function has already set section
+ offsets and no longer returns a value.
+
+ * xcoffread.c (scan_xcoff_symtab): Eliminate section_offsets passed
+ separate from objfile.
+ (xcoff_start_psymtab): Ditto.
+ (START_PSYMTAB): Ditto.
+ * os9kread.c (read_minimal_symbols): Ditto.
+ (read_os9k_psymtab): Ditto.
+ (os9k_start_psymtab): Ditto.
+ (record_minimal_symbol): Ditto.
+ * dbxread.c (START_PSYMTAB): Ditto.
+ (start_psymtab): Ditto.
+ * mdebugread.c (START_PSYMTAB): Ditto.
+ (elfmdebug_build_psymtabs): Ditto.
+ (mdebug_build_psymtabs): Ditto.
+ (parse_partial_symbols): Ditto.
+ (new_psymtab): Ditto.
+ * dwarfread.c (dwarf_build_psymtabs): Ditto.
+ * partial-stab.h (START_PSYMTAB): Ditto.
+ * stabsread.h (start_psymtab): Ditto.
+ * dwarf2read.c (dwarf2_build_psymtabs): Ditto.
+ (dwarf2_build_psymtabs_easy): Ditto.
+ (dwarf2_build_psymtabs_hard): Ditto.
+ * hp-psymtab-read.c (hpread_build_psymtabs): Ditto.
+ (hpread_quick_traverse): Ditto.
+ (hpread_start_psymtab): Ditto.
+ (scan_procs): Ditto.
+ * hpread.c (hpread_build_psymtabs): Ditto.
+ * symfile.h (dwarf2_build_psymtabs): Ditto.
+
+ * dbxread.c (read_dbx_symtab): Use ANOFFSET to access section
+ offsets.
+ * coffread.c (enter_linenos): Pass objfile instead of section
+ offsets.
+
+ * dbxread.c (dbx_symfile_read): No need to explicitly pass
+ text addr and size. Let read_dbx_symtab find them.
+ (read_dbx_symtab): Get text addr and size from objfile.
+ (dbx_symfile_read): Remove dead code (call to strlen);
+
+1999-08-31 Michael Snyder <msnyder@cleaver.cygnus.com>
+
+ * Makefile.in: add rule for sol-thread.o.
+ Add rule for linux-thread.o.
+
+1999-08-13 Jim Kingdon <kingdon@redhat.com>
+
+ Threads code from gdb 4.18-codefusion-990706
+ [Thanks to Eric Paire, H. J. Lu, Jim Blandy and others]
+ * infrun.c (signal_stop_update, signal_print_update,
+ signal_pass_update): new functions.
+ * inferior.h: new prototypes for above functions.
+ * target.h (enum strata): add thread stratum.
+ * linux-thread.c: new file. Support for debugging linux threads.
+ * config/i386/nm-linux.h: several new prototypes for above.
+ * config/i386/linux.mh: add linux-thread.o to NATDEPFILES.
+
+ More threads code from the same place:
+ * config/i386/tm-linux.h (REALTIME_LO, REALTIME_HI): Add
+ definitions.
+ * target.h (enum target_signal): Add TARGET_SIGNAL_REALTIME_32.
+ * target.c (signals, target_signal_from_host,
+ target_signal_to_host): Add clauses for
+ TARGET_SIGNAL_REALTIME_32.
+
+1999-08-31 Neil Schellenberger <neil.schellenberger@crosskeys.com>
+
+ * sol-thread.c (sol_thread_detach): strip thread-id out of
+ inferior_pid, so that procfs_detach can't choke on it.
+
+1999-08-31 J.T. Conklin <jtc@redback.com>
+
+ * i386-stub.c, m32r-stub.c, m68k-stub.c, sh-stub.c, sparc-stub.c,
+ sparcl-stub.c, sparclet-stub.c (getpacket): Remove 'buffer' arg,
+ define it as a pointer to &remcomInBuffer[0].
+ (handle_exception): Update.
+
+ * sparc-stub.c, sparcl-stub.c, sparclet-stub.c (handle_exception):
+ Removed #ifdef'd out code which implements the non-standard 'b'
+ (set baud rate) command.
+
+1999-08-31 Stan Shebs <shebs@andros.cygnus.com>
+
+ * infrun.c (keep_going): New function, broken out from the
+ keep_going label in handle_inferior_event.
+ (handle_inferior_event): Change more gotos into function calls.
+
+Tue Aug 31 02:29:27 1999 Jeffrey A Law (law@cygnus.com)
+
+ * hppa-tdep.c (read_unwind_info): Handle multiple unwind sections.
+
+Tue Aug 31 15:28:44 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * config/alpha/tm-alpha.h (PRINT_EXTRA_FRAME_INFO): Fix printf
+ format argument.
+ * alpha-tdep.c (heuristic_proc_start): Ditto.
+
+ From Stan Shebs <shebs@andros.cygnus.com>:
+ * defs.h (strlen_paddr): Fix prototype - add void argument list.
+
+Tue Aug 31 14:02:12 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * defs.h (gdb_print_host_address), utils.c
+ (gdb_print_host_address): Rename gdb_print_address.
+
+ * expprint.c, gdbtypes.c, symmisc.c: Update.
+
+ *expprint.c: Use gdb_print_host_address when displaying native
+ pointers.
+
+Sat Aug 28 14:23:29 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * scm-valprint.c (scm_ipruk), jv-valprint.c (java_value_print),
+ cp-valprint.c (cp_print_class_member), exec.c (exec_files_info),
+ remote.c (putpkt_binary, compare_sections_command,
+ remote_cisco_section_offsets), dcache.c (dcache_info),
+ breakpoint.c (break_at_finish_at_depth_command_1,
+ break_at_finish_command_1), symfile.c (generic_load),
+ (report_transfer_performance), top.c (get_prompt_1), f-valprint.c
+ (f_val_print), maint.c (maintenance_translate_address): Fix printf
+ -Wformat warnings. Use paddr, paddr_nz, sizeof_paddr, paddr_u and
+ paddr_d to print addresses. Change ``d'' to ``ld''.
+
+ * utils.c (strlen_paddr): New function.
+
+Tue Aug 31 01:36:44 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * config/d30v/tm-d30v.h (d30v_frame_chain,
+ d30v_init_frame_pc): Add declaration.
+
+ * arc-tdep.c (arc_pop_frame): Rename pop_frame.
+ (arc_push_dummy_frame): Rename push_dummy_frame.
+ (arc_set_cpu_type_command): Add declaration.
+
+ * config/arc/tm-arc.h (arc_pop_frame, arc_push_dummy_frame): Add
+ declaration.
+
+1999-08-30 Stan Shebs <shebs@andros.cygnus.com>
+
+ * infrun.c (prepare_to_wait): New function, broken out from the
+ wfi_continue label in handle_inferior_event.
+ (handle_inferior_event): Change more gotos into function calls.
+
+1999-08-30 Michael Snyder <msnyder@cleaver.cygnus.com>
+
+ * tracepoint.c: -Wall warning cleanup.
+ (parse_and_eval_memrange): remove (unused).
+ (output_command, args_info, locals_info, registers_info): add decls.
+ (getpkt, putpkt, remote_console_output): add decls.
+ (isalnum, isspace): cast arg to avoid warning.
+ (printf, fprintf, sprintf): use [fs]printf_vma for printing addrs.
+
+Mon Aug 30 21:47:58 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * d10v-tdep.c: #include "language.h".
+
+Mon Aug 30 20:38:57 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * configure.in (AC_CHECK_HEADERS): Check for <time.h>.
+ * configure, acconfig.in: Re-generate.
+
+ * remote-rdp.c: #include <time.h>
+
+ * config/arm/tm-arm.h (arm_float_info): Add declaration.
+
+ * arm-tdep.c (convert_from_extended, convert_to_extended): Change
+ double ptr arg to void ptr arg.
+
+ * config/arm/tm-arm.h (arm_frameless_function_invocation): Add
+ declaration.
+ (arm_frame_find_saved_regs): Rename frame_find_saved_regs.
+ (convert_from_extended, convert_to_extended): Add declaration.
+
+Mon Aug 30 19:05:32 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * configure.in (WERR_CFLAGS): Separate the -Werror flag.
+ * configure: Re-generate.
+
+ * Makefile.in (INTERNAL_CFLAGS): Re-define using
+ INTERNAL_WARN_CFLAGS.
+ (INTERNAL_WARN_CFLAGS): Define. Leave off WERR_CFLAGS.
+ (tracepoint.o): Add explicit rule.
+ (WERR_CFLAGS): Add definition.
+
+Mon Aug 30 17:52:17 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * utils.c: #include "event-loop.h" for declaration of
+ async_request_quit.
+ * Makefile.in (utils.o): Add dependency on event-loop.h.
+
+ * event-top.c (mark_async_signal_handler_wrapper,
+ async_request_quit): Move declaration from here.
+ * event-loop.h: To here.
+
+ * defs.h: Add declaration of exec.c:exec_set_section_offsets.
+
+ * event-top.c: #include "gdbcmd.h" which includes "command.h" and
+ hence expose declaration of function dont_repeat.
+
+ * top.c (ISATTY), tracepoint.c (ISATTY), utils.c (ISATTY),
+ event-top.c (ISATTY): Move definitions from here.
+ * defs.h (ISATTY): To here. #include <unistd.h>.
+
+ * sol-thread.c, solib.c, source.c, sparcl-tdep.c, tracepoint.c,
+ utils.c, win32-nat.c, wince.c, top.c, symfile.c, ser-unix.c,
+ ser-tcp.c, procfs.c, maint.c, infttrace.c, hppa-tdep.c,
+ ser-pipe.c, remote-rdp.c, main.c, inftarg.c, inflow.c,
+ hpux-thread.c, hp-psymtab-read.c, go32-nat.c, fork-child.c,
+ corelow.c, command.c: Do not #include <unistd.h>, moved to defs.h.
+
+Mon Aug 30 15:14:43 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * defs.h (struct tui_stream, enum streamtype): Move from here.
+ * utils.c: To here.
+
+ * main.c (tui_file_fputs): Move from here.
+ * utils.c: To here.
+
+Sun Aug 29 10:03:32 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * gdb-events.h, gdb-events.c, gdb-events.sh: New files.
+
+1999-08-27 Michael Snyder <msnyder@cleaver.cygnus.com>
+
+ * solib.c (open_symbol_file_object): new function.
+ Called when attaching to a new process, if there is no loaded
+ symbol file. Attempts to locate the executable file for the
+ attached process and load symbols from it.
+ (solib_add): Call open_symbol_file_object if attaching to a
+ new process and no open symbol file.
+
+1999-08-27 Jason Molenda (jsm@bugshack.cygnus.com)
+
+ * config/i386/tm-sun386.h (GDB_TARGET_IS_SUN386): Definition
+ removed--no longer checked anywhere in gdb.
+
+1999-08-27 Stan Shebs <shebs@andros.cygnus.com>
+
+ * infrun.c (stop_stepping): New function, broken out from
+ stop_stepping label in handle_inferior_event.
+ (handle_inferior_event): Change gotos into function calls.
+
+Fri Aug 27 20:13:22 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * defs.h (LONGEST): Move definition to earlier in file - to just
+ after BFD.
+ (paddr_u, paddr_d): Declare.
+ * utils.c (decimal2str): New function.
+ (paddr_u, paddr_d): Define.
+
+ * remote.c (remote_cisco_section_offsets,
+ compare_sections_command): Fix XprintfX arguments. Use paddr...
+ (putpkt_binary): Fix XprintfX arguments.
+
+Tue Aug 24 21:30:36 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * arm-tdep.c (arm_init_extra_frame_info): Add braces. Recommended
+ by gcc -Wparentheses.
+
+1999-08-26 Stan Shebs <shebs@andros.cygnus.com>
+
+ * infrun.c (check_sigtramp2): New function, broken out from
+ check_sigtramp2 label in handle_inferior_event.
+ (handle_inferior_event): Change gotos into function calls.
+
+ Declare Tahoe configuration obsolete.
+ * configure.host, configure.tgt: Comment out Tahoe configs.
+ * Makefile.in: Comment out Tahoe-related action.
+ * tahoe-tdep.c, config/tahoe/*: Comment out.
+ * NEWS: Mention obsolete status.
+
+1999-08-26 J.T. Conklin <jtc@redback.com>
+
+ * i386-stub.c, m32r-stub.c, m68k-stub.c, sh-stub.c, sh-stub.c,
+ sparc-stub, sparcl-stub.c sparclet-stub.c (getpacket): If '$',
+ the packet start character is received in the 'middle' of a
+ packet, assume that packet end character has been lost and
+ start a new packet.
+
+ * i386-stub.c, m32r-stub.c, m68k-stub.c, sh-stub.c, sparc-stub.c,
+ sparcl-stub.c sparclet-stub.c (getpacket): Changed to return ptr
+ to first character of input buffer. Removed & 0x7f masks.
+ (handle_exception): Don't access remcomInBuffer directly.
+
+1999-08-25 Stan Shebs <shebs@andros.cygnus.com>
+
+ * breakpoint.c (disable_breakpoints_in_shlibs): Only disable
+ enabled breakpoints.
+
+Tue Aug 24 14:59:23 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * tracepoint.c, remote.c, pa64solib.h, value.h, somsolib.h,
+ solib.h, scm-lang.h, language.h, inferior.h, defs.h, coff-solib.h,
+ ch-lang.h, breakpoint.h, annotate.h: Remove #if __STDC__ wrapping
+ struct declarations.
+
+ * config/sparc/nm-sun4sol2.h, config/mn10300/tm-mn10300.h,
+ config/mn10200/tm-mn10200.h, config/i386/tm-i386.h,
+ config/i386/tm-i386v.h, config/i386/nm-i386sol2.h,
+ config/pa/nm-hppah.h, config/rs6000/nm-rs6000.h,
+ config/sparc/tm-sp64.h, config/v850/tm-v850.h,
+ config/tic80/tm-tic80.h, config/sparc/tm-sparc.h,
+ config/sh/tm-sh.h, config/rs6000/tm-rs6000.h, config/pa/tm-hppa.h,
+ config/mips/tm-mips.h, config/m68k/tm-m68k.h,
+ config/m32r/tm-m32r.h, config/i960/tm-mon960.h,
+ config/fr30/tm-fr30.h, config/h8300/tm-h8300.h,
+ config/arm/tm-arm.h, config/alpha/tm-alpha.h,
+ config/a29k/tm-a29k.h: Ditto.
+
+Wed Aug 25 10:45:33 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * Makefile.in (gdb$(EXEEXT)): Add dependency on TDEPLIBS.
+
+ * config/arm/arm.mt (TDEPLIBS): Define. Move libangsd.a to here.
+ (TDEPFILES): From here.
+
+1999-08-24 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * top.c (init_main): Add new set/show command exec-done-display,
+ default value is off.
+ * event-loop.h: Export exec_done_display_p.
+ * event-top.c: New variable exec_done_display_p.
+ * infrun.c (complete_execution): Print completion message if
+ corresponding flag is set.
+
+ * top.c (DEFAULT_PROMPT): Add space after "(gdb)" at end of prompt.
+
+ From: J.T. Conklin <jtc@redback.com>
+ * top.c (DEFAULT_PROMPT): Set to "(gdb)" if not already defined.
+ (init_main): Always use DEFAULT_PROMPT.
+
+Tue Aug 24 03:23:31 1999 Jeffrey A Law (law@cygnus.com)
+
+ * hppa-tdep.c: Remove useless "purecov: deadcode" comments.
+ (hppa_use_struct_convention): Update for PA64.
+ (hppa_frame_saved_pc): Properly extract the saved PC in a call
+ dummy frame.
+ (in_solib_call_trampoline): Return nonzero if we are in a function
+ called ".stub".
+ (prologue_inst_adjust_sp): Handle std,ma.
+ (skip_prologue_hard_way): Handle more PA2.0/PA64 insns.
+ (hppa_frame_find_saved_regs): Similarly. Handle indirect save of
+ %r3 into the stack.
+
+ * config/pa/tm-hppa64.h (CALL_DUMMY_BREAKPOINT_OFFSET_P): Define.
+ (CALL_DUMMY_BREAKPOINT_OFFSET): Define.
+
+Tue Aug 24 14:59:23 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * Makefile.in (gdb$(EXEEXT)): Add dependency on main.o that was
+ lost when libgdb.a was added.
+
+Tue Aug 24 14:26:34 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * gdbarch.c, gdbarch.h: Convert to pure ISO-C.
+
+ * gdbarch.sh: New file.
+ * gdbarch.c, gdbarch.h: Add note describing gdbarch.sh
+
+Mon Aug 23 19:36:17 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * Makefile.in (libgdb.a): New target.
+ (gdb$(EXEEXT)): Add dependency on libgdb.a.
+ (libgdb-files, LIBGDB_OBS, libgdb, LIBGDBDEPS, LIBGDBFILES): Delete.
+
+Mon Aug 23 10:16:32 1999 Jeffrey A Law (law@cygnus.com)
+
+ * infttrate.c (child_pid_to_exec_file): Find the correct base
+ of the stack for PA64.
+
+ * pa64solib.c: Fix some minor whitespace problems.
+ (bfd_lookup_symbol): New function.
+ (pa64_solib_create_inferior_hook): Find the address __dld_break
+ in the dynamic linker. Try to set a shlib event breakpoint in
+ that function.
+ (add_to_solist): Do not add the same shared library to the shlib
+ list more than once.
+
+Sun Aug 22 14:49:40 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * value.h (enum lval_type): Move declaration from here.
+ * defs.h (enum lval_type): To here.
+ * frame.h, gdbarch.h: Delete incomplete declaration of ``enum
+ lval_type''.
+
+1999-08-20 Michael Snyder <msnyder@cleaver.cygnus.com>
+
+ * breakpoint.c (can_use_hardware_watchpoint): reject expressions
+ that refer to registers or register variables.
+
+Fri Aug 20 10:53:38 1999 Jeffrey A Law (law@cygnus.com)
+
+ * hppa-tdep.c (hppa_fix_call_dummy): Provide PA2.0W aware code.
+
+ * pa64solib.c pa64solib.h: New files.
+
+ * config/pa/hppa64.mt: Delete commented out code that is and
+ never will be appropriate for this target.
+ * config/pa/hpux11w.mt (TDEPFILES): Remove SOM references. Also
+ remove pa64solib.o.
+ * config/pa/hpux11w.mh (NATDEPFILES): Remove SOM references.
+
+ * configure.host; Use "hpux11w" and "hpux11" instead of
+ "hpux1100w" and "hpux1100" respectively
+ * config/pa/hpux11w.mh: Renamed from hpux1100w.mh.
+ * config/pa/hpux11w.mt, config/pa/hpux11.mh: Likewise.
+ * config/pa/hpux11.mt: Likewise.
+
+1999-08-19 Michael Snyder <msnyder@cleaver.cygnus.com>
+
+ * breakpoint.h (target_hw_bp_type): new enum.
+ * breakpoint.c (insert_breakpoints): use enum instead of consts.
+ (remove_breakpoint): use enum instead of consts.
+ (throughout): use "warning" instead of "fprintf(stderr, ..."
+ [Also clean up a bunch of excessively long lines.]
+
+1999-08-19 J.T. Conklin <jtc@redback.com>
+
+ * i386-stub.c (waitabit): Removed.
+ (breakpoint): Update.
+
+ * i386-stub.c, m32r-stub.c, sparc-stub.c, sparcl-stub.c,
+ sparclet-stub.c (set_debug_traps): Don't send gratuitous ACK.
+
+ * m68k-stub.c (putpacket): Restore code so that packets are sent
+ until an ACK is received.
+
+1999-08-19 Eli Zaretskii <eliz@is.elta.co.il>
+
+ * breakpoint.c (bpstat_stop_status): Accept triggered addresses
+ anywhere inside the region occupied by a watched variable as a
+ sign that the watchpoint fired. Don't stop if some watchpoint
+ was triggered, but its address doesn't match the address of this
+ watchpoint.
+ (TARGET_REGION_OK_FOR_HW_WATCHPOINT): New macro.
+ Default definition is to call TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT.
+ (can_use_hardware_watchpoint): Call TARGET_REGION_OK_FOR_HW_WATCHPOINT;
+ if it returns zero, return zero immediately.
+ (insert_breakpoints): Try to insert watchpoints for all the values
+ on the value chain, even if some of them fail to insert. Remove
+ the breakpoint if parts of its value chain couldn't be inserted.
+
+1999-08-19 Eli Zaretskii <eliz@is.elta.co.il>
+
+ * go32-nat.c (go32_stopped_by_watchpoint): Remove unused code.
+
+1999-08-19 Eli Zaretskii <eliz@is.elta.co.il>
+
+ * go32-nat.c (tcgetpgrp, tcsetpgrp): New functions.
+
+1999-08-19 Eli Zaretskii <eliz@is.elta.co.il>
+
+ * go32-nat.c (go32_wait): If we are in a single-step mode, and the
+ next instruction is INT nn or INTO, use a temporary breakpoint to
+ simulate single-step mode, and reset the trace flag.
+
+1999-08-19 Eli Zaretskii <eliz@is.elta.co.il>
+
+ * go32-nat.c (wp_op): New typedef.
+ (SHOW_DR): Print the length of watched region as well.
+ (go32_insert_aligned_watchpoint): Remove unused argument PID. All
+ callers and the prototype changed.
+ (go32_handle_nonaligned_watchpoint): Renamed from
+ go32_insert_nonaligned_watchpoint. Now handles all operations on
+ non-aligned watchpoints: insertion, deletion, and counting. If
+ called with wp_count as the first argument, return the count of
+ debug registers needed to watch the region. Don't break out of
+ the loop before all the addresses in the region are processed.
+ (go32_remove_watchpoint): Call go32_remove_aligned_watchpoint to
+ do the actual work.
+ (go32_remove_aligned_watchpoint): New function, modeled after
+ go32_insert_aligned_watchpoint. Removes watchpoints that watch
+ regions of arbitrary length by calling
+ go32_handle_nonaligned_watchpoint as needed.
+ (go32_region_ok_for_watchpoint): New function, called from
+ can_use_hardware_watchpoint via the new macro
+ TARGET_REGION_OK_FOR_HW_WATCHPOINT.
+
+ * config/i386/nm-go32.h (TARGET_REGION_OK_FOR_HW_WATCHPOINT):
+ Define to call go32_region_ok_for_watchpoint.
+ (DECR_PC_AFTER_HW_BREAK): Define back to zero (previous redefinition
+ to 1 was due to a bug in go32-nat.c).
+
+1999-08-19 Eli Zaretskii <eliz@is.elta.co.il>
+
+ * go32-nat.c (cleanup_dregs): New function.
+ (go32_mourn_inferior): Call it.
+ (IS_REG_FREE, LOCAL_ENABLE_REG, GLOBAL_ENABLE_REG, DISABLE_REG,
+ SET_BREAK, SET_WATCH, IS_WATCH, WATCH_HIT): Protect arguments with
+ parentheses.
+ (SET_BREAK): Increment the debug register's reference count.
+ (DR_DEF): New macro, returns the access and length bits of the
+ breakpoint.
+ (SHOW_DR): Print the reference count of each register. Disable or
+ enable print-out depending on an environment variable GDB_SHOW_DR.
+ (go32_insert_aligned_watchpoint): Look for an occupied debug
+ register with the same address and access/length bits, and reuse
+ it by incrementing reference the count, before occupying another
+ register. Return zero upon success.
+ (go32_insert_nonaligned_watchpoint): Pass the read/write bits to
+ go32_remove_watchpoint.
+ (go32_remove_watchpoint): Accept an additional parameter: the
+ read/write bits of the watchpoint to remove, and only remove a
+ watchpoint if it's occupied and its address and read/write bits
+ match. Only disable the register if its reference count is zero;
+ otherwise just decrease the reference count.
+ (go32_remove_hw_breakpoint): Only decrease reference count and
+ disable the debug register if it is occupied and its access bits
+ match those of an instruction breakpoint.
+ (go32_insert_hw_breakpoint): Before occupying another debug
+ register, look for an already occupied register that defines an
+ instruction breakpoint with the same address. If found, increment
+ its reference count. Call SHOW_DR even if failed to insert a
+ breakpoint.
+
+ * config/i386/nm-go32.h (target_remove_watchpoint): Accept the
+ TYPE argument as well.
+
+Wed Aug 18 17:47:25 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * mips-tdep.c: Add more comments.
+
+1999-08-17 Stan Shebs <shebs@andros.cygnus.com>
+
+ * blockframe.c: Don't use PARAMS anymore, remove obsolete comment
+ about frameless functions.
+
+1999-08-16 Michael Snyder <msnyder@cleaver.cygnus.com>
+
+ * thread.c (delete_thread): delete any step_resume breakpoint
+ held by the thread. (prune_threads): call delete_thread.
+ * breakpoint.c (breakpoint_init_inferior): if startup, then
+ delete any remaining step_resume breakpoints.
+ * infrun.c (handle_inferior_event): add cautionary comment.
+
+1999-08-16 Fernando Nasser <fnasser@totem.to.cygnus.com>
+
+ * remote.c (remote_async_mourn): New function. Async version of
+ remote_mourn().
+
+1999-08-16 Eli Zaretskii <eliz@is.elta.co.il>
+
+ * terminal.h [__GO32__]: Remove conditional; DJGPP now supports
+ termios.
+
+1999-08-16 Eli Zaretskii <eliz@is.elta.co.il>
+
+ * command.c (CANT_FORK) [__MSDOS__]: Define.
+ (shell_escape) [CANT_FORK]: If ARG is NULL, pass an empty string
+ to `system'.
+ [__DJGPP__]: Return to the original directory after the shell
+ exits.
+
+1999-08-16 Eli Zaretskii <eliz@is.elta.co.il>
+
+ * config/i386/xm-go32.h (ROOTED_P): Don't reference X[1] if X[0]
+ is a null character.
+
+ * config/i386/nm-go32.h (DECR_PC_AFTER_HW_BREAK): Define to 1.
+
+1999-08-16 Eli Zaretskii <eliz@is.elta.co.il>
+
+ * go32-nat.c (redir_cmdline_parse, redir_cmdline_delete,
+ redir_to_child, redir_to_debugger, redir_debug_init)
+ [__DJGPP_MINOR__ < 3]: Dummy stubs for redirecting debuggee's
+ standard handles.
+ (print_387_status): Print "last FP instruction", not "last
+ exception". Restore the upper 5 bits of the opcode that aren't
+ stored in the FPU state. Print the FPU stack in its physical
+ order, not relative to ST(0). Print "special", not "trap" for
+ unnormals and infinities. Print all 10 bytes of each FP register,
+ and print them with 19 significant digits.
+ (regno_mapping): Make the mapping consistent with tm-go32.h.
+ (sig_map): Add mappings for SIGQUIT, SIGFPE, SIGALRM. Map NMI to
+ SIGBUS.
+ (excep_map): New variable, maps GDB signals to DJGPP exceptions.
+ (go32_attach): Signal an error: we cannot attach to other
+ processes.
+ (go32_resume): Record the signal with which the inferior should be
+ resumed, mapped to the DJGPP exception number.
+ (go32_wait): Pass the signal recorded in go32_resume to the
+ debuggee. Save and restore debugger's and debuggee's current
+ working directory.
+ [__DJGPP_MINOR__ < 3]: Save and restore inferior's FPU state.
+ (store_register): FPU regsiters have numbers less than 31.
+ (go32_kill_inferior): Delete the parsed command-line storage.
+ (go32_create_inferior): Initialize the parsed command-line
+ storage. Parse the command line and create the redirections for
+ inferior's standard handles.
+ [__DJGPP_MINOR__ < 3]: Init the inferior's FPU state.
+ (ignore2): Function deleted.
+ (device_mode): New function, switches a character device between
+ raw and cooked mode.
+ (go32_terminal_init): Invalidate the raw/cooked mode information.
+ (go32_terminal_info): Print whether the inferior's terminal is in
+ raw or cooked mode.
+ [__DJGPP_MINOR__ > 2]: Say if standard handles are redirected or
+ closed by the inferior.
+ (go32_terminal_inferior): Switch standard handles to the
+ inferior's files/devices. Put the inferior's input device to
+ raw/cooked mode, exactly like we found it last time.
+ (go32_terminal_ours): Restore debugger's standard handles and put
+ the terminal into cooked mode. Save the mode of inferior's input
+ device.
+ (init_go32_ops): Assign go32_ops.to_attach,
+ go32_ops.to_terminal_info, go32_ops.to_terminal_ours_for_output.
+ Initialize inferior's cwd and the command-line storage.
+
+Mon Aug 16 14:29:30 1999 Jeffrey A Law (law@cygnus.com)
+
+ * config/pa/tm-hppa.h (ARGS_GROW_DOWNWARD): Define.
+ * config/pa/tm-hppa64.h (ARGS_GROW_DOWNWARD): Undefine.
+ * hppa-tdep.c (hppa_push_arguments): Handle arguments growing in
+ both directions depending ARGS_GROW_DOWNWARD.
+ (hppa_find_saved_regs): Update for 64bit wide registers & pointers
+ and PA64 ABI.
+
+ * hppa-tdep.c (hppa_pop_frame): Various fixes for 64bit wide
+ registers and pointers.
+ (hppa_fix_call_dummy, skip_trampoline_code): Likewise.
+ (restore_pc_queue): Update tests for width of memory loads.
+ (hppa_push_arguments): Delete version that was #if 0'd out.
+
+ * hppa-tdep.c (push_dummy_frame): Handle the new 64it ABI.
+ (find_dummy_frame_regs): Corresponding changes.
+
+ * hppa-tdep.c (read_unwind_info): Initialize obj_private->dp.
+ (internalize_unwinds): Improve test for when to use segment
+ relative code for unwinder bounds.
+ (rp_saved): Fix offset of saved return pointer for the 64bit ABI.
+ (hppa_frame_saved_pc): Various updates to handle 64bit registers
+ and pointers.
+ (frame_chain, restore_pc_queue): Likewise.
+
+ * hppa-tdep.c (rp_saved): RP is saved at frame-16 when
+ pointers are 64bits wide.
+
+ * hppa-tdep.c (record_text_segment_lowaddr): New function.
+ (internalize_unwinds): Use it if addressess are 8 bytes wide.
+
+ * symfile.c (syms_from_objfile): No longer warn if the lowest
+ section does not have SEC_CODE set.
+
+ * Makefile.in (pa64solib.o): Add dependencies.
+
+ * hppah-nat.c (store_inferior_registers): Do not try to write a
+ nonzero value to the high part of IPSW. Fix typo in unable to store
+ warning.
+
+ * config/pa/tm-hppa.h (opd_data structure): Delete. Not actually
+ needed.
+ (struct obj_private_struct): Add new entry for the objfile's DP
+ value.
+ * config/pa/tm-hppa64.h (CALL_DUMMY): Add a nop to make it an even
+ number of instructions. Pack the dummy into word sized hunks.
+ (CALL_DUMMY_LENGTH): Update appropriately.
+ (PC_IN_CALL_DUMMY, CALL_DUMMY_LOCATION_AFTER_TEXT_END): Delete.
+
+Mon Aug 16 19:08:19 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * configure.in: Try -lsocket when looking for socketpair.
+ * configure, config.h: Re-generate.
+
+1999-08-13 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ From Christopher Faylor <cgf@cygnus.com>:
+
+ * event-loop.c (gdb_wait_for_event): Before going to wait for
+ another event with select or poll, flush the error and the output
+ streams.
+
+ * event-top.c (gdb_readline2): Do not buffer the input, because
+ doing so can interfere with select/poll in bad ways.
+
+Fri Aug 13 17:36:56 1999 Eli Zaretskii <eliz@is.elta.co.il>
+
+ * maint.c (maintenance_dump_me) [__DJGPP__]: Simulate a core dump
+ with SIGABRT.
+ * utils.c (quit) [__MSDOS__]: Don't mention SIGINT, since it's not
+ gonna happen.
+ (notice_quit): No need to define this function for the DJGPP port.
+
+1999-08-13 James Ingham <jingham@leda.cygnus.com>
+
+ * arm-tdep.c (arm_frameless_function_invocation): SKIP_PROLOGUE
+ macro no longer modifies its argument. Update uses to accord.
+
+ * config/arm/arm.mt (TDEPFILES): Add the remote-rdi.o to the
+ TDEPFILES.
+ * configure.tgt: Add rdi-share to configdir for the Arm targets.
+
+Fri Aug 13 11:16:32 1999 Jeffrey A Law (law@cygnus.com)
+
+ * hppah-nat.c (store_inferior_registers): Revamp to be PA2.0W
+ aware.
+
+ * infttrace.c (ttrace_write_reg_64): New function.
+
+ * hp-symtab-read.c (is_in_import_list): Delete extern declaration.
+ * somread.c (is_in_import_list): Delete function.
+ * objfiles.c (is_in_import_list): New function.
+ * objfiles.h (is_in_import_list): Declare.
+
+ * config/pa/tm-hppa64.h (GDB_TARGET_IS_HPPA20W): Define before
+ including tm-hppah.h.
+ (PC_IN_CALL_DUMMY): Define.
+ (HPUX_1100): Similarly.
+ * config/pa/tm-hppa.h (somsolib.h, pa64solib.h): Conditionalize
+ includes on GDB_TARGET_IS_HPPA20W.
+
+ * configure.host: Distinguish between wide and narrow modes
+ for hpux11.
+ * config/pa/hpux1100w.mh, config/pa/hpux1100w.mt: New files.
+
+ * config/pa/tm-hppa64.h (STACK_ALIGN): Redefine.
+ (REG_PARM_STACK_SPACE): Likewise.
+
+ * config/pa/tm-hppa.h (CLEAN_UP_REGISTER_VALUE): Handle 64bit
+ PA target correctly.
+ (REG_PARM_STACK_SPACE): Define.
+ (struct unwind_table_entry): region_start and region_end are
+ CORE_ADDRs.
+ (typedef opd_data): New.
+ (obj_private_data_t): Include pointer to opd_data structure.
+
+1999-08-13 Keith Seitz <keiths@cygnus.com>
+
+ * stabsread.c (stabsread_clear_cache): New funciton which clears
+ an optimization cache of the reader.
+
+ * coffread.c (coff_symfile_finish): Give stabs reader a chance to
+ clean up.
+
+ * win32-nat.c (handle_load_dll): Don't suppress re-reading symbols
+ from a DLL if an objfile for it already exists. (Not that this should
+ happen anymore anyway...)
+
+1999-08-13 Keith Seitz <keiths@cygnus.com>
+
+ * config/mcore/tm-mcore.h (SAVE_DUMMY_FRAME_TOS): Define for MCore,
+ which also requires that the stack pointer be saved for call
+ dummies BEFORE arguments get pushed onto it.
+
+1999-08-12 Stan Shebs <shebs@andros.cygnus.com>
+
+ From Eli Zaretskii <eliz@is.elta.co.il>:
+ * source.c (mod_path) [_WIN32 || __DJGPP__]: Don't remove trailing
+ slash from "d:/". Don't overstep the beginning of name.
+ [_WIN32 || __MSDOS__]: Convert "d:" to "d:.", otherwise appending
+ a slash changes its meaning.
+ (openp): Use SLASH_P, not equality with SLASH_CHAR.
+ (print_source_lines_base) [CRLF_SOURCE_FILES]: Skip \r only before
+ a \n.
+ (forward_search_command) [CRLF_SOURCE_FILES]: Remove \r at the end
+ of all lines.
+ (reverse_search_command) [CRLF_SOURCE_FILES]: Likewise.
+
+ * gnu-regex.c (CHAR_CLASS_MAX_LENGTH): Don't use wide characters
+ unless HAVE_BTOWC is defined.
+
+Fri Aug 13 10:20:12 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ From J.T. Conklin <jtc@redback.com>:
+ * gdbinit.in: Change the template .gdbinit to match the recent
+ fatal error handling change.
+
+1999-08-11 Keith Seitz <keiths@cygnus.com>
+
+ * maint.c (maintenance_internal_error): Fix typo in prototype.
+
+Wed Aug 11 15:38:05 1999 Andrew Cagney <cagney@amy.cygnus.com>
+
+ * remote.c (remote_rcmd): Pass an empty command across to the
+ target. Check for and handle an ``Enn'' return status.
+
+Tue Aug 10 13:59:45 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * maint.c (_initialize_maint_cmds): Add ``maintenance
+ internal-error'' command.
+ (maintenance_internal_error): New function.
+
+1999-08-10 James Ingham <jingham@leda.cygnus.com>
+
+ * top.c: Remove the disassembly_flavor_hook, use the new set_hook
+ instead.
+ * defs.h: Ditto.
+ * arm-tdep.c (set_disassembly_flavor_sfunc): Ditto.
+
+1999-08-10 Michael Snyder <msnyder@cleaver.cygnus.com>
+
+ * config/i386/nm-i386sol2.h (FIND_NEW_THREADS): remove, obsolete.
+ * config/sparc/nm-sun4sol2.h (FIND_NEW_THREADS): remove, obsolete.
+
+1999-08-10 J.T. Conklin <jtc@redback.com>
+
+ * configure.tgt (i[3456]86-*-aout*, i[3456]86-*-coff*,
+ i[3456]86-*-elf*): Use embed.mt.
+ * config/i386/embed.mt: New file.
+
+1999-08-10 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * remote.c (remote_async_open_1): Remove casting in call to
+ add_file_handler.
+ (extended_remote_async_create_inferior): Ditto.
+
+ * event-top.c (change_line_handler): Ditto.
+ (_initialize_event_loop): Ditto.
+
+ * infrun.c (complete_execution): Ditto.
+
+ * event-loop.c (add_file_handler): Change proc parameter to be ptr
+ to func with void parameter, rather than void*. Coerce second
+ paramter in calls to create_file_handler. Replace
+ async_handler_func and file_handler_func with handler_func.
+
+ * event-loop.h: Get rid of typedefs for file_handler_func and
+ async_handler_func, just have one, and call it handler_func.
+ Replace async_handler_func and file_handler_func occurrences with
+ handler_func.
+
+Tue Aug 10 03:13:03 1999 Jeffrey A Law (law@cygnus.com)
+
+ * hppa-tdep.c: Delete random #if 0 code.
+ (is_branch): Handle new branching opcodes from PA2.0
+ (inst_saves_gr, inst_saves_fr): Handle additional instructions
+ used to save general and floating point registers in the stack.
+ (skip_prologue_hard_way): Handle additional instructions to
+ save the return pointer in the stack.
+ (after_prologue): Fix mis-guided and incorrect code to find
+ the end of the prologue using debug symbols.
+ (hppa_skip_prologue): Generally clean up comments, lose code
+ which does not apply to the PA, etc.
+
+Sun Aug 8 17:53:41 1999 Andrew Cagney <cagney@amy.cygnus.com>
+
+ * MAINTAINERS: Make Andrew Cagney the mn10300 maintainer.
+ Transfer responsibility for the PowerPC from Andrew Cagney to
+ Elena Zannoni.
+
+Tue Aug 10 13:59:45 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ Based on code from J.T. Conklin <jtc@redback.com>:
+ * utils.c (internal_error): Make quit? and coredump? separate
+ questions so that the user can dump-core and not quit.
+ (internal_error): Cleanup error message.
+
+1999-08-09 Tom Tromey <tromey@cygnus.com>
+
+ * kod-cisco.c (cisco_kod_open): Removed incorrect `arg' argument.
+
+Sun Aug 8 12:06:47 1999 Fred Fish <fnf@cygnus.com>
+
+ * coffread.c (process_coff_symbol): Remove section_offsets from
+ prototype and function definition. Get section_offsets from the
+ passed objfile and pass it on to callees the same way.
+ (coff_symtab_read): Ditto.
+ (coff_symfile_read): Ditto.
+ * dbxread.c (read_dbx_dynamic_symtab): Ditto.
+ (read_dbx_symtab): Ditto.
+ (dbx_symfile_read): Ditto.
+ (coffstab_build_psymtabs): Ditto.
+ (elfstab_build_psymtabs): Ditto.
+ (stabsect_build_psymtabs): Ditto.
+ * dstread.c (dst_symfile_read): Ditto.
+ * elfread.c (elf_symfile_read): Ditto.
+ * jv-class.c (jv_class_symfile_read): Ditto.
+ * mipsread.c (mipscoff_symfile_read): Ditto.
+ * nlmread.c (nlm_symfile_read): Ditto.
+ * os9kread.c (os9k_symfile_read): Ditto.
+ * somread.c (som_symfile_read): Ditto.
+ * stabsread.h (elfstab_build_psymtabs): Ditto.
+ * xcoffread.c (xcoff_initial_scan): Ditto.
+
+ * symfile.h (sym_read): Remove section_offsets from prototype.
+ * symfile.c (syms_from_objfile): Call sym_read without
+ section_offsets.
+ (reread_symbols): Ditto.
+
+ * elfread.c (elfstab_offset_sections): Use SIZEOF_SECTION_OFFSETS
+ to allocate sections offsets array.
+ * xcoffread.c (xcoff_symfile_offsets): Ditto.
+
+ * partial-stab.h (section_offsets): Get from objfile.
+ * dbxread.c (read_dbx_symtab): Fix typo that made -1 casted
+ to a CORE_ADDR look like an subtraction expression.
+ * objfiles.h: Add some comments.
+ * symfile.c: Add some comments.
+ * objfiles.c: Add some comments.
+ (objfile_relocated): Use ALL_OBJFILE_OSECTIONS to iterate over
+ sections.
+ (find_pc_sect_sections): Use ALL_OBJSECTIONS to iterate over all
+ sections in all objfiles.
+ * symfile.c (syms_from_objfile): Use ALL_OBJFILE_OSECTIONS.
+
+ * irix5-nat.c (symbol_add_stub): Fix typo that made taking the
+ address of lowest_sect with '&' look like a bitwise and op.
+ * osfsolib.c (symbol_add_stub): Ditto.
+ * solib.c (symbol_add_stub): Ditto.
+ * symfile.c (syms_from_objfile): Ditto.
+
+ * dwarf2read.c (dwarf2_build_psymtabs_hard): Minor format tweak.
+ * symfile.c (syms_from_objfile): Ditto, and fix typo.
+ * top.c (init_main): Fix typo in comment (DEFULAT_PROMPT).
+ * doc/gdbint.texinfo (find_sym_fns): This replaces symfile_init.
+
+1999-08-08 James Ingham <jingham@leda.cygnus.com>
+
+ * remote.c (remote_insert_breakpoint): Fix typo in Z packet support.
+ Also move Z packet support OUTSIDE of REMOTE_BREAKPOINT ifdef,
+ since this is not set for all targets that support the Z packet.
+
+Fri Aug 6 17:17:28 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * defs.h (fatal): Delete declaration.
+ (internal_error): Declare.
+ * utils.c (nomem): Call internal_error instead of fatal.
+ (fatal_dump_core): Delete.
+ (malloc_botch): Print message direct to stderr.
+ (fatal): Delete definition.
+ * utils.c (internal_error): Define.
+
+ * gdbarch.h, gdbarch.c, hppah-nat.c, ch-exp.c, dsrec.c, sh-tdep.c,
+ infptrace.c, f-lang.c, symm-nat.c, top.c, m3-nat.c, v850-tdep.c,
+ remote-vx.c, remote-sim.c, remote-mips.c, source.c, infcmd.c,
+ findvar.c, remote.c: Replace fatal with call to internal_error.
+
+Sun Aug 8 15:28:33 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * ser-pipe.c (STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO): Move
+ definition from here.
+ * defs.h: To here.
+
+Sat Aug 7 21:44:59 1999 Fred Fish <fnf@cygnus.com>
+
+ * remote.c (remote_insert_breakpoint): Fix typo, missing ';'.
+
+Sun Aug 8 11:26:57 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * mips-tdep.c (mips_gdbarch_init): Add break; to the default case.
+
+Fri Aug 6 19:26:03 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * defs.h: Delete #if ANSI_PROTOTYPES code, GDB assumes ISO-C.
+ * remote-rdp.c (send_rdp), remote-os9k.c (printf_monitor),
+ remote-mips.c: (mips_error), remote-array.c: (printf_monitor,
+ debuglogs), complaints.c (complain), monitor.c:
+ (monitor_printf_noecho, monitor_printf), language.c (type_error,
+ range_error), remote-st.c: (printf_stdebug), remote-sim.c
+ (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
+ gdb_os_evprintf_filtered, gdb_os_error), serial.c (serial_printf),
+ utils.c (warning, error, fatal, fatal_dump_core, (query,
+ fprintf_filtered, fprintf_unfiltered, fprintfi_filtered,
+ printf_filtered, printf_unfiltered, printfi_filtered): Delete
+ legacy #ifndef ANSI_PROTOTYPES varargs code.
+
+ * defs.h: Don't #include <varargs.h>.
+ * remote-rdp.c, remote-os9k.c, remote-mips.c, remote-array.c,
+ monitor.c, remote-st.c: Don't include <varargs.h> or <stdarg.h>.
+
+1999-08-06 James Ingham <jingham@leda.cygnus.com>
+
+ * configure.in, configure: add the --enable-multi-ice to determine
+ whether to configure and build the multi-ice-gdb-server. Note,
+ for now this only builds on cygwin, so don't enable it for other
+ platforms...
+
+1999-08-06 Tom Tromey <tromey@cygnus.com>
+
+ * Makefile.in (SFILES): Added kod.c and kod-cisco.c.
+ (COMMON_OBS): Added kod.o and kod-cisco.o.
+ (kod-cisco.o): New target.
+ (kod.o): New target.
+ * kod-cisco.c: New file.
+ * kod.c: New file.
+
+1999-08-06 James Ingham <jingham@leda.cygnus.com>
+
+ These are some fixups for the Arm, and support for the
+ disassembly-flavor for the ARM.
+
+ * defs.h: Declare the disassembly_flavor_hook
+ * top.c: Define the disassembly_flavor_hook
+ * i386-tdep.c: Remove unnecessary declaration of the
+ disassembly_flavor_hook.
+
+ * config/arm/tm-arm.h: Change definition of
+ arm_init_extra_frame_info.
+ Add a few more comments.
+ * arm-tdep.c (arm_init_extra_frame_info): Listen to and use the
+ fromleaf parameter passed into init_extra_frame_info.
+ (set_disassembly_flavor_sfunc): New Function.
+ (set_disassembly_flavor): New Function.
+ (arm_othernames): Use the set_disassembly_flavor.
+ (_initialize_arm_tdep): Setup the disassembly flavor commands, and
+ initialize the flavor.
+ (arm_frameless_function_invocation): Adjust for
+ frameless functions that have 1 or 2 instructions that mimic the
+ standard APCS form.
+ (arm_scan_prologue): Be more careful about scanning the function
+ prologue. Don't match things that just have a few of the prologue
+ instructions out of order, and don't get thrown by the scheduler
+ migrating instructions into the prologue.
+
+ Add support for the "Z" and "z" packets to request the stub
+ to set a breakpoint.
+
+ * remote.c (set_remote_protocol_Z_packet_cmd): New function.
+ (show_remote_protocol_Z_packet_cmd): New Function.
+ (remote_open_1): Init the Z packet config.
+ (remote_async_open_1): Init the Z packet config.
+ (remote_insert_breakpoint): Use the "Z" packet if supported.
+ (remote_remove_breakpoint): Use the "z" packet if supported.
+ (remote_insert_watchpoint): New Function - currently wired to
+ nothing.
+ (remote_remove_watchpoint): Ditto.
+ (remote_insert_hw_breakpoint): Ditto.
+ (remote_remove_hw_breakpoint): Ditto.
+
+1999-08-06 Stan Shebs <shebs@andros.cygnus.com>
+
+ * infcmd.c: Include parser-defs.h.
+ (interrupt_target_command): Declare.
+ (stack_dummy_testing): Remove old funky flag.
+ (run_stack_dummy): Remove unused reference to old funky flag.
+
+1999-08-06 Tom Tromey <tromey@cygnus.com>
+
+ * command.c (do_setshow_command): Call set_hook if not NULL.
+ * top.c (set_hook): New hook definition.
+ * defs.h (set_hook): Declare.
+
+1999-08-05 Stan Shebs <shebs@andros.cygnus.com>
+
+ * infrun.c: Convert code to pure standard C, elim some warnings.
+ (stopped_for_shlib_catchpoint): Remove, never used.
+
+1999-08-05 Keith Seitz <keiths@cygnus.com>
+
+ * NEWS: Mention new Motorola MCore target.
+
+ * sparc-tdep.c (gdb_print_insn_sparc): Print insns of the current
+ architecture.
+
+Thu Aug 5 20:41:22 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * configure.in (configdirs): Add check for socketpair.
+ * configure, config.in: Re-generate.
+
+ From Mon Jul 19 10:46:18 1999 Philippe De Muyter <phdm@macqel.be>:
+ * ser-pipe.c (sys/wait.h): Include this file only #if HAVE_SYS_WAIT_H.
+ (STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO): Macros defined if needed.
+
+Thu Aug 5 20:04:17 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * target.c (debug_to_open, debug_to_attach, debug_to_post_attach,
+ debug_to_require_attach, debug_to_detach, debug_to_require_detach,
+ debug_to_wait, debug_to_post_wait, debug_to_fetch_registers,
+ debug_to_store_registers, debug_to_prepare_to_store,
+ debug_to_xfer_memory, debug_to_files_info,
+ debug_to_insert_breakpoint, debug_to_remove_breakpoint,
+ debug_to_terminal_init, debug_to_terminal_inferior,
+ debug_to_terminal_ours_for_output, debug_to_terminal_ours,
+ debug_to_terminal_info, debug_to_kill, debug_to_load,
+ debug_to_lookup_symbol, debug_to_create_inferior,
+ debug_to_post_startup_inferior,
+ debug_to_acknowledge_created_inferior,
+ debug_to_clone_and_follow_inferior,
+ debug_to_post_follow_inferior_by_clone,
+ debug_to_insert_fork_catchpoint, debug_to_remove_fork_catchpoint,
+ debug_to_insert_vfork_catchpoint,
+ debug_to_remove_vfork_catchpoint, debug_to_has_forked,
+ debug_to_has_vforked, debug_to_can_follow_vfork_prior_to_exec,
+ debug_to_post_follow_vfork, debug_to_insert_exec_catchpoint,
+ debug_to_remove_exec_catchpoint, debug_to_has_execd,
+ debug_to_reported_exec_events_per_exec_call,
+ debug_to_has_syscall_event, debug_to_has_exited,
+ debug_to_mourn_inferior, debug_to_can_run,
+ debug_to_notice_signals, debug_to_thread_alive, debug_to_stop,
+ debug_to_query, debug_to_rcmd, debug_to_enable_exception_callback,
+ debug_to_get_current_exception_event, debug_to_pid_to_exec_file,
+ debug_to_core_file_to_sym_file, debug_to_close): Send trace output
+ to ``gdb_stdlog'' instead of ``gdb_stderr''.
+
+Thu Aug 5 16:22:10 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * remote.c (init_remote_ops): Initialize remote_ops.to_rcmd.
+ (init_remote_async_ops): Initialize remote_async_ops.to_query.
+ (remote_rcmd): New function.
+
+ * monitor.c (monitor_rcmd): Rename monitor_command.
+ (init_base_monitor_ops): Initialize monitor_ops.to_rcmd.
+ (_initialize_remote_monitors): Move "monitor" command from here.
+ * target.c (initialize_targets): To here.
+ (monitor_command): New function. Implement "monitor" command.
+
+ * target.c (cleanup_target): de_fault to_rcmd.
+ (update_current_target): INHERIT to_rcmd.
+ (debug_to_rcmd): New function.
+ (setup_target_debug): Initialize current_target.to_rcmd.
+
+ * target.h (struct target_ops): Add field to_rcmd.
+ (target_rcmd): Define.
+
+Thu Aug 5 14:24:07 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * remote.c: Replace comment describing remote protocol with
+ pointer to official document.
+
+Thu Aug 5 11:59:06 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * remote.c (remote_protocol_binary_download): New variable.
+ Replace ``remote_binary_download'' and ``remote_binary_checked''.
+ (set_remote_protocol_binary_download_cmd,
+ show_remote_protocol_binary_download_cmd): New functions.
+ (remote_open_1, remote_async_open_1, remote_cisco_open):
+ Initialize ``remote_protocol_binary_download'' instead of
+ ``remote_binary_download''.
+ (check_binary_download): Re-write.
+ (remote_write_bytes): Ditto.
+ (_initialize_remote): Add ``set remote X-packet'' and ``show
+ remote X-packet'' commands. Disable old ``set
+ remotebinarydownload'' command.
+
+1999-08-04 Keith Seitz <keiths@cygnus.com>
+
+ * remote-rdi.c (arm_rdi_close): Close the transport device, too.
+
+Wed Aug 4 10:42:58 1999 Fred Fish <fnf@cygnus.com>
+
+ * xcoffread.c (scan_xcoff_symtab): Change main_aux into
+ an array of 5 internal_auxent to leave room for bfd to
+ write n_numaux entries. Change code to use the first one.
+
+1999-08-02 Stan Shebs <shebs@andros.cygnus.com>
+
+ * c-valprint.c (c_val_print): When printing decimal equivalent
+ of a char, cast appropriately.
+
+1999-08-02 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ From Jonathan Larmour <jlarmour@cygnus.co.uk>:
+ * main.c (print_gdb_help): Use gdbinit variable to determine file
+ name used for --nx help
+
+1999-08-01 Jason Molenda (jsm@bugshack.cygnus.com)
+
+ * config/mips/tm-mips.h (BIG_ENDIAN): Don't define here.
+
+1999-08-01 Jim Blandy <jimb@zwingli.cygnus.com>
+
+ * stabsread.c (read_range_type): Handle an unsigned range type
+ whose length in bytes is any power of two, not just a few
+ common ones.
+
+ * monitor.c (monitor_expect): When we receive a character that
+ isn't part of the string we were expecting, don't just start
+ matching again at the beginning of the string --- some shorter
+ suffix of the input might be a prefix of the string too.
+
+1999-07-31 Fred Fish <fnf@cygnus.com>
+
+ * symfile.c (symbol_file_command): Fix typo that made -1 casted
+ to a CORE_ADDR look like an subtraction expression.
+ (add_symbol_file_command): Ditto.
+
+1999-07-30 Jim Blandy <jimb@cygnus.com>
+
+ * hppa-tdep.c (pa_print_registers): Frob register output some more.
+
+1999-07-29 Jim Blandy <jimb@cygnus.com>
+
+ * config/pa/nm-hppah.h (PTRACE_ARG3_TYPE): After more
+ consideration, make this a CORE_ADDR, like WDB did.
+
+ Rather than casting every single use of really_free_pendings to
+ make_cleanup_func, why not actually make it have that type? Golly!
+ * buildsym.c (really_free_pendings): Change argument type to PTR.
+ buildsym.h (really_free_pendings): Fix declaration.
+ * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1),
+ dwarf2read.c (psymtab_to_symtab_1), dwarfread
+ (psymtab_to_symtab_1), hp-psymtab-read.c (hpread_build_psymtabs),
+ os9kread.c (os9k_symfile_read, os9k_psymtab_to_symtab_1),
+ xcoffread.c (xcoff_psymtab_to_symtab_1, xcoff_initial_scan):
+ Remove casts.
+
+ Pass a CORE_ADDR safely through catch_errors.
+ * hppa-tdep.c (args_for_find_stub): New member, return_val.
+ (cover_find_stub_with_shl_get): Change argument and return type to
+ match catch_errors. Save return value of find_stub_with_shl_get
+ in *args.
+ (initialize_hp_cxx_exception_support): Collect value of
+ eh_notify_callback_addr from args.
+
+ Get rid of some noise. It would be nice to get helpful warnings
+ from the compiler about lossy conversions.
+ * hppa-tdep.c (eh_notify_hook_addr, eh_notify_callback_addr,
+ eh_break_addr, eh_catch_catch_addr, eh_catch_throw_addr,
+ break_callback_sal): Initialize these to zero, not NULL, to shush
+ warnings.
+ * infttrace.c (thread_fake_step): Compare signal to
+ TARGET_SIGNAL_0, not NULL, to avoid warnings.
+ (_initialize_infttrace): Add sanity check.
+
+ * config/pa/nm-hppah.h (PTRACE_ARG3_TYPE): Define this to be
+ long, so we can pass arguments properly to ptrace.
+
+ * hppah-nat.c (child_xfer_memory): Correctly compute mask to round
+ address to an int boundary.
+
+1999-07-29 Jim Blandy <jimb@cygnus.com>
+
+ Change from Ian Lance Taylor <ian@zembu.com>. The
+ i386_linux_sigtramp* functions should be moved to
+ i386-linux-tdep.c, when that file is introduced.
+
+ * config/i386/tm-linux.h (LINUX_SIGCONTEXT_SIZE): Define.
+ (LINUX_SIGCONTEXT_PC_OFFSET): Define.
+ (LINUX_SIGCONTEXT_SP_OFFSET): Define.
+ (SIGCONTEXT_PC_OFFSET): Don't define.
+ (I386_LINUX_SIGTRAMP): Define.
+ (IN_SIGTRAMP): Define.
+ (i386_linux_sigtramp): Declare.
+ (sigtramp_saved_pc): Define.
+ (i386_linux_sigtramp_saved_pc): Declare.
+ (FRAMELESS_SIGNAL): Define.
+ (FRAME_CHAIN, FRAME_SAVED_PC): Define after #undef.
+ * i386-tdep.c (i386_linux_sigtramp_start): New static function if
+ I386_LINUX_SIGTRAMP.
+ (i386_linux_sigtramp): New function if I386_LINUX_SIGTRAMP.
+ (i386_linux_sigtramp_saved_pc): Likewise.
+ (i386_linux_sigtramp_saved_sp): Likewise.
+
+1999-07-28 Jim Blandy <jimb@cygnus.com>
+
+ * infrun.c (handle_inferior_event): Don't try to use the code for
+ stepping over a function call to also handle stepping out of a
+ sigtramp on HP-UX. That ends up trashing step-resume breakpoints.
+ This change reverts some of David Taylor's change of 31 Dec 1998.
+ The HP-UX maintainer needs to submit a new change for whatever
+ problem the original change was trying to fix.
+
+1999-07-28 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * event-top.c (command_line_handler): Don't treat an empty line
+ from readline the same way as a multiline command. This avoids
+ missing detecting when the user presses just 'enter'.
+
+1999-07-28 Jim Blandy <jimb@cygnus.com>
+
+ Provide more sanity checking:
+ * infrun.c (handle_inferior_event): Before assigning a new
+ breakpoint to step_resume_breakpoint, make sure it's not already
+ pointing at one; if it is, that's a bug.
+ (check_for_old_step_resume_breakpoint): New function.
+
+1999-07-28 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ From Eli Zaretskii <eliz@is.elta.co.il>:
+ * top.c (gdb_init) [__MSDOS__]: Arrange for GDB to return to the
+ original directory before exiting.
+ (cd_command) [_WIN32 || __MSDOS__]: Canonicalize the new directory
+ name explicitly. Handle "d:/" names correctly.
+ (init_history) [__MSDOS__]: Use _gdb_history as the default GDB
+ history file name.
+
+Mon Jul 26 17:13:39 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * remote.c (enum packet_support, enum packet_detect, struct
+ packet_config): Define.
+ (set_packet_config_cmd, show_packet_config_cmd,
+ add_packet_config_cmd, init_packet_config): New functions.
+ Generic support for optional packets.
+ (remote_protocol_P): Replace stub_supports_P.
+ (set_remote_protocol_P_packet_cmd, show_remote_protocol_P_packet_cmd):
+ New functions.
+ (_initialize_remote): Add ``set remote-protocol-P-packet'' command.
+ (remote_open_1, remote_async_open_1, remote_cisco_open):
+ Initialize ``remote_protocol_P''.
+ (remote_store_registers): Re-write ``P'' probe logic.
+ (store_register_using_P): New function.
+
+ From Ian Lance Taylor <ian@airs.com>:
+ (remote_prepare_to_store): Only read registers when ``P'' packet
+ is in state unsupported or support-unknown.
+
+1999-07-24 Fred Fish <fnf@cygnus.com>
+
+ * symfile.c (default_symfile_offsets): Clear section_offsets
+ before filling it in.
+
+1999-07-16 Keith Seitz <keiths@cygnus.com>
+
+ * remote.c (_initialize_remote): "remotebreak" should be a var_boolean.
+
+1999-07-15 Jim Blandy <jimb@cygnus.com>
+
+ Make the output from "info registers" fit withinin 80 columns.
+ * hppa-tdep.c (pa_print_registers): Make it easy to change row and
+ column counts. Switch to three columns, instead of four, and
+ adjust spacing.
+
+ First cut at supporting HPPA2.0 in "wide" (64-bit) mode.
+ * configure.tgt: Add hppa2.0w target.
+ * config/pa/hppa64.mt, config/pa/tm-hppa64.h: New files.
+ * hppa-tdep.c (hppa_fix_call_dummy): Dyke out code to tweak the
+ call dummy, if target is PA2.0w. This is temporary, until I get
+ function calls working.
+ * hppah-nat.c (fetch_register): Rewritten to handle both narrow
+ and wide register requests.
+ (HPPAH_OFFSETOF): New macro.
+
+ * gdbtypes.c (is_integral_type): New function.
+ * gdbtypes.h: Prototype for above.
+
+1999-07-15 J.T. Conklin <jtc@redback.com>
+
+ * configure.tgt (i[3456]86-*-vxworks*): New target.
+ * config/i386/vxworks.mt: New file, x86 VxWorks target
+ * config/i386/tm-vxworks.h: New file.
+
+ * configure.tgt (powerpc-*-vxworks*): New target.
+ * config/powerpc/vxworks.mt: New file, PowerPC VxWorks target
+ * config/powerpc/tm-vxworks.h: New file.
+
+ * NEWS: Mention the new configs.
+
+1999-07-15 Fernando Nasser <fnasser@cygnus.com>
+
+ * target.c (target_preopen): Prevent query when not from_tty.
+ * infcmd.c (run_command): Prevent query when not from_tty.
+
+1999-07-15 Fernando Nasser <fnasser@cygnus.com>
+
+ * event-loop.c: Fix typo in comment.
+
+Wed Jul 14 17:29:31 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * ser-pipe.c (struct pipe_state): Define.
+ (pipe_close): Retain the PID of the sub-process using ``struct
+ pipe_state''. Delete #ifdef code that used popen().
+ (pipe_close): Kill of the sub-process as part of the cleanup.
+
+ * serial.h (struct _serial_t): Add field ``state''.
+
+1999-07-13 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * event-top.c (display_gdb_prompt): Don't display the prompt if we
+ are in the middle of an execution command. Also trick readline so
+ it doesn't try to display the prompt.
+ (command_line_handler): Get rid of change_prompt, unused variable.
+ Use {push, pop}_prompt mechanism in case of multiline commands.
+
+ * infrun.c (complete_execution): Set target_executing to 0 as
+ first thing, so that display_gdb_prompt does the right thing.
+
+Tue Jul 13 20:29:46 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * parse.c (build_parse): Fix conditional increment of num_std_regs
+ for SP_REGNUM. Was conditional on FP_REGNUM.
+
+Tue Jul 13 16:44:58 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * gdbarch.h, gdbarch.c: Revert 1999-07-07 Stan Shebs
+ <shebs@andros.cygnus.com> indentation change. Don't let indent
+ mess with these files.
+
+Mon Jul 12 11:15:09 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * config/mips/tm-mips.h (REGISTER_CONVERT_TO_RAW,
+ REGISTER_CONVERT_TO_VIRTUAL, REGISTER_CONVERTIBLE): Define.
+ (REGISTER_RAW_SIZE): Re-define as mips_register_convert_to_raw.
+ * mips-tdep.c (mips_register_convert_to_raw,
+ mips_register_convert_to_virtual, ): New functions.
+ (mips_register_raw_size, mips_register_convertible): New
+ functions. Handle bug introduced by ``Wed Apr 1 23:13:23 1998
+ Andrew Cagney <cagney@b1.cygnus.com>'' where remote mips64 target
+ transfers SR as 64 bits yet GDB expected only 32 bits.
+ (mips64_transfers_32bit_regs): New static variable.
+ (_initialize_mips_tdep): Add obscure command ``set
+ remote-mips64-transfers-32bit-regs'' that provides backward
+ compatibility.
+ (do_gp_register_row): Extract register values from raw buffer.
+
+ * NEWS: Document protocol change.
+
+1999-07-12 Keith Seitz <keiths@cygnus.com>
+
+ * rdi-share/unixcomm.c (Unix_ResetSerial): Remove CYGWIN32
+ conditional. It's no longer needed.
+ (SERPORT1, SERPORT2): Linux serial ports are "/dev/ttyX", not
+ "/dev/cuaX" (X=0,1,2,3,...).
+
+Mon Jul 12 02:02:00 1999 Andrew Cagney <cagney@amy.cygnus.com>
+
+ * defs.h, utils.c (fputstrn_filtered, fputstrn_unfiltered,
+ fputstrnn_unfiltered): New functions.
+ (gdb_printchar): Delete.
+
+ * remote.c (print_packet): Replace gdb_printchar with
+ fputstrn_filtered.
+ (getpkt): Use fputstrn_unfiltered to dump packet received.
+ (putpkt_binary): Use fputstrnn_unfiltered to dump packet sent.
+
+1999-07-09 Keith Seitz <keiths@cygnus.com>
+
+ * blockframe.c (blockvector_for_pc_sect): When looking for a block,
+ we want the one whose end is greater than our PC, not greater or equal.
+
+1999-07-08 Stan Shebs <shebs@andros.cygnus.com>
+
+ * sparcl-tdep.c (init_sparclite_ops): Fix doc strings, remove
+ useless inits.
+ (sparclite_ops): Remove redundant decl.
+
+Thu Jul 8 16:48:40 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * ser-pipe.c (pipe_open): Bi-directional popen found on both
+ NetBSD and OpenBSD.
+ * ser-pipe.c: New file. Implement popen() style serial interface.
+ * NEWS: Mention.
+ * Makefile.in (ALLDEPFILES): Add ser-pipe.c.
+ (ser-pipe.o): Add new target. Specify dependencies.
+ (SER_HARDWIRE): Add ser-pipe.o.
+ * serial.c (serial_open): Recognize a serial pipe ``|''.
+
+1999-07-07 Stan Shebs <shebs@andros.cygnus.com>
+
+ * All C files except *-stub.c and *-share/*: Indent to GNU
+ standard, using indent 1.9.1.
+ * defs.h: Make indent ignore this file, macros confuse it.
+
+ * gnu-regex.c, gnu-regex.h: Don't let indent mess with these.
+
+Wed Jul 7 13:06:24 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * remote-mips.c (fputs_readable): Rename puts_readable, add struct
+ gdb_file argument.
+ (fputc_readable): Rename putc_readable, add struct gdb_file
+ argument.
+
+ * remote-mips.c (mips_expect_timeout, mips_receive_header,
+ mips_send_packet, mips_receive_packet), remote-rdp.c (put_byte,
+ get_byte, put_word, rdp_init, rdp_init), remote-sds.c
+ (sds_interrupt, sds_wait, readchar, putmessage, read_frame,
+ getmessage), remote-udi.c (udi_store_registers, fetch_register):
+ (store_register), xmodem.c (readchar), utils.c (puts_debug),
+ gnu-nat.h (debug), parse.c (parse_exp_1): Cleanup - send debug/log
+ messages to gdb_stdlog.
+
+1999-07-06 Stan Shebs <shebs@andros.cygnus.com>
+
+ * exec.c: Remove long-#ifed-out section of code that confuses
+ indent.
+ * gdbtypes.c (add_mangled_type): Add some braces to indicate
+ grouping better.
+ * gnu-nat.c: Remove literal newlines embedded in strings,
+ causes indent to weird out.
+ * language.c (binop_result_type): Remove extra paren.
+ * lynx-nat.c: Add a missing paren to fetch_core_registers decl.
+ * nec4102rom.c (vr4102_insert_step): Fix typos.
+ (_initialize_vr4102_rom): Remove literal newline in string.
+ * config/a29k/tm-a29k.h: Suppress formatting of pictures.
+ * config/m68k/xm-3b1.h: Remove excess #endif.
+
+ Declare Pyramid configuration obsolete.
+ * configure.host, configure.tgt: Comment out Pyramid configs.
+ * Makefile.in: Comment out Pyramid-related actions.
+ * pyr-xdep.c, pyr-tdep.c, config/pyr/*: Comment out.
+ * NEWS: Mention obsolete status.
+
+1999-07-06 Jason Molenda (jsm@bugshack.cygnus.com)
+
+ * remote.c: Include <sys/time.h> to pick up FD_SET et al defns on
+ some old Linux distributions.
+ * remote-os9k.c, remote-st.c, ser-tcp.c, ser-unix.c,
+ sparcl-tdep.c, remote.c: Back out inclusion of <sys/select.h>.
+ It isn't necessary after all.
+
+1999-07-06 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * infcmd.c (strip_bg_char): Remove assignment from 'if' condition.
+
+1999-07-05 Jason Molenda (jsm@bugshack.cygnus.com)
+
+ * remote.c: Include <sys/select.h> if it exists in order to pick up
+ FD_SET et al defns.
+ * remote-os9k.c: Same.
+ * remote-st.c: Same.
+ * ser-tcp.c: Same.
+ * ser-unix.c: Same.
+ * sparcl-tdep.c: Same.
+
+Fri Jul 2 19:38:43 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * top.c (target_output_hook): Delete definition.
+ * defs.h (target_output_hook): Delete declaration.
+
+ * remote.c (remote_console_output): Delete call to
+ target_output_hook(). Send target output to gdb_stdtarg using an
+ unfiltered write. Make more robust.
+
+ * remote-sim.c (gdb_os_write_stdout, gdb_os_write_stderr):
+ Ditto. For moment, do not try to separate target stdout and stderr
+ streams.
+
+ * defs.h (gdb_stdtarg): New global. Output from target and
+ simulators.
+
+1999-07-02 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * top.c (return_to_top_level): Do all the exec_cleanups too.
+
+ * event-top.c (command_handler): Set up for a continuation, if we
+ are in the middle of running an execution command which will
+ finish later on. Do cleanups, an display of time/space only if not
+ running with an async target or not running an execution command.
+ (command_line_handler_continuation): New function. Continuation
+ for command_line_handler.
+
+ * utils.c (exec_cleanup_chain): New cleanup chain to be used in
+ async mode for the execution commands.
+ (make_exec_cleanup): New function. Add a cleanup to the
+ exec_cleanup_chain.
+ (do_exec_cleanups): New Function. Do cleanups on the
+ exec_cleanup_chain.
+ (add_continuation): New function. Add a new continuation to the
+ cmd_continuation list.
+ (do_all_continuations): New function. Do all the continuations on
+ the cmd_continuation list.
+
+ * top.h (ALL_CLEANUPS): Move from here to defs.h.
+
+ * defs.h (struct continuation_arg): New structure. Arg to pass to
+ the call to a command continuation.
+ (struct continuation): New structure. Continuation for an
+ execution command.
+ (ALL_CLEANUPS): Move here from top.h.
+
+ * remote.c (remote_async_open_1): Set things up for telling the
+ target we are running the extended protocol, only after the target
+ has stopped.
+ (set_extended_protocol): New function. Tell the target we are
+ using the extended protocol.
+ (remote_async_resume): Set things up for sync execution only if
+ this is the first time we are called.
+
+ * breakpoint.c (until_break_command_continuation): New function.
+ Stuff to be done after the target stops during the 'until'
+ command.
+ (until_break_command): Set things up for completing the 'until'
+ command later on. Do the final cleanups only if not running
+ asynchronously or async execution is not supported by the target.
+
+ * infcmd.c (until_command): Recognize '&' at end of command and
+ handle it properly.
+ (finish_command_continuation): New function. Do whatever is needed
+ after the target has stopped.
+ (finish_command): Recognize '&' at end of command and handle it
+ properly. Don't do stuff needed after target has stopped if
+ running asynchronously and target has async. Use exec_cleanup_chain
+ if running asynchronously and target is asynchronous.
+
+ * infrun.c (cmd_continuation): New gloabl variable. Used to
+ coplete execution commands in async mode, after the target has
+ stoped.
+ (fetch_inferior_event): Use exec_cleanup_chain, instead of
+ cleanup_chain. Do all the exec cleanups at the end. Do all the
+ continuations at the end. Call complete_execution from here,
+ instead of normal_stop.
+ (complete_execution): Cleanup the signals handlers for SIGINT
+ before displaying the prompt.
+ (start_remote): Set target_executing to 1.
+ (normal_stop): Don't call complete_execution from here.
+
+Thu Jul 1 19:14:30 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * blockframe.c (struct dummy_frame): Add member ``top''.
+ (generic_push_dummy_frame): Initialize top to sp.
+ (generic_save_dummy_frame_tos): New function. Initialize top.
+ (generic_find_dummy_frame): Check for the top of the frame.
+
+ * blockframe.c (generic_push_dummy_frame): Free the dummy_frame
+ registers.
+
+ * config/mn10300/tm-mn10300.h (SAVE_DUMMY_FRAME_TOS): Define.
+ (TARGET_READ_FP): Return the SP as a best guess.
+
+Wed Jun 30 15:45:48 1999 Jeffrey A Law (law@cygnus.com)
+
+ * configure.host (hppa*-*-hpux11*): Accept any version of hpux11
+ instead of hpux11.0*.
+
+1999-06-30 Fernando Nasser <fnasser@totem.to.cygnus.com>
+
+ * source.c (directory_command): Add missing test for from_tty.
+
+1999-06-29 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * remote.c: Include event-loop.h.
+ (remote_async_ops, extended_async_remote_ops): Define new target
+ vector structures for asynchronous debugging.
+ (remote_async_open): New function. Asynchronous version of
+ remote_open.
+ (extended_remote_async_open): New function. Asynchronous version
+ of extended_remote_open.
+ (remote_async_open_1): New function. Async version of
+ remote_open_1.
+ (remote_async_detach): New function. Async version of
+ remote_detach.
+ (remote_async_resume): New function. Async version of
+ remote_resume.
+ (initialize_sigint_signal_handler, handle_remote_sigint,
+ handle_remote_sigint_twice, async_remote_interrupt,
+ async_remote_interrupt_twice, cleanup_sigint_signal_handler): New
+ functions. Used for handling ^C while target is running.
+ (remote_async_wait): New function. Async version of remote_wait.
+ (remote_async_kill): New function. Async version of remote_kill.
+ (extended_remote_async_create_inferior): New function. Async
+ version of extended_remote_create_inferior.
+ (init_remote_async_ops): New function. Initialize target vector
+ for target async.
+ (init_extended_async_remote_ops): New function. Initialize target
+ vector for target extended-async.
+ (_initialize_remote): Initialize remote_async_ops and
+ extended_async_remote_ops.
+
+ * infrun.c: Include "event-loop.h".
+ (sync_execution): new global variable.
+ (proceed): Invoke wait_for_inferior and normal_stop only if not
+ running in async mode or if target doesn't support async
+ execution.
+ (start_remote): Don't call wait_for_inferior and normal_stop if
+ not running in async mode or if target not async. If running async
+ and target is async, start the target in simulated synchronous
+ mode.
+ (async_ecss, async_ecs): New global vars, for inferior state.
+ (fetch_inferior_event): New function. Async version of
+ wait_for_inferior.
+ (complete_execution): New function. Reset of gdb prompt and stdin,
+ after inferior execution has completed.
+ (normal_stop): Call complete_execution at end of asynchronous
+ execution.
+
+ * infcmd.c (strip_bg_char): New function to detect the background
+ execution char '&'.
+ (run_command): Modify to support background and foreground
+ execution in async mode.
+ (continue_command): Ditto.
+ (step_1): Ditto.
+ (jump_command): Ditto.
+ (interrupt_target_command): New function. Interrupt the
+ target execution.
+ (_initialize_infcmd): Add new command 'interrupt'.
+
+ * top.c (target_executing): New global variable.
+ (execute_command): Reject commands that cannot be executed while
+ the target is running asynchronously.
+
+ * event-top.c (push_prompt): Make non static.
+ (pop_prompt): Make non static. If the current prompt is empty,
+ don't try to copy it over the previous one.
+ (handle_sigint): Make non static.
+ (command_handler): Do the cleanups only when not executing with an
+ asynchronous target.
+
+ * event-loop.c (delete_async_signal_handler): Pass a pointer to a
+ pointer to a signal handler, so that is can be freed at the end.
+
+ * target.c (update_current_target): Inherit to_has_async_exec.
+
+ * inferior.h: Add global variables target_executing, and
+ sync_execution. Export function fetch_inferior_event.
+
+ * event-loop.h: Add push_prompt, pop_prompt, handle_sigint to the
+ exported functions. Update prototype for delete_signal_handler.
+
+ * target.h (struct target_ops): New target op: to_has_async_exec.
+ (target_has_async): New macro.
+
+ * Makefile.in (infrun.o): Add dependency on event-loop.h.
+ (remote.o): Ditto.
+
+1999-06-28 Jim Blandy <jimb@zwingli.cygnus.com>
+
+ * solib.c (clear_solib): Don't disable breakpoints if we're
+ running an a.out executable (Solaris's SunOS emulation).
+
+1999-06-25 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * main.c (main): Remove intialization of command_loop_hook, it
+ is now done in _initialize_event_loop().
+ * event-loop.c (gdb_do_one_event): Make static.
+ (start_event_loop): New function. Just start the event loop.
+ * event-top.c (cli_command_loop): New name for start_event_loop().
+ (gdb_readline2): Make non static.
+ (_initialize_event_loop): Set command_loop_hook to cli_command_loop.
+ * event-loop.h: Adjust exported functions accordingly.
+
+ * top.c (init_main): Move setting of async_command_editing_p from
+ here.
+ * event-top.c (_initialize_event_loop): To here.
+ (change_line_handler): Revert previous change. Add comment.
+ (_initialize_event_loop): Revert previous change.
+ (cli_command_loop): New name for start_event_loop().
+ (start_event_loop): New function. This just starts up the event loop.
+ (gdb_readline2): Make non static.
+ (_initialize_event_loop): Set command_loop_hook to cli_command_loop.
+
+1999-06-25 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * event-top.c (change_line_handler): Get rid of the global
+ variable input_fd, use `fileno (instream)' instead.
+ (_initialize_event_loop): Ditto
+
+ * event-loop.c (add_file_handler): New function. Wrapper for
+ create_file_handler.
+ (create_file_handler): Make static.
+ * event-top.c (_initialize_event_loop): Call add_file_handler,
+ instead of create_file_handler.
+ (change_line_handler): Ditto.
+ Remove poll.h include.
+ * event-loop.h: Export add_file_handler instead of
+ create_file_handler.
+
+1999-06-24 Stan Shebs <shebs@andros.cygnus.com>
+
+ Declare Altos configuration obsolete.
+ * configure.host, configure.tgt: Comment out Altos config.
+ * Makefile.in: Comment out Altos-related actions.
+ * altos-xdep.c, config/m68k/altos.mh, altos.mt, tm-altos.h,
+ xm-altos.h: Comment out.
+ * NEWS: Mention obsolete status.
+
+1999-06-24 Jason Molenda (jsm@bugshack.cygnus.com)
+
+ * Makefile.in: Add MAKEHTML and MAKEHTMLFLAGS; pass them down;
+ recognize html and install-html targets.
+ * gdbserver/Makefile.in: Add empty html and install-html targets.
+ * nlm/Makefile.in: Ditto.
+ * rdi-share/Makefile.in: Ditto.
+
+1999-06-24 Jim Blandy <jimb@zwingli.cygnus.com>
+
+ * ax-gdb.c (agent_command): Remove vestigial call to ax_reqs.
+
+1999-06-24 James Ingham <jingham@leda.cygnus.com>
+
+ * arm-tdep.c (arm_othernames): Change both gdb's register display
+ AND the opcode disassembly register naming if the othernames
+ command. Fixes the gdb part of CR 101177.
+
+1999-06-23 Stan Shebs <shebs@andros.cygnus.com>
+
+ Declare Convex configuration obsolete.
+ * configure.host, configure.tgt: Comment out Convex configs.
+ * Makefile.in: Comment out Convex-related actions.
+ * convex-xdep.c, convex-tdep.c, config/convex/*: Comment out.
+ * NEWS: Mention obsolete status.
+
+1999-06-23 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * main.c: Turn on async by default by setting async_p to 1.
+
+Wed Jun 23 15:44:39 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ From Jimmy Guo <guo@cup.hp.com>:
+ * frame.h (enum lval_type): Delcare when an __STDC__ compiler.
+ Reverts Mon Aug 11 16:08:52 1997 Fred Fish <fnf@cygnus.com>
+ change.
+ * utils.c (gdb_file_rewind, gdb_file_put): Fix. A void function
+ does not return a result.
+
+Wed Jun 23 15:30:46 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * remote.c (set_thread, remote_get_threadinfo,
+ remote_threads_info, remote_current_thread, remote_get_threadlist,
+ extended_remote_restart, get_offsets, remote_open_1,
+ remote_detach, remote_resume, remote_wait, remote_fetch_registers,
+ remote_store_registers, check_binary_download, remote_write_bytes,
+ remote_read_bytes, remote_search, putpkt_binary, putpkt_binary,
+ read_frame, compare_sections_command, remote_query,
+ packet_command, remote_info_process): Use alloca to create space
+ for arrays of size PBUFSIZ.
+
+1999-06-22 Jason Molenda (jsm@bugshack.cygnus.com)
+
+ * top.c: Update copyright years to include 1999.
+
+1999-06-18 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * top.c: Move include of event-loop.h, to avoid redefinition of
+ NFDBITS.
+
+ * event-loop.c (create_file_handler): Do not do a realloc of the
+ pollfd structure of the notifier, unless there is already one.
+ Include <sys/types.h> for platforms that have no poll.
+
+ * event-top.c: Fix prototype for _initialize_event_loop.
+ (_initialize_event_loop): Do something only if running in async
+ mode.
+
+1999-06-17 Jim Blandy <jimb@zwingli.cygnus.com>
+
+ Make the '/c' print format use a true character type. This is
+ more appropriate than builtin_type_char for languages other than
+ C, and C tolerates it.
+ * gdbtypes.c (builtin_type_true_char): New variable.
+ (build_gdbtypes): Initialize it.
+ * gdbtypes.h (builtin_type_true_char): New declaration.
+ * printcmd.c (print_scalar_formatted): When the format is 'c',
+ extract the value as a builtin_type_true_char.
+
+ * jv-exp.y (yylex): Say character literals are java_char_type, not
+ builtin_type_char. Java treats the latter like `byte'.
+
+1999-06-17 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * Makefile.in (top_h): Define.
+ (event-loop.o): Add dependencies on top.h and defs.h.
+ (event-top.o): Add dependency on terminal.h.
+
+ * event-loop.c: Get rid of #include <readline.h>.
+
+ * event-loop.h: Get rid of nested #include's.
+ * event-loop.c: Rearrange includes to accomodate change in
+ event-loop.h. Include poll.h, not sys/poll.h.
+ * event-top.c: Ditto.
+ * main.c: Ditto.
+
+1999-06-16 David Taylor <taylor@louisiana.cygnus.com>
+
+ * alpha-tdep.c (alpha_pop_frame): if frame->proc_desc
+ is NULL, call find_proc_desc so we know how to restore
+ the registers.
+
+1999-06-15 Michael Snyder <msnyder@cleaver.cygnus.com>
+
+ * event-top.c (start_event_loop): call get_prompt.
+ (display_gdb_prompt): call get_prompt.
+ (async_stop_sig): call get_prompt.
+
+1999-06-15 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * event-loop.c (delete_file_handler): When positioning prev_ptr,
+ keep looping while the one after is not equal to file_ptr, instead
+ of equal.
+
+1999-06-14 Stan Shebs <shebs@andros.cygnus.com>
+
+ * MAINTAINERS: Add Jimmy Guo and Jim Blandy as HP testsuite and
+ SVR4 solib maintainers, respectively.
+
+1999-06-14 Michael Snyder <msnyder@cleaver.cygnus.com>
+
+ Add parameters to the gdb prompt.
+ * top.c (prompt): Rename to gdb_prompt_string for clarity.
+ (command_line_input): rename "prrompt" to prompt_arg for clarity.
+ (gdb_readline): rename "prrompt" to prompt_arg for clarity.
+ (read_command_lines): rename "prompt" to prompt_arg for clarity.
+ (stop_sig): call get_prompt instead of reading prompt string directly.
+ (command_loop): ditto.
+ (gdb_prompt_escape): New variable. Esc char for prompt parameters.
+ (get_prompt_1): New function, workhorse for get_prompt.
+ (get_prompt): Completely rewrite. Add functionality for a
+ parameterized prompt, ie. the displayed prompt can change according
+ to the value of one or more expressions given as parameters in the
+ prompt string.
+ (init_main): use renamed variable gdb_prompt_string. Add new
+ command "set prompt-escape-char" to set gdb_prompt_escape.
+
+Sun Jun 13 10:44:13 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * defs.h (gdb_stdlog), main.c: Declare.
+ * main.c (main): Initialize.
+ * gdbarch.c: Write trace messages to the log file.
+ * remote.c: Update any debug/log prints.
+
+1999-06-11 Michael Snyder <msnyder@cleaver.cygnus.com>
+
+ * remote.c (remote_wait): Clean up new thread handling.
+ (record_currthread): Announce new threads.
+
+1999-06-11 Jim Blandy <jimb@zwingli.cygnus.com>
+
+ * partial-stab.h (case N_LSYM, 'T' descriptor): Don't create
+ partial symbol table entries for nameless enums, even if the type
+ name is " ". (We still pick up the enum elements, though.)
+
+ * partial-stab.h: Remove #if 0'd sections, dating back to 1992,
+ which set a variable which exists nowhere else in the source.
+ Please examine your test suite output carefully, and report any
+ problems to me.
+
+1999-06-11 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * event-top.c (setup_event_loop): Change name to start_event_loop.
+ Move the intialization of event-loop variables to
+ _initialize_event_loop.
+ (_initialize_event_loop): New function. Called at init time, to
+ set up important event-loop variables.
+
+ * event-loop.h: setup_event_loop is now start_event_loop.
+ * main.c (main): Ditto.
+
+Fri Jun 11 18:34:33 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * defs.h (gdb_file_rewind_ftype, gdb_file_rewind,
+ set_gdb_file_rewind, gdb_file_put_ftype, gdb_file_put,
+ set_gdb_file_put): Declare.
+
+ * utils.c (gdb_file_new): Initialize ``rewind'' and ``put''.
+ (struct gdb_file): Add to_rewind and to_put.
+ (null_file_put, null_file_rewind, gdb_file_put, gdb_file_rewind,
+ set_gdb_file_put, set_gdb_file_rewind): New functions.
+ (tui_file_rewind, tui_file_put): New functions.
+ (tui_file_new): Add rewind and put.
+
+Fri Jun 11 15:10:32 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * d10v-tdep.c (d10v_push_arguments): Fix order of arguments passed
+ to store_address.
+
+Fri Jun 11 10:31:29 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * remote.c (tty_input): Change array to pointer.
+ (_initialize_remote): Call build_remote_gdbarch_data.
+ (build_remote_gdbarch_data): New function. Allocate space for
+ tty_input.
+ (readsocket, readtty): Delete extern declaration of tty_input.
+
+1999-06-10 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * event-top.c (gdb_readline2): Call the command handling function
+ via the input_handler pointer.
+ (change_line_handler): When turning off editing, set input_handler
+ as well.
+
+ * utils.c (prompt_for_continue): If running asynchronously, call
+ async_request_quit, instead of request_quit.
+
+ * tracepoint.c (read_actions): If running asynchronously, set the
+ signal handler for STOP_SIGNAL to handle_stop_sig.
+
+ * top.h: (source_line_number, source_file_name, source_error,
+ source_pre_error, history_expansion_p, server_command): export for
+ use of event-top.c.
+
+ * event-top.c: Include top.h and terminal.h.
+ (instream): Remove extern declaration.
+ (handle_sigint, handle_sigquit, handle_sighup, handle_sigfpe,
+ handle_sigwinch, async_do_nothing, async_disconnect,
+ async_float_handler, async_stop_sig): Make static.
+ (async_request_quit, async_do_nothing, async_disconnect,
+ async_float_handler, async_stop_sig): Add gdb_glient_data
+ argument.
+ (handle_stop_sig): New function.
+ (sigtstp_token): New variable.
+ (sigint_token, sigquit_token, sigfpe_token, sigwinch_token):
+ Change their type tp PTR.
+ (mark_async_signal_handler_wrapper): New function.
+ (setup_event_loop): Initialize all the variables used by readline
+ only if not already done while reading the .gdbinit file. Display
+ the initial gdb prompt, if .gdbinit took care of setting things up
+ for readline.
+ (change_line_handler): When turning on the use of readline,
+ initialize input_handler as well.
+ (command_line_handler): Set up the signal handler for STOP_SIGNAL
+ to be handle_stop_sig.
+ (async_init_signals): Remove coercion of signal handlers in calls
+ to create_async_signal_handler. Initialize token for stop signal.
+ (handle_sigint): Call async_request_quit using one argument.
+ (handle_sigint, handle_sigquit, handle_sighup, handle_sigfpe,
+ handle_sigwinch): Call mark_async_signal_handler_wrapper instead
+ of mark_async_signal_handler.
+
+ * event-loop.h: Add extern declarations for handle_stop_sig,
+ async_command_editing_p, async_annotation_suffix,
+ new_async_prompt, the_prompts.
+
+ * top.c (command_line_input): Set the signal handler to be
+ handle_stop_sig, in case gdb is running asynchronously.
+ (get_prompt): Return the top of the prompt stack if running
+ asynchronously.
+ (set_prompt): Set the top of the prompt stack if running
+ asynchronously.
+ (init_main): Move ``extern'' vars from here to event-loop.h.
+
+1999-06-10 Michael Snyder <msnyder@cleaver.cygnus.com>
+
+ * values.c (value_from_string): new function. Make a value_ptr
+ from a string, with storage in local GDB memory (not in inferior).
+ * value.h (value_from_string): add prototype.
+ * remote.c (remote_cisco_ops): New remote target, "target cisco".
+ (init_remote_cisco_ops): New function, initialize new target.
+ (remote_cisco_mourn, remote_cisco_wait, remote_cisco_open,
+ remote_cisco_close): New functions, implement new target cisco.
+ (minitelnet, readtty, readsocket) New functions, implement the
+ I/O pass-through mode for target cisco.
+ (remote_wait): Detect special enhanced version of the 'S' packet
+ for target cisco.
+ (remote_cisco_expand): Perform Cisco variant of RLL decoding.
+
+1999-06-10 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * event-loop.c (gdb_wait_for_event): Initialize num_found to 0.
+
+ * top.c (print_prompt): Delete this function.
+
+ From: Andrew Cagney <cagney@b1.cygnus.com>
+
+ * event-top.c (async_hook): Delete extern declaration.
+
+ * defs.h: Replace ``async_hook'' with ``async_p''.
+ * top.c (gdb_init, init_main, init_main, init_main, init_main):
+ Replace ``async_hook'' with ``async_p''.
+
+ * main.c: Rename ``async'' to ``async_p''.
+ (main): Add --noasync option.
+ (main): Hook in the asynchronous event-loop based CLI using
+ command_loop_hook instead of async_hook. Delete call to
+ async_hook().
+
+Thu Jun 10 21:14:16 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * mn10300-tdep.c (mn10300_store_return_value,
+ mn10300_extract_struct_value_address,
+ mn10300_extract_return_value), config/mn10300/tm-mn10300.h: New
+ functions.
+ * config/mn10300/tm-mn10300.h (EXTRACT_STRUCT_VALUE_ADDRESS,
+ STORE_RETURN_VALUE, EXTRACT_RETURN_VALUE): Update.
+ (TARGET_MN10300): Delete macro. Not used.
+
+Thu Jun 10 20:04:02 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * mn10300-tdep.c (mn10300_register_names): Make static.
+ (STORE_STRUCT_RETURN): Do not modify SP.
+
+ * config/mn10300/tm-mn10300.h(mn10300_register_name),
+ mn10300-tdep.c : New function.
+ * config/mn10300/tm-mn10300.h (REGISTER_NAME): Update.
+ * config/mn10300/tm-mn10300.h (mn10300_saved_pc_after_call),
+ mn10300-tdep.c: New function.
+ * config/mn10300/tm-mn10300.h (SAVED_PC_AFTER_CALL): Update.
+
+1999-06-10 Keith Seitz <keiths@cygnus.com>
+
+ * mcore-rom.c (picobug_dumpregs): Return a value. Any value, it
+ doesn't matter.
+ * mcore-tdep.c (mcore_analyze_prologue): Set NO_MORE_FRAMES
+ if the start of the function is the entry point.
+ (mcore_analyze_prologue): rotli takes an immediate, not an
+ offset immediate.
+ (mcore_push_arguments): Fix compiler warning.
+
+1999-06-09 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
+
+ * rs6000-tdep.c (skip_prologue): Don't mistake a branch for a
+ subroutine call.
+
+1999-06-08 Michael Snyder <msnyder@cleaver.cygnus.com>
+
+ * remote.c (remote_wait): Add 'N' response packet, which is a
+ stop with signal number plus section offsets for .text, .data and
+ .bss. This is used by Cisco to indicate relocation offsets.
+ (remote_cisco_section_offsets, remote_cisco_objfile_relocate):
+ new files to support 'N' packet.
+ (remote_info_process): New function. Implements the
+ "info remote-process" command, by means of which the remote target
+ can report anything it wants to about the remote process/app being
+ debugged.
+ (_initialize_remote): add info remote-proc command.
+ (remote_threads_info): New function for "info threads" command.
+ Attempts to use new query "qfThreadInfo" instead of the old
+ undocumented query.
+ * exec.c (exec_set_section_offsets) new files to support 'N' packet.
+
+Tue Jun 8 13:33:42 1999 Andrew Cagney <cagney@amy.cygnus.com>
+
+ * inferior.h (generic_target_read_pc, generic_target_write_pc,
+ generic_target_read_fp, generic_target_write_fp,
+ generic_target_read_sp, generic_target_write_sp): Declare new
+ functions.
+ * findvar.c (generic_target_read_pc, generic_target_write_pc,
+ generic_target_read_fp, generic_target_write_fp,
+ generic_target_read_sp, generic_target_write_sp): New functions.
+ (TARGET_READ_PC, TARGET_WRITE_PC, TARGET_READ_FP, TARGET_WRITE_FP,
+ TARGET_READ_SP, TARGET_WRITE_SP): Default to corresponding generic
+ function.
+ (write_pc_pid, write_pc_pid, read_sp, write_sp, read_fp,
+ write_fp): Simplify.
+
+ * gdbarch.c (verify_gdbarch): Always verify TARGET_PTR_BIT,
+ TARGET_SHORT_BIT, TARGET_INT_BIT, TARGET_LONG_BIT,
+ TARGET_LONG_LONG_BIT, TARGET_FLOAT_BIT, TARGET_DOUBLE_BIT,
+ TARGET_LONG_DOUBLE_BIT, TARGET_READ_PC, TARGET_WRITE_PC,
+ TARGET_READ_FP, TARGET_WRITE_FP, TARGET_READ_SP, TARGET_WRITE_SP,
+ USE_GENERIC_DUMMY_FRAMES, CALL_DUMMY_BREAKPOINT_OFFSET_P,
+ CALL_DUMMY_P, CALL_DUMMY_STACK_ADJUST_P, GET_SAVED_REGISTER,
+ REGISTER_CONVERTIBLE, PUSH_ARGUMENTS, PUSH_RETURN_ADDRESS,
+ FRAME_CHAIN_VALID.
+ (GET_GDBARCH, SET_GDBARCH): Delete macros. Implement functions
+ directly.
+ * gdbarch.h, gdbarch.c: Call fatal() instead of abort(). Identify
+ the function / macro with a problem. Always verify a architecture
+ attribute before returning it.
+ * gdbarch.h, gdbarch.c (generic_register_convertible_not): New
+ function.
+
+ * mips-tdep.c (mips_push_return_address): New function.
+ * config/mips/tm-mips.h (PUSH_RETURN_ADDRESS): Define.
+
+ * mips-tdep.c (mips_gdbarch_init): Initialize short_bit,
+ double_bit, long_double_bit, read_pc, write_pc, read_fp, write_fp,
+ read_sp, write_sp, frame_chain_valid, get_saved_register,
+ push_arguments, push_return_address, register_convertible,
+ call_dummy_p, use_generic_dummy_frames,
+ call_dummy_breakpoint_offset_p, call_dummy_stack_adjust_p,
+ call_dummy_words and sizeof_call_dummy_words.
+ * config/mips/tm-mips.h: Don't define CALL_DUMMY when multi-arch.
+
+1999-06-07 Keith Seitz <keiths@cygnus.com>
+
+ * v850ice.c (init_hidden_window): Do not rely on the existence of
+ a gui for window creation. Return boolean status.
+ (v850ice_open): Use boolean status of init_hidden_window.
+ Allow any ICE execution command to run under CLI. Maybe one
+ day gdb will use a real event loop and allow this code to run.
+ * configure.tgt: Configure the v850 ice for all cygwin-hosted
+ toolchains.
+
+Mon Jun 7 23:37:26 1999 Andrew Cagney <cagney@amy.cygnus.com>
+
+ * config/mips/tm-mips.h (EXTRA_FRAME_INFO): Delete.
+ * mips-tdep.c (mips_init_extra_frame_info): Allocate saved_regs.
+ (temp_saved_regs): Replace struct with a simple pointer.
+ (set_reg_offset, mips32_heuristic_proc_desc, heuristic_proc_desc,
+ mips_init_extra_frame_info): Update.
+
+Mon Jun 7 21:40:12 1999 Andrew Cagney <cagney@amy.cygnus.com>
+
+ * config/mips/tm-mips.h (EXTRA_FRAME_INFO): Move elements from here.
+ * mips-tdep.c (struct frame_extra_info): To here.
+
+ * mips-tdep.c (mips_print_extra_frame_info, mips_find_saved_regs,
+ mips_init_extra_frame_info, mips_pop_frame): Update
+ (mips_init_extra_frame_info): Allocate space for the extra info.
+
+Mon Jun 7 21:08:50 1999 Andrew Cagney <cagney@amy.cygnus.com>
+
+ * config/mips/tm-mips.h (mips_init_extra_frame_info), mips-tdep.c:
+ Rename init_extra_frame_info. Add argument ``fromleaf''.
+ mips-tdep.c (mips_gdbarch_init): Add mips_init_extra_frame_info.
+
+ * config/mips/tm-mips.h (mips_print_extra_frame_info),
+ mips-tdep.c: New function.
+ (PRINT_EXTRA_FRAME_INFO): Update definition.
+
+Mon Jun 7 20:11:07 1999 Andrew Cagney <cagney@amy.cygnus.com>
+
+ * config/mips/tm-mips.h, config/mips/tm-irix3.h,
+ config/mips/tm-tx19.h, config/mips/tm-tx19l.h,
+ config/mips/tm-tx39.h, config/mips/tm-tx39l.h: Rename macro
+ REGISTER_NAMES to MIPS_REGISTER_NAMES.
+
+ * config/mips/tm-mips.h (REGISTER_NAME): Define.
+ * mips-tdep.c (mips_processor_reg_names): New static variable.
+ (mips_register_name): New function.
+ (mips_set_processor_type): Update mips_processor_reg_names.
+ (mips_generic_reg_names): Initialize using MIPS_REGISTER_NAMES.
+ (mips_gdbarch_init): Add mips_register_name.
+
+Sun Jun 6 11:09:19 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * remote.c (PBUFSIZ): Re-define so that value is computed at
+ run-time.
+ (MAXBUFBYTES): Re-define as a macro function.
+ * gdbarch.h, gdbarch.c: Add multi-arch support for REGISTER_BYTES.
+ * d10v-tdep.c, config/d10v/tm-d10v.h: Update.
+
+1999-06-05 Fernando Nasser <fnasser@totem.to.cygnus.com>
+
+ * symtab.c (decode_line_1): Accept filenames with spaces in
+ 'linespecs' when enclosed in double quotation marks and handle
+ drive specification is DOS format (D:).
+
+1999-06-04 Jim Blandy <jimb@zwingli.cygnus.com>
+
+ * parse.c: Don't include <ctype.h> twice.
+
+1999-06-04 David Taylor <taylor@louisiana.cygnus.com>
+
+ Sat May 15 12:16:09 1999 Per Bothner <bothner@deneb.cygnus.com>
+
+ * eval.c (evaluate_subexp_standard): Remove Gilmore rant.
+ (Of course C has "expected types", at least if you allow
+ brace-initializer expressions - as in Gcc.)
+ Remove NULLing out expect_type. Do pass NULL_TYPE in place
+ the incoming expect_type where appropriate.
+
+Fri Jun 4 10:56:23 1999 Jeffrey A Law (law@cygnus.com)
+
+ * hppa-tdep.c (hppa_fix_call_dummy): Make it work for GCC compiled
+ executables without end.o. Clean up lots of mis-guided comments.
+
+Fri Jun 4 17:10:36 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * parser-defs.h (std_regs): Replace array with pointer.
+ * parse.c (build_parse): Build the std_regs table according to the
+ standard registers available.
+ (_initialize_parse): Register std_regs and num_std_regs as
+ architecture specific.
+ * gdbarch.h, gdbarch.c: Add multi-arch support for SP_REGNUM,
+ FP_REGNUM, PC_REGNUM, NUM_REGS, REGISTER_NAME.
+ * d10v-tdep.c, config/d10v/tm-d10v.h: Update.
+
+1999-06-03 Michael Snyder <msnyder@cleaver.cygnus.com>
+
+ * thread.c: eliminate the target_thread_vector (functionality
+ moved into the standard target vector).
+ * gdbthread.h: eliminate target_thread_vector. Move all related
+ defines into remote.c, since they are no longer shared with thread.c.
+ * remote.c: eliminate the target_thread_vector.
+ (remote_find_new_threads): change return type to void, consistent
+ with the target vector table. (cont_thread): rename continue_thread.
+ (record_currthread): remove dead code. (remote_thread_alive):
+ clean up and simplify. (threadref etc.): move definitions to here
+ from gdbthread.h.
+
+1999-06-02 Jason Molenda (jsm@bugshack.cygnus.com)
+
+ * inftarg.c (child_create_inferior): Remove dead HPUX specific code
+ which tries to find csh.
+ * fork-child.c: Remove DEBUGGING predefine and conditionalized
+ printfs.
+ (fork_inferior): Remove dead HPUX specific code which assumes shell
+ is csh.
+
+ * hppa-tdep.c: Remove DEBUGGING and #if 0 debugging printfs.
+ * parse.c: Ditto.
+ * somread.c: Ditto.
+
+ * gdbarch.h: Forward decl of struct value.
+
+Thu Jun 3 10:12:38 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * d10v-tdep.c (do_d10v_pop_frame): Rename d10v_pop_frame. Make
+ static.
+ * d10v-tdep.c (d10v_pop_frame), config/d10v/tm-d10v.h: New
+ function. Call generic_pop_current_frame.
+ * config/d10v/tm-d10v.h (POP_FRAME): Update.
+ * gdbarch.h, gdbarch.c (frame_num_args_unknown): New function.
+ * gdbarch.h, gdbarch.c: Add multi-arch support for POP_FRAME,
+ SKIP_PROLOGUE, INNER_THAN, DECR_PC_AFTER_BREAK,
+ FUNCTION_START_OFFSET, REMOTE_TRANSLATE_XFER_ADDRESS, FRAME_CHAIN,
+ FRAME_CHAIN_VALID, FRAME_SAVED_PC, FRAME_ARGS_ADDRESS,
+ FRAME_LOCALS_ADDRESS, FRAME_ARGS_SKIP,
+ FRAMELESS_FUNCTION_INVOCATION, REGISTER_BYTE, REGISTER_RAW_SIZE,
+ REGISTER_VIRTUAL_SIZE, REGISTER_VIRTUAL_TYPE, SAVED_PC_AFTER_CALL,
+ FRAME_NUM_ARGS, MAX_REGISTER_RAW_SIZE, MAX_REGISTER_VIRTUAL_SIZE,
+ REGISTER_SIZE.
+ * d10v-tdep.c, config/d10v/tm-d10v.h: Update.
+ * config/d10v/tm-d10v.h (DMEM_START, IMEM_START, STACK_START,
+ ARG1_REGNUM, ARGN_REGNUM, RET1_REGNUM): Move definitions from
+ here.
+ * d10v-tdep.c: To here.
+ * config/d10v/tm-d10v.h (struct type): Move declaration from here.
+ * gdbarch.h: To here.
+ * config/d10v/tm-d10v.h (struct frame_info, struct
+ frame_saved_regs, struct type): Delete declarations.
+
+1999-06-02 Robert Hoehne <robert.hoehne@gmx.net>
+
+ * go32-nat.c: go32_terminal_init, go32_terminal_inferior and
+ go32_terminal_ours are new functions to save/restore the inferior`s
+ stdin/stdout filemodes
+
+1999-06-02 Stan Shebs <shebs@andros.cygnus.com>
+
+ * MAINTAINERS: Add Mark Kettenis, Jeff Law, and Philippe De Muyter
+ as maintainers for Hurd, HP/UX, and COFF, respectively.
+
+1999-06-02 Mark Kettenis <kettenis@gnu.org>
+
+ * gnu-nat.c (inf_continue): New function.
+ (struct inf): Use `unsigned int' instead of `int' for bit-fields.
+ Add new bit-field named `nomsg'.
+ (inf_validate_procinfo): Renamed from inf_validate_stopped, all
+ callers changed. Also update the `nomsg' and `traced' fields of
+ INF.
+ (make_inf): Initialize INF->nomsg.
+ (inf_cleanup): Reset INF->nomsg.
+ (inf_detach): Call `inf_validate_procinfo'. Call `inf_continue'
+ instead of `inf_signal' if the inferior does not have a message
+ port.
+ (gnu_resume): Likewise.
+ (gnu_create_inferior): Reset INF->nomsg in `attach_to_child'.
+ Call `inf_validate_procinfo' after returning from `fork_inferior'.
+ (gnu_attach): Update signal thread and tracing state.
+
+ * config/i386/tm-i386gnu.h: Include "i386/tm-i386.h" instead of
+ "i386/tm-i386v.h".
+ (STACK_END_ADDR): Remove.
+ (SIGCONTEXT_PC_OFFSET): New define.
+ Include "tm-sysv4.h".
+
+1999-06-02 J.T. Conklin <jtc@redback.com>
+
+ * config/tm-vxworks.h: New file, header for definitions common to
+ all vxWorks targets.
+ * config/a29k/tm-vx29k.h, config/i960/tm-vx960.h,
+ config/m68k/tm-vx68.h, config/mips/tm-vxmips.h,
+ config/sparc/tm-vxsparc.h: Include tm-vxworks.h.
+
+Wed Jun 2 17:37:03 1999 Jeffrey A Law (law@cygnus.com)
+
+ * config/pa/tm-hppa.h (IMPORT_SHLIB): New unwind stub type.
+
+1999-06-02 Christopher Faylor <cgf@cygnus.com>
+
+ * configure.tgt: Alphabetically reorder some targets.
+
+1999-06-02 Keith Seitz <keiths@cygnus.com>
+
+ * v850ice.c (v850ice_xfer_memory): Insert lost "break".
+
+1999-06-02 Jim Blandy <jimb@zwingli.cygnus.com>
+
+ * rs6000-tdep.c (variants): Fix description of 750 register set.
+ (Thanks to J. T. Conklin.)
+
+Wed Jun 2 16:10:08 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * gdbarch.h, gdbarch.c: Add multi-arch support for
+ STORE_STRUCT_RETURN, STORE_RETURN_VALUE,
+ EXTRACT_STRUCT_VALUE_ADDRESS, USE_STRUCT_CONVENTION,
+ FRAME_INIT_SAVED_REGS and INIT_EXTRA_FRAME_INFO.
+ * d10v-tdep.c, config/d10v/tm-d10v.h: Update.
+
+ * config/d10v/tm-d10v.h (FRAME_INIT_SAVED_REGS): Replace
+ FRAME_FIND_SAVED_REGS.
+ (d10v_frame_init_saved_regs): Replace d10v_frame_find_saved_regs.
+ * d10v-tdep.c (d10v_pop_frame, d10v_frame_chain,
+ d10v_frame_init_saved_regs): Update.
+ * gdbarch.h: Disallow FRAME_FIND_SAVED_REGS when multi-arch.
+
+ * gdbarch.h, gdbarch.c: Add multi-arch support for
+ D10V_MAKE_DADDR, D10V_MAKE_IADDR, D10V_DADDR_P, D10V_IADDR_P,
+ D10V_CONVERT_DADDR_TO_RAW and D10V_CONVERT_IADDR_TO_RAW.
+ * d10v-tdep.c, config/d10v/tm-d10v.h: Update.
+
+ * config/d10v/tm-d10v.h (EXTRA_FRAME_INFO): Delete.
+ * d10v-tdep.c (struct frame_extra_info): Define.
+ (d10v_init_extra_frame_info, d10v_pop_frame, d10v_frame_chain,
+ d10v_frame_find_saved_regs): Update.
+ * gdbarch.h: Disallow EXTRA_FRAME_INFO when multi-arch.
+
+Tue Jun 1 13:36:31 1999 Philippe De Muyter <phdm@macqel.be>
+
+ * config/m68k/tm-delta68.h (FRAME_NUM_ARGS): Macro prototype fixed.
+ * config/m68k/tm-news.h, config/ns32k/tm-merlin.h: Ditto.
+ * config/ns32k/tm-umax.h (FRAME_NUM_ARGS): Old macro definition
+ removed; new macro prototype fixed.
+
+Wed Jun 2 11:18:37 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * gdbarch.h, gdbarch.c: Add multi-arch support for
+ EXTRACT_RETURN_VALUE, PUSH_ARGUMENTS, PUSH_DUMMY_FRAME,
+ PUSH_RETURN_ADDRESS, POP_FRAME, FRAME_FIND_SAVED_REGS.
+ * d10v-tdep.c, config/d10v/tm-d10v.h: Update.
+
+ * gdbarch.h, gdbarch.c: Add multi-arch support for
+ REGISTER_CONVERTIBLE, REGISTER_CONVERT_TO_VIRTUAL,
+ REGISTER_CONVERT_TO_RAW.
+ * config/d10v/tm-d10v.h, d10v-tdep.c (d10v_gdbarch_init): Update.
+
+ * defs.h (REGISTER_NAME): Move compatibility definition from here.
+ * gdbarch.h: To here.
+
+ * frame.h, blockframe.c (generic_fix_call_dummy): New
+ stub function.
+ * gdbarch.h, gdbarch.c: Add multi-arch support for FIX_CALL_DUMMY.
+ * config/d10v/tm-d10v.h, d10v-tdep.c (d10v_gdbarch_init): Update.
+
+Tue Jun 1 20:06:38 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * d10v-tdep.c (d10v_gdbarch_init): Set get_saved_register.
+ * config/d10v/tm-d10v.h: Update.
+
+Tue Jun 1 19:50:05 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * gdbarch.h, gdbarch.c: Add multi-arch support for TARGET_READ_PC,
+ TARGET_WRITE_PC, TARGET_READ_FP, TARGET_WRITE_FP, TARGET_READ_SP
+ and TARGET_WRITE_SP.
+ * config/d10v/tm-d10v.h, d10v-tdep.c (d10v_gdbarch_init): Update.
+
+Tue Jun 1 19:19:02 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * gdbarch.c (default_gdbarch): Set field GET_SAVED_REGISTER to
+ generic_get_saved_register.
+ * gdbarch.c: Change update dispatch functions so that they check
+ for a NULL function pointer.
+
+Tue Jun 1 19:19:02 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * gdbarch.h, gdbarch.c: Add multi-arch support for TARGET_INT_BIT,
+ TARGET_CHAR_BIT, TARGET_SHORT_BIT, TARGET_FLOAT_BIT,
+ TARGET_DOUBLE_BIT and TARGET_LONG_DOUBLE_BIT.
+ * config/d10v/tm-d10v.h, d10v-tdep.c (d10v_gdbarch_init): Update.
+
+Tue Jun 1 18:47:54 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * parse.c (build_parse): New function. Initialize
+ msym_text_symbol_type, msym_data_symbol_type and
+ msym_unknown_symbol_type.
+ (_initialize_parse): Call build_parse.
+ (_initialize_parse): Register variables msym_text_symbol_type,
+ msym_data_symbol_type as msym_unknown_symbol_type as
+ per-architecture.
+
+Tue Jun 1 11:30:09 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * d10v-tdep.c (_initialize_d10v_tdep): Register d10v as an
+ architecture.
+ (d10v_gdbarch_init): New function.
+ * confg/d10v/tm-d10v.h (GDB_MULTI_ARCH): Define.
+
+Tue Jun 1 10:45:24 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * config/d10v/tm-d10v.h (REGISTER_CONVERTIBLE,
+ REGISTER_CONVERT_TO_RAW, REGISTER_CONVERT_TO_VIRTUAL): Convert
+ macros into functions.
+ * config/d10v/tm-d10v.h, d10v-tdep.c (d10v_register_convertable,
+ d10v_register_convert_to_virtual, d10v_register_convert_to_raw):
+ The new functions.
+
+1999-05-31 Fernando Nasser <fnasser@totem.to.cygnus.com>
+
+ * stack.c (print_args_stub): Add missing stream parameter.
+
+Mon May 31 15:50:08 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ Fri May 28 16:51:00 1999 Martin Dorey <martin.dorey@madge.com>:
+ * valops.c, value.h (default_push_arguments): Fix order of
+ parameters to match PUSH_ARGUMENTS arguments.
+
+Thu May 27 11:42:55 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * gdbarch.h (EXTRACT_STRUCT_VALUE_ADDRESS): Return 0.
+
+ * valops.c (value_assign): Delete redundant test of
+ REGISTER_CONVERTIBLE.
+
+Thu May 27 11:33:57 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * config/w65/tm-w65.h, config/tic80/tm-tic80.h, config/sh/tm-sh.h,
+ config/i386/tm-i386m3.h, config/i386/tm-go32.h,
+ config/i386/tm-cygwin.h, config/h8500/tm-h8500.h,
+ config/d30v/tm-d30v.h, config/d10v/tm-d10v.h: Delete definition of
+ macro NAMES_HAVE_UNDERSCORE.
+
+Thu May 27 09:31:06 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * gdbarch.h (EXTRACT_STRUCT_VALUE_ADDRESS,
+ EXTRACT_STRUCT_VALUE_ADDRESS_P): Provide default definitions.
+ * values.c (value_being_returned): Use
+ EXTRACT_STRUCT_VALUE_ADDRESS when EXTRACT_STRUCT_VALUE_ADDRESS_P.
+
+Wed May 26 13:51:25 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * utils.c (tui_file_new, tui_file_delete, tui_fileopen): New
+ functions.
+ (tui_file_isatty): Rename gdb_file_isatty.
+ (gdb_file_init_astring): Use tui_file_new to create stream.
+ (gdb_file_get_strbuf, gdb_file_adjust_strbuf): Call gdb_file_data
+ to access the tui_stream.
+ (tui_file_flush): Rename gdb_flush. Call gdb_file_data to access
+ the tui_stream. Pass FILE and not STREAM down.
+
+ * utils.c (struct stdio_file, stdio_file_flush, stdio_file_fputs,
+ stdio_file_isatty, stdio_file_delete, stdio_file_new,
+ stdio_fileopen): Define type and functions. Implement a simple
+ STDIO based gdb_file.
+ (struct gdb_file, gdb_file_new, gdb_file_delete, null_file_isatty,
+ null_file_flush, null_file_fputs, null_file_delete, gdb_file_data,
+ set_gdb_file_flush, set_gdb_file_isatty, set_gdb_file_fputs,
+ set_gdb_file_data, fputs_unfiltered, gdb_flush, gdb_file_isatty):
+ Define type and functions. Implement virtual functions for
+ gdb_file.
+
+ * defs.h (struct gdb_file): Declare.
+ (GDB_FILE): Change type to struct gdb_file. Deprecate.
+ (gdb_file_flush_ftype, gdb_file_fputs_ftype,
+ gdb_file_isatty_ftype, gdb_file_delete_ftype): Add function type
+ declarations.
+
+ * defs.h (set_gdb_file_flush, set_gdb_file_fputs,
+ set_gdb_file_isatty, set_gdb_file_data, gdb_file_new,
+ gdb_file_delete, gdb_file_data, stdio_fileopen, tui_fileopen): Add
+ function declarations.
+ (gdb_fopen): Re-implement. Call stdio_file_new.
+ (gdb_fclose): Re-implement. Call gdb_file_delete.
+
+ * main.c (tui_file_fputs): Rename fputs_unfiltered. Use
+ gdb_file_data to gain access to the tui_stream data. Use FILE
+ instead of STREAM where applicable.
+ (main): Create gdb_stdout and gdb_stderr using tui_fileopen.
+
+ * defs.h (struct tui_stream): Add field ts_magic.
+ * utils.c (tui_file_magic): Local variable.
+ (tui_file_new): Set field ts_magic.
+ (tui_file_delete, tui_file_isatty, gdb_file_init_astring,
+ gdb_file_get_strbuf, gdb_file_adjust_strbuf, tui_file_flush):
+ Verify ts_magic.
+
+1999-05-25 Jim Blandy <jimb@zwingli.cygnus.com>
+
+ * breakpoint.c (insert_breakpoints, remove_breakpoint,
+ breakpoint_1): Add a 'default' case, which prints a warning
+ message, to remove EGCS warnings.
+
+1999-05-25 Fernando Nasser <fnasser@totem.to.cygnus.com>
+
+ * utils.c (gdb_file_adjust_strbuf): Take into account the
+ possibility that the buffer has not been allocated yet.
+
+Tue May 25 16:05:11 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * gdbarch.h (REGISTER_CONVERTIBLE, REGISTER_CONVERT_TO_VIRTUAL,
+ REGISTER_CONVERT_TO_RAW): Provide default definition.
+
+ * valops.c (value_assign), infcmd.c (do_registers_info), findvar.c
+ (value_from_register, value_of_register): Remove #ifdef
+ REGISTER_CONVERTIBLE. Assume REGISTER_CONVERTIBLE etc defined.
+
+1999-05-25 Keith Seitz <keiths@cygnus.com>
+
+ * config/mcore/tm-mcore.h (FRAME_NUM_ARGS): Re-write definition of
+ FRAME_NUM_ARGS so that it returns NUM_ARGS as a result instead of
+ setting a variable as a side effect.
+
+Tue May 25 16:18:25 1999 Andrew Cagney <cagney@amy.cygnus.com>
+
+ * remote-d10v.c (d10v_eva_prepare_to_trace,
+ d10v_eva_get_trace_data), remote-sim.c (_initialize_remote_sim):
+ Add declaraton. Make static.
+
+ * remote-d10v.c (_initialize_remote_d10v), d10v-tdep.c
+ (_initialize_d10v_tdep): Add declaration.
+ * config/d10v/tm-d10v.h (d10v_frame_chain): Add declaration.
+
+Tue May 25 15:20:58 1999 Andrew Cagney <cagney@amy.cygnus.com>
+
+ * main.c (init_proc, proc_remove_foreign): Delete function.
+ * inftarg.c (child_mourn_inferior): Update. Delete call to
+ proc_remove_foreign().
+ * top.c (gdb_init): Update. Delete call to init_proc().
+
+ * utils.c (pollquit, fmthex, hexlate): Delete function.
+
+Tue May 25 13:01:43 1999 Andrew Cagney <cagney@amy.cygnus.com>
+
+ * main.c (gdb_init): Move declaration from here.
+ * top.h: To here.
+
+ * defs.h (init_page_info): Add declaration.
+
+ * top.c (initialize_utils): Move declaration from here.
+ * defs.h: To here.
+
+ * infcmd.c (target_map_name_to_register): Move declaration from
+ here.
+ * parser-defs.h: To here.
+
+ * c-typeprint.c (cp_type_print_method_args), target.c
+ (nosupport_runtime, normal_target_post_startup_inferior): Add
+ declaration. Make static.
+
+Tue May 25 13:53:23 1999 Andrew Cagney <cagney@amy.cygnus.com>
+
+ * main.c: Include "event-loop.h".
+ * Makefile.in (main.o): Add dependency.
+
+ * top.h (setup_event_loop, async_init_signals), top.c
+ (set_async_editing_command, set_async_annotation_level,
+ set_async_prompt), event-loop.c (display_gdb_prompt): Move
+ declarations from here.
+ * event-loop.h: To here.
+
+ * event-loop.h (delete_async_signal_handler): Add function
+ declaration.
+
+ * event-top.c (change_annotation_level, command_handler): Add
+ declaration. Make static.
+
+Tue May 25 12:44:58 1999 Andrew Cagney <cagney@amy.cygnus.com>
+
+ * tracepoint.c (free_actions_list, add_register): Add declaration.
+ Make static.
+ (free_actions_list_cleanup_wrapper): New function. Wraps
+ free_actions_list for make_cleanup.
+ (trace_start_command): Pass free_actions_list_cleanup_wrapper
+ instead of free_actions_list to make_cleanup.
+ (_initialize_tracepoint): Add extern declaration.
+
+Tue May 25 12:23:39 1999 Andrew Cagney <cagney@amy.cygnus.com>
+
+ * jv-typeprint.c (java_type_print_base, jv-valprint.c
+ (java_print_value_fields): Add static declaration.
+
+ * jv-lang.c (java_lookup_type, get_java_utf8_name,
+ java_lookup_type): Add static declaration.
+ (get_java_class_symtab, java_class_is_primitive,
+ java_value_string): Add declaration. Make static.
+ (java_rerun_cleanup): Add extern declaration for this stub
+ function.
+
+Tue May 25 12:06:29 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * gdbarch.h: When multi-arch, check that REGISTER_NAMES was not
+ defined.
+
+Mon May 24 16:16:29 1999 Andrew Cagney <cagney@amy.cygnus.com>
+
+ * inflow.c (_initialize_inflow), annotate.c
+ (_initialize_annotate), os9kread.c (_initialize_os9kread),
+ serial.c (_initialize_serial), nlmread.c (_initialize_nlmread),
+ f-valprint.c (_initialize_f_valprint), cp-valprint.c
+ (_initialize_cp_valprint), typeprint.c (_initialize_typeprint),
+ complaints.c (_initialize_complaints), scm-lang.c
+ (_initialize_scheme_language), m2-lang.c
+ (_initialize_m2_language), dbxread.c (_initialize_dbxread),
+ f-lang.c (_initialize_f_language), ch-lang.c
+ (_initialize_chill_language), c-lang.c (_initialize_c_language),
+ corefile.c (_initialize_core), stabsread.c
+ (_initialize_stabsread), mipsread.c (_initialize_mipsread),
+ elfread.c (_initialize_elfread), coffread.c
+ (_initialize_coffread), maint.c (_initialize_maint_cmds),
+ demangle.c (_initialize_demangler), maint.c
+ (_initialize_maint_cmds), language.c (_initialize_language): Add
+ external declaration.
+
+Mon May 24 10:04:56 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * config/z8k/tm-z8k.h, config/w65/tm-w65.h, config/v850/tm-v850.h,
+ config/tic80/tm-tic80.h, config/tahoe/tm-tahoe.h,
+ config/rs6000/tm-rs6000.h, config/sparc/tm-sparc.h,
+ config/sh/tm-sh.h, config/pyr/tm-pyr.h, config/pa/tm-hppa.h,
+ config/ns32k/tm-merlin.h, config/mn10300/tm-mn10300.h,
+ config/mn10200/tm-mn10200.h, config/mips/tm-mips.h,
+ config/m88k/tm-m88k.h, config/m68k/tm-news.h,
+ config/m68k/tm-delta68.h, config/m68k/tm-isi.h,
+ config/m68k/tm-m68k.h, config/m32r/tm-m32r.h,
+ config/i960/tm-i960.h, config/i386/tm-i386v.h,
+ config/i386/tm-i386.h, config/h8500/tm-h8500.h,
+ config/h8300/tm-h8300.h, config/fr30/tm-fr30.h,
+ config/d30v/tm-d30v.h, config/d10v/tm-d10v.h,
+ config/convex/tm-convex.h, config/arc/tm-arc.h,
+ config/arm/tm-arm.h, config/alpha/tm-alpha.h,
+ config/a29k/tm-a29k.h: Re-write definition of FRAME_NUM_ARGS so
+ that it returns NUM_ARGS as a result instead of setting a variable
+ as a side effect.
+
+ * ns32k-tdep.c (merlin_frame_num_args), tahoe-tdep.c
+ (tahoe_frame_num_args), vax-tdep.c (vax_frame_num_args),
+ m68k-tdep.c (news_frame_num_args, delta68_frame_num_args,
+ isi_frame_num_args), convex-tdep.c (convex_frame_num_args): New
+ functions.
+
+ * stack.c (print_args_stub): Update use of FRAME_NUM_ARGS.
+
+Mon May 24 11:57:04 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * remote.c (remote_xfer_memory): Re-write with assumption that
+ REMOTE_TRANSLATE_XFER_ADDRESS is defined. Pass targ_addr and
+ targ_len by reference.
+ (REMOTE_TRANSLATE_XFER_ADDRESS): Provide default definition.
+
+ * remote-d10v.c (remote_d10v_translate_xfer_address): Update.
+ * config/d10v/tm-d10v.h (REMOTE_TRANSLATE_XFER_ADDRESS): Update.
+
+Mon May 24 12:10:58 1999 Andrew Cagney <cagney@amy.cygnus.com>
+
+ * value.h (default_push_arguments): Add function declaration.
+
+ * alpha-tdep.c (alpha_about_to_return), gdbarch.c (verify_gdbarch,
+ arch_ok, set_arch), command.c (find_cmd), infrun.c
+ (follow_inferior_fork, follow_fork, follow_vfork,
+ set_schedlock_func, is_internal_shlib_eventpoint,
+ stopped_for_internal_shlib_event, stopped_for_shlib_catchpoint,
+ xdb_handle_command), infcmd.c (run_no_args_command, go_command),
+ symfile.c (add_filename_language, set_ext_lang_command,
+ info_ext_lang_command, init_filename_language_table), symtab.c
+ (overload_list_add_symbol), defs.h (default_get_saved_register),
+ ax-general.c (grow_expr, append_const, read_const, generic_ext):
+ Ditto.
+
+ * infrun.c (currently_stepping): Ditto. Make static.
+
+ * valops.c (hand_function_call): Explictly type static variable
+ ``checked''.
+
+Mon May 24 08:36:18 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * d10v-tdep.c (d10v_breakpoint_from_pc, d10v_register_name,
+ d10v_register_byte, d10v_register_raw_size,
+ d10v_register_virtual_size, d10v_register_virtual_type,
+ d10v_make_daddr, d10v_make_iaddr, d10v_daddr_p, d10v_iaddr_p,
+ d10v_convert_iaddr_to_raw, d10v_convert_daddr_to_raw,
+ d10v_store_struct_return, d10v_store_return_value,
+ d10v_extract_struct_value_address, d10v_frame_saved_pc,
+ d10v_frame_args_address, d10v_frame_locals_address,
+ d10v_saved_pc_after_call): New functions.
+
+ * config/d10v/tm-d10v.h (REGISTER_BYTE, REGISTER_RAW_SIZE,
+ REGISTER_VIRTUAL_SIZE, REGISTER_VIRTUAL_TYPE, STORE_STRUCT_RETURN,
+ D10V_MAKE_DADDR, D10V_MAKE_IADDR, D10V_DADDR_P, D10V_IADDR_P,
+ D10V_CONVERT_DADDR_TO_RAW, D10V_CONVERT_IADDR_TO_RAW,
+ STORE_STRUCT_RETURN, STORE_RETURN_VALUE,
+ EXTRACT_STRUCT_VALUE_ADDRESS, SAVED_PC_AFTER_CALL, FRAME_SAVED_PC,
+ FRAME_ARGS_ADDRESS): Re-define using new functions.
+
+ * config/d10v/tm-d10v.h (BREAKPOINT_FROM_PC): Replace BREAKPOINT.
+ (REGISTER_NAME): Replace REGISTER_NAMES.
+
+ * utils.c (core_addr_lessthan, core_addr_greaterthan): New
+ functions.
+ * defs.h (core_addr_lessthan, core_addr_greaterthan): Declare.
+
+Sat May 22 16:44:06 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * utils.c (n_spaces): Handle case where first call has N equal to
+ zero.
+ (print_spaces): Use n_spaces.
+
+Fri May 21 11:23:54 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * valops.c (value_push): Remove conditional definition based on
+ absense of macro PUSH_ARGUMENTS. Pass SP and STRUCT_ADDR by
+ reference.
+ (default_push_arguments): New function.
+
+ * config/v850/tm-v850.h, config/tic80/tm-tic80.h,
+ config/sparc/tm-sparc.h, config/sparc/tm-sp64.h,
+ config/sh/tm-sh.h, config/rs6000/tm-rs6000.h, config/pa/tm-hppa.h,
+ config/mn10300/tm-mn10300.h, config/mn10200/tm-mn10200.h,
+ config/mips/tm-mips.h, config/m32r/tm-m32r.h,
+ config/h8300/tm-h8300.h, config/fr30/tm-fr30.h,
+ config/d30v/tm-d30v.h, config/d10v/tm-d10v.h, config/arm/tm-arm.h,
+ config/alpha/tm-alpha.h: Update definition of PUSH_ARGUMENTS.
+ Return updated SP.
+
+ * rs6000-tdep.c (rs6000_push_arguments): Rename push_arguments.
+
+Thu May 20 12:18:28 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * blockframe.c (get_prev_frame): Remove #ifdef around test for
+ FRAMELESS_FUNCTION_INVOCATION.
+ (get_prev_frame): Change FRAMELESS_FUNCTION_INVOCATION call to a
+ function invocation.
+ * i386-tdep.c (i386_frame_num_args), stack.c (frame_info): Ditto.
+ * config/z8k/tm-z8k.h, config/w65/tm-w65.h, config/vax/tm-vax.h,
+ config/sparc/tm-sparc.h, config/sh/tm-sh.h,
+ config/rs6000/tm-rs6000.h, config/pa/tm-hppa.h,
+ config/mips/tm-mips.h, config/m88k/tm-m88k.h,
+ config/m68k/tm-m68k.h, config/i960/tm-i960.h,
+ config/i386/tm-sun386.h, config/i386/tm-i386v.h,
+ config/i386/tm-i386.h, config/h8500/tm-h8500.h,
+ config/h8300/tm-h8300.h, config/fr30/tm-fr30.h,
+ config/d30v/tm-d30v.h, config/d10v/tm-d10v.h,
+ config/convex/tm-convex.h, config/arm/tm-arm.h,
+ config/arc/tm-arc.h, config/alpha/tm-alpha.h,
+ config/a29k/tm-a29k.h: Update FRAMELESS_FUNCTION_INVOCATION.
+ * fr30-tdep.c (fr30_frameless_function_invocation), convex-tdep.c
+ (convex_frameless_function_invocation), arm-tdep.c
+ (arm_frameless_function_invocation): New functions.
+
+1999-05-20 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * top.c: Change dates in comments to ISO format.
+
+ * event-top.c: Ditto.
+ * event-loop.c: Ditto.
+ * main.c: Ditto.
+
+1999-05-19 Keith Seitz <keiths@cygnus.com>
+
+ * config/mcore/tm-mcore.h (BELIEVE_PCC_PROMOTION): Define. We
+ really do want to believe what gcc tells us about types...
+
+1999-05-19 Keith Seitz <keiths@cygnus.com>
+
+ * config/mcore/tm-mcore.h (FRAME_ARGS_ADDRESS): Define to a function.
+ (FRAME_LOCALS_ADDRESS): Ditto.
+ * mcore-tdep.c (mcore_frame_args_addcress): New function.
+ (mcore_frame_locals_address): New function.
+
+ * monitor.c (monitor_open): Only assume we have eight
+ breakpoints if the monitor implementation does not tell
+ us how many there really are. Alloc memory for these
+ dynamically.
+ (monitor_close): Free memory associated with breakpoint
+ storage.
+ (monitor_insert_breakpoint): Don't rely on a hardcoded
+ number of breakpoints.
+ (monitor_remove_breakpoint): Ditto.
+ (NUM_MONITOR_BREAKPOINTS): Removed and replaced with monitor_ops
+ specification.
+ * monitor.h (struct monitor_ops): Add new member so that the
+ individual monitor implementations can tell us how many
+ breakpoints the monitor supports.
+
+ * mcore-rom.c (init_picobug_cmds): Add number of breakpoints supported
+ by picobug monitor.
+
+1999-05-18 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ From Philippe De Muyter <phdm@macqel.be>:
+ * event-loop.h: Include sys/wait.h only if HAVE_SYS_WAIT_H.
+
+1999-05-17 Keith Seitz <keiths@cygnus.com>
+
+ * configure.tgt: Add MCore target.
+ * Makefile.in: Add mcore-tdep.c and mcore-rom.c
+ * config/mcore/tm-mcore.h: New file.
+ * config/mcore/mcore.mt: New file.
+ * mcore-rom.c: New file.
+ * mcore-tdep.c: New file.
+
+1999-05-17 Fernando Nasser <fnasser@totem.to.cygnus.com>
+
+ * top.c (print_command_line): Added the missing stream argument.
+ * gdbcmd.h: Added argument to prototype.
+ * command.c: Fixed call to include extra argument.
+ * breakpoint.c: Same.
+
+1999-05-14 Jim Blandy <jimb@zwingli.cygnus.com>
+
+ Targets are #defining PREPARE_TO_PROCEED with inconsistent numbers
+ of arguments. Since the Mach 3 target needs an argument, we'll
+ make things consistent by adding an argument everywhere.
+ * infrun.c (proceed): Pass an argument to PREPARE_TO_PROCEED.
+ * config/pa/nm-hppah.h (PREPARE_TO_PROCEED): Add ignored argument
+ to definition.
+
+1999-05-11 Stan Shebs <shebs@andros.cygnus.com>
+
+ Fri Apr 23 13:27:34 PDT 1999 Toshiyasu Morita (tm@netcom.com)
+ * sh-stub.c: Mostly localize processor dependencies.
+
+1999-05-10 Martin Hunt <hunt@cygnus.com>
+
+ * debugify.c, debugify.h: Removed because they are no
+ longer used.
+
+1999-05-08 Jim Blandy <jimb@zwingli.cygnus.com>
+
+ * infrun.c (_initialize_infrun): Handle TARGET_SIGNAL_LWP,
+ TARGET_SIGNAL_WAITING, and TARGET_SIGNAL_CANCEL like SIGALRM or
+ SIGIO --- pass them through to the inferior silently.
+ * target.h (enum target_signals): Add TARGET_SIGNAL_CANCEL, for
+ Solaris's SIGCANCEL.
+ * target.c (target_signal_from_host, target_signal_to_host): Add
+ mapping between SIGCANCEL and TARGET_SIGNAL_CANCEL.
+ (signals): Add entry for SIGCANCEL.
+
+1999-05-07 Stan Shebs <shebs@andros.cygnus.com>
+
+ After years of talking about it, finally break up the
+ wait_for_inferior loop.
+ * infrun.c (struct execution_control_state): New struct,
+ holds what used to be local vars governing wfi behavior.
+ (init_execution_control_state): New function, was code in
+ wfi that set up execution control state.
+ (handle_inferior_event): New function, was body of main
+ wfi loop. Rewrite all local var references to go through
+ the ecs structure passed into this function.
+ (wait_for_inferior): Rewrite to set up and use execution control
+ state, and to call the new functions.
+ (currently_stepping): New function, was the macro
+ CURRENTLY_STEPPING.
+ (enum infwait_states): Rename from wfi_states.
+ (infwait_normal_state, etc): Similarly.
+
+Thu May 6 15:25:32 1999 Philippe De Muyter <phdm@macqel.be>
+
+ * coffread.c (coff_symtab_read): Call `record_line' with the line
+ number of the ".bf" symbol only for one-line functions.
+
+1999-05-06 Michael Snyder <msnyder@cleaver.cygnus.com>
+
+ * Makefile.in: thread.o depends on target.h.
+
+1999-05-06 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * event-top.c (change_line_handler): Use POLLIN instead of
+ POLLRDNORM, for compatibility with Linux.
+ (setup_event_loop): Ditto.
+
+1999-05-06 Jim Blandy <jimb@zwingli.cygnus.com>
+
+ * mips-tdep.c (heuristic_proc_start): Rewrite cryptic error
+ message about hitting the "heuristic fence post" with something
+ that actually gives the user a fighting chance of figuring out
+ why GDB is unhappy.
+
+1999-05-06 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * top.c: Include event-loop.h.
+ (init_main): Add async version of 'set prompt' command.
+ If in async mode define the editing and annotate set
+ commands in a different way.
+ Initialize new variable asyn_command_editing_p to 1.
+ Initialize the gdb prompt for async mode.
+ (quit_cover): Make not static, for use by the event loop.
+ (gdb_init): Call async_init_signals for the asynchronous case.
+ (source_line_number, source_file_name, source_error,
+ source_pre_error, history_expansion_p): Make non-static, so
+ event-top.c can use them.
+ (command_loop_marker): Make non-static, for use in event-top.c.
+ Include event-loop.h.
+
+ * top.h: Add prototype for async_init_signals.
+ (SET_TOP_LEVEL): Move here from main.c.
+ Add setup_event_loop to exported functions.
+
+ * defs.h: Add async_hook to exported variables.
+
+ * main.c (SET_TOP_LEVEL): Move to top.h, so that it is visible in
+ event-loop.c. Add new global variable async to determine whether
+ we are running in async mode or not.
+ (main): Add support for --async switch. Use async_hook to call
+ setup_event_loop, when running in async mode.
+
+ * event-top.c: New file. Gdb input line handler and command line
+ handler for the event loop. Initialization of signal handlers.
+ All the handled signals have handlers called handle_<signalname>.
+ Set up all the appropriate tokens for asynchronous signal
+ handling.
+
+ * event-loop.h: New file. Data structures and definitions for the
+ event loop.
+
+ * event-loop.c: New file. Functions for the event loop
+ implementation.
+
+ * config.in: Regenerate with autoheader.
+
+ * configure.in (AC_CHECK_FUNCS): Add poll to list of functions
+ to be checked for.
+
+ * configure: Regenerate.
+
+ * Makefile.in (SFILES): Add new source files.
+ (eventloop_h): Define.
+ (COMMON_OBS): Add new object files.
+ (event-loop.o): Add rule for target object.
+ (event-top.o): Ditto.
+
+1999-05-05 Stan Shebs <shebs@andros.cygnus.com>
+
+ * infrun.c (wait_for_inferior): Transform breaks and continues
+ into gotos, move the target_wait to the very top of the loop.
+
+1999-05-05 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * configure.in: Ensure that GDB links with libuser32.a under
+ cygwin because libreadline requires it.
+ * Makefile.in (WIN32LIBS): Substitute in result from configure
+ * configure: regenerate
+
+1999-05-04 Jim Blandy <jimb@zwingli.cygnus.com>
+
+ Fix from John Rigby. Richard Henderson says it seems okay.
+ * alpha-tdep.c (PROC_DUMMY_FRAME): As long as we're abusing fields
+ of (proc)->pdr, we ought to at least abuse one large enough to
+ hold the value we're trying to store in it. iopt is only 32 bits
+ wide; cbLineOffset is a bfd_vma.
+
+1999-05-04 DJ Delorie <dj@cygnus.com>
+
+ DJGPP changes from Robert Hoehne <robert.hoehne@gmx.net>
+
+ * ser-go32.c: correct includes
+ * source.c (openp): use ROOTED_P instead of SLASH_P
+ * go32-nat.c: enhance exception and NPX handling
+ (go32_kill_inferior): fix small bug killing inferior
+ * configure.in: don't look for termcap with djgpp
+ * configure: rebuild
+
+1999-05-04 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * main.c (main): Comment out unused and undocumented command line
+ option '-'.
+
+1999-04-30 Jim Blandy <jimb@zwingli.cygnus.com>
+
+ Cleanup from Philippe De Muyter:
+ * configure.in (BFD_NEED_DECLARATION): Check also for strstr.
+ * acconfig.h (NEED_DECLARATION_MALLOC, NEED_DECLARATION_REALLOC,
+ NEED_DECLARATION_FREE, NEED_DECLARATION_STRERROR): Define slots
+ removed; they are now generated automatically.
+ * gdb_string.h (strstr): Provide function prototype if
+ NEED_DECLARATION_STRSTR.
+ * configure, config.in: Regenerated.
+
+Fri Apr 30 11:16:09 1999 Michael Snyder <msnyder@cleaver.cygnus.com>
+
+ * target.h (to_find_new_threads): new target ops vector.
+ (target_find_new_threads): define.
+ * target.c (update_current_target): inherit new target ops vector.
+ * remote.c: Setup to_find_new_threads vector.
+ * sol-thread.c: ditto.
+ * thread.c (target_find_new_threads): rename: local_find_new_threads.
+ (info_threads_command): call target_find_new_threads by new method,
+ as a target ops vector, rather than previous macro definition method.
+ * infcmd.c (go_command): define only if in xdb mode.
+ * procfs.c: fix typo in comment.
+
+Fri Apr 30 01:02:05 1999 Jeffrey A Law (law@cygnus.com)
+
+ * hppah-nat.c: Fix various coding convention violations introduced
+ by HP.
+ (child_acknowledge_created_inferior): Do nothing if PT_SET_EVENT_MASK
+ is not defined.
+
+1999-04-28 Stan Shebs <shebs@andros.cygnus.com>
+
+ * TODO: Add some items inspired by review of the manual.
+
+Tue Apr 27 17:38:19 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * config/z8k/tm-z8k.h, config/v850/tm-v850.h,
+ config/tic80/tm-tic80.h, config/sparc/tm-sparc.h,
+ config/sh/tm-sh.h, config/pyr/tm-pyr.h, config/pa/tm-hppa.h,
+ config/mn10300/tm-mn10300.h, config/mn10200/tm-mn10200.h,
+ config/mips/tm-mips.h, config/m88k/tm-m88k.h,
+ config/m68k/tm-m68k.h, config/m32r/tm-m32r.h,
+ config/i960/tm-i960.h, config/i386/tm-i386.h,
+ config/h8500/tm-h8500.h, config/h8300/tm-h8300.h,
+ config/fr30/tm-fr30.h, config/d30v/tm-d30v.h,
+ config/d10v/tm-d10v.h, config/alpha/tm-alpha.h,
+ config/arm/tm-arm.h, config/a29k/tm-a29k.h, config/arc/tm-arc.h:
+ Change SKIP_PROLOGUE and SKIP_PROLOGUE_FRAMELESS_P macros so that
+ they return the new address.
+
+ * sparc-tdep.c (sparc_skip_prologue), hppa-tdep.c
+ (hppa_skip_prologue), m88k-tdep.c
+ (m88k_skip_prologue), i960-tdep.c
+ (i960_skip_prologue), arc-tdep.c
+ (arc_skip_prologue), a29k-tdep.c (a29k_skip_prologue): Rename
+ skip_prologue function.
+
+ * config/m68k/tm-isi.h: Convert macro SKIP_PROLOGUE into a new
+ function.
+ * m68k-tdep.c (isi_skip_prologue): That new function.
+ * vax-tdep.c (vax_skip_prologue), config/vax/tm-vax.h: Ditto.
+ * tahoe-tdep.c (tahoe_skip_prologue), config/tahoe/tm-tahoe.h: Ditto.
+ * rs6000-tdep.c (rs6000_skip_prologue), config/rs6000/tm-rs6000.h:
+ Ditto.
+ * ns32k-tdep.c (umax_skip_prologue), config/ns32k/tm-umax.h: Ditto.
+ * config/ns32k/tm-merlin.h, ns32k-tdep.c (merlin_skip_prologue):
+ Ditto.
+ * config/m68k/tm-altos.h, m68k-tdep.c (altos_skip_prologue): Ditto.
+ * config/convex/tm-convex.h, convex-tdep.c (convex_skip_prologue):
+ Ditto.
+
+ * symtab.c (in_prologue, find_function_start_sal, decode_line_1),
+ infrun.c (wait_for_inferior), blockframe.c
+ (frameless_look_for_prologue): Update.
+ * config/fr30/tm-fr30.h (FRAMELESS_FUNCTION_INVOCATION): Update.
+
+1999-04-27 Stan Shebs <shebs@andros.cygnus.com>
+
+ * TODO: Remove item about DEBUG_EXPRESSIONS, no longer meaningful.
+
+ * infrun.c (enum wfi_state): New enum.
+ (wait_for_inferior): Merge all but one of the target_wait calls
+ into a single call, add a wfi_state variable to encode which of
+ the calls is being made.
+
+1999-04-26 Jim Blandy <jimb@zwingli.cygnus.com>
+
+ Fix from Dave Holcomb.
+ * hpux-thread.c (init_hpux_thread_ops): Use the right function
+ name when initializing hpux_thread_ops.to_thread_alive.
+
+ * coffread.c (coff_symfile_read): If we have a `.stab' section,
+ but no `.stabstr' section, then print an error message; don't
+ crash.
+
+1999-04-26 Jim Blandy <jimb@zwingli.cygnus.com>
+
+ 1999-04-25 Mark Kettenis <kettenis@gnu.org>
+
+ * gnu-nat.c (gnu_attach): Call target_terminal_init before calling
+ inf_set_traced, since that function calls code that might try to
+ restore the terminal settings.
+
+Mon Apr 26 08:55:46 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * gdbarch.h, gdbarch.c: More format cleanups.
+
+Sun Apr 25 18:54:51 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * gdbarch.h (CALL_DUMMY_STACK_ADJUST_P): Replace
+ SIZEOF_CALL_DUMMY_STACK_ADJUST_P.
+ (CALL_DUMMY_STACK_ADJUST): Replace
+ SIZEOF_CALL_DUMMY_STACK_ADJUST_P.
+ * gdbarch.c (gdbarch_call_dummy_stack_adjust,
+ set_gdbarch_call_dummy_stack_adjust): Define.
+
+Fri Apr 23 15:00:25 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * gdbarch.c (arch_ok): New function. Fix logic test for a valid
+ architecture.
+ (set_arch): Use.
+
+1999-04-22 Jason Molenda (jsm@bugshack.cygnus.com)
+
+ * README: Note that readline is not installed as a part of
+ make install.
+
+Thu Apr 22 21:02:28 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * gdbarch.h, gdbarch.c (GET_SAVED_REGISTER, get_saved_register):
+ Add.
+ (struct gdbarch, verify_gdbarch, gdbarch_alloc, gdbarch_dump,
+ default_gdbarch): Update.
+
+ * value.h (get_saved_register): Cleanup prototype.
+ * findvar.c (default_get_saved_register): Rename function
+ get_saved_register.
+ (GET_SAVED_REGISTER): Define as default_get_saved_register when
+ undefined.
+ (get_saved_register): Always declare. Call GET_SAVED_REGISTER.
+
+ * sparc-tdep.c (sparc_get_saved_register): Rename function
+ get_saved_register.
+ * config/sparc/tm-sparc.h (GET_SAVED_REGISTER): Update.
+ * a29k-tdep.c (a29k_get_saved_register): Rename function
+ get_saved_register.
+ * config/a29k/tm-a29k.h (GET_SAVED_REGISTER): Update.
+
+ * config/d10v/tm-d10v.h, config/powerpc/tm-ppc-eabi.h,
+ config/h8300/tm-h8300.h, config/m32r/tm-m32r.h,
+ config/mn10200/tm-mn10200.h, config/mn10300/tm-mn10300.h,
+ config/sh/tm-sh.h, config/tic80/tm-tic80.h, config/v850/tm-v850.h:
+ Update macro GET_SAVED_REGISTER so that it calls
+ generic_get_saved_register.
+ * v850-tdep.c, tic80-tdep.c, sh-tdep.c, mn10300-tdep.c,
+ mn10200-tdep.c, m32r-tdep.c, h8300-tdep.c, rs6000-tdep.c: Delete
+ function get_saved_register.
+
+Thu Apr 22 13:32:23 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * gdbarch.c: Cleanup. Re-order the definition of the ``struct
+ gdbarch'' initialization functions so that maintenance is more
+ straightforward.
+
+Thu Apr 22 11:07:21 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * gdbarch.h, gdbarch.c (use_generic_dummy_frames,
+ USE_GENERIC_DUMMY_FRAMES): Add.
+ (struct gdbarch, verify_gdbarch, gdbarch_alloc, gdbarch_dump,
+ default_gdbarch): Update.
+
+ * config/v850/tm-v850.h, config/tic80/tm-tic80.h,
+ config/sh/tm-sh.h, config/powerpc/tm-ppc-eabi.h,
+ config/mn10300/tm-mn10300.h, config/mn10200/tm-mn10200.h,
+ config/m32r/tm-m32r.h, config/h8300/tm-h8300.h,
+ config/fr30/tm-fr30.h, config/d10v/tm-d10v.h: Give the
+ USE_GENERIC_DUMMY_FRAMES macro the value one.
+ * inferior.h (USE_GENERIC_DUMMY_FRAMES): Default to a value of
+ zero.
+
+ * blockframe.c (generic_find_dummy_frame,
+ generic_pc_in_call_dummy, generic_read_register_dummy,
+ generic_push_dummy_frame, generic_pop_current_frame,
+ generic_pop_dummy_frame, generic_frame_chain_valid,
+ generic_get_saved_register): Always define.
+
+ * breakpoint.c (frame_in_dummy): Convert #ifdef
+ USE_GENERIC_DUMMY_FRAMES to runtime test.
+
+ * rs6000-tdep.c (pop_frame, push_arguments, push_arguments,
+ push_arguments, frame_saved_pc, rs6000_frame_chain,
+ rs6000_frame_chain): Convert #ifdef USE_GENERIC_DUMMY_FRAMES to
+ runtime test.
+ (get_saved_register): Always define.
+
+Wed Apr 21 17:15:52 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * gdbarch.c (gdbarch_dump): Fix robustness check on
+ BELIEVE_PCC_PROMOTION_TYPE.
+
+Wed Apr 21 15:39:27 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * gdbarch.h (TARGET_BYTE_ORDER_SELECTABLE_P): When multi-arch,
+ force selectable byte order.
+ (CALL_DUMMY): Check for CALL_DUMMY definition when multi-arch. Are
+ incompatible.
+ * gdbarch.c (verify_gdbarch): Check call_dummy_stack_adjust.
+
+Wed Apr 21 14:45:44 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * gdbarch.c (gdbarch_update): Move dump-arch code from here.
+ (gdbarch_dump): To here. Make more robust.
+ * gdbarch.h (gdbarch_dump): Add prototype.
+
+ * gdbarch.c (enum set_arch): Declare.
+ (set_arch): Add type parameter. Only disable
+ ``target_architecture_auto'' when set_arch_manual.
+ (set_architecture, set_architecture_from_arch_mach,
+ set_architecture_from_file): Update.
+ (set_arch): When ``gdbarch_debug'', gdbarch_dump() the current
+ architecture.
+
+Wed Apr 21 10:48:53 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * frame.h (generic_pc_in_call_dummy): Make signature consistent
+ with other pc_in_call_dummy functions by adding SP parameter.
+ * blockframe.c (generic_pc_in_call_dummy): Update. Pass SP and
+ not FP to generic_find_dummy_frame().
+ * breakpoint.c (frame_in_dummy): Update.
+ * config/v850/tm-v850.h, config/tic80/tm-tic80.h,
+ config/sh/tm-sh.h, config/mn10300/tm-mn10300.h,
+ config/mn10200/tm-mn10200.h, config/m32r/tm-m32r.h,
+ config/h8300/tm-h8300.h, config/fr30/tm-fr30.h,
+ config/d10v/tm-d10v.h: Update PC_IN_CALL_DUMMY definition.
+
+Tue Apr 20 12:15:45 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * config/d10v/tm-d10v.h (GDB_TARGET_IS_D10V): Move from here.
+ * gdbarch.h (GDB_TARGET_IS_D10V): To here. Implement using
+ TARGET_ARCHITECTURE.
+ (D10V_MAKE_DADDR, D10V_MAKE_IADDR): Provide fatal default
+ definitions.
+
+ * valops.c (value_at): Replace #ifdef GDB_TARGET_IS_D10V code with
+ runtime test.
+ (value_fetch_lazy): Ditto.
+ * values.c (unpack_long): Ditto.
+ * printcmd.c (print_frame_args): Ditto.
+
+Sat Apr 17 15:39:33 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * gdbarch.h: Cleanup multi-arch comments.
+
+Fri Apr 16 15:39:10 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * gdbarch.h: Provide definition if GDB_MULTI_ARCH > 1 or
+ GDB_MULTI_ARCH > 0 and no previous definition.
+ * gdbarch.c (verify_gdbarch): Only verify a full multi-arch
+ target.
+
+1999-04-15 Stan Shebs <shebs@andros.cygnus.com>
+
+ * infrun.c (wait_for_inferior) [HAVE_STEPPABLE_WATCHPOINT,
+ HAVE_NONSTEPPABLE_WATCHPOINT, HAVE_CONTINUABLE_WATCHPOINT]: Test
+ at runtime instead of compile time.
+
+Thu Apr 15 15:15:07 1999 Andrew Cagney <cagney@amy.cygnus.com>
+
+ * mips-tdep.c (struct gdbarch_tdep): Rename elf_abi to
+ elf_flags. Check ABFD is elf_flavour before extracting elf_flags.
+ Match ARCH against entire elf_flags instead of just the
+ EF_MIPS_ABI field.
+ (mips_gdbarch_init): Extract/print ef_mips_arch and
+ ef_mips_bitptrs and ef_mips_abi fields from elf_flags.
+
+1999-04-14 Philippe De Muyter <phdm@macqel.be>
+
+ * breakpoint.c (maintenance_info_breakpoints): Function made
+ static to match previous prototype.
+
+ * coffread.c (coff_record_line): Static function removed.
+ (enter_linenos): Call `record_line' instead of `coff_record_line'.
+ (FILE-LEVEL, coff_start_symtab, coff_end_symtab): `coff_record_line'
+ -related stuff removed.
+ (coff_symfile_read): Redundant statement removed.
+ (coff_symtab_read): `record_line' is now called with the first line
+ number of each function, given by the ".bf" symbol. This solves
+ the line-number bug for one-line functions.
+
+Wed Apr 14 11:09:45 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * gdbarch.h (BELIEVE_PCC_PROMOTION_TYPE, BELIEVE_PCC_PROMOTION):
+ Add multi-arch definitions.
+ * gdbarch.c (gdbarch_believe_pcc_promotion,
+ gdbarch_believe_pcc_promotion_type): New functions.
+ (gdbarch_update): Update
+ (struct gdbarch default_gdbarch): Update.
+
+ * stabsread.c (BELIEVE_PCC_PROMOTION_TYPE): Provide default.
+ (define_symbol): Change #if BELIEVE_PCC_PROMOTION_TYPE and #if
+ BELIEVE_PCC_PROMOTION to if().
+
+1999-04-13 Jason Molenda (jsm@bugshack.cygnus.com)
+
+ * configure.in (HAVE_MULTIPLE_PROC_FDS): Don't define if we're
+ on a Solaris host (of any architecture).
+ * configure: Regenerated.
+
+Wed Apr 14 08:23:32 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * gdbarch.c (SET_GDBARCH, GET_GDBARCH, FSET_GDBARCH): New macros.
+ (gdbarch_byte_order, gdbarch_long_bit, gdbarch_long_long_bit,
+ gdbarch_ptr_bit, gdbarch_call_dummy_location,
+ gdbarch_call_dummy_address, gdbarch_call_dummy_address,
+ gdbarch_call_dummy_breakpoint_offset,
+ gdbarch_call_dummy_breakpoint_offset, gdbarch_call_dummy_length,
+ gdbarch_pc_in_call_dummy, dbarch_call_dummy_breakpoint_offset_p,
+ dbarch_call_dummy_p, dbarch_call_dummy_words,
+ dbarch_sizeof_call_dummy_words, dbarch_call_dummy_stack_adjust,
+ dbarch_call_dummy_stack_adjust_p): Define using new macros.
+
+1999-04-13 Jason Molenda (jsm@bugshack.cygnus.com)
+
+ * rom68k-rom.c (init_rom68k_cmds): Fix an accidental substitution
+ in monitor command strings, fix some formatting mistakes.
+
+1999-04-13 Stan Shebs <shebs@andros.cygnus.com>
+
+ * configure.tgt (arm-*-*): Whack another vestige of wingdb.
+
+1999-04-12 James Ingham <jingham@cygnus.com>
+
+ * arm-tdep.c (arm_pop_frame): don't clobber the previous frame's
+ stack pointer (stored in frame->framereg's register) BEFORE
+ reading it. This was causing "return" to behave very oddly.
+
+1999-04-12 Stan Shebs <shebs@andros.cygnus.com>
+
+ * NEWS: Mention tic80.
+
+1999-04-12 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * a68v-nat.c: Remove reference to 'extern char registers[]' throughout.
+ * altos-xdep.c: Ditto.
+ * arm-xdep.c: Ditto.
+ * convex-xdep.c: Ditto.
+ * cxux-nat.c: Ditto.
+ * hp300ux-nat.c: Ditto.
+ * hppab-nat.c: Ditto.
+ * i386aix-nat.c: Ditto.
+ * i386mach-nat.c: Ditto.
+ * m88k-nat.c: Ditto.
+ * ptx4-nat.c: Ditto.
+ * pyr-xdep.c: Ditto.
+ * rs6000-nat.c: Ditto.
+ * sun3-nat.c: Ditto.
+ * sun386-nat.c: Ditto.
+ * symm-nat.c: Ditto.
+ * umax-xdep.c: Ditto.
+ * i386v4-nat.c: Ditto. Also include inferior.h.
+ * m68k-tdep.c: Ditto. Also include inferior.h.
+
+Mon Apr 12 15:57:16 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * inferior.h (CALL_DUMMY_STACK_ADJUST, CALL_DUMMY_STACK_ADJUST_P):
+ Provide default definitions.
+ * valops.c (hand_function_call): Replace #ifdef
+ CALL_DUMMY_STACK_ADJUST with if (CALL_DUMMY_STACK_ADJUST_P).
+
+ * gdbarch.h (SIZEOF_CALL_DUMMY_STACK_ADJUST,
+ (SIZEOF_CALL_DUMMY_STACK_ADJUST_P): Define
+ * gdbarch.c (struct gdbarch): Add call_dummy_stack_adjust,
+ call_dummy_stack_adjust_p.
+ (gdbarch_call_dummy_stack_adjust,
+ set_gdbarch_call_dummy_stack_adjust,
+ gdbarch_call_dummy_stack_adjust_p,
+ set_gdbarch_call_dummy_stack_adjust_p): New functions.
+ (default_gdbarch): Update.
+
+1999-04-09 Jim Blandy <jimb@zwingli.cygnus.com>
+
+ * ax-gdb.c, ax-gdb.h, ax-general.c, ax.h: Remove RCS Id strings.
+ They're a pain.
+
+ * GDB 4.18 released.
+ * Makefile.in (VERSION): Bump to 4.18.1.
+
+Thu Apr 8 16:04:34 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * inferior.h (CALL_DUMMY_P, CALL_DUMMY_WORDS,
+ SIZEOF_CALL_DUMMY_WORDS): Define macros.
+ (PUSH_DUMMY_FRAME, FIX_CALL_DUMMY, STORE_STRUCT_RETURN): Provide
+ fatal default.
+
+ * inferior.h, gdbarch.c (call_dummy_words,
+ sizeof_call_dummy_words): Declare/Define variables.
+ * valops.c (value_arg_coerce, find_function_addr,
+ call_function_by_hand): Always define.
+ (hand_function_call): Rename CALL_DUMMY version of
+ call_function_by_hand. Make static. Add prototype.
+ (hand_function_call): Update. Allocate space for *dummy and
+ *dummy1 using alloca.
+ * breakpoint.c (frame_in_dummy): Update.
+
+ * gdbarch.h (CALL_DUMMY_P, CALL_DUMMY_WORDS,
+ SIZEOF_CALL_DUMMY_WORDS): Define.
+ * gdbarch.c (gdbarch_call_dummy_p, set_gdbarch_call_dummy_p,
+ gdbarch_call_dummy_words, set_gdbarch_call_dummy_words,
+ gdbarch_sizeof_call_dummy_words,
+ set_gdbarch_sizeof_call_dummy_words): New functions.
+ (gdbarch_alloc, verify_gdbarch, gdbarch_update, struct
+ default_gdbarch): Update.
+
+1999-04-08 Jason Molenda (jsm@bugshack.cygnus.com)
+
+ * monitor.c (monitor_read_memory): If a MO_GETMEM_NEEDS_RANGE
+ monitor, increase the end address by one byte.
+
+1999-04-08 Jason Molenda (jsm@bugshack.cygnus.com)
+
+ * dbug-rom.c (init_dbug_cmds): Fix strings in
+ dbug_cmds.{step,clr_break,clr_all_break,fill} to send correct
+ commands to the monitor.
+
+1999-04-08 Keith Seitz <keiths@cygnus.com>
+
+ * m32r-stub.c (branchDestination): Undo overly ambitious
+ sed script's conversion of cast from "char" to "unsigned char".
+ Return offset should now be properly computed.
+
+Thu Apr 8 14:13:19 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * inferior.h (CALL_DUMMY_BREAKPOINT_OFFSET_P): New macro.
+ Non-zero when CALL_DUMMY_BREAKPOINT_OFFSET is valid.
+
+ * infcmd.c (breakpoint_auto_delete_contents): Always define.
+ (run_stack_dummy): Update.
+ * infrun.c (wait_for_inferior): Update
+
+ * gdbarch.h (CALL_DUMMY_BREAKPOINT_OFFSET_P): New macro.
+ * gdbarch.c (set_gdbarch_call_dummy_breakpoint_offset_p,
+ gdbarch_call_dummy_breakpoint_offset_p): New functions.
+ (struct gdbarch, gdbarch_alloc, default_gdbarch, gdbarch_update):
+ Update.
+
+1999-04-07 Stan Shebs <shebs@andros.cygnus.com>
+
+ * MAINTAINERS: Mark Alexander can no longer maintain
+ h8300 and other embedded targets, sniff.
+
+1999-04-06 Stan Shebs <shebs@andros.cygnus.com>
+
+ * inftarg.c (child_wait): Initialize execd_pathname.
+ * target.c (debug_to_has_execd): Handle NULL execd_pathname.
+
+ * solib.c (clear_solib): Don't call disable_breakpoints_in_shlibs,
+ this breaks rerunning on sun4 native.
+
+1999-04-06 Jim Blandy <jimb@zwingli.cygnus.com>
+
+ * config/sparc/nm-linux.h: Don't redefine PT_ATTACH to use the
+ deprecated PTRACE_SUNATTACH compatibility commands. The
+ definitions from <sys/ptrace.h> are fine.
+
+1999-04-06 Martin Hunt <hunt@cygnus.com>
+
+ * annotate.h: Declare annotate_signal_hook.
+
+ * annotate.c (annotate_signal): Add a call to
+ annotate_signal_hook().
+
+1999-04-06 Jim Blandy <jimb@zwingli.cygnus.com>
+
+ * dwarf2read.c (dwarf_decode_lines): Don't call record_line when
+ we hit a DW_LNE_end_sequence instruction.
+
+ * README: Note that GDB requires an ANSI C compiler, and explain
+ how to get GCC.
+
+ * README: Update.
+
+1999-04-05 Stan Shebs <shebs@andros.cygnus.com>
+
+ * NEWS: Add more notes about user-visible changes.
+
+Mon Apr 5 14:56:59 1999 Michael Snyder <msnyder@cleaver.cygnus.com>
+
+ * target.c (target_signal_to_string): check for signal
+ number in range; otherwise if the target board returns
+ a bogus signal number we might core dump (per David Taylor).
+
+1999-04-05 David Taylor <taylor@ryobi.cygnus.com>
+
+ * utils.c (fputs_maybe_filtered): test value of
+ pagination_enabled before paginating.
+
+1999-04-02 James Ingham <jingham@cygnus.com>
+
+ * blockframe.c (get_prev_frame): Remove the redundant
+ get_prev_frame_info. It is now exactly the same as
+ get_prev_frame, so there is no reason to have both functions.
+
+ * rs6000-tdep.c (rs6000_init_extra_frame_info):
+ frame.h:
+ a29k-tdep.c (init_extra_frame_info):
+ config/a29k/tm-a29k.h:
+ i386-tdep.c:
+ Change all references to get_prev_frame_info to get_prev_frame.
+
+1999-04-02 Stan Shebs <shebs@andros.cygnus.com>
+
+ * bcache.c, bcache.h, breakpoint.c, defs.h, expprint.c,
+ expression.h, gdbarch.c, gdbtypes.c, gdbtypes.h, gnu-nat.c,
+ gnu-nat.h, hppa-tdep.c, maint.c, monitor.c, objfiles.h, parse.c,
+ remote-mips.c, remote-sds.c, remote.c, sol-thread.c, symmisc.c,
+ symtab.h, target.c, top.c, typeprint.c, config/nm-gnu.h: Evaporate
+ the unused MAINTENANCE_CMDS conditional.
+
+1999-04-02 James Ingham <jingham@cygnus.com>
+
+ * config/arm/tm-arm.h: (EXTRACT_STRUCT_VALUE_ADDRESS): This needs
+ to call extract_address, not just cast the first 4 bytes, since
+ the result will be passed to value_at which expects host-byte
+ order.
+
+ * arm-tdep.c (arm_scan_prologue): The prologue_start address was
+ directly &'ed with 0x03fffffc, rather than using
+ ADDR_BITS_REMOVE. This would cause inferior function calls to
+ report the stack incorrectly on return.
+
+
+1999-04-02 Keith Seitz <keiths@cygnus.com>
+
+ * top.c (ui_loop_hook): Change declaration. Now returns an int.
+ * win32-nat.c (child_wait): Timeout WaitForDebugEvent and call
+ the ui_loop_hook if there was no debug event.
+ * top.c (ui_loop_hook): Change to return an int and include
+ on all non-Cygwin builds.
+ * v850ice.c: Change prototype of ui_loop_hook.
+ (v850ice_wait): Update call to ui_loop_hook.
+ * ser-unix.c (hardwire_readchar): Enable ui_loop_hook callbacks
+ for non-Cygwin builds. Check return status of ui_loop_hook and
+ return a timeout if told to detach. Add more documentation.
+ * ser-tcp.c (tcp_readchar): Break up timeouts into one second
+ intervals and call ui_loop_hook so that other UIs can
+ keep up to date. If ui_loop_hook returns non-zero, then
+ return SERIAL_TIMEOUT to facilitate detaching from the
+ target.
+ * remote.c (remote_interrupted_already): Remove.
+ (remote_interrupt_twice): Revive.
+ (remote_interrupt): Call remote_stop to interrupt the target
+ and install remote_interrupt_twice to take more severe
+ actions if this fails.
+ (remote_stop): Only attempt to stop the target. This separates
+ the command line from other UIs.
+ * remote-sim.c (gdb_os_poll_quit): Add a call to ui_loop_hook,
+ if it is defined.
+
+1999-04-01 Jim Blandy <jimb@zwingli.cygnus.com>
+
+ Fix for cross-debugging on an AIX host from Johanna Svenningsson:
+ * ax-gdb.h (enum axs_lvalue_kind): Remove trailing comma from enum.
+ * ax.h (enum agent_op): Same.
+ * tracepoint.h (enum actionline_type): Same.
+ * config/xm-aix4.h: Add declaration for termdef.
+
+1999-03-31 Stan Shebs <shebs@andros.cygnus.com>
+
+ * jv-lang.h (dynamics_objfile): Remove decl, conflicts with static
+ decl in jv-lang.c.
+
+ * infrun.c (follow_inferior_fork): Add ifdefs around
+ SOLIB_REMOVE_INFERIOR_HOOK.
+
+Wed Mar 31 11:39:49 1999 David Taylor <taylor@ryobi.cygnus.com>
+
+ * valops.c (search_struct_field): revert HP merge change
+ to this function -- it causes messages to be printed about
+ member class ambiguity when the compiler is happy.
+ (search_struct_field_aux): delete -- added as part of HP merge
+ change; with aforementioned change it is no longer called.
+
+1999-03-30 Stan Shebs <shebs@andros.cygnus.com>
+
+ Make more HPUX-specific code generic.
+ * infrun.c: Include top.h.
+ (MAY_SWITCH_FROM_INFERIOR_PID, MAY_FOLLOW_EXEC,
+ USE_THREAD_STEP_NEEDED): New native macros.
+ (may_switch_from_inferior_pid, may_follow_exec,
+ use_thread_step_needed): New globals.
+ (follow_inferior_fork): Remove HPUXHPPA ifdef.
+ (follow_exec): Ditto, also save run target and re-push instead of
+ always pushing child_ops, add ifdefs around SOLIB_RESTART and
+ SOLIB_CREATE_INFERIOR_HOOK.
+ (wait_for_inferior): Use new globals instead of ifdefing HPUXHPPA,
+ always use printf_filtered to report new threads.
+ (normal_stop): Ditto.
+ * target.h, target.c (find_run_target): New function.
+ * config/pa/nm-hppah.h: Define new macros.
+
+1999-03-29 Stan Shebs <shebs@andros.cygnus.com>
+
+ * top.h: Include setjmp.h here.
+ * main.c, top.c: Don't include it here.
+
+1999-03-29 Keith Seitz <keiths@cygnus.com>
+
+ * symtab.c (decode_line_1): Take out change which breaks symbols
+ which include class names and methods, e.g., "Foo::bar".
+
+1999-03-26 Stan Shebs <shebs@andros.cygnus.com>
+
+ * configure.tgt (i[3456]86-*-sysv4.2MP, i[3456]86-*-sysv4.2uw2*):
+ Recognize both, as i[3456]86-*-sysv4.2*.
+ (i[3456]86-*-sysv5*): Recognize.
+
+ * infrun.c (wait_for_inferior): Remove most #if 0 segments.
+
+Fri Mar 26 17:27:27 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * blockframe.c (pc_in_call_dummy_on_stack): Fix. Had copied code
+ from at_entry_point.
+
+Thu Mar 25 19:30:02 1999 Andrew Cagney <cagney@amy.cygnus.com>
+
+ * gdbarch.c: Include all headers.
+ (struct gdbarch), gdbarch.h (CALL_DUMMY_LOCATION,
+ CALL_DUMMY_ADDRESS, CALL_DUMMY_START_OFFSET,
+ CALL_DUMMY_BREAKPOINT_OFFSET, CALL_DUMMY_LENGTH,
+ PC_IN_CALL_DUMMY): Add ``call_dummy_location'',
+ ``call_dummy_length'', ``pc_in_call_dummy'',
+ ``call_dummy_start_offset'', ``call_dummy_breakpoint_offset'' to
+ multi-arch framework.
+
+ * inferior.h, blockframe.c (pc_in_call_dummy_before_text_end,
+ pc_in_call_dummy_after_text_end, pc_in_call_dummy_on_stack,
+ pc_in_call_dummy_at_entry_point): Convert PC_IN_CALL_DUMMY macro's
+ into functions.
+
+ * mips-tdep.c (mips_gdbarch_init): Initialize above
+
+Tue Mar 23 17:22:57 1999 Philippe De Muyter <phdm@macqel.be>
+
+ * remote.c, parse.c: Include ctype.h.
+
+1999-03-24 Stan Shebs <shebs@andros.cygnus.com>
+
+ * configure.host (mips-dec-mach3*): Use mipsm3 not mach3.
+
+ Attempt to sort out SCO-related configs.
+ * configure.host (i[3456]86-*-sysv4.2*): Use instead of
+ i[3456]86-*-sysv4.2MP and i[3456]86-*-sysv4.2uw2*.
+ (i[3456]86-*-sysv5*): Recognize.
+ * configure.tgt (i[3456]86-*-sco3.2v5*, i[3456]86-*-sco3.2v4*):
+ Recognize.
+
+Wed Mar 24 16:19:01 1999 Christopher Faylor <cgf@cygnus.com>
+
+ * MAINTAINERS: Add DJ Delorie (dj@cygnus.com) as the djgpp
+ maintainer.
+
+Wed Mar 24 21:19:57 1999 Andrew Cagney <cagney@amy.cygnus.com>
+
+ * target.h (enum target_signal): Do not hardwire values of MACH
+ signals.
+
+1999-03-14 Ken Raeburn <raeburn@raeburn.org>
+
+ * target.h (enum target_signal): Add TARGET_SIGNAL_INFO.
+ * target.c (signals): Add SIGINFO description.
+ (target_signal_from_host, target_signal_to_host): Translate
+ SIGINFO to/from TARGET_SIGNAL_INFO.
+
+Wed Mar 24 01:01:27 1999 Andrew Cagney <cagney@sludge.cygnus.com>
+
+ * rs6000-tdep.c (rs6000_software_single_step): Change SIGNAL to
+ unsigned int.
+
+ From Rodney Brown <rodneybrown@pmsc.com>
+ * target.h (enum thread_control_capabilities), breakpoint.h (enum
+ bptype), breakpoint.c (enum insertion_state_t): Strict ISO-C
+ doesn't allow trailing comma in enum definition.
+
+Mon Mar 22 15:56:04 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * blockframe.c (inside_entry_file, inside_entry_func): Convert #if
+ CALL_DUMMY_LOCATION to if.
+ * valops.c (call_function_by_hand): Ditto.
+ * infcmd.c (run_stack_dummy): Ditto.
+ * inferior.h (CALL_DUMMY_ADDRESS, CALL_DUMMY_START_OFFSET,
+ CALL_DUMMY_BREAKPOINT_OFFSET): Provide default.
+
+1999-03-23 Jason Molenda (jsm@bugshack.cygnus.com)
+
+ * hppa-tdep.c (pa_register_look_aside): Remove CPU_HPPA_RISC_20
+ check, test for presence of struct save_state_t and the ss_wide
+ member directly.
+ * configure.in: Remove CPU_HPPA_RISC_20 test. Add tests for
+ HAVE_STRUCT_SAVE_STATE_T and HAVE_STRUCT_MEMBER_SS_WIDE.
+ * acconfig.h: Add HAVE_STRUCT_SAVE_STATE_T HAVE_STRUCT_MEMBER_SS_WIDE.
+ * configure, config.in: Regenerated.
+
+Mon Mar 22 13:25:13 1999 Michael Snyder <msnyder@cleaver.cygnus.com>
+
+ * infttrace.c (proc_wait): rename to ptrace_wait.
+
+1999-03-18 Jim Blandy <jimb@zwingli.cygnus.com>
+
+ * dwarf2read.c: Correctly recognize location expressions that
+ designate LOC_REF_ARG arguments. Doc fixes.
+ (isderef): New global. (Yuck.)
+ (dwarf2_complex_location_expr): New complaint.
+ (read_func_scope): Reject frame_base attributes that use the
+ `deref' opcode as too complex.
+ (new_symbol): If both regoff and isderef are set, and the base
+ register is the frame pointer, then it's a LOC_REF_ARG argument.
+ (decode_locdesc): Recognize the `deref' opcode in location
+ expressions. Complain if it's not the last op in the expression.
+
+ * config/fr30/tm-fr30.h (COERCE_FLOAT_TO_DOUBLE): #define this to
+ be true, or else value_arg_coere won't respect the (accurate)
+ information we have about whether a function is prototyped.
+
+1999-03-17 Jim Blandy <jimb@zwingli.cygnus.com>
+
+ * config/fr30/tm-fr30.h (STACK_ALIGN): Define this here, so
+ calling functions by hand with odd-sized arguments doesn't munge
+ the stack.
+
+1999-03-17 Jason Molenda (jsm@bugshack.cygnus.com)
+
+ * configure.in (HAVE_MULTIPLE_PROC_FDS): Don't define for Solaris
+ hosts--gdb doesn't support this yet.
+ * configure: Regenerated.
+
+1999-03-16 Keith Seitz <keiths@cygnus.com>
+
+ * remote.c (remote_binary_checked): New file global.
+ (check_binary_download): New function to check if
+ stub supports binary downloading that works with
+ stubs that are not eight bit clean.
+ (remote_write_bytes): Check for binary download capability
+ and use it if available.
+ Remove references to global remote_binary_length. What a hack.
+ (putpkt_binary): New function.
+ (putpkt): Call putpkt_binary.
+ Use xor to escape trouble characters.
+ * m32r-stub.c (bin2mem): Follow escape char convention change.
+
+Tue Mar 16 01:11:33 1999 Andrew Cagney <cagney@rhino.cygnus.com>
+
+ * target.h (struct target_ops), target.c (debug_to_query),
+ remote.c (pack_hex_byte, remote_query): Promote char parameters to
+ int. Stops compile problems with pedantic ISO-C compilers.
+
+Tue Mar 16 15:29:04 1999 Stan Shebs <shebs@andros.cygnus.com>
+
+ * go32-xdep.c: Remove, no longer used by anything.
+ * Makefile.in: Remove references.
+
+ * jv-lang.c, jv-lang.h (java_primitive_type): Declare argument
+ as int instead of char.
+
+Mon Mar 15 11:42:43 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * d10v-tdep.c (push_stack_item, pop_stack_item): New function.
+ (d10v_push_arguments): Use.
+
+ From Martin M. Hunt <hunt@cygnus.com>:
+ * d10v-tdep.c (d10v_push_arguments): When arguments
+ must be pushed onto the stack, they go on in
+ reverse order.
+
+1999-03-16 Jim Blandy <jimb@zwingli.cygnus.com>
+
+ * symtab.c (make_symbol_overload_list): Don't try to stuff minimal
+ or partial symbols into the overload list; we don't know their
+ types. (Thanks to Rajiv Mirani.)
+
+1999-03-15 Jason Molenda (jsm@bugshack.cygnus.com)
+
+ * acinclude.m4 (--with-itclconfig, --with-itkconfig, --with-tixconfig):
+ Fix whitespace so --help messages line up.
+ * configure.in (--with-cpu): Fix capitalization for --help messages.
+ * configure, aclocal.m4: Regenerated.
+
+Mon Mar 15 11:39:03 1999 Ian Carmichael <iancarm@cygnus.com>
+
+ Support building gdb w/o simulator:
+ * configure.in: Support --disable-sim. Check for sim directory.
+ * Makefile.in (IGNORE_SIM, IGNORE_SIM_OBS): New.
+ * acconfig.h (WITH_SIM): Define.
+ * configure, config.in: Regenerate.
+
+Mon Mar 15 08:01:33 1999 Elena Zannoni <ezannoni@cygnus.com>
+
+ Patch from Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
+
+ * top.c (read_command_lines): Reset control_level to 0.
+ (define_command): Don't do it here.
+
+Sun Mar 14 16:12:15 1999 Andrew Cagney <cagney@rhino.cygnus.com>
+
+ * hppah-nat.c (store_inferior_registers): Delete extern
+ registers[] declaration.
+
+Sun Mar 14 19:17:30 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * infrun.c (write_inferior_status_register): New function. Provide
+ update access to an inf_status register buffer. Only used by HP.
+ * inferior.h (write_inferior_status_register): Add prototype.
+
+ * hppa-tdep.c (push_dummy_frame): Use
+ write_inferior_status_register when hacking around a sleeping
+ inferior. Accidently fix byte-order problem.
+
+Sun Mar 14 16:40:10 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * config/pa/tm-hppa.h (PUSH_DUMMY_FRAME): Fix parameter. Address
+ not needed.
+
+Fri Mar 12 13:11:48 1999 Michael Snyder <msnyder@cleaver.cygnus.com>
+
+ * remote.c (remote_write_bytes): fix 'X' packet protocol so that it
+ can't overwrite the end of its buffer with escaped characters.
+
+1999-03-12 Jim Blandy <jimb@zwingli.cygnus.com>
+
+ Alpha patches from Richard Henderson:
+
+ * alpha-tdep.c (alpha_skip_prologue): Recognize subq.
+
+ * config/alpha/tm-alpha.h (REGISTER_NAMES): No f31, but fpcr.
+ (FPCR_REGNUM): New.
+ (REGISTER_CONVERTIBLE): Don't convert fpcr.
+ (REGISTER_VIRTUAL_TYPE): Don't make fpcr a double.
+
+ * stabsread.c (define_symbol): Only consider live range extension
+ if we have an open parenthesis.
+
+1999-03-11 Jim Blandy <jimb@zwingli.cygnus.com>
+
+ * monitor.c (monitor_fetch_register): Print RDEBUG info correctly
+ when the register name is null.
+
+Thu Mar 11 19:33:07 1999 Stan Shebs <shebs@andros.cygnus.com>
+
+ * infrun.c (wait_for_inferior): Change #if DECR_PC_AFTER_BREAK
+ uses to expressions, remove redundant extern decls.
+
+Thu Mar 11 18:05:11 1999 Michael Snyder <msnyder@cleaver.cygnus.com>
+
+ * infptrace.c (proc_wait): Rename to ptrace_wait.
+ * inftarg.c (child_wait): call ptrace_wait instead of proc_wait.
+ * inferior.h: Declare ptrace_wait instead of proc_wait.
+
+Thu Mar 11 11:46:25 1999 Andrew Cagney <cagney@amy.cygnus.com>
+
+ * breakpoint.c (create_solib_load_unload_event_breakpoint,
+ create_fork_vfork_event_catchpoint, tcatch_command,
+ create_exception_catchpoint, break_at_finish_at_depth_command_1,
+ catch_fork_command_1, ep_skip_leading_whitespace,
+ break_at_finish_command_1, catch_exec_command_1,
+ catch_exception_command_1, stop_command, stopin_command,
+ stopat_command, ep_parse_optional_filename,
+ ep_find_event_name_end, ep_parse_optional_if_clause,
+ catch_fork_command_1), stack.c (show_and_print_stack_frame_stub,
+ print_stack_frame_stub, print_only_stack_frame_stub,
+ backtrace_command_1, backtrace_full_command, func_command),
+ valprint.c (print_decimal), source.c (print_source_lines_base):
+ Add prototype.
+
+ * stack.c (print_stack_frame_stub, show_and_print_stack_frame_stub,
+ print_only_stack_frame_stub): Make param void*.
+
+Wed Mar 10 19:33:28 1999 Geoffrey Noer <noer@cygnus.com>
+
+ * win32-nat.c: If old Cygwin Win32 API headers aren't being used,
+ define some gdb-specific defines that shouldn't have been in the
+ global headers.
+
+Wed Mar 10 21:20:25 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * findvar.c (registers, register_valid): Replace array with pointer.
+ (build_findvar): New function. Allocate space for REGISTERS and
+ REGISTER_VALID.
+ (_initialize_findvar): Call build_findvar.
+ (_initialize_findvar): Register REGISTERS and REGISTER_VALID as
+ arch dependant.
+
+ * inferior.h (registers, register_valid): Replace array with
+ pointer.
+
+ * inferior.h (struct inferior_status): Move definition from here.
+
+ * infrun.c (struct inferior_status): To here.
+ (struct inferior_status): Change ``stop_registers'' and
+ ``registers'' to pointers.
+ (xmalloc_inferior_status, free_inferior_status): New functions.
+ (restore_inferior_status): Call free_inferior_status.
+ (save_inferior_status): Call xmalloc_inferior_status.
+ (discard_inferior_status): New function, discard inf_status
+ buffer. Call free_inferior_status.
+
+ * inferior.h (stop_registers): Replace array with pointer.
+ * infrun.c (stop_registers): Update.
+ (build_infrun): Initialize stop_registers.
+ (_initialize_infrun): Call build_infrun.
+ (_initialize_infrun): Register ``stop_registers'' as arch dependant.
+
+Wed Mar 10 14:50:42 1999 Andrew Cagney <cagney@amy.cygnus.com>
+
+ * alpha-tdep.c (alpha_linux_sigtramp_offset): Only compile when
+ LINUXALPHA target. Hack.
+
+ * infrun.c (set_follow_fork_mode_command): Make static. Add
+ prototype.
+ * tracepoint.c (add_register): Ditto.
+ * valprint.c (strcat_longest): Comment out. Does not appear to be
+ used.
+ * valops.c (find_method_list): Make static. Add prototype.
+ * thread.c (target_find_new_threads): Make static. Add prototype.
+ * stack.c (stack_publish_stopped_with_no_frame,
+ select_and_maybe_print_frame): Comment out. Does not appear to be
+ used.
+ (current_frame_command): Add prototype.
+ * breakpoint.c (break_at_finish_command,
+ break_at_finish_at_depth_command, tbreak_at_finish_command): Make
+ static. Add prototype.
+ * findvar.c (read_relative_register_raw_bytes_for_frame): Ditto.
+
+Wed Mar 10 23:38:54 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * corefile.c (registers): Delete redundant variable declaration.
+ * inferior.h (run_stack_dummy): Change array argument to pointer.
+ * infcmd.c (run_stack_dummy): Update.
+ * value.h (value_being_returned): Change RETBUF to a pointer.
+ * values.c (value_being_returned): Update.
+
+Wed Mar 10 11:08:16 1999 Andrew Cagney <cagney@amy.cygnus.com>
+
+ * source.c (list_command): GCC suggested explicit braces to avoid
+ ambiguous `else'.
+
+ * jv-typeprint.c: Include "c-lang.h".
+ * Makefile.in (jv-typeprint.o): Add dependency.
+ * jv-valprint.c: Include "gdbcore.h", "annotate.h".
+ * Makefile.in (jv-valprint.o): Add dependencies.
+ * objfiles.c: Include "breakpoint.h".
+ * Makefile.in (objfiles.o): Add dependency.
+ * main.c: Include <unistd.h>.
+ * parse.c: Include <ctype.h>.
+ * remote.c: Include <ctype.h>.
+ * ser-tcp.c: Include <unistd.h>.
+ * ax-general.c: Include "value.h".
+ * Makefile.in (ax-general.o): Add dependency.
+
+ * alpha-tdep.c (alpha_push_arguments): Make ``i'' an int instead
+ of a register.
+ * frame.h (show_and_print_stack_frame): Add function prototype.
+ * language.h (language_enum): Add function prototype.
+ * value.h (find_overload_match): Add function prototype.
+
+ * defs.h, utils.c (subset_compare): Rename subsetCompare. Add
+ prototype.
+ * stack.c (backtrace_command): Update.
+
+Wed Mar 10 13:58:36 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * configure.in (AC_CHECK_HEADERS): Check for <sys/select.h>
+ * configure, config.in: Re-generate.
+ * inflow.c: Conditionally include <sys/select.h>.
+
+Wed Mar 10 13:44:38 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * frame.h (struct dummy_frame): Move from here.
+ * blockframe.c (struct dummy_frame): To here.
+
+ * blockframe.c (struct dummy_frame): Replace ``regs'' with pointer
+ ``registers''.
+ (generic_pop_dummy_frame): Free it.
+ (generic_push_dummy_frame): Allocate dummy frame register buffer.
+
+Wed Mar 10 11:08:16 1999 Andrew Cagney <cagney@amy.cygnus.com>
+
+ * thread.c (_initialize_thread): Delete redundant ``extern struct
+ cmd_list_element *cmdlist''.
+ * printcmd.c (print_command_1): Ditto for ``objectprint'';
+
+1999-03-09 Stan Shebs <shebs@andros.cygnus.com>
+
+ * MAINTAINERS: New file, list of maintainers and areas they
+ maintain.
+
+1999-03-09 Rodney Brown <RodneyBrown@pmsc.com>
+
+ Get working on UnixWare 2.1.1.
+ * acconfig.h: Update for defines for procfs.c.
+ * configure.in: Identify defines for procfs.c.
+ * configure.host: i386-*-sysv4.2uw2* => i386v42mp
+ * configure.tgt: i386-*-sysv4.2uw2* => i386v42mp
+ * configure, config.in: Regenerate.
+ * procfs.c: Rename HAVE_NO_PRRUN_T to HAVE_PRRUN_T (autoconf
+ standard), wrap UNIXWARE difference in THE_PR_LWP macro for
+ legibility.
+ * config/i386/tm-i386v42mp.h: Remove HAVE_PSTATUS_T,
+ HAVE_NO_PRRUN_T; now set by configure.
+
+Tue Mar 9 16:29:24 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * i386-tdep.c (gdb_print_insn_i386): Abort when disassembly_flavor
+ undefined..
+
+ * fr30-tdep.c (_initialize_fr30_tdep): Add prototype. Fix
+ coding style.
+
+ * target.c (debug_to_enable_exception_callback,
+ debug_to_get_current_exception_event): Return result of call to
+ debug_target().
+
+1999-03-09 Jim Blandy <jimb@zwingli.cygnus.com>
+
+ Another HURD fix from Mark Kettenis:
+ * gnu-nat.c: Include <string.h>. Remove declaration of strerror.
+ Include <bits/waitflags.h> instead of <waitflags.h> and define
+ _SYS_WAIT_H to prevent the warning that we should not include it.
+ (gnu_create_inferior): Change return type of attach_to_child to
+ void. Do not return INFERIOR_PID.
+ (gnu_pid_to_exec_file): Change return type to char *.
+ Return NULL.
+
+ Fix for the HURD from Mark Kettenis:
+ * configure.in: Add AC_PROG_AWK. Needed by the machine-dependent
+ makefile fragments for the Hurd.
+ * Makefile.in (AWK): Add. Set by configure.
+ * configure: Regenerated.
+
+1999-03-08 Jason Molenda (jsm@bugshack.cygnus.com)
+
+ * infttrace.c (hppa_get_process_events): Removed. Function only
+ usable on HPUX 10 and above. It is not called by any other part
+ of GDB.
+ * hppah-nat.c (hppa_get_process_events): Ditto.
+ (child_pid_to_exec_file): Only call ptrace with
+ PT_GET_PROCESS_PATHNAME if that symbol has been defined.
+ * config/pa/nm-hppah.h: Don't set up prototypes et al for
+ hppa_get_process_events.
+
+ * config/pa/hppahpux.mh (TERM_LIB): Do not initialize, let autoconf
+ determine best library automatically.
+ * config/pa/hpux1020.mh: Ditto.
+ * config/pa/hpux1100.mh: Ditto.
+ * configure.in (TERM_LIB): Also check for libHcurses.
+ * configure: Regenerated.
+
+Thu Mar 4 17:16:04 1999 Michael Snyder <msnyder@cleaver.cygnus.com>
+
+ * m32r-stub.c: add support for crc "Compare" command.
+
+1999-03-04 Jim Blandy <jimb@zwingli.cygnus.com>
+
+ * fr30-tdep.c (fr30_store_return_value): Allocate zeroes
+ dynamically, to save BSS space, and to remove assumptions about
+ the size of the largest value we'll return.
+
+ * config/fr30/tm-fr30.h (fr30_store_return_value): Use PARAMS in
+ prototype.
+
+Thu Mar 4 08:37:35 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * sh3-rom.c (sh3_supply_register, sh3_supply_register),
+ mips-tdep.c (mips_push_arguments), m32r-rom.c
+ (m32r_upload_command), m32r-tdep.c (decode_prologue), monitor.c
+ (longlong_hexchars), tracepoint.c (validate_actionline,
+ read_actions), mdebugread.c
+ (parse_symbol), jv-typeprint.c
+ (java_type_print_base, java_type_print_base), mdebugread.c
+ (parse_symbol), top.c (source_command), utils.c
+ (floatformat_to_doublest): GCC suggest explicit braces to avoid
+ ambiguous `else'.
+
+ * tracepoint.c (map_args_over_tracepoints, trace_actions_command),
+ m32r-rom.c (m32r_supply_register), win32-nat.c
+ (handle_output_debug_string, child_continue), i960-tdep.c
+ (pop_frame), m32r-rom.c (m32r_upload_command): GCC suggested
+ parentheses around assignment used as truth value.
+
+ * remote-sds.c (sds_wait), monitor.c (monitor_fetch_register),
+ ser-e7kpc.c, (dosasync_write), arc-tdep.c (arc_get_frame_setup):
+ GCC suggested parentheses around operands.
+
+ * c-typeprint.c (c_type_print_base): GCC suggested enclosing
+ "while" expression in paren.
+
+Wed Mar 3 18:14:33 1999 Andrew Cagney <cagney@chook.cygnus.com>
+
+ * sol-thread.c (save_inferior_pid): Cast the saved pid to void*.
+ (restore_inferior_pid): Takes void* as required by make_cleanup.
+ Casts pid back to an int.
+
+ * procfs.c (make_cleanup_close_proc_file,
+ close_proc_file_cleanup): Create a proc_file cleanup.
+ (info_proc): Use.
+
+ * defs.h (make_cleanup_freeargv): Helper function. Establish
+ cleanup using freeargv. Can not just typecast/pass freeargv as it
+ violates ISO-C.
+ * utils.c (do_freeargv): Helper.
+ (make_cleanup_freeargv): New function.
+
+ * symmisc.c (maintenance_print_symbols,
+ maintenance_print_psymbols, maintenance_print_msymbols), symfile.c
+ (symbol_file_command), stack.c (backtrace_command), remote-sim.c
+ (gdbsim_create_inferior, gdbsim_open), remote-mips.c
+ (common_open), procfs.c (info_proc), infrun.c (handle_command,
+ xdb_handle_command), exec.c (exec_file_attach): Call
+ make_cleanup_freeargv.
+
+1999-03-03 James Ingham <jingham@cygnus.com>
+
+ * i386-tdep.c (_initialize_i386_tdep): Set the inital value for
+ disassembly flavor at startup, rather than hardcoding it.
+
+1999-03-03 Jim Blandy <jimb@zwingli.cygnus.com>
+
+ Put return values in the right place.
+ * fr30-tdep.c (fr30_store_return_value): New function.
+ * config/fr30/tm-fr30.h (STORE_RETURN_VALUE): Call
+ fr30_store_return_value.
+
+Wed Mar 3 18:10:55 1999 Andrew Cagney <cagney@chook.cygnus.com>
+
+ * gdbtypes.c (virtual_base_list_aux): Return void. Add prototype.
+
+ * breakpoint.c (map_catch_names): Comment out unused function.
+
+1999-03-02 Jason Molenda (jsm@bugshack.cygnus.com)
+
+ * hppa-tdep.c (pa_register_look_aside): Only refer to save_state_t
+ structure on PA 2.0 systems.
+
+1999-03-02 Stan Shebs <shebs@andros.cygnus.com>
+
+ From Gary Thomas <gthomas@cygnus.co.uk>:
+ * arm-tdep.c (ARM_LE_BREAKPOINT, ARM_BE_BREAKPOINT,
+ THUMB_LE_BREAKPOINT, THUMB_BE_BREAKPOINT): Use illegal instruction
+ instead of SWI 24.
+ * config/arm/tm-arm.h (CALL_DUMMY): Ditto.
+ (IN_SIGTRAMP): Define.
+
+1999-03-02 Nick Clifton <nickc@cygnus.com>
+
+ * findvar.c (store_address): Delete incorrect big endian
+ code.
+
+Tue Mar 2 18:02:42 1999 Andrew Cagney <cagney@chook>
+
+ * configure.in (gdb_cv_os_cygwin): Compat. Continue to reconize
+ __CYGWIN32__.
+
+1999-03-01 Jason Molenda (jsm@bugshack.cygnus.com)
+
+ * configure.in: Move setting of gdb_cv_os_cygwin to before
+ setting of TERM_LIB. Check for __CYGWIN__ instead of __CYGWIN32__.
+ * configure: Regenerated.
+
+1999-03-01 DJ Delorie <dj@cygnus.com>
+
+ * configure.in: Change -cygwin32* to -cygwin*.
+ * configure: Ditto.
+
+1999-02-25 Stan Shebs <shebs@andros.cygnus.com>
+
+ * breakpoint.c (SOLIB_LOADED_LIBRARY_PATHNAME,
+ SOLIB_UNLOADED_LIBRARY_PATHNAME, SOLIB_CREATE_CATCH_LOAD_HOOK,
+ SOLIB_CREATE_CATCH_UNLOAD_HOOK): Supply default definitions.
+ * infrun.c (SOLIB_IN_DYNAMIC_LINKER): Ditto.
+
+1999-02-25 Keith Seitz <keiths@cygnus.com>
+
+ * corelow.c (core_close): Clear out solib state before
+ closing the bfd associated with the core file.
+ * solib.c (clear_solib): Mention that clear_solib requires
+ an open BFD in order for disable_breakpoints_in_shlibs to
+ determine whether breakpoints live in shared libraries.
+
+1999-02-24 Jason Molenda (jsm@bugshack.cygnus.com)
+
+ * configure.in: Set CPU_HPPA_RISC_20 if the host CPU is a PA 2.0
+ processor.
+ * acconfig.h: Add CPU_HPPA_RISC_20
+ * config.in, configure: Regenerated.
+ * hppa-tdep.c (pa_register_look_aside): Only refer to new
+ structure elements if we are on a PA2.0 system.
+ * defs.h: Include limits.h.
+
+Tue Feb 23 14:37:08 1999 Michael Snyder <msnyder@cleaver.cygnus.com>
+
+ * infrun.c (wait_for_inferior): Check scheduler_locking state
+ before resuming after a thread-specific breakpoint.
+
+1999-02-23 Jim Blandy <jimb@zwingli.cygnus.com>
+
+ * aclocal.m4, config.in, configure: Regenerated with latest
+ autotools.
+
+Mon Feb 22 12:32:19 1999 Per Bothner <bothner@cygnus.com>
+
+ * jv-valprint.c (java_val_print): Restore line that somehow got lost.
+
+ * jv-valprint.c (java_print_value_fields): Check for NULL type.
+
+1999-02-21 Jim Blandy <jimb@zwingli.cygnus.com>
+
+ * tm-h8500.h, i386lynx-nat.c: Removed. These files are long
+ dead; it seems that they only appeared due to some CVS weirdness.
+ If they appear again, we may need to distribute garlic and holy
+ water.
+
+1999-02-19 Jason Molenda (jsm@bugshack.cygnus.com)
+
+ * configure.in (TERM_LIB): Move checking for TERM_LIB, substituting.
+ * configure: Regenerated.
+
+1999-02-19 Robert Hoehne (robert.hoehne@gmx.net)
+
+ * configure.host (i[3456]86-*-msdosdjgpp*): New host.
+ * configure.tgt (i[3456]86-*-msdosdjgpp*): New target.
+ * go32-nat.c: New file, native DJGPP support.
+ * config/i386/go32.mh: Rewrite for DJGPP (go32) host.
+ * config/i386/go32.mt: New file, DJGPP (go32) target.
+ * config/i386/nm-go32.h: New file.
+ * config/i386/tm-go32.h: New file.
+ * config/i386/xm-go32.h: Rewritten for current DJGPP.
+
+1999-02-18 Jason Molenda (jsm@bugshack.cygnus.com)
+
+ * reply_mig_hack.awk, config/nm-gnu.h, config/alpha/nm-linux.h
+ config/alpha/xm-alphalinux.h, config/alpha/xm-alphaosf.h
+ config/i386/nm-i386sco5.h, config/i386/tm-fbsd.h, config/i386/tm-i386.h
+ config/powerpc/nm-aix.h, config/powerpc/tm-macos.h
+ config/powerpc/tm-ppc-aix.h, config/powerpc/xm-aix.h
+ config/rs6000/tm-rs6000-aix4.h, testsuite/gdb.chill/tests1.ch
+ testsuite/gdb.chill/tests2.ch, testsuite/gdb.chill/tests2.exp:
+ Update FSF address in copyright notices.
+
+1999-02-18 Jason Molenda (jsm@bugshack.cygnus.com)
+
+ * configure.in: Quote "$GCC" correctly.
+ * configure: Regenerated.
+
+1999-02-18 Jim Blandy <jimb@zwingli.cygnus.com>
+
+ * dbxread.c (elfstab_build_psymtabs): Don't assume that there's a
+ section named ".text", which has all the code in it. Instead, look
+ at all the sections in the file with the `code' flag set.
+ (find_text_range): New function, that does all the work.
+
+Thu Feb 18 17:50:45 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * mips-tdep.c (FP_REGISTER_DOUBLE): Conditionally define.
+
+Fri Jan 29 16:51:11 1999 Andrew Cagney <cagney@chook.cygnus.com>
+
+ * mips-tdep.c (return_value_location): New function. Merge/rewrite
+ of return-value code in mips_extract_return_value,
+ mips_store_return_value. Stop buffer overflow when 64 bit value
+ in 32 bit registers. Extract 64bit float from 32 bit register
+ pair of correct order.
+ (mips_extract_return_value, mips_store_return_value): Call
+ return_value_location. For store, ensure that remainder of
+ register is zero.
+
+Thu Jan 28 18:58:02 1999 Andrew Cagney <cagney@chook.cygnus.com>
+
+ From John Metzler <jmetzler@cygnus.com>:
+ * mips-tdep.c (struct gdbarch_tdep): Add mips_saved_regsize.
+ (MIPS_SAVED_REGSIZE): Define.
+ (mips_find_saved_regs, read_next_frame_reg, mips_pop_frame):
+ Read/write MIPS_SAVED_REGSIZE bytes of register on stack instead
+ of MIPS_REGSIZE.
+ (mips_gdbarch_init): Initialize mips_saved_regsize.
+
+ * mips-tdep.c (mips_frame_saved_pc, mips16_heuristic_proc_desc,
+ mips_push_arguments, mips_push_dummy_frame,
+ mips_use_struct_convention): Ditto. For MIPS_SAVED_REGSIZE <
+ REGISTER_RAW_SIZE, handle little/big endian issues from only using
+ half the register.
+ (STACK_ARGSIZE): Default to MIPS_SAVED_REGSIZE instead of
+ MIPS_REGSIZE.
+
+ * mips-tdep.c (struct gdbarch_tdep, FP_REGISTER_DOUBLE,
+ mips_gdbarch_init): Apply similar changes. Add
+ mips_fp_register_double to struct.
+
+Wed Feb 17 10:10:27 1999 Stu Grossman <grossman@babylon-5.cygnus.com>
+
+ * gdbtypes.h (get_discrete_bounds): Remove duplicate decl.
+
+ * jv-typeprint.c (java_type_print_base): Change fputs => fputs_filtered.
+
+Mon Jan 25 18:30:57 1999 Per Bothner <bothner@cygnus.com>
+
+ * jv-lang.h (JAVA_OBJECT_SIZE): Change from hard-wired constant.
+ (java_primitive_type_from_name, get_java_object_header_size): Declare.
+ * jv-lang.c (java_class_from_object): Use get_java_object_type.
+ * jv-lang.c: Update Class field names: dtable->vtable,
+ msize->method_count, nfields->field_count, bfsize->size_in_bytes,
+ nmethods->method_count.
+ (type_from_class): Demangle array type names.
+ (java_link_class_type): Array type names are now demangled.
+ (get_java_object_type): If not defined yet, try looking it up.
+ (get_java_object_header_size): New function.
+ (java_primitive_type_from_name): New function.
+ (java_demangled_signature_length, java_demangled_signature_copy): New.
+ (java_demangle_type_signature): Re-implement using above functions.
+ (evaluate_subexp_java): For UNOP_IND, call evaluate_subexp_java
+ to evaluate subexp (not evaluate_subexp_standard).
+ For BINOP_SUBSCRIPT update for new array type naming scheme.
+ * jv-valprint.c (java_value_print): Use java_class_from_object.
+ Update array printing to new array type naming convention.
+ (java_val_print): Doing check_typedef when printing a pointer is
+ is a waste of effort. Also, handle TYPE_CODE_INT, to make sure
+ Java bytes as not printed as C chars.
+
+Fri Jan 8 16:58:22 1999 Stu Grossman <grossman@babylon-5.cygnus.com>
+
+ * blockframe.c (find_pc_sect_partial_function): Search full symtabs as
+ a last ditch effort (after the partial & minimal symtabs).
+ * defs.h utils.c: Fixup prototypes for vprintf_filtered,
+ vfprintf_filtered, vfprintf_unfiltered and vprintf_unfiltered to return
+ ints to match their standard equivalents.
+ * defs.h symtab.c top.c: Create skip_prologue_hook to allow Java to
+ control the prologue skipping process.
+ * jv-typeprint.c (java_type_print_base): Remove extern for
+ jv_class_demangle, add new arg for objfile (NULL).
+ * symtab.h: Remove struct sourcevector and struct source. Definately
+ not needed.
+ * values.c (value_virtual_fn_field): Fixes code to handle new vtable
+ debug info format. Patch from marka.
+
+Wed Dec 16 23:11:25 1998 Stu Grossman <grossman@fencer.cygnus.com>
+
+ * jv-lang.c (java_class_from_object java_class_is_primitive
+ is_object_type): Change dtable to vtable.
+ * (java_primitive_type): Change arg to type char.
+ * (_initialize_java_language): Make java_char_type be unsigned.
+ * jv-lang.h: Fixup prototypes.
+
+Mon Dec 7 19:02:15 1998 Stu Grossman <grossman@babylon-5.cygnus.com>
+
+ * jv-valprint.c (java_value_print): Fix printing of values where
+ run time type != compile time type.
+
+Fri Dec 4 15:23:38 1998 Stu Grossman <grossman@fencer.cygnus.com>
+
+ * Makefile.in: Whack out m2-typeprint.c.
+ * c-typeprint.c (c_type_print_varspec_suffix) typeprint.h: Make this
+ global. It's needed by Java.
+ * (c_type_print_base): Whack prefix off of qualified method names
+ (names with name spaces).
+ * gdbtypes.h (struct cplus_struct_type): Add bits for Java attributes.
+ Shrink voffset
+ to 16 bits to compensate for added bits above (hopefully this is still
+ enough).
+ * Add new accessor macros (TYPE_FND_FIELD_PUBLIC, ...) for all new
+ attribute bits.
+ * jv-typeprint.c (java_type_print_base): Fix printing of method
+ attributes. Handle JVM style manglings.
+ * (java_print_type): Enable code type print varspec_suffix to allow
+ array indices to print out.
+ * jv-valprint.c (java_val_print): Minor formatting.
+ * m2-lang.c (m2_language_d): Change m2_print_type to c_print_type.
+ * stabsread.c (read_member_functions): Save public and static attributes.
+
+Wed Feb 17 15:32:57 1999 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * breakpoint.c (watch_command_1): Reformat comment.
+
+ * c-typeprint.c (c_type_print_base): Reformat comments.
+
+1999-02-17 Jim Blandy <jimb@zwingli.cygnus.com>
+
+ * Makefile.in (VERSION): Bump version to 4.17.2.
+
+Tue Feb 16 15:48:20 1999 Edith Epstein <eepstein@sophia.cygnus.com>
+
+ * config/pa/nm-hppah.h: Added prototype declarations for
+ hppa_enable_page_protection_events and
+ hppa_disable_page_protection_events.
+
+ * inftarg.c (child_wait): Fixed code that checks whether
+ or not the target program has done a fork/vfork.
+ related_pid does not have a value unless the target
+ program has forked/vforked.
+
+ * infttrace.c (hppa_insert_hw_watchpoint): Make sure that
+ function always returns a value.
+ (hppa_remove_hw_watchpoint): Make sure that function always
+ returns a value.
+
+Tue Feb 16 06:31:58 1999 Keith Seitz <keiths@cygnus.com>
+
+ * config/powerpc/tm-ppc-eabi.h: Do not define PC_IN_CALL_DUMMY,
+ let the generic call dummy infrastructure do it.
+
+Sun Feb 14 18:21:08 1999 Mark Alexander <marka@cygnus.com>
+
+ * config/sh/tm-sh.h (BELIEVE_PCC_PROMOTION): Define, so that
+ coffread.c will correctly handle char or short function parameters.
+
+1999-02-11 Jason Molenda (jsm@bugshack.cygnus.com)
+
+ * configure, aclocal.m4: Regenerate with correct version of aclocal.
+
+1999-02-10 Syd Polk <spolk@cygnus.com>
+
+ * acinclude.m4: Fix for new location of itclConfig.sh and itkConfig.sh.
+ * aclocal.m4: Regnerate.
+ * configure: Regenerate.
+
+1999-02-10 Jason Molenda (jsm@bugshack.cygnus.com)
+
+ * demangle.c: Fix comments to mention "set demangle-style"
+ instead of "set demangle".
+ Run through indent to fix minor indenting problems.
+
+Wed Feb 10 17:53:09 1999 Bob Manson <manson@charmed.cygnus.com>
+
+ * i386-tdep.c (gdb_print_insn_i386): Add missing returns.
+
+Wed Feb 10 13:17:21 1999 Stan Shebs <shebs@andros.cygnus.com>
+
+ Declare Gould configuration obsolete:
+ * configure.host, configure.tgt: Comment out Gould configs.
+ * Makefile.in: Comment out Gould-related actions.
+ * gould-xdep.c, gould-tdep.c, config/gould/*: Comment out.
+ * NEWS: Mention obsolete status.
+
+1999-02-09 DJ Delorie <dj@cygnus.com>
+
+ * sparcl-tdep.c: UDP download works in cygwin
+
+1999-02-08 Jason Molenda (jsm@bugshack.cygnus.com)
+
+ * gnu-regex.c: Check ENABLE_NLS instead of HAVE_LIBINTL_H.
+ * configure.in: Don't check for libintl.h.
+ * configure, config.in: Regenerated.
+
+Mon Feb 8 18:10:50 1999 Stan Shebs <shebs@andros.cygnus.com>
+
+ * NEWS: Mention new X packet and PowerPC variant support.
+
+1999-02-08 Nick Clifton <nickc@cygnus.com>
+
+ * configure.host: Add support for StrongARM host.
+ * configure.tgt: Add support for StrongARM target.
+
+Mon Feb 8 12:05:05 1999 David Taylor <taylor@texas.cygnus.com>
+
+ * dsrec.c (make_srec): Cast targ_addr to int in call to sprintf
+ otherwise on big endian machine with a bfd_vma of 64 bits,
+ *everything* gets loaded at location 0.
+
+Mon Feb 7 10:05:43 1999 Frank Ch. Eigler <fche@cygnus.com>
+
+ * infrun.c (wait_for_inferior): Allow SIGTRAP to be "pass"ed
+ to target program.
+
+Fri Feb 5 16:46:14 1999 Stan Shebs <shebs@andros.cygnus.com>
+
+ * NEWS: Add mentions of various new things.
+
+Thu Feb 4 00:19:14 1999 Christopher Faylor <cgf@cygnus.com>
+
+ * configure.in: Move termcap determination later in the
+ file to catch setting of cygwin flag.
+ * configure: Regenerate.
+
+Wed Feb 3 14:16:38 1999 Christopher Faylor <cgf@cygnus.com>
+
+ * config/i386/cygwin.mh: Move TERMCAP test code to configure.in.
+ * configure.in: Treat libtermcap.a detection as a special case
+ when hosting on cygwin.
+ * configure: Regenerate.
+
+1999-02-03 Keith Seitz <keiths@cygnus.com>
+
+ * remote.c (remote_binary_download, remote_binary_length): New
+ static globals for dealing with binary transmissions.
+ (remote_write_bytes): Add support for binary downloads
+ by shadowing the "M" packet with a new "X" packet. This
+ defaults to ON; if the stub does not understand this, it
+ will fall back to using "M".
+ (putpkt): Add support for binary downloading.
+ * monitor.c (monitor_expect): The mon2000 monitor
+ on the MSA2000 will also emit random DC1/DC3 chars.
+ * m32r-stub.c: Change all char's to unsigned char's
+ to support binary downloading.
+ (handle_exception): Add support for binary downloading
+ via a new "X" packet.
+ (getpacket): Do NOT strip eighth bit of incoming chars.
+ Watch out for escaped characters in the incoming stream.
+ (putpacket): Do NOT strip eighth bit of incoming chars.
+ (bin2mem): New function to write binary data directly to
+ memory.
+ * m32r-rom.c: Add new "mon2000" target.
+
+Tue Feb 2 18:40:29 1999 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * hp-psymtab-read.c (hpread_build_psymtabs): Coerce first arg
+ passed to make_cleanup to the correct type.
+ (hpread_quick_traverse): Change fifth arg to call to
+ hpread_end_psymtab to be 0.
+ Compare CURR_MODULE_END to 0 rather than NULL.
+ Get rid of ifdef'ed out code.
+ (scan_procs): Get rid of ifdef'ed out code.
+
+ * somread.c (som_symfile_read): Coerce first argument passed to
+ make_cleanup to the correct type.
+
+Tue Feb 2 17:36:29 1999 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * hp-psymtab-read.c (do_pxdb): New function. Check whether the
+ file needs to be processed by pxdb (an HP debug info massaging
+ tool), if so call it.
+ (hpread_build_psymtabs): Initialize scan_start to 0 and
+ simplify flow of control.
+
+ * somread.c (som_symfile_read): Add call to do_pxdb (),
+ in hp-psymtab-read.c.
+
+ * symfile.c (symbol_file_add): Remove ifdef'ed out HPUX specific
+ code.
+ (symfile_bfd_open): Remove HPUXHPPA ifdef'ed code. Code is now
+ in hp-psymtab-read.c.
+
+1999-02-02 Martin Hunt <hunt@cygnus.com>
+
+ * printcmd.c (print_scalar_formatted): Use strcat to concat all
+ the output together before calling fprintf_filtered().
+
+1999-02-01 Jason Molenda (jsm@bugshack.cygnus.com)
+
+ * configure.in: Require autoconf 2.13.
+ (AM_EXEEXT): Replace with new AC_EXEEXT.
+ * acinclude.m4: Move itcl header macros from aclocal.m4 to here.
+ * aclocal.m4: Regenerated.
+ * configure: Regenerated.
+
+1999-02-01 Jim Blandy <jimb@zwingli.cygnus.com>
+
+ Allow PPC users to select which PPC/RS6000 variant they're
+ debugging 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.
+
+Sun Jan 31 15:24:24 1999 Stan Shebs <shebs@andros.cygnus.com>
+
+ * buildsym.h, buildsym.c: Convert to ANSI-only.
+
+ * buildsym.h, buildsym.c: Reformat to standard.
+
+ * buildsym.c (merge_symbol_lists): Remove unused variable.
+ (_initialize_buildsym): Remove, does nothing.
+
+1999-01-31 J.T. Conklin <jtc@redbacknetworks.com>
+
+ * i386-stub.c, m32r-stub.c, m68k-stub.c, sh-stub.c, sparc-stub.c,
+ sparcl-stub, sparclet-stub.c: Change declaration of putDebugChar
+ to include explicit void return type as per documentation. Fix up
+ occasions where stubs erroneously checked return type.
+
+Sun Jan 31 13:18:33 1999 Stan Shebs <shebs@andros.cygnus.com>
+
+ From J.T. Conklin <jtc@redbacknetworks.com>:
+ * remote.c (remote_query): Fix tipo.
+
+Fri Jan 29 15:25:09 1999 Stan Shebs <shebs@andros.cygnus.com>
+
+ * configure.tgt (v850): Add wildcard to match.
+
+Fri Jan 29 16:44:01 1999 Edith Epstein <eepstein@sophia.cygnus.com>
+
+ * inferior.h: Ran indent.
+
+ * fork-child.c: Ran indent.
+
+ * infrun.c : Ran indent.
+
+Fri Jan 29 12:57:34 1999 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * infrun.c (_initialize_infrun): Do not stop or print anything
+ when a SIGWINCH is received.
+
+ * Makefile.in (m2-exp.tab.c): Use YACC not BISON.
+ (f-exp.tab.c): Ditto.
+ (jv-exp.tab.c): Ditto.
+ (c-exp.tab.c): Ditto.
+ (YACC): Define as @YACC@.
+
+1999-01-29 Martin Hunt <hunt@cygnus.com>
+
+ Changes from Keith Seitz <keiths@cygnus.com>
+ * valops.c (value_assign): Add calls to register_changed_hook and
+ memory_changed_hook to inform UIs that the user has changed
+ the target's registers/memory.
+ * findvar.c (write_register_gen): Remove call to pc_changed_hook.
+ * defs.h: Remove declaration for pc_changed_hook and
+ add declarations for register_changed_hook and
+ memory_changed_hook.
+ * top.c: Ditto.
+
+1999-01-29 Mark Alexander <marka@cygnus.com>
+
+ * procfs.c (wait_fd): Handle deleted threads correctly.
+
+1999-01-28 Jason Molenda (jsm@bugshack.cygnus.com)
+
+ * utils.c (init_page_info): Force window size if running under emacs.
+
+1999-01-27 James Ingham <jingham@cygnus.com>
+
+ * typeprint.c (whatis_exp): Remove static declaration.
+
+Wed Jan 27 16:50:25 1999 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * hp-psymtab-read.c: Reformat using indent.
+
+Wed Jan 27 13:20:25 1999 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * hp-psymtab-read.c: Reformat comments, update copyright.
+
+Wed Jan 27 15:09:22 1999 Andrew Cagney <cagney@chook.cygnus.com>
+
+ * mips-tdep.c (mips_gdbarch_init): Trace e_flags from BFD
+ elf_info.
+
+Tue Jan 26 16:02:47 1999 Mark Alexander <marka@cygnus.com>
+
+ * v850-tdep.c (v850_generic_reg_names, v850e_reg_names,
+ v850_register_names, v850_processor_type_table): Declare tables
+ and structures for handling differences in register names for
+ v850 and v850e.
+ (struct reg_list): Define new structure for creating tables
+ of register bit masks in v850e instrutions.
+ (handle_prepare, handle_pushm): New helpers for v850_scan_prologue.
+ (v850_scan_prologue): Recognize v850e instructions: callt, prepare,
+ and pushm.
+ (v850_target_architecture_hook): New function to set register
+ names based on current machine.
+ (_initialize_v850_tdep): Set up target_architecture_hook.
+ * config/v850/tm-v850.h (v850_register_names): Declare.
+ (REGISTER_NAME): Define to refer to v850_register_names.
+ (SR0_REGNUM, CTBP_REGNUM): Define.
+ (PS_REGNUM): Redefine in terms of SR0_REGNUM.
+
+Tue Jan 26 18:27:26 1999 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * Makefile.in (c-exp.tab.c): Use BISON instead of YACC, to pick
+ the correct value from configure output.
+ (jv-exp.tab.c): Ditto.
+ (f-exp.tab.c): Ditto.
+ (m2-exp.tab.c): Ditto.
+
+1999-01-26 Jason Molenda (jsm@bugshack.cygnus.com)
+
+ * breakpoint.h (ep_is_exception_catchpoint): Add prototype.
+ * frame.h (select_and_print_frame): Add prototype.
+ * stack.c (func_command): Call select_and_print_frame with correct
+ number of arguments. Reformat whitespace.
+
+Tue Jan 26 16:53:54 1999 Fernando Nasser <fnasser@cygnus.com>
+
+ * remote.c (remote_query): fix maximum packet size to account for
+ remote_debug use.
+ (putpkt): add comment to alert about extra byte need.
+
+Mon Jan 25 19:55:30 1999 Mark Alexander <marka@cygnus.com>
+
+ * sh-tdep.c (sh_target_architecture_hook): Return immediately
+ when a matching machine is found.
+
+Fri Jan 22 09:10:35 1999 Mark Alexander <marka@cygnus.com>
+
+ * remote-mips.c (mips_initialize): Fix parameters to clear_breakpoint.
+ (common_breakpoint): Restore support for instruction breakpoints
+ on non-LSI targets.
+
+Thu Jan 21 17:16:19 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * stack.c: Close open comment.
+ * symtab.c (find_pc_sect_line): Ditto.
+
+Thu Jan 21 17:51:51 1999 Stan Shebs <shebs@andros.cygnus.com>
+
+ * procfs.c (init_procfs_ops): New function, fills in procfs_ops,
+ init only nonzero fields, leave to_require_attach and
+ to_require_detach empty, not needed for /proc systems yet.
+ (_initialize_procfs): Call init_procfs_ops.
+
+ From J.T. Conklin <jtc@redbacknetworks.com>:
+ * top.c (init_main): Fix tipo in description of the remotetimeout
+ variable.
+ * breakpoint.c (bpstat_stop_status): Handle systems where
+ DECR_PC_AFTER_BREAK != DECR_PC_AFTER_HW_BREAK.
+
+Thu Jan 21 17:25:46 1999 Mark Alexander <marka@cygnus.com>
+
+ * mon960-rom.c (_initialize_mon960): Call init_mon960_cmds
+ to fill in mon960_cmds structure properly.
+
+Wed Jan 20 17:53:22 1999 Stan Shebs <shebs@andros.cygnus.com>
+
+ * remote-sds.c (sds_ops): Define only once.
+ (init_sds_ops, sds_command, _initialize_remote_sds): Declare.
+ (init_sds_ops): Init only non-zero fields.
+
+Wed Jan 20 15:45:15 1999 Mark Alexander <marka@cygnus.com>
+
+ * h8300-tdep.c (original_register_names, h8300h_register_names,
+ h8300_register_names): Define new variables.
+ (set_register_names): New function to set register names based on
+ current CPU type.
+ (h8300_command, h8300h_command, h8300s_command): Call
+ set_register_names.
+ * config/h8300/tm-h8300.h (h8300_register_names): Declare.
+ (REGISTER_NAME): Define to refer to h8300_register_names.
+
+1999-01-19 Fernando Nasser <fnasser@totem.to.cygnus.com>
+
+ * sol-thread.c abug-rom.c cpu32bug-rom.c dbug-rom.c m32r-rom.c
+ mac-nat.c mon960-rom.c op50-rom.c ppc-bdm.c remote-adapt.c
+ remote-array.c remote-bug.c remote-e7000.c remote-eb.c remote-es.c
+ remote-est.c remote-hms.c remote-mm.c remote-nindy.c remote-nrom.c
+ remote-os9k.c remote-rdp.c remote-sds.c remote-sim.c remote-st.c
+ remote-udi.c rom68k-rom.c sh3-rom.c sparcl-tdep.c sparclet-rom.c
+ v850ice.c win32-nat.c: cosmetic changes to conform to coding
+ standards.
+
+1999-01-19 Jim Blandy <jimb@zwingli.cygnus.com>
+
+ Use aclocal to generate GDB's aclocal.m4 script.
+ * acinclude.m4: New file, containing the hand-written local macro
+ definitions that used to be in aclocal.m4. Don't sinclude
+ ../bfd/aclocal.m4 any more; running aclocal in this directory will
+ get us the definitions we need. HOWEVER: Do sinclude
+ ../bfd/acinclude.m4, because we need the definition of
+ BFD_NEED_DECLARATION.
+ * aclocal.m4: Regenerated by aclocal.
+ * configure: Regenerated by autoconf.
+
+Tue Jan 19 10:27:23 1999 David Taylor <taylor@texas.cygnus.com>
+
+ * breakpoint.c (disable_breakpoints_in_shlibs): new parameter,
+ silent, controls whether to print message about removal of shared
+ library breakpoints.
+ * breakpoint.h (disable_breakpoints_in_shlibs): decl updated.
+ * irix5-nat.c (clear_solib): call disable_breakpoints_in_shlibs.
+ * osfsolib.c (clear_solib): ditto.
+ * solib.c (clear_solib): ditto.
+ * somsolib.c (som_solib_restart): update call to
+ disable_breakpoints_in_shlibs.
+
+ * target.h (child_post_attach): only declare if CHILD_POST_ATTACH
+ is define.
+
+Tue Jan 19 18:07:11 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * corelow.c (solib_add_stub): Ditto.
+ (core_file_to_sym_file): Cast make_cleanup parameter.
+
+ * solib.c (symbol_add_stub, solib_map_sections): Change argument
+ to PTR insted of a char*. Matches catch_errors interface.
+
+Mon Jan 18 14:01:24 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * remote-array.c (array_open): Don't use fprintf_filtered to send
+ data to the log file.
+
+ * remote-array.c (handle_load_dll): Change argument type to PTR so
+ that it is compatible with catch_errors.
+ * ocd.c (ocd_start_remote): Ditto.
+ * remote-sds.c (sds_start_remote): Ditto.
+
+ * win32-nat.c (win32_child_thread_alive): Namespace proof
+ child_thread_alive.
+ (init_child_ops): Update.
+
+Mon Jan 18 12:03:47 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * remote-rdi.c (arm_rdi_open): Set gdb_hostif.hostosarg and
+ gdb_hostif.dbgarg to NULL instead of stdout.
+ (voiddummy, myprint, mywritec): Use gdb_stdout instead of stdout.
+
+Mon Jan 18 16:40:50 1999 Stan Shebs <shebs@andros.cygnus.com>
+
+ * ser-ocd.c (ocd_open): Handle Unix case gracefully.
+
+ * target.c (dummy_target): Don't initialize statically.
+ (init_dummy_target): New function, fills in dummy_target.
+ (initialize_targets): Use it.
+ * hpux-thread.c (hpux_thread_ops): Don't initialize statically.
+ (init_hpux_thread_ops): New function, fills in hpux_thread_ops.
+ (_initialize_hpux_thread): Use it.
+ * m3-nat.c (m3_ops): Don't initialize statically.
+ (init_m3_ops): New function, fills in m3_ops.
+ (_initialize_m3): Use it.
+
+1999-01-18 Fernando Nasser <fnasser@totem.to.cygnus.com>
+
+ * sol-thread.c: delete compile time initialization of target_ops
+ (_initialize_sol_thread): initialize target_ops at run time.
+ * hpux-thread.c: added target_ops entry.
+ * m3-nat.c: ditto.
+
+Mon Jan 18 15:19:13 1999 David Taylor <taylor@texas.cygnus.com>
+
+ * procfs.c (procfs_ops): delete compile time initialization.
+ (_initialize_procfs): initialize procfs_ops at run time.
+
+Mon Jan 18 12:51:44 1999 Christopher Faylor <cgf@cygnus.com>
+
+ * configure.in: Ensure that -luser32 is always linked in
+ for cygwin build.
+ * configure: Regenerated.
+
+Mon Jan 18 08:38:05 1999 Mark Alexander <marka@cygnus.com>
+
+ * values.c (value_virtual_fn_field): Clear the pointed-to
+ offset when casting to the base class.
+
+Mon Jan 18 10:30:51 1999 David Taylor <taylor@texas.cygnus.com>
+
+ * remote-udi.c (init_udi_ops): change non-existant udi_run_ops to
+ udi_ops; delete NULL initializers.
+
+Mon Jan 18 12:03:47 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * serial.c (serial_close): gdb_fclose tages gdb_file** arg, not
+ gdb_file*.
+
+ * f-valprint.c, target.c, gdbarch.c: Pass gdb_stderr not stderr.
+
+Mon Jan 18 10:46:12 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * stack.c (print_frame_info_base): Don't cast call to
+ catch_errors.
+ (print_args_stub): Change char* arg to PTR.
+ * symmisc.c (print_symbol): Ditto.
+ * top.c (quit_cover): Ditto.
+ * remote.c (remote_open_1, remote_start_remote): Ditto.
+ * infrun.c (normal_stop, hook_stop_stub, restore_selected_frame):
+ Ditto.
+
+ * stack.c (backtrace_command): Cast first arg of make_cleanup to
+ make_cleanup_func.
+ * remote.c (remote_kill): Cast putpkt arg to catch_errors_ftype.
+
+Mon Jan 18 08:47:02 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * defs.h (catch_errors_ftype): Define.
+ (catch_errors): Replace char* arg with PTR arg.
+ * top.c (catch_errors): Update
+
+ * breakpoint.c (bpstat_stop_status, bpstat_stop_status,
+ delete_breakpoint, breakpoint_re_set): Delete all casts in call to
+ catch_errors.
+ (breakpoint_cond_eval, watchpoint_check,
+ cover_target_enable_exception_callback, breakpoint_re_set_one):
+ Arg is PTR not char*.
+
+ * breakpoint.c (cover_target_enable_exception_callback): Change
+ type to int. Check for cast values of 0 and -1. Return a result!
+ (insert_breakpoints): Move declaration of SAL and ARGS to where
+ they are used.
+
+1999-01-16 Fernando Nasser <fnasser@totem.to.cygnus.com>
+
+ * remote.c (remote_query): new function - creates proper interface
+ to the remote protocol "q" command.
+
+Fri Jan 15 17:11:48 EST 1999 Zdenek Radouch (radouch@cygnus.com)
+
+ * config/fr30/tm-fr30.h: Changed ABI to match GCC change
+ (always use pointer for structs passed by value).
+
+1999-01-15 Fernando Nasser <fnasser@totem.to.cygnus.com>
+
+ * target.h: added entry for target queries (to_query)
+ target.c: ditto.
+
+Thu Jan 14 18:29:17 1999 David Taylor <taylor@texas.cygnus.com>
+
+ * mips-tdep.c (mips_gdbarch_init): fix stream arg in
+ fprintf_unfiltered calls.
+ * remote-mm.c (mm_wait): fix stream arg to gdb_flush.
+ * remote-udi.c (udi_wait): fix stream arg to fwrite.
+ * symmisc.c (maintenance_check_symtabs): fix stream argument to
+ print_address_numeric.
+
+Wed Jan 13 19:33:16 1999 David Taylor <taylor@texas.cygnus.com>
+
+ * breakpoint.c (insert_breakpoints): insert cast to eliminate
+ warning.
+
+Wed Jan 13 14:59:02 1999 Michael Snyder <msnyder@cleaver.cygnus.com>
+
+ * infrun.c (set/show scheduler-locking) New command. Set a
+ mode bit that will control how GDB attempts to control thread
+ scheduling for step, continue, etc. (resume): make use of
+ the schedule-locking mode.
+ * target.h (struct target_ops): new field to_has_thread_control.
+ * sol-thread.c: initialize target_ops to_has_thread_control.
+ * procfs.c: ditto.
+ * target.c: ditto.
+ * m3-nat.c: ditto.
+ * remote.c: ditto.
+ * hpux-thread.c: ditto.
+ * thread.c: cull duplicate prototypes. Move prototypes to top.
+ * serial.c: indentation cleanup.
+ * breakpoint.c: add casts to eliminate compiler warnings.
+
+Tue Jan 12 17:00:00 1999 Edith Epstein <eepstein@sophia.cygnus.com>
+
+ * inftarg.c (child_create_inferior): fixed HPUXHPPA specific
+ call to fork_inferior. The shell param is now NULL.
+
+1999-01-12 Jason Molenda (jsm@bugshack.cygnus.com)
+
+ * monitor.c (init_base_monitor_ops): Whitespace cleanup.
+ (_initialize_remote_monitors): Same.
+
+1999-01-12 Jason Molenda (jsm@bugshack.cygnus.com)
+
+ * monitor.c (init_monitor_ops): Initialize the monitor_ops
+ structure if it hasn't already been done.
+
+Tue Jan 12 14:50:10 1999 Stan Shebs <shebs@andros.cygnus.com>
+
+ * inftarg.c (child_ops): Don't initialize statically.
+ (init_child_ops): New function, fills in child_ops.
+ (_initialize_inftarg): Use it.
+ (child_post_attach): Declare extern.
+ (child_wait): Fix ambiguous parens.
+ (child_attach_to_process): Remove unused local wstatus.
+ (child_insert_fork_catchpoint, child_remove_fork_catchpoint,
+ child_insert_vfork_catchpoint, child_remove_vfork_catchpoint,
+ child_has_forked, child_insert_exec_catchpoint,
+ child_remove_exec_catchpoint): Return a value.
+
+Mon Jan 11 16:43:44 1999 Michael Snyder <msnyder@cleaver.cygnus.com>
+
+ * remote.c (remote_wait): Add inferior_pid to thread list only
+ if it is not already there.
+
+1999-01-11 Jason Molenda (jsm@bugshack.cygnus.com)
+
+ * scm-tags.h: Update FSF's address on copyright notice.
+ * ser-e7kpc.c: Same.
+ * gnu-nat.h: Same.
+
+Mon Jan 11 13:45:57 1999 Stu Grossman <grossman@babylon-5.cygnus.com>
+
+ * dwarf2read.c (dump_die): Change stderr to gdb_stderr.
+ * expprint.c (print_subexp): fprintf => fprintf_unfiltered.
+ * jv-typeprint.c (java_type_print_base): fputs => fputs_filtered.
+ * stack.c (struct function_bounds): Remove superfluous `typedef'.
+ * symfile.c (list_overlays_command): stdout => gdb_stdout.
+ * symmisc.c (maintenance_check_symtabs): stdout => gdb_stdout.
+ * utils.c (print_spaces): Make more efficient.
+
+Mon Jan 11 13:55:51 1999 David Taylor <taylor@texas.cygnus.com>
+
+ * utils (print_spaces): fix arg to strcat; fix formatting.
+
+Fri Jan 8 11:57:24 1999 Stan Shebs <shebs@andros.cygnus.com>
+
+ * exec.c (exec_ops): Don't initialize statically.
+ (init_exec_ops): New function, fills in exec_ops.
+ (_initialize_exec): Use it.
+
+Thu Jan 7 17:50:15 EST 1999 Zdenek Radouch (radouch@cygnus.com)
+
+ Beta FR30 port.
+ * fr30-tdep.c
+ * config/fr30/tm-fr30.h
+
+Wed Jan 6 12:28:35 1999 David Taylor <taylor@texas.cygnus.com>
+
+ * configure.in: Add an --enable-tui argument. Construct
+ tui/Makefile from tui/Makefile.in. Use AM_PROG_CC_STDC. If we
+ have the GUI, then we need this to process libgui.h.
+ (ENABLE_CFLAGS): define and export BUILD_TUI.
+ (AC_CHECK_HEADERS): Add check for term.h.
+
+ * configure.host (hppa-*-hpux10.20, hppa-*-hpux11.0*): New configs.
+
+ * config.in, configure : regenerated.
+
+ * Makefile.in: Allow the TUI code to be conditionally enabled.
+ (TUI_LIBRARY): New variable, value are set by the configuration
+ script. Set to the empty string when the TUI isn't enabled.
+ (gdb$(GDBEXT)): Use those, instead of referring to all-tui and
+ tui/libtui.a directly.
+ (BUILD_TUI): build the tui -- only when configured with
+ --enable-tui.
+ (YLWRAP): use ylwrap to avoid problems on systems w/o bison.
+ (gdb$(EXEEXT)): make it dependent on BUILD_TUI.
+ (all-tui): remove dependency from phony target.
+ (c-exp.tab.c): use ylwrap instead of bison.
+ (jv-exp.tab.c): ditto.
+ (f-exp.tab.c): ditto.
+ (m2-exp.tab.c): ditto.
+ (ALLDEPFILES): add somread.c, hp-psymtab-read.c, hp-symtab-read.c.
+ (SFILES): remove the above files
+ (COMMON_OBS): remove somread.o
+ (SFILES): Add the tui files to this, so they get included in etags
+ tables.
+ (gdb$(EXEEXT)): Add all-tui to the list of dependencies, and add
+ tui/libtui.a to the link list.
+ (all-tui): New rule, which does a recursive make in the tui
+ subdir.
+ (tui/libtui.a): When recursing, pass down ${FLAGS_TO_PASS}. And
+ don't echo the make command. This is closer to what the other
+ recursions do.
+ (HFILES_NO_SRCDIR): add hpread.h
+ (COMMON_OBS): add hp-psymtab-read.o, hp-symtab-read.o
+ (SFILES): add hp-psymtab-read.c, hp-symtab-read.c add rules for
+ the new files. Remove hpread.c, hpread.o
+ (gdb$(EXEEXT)): Depend on the actual tui library, not on a
+ fictitious target. Since the fictitious target never existed,
+ make would always relink.
+ (tui/libtui.a): Always recurse to make sure the library is up to
+ date.
+
+Wed Jan 6 12:05:12 1999 Stan Shebs <shebs@andros.cygnus.com>
+
+ * remote.c: Pacify --enable-build-warnings, reformat code
+ to conform to standards, fix spelling errors.
+ (ishex, stubhex, record_currthread, etc): Declare.
+ (ishex, stubhex): Declare char arg as int.
+ (pack_string): Comment out, never used but possibly useful.
+ (threadref_to_int, remote_get_threadinfo, etc): Make static.
+
+Wed Jan 6 11:43:32 1999 David Taylor <taylor@texas.cygnus.com>
+
+ The following changes were made by Elena Zannoni
+ <ezannoni@cygnus.com> and Edith Epstein <eepstein@cygnus.com> as
+ part of a project to merge in changes made by HP.
+
+ * c-exp.y: use external flag hp_som_som_object_present to decide
+ whether code was compiled by HP's compilers. Add two new C++
+ tokens for true and false.
+ (yylex): check for template name is done differently for the
+ HP/aCC compiler case. Change some of the template processing code
+ for handling HP aCC templates. Handle true and false tokens.
+
+Tue Jan 5 11:13:36 1999 Michael Snyder <msnyder@cleaver.cygnus.com>
+
+ * remote.c (record_curthread): Must not modify inferior_pid when
+ called from wait_for_inferior. Instead, if a new thread-id is
+ detected, call add_thread.
+ (MAGIC_NULL_PID): new macro, use instead of the magic number
+ "42000".
+ (remote_find_new_threads): if inferior_pid is unknown, get and use
+ the current thread id.
+ (remote_start_remote): on connecting, attempt to get the current
+ thread id for inferior_pid.
+ (remote_resume): If pid == -1, then resume any-thread (not the
+ current thread specifically). Also some cosmetic fixups.
+
+ * thread.c (info_threads_command): don't initialize current_pid
+ until after call to FIND_NEW_THREADS (which may change inferior_pid).
+ Also some cosmetic fixups.
+ * infrun.c: cosmetic fixups and casts to avoid warnings.
+ * infcmd.c: cosmetic fixups, mainly long lines.
+
+Tue Jan 5 11:55:57 1999 David Taylor <taylor@texas.cygnus.com>
+
+ * target.c (noprocess): terminate sentence with a period.
+ * breakpoint.c (catch_command_1): ditto.
+
+ * c-valprint.c (c_value_print): remove hack^2 from HP; it causes
+ testsuite losses with no real gain.
+
+ * inferior.h (START_INFERIOR_TRAPS_EXPECTED): restore, but only
+ if tm-*.h hasn't overridden default value.
+
+1999-01-04 Jason Molenda (jsm@bugshack.cygnus.com)
+
+ * configure.in: Fix whitespace indentation for --help.
+ * configure: Regenerated.
+
+1999-01-04 Manuel Bouyer <bouyer@antioche.lip6.fr>
+
+ * main.c: Add --write command line option, document -w.
+ * gdb.1: Document --write.
+
+1999-01-04 Jason Molenda (jsm@bugshack.cygnus.com)
+
+ * configure.in: Require autoconf 2.12.1 or higher.
+ * doc/configure.in: Ditto.
+ * nlm/configure.in: Ditto.
+ * rdi-share/configure.in: Ditto.
+ * testsuite/configure.in: Ditto.
+ * doc/Makefile.in: Don't hardcode $(SHELL).
+ * nlm/Makefile.in: Ditto.
+ * rdi-share/Makefile.in: Ditto.
+ * testsuite/Makefile.in: Ditto.
+
+Mon Jan 4 12:53:03 1999 Stan Shebs <shebs@andros.cygnus.com>
+
+ * remote-vx.c (init_vx_ops, init_vx_run_ops): Remove unneeded
+ inits of new fields, including ref to bogus field.
+ (vx_ops, vx_run_ops): Make static.
+
+Mon Jan 4 15:05:29 1999 David Taylor <taylor@texas.cygnus.com>
+
+ * inferior.h (START_INFERIOR_TRAPS_EXPECTED): delete,
+ already defined in tm.h.
+
+ * inftarg.c: change <sys/unistd.h> to <unistd.h> and
+ conditionalize its inclusion.
+ * infttrace.c: ditto.
+
+For older changes see ChangeLog-98
+
+Local Variables:
+mode: change-log
+left-margin: 8
+fill-column: 74
+version-control: never
+End:
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 98683bb..51d92f2 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -229,7 +229,7 @@ CDEPS = $(XM_CDEPS) $(TM_CDEPS) $(NAT_CDEPS) $(SIM) $(BFD) $(READLINE) \
ADD_FILES = $(REGEX) $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES)
ADD_DEPS = $(REGEX1) $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES)
-VERSION = 19991221
+VERSION = 20000105
DIST=gdb
LINT=/usr/5bin/lint
@@ -1415,6 +1415,14 @@ procfs.o: procfs.c $(command_h) $(defs_h) $(gdbcore_h) $(inferior_h) \
target.h gdb_string.h
$(CC) -c $(INTERNAL_WARN_CFLAGS) $(NO_WERROR_CFLAGS) $<
+proc_api.o: proc_api.c $(defs_h) $(gdbcmd_h)
+
+proc_events.o: proc_events.c $(defs_h)
+
+proc_flags.o: proc_flags.c $(defs_h)
+
+proc_why.o: proc_why.c $(defs_h)
+
sol-thread.o: sol-thread.c $(defs_h) gdbthread.h target.h $(inferior_h) \
$(gdbcmd_h)
diff --git a/gdb/acconfig.h b/gdb/acconfig.h
index d2d72fe..97d31ad 100644
--- a/gdb/acconfig.h
+++ b/gdb/acconfig.h
@@ -10,13 +10,13 @@
/* Define if gregset_t type is available. */
#undef HAVE_GREGSET_T
+/* Define if you want to use new multi-fd /proc interface
+ (replaces HAVE_MULTIPLE_PROC_FDS as well as other macros). */
+#undef NEW_PROC_API
+
/* Define if ioctl argument PIOCSET is available. */
#undef HAVE_PROCFS_PIOCSET
-/* /proc PID entries are directories containing the files
- ctl as map status */
-#undef HAVE_MULTIPLE_PROC_FDS
-
/* Define if the `long long' type works. */
#undef CC_HAS_LONG_LONG
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index e1f97c7..37454c5 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -4164,107 +4164,135 @@ mention (b)
}
-/* Set a breakpoint according to ARG (function, linenum or *address)
- flag: first bit : 0 non-temporary, 1 temporary.
- second bit : 0 normal breakpoint, 1 hardware breakpoint. */
+/* Add SALS.nelts breakpoints to the breakpoint table. For each
+ SALS.sal[i] breakpoint, include the corresponding ADDR_STRING[i],
+ COND[i] and COND_STRING[i] values.
+
+ NOTE: If the function succeeds, the caller is expected to cleanup
+ the arrays ADDR_STRING, COND_STRING, COND and SALS (but not the
+ array contents). If the function fails (error() is called), the
+ caller is expected to cleanups both the ADDR_STRING, COND_STRING,
+ COND and SALS arrays and each of those arrays contents. */
static void
-break_command_1 (arg, flag, from_tty)
- char *arg;
- int flag, from_tty;
+create_breakpoints (struct symtabs_and_lines sals, char **addr_string,
+ struct expression **cond, char **cond_string,
+ enum bptype type, enum bpdisp disposition,
+ int thread, int ignore_count, int from_tty)
{
- int tempflag, hardwareflag;
- struct symtabs_and_lines sals;
- struct symtab_and_line sal;
- register struct expression *cond = 0;
- register struct breakpoint *b;
-
- /* Pointers in arg to the start, and one past the end, of the condition. */
- char *cond_start = NULL;
- char *cond_end = NULL;
- /* Pointers in arg to the start, and one past the end,
- of the address part. */
- char *addr_start = NULL;
- char *addr_end = NULL;
- struct cleanup *old_chain;
- struct cleanup *canonical_strings_chain = NULL;
- char **canonical = (char **) NULL;
- int i;
- int thread;
-
- hardwareflag = flag & BP_HARDWAREFLAG;
- tempflag = flag & BP_TEMPFLAG;
+ if (type == bp_hardware_breakpoint)
+ {
+ int i = hw_breakpoint_used_count ();
+ int target_resources_ok =
+ TARGET_CAN_USE_HARDWARE_WATCHPOINT (bp_hardware_breakpoint,
+ i + sals.nelts, 0);
+ if (target_resources_ok == 0)
+ error ("No hardware breakpoint support in the target.");
+ else if (target_resources_ok < 0)
+ error ("Hardware breakpoints used exceeds limit.");
+ }
- sals.sals = NULL;
- sals.nelts = 0;
+ /* Now set all the breakpoints. */
+ {
+ int i;
+ for (i = 0; i < sals.nelts; i++)
+ {
+ struct breakpoint *b;
+ struct symtab_and_line sal = sals.sals[i];
- INIT_SAL (&sal); /* initialize to zeroes */
+ if (from_tty)
+ describe_other_breakpoints (sal.pc, sal.section);
+
+ b = set_raw_breakpoint (sal);
+ set_breakpoint_count (breakpoint_count + 1);
+ b->number = breakpoint_count;
+ b->type = type;
+ b->cond = cond[i];
+ b->thread = thread;
+ b->addr_string = addr_string[i];
+ b->cond_string = cond_string[i];
+ b->ignore_count = ignore_count;
+ b->enable = enabled;
+ b->disposition = disposition;
+ mention (b);
+ }
+ }
+}
- /* If no arg given, or if first arg is 'if ', use the default breakpoint. */
+/* Parse ARG which is assumed to be a SAL specification possibly
+ followed by conditionals. On return, SALS contains an array of SAL
+ addresses found. ADDR_STRING contains a vector of (canonical)
+ address strings. ARG points to the end of the SAL. */
- if (!arg || (arg[0] == 'i' && arg[1] == 'f'
- && (arg[2] == ' ' || arg[2] == '\t')))
+void
+parse_breakpoint_sals (char **address,
+ struct symtabs_and_lines *sals,
+ char ***addr_string)
+{
+ char *addr_start = *address;
+ *addr_string = NULL;
+ /* If no arg given, or if first arg is 'if ', use the default
+ breakpoint. */
+ if ((*address) == NULL
+ || (strncmp ((*address), "if", 2) == 0 && isspace ((*address)[2])))
{
if (default_breakpoint_valid)
{
- sals.sals = (struct symtab_and_line *)
+ struct symtab_and_line sal;
+ INIT_SAL (&sal); /* initialize to zeroes */
+ sals->sals = (struct symtab_and_line *)
xmalloc (sizeof (struct symtab_and_line));
sal.pc = default_breakpoint_address;
sal.line = default_breakpoint_line;
sal.symtab = default_breakpoint_symtab;
sal.section = find_pc_overlay (sal.pc);
- sals.sals[0] = sal;
- sals.nelts = 1;
+ sals->sals[0] = sal;
+ sals->nelts = 1;
}
else
error ("No default breakpoint address now.");
}
else
{
- addr_start = arg;
-
/* Force almost all breakpoints to be in terms of the
current_source_symtab (which is decode_line_1's default). This
should produce the results we want almost all of the time while
leaving default_breakpoint_* alone. */
if (default_breakpoint_valid
&& (!current_source_symtab
- || (arg && (*arg == '+' || *arg == '-'))))
- sals = decode_line_1 (&arg, 1, default_breakpoint_symtab,
- default_breakpoint_line, &canonical);
+ || (strchr ("+-", (*address)[0]) != NULL)))
+ *sals = decode_line_1 (address, 1, default_breakpoint_symtab,
+ default_breakpoint_line, addr_string);
else
- sals = decode_line_1 (&arg, 1, (struct symtab *) NULL, 0, &canonical);
-
- addr_end = arg;
+ *sals = decode_line_1 (address, 1, (struct symtab *) NULL, 0, addr_string);
}
-
- if (!sals.nelts)
- return;
-
- /* Make sure that all storage allocated in decode_line_1 gets freed
- in case the following `for' loop errors out. */
- old_chain = make_cleanup (free, sals.sals);
- if (canonical != (char **) NULL)
+ /* For any SAL that didn't have a canonical string, fill one in. */
+ if (sals->nelts > 0 && *addr_string == NULL)
+ *addr_string = xcalloc (sals->nelts, sizeof (char **));
+ if (addr_start != (*address))
{
- make_cleanup (free, canonical);
- canonical_strings_chain = make_cleanup (null_cleanup, 0);
- for (i = 0; i < sals.nelts; i++)
+ int i;
+ for (i = 0; i < sals->nelts; i++)
{
- if (canonical[i] != NULL)
- make_cleanup (free, canonical[i]);
+ /* Add the string if not present. */
+ if ((*addr_string)[i] == NULL)
+ (*addr_string)[i] = savestring (addr_start, (*address) - addr_start);
}
}
+}
- thread = -1; /* No specific thread yet */
- /* Resolve all line numbers to PC's, and verify that conditions
- can be parsed, before setting any breakpoints. */
- for (i = 0; i < sals.nelts; i++)
- {
- char *tok, *end_tok;
- int toklen;
+/* Convert each SAL into a real PC. Verify that the PC can be
+ inserted as a breakpoint. If it can't throw an error. */
- resolve_sal_pc (&sals.sals[i]);
+void
+breakpoint_sals_to_pc (struct symtabs_and_lines *sals,
+ char *address)
+{
+ int i;
+ for (i = 0; i < sals->nelts; i++)
+ {
+ resolve_sal_pc (&sals->sals[i]);
/* It's possible for the PC to be nonzero, but still an illegal
value on some targets.
@@ -4279,16 +4307,100 @@ break_command_1 (arg, flag, from_tty)
Give the target a chance to bless sals.sals[i].pc before we
try to make a breakpoint for it. */
- if (PC_REQUIRES_RUN_BEFORE_USE (sals.sals[i].pc))
+ if (PC_REQUIRES_RUN_BEFORE_USE (sals->sals[i].pc))
{
- error ("Cannot break on %s without a running program.",
- addr_start);
+ if (address == NULL)
+ error ("Cannot break without a running program.");
+ else
+ error ("Cannot break on %s without a running program.",
+ address);
}
+ }
+}
- tok = arg;
+/* Set a breakpoint according to ARG (function, linenum or *address)
+ flag: first bit : 0 non-temporary, 1 temporary.
+ second bit : 0 normal breakpoint, 1 hardware breakpoint. */
+
+static void
+break_command_1 (arg, flag, from_tty)
+ char *arg;
+ int flag, from_tty;
+{
+ int tempflag, hardwareflag;
+ struct symtabs_and_lines sals;
+ register struct expression **cond = 0;
+ /* Pointers in arg to the start, and one past the end, of the
+ condition. */
+ char **cond_string = (char **) NULL;
+ char *addr_start = arg;
+ char **addr_string;
+ struct cleanup *old_chain;
+ struct cleanup *breakpoint_chain = NULL;
+ int i;
+ int thread = -1;
+ int ignore_count = 0;
+
+ hardwareflag = flag & BP_HARDWAREFLAG;
+ tempflag = flag & BP_TEMPFLAG;
+ sals.sals = NULL;
+ sals.nelts = 0;
+ addr_string = NULL;
+ parse_breakpoint_sals (&arg, &sals, &addr_string);
+
+ if (!sals.nelts)
+ return;
+
+ /* Create a chain of things that always need to be cleaned up. */
+ old_chain = make_cleanup (null_cleanup, 0);
+
+ /* Make sure that all storage allocated to SALS gets freed. */
+ make_cleanup (free, sals.sals);
+
+ /* Cleanup the addr_string array but not its contents. */
+ make_cleanup (free, addr_string);
+
+ /* Allocate space for all the cond expressions. */
+ cond = xcalloc (sals.nelts, sizeof (struct expression *));
+ make_cleanup (free, cond);
+
+ /* Allocate space for all the cond strings. */
+ cond_string = xcalloc (sals.nelts, sizeof (char **));
+ make_cleanup (free, cond_string);
+
+ /* ----------------------------- SNIP -----------------------------
+ Anything added to the cleanup chain beyond this point is assumed
+ to be part of a breakpoint. If the breakpoint create succeeds
+ then the memory is not reclaimed. */
+ breakpoint_chain = make_cleanup (null_cleanup, 0);
+
+ /* Mark the contents of the addr_string for cleanup. These go on
+ the breakpoint_chain and only occure if the breakpoint create
+ fails. */
+ for (i = 0; i < sals.nelts; i++)
+ {
+ if (addr_string[i] != NULL)
+ make_cleanup (free, addr_string[i]);
+ }
+
+ /* Resolve all line numbers to PC's and verify that the addresses
+ are ok for the target. */
+ breakpoint_sals_to_pc (&sals, addr_start);
+
+ /* Verify that condition can be parsed, before setting any
+ breakpoints. Allocate a separate condition expression for each
+ breakpoint. */
+ thread = -1; /* No specific thread yet */
+ for (i = 0; i < sals.nelts; i++)
+ {
+ char *tok = arg;
while (tok && *tok)
{
+ char *end_tok;
+ int toklen;
+ char *cond_start = NULL;
+ char *cond_end = NULL;
while (*tok == ' ' || *tok == '\t')
tok++;
@@ -4302,8 +4414,11 @@ break_command_1 (arg, flag, from_tty)
if (toklen >= 1 && strncmp (tok, "if", toklen) == 0)
{
tok = cond_start = end_tok + 1;
- cond = parse_exp_1 (&tok, block_for_pc (sals.sals[i].pc), 0);
+ cond[i] = parse_exp_1 (&tok, block_for_pc (sals.sals[i].pc), 0);
+ make_cleanup (free, cond[i]);
cond_end = tok;
+ cond_string[i] = savestring (cond_start, cond_end - cond_start);
+ make_cleanup (free, cond_string[i]);
}
else if (toklen >= 1 && strncmp (tok, "thread", toklen) == 0)
{
@@ -4321,61 +4436,149 @@ break_command_1 (arg, flag, from_tty)
error ("Junk at end of arguments.");
}
}
- if (hardwareflag)
- {
- int i, target_resources_ok;
- i = hw_breakpoint_used_count ();
- target_resources_ok =
- TARGET_CAN_USE_HARDWARE_WATCHPOINT (bp_hardware_breakpoint,
- i + sals.nelts, 0);
- if (target_resources_ok == 0)
- error ("No hardware breakpoint support in the target.");
- else if (target_resources_ok < 0)
- error ("Hardware breakpoints used exceeds limit.");
+ create_breakpoints (sals, addr_string, cond, cond_string,
+ hardwareflag ? bp_hardware_breakpoint : bp_breakpoint,
+ tempflag ? del : donttouch,
+ thread, ignore_count, from_tty);
+
+ if (sals.nelts > 1)
+ {
+ warning ("Multiple breakpoints were set.");
+ warning ("Use the \"delete\" command to delete unwanted breakpoints.");
}
+ /* That's it. Discard the cleanups for data inserted into the
+ breakpoint. */
+ discard_cleanups (breakpoint_chain);
+ /* But cleanup everything else. */
+ do_cleanups (old_chain);
+}
- /* Remove the canonical strings from the cleanup, they are needed below. */
- if (canonical != (char **) NULL)
- discard_cleanups (canonical_strings_chain);
+/* Set a breakpoint of TYPE/DISPOSITION according to ARG (function,
+ linenum or *address) with COND and IGNORE_COUNT. */
- /* Now set all the breakpoints. */
- for (i = 0; i < sals.nelts; i++)
- {
- sal = sals.sals[i];
+struct captured_breakpoint_args
+ {
+ char *address;
+ char *condition;
+ int hardwareflag;
+ int tempflag;
+ int thread;
+ int ignore_count;
+ };
- if (from_tty)
- describe_other_breakpoints (sal.pc, sal.section);
+static int
+do_captured_breakpoint (void *data)
+{
+ struct captured_breakpoint_args *args = data;
+ struct symtabs_and_lines sals;
+ register struct expression **cond;
+ struct cleanup *old_chain;
+ struct cleanup *breakpoint_chain = NULL;
+ int i;
+ char **addr_string;
+ char **cond_string;
- b = set_raw_breakpoint (sal);
- set_breakpoint_count (breakpoint_count + 1);
- b->number = breakpoint_count;
- b->type = hardwareflag ? bp_hardware_breakpoint : bp_breakpoint;
- b->cond = cond;
- b->thread = thread;
+ char *address_end;
- /* If a canonical line spec is needed use that instead of the
- command string. */
- if (canonical != (char **) NULL && canonical[i] != NULL)
- b->addr_string = canonical[i];
- else if (addr_start)
- b->addr_string = savestring (addr_start, addr_end - addr_start);
- if (cond_start)
- b->cond_string = savestring (cond_start, cond_end - cond_start);
+ /* Parse the source and lines spec. Delay check that the expression
+ didn't contain trailing garbage until after cleanups are in
+ place. */
+ sals.sals = NULL;
+ sals.nelts = 0;
+ address_end = args->address;
+ addr_string = NULL;
+ parse_breakpoint_sals (&address_end, &sals, &addr_string);
- b->enable = enabled;
- b->disposition = tempflag ? del : donttouch;
- mention (b);
+ if (!sals.nelts)
+ return GDB_RC_NONE;
+
+ /* Create a chain of things at always need to be cleaned up. */
+ old_chain = make_cleanup (null_cleanup, 0);
+
+ /* Always have a addr_string array, even if it is empty. */
+ make_cleanup (free, addr_string);
+
+ /* Make sure that all storage allocated to SALS gets freed. */
+ make_cleanup (free, sals.sals);
+
+ /* Allocate space for all the cond expressions. */
+ cond = xcalloc (sals.nelts, sizeof (struct expression *));
+ make_cleanup (free, cond);
+
+ /* Allocate space for all the cond strings. */
+ cond_string = xcalloc (sals.nelts, sizeof (char **));
+ make_cleanup (free, cond_string);
+
+ /* ----------------------------- SNIP -----------------------------
+ Anything added to the cleanup chain beyond this point is assumed
+ to be part of a breakpoint. If the breakpoint create goes
+ through then that memory is not cleaned up. */
+ breakpoint_chain = make_cleanup (null_cleanup, 0);
+
+ /* Mark the contents of the addr_string for cleanup. These go on
+ the breakpoint_chain and only occure if the breakpoint create
+ fails. */
+ for (i = 0; i < sals.nelts; i++)
+ {
+ if (addr_string[i] != NULL)
+ make_cleanup (free, addr_string[i]);
}
- if (sals.nelts > 1)
+ /* Wait until now before checking for garbage at the end of the
+ address. That way cleanups can take care of freeing any
+ memory. */
+ if (*address_end != '\0')
+ error ("Garbage %s following breakpoint address", address_end);
+
+ /* Resolve all line numbers to PC's. */
+ breakpoint_sals_to_pc (&sals, args->address);
+
+ /* Verify that conditions can be parsed, before setting any
+ breakpoints. */
+ for (i = 0; i < sals.nelts; i++)
{
- warning ("Multiple breakpoints were set.");
- warning ("Use the \"delete\" command to delete unwanted breakpoints.");
+ if (args->condition != NULL)
+ {
+ char *tok = args->condition;
+ cond[i] = parse_exp_1 (&tok, block_for_pc (sals.sals[i].pc), 0);
+ if (*tok != '\0')
+ error ("Garbage %s follows condition", tok);
+ make_cleanup (free, cond[i]);
+ cond_string[i] = xstrdup (args->condition);
+ }
}
+
+ create_breakpoints (sals, addr_string, cond, cond_string,
+ args->hardwareflag ? bp_hardware_breakpoint : bp_breakpoint,
+ args->tempflag ? del : donttouch,
+ args->thread, args->ignore_count, 0/*from-tty*/);
+
+ /* That's it. Discard the cleanups for data inserted into the
+ breakpoint. */
+ discard_cleanups (breakpoint_chain);
+ /* But cleanup everything else. */
do_cleanups (old_chain);
+ return GDB_RC_OK;
}
+enum gdb_rc
+gdb_breakpoint (char *address, char *condition,
+ int hardwareflag, int tempflag,
+ int thread, int ignore_count)
+{
+ struct captured_breakpoint_args args;
+ args.address = address;
+ args.condition = condition;
+ args.hardwareflag = hardwareflag;
+ args.tempflag = tempflag;
+ args.thread = thread;
+ args.ignore_count = ignore_count;
+ return catch_errors (do_captured_breakpoint, &args,
+ NULL, RETURN_MASK_ALL);
+}
+
+
static void
break_at_finish_at_depth_command_1 (arg, flag, from_tty)
char *arg;
diff --git a/gdb/config.in b/gdb/config.in
index 669a84a..07dae64 100644
--- a/gdb/config.in
+++ b/gdb/config.in
@@ -62,9 +62,9 @@
/* Define if ioctl argument PIOCSET is available. */
#undef HAVE_PROCFS_PIOCSET
-/* /proc PID entries are directories containing the files
- ctl as map status */
-#undef HAVE_MULTIPLE_PROC_FDS
+/* Define if you want to use new multi-fd /proc interface
+ (replaces HAVE_MULTIPLE_PROC_FDS as well as other macros). */
+#undef NEW_PROC_API
/* Define if the `long long' type works. */
#undef CC_HAS_LONG_LONG
diff --git a/gdb/config/alpha/alpha-osf2.mh b/gdb/config/alpha/alpha-osf2.mh
index 569b6fd..8d9ea02 100644
--- a/gdb/config/alpha/alpha-osf2.mh
+++ b/gdb/config/alpha/alpha-osf2.mh
@@ -2,4 +2,5 @@
XDEPFILES=
XM_FILE= xm-alphaosf.h
NAT_FILE= nm-osf2.h
-NATDEPFILES= infptrace.o inftarg.o corelow.o alpha-nat.o fork-child.o osfsolib.o procfs.o
+NATDEPFILES= infptrace.o inftarg.o corelow.o alpha-nat.o fork-child.o \
+ osfsolib.o procfs.o proc_api.o proc_events.o proc_flags.o proc_why.o
diff --git a/gdb/config/alpha/alpha-osf3.mh b/gdb/config/alpha/alpha-osf3.mh
index 4997531..63019b0 100644
--- a/gdb/config/alpha/alpha-osf3.mh
+++ b/gdb/config/alpha/alpha-osf3.mh
@@ -2,4 +2,6 @@
XDEPFILES=
XM_FILE= xm-alphaosf.h
NAT_FILE= nm-osf3.h
-NATDEPFILES= infptrace.o inftarg.o corelow.o alpha-nat.o fork-child.o osfsolib.o procfs.o
+NATDEPFILES= infptrace.o inftarg.o corelow.o alpha-nat.o fork-child.o \
+ osfsolib.o procfs.o proc_api.o proc_events.o proc_flags.o proc_why.o
+
diff --git a/gdb/config/i386/i386dgux.mh b/gdb/config/i386/i386dgux.mh
index e05ebcd..2ac7972 100644
--- a/gdb/config/i386/i386dgux.mh
+++ b/gdb/config/i386/i386dgux.mh
@@ -6,4 +6,5 @@ XDEPFILES= ser-tcp.o
XM_CLIBS= -lsocket -lnsl
NAT_FILE= nm-i386v4.h
-NATDEPFILES= corelow.o core-regset.o solib.o procfs.o fork-child.o i386v4-nat.o
+NATDEPFILES= corelow.o core-regset.o solib.o fork-child.o i386v4-nat.o \
+ procfs.o proc_api.o proc_events.o proc_flags.o proc_why.o
diff --git a/gdb/config/i386/i386sol2.mh b/gdb/config/i386/i386sol2.mh
index ff24294..11077cb 100644
--- a/gdb/config/i386/i386sol2.mh
+++ b/gdb/config/i386/i386sol2.mh
@@ -4,4 +4,5 @@ XM_FILE= xm-i386v4.h
XDEPFILES=
NAT_FILE= nm-i386sol2.h
-NATDEPFILES= core-regset.o procfs.o fork-child.o i386v4-nat.o corelow.o
+NATDEPFILES= core-regset.o fork-child.o i386v4-nat.o corelow.o procfs.o \
+ proc_api.o proc_events.o proc_flags.o proc_why.o
diff --git a/gdb/config/i386/i386v4.mh b/gdb/config/i386/i386v4.mh
index 4653887..d7a2003 100644
--- a/gdb/config/i386/i386v4.mh
+++ b/gdb/config/i386/i386v4.mh
@@ -6,4 +6,5 @@ XDEPFILES=
XM_CLIBS= -lsocket -lnsl
NAT_FILE= nm-i386v4.h
-NATDEPFILES= corelow.o core-regset.o solib.o procfs.o fork-child.o i386v4-nat.o
+NATDEPFILES= corelow.o core-regset.o solib.o fork-child.o i386v4-nat.o \
+ procfs.o proc_api.o proc_events.o proc_flags.o proc_why.o
diff --git a/gdb/config/i386/i386v42mp.mh b/gdb/config/i386/i386v42mp.mh
index 94b6c06..969b257 100644
--- a/gdb/config/i386/i386v42mp.mh
+++ b/gdb/config/i386/i386v42mp.mh
@@ -8,4 +8,6 @@ XM_CLIBS= -lsocket -lnsl
# we don't want nm-i386v4.h since that defines LOSING_POLL which isn't
# appropriate for i386v42mp
NAT_FILE= nm-i386v42mp.h
-NATDEPFILES= corelow.o core-regset.o solib.o procfs.o fork-child.o i386v4-nat.o
+NATDEPFILES= corelow.o core-regset.o solib.o fork-child.o i386v4-nat.o \
+ procfs.o proc_api.o proc_events.o proc_flags.o proc_why.o
+
diff --git a/gdb/config/i386/ncr3000.mh b/gdb/config/i386/ncr3000.mh
index 4f60756..7af5ecf 100644
--- a/gdb/config/i386/ncr3000.mh
+++ b/gdb/config/i386/ncr3000.mh
@@ -13,4 +13,5 @@ XM_FILE= xm-i386v4.h
XDEPFILES=
NAT_FILE= nm-i386v4.h
-NATDEPFILES= corelow.o core-regset.o procfs.o fork-child.o i386v4-nat.o
+NATDEPFILES= corelow.o core-regset.o fork-child.o i386v4-nat.o procfs.o \
+ proc_api.o proc_events.o proc_flags.o proc_why.o
diff --git a/gdb/config/m68k/m68kv4.mh b/gdb/config/m68k/m68kv4.mh
index f2db3d9..1ecf9bb 100644
--- a/gdb/config/m68k/m68kv4.mh
+++ b/gdb/config/m68k/m68kv4.mh
@@ -4,4 +4,5 @@ XM_FILE= xm-m68kv4.h
XDEPFILES=
NAT_FILE= nm-sysv4.h
-NATDEPFILES= corelow.o core-regset.o solib.o procfs.o fork-child.o
+NATDEPFILES= corelow.o core-regset.o solib.o fork-child.o procfs.o \
+ proc_api.o proc_events.o proc_flags.o proc_why.o
diff --git a/gdb/config/m88k/delta88v4.mh b/gdb/config/m88k/delta88v4.mh
index 82be883..cd26cad 100644
--- a/gdb/config/m88k/delta88v4.mh
+++ b/gdb/config/m88k/delta88v4.mh
@@ -4,4 +4,5 @@ XM_FILE= xm-delta88v4.h
XDEPFILES=
NAT_FILE= nm-delta88v4.h
-NATDEPFILES= fork-child.o m88k-nat.o corelow.o core-regset.o procfs.o solib.o
+NATDEPFILES= fork-child.o m88k-nat.o corelow.o core-regset.o solib.o \
+ procfs.o proc_api.o proc_events.o proc_flags.o proc_why.o
diff --git a/gdb/config/mips/irix4.mh b/gdb/config/mips/irix4.mh
index 68511e6..ce27ed2 100644
--- a/gdb/config/mips/irix4.mh
+++ b/gdb/config/mips/irix4.mh
@@ -2,7 +2,10 @@
XDEPFILES= ser-tcp.o
XM_FILE= xm-irix4.h
NAT_FILE= nm-irix4.h
-NATDEPFILES= fork-child.o procfs.o irix4-nat.o corelow.o
+NATDEPFILES= fork-child.o irix4-nat.o corelow.o procfs.o \
+ proc_api.o proc_events.o proc_flags.o proc_why.o
+
+
XM_CLIBS=-lbsd -lsun
# use cc in K&R mode, bump up some static compiler tables.
CC = cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh1100
diff --git a/gdb/config/mips/irix5.mh b/gdb/config/mips/irix5.mh
index 0e27686..47d80f5 100644
--- a/gdb/config/mips/irix5.mh
+++ b/gdb/config/mips/irix5.mh
@@ -2,5 +2,7 @@
XDEPFILES= ser-tcp.o
XM_FILE= xm-irix5.h
NAT_FILE= nm-irix5.h
-NATDEPFILES= fork-child.o procfs.o irix5-nat.o corelow.o
+NATDEPFILES= fork-child.o irix5-nat.o corelow.o procfs.o \
+ proc_api.o proc_events.o proc_flags.o proc_why.o
+
XM_CLIBS=-lbsd -lsun
diff --git a/gdb/config/mips/mipsv4.mh b/gdb/config/mips/mipsv4.mh
index 87cb7e4..cea9883 100644
--- a/gdb/config/mips/mipsv4.mh
+++ b/gdb/config/mips/mipsv4.mh
@@ -1,4 +1,5 @@
# Host: Mips running SVR4
XM_FILE= xm-mipsv4.h
NAT_FILE= ../nm-sysv4.h
-NATDEPFILES= fork-child.o procfs.o mipsv4-nat.o corelow.o core-regset.o solib.o
+NATDEPFILES= fork-child.o mipsv4-nat.o corelow.o core-regset.o solib.o \
+ procfs.o proc_api.o proc_events.o proc_flags.o proc_why.o
diff --git a/gdb/config/mips/nm-irix4.h b/gdb/config/mips/nm-irix4.h
index 189dafe..af5a417 100644
--- a/gdb/config/mips/nm-irix4.h
+++ b/gdb/config/mips/nm-irix4.h
@@ -57,6 +57,10 @@ extern int procfs_stopped_by_watchpoint PARAMS ((int));
/* Use these macros for watchpoint insertion/deletion. */
/* type can be 0: write watch, 1: read watch, 2: access watch (read/write) */
-#define target_insert_watchpoint(addr, len, type) procfs_set_watchpoint (inferior_pid, addr, len, 2)
-#define target_remove_watchpoint(addr, len, type) procfs_set_watchpoint (inferior_pid, addr, 0, 0)
-extern int procfs_set_watchpoint PARAMS ((int, CORE_ADDR, int, int));
+#define target_insert_watchpoint(ADDR, LEN, TYPE) \
+ procfs_set_watchpoint (inferior_pid, ADDR, LEN, TYPE, 0)
+#define target_remove_watchpoint(ADDR, LEN, TYPE) \
+ procfs_set_watchpoint (inferior_pid, ADDR, 0, 0, 0)
+extern int procfs_set_watchpoint PARAMS ((int, CORE_ADDR, int, int, int));
+
+#define TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT(SIZE) 1
diff --git a/gdb/config/mips/nm-irix5.h b/gdb/config/mips/nm-irix5.h
index 3ab4d25..4cf53b6 100644
--- a/gdb/config/mips/nm-irix5.h
+++ b/gdb/config/mips/nm-irix5.h
@@ -24,22 +24,24 @@
#define TARGET_HAS_HARDWARE_WATCHPOINTS
-/* Temporary new watchpoint stuff */
-#define TARGET_CAN_USE_HARDWARE_WATCHPOINT(type, cnt, ot) \
- ((type) == bp_hardware_watchpoint)
+#define TARGET_CAN_USE_HARDWARE_WATCHPOINT(type, cnt, ot) 1
/* When a hardware watchpoint fires off the PC will be left at the
instruction which caused the watchpoint. It will be necessary for
GDB to step over the watchpoint. */
#define STOPPED_BY_WATCHPOINT(W) \
- procfs_stopped_by_watchpoint(inferior_pid)
+ procfs_stopped_by_watchpoint(inferior_pid)
extern int procfs_stopped_by_watchpoint PARAMS ((int));
#define HAVE_NONSTEPPABLE_WATCHPOINT
/* Use these macros for watchpoint insertion/deletion. */
/* type can be 0: write watch, 1: read watch, 2: access watch (read/write) */
-#define target_insert_watchpoint(addr, len, type) procfs_set_watchpoint (inferior_pid, addr, len, 2)
-#define target_remove_watchpoint(addr, len, type) procfs_set_watchpoint (inferior_pid, addr, 0, 0)
-extern int procfs_set_watchpoint PARAMS ((int, CORE_ADDR, int, int));
+#define target_insert_watchpoint(ADDR, LEN, TYPE) \
+ procfs_set_watchpoint (inferior_pid, ADDR, LEN, TYPE, 0)
+#define target_remove_watchpoint(ADDR, LEN, TYPE) \
+ procfs_set_watchpoint (inferior_pid, ADDR, 0, 0, 0)
+extern int procfs_set_watchpoint PARAMS ((int, CORE_ADDR, int, int, int));
+
+#define TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT(SIZE) 1
diff --git a/gdb/config/powerpc/solaris.mh b/gdb/config/powerpc/solaris.mh
index 7d3444e..efc3a1b 100644
--- a/gdb/config/powerpc/solaris.mh
+++ b/gdb/config/powerpc/solaris.mh
@@ -5,7 +5,8 @@ XDEPFILES= ser-tcp.o
XM_CLIBS= -lsocket -lnsl
NAT_FILE= nm-solaris.h
-NATDEPFILES= corelow.o core-sol2.o solib.o procfs.o fork-child.o
+NATDEPFILES= corelow.o core-sol2.o solib.o fork-child.o procfs.o \
+ proc_api.o proc_events.o proc_flags.o proc_why.o
# If you are compiling with Sun's compiler, add the -xs option to CC
# (e.g. `make CC="cc -xs"').
diff --git a/gdb/config/sparc/sun4sol2.mh b/gdb/config/sparc/sun4sol2.mh
index 468b362..1659c7a 100644
--- a/gdb/config/sparc/sun4sol2.mh
+++ b/gdb/config/sparc/sun4sol2.mh
@@ -5,7 +5,8 @@ XDEPFILES= ser-tcp.o
XM_CLIBS= -lsocket -lnsl
NAT_FILE= nm-sun4sol2.h
-NATDEPFILES= corelow.o core-sol2.o solib.o procfs.o fork-child.o
+NATDEPFILES= corelow.o core-sol2.o solib.o fork-child.o procfs.o \
+ proc_api.o proc_events.o proc_flags.o proc_why.o
# If you are compiling with Sun's compiler, add the -xs option to CC
# (e.g. `make CC="cc -xs"').
diff --git a/gdb/configure b/gdb/configure
index 259525d..925f98a 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -4156,10 +4156,9 @@ echo "$ac_t""$gdb_cv_hpux_sswide" 1>&6
# If we are configured native on GNU/Linux, work around problems with
# sys/procfs.h
-# Also detect which type of /proc is in use, such as for Unixware.
+# Also detect which type of /proc is in use, such as for Unixware or Solaris.
if test "${target}" = "${host}"; then
- gdb_cv_hostos_is_solaris=no
case "${host}" in
i[3456]86-*-linux*)
cat >> confdefs.h <<\EOF
@@ -4171,45 +4170,39 @@ EOF
EOF
;;
- *-*-solaris*)
- gdb_cv_hostos_is_solaris=yes ;;
- esac
- echo $ac_n "checking for directory proc entries""... $ac_c" 1>&6
-echo "configure:4179: checking for directory proc entries" >&5
-# The [gdb_host != sun4sol2] hack is because Solaris does provide the
-# multiple procfs files as of Solaris 2.6, but GDB can't use it right now.
- if test "$ac_cv_header_sys_procfs_h" = yes -a \
- "$gdb_cv_hostos_is_solaris" = no \
- -a -d /proc/$$ \
- -a -f /proc/$$/ctl \
- -a -f /proc/$$/as \
- -a -f /proc/$$/map \
- -a -f /proc/$$/status; then
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<\EOF
-#define HAVE_MULTIPLE_PROC_FDS 1
+ *-*-unixware* | *-*-sysv4.2uw2.* | *-*-sysv4.2uw7.*)
+ cat >> confdefs.h <<\EOF
+#define NEW_PROC_API 1
EOF
- else
- echo "$ac_t""no" 1>&6
- fi
+ ;;
+ # FIXME: we would like to define NEW_PROC_API for all versions of
+ # Solaris from 2.6 on... but it isn't quite working yet. Seems
+ # to work on sparc 2.6, so let's try it out there.
+ sparc-sun-solaris2.6)
+ cat >> confdefs.h <<\EOF
+#define NEW_PROC_API 1
+EOF
+
+ ;;
+ esac
fi
if test "$ac_cv_header_sys_procfs_h" = yes; then
echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:4201: checking for pstatus_t in sys/procfs.h" >&5
+echo "configure:4194: checking for pstatus_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4206 "configure"
+#line 4199 "configure"
#include "confdefs.h"
#include <sys/procfs.h>
int main() {
pstatus_t avar
; return 0; }
EOF
-if { (eval echo configure:4213: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4206: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_pstatus_t=yes
else
@@ -4231,19 +4224,19 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:4235: checking for prrun_t in sys/procfs.h" >&5
+echo "configure:4228: checking for prrun_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4240 "configure"
+#line 4233 "configure"
#include "confdefs.h"
#include <sys/procfs.h>
int main() {
prrun_t avar
; return 0; }
EOF
-if { (eval echo configure:4247: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4240: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prrun_t=yes
else
@@ -4265,19 +4258,19 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6
echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:4269: checking for gregset_t in sys/procfs.h" >&5
+echo "configure:4262: checking for gregset_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4274 "configure"
+#line 4267 "configure"
#include "confdefs.h"
#include <sys/procfs.h>
int main() {
gregset_t avar
; return 0; }
EOF
-if { (eval echo configure:4281: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4274: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_gregset_t=yes
else
@@ -4299,19 +4292,19 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6
echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:4303: checking for fpregset_t in sys/procfs.h" >&5
+echo "configure:4296: checking for fpregset_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4308 "configure"
+#line 4301 "configure"
#include "confdefs.h"
#include <sys/procfs.h>
int main() {
fpregset_t avar
; return 0; }
EOF
-if { (eval echo configure:4315: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4308: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_fpregset_t=yes
else
@@ -4335,12 +4328,12 @@ EOF
echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:4339: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
+echo "configure:4332: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4344 "configure"
+#line 4337 "configure"
#include "confdefs.h"
#include <unistd.h>
#include <sys/types.h>
@@ -4353,7 +4346,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:4357: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4350: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_procfs_piocset=yes
else
@@ -4375,7 +4368,7 @@ EOF
fi
echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
-echo "configure:4379: checking for main in -lm" >&5
+echo "configure:4372: checking for main in -lm" >&5
ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4383,14 +4376,14 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lm $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4387 "configure"
+#line 4380 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:4394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -4419,7 +4412,7 @@ fi
echo $ac_n "checking for wctype in -lc""... $ac_c" 1>&6
-echo "configure:4423: checking for wctype in -lc" >&5
+echo "configure:4416: checking for wctype in -lc" >&5
ac_lib_var=`echo c'_'wctype | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4427,7 +4420,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lc $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4431 "configure"
+#line 4424 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -4438,7 +4431,7 @@ int main() {
wctype()
; return 0; }
EOF
-if { (eval echo configure:4442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -4457,7 +4450,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6
-echo "configure:4461: checking for wctype in -lw" >&5
+echo "configure:4454: checking for wctype in -lw" >&5
ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4465,7 +4458,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lw $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4469 "configure"
+#line 4462 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -4476,7 +4469,7 @@ int main() {
wctype()
; return 0; }
EOF
-if { (eval echo configure:4480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -4508,12 +4501,12 @@ fi
echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
-echo "configure:4512: checking for long long support in compiler" >&5
+echo "configure:4505: checking for long long support in compiler" >&5
if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4517 "configure"
+#line 4510 "configure"
#include "confdefs.h"
int main() {
@@ -4523,7 +4516,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:4527: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4520: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_c_long_long=yes
else
@@ -4545,7 +4538,7 @@ fi
echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
-echo "configure:4549: checking for long long support in printf" >&5
+echo "configure:4542: checking for long long support in printf" >&5
if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4553,7 +4546,7 @@ else
gdb_cv_printf_has_long_long=no
else
cat > conftest.$ac_ext <<EOF
-#line 4557 "configure"
+#line 4550 "configure"
#include "confdefs.h"
int main () {
@@ -4567,7 +4560,7 @@ int main () {
return (strcmp ("0x0123456789abcdef", buf));
}
EOF
-if { (eval echo configure:4571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
gdb_cv_printf_has_long_long=yes
else
@@ -4591,19 +4584,19 @@ echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6
echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6
-echo "configure:4595: checking for long double support in compiler" >&5
+echo "configure:4588: checking for long double support in compiler" >&5
if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4600 "configure"
+#line 4593 "configure"
#include "confdefs.h"
int main() {
long double foo;
; return 0; }
EOF
-if { (eval echo configure:4607: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4600: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_long_double=yes
else
@@ -4625,7 +4618,7 @@ fi
echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
-echo "configure:4629: checking for long double support in printf" >&5
+echo "configure:4622: checking for long double support in printf" >&5
if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4633,7 +4626,7 @@ else
gdb_cv_printf_has_long_double=no
else
cat > conftest.$ac_ext <<EOF
-#line 4637 "configure"
+#line 4630 "configure"
#include "confdefs.h"
int main () {
@@ -4643,7 +4636,7 @@ int main () {
return (strncmp ("3.14159", buf, 7));
}
EOF
-if { (eval echo configure:4647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
gdb_cv_printf_has_long_double=yes
else
@@ -4667,7 +4660,7 @@ echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6
echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6
-echo "configure:4671: checking for long double support in scanf" >&5
+echo "configure:4664: checking for long double support in scanf" >&5
if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4675,7 +4668,7 @@ else
gdb_cv_scanf_has_long_double=no
else
cat > conftest.$ac_ext <<EOF
-#line 4679 "configure"
+#line 4672 "configure"
#include "confdefs.h"
int main () {
@@ -4685,7 +4678,7 @@ int main () {
return !(f > 3.14159 && f < 3.14160);
}
EOF
-if { (eval echo configure:4689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
gdb_cv_scanf_has_long_double=yes
else
@@ -4711,17 +4704,17 @@ for ac_hdr in unistd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4715: checking for $ac_hdr" >&5
+echo "configure:4708: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4720 "configure"
+#line 4713 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4725: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4718: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -4750,12 +4743,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4754: checking for $ac_func" >&5
+echo "configure:4747: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4759 "configure"
+#line 4752 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -4778,7 +4771,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:4782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -4803,7 +4796,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:4807: checking for working mmap" >&5
+echo "configure:4800: checking for working mmap" >&5
if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4811,7 +4804,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 4815 "configure"
+#line 4808 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
@@ -4951,7 +4944,7 @@ main()
}
EOF
-if { (eval echo configure:4955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_mmap_fixed_mapped=yes
else
@@ -4980,7 +4973,7 @@ if test ${build} = ${host} -a ${host} = ${target} ; then
case ${host_os} in
hpux*)
echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6
-echo "configure:4984: checking for HPUX/OSF thread support" >&5
+echo "configure:4977: checking for HPUX/OSF thread support" >&5
if test -f /usr/include/dce/cma_config.h ; then
if test "$GCC" = "yes" ; then
echo "$ac_t""yes" 1>&6
@@ -4999,7 +4992,7 @@ EOF
;;
solaris*)
echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
-echo "configure:5003: checking for Solaris thread debugging library" >&5
+echo "configure:4996: checking for Solaris thread debugging library" >&5
if test -f /usr/lib/libthread_db.so.1 ; then
echo "$ac_t""yes" 1>&6
cat >> confdefs.h <<\EOF
@@ -5009,7 +5002,7 @@ EOF
CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:5013: checking for dlopen in -ldl" >&5
+echo "configure:5006: checking for dlopen in -ldl" >&5
ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -5017,7 +5010,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5021 "configure"
+#line 5014 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -5028,7 +5021,7 @@ int main() {
dlopen()
; return 0; }
EOF
-if { (eval echo configure:5032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -5060,17 +5053,17 @@ fi
# all symbols visible in the dynamic symbol table.
hold_ldflags=$LDFLAGS
echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6
-echo "configure:5064: checking for the ld -export-dynamic flag" >&5
+echo "configure:5057: checking for the ld -export-dynamic flag" >&5
LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
cat > conftest.$ac_ext <<EOF
-#line 5067 "configure"
+#line 5060 "configure"
#include "confdefs.h"
int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:5074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
found=yes
else
@@ -5089,13 +5082,13 @@ rm -f conftest*
# Sun randomly tweaked the prototypes in <proc_service.h>
# at one point.
echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6
-echo "configure:5093: checking if <proc_service.h> is old" >&5
+echo "configure:5086: checking if <proc_service.h> is old" >&5
if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5099 "configure"
+#line 5092 "configure"
#include "confdefs.h"
#include <proc_service.h>
@@ -5106,7 +5099,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:5110: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5103: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_proc_service_is_old=no
else
@@ -5252,12 +5245,12 @@ fi
# In the Cygwin environment, we need some additional flags.
echo $ac_n "checking for cygwin""... $ac_c" 1>&6
-echo "configure:5379: checking for cygwin" >&5
+echo "configure:5372: checking for cygwin" >&5
if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5384 "configure"
+#line 5377 "configure"
#include "confdefs.h"
#if defined (__CYGWIN__) || defined (__CYGWIN32__)
@@ -5291,7 +5284,7 @@ if test x$gdb_cv_os_cygwin = xyes; then
else
TERM_LIB=
echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
-echo "configure:5418: checking for tgetent in -lncurses" >&5
+echo "configure:5411: checking for tgetent in -lncurses" >&5
ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -5299,7 +5292,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lncurses $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5426 "configure"
+#line 5419 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -5310,7 +5303,7 @@ int main() {
tgetent()
; return 0; }
EOF
-if { (eval echo configure:5437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -5329,7 +5322,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for tgetent in -lHcurses""... $ac_c" 1>&6
-echo "configure:5456: checking for tgetent in -lHcurses" >&5
+echo "configure:5449: checking for tgetent in -lHcurses" >&5
ac_lib_var=`echo Hcurses'_'tgetent | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -5337,7 +5330,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lHcurses $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5464 "configure"
+#line 5457 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -5348,7 +5341,7 @@ int main() {
tgetent()
; return 0; }
EOF
-if { (eval echo configure:5475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -5367,7 +5360,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for tgetent in -ltermlib""... $ac_c" 1>&6
-echo "configure:5494: checking for tgetent in -ltermlib" >&5
+echo "configure:5487: checking for tgetent in -ltermlib" >&5
ac_lib_var=`echo termlib'_'tgetent | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -5375,7 +5368,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ltermlib $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5502 "configure"
+#line 5495 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -5386,7 +5379,7 @@ int main() {
tgetent()
; return 0; }
EOF
-if { (eval echo configure:5513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -5405,7 +5398,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
-echo "configure:5532: checking for tgetent in -ltermcap" >&5
+echo "configure:5525: checking for tgetent in -ltermcap" >&5
ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -5413,7 +5406,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ltermcap $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5540 "configure"
+#line 5533 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -5424,7 +5417,7 @@ int main() {
tgetent()
; return 0; }
EOF
-if { (eval echo configure:5551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -5443,7 +5436,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
-echo "configure:5570: checking for tgetent in -lcurses" >&5
+echo "configure:5563: checking for tgetent in -lcurses" >&5
ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -5451,7 +5444,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lcurses $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5578 "configure"
+#line 5571 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -5462,7 +5455,7 @@ int main() {
tgetent()
; return 0; }
EOF
-if { (eval echo configure:5589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -5481,7 +5474,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for tgetent in -lterminfo""... $ac_c" 1>&6
-echo "configure:5608: checking for tgetent in -lterminfo" >&5
+echo "configure:5601: checking for tgetent in -lterminfo" >&5
ac_lib_var=`echo terminfo'_'tgetent | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -5489,7 +5482,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lterminfo $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5616 "configure"
+#line 5609 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -5500,7 +5493,7 @@ int main() {
tgetent()
; return 0; }
EOF
-if { (eval echo configure:5627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -5552,7 +5545,7 @@ fi
# Uses ac_ vars as temps to allow command line to override cache and checks.
# --without-x overrides everything else, but does not touch the cache.
echo $ac_n "checking for X""... $ac_c" 1>&6
-echo "configure:6763: checking for X" >&5
+echo "configure:6756: checking for X" >&5
# Check whether --with-x or --without-x was given.
if test "${with_x+set}" = set; then
@@ -5614,12 +5607,12 @@ if test "$ac_x_includes" = NO; then
# First, try using that file with no special directory specified.
cat > conftest.$ac_ext <<EOF
-#line 6825 "configure"
+#line 6818 "configure"
#include "confdefs.h"
#include <$x_direct_test_include>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6830: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6823: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -5688,14 +5681,14 @@ if test "$ac_x_libraries" = NO; then
ac_save_LIBS="$LIBS"
LIBS="-l$x_direct_test_library $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 6899 "configure"
+#line 6892 "configure"
#include "confdefs.h"
int main() {
${x_direct_test_function}()
; return 0; }
EOF
-if { (eval echo configure:6906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
LIBS="$ac_save_LIBS"
# We can link X programs with no special library path.
@@ -5975,12 +5968,12 @@ fi
echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:7257: checking for Cygwin environment" >&5
+echo "configure:7250: checking for Cygwin environment" >&5
if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7262 "configure"
+#line 7255 "configure"
#include "confdefs.h"
int main() {
@@ -5991,7 +5984,7 @@ int main() {
return __CYGWIN__;
; return 0; }
EOF
-if { (eval echo configure:7273: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7266: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_cygwin=yes
else
@@ -6008,19 +6001,19 @@ echo "$ac_t""$ac_cv_cygwin" 1>&6
CYGWIN=
test "$ac_cv_cygwin" = yes && CYGWIN=yes
echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:7290: checking for mingw32 environment" >&5
+echo "configure:7283: checking for mingw32 environment" >&5
if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7295 "configure"
+#line 7288 "configure"
#include "confdefs.h"
int main() {
return __MINGW32__;
; return 0; }
EOF
-if { (eval echo configure:7302: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7295: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_mingw32=yes
else
@@ -6039,7 +6032,7 @@ test "$ac_cv_mingw32" = yes && MINGW32=yes
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:7321: checking for executable suffix" >&5
+echo "configure:7314: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -6049,7 +6042,7 @@ else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
- if { (eval echo configure:7331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ if { (eval echo configure:7324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
*.c | *.o | *.obj) ;;
diff --git a/gdb/configure.in b/gdb/configure.in
index 0377402..4a04927 100644
--- a/gdb/configure.in
+++ b/gdb/configure.in
@@ -144,33 +144,24 @@ AC_MSG_RESULT($gdb_cv_hpux_sswide)
# If we are configured native on GNU/Linux, work around problems with
# sys/procfs.h
-# Also detect which type of /proc is in use, such as for Unixware.
+# Also detect which type of /proc is in use, such as for Unixware or Solaris.
if test "${target}" = "${host}"; then
- gdb_cv_hostos_is_solaris=no
case "${host}" in
i[[3456]]86-*-linux*)
AC_DEFINE(START_INFERIOR_TRAPS_EXPECTED,2)
AC_DEFINE(sys_quotactl)
;;
- *-*-solaris*)
- gdb_cv_hostos_is_solaris=yes ;;
+ *-*-unixware* | *-*-sysv4.2uw2.* | *-*-sysv4.2uw7.*)
+ AC_DEFINE(NEW_PROC_API)
+ ;;
+ # FIXME: we would like to define NEW_PROC_API for all versions of
+ # Solaris from 2.6 on... but it isn't quite working yet. Seems
+ # to work on sparc 2.6, so let's try it out there.
+ sparc-sun-solaris2.6)
+ AC_DEFINE(NEW_PROC_API)
+ ;;
esac
- AC_MSG_CHECKING(for directory proc entries)
-# The [gdb_host != sun4sol2] hack is because Solaris does provide the
-# multiple procfs files as of Solaris 2.6, but GDB can't use it right now.
- if test "$ac_cv_header_sys_procfs_h" = yes -a \
- "$gdb_cv_hostos_is_solaris" = no \
- -a -d /proc/$$ \
- -a -f /proc/$$/ctl \
- -a -f /proc/$$/as \
- -a -f /proc/$$/map \
- -a -f /proc/$$/status; then
- AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_MULTIPLE_PROC_FDS)
- else
- AC_MSG_RESULT(no)
- fi
fi
if test "$ac_cv_header_sys_procfs_h" = yes; then
diff --git a/gdb/dbxread.c b/gdb/dbxread.c
index 9e72314..74667e4 100644
--- a/gdb/dbxread.c
+++ b/gdb/dbxread.c
@@ -2379,6 +2379,13 @@ process_one_symbol (type, desc, valu, name, section_offsets, objfile)
function_start_offset = valu;
within_function = 1;
+
+ if (context_stack_depth > 1)
+ {
+ complain (&lbrac_unmatched_complaint, symnum);
+ break;
+ }
+
if (context_stack_depth > 0)
{
new = pop_context ();
@@ -2386,9 +2393,6 @@ process_one_symbol (type, desc, valu, name, section_offsets, objfile)
finish_block (new->name, &local_symbols, new->old_blocks,
new->start_addr, valu, objfile);
}
- /* Stack must be empty now. */
- if (context_stack_depth != 0)
- complain (&lbrac_unmatched_complaint, symnum);
new = push_context (0, valu);
new->name = define_symbol (valu, name, desc, type, objfile);
diff --git a/gdb/defs.h b/gdb/defs.h
index 27c24c8..3ae2b2d 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -1341,4 +1341,9 @@ enum gdb_rc {
function will ``print'' the object on ``output''). */
enum gdb_rc gdb_breakpoint_query (/* struct {ui,gdb}_out *output, */ int bnum);
+/* Create a breakpoint at ADDRESS (a GDB source and line). */
+enum gdb_rc gdb_breakpoint (char *address, char *condition,
+ int hardwareflag, int tempflag,
+ int thread, int ignore_count);
+
#endif /* #ifndef DEFS_H */
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index f1150b8..30bef42 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,3 +1,7 @@
+2000-01-05 Dmitry Sivachenko <dima@Chg.RU>
+
+ * gdb.texinfo: Wrap "ASCII" in @sc{}; clarify a few sentences.
+
Wed Dec 8 19:53:08 1999 Andrew Cagney <cagney@b1.cygnus.com>
* gdbint.texinfo (FRAME_CHAIN_VALID): Add the generic frame-chain
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index b4ad4e3..0f34d26 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -4345,7 +4345,7 @@ $1 = @{0x1234, 0x5678@}
@end example
As a convenience, if you leave the array length out (as in
-@samp{(@var{type}[])@var{value}}) gdb calculates the size to fill
+@samp{(@var{type}[])@var{value}}) @value{GDBN} calculates the size to fill
the value (as @samp{sizeof(@var{value})/sizeof(@var{type})}:
@example
(@value{GDBP}) p/x (short[])0x12345678
@@ -5621,8 +5621,8 @@ each language.
@itemx set check range off
Set range checking on or off, overriding the default setting for the
current working language. A warning is issued if the setting does not
-match the language default. If a range error occurs, then a message
-is printed and evaluation of the expression is aborted.
+match the language default. If a range error occurs and range checking is on,
+then a message is printed and evaluation of the expression is aborted.
@item set check range warn
Output messages when the @value{GDBN} range checker detects a range error,
@@ -6373,13 +6373,13 @@ Returns the absolute value of @var{n}.
@item CAP(@var{c})
If @var{c} is a lower case letter, it returns its upper case
-equivalent, otherwise it returns its argument
+equivalent, otherwise it returns its argument.
@item CHR(@var{i})
Returns the character whose ordinal value is @var{i}.
@item DEC(@var{v})
-Decrements the value in the variable @var{v}. Returns the new value.
+Decrements the value in the variable @var{v} by one. Returns the new value.
@item DEC(@var{v},@var{i})
Decrements the value in the variable @var{v} by @var{i}. Returns the
@@ -6396,7 +6396,7 @@ Returns the floating point equivalent of the integer @var{i}.
Returns the index of the last member of @var{a}.
@item INC(@var{v})
-Increments the value in the variable @var{v}. Returns the new value.
+Increments the value in the variable @var{v} by one. Returns the new value.
@item INC(@var{v},@var{i})
Increments the value in the variable @var{v} by @var{i}. Returns the
@@ -6417,8 +6417,8 @@ Returns boolean TRUE if @var{i} is an odd number.
@item ORD(@var{x})
Returns the ordinal value of its argument. For example, the ordinal
-value of a character is its ASCII value (on machines supporting the
-ASCII character set). @var{x} must be of an ordered type, which include
+value of a character is its @sc{ascii} value (on machines supporting the
+@sc{ascii} character set). @var{x} must be of an ordered type, which include
integral, character and enumerated types.
@item SIZE(@var{x})
@@ -6463,7 +6463,7 @@ digits.
@item
Character constants consist of a single character enclosed by a pair of
like quotes, either single (@code{'}) or double (@code{"}). They may
-also be expressed by their ordinal value (their ASCII value, usually)
+also be expressed by their ordinal value (their @sc{ascii} value, usually)
followed by a @samp{C}.
@item
@@ -6790,7 +6790,7 @@ set result := EXPR
@noindent
This does the same as the Chill action @code{RESULT EXPR} (which
-is not available in gdb).
+is not available in @value{GDBN}).
Values of reference mode locations are printed by @code{PTR(<hex
value>)} in case of a free reference mode, and by @code{(REF <reference
@@ -8684,7 +8684,7 @@ otherwise noted all numbers are represented in HEX with leading zeros
suppressed.
Response @var{data} can be run-length encoded to save space. A @samp{*}
-means that the next character is an ASCII encoding giving a repeat count
+means that the next character is an @sc{ascii} encoding giving a repeat count
which stands for that many repetitions of the character preceding the
@samp{*}. The encoding is @code{n+29}, yielding a printable character
where @code{n >=3} (which is where rle starts to win). The printable
@@ -9179,7 +9179,7 @@ host debugger.}
@item @code{O}@var{XX...}
@tab
-@var{XX...} is hex encoding of ASCII data. This can happen at any time
+@var{XX...} is hex encoding of @sc{ascii} data. This can happen at any time
while the program is running and the debugger should continue to wait
for 'W', 'T', etc.
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 591f819..be1e6c7 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -92,17 +92,7 @@ int sync_execution = 0;
when the inferior stopped in a different thread than it had been
running in. */
-static int switched_from_inferior_pid;
-
-/* This will be true for configurations that may actually report an
- inferior pid different from the original. At present this is only
- true for HP-UX native. */
-
-#ifndef MAY_SWITCH_FROM_INFERIOR_PID
-#define MAY_SWITCH_FROM_INFERIOR_PID (0)
-#endif
-
-static int may_switch_from_inferior_pid = MAY_SWITCH_FROM_INFERIOR_PID;
+static int previous_inferior_pid;
/* This is true for configurations that may follow through execl() and
similar functions. At present this is only true for HP-UX native. */
@@ -1250,8 +1240,7 @@ wait_for_inferior (void)
thread_step_needed = 0;
/* We'll update this if & when we switch to a new thread. */
- if (may_switch_from_inferior_pid)
- switched_from_inferior_pid = inferior_pid;
+ previous_inferior_pid = inferior_pid;
overlay_cache_invalid = 1;
@@ -1312,8 +1301,7 @@ fetch_inferior_event (client_data)
thread_step_needed = 0;
/* We'll update this if & when we switch to a new thread. */
- if (may_switch_from_inferior_pid)
- switched_from_inferior_pid = inferior_pid;
+ previous_inferior_pid = inferior_pid;
overlay_cache_invalid = 1;
@@ -1944,15 +1932,12 @@ handle_inferior_event (struct execution_control_state *ecs)
&ecs->stepping_through_solib_catchpoints,
&ecs->stepping_through_sigtramp);
}
- if (may_switch_from_inferior_pid)
- switched_from_inferior_pid = inferior_pid;
inferior_pid = ecs->pid;
if (context_hook)
context_hook (pid_to_thread_id (ecs->pid));
- printf_filtered ("[Switching to %s]\n", target_pid_to_str (ecs->pid));
flush_cached_frames ();
}
@@ -3300,14 +3285,13 @@ normal_stop (void)
(Note that there's no point in saying anything if the inferior
has exited!) */
- if (may_switch_from_inferior_pid
- && (switched_from_inferior_pid != inferior_pid)
+ if ((previous_inferior_pid != inferior_pid)
&& target_has_execution)
{
target_terminal_ours_for_output ();
- printf_filtered ("[Switched to %s]\n",
+ printf_filtered ("[Switching to %s]\n",
target_pid_or_tid_to_str (inferior_pid));
- switched_from_inferior_pid = inferior_pid;
+ previous_inferior_pid = inferior_pid;
}
/* Make sure that the current_frame's pc is correct. This
diff --git a/gdb/proc_api.c b/gdb/proc_api.c
new file mode 100755
index 0000000..291ea62
--- /dev/null
+++ b/gdb/proc_api.c
@@ -0,0 +1,784 @@
+/*
+ * Pretty-print trace of api calls to the /proc api
+ * (ioctl or read/write calls).
+ *
+ */
+
+#include "defs.h"
+#include "gdbcmd.h"
+
+#if defined (NEW_PROC_API)
+#define _STRUCTURED_PROC 1
+#endif
+
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/procfs.h>
+#include <sys/proc.h> /* for struct proc */
+#include <sys/user.h> /* for struct user */
+#include <fcntl.h> /* for O_RDWR etc. */
+
+/* Much of the information used in the /proc interface, particularly for
+ printing status information, is kept as tables of structures of the
+ following form. These tables can be used to map numeric values to
+ their symbolic names and to a string that describes their specific use. */
+
+struct trans {
+ long value; /* The numeric value */
+ char *name; /* The equivalent symbolic value */
+ char *desc; /* Short description of value */
+};
+
+static int procfs_trace = 1;
+/*static int info_verbose = 1;*/ /* kludge */
+static FILE *procfs_file = NULL;
+static char *procfs_filename = "procfs_trace";
+
+static void
+set_procfs_trace_cmd (args, from_tty, c)
+ char *args;
+ int from_tty;
+ struct cmd_list_element *c;
+{
+#if 0 /* not sure what I might actually need to do here, if anything */
+ if (procfs_file)
+ fflush (procfs_file);
+#endif
+}
+
+static void
+set_procfs_file_cmd (args, from_tty, c)
+ char *args;
+ int from_tty;
+ struct cmd_list_element *c;
+{
+ /* Just changed the filename for procfs tracing.
+ If a file was already open, close it. */
+ if (procfs_file)
+ fclose (procfs_file);
+ procfs_file = NULL;
+}
+
+
+#ifndef NEW_PROC_API
+
+static struct trans ioctl_table[] = {
+#ifdef PIOCACINFO /* irix */
+ { PIOCACINFO, "PIOCACINFO", "get process account info" },
+#endif
+ { PIOCACTION, "PIOCACTION", "get signal action structs" },
+#ifdef PIOCARGUMENTS /* osf */
+ { PIOCARGUMENTS, "PIOCARGUMENTS", "command line args" },
+#endif
+#ifdef PIOCAUXV /* solaris aux vectors */
+ { PIOCAUXV, "PIOCAUXV", "get aux vector" },
+ { PIOCNAUXV, "PIOCNAUXV", "get number of aux vector entries" },
+#endif /* AUXV */
+ { PIOCCFAULT, "PIOCCFAULT", "clear current fault" },
+ { PIOCCRED, "PIOCCRED", "get process credentials" },
+#ifdef PIOCENEVCTRS /* irix event counters */
+ { PIOCENEVCTRS, "PIOCENEVCTRS", "acquire and start event counters" },
+ { PIOCGETEVCTRL, "PIOCGETEVCTRL", "get control info of event counters" },
+ { PIOCGETEVCTRS, "PIOCGETEVCTRS", "dump event counters" },
+ { PIOCGETPREVCTRS, "PIOCGETPREVCTRS", "dump event counters & prusage info" },
+ { PIOCRELEVCTRS, "PIOCRELEVCTRS", "release/stop event counters" },
+ { PIOCSETEVCTRL, "PIOCSETEVCTRL", "set control info of event counters" },
+ { PIOCGETPTIMER, "PIOCGETPTIMER", "get process timers" },
+#endif /* irix event counters */
+ { PIOCGENTRY, "PIOCGENTRY", "get traced syscall entry set" },
+ { PIOCGETPR, "PIOCGETPR", "read struct proc" },
+ { PIOCGETU, "PIOCGETU", "read user area" },
+#if defined (PIOCGETUTK) && (defined(KERNEL) || defined(SHOW_UTT)) /* osf */
+ { PIOCGETUTK, "PIOCGETUTK", "get the utask struct" },
+#endif
+ { PIOCGEXIT, "PIOCGEXIT", "get traced syscall exit set" },
+ { PIOCGFAULT, "PIOCGFAULT", "get traced fault set" },
+#ifdef PIOCGFPCR /* osf */
+ { PIOCGFPCR, "PIOCGFPCR", "get FP control register" },
+ { PIOCSFPCR, "PIOCSFPCR", "set FP conrtol register" },
+#endif
+ { PIOCGFPREG, "PIOCGFPREG", "get floating point registers" },
+ { PIOCGHOLD, "PIOCGHOLD", "get held signal set" },
+ { PIOCGREG, "PIOCGREG", "get general registers" },
+ { PIOCGROUPS, "PIOCGROUPS", "get supplementary groups" },
+#ifdef PIOCGSPCACT /* osf */
+ { PIOCGSPCACT, "PIOCGSPCACT", "get special action" },
+ { PIOCSSPCACT, "PIOCSSPCACT", "set special action" },
+#endif
+ { PIOCGTRACE, "PIOCGTRACE", "get traced signal set" },
+#ifdef PIOCGWATCH /* irix watchpoints */
+ { PIOCGWATCH, "PIOCGWATCH", "get watchpoint" },
+ { PIOCSWATCH, "PIOCSWATCH", "set watchpoint" },
+ { PIOCNWATCH, "PIOCNWATCH", "get number of watchpoints" },
+#endif /* irix watchpoints */
+#ifdef PIOCGWIN /* solaris sparc */
+ { PIOCGWIN, "PIOCGWIN", "get gwindows_t" },
+#endif
+#ifdef PIOCGXREG /* solaris sparc extra regs */
+ { PIOCGXREGSIZE, "PIOCXREGSIZE", "get extra register state size" },
+ { PIOCGXREG, "PIOCGXREG", "get extra register state" },
+ { PIOCSXREG, "PIOCSXREG", "set extra register state" },
+#endif /* XREG */
+ { PIOCKILL, "PIOCKILL", "send signal" },
+#ifdef PIOCLDT /* solaris i386 */
+ { PIOCLDT, "PIOCLDT", "get LDT" },
+ { PIOCNLDT, "PIOCNLDT", "get number of LDT entries" },
+#endif
+#ifdef PIOCLSTATUS /* solaris and unixware */
+ { PIOCLSTATUS, "PIOCLSTATUS", "get status of all lwps" },
+ { PIOCLUSAGE, "PIOCLUSAGE", "get resource usage of all lwps" },
+ { PIOCOPENLWP, "PIOCOPENLWP", "get lwp file descriptor" },
+ { PIOCLWPIDS, "PIOCLWPIDS", "get lwp identifiers" },
+#endif /* LWP */
+ { PIOCMAP, "PIOCMAP", "get memory map information" },
+ { PIOCMAXSIG, "PIOCMAXSIG", "get max signal number" },
+ { PIOCNICE, "PIOCNICE", "set nice priority" },
+ { PIOCNMAP, "PIOCNMAP", "get number of memory mappings" },
+ { PIOCOPENM, "PIOCOPENM", "open mapped object for reading" },
+#ifdef PIOCOPENMOBS /* osf */
+ { PIOCOPENMOBS, "PIOCOPENMOBS", "open mapped object" },
+#endif
+#ifdef PIOCOPENPD /* solaris */
+ { PIOCOPENPD, "PIOCOPENPD", "get page data file descriptor" },
+#endif
+ { PIOCPSINFO, "PIOCPSINFO", "get ps(1) information" },
+ { PIOCRESET, "PIOCRESET", "reset process flags" },
+ { PIOCRFORK, "PIOCRFORK", "reset inherit-on-fork flag" },
+ { PIOCRRLC, "PIOCRRLC", "reset run-on-last-close flag" },
+ { PIOCRUN, "PIOCRUN", "make process runnable" },
+#ifdef PIOCSAVECCNTRS /* irix */
+ { PIOCSAVECCNTRS, "PIOCSAVECCNTRS", "parent gets child cntrs" },
+#endif
+ { PIOCSENTRY, "PIOCSENTRY", "set traced syscall entry set" },
+ { PIOCSET, "PIOCSET", "set process flags" },
+ { PIOCSEXIT, "PIOCSEXIT", "set traced syscall exit set" },
+ { PIOCSFAULT, "PIOCSFAULT", "set traced fault set" },
+ { PIOCSFORK, "PIOCSFORK", "set inherit-on-fork flag" },
+ { PIOCSFPREG, "PIOCSFPREG", "set floating point registers" },
+ { PIOCSHOLD, "PIOCSHOLD", "set held signal set" },
+ { PIOCSREG, "PIOCSREG", "set general registers" },
+ { PIOCSRLC, "PIOCSRLC", "set run-on-last-close flag" },
+ { PIOCSSIG, "PIOCSSIG", "set current signal" },
+ { PIOCSTATUS, "PIOCSTATUS", "get process status" },
+ { PIOCSTOP, "PIOCSTOP", "post stop request" },
+ { PIOCSTRACE, "PIOCSTRACE", "set traced signal set" },
+ { PIOCUNKILL, "PIOCUNKILL", "delete a signal" },
+#ifdef PIOCUSAGE /* solaris */
+ { PIOCUSAGE, "PIOCUSAGE", "get resource usage" },
+#endif
+ { PIOCWSTOP, "PIOCWSTOP", "wait for process to stop" },
+
+#ifdef PIOCNTHR /* osf threads */
+ { PIOCNTHR, "PIOCNTHR", "get thread count" },
+ { PIOCRTINH, "PIOCRTINH", "reset inherit-on-thread-creation" },
+ { PIOCSTINH, "PIOCSTINH", "set inherit-on-thread-creation" },
+ { PIOCTLIST, "PIOCTLIST", "get thread ids" },
+ { PIOCXPTH, "PIOCXPTH", "translate port to thread handle" },
+ { PIOCTRUN, "PIOCTRUN", "make thread runnable" },
+ { PIOCTSTATUS, "PIOCTSTATUS", "get thread status" },
+ { PIOCTSTOP, "PIOCTSTOP", "stop a thread" },
+ /* ... TGTRACE TSTRACE TSSIG TKILL TUNKILL TCFAULT TGFAULT TSFAULT
+ TGFPREG TSFPREG TGREG TSREG TACTION TTERM TABRUN TGENTRY TSENTRY
+ TGEXIT TSEXIT TSHOLD ... thread functions */
+#endif /* osf threads */
+ { -1, NULL, NULL }
+};
+
+int
+ioctl_with_trace (fd, opcode, ptr, file, line)
+ int fd;
+ long opcode;
+ void *ptr;
+ char *file;
+ int line;
+{
+ int i, ret, arg1;
+
+ if (procfs_trace)
+ {
+ if (procfs_file == NULL && procfs_filename != NULL)
+ procfs_file = fopen (procfs_filename, "a");
+
+ for (i = 0; ioctl_table[i].name != NULL; i++)
+ if (ioctl_table[i].value == opcode)
+ break;
+
+ if (info_verbose)
+ fprintf (procfs_file ? procfs_file : stdout,
+ "%s:%d -- ", file, line);
+ switch (opcode) {
+ case PIOCSET:
+ arg1 = ptr ? *(long *) ptr : 0;
+ fprintf (procfs_file ? procfs_file : stdout,
+ "ioctl (PIOCSET, %s) %s\n",
+ arg1 == PR_FORK ? "PR_FORK" :
+ arg1 == PR_RLC ? "PR_RLC" :
+#ifdef PR_ASYNC
+ arg1 == PR_ASYNC ? "PR_ASYNC" :
+#endif
+ "<unknown flag>",
+ info_verbose ? ioctl_table[i].desc : "");
+ break;
+ case PIOCRESET:
+ arg1 = ptr ? *(long *) ptr : 0;
+ fprintf (procfs_file ? procfs_file : stdout,
+ "ioctl (PIOCRESET, %s) %s\n",
+ arg1 == PR_FORK ? "PR_FORK" :
+ arg1 == PR_RLC ? "PR_RLC" :
+#ifdef PR_ASYNC
+ arg1 == PR_ASYNC ? "PR_ASYNC" :
+#endif
+ "<unknown flag>",
+ info_verbose ? ioctl_table[i].desc : "");
+ break;
+ case PIOCSTRACE:
+ fprintf (procfs_file ? procfs_file : stdout,
+ "ioctl (PIOCSTRACE) ");
+ proc_prettyfprint_signalset (procfs_file ? procfs_file : stdout,
+ (sigset_t *) ptr, 0);
+ break;
+ case PIOCSFAULT:
+ fprintf (procfs_file ? procfs_file : stdout,
+ "ioctl (%s) ",
+ opcode == PIOCSFAULT ? "PIOCSFAULT" : "PIOCGFAULT");
+ proc_prettyfprint_faultset (procfs_file ? procfs_file : stdout,
+ (fltset_t *) ptr, 0);
+ break;
+ case PIOCSENTRY:
+ fprintf (procfs_file ? procfs_file : stdout,
+ "ioctl (%s) ",
+ opcode == PIOCSENTRY ? "PIOCSENTRY" : "PIOCGENTRY");
+ proc_prettyfprint_syscalls (procfs_file ? procfs_file : stdout,
+ (sysset_t *) ptr, 0);
+ break;
+ case PIOCSEXIT:
+ fprintf (procfs_file ? procfs_file : stdout,
+ "ioctl (%s) ",
+ opcode == PIOCSEXIT ? "PIOCSEXIT" : "PIOCGEXIT");
+ proc_prettyfprint_syscalls (procfs_file ? procfs_file : stdout,
+ (sysset_t *) ptr, 0);
+ break;
+ case PIOCSHOLD:
+ fprintf (procfs_file ? procfs_file : stdout,
+ "ioctl (%s) ",
+ opcode == PIOCSHOLD ? "PIOCSHOLD" : "PIOCGHOLD");
+ proc_prettyfprint_signalset (procfs_file ? procfs_file : stdout,
+ (sigset_t *) ptr, 0);
+ break;
+ case PIOCSSIG:
+ fprintf (procfs_file ? procfs_file : stdout,
+ "ioctl (PIOCSSIG) ");
+ proc_prettyfprint_signal (procfs_file ? procfs_file : stdout,
+ ptr ? ((siginfo_t *) ptr)->si_signo : 0,
+ 0);
+ fprintf (procfs_file ? procfs_file : stdout, "\n");
+ break;
+ case PIOCRUN:
+ fprintf (procfs_file ? procfs_file : stdout,
+ "ioctl (PIOCRUN) ");
+
+ arg1 = ptr ? *(long *) ptr : 0;
+ if (arg1 & PRCSIG)
+ fprintf (procfs_file ? procfs_file : stdout, "clearSig ");
+ if (arg1 & PRCFAULT)
+ fprintf (procfs_file ? procfs_file : stdout, "clearFlt ");
+ if (arg1 & PRSTRACE)
+ fprintf (procfs_file ? procfs_file : stdout, "setTrace ");
+ if (arg1 & PRSHOLD)
+ fprintf (procfs_file ? procfs_file : stdout, "setHold ");
+ if (arg1 & PRSFAULT)
+ fprintf (procfs_file ? procfs_file : stdout, "setFlt ");
+ if (arg1 & PRSVADDR)
+ fprintf (procfs_file ? procfs_file : stdout, "setVaddr ");
+ if (arg1 & PRSTEP)
+ fprintf (procfs_file ? procfs_file : stdout, "step ");
+ if (arg1 & PRSABORT)
+ fprintf (procfs_file ? procfs_file : stdout, "syscallAbort ");
+ if (arg1 & PRSTOP)
+ fprintf (procfs_file ? procfs_file : stdout, "stopReq ");
+
+ fprintf (procfs_file ? procfs_file : stdout, "\n");
+ break;
+ case PIOCKILL:
+ fprintf (procfs_file ? procfs_file : stdout,
+ "ioctl (PIOCKILL) ");
+ proc_prettyfprint_signal (procfs_file ? procfs_file : stdout,
+ ptr ? *(long *) ptr : 0, 0);
+ fprintf (procfs_file ? procfs_file : stdout, "\n");
+ break;
+#ifdef PIOCSSPCACT
+ case PIOCSSPCACT:
+ fprintf (procfs_file ? procfs_file : stdout,
+ "ioctl (PIOCSSPCACT) ");
+ arg1 = ptr ? *(long *) ptr : 0;
+ if (arg1 & PRFS_STOPFORK)
+ fprintf (procfs_file ? procfs_file : stdout, "stopFork ");
+ if (arg1 & PRFS_STOPEXEC)
+ fprintf (procfs_file ? procfs_file : stdout, "stopExec ");
+ if (arg1 & PRFS_STOPTERM)
+ fprintf (procfs_file ? procfs_file : stdout, "stopTerm ");
+ if (arg1 & PRFS_STOPTCR)
+ fprintf (procfs_file ? procfs_file : stdout, "stopThreadCreate ");
+ if (arg1 & PRFS_STOPTTERM)
+ fprintf (procfs_file ? procfs_file : stdout, "stopThreadTerm ");
+ if (arg1 & PRFS_KOLC)
+ fprintf (procfs_file ? procfs_file : stdout, "killOnLastClose ");
+ fprintf (procfs_file ? procfs_file : stdout, "\n");
+ break;
+#endif /* PIOCSSPCACT */
+ default:
+ if (ioctl_table[i].name)
+ fprintf (procfs_file ? procfs_file : stdout,
+ "ioctl (%s) %s\n",
+ ioctl_table[i].name,
+ info_verbose ? ioctl_table[i].desc : "");
+ else
+ fprintf (procfs_file ? procfs_file : stdout,
+ "ioctl (<unknown %ld (0x%lx)) \n", opcode, opcode);
+ break;
+ }
+ if (procfs_file)
+ fflush (procfs_file);
+ }
+ ret = ioctl (fd, opcode, ptr);
+ if (procfs_trace && ret < 0)
+ {
+ fprintf (procfs_file ? procfs_file : stdout,
+ "[ioctl (%s) FAILED!]\n",
+ ioctl_table[i].name != NULL ?
+ ioctl_table[i].name : "<unknown>");
+ if (procfs_file)
+ fflush (procfs_file);
+ }
+
+ return ret;
+}
+
+#else /* NEW_PROC_API */
+
+static struct trans rw_table[] = {
+#ifdef PCAGENT /* solaris */
+ { PCAGENT, "PCAGENT", "create agent lwp with regs from argument" },
+#endif
+ { PCCFAULT, "PCCFAULT", "clear current fault" },
+#ifdef PCCSIG /* solaris */
+ { PCCSIG, "PCCSIG", "clear current signal" },
+#endif
+ { PCDSTOP, "PCDSTOP", "post stop request" },
+ { PCKILL, "PCKILL", "post a signal" },
+ { PCNICE, "PCNICE", "set nice priority" },
+#ifdef PCREAD /* solaris */
+ { PCREAD, "PCREAD", "read from the address space" },
+ { PCWRITE, "PCWRITE", "write to the address space" },
+#endif
+#ifdef PCRESET /* unixware */
+ { PCRESET, "PCRESET", "unset modes" },
+#endif
+ { PCRUN, "PCRUN", "make process/lwp runnable" },
+#ifdef PCSASRS /* solaris 2.7 only */
+ { PCSASRS, "PCSASRS", "set ancillary state registers" },
+#endif
+#ifdef PCSCRED /* solaris */
+ { PCSCRED, "PCSCRED", "set process credentials" },
+#endif
+ { PCSENTRY, "PCSENTRY", "set traced syscall entry set" },
+ { PCSET, "PCSET", "set modes" },
+ { PCSEXIT, "PCSEXIT", "set traced syscall exit set" },
+ { PCSFAULT, "PCSFAULT", "set traced fault set" },
+ { PCSFPREG, "PCSFPREG", "set floating point registers" },
+ { PCSHOLD, "PCSHOLD", "set signal mask" },
+ { PCSREG, "PCSREG", "set general registers" },
+ { PCSSIG, "PCSSIG", "set current signal" },
+ { PCSTOP, "PCSTOP", "post stop request and wait" },
+ { PCSTRACE, "PCSTRACE", "set traced signal set" },
+#ifdef PCSVADDR /* solaris */
+ { PCSVADDR, "PCSVADDR", "set pc virtual address" },
+#endif
+#ifdef PCSXREG /* solaris sparc only */
+ { PCSXREG, "PCSXREG", "set extra registers" },
+#endif
+#ifdef PCTWSTOP /* solaris */
+ { PCTWSTOP, "PCTWSTOP", "wait for stop, with timeout arg" },
+#endif
+ { PCUNKILL, "PCUNKILL", "delete a pending signal" },
+#ifdef PCUNSET /* solaris */
+ { PCUNSET, "PCUNSET", "unset modes" },
+#endif
+#ifdef PCWATCH /* solaris */
+ { PCWATCH, "PCWATCH", "set/unset watched memory area" },
+#endif
+ { PCWSTOP, "PCWSTOP", "wait for process/lwp to stop, no timeout" },
+ { 0, NULL, NULL }
+};
+
+static off_t lseek_offset;
+
+int
+write_with_trace (fd, arg, len, file, line)
+ int fd;
+ long *arg;
+ size_t len;
+ char *file;
+ int line;
+{
+ int i;
+ long opcode = arg[0];
+ int ret;
+
+ if (procfs_trace)
+ {
+ if (procfs_file == NULL && procfs_filename != NULL)
+ procfs_file = fopen (procfs_filename, "a");
+
+ for (i = 0; rw_table[i].name != NULL; i++)
+ if (rw_table[i].value == opcode)
+ break;
+
+ if (info_verbose)
+ fprintf (procfs_file ? procfs_file : stdout,
+ "%s:%d -- ", file, line);
+ switch (opcode) {
+ case PCSET:
+ fprintf (procfs_file ? procfs_file : stdout,
+ "write (PCSET, %s) %s\n",
+ arg[1] == PR_FORK ? "PR_FORK" :
+ arg[1] == PR_RLC ? "PR_RLC" :
+#ifdef PR_ASYNC
+ arg[1] == PR_ASYNC ? "PR_ASYNC" :
+#endif
+ "<unknown flag>",
+ info_verbose ? rw_table[i].desc : "");
+ break;
+#ifdef PCUNSET
+ case PCUNSET:
+#endif
+#ifdef PCRESET
+ case PCRESET:
+#endif
+ fprintf (procfs_file ? procfs_file : stdout,
+ "write (PCRESET, %s) %s\n",
+ arg[1] == PR_FORK ? "PR_FORK" :
+ arg[1] == PR_RLC ? "PR_RLC" :
+#ifdef PR_ASYNC
+ arg[1] == PR_ASYNC ? "PR_ASYNC" :
+#endif
+ "<unknown flag>",
+ info_verbose ? rw_table[i].desc : "");
+ break;
+ case PCSTRACE:
+ fprintf (procfs_file ? procfs_file : stdout,
+ "write (PCSTRACE) ");
+ proc_prettyfprint_signalset (procfs_file ? procfs_file : stdout,
+ (sigset_t *) &arg[1], 0);
+ break;
+ case PCSFAULT:
+ fprintf (procfs_file ? procfs_file : stdout,
+ "write (PCSFAULT) ");
+ proc_prettyfprint_faultset (procfs_file ? procfs_file : stdout,
+ (fltset_t *) &arg[1], 0);
+ break;
+ case PCSENTRY:
+ fprintf (procfs_file ? procfs_file : stdout,
+ "write (PCSENTRY) ");
+ proc_prettyfprint_syscalls (procfs_file ? procfs_file : stdout,
+ (sysset_t *) &arg[1], 0);
+ break;
+ case PCSEXIT:
+ fprintf (procfs_file ? procfs_file : stdout,
+ "write (PCSEXIT) ");
+ proc_prettyfprint_syscalls (procfs_file ? procfs_file : stdout,
+ (sysset_t *) &arg[1], 0);
+ break;
+ case PCSHOLD:
+ fprintf (procfs_file ? procfs_file : stdout,
+ "write (PCSHOLD) ");
+ proc_prettyfprint_signalset (procfs_file ? procfs_file : stdout,
+ (sigset_t *) &arg[1], 0);
+ break;
+ case PCSSIG:
+ fprintf (procfs_file ? procfs_file : stdout,
+ "write (PCSSIG) ");
+ proc_prettyfprint_signal (procfs_file ? procfs_file : stdout,
+ arg[1] ? ((siginfo_t *) &arg[1])->si_signo
+ : 0,
+ 0);
+ fprintf (procfs_file ? procfs_file : stdout, "\n");
+ break;
+ case PCRUN:
+ fprintf (procfs_file ? procfs_file : stdout,
+ "write (PCRUN) ");
+ if (arg[1] & PRCSIG)
+ fprintf (procfs_file ? procfs_file : stdout, "clearSig ");
+ if (arg[1] & PRCFAULT)
+ fprintf (procfs_file ? procfs_file : stdout, "clearFlt ");
+ if (arg[1] & PRSTEP)
+ fprintf (procfs_file ? procfs_file : stdout, "step ");
+ if (arg[1] & PRSABORT)
+ fprintf (procfs_file ? procfs_file : stdout, "syscallAbort ");
+ if (arg[1] & PRSTOP)
+ fprintf (procfs_file ? procfs_file : stdout, "stopReq ");
+
+ fprintf (procfs_file ? procfs_file : stdout, "\n");
+ break;
+ case PCKILL:
+ fprintf (procfs_file ? procfs_file : stdout,
+ "write (PCKILL) ");
+ proc_prettyfprint_signal (procfs_file ? procfs_file : stdout,
+ arg[1], 0);
+ fprintf (procfs_file ? procfs_file : stdout, "\n");
+ break;
+ default:
+ {
+ static unsigned char break_insn[] = BREAKPOINT;
+
+ if (len == sizeof (break_insn) &&
+ memcmp (arg, &break_insn, len) == 0)
+ fprintf (procfs_file ? procfs_file : stdout,
+ "write (<breakpoint at 0x%08x>) \n", lseek_offset);
+ else if (rw_table[i].name)
+ fprintf (procfs_file ? procfs_file : stdout,
+ "write (%s) %s\n",
+ rw_table[i].name,
+ info_verbose ? rw_table[i].desc : "");
+ else
+ {
+ if (lseek_offset != -1)
+ fprintf (procfs_file ? procfs_file : stdout,
+ "write (<unknown>, %d bytes at 0x%08x) \n",
+ len, lseek_offset);
+ else
+ fprintf (procfs_file ? procfs_file : stdout,
+ "write (<unknown>, %d bytes) \n", len);
+ }
+ break;
+ }
+ }
+ if (procfs_file)
+ fflush (procfs_file);
+ }
+ ret = write (fd, arg, len);
+ if (procfs_trace && ret != len)
+ {
+ fprintf (procfs_file ? procfs_file : stdout,
+ "[write (%s) FAILED!\n",
+ rw_table[i].name != NULL ?
+ rw_table[i].name : "<unknown>");
+ if (procfs_file)
+ fflush (procfs_file);
+ }
+
+ lseek_offset = -1;
+ return ret;
+}
+
+off_t
+lseek_with_trace (fd, offset, whence, file, line)
+ int fd;
+ off_t offset;
+ int whence;
+ char *file;
+ int line;
+{
+ off_t ret;
+
+#if 0 /* don't need output, just need address */
+ if (procfs_trace)
+ {
+ if (procfs_file == NULL && procfs_filename != NULL)
+ procfs_file = fopen (procfs_filename, "a");
+
+ if (info_verbose)
+ fprintf (procfs_file ? procfs_file : stdout,
+ "%s:%d -- ", file, line);
+ fprintf (procfs_file ? procfs_file : stdout,
+ "lseek (0x%08x, %s) \n", offset,
+ whence == SEEK_SET ? "SEEK_SET" :
+ whence == SEEK_CUR ? "SEEK_CUR" :
+ whence == SEEK_END ? "SEEK_END" :
+ "<unknown whence>");
+ if (procfs_file)
+ fflush (procfs_file);
+ }
+#endif
+ ret = lseek (fd, offset, whence);
+ lseek_offset = ret;
+ if (procfs_trace && ret == -1)
+ {
+ if (procfs_file == NULL && procfs_filename != NULL)
+ procfs_file = fopen (procfs_filename, "a");
+
+ fprintf (procfs_file ? procfs_file : stdout,
+ "[lseek (0x%08x) FAILED!\n", offset);
+ if (procfs_file)
+ fflush (procfs_file);
+ }
+
+ return ret;
+}
+
+#endif /* NEW_PROC_API */
+
+int
+open_with_trace (filename, mode, file, line)
+ char *filename;
+ int mode;
+ char *file;
+ int line;
+{
+ int ret = open (filename, mode);
+
+ if (procfs_trace)
+ {
+ if (procfs_file == NULL && procfs_filename != NULL)
+ procfs_file = fopen (procfs_filename, "a");
+
+ if (info_verbose)
+ fprintf (procfs_file ? procfs_file : stdout,
+ "%s:%d -- ", file, line);
+ fprintf (procfs_file ? procfs_file : stdout,
+ "%d = open (%s, ", ret, filename);
+ if (mode == O_RDONLY)
+ fprintf (procfs_file ? procfs_file : stdout, "O_RDONLY) %d\n", line);
+ else if (mode == O_WRONLY)
+ fprintf (procfs_file ? procfs_file : stdout, "O_WRONLY) %d\n", line);
+ else if (mode == O_RDWR)
+ fprintf (procfs_file ? procfs_file : stdout, "O_RDWR) %d\n", line);
+ if (procfs_file)
+ fflush (procfs_file);
+ }
+
+ return ret;
+}
+
+int
+close_with_trace (fd, file, line)
+ int fd;
+ char *file;
+ int line;
+{
+ int ret = close (fd);
+
+ if (procfs_trace)
+ {
+ if (procfs_file == NULL && procfs_filename != NULL)
+ procfs_file = fopen (procfs_filename, "a");
+
+ if (info_verbose)
+ fprintf (procfs_file ? procfs_file : stdout,
+ "%s:%d -- ", file, line);
+ fprintf (procfs_file ? procfs_file : stdout,
+ "%d = close (%d)\n", ret, fd);
+ if (procfs_file)
+ fflush (procfs_file);
+ }
+
+ return ret;
+}
+
+int
+wait_with_trace (wstat, file, line)
+ int *wstat;
+ char *file;
+ int line;
+{
+ int ret, lstat = 0;
+
+ if (procfs_trace)
+ {
+ if (procfs_file == NULL && procfs_filename != NULL)
+ procfs_file = fopen (procfs_filename, "a");
+
+ if (info_verbose)
+ fprintf (procfs_file ? procfs_file : stdout,
+ "%s:%d -- ", file, line);
+ fprintf (procfs_file ? procfs_file : stdout,
+ "wait (line %d) ", line);
+ if (procfs_file)
+ fflush (procfs_file);
+ }
+ ret = wait (&lstat);
+ if (procfs_trace)
+ {
+ fprintf (procfs_file ? procfs_file : stdout,
+ "returned pid %d, status 0x%x\n", ret, lstat);
+ if (procfs_file)
+ fflush (procfs_file);
+ }
+ if (wstat)
+ *wstat = lstat;
+
+ return ret;
+}
+
+void
+procfs_note (msg, file, line)
+ char *msg;
+ char *file;
+ int line;
+{
+ if (procfs_trace)
+ {
+ if (procfs_file == NULL && procfs_filename != NULL)
+ procfs_file = fopen (procfs_filename, "a");
+
+ if (info_verbose)
+ fprintf (procfs_file ? procfs_file : stdout,
+ "%s:%d -- ", file, line);
+ fprintf (procfs_file ? procfs_file : stdout, msg);
+ if (procfs_file)
+ fflush (procfs_file);
+ }
+}
+
+void
+proc_prettyfprint_status (flags, why, what, thread)
+ long flags;
+ int why;
+ int what;
+ int thread;
+{
+ if (procfs_trace)
+ {
+ if (procfs_file == NULL && procfs_filename != NULL)
+ procfs_file = fopen (procfs_filename, "a");
+
+ if (thread)
+ fprintf (procfs_file ? procfs_file : stdout,
+ "Thread %d: ", thread);
+
+ proc_prettyfprint_flags (procfs_file ? procfs_file : stdout,
+ flags, 0);
+
+ if (flags & (PR_STOPPED | PR_ISTOP))
+ proc_prettyfprint_why (procfs_file ? procfs_file : stdout,
+ why, what, 0);
+ if (procfs_file)
+ fflush (procfs_file);
+ }
+}
+
+
+void
+_initialize_proc_api ()
+{
+ struct cmd_list_element *c;
+
+ c = add_set_cmd ("procfs-trace", no_class,
+ var_boolean, (char *) &procfs_trace,
+ "Set tracing for /proc ioctl calls.\n", &setlist);
+
+ add_show_from_set (c, &showlist);
+ c->function.sfunc = set_procfs_trace_cmd;
+
+ c = add_set_cmd ("procfs-file", no_class, var_filename,
+ (char *) &procfs_filename,
+ "Set filename for /proc tracefile.\n", &setlist);
+
+ add_show_from_set (c, &showlist);
+ c->function.sfunc = set_procfs_file_cmd;
+
+#ifdef TRACE_PROCFS
+ if (procfs_file == NULL && procfs_filename != NULL)
+ procfs_file = fopen (procfs_filename, "a");
+#endif
+}
diff --git a/gdb/proc_events.c b/gdb/proc_events.c
new file mode 100755
index 0000000..11b865d
--- /dev/null
+++ b/gdb/proc_events.c
@@ -0,0 +1,1785 @@
+/*
+ * Pretty-print "events of interest".
+ *
+ * This module includes pretty-print routines for:
+ * faults (hardware exceptions):
+ * signals (software interrupts):
+ * syscalls
+ *
+ * FIXME: At present, the syscall translation table must be initialized,
+ * which is not true of the other translation tables.
+ */
+
+#include "defs.h"
+
+#if defined (NEW_PROC_API)
+#define _STRUCTURED_PROC 1
+#endif
+
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/procfs.h>
+#include <sys/syscall.h>
+#include <sys/fault.h>
+
+/* Much of the information used in the /proc interface, particularly for
+ printing status information, is kept as tables of structures of the
+ following form. These tables can be used to map numeric values to
+ their symbolic names and to a string that describes their specific use. */
+
+struct trans {
+ int value; /* The numeric value */
+ char *name; /* The equivalent symbolic value */
+ char *desc; /* Short description of value */
+};
+
+/*
+ * pretty print syscalls
+ */
+
+/* Ugh -- Unixware and Solaris spell these differently! */
+
+#ifdef SYS_lwpcreate
+#define SYS_lwp_create SYS_lwpcreate
+#endif
+
+#ifdef SYS_lwpexit
+#define SYS_lwp_exit SYS_lwpexit
+#endif
+
+#ifdef SYS_lwpwait
+#define SYS_lwp_wait SYS_lwpwait
+#endif
+
+#ifdef SYS_lwpself
+#define SYS_lwp_self SYS_lwpself
+#endif
+
+#ifdef SYS_lwpinfo
+#define SYS_lwp_info SYS_lwpinfo
+#endif
+
+#ifdef SYS_lwpprivate
+#define SYS_lwp_private SYS_lwpprivate
+#endif
+
+#ifdef SYS_lwpkill
+#define SYS_lwp_kill SYS_lwpkill
+#endif
+
+#ifdef SYS_lwpsuspend
+#define SYS_lwp_suspend SYS_lwpsuspend
+#endif
+
+#ifdef SYS_lwpcontinue
+#define SYS_lwp_continue SYS_lwpcontinue
+#endif
+
+
+/* Syscall translation table. */
+
+#define MAX_SYSCALLS 262 /* pretty arbitrary */
+static char * syscall_table[MAX_SYSCALLS];
+
+void
+init_syscall_table (void)
+{
+#if defined (SYS_BSD_getime)
+ syscall_table[SYS_BSD_getime] = "BSD_getime";
+#endif
+#if defined (SYS_BSDgetpgrp)
+ syscall_table[SYS_BSDgetpgrp] = "BSDgetpgrp";
+#endif
+#if defined (SYS_BSDsetpgrp)
+ syscall_table[SYS_BSDsetpgrp] = "BSDsetpgrp";
+#endif
+#if defined (SYS_acancel)
+ syscall_table[SYS_acancel] = "acancel";
+#endif
+#if defined (SYS_accept)
+ syscall_table[SYS_accept] = "accept";
+#endif
+#if defined (SYS_access)
+ syscall_table[SYS_access] = "access";
+#endif
+#if defined (SYS_acct)
+ syscall_table[SYS_acct] = "acct";
+#endif
+#if defined (SYS_acl)
+ syscall_table[SYS_acl] = "acl";
+#endif
+#if defined (SYS_aclipc)
+ syscall_table[SYS_aclipc] = "aclipc";
+#endif
+#if defined (SYS_adjtime)
+ syscall_table[SYS_adjtime] = "adjtime";
+#endif
+#if defined (SYS_afs_syscall)
+ syscall_table[SYS_afs_syscall] = "afs_syscall";
+#endif
+#if defined (SYS_alarm)
+ syscall_table[SYS_alarm] = "alarm";
+#endif
+#if defined (SYS_alt_plock)
+ syscall_table[SYS_alt_plock] = "alt_plock";
+#endif
+#if defined (SYS_alt_sigpending)
+ syscall_table[SYS_alt_sigpending] = "alt_sigpending";
+#endif
+#if defined (SYS_async)
+ syscall_table[SYS_async] = "async";
+#endif
+#if defined (SYS_async_daemon)
+ syscall_table[SYS_async_daemon] = "async_daemon";
+#endif
+#if defined (SYS_audcntl)
+ syscall_table[SYS_audcntl] = "audcntl";
+#endif
+#if defined (SYS_audgen)
+ syscall_table[SYS_audgen] = "audgen";
+#endif
+#if defined (SYS_auditbuf)
+ syscall_table[SYS_auditbuf] = "auditbuf";
+#endif
+#if defined (SYS_auditctl)
+ syscall_table[SYS_auditctl] = "auditctl";
+#endif
+#if defined (SYS_auditdmp)
+ syscall_table[SYS_auditdmp] = "auditdmp";
+#endif
+#if defined (SYS_auditevt)
+ syscall_table[SYS_auditevt] = "auditevt";
+#endif
+#if defined (SYS_auditlog)
+ syscall_table[SYS_auditlog] = "auditlog";
+#endif
+#if defined (SYS_auditsys)
+ syscall_table[SYS_auditsys] = "auditsys";
+#endif
+#if defined (SYS_bind)
+ syscall_table[SYS_bind] = "bind";
+#endif
+#if defined (SYS_block)
+ syscall_table[SYS_block] = "block";
+#endif
+#if defined (SYS_brk)
+ syscall_table[SYS_brk] = "brk";
+#endif
+#if defined (SYS_cachectl)
+ syscall_table[SYS_cachectl] = "cachectl";
+#endif
+#if defined (SYS_cacheflush)
+ syscall_table[SYS_cacheflush] = "cacheflush";
+#endif
+#if defined (SYS_cancelblock)
+ syscall_table[SYS_cancelblock] = "cancelblock";
+#endif
+#if defined (SYS_cg_bind)
+ syscall_table[SYS_cg_bind] = "cg_bind";
+#endif
+#if defined (SYS_cg_current)
+ syscall_table[SYS_cg_current] = "cg_current";
+#endif
+#if defined (SYS_cg_ids)
+ syscall_table[SYS_cg_ids] = "cg_ids";
+#endif
+#if defined (SYS_cg_info)
+ syscall_table[SYS_cg_info] = "cg_info";
+#endif
+#if defined (SYS_cg_memloc)
+ syscall_table[SYS_cg_memloc] = "cg_memloc";
+#endif
+#if defined (SYS_cg_processors)
+ syscall_table[SYS_cg_processors] = "cg_processors";
+#endif
+#if defined (SYS_chdir)
+ syscall_table[SYS_chdir] = "chdir";
+#endif
+#if defined (SYS_chflags)
+ syscall_table[SYS_chflags] = "chflags";
+#endif
+#if defined (SYS_chmod)
+ syscall_table[SYS_chmod] = "chmod";
+#endif
+#if defined (SYS_chown)
+ syscall_table[SYS_chown] = "chown";
+#endif
+#if defined (SYS_chroot)
+ syscall_table[SYS_chroot] = "chroot";
+#endif
+#if defined (SYS_clocal)
+ syscall_table[SYS_clocal] = "clocal";
+#endif
+#if defined (SYS_clock_getres)
+ syscall_table[SYS_clock_getres] = "clock_getres";
+#endif
+#if defined (SYS_clock_gettime)
+ syscall_table[SYS_clock_gettime] = "clock_gettime";
+#endif
+#if defined (SYS_clock_settime)
+ syscall_table[SYS_clock_settime] = "clock_settime";
+#endif
+#if defined (SYS_close)
+ syscall_table[SYS_close] = "close";
+#endif
+#if defined (SYS_connect)
+ syscall_table[SYS_connect] = "connect";
+#endif
+#if defined (SYS_context)
+ syscall_table[SYS_context] = "context";
+#endif
+#if defined (SYS_creat)
+ syscall_table[SYS_creat] = "creat";
+#endif
+#if defined (SYS_creat64)
+ syscall_table[SYS_creat64] = "creat64";
+#endif
+#if defined (SYS_devstat)
+ syscall_table[SYS_devstat] = "devstat";
+#endif
+#if defined (SYS_dmi)
+ syscall_table[SYS_dmi] = "dmi";
+#endif
+#if defined (SYS_door)
+ syscall_table[SYS_door] = "door";
+#endif
+#if defined (SYS_dshmsys)
+ syscall_table[SYS_dshmsys] = "dshmsys";
+#endif
+#if defined (SYS_dup)
+ syscall_table[SYS_dup] = "dup";
+#endif
+#if defined (SYS_dup2)
+ syscall_table[SYS_dup2] = "dup2";
+#endif
+#if defined (SYS_evsys)
+ syscall_table[SYS_evsys] = "evsys";
+#endif
+#if defined (SYS_evtrapret)
+ syscall_table[SYS_evtrapret] = "evtrapret";
+#endif
+#if defined (SYS_exec)
+ syscall_table[SYS_exec] = "exec";
+#endif
+#if defined (SYS_exec_with_loader)
+ syscall_table[SYS_exec_with_loader] = "exec_with_loader";
+#endif
+#if defined (SYS_execv)
+ syscall_table[SYS_execv] = "execv";
+#endif
+#if defined (SYS_execve)
+ syscall_table[SYS_execve] = "execve";
+#endif
+#if defined (SYS_exit)
+ syscall_table[SYS_exit] = "exit";
+#endif
+#if defined (SYS_exportfs)
+ syscall_table[SYS_exportfs] = "exportfs";
+#endif
+#if defined (SYS_facl)
+ syscall_table[SYS_facl] = "facl";
+#endif
+#if defined (SYS_fchdir)
+ syscall_table[SYS_fchdir] = "fchdir";
+#endif
+#if defined (SYS_fchflags)
+ syscall_table[SYS_fchflags] = "fchflags";
+#endif
+#if defined (SYS_fchmod)
+ syscall_table[SYS_fchmod] = "fchmod";
+#endif
+#if defined (SYS_fchown)
+ syscall_table[SYS_fchown] = "fchown";
+#endif
+#if defined (SYS_fchroot)
+ syscall_table[SYS_fchroot] = "fchroot";
+#endif
+#if defined (SYS_fcntl)
+ syscall_table[SYS_fcntl] = "fcntl";
+#endif
+#if defined (SYS_fdatasync)
+ syscall_table[SYS_fdatasync] = "fdatasync";
+#endif
+#if defined (SYS_fdevstat)
+ syscall_table[SYS_fdevstat] = "fdevstat";
+#endif
+#if defined (SYS_fdsync)
+ syscall_table[SYS_fdsync] = "fdsync";
+#endif
+#if defined (SYS_filepriv)
+ syscall_table[SYS_filepriv] = "filepriv";
+#endif
+#if defined (SYS_flock)
+ syscall_table[SYS_flock] = "flock";
+#endif
+#if defined (SYS_flvlfile)
+ syscall_table[SYS_flvlfile] = "flvlfile";
+#endif
+#if defined (SYS_fork)
+ syscall_table[SYS_fork] = "fork";
+#endif
+#if defined (SYS_fork1)
+ syscall_table[SYS_fork1] = "fork1";
+#endif
+#if defined (SYS_forkall)
+ syscall_table[SYS_forkall] = "forkall";
+#endif
+#if defined (SYS_fpathconf)
+ syscall_table[SYS_fpathconf] = "fpathconf";
+#endif
+#if defined (SYS_fstat)
+ syscall_table[SYS_fstat] = "fstat";
+#endif
+#if defined (SYS_fstat64)
+ syscall_table[SYS_fstat64] = "fstat64";
+#endif
+#if defined (SYS_fstatfs)
+ syscall_table[SYS_fstatfs] = "fstatfs";
+#endif
+#if defined (SYS_fstatvfs)
+ syscall_table[SYS_fstatvfs] = "fstatvfs";
+#endif
+#if defined (SYS_fstatvfs64)
+ syscall_table[SYS_fstatvfs64] = "fstatvfs64";
+#endif
+#if defined (SYS_fsync)
+ syscall_table[SYS_fsync] = "fsync";
+#endif
+#if defined (SYS_ftruncate)
+ syscall_table[SYS_ftruncate] = "ftruncate";
+#endif
+#if defined (SYS_ftruncate64)
+ syscall_table[SYS_ftruncate64] = "ftruncate64";
+#endif
+#if defined (SYS_fuser)
+ syscall_table[SYS_fuser] = "fuser";
+#endif
+#if defined (SYS_fxstat)
+ syscall_table[SYS_fxstat] = "fxstat";
+#endif
+#if defined (SYS_get_sysinfo)
+ syscall_table[SYS_get_sysinfo] = "get_sysinfo";
+#endif
+#if defined (SYS_getaddressconf)
+ syscall_table[SYS_getaddressconf] = "getaddressconf";
+#endif
+#if defined (SYS_getcontext)
+ syscall_table[SYS_getcontext] = "getcontext";
+#endif
+#if defined (SYS_getdents)
+ syscall_table[SYS_getdents] = "getdents";
+#endif
+#if defined (SYS_getdents64)
+ syscall_table[SYS_getdents64] = "getdents64";
+#endif
+#if defined (SYS_getdirentries)
+ syscall_table[SYS_getdirentries] = "getdirentries";
+#endif
+#if defined (SYS_getdomainname)
+ syscall_table[SYS_getdomainname] = "getdomainname";
+#endif
+#if defined (SYS_getdtablesize)
+ syscall_table[SYS_getdtablesize] = "getdtablesize";
+#endif
+#if defined (SYS_getfh)
+ syscall_table[SYS_getfh] = "getfh";
+#endif
+#if defined (SYS_getfsstat)
+ syscall_table[SYS_getfsstat] = "getfsstat";
+#endif
+#if defined (SYS_getgid)
+ syscall_table[SYS_getgid] = "getgid";
+#endif
+#if defined (SYS_getgroups)
+ syscall_table[SYS_getgroups] = "getgroups";
+#endif
+#if defined (SYS_gethostid)
+ syscall_table[SYS_gethostid] = "gethostid";
+#endif
+#if defined (SYS_gethostname)
+ syscall_table[SYS_gethostname] = "gethostname";
+#endif
+#if defined (SYS_getitimer)
+ syscall_table[SYS_getitimer] = "getitimer";
+#endif
+#if defined (SYS_getksym)
+ syscall_table[SYS_getksym] = "getksym";
+#endif
+#if defined (SYS_getlogin)
+ syscall_table[SYS_getlogin] = "getlogin";
+#endif
+#if defined (SYS_getmnt)
+ syscall_table[SYS_getmnt] = "getmnt";
+#endif
+#if defined (SYS_getmsg)
+ syscall_table[SYS_getmsg] = "getmsg";
+#endif
+#if defined (SYS_getpagesize)
+ syscall_table[SYS_getpagesize] = "getpagesize";
+#endif
+#if defined (SYS_getpeername)
+ syscall_table[SYS_getpeername] = "getpeername";
+#endif
+#if defined (SYS_getpgid)
+ syscall_table[SYS_getpgid] = "getpgid";
+#endif
+#if defined (SYS_getpgrp)
+ syscall_table[SYS_getpgrp] = "getpgrp";
+#endif
+#if defined (SYS_getpid)
+ syscall_table[SYS_getpid] = "getpid";
+#endif
+#if defined (SYS_getpmsg)
+ syscall_table[SYS_getpmsg] = "getpmsg";
+#endif
+#if defined (SYS_getpriority)
+ syscall_table[SYS_getpriority] = "getpriority";
+#endif
+#if defined (SYS_getrlimit)
+ syscall_table[SYS_getrlimit] = "getrlimit";
+#endif
+#if defined (SYS_getrlimit64)
+ syscall_table[SYS_getrlimit64] = "getrlimit64";
+#endif
+#if defined (SYS_getrusage)
+ syscall_table[SYS_getrusage] = "getrusage";
+#endif
+#if defined (SYS_getsid)
+ syscall_table[SYS_getsid] = "getsid";
+#endif
+#if defined (SYS_getsockname)
+ syscall_table[SYS_getsockname] = "getsockname";
+#endif
+#if defined (SYS_getsockopt)
+ syscall_table[SYS_getsockopt] = "getsockopt";
+#endif
+#if defined (SYS_gettimeofday)
+ syscall_table[SYS_gettimeofday] = "gettimeofday";
+#endif
+#if defined (SYS_getuid)
+ syscall_table[SYS_getuid] = "getuid";
+#endif
+#if defined (SYS_gtty)
+ syscall_table[SYS_gtty] = "gtty";
+#endif
+#if defined (SYS_hrtsys)
+ syscall_table[SYS_hrtsys] = "hrtsys";
+#endif
+#if defined (SYS_inst_sync)
+ syscall_table[SYS_inst_sync] = "inst_sync";
+#endif
+#if defined (SYS_install_utrap)
+ syscall_table[SYS_install_utrap] = "install_utrap";
+#endif
+#if defined (SYS_invlpg)
+ syscall_table[SYS_invlpg] = "invlpg";
+#endif
+#if defined (SYS_ioctl)
+ syscall_table[SYS_ioctl] = "ioctl";
+#endif
+#if defined (SYS_kaio)
+ syscall_table[SYS_kaio] = "kaio";
+#endif
+#if defined (SYS_keyctl)
+ syscall_table[SYS_keyctl] = "keyctl";
+#endif
+#if defined (SYS_kill)
+ syscall_table[SYS_kill] = "kill";
+#endif
+#if defined (SYS_killpg)
+ syscall_table[SYS_killpg] = "killpg";
+#endif
+#if defined (SYS_kloadcall)
+ syscall_table[SYS_kloadcall] = "kloadcall";
+#endif
+#if defined (SYS_kmodcall)
+ syscall_table[SYS_kmodcall] = "kmodcall";
+#endif
+#if defined (SYS_ksigaction)
+ syscall_table[SYS_ksigaction] = "ksigaction";
+#endif
+#if defined (SYS_ksigprocmask)
+ syscall_table[SYS_ksigprocmask] = "ksigprocmask";
+#endif
+#if defined (SYS_ksigqueue)
+ syscall_table[SYS_ksigqueue] = "ksigqueue";
+#endif
+#if defined (SYS_lchown)
+ syscall_table[SYS_lchown] = "lchown";
+#endif
+#if defined (SYS_link)
+ syscall_table[SYS_link] = "link";
+#endif
+#if defined (SYS_listen)
+ syscall_table[SYS_listen] = "listen";
+#endif
+#if defined (SYS_llseek)
+ syscall_table[SYS_llseek] = "llseek";
+#endif
+#if defined (SYS_lseek)
+ syscall_table[SYS_lseek] = "lseek";
+#endif
+#if defined (SYS_lseek64)
+ syscall_table[SYS_lseek64] = "lseek64";
+#endif
+#if defined (SYS_lstat)
+ syscall_table[SYS_lstat] = "lstat";
+#endif
+#if defined (SYS_lstat64)
+ syscall_table[SYS_lstat64] = "lstat64";
+#endif
+#if defined (SYS_lvldom)
+ syscall_table[SYS_lvldom] = "lvldom";
+#endif
+#if defined (SYS_lvlequal)
+ syscall_table[SYS_lvlequal] = "lvlequal";
+#endif
+#if defined (SYS_lvlfile)
+ syscall_table[SYS_lvlfile] = "lvlfile";
+#endif
+#if defined (SYS_lvlipc)
+ syscall_table[SYS_lvlipc] = "lvlipc";
+#endif
+#if defined (SYS_lvlproc)
+ syscall_table[SYS_lvlproc] = "lvlproc";
+#endif
+#if defined (SYS_lvlvfs)
+ syscall_table[SYS_lvlvfs] = "lvlvfs";
+#endif
+#if defined (SYS_lwp_alarm)
+ syscall_table[SYS_lwp_alarm] = "lwp_alarm";
+#endif
+#if defined (SYS_lwp_cond_broadcast)
+ syscall_table[SYS_lwp_cond_broadcast] = "lwp_cond_broadcast";
+#endif
+#if defined (SYS_lwp_cond_signal)
+ syscall_table[SYS_lwp_cond_signal] = "lwp_cond_signal";
+#endif
+#if defined (SYS_lwp_cond_wait)
+ syscall_table[SYS_lwp_cond_wait] = "lwp_cond_wait";
+#endif
+#if defined (SYS_lwp_continue)
+ syscall_table[SYS_lwp_continue] = "lwp_continue";
+#endif
+#if defined (SYS_lwp_create)
+ syscall_table[SYS_lwp_create] = "lwp_create";
+#endif
+#if defined (SYS_lwp_exit)
+ syscall_table[SYS_lwp_exit] = "lwp_exit";
+#endif
+#if defined (SYS_lwp_getprivate)
+ syscall_table[SYS_lwp_getprivate] = "lwp_getprivate";
+#endif
+#if defined (SYS_lwp_info)
+ syscall_table[SYS_lwp_info] = "lwp_info";
+#endif
+#if defined (SYS_lwp_kill)
+ syscall_table[SYS_lwp_kill] = "lwp_kill";
+#endif
+#if defined (SYS_lwp_mutex_init)
+ syscall_table[SYS_lwp_mutex_init] = "lwp_mutex_init";
+#endif
+#if defined (SYS_lwp_mutex_lock)
+ syscall_table[SYS_lwp_mutex_lock] = "lwp_mutex_lock";
+#endif
+#if defined (SYS_lwp_mutex_trylock)
+ syscall_table[SYS_lwp_mutex_trylock] = "lwp_mutex_trylock";
+#endif
+#if defined (SYS_lwp_mutex_unlock)
+ syscall_table[SYS_lwp_mutex_unlock] = "lwp_mutex_unlock";
+#endif
+#if defined (SYS_lwp_private)
+ syscall_table[SYS_lwp_private] = "lwp_private";
+#endif
+#if defined (SYS_lwp_self)
+ syscall_table[SYS_lwp_self] = "lwp_self";
+#endif
+#if defined (SYS_lwp_sema_post)
+ syscall_table[SYS_lwp_sema_post] = "lwp_sema_post";
+#endif
+#if defined (SYS_lwp_sema_trywait)
+ syscall_table[SYS_lwp_sema_trywait] = "lwp_sema_trywait";
+#endif
+#if defined (SYS_lwp_sema_wait)
+ syscall_table[SYS_lwp_sema_wait] = "lwp_sema_wait";
+#endif
+#if defined (SYS_lwp_setprivate)
+ syscall_table[SYS_lwp_setprivate] = "lwp_setprivate";
+#endif
+#if defined (SYS_lwp_sigredirect)
+ syscall_table[SYS_lwp_sigredirect] = "lwp_sigredirect";
+#endif
+#if defined (SYS_lwp_suspend)
+ syscall_table[SYS_lwp_suspend] = "lwp_suspend";
+#endif
+#if defined (SYS_lwp_wait)
+ syscall_table[SYS_lwp_wait] = "lwp_wait";
+#endif
+#if defined (SYS_lxstat)
+ syscall_table[SYS_lxstat] = "lxstat";
+#endif
+#if defined (SYS_madvise)
+ syscall_table[SYS_madvise] = "madvise";
+#endif
+#if defined (SYS_memcntl)
+ syscall_table[SYS_memcntl] = "memcntl";
+#endif
+#if defined (SYS_mincore)
+ syscall_table[SYS_mincore] = "mincore";
+#endif
+#if defined (SYS_mincore)
+ syscall_table[SYS_mincore] = "mincore";
+#endif
+#if defined (SYS_mkdir)
+ syscall_table[SYS_mkdir] = "mkdir";
+#endif
+#if defined (SYS_mkmld)
+ syscall_table[SYS_mkmld] = "mkmld";
+#endif
+#if defined (SYS_mknod)
+ syscall_table[SYS_mknod] = "mknod";
+#endif
+#if defined (SYS_mldmode)
+ syscall_table[SYS_mldmode] = "mldmode";
+#endif
+#if defined (SYS_mmap)
+ syscall_table[SYS_mmap] = "mmap";
+#endif
+#if defined (SYS_mmap64)
+ syscall_table[SYS_mmap64] = "mmap64";
+#endif
+#if defined (SYS_modadm)
+ syscall_table[SYS_modadm] = "modadm";
+#endif
+#if defined (SYS_modctl)
+ syscall_table[SYS_modctl] = "modctl";
+#endif
+#if defined (SYS_modload)
+ syscall_table[SYS_modload] = "modload";
+#endif
+#if defined (SYS_modpath)
+ syscall_table[SYS_modpath] = "modpath";
+#endif
+#if defined (SYS_modstat)
+ syscall_table[SYS_modstat] = "modstat";
+#endif
+#if defined (SYS_moduload)
+ syscall_table[SYS_moduload] = "moduload";
+#endif
+#if defined (SYS_mount)
+ syscall_table[SYS_mount] = "mount";
+#endif
+#if defined (SYS_mprotect)
+ syscall_table[SYS_mprotect] = "mprotect";
+#endif
+#if defined (SYS_mremap)
+ syscall_table[SYS_mremap] = "mremap";
+#endif
+#if defined (SYS_msfs_syscall)
+ syscall_table[SYS_msfs_syscall] = "msfs_syscall";
+#endif
+#if defined (SYS_msgctl)
+ syscall_table[SYS_msgctl] = "msgctl";
+#endif
+#if defined (SYS_msgget)
+ syscall_table[SYS_msgget] = "msgget";
+#endif
+#if defined (SYS_msgrcv)
+ syscall_table[SYS_msgrcv] = "msgrcv";
+#endif
+#if defined (SYS_msgsnd)
+ syscall_table[SYS_msgsnd] = "msgsnd";
+#endif
+#if defined (SYS_msgsys)
+ syscall_table[SYS_msgsys] = "msgsys";
+#endif
+#if defined (SYS_msleep)
+ syscall_table[SYS_msleep] = "msleep";
+#endif
+#if defined (SYS_msync)
+ syscall_table[SYS_msync] = "msync";
+#endif
+#if defined (SYS_munmap)
+ syscall_table[SYS_munmap] = "munmap";
+#endif
+#if defined (SYS_mvalid)
+ syscall_table[SYS_mvalid] = "mvalid";
+#endif
+#if defined (SYS_mwakeup)
+ syscall_table[SYS_mwakeup] = "mwakeup";
+#endif
+#if defined (SYS_naccept)
+ syscall_table[SYS_naccept] = "naccept";
+#endif
+#if defined (SYS_nanosleep)
+ syscall_table[SYS_nanosleep] = "nanosleep";
+#endif
+#if defined (SYS_nfssvc)
+ syscall_table[SYS_nfssvc] = "nfssvc";
+#endif
+#if defined (SYS_nfssys)
+ syscall_table[SYS_nfssys] = "nfssys";
+#endif
+#if defined (SYS_ngetpeername)
+ syscall_table[SYS_ngetpeername] = "ngetpeername";
+#endif
+#if defined (SYS_ngetsockname)
+ syscall_table[SYS_ngetsockname] = "ngetsockname";
+#endif
+#if defined (SYS_nice)
+ syscall_table[SYS_nice] = "nice";
+#endif
+#if defined (SYS_nrecvfrom)
+ syscall_table[SYS_nrecvfrom] = "nrecvfrom";
+#endif
+#if defined (SYS_nrecvmsg)
+ syscall_table[SYS_nrecvmsg] = "nrecvmsg";
+#endif
+#if defined (SYS_nsendmsg)
+ syscall_table[SYS_nsendmsg] = "nsendmsg";
+#endif
+#if defined (SYS_ntp_adjtime)
+ syscall_table[SYS_ntp_adjtime] = "ntp_adjtime";
+#endif
+#if defined (SYS_ntp_gettime)
+ syscall_table[SYS_ntp_gettime] = "ntp_gettime";
+#endif
+#if defined (SYS_nuname)
+ syscall_table[SYS_nuname] = "nuname";
+#endif
+#if defined (SYS_obreak)
+ syscall_table[SYS_obreak] = "obreak";
+#endif
+#if defined (SYS_old_accept)
+ syscall_table[SYS_old_accept] = "old_accept";
+#endif
+#if defined (SYS_old_fstat)
+ syscall_table[SYS_old_fstat] = "old_fstat";
+#endif
+#if defined (SYS_old_getpeername)
+ syscall_table[SYS_old_getpeername] = "old_getpeername";
+#endif
+#if defined (SYS_old_getpgrp)
+ syscall_table[SYS_old_getpgrp] = "old_getpgrp";
+#endif
+#if defined (SYS_old_getsockname)
+ syscall_table[SYS_old_getsockname] = "old_getsockname";
+#endif
+#if defined (SYS_old_killpg)
+ syscall_table[SYS_old_killpg] = "old_killpg";
+#endif
+#if defined (SYS_old_lstat)
+ syscall_table[SYS_old_lstat] = "old_lstat";
+#endif
+#if defined (SYS_old_recv)
+ syscall_table[SYS_old_recv] = "old_recv";
+#endif
+#if defined (SYS_old_recvfrom)
+ syscall_table[SYS_old_recvfrom] = "old_recvfrom";
+#endif
+#if defined (SYS_old_recvmsg)
+ syscall_table[SYS_old_recvmsg] = "old_recvmsg";
+#endif
+#if defined (SYS_old_send)
+ syscall_table[SYS_old_send] = "old_send";
+#endif
+#if defined (SYS_old_sendmsg)
+ syscall_table[SYS_old_sendmsg] = "old_sendmsg";
+#endif
+#if defined (SYS_old_sigblock)
+ syscall_table[SYS_old_sigblock] = "old_sigblock";
+#endif
+#if defined (SYS_old_sigsetmask)
+ syscall_table[SYS_old_sigsetmask] = "old_sigsetmask";
+#endif
+#if defined (SYS_old_sigvec)
+ syscall_table[SYS_old_sigvec] = "old_sigvec";
+#endif
+#if defined (SYS_old_stat)
+ syscall_table[SYS_old_stat] = "old_stat";
+#endif
+#if defined (SYS_old_vhangup)
+ syscall_table[SYS_old_vhangup] = "old_vhangup";
+#endif
+#if defined (SYS_old_wait)
+ syscall_table[SYS_old_wait] = "old_wait";
+#endif
+#if defined (SYS_oldquota)
+ syscall_table[SYS_oldquota] = "oldquota";
+#endif
+#if defined (SYS_online)
+ syscall_table[SYS_online] = "online";
+#endif
+#if defined (SYS_open)
+ syscall_table[SYS_open] = "open";
+#endif
+#if defined (SYS_open64)
+ syscall_table[SYS_open64] = "open64";
+#endif
+#if defined (SYS_ovadvise)
+ syscall_table[SYS_ovadvise] = "ovadvise";
+#endif
+#if defined (SYS_p_online)
+ syscall_table[SYS_p_online] = "p_online";
+#endif
+#if defined (SYS_pagelock)
+ syscall_table[SYS_pagelock] = "pagelock";
+#endif
+#if defined (SYS_pathconf)
+ syscall_table[SYS_pathconf] = "pathconf";
+#endif
+#if defined (SYS_pause)
+ syscall_table[SYS_pause] = "pause";
+#endif
+#if defined (SYS_pgrpsys)
+ syscall_table[SYS_pgrpsys] = "pgrpsys";
+#endif
+#if defined (SYS_pid_block)
+ syscall_table[SYS_pid_block] = "pid_block";
+#endif
+#if defined (SYS_pid_unblock)
+ syscall_table[SYS_pid_unblock] = "pid_unblock";
+#endif
+#if defined (SYS_pipe)
+ syscall_table[SYS_pipe] = "pipe";
+#endif
+#if defined (SYS_plock)
+ syscall_table[SYS_plock] = "plock";
+#endif
+#if defined (SYS_poll)
+ syscall_table[SYS_poll] = "poll";
+#endif
+#if defined (SYS_prctl)
+ syscall_table[SYS_prctl] = "prctl";
+#endif
+#if defined (SYS_pread)
+ syscall_table[SYS_pread] = "pread";
+#endif
+#if defined (SYS_pread64)
+ syscall_table[SYS_pread64] = "pread64";
+#endif
+#if defined (SYS_pread64)
+ syscall_table[SYS_pread64] = "pread64";
+#endif
+#if defined (SYS_prepblock)
+ syscall_table[SYS_prepblock] = "prepblock";
+#endif
+#if defined (SYS_priocntl)
+ syscall_table[SYS_priocntl] = "priocntl";
+#endif
+#if defined (SYS_priocntllst)
+ syscall_table[SYS_priocntllst] = "priocntllst";
+#endif
+#if defined (SYS_priocntlset)
+ syscall_table[SYS_priocntlset] = "priocntlset";
+#endif
+#if defined (SYS_priocntlsys)
+ syscall_table[SYS_priocntlsys] = "priocntlsys";
+#endif
+#if defined (SYS_procblk)
+ syscall_table[SYS_procblk] = "procblk";
+#endif
+#if defined (SYS_processor_bind)
+ syscall_table[SYS_processor_bind] = "processor_bind";
+#endif
+#if defined (SYS_processor_exbind)
+ syscall_table[SYS_processor_exbind] = "processor_exbind";
+#endif
+#if defined (SYS_processor_info)
+ syscall_table[SYS_processor_info] = "processor_info";
+#endif
+#if defined (SYS_procpriv)
+ syscall_table[SYS_procpriv] = "procpriv";
+#endif
+#if defined (SYS_profil)
+ syscall_table[SYS_profil] = "profil";
+#endif
+#if defined (SYS_proplist_syscall)
+ syscall_table[SYS_proplist_syscall] = "proplist_syscall";
+#endif
+#if defined (SYS_pset)
+ syscall_table[SYS_pset] = "pset";
+#endif
+#if defined (SYS_ptrace)
+ syscall_table[SYS_ptrace] = "ptrace";
+#endif
+#if defined (SYS_putmsg)
+ syscall_table[SYS_putmsg] = "putmsg";
+#endif
+#if defined (SYS_putpmsg)
+ syscall_table[SYS_putpmsg] = "putpmsg";
+#endif
+#if defined (SYS_pwrite)
+ syscall_table[SYS_pwrite] = "pwrite";
+#endif
+#if defined (SYS_pwrite64)
+ syscall_table[SYS_pwrite64] = "pwrite64";
+#endif
+#if defined (SYS_quotactl)
+ syscall_table[SYS_quotactl] = "quotactl";
+#endif
+#if defined (SYS_rdblock)
+ syscall_table[SYS_rdblock] = "rdblock";
+#endif
+#if defined (SYS_read)
+ syscall_table[SYS_read] = "read";
+#endif
+#if defined (SYS_readlink)
+ syscall_table[SYS_readlink] = "readlink";
+#endif
+#if defined (SYS_readv)
+ syscall_table[SYS_readv] = "readv";
+#endif
+#if defined (SYS_reboot)
+ syscall_table[SYS_reboot] = "reboot";
+#endif
+#if defined (SYS_recv)
+ syscall_table[SYS_recv] = "recv";
+#endif
+#if defined (SYS_recvfrom)
+ syscall_table[SYS_recvfrom] = "recvfrom";
+#endif
+#if defined (SYS_recvmsg)
+ syscall_table[SYS_recvmsg] = "recvmsg";
+#endif
+#if defined (SYS_rename)
+ syscall_table[SYS_rename] = "rename";
+#endif
+#if defined (SYS_resolvepath)
+ syscall_table[SYS_resolvepath] = "resolvepath";
+#endif
+#if defined (SYS_revoke)
+ syscall_table[SYS_revoke] = "revoke";
+#endif
+#if defined (SYS_rfsys)
+ syscall_table[SYS_rfsys] = "rfsys";
+#endif
+#if defined (SYS_rmdir)
+ syscall_table[SYS_rmdir] = "rmdir";
+#endif
+#if defined (SYS_rpcsys)
+ syscall_table[SYS_rpcsys] = "rpcsys";
+#endif
+#if defined (SYS_sbrk)
+ syscall_table[SYS_sbrk] = "sbrk";
+#endif
+#if defined (SYS_schedctl)
+ syscall_table[SYS_schedctl] = "schedctl";
+#endif
+#if defined (SYS_secadvise)
+ syscall_table[SYS_secadvise] = "secadvise";
+#endif
+#if defined (SYS_secsys)
+ syscall_table[SYS_secsys] = "secsys";
+#endif
+#if defined (SYS_security)
+ syscall_table[SYS_security] = "security";
+#endif
+#if defined (SYS_select)
+ syscall_table[SYS_select] = "select";
+#endif
+#if defined (SYS_semctl)
+ syscall_table[SYS_semctl] = "semctl";
+#endif
+#if defined (SYS_semget)
+ syscall_table[SYS_semget] = "semget";
+#endif
+#if defined (SYS_semop)
+ syscall_table[SYS_semop] = "semop";
+#endif
+#if defined (SYS_semsys)
+ syscall_table[SYS_semsys] = "semsys";
+#endif
+#if defined (SYS_send)
+ syscall_table[SYS_send] = "send";
+#endif
+#if defined (SYS_sendmsg)
+ syscall_table[SYS_sendmsg] = "sendmsg";
+#endif
+#if defined (SYS_sendto)
+ syscall_table[SYS_sendto] = "sendto";
+#endif
+#if defined (SYS_set_program_attributes)
+ syscall_table[SYS_set_program_attributes] = "set_program_attributes";
+#endif
+#if defined (SYS_set_speculative)
+ syscall_table[SYS_set_speculative] = "set_speculative";
+#endif
+#if defined (SYS_set_sysinfo)
+ syscall_table[SYS_set_sysinfo] = "set_sysinfo";
+#endif
+#if defined (SYS_setcontext)
+ syscall_table[SYS_setcontext] = "setcontext";
+#endif
+#if defined (SYS_setdomainname)
+ syscall_table[SYS_setdomainname] = "setdomainname";
+#endif
+#if defined (SYS_setegid)
+ syscall_table[SYS_setegid] = "setegid";
+#endif
+#if defined (SYS_seteuid)
+ syscall_table[SYS_seteuid] = "seteuid";
+#endif
+#if defined (SYS_setgid)
+ syscall_table[SYS_setgid] = "setgid";
+#endif
+#if defined (SYS_setgroups)
+ syscall_table[SYS_setgroups] = "setgroups";
+#endif
+#if defined (SYS_sethostid)
+ syscall_table[SYS_sethostid] = "sethostid";
+#endif
+#if defined (SYS_sethostname)
+ syscall_table[SYS_sethostname] = "sethostname";
+#endif
+#if defined (SYS_setitimer)
+ syscall_table[SYS_setitimer] = "setitimer";
+#endif
+#if defined (SYS_setlogin)
+ syscall_table[SYS_setlogin] = "setlogin";
+#endif
+#if defined (SYS_setpgid)
+ syscall_table[SYS_setpgid] = "setpgid";
+#endif
+#if defined (SYS_setpgrp)
+ syscall_table[SYS_setpgrp] = "setpgrp";
+#endif
+#if defined (SYS_setpriority)
+ syscall_table[SYS_setpriority] = "setpriority";
+#endif
+#if defined (SYS_setregid)
+ syscall_table[SYS_setregid] = "setregid";
+#endif
+#if defined (SYS_setreuid)
+ syscall_table[SYS_setreuid] = "setreuid";
+#endif
+#if defined (SYS_setrlimit)
+ syscall_table[SYS_setrlimit] = "setrlimit";
+#endif
+#if defined (SYS_setrlimit64)
+ syscall_table[SYS_setrlimit64] = "setrlimit64";
+#endif
+#if defined (SYS_setsid)
+ syscall_table[SYS_setsid] = "setsid";
+#endif
+#if defined (SYS_setsockopt)
+ syscall_table[SYS_setsockopt] = "setsockopt";
+#endif
+#if defined (SYS_settimeofday)
+ syscall_table[SYS_settimeofday] = "settimeofday";
+#endif
+#if defined (SYS_setuid)
+ syscall_table[SYS_setuid] = "setuid";
+#endif
+#if defined (SYS_sgi)
+ syscall_table[SYS_sgi] = "sgi";
+#endif
+#if defined (SYS_sgifastpath)
+ syscall_table[SYS_sgifastpath] = "sgifastpath";
+#endif
+#if defined (SYS_sgikopt)
+ syscall_table[SYS_sgikopt] = "sgikopt";
+#endif
+#if defined (SYS_sginap)
+ syscall_table[SYS_sginap] = "sginap";
+#endif
+#if defined (SYS_shmat)
+ syscall_table[SYS_shmat] = "shmat";
+#endif
+#if defined (SYS_shmctl)
+ syscall_table[SYS_shmctl] = "shmctl";
+#endif
+#if defined (SYS_shmdt)
+ syscall_table[SYS_shmdt] = "shmdt";
+#endif
+#if defined (SYS_shmget)
+ syscall_table[SYS_shmget] = "shmget";
+#endif
+#if defined (SYS_shmsys)
+ syscall_table[SYS_shmsys] = "shmsys";
+#endif
+#if defined (SYS_shutdown)
+ syscall_table[SYS_shutdown] = "shutdown";
+#endif
+#if defined (SYS_sigaction)
+ syscall_table[SYS_sigaction] = "sigaction";
+#endif
+#if defined (SYS_sigaltstack)
+ syscall_table[SYS_sigaltstack] = "sigaltstack";
+#endif
+#if defined (SYS_sigaltstack)
+ syscall_table[SYS_sigaltstack] = "sigaltstack";
+#endif
+#if defined (SYS_sigblock)
+ syscall_table[SYS_sigblock] = "sigblock";
+#endif
+#if defined (SYS_signal)
+ syscall_table[SYS_signal] = "signal";
+#endif
+#if defined (SYS_signotify)
+ syscall_table[SYS_signotify] = "signotify";
+#endif
+#if defined (SYS_signotifywait)
+ syscall_table[SYS_signotifywait] = "signotifywait";
+#endif
+#if defined (SYS_sigpending)
+ syscall_table[SYS_sigpending] = "sigpending";
+#endif
+#if defined (SYS_sigpoll)
+ syscall_table[SYS_sigpoll] = "sigpoll";
+#endif
+#if defined (SYS_sigprocmask)
+ syscall_table[SYS_sigprocmask] = "sigprocmask";
+#endif
+#if defined (SYS_sigqueue)
+ syscall_table[SYS_sigqueue] = "sigqueue";
+#endif
+#if defined (SYS_sigreturn)
+ syscall_table[SYS_sigreturn] = "sigreturn";
+#endif
+#if defined (SYS_sigsendset)
+ syscall_table[SYS_sigsendset] = "sigsendset";
+#endif
+#if defined (SYS_sigsendsys)
+ syscall_table[SYS_sigsendsys] = "sigsendsys";
+#endif
+#if defined (SYS_sigsetmask)
+ syscall_table[SYS_sigsetmask] = "sigsetmask";
+#endif
+#if defined (SYS_sigstack)
+ syscall_table[SYS_sigstack] = "sigstack";
+#endif
+#if defined (SYS_sigsuspend)
+ syscall_table[SYS_sigsuspend] = "sigsuspend";
+#endif
+#if defined (SYS_sigvec)
+ syscall_table[SYS_sigvec] = "sigvec";
+#endif
+#if defined (SYS_sigwait)
+ syscall_table[SYS_sigwait] = "sigwait";
+#endif
+#if defined (SYS_sigwaitprim)
+ syscall_table[SYS_sigwaitprim] = "sigwaitprim";
+#endif
+#if defined (SYS_sleep)
+ syscall_table[SYS_sleep] = "sleep";
+#endif
+#if defined (SYS_so_socket)
+ syscall_table[SYS_so_socket] = "so_socket";
+#endif
+#if defined (SYS_so_socketpair)
+ syscall_table[SYS_so_socketpair] = "so_socketpair";
+#endif
+#if defined (SYS_sockconfig)
+ syscall_table[SYS_sockconfig] = "sockconfig";
+#endif
+#if defined (SYS_socket)
+ syscall_table[SYS_socket] = "socket";
+#endif
+#if defined (SYS_socketpair)
+ syscall_table[SYS_socketpair] = "socketpair";
+#endif
+#if defined (SYS_sproc)
+ syscall_table[SYS_sproc] = "sproc";
+#endif
+#if defined (SYS_sprocsp)
+ syscall_table[SYS_sprocsp] = "sprocsp";
+#endif
+#if defined (SYS_sstk)
+ syscall_table[SYS_sstk] = "sstk";
+#endif
+#if defined (SYS_stat)
+ syscall_table[SYS_stat] = "stat";
+#endif
+#if defined (SYS_stat64)
+ syscall_table[SYS_stat64] = "stat64";
+#endif
+#if defined (SYS_statfs)
+ syscall_table[SYS_statfs] = "statfs";
+#endif
+#if defined (SYS_statvfs)
+ syscall_table[SYS_statvfs] = "statvfs";
+#endif
+#if defined (SYS_statvfs64)
+ syscall_table[SYS_statvfs64] = "statvfs64";
+#endif
+#if defined (SYS_stime)
+ syscall_table[SYS_stime] = "stime";
+#endif
+#if defined (SYS_stty)
+ syscall_table[SYS_stty] = "stty";
+#endif
+#if defined (SYS_subsys_info)
+ syscall_table[SYS_subsys_info] = "subsys_info";
+#endif
+#if defined (SYS_swapctl)
+ syscall_table[SYS_swapctl] = "swapctl";
+#endif
+#if defined (SYS_swapon)
+ syscall_table[SYS_swapon] = "swapon";
+#endif
+#if defined (SYS_symlink)
+ syscall_table[SYS_symlink] = "symlink";
+#endif
+#if defined (SYS_sync)
+ syscall_table[SYS_sync] = "sync";
+#endif
+#if defined (SYS_sys3b)
+ syscall_table[SYS_sys3b] = "sys3b";
+#endif
+#if defined (SYS_syscall)
+ syscall_table[SYS_syscall] = "syscall";
+#endif
+#if defined (SYS_sysconfig)
+ syscall_table[SYS_sysconfig] = "sysconfig";
+#endif
+#if defined (SYS_sysfs)
+ syscall_table[SYS_sysfs] = "sysfs";
+#endif
+#if defined (SYS_sysi86)
+ syscall_table[SYS_sysi86] = "sysi86";
+#endif
+#if defined (SYS_sysinfo)
+ syscall_table[SYS_sysinfo] = "sysinfo";
+#endif
+#if defined (SYS_sysmips)
+ syscall_table[SYS_sysmips] = "sysmips";
+#endif
+#if defined (SYS_syssun)
+ syscall_table[SYS_syssun] = "syssun";
+#endif
+#if defined (SYS_systeminfo)
+ syscall_table[SYS_systeminfo] = "systeminfo";
+#endif
+#if defined (SYS_table)
+ syscall_table[SYS_table] = "table";
+#endif
+#if defined (SYS_time)
+ syscall_table[SYS_time] = "time";
+#endif
+#if defined (SYS_timedwait)
+ syscall_table[SYS_timedwait] = "timedwait";
+#endif
+#if defined (SYS_timer_create)
+ syscall_table[SYS_timer_create] = "timer_create";
+#endif
+#if defined (SYS_timer_delete)
+ syscall_table[SYS_timer_delete] = "timer_delete";
+#endif
+#if defined (SYS_timer_getoverrun)
+ syscall_table[SYS_timer_getoverrun] = "timer_getoverrun";
+#endif
+#if defined (SYS_timer_gettime)
+ syscall_table[SYS_timer_gettime] = "timer_gettime";
+#endif
+#if defined (SYS_timer_settime)
+ syscall_table[SYS_timer_settime] = "timer_settime";
+#endif
+#if defined (SYS_times)
+ syscall_table[SYS_times] = "times";
+#endif
+#if defined (SYS_truncate)
+ syscall_table[SYS_truncate] = "truncate";
+#endif
+#if defined (SYS_truncate64)
+ syscall_table[SYS_truncate64] = "truncate64";
+#endif
+#if defined (SYS_tsolsys)
+ syscall_table[SYS_tsolsys] = "tsolsys";
+#endif
+#if defined (SYS_uadmin)
+ syscall_table[SYS_uadmin] = "uadmin";
+#endif
+#if defined (SYS_ulimit)
+ syscall_table[SYS_ulimit] = "ulimit";
+#endif
+#if defined (SYS_umask)
+ syscall_table[SYS_umask] = "umask";
+#endif
+#if defined (SYS_umount)
+ syscall_table[SYS_umount] = "umount";
+#endif
+#if defined (SYS_uname)
+ syscall_table[SYS_uname] = "uname";
+#endif
+#if defined (SYS_unblock)
+ syscall_table[SYS_unblock] = "unblock";
+#endif
+#if defined (SYS_unlink)
+ syscall_table[SYS_unlink] = "unlink";
+#endif
+#if defined (SYS_unmount)
+ syscall_table[SYS_unmount] = "unmount";
+#endif
+#if defined (SYS_usleep_thread)
+ syscall_table[SYS_usleep_thread] = "usleep_thread";
+#endif
+#if defined (SYS_uswitch)
+ syscall_table[SYS_uswitch] = "uswitch";
+#endif
+#if defined (SYS_utc_adjtime)
+ syscall_table[SYS_utc_adjtime] = "utc_adjtime";
+#endif
+#if defined (SYS_utc_gettime)
+ syscall_table[SYS_utc_gettime] = "utc_gettime";
+#endif
+#if defined (SYS_utime)
+ syscall_table[SYS_utime] = "utime";
+#endif
+#if defined (SYS_utimes)
+ syscall_table[SYS_utimes] = "utimes";
+#endif
+#if defined (SYS_utssys)
+ syscall_table[SYS_utssys] = "utssys";
+#endif
+#if defined (SYS_vfork)
+ syscall_table[SYS_vfork] = "vfork";
+#endif
+#if defined (SYS_vhangup)
+ syscall_table[SYS_vhangup] = "vhangup";
+#endif
+#if defined (SYS_vtrace)
+ syscall_table[SYS_vtrace] = "vtrace";
+#endif
+#if defined (SYS_wait)
+ syscall_table[SYS_wait] = "wait";
+#endif
+#if defined (SYS_waitid)
+ syscall_table[SYS_waitid] = "waitid";
+#endif
+#if defined (SYS_waitsys)
+ syscall_table[SYS_waitsys] = "waitsys";
+#endif
+#if defined (SYS_write)
+ syscall_table[SYS_write] = "write";
+#endif
+#if defined (SYS_writev)
+ syscall_table[SYS_writev] = "writev";
+#endif
+#if defined (SYS_xenix)
+ syscall_table[SYS_xenix] = "xenix";
+#endif
+#if defined (SYS_xmknod)
+ syscall_table[SYS_xmknod] = "xmknod";
+#endif
+#if defined (SYS_xstat)
+ syscall_table[SYS_xstat] = "xstat";
+#endif
+#if defined (SYS_yield)
+ syscall_table[SYS_yield] = "yield";
+#endif
+};
+
+/*
+ * Prettyprint a single syscall by number.
+ */
+
+void
+proc_prettyfprint_syscall (file, num, verbose)
+ FILE *file;
+ int num;
+ int verbose;
+{
+ if (syscall_table[num])
+ fprintf (file, "SYS_%s ", syscall_table[num]);
+ else
+ fprintf (file, "<Unknown syscall %d> ", num);
+}
+
+void
+proc_prettyprint_syscall (num, verbose)
+ int num;
+ int verbose;
+{
+ proc_prettyfprint_syscall (stdout, num, verbose);
+}
+
+/*
+ * Prettyprint all of the syscalls in a sysset_t set.
+ */
+
+void
+proc_prettyfprint_syscalls (file, sysset, verbose)
+ FILE *file;
+ sysset_t *sysset;
+ int verbose;
+{
+ int i;
+
+ for (i = 0; i < MAX_SYSCALLS; i++)
+ if (prismember (sysset, i))
+ {
+ proc_prettyfprint_syscall (file, i, verbose);
+ }
+ fprintf (file, "\n");
+}
+
+void
+proc_prettyprint_syscalls (sysset, verbose)
+ sysset_t *sysset;
+ int verbose;
+{
+ proc_prettyfprint_syscalls (stdout, sysset, verbose);
+}
+
+/* FIXME: add real-time signals */
+
+static struct trans signal_table[] =
+{
+ { 0, "<no signal>", "no signal" },
+#ifdef SIGHUP
+ { SIGHUP, "SIGHUP", "Hangup" },
+#endif
+#ifdef SIGINT
+ { SIGINT, "SIGINT", "Interrupt (rubout)" },
+#endif
+#ifdef SIGQUIT
+ { SIGQUIT, "SIGQUIT", "Quit (ASCII FS)" },
+#endif
+#ifdef SIGILL
+ { SIGILL, "SIGILL", "Illegal instruction" }, /* not reset when caught */
+#endif
+#ifdef SIGTRAP
+ { SIGTRAP, "SIGTRAP", "Trace trap" }, /* not reset when caught */
+#endif
+#ifdef SIGABRT
+ { SIGABRT, "SIGABRT", "used by abort()" }, /* replaces SIGIOT */
+#endif
+#ifdef SIGIOT
+ { SIGIOT, "SIGIOT", "IOT instruction" },
+#endif
+#ifdef SIGEMT
+ { SIGEMT, "SIGEMT", "EMT instruction" },
+#endif
+#ifdef SIGFPE
+ { SIGFPE, "SIGFPE", "Floating point exception" },
+#endif
+#ifdef SIGKILL
+ { SIGKILL, "SIGKILL", "Kill" }, /* Solaris: cannot be caught/ignored */
+#endif
+#ifdef SIGBUS
+ { SIGBUS, "SIGBUS", "Bus error" },
+#endif
+#ifdef SIGSEGV
+ { SIGSEGV, "SIGSEGV", "Segmentation violation" },
+#endif
+#ifdef SIGSYS
+ { SIGSYS, "SIGSYS", "Bad argument to system call" },
+#endif
+#ifdef SIGPIPE
+ { SIGPIPE, "SIGPIPE", "Write to pipe with no one to read it" },
+#endif
+#ifdef SIGALRM
+ { SIGALRM, "SIGALRM", "Alarm clock" },
+#endif
+#ifdef SIGTERM
+ { SIGTERM, "SIGTERM", "Software termination signal from kill" },
+#endif
+#ifdef SIGUSR1
+ { SIGUSR1, "SIGUSR1", "User defined signal 1" },
+#endif
+#ifdef SIGUSR2
+ { SIGUSR2, "SIGUSR2", "User defined signal 2" },
+#endif
+#ifdef SIGCHLD
+ { SIGCHLD, "SIGCHLD", "Child status changed" }, /* Posix version */
+#endif
+#ifdef SIGCLD
+ { SIGCLD, "SIGCLD", "Child status changed" }, /* Solaris version */
+#endif
+#ifdef SIGPWR
+ { SIGPWR, "SIGPWR", "Power-fail restart" },
+#endif
+#ifdef SIGWINCH
+ { SIGWINCH, "SIGWINCH", "Window size change" },
+#endif
+#ifdef SIGURG
+ { SIGURG, "SIGURG", "Urgent socket condition" },
+#endif
+#ifdef SIGPOLL
+ { SIGPOLL, "SIGPOLL", "Pollable event" },
+#endif
+#ifdef SIGIO
+ { SIGIO, "SIGIO", "Socket I/O possible" }, /* alias for SIGPOLL */
+#endif
+#ifdef SIGSTOP
+ { SIGSTOP, "SIGSTOP", "Stop, not from tty" }, /* cannot be caught or ignored */
+#endif
+#ifdef SIGTSTP
+ { SIGTSTP, "SIGTSTP", "User stop from tty" },
+#endif
+#ifdef SIGCONT
+ { SIGCONT, "SIGCONT", "Stopped process has been continued" },
+#endif
+#ifdef SIGTTIN
+ { SIGTTIN, "SIGTTIN", "Background tty read attempted" },
+#endif
+#ifdef SIGTTOU
+ { SIGTTOU, "SIGTTOU", "Background tty write attempted" },
+#endif
+#ifdef SIGVTALRM
+ { SIGVTALRM, "SIGVTALRM", "Virtual timer expired" },
+#endif
+#ifdef SIGPROF
+ { SIGPROF, "SIGPROF", "Profiling timer expired" },
+#endif
+#ifdef SIGXCPU
+ { SIGXCPU, "SIGXCPU", "Exceeded CPU limit" },
+#endif
+#ifdef SIGXFSZ
+ { SIGXFSZ, "SIGXFSZ", "Exceeded file size limit" },
+#endif
+#ifdef SIGWAITING
+ { SIGWAITING, "SIGWAITING", "Process's LWPs are blocked" },
+#endif
+#ifdef SIGLWP
+ { SIGLWP, "SIGLWP", "Used by thread library" },
+#endif
+#ifdef SIGFREEZE
+ { SIGFREEZE, "SIGFREEZE", "Used by CPR" },
+#endif
+#ifdef SIGTHAW
+ { SIGTHAW, "SIGTHAW", "Used by CPR" },
+#endif
+#ifdef SIGCANCEL
+ { SIGCANCEL, "SIGCANCEL", "Used by libthread" },
+#endif
+#ifdef SIGLOST
+ { SIGLOST, "SIGLOST", "Resource lost" },
+#endif
+#ifdef SIG32
+ { SIG32, "SIG32", "Reserved for kernel usage (Irix)" },
+#endif
+#ifdef SIGPTINTR
+ { SIGPTINTR, "SIGPTINTR", "Posix 1003.1b" },
+#endif
+#ifdef SIGTRESCHED
+ { SIGTRESCHED, "SIGTRESCHED", "Posix 1003.1b" },
+#endif
+#ifdef SIGINFO
+ { SIGINFO, "SIGINFO", "Information request" },
+#endif
+#ifdef SIGRESV
+ { SIGRESV, "SIGRESV", "Reserved by Digital for future use" },
+#endif
+#ifdef SIGAIO
+ { SIGAIO, "SIGAIO", "Asynchronous I/O signal" },
+#endif
+};
+
+/*
+ * Prettyprint a single signal by number.
+ * Accepts a signal number and finds it in the signal table,
+ * then pretty-prints it.
+ */
+
+void
+proc_prettyfprint_signal (file, signo, verbose)
+ FILE *file;
+ int signo;
+ int verbose;
+{
+ int i;
+
+ for (i = 0; i < sizeof (signal_table) / sizeof (signal_table[0]); i++)
+ if (signo == signal_table[i].value)
+ {
+ fprintf (file, "%s", signal_table[i].name);
+ if (verbose)
+ fprintf (file, ": %s\n", signal_table[i].desc);
+ else
+ fprintf (file, " ");
+ return;
+ }
+ fprintf (file, "Unknown signal %d%c", signo, verbose ? '\n' : ' ');
+}
+
+void
+proc_prettyprint_signal (signo, verbose)
+ int signo;
+ int verbose;
+{
+ proc_prettyfprint_signal (stdout, signo, verbose);
+}
+
+/*
+ * Prettyprint all of the signals in a sigset_t set.
+ *
+ * This function loops over all signal numbers from 0 to NSIG,
+ * uses them as indexes for prismember, and prints them pretty.
+ *
+ * It does not loop over the signal table, as is done with the
+ * fault table, because the signal table may contain aliases.
+ * If it did, both aliases would be printed.
+ */
+
+void
+proc_prettyfprint_signalset (file, sigset, verbose)
+ FILE *file;
+ sigset_t *sigset;
+ int verbose;
+{
+ int i;
+
+ for (i = 0; i < NSIG; i++)
+ if (prismember (sigset, i))
+ proc_prettyfprint_signal (file, i, verbose);
+
+ if (!verbose)
+ fprintf (file, "\n");
+}
+
+void
+proc_prettyprint_signalset (sigset, verbose)
+ sigset_t *sigset;
+ int verbose;
+{
+ proc_prettyfprint_signalset (stdout, sigset, verbose);
+}
+
+/* Hardware fault translation table. */
+
+static struct trans fault_table[] =
+{
+#if defined (FLTILL)
+ { FLTILL, "FLTILL", "Illegal instruction" },
+#endif
+#if defined (FLTPRIV)
+ { FLTPRIV, "FLTPRIV", "Privileged instruction" },
+#endif
+#if defined (FLTBPT)
+ { FLTBPT, "FLTBPT", "Breakpoint trap" },
+#endif
+#if defined (FLTTRACE)
+ { FLTTRACE, "FLTTRACE", "Trace trap" },
+#endif
+#if defined (FLTACCESS)
+ { FLTACCESS, "FLTACCESS", "Memory access fault" },
+#endif
+#if defined (FLTBOUNDS)
+ { FLTBOUNDS, "FLTBOUNDS", "Memory bounds violation" },
+#endif
+#if defined (FLTIOVF)
+ { FLTIOVF, "FLTIOVF", "Integer overflow" },
+#endif
+#if defined (FLTIZDIV)
+ { FLTIZDIV, "FLTIZDIV", "Integer zero divide" },
+#endif
+#if defined (FLTFPE)
+ { FLTFPE, "FLTFPE", "Floating-point exception" },
+#endif
+#if defined (FLTSTACK)
+ { FLTSTACK, "FLTSTACK", "Unrecoverable stack fault" },
+#endif
+#if defined (FLTPAGE)
+ { FLTPAGE, "FLTPAGE", "Recoverable page fault" },
+#endif
+#if defined (FLTPCINVAL)
+ { FLTPCINVAL, "FLTPCINVAL", "Invalid PC exception" },
+#endif
+#if defined (FLTWATCH)
+ { FLTWATCH, "FLTWATCH", "User watchpoint" },
+#endif
+#if defined (FLTKWATCH)
+ { FLTKWATCH, "FLTKWATCH", "Kernel watchpoint" },
+#endif
+#if defined (FLTSCWATCH)
+ { FLTSCWATCH, "FLTSCWATCH", "Hit a store conditional on a watched page" },
+#endif
+};
+
+/*
+ * Work horse. Accepts an index into the fault table, prints it pretty.
+ */
+
+static void
+prettyfprint_faulttable_entry (file, i, verbose)
+ FILE *file;
+ int i;
+ int verbose;
+{
+ fprintf (file, "%s", fault_table[i].name);
+ if (verbose)
+ fprintf (file, ": %s\n", fault_table[i].desc);
+ else
+ fprintf (file, " ");
+}
+
+/*
+ * Prettyprint a hardware fault by number.
+ */
+
+void
+proc_prettyfprint_fault (file, faultno, verbose)
+ FILE *file;
+ int faultno;
+ int verbose;
+{
+ int i;
+
+ for (i = 0; i < sizeof (fault_table) / sizeof (fault_table[0]); i++)
+ if (faultno == fault_table[i].value)
+ {
+ prettyfprint_faulttable_entry (file, i, verbose);
+ return;
+ }
+
+ fprintf (file, "Unknown hardware fault %d%c",
+ faultno, verbose ? '\n' : ' ');
+}
+
+void
+proc_prettyprint_fault (faultno, verbose)
+ int faultno;
+ int verbose;
+{
+ proc_prettyfprint_fault (stdout, faultno, verbose);
+}
+
+/*
+ * Prettyprint all the faults in a fltset_t set.
+ *
+ * This function loops thru the fault table,
+ * using the value field as the index to prismember.
+ * The fault table had better not contain aliases,
+ * for if it does they will both be printed.
+ */
+
+void
+proc_prettyfprint_faultset (file, fltset, verbose)
+ FILE *file;
+ fltset_t *fltset;
+ int verbose;
+{
+ int i;
+
+ for (i = 0; i < sizeof (fault_table) / sizeof (fault_table[0]); i++)
+ if (prismember (fltset, fault_table[i].value))
+ prettyfprint_faulttable_entry (file, i, verbose);
+
+ if (!verbose)
+ fprintf (file, "\n");
+}
+
+void
+proc_prettyprint_faultset (fltset, verbose)
+ fltset_t *fltset;
+ int verbose;
+{
+ proc_prettyfprint_faultset (stdout, fltset, verbose);
+}
+
+/*
+ * Todo: actions, holds...
+ */
+
+void
+proc_prettyprint_actionset (struct sigaction *actions, int verbose)
+{
+}
+
+void
+_initialize_proc_events ()
+{
+ init_syscall_table ();
+}
diff --git a/gdb/proc_flags.c b/gdb/proc_flags.c
new file mode 100755
index 0000000..adbcfbc
--- /dev/null
+++ b/gdb/proc_flags.c
@@ -0,0 +1,275 @@
+/*
+ * Pretty-print the prstatus flags.
+ *
+ * Arguments: unsigned long flags, int verbose
+ *
+ */
+
+#include "defs.h"
+
+#if defined (NEW_PROC_API)
+#define _STRUCTURED_PROC 1
+#endif
+
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/procfs.h>
+
+/* Much of the information used in the /proc interface, particularly for
+ printing status information, is kept as tables of structures of the
+ following form. These tables can be used to map numeric values to
+ their symbolic names and to a string that describes their specific use. */
+
+struct trans {
+ int value; /* The numeric value */
+ char *name; /* The equivalent symbolic value */
+ char *desc; /* Short description of value */
+};
+
+/* Translate bits in the pr_flags member of the prstatus structure,
+ into the names and desc information. */
+
+static struct trans pr_flag_table[] =
+{
+#if defined (PR_STOPPED)
+ /* Sol2.5: lwp is stopped
+ * Sol2.6: lwp is stopped
+ * Sol2.7: lwp is stopped
+ * IRIX6: process is stopped
+ * OSF: task/thread is stopped
+ * UW: LWP is stopped
+ */
+ { PR_STOPPED, "PR_STOPPED", "Process (LWP) is stopped" },
+#endif
+#if defined (PR_ISTOP)
+ /* Sol2.5: lwp is stopped on an event of interest
+ * Sol2.6: lwp is stopped on an event of interest
+ * Sol2.7: lwp is stopped on an event of interest
+ * IRIX6: process is stopped on event of interest
+ * OSF: task/thread stopped on event of interest
+ * UW: LWP stopped on an event of interest
+ */
+ { PR_ISTOP, "PR_ISTOP", "Stopped on an event of interest" },
+#endif
+#if defined (PR_DSTOP)
+ /* Sol2.5: lwp has a stop directive in effect
+ * Sol2.6: lwp has a stop directive in effect
+ * Sol2.7: lwp has a stop directive in effect
+ * IRIX6: process has stop directive in effect
+ * OSF: task/thread has stop directive in effect
+ * UW: A stop directive is in effect
+ */
+ { PR_DSTOP, "PR_DSTOP", "A stop directive is in effect" },
+#endif
+#if defined (PR_STEP)
+ /* Sol2.5: lwp has a single-step directive in effect
+ * Sol2.6: lwp has a single-step directive in effect
+ * Sol2.7: lwp has a single-step directive in effect
+ * IRIX6: process has single step pending
+ */
+ { PR_STEP, "PR_STEP", "A single step directive is in effect" },
+#endif
+#if defined (PR_ASLEEP)
+ /* Sol2.5: lwp is sleeping in a system call
+ * Sol2.6: lwp is sleeping in a system call
+ * Sol2.7: lwp is sleeping in a system call
+ * IRIX6: process is in an interruptible sleep
+ * OSF: task/thread is asleep within a system call
+ * UW: LWP is sleep()ing in a system call
+ */
+ { PR_ASLEEP, "PR_ASLEEP", "Sleeping in an (interruptible) system call" },
+#endif
+#if defined (PR_PCINVAL)
+ /* Sol2.5: contents of pr_instr undefined
+ * Sol2.6: contents of pr_instr undefined
+ * Sol2.7: contents of pr_instr undefined
+ * IRIX6: current pc is invalid
+ * OSF: program counter contains invalid address
+ * UW: %pc refers to an invalid virtual address
+ */
+ { PR_PCINVAL, "PR_PCINVAL", "PC (pr_instr) is invalid" },
+#endif
+#if defined (PR_ASLWP)
+ /* Sol2.5: this lwp is the aslwp
+ * Sol2.6: this lwp is the aslwp
+ * Sol2.7: this lwp is the aslwp
+ */
+ { PR_ASLWP, "PR_ASLWP", "This is the asynchronous signal LWP" },
+#endif
+#if defined (PR_AGENT)
+ /* Sol2.6: this lwp is the /proc agent lwp
+ * Sol2.7: this lwp is the /proc agent lwp
+ */
+ { PR_AGENT, "PR_AGENT", "This is the /proc agent LWP" },
+#endif
+#if defined (PR_ISSYS)
+ /* Sol2.5: system process
+ * Sol2.6: this is a system process
+ * Sol2.7: this is a system process
+ * IRIX6: process is a system process
+ * OSF: task/thread is a system task/thread
+ * UW: System process
+ */
+ { PR_ISSYS, "PR_ISSYS", "Is a system process/thread" },
+#endif
+#if defined (PR_VFORKP)
+ /* Sol2.6: process is the parent of a vfork()d child
+ * Sol2.7: process is the parent of a vfork()d child
+ */
+ { PR_VFORKP, "PR_VFORKP", "Process is the parent of a vforked child" },
+#endif
+#ifdef PR_ORPHAN
+ /* Sol2.6: process's process group is orphaned
+ * Sol2.7: process's process group is orphaned
+ */
+ { PR_ORPHAN, "PR_ORPHAN", "Process's process group is orphaned" },
+#endif
+#if defined (PR_FORK)
+ /* Sol2.5: inherit-on-fork is in effect
+ * Sol2.6: inherit-on-fork is in effect
+ * Sol2.7: inherit-on-fork is in effect
+ * IRIX6: process has inherit-on-fork flag set
+ * OSF: task/thread has inherit-on-fork flag set
+ * UW: inherit-on-fork is in effect
+ */
+ { PR_FORK, "PR_FORK", "Inherit-on-fork is in effect" },
+#endif
+#if defined (PR_RLC)
+ /* Sol2.5: run-on-last-close is in effect
+ * Sol2.6: run-on-last-close is in effect
+ * Sol2.7: run-on-last-close is in effect
+ * IRIX6: process has run-on-last-close flag set
+ * OSF: task/thread has run-on-last-close flag set
+ * UW: Run-on-last-close is in effect
+ */
+ { PR_RLC, "PR_RLC", "Run-on-last-close is in effect" },
+#endif
+#if defined (PR_KLC)
+ /* Sol2.5: kill-on-last-close is in effect
+ * Sol2.6: kill-on-last-close is in effect
+ * Sol2.7: kill-on-last-close is in effect
+ * IRIX6: process has kill-on-last-close flag set
+ * OSF: kill-on-last-close, superceeds RLC
+ * UW: kill-on-last-close is in effect
+ */
+ { PR_KLC, "PR_KLC", "Kill-on-last-close is in effect" },
+#endif
+#if defined (PR_ASYNC)
+ /* Sol2.5: asynchronous-stop is in effect
+ * Sol2.6: asynchronous-stop is in effect
+ * Sol2.7: asynchronous-stop is in effect
+ * OSF: asynchronous stop mode is in effect
+ * UW: asynchronous stop mode is in effect
+ */
+ { PR_ASYNC, "PR_ASYNC", "Asynchronous stop is in effect" },
+#endif
+#if defined (PR_MSACCT)
+ /* Sol2.5: micro-state usage accounting is in effect
+ * Sol2.6: micro-state usage accounting is in effect
+ * Sol2.7: micro-state usage accounting is in effect
+ */
+ { PR_MSACCT, "PR_MSACCT", "Microstate accounting enabled" },
+#endif
+#if defined (PR_BPTADJ)
+ /* Sol2.5: breakpoint trap pc adjustment is in effect
+ * Sol2.6: breakpoint trap pc adjustment is in effect
+ * Sol2.7: breakpoint trap pc adjustment is in effect
+ */
+ { PR_BPTADJ, "PR_BPTADJ", "Breakpoint PC adjustment in effect" },
+#endif
+#if defined (PR_PTRACE)
+ /* Note: different meanings on Solaris and Irix 6
+ * Sol2.5: obsolete, never set in SunOS5.0
+ * Sol2.6: ptrace-compatibility mode is in effect
+ * Sol2.7: ptrace-compatibility mode is in effect
+ * IRIX6: process is traced with ptrace() too
+ * OSF: task/thread is being traced by ptrace
+ * UW: Process is being controlled by ptrace(2)
+ */
+ { PR_PTRACE, "PR_PTRACE", "Process is being controlled by ptrace" },
+#endif
+#if defined (PR_PCOMPAT)
+ /* Note: PCOMPAT on Sol2.5 means same thing as PTRACE on Sol2.6
+ * Sol2.5 (only): ptrace-compatibility mode is in effect
+ */
+ { PR_PCOMPAT, "PR_PCOMPAT", "Ptrace compatibility mode in effect" },
+#endif
+#ifdef PR_MSFORK
+ /* Sol2.6: micro-state accounting inherited on fork
+ * Sol2.7: micro-state accounting inherited on fork
+ */
+ { PR_MSFORK, "PR_PCOMPAT", "Micro-state accounting inherited on fork" },
+#endif
+
+#ifdef PR_ISKTHREAD
+ /* Irix6: process is a kernel thread */
+ { PR_ISKTHREAD, "PR_KTHREAD", "Process is a kernel thread" },
+#endif
+
+#ifdef PR_ABORT
+ /* OSF (only): abort the current stop condition */
+ { PR_ABORT, "PR_ABORT", "Abort the current stop condition" },
+#endif
+
+#ifdef PR_TRACING
+ /* OSF: task is traced */
+ { PR_TRACING, "PR_TRACING", "Task is traced" },
+#endif
+
+#ifdef PR_STOPFORK
+ /* OSF: stop child on fork */
+ { PR_STOPFORK, "PR_STOPFORK", "Stop child on fork" },
+#endif
+
+#ifdef PR_STOPEXEC
+ /* OSF: stop on exec */
+ { PR_STOPEXEC, "PR_STOPEXEC", "Stop on exec" },
+#endif
+
+#ifdef PR_STOPTERM
+ /* OSF: stop on task exit */
+ { PR_STOPTERM, "PR_STOPTERM", "Stop on task exit" },
+#endif
+
+#ifdef PR_STOPTCR
+ /* OSF: stop on thread creation */
+ { PR_STOPTCR, "PR_STOPTCR", "Stop on thread creation" },
+#endif
+
+#ifdef PR_STOPTTERM
+ /* OSF: stop on thread exit */
+ { PR_STOPTTERM, "PR_STOPTTERM", "Stop on thread exit" },
+#endif
+
+#ifdef PR_USCHED
+ /* OSF: user level scheduling is in effect */
+ { PR_USCHED, "PR_USCHED", "User level scheduling is in effect" },
+#endif
+};
+
+void
+proc_prettyfprint_flags (file, flags, verbose)
+ FILE *file;
+ unsigned long flags;
+ int verbose;
+{
+ int i;
+
+ for (i = 0; i < sizeof (pr_flag_table) / sizeof (pr_flag_table[0]); i++)
+ if (flags & pr_flag_table[i].value)
+ {
+ fprintf (file, "%s ", pr_flag_table[i].name);
+ if (verbose)
+ fprintf (file, "%s\n", pr_flag_table[i].desc);
+ }
+ if (!verbose)
+ fprintf (file, "\n");
+}
+
+void
+proc_prettyprint_flags (flags, verbose)
+ unsigned long flags;
+ int verbose;
+{
+ proc_prettyfprint_flags (stdout, flags, verbose);
+}
diff --git a/gdb/proc_why.c b/gdb/proc_why.c
new file mode 100755
index 0000000..dbfec3c
--- /dev/null
+++ b/gdb/proc_why.c
@@ -0,0 +1,158 @@
+/*
+ * Pretty-print the pr_why value.
+ *
+ * Arguments: unsigned long flags, int verbose
+ *
+ */
+
+#include "defs.h"
+
+#if defined(NEW_PROC_API)
+#define _STRUCTURED_PROC 1
+#endif
+
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/procfs.h>
+
+/* Much of the information used in the /proc interface, particularly for
+ printing status information, is kept as tables of structures of the
+ following form. These tables can be used to map numeric values to
+ their symbolic names and to a string that describes their specific use. */
+
+struct trans {
+ int value; /* The numeric value */
+ char *name; /* The equivalent symbolic value */
+ char *desc; /* Short description of value */
+};
+
+/* Translate values in the pr_why field of the prstatus struct. */
+
+static struct trans pr_why_table[] =
+{
+#if defined (PR_REQUESTED)
+ /* All platforms */
+ { PR_REQUESTED, "PR_REQUESTED",
+ "Directed to stop by debugger via P(IO)CSTOP or P(IO)CWSTOP" },
+#endif
+#if defined (PR_SIGNALLED)
+ /* All platforms */
+ { PR_SIGNALLED, "PR_SIGNALLED", "Receipt of a traced signal" },
+#endif
+#if defined (PR_SYSENTRY)
+ /* All platforms */
+ { PR_SYSENTRY, "PR_SYSENTRY", "Entry to a traced system call" },
+#endif
+#if defined (PR_SYSEXIT)
+ /* All platforms */
+ { PR_SYSEXIT, "PR_SYSEXIT", "Exit from a traced system call" },
+#endif
+#if defined (PR_JOBCONTROL)
+ /* All platforms */
+ { PR_JOBCONTROL, "PR_JOBCONTROL", "Default job control stop signal action" },
+#endif
+#if defined (PR_FAULTED)
+ /* All platforms */
+ { PR_FAULTED, "PR_FAULTED", "Incurred a traced hardware fault" },
+#endif
+#if defined (PR_SUSPENDED)
+ /* Solaris and UnixWare */
+ { PR_SUSPENDED, "PR_SUSPENDED", "Process suspended" },
+#endif
+#if defined (PR_CHECKPOINT)
+ /* Solaris only */
+ { PR_CHECKPOINT, "PR_CHECKPOINT", "Process stopped at checkpoint" },
+#endif
+#if defined (PR_FORKSTOP)
+ /* OSF only */
+ { PR_FORKSTOP, "PR_FORKSTOP", "Process stopped at end of fork call" },
+#endif
+#if defined (PR_TCRSTOP)
+ /* OSF only */
+ { PR_TCRSTOP, "PR_TCRSTOP", "Process stopped on thread creation" },
+#endif
+#if defined (PR_TTSTOP)
+ /* OSF only */
+ { PR_TTSTOP, "PR_TTSTOP", "Process stopped on thread termination" },
+#endif
+#if defined (PR_DEAD)
+ /* OSF only */
+ { PR_DEAD, "PR_DEAD", "Process stopped in exit system call" },
+#endif
+};
+
+void
+proc_prettyfprint_why (file, why, what, verbose)
+ FILE *file;
+ unsigned long why;
+ unsigned long what;
+ int verbose;
+{
+ int i;
+
+ if (why == 0)
+ return;
+
+ for (i = 0; i < sizeof (pr_why_table) / sizeof (pr_why_table[0]); i++)
+ if (why == pr_why_table[i].value)
+ {
+ fprintf (file, "%s ", pr_why_table[i].name);
+ if (verbose)
+ fprintf (file, ": %s ", pr_why_table[i].desc);
+
+ switch (why) {
+#ifdef PR_REQUESTED
+ case PR_REQUESTED:
+ break; /* Nothing more to print. */
+#endif
+#ifdef PR_SIGNALLED
+ case PR_SIGNALLED:
+ proc_prettyfprint_signal (file, what, verbose);
+ break;
+#endif
+#ifdef PR_FAULTED
+ case PR_FAULTED:
+ proc_prettyfprint_fault (file, what, verbose);
+ break;
+#endif
+#ifdef PR_SYSENTRY
+ case PR_SYSENTRY:
+ fprintf (file, "Entry to ");
+ proc_prettyfprint_syscall (file, what, verbose);
+ break;
+#endif
+#ifdef PR_SYSEXIT
+ case PR_SYSEXIT:
+ fprintf (file, "Exit from ");
+ proc_prettyfprint_syscall (file, what, verbose);
+ break;
+#endif
+#ifdef PR_JOBCONTROL
+ case PR_JOBCONTROL:
+ proc_prettyfprint_signal (file, what, verbose);
+ break;
+#endif
+#ifdef PR_DEAD
+ case PR_DEAD:
+ fprintf (file, "Exit status: %d\n", what);
+ break;
+#endif
+ default:
+ fprintf (file, "Unknown why %d, what %d\n", why, what);
+ break;
+ }
+ fprintf (file, "\n");
+
+ return;
+ }
+ fprintf (file, "Unknown pr_why.\n");
+}
+
+void
+proc_prettyprint_why (why, what, verbose)
+ unsigned long why;
+ unsigned long what;
+ int verbose;
+{
+ proc_prettyfprint_why (stdout, why, what, verbose);
+}
diff --git a/gdb/procfs.c b/gdb/procfs.c
index 6abc092..67d1c3c 100644
--- a/gdb/procfs.c
+++ b/gdb/procfs.c
@@ -1,132 +1,283 @@
/* Machine independent support for SVR4 /proc (process file system) for GDB.
- Copyright 1991, 1992-98, 1999 Free Software Foundation, Inc.
- Written by Fred Fish at Cygnus Support. Changes for sysv4.2mp procfs
- compatibility by Geoffrey Noer at Cygnus Solutions.
+ Copyright 1999 Free Software Foundation, Inc.
+ Written by Michael Snyder at Cygnus Solutions.
+ Based on work by Fred Fish, Stu Grossman, Geoff Noer, and others.
- This file is part of GDB.
+This file is part of GDB.
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software Foundation,
+Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+#include "defs.h"
+#include "inferior.h"
+#include "target.h"
+#include "gdbcore.h"
+#include "gdbcmd.h"
-/* N O T E S
-
- For information on the details of using /proc consult section proc(4)
- in the UNIX System V Release 4 System Administrator's Reference Manual.
-
- The general register and floating point register sets are manipulated
- separately. This file makes the assumption that if FP0_REGNUM is
- defined, then support for the floating point register set is desired,
- regardless of whether or not the actual target has floating point hardware.
+#if defined (NEW_PROC_API)
+#define _STRUCTURED_PROC 1 /* Should be done by configure script. */
+#endif
+#include <sys/procfs.h>
+#include <sys/fault.h>
+#include <sys/syscall.h>
+#include <sys/errno.h>
+
+/*
+ * PROCFS.C
+ *
+ * This module provides the interface between GDB and the
+ * /proc file system, which is used on many versions of Unix
+ * as a means for debuggers to control other processes.
+ * Examples of the systems that use this interface are:
+ * Irix
+ * Solaris
+ * OSF
+ * Unixware
+ *
+ * /proc works by immitating a file system: you open a simulated file
+ * that represents the process you wish to interact with, and
+ * perform operations on that "file" in order to examine or change
+ * the state of the other process.
+ *
+ * The most important thing to know about /proc and this module
+ * is that there are two very different interfaces to /proc:
+ * One that uses the ioctl system call, and
+ * another that uses read and write system calls.
+ * This module has to support both /proc interfaces. This means
+ * that there are two different ways of doing every basic operation.
+ *
+ * In order to keep most of the code simple and clean, I have
+ * defined an interface "layer" which hides all these system calls.
+ * An ifdef (NEW_PROC_API) determines which interface we are using,
+ * and most or all occurrances of this ifdef should be confined to
+ * this interface layer.
*/
-#include "defs.h"
+/* Determine which /proc API we are using:
+ The ioctl API defines PIOCSTATUS, while
+ the read/write (multiple fd) API never does. */
+#ifdef NEW_PROC_API
#include <sys/types.h>
-#include <time.h>
-#include <sys/fault.h>
-#include <sys/syscall.h>
-#include <sys/procfs.h>
-#include <fcntl.h>
-#include <errno.h>
-#include "gdb_string.h"
-#include <stropts.h>
-#include <poll.h>
-#include "gdb_stat.h"
+#include <dirent.h> /* opendir/readdir, for listing the LWP's */
+#endif
-#include "inferior.h"
-#include "target.h"
-#include "command.h"
-#include "gdbcore.h"
-#include "gdbthread.h"
+#include <fcntl.h> /* for O_RDONLY */
+#include <unistd.h> /* for "X_OK" */
+#include "gdb_stat.h" /* for struct stat */
-#if !defined(SYS_lwp_create) && defined(SYS_lwpcreate)
-#define SYS_lwp_create SYS_lwpcreate
-#endif
+/* =================== TARGET_OPS "MODULE" =================== */
-#if !defined(SYS_lwp_exit) && defined(SYS_lwpexit)
-#define SYS_lwp_exit SYS_lwpexit
-#endif
+/*
+ * This module defines the GDB target vector and its methods.
+ */
-#if !defined(SYS_lwp_wait) && defined(SYS_lwpwait)
-#define SYS_lwp_wait SYS_lwpwait
-#endif
+static void procfs_open PARAMS((char *, int));
+static void procfs_attach PARAMS ((char *, int));
+static void procfs_detach PARAMS ((char *, int));
+static void procfs_resume PARAMS ((int, int, enum target_signal));
+static int procfs_can_run PARAMS ((void));
+static void procfs_stop PARAMS ((void));
+static void procfs_files_info PARAMS ((struct target_ops *));
+static void procfs_fetch_registers PARAMS ((int));
+static void procfs_store_registers PARAMS ((int));
+static void procfs_notice_signals PARAMS ((int));
+static void procfs_prepare_to_store PARAMS ((void));
+static void procfs_kill_inferior PARAMS ((void));
+static void procfs_mourn_inferior PARAMS ((void));
+static void procfs_create_inferior PARAMS ((char *, char *, char **));
+static int procfs_wait PARAMS ((int,
+ struct target_waitstatus *));
+static int procfs_xfer_memory PARAMS ((CORE_ADDR,
+ char *, int, int,
+ struct target_ops *));
+
+static int procfs_thread_alive PARAMS ((int));
+
+void procfs_find_new_threads PARAMS ((void));
+char *procfs_pid_to_str PARAMS ((int));
+
+struct target_ops procfs_ops; /* the target vector */
-#if !defined(SYS_lwp_self) && defined(SYS_lwpself)
-#define SYS_lwp_self SYS_lwpself
-#endif
+static void
+init_procfs_ops ()
+{
+ procfs_ops.to_shortname = "procfs";
+ procfs_ops.to_longname = "Unix /proc child process";
+ procfs_ops.to_doc =
+ "Unix /proc child process (started by the \"run\" command).";
+ procfs_ops.to_open = procfs_open;
+ procfs_ops.to_can_run = procfs_can_run;
+ procfs_ops.to_create_inferior = procfs_create_inferior;
+ procfs_ops.to_kill = procfs_kill_inferior;
+ procfs_ops.to_mourn_inferior = procfs_mourn_inferior;
+ procfs_ops.to_attach = procfs_attach;
+ procfs_ops.to_detach = procfs_detach;
+ procfs_ops.to_wait = procfs_wait;
+ procfs_ops.to_resume = procfs_resume;
+ procfs_ops.to_prepare_to_store = procfs_prepare_to_store;
+ procfs_ops.to_fetch_registers = procfs_fetch_registers;
+ procfs_ops.to_store_registers = procfs_store_registers;
+ procfs_ops.to_xfer_memory = procfs_xfer_memory;
+ procfs_ops.to_insert_breakpoint = memory_insert_breakpoint;
+ procfs_ops.to_remove_breakpoint = memory_remove_breakpoint;
+ procfs_ops.to_notice_signals = procfs_notice_signals;
+ procfs_ops.to_files_info = procfs_files_info;
+ procfs_ops.to_stop = procfs_stop;
+
+ procfs_ops.to_terminal_init = terminal_init_inferior;
+ procfs_ops.to_terminal_inferior = terminal_inferior;
+ procfs_ops.to_terminal_ours_for_output = terminal_ours_for_output;
+ procfs_ops.to_terminal_ours = terminal_ours;
+ procfs_ops.to_terminal_info = child_terminal_info;
+
+ procfs_ops.to_find_new_threads = procfs_find_new_threads;
+ procfs_ops.to_thread_alive = procfs_thread_alive;
+ procfs_ops.to_pid_to_str = procfs_pid_to_str;
+
+ procfs_ops.to_has_execution = 1;
+ procfs_ops.to_has_stack = 1;
+ procfs_ops.to_has_registers = 1;
+ procfs_ops.to_stratum = process_stratum;
+ procfs_ops.to_has_thread_control = tc_schedlock;
+ procfs_ops.to_magic = OPS_MAGIC;
+}
-#if !defined(SYS_lwp_info) && defined(SYS_lwpinfo)
-#define SYS_lwp_info SYS_lwpinfo
-#endif
+/* =================== END, TARGET_OPS "MODULE" =================== */
+
+/*
+ * Temporary debugging code:
+ *
+ * These macros allow me to trace the system calls that we make
+ * to control the child process. This is quite handy for comparing
+ * with the older version of procfs.
+ */
+
+#ifdef TRACE_PROCFS
+#ifdef NEW_PROC_API
+extern int write_with_trace PARAMS ((int, void *, size_t, char *, int));
+extern off_t lseek_with_trace PARAMS ((int, off_t, int, char *, int));
-#if !defined(SYS_lwp_private) && defined(SYS_lwpprivate)
-#define SYS_lwp_private SYS_lwpprivate
+#if 0
+#define write(X,Y,Z) write_with_trace (X, Y, Z, __FILE__, __LINE__)
#endif
-#if !defined(SYS_lwp_kill) && defined(SYS_lwpkill)
-#define SYS_lwp_kill SYS_lwpkill
+#define lseek(X,Y,Z) lseek_with_trace (X, Y, Z, __FILE__, __LINE__)
+#else
+extern int ioctl_with_trace PARAMS ((int, long, void *, char *, int));
+#define ioctl(X,Y,Z) ioctl_with_trace (X, Y, Z, __FILE__, __LINE__)
#endif
+#define open(X,Y) open_with_trace (X, Y, __FILE__, __LINE__)
+#define close(X) close_with_trace (X, __FILE__, __LINE__)
+#define wait(X) wait_with_trace (X, __FILE__, __LINE__)
-#if !defined(SYS_lwp_suspend) && defined(SYS_lwpsuspend)
-#define SYS_lwp_suspend SYS_lwpsuspend
+#if 0
+#define PROCFS_NOTE(X) procfs_note (X, __FILE__, __LINE__)
+#define PROC_PRETTYFPRINT_STATUS(X,Y,Z,T) \
+proc_prettyfprint_status (X, Y, Z, T)
+#else
+#define PROCFS_NOTE(X)
+#define PROC_PRETTYFPRINT_STATUS(X,Y,Z,T)
#endif
-#if !defined(SYS_lwp_continue) && defined(SYS_lwpcontinue)
-#define SYS_lwp_continue SYS_lwpcontinue
+#else
+#define PROCFS_NOTE(X)
+#define PROC_PRETTYFPRINT_STATUS(X,Y,Z,T)
#endif
+ /* temp: */
+#undef PROCFS_NOTE
+#define PROCFS_NOTE(X)
+ /* suppress */
+
+
+/*
+ * World Unification:
+ *
+ * Put any typedefs, defines etc. here that are required for
+ * the unification of code that handles different versions of /proc.
+ */
+
+#ifdef NEW_PROC_API /* Solaris 7 && 8 method for watchpoints */
+#ifndef UNIXWARE
+ enum { READ_WATCHFLAG = WA_READ,
+ WRITE_WATCHFLAG = WA_WRITE,
+ EXEC_WATCHFLAG = WA_EXEC,
+ AFTER_WATCHFLAG = WA_TRAPAFTER
+ };
+#endif
+#else /* Irix method for watchpoints */
+ enum { READ_WATCHFLAG = MA_READ,
+ WRITE_WATCHFLAG = MA_WRITE,
+ EXEC_WATCHFLAG = MA_EXEC,
+ AFTER_WATCHFLAG = 0 /* trapafter not implemented */
+ };
+#endif
+
+
+
+
+/* =================== STRUCT PROCINFO "MODULE" =================== */
+
+ /* FIXME: this comment will soon be out of date W.R.T. threads. */
+
+/* The procinfo struct is a wrapper to hold all the state information
+ concerning a /proc process. There should be exactly one procinfo
+ for each process, and since GDB currently can debug only one
+ process at a time, that means there should be only one procinfo.
+ All of the LWP's of a process can be accessed indirectly thru the
+ single process procinfo.
+
+ However, against the day when GDB may debug more than one process,
+ this data structure is kept in a list (which for now will hold no
+ more than one member), and many functions will have a pointer to a
+ procinfo as an argument.
+
+ There will be a separate procinfo structure for use by the (not yet
+ implemented) "info proc" command, so that we can print useful
+ information about any random process without interfering with the
+ inferior's procinfo information. */
+
+#ifdef NEW_PROC_API
+/* format strings for /proc paths */
+# ifndef CTL_PROC_NAME_FMT
+# define MAIN_PROC_NAME_FMT "/proc/%d"
+# define CTL_PROC_NAME_FMT "/proc/%d/ctl"
+# define AS_PROC_NAME_FMT "/proc/%d/as"
+# define MAP_PROC_NAME_FMT "/proc/%d/map"
+# define STATUS_PROC_NAME_FMT "/proc/%d/status"
+# define MAX_PROC_NAME_SIZE sizeof("/proc/99999/lwp/8096/lstatus")
+# endif
+/* the name of the proc status struct depends on the implementation */
+typedef pstatus_t gdb_prstatus_t;
+typedef lwpstatus_t gdb_lwpstatus_t;
+#else /* ! NEW_PROC_API */
+/* format strings for /proc paths */
+# ifndef CTL_PROC_NAME_FMT
+# define MAIN_PROC_NAME_FMT "/proc/%05d"
+# define CTL_PROC_NAME_FMT "/proc/%05d"
+# define AS_PROC_NAME_FMT "/proc/%05d"
+# define MAP_PROC_NAME_FMT "/proc/%05d"
+# define STATUS_PROC_NAME_FMT "/proc/%05d"
+# define MAX_PROC_NAME_SIZE sizeof("/proc/ttttppppp")
+# endif
/* the name of the proc status struct depends on the implementation */
-/* Wrap Light Weight Process member in THE_PR_LWP macro for clearer code */
-#ifndef HAVE_PSTATUS_T
typedef prstatus_t gdb_prstatus_t;
-#define THE_PR_LWP(a) a
-#else /* HAVE_PSTATUS_T */
-typedef pstatus_t gdb_prstatus_t;
-#define THE_PR_LWP(a) a.pr_lwp
-#if !defined(HAVE_PRRUN_T) && defined(HAVE_MULTIPLE_PROC_FDS)
- /* Fallback definitions - for using configure information directly */
-#ifndef UNIXWARE
-#define UNIXWARE 1
-#endif
-#if !defined(PROCFS_USE_READ_WRITE) && !defined(HAVE_PROCFS_PIOCSET)
-#define PROCFS_USE_READ_WRITE 1
-#endif
-#endif /* !HAVE_PRRUN_T && HAVE_MULTIPLE_PROC_FDS */
-#endif /* HAVE_PSTATUS_T */
-
-#define MAX_SYSCALLS 256 /* Maximum number of syscalls for table */
-
-/* proc name formats may vary depending on the proc implementation */
-#ifdef HAVE_MULTIPLE_PROC_FDS
-#ifndef CTL_PROC_NAME_FMT
-#define CTL_PROC_NAME_FMT "/proc/%d/ctl"
-#define AS_PROC_NAME_FMT "/proc/%d/as"
-#define MAP_PROC_NAME_FMT "/proc/%d/map"
-#define STATUS_PROC_NAME_FMT "/proc/%d/status"
-#endif
-#else /* HAVE_MULTIPLE_PROC_FDS */
-#ifndef CTL_PROC_NAME_FMT
-#define CTL_PROC_NAME_FMT "/proc/%05d"
-#define AS_PROC_NAME_FMT "/proc/%05d"
-#define MAP_PROC_NAME_FMT "/proc/%05d"
-#define STATUS_PROC_NAME_FMT "/proc/%05d"
-#endif
-#endif /* HAVE_MULTIPLE_PROC_FDS */
+typedef prstatus_t gdb_lwpstatus_t;
+#endif /* NEW_PROC_API */
/* These #ifdefs are for sol2.x in particular. sol2.x has
@@ -135,5481 +286,4398 @@ typedef pstatus_t gdb_prstatus_t;
use prgregset_t (and prfpregset_t) everywhere. */
#ifdef GDB_GREGSET_TYPE
-typedef GDB_GREGSET_TYPE gdb_gregset_t;
+ typedef GDB_GREGSET_TYPE gdb_gregset_t;
#else
-typedef gregset_t gdb_gregset_t;
+ typedef gregset_t gdb_gregset_t;
#endif
#ifdef GDB_FPREGSET_TYPE
-typedef GDB_FPREGSET_TYPE gdb_fpregset_t;
+ typedef GDB_FPREGSET_TYPE gdb_fpregset_t;
#else
-typedef fpregset_t gdb_fpregset_t;
-#endif
-
-
-#define MAX_PROC_NAME_SIZE sizeof("/proc/1234567890/status")
-
-struct target_ops procfs_ops;
-
-int procfs_suppress_run = 0; /* Non-zero if procfs should pretend not to
- be a runnable target. Used by targets
- that can sit atop procfs, such as solaris
- thread support. */
-
-#if 1 /* FIXME: Gross and ugly hack to resolve coredep.c global */
-CORE_ADDR kernel_u_addr;
-#endif
-
-#ifdef BROKEN_SIGINFO_H /* Workaround broken SGS <sys/siginfo.h> */
-#undef si_pid
-#define si_pid _data._proc.pid
-#undef si_uid
-#define si_uid _data._proc._pdata._kill.uid
-#endif /* BROKEN_SIGINFO_H */
-
-/* Define structures for passing commands to /proc/pid/ctl file. Note that
- while we create these for the PROCFS_USE_READ_WRITE world, we use them
- and ignore the extra cmd int in other proc schemes.
- */
-/* generic ctl msg */
-struct proc_ctl
- {
- int cmd;
- long data;
- };
-
-/* set general registers */
-struct greg_ctl
- {
- int cmd;
- gdb_gregset_t gregset;
- };
-
-/* set fp registers */
-struct fpreg_ctl
- {
- int cmd;
- gdb_fpregset_t fpregset;
- };
-
-/* set signals to be traced */
-struct sig_ctl
- {
- int cmd;
- sigset_t sigset;
- };
-
-/* set faults to be traced */
-struct flt_ctl
- {
- int cmd;
- fltset_t fltset;
- };
-
-/* set system calls to be traced */
-struct sys_ctl
- {
- int cmd;
- sysset_t sysset;
- };
-
-/* set current signal to be traced */
-struct sigi_ctl
- {
- int cmd;
- siginfo_t siginfo;
- };
-
-/* All access to the inferior, either one started by gdb or one that has
- been attached to, is controlled by an instance of a procinfo structure,
- defined below. Since gdb currently only handles one inferior at a time,
- the procinfo structure for the inferior is statically allocated and
- only one exists at any given time. There is a separate procinfo
- structure for use by the "info proc" command, so that we can print
- useful information about any random process without interfering with
- the inferior's procinfo information. */
-
-struct procinfo
- {
- struct procinfo *next;
- int pid; /* Process ID of inferior */
- int ctl_fd; /* File descriptor for /proc ctl file */
- int status_fd; /* File descriptor for /proc status file */
- int as_fd; /* File descriptor for /proc as file */
- int map_fd; /* File descriptor for /proc map file */
- char *pathname; /* Pathname to /proc entry */
- int had_event; /* poll/select says something happened */
- int was_stopped; /* Nonzero if was stopped prior to attach */
- int nopass_next_sigstop; /* Don't pass a sigstop on next resume */
-#ifdef HAVE_PRRUN_T
- prrun_t prrun; /* Control state when it is run */
+ typedef fpregset_t gdb_fpregset_t;
#endif
- gdb_prstatus_t prstatus; /* Current process status info */
- struct greg_ctl gregset; /* General register set */
- struct fpreg_ctl fpregset; /* Floating point register set */
- struct flt_ctl fltset; /* Current traced hardware fault set */
- struct sig_ctl trace; /* Current traced signal set */
- struct sys_ctl exitset; /* Current traced system call exit set */
- struct sys_ctl entryset; /* Current traced system call entry set */
- struct sig_ctl saved_sighold; /* Saved held signal set */
- struct flt_ctl saved_fltset; /* Saved traced hardware fault set */
- struct sig_ctl saved_trace; /* Saved traced signal set */
- struct sys_ctl saved_exitset; /* Saved traced system call exit set */
- struct sys_ctl saved_entryset; /* Saved traced system call entry set */
- int num_syscall_handlers; /* Number of syscall trap handlers
- currently installed */
- /* Pointer to list of syscall trap handlers */
- struct procfs_syscall_handler *syscall_handlers;
- int saved_rtnval; /* return value and status for wait(), */
- int saved_statval; /* as supplied by a syscall handler. */
- int new_child; /* Non-zero if it's a new thread */
- };
-
-/* List of inferior process information */
-static struct procinfo *procinfo_list = NULL;
-static struct pollfd *poll_list; /* pollfds used for waiting on /proc */
-
-static int num_poll_list = 0; /* Number of entries in poll_list */
-
-/* Much of the information used in the /proc interface, particularly for
- printing status information, is kept as tables of structures of the
- following form. These tables can be used to map numeric values to
- their symbolic names and to a string that describes their specific use. */
-
-struct trans
- {
- int value; /* The numeric value */
- char *name; /* The equivalent symbolic value */
- char *desc; /* Short description of value */
- };
-/* Translate bits in the pr_flags member of the prstatus structure, into the
- names and desc information. */
+/* The PIDs that we pass to and from GDB will be composed from
+ the actual PID plus the LWPID. These macros will be used to
+ compose and decompose them. */
-static struct trans pr_flag_table[] =
-{
-#if defined (PR_STOPPED)
- {PR_STOPPED, "PR_STOPPED", "Process is stopped"},
-#endif
-#if defined (PR_ISTOP)
- {PR_ISTOP, "PR_ISTOP", "Stopped on an event of interest"},
-#endif
-#if defined (PR_DSTOP)
- {PR_DSTOP, "PR_DSTOP", "A stop directive is in effect"},
-#endif
-#if defined (PR_ASLEEP)
- {PR_ASLEEP, "PR_ASLEEP", "Sleeping in an interruptible system call"},
-#endif
-#if defined (PR_FORK)
- {PR_FORK, "PR_FORK", "Inherit-on-fork is in effect"},
-#endif
-#if defined (PR_RLC)
- {PR_RLC, "PR_RLC", "Run-on-last-close is in effect"},
-#endif
-#if defined (PR_PTRACE)
- {PR_PTRACE, "PR_PTRACE", "Process is being controlled by ptrace"},
+#ifndef PIDGET
+#define PIDGET(PID) (((PID) & 0xffff))
#endif
-#if defined (PR_PCINVAL)
- {PR_PCINVAL, "PR_PCINVAL", "PC refers to an invalid virtual address"},
-#endif
-#if defined (PR_ISSYS)
- {PR_ISSYS, "PR_ISSYS", "Is a system process"},
-#endif
-#if defined (PR_STEP)
- {PR_STEP, "PR_STEP", "Process has single step pending"},
-#endif
-#if defined (PR_KLC)
- {PR_KLC, "PR_KLC", "Kill-on-last-close is in effect"},
-#endif
-#if defined (PR_ASYNC)
- {PR_ASYNC, "PR_ASYNC", "Asynchronous stop is in effect"},
-#endif
-#if defined (PR_PCOMPAT)
- {PR_PCOMPAT, "PR_PCOMPAT", "Ptrace compatibility mode in effect"},
-#endif
-#if defined (PR_MSACCT)
- {PR_MSACCT, "PR_MSACCT", "Microstate accounting enabled"},
-#endif
-#if defined (PR_BPTADJ)
- {PR_BPTADJ, "PR_BPTADJ", "Breakpoint PC adjustment in effect"},
-#endif
-#if defined (PR_ASLWP)
- {PR_ASLWP, "PR_ASLWP", "Asynchronus signal LWP"},
-#endif
- {0, NULL, NULL}
-};
-
-/* Translate values in the pr_why field of the prstatus struct. */
-static struct trans pr_why_table[] =
-{
-#if defined (PR_REQUESTED)
- {PR_REQUESTED, "PR_REQUESTED", "Directed to stop via PIOCSTOP/PIOCWSTOP"},
-#endif
-#if defined (PR_SIGNALLED)
- {PR_SIGNALLED, "PR_SIGNALLED", "Receipt of a traced signal"},
-#endif
-#if defined (PR_SYSENTRY)
- {PR_SYSENTRY, "PR_SYSENTRY", "Entry to a traced system call"},
-#endif
-#if defined (PR_SYSEXIT)
- {PR_SYSEXIT, "PR_SYSEXIT", "Exit from a traced system call"},
-#endif
-#if defined (PR_JOBCONTROL)
- {PR_JOBCONTROL, "PR_JOBCONTROL", "Default job control stop signal action"},
-#endif
-#if defined (PR_FAULTED)
- {PR_FAULTED, "PR_FAULTED", "Incurred a traced hardware fault"},
-#endif
-#if defined (PR_SUSPENDED)
- {PR_SUSPENDED, "PR_SUSPENDED", "Process suspended"},
-#endif
-#if defined (PR_CHECKPOINT)
- {PR_CHECKPOINT, "PR_CHECKPOINT", "(???)"},
-#endif
- {0, NULL, NULL}
-};
-
-/* Hardware fault translation table. */
-
-static struct trans faults_table[] =
-{
-#if defined (FLTILL)
- {FLTILL, "FLTILL", "Illegal instruction"},
-#endif
-#if defined (FLTPRIV)
- {FLTPRIV, "FLTPRIV", "Privileged instruction"},
-#endif
-#if defined (FLTBPT)
- {FLTBPT, "FLTBPT", "Breakpoint trap"},
-#endif
-#if defined (FLTTRACE)
- {FLTTRACE, "FLTTRACE", "Trace trap"},
-#endif
-#if defined (FLTACCESS)
- {FLTACCESS, "FLTACCESS", "Memory access fault"},
-#endif
-#if defined (FLTBOUNDS)
- {FLTBOUNDS, "FLTBOUNDS", "Memory bounds violation"},
-#endif
-#if defined (FLTIOVF)
- {FLTIOVF, "FLTIOVF", "Integer overflow"},
-#endif
-#if defined (FLTIZDIV)
- {FLTIZDIV, "FLTIZDIV", "Integer zero divide"},
-#endif
-#if defined (FLTFPE)
- {FLTFPE, "FLTFPE", "Floating-point exception"},
+#ifndef TIDGET
+#define TIDGET(PID) (((PID) & 0x7fffffff) >> 16)
#endif
-#if defined (FLTSTACK)
- {FLTSTACK, "FLTSTACK", "Unrecoverable stack fault"},
-#endif
-#if defined (FLTPAGE)
- {FLTPAGE, "FLTPAGE", "Recoverable page fault"},
-#endif
- {0, NULL, NULL}
-};
-
-/* Translation table for signal generation information. See UNIX System
- V Release 4 Programmer's Reference Manual, siginfo(5). */
-static struct sigcode
- {
- int signo;
- int code;
- char *codename;
- char *desc;
- }
-siginfo_table[] =
-{
-#if defined (SIGILL) && defined (ILL_ILLOPC)
- {
- SIGILL, ILL_ILLOPC, "ILL_ILLOPC", "Illegal opcode"
- }
- ,
-#endif
-#if defined (SIGILL) && defined (ILL_ILLOPN)
- {
- SIGILL, ILL_ILLOPN, "ILL_ILLOPN", "Illegal operand",
- }
- ,
-#endif
-#if defined (SIGILL) && defined (ILL_ILLADR)
- {
- SIGILL, ILL_ILLADR, "ILL_ILLADR", "Illegal addressing mode"
- }
- ,
-#endif
-#if defined (SIGILL) && defined (ILL_ILLTRP)
- {
- SIGILL, ILL_ILLTRP, "ILL_ILLTRP", "Illegal trap"
- }
- ,
-#endif
-#if defined (SIGILL) && defined (ILL_PRVOPC)
- {
- SIGILL, ILL_PRVOPC, "ILL_PRVOPC", "Privileged opcode"
- }
- ,
-#endif
-#if defined (SIGILL) && defined (ILL_PRVREG)
- {
- SIGILL, ILL_PRVREG, "ILL_PRVREG", "Privileged register"
- }
- ,
-#endif
-#if defined (SIGILL) && defined (ILL_COPROC)
- {
- SIGILL, ILL_COPROC, "ILL_COPROC", "Coprocessor error"
- }
- ,
-#endif
-#if defined (SIGILL) && defined (ILL_BADSTK)
- {
- SIGILL, ILL_BADSTK, "ILL_BADSTK", "Internal stack error"
- }
- ,
-#endif
-#if defined (SIGFPE) && defined (FPE_INTDIV)
- {
- SIGFPE, FPE_INTDIV, "FPE_INTDIV", "Integer divide by zero"
- }
- ,
-#endif
-#if defined (SIGFPE) && defined (FPE_INTOVF)
- {
- SIGFPE, FPE_INTOVF, "FPE_INTOVF", "Integer overflow"
- }
- ,
-#endif
-#if defined (SIGFPE) && defined (FPE_FLTDIV)
- {
- SIGFPE, FPE_FLTDIV, "FPE_FLTDIV", "Floating point divide by zero"
- }
- ,
-#endif
-#if defined (SIGFPE) && defined (FPE_FLTOVF)
- {
- SIGFPE, FPE_FLTOVF, "FPE_FLTOVF", "Floating point overflow"
- }
- ,
+#ifndef MERGEPID
+#define MERGEPID(PID, TID) (((PID) & 0xffff) | ((TID) << 16))
#endif
-#if defined (SIGFPE) && defined (FPE_FLTUND)
- {
- SIGFPE, FPE_FLTUND, "FPE_FLTUND", "Floating point underflow"
- }
- ,
-#endif
-#if defined (SIGFPE) && defined (FPE_FLTRES)
- {
- SIGFPE, FPE_FLTRES, "FPE_FLTRES", "Floating point inexact result"
- }
- ,
-#endif
-#if defined (SIGFPE) && defined (FPE_FLTINV)
- {
- SIGFPE, FPE_FLTINV, "FPE_FLTINV", "Invalid floating point operation"
- }
- ,
-#endif
-#if defined (SIGFPE) && defined (FPE_FLTSUB)
- {
- SIGFPE, FPE_FLTSUB, "FPE_FLTSUB", "Subscript out of range"
- }
- ,
-#endif
-#if defined (SIGSEGV) && defined (SEGV_MAPERR)
- {
- SIGSEGV, SEGV_MAPERR, "SEGV_MAPERR", "Address not mapped to object"
- }
- ,
-#endif
-#if defined (SIGSEGV) && defined (SEGV_ACCERR)
- {
- SIGSEGV, SEGV_ACCERR, "SEGV_ACCERR", "Invalid permissions for object"
- }
- ,
-#endif
-#if defined (SIGBUS) && defined (BUS_ADRALN)
- {
- SIGBUS, BUS_ADRALN, "BUS_ADRALN", "Invalid address alignment"
- }
- ,
-#endif
-#if defined (SIGBUS) && defined (BUS_ADRERR)
- {
- SIGBUS, BUS_ADRERR, "BUS_ADRERR", "Non-existent physical address"
- }
- ,
-#endif
-#if defined (SIGBUS) && defined (BUS_OBJERR)
- {
- SIGBUS, BUS_OBJERR, "BUS_OBJERR", "Object specific hardware error"
- }
- ,
-#endif
-#if defined (SIGTRAP) && defined (TRAP_BRKPT)
- {
- SIGTRAP, TRAP_BRKPT, "TRAP_BRKPT", "Process breakpoint"
- }
- ,
-#endif
-#if defined (SIGTRAP) && defined (TRAP_TRACE)
- {
- SIGTRAP, TRAP_TRACE, "TRAP_TRACE", "Process trace trap"
- }
- ,
-#endif
-#if defined (SIGCLD) && defined (CLD_EXITED)
- {
- SIGCLD, CLD_EXITED, "CLD_EXITED", "Child has exited"
- }
- ,
-#endif
-#if defined (SIGCLD) && defined (CLD_KILLED)
- {
- SIGCLD, CLD_KILLED, "CLD_KILLED", "Child was killed"
- }
- ,
-#endif
-#if defined (SIGCLD) && defined (CLD_DUMPED)
- {
- SIGCLD, CLD_DUMPED, "CLD_DUMPED", "Child has terminated abnormally"
- }
- ,
-#endif
-#if defined (SIGCLD) && defined (CLD_TRAPPED)
- {
- SIGCLD, CLD_TRAPPED, "CLD_TRAPPED", "Traced child has trapped"
- }
- ,
-#endif
-#if defined (SIGCLD) && defined (CLD_STOPPED)
- {
- SIGCLD, CLD_STOPPED, "CLD_STOPPED", "Child has stopped"
- }
- ,
-#endif
-#if defined (SIGCLD) && defined (CLD_CONTINUED)
- {
- SIGCLD, CLD_CONTINUED, "CLD_CONTINUED", "Stopped child had continued"
- }
- ,
-#endif
-#if defined (SIGPOLL) && defined (POLL_IN)
- {
- SIGPOLL, POLL_IN, "POLL_IN", "Input input available"
- }
- ,
-#endif
-#if defined (SIGPOLL) && defined (POLL_OUT)
- {
- SIGPOLL, POLL_OUT, "POLL_OUT", "Output buffers available"
- }
- ,
-#endif
-#if defined (SIGPOLL) && defined (POLL_MSG)
- {
- SIGPOLL, POLL_MSG, "POLL_MSG", "Input message available"
- }
- ,
-#endif
-#if defined (SIGPOLL) && defined (POLL_ERR)
- {
- SIGPOLL, POLL_ERR, "POLL_ERR", "I/O error"
- }
- ,
-#endif
-#if defined (SIGPOLL) && defined (POLL_PRI)
- {
- SIGPOLL, POLL_PRI, "POLL_PRI", "High priority input available"
- }
- ,
-#endif
-#if defined (SIGPOLL) && defined (POLL_HUP)
- {
- SIGPOLL, POLL_HUP, "POLL_HUP", "Device disconnected"
- }
- ,
-#endif
- {
- 0, 0, NULL, NULL
- }
-};
-
-static char *syscall_table[MAX_SYSCALLS];
-
-/* Prototypes for local functions */
-
-static void procfs_stop PARAMS ((void));
-
-static int procfs_thread_alive PARAMS ((int));
-
-static int procfs_can_run PARAMS ((void));
-
-static void procfs_mourn_inferior PARAMS ((void));
-
-static void procfs_fetch_registers PARAMS ((int));
-
-static int procfs_wait PARAMS ((int, struct target_waitstatus *));
-
-static void procfs_open PARAMS ((char *, int));
-
-static void procfs_files_info PARAMS ((struct target_ops *));
-
-static void procfs_prepare_to_store PARAMS ((void));
-static void procfs_detach PARAMS ((char *, int));
+typedef struct procinfo {
+ struct procinfo *next;
+ int pid; /* Process ID */
+ int tid; /* Thread/LWP id */
-static void procfs_attach PARAMS ((char *, int));
+ /* process state */
+ int was_stopped;
+ int ignore_next_sigstop;
-static void proc_set_exec_trap PARAMS ((void));
+ /* The following four fd fields may be identical, or may contain
+ several different fd's, depending on the version of /proc
+ (old ioctl or new read/write). */
-static void procfs_init_inferior PARAMS ((int));
+ int ctl_fd; /* File descriptor for /proc control file */
+ /*
+ * The next three file descriptors are actually only needed in the
+ * read/write, multiple-file-descriptor implemenation (NEW_PROC_API).
+ * However, to avoid a bunch of #ifdefs in the code, we will use
+ * them uniformly by (in the case of the ioctl single-file-descriptor
+ * implementation) filling them with copies of the control fd.
+ */
+ int status_fd; /* File descriptor for /proc status file */
+ int as_fd; /* File descriptor for /proc as file */
-static struct procinfo *create_procinfo PARAMS ((int));
+ char pathname[MAX_PROC_NAME_SIZE]; /* Pathname to /proc entry */
-static void procfs_store_registers PARAMS ((int));
+ fltset_t saved_fltset; /* Saved traced hardware fault set */
+ sigset_t saved_sigset; /* Saved traced signal set */
+ sigset_t saved_sighold; /* Saved held signal set */
+ sysset_t saved_exitset; /* Saved traced system call exit set */
+ sysset_t saved_entryset; /* Saved traced system call entry set */
-static int procfs_xfer_memory PARAMS ((CORE_ADDR, char *, int, int, struct target_ops *));
+ gdb_prstatus_t prstatus; /* Current process status info */
-static void procfs_kill_inferior PARAMS ((void));
-
-static char *sigcodedesc PARAMS ((siginfo_t *));
-
-static char *sigcodename PARAMS ((siginfo_t *));
-
-static struct procinfo *wait_fd PARAMS ((void));
-
-static void remove_fd PARAMS ((struct procinfo *));
-
-static void add_fd PARAMS ((struct procinfo *));
-
-static void set_proc_siginfo PARAMS ((struct procinfo *, int));
-
-static void init_syscall_table PARAMS ((void));
-
-static char *syscallname PARAMS ((int));
-
-static char *signalname PARAMS ((int));
-
-static char *errnoname PARAMS ((int));
-
-static int proc_address_to_fd PARAMS ((struct procinfo *, CORE_ADDR, int));
-
-static int open_proc_file PARAMS ((int, struct procinfo *, int, int));
-
-static void close_proc_file PARAMS ((struct procinfo *));
-
-static void close_proc_file_cleanup PARAMS ((void *));
-
-static struct cleanup *make_cleanup_close_proc_file PARAMS ((struct procinfo *));
-
-static void unconditionally_kill_inferior PARAMS ((struct procinfo *));
-
-static NORETURN void proc_init_failed
-PARAMS ((struct procinfo *, char *, int)) ATTR_NORETURN;
-
- static void info_proc PARAMS ((char *, int));
-
- static void info_proc_flags PARAMS ((struct procinfo *, int));
-
- static void info_proc_stop PARAMS ((struct procinfo *, int));
-
- static void info_proc_siginfo PARAMS ((struct procinfo *, int));
-
- static void info_proc_syscalls PARAMS ((struct procinfo *, int));
-
- static void info_proc_mappings PARAMS ((struct procinfo *, int));
-
- static void info_proc_signals PARAMS ((struct procinfo *, int));
-
- static void info_proc_faults PARAMS ((struct procinfo *, int));
-
- static char *mappingflags PARAMS ((long));
-
- static char *lookupname PARAMS ((struct trans *, unsigned int, char *));
-
- static char *lookupdesc PARAMS ((struct trans *, unsigned int));
-
- static int do_attach PARAMS ((int pid));
-
- static void do_detach PARAMS ((int siggnal));
-
- static void procfs_create_inferior PARAMS ((char *, char *, char **));
-
- static void procfs_notice_signals PARAMS ((int pid));
-
- static void notice_signals PARAMS ((struct procinfo *, struct sig_ctl *));
-
- static struct procinfo *find_procinfo PARAMS ((pid_t pid, int okfail));
-
- static int procfs_write_pcwstop PARAMS ((struct procinfo *));
- static int procfs_read_status PARAMS ((struct procinfo *));
- static void procfs_write_pckill PARAMS ((struct procinfo *));
-
- typedef int syscall_func_t PARAMS ((struct procinfo * pi, int syscall_num,
- int why, int *rtnval, int *statval));
-
- static void procfs_set_syscall_trap PARAMS ((struct procinfo * pi,
- int syscall_num, int flags,
- syscall_func_t * func));
-
- static void procfs_clear_syscall_trap PARAMS ((struct procinfo * pi,
- int syscall_num, int errok));
-
-#define PROCFS_SYSCALL_ENTRY 0x1 /* Trap on entry to sys call */
-#define PROCFS_SYSCALL_EXIT 0x2 /* Trap on exit from sys call */
-
- static syscall_func_t procfs_exit_handler;
-
- static syscall_func_t procfs_exec_handler;
-
-#ifdef SYS_sproc
- static syscall_func_t procfs_sproc_handler;
- static syscall_func_t procfs_fork_handler;
-#endif
-
-#ifdef SYS_lwp_create
- static syscall_func_t procfs_lwp_creation_handler;
+#ifndef NEW_PROC_API
+ gdb_fpregset_t fpregset; /* Current floating point registers */
#endif
+
+ struct procinfo *thread_list;
- static void modify_inherit_on_fork_flag PARAMS ((int fd, int flag));
- static void modify_run_on_last_close_flag PARAMS ((int fd, int flag));
-
-/* */
+ int status_valid : 1;
+ int gregs_valid : 1;
+ int fpregs_valid : 1;
+ int threads_valid: 1;
+} procinfo;
- struct procfs_syscall_handler
- {
- int syscall_num; /* The number of the system call being handled */
- /* The function to be called */
- syscall_func_t *func;
- };
+static char errmsg[128]; /* shared error msg buffer */
- static void procfs_resume PARAMS ((int pid, int step,
- enum target_signal signo));
+/* Function prototypes for procinfo module: */
- static void init_procfs_ops PARAMS ((void));
+static procinfo *find_procinfo_or_die PARAMS ((int pid, int tid));
+static procinfo *find_procinfo PARAMS ((int pid, int tid));
+static procinfo *create_procinfo PARAMS ((int pid, int tid));
+static void destroy_procinfo PARAMS ((procinfo *p));
+static void dead_procinfo PARAMS ((procinfo *p,
+ char *msg, int killp));
+static int open_procinfo_files PARAMS ((procinfo *p, int which));
+static void close_procinfo_files PARAMS ((procinfo *p));
-/* External function prototypes that can't be easily included in any
- header file because the args are typedefs in system include files. */
-
- extern void supply_gregset PARAMS ((gdb_gregset_t *));
-
- extern void fill_gregset PARAMS ((gdb_gregset_t *, int));
-
-#ifdef FP0_REGNUM
- extern void supply_fpregset PARAMS ((gdb_fpregset_t *));
-
- extern void fill_fpregset PARAMS ((gdb_fpregset_t *, int));
-#endif
+/* The head of the procinfo list: */
+static procinfo * procinfo_list;
/*
-
- LOCAL FUNCTION
-
- find_procinfo -- convert a process id to a struct procinfo
-
- SYNOPSIS
-
- static struct procinfo * find_procinfo (pid_t pid, int okfail);
-
- DESCRIPTION
-
- Given a process id, look it up in the procinfo chain. Returns
- a struct procinfo *. If can't find pid, then call error(),
- unless okfail is set, in which case, return NULL;
+ * Function: find_procinfo
+ *
+ * Search the procinfo list.
+ *
+ * Returns: pointer to procinfo, or NULL if not found.
*/
- static struct procinfo *
- find_procinfo (pid, okfail)
- pid_t pid;
- int okfail;
+static procinfo *
+find_procinfo (pid, tid)
+ int pid;
+ int tid;
{
- struct procinfo *procinfo;
+ procinfo *pi;
- for (procinfo = procinfo_list; procinfo; procinfo = procinfo->next)
- if (procinfo->pid == pid)
- return procinfo;
+ for (pi = procinfo_list; pi; pi = pi->next)
+ if (pi->pid == pid)
+ break;
- if (okfail)
- return NULL;
+ if (pi)
+ if (tid)
+ {
+ /* Don't check threads_valid. If we're updating the
+ thread_list, we want to find whatever threads are already
+ here. This means that in general it is the caller's
+ responsibility to check threads_valid and update before
+ calling find_procinfo, if the caller wants to find a new
+ thread. */
+
+ for (pi = pi->thread_list; pi; pi = pi->next)
+ if (pi->tid == tid)
+ break;
+ }
- error ("procfs (find_procinfo): Couldn't locate pid %d", pid);
+ return pi;
}
/*
-
- LOCAL MACRO
-
- current_procinfo -- convert inferior_pid to a struct procinfo
-
- SYNOPSIS
-
- static struct procinfo * current_procinfo;
-
- DESCRIPTION
-
- Looks up inferior_pid in the procinfo chain. Always returns a
- struct procinfo *. If process can't be found, we error() out.
- */
-
-#define current_procinfo find_procinfo (inferior_pid, 0)
-
-/*
-
- LOCAL FUNCTION
-
- add_fd -- Add the fd to the poll/select list
-
- SYNOPSIS
-
- static void add_fd (struct procinfo *);
-
- DESCRIPTION
-
- Add the fd of the supplied procinfo to the list of fds used for
- poll/select operations.
+ * Function: find_procinfo_or_die
+ *
+ * Calls find_procinfo, but errors on failure.
*/
-static void
-add_fd (pi)
- struct procinfo *pi;
+static procinfo *
+find_procinfo_or_die (pid, tid)
+ int pid;
+ int tid;
{
- if (num_poll_list <= 0)
- poll_list = (struct pollfd *) xmalloc (sizeof (struct pollfd));
- else
- poll_list = (struct pollfd *) xrealloc (poll_list,
- (num_poll_list + 1)
- * sizeof (struct pollfd));
- poll_list[num_poll_list].fd = pi->ctl_fd;
-#ifdef UNIXWARE
- poll_list[num_poll_list].events = POLLWRNORM;
-#else
- poll_list[num_poll_list].events = POLLPRI;
-#endif
+ procinfo *pi = find_procinfo (pid, tid);
- num_poll_list++;
+ if (pi == NULL)
+ if (tid)
+ error ("procfs: couldn't find pid %d (kernel thread %d) in procinfo list.",
+ pid, tid);
+ else
+ error ("procfs: couldn't find pid %d in procinfo list.", pid);
+ return pi;
}
/*
-
- LOCAL FUNCTION
-
- remove_fd -- Remove the fd from the poll/select list
-
- SYNOPSIS
-
- static void remove_fd (struct procinfo *);
-
- DESCRIPTION
-
- Remove the fd of the supplied procinfo from the list of fds used
- for poll/select operations.
+ * Function: open_procinfo_files
+ *
+ * Open the file descriptor for the process or LWP.
+ * ifdef NEW_PROC_API, we only open the control file descriptor;
+ * the others are opened lazily as needed.
+ * else (if not NEW_PROC_API), there is only one real
+ * file descriptor, but we keep multiple copies of it so that
+ * the code that uses them does not have to be #ifdef'd.
+ *
+ * Return: file descriptor, or zero for failure.
*/
-static void
-remove_fd (pi)
- struct procinfo *pi;
-{
- int i;
+enum { FD_CTL, FD_STATUS, FD_AS };
- for (i = 0; i < num_poll_list; i++)
+static int
+open_procinfo_files (pi, which)
+ procinfo *pi;
+ int which;
+{
+ char tmp[MAX_PROC_NAME_SIZE];
+ int fd;
+
+ /*
+ * This function is getting ALMOST long enough to break up into several.
+ * Here is some rationale:
+ *
+ * NEW_PROC_API (Solaris 2.6, Solaris 2.7, Unixware):
+ * There are several file descriptors that may need to be open
+ * for any given process or LWP. The ones we're intereted in are:
+ * - control (ctl) write-only change the state
+ * - status (status) read-only query the state
+ * - address space (as) read/write access memory
+ * - map (map) read-only virtual addr map
+ * Most of these are opened lazily as they are needed.
+ * The pathnames for the 'files' for an LWP look slightly
+ * different from those of a first-class process:
+ * Pathnames for a process (<proc-id>):
+ * /proc/<proc-id>/ctl
+ * /proc/<proc-id>/status
+ * /proc/<proc-id>/as
+ * /proc/<proc-id>/map
+ * Pathnames for an LWP (lwp-id):
+ * /proc/<proc-id>/lwp/<lwp-id>/lwpctl
+ * /proc/<proc-id>/lwp/<lwp-id>/lwpstatus
+ * An LWP has no map or address space file descriptor, since
+ * the memory map and address space are shared by all LWPs.
+ *
+ * Everyone else (Solaris 2.5, Irix, OSF)
+ * There is only one file descriptor for each process or LWP.
+ * For convenience, we copy the same file descriptor into all
+ * three fields of the procinfo struct (ctl_fd, status_fd, and
+ * as_fd, see NEW_PROC_API above) so that code that uses them
+ * doesn't need any #ifdef's.
+ * Pathname for all:
+ * /proc/<proc-id>
+ *
+ * Solaris 2.5 LWP's:
+ * Each LWP has an independent file descriptor, but these
+ * are not obtained via the 'open' system call like the rest:
+ * instead, they're obtained thru an ioctl call (PIOCOPENLWP)
+ * to the file descriptor of the parent process.
+ *
+ * OSF threads:
+ * These do not even have their own independent file descriptor.
+ * All operations are carried out on the file descriptor of the
+ * parent process. Therefore we just call open again for each
+ * thread, getting a new handle for the same 'file'.
+ */
+
+#ifdef NEW_PROC_API
+ /*
+ * In this case, there are several different file descriptors that
+ * we might be asked to open. The control file descriptor will be
+ * opened early, but the others will be opened lazily as they are
+ * needed.
+ */
+
+ strcpy (tmp, pi->pathname);
+ switch (which) { /* which file descriptor to open? */
+ case FD_CTL:
+ if (pi->tid)
+ strcat (tmp, "/lwpctl");
+ else
+ strcat (tmp, "/ctl");
+ fd = open (tmp, O_WRONLY);
+ if (fd <= 0)
+ return 0; /* fail */
+ pi->ctl_fd = fd;
+ break;
+ case FD_AS:
+ if (pi->tid)
+ return 0; /* there is no 'as' file descriptor for an lwp */
+ strcat (tmp, "/as");
+ fd = open (tmp, O_RDWR);
+ if (fd <= 0)
+ return 0; /* fail */
+ pi->as_fd = fd;
+ break;
+ case FD_STATUS:
+ if (pi->tid)
+ strcat (tmp, "/lwpstatus");
+ else
+ strcat (tmp, "/status");
+ fd = open (tmp, O_RDONLY);
+ if (fd <= 0)
+ return 0; /* fail */
+ pi->status_fd = fd;
+ break;
+ default:
+ return 0; /* unknown file descriptor */
+ }
+#else /* not NEW_PROC_API */
+ /*
+ * In this case, there is only one file descriptor for each procinfo
+ * (ie. each process or LWP). In fact, only the file descriptor for
+ * the process can actually be opened by an 'open' system call.
+ * The ones for the LWPs have to be obtained thru an IOCTL call
+ * on the process's file descriptor.
+ *
+ * For convenience, we copy each procinfo's single file descriptor
+ * into all of the fields occupied by the several file descriptors
+ * of the NEW_PROC_API implementation. That way, the code that uses
+ * them can be written without ifdefs.
+ */
+
+
+#ifdef PIOCTSTATUS /* OSF */
+ if ((fd = open (pi->pathname, O_RDWR)) == 0) /* Only one FD; just open it. */
+ return 0;
+#else /* Sol 2.5, Irix, other? */
+ if (pi->tid == 0) /* Master procinfo for the process */
{
- if (poll_list[i].fd == pi->ctl_fd)
- {
- if (i != num_poll_list - 1)
- memcpy (poll_list + i, poll_list + i + 1,
- (num_poll_list - i - 1) * sizeof (struct pollfd));
-
- num_poll_list--;
-
- if (num_poll_list == 0)
- free (poll_list);
- else
- poll_list = (struct pollfd *) xrealloc (poll_list,
- num_poll_list
- * sizeof (struct pollfd));
- return;
- }
+ fd = open (pi->pathname, O_RDWR);
+ if (fd <= 0)
+ return 0; /* fail */
+ }
+ else /* LWP thread procinfo */
+ {
+#ifdef PIOCOPENLWP /* Sol 2.5, thread/LWP */
+ procinfo *process;
+ int lwpid = pi->tid;
+
+ /* Find the procinfo for the entire process. */
+ if ((process = find_procinfo (pi->pid, 0)) == NULL)
+ return 0; /* fail */
+
+ /* Now obtain the file descriptor for the LWP. */
+ if ((fd = ioctl (process->ctl_fd, PIOCOPENLWP, &lwpid)) <= 0)
+ return 0; /* fail */
+#else /* Irix, other? */
+ return 0; /* Don't know how to open threads */
+#endif /* Sol 2.5 PIOCOPENLWP */
}
+#endif /* OSF PIOCTSTATUS */
+ pi->ctl_fd = pi->as_fd = pi->status_fd = fd;
+#endif /* NEW_PROC_API */
+
+ return 1; /* success */
}
/*
+ * Function: create_procinfo
+ *
+ * Allocate a data structure and link it into the procinfo list.
+ * (First tries to find a pre-existing one (FIXME: why???)
+ *
+ * Return: pointer to new procinfo struct.
+ */
- LOCAL FUNCTION
-
- procfs_read_status - get procfs fd status
-
- SYNOPSIS
+static procinfo *
+create_procinfo (pid, tid)
+ int pid;
+ int tid;
+{
+ procinfo *pi, *parent;
- static int procfs_read_status (pi) struct procinfo *pi;
+ if (pi = find_procinfo (pid, tid))
+ return pi; /* Already exists, nothing to do. */
- DESCRIPTION
+ /* find parent before doing malloc, to save having to cleanup */
+ if (tid != 0)
+ parent = find_procinfo_or_die (pid, 0); /* FIXME: should I
+ create it if it
+ doesn't exist yet? */
- Given a pointer to a procinfo struct, get the status of
- the status_fd in the appropriate way. Returns 0 on failure,
- 1 on success.
- */
+ pi = (procinfo *) xmalloc (sizeof (procinfo));
+ memset (pi, 0, sizeof (procinfo));
+ pi->pid = pid;
+ pi->tid = tid;
-static int
-procfs_read_status (pi)
- struct procinfo *pi;
-{
-#ifdef PROCFS_USE_READ_WRITE
- if ((lseek (pi->status_fd, 0, SEEK_SET) < 0) ||
- (read (pi->status_fd, (char *) &pi->prstatus,
- sizeof (gdb_prstatus_t)) != sizeof (gdb_prstatus_t)))
+ /* Chain into list. */
+ if (tid == 0)
+ {
+ sprintf (pi->pathname, MAIN_PROC_NAME_FMT, pid);
+ pi->next = procinfo_list;
+ procinfo_list = pi;
+ }
+ else
+ {
+#ifdef NEW_PROC_API
+ sprintf (pi->pathname, "/proc/%05d/lwp/%d", pid, tid);
#else
- if (ioctl (pi->status_fd, PIOCSTATUS, &pi->prstatus) < 0)
+ sprintf (pi->pathname, MAIN_PROC_NAME_FMT, pid);
#endif
- return 0;
- else
- return 1;
+ pi->next = parent->thread_list;
+ parent->thread_list = pi;
+ }
+ return pi;
}
/*
-
- LOCAL FUNCTION
-
- procfs_write_pcwstop - send a PCWSTOP to procfs fd
-
- SYNOPSIS
-
- static int procfs_write_pcwstop (pi) struct procinfo *pi;
-
- DESCRIPTION
-
- Given a pointer to a procinfo struct, send a PCWSTOP to
- the ctl_fd in the appropriate way. Returns 0 on failure,
- 1 on success.
+ * Function: close_procinfo_files
+ *
+ * Close all file descriptors associated with the procinfo
*/
-static int
-procfs_write_pcwstop (pi)
- struct procinfo *pi;
+static void
+close_procinfo_files (pi)
+ procinfo *pi;
{
-#ifdef PROCFS_USE_READ_WRITE
- long cmd = PCWSTOP;
- if (write (pi->ctl_fd, (char *) &cmd, sizeof (long)) < 0)
-#else
- if (ioctl (pi->ctl_fd, PIOCWSTOP, &pi->prstatus) < 0)
-#endif
- return 0;
- else
- return 1;
+ if (pi->ctl_fd > 0)
+ close (pi->ctl_fd);
+#ifdef NEW_PROC_API
+ if (pi->as_fd > 0)
+ close (pi->as_fd);
+ if (pi->status_fd > 0)
+ close (pi->status_fd);
+#endif
+ pi->ctl_fd = pi->as_fd = pi->status_fd = 0;
}
/*
-
- LOCAL FUNCTION
-
- procfs_write_pckill - send a kill to procfs fd
-
- SYNOPSIS
-
- static void procfs_write_pckill (pi) struct procinfo *pi;
-
- DESCRIPTION
-
- Given a pointer to a procinfo struct, send a kill to
- the ctl_fd in the appropriate way. Returns 0 on failure,
- 1 on success.
+ * Function: destroy_procinfo
+ *
+ * Destructor function. Close, unlink and deallocate the object.
*/
static void
-procfs_write_pckill (pi)
- struct procinfo *pi;
+destroy_one_procinfo (list, pi)
+ procinfo **list;
+ procinfo *pi;
{
-#ifdef PROCFS_USE_READ_WRITE
- struct proc_ctl pctl;
- pctl.cmd = PCKILL;
- pctl.data = SIGKILL;
- write (pi->ctl_fd, &pctl, sizeof (struct proc_ctl));
-#else
- int signo = SIGKILL;
- ioctl (pi->ctl_fd, PIOCKILL, &signo);
-#endif
-}
-
-static struct procinfo *
-wait_fd ()
-{
- struct procinfo *pi, *next_pi;
-#ifndef LOSING_POLL
- int num_fds;
- int i;
-#endif
-
- set_sigint_trap (); /* Causes SIGINT to be passed on to the
- attached process. */
- set_sigio_trap ();
-
-wait_again:
-#ifndef LOSING_POLL
- while (1)
- {
- num_fds = poll (poll_list, num_poll_list, -1);
- if (num_fds > 0)
- break;
- if (num_fds < 0 && errno == EINTR)
- continue;
- print_sys_errmsg ("poll failed", errno);
- error ("Poll failed, returned %d", num_fds);
- }
-#else /* LOSING_POLL */
- pi = current_procinfo;
-
- while (!procfs_write_pcwstop (pi))
- {
- if (errno == ENOENT)
+ procinfo *ptr;
+
+ /* Step one: unlink the procinfo from its list */
+ if (pi == *list)
+ *list = pi->next;
+ else
+ for (ptr = *list; ptr; ptr = ptr->next)
+ if (ptr->next == pi)
{
- /* Process exited. */
- pi->prstatus.pr_flags = 0;
+ ptr->next = pi->next;
break;
}
- else if (errno != EINTR)
- {
- print_sys_errmsg (pi->pathname, errno);
- error ("procfs_write_pcwstop failed");
- }
- }
- pi->had_event = 1;
-#endif /* LOSING_POLL */
- clear_sigint_trap ();
- clear_sigio_trap ();
+ /* Step two: close any open file descriptors */
+ close_procinfo_files (pi);
+
+ /* Step three: free the memory. */
+ free (pi);
+}
-#ifndef LOSING_POLL
+static void
+destroy_procinfo (pi)
+ procinfo *pi;
+{
+ procinfo *tmp;
- for (i = 0; i < num_poll_list && num_fds > 0; i++)
+ if (pi->tid != 0) /* destroy a thread procinfo */
{
- if (0 == (poll_list[i].revents &
- (POLLWRNORM | POLLPRI | POLLERR | POLLHUP | POLLNVAL)))
- continue;
- for (pi = procinfo_list; pi; pi = next_pi)
- {
- next_pi = pi->next;
- if (poll_list[i].fd == pi->ctl_fd)
- {
- num_fds--;
- if ((poll_list[i].revents & POLLHUP) != 0 ||
- !procfs_read_status (pi))
- { /* The LWP has apparently terminated. */
- if (num_poll_list <= 1)
- {
- pi->prstatus.pr_flags = 0;
- pi->had_event = 1;
- break;
- }
- if (info_verbose)
- printf_filtered ("LWP %d exited.\n",
- (pi->pid >> 16) & 0xffff);
- close_proc_file (pi);
- i--; /* don't skip deleted entry */
- if (num_fds != 0)
- break; /* already another event to process */
- else
- goto wait_again; /* wait for another event */
- }
- pi->had_event = 1;
- break;
- }
- }
- if (!pi)
- error ("wait_fd: Couldn't find procinfo for fd %d\n",
- poll_list[i].fd);
+ tmp = find_procinfo (pi->pid, 0); /* find the parent process */
+ destroy_one_procinfo (&tmp->thread_list, pi);
+ }
+ else /* destroy a process procinfo and all its threads */
+ {
+ /* First destroy the children, if any; */
+ while (pi->thread_list != NULL)
+ destroy_one_procinfo (&pi->thread_list, pi->thread_list);
+ /* Then destroy the parent. Genocide!!! */
+ destroy_one_procinfo (&procinfo_list, pi);
}
-#endif /* LOSING_POLL */
-
- return pi;
}
-/*
-
- LOCAL FUNCTION
-
- lookupdesc -- translate a value to a summary desc string
-
- SYNOPSIS
+enum { NOKILL, KILL };
- static char *lookupdesc (struct trans *transp, unsigned int val);
-
- DESCRIPTION
-
- Given a pointer to a translation table and a value to be translated,
- lookup the desc string and return it.
+/*
+ * Function: dead_procinfo
+ *
+ * To be called on a non_recoverable error for a procinfo.
+ * Prints error messages, optionally sends a SIGKILL to the process,
+ * then destroys the data structure.
*/
-static char *
-lookupdesc (transp, val)
- struct trans *transp;
- unsigned int val;
+static void
+dead_procinfo (pi, msg, kill_p)
+ procinfo *pi;
+ char *msg;
+ int kill_p;
{
- char *desc;
+ char procfile[80];
- for (desc = NULL; transp->name != NULL; transp++)
+ if (pi->pathname)
{
- if (transp->value == val)
- {
- desc = transp->desc;
- break;
- }
+ print_sys_errmsg (pi->pathname, errno);
}
-
- /* Didn't find a translation for the specified value, set a default one. */
-
- if (desc == NULL)
+ else
{
- desc = "Unknown";
+ sprintf (procfile, "process %d", pi->pid);
+ print_sys_errmsg (procfile, errno);
}
- return (desc);
-}
+ if (kill_p == KILL)
+ kill (pi->pid, SIGKILL);
-/*
+ destroy_procinfo (pi);
+ error (msg);
+}
- LOCAL FUNCTION
+/* =================== END, STRUCT PROCINFO "MODULE" =================== */
- lookupname -- translate a value to symbolic name
+/* =================== /proc "MODULE" =================== */
- SYNOPSIS
+/*
+ * This "module" is the interface layer between the /proc system API
+ * and the gdb target vector functions. This layer consists of
+ * access functions that encapsulate each of the basic operations
+ * that we need to use from the /proc API.
+ *
+ * The main motivation for this layer is to hide the fact that
+ * there are two very different implementations of the /proc API.
+ * Rather than have a bunch of #ifdefs all thru the gdb target vector
+ * functions, we do our best to hide them all in here.
+ */
- static char *lookupname (struct trans *transp, unsigned int val,
- char *prefix);
+int proc_get_status PARAMS ((procinfo *pi));
+long proc_flags PARAMS ((procinfo *pi));
+int proc_why PARAMS ((procinfo *pi));
+int proc_what PARAMS ((procinfo *pi));
+int proc_set_run_on_last_close PARAMS ((procinfo *pi));
+int proc_unset_run_on_last_close PARAMS ((procinfo *pi));
+int proc_set_inherit_on_fork PARAMS ((procinfo *pi));
+int proc_unset_inherit_on_fork PARAMS ((procinfo *pi));
+int proc_set_async PARAMS ((procinfo *pi));
+int proc_unset_async PARAMS ((procinfo *pi));
+int proc_stop_process PARAMS ((procinfo *pi));
+int proc_trace_signal PARAMS ((procinfo *pi, int signo));
+int proc_ignore_signal PARAMS ((procinfo *pi, int signo));
+int proc_clear_current_fault PARAMS ((procinfo *pi));
+int proc_set_current_signal PARAMS ((procinfo *pi, int signo));
+int proc_clear_current_signal PARAMS ((procinfo *pi));
+int proc_set_gregs PARAMS ((procinfo *pi));
+int proc_set_fpregs PARAMS ((procinfo *pi));
+int proc_wait_for_stop PARAMS ((procinfo *pi));
+int proc_run_process PARAMS ((procinfo *pi, int step, int signo));
+int proc_kill PARAMS ((procinfo *pi, int signo));
+int proc_parent_pid PARAMS ((procinfo *pi));
+int proc_get_nthreads PARAMS ((procinfo *pi));
+int proc_get_current_thread PARAMS ((procinfo *pi));
+int proc_set_held_signals PARAMS ((procinfo *pi, sigset_t *sighold));
+int proc_set_traced_sysexit PARAMS ((procinfo *pi, sysset_t *sysset));
+int proc_set_traced_sysentry PARAMS ((procinfo *pi, sysset_t *sysset));
+int proc_set_traced_faults PARAMS ((procinfo *pi, fltset_t *fltset));
+int proc_set_traced_signals PARAMS ((procinfo *pi, sigset_t *sigset));
+
+int proc_update_threads PARAMS ((procinfo *pi));
+int proc_iterate_over_threads PARAMS ((procinfo *pi,
+ int (*func) PARAMS ((procinfo *,
+ procinfo *,
+ void *)),
+ void *ptr));
+
+gdb_gregset_t *proc_get_gregs PARAMS ((procinfo *pi));
+gdb_fpregset_t *proc_get_fpregs PARAMS ((procinfo *pi));
+sysset_t *proc_get_traced_sysexit PARAMS ((procinfo *pi, sysset_t *save));
+sysset_t *proc_get_traced_sysentry PARAMS ((procinfo *pi, sysset_t *save));
+fltset_t *proc_get_traced_faults PARAMS ((procinfo *pi, fltset_t *save));
+sigset_t *proc_get_traced_signals PARAMS ((procinfo *pi, sigset_t *save));
+sigset_t *proc_get_held_signals PARAMS ((procinfo *pi, sigset_t *save));
+sigset_t *proc_get_pending_signals PARAMS ((procinfo *pi, sigset_t *save));
+struct sigaction *proc_get_signal_actions PARAMS ((procinfo *pi,
+ struct sigaction *save));
+
+void proc_warn PARAMS ((procinfo *pi, char *func, int line));
+void proc_error PARAMS ((procinfo *pi, char *func, int line));
- DESCRIPTION
+void
+proc_warn (pi, func, line)
+ procinfo *pi;
+ char *func;
+ int line;
+{
+ sprintf (errmsg, "procfs: %s line %d, %s", func, line, pi->pathname);
+ print_sys_errmsg (errmsg, errno);
+}
- Given a pointer to a translation table, a value to be translated,
- and a default prefix to return if the value can't be translated,
- match the value with one of the translation table entries and
- return a pointer to the symbolic name.
+void
+proc_error (pi, func, line)
+ procinfo *pi;
+ char *func;
+ int line;
+{
+ sprintf (errmsg, "procfs: %s line %d, %s", func, line, pi->pathname);
+ perror_with_name (errmsg);
+}
- If no match is found it just returns the value as a printable string,
- with the given prefix. The previous such value, if any, is freed
- at this time.
+/*
+ * Function: proc_get_status
+ *
+ * Updates the status struct in the procinfo.
+ * There is a 'valid' flag, to let other functions know when
+ * this function needs to be called (so the status is only
+ * read when it is needed). The status file descriptor is
+ * also only opened when it is needed.
+ *
+ * Return: non-zero for success, zero for failure.
*/
-static char *
-lookupname (transp, val, prefix)
- struct trans *transp;
- unsigned int val;
- char *prefix;
+int
+proc_get_status (pi)
+ procinfo *pi;
{
- static char *locbuf;
- char *name;
-
- for (name = NULL; transp->name != NULL; transp++)
+ /* Status file descriptor is opened "lazily" */
+ if (pi->status_fd == 0 &&
+ open_procinfo_files (pi, FD_STATUS) == 0)
{
- if (transp->value == val)
- {
- name = transp->name;
- break;
- }
+ pi->status_valid = 0;
+ return 0;
}
- /* Didn't find a translation for the specified value, build a default
- one using the specified prefix and return it. The lifetime of
- the value is only until the next one is needed. */
-
- if (name == NULL)
- {
- if (locbuf != NULL)
- {
- free (locbuf);
- }
- locbuf = xmalloc (strlen (prefix) + 16);
- sprintf (locbuf, "%s %u", prefix, val);
- name = locbuf;
- }
- return (name);
-}
-
-static char *
-sigcodename (sip)
- siginfo_t *sip;
-{
- struct sigcode *scp;
- char *name = NULL;
- static char locbuf[32];
-
- for (scp = siginfo_table; scp->codename != NULL; scp++)
+#ifdef NEW_PROC_API
+ if (lseek (pi->status_fd, 0, SEEK_SET) < 0)
+ pi->status_valid = 0; /* fail */
+ else
{
- if ((scp->signo == sip->si_signo) &&
- (scp->code == sip->si_code))
+ /* Sigh... I have to read a different data structure,
+ depending on whether this is a main process or an LWP. */
+ if (pi->tid)
+ pi->status_valid = (read (pi->status_fd,
+ (char *) &pi->prstatus.pr_lwp,
+ sizeof (lwpstatus_t))
+ == sizeof (lwpstatus_t));
+ else
{
- name = scp->codename;
- break;
+ pi->status_valid = (read (pi->status_fd,
+ (char *) &pi->prstatus,
+ sizeof (gdb_prstatus_t))
+ == sizeof (gdb_prstatus_t));
+#if 0 /*def UNIXWARE*/
+ if (pi->status_valid &&
+ (pi->prstatus.pr_lwp.pr_flags & PR_ISTOP) &&
+ pi->prstatus.pr_lwp.pr_why == PR_REQUESTED)
+ /* Unixware peculiarity -- read the damn thing again! */
+ pi->status_valid = (read (pi->status_fd,
+ (char *) &pi->prstatus,
+ sizeof (gdb_prstatus_t))
+ == sizeof (gdb_prstatus_t));
+#endif /* UNIXWARE */
}
}
- if (name == NULL)
+#else /* ioctl method */
+#ifdef PIOCTSTATUS /* osf */
+ if (pi->tid == 0) /* main process */
{
- sprintf (locbuf, "sigcode %u", sip->si_signo);
- name = locbuf;
+ /* Just read the danged status. Now isn't that simple? */
+ pi->status_valid =
+ (ioctl (pi->status_fd, PIOCSTATUS, &pi->prstatus) >= 0);
}
- return (name);
-}
-
-static char *
-sigcodedesc (sip)
- siginfo_t *sip;
-{
- struct sigcode *scp;
- char *desc = NULL;
-
- for (scp = siginfo_table; scp->codename != NULL; scp++)
+ else
{
- if ((scp->signo == sip->si_signo) &&
- (scp->code == sip->si_code))
+ int win;
+ struct {
+ long pr_count;
+ tid_t pr_error_thread;
+ struct prstatus status;
+ } thread_status;
+
+ thread_status.pr_count = 1;
+ thread_status.status.pr_tid = pi->tid;
+ win = (ioctl (pi->status_fd, PIOCTSTATUS, &thread_status) >= 0);
+ if (win)
{
- desc = scp->desc;
- break;
+ memcpy (&pi->prstatus, &thread_status.status,
+ sizeof (pi->prstatus));
+ pi->status_valid = 1;
}
}
- if (desc == NULL)
+#else
+ /* Just read the danged status. Now isn't that simple? */
+ pi->status_valid = (ioctl (pi->status_fd, PIOCSTATUS, &pi->prstatus) >= 0);
+#endif
+#endif
+
+ if (pi->status_valid)
{
- desc = "Unrecognized signal or trap use";
+ PROC_PRETTYFPRINT_STATUS (proc_flags (pi),
+ proc_why (pi),
+ proc_what (pi),
+ proc_get_current_thread (pi));
}
- return (desc);
+
+ /* The status struct includes general regs, so mark them valid too */
+ pi->gregs_valid = pi->status_valid;
+#ifdef NEW_PROC_API
+ /* In the read/write multiple-fd model,
+ the status struct includes the fp regs too, so mark them valid too */
+ pi->fpregs_valid = pi->status_valid;
+#endif
+ return pi->status_valid; /* True if success, false if failure. */
}
/*
+ * Function: proc_flags
+ *
+ * returns the process flags (pr_flags field).
+ */
+
+long
+proc_flags (pi)
+ procinfo *pi;
+{
+ if (!pi->status_valid)
+ if (!proc_get_status (pi))
+ return 0; /* FIXME: not a good failure value (but what is?) */
- LOCAL FUNCTION
-
- syscallname - translate a system call number into a system call name
-
- SYNOPSIS
-
- char *syscallname (int syscallnum)
-
- DESCRIPTION
+#ifdef NEW_PROC_API
+ return pi->prstatus.pr_lwp.pr_flags;
+#else
+ return pi->prstatus.pr_flags;
+#endif
+}
- Given a system call number, translate it into the printable name
- of a system call, or into "syscall <num>" if it is an unknown
- number.
+/*
+ * Function: proc_why
+ *
+ * returns the pr_why field (why the process stopped).
*/
-static char *
-syscallname (syscallnum)
- int syscallnum;
+int
+proc_why (pi)
+ procinfo *pi;
{
- static char locbuf[32];
+ if (!pi->status_valid)
+ if (!proc_get_status (pi))
+ return 0; /* FIXME: not a good failure value (but what is?) */
- if (syscallnum >= 0 && syscallnum < MAX_SYSCALLS
- && syscall_table[syscallnum] != NULL)
- return syscall_table[syscallnum];
- else
- {
- sprintf (locbuf, "syscall %u", syscallnum);
- return locbuf;
- }
+#ifdef NEW_PROC_API
+ return pi->prstatus.pr_lwp.pr_why;
+#else
+ return pi->prstatus.pr_why;
+#endif
}
/*
+ * Function: proc_what
+ *
+ * returns the pr_what field (details of why the process stopped).
+ */
- LOCAL FUNCTION
-
- init_syscall_table - initialize syscall translation table
-
- SYNOPSIS
-
- void init_syscall_table (void)
-
- DESCRIPTION
-
- Dynamically initialize the translation table to convert system
- call numbers into printable system call names. Done once per
- gdb run, on initialization.
+int
+proc_what (pi)
+ procinfo *pi;
+{
+ if (!pi->status_valid)
+ if (!proc_get_status (pi))
+ return 0; /* FIXME: not a good failure value (but what is?) */
- NOTES
+#ifdef NEW_PROC_API
+ return pi->prstatus.pr_lwp.pr_what;
+#else
+ return pi->prstatus.pr_what;
+#endif
+}
- This is awfully ugly, but preprocessor tricks to make it prettier
- tend to be nonportable.
+#ifndef PIOCSSPCACT /* The following is not supported on OSF. */
+/*
+ * Function: proc_nsysarg
+ *
+ * returns the pr_nsysarg field (number of args to the current syscall).
*/
-static void
-init_syscall_table ()
+int
+proc_nsysarg (pi)
+ procinfo *pi;
{
-#if defined (SYS_exit)
- syscall_table[SYS_exit] = "exit";
-#endif
-#if defined (SYS_fork)
- syscall_table[SYS_fork] = "fork";
-#endif
-#if defined (SYS_read)
- syscall_table[SYS_read] = "read";
-#endif
-#if defined (SYS_write)
- syscall_table[SYS_write] = "write";
-#endif
-#if defined (SYS_open)
- syscall_table[SYS_open] = "open";
-#endif
-#if defined (SYS_close)
- syscall_table[SYS_close] = "close";
-#endif
-#if defined (SYS_wait)
- syscall_table[SYS_wait] = "wait";
-#endif
-#if defined (SYS_creat)
- syscall_table[SYS_creat] = "creat";
-#endif
-#if defined (SYS_link)
- syscall_table[SYS_link] = "link";
-#endif
-#if defined (SYS_unlink)
- syscall_table[SYS_unlink] = "unlink";
-#endif
-#if defined (SYS_exec)
- syscall_table[SYS_exec] = "exec";
-#endif
-#if defined (SYS_execv)
- syscall_table[SYS_execv] = "execv";
-#endif
-#if defined (SYS_execve)
- syscall_table[SYS_execve] = "execve";
-#endif
-#if defined (SYS_chdir)
- syscall_table[SYS_chdir] = "chdir";
-#endif
-#if defined (SYS_time)
- syscall_table[SYS_time] = "time";
-#endif
-#if defined (SYS_mknod)
- syscall_table[SYS_mknod] = "mknod";
-#endif
-#if defined (SYS_chmod)
- syscall_table[SYS_chmod] = "chmod";
-#endif
-#if defined (SYS_chown)
- syscall_table[SYS_chown] = "chown";
-#endif
-#if defined (SYS_brk)
- syscall_table[SYS_brk] = "brk";
-#endif
-#if defined (SYS_stat)
- syscall_table[SYS_stat] = "stat";
-#endif
-#if defined (SYS_lseek)
- syscall_table[SYS_lseek] = "lseek";
-#endif
-#if defined (SYS_getpid)
- syscall_table[SYS_getpid] = "getpid";
-#endif
-#if defined (SYS_mount)
- syscall_table[SYS_mount] = "mount";
-#endif
-#if defined (SYS_umount)
- syscall_table[SYS_umount] = "umount";
-#endif
-#if defined (SYS_setuid)
- syscall_table[SYS_setuid] = "setuid";
-#endif
-#if defined (SYS_getuid)
- syscall_table[SYS_getuid] = "getuid";
-#endif
-#if defined (SYS_stime)
- syscall_table[SYS_stime] = "stime";
-#endif
-#if defined (SYS_ptrace)
- syscall_table[SYS_ptrace] = "ptrace";
-#endif
-#if defined (SYS_alarm)
- syscall_table[SYS_alarm] = "alarm";
-#endif
-#if defined (SYS_fstat)
- syscall_table[SYS_fstat] = "fstat";
-#endif
-#if defined (SYS_pause)
- syscall_table[SYS_pause] = "pause";
-#endif
-#if defined (SYS_utime)
- syscall_table[SYS_utime] = "utime";
-#endif
-#if defined (SYS_stty)
- syscall_table[SYS_stty] = "stty";
-#endif
-#if defined (SYS_gtty)
- syscall_table[SYS_gtty] = "gtty";
-#endif
-#if defined (SYS_access)
- syscall_table[SYS_access] = "access";
-#endif
-#if defined (SYS_nice)
- syscall_table[SYS_nice] = "nice";
-#endif
-#if defined (SYS_statfs)
- syscall_table[SYS_statfs] = "statfs";
-#endif
-#if defined (SYS_sync)
- syscall_table[SYS_sync] = "sync";
-#endif
-#if defined (SYS_kill)
- syscall_table[SYS_kill] = "kill";
-#endif
-#if defined (SYS_fstatfs)
- syscall_table[SYS_fstatfs] = "fstatfs";
-#endif
-#if defined (SYS_pgrpsys)
- syscall_table[SYS_pgrpsys] = "pgrpsys";
-#endif
-#if defined (SYS_xenix)
- syscall_table[SYS_xenix] = "xenix";
-#endif
-#if defined (SYS_dup)
- syscall_table[SYS_dup] = "dup";
-#endif
-#if defined (SYS_pipe)
- syscall_table[SYS_pipe] = "pipe";
-#endif
-#if defined (SYS_times)
- syscall_table[SYS_times] = "times";
-#endif
-#if defined (SYS_profil)
- syscall_table[SYS_profil] = "profil";
-#endif
-#if defined (SYS_plock)
- syscall_table[SYS_plock] = "plock";
-#endif
-#if defined (SYS_setgid)
- syscall_table[SYS_setgid] = "setgid";
-#endif
-#if defined (SYS_getgid)
- syscall_table[SYS_getgid] = "getgid";
-#endif
-#if defined (SYS_signal)
- syscall_table[SYS_signal] = "signal";
-#endif
-#if defined (SYS_msgsys)
- syscall_table[SYS_msgsys] = "msgsys";
-#endif
-#if defined (SYS_sys3b)
- syscall_table[SYS_sys3b] = "sys3b";
-#endif
-#if defined (SYS_sysi86)
- syscall_table[SYS_sysi86] = "sysi86";
-#endif
-#if defined (SYS_acct)
- syscall_table[SYS_acct] = "acct";
-#endif
-#if defined (SYS_shmsys)
- syscall_table[SYS_shmsys] = "shmsys";
-#endif
-#if defined (SYS_semsys)
- syscall_table[SYS_semsys] = "semsys";
-#endif
-#if defined (SYS_ioctl)
- syscall_table[SYS_ioctl] = "ioctl";
-#endif
-#if defined (SYS_uadmin)
- syscall_table[SYS_uadmin] = "uadmin";
-#endif
-#if defined (SYS_utssys)
- syscall_table[SYS_utssys] = "utssys";
-#endif
-#if defined (SYS_fsync)
- syscall_table[SYS_fsync] = "fsync";
-#endif
-#if defined (SYS_umask)
- syscall_table[SYS_umask] = "umask";
-#endif
-#if defined (SYS_chroot)
- syscall_table[SYS_chroot] = "chroot";
-#endif
-#if defined (SYS_fcntl)
- syscall_table[SYS_fcntl] = "fcntl";
-#endif
-#if defined (SYS_ulimit)
- syscall_table[SYS_ulimit] = "ulimit";
-#endif
-#if defined (SYS_rfsys)
- syscall_table[SYS_rfsys] = "rfsys";
-#endif
-#if defined (SYS_rmdir)
- syscall_table[SYS_rmdir] = "rmdir";
-#endif
-#if defined (SYS_mkdir)
- syscall_table[SYS_mkdir] = "mkdir";
-#endif
-#if defined (SYS_getdents)
- syscall_table[SYS_getdents] = "getdents";
-#endif
-#if defined (SYS_sysfs)
- syscall_table[SYS_sysfs] = "sysfs";
-#endif
-#if defined (SYS_getmsg)
- syscall_table[SYS_getmsg] = "getmsg";
-#endif
-#if defined (SYS_putmsg)
- syscall_table[SYS_putmsg] = "putmsg";
-#endif
-#if defined (SYS_poll)
- syscall_table[SYS_poll] = "poll";
-#endif
-#if defined (SYS_lstat)
- syscall_table[SYS_lstat] = "lstat";
-#endif
-#if defined (SYS_symlink)
- syscall_table[SYS_symlink] = "symlink";
-#endif
-#if defined (SYS_readlink)
- syscall_table[SYS_readlink] = "readlink";
-#endif
-#if defined (SYS_setgroups)
- syscall_table[SYS_setgroups] = "setgroups";
-#endif
-#if defined (SYS_getgroups)
- syscall_table[SYS_getgroups] = "getgroups";
-#endif
-#if defined (SYS_fchmod)
- syscall_table[SYS_fchmod] = "fchmod";
-#endif
-#if defined (SYS_fchown)
- syscall_table[SYS_fchown] = "fchown";
-#endif
-#if defined (SYS_sigprocmask)
- syscall_table[SYS_sigprocmask] = "sigprocmask";
-#endif
-#if defined (SYS_sigsuspend)
- syscall_table[SYS_sigsuspend] = "sigsuspend";
-#endif
-#if defined (SYS_sigaltstack)
- syscall_table[SYS_sigaltstack] = "sigaltstack";
-#endif
-#if defined (SYS_sigaction)
- syscall_table[SYS_sigaction] = "sigaction";
-#endif
-#if defined (SYS_sigpending)
- syscall_table[SYS_sigpending] = "sigpending";
-#endif
-#if defined (SYS_context)
- syscall_table[SYS_context] = "context";
-#endif
-#if defined (SYS_evsys)
- syscall_table[SYS_evsys] = "evsys";
-#endif
-#if defined (SYS_evtrapret)
- syscall_table[SYS_evtrapret] = "evtrapret";
-#endif
-#if defined (SYS_statvfs)
- syscall_table[SYS_statvfs] = "statvfs";
-#endif
-#if defined (SYS_fstatvfs)
- syscall_table[SYS_fstatvfs] = "fstatvfs";
-#endif
-#if defined (SYS_nfssys)
- syscall_table[SYS_nfssys] = "nfssys";
-#endif
-#if defined (SYS_waitsys)
- syscall_table[SYS_waitsys] = "waitsys";
-#endif
-#if defined (SYS_sigsendsys)
- syscall_table[SYS_sigsendsys] = "sigsendsys";
-#endif
-#if defined (SYS_hrtsys)
- syscall_table[SYS_hrtsys] = "hrtsys";
-#endif
-#if defined (SYS_acancel)
- syscall_table[SYS_acancel] = "acancel";
-#endif
-#if defined (SYS_async)
- syscall_table[SYS_async] = "async";
-#endif
-#if defined (SYS_priocntlsys)
- syscall_table[SYS_priocntlsys] = "priocntlsys";
-#endif
-#if defined (SYS_pathconf)
- syscall_table[SYS_pathconf] = "pathconf";
-#endif
-#if defined (SYS_mincore)
- syscall_table[SYS_mincore] = "mincore";
-#endif
-#if defined (SYS_mmap)
- syscall_table[SYS_mmap] = "mmap";
-#endif
-#if defined (SYS_mprotect)
- syscall_table[SYS_mprotect] = "mprotect";
-#endif
-#if defined (SYS_munmap)
- syscall_table[SYS_munmap] = "munmap";
-#endif
-#if defined (SYS_fpathconf)
- syscall_table[SYS_fpathconf] = "fpathconf";
-#endif
-#if defined (SYS_vfork)
- syscall_table[SYS_vfork] = "vfork";
-#endif
-#if defined (SYS_fchdir)
- syscall_table[SYS_fchdir] = "fchdir";
-#endif
-#if defined (SYS_readv)
- syscall_table[SYS_readv] = "readv";
-#endif
-#if defined (SYS_writev)
- syscall_table[SYS_writev] = "writev";
-#endif
-#if defined (SYS_xstat)
- syscall_table[SYS_xstat] = "xstat";
-#endif
-#if defined (SYS_lxstat)
- syscall_table[SYS_lxstat] = "lxstat";
-#endif
-#if defined (SYS_fxstat)
- syscall_table[SYS_fxstat] = "fxstat";
-#endif
-#if defined (SYS_xmknod)
- syscall_table[SYS_xmknod] = "xmknod";
-#endif
-#if defined (SYS_clocal)
- syscall_table[SYS_clocal] = "clocal";
-#endif
-#if defined (SYS_setrlimit)
- syscall_table[SYS_setrlimit] = "setrlimit";
-#endif
-#if defined (SYS_getrlimit)
- syscall_table[SYS_getrlimit] = "getrlimit";
-#endif
-#if defined (SYS_lchown)
- syscall_table[SYS_lchown] = "lchown";
-#endif
-#if defined (SYS_memcntl)
- syscall_table[SYS_memcntl] = "memcntl";
-#endif
-#if defined (SYS_getpmsg)
- syscall_table[SYS_getpmsg] = "getpmsg";
-#endif
-#if defined (SYS_putpmsg)
- syscall_table[SYS_putpmsg] = "putpmsg";
-#endif
-#if defined (SYS_rename)
- syscall_table[SYS_rename] = "rename";
-#endif
-#if defined (SYS_uname)
- syscall_table[SYS_uname] = "uname";
-#endif
-#if defined (SYS_setegid)
- syscall_table[SYS_setegid] = "setegid";
-#endif
-#if defined (SYS_sysconfig)
- syscall_table[SYS_sysconfig] = "sysconfig";
-#endif
-#if defined (SYS_adjtime)
- syscall_table[SYS_adjtime] = "adjtime";
-#endif
-#if defined (SYS_systeminfo)
- syscall_table[SYS_systeminfo] = "systeminfo";
-#endif
-#if defined (SYS_seteuid)
- syscall_table[SYS_seteuid] = "seteuid";
-#endif
-#if defined (SYS_sproc)
- syscall_table[SYS_sproc] = "sproc";
-#endif
-#if defined (SYS_keyctl)
- syscall_table[SYS_keyctl] = "keyctl";
-#endif
-#if defined (SYS_secsys)
- syscall_table[SYS_secsys] = "secsys";
-#endif
-#if defined (SYS_filepriv)
- syscall_table[SYS_filepriv] = "filepriv";
-#endif
-#if defined (SYS_procpriv)
- syscall_table[SYS_procpriv] = "procpriv";
-#endif
-#if defined (SYS_devstat)
- syscall_table[SYS_devstat] = "devstat";
-#endif
-#if defined (SYS_aclipc)
- syscall_table[SYS_aclipc] = "aclipc";
-#endif
-#if defined (SYS_fdevstat)
- syscall_table[SYS_fdevstat] = "fdevstat";
-#endif
-#if defined (SYS_flvlfile)
- syscall_table[SYS_flvlfile] = "flvlfile";
-#endif
-#if defined (SYS_lvlfile)
- syscall_table[SYS_lvlfile] = "lvlfile";
-#endif
-#if defined (SYS_lvlequal)
- syscall_table[SYS_lvlequal] = "lvlequal";
-#endif
-#if defined (SYS_lvlproc)
- syscall_table[SYS_lvlproc] = "lvlproc";
-#endif
-#if defined (SYS_lvlipc)
- syscall_table[SYS_lvlipc] = "lvlipc";
-#endif
-#if defined (SYS_acl)
- syscall_table[SYS_acl] = "acl";
-#endif
-#if defined (SYS_auditevt)
- syscall_table[SYS_auditevt] = "auditevt";
-#endif
-#if defined (SYS_auditctl)
- syscall_table[SYS_auditctl] = "auditctl";
-#endif
-#if defined (SYS_auditdmp)
- syscall_table[SYS_auditdmp] = "auditdmp";
-#endif
-#if defined (SYS_auditlog)
- syscall_table[SYS_auditlog] = "auditlog";
-#endif
-#if defined (SYS_auditbuf)
- syscall_table[SYS_auditbuf] = "auditbuf";
-#endif
-#if defined (SYS_lvldom)
- syscall_table[SYS_lvldom] = "lvldom";
-#endif
-#if defined (SYS_lvlvfs)
- syscall_table[SYS_lvlvfs] = "lvlvfs";
-#endif
-#if defined (SYS_mkmld)
- syscall_table[SYS_mkmld] = "mkmld";
-#endif
-#if defined (SYS_mldmode)
- syscall_table[SYS_mldmode] = "mldmode";
-#endif
-#if defined (SYS_secadvise)
- syscall_table[SYS_secadvise] = "secadvise";
-#endif
-#if defined (SYS_online)
- syscall_table[SYS_online] = "online";
-#endif
-#if defined (SYS_setitimer)
- syscall_table[SYS_setitimer] = "setitimer";
-#endif
-#if defined (SYS_getitimer)
- syscall_table[SYS_getitimer] = "getitimer";
-#endif
-#if defined (SYS_gettimeofday)
- syscall_table[SYS_gettimeofday] = "gettimeofday";
-#endif
-#if defined (SYS_settimeofday)
- syscall_table[SYS_settimeofday] = "settimeofday";
-#endif
-#if defined (SYS_lwp_create)
- syscall_table[SYS_lwp_create] = "_lwp_create";
-#endif
-#if defined (SYS_lwp_exit)
- syscall_table[SYS_lwp_exit] = "_lwp_exit";
-#endif
-#if defined (SYS_lwp_wait)
- syscall_table[SYS_lwp_wait] = "_lwp_wait";
-#endif
-#if defined (SYS_lwp_self)
- syscall_table[SYS_lwp_self] = "_lwp_self";
-#endif
-#if defined (SYS_lwp_info)
- syscall_table[SYS_lwp_info] = "_lwp_info";
-#endif
-#if defined (SYS_lwp_private)
- syscall_table[SYS_lwp_private] = "_lwp_private";
-#endif
-#if defined (SYS_processor_bind)
- syscall_table[SYS_processor_bind] = "processor_bind";
-#endif
-#if defined (SYS_processor_exbind)
- syscall_table[SYS_processor_exbind] = "processor_exbind";
-#endif
-#if defined (SYS_prepblock)
- syscall_table[SYS_prepblock] = "prepblock";
-#endif
-#if defined (SYS_block)
- syscall_table[SYS_block] = "block";
-#endif
-#if defined (SYS_rdblock)
- syscall_table[SYS_rdblock] = "rdblock";
-#endif
-#if defined (SYS_unblock)
- syscall_table[SYS_unblock] = "unblock";
-#endif
-#if defined (SYS_cancelblock)
- syscall_table[SYS_cancelblock] = "cancelblock";
-#endif
-#if defined (SYS_pread)
- syscall_table[SYS_pread] = "pread";
-#endif
-#if defined (SYS_pwrite)
- syscall_table[SYS_pwrite] = "pwrite";
-#endif
-#if defined (SYS_truncate)
- syscall_table[SYS_truncate] = "truncate";
-#endif
-#if defined (SYS_ftruncate)
- syscall_table[SYS_ftruncate] = "ftruncate";
-#endif
-#if defined (SYS_lwp_kill)
- syscall_table[SYS_lwp_kill] = "_lwp_kill";
-#endif
-#if defined (SYS_sigwait)
- syscall_table[SYS_sigwait] = "sigwait";
-#endif
-#if defined (SYS_fork1)
- syscall_table[SYS_fork1] = "fork1";
-#endif
-#if defined (SYS_forkall)
- syscall_table[SYS_forkall] = "forkall";
-#endif
-#if defined (SYS_modload)
- syscall_table[SYS_modload] = "modload";
-#endif
-#if defined (SYS_moduload)
- syscall_table[SYS_moduload] = "moduload";
-#endif
-#if defined (SYS_modpath)
- syscall_table[SYS_modpath] = "modpath";
-#endif
-#if defined (SYS_modstat)
- syscall_table[SYS_modstat] = "modstat";
-#endif
-#if defined (SYS_modadm)
- syscall_table[SYS_modadm] = "modadm";
-#endif
-#if defined (SYS_getksym)
- syscall_table[SYS_getksym] = "getksym";
-#endif
-#if defined (SYS_lwp_suspend)
- syscall_table[SYS_lwp_suspend] = "_lwp_suspend";
-#endif
-#if defined (SYS_lwp_continue)
- syscall_table[SYS_lwp_continue] = "_lwp_continue";
-#endif
-#if defined (SYS_priocntllst)
- syscall_table[SYS_priocntllst] = "priocntllst";
-#endif
-#if defined (SYS_sleep)
- syscall_table[SYS_sleep] = "sleep";
-#endif
-#if defined (SYS_lwp_sema_wait)
- syscall_table[SYS_lwp_sema_wait] = "_lwp_sema_wait";
-#endif
-#if defined (SYS_lwp_sema_post)
- syscall_table[SYS_lwp_sema_post] = "_lwp_sema_post";
-#endif
-#if defined (SYS_lwp_sema_trywait)
- syscall_table[SYS_lwp_sema_trywait] = "lwp_sema_trywait";
-#endif
-#if defined(SYS_fstatvfs64)
- syscall_table[SYS_fstatvfs64] = "fstatvfs64";
-#endif
-#if defined(SYS_statvfs64)
- syscall_table[SYS_statvfs64] = "statvfs64";
-#endif
-#if defined(SYS_ftruncate64)
- syscall_table[SYS_ftruncate64] = "ftruncate64";
-#endif
-#if defined(SYS_truncate64)
- syscall_table[SYS_truncate64] = "truncate64";
-#endif
-#if defined(SYS_getrlimit64)
- syscall_table[SYS_getrlimit64] = "getrlimit64";
-#endif
-#if defined(SYS_setrlimit64)
- syscall_table[SYS_setrlimit64] = "setrlimit64";
-#endif
-#if defined(SYS_lseek64)
- syscall_table[SYS_lseek64] = "lseek64";
-#endif
-#if defined(SYS_mmap64)
- syscall_table[SYS_mmap64] = "mmap64";
-#endif
-#if defined(SYS_pread64)
- syscall_table[SYS_pread64] = "pread64";
-#endif
-#if defined(SYS_creat64)
- syscall_table[SYS_creat64] = "creat64";
-#endif
-#if defined(SYS_dshmsys)
- syscall_table[SYS_dshmsys] = "dshmsys";
-#endif
-#if defined(SYS_invlpg)
- syscall_table[SYS_invlpg] = "invlpg";
-#endif
-#if defined(SYS_cg_ids)
- syscall_table[SYS_cg_ids] = "cg_ids";
-#endif
-#if defined(SYS_cg_processors)
- syscall_table[SYS_cg_processors] = "cg_processors";
-#endif
-#if defined(SYS_cg_info)
- syscall_table[SYS_cg_info] = "cg_info";
-#endif
-#if defined(SYS_cg_bind)
- syscall_table[SYS_cg_bind] = "cg_bind";
-#endif
-#if defined(SYS_cg_current)
- syscall_table[SYS_cg_current] = "cg_current";
-#endif
-#if defined(SYS_cg_memloc)
- syscall_table[SYS_cg_memloc] = "cg_memloc";
+ if (!pi->status_valid)
+ if (!proc_get_status (pi))
+ return 0;
+
+#ifdef NEW_PROC_API
+ return pi->prstatus.pr_lwp.pr_nsysarg;
+#else
+ return pi->prstatus.pr_nsysarg;
#endif
}
/*
-
- LOCAL FUNCTION
-
- procfs_kill_inferior - kill any current inferior
-
- SYNOPSIS
-
- void procfs_kill_inferior (void)
-
- DESCRIPTION
-
- Kill any current inferior.
-
- NOTES
-
- Kills even attached inferiors. Presumably the user has already
- been prompted that the inferior is an attached one rather than
- one started by gdb. (FIXME?)
-
+ * Function: proc_sysargs
+ *
+ * returns the pr_sysarg field (pointer to the arguments of current syscall).
*/
-static void
-procfs_kill_inferior ()
+long *
+proc_sysargs (pi)
+ procinfo *pi;
{
- target_mourn_inferior ();
+ if (!pi->status_valid)
+ if (!proc_get_status (pi))
+ return NULL;
+
+#ifdef NEW_PROC_API
+ return (long *) &pi->prstatus.pr_lwp.pr_sysarg;
+#else
+ return (long *) &pi->prstatus.pr_sysarg;
+#endif
}
/*
-
- LOCAL FUNCTION
-
- unconditionally_kill_inferior - terminate the inferior
-
- SYNOPSIS
-
- static void unconditionally_kill_inferior (struct procinfo *)
-
- DESCRIPTION
-
- Kill the specified inferior.
-
- NOTE
-
- A possibly useful enhancement would be to first try sending
- the inferior a terminate signal, politely asking it to commit
- suicide, before we murder it (we could call that
- politely_kill_inferior()).
-
+ * Function: proc_syscall
+ *
+ * returns the pr_syscall field (id of current syscall if we are in one).
*/
-static void
-unconditionally_kill_inferior (pi)
- struct procinfo *pi;
+int
+proc_syscall (pi)
+ procinfo *pi;
{
- int ppid;
-
- ppid = pi->prstatus.pr_ppid;
-
-#ifdef PROCFS_NEED_CLEAR_CURSIG_FOR_KILL
- /* Alpha OSF/1-3.x procfs needs a clear of the current signal
- before the PIOCKILL, otherwise it might generate a corrupted core
- file for the inferior. */
- ioctl (pi->ctl_fd, PIOCSSIG, NULL);
+ if (!pi->status_valid)
+ if (!proc_get_status (pi))
+ return 0;
+
+#ifdef NEW_PROC_API
+ return pi->prstatus.pr_lwp.pr_syscall;
+#else
+ return pi->prstatus.pr_syscall;
#endif
-#ifdef PROCFS_NEED_PIOCSSIG_FOR_KILL
- /* Alpha OSF/1-2.x procfs needs a PIOCSSIG call with a SIGKILL signal
- to kill the inferior, otherwise it might remain stopped with a
- pending SIGKILL.
- We do not check the result of the PIOCSSIG, the inferior might have
- died already. */
- {
- struct siginfo newsiginfo;
-
- memset ((char *) &newsiginfo, 0, sizeof (newsiginfo));
- newsiginfo.si_signo = SIGKILL;
- newsiginfo.si_code = 0;
- newsiginfo.si_errno = 0;
- newsiginfo.si_pid = getpid ();
- newsiginfo.si_uid = getuid ();
- ioctl (pi->ctl_fd, PIOCSSIG, &newsiginfo);
- }
-#else /* PROCFS_NEED_PIOCSSIG_FOR_KILL */
- procfs_write_pckill (pi);
-#endif /* PROCFS_NEED_PIOCSSIG_FOR_KILL */
-
- close_proc_file (pi);
-
-/* Only wait() for our direct children. Our grandchildren zombies are killed
- by the death of their parents. */
-
- if (ppid == getpid ())
- wait ((int *) 0);
}
+#endif /* PIOCSSPCACT */
/*
-
- LOCAL FUNCTION
-
- procfs_xfer_memory -- copy data to or from inferior memory space
-
- SYNOPSIS
-
- int procfs_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len,
- int dowrite, struct target_ops target)
-
- DESCRIPTION
-
- Copy LEN bytes to/from inferior's memory starting at MEMADDR
- from/to debugger memory starting at MYADDR. Copy from inferior
- if DOWRITE is zero or to inferior if DOWRITE is nonzero.
-
- Returns the length copied, which is either the LEN argument or
- zero. This xfer function does not do partial moves, since procfs_ops
- doesn't allow memory operations to cross below us in the target stack
- anyway.
-
- NOTES
-
- The /proc interface makes this an almost trivial task.
+ * Function: proc_cursig:
+ *
+ * returns the pr_cursig field (current signal).
*/
-static int
-procfs_xfer_memory (memaddr, myaddr, len, dowrite, target)
- CORE_ADDR memaddr;
- char *myaddr;
- int len;
- int dowrite;
- struct target_ops *target; /* ignored */
+long
+proc_cursig (struct procinfo *pi)
{
- int nbytes = 0;
- struct procinfo *pi;
-
- pi = current_procinfo;
+ if (!pi->status_valid)
+ if (!proc_get_status (pi))
+ return 0; /* FIXME: not a good failure value (but what is?) */
- if (lseek (pi->as_fd, (off_t) memaddr, SEEK_SET) == (off_t) memaddr)
- {
- if (dowrite)
- {
- nbytes = write (pi->as_fd, myaddr, len);
- }
- else
- {
- nbytes = read (pi->as_fd, myaddr, len);
- }
- if (nbytes < 0)
- {
- nbytes = 0;
- }
- }
- return (nbytes);
+#ifdef NEW_PROC_API
+ return pi->prstatus.pr_lwp.pr_cursig;
+#else
+ return pi->prstatus.pr_cursig;
+#endif
}
/*
-
- LOCAL FUNCTION
-
- procfs_store_registers -- copy register values back to inferior
-
- SYNOPSIS
-
- void procfs_store_registers (int regno)
-
- DESCRIPTION
-
- Store our current register values back into the inferior. If
- REGNO is -1 then store all the register, otherwise store just
- the value specified by REGNO.
-
- NOTES
-
- If we are storing only a single register, we first have to get all
- the current values from the process, overwrite the desired register
- in the gregset with the one we want from gdb's registers, and then
- send the whole set back to the process. For writing all the
- registers, all we have to do is generate the gregset and send it to
- the process.
-
- Also note that the process has to be stopped on an event of interest
- for this to work, which basically means that it has to have been
- run under the control of one of the other /proc ioctl calls and not
- ptrace. Since we don't use ptrace anyway, we don't worry about this
- fine point, but it is worth noting for future reference.
-
- Gdb is confused about what this function is supposed to return.
- Some versions return a value, others return nothing. Some are
- declared to return a value and actually return nothing. Gdb ignores
- anything returned. (FIXME)
-
+ * Function: proc_modify_flags
+ *
+ * === I appologize for the messiness of this function.
+ * === This is an area where the different versions of
+ * === /proc are more inconsistent than usual. MVS
+ *
+ * Set or reset any of the following process flags:
+ * PR_FORK -- forked child will inherit trace flags
+ * PR_RLC -- traced process runs when last /proc file closed.
+ * PR_ASYNC -- LWP's get to run/stop independently.
+ *
+ * There are three methods for doing this function:
+ * 1) Newest: read/write [PCSET/PCRESET/PCUNSET]
+ * [Sol6, Sol7, UW]
+ * 2) Middle: PIOCSET/PIOCRESET
+ * [Irix, Sol5]
+ * 3) Oldest: PIOCSFORK/PIOCRFORK/PIOCSRLC/PIOCRRLC
+ * [OSF, Sol5]
+ *
+ * Note: Irix does not define PR_ASYNC.
+ * Note: OSF is the only one that can ONLY use the oldest method.
+ *
+ * Arguments:
+ * pi -- the procinfo
+ * flag -- one of PR_FORK, PR_RLC, or PR_ASYNC
+ * mode -- 1 for set, 0 for reset.
+ *
+ * Returns non-zero for success, zero for failure.
*/
-static void
-procfs_store_registers (regno)
- int regno;
+enum { FLAG_RESET, FLAG_SET };
+
+static int
+proc_modify_flag (pi, flag, mode)
+ procinfo *pi;
+ long flag;
+ long mode;
{
- struct procinfo *pi;
-#ifdef PROCFS_USE_READ_WRITE
- struct greg_ctl greg;
- struct fpreg_ctl fpreg;
+ long win = 0; /* default to fail */
+
+ /*
+ * These operations affect the process as a whole, and applying
+ * them to an individual LWP has the same meaning as applying them
+ * to the main process. Therefore, if we're ever called with a
+ * pointer to an LWP's procinfo, let's substitute the process's
+ * procinfo and avoid opening the LWP's file descriptor
+ * unnecessarily.
+ */
+
+ if (pi->pid != 0)
+ pi = find_procinfo_or_die (pi->pid, 0);
+
+#ifdef NEW_PROC_API /* Newest method: UnixWare and newer Solarii */
+ /* First normalize the PCUNSET/PCRESET command opcode
+ (which for no obvious reason has a different definition
+ from one operating system to the next...) */
+#ifdef PCUNSET
+#define GDBRESET PCUNSET
+#endif
+#ifdef PCRESET
+#define GDBRESET PCRESET
#endif
+ {
+ long arg[2];
- pi = current_procinfo;
+ if (mode == FLAG_SET) /* Set the flag (RLC, FORK, or ASYNC) */
+ arg[0] = PCSET;
+ else /* Reset the flag */
+ arg[0] = GDBRESET;
-#ifdef PROCFS_USE_READ_WRITE
- if (regno != -1)
+ arg[1] = flag;
+ win = (write (pi->ctl_fd, (void *) &arg, sizeof (arg)) == sizeof (arg));
+ }
+#else
+#ifdef PIOCSET /* Irix/Sol5 method */
+ if (mode == FLAG_SET) /* Set the flag (hopefully RLC, FORK, or ASYNC) */
{
- procfs_read_status (pi);
- memcpy ((char *) &greg.gregset,
- (char *) &pi->prstatus.pr_lwp.pr_context.uc_mcontext.gregs,
- sizeof (gdb_gregset_t));
+ win = (ioctl (pi->ctl_fd, PIOCSET, &flag) >= 0);
}
- fill_gregset (&greg.gregset, regno);
- greg.cmd = PCSREG;
- write (pi->ctl_fd, &greg, sizeof (greg));
-#else /* PROCFS_USE_READ_WRITE */
- if (regno != -1)
+ else /* Reset the flag */
{
- ioctl (pi->ctl_fd, PIOCGREG, &pi->gregset.gregset);
+ win = (ioctl (pi->ctl_fd, PIOCRESET, &flag) >= 0);
}
- fill_gregset (&pi->gregset.gregset, regno);
- ioctl (pi->ctl_fd, PIOCSREG, &pi->gregset.gregset);
-#endif /* PROCFS_USE_READ_WRITE */
-
-#if defined (FP0_REGNUM)
-
- /* Now repeat everything using the floating point register set, if the
- target has floating point hardware. Since we ignore the returned value,
- we'll never know whether it worked or not anyway. */
-#ifdef PROCFS_USE_READ_WRITE
- if (regno != -1)
- {
- procfs_read_status (pi);
- memcpy ((char *) &fpreg.fpregset,
- (char *) &pi->prstatus.pr_lwp.pr_context.uc_mcontext.fpregs,
- sizeof (gdb_fpregset_t));
- }
- fill_fpregset (&fpreg.fpregset, regno);
- fpreg.cmd = PCSFPREG;
- write (pi->ctl_fd, &fpreg, sizeof (fpreg));
-#else /* PROCFS_USE_READ_WRITE */
- if (regno != -1)
- {
- ioctl (pi->ctl_fd, PIOCGFPREG, &pi->fpregset.fpregset);
- }
- fill_fpregset (&pi->fpregset.fpregset, regno);
- ioctl (pi->ctl_fd, PIOCSFPREG, &pi->fpregset.fpregset);
-#endif /* PROCFS_USE_READ_WRITE */
+#else
+#ifdef PIOCSRLC /* Oldest method: OSF */
+ switch (flag) {
+ case PR_RLC:
+ if (mode == FLAG_SET) /* Set run-on-last-close */
+ {
+ win = (ioctl (pi->ctl_fd, PIOCSRLC, NULL) >= 0);
+ }
+ else /* Clear run-on-last-close */
+ {
+ win = (ioctl (pi->ctl_fd, PIOCRRLC, NULL) >= 0);
+ }
+ break;
+ case PR_FORK:
+ if (mode == FLAG_SET) /* Set inherit-on-fork */
+ {
+ win = (ioctl (pi->ctl_fd, PIOCSFORK, NULL) >= 0);
+ }
+ else /* Clear inherit-on-fork */
+ {
+ win = (ioctl (pi->ctl_fd, PIOCRFORK, NULL) >= 0);
+ }
+ break;
+ default:
+ win = 0; /* fail -- unknown flag (can't do PR_ASYNC) */
+ break;
+ }
+#endif
+#endif
+#endif
+#undef GDBRESET
+ /* The above operation renders the procinfo's cached pstatus obsolete. */
+ pi->status_valid = 0;
-#endif /* FP0_REGNUM */
+ if (!win)
+ warning ("procfs: modify_flag failed to turn %s %s",
+ flag == PR_FORK ? "PR_FORK" :
+ flag == PR_RLC ? "PR_RLC" :
+#ifdef PR_ASYNC
+ flag == PR_ASYNC ? "PR_ASYNC" :
+#endif
+ "<unknown flag>",
+ mode == FLAG_RESET ? "off" : "on");
+ return win;
}
/*
-
- LOCAL FUNCTION
-
- init_procinfo - setup a procinfo struct and connect it to a process
-
- SYNOPSIS
-
- struct procinfo * init_procinfo (int pid)
-
- DESCRIPTION
-
- Allocate a procinfo structure, open the /proc file and then set up the
- set of signals and faults that are to be traced. Returns a pointer to
- the new procinfo structure.
-
- NOTES
-
- If proc_init_failed ever gets called, control returns to the command
- processing loop via the standard error handling code.
-
+ * Function: proc_set_run_on_last_close
+ *
+ * Set the run_on_last_close flag.
+ * Process with all threads will become runnable
+ * when debugger closes all /proc fds.
+ *
+ * Returns non-zero for success, zero for failure.
*/
-static struct procinfo *
-init_procinfo (pid, kill)
- int pid;
- int kill;
+int
+proc_set_run_on_last_close (pi)
+ procinfo *pi;
{
- struct procinfo *pi = (struct procinfo *)
- xmalloc (sizeof (struct procinfo));
-#ifdef UNIXWARE
- struct sig_ctl sctl;
-#endif /* UNIXWARE */
-
- memset ((char *) pi, 0, sizeof (*pi));
- if (!open_proc_file (pid, pi, O_RDWR, 1))
- proc_init_failed (pi, "can't open process file", kill);
-
- /* open_proc_file may modify pid. */
-
- pid = pi->pid;
-
- /* Add new process to process info list */
-
- pi->next = procinfo_list;
- procinfo_list = pi;
-
- add_fd (pi); /* Add to list for poll/select */
-
- /* Remember some things about the inferior that we will, or might, change
- so that we can restore them when we detach. */
-#ifdef UNIXWARE
- memcpy ((char *) &pi->saved_trace.sigset,
- (char *) &pi->prstatus.pr_sigtrace, sizeof (sigset_t));
- memcpy ((char *) &pi->saved_fltset.fltset,
- (char *) &pi->prstatus.pr_flttrace, sizeof (fltset_t));
- memcpy ((char *) &pi->saved_entryset.sysset,
- (char *) &pi->prstatus.pr_sysentry, sizeof (sysset_t));
- memcpy ((char *) &pi->saved_exitset.sysset,
- (char *) &pi->prstatus.pr_sysexit, sizeof (sysset_t));
-
- /* Set up trace and fault sets, as gdb expects them. */
-
- prfillset (&sctl.sigset);
- notice_signals (pi, &sctl);
-#else /* ! UNIXWARE */
- ioctl (pi->ctl_fd, PIOCGTRACE, &pi->saved_trace.sigset);
- ioctl (pi->ctl_fd, PIOCGHOLD, &pi->saved_sighold.sigset);
- ioctl (pi->ctl_fd, PIOCGFAULT, &pi->saved_fltset.fltset);
- ioctl (pi->ctl_fd, PIOCGENTRY, &pi->saved_entryset.sysset);
- ioctl (pi->ctl_fd, PIOCGEXIT, &pi->saved_exitset.sysset);
-
- /* Set up trace and fault sets, as gdb expects them. */
-
- memset ((char *) &pi->prrun, 0, sizeof (pi->prrun));
- prfillset (&pi->prrun.pr_trace);
- procfs_notice_signals (pid);
-#endif /* UNIXWARE */
-
- if (!procfs_read_status (pi))
- proc_init_failed (pi, "procfs_read_status failed", kill);
-
- return pi;
+ return proc_modify_flag (pi, PR_RLC, FLAG_SET);
}
/*
-
- LOCAL FUNCTION
-
- create_procinfo - initialize access to a /proc entry
-
- SYNOPSIS
-
- struct procinfo * create_procinfo (int pid)
-
- DESCRIPTION
-
- Allocate a procinfo structure, open the /proc file and then set up the
- set of signals and faults that are to be traced. Returns a pointer to
- the new procinfo structure.
-
- NOTES
-
- If proc_init_failed ever gets called, control returns to the command
- processing loop via the standard error handling code.
-
+ * Function: proc_unset_run_on_last_close
+ *
+ * Reset the run_on_last_close flag.
+ * Process will NOT become runnable
+ * when debugger closes its file handles.
+ *
+ * Returns non-zero for success, zero for failure.
*/
-static struct procinfo *
-create_procinfo (pid)
- int pid;
+int
+proc_unset_run_on_last_close (pi)
+ procinfo *pi;
{
- struct procinfo *pi;
-#ifdef PROCFS_USE_READ_WRITE
- struct flt_ctl fctl;
-#endif
-
- pi = find_procinfo (pid, 1);
- if (pi != NULL)
- return pi; /* All done! It already exists */
-
- pi = init_procinfo (pid, 1);
-
-#ifndef UNIXWARE
-/* A bug in Solaris (2.5 at least) causes PIOCWSTOP to hang on LWPs that are
- already stopped, even if they all have PR_ASYNC set. */
- if (!(pi->prstatus.pr_flags & PR_STOPPED))
-#endif
- if (!procfs_write_pcwstop (pi))
- proc_init_failed (pi, "procfs_write_pcwstop failed", 1);
-
-#ifdef PROCFS_USE_READ_WRITE
- fctl.cmd = PCSFAULT;
- prfillset (&fctl.fltset);
- prdelset (&fctl.fltset, FLTPAGE);
-
- if (write (pi->ctl_fd, (char *) &fctl, sizeof (struct flt_ctl)) < 0)
- proc_init_failed (pi, "PCSFAULT failed", 1);
-#else
- prfillset (&pi->prrun.pr_fault);
- prdelset (&pi->prrun.pr_fault, FLTPAGE);
-#ifdef PROCFS_DONT_TRACE_FAULTS
- premptyset (&pi->prrun.pr_fault);
-#endif
- if (ioctl (pi->ctl_fd, PIOCSFAULT, &pi->prrun.pr_fault) < 0)
- proc_init_failed (pi, "PIOCSFAULT failed", 1);
-#endif
-
- return pi;
+ return proc_modify_flag (pi, PR_RLC, FLAG_RESET);
}
/*
+ * Function: proc_set_inherit_on_fork
+ *
+ * Set inherit_on_fork flag.
+ * If the process forks a child while we are registered for events
+ * in the parent, then we will also recieve events from the child.
+ *
+ * Returns non-zero for success, zero for failure.
+ */
- LOCAL FUNCTION
+int
+proc_set_inherit_on_fork (pi)
+ procinfo *pi;
+{
+ return proc_modify_flag (pi, PR_FORK, FLAG_SET);
+}
- procfs_exit_handler - handle entry into the _exit syscall
+/*
+ * Function: proc_unset_inherit_on_fork
+ *
+ * Reset inherit_on_fork flag.
+ * If the process forks a child while we are registered for events
+ * in the parent, then we will NOT recieve events from the child.
+ *
+ * Returns non-zero for success, zero for failure.
+ */
- SYNOPSIS
+int
+proc_unset_inherit_on_fork (pi)
+ procinfo *pi;
+{
+ return proc_modify_flag (pi, PR_FORK, FLAG_RESET);
+}
- int procfs_exit_handler (pi, syscall_num, why, rtnvalp, statvalp)
+#ifdef PR_ASYNC
+/*
+ * Function: proc_set_async
+ *
+ * Set PR_ASYNC flag.
+ * If one LWP stops because of a debug event (signal etc.),
+ * the remaining LWPs will continue to run.
+ *
+ * Returns non-zero for success, zero for failure.
+ */
- DESCRIPTION
+int
+proc_set_async (pi)
+ procinfo *pi;
+{
+ return proc_modify_flag (pi, PR_ASYNC, FLAG_SET);
+}
- This routine is called when an inferior process enters the _exit()
- system call. It continues the process, and then collects the exit
- status and pid which are returned in *statvalp and *rtnvalp. After
- that it returns non-zero to indicate that procfs_wait should wake up.
+/*
+ * Function: proc_unset_async
+ *
+ * Reset PR_ASYNC flag.
+ * If one LWP stops because of a debug event (signal etc.),
+ * then all other LWPs will stop as well.
+ *
+ * Returns non-zero for success, zero for failure.
+ */
- NOTES
- There is probably a better way to do this.
+int
+proc_unset_async (pi)
+ procinfo *pi;
+{
+ return proc_modify_flag (pi, PR_ASYNC, FLAG_RESET);
+}
+#endif /* PR_ASYNC */
+/*
+ * Function: proc_stop_process
+ *
+ * Request the process/LWP to stop. Does not wait.
+ * Returns non-zero for success, zero for failure.
*/
-static int
-procfs_exit_handler (pi, syscall_num, why, rtnvalp, statvalp)
- struct procinfo *pi;
- int syscall_num;
- int why;
- int *rtnvalp;
- int *statvalp;
+int
+proc_stop_process (pi)
+ procinfo *pi;
{
- struct procinfo *temp_pi, *next_pi;
-#if defined (UNIXWARE) || defined (PROCFS_USE_READ_WRITE)
- struct proc_ctl pctl;
-#endif
+ int win;
-#ifdef UNIXWARE
- pctl.cmd = PCRUN;
- pctl.data = PRCFAULT;
-#else
- pi->prrun.pr_flags = PRCFAULT;
-#endif
+ /*
+ * We might conceivably apply this operation to an LWP, and
+ * the LWP's ctl file descriptor might not be open.
+ */
-#ifdef PROCFS_USE_READ_WRITE
- if (write (pi->ctl_fd, (char *) &pctl, sizeof (struct proc_ctl)) < 0)
-#else
- if (ioctl (pi->ctl_fd, PIOCRUN, &pi->prrun) != 0)
-#endif
- perror_with_name (pi->pathname);
-
- if (attach_flag)
- {
- /* Claim it exited (don't call wait). */
- if (info_verbose)
- printf_filtered ("(attached process has exited)\n");
- *statvalp = 0;
- *rtnvalp = inferior_pid;
- }
+ if (pi->ctl_fd == 0 &&
+ open_procinfo_files (pi, FD_CTL) == 0)
+ return 0;
else
{
- *rtnvalp = wait (statvalp);
- if (*rtnvalp >= 0)
- *rtnvalp = pi->pid;
+#ifdef NEW_PROC_API
+ int cmd = PCSTOP;
+ win = (write (pi->ctl_fd, (char *) &cmd, sizeof (cmd)) == sizeof (cmd));
+#else /* ioctl method */
+ win = (ioctl (pi->ctl_fd, PIOCSTOP, &pi->prstatus) >= 0);
+ /* Note: the call also reads the prstatus. */
+ if (win)
+ {
+ pi->status_valid = 1;
+ PROC_PRETTYFPRINT_STATUS (proc_flags (pi),
+ proc_why (pi),
+ proc_what (pi),
+ proc_get_current_thread (pi));
+ }
+#endif
}
- /* Close ALL open proc file handles,
- except the one that called SYS_exit. */
- for (temp_pi = procinfo_list; temp_pi; temp_pi = next_pi)
- {
- next_pi = temp_pi->next;
- if (temp_pi == pi)
- continue; /* Handled below */
- close_proc_file (temp_pi);
- }
- return 1;
+ return win;
}
/*
-
- LOCAL FUNCTION
-
- procfs_exec_handler - handle exit from the exec family of syscalls
-
- SYNOPSIS
-
- int procfs_exec_handler (pi, syscall_num, why, rtnvalp, statvalp)
-
- DESCRIPTION
-
- This routine is called when an inferior process is about to finish any
- of the exec() family of system calls. It pretends that we got a
- SIGTRAP (for compatibility with ptrace behavior), and returns non-zero
- to tell procfs_wait to wake up.
-
- NOTES
- This need for compatibility with ptrace is questionable. In the
- future, it shouldn't be necessary.
-
+ * Function: proc_wait_for_stop
+ *
+ * Wait for the process or LWP to stop (block until it does).
+ * Returns non-zero for success, zero for failure.
*/
-static int
-procfs_exec_handler (pi, syscall_num, why, rtnvalp, statvalp)
- struct procinfo *pi;
- int syscall_num;
- int why;
- int *rtnvalp;
- int *statvalp;
+int
+proc_wait_for_stop (pi)
+ procinfo *pi;
{
- *statvalp = (SIGTRAP << 8) | 0177;
+ int win;
+
+ /*
+ * We should never have to apply this operation to any procinfo
+ * except the one for the main process. If that ever changes
+ * for any reason, then take out the following clause and
+ * replace it with one that makes sure the ctl_fd is open.
+ */
+
+ if (pi->tid != 0)
+ pi = find_procinfo_or_die (pi->pid, 0);
+
+#ifdef NEW_PROC_API
+ {
+ int cmd = PCWSTOP;
+ win = (write (pi->ctl_fd, (char *) &cmd, sizeof (cmd)) == sizeof (cmd));
+ /* We been runnin' and we stopped -- need to update status. */
+ pi->status_valid = 0;
+ }
+#else /* ioctl method */
+ win = (ioctl (pi->ctl_fd, PIOCWSTOP, &pi->prstatus) >= 0);
+ /* Above call also refreshes the prstatus. */
+ if (win)
+ {
+ pi->status_valid = 1;
+ PROC_PRETTYFPRINT_STATUS (proc_flags (pi),
+ proc_why (pi),
+ proc_what (pi),
+ proc_get_current_thread (pi));
+ }
+#endif
- return 1;
+ return win;
}
-#if defined(SYS_sproc) && !defined(UNIXWARE)
-/* IRIX lwp creation system call */
-
/*
-
- LOCAL FUNCTION
-
- procfs_sproc_handler - handle exit from the sproc syscall
-
- SYNOPSIS
-
- int procfs_sproc_handler (pi, syscall_num, why, rtnvalp, statvalp)
-
- DESCRIPTION
-
- This routine is called when an inferior process is about to finish an
- sproc() system call. This is the system call that IRIX uses to create
- a lightweight process. When the target process gets this event, we can
- look at rval1 to find the new child processes ID, and create a new
- procinfo struct from that.
-
- After that, it pretends that we got a SIGTRAP, and returns non-zero
- to tell procfs_wait to wake up. Subsequently, wait_for_inferior gets
- woken up, sees the new process and continues it.
-
- NOTES
- We actually never see the child exiting from sproc because we will
- shortly stop the child with PIOCSTOP, which is then registered as the
- event of interest.
+ * Function: proc_run_process
+ *
+ * Make the process or LWP runnable.
+ * Options (not all are implemented):
+ * - single-step
+ * - clear current fault
+ * - clear current signal
+ * - abort the current system call
+ * - stop as soon as finished with system call
+ * - (ioctl): set traced signal set
+ * - (ioctl): set held signal set
+ * - (ioctl): set traced fault set
+ * - (ioctl): set start pc (vaddr)
+ * Always clear the current fault.
+ * Clear the current signal if 'signo' is zero.
+ *
+ * Arguments:
+ * pi the process or LWP to operate on.
+ * step if true, set the process or LWP to trap after one instr.
+ * signo if zero, clear the current signal if any.
+ * if non-zero, set the current signal to this one.
+ *
+ * Returns non-zero for success, zero for failure.
*/
-static int
-procfs_sproc_handler (pi, syscall_num, why, rtnvalp, statvalp)
- struct procinfo *pi;
- int syscall_num;
- int why;
- int *rtnvalp;
- int *statvalp;
+int
+proc_run_process (pi, step, signo)
+ procinfo *pi;
+ int step;
+ int signo;
{
-/* We've just detected the completion of an sproc system call. Now we need to
- setup a procinfo struct for this thread, and notify the thread system of the
- new arrival. */
-
-/* If sproc failed, then nothing interesting happened. Continue the process
- and go back to sleep. */
-
- if (pi->prstatus.pr_errno != 0)
+ int win;
+ int runflags;
+
+ /*
+ * We will probably have to apply this operation to individual threads,
+ * so make sure the control file descriptor is open.
+ */
+
+ if (pi->ctl_fd == 0 &&
+ open_procinfo_files (pi, FD_CTL) == 0)
{
- pi->prrun.pr_flags &= PRSTEP;
- pi->prrun.pr_flags |= PRCFAULT;
-
- if (ioctl (pi->ctl_fd, PIOCRUN, &pi->prrun) != 0)
- perror_with_name (pi->pathname);
-
return 0;
}
- /* At this point, the new thread is stopped at it's first instruction, and
- the parent is stopped at the exit from sproc. */
+ runflags = PRCFAULT; /* always clear current fault */
+ if (step)
+ runflags |= PRSTEP;
+ if (signo == 0)
+ runflags |= PRCSIG;
+ else if (signo != -1) /* -1 means do nothing W.R.T. signals */
+ proc_set_current_signal (pi, signo);
- /* Notify the caller of the arrival of a new thread. */
- create_procinfo (pi->prstatus.pr_rval1);
+#ifdef NEW_PROC_API
+ {
+ int cmd[2];
- *rtnvalp = pi->prstatus.pr_rval1;
- *statvalp = (SIGTRAP << 8) | 0177;
+ cmd[0] = PCRUN;
+ cmd[1] = runflags;
+ win = (write (pi->ctl_fd, (char *) &cmd, sizeof (cmd)) == sizeof (cmd));
+ }
+#else /* ioctl method */
+ {
+ prrun_t prrun;
- return 1;
+ memset (&prrun, 0, sizeof (prrun));
+ prrun.pr_flags = runflags;
+ win = (ioctl (pi->ctl_fd, PIOCRUN, &prrun) >= 0);
+ }
+#endif
+
+ return win;
}
/*
-
- LOCAL FUNCTION
-
- procfs_fork_handler - handle exit from the fork syscall
-
- SYNOPSIS
-
- int procfs_fork_handler (pi, syscall_num, why, rtnvalp, statvalp)
-
- DESCRIPTION
-
- This routine is called when an inferior process is about to finish a
- fork() system call. We will open up the new process, and then close
- it, which releases it from the clutches of the debugger.
-
- After that, we continue the target process as though nothing had
- happened.
-
- NOTES
- This is necessary for IRIX because we have to set PR_FORK in order
- to catch the creation of lwps (via sproc()). When an actual fork
- occurs, it becomes necessary to reset the forks debugger flags and
- continue it because we can't hack multiple processes yet.
+ * Function: proc_set_traced_signals
+ *
+ * Register to trace signals in the process or LWP.
+ * Returns non-zero for success, zero for failure.
*/
-static int
-procfs_fork_handler (pi, syscall_num, why, rtnvalp, statvalp)
- struct procinfo *pi;
- int syscall_num;
- int why;
- int *rtnvalp;
- int *statvalp;
+int
+proc_set_traced_signals (pi, sigset)
+ procinfo *pi;
+ sigset_t *sigset;
{
- struct procinfo *pitemp;
-
-/* At this point, we've detected the completion of a fork (or vfork) call in
- our child. The grandchild is also stopped because we set inherit-on-fork
- earlier. (Note that nobody has the grandchilds' /proc file open at this
- point.) We will release the grandchild from the debugger by opening it's
- /proc file and then closing it. Since run-on-last-close is set, the
- grandchild continues on its' merry way. */
-
+ int win;
+
+ /*
+ * We should never have to apply this operation to any procinfo
+ * except the one for the main process. If that ever changes
+ * for any reason, then take out the following clause and
+ * replace it with one that makes sure the ctl_fd is open.
+ */
+
+ if (pi->tid != 0)
+ pi = find_procinfo_or_die (pi->pid, 0);
+
+#ifdef NEW_PROC_API
+ {
+ struct {
+ int cmd;
+ /* Use char array to avoid alignment issues. */
+ char sigset[sizeof (sigset_t)];
+ } arg;
- pitemp = create_procinfo (pi->prstatus.pr_rval1);
- if (pitemp)
- close_proc_file (pitemp);
+ arg.cmd = PCSTRACE;
+ memcpy (&arg.sigset, sigset, sizeof (sigset_t));
- if (ioctl (pi->ctl_fd, PIOCRUN, &pi->prrun) != 0)
- perror_with_name (pi->pathname);
+ win = (write (pi->ctl_fd, (char *) &arg, sizeof (arg)) == sizeof (arg));
+ }
+#else /* ioctl method */
+ win = (ioctl (pi->ctl_fd, PIOCSTRACE, sigset) >= 0);
+#endif
+ /* The above operation renders the procinfo's cached pstatus obsolete. */
+ pi->status_valid = 0;
- return 0;
+ if (!win)
+ warning ("procfs: set_traced_signals failed");
+ return win;
}
-#endif /* SYS_sproc && !UNIXWARE */
/*
-
- LOCAL FUNCTION
-
- procfs_set_inferior_syscall_traps - setup the syscall traps
-
- SYNOPSIS
-
- void procfs_set_inferior_syscall_traps (struct procinfo *pip)
-
- DESCRIPTION
-
- Called for each "procinfo" (process, thread, or LWP) in the
- inferior, to register for notification of and handlers for
- syscall traps in the inferior.
-
+ * Function: proc_set_traced_faults
+ *
+ * Register to trace hardware faults in the process or LWP.
+ * Returns non-zero for success, zero for failure.
*/
-static void
-procfs_set_inferior_syscall_traps (pip)
- struct procinfo *pip;
+int
+proc_set_traced_faults (pi, fltset)
+ procinfo *pi;
+ fltset_t *fltset;
{
- procfs_set_syscall_trap (pip, SYS_exit, PROCFS_SYSCALL_ENTRY,
- procfs_exit_handler);
-
-#ifndef PRFS_STOPEXEC
-#ifdef SYS_exec
- procfs_set_syscall_trap (pip, SYS_exec, PROCFS_SYSCALL_EXIT,
- procfs_exec_handler);
-#endif
-#ifdef SYS_execv
- procfs_set_syscall_trap (pip, SYS_execv, PROCFS_SYSCALL_EXIT,
- procfs_exec_handler);
-#endif
-#ifdef SYS_execve
- procfs_set_syscall_trap (pip, SYS_execve, PROCFS_SYSCALL_EXIT,
- procfs_exec_handler);
-#endif
-#endif /* PRFS_STOPEXEC */
-
- /* Setup traps on exit from sproc() */
+ int win;
+
+ /*
+ * We should never have to apply this operation to any procinfo
+ * except the one for the main process. If that ever changes
+ * for any reason, then take out the following clause and
+ * replace it with one that makes sure the ctl_fd is open.
+ */
+
+ if (pi->tid != 0)
+ pi = find_procinfo_or_die (pi->pid, 0);
+
+#ifdef NEW_PROC_API
+ {
+ struct {
+ int cmd;
+ /* Use char array to avoid alignment issues. */
+ char fltset[sizeof (fltset_t)];
+ } arg;
-#ifdef SYS_sproc
- procfs_set_syscall_trap (pip, SYS_sproc, PROCFS_SYSCALL_EXIT,
- procfs_sproc_handler);
- procfs_set_syscall_trap (pip, SYS_fork, PROCFS_SYSCALL_EXIT,
- procfs_fork_handler);
-#ifdef SYS_vfork
- procfs_set_syscall_trap (pip, SYS_vfork, PROCFS_SYSCALL_EXIT,
- procfs_fork_handler);
-#endif
-/* Turn on inherit-on-fork flag so that all children of the target process
- start with tracing flags set. This allows us to trap lwp creation. Note
- that we also have to trap on fork and vfork in order to disable all tracing
- in the targets child processes. */
+ arg.cmd = PCSFAULT;
+ memcpy (&arg.fltset, fltset, sizeof (fltset_t));
- modify_inherit_on_fork_flag (pip->ctl_fd, 1);
+ win = (write (pi->ctl_fd, (char *) &arg, sizeof (arg)) == sizeof (arg));
+ }
+#else /* ioctl method */
+ win = (ioctl (pi->ctl_fd, PIOCSFAULT, fltset) >= 0);
#endif
+ /* The above operation renders the procinfo's cached pstatus obsolete. */
+ pi->status_valid = 0;
-#ifdef SYS_lwp_create
- procfs_set_syscall_trap (pip, SYS_lwp_create, PROCFS_SYSCALL_EXIT,
- procfs_lwp_creation_handler);
-#endif
+ return win;
}
/*
-
- LOCAL FUNCTION
-
- procfs_init_inferior - initialize target vector and access to a
- /proc entry
-
- SYNOPSIS
-
- void procfs_init_inferior (int pid)
-
- DESCRIPTION
-
- When gdb starts an inferior, this function is called in the parent
- process immediately after the fork. It waits for the child to stop
- on the return from the exec system call (the child itself takes care
- of ensuring that this is set up), then sets up the set of signals
- and faults that are to be traced. Returns the pid, which may have had
- the thread-id added to it.
-
- NOTES
-
- If proc_init_failed ever gets called, control returns to the command
- processing loop via the standard error handling code.
-
+ * Function: proc_set_traced_sysentry
+ *
+ * Register to trace entry to system calls in the process or LWP.
+ * Returns non-zero for success, zero for failure.
*/
-static void
-procfs_init_inferior (pid)
- int pid;
+int
+proc_set_traced_sysentry (pi, sysset)
+ procinfo *pi;
+ sysset_t *sysset;
{
- struct procinfo *pip;
-
- push_target (&procfs_ops);
-
- pip = create_procinfo (pid);
-
- procfs_set_inferior_syscall_traps (pip);
-
- /* create_procinfo may change the pid, so we have to update inferior_pid
- here before calling other gdb routines that need the right pid. */
-
- pid = pip->pid;
- inferior_pid = pid;
+ int win;
+
+ /*
+ * We should never have to apply this operation to any procinfo
+ * except the one for the main process. If that ever changes
+ * for any reason, then take out the following clause and
+ * replace it with one that makes sure the ctl_fd is open.
+ */
+
+ if (pi->tid != 0)
+ pi = find_procinfo_or_die (pi->pid, 0);
+
+#ifdef NEW_PROC_API
+ {
+ struct {
+ int cmd;
+ /* Use char array to avoid alignment issues. */
+ char sysset[sizeof (sysset_t)];
+ } arg;
- add_thread (pip->pid); /* Setup initial thread */
+ arg.cmd = PCSENTRY;
+ memcpy (&arg.sysset, sysset, sizeof (sysset_t));
-#ifdef START_INFERIOR_TRAPS_EXPECTED
- startup_inferior (START_INFERIOR_TRAPS_EXPECTED);
-#else
- /* One trap to exec the shell, one to exec the program being debugged. */
- startup_inferior (2);
+ win = (write (pi->ctl_fd, (char *) &arg, sizeof (arg)) == sizeof (arg));
+ }
+#else /* ioctl method */
+ win = (ioctl (pi->ctl_fd, PIOCSENTRY, sysset) >= 0);
#endif
+ /* The above operation renders the procinfo's cached pstatus obsolete. */
+ pi->status_valid = 0;
+
+ return win;
}
/*
+ * Function: proc_set_traced_sysexit
+ *
+ * Register to trace exit from system calls in the process or LWP.
+ * Returns non-zero for success, zero for failure.
+ */
- GLOBAL FUNCTION
-
- procfs_notice_signals
-
- SYNOPSIS
+int
+proc_set_traced_sysexit (pi, sysset)
+ procinfo *pi;
+ sysset_t *sysset;
+{
+ int win;
+
+ /*
+ * We should never have to apply this operation to any procinfo
+ * except the one for the main process. If that ever changes
+ * for any reason, then take out the following clause and
+ * replace it with one that makes sure the ctl_fd is open.
+ */
+
+ if (pi->tid != 0)
+ pi = find_procinfo_or_die (pi->pid, 0);
+
+#ifdef NEW_PROC_API
+ {
+ struct {
+ int cmd;
+ /* Use char array to avoid alignment issues. */
+ char sysset[sizeof (sysset_t)];
+ } arg;
- static void procfs_notice_signals (int pid);
+ arg.cmd = PCSEXIT;
+ memcpy (&arg.sysset, sysset, sizeof (sysset_t));
- DESCRIPTION
+ win = (write (pi->ctl_fd, (char *) &arg, sizeof (arg)) == sizeof (arg));
+ }
+#else /* ioctl method */
+ win = (ioctl (pi->ctl_fd, PIOCSEXIT, sysset) >= 0);
+#endif
+ /* The above operation renders the procinfo's cached pstatus obsolete. */
+ pi->status_valid = 0;
- When the user changes the state of gdb's signal handling via the
- "handle" command, this function gets called to see if any change
- in the /proc interface is required. It is also called internally
- by other /proc interface functions to initialize the state of
- the traced signal set.
+ return win;
+}
- One thing it does is that signals for which the state is "nostop",
- "noprint", and "pass", have their trace bits reset in the pr_trace
- field, so that they are no longer traced. This allows them to be
- delivered directly to the inferior without the debugger ever being
- involved.
+/*
+ * Function: proc_set_held_signals
+ *
+ * Specify the set of blocked / held signals in the process or LWP.
+ * Returns non-zero for success, zero for failure.
*/
-static void
-procfs_notice_signals (pid)
- int pid;
+int
+proc_set_held_signals (pi, sighold)
+ procinfo *pi;
+ sigset_t *sighold;
{
- struct procinfo *pi;
- struct sig_ctl sctl;
-
- pi = find_procinfo (pid, 0);
-
-#ifndef HAVE_PRRUN_T
- premptyset (&sctl.sigset);
+ int win;
+
+ /*
+ * We should never have to apply this operation to any procinfo
+ * except the one for the main process. If that ever changes
+ * for any reason, then take out the following clause and
+ * replace it with one that makes sure the ctl_fd is open.
+ */
+
+ if (pi->tid != 0)
+ pi = find_procinfo_or_die (pi->pid, 0);
+
+#ifdef NEW_PROC_API
+ {
+ struct {
+ int cmd;
+ /* Use char array to avoid alignment issues. */
+ char hold[sizeof (sigset_t)];
+ } arg;
+
+ arg.cmd = PCSHOLD;
+ memcpy (&arg.hold, sighold, sizeof (sigset_t));
+ win = (write (pi->ctl_fd, (void *) &arg, sizeof (arg)) == sizeof (arg));
+ }
#else
- sctl.sigset = pi->prrun.pr_trace;
+ win = (ioctl (pi->ctl_fd, PIOCSHOLD, sighold) >= 0);
#endif
+ /* The above operation renders the procinfo's cached pstatus obsolete. */
+ pi->status_valid = 0;
- notice_signals (pi, &sctl);
-
-#ifdef HAVE_PRRUN_T
- pi->prrun.pr_trace = sctl.sigset;
-#endif
+ return win;
}
-static void
-notice_signals (pi, sctl)
- struct procinfo *pi;
- struct sig_ctl *sctl;
-{
- int signo;
+/*
+ * Function: proc_get_pending_signals
+ *
+ * returns the set of signals that are pending in the process or LWP.
+ * Will also copy the sigset if 'save' is non-zero.
+ */
- for (signo = 0; signo < NSIG; signo++)
- {
- if (signal_stop_state (target_signal_from_host (signo)) == 0 &&
- signal_print_state (target_signal_from_host (signo)) == 0 &&
- signal_pass_state (target_signal_from_host (signo)) == 1)
- {
- prdelset (&sctl->sigset, signo);
- }
- else
- {
- praddset (&sctl->sigset, signo);
- }
- }
-#ifdef PROCFS_USE_READ_WRITE
- sctl->cmd = PCSTRACE;
- if (write (pi->ctl_fd, (char *) sctl, sizeof (struct sig_ctl)) < 0)
+sigset_t *
+proc_get_pending_signals (pi, save)
+ procinfo *pi;
+ sigset_t *save;
+{
+ sigset_t *ret = NULL;
+
+ /*
+ * We should never have to apply this operation to any procinfo
+ * except the one for the main process. If that ever changes
+ * for any reason, then take out the following clause and
+ * replace it with one that makes sure the ctl_fd is open.
+ */
+
+ if (pi->tid != 0)
+ pi = find_procinfo_or_die (pi->pid, 0);
+
+ if (!pi->status_valid)
+ if (!proc_get_status (pi))
+ return NULL;
+
+#ifdef NEW_PROC_API
+ ret = &pi->prstatus.pr_lwp.pr_lwppend;
#else
- if (ioctl (pi->ctl_fd, PIOCSTRACE, &sctl->sigset))
+ ret = &pi->prstatus.pr_sigpend;
#endif
- {
- print_sys_errmsg ("PIOCSTRACE failed", errno);
- }
+ if (save && ret)
+ memcpy (save, ret, sizeof (sigset_t));
+
+ return ret;
}
/*
+ * Function: proc_get_signal_actions
+ *
+ * returns the set of signal actions.
+ * Will also copy the sigactionset if 'save' is non-zero.
+ */
- LOCAL FUNCTION
-
- proc_set_exec_trap -- arrange for exec'd child to halt at startup
-
- SYNOPSIS
-
- void proc_set_exec_trap (void)
-
- DESCRIPTION
-
- This function is called in the child process when starting up
- an inferior, prior to doing the exec of the actual inferior.
- It sets the child process's exitset to make exit from the exec
- system call an event of interest to stop on, and then simply
- returns. The child does the exec, the system call returns, and
- the child stops at the first instruction, ready for the gdb
- parent process to take control of it.
-
- NOTE
+struct sigaction *
+proc_get_signal_actions (pi, save)
+ procinfo *pi;
+ struct sigaction *save;
+{
+ struct sigaction *ret = NULL;
+
+ /*
+ * We should never have to apply this operation to any procinfo
+ * except the one for the main process. If that ever changes
+ * for any reason, then take out the following clause and
+ * replace it with one that makes sure the ctl_fd is open.
+ */
+
+ if (pi->tid != 0)
+ pi = find_procinfo_or_die (pi->pid, 0);
+
+ if (!pi->status_valid)
+ if (!proc_get_status (pi))
+ return NULL;
+
+#ifdef NEW_PROC_API
+ ret = &pi->prstatus.pr_lwp.pr_action;
+#else
+ ret = &pi->prstatus.pr_action;
+#endif
+ if (save && ret)
+ memcpy (save, ret, sizeof (struct sigaction));
- We need to use all local variables since the child may be sharing
- it's data space with the parent, if vfork was used rather than
- fork.
+ return ret;
+}
- Also note that we want to turn off the inherit-on-fork flag in
- the child process so that any grand-children start with all
- tracing flags cleared.
+/*
+ * Function: proc_get_held_signals
+ *
+ * returns the set of signals that are held / blocked.
+ * Will also copy the sigset if 'save' is non-zero.
*/
-static void
-proc_set_exec_trap ()
+sigset_t *
+proc_get_held_signals (pi, save)
+ procinfo *pi;
+ sigset_t *save;
{
- struct sys_ctl exitset;
- struct sys_ctl entryset;
- char procname[MAX_PROC_NAME_SIZE];
- int fd;
+ sigset_t *ret = NULL;
+
+ /*
+ * We should never have to apply this operation to any procinfo
+ * except the one for the main process. If that ever changes
+ * for any reason, then take out the following clause and
+ * replace it with one that makes sure the ctl_fd is open.
+ */
+
+ if (pi->tid != 0)
+ pi = find_procinfo_or_die (pi->pid, 0);
+
+#ifdef NEW_PROC_API
+ if (!pi->status_valid)
+ if (!proc_get_status (pi))
+ return NULL;
- sprintf (procname, CTL_PROC_NAME_FMT, getpid ());
#ifdef UNIXWARE
- if ((fd = open (procname, O_WRONLY)) < 0)
+ ret = &pi->prstatus.pr_lwp.pr_context.uc_sigmask;
#else
- if ((fd = open (procname, O_RDWR)) < 0)
-#endif
- {
- perror (procname);
- gdb_flush (gdb_stderr);
- _exit (127);
- }
- premptyset (&exitset.sysset);
- premptyset (&entryset.sysset);
-
-#ifdef PRFS_STOPEXEC
- /* Under Alpha OSF/1 we have to use a PIOCSSPCACT ioctl to trace
- exits from exec system calls because of the user level loader. */
+ ret = &pi->prstatus.pr_lwp.pr_lwphold;
+#endif /* UNIXWARE */
+#else /* not NEW_PROC_API */
{
- int prfs_flags;
+ static sigset_t sigheld;
- if (ioctl (fd, PIOCGSPCACT, &prfs_flags) < 0)
- {
- perror (procname);
- gdb_flush (gdb_stderr);
- _exit (127);
- }
- prfs_flags |= PRFS_STOPEXEC;
- if (ioctl (fd, PIOCSSPCACT, &prfs_flags) < 0)
- {
- perror (procname);
- gdb_flush (gdb_stderr);
- _exit (127);
- }
+ if (ioctl (pi->ctl_fd, PIOCGHOLD, &sigheld) >= 0)
+ ret = &sigheld;
}
-#else /* PRFS_STOPEXEC */
- /* GW: Rationale...
- Not all systems with /proc have all the exec* syscalls with the same
- names. On the SGI, for example, there is no SYS_exec, but there
- *is* a SYS_execv. So, we try to account for that. */
+#endif /* NEW_PROC_API */
+ if (save && ret)
+ memcpy (save, ret, sizeof (sigset_t));
-#ifdef SYS_exec
- praddset (&exitset.sysset, SYS_exec);
-#endif
-#ifdef SYS_execve
- praddset (&exitset.sysset, SYS_execve);
-#endif
-#ifdef SYS_execv
- praddset (&exitset.sysset, SYS_execv);
-#endif
-
-#ifdef PROCFS_USE_READ_WRITE
- exitset.cmd = PCSEXIT;
- if (write (fd, (char *) &exitset, sizeof (struct sys_ctl)) < 0)
-#else
- if (ioctl (fd, PIOCSEXIT, &exitset.sysset) < 0)
-#endif
- {
- perror (procname);
- gdb_flush (gdb_stderr);
- _exit (127);
- }
-#endif /* PRFS_STOPEXEC */
+ return ret;
+}
- praddset (&entryset.sysset, SYS_exit);
+/*
+ * Function: proc_get_traced_signals
+ *
+ * returns the set of signals that are traced / debugged.
+ * Will also copy the sigset if 'save' is non-zero.
+ */
-#ifdef PROCFS_USE_READ_WRITE
- entryset.cmd = PCSENTRY;
- if (write (fd, (char *) &entryset, sizeof (struct sys_ctl)) < 0)
+sigset_t *
+proc_get_traced_signals (pi, save)
+ procinfo *pi;
+ sigset_t *save;
+{
+ sigset_t *ret = NULL;
+
+ /*
+ * We should never have to apply this operation to any procinfo
+ * except the one for the main process. If that ever changes
+ * for any reason, then take out the following clause and
+ * replace it with one that makes sure the ctl_fd is open.
+ */
+
+ if (pi->tid != 0)
+ pi = find_procinfo_or_die (pi->pid, 0);
+
+#ifdef NEW_PROC_API
+ if (!pi->status_valid)
+ if (!proc_get_status (pi))
+ return NULL;
+
+ ret = &pi->prstatus.pr_sigtrace;
#else
- if (ioctl (fd, PIOCSENTRY, &entryset.sysset) < 0)
-#endif
- {
- perror (procname);
- gdb_flush (gdb_stderr);
- _exit (126);
- }
-
- /* Turn off inherit-on-fork flag so that all grand-children of gdb
- start with tracing flags cleared. */
-
- modify_inherit_on_fork_flag (fd, 0);
-
- /* Turn on run-on-last-close flag so that this process will not hang
- if GDB goes away for some reason. */
-
- modify_run_on_last_close_flag (fd, 1);
-
-#ifndef UNIXWARE /* since this is a solaris-ism, we don't want it */
- /* NOTE: revisit when doing thread support for UW */
-#ifdef PR_ASYNC
{
- long pr_flags;
-#ifdef PROCFS_USE_READ_WRITE
- struct proc_ctl pctl;
-#endif
+ static sigset_t sigtrace;
-/* Solaris needs this to make procfs treat all threads seperately. Without
- this, all threads halt whenever something happens to any thread. Since
- GDB wants to control all this itself, it needs to set PR_ASYNC. */
-
- pr_flags = PR_ASYNC;
-#ifdef PROCFS_USE_READ_WRITE
- pctl.cmd = PCSET;
- pctl.data = PR_FORK | PR_ASYNC;
- write (fd, (char *) &pctl, sizeof (struct proc_ctl));
-#else
- ioctl (fd, PIOCSET, &pr_flags);
-#endif
+ if (ioctl (pi->ctl_fd, PIOCGTRACE, &sigtrace) >= 0)
+ ret = &sigtrace;
}
-#endif /* PR_ASYNC */
-#endif /* !UNIXWARE */
+#endif
+ if (save && ret)
+ memcpy (save, ret, sizeof (sigset_t));
+
+ return ret;
}
/*
-
- GLOBAL FUNCTION
-
- proc_iterate_over_mappings -- call function for every mapped space
-
- SYNOPSIS
-
- int proc_iterate_over_mappings (int (*func)())
-
- DESCRIPTION
-
- Given a pointer to a function, call that function for every
- mapped address space, passing it an open file descriptor for
- the file corresponding to that mapped address space (if any)
- and the base address of the mapped space. Quit when we hit
- the end of the mappings or the function returns nonzero.
+ * Function: proc_trace_signal
+ *
+ * Add 'signo' to the set of signals that are traced.
+ * Returns non-zero for success, zero for failure.
*/
-#ifdef UNIXWARE
int
-proc_iterate_over_mappings (func)
- int (*func) PARAMS ((int, CORE_ADDR));
+proc_trace_signal (pi, signo)
+ procinfo *pi;
+ int signo;
{
- int nmap;
- int fd;
- int funcstat = 0;
- prmap_t *prmaps;
- prmap_t *prmap;
- struct procinfo *pi;
- struct stat sbuf;
-
- pi = current_procinfo;
-
- if (fstat (pi->map_fd, &sbuf) < 0)
- return 0;
-
- nmap = sbuf.st_size / sizeof (prmap_t);
- prmaps = (prmap_t *) alloca (nmap * sizeof (prmap_t));
- if ((lseek (pi->map_fd, 0, SEEK_SET) == 0) &&
- (read (pi->map_fd, (char *) prmaps, nmap * sizeof (prmap_t)) ==
- (nmap * sizeof (prmap_t))))
+ sigset_t temp;
+
+ /*
+ * We should never have to apply this operation to any procinfo
+ * except the one for the main process. If that ever changes
+ * for any reason, then take out the following clause and
+ * replace it with one that makes sure the ctl_fd is open.
+ */
+
+ if (pi->tid != 0)
+ pi = find_procinfo_or_die (pi->pid, 0);
+
+ if (pi)
{
- int i = 0;
- for (prmap = prmaps; i < nmap && funcstat == 0; ++prmap, ++i)
+ if (proc_get_traced_signals (pi, &temp))
{
- char name[sizeof ("/proc/1234567890/object") +
- sizeof (prmap->pr_mapname)];
- sprintf (name, "/proc/%d/object/%s", pi->pid, prmap->pr_mapname);
- if ((fd = open (name, O_RDONLY)) == -1)
- {
- funcstat = 1;
- break;
- }
- funcstat = (*func) (fd, (CORE_ADDR) prmap->pr_vaddr);
- close (fd);
+ praddset (&temp, signo);
+ return proc_set_traced_signals (pi, &temp);
}
}
- return (funcstat);
-}
-#else /* UNIXWARE */
-int
-proc_iterate_over_mappings (func)
- int (*func) PARAMS ((int, CORE_ADDR));
-{
- int nmap;
- int fd;
- int funcstat = 0;
- struct prmap *prmaps;
- struct prmap *prmap;
- struct procinfo *pi;
- pi = current_procinfo;
-
- if (ioctl (pi->map_fd, PIOCNMAP, &nmap) == 0)
- {
- prmaps = (struct prmap *) alloca ((nmap + 1) * sizeof (*prmaps));
- if (ioctl (pi->map_fd, PIOCMAP, prmaps) == 0)
- {
- for (prmap = prmaps; prmap->pr_size && funcstat == 0; ++prmap)
- {
- fd = proc_address_to_fd (pi, (CORE_ADDR) prmap->pr_vaddr, 0);
- funcstat = (*func) (fd, (CORE_ADDR) prmap->pr_vaddr);
- close (fd);
- }
- }
- }
- return (funcstat);
+ return 0; /* failure */
}
-#endif /* UNIXWARE */
-#if 0 /* Currently unused */
/*
-
- GLOBAL FUNCTION
-
- proc_base_address -- find base address for segment containing address
-
- SYNOPSIS
-
- CORE_ADDR proc_base_address (CORE_ADDR addr)
-
- DESCRIPTION
-
- Given an address of a location in the inferior, find and return
- the base address of the mapped segment containing that address.
-
- This is used for example, by the shared library support code,
- where we have the pc value for some location in the shared library
- where we are stopped, and need to know the base address of the
- segment containing that address.
+ * Function: proc_ignore_signal
+ *
+ * Remove 'signo' from the set of signals that are traced.
+ * Returns non-zero for success, zero for failure.
*/
-CORE_ADDR
-proc_base_address (addr)
- CORE_ADDR addr;
+int
+proc_ignore_signal (pi, signo)
+ procinfo *pi;
+ int signo;
{
- int nmap;
- struct prmap *prmaps;
- struct prmap *prmap;
- CORE_ADDR baseaddr = 0;
- struct procinfo *pi;
-
- pi = current_procinfo;
-
- if (ioctl (pi->map_fd, PIOCNMAP, &nmap) == 0)
+ sigset_t temp;
+
+ /*
+ * We should never have to apply this operation to any procinfo
+ * except the one for the main process. If that ever changes
+ * for any reason, then take out the following clause and
+ * replace it with one that makes sure the ctl_fd is open.
+ */
+
+ if (pi->tid != 0)
+ pi = find_procinfo_or_die (pi->pid, 0);
+
+ if (pi)
{
- prmaps = (struct prmap *) alloca ((nmap + 1) * sizeof (*prmaps));
- if (ioctl (pi->map_fd, PIOCMAP, prmaps) == 0)
+ if (proc_get_traced_signals (pi, &temp))
{
- for (prmap = prmaps; prmap->pr_size; ++prmap)
- {
- if ((prmap->pr_vaddr <= (caddr_t) addr) &&
- (prmap->pr_vaddr + prmap->pr_size > (caddr_t) addr))
- {
- baseaddr = (CORE_ADDR) prmap->pr_vaddr;
- break;
- }
- }
+ prdelset (&temp, signo);
+ return proc_set_traced_signals (pi, &temp);
}
}
- return (baseaddr);
-}
-#endif /* 0 */
+ return 0; /* failure */
+}
-#ifndef UNIXWARE
/*
+ * Function: proc_get_traced_faults
+ *
+ * returns the set of hardware faults that are traced /debugged.
+ * Will also copy the faultset if 'save' is non-zero.
+ */
- LOCAL FUNCTION
-
- proc_address_to_fd -- return open fd for file mapped to address
-
- SYNOPSIS
-
- int proc_address_to_fd (struct procinfo *pi, CORE_ADDR addr, complain)
+fltset_t *
+proc_get_traced_faults (pi, save)
+ procinfo *pi;
+ fltset_t *save;
+{
+ fltset_t *ret = NULL;
+
+ /*
+ * We should never have to apply this operation to any procinfo
+ * except the one for the main process. If that ever changes
+ * for any reason, then take out the following clause and
+ * replace it with one that makes sure the ctl_fd is open.
+ */
+
+ if (pi->tid != 0)
+ pi = find_procinfo_or_die (pi->pid, 0);
+
+#ifdef NEW_PROC_API
+ if (!pi->status_valid)
+ if (!proc_get_status (pi))
+ return NULL;
+
+ ret = &pi->prstatus.pr_flttrace;
+#else
+ {
+ static fltset_t flttrace;
- DESCRIPTION
+ if (ioctl (pi->ctl_fd, PIOCGFAULT, &flttrace) >= 0)
+ ret = &flttrace;
+ }
+#endif
+ if (save && ret)
+ memcpy (save, ret, sizeof (fltset_t));
- Given an address in the current inferior's address space, use the
- /proc interface to find an open file descriptor for the file that
- this address was mapped in from. Return -1 if there is no current
- inferior. Print a warning message if there is an inferior but
- the address corresponds to no file (IE a bogus address).
+ return ret;
+}
+/*
+ * Function: proc_get_traced_sysentry
+ *
+ * returns the set of syscalls that are traced /debugged on entry.
+ * Will also copy the syscall set if 'save' is non-zero.
*/
-static int
-proc_address_to_fd (pi, addr, complain)
- struct procinfo *pi;
- CORE_ADDR addr;
- int complain;
+sysset_t *
+proc_get_traced_sysentry (pi, save)
+ procinfo *pi;
+ sysset_t *save;
{
- int fd = -1;
+ sysset_t *ret = NULL;
+
+ /*
+ * We should never have to apply this operation to any procinfo
+ * except the one for the main process. If that ever changes
+ * for any reason, then take out the following clause and
+ * replace it with one that makes sure the ctl_fd is open.
+ */
+
+ if (pi->tid != 0)
+ pi = find_procinfo_or_die (pi->pid, 0);
+
+#ifdef NEW_PROC_API
+ if (!pi->status_valid)
+ if (!proc_get_status (pi))
+ return NULL;
+
+ ret = &pi->prstatus.pr_sysentry;
+#else
+ {
+ static sysset_t sysentry;
- if ((fd = ioctl (pi->ctl_fd, PIOCOPENM, (caddr_t *) & addr)) < 0)
- {
- if (complain)
- {
- print_sys_errmsg (pi->pathname, errno);
- warning ("can't find mapped file for address 0x%x", addr);
- }
- }
- return (fd);
+ if (ioctl (pi->ctl_fd, PIOCGENTRY, &sysentry) >= 0)
+ ret = &sysentry;
+ }
+#endif
+ if (save && ret)
+ memcpy (save, ret, sizeof (sysset_t));
+
+ return ret;
}
-#endif /* !UNIXWARE */
-/* Attach to process PID, then initialize for debugging it
- and wait for the trace-trap that results from attaching. */
+/*
+ * Function: proc_get_traced_sysexit
+ *
+ * returns the set of syscalls that are traced /debugged on exit.
+ * Will also copy the syscall set if 'save' is non-zero.
+ */
-static void
-procfs_attach (args, from_tty)
- char *args;
- int from_tty;
+sysset_t *
+proc_get_traced_sysexit (pi, save)
+ procinfo *pi;
+ sysset_t *save;
{
- char *exec_file;
- int pid;
-
- if (!args)
- error_no_arg ("process-id to attach");
-
- pid = atoi (args);
+ sysset_t * ret = NULL;
+
+ /*
+ * We should never have to apply this operation to any procinfo
+ * except the one for the main process. If that ever changes
+ * for any reason, then take out the following clause and
+ * replace it with one that makes sure the ctl_fd is open.
+ */
+
+ if (pi->tid != 0)
+ pi = find_procinfo_or_die (pi->pid, 0);
+
+#ifdef NEW_PROC_API
+ if (!pi->status_valid)
+ if (!proc_get_status (pi))
+ return NULL;
+
+ ret = &pi->prstatus.pr_sysexit;
+#else
+ {
+ static sysset_t sysexit;
- if (pid == getpid ()) /* Trying to masturbate? */
- error ("I refuse to debug myself!");
+ if (ioctl (pi->ctl_fd, PIOCGEXIT, &sysexit) >= 0)
+ ret = &sysexit;
+ }
+#endif
+ if (save && ret)
+ memcpy (save, ret, sizeof (sysset_t));
- if (from_tty)
- {
- exec_file = (char *) get_exec_file (0);
+ return ret;
+}
- if (exec_file)
- printf_unfiltered ("Attaching to program `%s', %s\n", exec_file, target_pid_to_str (pid));
- else
- printf_unfiltered ("Attaching to %s\n", target_pid_to_str (pid));
+/*
+ * Function: proc_clear_current_fault
+ *
+ * The current fault (if any) is cleared; the associated signal
+ * will not be sent to the process or LWP when it resumes.
+ * Returns non-zero for success, zero for failure.
+ */
- gdb_flush (gdb_stdout);
- }
+int
+proc_clear_current_fault (pi)
+ procinfo *pi;
+{
+ int win;
+
+ /*
+ * We should never have to apply this operation to any procinfo
+ * except the one for the main process. If that ever changes
+ * for any reason, then take out the following clause and
+ * replace it with one that makes sure the ctl_fd is open.
+ */
+
+ if (pi->tid != 0)
+ pi = find_procinfo_or_die (pi->pid, 0);
+
+#ifdef NEW_PROC_API
+ {
+ int cmd = PCCFAULT;
+ win = (write (pi->ctl_fd, (void *) &cmd, sizeof (cmd)) == sizeof (cmd));
+ }
+#else
+ win = (ioctl (pi->ctl_fd, PIOCCFAULT, 0) >= 0);
+#endif
- inferior_pid = pid = do_attach (pid);
- push_target (&procfs_ops);
+ return win;
}
+/*
+ * Function: proc_set_current_signal
+ *
+ * Set the "current signal" that will be delivered next to the process.
+ * NOTE: semantics are different from those of KILL.
+ * This signal will be delivered to the process or LWP
+ * immediately when it is resumed (even if the signal is held/blocked);
+ * it will NOT immediately cause another event of interest, and will NOT
+ * first trap back to the debugger.
+ *
+ * Returns non-zero for success, zero for failure.
+ */
-/* Take a program previously attached to and detaches it.
- The program resumes execution and will no longer stop
- on signals, etc. We'd better not have left any breakpoints
- in the program or it'll die when it hits one. For this
- to work, it may be necessary for the process to have been
- previously attached. It *might* work if the program was
- started via the normal ptrace (PTRACE_TRACEME). */
-
-static void
-procfs_detach (args, from_tty)
- char *args;
- int from_tty;
+int
+proc_set_current_signal (pi, signo)
+ procinfo *pi;
+ int signo;
{
- int siggnal = 0;
+ int win;
+ struct {
+ int cmd;
+ /* Use char array to avoid alignment issues. */
+ char sinfo[sizeof (struct siginfo)];
+ } arg;
+ struct siginfo *mysinfo;
+
+ /*
+ * We should never have to apply this operation to any procinfo
+ * except the one for the main process. If that ever changes
+ * for any reason, then take out the following clause and
+ * replace it with one that makes sure the ctl_fd is open.
+ */
+
+ if (pi->tid != 0)
+ pi = find_procinfo_or_die (pi->pid, 0);
- if (from_tty)
- {
- char *exec_file = get_exec_file (0);
- if (exec_file == 0)
- exec_file = "";
- printf_unfiltered ("Detaching from program: %s %s\n",
- exec_file, target_pid_to_str (inferior_pid));
- gdb_flush (gdb_stdout);
- }
- if (args)
- siggnal = atoi (args);
+#ifdef PROCFS_DONT_PIOCSSIG_CURSIG
+ /* With Alpha OSF/1 procfs, the kernel gets really confused if it
+ * receives a PIOCSSIG with a signal identical to the current signal,
+ * it messes up the current signal. Work around the kernel bug.
+ */
+ if (signo > 0 &&
+ signo == proc_cursig (pi))
+ return 1; /* I assume this is a success? */
+#endif
+
+ /* The pointer is just a type alias. */
+ mysinfo = (struct siginfo *) &arg.sinfo;
+ mysinfo->si_signo = signo;
+ mysinfo->si_code = 0;
+ mysinfo->si_pid = getpid (); /* ?why? */
+ mysinfo->si_uid = getuid (); /* ?why? */
+
+#ifdef NEW_PROC_API
+ arg.cmd = PCSSIG;
+ win = (write (pi->ctl_fd, (void *) &arg, sizeof (arg)) == sizeof (arg));
+#else
+ win = (ioctl (pi->ctl_fd, PIOCSSIG, (void *) &arg.sinfo) >= 0);
+#endif
- do_detach (siggnal);
- inferior_pid = 0;
- unpush_target (&procfs_ops); /* Pop out of handling an inferior */
+ return win;
}
-/* Get ready to modify the registers array. On machines which store
- individual registers, this doesn't need to do anything. On machines
- which store all the registers in one fell swoop, this makes sure
- that registers contains all the registers from the program being
- debugged. */
+/*
+ * Function: proc_clear_current_signal
+ *
+ * The current signal (if any) is cleared, and
+ * is not sent to the process or LWP when it resumes.
+ * Returns non-zero for success, zero for failure.
+ */
-static void
-procfs_prepare_to_store ()
+int
+proc_clear_current_signal (pi)
+ procinfo *pi;
{
-#ifdef CHILD_PREPARE_TO_STORE
- CHILD_PREPARE_TO_STORE ();
+ int win;
+
+ /*
+ * We should never have to apply this operation to any procinfo
+ * except the one for the main process. If that ever changes
+ * for any reason, then take out the following clause and
+ * replace it with one that makes sure the ctl_fd is open.
+ */
+
+ if (pi->tid != 0)
+ pi = find_procinfo_or_die (pi->pid, 0);
+
+#ifdef NEW_PROC_API
+ {
+ struct {
+ int cmd;
+ /* Use char array to avoid alignment issues. */
+ char sinfo[sizeof (struct siginfo)];
+ } arg;
+ struct siginfo *mysinfo;
+
+ arg.cmd = PCSSIG;
+ /* The pointer is just a type alias. */
+ mysinfo = (struct siginfo *) &arg.sinfo;
+ mysinfo->si_signo = 0;
+ mysinfo->si_code = 0;
+ mysinfo->si_errno = 0;
+ mysinfo->si_pid = getpid (); /* ?why? */
+ mysinfo->si_uid = getuid (); /* ?why? */
+
+ win = (write (pi->ctl_fd, (void *) &arg, sizeof (arg)) == sizeof (arg));
+ }
+#else
+ win = (ioctl (pi->ctl_fd, PIOCSSIG, 0) >= 0);
#endif
-}
-
-/* Print status information about what we're accessing. */
-static void
-procfs_files_info (ignore)
- struct target_ops *ignore;
-{
- printf_unfiltered ("\tUsing the running image of %s %s via /proc.\n",
- attach_flag ? "attached" : "child", target_pid_to_str (inferior_pid));
+ return win;
}
-/* ARGSUSED */
-static void
-procfs_open (arg, from_tty)
- char *arg;
- int from_tty;
+/*
+ * Function: proc_get_gregs
+ *
+ * Get the general registers for the process or LWP.
+ * Returns non-zero for success, zero for failure.
+ */
+
+gdb_gregset_t *
+proc_get_gregs (pi)
+ procinfo *pi;
{
- error ("Use the \"run\" command to start a Unix child process.");
+ if (!pi->status_valid || !pi->gregs_valid)
+ if (!proc_get_status (pi))
+ return NULL;
+
+ /*
+ * OK, sorry about the ifdef's.
+ * There's three cases instead of two, because
+ * in this instance Unixware and Solaris/RW differ.
+ */
+
+#ifdef NEW_PROC_API
+#ifdef UNIXWARE /* ugh, a true architecture dependency */
+ return &pi->prstatus.pr_lwp.pr_context.uc_mcontext.gregs;
+#else /* not Unixware */
+ return &pi->prstatus.pr_lwp.pr_reg;
+#endif /* Unixware */
+#else /* not NEW_PROC_API */
+ return &pi->prstatus.pr_reg;
+#endif /* NEW_PROC_API */
}
/*
-
- LOCAL FUNCTION
-
- do_attach -- attach to an already existing process
-
- SYNOPSIS
-
- int do_attach (int pid)
-
- DESCRIPTION
-
- Attach to an already existing process with the specified process
- id. If the process is not already stopped, query whether to
- stop it or not.
-
- NOTES
-
- The option of stopping at attach time is specific to the /proc
- versions of gdb. Versions using ptrace force the attachee
- to stop. (I have changed this version to do so, too. All you
- have to do is "continue" to make it go on. -- gnu@cygnus.com)
-
+ * Function: proc_get_fpregs
+ *
+ * Get the floating point registers for the process or LWP.
+ * Returns non-zero for success, zero for failure.
*/
-static int
-do_attach (pid)
- int pid;
+gdb_fpregset_t *
+proc_get_fpregs (pi)
+ procinfo *pi;
{
- struct procinfo *pi;
-#ifdef PROCFS_USE_READ_WRITE
- struct flt_ctl fctl;
-#endif
- int nlwp, *lwps;
+#ifdef NEW_PROC_API
+ if (!pi->status_valid || !pi->fpregs_valid)
+ if (!proc_get_status (pi))
+ return NULL;
- pi = init_procinfo (pid, 0);
-
-#ifdef PIOCLWPIDS
- nlwp = pi->prstatus.pr_nlwp;
- lwps = alloca ((2 * nlwp + 2) * sizeof (id_t));
+#ifdef UNIXWARE /* a true architecture dependency */
+ return &pi->prstatus.pr_lwp.pr_context.uc_mcontext.fpregs;
+#else
+ return &pi->prstatus.pr_lwp.pr_fpreg;
+#endif /* Unixware */
- if (ioctl (pi->ctl_fd, PIOCLWPIDS, lwps))
- {
- print_sys_errmsg (pi->pathname, errno);
- error ("PIOCLWPIDS failed");
- }
-#else /* PIOCLWPIDS */
- nlwp = 1;
- lwps = alloca ((2 * nlwp + 2) * sizeof *lwps);
- lwps[0] = 0;
-#endif
- for (; nlwp > 0; nlwp--, lwps++)
+#else /* not NEW_PROC_API */
+ if (pi->fpregs_valid)
+ return &pi->fpregset; /* already got 'em */
+ else
{
- /* First one has already been created above. */
- if ((pi = find_procinfo ((*lwps << 16) | pid, 1)) == 0)
- pi = init_procinfo ((*lwps << 16) | pid, 0);
-
- if (THE_PR_LWP (pi->prstatus).pr_flags & (PR_STOPPED | PR_ISTOP))
+ if (pi->ctl_fd == 0 &&
+ open_procinfo_files (pi, FD_CTL) == 0)
{
- pi->was_stopped = 1;
+ return NULL;
}
else
{
- pi->was_stopped = 0;
- if (1 || query ("Process is currently running, stop it? "))
+#ifdef PIOCTGFPREG
+ struct {
+ long pr_count;
+ tid_t pr_error_thread;
+ tfpregset_t thread_1;
+ } thread_fpregs;
+
+ thread_fpregs.pr_count = 1;
+ thread_fpregs.thread_1.tid = pi->tid;
+
+ if (pi->tid == 0 &&
+ ioctl (pi->ctl_fd, PIOCGFPREG, &pi->fpregset) >= 0)
{
-#ifdef PROCFS_USE_READ_WRITE
- long cmd;
-#endif
- /* Make it run again when we close it. */
- modify_run_on_last_close_flag (pi->ctl_fd, 1);
-#ifdef PROCFS_USE_READ_WRITE
- cmd = PCSTOP;
- if (write (pi->ctl_fd, (char *) &cmd, sizeof (long)) < 0)
+ pi->fpregs_valid = 1;
+ return &pi->fpregset; /* got 'em now! */
+ }
+ else if (pi->tid != 0 &&
+ ioctl (pi->ctl_fd, PIOCTGFPREG, &thread_fpregs) >= 0)
+ {
+ memcpy (&pi->fpregset, &thread_fpregs.thread_1.pr_fpregs,
+ sizeof (pi->fpregset));
+ pi->fpregs_valid = 1;
+ return &pi->fpregset; /* got 'em now! */
+ }
+ else
+ {
+ return NULL;
+ }
#else
- if (ioctl (pi->ctl_fd, PIOCSTOP, &pi->prstatus) < 0)
-#endif
- {
- print_sys_errmsg (pi->pathname, errno);
- close_proc_file (pi);
- error ("PIOCSTOP failed");
- }
-#ifdef UNIXWARE
- if (!procfs_read_status (pi))
- {
- print_sys_errmsg (pi->pathname, errno);
- close_proc_file (pi);
- error ("procfs_read_status failed");
- }
-#endif
- pi->nopass_next_sigstop = 1;
+ if (ioctl (pi->ctl_fd, PIOCGFPREG, &pi->fpregset) >= 0)
+ {
+ pi->fpregs_valid = 1;
+ return &pi->fpregset; /* got 'em now! */
}
else
{
- printf_unfiltered ("Ok, gdb will wait for %s to stop.\n",
- target_pid_to_str (pi->pid));
+ return NULL;
}
+#endif
}
+ }
+#endif
+}
+
+/*
+ * Function: proc_set_gregs
+ *
+ * Write the general registers back to the process or LWP.
+ * Returns non-zero for success, zero for failure.
+ */
-#ifdef PROCFS_USE_READ_WRITE
- fctl.cmd = PCSFAULT;
- prfillset (&fctl.fltset);
- prdelset (&fctl.fltset, FLTPAGE);
+int
+proc_set_gregs (pi)
+ procinfo *pi;
+{
+ gdb_gregset_t *gregs;
+ int win;
- if (write (pi->ctl_fd, (char *) &fctl, sizeof (struct flt_ctl)) < 0)
- print_sys_errmsg ("PCSFAULT failed", errno);
-#else /* PROCFS_USE_READ_WRITE */
- prfillset (&pi->prrun.pr_fault);
- prdelset (&pi->prrun.pr_fault, FLTPAGE);
-#ifdef PROCFS_DONT_TRACE_FAULTS
- premptyset (&pi->prrun.pr_fault);
+ if ((gregs = proc_get_gregs (pi)) == NULL)
+ return 0; /* get_regs has already warned */
+
+ if (pi->ctl_fd == 0 &&
+ open_procinfo_files (pi, FD_CTL) == 0)
+ {
+ return 0;
+ }
+ else
+ {
+#ifdef NEW_PROC_API
+ struct {
+ int cmd;
+ /* Use char array to avoid alignment issues. */
+ char gregs[sizeof (gdb_gregset_t)];
+ } arg;
+
+ arg.cmd = PCSREG;
+ memcpy (&arg.gregs, gregs, sizeof (arg.gregs));
+ win = (write (pi->ctl_fd, (void *) &arg, sizeof (arg)) == sizeof (arg));
+#else
+ win = (ioctl (pi->ctl_fd, PIOCSREG, gregs) >= 0);
#endif
- if (ioctl (pi->ctl_fd, PIOCSFAULT, &pi->prrun.pr_fault))
- {
- print_sys_errmsg ("PIOCSFAULT failed", errno);
- }
- if (ioctl (pi->ctl_fd, PIOCSTRACE, &pi->prrun.pr_trace))
+ }
+
+ /* Policy: writing the regs invalidates our cache. */
+ pi->gregs_valid = 0;
+ return win;
+}
+
+/*
+ * Function: proc_set_fpregs
+ *
+ * Modify the floating point register set of the process or LWP.
+ * Returns non-zero for success, zero for failure.
+ */
+
+int
+proc_set_fpregs (pi)
+ procinfo *pi;
+{
+ gdb_fpregset_t *fpregs;
+ int win;
+
+ if ((fpregs = proc_get_fpregs (pi)) == NULL)
+ return 0; /* get_fpregs has already warned */
+
+ if (pi->ctl_fd == 0 &&
+ open_procinfo_files (pi, FD_CTL) == 0)
+ {
+ return 0;
+ }
+ else
+ {
+#ifdef NEW_PROC_API
+ struct {
+ int cmd;
+ /* Use char array to avoid alignment issues. */
+ char fpregs[sizeof (gdb_fpregset_t)];
+ } arg;
+
+ arg.cmd = PCSFPREG;
+ memcpy (&arg.fpregs, fpregs, sizeof (arg.fpregs));
+ win = (write (pi->ctl_fd, (void *) &arg, sizeof (arg)) == sizeof (arg));
+#else
+#ifdef PIOCTSFPREG
+ if (pi->tid == 0)
+ win = (ioctl (pi->ctl_fd, PIOCSFPREG, fpregs) >= 0);
+ else
{
- print_sys_errmsg ("PIOCSTRACE failed", errno);
+ struct {
+ long pr_count;
+ tid_t pr_error_thread;
+ tfpregset_t thread_1;
+ } thread_fpregs;
+
+ thread_fpregs.pr_count = 1;
+ thread_fpregs.thread_1.tid = pi->tid;
+ memcpy (&thread_fpregs.thread_1.pr_fpregs, fpregs,
+ sizeof (*fpregs));
+ win = (ioctl (pi->ctl_fd, PIOCTSFPREG, &thread_fpregs) >= 0);
}
- add_thread (pi->pid);
- procfs_set_inferior_syscall_traps (pi);
-#endif /* PROCFS_USE_READ_WRITE */
+#else
+ win = (ioctl (pi->ctl_fd, PIOCSFPREG, fpregs) >= 0);
+#endif /* osf PIOCTSFPREG */
+#endif /* NEW_PROC_API */
}
- attach_flag = 1;
- return (pi->pid);
+
+ /* Policy: writing the regs invalidates our cache. */
+ pi->fpregs_valid = 0;
+ return win;
}
/*
+ * Function: proc_kill
+ *
+ * Send a signal to the proc or lwp with the semantics of "kill()".
+ * Returns non-zero for success, zero for failure.
+ */
- LOCAL FUNCTION
+int
+proc_kill (pi, signo)
+ procinfo *pi;
+ int signo;
+{
+ int win;
- do_detach -- detach from an attached-to process
+ /*
+ * We might conceivably apply this operation to an LWP, and
+ * the LWP's ctl file descriptor might not be open.
+ */
- SYNOPSIS
+ if (pi->ctl_fd == 0 &&
+ open_procinfo_files (pi, FD_CTL) == 0)
+ {
+ return 0;
+ }
+ else
+ {
+#ifdef NEW_PROC_API
+ int cmd[2];
- void do_detach (int signal)
+ cmd[0] = PCKILL;
+ cmd[1] = signo;
+ win = (write (pi->ctl_fd, (char *) &cmd, sizeof (cmd)) == sizeof (cmd));
+#else /* ioctl method */
+ /* FIXME: do I need the Alpha OSF fixups present in
+ procfs.c/unconditionally_kill_inferior? Perhaps only for SIGKILL? */
+ win = (ioctl (pi->ctl_fd, PIOCKILL, &signo) >= 0);
+#endif
+ }
- DESCRIPTION
+ return win;
+}
- Detach from the current attachee.
+/*
+ * Function: proc_parent_pid
+ *
+ * Find the pid of the process that started this one.
+ * Returns the parent process pid, or zero.
+ */
- If signal is non-zero, the attachee is started running again and sent
- the specified signal.
+int
+proc_parent_pid (pi)
+ procinfo *pi;
+{
+ /*
+ * We should never have to apply this operation to any procinfo
+ * except the one for the main process. If that ever changes
+ * for any reason, then take out the following clause and
+ * replace it with one that makes sure the ctl_fd is open.
+ */
+
+ if (pi->tid != 0)
+ pi = find_procinfo_or_die (pi->pid, 0);
+
+ if (!pi->status_valid)
+ if (!proc_get_status (pi))
+ return 0;
- If signal is zero and the attachee was not already stopped when we
- attached to it, then we make it runnable again when we detach.
+ return pi->prstatus.pr_ppid;
+}
- Otherwise, we query whether or not to make the attachee runnable
- again, since we may simply want to leave it in the state it was in
- when we attached.
- We report any problems, but do not consider them errors, since we
- MUST detach even if some things don't seem to go right. This may not
- be the ideal situation. (FIXME).
+/*
+ * Function: proc_set_watchpoint
+ *
*/
-static void
-do_detach (signal)
- int signal;
+int
+proc_set_watchpoint (pi, addr, len, wflags)
+ procinfo *pi;
+ void *addr;
+ int len;
+ int wflags;
{
- struct procinfo *pi;
-
- for (pi = procinfo_list; pi; pi = pi->next)
- {
- if (signal)
- {
- set_proc_siginfo (pi, signal);
- }
-#ifdef PROCFS_USE_READ_WRITE
- pi->saved_exitset.cmd = PCSEXIT;
- if (write (pi->ctl_fd, (char *) &pi->saved_exitset,
- sizeof (struct sys_ctl)) < 0)
+#if !defined (TARGET_HAS_HARDWARE_WATCHPOINTS)
+ return 0;
#else
- if (ioctl (pi->ctl_fd, PIOCSEXIT, &pi->saved_exitset.sysset) < 0)
-#endif
- {
- print_sys_errmsg (pi->pathname, errno);
- printf_unfiltered ("PIOCSEXIT failed.\n");
- }
-#ifdef PROCFS_USE_READ_WRITE
- pi->saved_entryset.cmd = PCSENTRY;
- if (write (pi->ctl_fd, (char *) &pi->saved_entryset,
- sizeof (struct sys_ctl)) < 0)
+/* Horrible hack! Detect Solaris 2.5, because this doesn't work on 2.5 */
+#if defined (PIOCOPENLWP) || defined (UNIXWARE) /* Solaris 2.5: bail out */
+ return 0;
#else
- if (ioctl (pi->ctl_fd, PIOCSENTRY, &pi->saved_entryset.sysset) < 0)
-#endif
- {
- print_sys_errmsg (pi->pathname, errno);
- printf_unfiltered ("PIOCSENTRY failed.\n");
- }
-#ifdef PROCFS_USE_READ_WRITE
- pi->saved_trace.cmd = PCSTRACE;
- if (write (pi->ctl_fd, (char *) &pi->saved_trace,
- sizeof (struct sig_ctl)) < 0)
+ struct {
+ int cmd;
+ char watch[sizeof (prwatch_t)];
+ } arg;
+ prwatch_t *pwatch;
+
+ pwatch = (prwatch_t *) &arg.watch;
+ pwatch->pr_vaddr = addr;
+ pwatch->pr_size = len;
+ pwatch->pr_wflags = wflags;
+#if defined(NEW_PROC_API) && defined (PCWATCH)
+ arg.cmd = PCWATCH;
+ return (write (pi->ctl_fd, &arg, sizeof (arg)) == sizeof (arg));
#else
- if (ioctl (pi->ctl_fd, PIOCSTRACE, &pi->saved_trace.sigset) < 0)
-#endif
- {
- print_sys_errmsg (pi->pathname, errno);
- printf_unfiltered ("PIOCSTRACE failed.\n");
- }
-#ifndef UNIXWARE
- if (ioctl (pi->ctl_fd, PIOCSHOLD, &pi->saved_sighold.sigset) < 0)
- {
- print_sys_errmsg (pi->pathname, errno);
- printf_unfiltered ("PIOSCHOLD failed.\n");
- }
-#endif
-#ifdef PROCFS_USE_READ_WRITE
- pi->saved_fltset.cmd = PCSFAULT;
- if (write (pi->ctl_fd, (char *) &pi->saved_fltset,
- sizeof (struct flt_ctl)) < 0)
+#if defined (PIOCSWATCH)
+ return (ioctl (pi->ctl_fd, PIOCSWATCH, pwatch) >= 0);
#else
- if (ioctl (pi->ctl_fd, PIOCSFAULT, &pi->saved_fltset.fltset) < 0)
+ return 0; /* Fail */
+#endif
#endif
- {
- print_sys_errmsg (pi->pathname, errno);
- printf_unfiltered ("PIOCSFAULT failed.\n");
- }
- if (!procfs_read_status (pi))
- {
- print_sys_errmsg (pi->pathname, errno);
- printf_unfiltered ("procfs_read_status failed.\n");
- }
- else
- {
- if (signal
- || (THE_PR_LWP (pi->prstatus).pr_flags & (PR_STOPPED | PR_ISTOP)))
- {
-#ifdef PROCFS_USE_READ_WRITE
- long cmd;
#endif
-
- if (signal || !pi->was_stopped ||
- query ("Was stopped when attached, make it runnable again? "))
- {
- /* Clear any pending signal if we want to detach without
- a signal. */
- if (signal == 0)
- set_proc_siginfo (pi, signal);
-
- /* Clear any fault that might have stopped it. */
-#ifdef PROCFS_USE_READ_WRITE
- cmd = PCCFAULT;
- if (write (pi->ctl_fd, (char *) &cmd, sizeof (long)) < 0)
-#else
- if (ioctl (pi->ctl_fd, PIOCCFAULT, 0))
#endif
- {
- print_sys_errmsg (pi->pathname, errno);
- printf_unfiltered ("PIOCCFAULT failed.\n");
- }
-
- /* Make it run again when we close it. */
-
- modify_run_on_last_close_flag (pi->ctl_fd, 1);
- }
- }
- }
- close_proc_file (pi);
- }
- attach_flag = 0;
}
-/* emulate wait() as much as possible.
- Wait for child to do something. Return pid of child, or -1 in case
- of error; store status in *OURSTATUS.
-
- Not sure why we can't
- just use wait(), but it seems to have problems when applied to a
- process being controlled with the /proc interface.
-
- We have a race problem here with no obvious solution. We need to let
- the inferior run until it stops on an event of interest, which means
- that we need to use the PIOCWSTOP ioctl. However, we cannot use this
- ioctl if the process is already stopped on something that is not an
- event of interest, or the call will hang indefinitely. Thus we first
- use PIOCSTATUS to see if the process is not stopped. If not, then we
- use PIOCWSTOP. But during the window between the two, if the process
- stops for any reason that is not an event of interest (such as a job
- control signal) then gdb will hang. One possible workaround is to set
- an alarm to wake up every minute of so and check to see if the process
- is still running, and if so, then reissue the PIOCWSTOP. But this is
- a real kludge, so has not been implemented. FIXME: investigate
- alternatives.
-
- FIXME: Investigate why wait() seems to have problems with programs
- being control by /proc routines. */
-static int
-procfs_wait (pid, ourstatus)
- int pid;
- struct target_waitstatus *ourstatus;
-{
- short what;
- short why;
- int statval = 0;
- int checkerr = 0;
- int rtnval = -1;
- struct procinfo *pi;
-
-scan_again:
-
- /* handle all syscall events first, otherwise we might not
- notice a thread was created until too late. */
+/*
+ * Function: proc_iterate_over_mappings
+ *
+ * Given a pointer to a function, call that function once for every
+ * mapped address space in the process. The callback function
+ * receives an open file descriptor for the file corresponding to
+ * that mapped address space (if there is one), and the base address
+ * of the mapped space. Quit when the callback function returns a
+ * nonzero value, or at teh end of the mappings.
+ *
+ * Returns: the first non-zero return value of the callback function,
+ * or zero.
+ */
- for (pi = procinfo_list; pi; pi = pi->next)
- {
- if (!pi->had_event)
- continue;
+/* FIXME: it's probably a waste to cache this FD.
+ It doesn't get called that often... and if I open it
+ every time, I don't need to lseek it. */
+int
+proc_iterate_over_mappings (func)
+ int (*func) PARAMS ((int, CORE_ADDR));
+{
+ struct prmap *map;
+ procinfo *pi;
+ int nmaps = 0, i;
+ int funcstat = 0;
+ int fd, map_fd;
+ char pathname[MAX_PROC_NAME_SIZE];
- if (!(THE_PR_LWP (pi->prstatus).pr_flags & (PR_STOPPED | PR_ISTOP)))
- continue;
+ pi = find_procinfo_or_die (PIDGET (inferior_pid), 0);
- why = THE_PR_LWP (pi->prstatus).pr_why;
- what = THE_PR_LWP (pi->prstatus).pr_what;
- if (why == PR_SYSENTRY || why == PR_SYSEXIT)
- {
- int i;
- int found_handler = 0;
-
- for (i = 0; i < pi->num_syscall_handlers; i++)
- if (pi->syscall_handlers[i].syscall_num == what)
- {
- found_handler = 1;
- pi->saved_rtnval = pi->pid;
- pi->saved_statval = 0;
- if (!pi->syscall_handlers[i].func
- (pi, what, why, &pi->saved_rtnval, &pi->saved_statval))
- pi->had_event = 0;
- break;
- }
+#ifdef NEW_PROC_API
+ /* Open map fd. */
+ sprintf (pathname, "/proc/%d/map", pi->pid);
+ if ((map_fd = open (pathname, O_RDONLY)) < 0)
+ proc_error (pi, "proc_iterate_over_mappings (open)", __LINE__);
- if (!found_handler)
- {
- if (why == PR_SYSENTRY)
- error ("PR_SYSENTRY, unhandled system call %d", what);
- else
- error ("PR_SYSEXIT, unhandled system call %d", what);
- }
- }
- }
+ /* Make sure it gets closed again. */
+ make_cleanup ((make_cleanup_func) close, (void *) map_fd);
- /* find a relevant process with an event */
+ /* Allocate space for mapping (lifetime only for this function). */
+ map = alloca (sizeof (struct prmap));
- for (pi = procinfo_list; pi; pi = pi->next)
- if (pi->had_event && (pid == -1 || pi->pid == pid))
- break;
-
- if (!pi)
+ /* Now read the mappings from the file,
+ open a file descriptor for those that have a name,
+ and call the callback function. */
+ while (read (map_fd,
+ (void *) map,
+ sizeof (struct prmap)) == sizeof (struct prmap))
{
- wait_fd ();
- goto scan_again;
- }
+ char name[MAX_PROC_NAME_SIZE + sizeof (map->pr_mapname)];
- if (!checkerr
- && !(THE_PR_LWP (pi->prstatus).pr_flags & (PR_STOPPED | PR_ISTOP)))
- {
- if (!procfs_write_pcwstop (pi))
- {
- checkerr++;
- }
- }
- if (checkerr)
- {
- if (errno == ENOENT)
+ if (map->pr_vaddr == 0 && map->pr_size == 0)
+ break; /* sanity */
+
+ if (map->pr_mapname[0] == 0)
{
- /* XXX Fixme -- what to do if attached? Can't call wait... */
- rtnval = wait (&statval);
- if ((rtnval) != (PIDGET (inferior_pid)))
- {
- print_sys_errmsg (pi->pathname, errno);
- error ("procfs_wait: wait failed, returned %d", rtnval);
- /* NOTREACHED */
- }
+ fd = -1; /* no map file */
}
else
{
- print_sys_errmsg (pi->pathname, errno);
- error ("PIOCSTATUS or PIOCWSTOP failed.");
- /* NOTREACHED */
+ sprintf (name, "/proc/%d/object/%s", pi->pid, map->pr_mapname);
+ /* Note: caller's responsibility to close this fd! */
+ fd = open (name, O_RDONLY);
+ /* Note: we don't test the above call for failure;
+ we just pass the FD on as given. Sometimes there is
+ no file, so the ioctl may return failure, but that's
+ not a problem. */
}
- }
- else if (THE_PR_LWP (pi->prstatus).pr_flags & (PR_STOPPED | PR_ISTOP))
- {
-#ifdef UNIXWARE
- rtnval = pi->prstatus.pr_pid;
+
+ /* Stop looping if the callback returns non-zero. */
+ if ((funcstat = (*func) (fd, (CORE_ADDR) map->pr_vaddr)) != 0)
+ break;
+ }
#else
- rtnval = pi->pid;
+ /* Get the number of mapping entries. */
+ if (ioctl (pi->ctl_fd, PIOCNMAP, &nmaps) < 0)
+ proc_error (pi, "proc_iterate_over_mappings (PIOCNMAP)", __LINE__);
+
+ /* Allocate space for mappings (lifetime only this function). */
+ map = (struct prmap *) alloca ((nmaps + 1) * sizeof (struct prmap));
+
+ /* Read in all the mappings. */
+ if (ioctl (pi->ctl_fd, PIOCMAP, map) < 0)
+ proc_error (pi, "proc_iterate_over_mappings (PIOCMAP)", __LINE__);
+
+ /* Now loop through the mappings, open an fd for each, and
+ call the callback function. */
+ for (i = 0;
+ i < nmaps && map[i].pr_size != 0;
+ i++)
+ {
+ /* Note: caller's responsibility to close this fd! */
+ fd = ioctl (pi->ctl_fd, PIOCOPENM, &map[i].pr_vaddr);
+ /* Note: we don't test the above call for failure;
+ we just pass the FD on as given. Sometimes there is
+ no file, so the ioctl may return failure, but that's
+ not a problem. */
+
+ /* Stop looping if the callback returns non-zero. */
+ if ((funcstat = (*func) (fd, (CORE_ADDR) map[i].pr_vaddr)) != 0)
+ break;
+ }
#endif
- why = THE_PR_LWP (pi->prstatus).pr_why;
- what = THE_PR_LWP (pi->prstatus).pr_what;
- switch (why)
- {
- case PR_SIGNALLED:
- statval = (what << 8) | 0177;
- break;
- case PR_SYSENTRY:
- case PR_SYSEXIT:
- rtnval = pi->saved_rtnval;
- statval = pi->saved_statval;
- break;
- case PR_REQUESTED:
- statval = (SIGSTOP << 8) | 0177;
- break;
- case PR_JOBCONTROL:
- statval = (what << 8) | 0177;
- break;
- case PR_FAULTED:
- switch (what)
- {
-#ifdef FLTWATCH
- case FLTWATCH:
- statval = (SIGTRAP << 8) | 0177;
- break;
-#endif
-#ifdef FLTKWATCH
- case FLTKWATCH:
- statval = (SIGTRAP << 8) | 0177;
- break;
-#endif
-#ifndef FAULTED_USE_SIGINFO
- /* Irix, contrary to the documentation, fills in 0 for si_signo.
- Solaris fills in si_signo. I'm not sure about others. */
- case FLTPRIV:
- case FLTILL:
- statval = (SIGILL << 8) | 0177;
- break;
- case FLTBPT:
- case FLTTRACE:
- statval = (SIGTRAP << 8) | 0177;
- break;
- case FLTSTACK:
- case FLTACCESS:
- case FLTBOUNDS:
- statval = (SIGSEGV << 8) | 0177;
- break;
- case FLTIOVF:
- case FLTIZDIV:
- case FLTFPE:
- statval = (SIGFPE << 8) | 0177;
- break;
- case FLTPAGE: /* Recoverable page fault */
-#endif /* not FAULTED_USE_SIGINFO */
- default:
- /* Use the signal which the kernel assigns. This is better than
- trying to second-guess it from the fault. In fact, I suspect
- that FLTACCESS can be either SIGSEGV or SIGBUS. */
- statval =
- ((THE_PR_LWP (pi->prstatus).pr_info.si_signo) << 8) | 0177;
- break;
- }
- break;
- default:
- error ("PIOCWSTOP, unknown why %d, what %d", why, what);
- }
- /* Stop all the other threads when any of them stops. */
+ return funcstat;
+}
- {
- struct procinfo *procinfo, *next_pi;
+#ifdef TM_I386SOL2_H /* Is it hokey to use this? */
- for (procinfo = procinfo_list; procinfo; procinfo = next_pi)
- {
- next_pi = procinfo->next;
- if (!procinfo->had_event)
- {
-#ifdef PROCFS_USE_READ_WRITE
- long cmd = PCSTOP;
- if (write (pi->ctl_fd, (char *) &cmd, sizeof (long)) < 0)
- {
- print_sys_errmsg (procinfo->pathname, errno);
- error ("PCSTOP failed");
- }
-#else
- /* A bug in Solaris (2.5) causes us to hang when trying to
- stop a stopped process. So, we have to check first in
- order to avoid the hang. */
- if (!procfs_read_status (procinfo))
- {
- /* The LWP has apparently terminated. */
- if (info_verbose)
- printf_filtered ("LWP %d doesn't respond.\n",
- (procinfo->pid >> 16) & 0xffff);
- close_proc_file (procinfo);
- continue;
- }
+#include <sys/sysi86.h>
- if (!(procinfo->prstatus.pr_flags & PR_STOPPED))
- if (ioctl (procinfo->ctl_fd, PIOCSTOP, &procinfo->prstatus)
- < 0)
- {
- print_sys_errmsg (procinfo->pathname, errno);
- warning ("PIOCSTOP failed");
- }
-#endif
- }
- }
- }
+/*
+ * Function: proc_get_LDT_entry
+ *
+ * Inputs:
+ * procinfo *pi;
+ * int key;
+ *
+ * The 'key' is actually the value of the lower 16 bits of
+ * the GS register for the LWP that we're interested in.
+ *
+ * Return: matching ssh struct (LDT entry).
+ */
+
+struct ssd *
+proc_get_LDT_entry (pi, key)
+ procinfo *pi;
+ int key;
+{
+ static struct ssd *ldt_entry = NULL;
+#ifdef NEW_PROC_API
+ char pathname[MAX_PROC_NAME_SIZE];
+ struct cleanup *old_chain = NULL;
+ int fd;
+
+ /* Allocate space for one LDT entry.
+ This alloc must persist, because we return a pointer to it. */
+ if (ldt_entry == NULL)
+ ldt_entry = (struct ssd *) xmalloc (sizeof (struct ssd));
+
+ /* Open the file descriptor for the LDT table. */
+ sprintf (pathname, "/proc/%d/ldt", pi->pid);
+ if ((fd = open (pathname, O_RDONLY)) < 0)
+ {
+ proc_warn (pi, "proc_get_LDT_entry (open)", __LINE__);
+ return NULL;
}
- else
+ /* Make sure it gets closed again! */
+ old_chain = make_cleanup ((make_cleanup_func) close, (void *) fd);
+
+ /* Now 'read' thru the table, find a match and return it. */
+ while (read (fd, ldt_entry, sizeof (struct ssd)) == sizeof (struct ssd))
{
- error ("PIOCWSTOP, stopped for unknown/unhandled reason, flags %#x",
- THE_PR_LWP (pi->prstatus).pr_flags);
+ if (ldt_entry->sel == 0 &&
+ ldt_entry->bo == 0 &&
+ ldt_entry->acc1 == 0 &&
+ ldt_entry->acc2 == 0)
+ break; /* end of table */
+ /* If key matches, return this entry. */
+ if (ldt_entry->sel == key)
+ return ldt_entry;
}
+ /* Loop ended, match not found. */
+ return NULL;
+#else
+ int nldt, i;
+ static int nalloc = 0;
- store_waitstatus (ourstatus, statval);
+ /* Get the number of LDT entries. */
+ if (ioctl (pi->ctl_fd, PIOCNLDT, &nldt) < 0)
+ {
+ proc_warn (pi, "proc_get_LDT_entry (PIOCNLDT)", __LINE__);
+ return NULL;
+ }
- if (rtnval == -1) /* No more children to wait for */
+ /* Allocate space for the number of LDT entries. */
+ /* This alloc has to persist, 'cause we return a pointer to it. */
+ if (nldt > nalloc)
+ {
+ ldt_entry = (struct ssd *)
+ xrealloc (ldt_entry, (nldt + 1) * sizeof (struct ssd));
+ nalloc = nldt;
+ }
+
+ /* Read the whole table in one gulp. */
+ if (ioctl (pi->ctl_fd, PIOCLDT, ldt_entry) < 0)
{
- warning ("Child process unexpectedly missing");
- /* Claim it exited with unknown signal. */
- ourstatus->kind = TARGET_WAITKIND_SIGNALLED;
- ourstatus->value.sig = TARGET_SIGNAL_UNKNOWN;
- return rtnval;
+ proc_warn (pi, "proc_get_LDT_entry (PIOCLDT)", __LINE__);
+ return NULL;
}
- pi->had_event = 0; /* Indicate that we've seen this one */
- return (rtnval);
-}
+ /* Search the table and return the (first) entry matching 'key'. */
+ for (i = 0; i < nldt; i++)
+ if (ldt_entry[i].sel == key)
+ return &ldt_entry[i];
-/*
+ /* Loop ended, match not found. */
+ return NULL;
+#endif
+}
- LOCAL FUNCTION
+#endif /* TM_I386SOL2_H */
- set_proc_siginfo - set a process's current signal info
+/* =============== END, non-thread part of /proc "MODULE" =============== */
- SYNOPSIS
+/* =================== Thread "MODULE" =================== */
- void set_proc_siginfo (struct procinfo *pip, int signo);
+/* NOTE: you'll see more ifdefs and duplication of functions here,
+ since there is a different way to do threads on every OS. */
- DESCRIPTION
+/*
+ * Function: proc_get_nthreads
+ *
+ * Return the number of threads for the process
+ */
- Given a pointer to a process info struct in PIP and a signal number
- in SIGNO, set the process's current signal and its associated signal
- information. The signal will be delivered to the process immediately
- after execution is resumed, even if it is being held. In addition,
- this particular delivery will not cause another PR_SIGNALLED stop
- even if the signal is being traced.
+#if defined (PIOCNTHR) && defined (PIOCTLIST)
+/*
+ * OSF version
+ */
+int
+proc_get_nthreads (pi)
+ procinfo *pi;
+{
+ int nthreads = 0;
- If we are not delivering the same signal that the prstatus siginfo
- struct contains information about, then synthesize a siginfo struct
- to match the signal we are going to deliver, make it of the type
- "generated by a user process", and send this synthesized copy. When
- used to set the inferior's signal state, this will be required if we
- are not currently stopped because of a traced signal, or if we decide
- to continue with a different signal.
+ if (ioctl (pi->ctl_fd, PIOCNTHR, &nthreads) < 0)
+ proc_warn (pi, "procfs: PIOCNTHR failed", __LINE__);
- Note that when continuing the inferior from a stop due to receipt
- of a traced signal, we either have set PRCSIG to clear the existing
- signal, or we have to call this function to do a PIOCSSIG with either
- the existing siginfo struct from pr_info, or one we have synthesized
- appropriately for the signal we want to deliver. Otherwise if the
- signal is still being traced, the inferior will immediately stop
- again.
+ return nthreads;
+}
- See siginfo(5) for more details.
+#else
+#if defined (SYS_lwpcreate) || defined (SYS_lwp_create) /* FIXME: multiple */
+/*
+ * Solaris and Unixware version
*/
-
-static void
-set_proc_siginfo (pip, signo)
- struct procinfo *pip;
- int signo;
+int
+proc_get_nthreads (pi)
+ procinfo *pi;
{
- struct siginfo newsiginfo;
- struct siginfo *sip;
-#if defined (UNIXWARE) || defined (PROCFS_USE_READ_WRITE)
- struct sigi_ctl sictl;
-#endif
+ if (!pi->status_valid)
+ if (!proc_get_status (pi))
+ return 0;
-#ifdef PROCFS_DONT_PIOCSSIG_CURSIG
- /* With Alpha OSF/1 procfs, the kernel gets really confused if it
- receives a PIOCSSIG with a signal identical to the current signal,
- it messes up the current signal. Work around the kernel bug. */
- if (signo == THE_PR_LWP (pip->prstatus).pr_cursig)
- return;
+ /*
+ * NEW_PROC_API: only works for the process procinfo,
+ * because the LWP procinfos do not get prstatus filled in.
+ */
+#ifdef NEW_PROC_API
+ if (pi->tid != 0) /* find the parent process procinfo */
+ pi = find_procinfo_or_die (pi->pid, 0);
#endif
+ return pi->prstatus.pr_nlwp;
+}
-#ifdef UNIXWARE
- if (signo == THE_PR_LWP (pip->prstatus).pr_info.si_signo)
- {
- memcpy ((char *) &sictl.siginfo, (char *) &pip->prstatus.pr_lwp.pr_info,
- sizeof (siginfo_t));
- }
#else
- if (signo == THE_PR_LWP (pip->prstatus).pr_info.si_signo)
- {
- sip = &pip->prstatus.pr_info;
- }
+/*
+ * Default version
+ */
+int
+proc_get_nthreads (pi)
+ procinfo *pi;
+{
+ return 0;
+}
#endif
- else
- {
-#ifdef UNIXWARE
- siginfo_t *sip = &sictl.siginfo;
- memset ((char *) sip, 0, sizeof (siginfo_t));
-#else
- memset ((char *) &newsiginfo, 0, sizeof (newsiginfo));
- sip = &newsiginfo;
#endif
- sip->si_signo = signo;
- sip->si_code = 0;
- sip->si_errno = 0;
- sip->si_pid = getpid ();
- sip->si_uid = getuid ();
- }
-#ifdef PROCFS_USE_READ_WRITE
- sictl.cmd = PCSSIG;
- if (write (pip->ctl_fd, (char *) &sictl, sizeof (struct sigi_ctl)) < 0)
+
+/*
+ * Function: proc_get_current_thread (LWP version)
+ *
+ * Return the ID of the thread that had an event of interest.
+ * (ie. the one that hit a breakpoint or other traced event).
+ * All other things being equal, this should be the ID of a
+ * thread that is currently executing.
+ */
+
+#if defined (SYS_lwpcreate) || defined (SYS_lwp_create) /* FIXME: multiple */
+/*
+ * Solaris and Unixware version
+ */
+int
+proc_get_current_thread (pi)
+ procinfo *pi;
+{
+ /*
+ * Note: this should be applied to the root procinfo for the process,
+ * not to the procinfo for an LWP. If applied to the procinfo for
+ * an LWP, it will simply return that LWP's ID. In that case,
+ * find the parent process procinfo.
+ */
+
+ if (pi->tid != 0)
+ pi = find_procinfo_or_die (pi->pid, 0);
+
+ if (!pi->status_valid)
+ if (!proc_get_status (pi))
+ return 0;
+
+#ifdef NEW_PROC_API
+ return pi->prstatus.pr_lwp.pr_lwpid;
#else
- if (ioctl (pip->ctl_fd, PIOCSSIG, sip) < 0)
+ return pi->prstatus.pr_who;
#endif
- {
- print_sys_errmsg (pip->pathname, errno);
- warning ("PIOCSSIG failed");
- }
}
-/* Resume execution of process PID. If STEP is nozero, then
- just single step it. If SIGNAL is nonzero, restart it with that
- signal activated. */
-
-static void
-procfs_resume (pid, step, signo)
- int pid;
- int step;
- enum target_signal signo;
+#else
+#if defined (PIOCNTHR) && defined (PIOCTLIST)
+/*
+ * OSF version
+ */
+int
+proc_get_current_thread (pi)
+ procinfo *pi;
{
- int signal_to_pass;
- struct procinfo *pi, *procinfo, *next_pi;
-#if defined (UNIXWARE) || defined (PROCFS_USE_READ_WRITE)
- struct proc_ctl pctl;
+#if 0 /* FIXME: not ready for prime time? */
+ return pi->prstatus.pr_tid;
+#else
+ return 0;
#endif
+}
- pi = find_procinfo (pid == -1 ? inferior_pid : pid, 0);
-
- errno = 0;
-#ifdef UNIXWARE
- pctl.cmd = PCRUN;
- pctl.data = PRCFAULT;
#else
- pi->prrun.pr_flags = PRSTRACE | PRSFAULT | PRCFAULT;
-#endif
+/*
+ * Default version
+ */
+int
+proc_get_current_thread (pi)
+ procinfo *pi;
+{
+ return 0;
+}
-#if 0
- /* It should not be necessary. If the user explicitly changes the value,
- value_assign calls write_register_bytes, which writes it. */
-/* It may not be absolutely necessary to specify the PC value for
- restarting, but to be safe we use the value that gdb considers
- to be current. One case where this might be necessary is if the
- user explicitly changes the PC value that gdb considers to be
- current. FIXME: Investigate if this is necessary or not. */
-
-#ifdef PRSVADDR_BROKEN
-/* Can't do this under Solaris running on a Sparc, as there seems to be no
- place to put nPC. In fact, if you use this, nPC seems to be set to some
- random garbage. We have to rely on the fact that PC and nPC have been
- written previously via PIOCSREG during a register flush. */
-
- pi->prrun.pr_vaddr = (caddr_t) * (int *) &registers[REGISTER_BYTE (PC_REGNUM)];
- pi->prrun.pr_flags != PRSVADDR;
#endif
#endif
- if (signo == TARGET_SIGNAL_STOP && pi->nopass_next_sigstop)
- /* When attaching to a child process, if we forced it to stop with
- a PIOCSTOP, then we will have set the nopass_next_sigstop flag.
- Upon resuming the first time after such a stop, we explicitly
- inhibit sending it another SIGSTOP, which would be the normal
- result of default signal handling. One potential drawback to
- this is that we will also ignore any attempt to by the user
- to explicitly continue after the attach with a SIGSTOP. Ultimately
- this problem should be dealt with by making the routines that
- deal with the inferior a little smarter, and possibly even allow
- an inferior to continue running at the same time as gdb. (FIXME?) */
- signal_to_pass = 0;
- else if (signo == TARGET_SIGNAL_TSTP
- && THE_PR_LWP (pi->prstatus).pr_cursig == SIGTSTP
- && THE_PR_LWP (pi->prstatus).pr_action.sa_handler == SIG_DFL
- )
-
- /* We are about to pass the inferior a SIGTSTP whose action is
- SIG_DFL. The SIG_DFL action for a SIGTSTP is to stop
- (notifying the parent via wait()), and then keep going from the
- same place when the parent is ready for you to keep going. So
- under the debugger, it should do nothing (as if the program had
- been stopped and then later resumed. Under ptrace, this
- happens for us, but under /proc, the system obligingly stops
- the process, and wait_for_inferior would have no way of
- distinguishing that type of stop (which indicates that we
- should just start it again), with a stop due to the pr_trace
- field of the prrun_t struct.
-
- Note that if the SIGTSTP is being caught, we *do* need to pass it,
- because the handler needs to get executed. */
- signal_to_pass = 0;
- else
- signal_to_pass = target_signal_to_host (signo);
+/*
+ * Function: proc_update_threads
+ *
+ * Discover the IDs of all the threads within the process, and
+ * create a procinfo for each of them (chained to the parent).
+ *
+ * This unfortunately requires a different method on every OS.
+ *
+ * Return: non-zero for success, zero for failure.
+ */
- if (signal_to_pass)
- {
- set_proc_siginfo (pi, signal_to_pass);
- }
- else
- {
-#ifdef UNIXWARE
- pctl.data |= PRCSIG;
-#else
- pi->prrun.pr_flags |= PRCSIG;
-#endif
- }
- pi->nopass_next_sigstop = 0;
- if (step)
+int
+proc_delete_dead_threads (parent, thread, ignore)
+ procinfo *parent;
+ procinfo *thread;
+ void *ignore;
+{
+ if (thread && parent) /* sanity */
{
-#ifdef UNIXWARE
- pctl.data |= PRSTEP;
-#else
- pi->prrun.pr_flags |= PRSTEP;
-#endif
+ thread->status_valid = 0;
+ if (!proc_get_status (thread))
+ destroy_one_procinfo (&parent->thread_list, thread);
}
- pi->had_event = 0;
- /* Don't try to start a process unless it's stopped on an
- `event of interest'. Doing so will cause errors. */
+ return 0; /* keep iterating */
+}
- if (!procfs_read_status (pi))
+#if defined (PIOCLSTATUS)
+/*
+ * Solaris 2.5 (ioctl) version
+ */
+int
+proc_update_threads (pi)
+ procinfo *pi;
+{
+ gdb_prstatus_t *prstatus;
+ struct cleanup *old_chain = NULL;
+ procinfo *thread;
+ int nlwp, i;
+
+ /*
+ * We should never have to apply this operation to any procinfo
+ * except the one for the main process. If that ever changes
+ * for any reason, then take out the following clause and
+ * replace it with one that makes sure the ctl_fd is open.
+ */
+
+ if (pi->tid != 0)
+ pi = find_procinfo_or_die (pi->pid, 0);
+
+ proc_iterate_over_threads (pi, proc_delete_dead_threads, NULL);
+
+ if ((nlwp = proc_get_nthreads (pi)) <= 1)
+ return 1; /* Process is not multi-threaded; nothing to do. */
+
+ if ((prstatus = (gdb_prstatus_t *)
+ malloc (sizeof (gdb_prstatus_t) * (nlwp + 1))) == 0)
+ perror_with_name ("procfs: malloc failed in update_threads");
+
+ old_chain = make_cleanup (free, prstatus);
+ if (ioctl (pi->ctl_fd, PIOCLSTATUS, prstatus) < 0)
+ proc_error (pi, "update_threads (PIOCLSTATUS)", __LINE__);
+
+ /* Skip element zero, which represents the process as a whole. */
+ for (i = 1; i < nlwp + 1; i++)
{
- /* The LWP has apparently terminated. */
- if (info_verbose)
- printf_filtered ("LWP %d doesn't respond.\n",
- (pi->pid >> 16) & 0xffff);
- close_proc_file (pi);
+ if ((thread = create_procinfo (pi->pid, prstatus[i].pr_who)) == NULL)
+ proc_error (pi, "update_threads, create_procinfo", __LINE__);
+
+ memcpy (&thread->prstatus, &prstatus[i], sizeof (*prstatus));
+ thread->status_valid = 1;
}
- else
- {
-#ifdef PROCFS_USE_READ_WRITE
- if (write (pi->ctl_fd, (char *) &pctl, sizeof (struct proc_ctl)) < 0)
+ pi->threads_valid = 1;
+ do_cleanups (old_chain);
+ return 1;
+}
#else
- if ((pi->prstatus.pr_flags & PR_ISTOP)
- && ioctl (pi->ctl_fd, PIOCRUN, &pi->prrun) != 0)
-#endif
- {
- /* The LWP has apparently terminated. */
- if (info_verbose)
- printf_filtered ("LWP %d doesn't respond.\n",
- (pi->pid >> 16) & 0xffff);
- close_proc_file (pi);
- }
- }
-
- /* Continue all the other threads that haven't had an event of interest.
- Also continue them if they have NOPASS_NEXT_SIGSTOP set; this is only
- set by do_attach, and means this is the first resume after an attach.
- All threads were CSTOP'd by do_attach, and should be resumed now. */
-
- if (pid == -1)
- for (procinfo = procinfo_list; procinfo; procinfo = next_pi)
+#ifdef NEW_PROC_API
+/*
+ * Unixware and Solaris 6 (and later) version
+ */
+int
+proc_update_threads (pi)
+ procinfo *pi;
+{
+ char pathname[MAX_PROC_NAME_SIZE + 16];
+ struct dirent *direntry;
+ struct cleanup *old_chain = NULL;
+ procinfo *thread;
+ DIR *dirp;
+ int lwpid;
+
+ /*
+ * We should never have to apply this operation to any procinfo
+ * except the one for the main process. If that ever changes
+ * for any reason, then take out the following clause and
+ * replace it with one that makes sure the ctl_fd is open.
+ */
+
+ if (pi->tid != 0)
+ pi = find_procinfo_or_die (pi->pid, 0);
+
+ proc_iterate_over_threads (pi, proc_delete_dead_threads, NULL);
+
+ /*
+ * Unixware
+ *
+ * Note: this brute-force method is the only way I know of
+ * to accomplish this task on Unixware. This method will
+ * also work on Solaris 2.6 and 2.7. There is a much simpler
+ * and more elegant way to do this on Solaris, but the margins
+ * of this manuscript are too small to write it here... ;-)
+ */
+
+ strcpy (pathname, pi->pathname);
+ strcat (pathname, "/lwp");
+ if ((dirp = opendir (pathname)) == NULL)
+ proc_error (pi, "update_threads, opendir", __LINE__);
+
+ old_chain = make_cleanup ((make_cleanup_func) closedir, dirp);
+ while ((direntry = readdir (dirp)) != NULL)
+ if (direntry->d_name[0] != '.') /* skip '.' and '..' */
{
- next_pi = procinfo->next;
- if (pi != procinfo)
- if (!procinfo->had_event ||
- (procinfo->nopass_next_sigstop && signo == TARGET_SIGNAL_STOP))
- {
- procinfo->had_event = procinfo->nopass_next_sigstop = 0;
-#ifdef PROCFS_USE_READ_WRITE
- pctl.data = PRCFAULT | PRCSIG;
- if (write (procinfo->ctl_fd, (char *) &pctl,
- sizeof (struct proc_ctl)) < 0)
- {
- if (!procfs_read_status (procinfo))
- fprintf_unfiltered (gdb_stderr,
- "procfs_read_status failed, errno=%d\n",
- errno);
- print_sys_errmsg (procinfo->pathname, errno);
- error ("PCRUN failed");
- }
-#else
- procinfo->prrun.pr_flags &= PRSTEP;
- procinfo->prrun.pr_flags |= PRCFAULT | PRCSIG;
- if (!procfs_read_status (procinfo))
- {
- /* The LWP has apparently terminated. */
- if (info_verbose)
- printf_filtered ("LWP %d doesn't respond.\n",
- (procinfo->pid >> 16) & 0xffff);
- close_proc_file (procinfo);
- continue;
- }
-
- /* Don't try to start a process unless it's stopped on an
- `event of interest'. Doing so will cause errors. */
-
- if ((procinfo->prstatus.pr_flags & PR_ISTOP)
- && ioctl (procinfo->ctl_fd, PIOCRUN, &procinfo->prrun) < 0)
- {
- if (!procfs_read_status (procinfo))
- fprintf_unfiltered (gdb_stderr,
- "procfs_read_status failed, errno=%d\n",
- errno);
- print_sys_errmsg (procinfo->pathname, errno);
- warning ("PIOCRUN failed");
- }
-#endif
- }
- procfs_read_status (procinfo);
+ lwpid = atoi (&direntry->d_name[0]);
+ if ((thread = create_procinfo (pi->pid, lwpid)) == NULL)
+ proc_error (pi, "update_threads, create_procinfo", __LINE__);
}
+ pi->threads_valid = 1;
+ do_cleanups (old_chain);
+ return 1;
}
-
+#else
+#ifdef PIOCTLIST
/*
-
- LOCAL FUNCTION
-
- procfs_fetch_registers -- fetch current registers from inferior
-
- SYNOPSIS
-
- void procfs_fetch_registers (int regno)
-
- DESCRIPTION
-
- Read the current values of the inferior's registers, both the
- general register set and floating point registers (if supported)
- and update gdb's idea of their current values.
-
+ * OSF version
*/
-
-static void
-procfs_fetch_registers (regno)
- int regno;
+int
+proc_update_threads (pi)
+ procinfo *pi;
{
- struct procinfo *pi;
-
- pi = current_procinfo;
-
-#ifdef UNIXWARE
- if (procfs_read_status (pi))
- {
- supply_gregset (&pi->prstatus.pr_lwp.pr_context.uc_mcontext.gregs);
-#if defined (FP0_REGNUM)
- supply_fpregset (&pi->prstatus.pr_lwp.pr_context.uc_mcontext.fpregs);
-#endif
- }
-#else /* UNIXWARE */
- if (ioctl (pi->ctl_fd, PIOCGREG, &pi->gregset.gregset) != -1)
+ int nthreads, i;
+ tid_t *threads;
+
+ /*
+ * We should never have to apply this operation to any procinfo
+ * except the one for the main process. If that ever changes
+ * for any reason, then take out the following clause and
+ * replace it with one that makes sure the ctl_fd is open.
+ */
+
+ if (pi->tid != 0)
+ pi = find_procinfo_or_die (pi->pid, 0);
+
+ proc_iterate_over_threads (pi, proc_delete_dead_threads, NULL);
+
+ nthreads = proc_get_nthreads (pi);
+ if (nthreads < 2)
+ return 0; /* nothing to do for 1 or fewer threads */
+
+ if ((threads = malloc (nthreads * sizeof (tid_t))) == NULL)
+ proc_error (pi, "update_threads, malloc", __LINE__);
+
+ if (ioctl (pi->ctl_fd, PIOCTLIST, threads) < 0)
+ proc_error (pi, "procfs: update_threads (PIOCTLIST)", __LINE__);
+
+ for (i = 0; i < nthreads; i++)
{
- supply_gregset (&pi->gregset.gregset);
+ if (!find_procinfo (pi->pid, threads[i]))
+ if (!create_procinfo (pi->pid, threads[i]))
+ proc_error (pi, "update_threads, create_procinfo", __LINE__);
}
-#if defined (FP0_REGNUM)
- if (ioctl (pi->ctl_fd, PIOCGFPREG, &pi->fpregset.fpregset) != -1)
- {
- supply_fpregset (&pi->fpregset.fpregset);
- }
-#endif
-#endif /* UNIXWARE */
+ pi->threads_valid = 1;
+ return 1;
}
-
+#else
/*
-
- LOCAL FUNCTION
-
- proc_init_failed - called when /proc access initialization fails
- fails
-
- SYNOPSIS
-
- static void proc_init_failed (struct procinfo *pi,
- char *why, int kill_p)
-
- DESCRIPTION
-
- This function is called whenever initialization of access to a /proc
- entry fails. It prints a suitable error message, does some cleanup,
- and then invokes the standard error processing routine which dumps
- us back into the command loop. If KILL_P is true, sends SIGKILL.
+ * Default version
*/
-
-static void
-proc_init_failed (pi, why, kill_p)
- struct procinfo *pi;
- char *why;
- int kill_p;
+int
+proc_update_threads (pi)
+ procinfo *pi;
{
- print_sys_errmsg (pi->pathname, errno);
- if (kill_p)
- kill (pi->pid, SIGKILL);
- close_proc_file (pi);
- error (why);
- /* NOTREACHED */
+ return 0;
}
+#endif /* OSF PIOCTLIST */
+#endif /* NEW_PROC_API */
+#endif /* SOL 2.5 PIOCLSTATUS */
/*
-
- LOCAL FUNCTION
-
- close_proc_file - close any currently open /proc entry
-
- SYNOPSIS
-
- static void close_proc_file (struct procinfo *pip)
-
- DESCRIPTION
-
- Close any currently open /proc entry and mark the process information
- entry as invalid. In order to ensure that we don't try to reuse any
- stale information, the pid, fd, and pathnames are explicitly
- invalidated, which may be overkill.
-
+ * Function: proc_iterate_over_threads
+ *
+ * Description:
+ * Given a pointer to a function, call that function once
+ * for each lwp in the procinfo list, until the function
+ * returns non-zero, in which event return the value
+ * returned by the function.
+ *
+ * Note: this function does NOT call update_threads.
+ * If you want to discover new threads first, you must
+ * call that function explicitly. This function just makes
+ * a quick pass over the currently-known procinfos.
+ *
+ * Arguments:
+ * pi - parent process procinfo
+ * func - per-thread function
+ * ptr - opaque parameter for function.
+ *
+ * Return:
+ * First non-zero return value from the callee, or zero.
*/
-static void
-close_proc_file (pip)
- struct procinfo *pip;
+int
+proc_iterate_over_threads (pi, func, ptr)
+ procinfo *pi;
+ int (*func) PARAMS ((procinfo *, procinfo *, void *));
+ void *ptr;
{
- struct procinfo *procinfo;
-
- delete_thread (pip->pid); /* remove thread from GDB's thread list */
- remove_fd (pip); /* Remove fd from poll/select list */
-
- close (pip->ctl_fd);
-#ifdef HAVE_MULTIPLE_PROC_FDS
- close (pip->as_fd);
- close (pip->status_fd);
- close (pip->map_fd);
-#endif
-
- free (pip->pathname);
-
- /* Unlink pip from the procinfo chain. Note pip might not be on the list. */
+ procinfo *thread, *next;
+ int retval = 0;
- if (procinfo_list == pip)
- procinfo_list = pip->next;
- else
+ /*
+ * We should never have to apply this operation to any procinfo
+ * except the one for the main process. If that ever changes
+ * for any reason, then take out the following clause and
+ * replace it with one that makes sure the ctl_fd is open.
+ */
+
+ if (pi->tid != 0)
+ pi = find_procinfo_or_die (pi->pid, 0);
+
+ for (thread = pi->thread_list; thread != NULL; thread = next)
{
- for (procinfo = procinfo_list; procinfo; procinfo = procinfo->next)
- {
- if (procinfo->next == pip)
- {
- procinfo->next = pip->next;
- break;
- }
- }
- free (pip);
+ next = thread->next; /* in case thread is destroyed */
+ if ((retval = (*func) (pi, thread, ptr)) != 0)
+ break;
}
-}
-
-static void
-close_proc_file_cleanup (pip)
- void *pip;
-{
- close_proc_file ((struct procinfo *) pip);
-}
-static struct cleanup *
-make_cleanup_close_proc_file (pip)
- struct procinfo *pip;
-{
- return make_cleanup (close_proc_file_cleanup, pip);
+ return retval;
}
-/*
+/* =================== END, Thread "MODULE" =================== */
- LOCAL FUNCTION
+/* =================== END, /proc "MODULE" =================== */
- open_proc_file - open a /proc entry for a given process id
+/* =================== GDB "MODULE" =================== */
- SYNOPSIS
-
- static int open_proc_file (int pid, struct procinfo *pip, int mode)
-
- DESCRIPTION
-
- Given a process id and a mode, close the existing open /proc
- entry (if any) and open one for the new process id, in the
- specified mode. Once it is open, then mark the local process
- information structure as valid, which guarantees that the pid,
- fd, and pathname fields match an open /proc entry. Returns
- zero if the open fails, nonzero otherwise.
+/*
+ * Here are all of the gdb target vector functions and their friends.
+ */
- Note that the pathname is left intact, even when the open fails,
- so that callers can use it to construct meaningful error messages
- rather than just "file open failed".
+static int do_attach PARAMS ((int pid));
+static void do_detach PARAMS ((int signo));
+static int register_gdb_signals PARAMS ((procinfo *, sigset_t *));
- Note that for Solaris, the process-id also includes an LWP-id, so we
- actually attempt to open that. If we are handed a pid with a 0 LWP-id,
- then we will ask the kernel what it is and add it to the pid. Hence,
- the pid can be changed by us.
+/*
+ * Function: procfs_debug_inferior
+ *
+ * Sets up the inferior to be debugged.
+ * Registers to trace signals, hardware faults, and syscalls.
+ * Note: does not set RLC flag: caller may want to customize that.
+ *
+ * Returns: zero for success (note! unlike most functions in this module)
+ * On failure, returns the LINE NUMBER where it failed!
*/
static int
-open_proc_file (pid, pip, mode, control)
- int pid;
- struct procinfo *pip;
- int mode;
- int control;
+procfs_debug_inferior (pi)
+ procinfo *pi;
{
- int tmp, tmpfd;
-
- pip->next = NULL;
- pip->had_event = 0;
- pip->pathname = xmalloc (MAX_PROC_NAME_SIZE);
- pip->pid = pid;
+ fltset_t traced_faults;
+ sigset_t traced_signals;
+ sysset_t traced_syscall_entries;
+ sysset_t traced_syscall_exits;
-#ifndef PIOCOPENLWP
- tmp = pid;
+#ifdef PROCFS_DONT_TRACE_FAULTS
+ /* On some systems (OSF), we don't trace hardware faults.
+ Apparently it's enough that we catch them as signals.
+ Wonder why we don't just do that in general? */
+ premptyset (&traced_faults); /* don't trace faults. */
#else
- tmp = pid & 0xffff;
+ /* Register to trace hardware faults in the child. */
+ prfillset (&traced_faults); /* trace all faults... */
+ prdelset (&traced_faults, FLTPAGE); /* except page fault. */
#endif
+ if (!proc_set_traced_faults (pi, &traced_faults))
+ return __LINE__;
-#ifdef HAVE_MULTIPLE_PROC_FDS
- sprintf (pip->pathname, STATUS_PROC_NAME_FMT, tmp);
- if ((pip->status_fd = open (pip->pathname, O_RDONLY)) < 0)
- {
- return 0;
- }
-
- sprintf (pip->pathname, AS_PROC_NAME_FMT, tmp);
- if ((pip->as_fd = open (pip->pathname, O_RDWR)) < 0)
- {
- close (pip->status_fd);
- return 0;
- }
-
- sprintf (pip->pathname, MAP_PROC_NAME_FMT, tmp);
- if ((pip->map_fd = open (pip->pathname, O_RDONLY)) < 0)
- {
- close (pip->status_fd);
- close (pip->as_fd);
- return 0;
- }
+ /* Register to trace selected signals in the child. */
+ premptyset (&traced_signals);
+ if (!register_gdb_signals (pi, &traced_signals))
+ return __LINE__;
- if (control)
- {
- sprintf (pip->pathname, CTL_PROC_NAME_FMT, tmp);
- if ((pip->ctl_fd = open (pip->pathname, O_WRONLY)) < 0)
- {
- close (pip->status_fd);
- close (pip->as_fd);
- close (pip->map_fd);
- return 0;
- }
- }
+ /* Register to trace the 'exit' system call (on entry). */
+ premptyset (&traced_syscall_entries);
+ praddset (&traced_syscall_entries, SYS_exit);
+#ifdef SYS_lwpexit
+ praddset (&traced_syscall_entries, SYS_lwpexit); /* And _lwp_exit... */
+#endif
+#ifdef SYS_lwp_exit
+ praddset (&traced_syscall_entries, SYS_lwp_exit);
+#endif
-#else /* HAVE_MULTIPLE_PROC_FDS */
- sprintf (pip->pathname, CTL_PROC_NAME_FMT, tmp);
+ if (!proc_set_traced_sysentry (pi, &traced_syscall_entries))
+ return __LINE__;
- if ((tmpfd = open (pip->pathname, mode)) < 0)
- return 0;
+#ifdef PRFS_STOPEXEC /* defined on OSF */
+ /* OSF method for tracing exec syscalls. Quoting:
+ Under Alpha OSF/1 we have to use a PIOCSSPCACT ioctl to trace
+ exits from exec system calls because of the user level loader. */
+ /* FIXME: make nice and maybe move into an access function. */
+ {
+ int prfs_flags;
-#ifndef PIOCOPENLWP
- pip->ctl_fd = tmpfd;
- pip->as_fd = tmpfd;
- pip->map_fd = tmpfd;
- pip->status_fd = tmpfd;
-#else
- tmp = (pid >> 16) & 0xffff; /* Extract thread id */
+ if (ioctl (pi->ctl_fd, PIOCGSPCACT, &prfs_flags) < 0)
+ return __LINE__;
- if (tmp == 0)
- { /* Don't know thread id yet */
- if (ioctl (tmpfd, PIOCSTATUS, &pip->prstatus) < 0)
- {
- print_sys_errmsg (pip->pathname, errno);
- close (tmpfd);
- error ("open_proc_file: PIOCSTATUS failed");
- }
+ prfs_flags |= PRFS_STOPEXEC;
- tmp = pip->prstatus.pr_who; /* Get thread id from prstatus_t */
- pip->pid = (tmp << 16) | pid; /* Update pip */
- }
+ if (ioctl (pi->ctl_fd, PIOCSSPCACT, &prfs_flags) < 0)
+ return __LINE__;
+ }
+#else /* not PRFS_STOPEXEC */
+ /* Everyone else's (except OSF) method for tracing exec syscalls */
+ /* GW: Rationale...
+ Not all systems with /proc have all the exec* syscalls with the same
+ names. On the SGI, for example, there is no SYS_exec, but there
+ *is* a SYS_execv. So, we try to account for that. */
- if ((pip->ctl_fd = ioctl (tmpfd, PIOCOPENLWP, &tmp)) < 0)
- {
- close (tmpfd);
- return 0;
- }
+ premptyset (&traced_syscall_exits);
+#ifdef SYS_exec
+ praddset (&traced_syscall_exits, SYS_exec);
+#endif
+#ifdef SYS_execve
+ praddset (&traced_syscall_exits, SYS_execve);
+#endif
+#ifdef SYS_execv
+ praddset (&traced_syscall_exits, SYS_execv);
+#endif
-#ifdef PIOCSET /* New method */
- {
- long pr_flags;
- pr_flags = PR_ASYNC;
- ioctl (pip->ctl_fd, PIOCSET, &pr_flags);
- }
+#ifdef SYS_lwpcreate
+ praddset (&traced_syscall_exits, SYS_lwpcreate);
+ praddset (&traced_syscall_exits, SYS_lwpexit);
#endif
- /* keep extra fds in sync */
- pip->as_fd = pip->ctl_fd;
- pip->map_fd = pip->ctl_fd;
- pip->status_fd = pip->ctl_fd;
+#ifdef SYS_lwp_create /* FIXME: once only, please */
+ praddset (&traced_syscall_exits, SYS_lwp_create);
+ praddset (&traced_syscall_exits, SYS_lwp_exit);
+#endif
- close (tmpfd); /* All done with main pid */
-#endif /* PIOCOPENLWP */
-#endif /* HAVE_MULTIPLE_PROC_FDS */
+ if (!proc_set_traced_sysexit (pi, &traced_syscall_exits))
+ return __LINE__;
- return 1;
+#endif /* PRFS_STOPEXEC */
+ return 0;
}
-static char *
-mappingflags (flags)
- long flags;
+static void
+procfs_attach (args, from_tty)
+ char *args;
+ int from_tty;
{
- static char asciiflags[8];
+ char *exec_file;
+ int pid;
- strcpy (asciiflags, "-------");
-#if defined (MA_PHYS)
- if (flags & MA_PHYS)
- asciiflags[0] = 'd';
-#endif
- if (flags & MA_STACK)
- asciiflags[1] = 's';
- if (flags & MA_BREAK)
- asciiflags[2] = 'b';
- if (flags & MA_SHARED)
- asciiflags[3] = 's';
- if (flags & MA_READ)
- asciiflags[4] = 'r';
- if (flags & MA_WRITE)
- asciiflags[5] = 'w';
- if (flags & MA_EXEC)
- asciiflags[6] = 'x';
- return (asciiflags);
-}
+ if (!args)
+ error_no_arg ("process-id to attach");
-static void
-info_proc_flags (pip, summary)
- struct procinfo *pip;
- int summary;
-{
- struct trans *transp;
-#ifdef UNIXWARE
- long flags = pip->prstatus.pr_flags | pip->prstatus.pr_lwp.pr_flags;
-#else
- long flags = pip->prstatus.pr_flags;
-#endif
+ pid = atoi (args);
+ if (pid == getpid ())
+ error ("Attaching GDB to itself is not a good idea...");
- printf_filtered ("%-32s", "Process status flags:");
- if (!summary)
- {
- printf_filtered ("\n\n");
- }
- for (transp = pr_flag_table; transp->name != NULL; transp++)
+ if (from_tty)
{
- if (flags & transp->value)
- {
- if (summary)
- {
- printf_filtered ("%s ", transp->name);
- }
- else
- {
- printf_filtered ("\t%-16s %s.\n", transp->name, transp->desc);
- }
- }
+ exec_file = get_exec_file (0);
+
+ if (exec_file)
+ printf_filtered ("Attaching to program `%s', %s\n",
+ exec_file, target_pid_to_str (pid));
+ else
+ printf_filtered ("Attaching to %s\n", target_pid_to_str (pid));
+
+ fflush (stdout);
}
- printf_filtered ("\n");
+ inferior_pid = do_attach (pid);
+ push_target (&procfs_ops);
}
-static void
-info_proc_stop (pip, summary)
- struct procinfo *pip;
- int summary;
+static void
+procfs_detach (args, from_tty)
+ char *args;
+ int from_tty;
{
- struct trans *transp;
- int why;
- int what;
-
- why = THE_PR_LWP (pip->prstatus).pr_why;
- what = THE_PR_LWP (pip->prstatus).pr_what;
+ char *exec_file;
+ int signo = 0;
- if (THE_PR_LWP (pip->prstatus).pr_flags & PR_STOPPED)
+ if (from_tty)
{
- printf_filtered ("%-32s", "Reason for stopping:");
- if (!summary)
- {
- printf_filtered ("\n\n");
- }
- for (transp = pr_why_table; transp->name != NULL; transp++)
- {
- if (why == transp->value)
- {
- if (summary)
- {
- printf_filtered ("%s ", transp->name);
- }
- else
- {
- printf_filtered ("\t%-16s %s.\n",
- transp->name, transp->desc);
- }
- break;
- }
- }
-
- /* Use the pr_why field to determine what the pr_what field means, and
- print more information. */
-
- switch (why)
- {
- case PR_REQUESTED:
- /* pr_what is unused for this case */
- break;
- case PR_JOBCONTROL:
- case PR_SIGNALLED:
- if (summary)
- {
- printf_filtered ("%s ", signalname (what));
- }
- else
- {
- printf_filtered ("\t%-16s %s.\n", signalname (what),
- safe_strsignal (what));
- }
- break;
- case PR_SYSENTRY:
- if (summary)
- {
- printf_filtered ("%s ", syscallname (what));
- }
- else
- {
- printf_filtered ("\t%-16s %s.\n", syscallname (what),
- "Entered this system call");
- }
- break;
- case PR_SYSEXIT:
- if (summary)
- {
- printf_filtered ("%s ", syscallname (what));
- }
- else
- {
- printf_filtered ("\t%-16s %s.\n", syscallname (what),
- "Returned from this system call");
- }
- break;
- case PR_FAULTED:
- if (summary)
- {
- printf_filtered ("%s ",
- lookupname (faults_table, what, "fault"));
- }
- else
- {
- printf_filtered ("\t%-16s %s.\n",
- lookupname (faults_table, what, "fault"),
- lookupdesc (faults_table, what));
- }
- break;
- }
- printf_filtered ("\n");
+ exec_file = get_exec_file (0);
+ if (exec_file == 0)
+ exec_file = "";
+ printf_filtered ("Detaching from program: %s %s\n",
+ exec_file, target_pid_to_str (inferior_pid));
+ fflush (stdout);
}
+ if (args)
+ signo = atoi (args);
+
+ do_detach (signo);
+ inferior_pid = 0;
+ unpush_target (&procfs_ops); /* Pop out of handling an inferior */
}
-static void
-info_proc_siginfo (pip, summary)
- struct procinfo *pip;
- int summary;
+static int
+do_attach (pid)
+ int pid;
{
- struct siginfo *sip;
+ procinfo *pi;
+ int fail;
- if ((THE_PR_LWP (pip->prstatus).pr_flags & PR_STOPPED) &&
- (THE_PR_LWP (pip->prstatus).pr_why == PR_SIGNALLED ||
- THE_PR_LWP (pip->prstatus).pr_why == PR_FAULTED))
+ if ((pi = create_procinfo (pid, 0)) == NULL)
+ perror ("procfs: out of memory in 'attach'");
+
+ if (!open_procinfo_files (pi, FD_CTL))
{
- printf_filtered ("%-32s", "Additional signal/fault info:");
- sip = &(THE_PR_LWP (pip->prstatus).pr_info);
- if (summary)
- {
- printf_filtered ("%s ", signalname (sip->si_signo));
- if (sip->si_errno > 0)
- {
- printf_filtered ("%s ", errnoname (sip->si_errno));
- }
- if (sip->si_code <= 0)
- {
- printf_filtered ("sent by %s, uid %d ",
- target_pid_to_str (sip->si_pid),
- sip->si_uid);
- }
- else
- {
- printf_filtered ("%s ", sigcodename (sip));
- if ((sip->si_signo == SIGILL) ||
- (sip->si_signo == SIGFPE) ||
- (sip->si_signo == SIGSEGV) ||
- (sip->si_signo == SIGBUS))
- {
- printf_filtered ("addr=%#lx ",
- (unsigned long) sip->si_addr);
- }
- else if ((sip->si_signo == SIGCHLD))
- {
- printf_filtered ("child %s, status %u ",
- target_pid_to_str (sip->si_pid),
- sip->si_status);
- }
- else if ((sip->si_signo == SIGPOLL))
- {
- printf_filtered ("band %u ", sip->si_band);
- }
- }
- }
- else
- {
- printf_filtered ("\n\n");
- printf_filtered ("\t%-16s %s.\n", signalname (sip->si_signo),
- safe_strsignal (sip->si_signo));
- if (sip->si_errno > 0)
- {
- printf_filtered ("\t%-16s %s.\n",
- errnoname (sip->si_errno),
- safe_strerror (sip->si_errno));
- }
- if (sip->si_code <= 0)
- {
- printf_filtered ("\t%-16u %s\n", sip->si_pid, /* XXX need target_pid_to_str() */
- "PID of process sending signal");
- printf_filtered ("\t%-16u %s\n", sip->si_uid,
- "UID of process sending signal");
- }
- else
- {
- printf_filtered ("\t%-16s %s.\n", sigcodename (sip),
- sigcodedesc (sip));
- if ((sip->si_signo == SIGILL) ||
- (sip->si_signo == SIGFPE))
- {
- printf_filtered ("\t%#-16lx %s.\n",
- (unsigned long) sip->si_addr,
- "Address of faulting instruction");
- }
- else if ((sip->si_signo == SIGSEGV) ||
- (sip->si_signo == SIGBUS))
- {
- printf_filtered ("\t%#-16lx %s.\n",
- (unsigned long) sip->si_addr,
- "Address of faulting memory reference");
- }
- else if ((sip->si_signo == SIGCHLD))
- {
- printf_filtered ("\t%-16u %s.\n", sip->si_pid, /* XXX need target_pid_to_str() */
- "Child process ID");
- printf_filtered ("\t%-16u %s.\n", sip->si_status,
- "Child process exit value or signal");
- }
- else if ((sip->si_signo == SIGPOLL))
- {
- printf_filtered ("\t%-16u %s.\n", sip->si_band,
- "Band event for POLL_{IN,OUT,MSG}");
- }
- }
- }
- printf_filtered ("\n");
+ fprintf_filtered (gdb_stderr, "procfs:%d -- ", __LINE__);
+ sprintf (errmsg, "do_attach: couldn't open /proc file for process %d",
+ pid);
+ dead_procinfo (pi, errmsg, NOKILL);
+ }
+
+ /* Stop the process (if it isn't already stopped). */
+ if (proc_flags (pi) & (PR_STOPPED | PR_ISTOP))
+ {
+ pi->was_stopped = 1;
+ proc_prettyprint_why (proc_why (pi), proc_what (pi), 1);
}
+ else
+ {
+ pi->was_stopped = 0;
+ /* Set the process to run again when we close it. */
+ if (!proc_set_run_on_last_close (pi))
+ dead_procinfo (pi, "do_attach: couldn't set RLC.", NOKILL);
+
+ /* Now stop the process. */
+ if (!proc_stop_process (pi))
+ dead_procinfo (pi, "do_attach: couldn't stop the process.", NOKILL);
+ pi->ignore_next_sigstop = 1;
+ }
+ /* Save some of the /proc state to be restored if we detach. */
+ if (!proc_get_traced_faults (pi, &pi->saved_fltset))
+ dead_procinfo (pi, "do_attach: couldn't save traced faults.", NOKILL);
+ if (!proc_get_traced_signals (pi, &pi->saved_sigset))
+ dead_procinfo (pi, "do_attach: couldn't save traced signals.", NOKILL);
+ if (!proc_get_traced_sysentry (pi, &pi->saved_entryset))
+ dead_procinfo (pi, "do_attach: couldn't save traced syscall entries.",
+ NOKILL);
+ if (!proc_get_traced_sysexit (pi, &pi->saved_exitset))
+ dead_procinfo (pi, "do_attach: couldn't save traced syscall exits.",
+ NOKILL);
+ if (!proc_get_held_signals (pi, &pi->saved_sighold))
+ dead_procinfo (pi, "do_attach: couldn't save held signals.", NOKILL);
+
+ if ((fail = procfs_debug_inferior (pi)) != 0)
+ dead_procinfo (pi, "do_attach: failed in procfs_debug_inferior", NOKILL);
+
+ /* Let GDB know that the inferior was attached. */
+ attach_flag = 1;
+ return MERGEPID (pi->pid, proc_get_current_thread (pi));
}
static void
-info_proc_syscalls (pip, summary)
- struct procinfo *pip;
- int summary;
+do_detach (signo)
+ int signo;
{
- int syscallnum;
+ procinfo *pi;
+ long pflags;
- if (!summary)
- {
+ /* Find procinfo for the main process */
+ pi = find_procinfo_or_die (PIDGET (inferior_pid), 0); /* FIXME: threads */
+ if (signo)
+ if (!proc_set_current_signal (pi, signo))
+ proc_warn (pi, "do_detach, set_current_signal", __LINE__);
-#if 0 /* FIXME: Needs to use gdb-wide configured info about system calls. */
- if (pip->prstatus.pr_flags & PR_ASLEEP)
- {
- int syscallnum = pip->prstatus.pr_reg[R_D0];
- if (summary)
- {
- printf_filtered ("%-32s", "Sleeping in system call:");
- printf_filtered ("%s", syscallname (syscallnum));
- }
- else
- {
- printf_filtered ("Sleeping in system call '%s'.\n",
- syscallname (syscallnum));
- }
- }
-#endif
+ if (!proc_set_traced_signals (pi, &pi->saved_sigset))
+ proc_warn (pi, "do_detach, set_traced_signal", __LINE__);
-#ifndef UNIXWARE
- if (ioctl (pip->ctl_fd, PIOCGENTRY, &pip->entryset) < 0)
- {
- print_sys_errmsg (pip->pathname, errno);
- error ("PIOCGENTRY failed");
- }
+ if (!proc_set_traced_faults (pi, &pi->saved_fltset))
+ proc_warn (pi, "do_detach, set_traced_faults", __LINE__);
- if (ioctl (pip->ctl_fd, PIOCGEXIT, &pip->exitset) < 0)
- {
- print_sys_errmsg (pip->pathname, errno);
- error ("PIOCGEXIT failed");
- }
-#endif
+ if (!proc_set_traced_sysentry (pi, &pi->saved_entryset))
+ proc_warn (pi, "do_detach, set_traced_sysentry", __LINE__);
- printf_filtered ("System call tracing information:\n\n");
+ if (!proc_set_traced_sysexit (pi, &pi->saved_exitset))
+ proc_warn (pi, "do_detach, set_traced_sysexit", __LINE__);
- printf_filtered ("\t%-12s %-8s %-8s\n",
- "System call",
- "Entry",
- "Exit");
- for (syscallnum = 0; syscallnum < MAX_SYSCALLS; syscallnum++)
- {
- QUIT;
- if (syscall_table[syscallnum] != NULL)
- printf_filtered ("\t%-12s ", syscall_table[syscallnum]);
- else
- printf_filtered ("\t%-12d ", syscallnum);
+ if (!proc_set_held_signals (pi, &pi->saved_sighold))
+ proc_warn (pi, "do_detach, set_held_signals", __LINE__);
-#ifdef UNIXWARE
- printf_filtered ("%-8s ",
- prismember (&pip->prstatus.pr_sysentry, syscallnum)
- ? "on" : "off");
- printf_filtered ("%-8s ",
- prismember (&pip->prstatus.pr_sysexit, syscallnum)
- ? "on" : "off");
-#else
- printf_filtered ("%-8s ",
- prismember (&pip->entryset, syscallnum)
- ? "on" : "off");
- printf_filtered ("%-8s ",
- prismember (&pip->exitset, syscallnum)
- ? "on" : "off");
-#endif
- printf_filtered ("\n");
- }
- printf_filtered ("\n");
- }
-}
+ if (signo || (proc_flags (pi) & (PR_STOPPED | PR_ISTOP)))
+ if (signo || !(pi->was_stopped) ||
+ query ("Was stopped when attached, make it runnable again? "))
+ {
+ /* Clear any pending signal. */
+ if (!proc_clear_current_fault (pi))
+ proc_warn (pi, "do_detach, clear_current_fault", __LINE__);
-static char *
-signalname (signo)
- int signo;
-{
- const char *name;
- static char locbuf[32];
+ if (!proc_set_run_on_last_close (pi))
+ proc_warn (pi, "do_detach, set_rlc", __LINE__);
+ }
- name = strsigno (signo);
- if (name == NULL)
- {
- sprintf (locbuf, "Signal %d", signo);
- }
- else
- {
- sprintf (locbuf, "%s (%d)", name, signo);
- }
- return (locbuf);
+ attach_flag = 0;
+ destroy_procinfo (pi);
}
-static char *
-errnoname (errnum)
- int errnum;
-{
- const char *name;
- static char locbuf[32];
-
- name = strerrno (errnum);
- if (name == NULL)
- {
- sprintf (locbuf, "Errno %d", errnum);
- }
- else
- {
- sprintf (locbuf, "%s (%d)", name, errnum);
- }
- return (locbuf);
-}
+/*
+ * fetch_registers
+ *
+ * Since the /proc interface cannot give us individual registers,
+ * we pay no attention to the (regno) argument, and just fetch them all.
+ * This results in the possibility that we will do unnecessarily many
+ * fetches, since we may be called repeatedly for individual registers.
+ * So we cache the results, and mark the cache invalid when the process
+ * is resumed.
+ */
static void
-info_proc_signals (pip, summary)
- struct procinfo *pip;
- int summary;
+procfs_fetch_registers (regno)
+ int regno;
{
- int signo;
+ gdb_fpregset_t *fpregs;
+ gdb_gregset_t *gregs;
+ procinfo *pi;
+ int pid;
+ int tid;
- if (!summary)
- {
-#ifndef PROCFS_USE_READ_WRITE
- if (ioctl (pip->ctl_fd, PIOCGTRACE, &pip->trace) < 0)
- {
- print_sys_errmsg (pip->pathname, errno);
- error ("PIOCGTRACE failed");
- }
-#endif
+ pid = PIDGET (inferior_pid);
+ tid = TIDGET (inferior_pid);
- printf_filtered ("Disposition of signals:\n\n");
- printf_filtered ("\t%-15s %-8s %-8s %-8s %s\n\n",
- "Signal", "Trace", "Hold", "Pending", "Description");
- for (signo = 0; signo < NSIG; signo++)
- {
- QUIT;
- printf_filtered ("\t%-15s ", signalname (signo));
-#ifdef UNIXWARE
- printf_filtered ("%-8s ",
- prismember (&pip->prstatus.pr_sigtrace, signo)
- ? "on" : "off");
- printf_filtered ("%-8s ",
- prismember (&pip->prstatus.pr_lwp.pr_context.uc_sigmask, signo)
- ? "on" : "off");
-#else
- printf_filtered ("%-8s ",
- prismember (&pip->trace, signo)
- ? "on" : "off");
- printf_filtered ("%-8s ",
- prismember (&pip->prstatus.pr_sighold, signo)
- ? "on" : "off");
-#endif
+ /* First look up procinfo for the main process. */
+ pi = find_procinfo_or_die (pid, 0);
-#ifdef UNIXWARE
- if (prismember (&pip->prstatus.pr_sigpend, signo) ||
- prismember (&pip->prstatus.pr_lwp.pr_lwppend, signo))
- printf_filtered ("%-8s ", "yes");
- else
- printf_filtered ("%-8s ", "no");
-#else /* UNIXWARE */
-#ifdef PROCFS_SIGPEND_OFFSET
- /* Alpha OSF/1 numbers the pending signals from 1. */
- printf_filtered ("%-8s ",
- (signo ? prismember (&pip->prstatus.pr_sigpend,
- signo - 1)
- : 0)
- ? "yes" : "no");
-#else
- printf_filtered ("%-8s ",
- prismember (&pip->prstatus.pr_sigpend, signo)
- ? "yes" : "no");
-#endif
-#endif /* UNIXWARE */
- printf_filtered (" %s\n", safe_strsignal (signo));
- }
- printf_filtered ("\n");
- }
-}
+ /* If the event thread is not the same as GDB's requested thread
+ (ie. inferior_pid), then look up procinfo for the requested
+ thread. */
+ if ((tid != 0) &&
+ (tid != proc_get_current_thread (pi)))
+ pi = find_procinfo_or_die (pid, tid);
-static void
-info_proc_faults (pip, summary)
- struct procinfo *pip;
- int summary;
-{
- struct trans *transp;
+ if (pi == NULL)
+ error ("procfs: fetch_registers failed to find procinfo for %s",
+ target_pid_to_str (inferior_pid));
- if (!summary)
- {
-#ifndef UNIXWARE
- if (ioctl (pip->ctl_fd, PIOCGFAULT, &pip->fltset.fltset) < 0)
- {
- print_sys_errmsg (pip->pathname, errno);
- error ("PIOCGFAULT failed");
- }
+ if ((gregs = proc_get_gregs (pi)) == NULL)
+ proc_error (pi, "fetch_registers, get_gregs", __LINE__);
+
+ supply_gregset (gregs);
+
+#if defined (FP0_REGNUM) /* need floating point? */
+ if ((regno >= 0 && regno < FP0_REGNUM) ||
+ regno == PC_REGNUM ||
+#ifdef NPC_REGNUM
+ regno == NPC_REGNUM ||
#endif
+ regno == FP_REGNUM ||
+ regno == SP_REGNUM)
+ return; /* not a floating point register */
- printf_filtered ("Current traced hardware fault set:\n\n");
- printf_filtered ("\t%-12s %-8s\n", "Fault", "Trace");
+ if ((fpregs = proc_get_fpregs (pi)) == NULL)
+ proc_error (pi, "fetch_registers, get_fpregs", __LINE__);
- for (transp = faults_table; transp->name != NULL; transp++)
- {
- QUIT;
- printf_filtered ("\t%-12s ", transp->name);
-#ifdef UNIXWARE
- printf_filtered ("%-8s", prismember (&pip->prstatus.pr_flttrace, transp->value)
- ? "on" : "off");
-#else
- printf_filtered ("%-8s", prismember (&pip->fltset.fltset, transp->value)
- ? "on" : "off");
+ supply_fpregset (fpregs);
#endif
- printf_filtered ("\n");
- }
- printf_filtered ("\n");
- }
}
+/* Get ready to modify the registers array. On machines which store
+ individual registers, this doesn't need to do anything. On
+ machines which store all the registers in one fell swoop, such as
+ /proc, this makes sure that registers contains all the registers
+ from the program being debugged. */
+
static void
-info_proc_mappings (pip, summary)
- struct procinfo *pip;
- int summary;
+procfs_prepare_to_store ()
{
- int nmap;
- struct prmap *prmaps;
- struct prmap *prmap;
-#ifdef PROCFS_USE_READ_WRITE
- struct stat sbuf;
-#endif
-
- if (!summary)
- {
- printf_filtered ("Mapped address spaces:\n\n");
-#ifdef BFD_HOST_64_BIT
- printf_filtered (" %18s %18s %10s %10s %7s\n",
-#else
- printf_filtered ("\t%10s %10s %10s %10s %7s\n",
-#endif
- "Start Addr",
- " End Addr",
- " Size",
- " Offset",
- "Flags");
-#ifdef PROCFS_USE_READ_WRITE
- if (fstat (pip->map_fd, &sbuf) == 0)
- {
- nmap = sbuf.st_size / sizeof (prmap_t);
- prmaps = (struct prmap *) alloca ((nmap + 1) * sizeof (*prmaps));
- if ((lseek (pip->map_fd, 0, SEEK_SET) == 0) &&
- (read (pip->map_fd, (char *) prmaps,
- nmap * sizeof (*prmaps)) == (nmap * sizeof (*prmaps))))
- {
- int i = 0;
- for (prmap = prmaps; i < nmap; ++prmap, ++i)
-#else
- if (ioctl (pip->ctl_fd, PIOCNMAP, &nmap) == 0)
- {
- prmaps = (struct prmap *) alloca ((nmap + 1) * sizeof (*prmaps));
- if (ioctl (pip->ctl_fd, PIOCMAP, prmaps) == 0)
- {
- for (prmap = prmaps; prmap->pr_size; ++prmap)
-#endif /* PROCFS_USE_READ_WRITE */
- {
-#ifdef BFD_HOST_64_BIT
- printf_filtered (" %#18lx %#18lx %#10x %#10x %7s\n",
-#else
- printf_filtered ("\t%#10lx %#10lx %#10x %#10x %7s\n",
+#ifdef CHILD_PREPARE_TO_STORE
+ CHILD_PREPARE_TO_STORE ();
#endif
- (unsigned long) prmap->pr_vaddr,
- (unsigned long) prmap->pr_vaddr
- + prmap->pr_size - 1,
- prmap->pr_size,
- prmap->pr_off,
- mappingflags (prmap->pr_mflags));
- }
- }
- }
- printf_filtered ("\n");
- }
}
/*
+ * store_registers
+ *
+ * Since the /proc interface will not read individual registers,
+ * we will cache these requests until the process is resumed, and
+ * only then write them back to the inferior process.
+ *
+ * FIXME: is that a really bad idea? Have to think about cases
+ * where writing one register might affect the value of others, etc.
+ */
+
+static void
+procfs_store_registers (regno)
+ int regno;
+{
+ gdb_fpregset_t *fpregs;
+ gdb_gregset_t *gregs;
+ procinfo *pi;
+ int pid;
+ int tid;
- LOCAL FUNCTION
+ pid = PIDGET (inferior_pid);
+ tid = TIDGET (inferior_pid);
- info_proc -- implement the "info proc" command
+ /* First find procinfo for main process */
+ pi = find_procinfo_or_die (pid, 0);
- SYNOPSIS
+ /* If current lwp for process is not the same as requested thread
+ (ie. inferior_pid), then find procinfo for the requested thread. */
- void info_proc (char *args, int from_tty)
+ if ((tid != 0) &&
+ (tid != proc_get_current_thread (pi)))
+ pi = find_procinfo_or_die (pid, tid);
- DESCRIPTION
+ if (pi == NULL)
+ error ("procfs: store_registers: failed to find procinfo for %s",
+ target_pid_to_str (inferior_pid));
- Implement gdb's "info proc" command by using the /proc interface
- to print status information about any currently running process.
+ if ((gregs = proc_get_gregs (pi)) == NULL)
+ proc_error (pi, "store_registers, get_gregs", __LINE__);
- Examples of the use of "info proc" are:
+ fill_gregset (gregs, regno);
+ if (!proc_set_gregs (pi))
+ proc_error (pi, "store_registers, set_gregs", __LINE__);
- info proc (prints summary info for current inferior)
- info proc 123 (prints summary info for process with pid 123)
- info proc mappings (prints address mappings)
- info proc times (prints process/children times)
- info proc id (prints pid, ppid, gid, sid, etc)
- FIXME: i proc id not implemented.
- info proc status (prints general process state info)
- FIXME: i proc status not implemented.
- info proc signals (prints info about signal handling)
- info proc all (prints all info)
+#if defined (FP0_REGNUM) /* need floating point? */
+ if ((regno >= 0 && regno < FP0_REGNUM) ||
+ regno == PC_REGNUM ||
+#ifdef NPC_REGNUM
+ regno == NPC_REGNUM ||
+#endif
+ regno == FP_REGNUM ||
+ regno == SP_REGNUM)
+ return; /* not a floating point register */
+ if ((fpregs = proc_get_fpregs (pi)) == NULL)
+ proc_error (pi, "store_registers, get_fpregs", __LINE__);
+
+ fill_fpregset (fpregs, regno);
+ if (!proc_set_fpregs (pi))
+ proc_error (pi, "store_registers, set_fpregs", __LINE__);
+#endif
+}
+
+/*
+ * Function: target_wait
+ *
+ * Retrieve the next stop event from the child process.
+ * If child has not stopped yet, wait for it to stop.
+ * Translate /proc eventcodes (or possibly wait eventcodes)
+ * into gdb internal event codes.
+ *
+ * Return: id of process (and possibly thread) that incurred the event.
+ * event codes are returned thru a pointer parameter.
*/
-static void
-info_proc (args, from_tty)
- char *args;
- int from_tty;
+static int
+procfs_wait (pid, status)
+ int pid;
+ struct target_waitstatus *status;
{
- int pid;
- struct procinfo *pip;
- struct cleanup *old_chain;
- char **argv;
- int argsize;
- int summary = 1;
- int flags = 0;
- int syscalls = 0;
- int signals = 0;
- int faults = 0;
- int mappings = 0;
- int times = 0;
- int id = 0;
- int status = 0;
- int all = 0;
- int nlwp;
- int *lwps;
-
- old_chain = make_cleanup (null_cleanup, 0);
+ /* First cut: loosely based on original version 2.1 */
+ procinfo *pi;
+ int temp, wstat;
+ int retval;
+ int why, what, flags;
+ int retry = 0;
- /* Default to using the current inferior if no pid specified. Note
- that inferior_pid may be 0, hence we set okerr. */
+wait_again:
- pid = inferior_pid & 0x7fffffff; /* strip off sol-thread bit */
- if (!(pip = find_procinfo (pid, 1))) /* inferior_pid no good? */
- pip = procinfo_list; /* take first available */
- pid = pid & 0xffff; /* extract "real" pid */
+ retry++;
+ wstat = 0;
+ retval = -1;
- if (args != NULL)
+ /* Find procinfo for main process */
+ pi = find_procinfo_or_die (PIDGET (inferior_pid), 0);
+ if (pi)
{
- if ((argv = buildargv (args)) == NULL)
+ /* We must assume that the status is stale now... */
+ pi->status_valid = 0;
+ pi->gregs_valid = 0;
+ pi->fpregs_valid = 0;
+
+#if 0 /* just try this out... */
+ flags = proc_flags (pi);
+ why = proc_why (pi);
+ if ((flags & PR_STOPPED) && (why == PR_REQUESTED))
+ pi->status_valid = 0; /* re-read again, IMMEDIATELY... */
+#endif
+ /* If child is not stopped, wait for it to stop. */
+ if (!(proc_flags (pi) & (PR_STOPPED | PR_ISTOP)) &&
+ !proc_wait_for_stop (pi))
{
- nomem (0);
- }
- make_cleanup_freeargv (argv);
-
- while (*argv != NULL)
- {
- argsize = strlen (*argv);
- if (argsize >= 1 && strncmp (*argv, "all", argsize) == 0)
- {
- summary = 0;
- all = 1;
- }
- else if (argsize >= 2 && strncmp (*argv, "faults", argsize) == 0)
- {
- summary = 0;
- faults = 1;
- }
- else if (argsize >= 2 && strncmp (*argv, "flags", argsize) == 0)
- {
- summary = 0;
- flags = 1;
- }
- else if (argsize >= 1 && strncmp (*argv, "id", argsize) == 0)
+ /* wait_for_stop failed: has the child terminated? */
+ if (errno == ENOENT)
{
- summary = 0;
- id = 1;
+ /* /proc file not found; presumably child has terminated. */
+ retval = wait (&wstat); /* "wait" for the child's exit */
+
+ if (retval != PIDGET (inferior_pid)) /* wrong child? */
+ error ("procfs: couldn't stop process %d: wait returned %d\n",
+ inferior_pid, retval);
+ /* FIXME: might I not just use waitpid?
+ Or try find_procinfo to see if I know about this child? */
}
- else if (argsize >= 1 && strncmp (*argv, "mappings", argsize) == 0)
- {
- summary = 0;
- mappings = 1;
- }
- else if (argsize >= 2 && strncmp (*argv, "signals", argsize) == 0)
- {
- summary = 0;
- signals = 1;
- }
- else if (argsize >= 2 && strncmp (*argv, "status", argsize) == 0)
- {
- summary = 0;
- status = 1;
- }
- else if (argsize >= 2 && strncmp (*argv, "syscalls", argsize) == 0)
- {
- summary = 0;
- syscalls = 1;
- }
- else if (argsize >= 1 && strncmp (*argv, "times", argsize) == 0)
+ else
{
- summary = 0;
- times = 1;
+ /* Unknown error from wait_for_stop. */
+ proc_error (pi, "target_wait (wait_for_stop)", __LINE__);
}
- else if ((pid = atoi (*argv)) > 0)
+ }
+ else
+ {
+ /* This long block is reached if either:
+ a) the child was already stopped, or
+ b) we successfully waited for the child with wait_for_stop.
+ This block will analyze the /proc status, and translate it
+ into a waitstatus for GDB.
+
+ If we actually had to call wait because the /proc file
+ is gone (child terminated), then we skip this block,
+ because we already have a waitstatus. */
+
+ flags = proc_flags (pi);
+ why = proc_why (pi);
+ what = proc_what (pi);
+
+#if 0
+ {
+ int stopped_pc = read_pc ();
+ if (stopped_pc != 0x10c68 &&
+ stopped_pc != 0x10c6c &&
+ stopped_pc != 0x10c70 &&
+ stopped_pc != 0x22768 &&
+ stopped_pc != 0x10c74)
+ printf ("%x,%d,%d\n", stopped_pc, why, what);
+ }
+#endif
+
+ if (flags & (PR_STOPPED | PR_ISTOP))
{
- pip = (struct procinfo *) xmalloc (sizeof (struct procinfo));
- memset (pip, 0, sizeof (*pip));
+#ifdef PR_ASYNC
+ /* If it's running async (for single_thread control),
+ set it back to normal again. */
+ if (flags & PR_ASYNC)
+ if (!proc_unset_async (pi))
+ proc_error (pi, "target_wait, unset_async", __LINE__);
+#endif
+
+ if (info_verbose)
+ proc_prettyprint_why (why, what, 1);
+
+ /* The 'pid' we will return to GDB is composed of
+ the process ID plus the lwp ID. */
+ retval = MERGEPID (pi->pid, proc_get_current_thread (pi));
+
+ switch (why) {
+ case PR_SIGNALLED:
+ wstat = (what << 8) | 0177;
+ break;
+ case PR_SYSENTRY:
+ switch (what) {
+#ifdef SYS_lwp_exit
+ case SYS_lwp_exit:
+#endif
+#ifdef SYS_lwpexit
+ case SYS_lwpexit:
+#endif
+#if defined (SYS_lwp_exit) || defined (SYS_lwpexit)
+ printf_filtered ("[%s exited]\n",
+ target_pid_to_str (retval));
+ delete_thread (retval);
+ status->kind = TARGET_WAITKIND_SPURIOUS;
+ return retval;
+#endif /* _lwp_exit */
+
+ case SYS_exit:
+ /* Handle SYS_exit call only */
+ /* Stopped at entry to SYS_exit.
+ Make it runnable, resume it, then use
+ the wait system call to get its exit code.
+ Proc_run_process always clears the current
+ fault and signal.
+ Then return its exit status. */
+ pi->status_valid = 0;
+ wstat = 0;
+ /* FIXME: what we should do is return
+ TARGET_WAITKIND_SPURIOUS. */
+ if (!proc_run_process (pi, 0, 0))
+ proc_error (pi, "target_wait, run_process", __LINE__);
+ if (attach_flag)
+ {
+ /* Don't call wait: simulate waiting for exit,
+ return a "success" exit code. Bogus: what if
+ it returns something else? */
+ wstat = 0;
+ retval = inferior_pid; /* ??? */
+ }
+ else
+ {
+ int temp = wait (&wstat);
+
+ /* FIXME: shouldn't I make sure I get the right
+ event from the right process? If (for
+ instance) I have killed an earlier inferior
+ process but failed to clean up after it
+ somehow, I could get its termination event
+ here. */
+
+ /* If wait returns -1, that's what we return to GDB. */
+ if (temp < 0)
+ retval = temp;
+ }
+ break;
+ default:
+ printf_filtered ("procfs: trapped on entry to ");
+ proc_prettyprint_syscall (proc_what (pi), 0);
+ printf_filtered ("\n");
+#ifndef PIOCSSPCACT
+ {
+ long i, nsysargs, *sysargs;
+
+ if ((nsysargs = proc_nsysarg (pi)) > 0 &&
+ (sysargs = proc_sysargs (pi)) != NULL)
+ {
+ printf_filtered ("%d syscall arguments:\n", nsysargs);
+ for (i = 0; i < nsysargs; i++)
+ printf_filtered ("#%d: 0x%08x\n",
+ i, sysargs[i]);
+ }
+
+ }
+#endif
+ if (status)
+ {
+ /* How to exit gracefully, returning "unknown event" */
+ status->kind = TARGET_WAITKIND_SPURIOUS;
+ return inferior_pid;
+ }
+ else
+ {
+ /* How to keep going without returning to wfi: */
+ target_resume (pid, 0, TARGET_SIGNAL_0);
+ goto wait_again;
+ }
+ break;
+ }
+ break;
+ case PR_SYSEXIT:
+ switch (what) {
+#ifdef SYS_exec
+ case SYS_exec:
+#endif
+#ifdef SYS_execv
+ case SYS_execv:
+#endif
+#ifdef SYS_execve
+ case SYS_execve:
+#endif
+ /* Hopefully this is our own "fork-child" execing
+ the real child. Hoax this event into a trap, and
+ GDB will see the child about to execute its start
+ address. */
+ wstat = (SIGTRAP << 8) | 0177;
+ break;
+#ifdef SYS_lwp_create
+ case SYS_lwp_create:
+#endif
+#ifdef SYS_lwpcreate
+ case SYS_lwpcreate:
+#endif
+#if defined(SYS_lwp_create) || defined(SYS_lwpcreate)
+ /*
+ * This syscall is somewhat like fork/exec.
+ * We will get the event twice: once for the parent LWP,
+ * and once for the child. We should already know about
+ * the parent LWP, but the child will be new to us. So,
+ * whenever we get this event, if it represents a new
+ * thread, simply add the thread to the list.
+ */
+
+ /* If not in procinfo list, add it. */
+ temp = proc_get_current_thread (pi);
+ if (!find_procinfo (pi->pid, temp))
+ create_procinfo (pi->pid, temp);
+
+ temp = MERGEPID (pi->pid, temp);
+ /* If not in GDB's thread list, add it. */
+ if (!in_thread_list (temp))
+ {
+ printf_filtered ("[New %s]\n", target_pid_to_str (temp));
+ add_thread (temp);
+ }
+ /* Return to WFI, but tell it to immediately resume. */
+ status->kind = TARGET_WAITKIND_SPURIOUS;
+ return inferior_pid;
+#endif /* _lwp_create */
+
+#ifdef SYS_lwp_exit
+ case SYS_lwp_exit:
+#endif
+#ifdef SYS_lwpexit
+ case SYS_lwpexit:
+#endif
+#if defined (SYS_lwp_exit) || defined (SYS_lwpexit)
+ printf_filtered ("[%s exited]\n",
+ target_pid_to_str (retval));
+ delete_thread (retval);
+ status->kind = TARGET_WAITKIND_SPURIOUS;
+ return retval;
+#endif /* _lwp_exit */
- pip->pid = pid;
- if (!open_proc_file (pid, pip, O_RDONLY, 0))
+#ifdef SYS_sproc
+ case SYS_sproc:
+ /* Nothing to do here for now. The old procfs
+ seemed to use this event to handle threads on
+ older (non-LWP) systems, where I'm assuming that
+ threads were actually separate processes. Irix,
+ maybe? Anyway, low priority for now. */
+#endif
+#ifdef SYS_fork
+ case SYS_fork:
+ /* FIXME: do we need to handle this? Investigate. */
+#endif
+#ifdef SYS_vfork
+ case SYS_vfork:
+ /* FIXME: see above. */
+#endif
+ default:
+ printf_filtered ("procfs: trapped on exit from ");
+ proc_prettyprint_syscall (proc_what (pi), 0);
+ printf_filtered ("\n");
+#ifndef PIOCSSPCACT
+ {
+ long i, nsysargs, *sysargs;
+
+ if ((nsysargs = proc_nsysarg (pi)) > 0 &&
+ (sysargs = proc_sysargs (pi)) != NULL)
+ {
+ printf_filtered ("%d syscall arguments:\n", nsysargs);
+ for (i = 0; i < nsysargs; i++)
+ printf_filtered ("#%d: 0x%08x\n",
+ i, sysargs[i]);
+ }
+ }
+#endif
+ status->kind = TARGET_WAITKIND_SPURIOUS;
+ return inferior_pid;
+ }
+ break;
+ case PR_REQUESTED:
+#if 0 /* FIXME */
+ wstat = (SIGSTOP << 8) | 0177;
+ break;
+#else
+ if (retry < 5)
+ {
+ printf_filtered ("Retry #%d:\n", retry);
+ pi->status_valid = 0;
+ goto wait_again;
+ }
+ else
+ {
+ /* If not in procinfo list, add it. */
+ temp = proc_get_current_thread (pi);
+ if (!find_procinfo (pi->pid, temp))
+ create_procinfo (pi->pid, temp);
+
+ /* If not in GDB's thread list, add it. */
+ temp = MERGEPID (pi->pid, temp);
+ if (!in_thread_list (temp))
+ {
+ printf_filtered ("[*New %s]\n",
+ target_pid_to_str (temp));
+ add_thread (temp);
+ }
+
+ status->kind = TARGET_WAITKIND_STOPPED;
+ status->value.sig = 0;
+ return retval;
+ }
+#endif
+ case PR_JOBCONTROL:
+ wstat = (what << 8) | 0177;
+ break;
+ case PR_FAULTED:
+ switch (what) { /* FIXME: FAULTED_USE_SIGINFO */
+#ifdef FLTWATCH
+ case FLTWATCH:
+ wstat = (SIGTRAP << 8) | 0177;
+ break;
+#endif
+#ifdef FLTKWATCH
+ case FLTKWATCH:
+ wstat = (SIGTRAP << 8) | 0177;
+ break;
+#endif
+ /* FIXME: use si_signo where possible. */
+ case FLTPRIV:
+#if (FLTILL != FLTPRIV) /* avoid "duplicate case" error */
+ case FLTILL:
+#endif
+ wstat = (SIGILL << 8) | 0177;
+ break;
+ case FLTBPT:
+#if (FLTTRACE != FLTBPT) /* avoid "duplicate case" error */
+ case FLTTRACE:
+#endif
+ wstat = (SIGTRAP << 8) | 0177;
+ break;
+ case FLTSTACK:
+ case FLTACCESS:
+#if (FLTBOUNDS != FLTSTACK) /* avoid "duplicate case" error */
+ case FLTBOUNDS:
+#endif
+ wstat = (SIGSEGV << 8) | 0177;
+ break;
+ case FLTIOVF:
+ case FLTIZDIV:
+#if (FLTFPE != FLTIOVF) /* avoid "duplicate case" error */
+ case FLTFPE:
+#endif
+ wstat = (SIGFPE << 8) | 0177;
+ break;
+ case FLTPAGE: /* Recoverable page fault */
+ default: /* FIXME: use si_signo if possible for fault */
+ retval = -1;
+ printf_filtered ("procfs:%d -- ", __LINE__);
+ printf_filtered ("child stopped for unknown reason:\n");
+ proc_prettyprint_why (why, what, 1);
+ error ("... giving up...");
+ break;
+ }
+ break; /* case PR_FAULTED: */
+ default: /* switch (why) unmatched */
+ printf_filtered ("procfs:%d -- ", __LINE__);
+ printf_filtered ("child stopped for unknown reason:\n");
+ proc_prettyprint_why (why, what, 1);
+ error ("... giving up...");
+ break;
+ }
+ /*
+ * Got this far without error:
+ * If retval isn't in the threads database, add it.
+ */
+ if (retval > 0 &&
+ retval != inferior_pid &&
+ !in_thread_list (retval))
{
- perror_with_name (pip->pathname);
- /* NOTREACHED */
+ /*
+ * We have a new thread.
+ * We need to add it both to GDB's list and to our own.
+ * If we don't create a procinfo, resume may be unhappy
+ * later.
+ */
+ printf_filtered ("[New %s]\n", target_pid_to_str (retval));
+ add_thread (retval);
+ if (find_procinfo (PIDGET (retval), TIDGET (retval)) == NULL)
+ create_procinfo (PIDGET (retval), TIDGET (retval));
+
+ /* In addition, it's possible that this is the first
+ * new thread we've seen, in which case we may not
+ * have created entries for inferior_pid yet.
+ */
+ if (TIDGET (inferior_pid) != 0)
+ {
+ if (!in_thread_list (inferior_pid))
+ add_thread (inferior_pid);
+ if (find_procinfo (PIDGET (inferior_pid),
+ TIDGET (inferior_pid)) == NULL)
+ create_procinfo (PIDGET (inferior_pid),
+ TIDGET (inferior_pid));
+ }
}
- pid = pip->pid;
- make_cleanup_close_proc_file (pip);
}
- else if (**argv != '\000')
+ else /* flags do not indicate STOPPED */
{
- error ("Unrecognized or ambiguous keyword `%s'.", *argv);
+ /* surely this can't happen... */
+ printf_filtered ("procfs:%d -- process not stopped.\n",
+ __LINE__);
+ proc_prettyprint_flags (flags, 1);
+ error ("procfs: ...giving up...");
}
- argv++;
}
- }
- /* If we don't have a valid open process at this point, then we have no
- inferior or didn't specify a specific pid. */
-
- if (!pip)
- {
- error ("\
-No process. Start debugging a program or specify an explicit process ID.");
+ if (status)
+ store_waitstatus (status, wstat);
}
- if (!procfs_read_status (pip))
- {
- print_sys_errmsg (pip->pathname, errno);
- error ("procfs_read_status failed");
- }
+ return retval;
+}
-#ifndef PROCFS_USE_READ_WRITE
-#ifdef PIOCLWPIDS
- nlwp = pip->prstatus.pr_nlwp;
- lwps = alloca ((2 * nlwp + 2) * sizeof (*lwps));
+static int
+procfs_xfer_memory (memaddr, myaddr, len, dowrite, target)
+ CORE_ADDR memaddr;
+ char *myaddr;
+ int len;
+ int dowrite;
+ struct target_ops *target; /* ignored */
+{
+ procinfo *pi;
+ int nbytes = 0;
- if (ioctl (pip->ctl_fd, PIOCLWPIDS, lwps))
+ /* Find procinfo for main process */
+ pi = find_procinfo_or_die (PIDGET (inferior_pid), 0);
+ if (pi->as_fd == 0 &&
+ open_procinfo_files (pi, FD_AS) == 0)
{
- print_sys_errmsg (pip->pathname, errno);
- error ("PIOCLWPIDS failed");
+ proc_warn (pi, "xfer_memory, open_proc_files", __LINE__);
+ return 0;
}
-#else /* PIOCLWPIDS */
- nlwp = 1;
- lwps = alloca ((2 * nlwp + 2) * sizeof *lwps);
- lwps[0] = 0;
-#endif /* PIOCLWPIDS */
- for (; nlwp > 0; nlwp--, lwps++)
+ if (lseek (pi->as_fd, (off_t) memaddr, SEEK_SET) == (off_t) memaddr)
{
- pip = find_procinfo ((*lwps << 16) | pid, 1);
-
- if (!pip)
- {
- pip = (struct procinfo *) xmalloc (sizeof (struct procinfo));
- memset (pip, 0, sizeof (*pip));
- if (!open_proc_file ((*lwps << 16) | pid, pip, O_RDONLY, 0))
- continue;
-
- make_cleanup_close_proc_file (pip);
-
- if (!procfs_read_status (pip))
- {
- print_sys_errmsg (pip->pathname, errno);
- error ("procfs_read_status failed");
- }
- }
-
-#endif /* PROCFS_USE_READ_WRITE */
-
- /* Print verbose information of the requested type(s), or just a summary
- of the information for all types. */
-
- printf_filtered ("\nInformation for %s.%d:\n\n", pip->pathname, *lwps);
- if (summary || all || flags)
- {
- info_proc_flags (pip, summary);
- }
- if (summary || all)
+ if (dowrite)
{
- info_proc_stop (pip, summary);
-#ifdef UNIXWARE
- supply_gregset (&pip->prstatus.pr_lwp.pr_context.uc_mcontext.gregs);
+#ifdef NEW_PROC_API
+ PROCFS_NOTE ("write memory: ");
#else
- supply_gregset (&pip->prstatus.pr_reg);
+ PROCFS_NOTE ("write memory: \n");
#endif
- printf_filtered ("PC: ");
- print_address (read_pc (), gdb_stdout);
- printf_filtered ("\n");
- }
- if (summary || all || signals || faults)
- {
- info_proc_siginfo (pip, summary);
- }
- if (summary || all || syscalls)
- {
- info_proc_syscalls (pip, summary);
- }
- if (summary || all || mappings)
- {
- info_proc_mappings (pip, summary);
+ nbytes = write (pi->as_fd, myaddr, len);
}
- if (summary || all || signals)
+ else
{
- info_proc_signals (pip, summary);
+ PROCFS_NOTE ("read memory: \n");
+ nbytes = read (pi->as_fd, myaddr, len);
}
- if (summary || all || faults)
+ if (nbytes < 0)
{
- info_proc_faults (pip, summary);
+ nbytes = 0;
}
- printf_filtered ("\n");
-
- /* All done, deal with closing any temporary process info structure,
- freeing temporary memory , etc. */
-
- do_cleanups (old_chain);
-#ifndef PROCFS_USE_READ_WRITE
}
-#endif
+ return nbytes;
}
/*
-
- LOCAL FUNCTION
-
- modify_inherit_on_fork_flag - Change the inherit-on-fork flag
-
- SYNOPSIS
-
- void modify_inherit_on_fork_flag (fd, flag)
-
- DESCRIPTION
-
- Call this routine to modify the inherit-on-fork flag. This routine is
- just a nice wrapper to hide the #ifdefs needed by various systems to
- control this flag.
-
+ * Function: invalidate_cache
+ *
+ * Called by target_resume before making child runnable.
+ * Mark cached registers and status's invalid.
+ * If there are "dirty" caches that need to be written back
+ * to the child process, do that.
+ *
+ * File descriptors are also cached.
+ * As they are a limited resource, we cannot hold onto them indefinitely.
+ * However, as they are expensive to open, we don't want to throw them
+ * away indescriminately either. As a compromise, we will keep the
+ * file descriptors for the parent process, but discard any file
+ * descriptors we may have accumulated for the threads.
+ *
+ * Return value:
+ * As this function is called by iterate_over_threads, it always
+ * returns zero (so that iterate_over_threads will keep iterating).
*/
-static void
-modify_inherit_on_fork_flag (fd, flag)
- int fd;
- int flag;
+
+static int
+invalidate_cache (parent, pi, ptr)
+ procinfo *parent;
+ procinfo *pi;
+ void *ptr;
{
-#if defined (PIOCSET) || defined (PCSET)
- long pr_flags;
-#endif
- int retval = 0;
-#ifdef PROCFS_USE_READ_WRITE
- struct proc_ctl pctl;
-#endif
+ /*
+ * About to run the child; invalidate caches and do any other cleanup.
+ */
-#if defined (PIOCSET) || defined (PCSET) /* New method */
- pr_flags = PR_FORK;
- if (flag)
- {
-#ifdef PROCFS_USE_READ_WRITE
- pctl.cmd = PCSET;
- pctl.data = PR_FORK;
- if (write (fd, (char *) &pctl, sizeof (struct proc_ctl)) < 0)
- retval = -1;
-#else
- retval = ioctl (fd, PIOCSET, &pr_flags);
+#if 0
+ if (pi->gregs_dirty)
+ if (parent == NULL ||
+ proc_get_current_thread (parent) != pi->tid)
+ if (!proc_set_gregs (pi)) /* flush gregs cache */
+ proc_warn (pi, "target_resume, set_gregs",
+ __LINE__);
+#ifdef FP0_REGNUM
+ if (pi->fpregs_dirty)
+ if (parent == NULL ||
+ proc_get_current_thread (parent) != pi->tid)
+ if (!proc_set_fpregs (pi)) /* flush fpregs cache */
+ proc_warn (pi, "target_resume, set_fpregs",
+ __LINE__);
#endif
- }
- else
- {
-#ifdef PROCFS_USE_READ_WRITE
- pctl.cmd = PCRESET;
- pctl.data = PR_FORK;
- if (write (fd, (char *) &pctl, sizeof (struct proc_ctl)) < 0)
- retval = -1;
-#else
- retval = ioctl (fd, PIOCRESET, &pr_flags);
#endif
- }
-#else
-#ifdef PIOCSFORK /* Original method */
- if (flag)
+ if (parent != NULL)
{
- retval = ioctl (fd, PIOCSFORK, NULL);
- }
- else
- {
- retval = ioctl (fd, PIOCRFORK, NULL);
+ /* The presence of a parent indicates that this is an LWP.
+ Close any file descriptors that it might have open.
+ We don't do this to the master (parent) procinfo. */
+
+ close_procinfo_files (pi);
}
-#else
- Neither PR_FORK nor PIOCSFORK exist ! !!
-#endif
+ pi->gregs_valid = 0;
+ pi->fpregs_valid = 0;
+#if 0
+ pi->gregs_dirty = 0;
+ pi->fpregs_dirty = 0;
#endif
+ pi->status_valid = 0;
+ pi->threads_valid = 0;
- if (!retval)
- return;
-
- print_sys_errmsg ("modify_inherit_on_fork_flag", errno);
- error ("PIOCSFORK or PR_FORK modification failed");
+ return 0;
}
/*
-
- LOCAL FUNCTION
-
- modify_run_on_last_close_flag - Change the run-on-last-close flag
-
- SYNOPSIS
-
- void modify_run_on_last_close_flag (fd, flag)
-
- DESCRIPTION
-
- Call this routine to modify the run-on-last-close flag. This routine
- is just a nice wrapper to hide the #ifdefs needed by various systems to
- control this flag.
-
+ * Function: make_signal_thread_runnable
+ *
+ * A callback function for iterate_over_threads.
+ * Find the asynchronous signal thread, and make it runnable.
+ * See if that helps matters any.
*/
-static void
-modify_run_on_last_close_flag (fd, flag)
- int fd;
- int flag;
+static int
+make_signal_thread_runnable (process, pi, ptr)
+ procinfo *process;
+ procinfo *pi;
+ void *ptr;
{
-#if defined (PIOCSET) || defined (PCSET)
- long pr_flags;
-#endif
- int retval = 0;
-#ifdef PROCFS_USE_READ_WRITE
- struct proc_ctl pctl;
-#endif
-
-#if defined (PIOCSET) || defined (PCSET) /* New method */
- pr_flags = PR_RLC;
- if (flag)
- {
-#ifdef PROCFS_USE_READ_WRITE
- pctl.cmd = PCSET;
- pctl.data = PR_RLC;
- if (write (fd, (char *) &pctl, sizeof (struct proc_ctl)) < 0)
- retval = -1;
-#else
- retval = ioctl (fd, PIOCSET, &pr_flags);
-#endif
- }
- else
+#ifdef PR_ASLWP
+ if (proc_flags (pi) & PR_ASLWP)
{
-#ifdef PROCFS_USE_READ_WRITE
- pctl.cmd = PCRESET;
- pctl.data = PR_RLC;
- if (write (fd, (char *) &pctl, sizeof (struct proc_ctl)) < 0)
- retval = -1;
-#else
- retval = ioctl (fd, PIOCRESET, &pr_flags);
-#endif
+ if (!proc_run_process (pi, 0, -1))
+ proc_error (pi, "make_signal_thread_runnable", __LINE__);
+ return 1;
}
-
-#else
-#ifdef PIOCSRLC /* Original method */
- if (flag)
- retval = ioctl (fd, PIOCSRLC, NULL);
- else
- retval = ioctl (fd, PIOCRRLC, NULL);
-#else
- Neither PR_RLC nor PIOCSRLC exist ! !!
#endif
-#endif
-
- if (!retval)
- return;
-
- print_sys_errmsg ("modify_run_on_last_close_flag", errno);
- error ("PIOCSRLC or PR_RLC modification failed");
+ return 0;
}
/*
-
- LOCAL FUNCTION
-
- procfs_clear_syscall_trap -- Deletes the trap for the specified system call.
-
- SYNOPSIS
-
- void procfs_clear_syscall_trap (struct procinfo *, int syscall_num, int errok)
-
- DESCRIPTION
-
- This function function disables traps for the specified system call.
- errok is non-zero if errors should be ignored.
+ * Function: target_resume
+ *
+ * Make the child process runnable. Normally we will then call
+ * procfs_wait and wait for it to stop again (unles gdb is async).
+ *
+ * Arguments:
+ * step: if true, then arrange for the child to stop again
+ * after executing a single instruction.
+ * signo: if zero, then cancel any pending signal.
+ * If non-zero, then arrange for the indicated signal
+ * to be delivered to the child when it runs.
+ * pid: if -1, then allow any child thread to run.
+ * if non-zero, then allow only the indicated thread to run.
+ ******* (not implemented yet)
*/
static void
-procfs_clear_syscall_trap (pi, syscall_num, errok)
- struct procinfo *pi;
- int syscall_num;
- int errok;
+procfs_resume (pid, step, signo)
+ int pid;
+ int step;
+ enum target_signal signo;
{
- sysset_t sysset;
- int goterr, i;
+ procinfo *pi, *thread;
+ int native_signo;
+
+ /* 2.1:
+ prrun.prflags |= PRSVADDR;
+ prrun.pr_vaddr = $PC; set resume address
+ prrun.prflags |= PRSTRACE; trace signals in pr_trace (all)
+ prrun.prflags |= PRSFAULT; trace faults in pr_fault (all but PAGE)
+ prrun.prflags |= PRCFAULT; clear current fault.
+
+ PRSTRACE and PRSFAULT can be done by other means
+ (proc_trace_signals, proc_trace_faults)
+ PRSVADDR is unnecessary.
+ PRCFAULT may be replaced by a PIOCCFAULT call (proc_clear_current_fault)
+ This basically leaves PRSTEP and PRCSIG.
+ PRCSIG is like PIOCSSIG (proc_clear_current_signal).
+ So basically PR_STEP is the sole argument that must be passed
+ to proc_run_process (for use in the prrun struct by ioctl). */
+
+ /* Find procinfo for main process */
+ pi = find_procinfo_or_die (PIDGET (inferior_pid), 0);
+
+ /* First cut: ignore pid argument */
+ errno = 0;
-#ifndef UNIXWARE
- goterr = ioctl (pi->ctl_fd, PIOCGENTRY, &sysset) < 0;
+ /* Convert signal to host numbering. */
+ if (signo == 0 ||
+ signo == TARGET_SIGNAL_STOP && pi->ignore_next_sigstop)
+ native_signo = 0;
+ else
+ native_signo = target_signal_to_host (signo);
- if (goterr && !errok)
- {
- print_sys_errmsg (pi->pathname, errno);
- error ("PIOCGENTRY failed");
- }
+ pi->ignore_next_sigstop = 0;
- if (!goterr)
- {
- prdelset (&sysset, syscall_num);
+ /* Running the process voids all cached registers and status. */
+ /* Void the threads' caches first */
+ proc_iterate_over_threads (pi, invalidate_cache, NULL);
+ /* Void the process procinfo's caches. */
+ invalidate_cache (NULL, pi, NULL);
- if ((ioctl (pi->ctl_fd, PIOCSENTRY, &sysset) < 0) && !errok)
+ if (pid != -1)
+ {
+ /* Resume a specific thread, presumably suppressing the others. */
+ thread = find_procinfo (PIDGET (pid), TIDGET (pid));
+ if (thread == NULL)
+ warning ("procfs: resume can't find thread %d -- resuming all.",
+ TIDGET (pid));
+ else
{
- print_sys_errmsg (pi->pathname, errno);
- error ("PIOCSENTRY failed");
+ if (thread->tid != 0)
+ {
+ /* We're to resume a specific thread, and not the others.
+ * Set the child process's PR_ASYNC flag.
+ */
+#ifdef PR_ASYNC
+ if (!proc_set_async (pi))
+ proc_error (pi, "target_resume, set_async", __LINE__);
+#endif
+#if 0
+ proc_iterate_over_threads (pi,
+ make_signal_thread_runnable,
+ NULL);
+#endif
+ pi = thread; /* substitute the thread's procinfo for run */
+ }
}
}
- goterr = ioctl (pi->ctl_fd, PIOCGEXIT, &sysset) < 0;
-
- if (goterr && !errok)
+ if (!proc_run_process (pi, step, native_signo))
{
- procfs_clear_syscall_trap (pi, syscall_num, 1);
- print_sys_errmsg (pi->pathname, errno);
- error ("PIOCGEXIT failed");
+ if (errno == EBUSY)
+ warning ("resume: target already running. Pretend to resume, and hope for the best!\n");
+ else
+ proc_error (pi, "target_resume", __LINE__);
}
+}
- if (!goterr)
- {
- praddset (&sysset, syscall_num);
+/*
+ * Function: register_gdb_signals
+ *
+ * Traverse the list of signals that GDB knows about
+ * (see "handle" command), and arrange for the target
+ * to be stopped or not, according to these settings.
+ *
+ * Returns non-zero for success, zero for failure.
+ */
- if ((ioctl (pi->ctl_fd, PIOCSEXIT, &sysset) < 0) && !errok)
- {
- procfs_clear_syscall_trap (pi, syscall_num, 1);
- print_sys_errmsg (pi->pathname, errno);
- error ("PIOCSEXIT failed");
- }
- }
-#endif
+static int
+register_gdb_signals (pi, signals)
+ procinfo *pi;
+ sigset_t *signals;
+{
+ int signo;
- if (!pi->syscall_handlers)
- {
- if (!errok)
- error ("procfs_clear_syscall_trap: syscall_handlers is empty");
- return;
- }
+ for (signo = 0; signo < NSIG; signo ++)
+ if (signal_stop_state (target_signal_from_host (signo)) == 0 &&
+ signal_print_state (target_signal_from_host (signo)) == 0 &&
+ signal_pass_state (target_signal_from_host (signo)) == 1)
+ prdelset (signals, signo);
+ else
+ praddset (signals, signo);
- /* Remove handler func from the handler list */
+ return proc_set_traced_signals (pi, signals);
+}
- for (i = 0; i < pi->num_syscall_handlers; i++)
- if (pi->syscall_handlers[i].syscall_num == syscall_num)
- {
- if (i + 1 != pi->num_syscall_handlers)
- { /* Not the last entry.
- Move subsequent entries fwd. */
- memcpy (&pi->syscall_handlers[i], &pi->syscall_handlers[i + 1],
- (pi->num_syscall_handlers - i - 1)
- * sizeof (struct procfs_syscall_handler));
- }
+/*
+ * Function: target_notice_signals
+ *
+ * Set up to trace signals in the child process.
+ */
- pi->syscall_handlers = xrealloc (pi->syscall_handlers,
- (pi->num_syscall_handlers - 1)
- * sizeof (struct procfs_syscall_handler));
- pi->num_syscall_handlers--;
- return;
- }
+static void
+procfs_notice_signals (pid)
+ int pid;
+{
+ sigset_t signals;
+ procinfo *pi = find_procinfo_or_die (PIDGET (pid), 0);
- if (!errok)
- error ("procfs_clear_syscall_trap: Couldn't find handler for sys call %d",
- syscall_num);
+ if (proc_get_traced_signals (pi, &signals) &&
+ register_gdb_signals (pi, &signals))
+ return;
+ else
+ proc_error (pi, "notice_signals", __LINE__);
}
/*
+ * Function: target_files_info
+ *
+ * Print status information about the child process.
+ */
- LOCAL FUNCTION
+static void
+procfs_files_info (ignore)
+ struct target_ops *ignore;
+{
+ printf_filtered ("\tUsing the running image of %s %s via /proc.\n",
+ attach_flag? "attached": "child",
+ target_pid_to_str (inferior_pid));
+}
- procfs_set_syscall_trap -- arrange for a function to be called when the
- child executes the specified system call.
+/*
+ * Function: target_open
+ *
+ * A dummy: you don't open procfs.
+ */
- SYNOPSIS
+static void
+procfs_open (args, from_tty)
+ char *args;
+ int from_tty;
+{
+ error ("Use the \"run\" command to start a Unix child process.");
+}
+
+/*
+ * Function: target_can_run
+ *
+ * This tells GDB that this target vector can be invoked
+ * for "run" or "attach".
+ */
+
+int procfs_suppress_run = 0; /* Non-zero if procfs should pretend not to
+ be a runnable target. Used by targets
+ that can sit atop procfs, such as solaris
+ thread support. */
- void procfs_set_syscall_trap (struct procinfo *, int syscall_num, int flags,
- syscall_func_t *function)
- DESCRIPTION
+static int
+procfs_can_run ()
+{
+ /* This variable is controlled by modules that sit atop procfs that
+ may layer their own process structure atop that provided here.
+ sol-thread.c does this because of the Solaris two-level thread
+ model. */
+
+ /* NOTE: possibly obsolete -- use the thread_stratum approach instead. */
+
+ return !procfs_suppress_run;
+}
- This function sets up an entry and/or exit trap for the specified system
- call. When the child executes the specified system call, your function
- will be called with the call #, a flag that indicates entry or exit, and
- pointers to rtnval and statval (which are used by procfs_wait). The
- function should return non-zero if something interesting happened, zero
- otherwise.
+/*
+ * Function: target_stop
+ *
+ * Stop the child process asynchronously, as when the
+ * gdb user types control-c or presses a "stop" button.
+ *
+ * Works by sending kill(SIGINT) to the child's process group.
*/
static void
-procfs_set_syscall_trap (pi, syscall_num, flags, func)
- struct procinfo *pi;
- int syscall_num;
- int flags;
- syscall_func_t *func;
+procfs_stop ()
{
- sysset_t sysset;
+ extern pid_t inferior_process_group;
-#ifndef UNIXWARE
- if (flags & PROCFS_SYSCALL_ENTRY)
- {
- if (ioctl (pi->ctl_fd, PIOCGENTRY, &sysset) < 0)
- {
- print_sys_errmsg (pi->pathname, errno);
- error ("PIOCGENTRY failed");
- }
+ kill (-inferior_process_group, SIGINT);
+}
- praddset (&sysset, syscall_num);
+/*
+ * Function: unconditionally_kill_inferior
+ *
+ * Make it die. Wait for it to die. Clean up after it.
+ * Note: this should only be applied to the real process,
+ * not to an LWP, because of the check for parent-process.
+ * If we need this to work for an LWP, it needs some more logic.
+ */
- if (ioctl (pi->ctl_fd, PIOCSENTRY, &sysset) < 0)
- {
- print_sys_errmsg (pi->pathname, errno);
- error ("PIOCSENTRY failed");
- }
- }
+static void
+unconditionally_kill_inferior (pi)
+ procinfo *pi;
+{
+ int parent_pid;
- if (flags & PROCFS_SYSCALL_EXIT)
+ parent_pid = proc_parent_pid (pi);
+#ifdef PROCFS_NEED_CLEAR_CURSIG_FOR_KILL
+ /* FIXME: use access functions */
+ /* Alpha OSF/1-3.x procfs needs a clear of the current signal
+ before the PIOCKILL, otherwise it might generate a corrupted core
+ file for the inferior. */
+ if (ioctl (pi->ctl_fd, PIOCSSIG, NULL) < 0)
{
- if (ioctl (pi->ctl_fd, PIOCGEXIT, &sysset) < 0)
- {
- procfs_clear_syscall_trap (pi, syscall_num, 1);
- print_sys_errmsg (pi->pathname, errno);
- error ("PIOCGEXIT failed");
- }
-
- praddset (&sysset, syscall_num);
-
- if (ioctl (pi->ctl_fd, PIOCSEXIT, &sysset) < 0)
- {
- procfs_clear_syscall_trap (pi, syscall_num, 1);
- print_sys_errmsg (pi->pathname, errno);
- error ("PIOCSEXIT failed");
- }
+ printf_filtered ("unconditionally_kill: SSIG failed!\n");
}
#endif
+#ifdef PROCFS_NEED_PIOCSSIG_FOR_KILL
+ /* Alpha OSF/1-2.x procfs needs a PIOCSSIG call with a SIGKILL signal
+ to kill the inferior, otherwise it might remain stopped with a
+ pending SIGKILL.
+ We do not check the result of the PIOCSSIG, the inferior might have
+ died already. */
+ {
+ struct siginfo newsiginfo;
- if (!pi->syscall_handlers)
- {
- pi->syscall_handlers = xmalloc (sizeof (struct procfs_syscall_handler));
- pi->syscall_handlers[0].syscall_num = syscall_num;
- pi->syscall_handlers[0].func = func;
- pi->num_syscall_handlers = 1;
- }
- else
- {
- int i;
+ memset ((char *) &newsiginfo, 0, sizeof (newsiginfo));
+ newsiginfo.si_signo = SIGKILL;
+ newsiginfo.si_code = 0;
+ newsiginfo.si_errno = 0;
+ newsiginfo.si_pid = getpid ();
+ newsiginfo.si_uid = getuid ();
+ /* FIXME: use proc_set_current_signal */
+ ioctl (pi->ctl_fd, PIOCSSIG, &newsiginfo);
+ }
+#else /* PROCFS_NEED_PIOCSSIG_FOR_KILL */
+ if (!proc_kill (pi, SIGKILL))
+ proc_warn (pi, "unconditionally_kill, proc_kill", __LINE__);
+#endif /* PROCFS_NEED_PIOCSSIG_FOR_KILL */
+ destroy_procinfo (pi);
- for (i = 0; i < pi->num_syscall_handlers; i++)
- if (pi->syscall_handlers[i].syscall_num == syscall_num)
- {
- pi->syscall_handlers[i].func = func;
- return;
- }
+ /* If pi is GDB's child, wait for it to die. */
+ if (parent_pid == getpid ())
+ /* FIXME: should we use waitpid to make sure we get the right event?
+ Should we check the returned event? */
+ {
+ int status, ret;
- pi->syscall_handlers = xrealloc (pi->syscall_handlers, (i + 1)
- * sizeof (struct procfs_syscall_handler));
- pi->syscall_handlers[i].syscall_num = syscall_num;
- pi->syscall_handlers[i].func = func;
- pi->num_syscall_handlers++;
+#if 0
+ ret = waitpid (pi->pid, &status, 0);
+#else
+ wait (NULL);
+#endif
}
}
-#ifdef SYS_lwp_create
-
/*
+ * Function: target_kill_inferior
+ *
+ * We're done debugging it, and we want it to go away.
+ * Then we want GDB to forget all about it.
+ */
- LOCAL FUNCTION
-
- procfs_lwp_creation_handler - handle exit from the _lwp_create syscall
-
- SYNOPSIS
-
- int procfs_lwp_creation_handler (pi, syscall_num, why, rtnvalp, statvalp)
-
- DESCRIPTION
-
- This routine is called both when an inferior process and it's new lwp
- are about to finish a _lwp_create() system call. This is the system
- call that Solaris uses to create a lightweight process. When the
- target process gets this event, we can look at sysarg[2] to find the
- new childs lwp ID, and create a procinfo struct from that. After that,
- we pretend that we got a SIGTRAP, and return non-zero to tell
- procfs_wait to wake up. Subsequently, wait_for_inferior gets woken up,
- sees the new process and continues it.
+static void
+procfs_kill_inferior ()
+{
+ if (inferior_pid != 0) /* ? */
+ {
+ /* Find procinfo for main process */
+ procinfo *pi = find_procinfo (PIDGET (inferior_pid), 0);
- When we see the child exiting from lwp_create, we just contine it,
- since everything was handled when the parent trapped.
+ if (pi)
+ unconditionally_kill_inferior (pi);
+ target_mourn_inferior ();
+ }
+}
- NOTES
- In effect, we are only paying attention to the parent's completion of
- the lwp_create syscall. If we only paid attention to the child
- instead, then we wouldn't detect the creation of a suspended thread.
+/*
+ * Function: target_mourn_inferior
+ *
+ * Forget we ever debugged this thing!
*/
-static int
-procfs_lwp_creation_handler (pi, syscall_num, why, rtnvalp, statvalp)
- struct procinfo *pi;
- int syscall_num;
- int why;
- int *rtnvalp;
- int *statvalp;
+static void
+procfs_mourn_inferior ()
{
- int lwp_id;
- struct procinfo *childpi;
-#ifdef UNIXWARE
- struct proc_ctl pctl;
-#endif
+ procinfo *pi;
- /* We've just detected the completion of an lwp_create system call. Now we
- need to setup a procinfo struct for this thread, and notify the thread
- system of the new arrival. */
+ if (inferior_pid != 0)
+ {
+ /* Find procinfo for main process */
+ pi = find_procinfo (PIDGET (inferior_pid), 0);
+ if (pi)
+ destroy_procinfo (pi);
+ }
+ unpush_target (&procfs_ops);
+ generic_mourn_inferior ();
+}
- /* If lwp_create failed, then nothing interesting happened. Continue the
- process and go back to sleep. */
+/*
+ * Function: init_inferior
+ *
+ * When GDB forks to create a runnable inferior process,
+ * this function is called on the parent side of the fork.
+ * It's job is to do whatever is necessary to make the child
+ * ready to be debugged, and then wait for the child to synchronize.
+ */
-#ifdef UNIXWARE
- /* Joel ... can you check this logic out please? JKJ */
- if (pi->prstatus.pr_lwp.pr_context.uc_mcontext.gregs[R_EFL] & 1)
- { /* _lwp_create failed */
- pctl.cmd = PCRUN;
- pctl.data = PRCFAULT;
+static void
+procfs_init_inferior (pid)
+ int pid;
+{
+ procinfo *pi;
+ sigset_t signals;
+ int fail;
- if (write (pi->ctl_fd, (char *) &pctl, sizeof (struct proc_ctl)) < 0)
- perror_with_name (pi->pathname);
+ /* This routine called on the parent side (GDB side)
+ after GDB forks the inferior. */
- return 0;
- }
-#else /* UNIXWARE */
- if (PROCFS_GET_CARRY (pi->prstatus.pr_reg))
- { /* _lwp_create failed */
- pi->prrun.pr_flags &= PRSTEP;
- pi->prrun.pr_flags |= PRCFAULT;
+ push_target (&procfs_ops);
- if (ioctl (pi->ctl_fd, PIOCRUN, &pi->prrun) != 0)
- perror_with_name (pi->pathname);
+ if ((pi = create_procinfo (pid, 0)) == NULL)
+ perror ("procfs: out of memory in 'init_inferior'");
+
+ if (!open_procinfo_files (pi, FD_CTL))
+ proc_error (pi, "init_inferior, open_proc_files", __LINE__);
+
+ /*
+ xmalloc // done
+ open_procinfo_files // done
+ link list // done
+ prfillset (trace)
+ procfs_notice_signals
+ prfillset (fault)
+ prdelset (FLTPAGE)
+ PIOCWSTOP
+ PIOCSFAULT
+ */
+
+ /* If not stopped yet, wait for it to stop. */
+ if (!(proc_flags (pi) & PR_STOPPED) &&
+ !(proc_wait_for_stop (pi)))
+ dead_procinfo (pi, "init_inferior: wait_for_stop failed", KILL);
+
+ /* Save some of the /proc state to be restored if we detach. */
+ /* FIXME: Why? In case another debugger was debugging it?
+ We're it's parent, for Ghu's sake! */
+ if (!proc_get_traced_signals (pi, &pi->saved_sigset))
+ proc_error (pi, "init_inferior, get_traced_signals", __LINE__);
+ if (!proc_get_held_signals (pi, &pi->saved_sighold))
+ proc_error (pi, "init_inferior, get_held_signals", __LINE__);
+ if (!proc_get_traced_faults (pi, &pi->saved_fltset))
+ proc_error (pi, "init_inferior, get_traced_faults", __LINE__);
+ if (!proc_get_traced_sysentry (pi, &pi->saved_entryset))
+ proc_error (pi, "init_inferior, get_traced_sysentry", __LINE__);
+ if (!proc_get_traced_sysexit (pi, &pi->saved_exitset))
+ proc_error (pi, "init_inferior, get_traced_sysexit", __LINE__);
+
+ /* Register to trace selected signals in the child. */
+ prfillset (&signals);
+ if (!register_gdb_signals (pi, &signals))
+ proc_error (pi, "init_inferior, register_signals", __LINE__);
+
+ if ((fail = procfs_debug_inferior (pi)) != 0)
+ proc_error (pi, "init_inferior (procfs_debug_inferior)", fail);
+
+ /* Turn on run-on-last-close flag so that the child
+ will die if GDB goes away for some reason. */
+ if (!proc_set_run_on_last_close (pi))
+ proc_error (pi, "init_inferior, set_RLC", __LINE__);
+
+ /* The 'process ID' we return to GDB is composed of
+ the actual process ID plus the lwp ID. */
+ inferior_pid = MERGEPID (pi->pid, proc_get_current_thread (pi));
- return 0;
- }
+#ifdef START_INFERIOR_TRAPS_EXPECTED
+ startup_inferior (START_INFERIOR_TRAPS_EXPECTED);
+#else
+ /* One trap to exec the shell, one to exec the program being debugged. */
+ startup_inferior (2);
#endif
+}
- /* At this point, the new thread is stopped at it's first instruction, and
- the parent is stopped at the exit from lwp_create. */
-
- if (pi->new_child) /* Child? */
- { /* Yes, just continue it */
-#ifdef UNIXWARE
- pctl.cmd = PCRUN;
- pctl.data = PRCFAULT;
+/*
+ * Function: set_exec_trap
+ *
+ * When GDB forks to create a new process, this function is called
+ * on the child side of the fork before GDB exec's the user program.
+ * Its job is to make the child minimally debuggable, so that the
+ * parent GDB process can connect to the child and take over.
+ * This function should do only the minimum to make that possible,
+ * and to synchronize with the parent process. The parent process
+ * should take care of the details.
+ */
- if (write (pi->ctl_fd, (char *) &pctl, sizeof (struct proc_ctl)) < 0)
-#else /* !UNIXWARE */
- pi->prrun.pr_flags &= PRSTEP;
- pi->prrun.pr_flags |= PRCFAULT;
+static void
+procfs_set_exec_trap ()
+{
+ /* This routine called on the child side (inferior side)
+ after GDB forks the inferior. It must use only local variables,
+ because it may be sharing data space with its parent. */
- if ((pi->prstatus.pr_flags & PR_ISTOP)
- && ioctl (pi->ctl_fd, PIOCRUN, &pi->prrun) != 0)
-#endif /* !UNIXWARE */
- perror_with_name (pi->pathname);
+ procinfo *pi;
+ sysset_t exitset;
+ sysset_t entryset;
- pi->new_child = 0; /* No longer new */
+ if ((pi = create_procinfo (getpid (), 0)) == NULL)
+ perror_with_name ("procfs: create_procinfo failed in child.");
- return 0;
+ if (open_procinfo_files (pi, FD_CTL) == 0)
+ {
+ proc_warn (pi, "set_exec_trap, open_proc_files", __LINE__);
+ gdb_flush (gdb_stderr);
+ /* no need to call "dead_procinfo", because we're going to exit. */
+ _exit (127);
}
- /* We're the proud parent of a new thread. Setup an exit trap for lwp_create
- in the child and continue the parent. */
-
- /* Third arg is pointer to new thread id. */
- lwp_id = read_memory_integer (
- THE_PR_LWP (pi->prstatus).pr_sysarg[2], sizeof (int));
-
- lwp_id = (lwp_id << 16) | PIDGET (pi->pid);
-
- childpi = create_procinfo (lwp_id);
-
- /* The new process has actually inherited the lwp_create syscall trap from
- it's parent, but we still have to call this to register handlers for
- that child. */
+#ifdef PRFS_STOPEXEC /* defined on OSF */
+ /* OSF method for tracing exec syscalls. Quoting:
+ Under Alpha OSF/1 we have to use a PIOCSSPCACT ioctl to trace
+ exits from exec system calls because of the user level loader. */
+ /* FIXME: make nice and maybe move into an access function. */
+ {
+ int prfs_flags;
- procfs_set_inferior_syscall_traps (childpi);
- add_thread (lwp_id);
- printf_filtered ("[New %s]\n", target_pid_to_str (lwp_id));
+ if (ioctl (pi->ctl_fd, PIOCGSPCACT, &prfs_flags) < 0)
+ {
+ proc_warn (pi, "set_exec_trap (PIOCGSPCACT)", __LINE__);
+ gdb_flush (gdb_stderr);
+ _exit (127);
+ }
+ prfs_flags |= PRFS_STOPEXEC;
- /* Continue the parent */
-#ifdef UNIXWARE
- pctl.cmd = PCRUN;
- pctl.data = PRCFAULT;
+ if (ioctl (pi->ctl_fd, PIOCSSPCACT, &prfs_flags) < 0)
+ {
+ proc_warn (pi, "set_exec_trap (PIOCSSPCACT)", __LINE__);
+ gdb_flush (gdb_stderr);
+ _exit (127);
+ }
+ }
+#else /* not PRFS_STOPEXEC */
+ /* Everyone else's (except OSF) method for tracing exec syscalls */
+ /* GW: Rationale...
+ Not all systems with /proc have all the exec* syscalls with the same
+ names. On the SGI, for example, there is no SYS_exec, but there
+ *is* a SYS_execv. So, we try to account for that. */
- if (write (pi->ctl_fd, (char *) &pctl, sizeof (struct proc_ctl)) < 0)
-#else
- pi->prrun.pr_flags &= PRSTEP;
- pi->prrun.pr_flags |= PRCFAULT;
- if (ioctl (pi->ctl_fd, PIOCRUN, &pi->prrun) != 0)
+ premptyset (&exitset);
+#ifdef SYS_exec
+ praddset (&exitset, SYS_exec);
+#endif
+#ifdef SYS_execve
+ praddset (&exitset, SYS_execve);
+#endif
+#ifdef SYS_execv
+ praddset (&exitset, SYS_execv);
#endif
- perror_with_name (pi->pathname);
-
- /* The new child may have been created in one of two states:
- SUSPENDED or RUNNABLE. If runnable, we will simply signal it to run.
- If suspended, we flag it to be continued later, when it has an event. */
- if (THE_PR_LWP (childpi->prstatus).pr_why == PR_SUSPENDED)
- childpi->new_child = 1; /* Flag this as an unseen child process */
- else
+ if (!proc_set_traced_sysexit (pi, &exitset))
{
- /* Continue the child */
-#ifdef UNIXWARE
- pctl.cmd = PCRUN;
- pctl.data = PRCFAULT;
-
- if (write (pi->ctl_fd, (char *) &pctl, sizeof (struct proc_ctl)) < 0)
-#else
- childpi->prrun.pr_flags &= PRSTEP;
- childpi->prrun.pr_flags |= PRCFAULT;
-
- if (ioctl (childpi->ctl_fd, PIOCRUN, &childpi->prrun) != 0)
-#endif
- perror_with_name (childpi->pathname);
+ proc_warn (pi, "set_exec_trap, set_traced_sysexit", __LINE__);
+ gdb_flush (gdb_stderr);
+ _exit (127);
}
- return 0;
+#endif /* PRFS_STOPEXEC */
+
+ /* FIXME: should this be done in the parent instead? */
+ /* Turn off inherit on fork flag so that all grand-children
+ of gdb start with tracing flags cleared. */
+ if (!proc_unset_inherit_on_fork (pi))
+ proc_warn (pi, "set_exec_trap, unset_inherit", __LINE__);
+
+ /* Turn off run on last close flag, so that the child process
+ cannot run away just because we close our handle on it.
+ We want it to wait for the parent to attach. */
+ if (!proc_unset_run_on_last_close (pi))
+ proc_warn (pi, "set_exec_trap, unset_RLC", __LINE__);
+
+ /* FIXME: No need to destroy the procinfo --
+ we have our own address space, and we're about to do an exec! */
+ /*destroy_procinfo (pi);*/
}
-#endif /* SYS_lwp_create */
-/* Fork an inferior process, and start debugging it with /proc. */
+/*
+ * Function: create_inferior
+ *
+ * This function is called BEFORE gdb forks the inferior process.
+ * Its only real responsibility is to set things up for the fork,
+ * and tell GDB which two functions to call after the fork (one
+ * for the parent, and one for the child).
+ *
+ * This function does a complicated search for a unix shell program,
+ * which it then uses to parse arguments and environment variables
+ * to be sent to the child. I wonder whether this code could not
+ * be abstracted out and shared with other unix targets such as
+ * infptrace?
+ */
static void
procfs_create_inferior (exec_file, allargs, env)
@@ -5623,30 +4691,30 @@ procfs_create_inferior (exec_file, allargs, env)
{
/* We will be looking down the PATH to find shell_file. If we
- just do this the normal way (via execlp, which operates by
- attempting an exec for each element of the PATH until it
- finds one which succeeds), then there will be an exec for
- each failed attempt, each of which will cause a PR_SYSEXIT
- stop, and we won't know how to distinguish the PR_SYSEXIT's
- for these failed execs with the ones for successful execs
- (whether the exec has succeeded is stored at that time in the
- carry bit or some such architecture-specific and
- non-ABI-specified place).
-
- So I can't think of anything better than to search the PATH
- now. This has several disadvantages: (1) There is a race
- condition; if we find a file now and it is deleted before we
- exec it, we lose, even if the deletion leaves a valid file
- further down in the PATH, (2) there is no way to know exactly
- what an executable (in the sense of "capable of being
- exec'd") file is. Using access() loses because it may lose
- if the caller is the superuser; failing to use it loses if
- there are ACLs or some such. */
+ just do this the normal way (via execlp, which operates by
+ attempting an exec for each element of the PATH until it
+ finds one which succeeds), then there will be an exec for
+ each failed attempt, each of which will cause a PR_SYSEXIT
+ stop, and we won't know how to distinguish the PR_SYSEXIT's
+ for these failed execs with the ones for successful execs
+ (whether the exec has succeeded is stored at that time in the
+ carry bit or some such architecture-specific and
+ non-ABI-specified place).
+
+ So I can't think of anything better than to search the PATH
+ now. This has several disadvantages: (1) There is a race
+ condition; if we find a file now and it is deleted before we
+ exec it, we lose, even if the deletion leaves a valid file
+ further down in the PATH, (2) there is no way to know exactly
+ what an executable (in the sense of "capable of being
+ exec'd") file is. Using access() loses because it may lose
+ if the caller is the superuser; failing to use it loses if
+ there are ACLs or some such. */
char *p;
char *p1;
/* FIXME-maybe: might want "set path" command so user can change what
- path is used from within GDB. */
+ path is used from within GDB. */
char *path = getenv ("PATH");
int len;
struct stat statbuf;
@@ -5655,7 +4723,7 @@ procfs_create_inferior (exec_file, allargs, env)
path = "/bin:/usr/bin";
tryname = alloca (strlen (path) + strlen (shell_file) + 2);
- for (p = path; p != NULL; p = p1 ? p1 + 1 : NULL)
+ for (p = path; p != NULL; p = p1 ? p1 + 1: NULL)
{
p1 = strchr (p, ':');
if (p1 != NULL)
@@ -5681,13 +4749,14 @@ procfs_create_inferior (exec_file, allargs, env)
/* Not found. This must be an error rather than merely passing
the file to execlp(), because execlp() would try all the
exec()s, causing GDB to get confused. */
- error ("Can't find shell %s in PATH", shell_file);
+ error ("procfs:%d -- Can't find shell %s in PATH",
+ __LINE__, shell_file);
shell_file = tryname;
}
- fork_inferior (exec_file, allargs, env,
- proc_set_exec_trap, procfs_init_inferior, NULL, shell_file);
+ fork_inferior (exec_file, allargs, env, procfs_set_exec_trap,
+ procfs_init_inferior, NULL, shell_file);
/* We are at the first instruction we care about. */
/* Pedal to the metal... */
@@ -5695,249 +4764,475 @@ procfs_create_inferior (exec_file, allargs, env)
proceed ((CORE_ADDR) -1, TARGET_SIGNAL_0, 0);
}
-/* Clean up after the inferior dies. */
+/*
+ * Function: notice_thread
+ *
+ * Callback for find_new_threads.
+ * Calls "add_thread".
+ */
-static void
-procfs_mourn_inferior ()
+static int
+procfs_notice_thread (pi, thread, ptr)
+ procinfo *pi;
+ procinfo *thread;
+ void *ptr;
{
- struct procinfo *pi;
- struct procinfo *next_pi;
+ int gdb_threadid = MERGEPID (pi->pid, thread->tid);
- for (pi = procinfo_list; pi; pi = next_pi)
- {
- next_pi = pi->next;
- unconditionally_kill_inferior (pi);
- }
+ if (!in_thread_list (gdb_threadid))
+ add_thread (gdb_threadid);
- unpush_target (&procfs_ops);
- generic_mourn_inferior ();
+ return 0;
+}
+
+/*
+ * Function: target_find_new_threads
+ *
+ * Query all the threads that the target knows about,
+ * and give them back to GDB to add to its list.
+ */
+
+void
+procfs_find_new_threads ()
+{
+ procinfo *pi;
+
+ /* Find procinfo for main process */
+ pi = find_procinfo_or_die (PIDGET (inferior_pid), 0);
+ proc_update_threads (pi);
+ proc_iterate_over_threads (pi, procfs_notice_thread, NULL);
}
+/*
+ * Function: target_thread_alive
+ *
+ * Return true if the thread is still 'alive'.
+ *
+ * This guy doesn't really seem to be doing his job.
+ * Got to investigate how to tell when a thread is really gone.
+ */
-/* Mark our target-struct as eligible for stray "run" and "attach" commands. */
static int
-procfs_can_run ()
+procfs_thread_alive (pid)
+ int pid;
{
- /* This variable is controlled by modules that sit atop procfs that may layer
- their own process structure atop that provided here. sol-thread.c does
- this because of the Solaris two-level thread model. */
+ int proc, thread;
+ procinfo *pi;
- return !procfs_suppress_run;
+ proc = PIDGET (pid);
+ thread = TIDGET (pid);
+ /* If I don't know it, it ain't alive! */
+ if ((pi = find_procinfo (proc, thread)) == NULL)
+ return 0;
+
+ /* If I can't get its status, it ain't alive!
+ What's more, I need to forget about it! */
+ if (!proc_get_status (pi))
+ {
+ destroy_procinfo (pi);
+ return 0;
+ }
+ /* I couldn't have got its status if it weren't alive, so it's alive. */
+ return 1;
}
-#ifdef TARGET_HAS_HARDWARE_WATCHPOINTS
-#ifndef UNIXWARE
-
-/* Insert a watchpoint */
-int
-procfs_set_watchpoint (pid, addr, len, rw)
+
+/*
+ * Function: target_pid_to_str
+ *
+ * Return a string to be used to identify the thread in
+ * the "info threads" display.
+ */
+
+char *
+procfs_pid_to_str (pid)
int pid;
+{
+ static char buf[80];
+ int proc, thread;
+ procinfo *pi;
+
+ proc = PIDGET (pid);
+ thread = TIDGET (pid);
+ pi = find_procinfo (proc, thread);
+
+ if (thread == 0)
+ sprintf (buf, "Process %d", proc);
+ else
+ sprintf (buf, "LWP %d", thread);
+ return &buf[0];
+}
+
+/*
+ * Function: procfs_set_watchpoint
+ * Insert a watchpoint
+ */
+
+int
+procfs_set_watchpoint (pid, addr, len, rwflag, after)
+ int pid;
CORE_ADDR addr;
- int len;
- int rw;
+ int len;
+ int rwflag;
+ int after;
{
- struct procinfo *pi;
- prwatch_t wpt;
-
- pi = find_procinfo (pid == -1 ? inferior_pid : pid, 0);
- wpt.pr_vaddr = (caddr_t) addr;
- wpt.pr_size = len;
- wpt.pr_wflags = ((rw & 1) ? MA_READ : 0) | ((rw & 2) ? MA_WRITE : 0);
- if (ioctl (pi->ctl_fd, PIOCSWATCH, &wpt) < 0)
+#ifndef UNIXWARE
+ int pflags = 0;
+ procinfo *pi;
+
+ pi = find_procinfo_or_die (pid == -1 ?
+ PIDGET (inferior_pid) : PIDGET (pid), 0);
+
+ /* Translate from GDB's flags to /proc's */
+ if (len > 0) /* len == 0 means delete watchpoint */
{
- if (errno == E2BIG)
+ switch (rwflag) { /* FIXME: need an enum! */
+ case hw_write: /* default watchpoint (write) */
+ pflags = WRITE_WATCHFLAG;
+ break;
+ case hw_read: /* read watchpoint */
+ pflags = READ_WATCHFLAG;
+ break;
+ case hw_access: /* access watchpoint */
+ pflags = READ_WATCHFLAG | WRITE_WATCHFLAG;
+ break;
+ case hw_execute: /* execution HW breakpoint */
+ pflags = EXEC_WATCHFLAG;
+ break;
+ default: /* Something weird. Return error. */
return -1;
- /* Currently it sometimes happens that the same watchpoint gets
- deleted twice - don't die in this case (FIXME please) */
+ }
+ if (after) /* Stop after r/w access is completed. */
+ pflags |= AFTER_WATCHFLAG;
+ }
+
+ if (!proc_set_watchpoint (pi, addr, len, pflags))
+ {
+ if (errno == E2BIG) /* Typical error for no resources */
+ return -1; /* fail */
+ /* GDB may try to remove the same watchpoint twice.
+ If a remove request returns no match, don't error. */
if (errno == ESRCH && len == 0)
- return 0;
- print_sys_errmsg (pi->pathname, errno);
- error ("PIOCSWATCH failed");
+ return 0; /* ignore */
+ proc_error (pi, "set_watchpoint", __LINE__);
}
+#endif
return 0;
}
+/*
+ * Function: stopped_by_watchpoint
+ *
+ * Returns non-zero if process is stopped on a hardware watchpoint fault,
+ * else returns zero.
+ */
+
int
procfs_stopped_by_watchpoint (pid)
- int pid;
+ int pid;
{
- struct procinfo *pi;
- short what;
- short why;
+ procinfo *pi;
- pi = find_procinfo (pid == -1 ? inferior_pid : pid, 0);
- if (pi->prstatus.pr_flags & (PR_STOPPED | PR_ISTOP))
+ pi = find_procinfo_or_die (pid == -1 ?
+ PIDGET (inferior_pid) : PIDGET (pid), 0);
+ if (proc_flags (pi) & (PR_STOPPED | PR_ISTOP))
{
- why = pi->prstatus.pr_why;
- what = pi->prstatus.pr_what;
- if (why == PR_FAULTED
-#if defined (FLTWATCH) && defined (FLTKWATCH)
- && (what == FLTWATCH || what == FLTKWATCH)
-#else
+ if (proc_why (pi) == PR_FAULTED)
+ {
#ifdef FLTWATCH
- && (what == FLTWATCH)
+ if (proc_what (pi) == FLTWATCH)
+ return 1;
#endif
#ifdef FLTKWATCH
- && (what == FLTKWATCH)
-#endif
+ if (proc_what (pi) == FLTKWATCH)
+ return 1;
#endif
- )
- return what;
+ }
}
return 0;
}
-#endif /* !UNIXWARE */
-#endif /* TARGET_HAS_HARDWARE_WATCHPOINTS */
-/* Why is this necessary? Shouldn't dead threads just be removed from the
- thread database? */
+#ifdef TM_I386SOL2_H
+/*
+ * Function: procfs_find_LDT_entry
+ *
+ * Input:
+ * int pid; // The GDB-style pid-plus-LWP.
+ *
+ * Return:
+ * pointer to the corresponding LDT entry.
+ */
-static int
-procfs_thread_alive (pid)
+struct ssd *
+procfs_find_LDT_entry (pid)
int pid;
{
- struct procinfo *pi, *next_pi;
+ gdb_gregset_t *gregs;
+ int key;
+ procinfo *pi;
- for (pi = procinfo_list; pi; pi = next_pi)
+ /* Find procinfo for the lwp. */
+ if ((pi = find_procinfo (PIDGET (pid), TIDGET (pid))) == NULL)
{
- next_pi = pi->next;
- if (pi->pid == pid)
- {
- if (procfs_read_status (pi)) /* alive */
- return 1;
- else
- /* defunct (exited) */
- {
- close_proc_file (pi);
- return 0;
- }
- }
+ warning ("procfs_find_LDT_entry: could not find procinfi for %d.",
+ pid);
+ return NULL;
}
- return 0;
+ /* get its general registers. */
+ if ((gregs = proc_get_gregs (pi)) == NULL)
+ {
+ warning ("procfs_find_LDT_entry: could not read gregs for %d.",
+ pid);
+ return NULL;
+ }
+ /* Now extract the GS register's lower 16 bits. */
+ key = (*gregs)[GS] & 0xffff;
+
+ /* Find the matching entry and return it. */
+ return proc_get_LDT_entry (pi, key);
}
+#endif /* TM_I386SOL2_H */
-int
-procfs_first_available ()
+
+
+static void
+info_proc_cmd (args, from_tty)
+ char *args;
+ int from_tty;
{
- struct procinfo *pi;
+ struct cleanup *old_chain;
+ procinfo *process = NULL;
+ procinfo *thread = NULL;
+ char **argv = NULL;
+ char *tmp = NULL;
+ int pid = 0;
+ int tid = 0;
- for (pi = procinfo_list; pi; pi = pi->next)
+ old_chain = make_cleanup (null_cleanup, 0);
+ if (args)
+ if ((argv = buildargv (args)) == NULL)
+ nomem (0);
+ else
+ make_cleanup ((make_cleanup_func) freeargv, argv);
+
+ while (argv != NULL && *argv != NULL)
+ {
+ if (isdigit (argv[0][0]))
+ {
+ pid = strtoul (argv[0], &tmp, 10);
+ if (*tmp == '/')
+ tid = strtoul (++tmp, NULL, 10);
+ }
+ else if (argv[0][0] == '/')
+ {
+ tid = strtoul (argv[0] + 1, NULL, 10);
+ }
+ else
+ {
+ /* [...] */
+ }
+ argv++;
+ }
+ if (pid == 0)
+ pid = PIDGET (inferior_pid);
+ if (pid == 0)
+ error ("No current process: you must name one.");
+ else
+ {
+ /* Have pid, will travel.
+ First see if it's a process we're already debugging. */
+ process = find_procinfo (pid, 0);
+ if (process == NULL)
+ {
+ /* No. So open a procinfo for it, but
+ remember to close it again when finished. */
+ process = create_procinfo (pid, 0);
+ make_cleanup ((make_cleanup_func) destroy_procinfo, process);
+ if (!open_procinfo_files (process, FD_CTL))
+ proc_error (process, "info proc, open_procinfo_files", __LINE__);
+ }
+ }
+ if (tid != 0)
+ thread = create_procinfo (pid, tid);
+
+ if (process)
{
- if (procfs_read_status (pi))
- return pi->pid;
+ printf_filtered ("process %d flags:\n", process->pid);
+ proc_prettyprint_flags (proc_flags (process), 1);
+ if (proc_flags (process) & (PR_STOPPED | PR_ISTOP))
+ proc_prettyprint_why (proc_why (process), proc_what (process), 1);
+ if (proc_get_nthreads (process) > 1)
+ printf_filtered ("Process has %d threads.\n",
+ proc_get_nthreads (process));
}
- return -1;
+ if (thread)
+ {
+ printf_filtered ("thread %d flags:\n", thread->tid);
+ proc_prettyprint_flags (proc_flags (thread), 1);
+ if (proc_flags (thread) & (PR_STOPPED | PR_ISTOP))
+ proc_prettyprint_why (proc_why (thread), proc_what (thread), 1);
+ }
+
+ do_cleanups (old_chain);
}
-int
-procfs_get_pid_fd (pid)
- int pid;
+static void
+proc_trace_syscalls (args, from_tty, entry_or_exit, mode)
+ char *args;
+ int from_tty;
+ int entry_or_exit;
+ int mode;
{
- struct procinfo *pi = find_procinfo (pid, 1);
+ procinfo *pi;
+ sysset_t *sysset;
+ int syscallnum = 0;
- if (pi == NULL)
- return -1;
+ if (inferior_pid <= 0)
+ error ("you must be debugging a process to use this command.");
- return pi->ctl_fd;
-}
+ if (args == NULL || args[0] == 0)
+ error_no_arg ("system call to trace");
-/* Send a SIGINT to the process group. This acts just like the user typed a
- ^C on the controlling terminal.
+ pi = find_procinfo_or_die (PIDGET (inferior_pid), 0);
+ if (isdigit (args[0]))
+ {
+ syscallnum = atoi (args);
+ if (entry_or_exit == PR_SYSENTRY)
+ sysset = proc_get_traced_sysentry (pi, NULL);
+ else
+ sysset = proc_get_traced_sysexit (pi, NULL);
- XXX - This may not be correct for all systems. Some may want to use
- killpg() instead of kill (-pgrp). */
+ if (sysset == NULL)
+ proc_error (pi, "proc-trace, get_traced_sysset", __LINE__);
-static void
-procfs_stop ()
+ if (mode == FLAG_SET)
+ praddset (sysset, syscallnum);
+ else
+ prdelset (sysset, syscallnum);
+
+ if (entry_or_exit == PR_SYSENTRY)
+ {
+ if (!proc_set_traced_sysentry (pi, sysset))
+ proc_error (pi, "proc-trace, set_traced_sysentry", __LINE__);
+ }
+ else
+ {
+ if (!proc_set_traced_sysexit (pi, sysset))
+ proc_error (pi, "proc-trace, set_traced_sysexit", __LINE__);
+ }
+ }
+}
+
+static void
+proc_trace_sysentry_cmd (args, from_tty)
+ char *args;
+ int from_tty;
{
- extern pid_t inferior_process_group;
+ proc_trace_syscalls (args, from_tty, PR_SYSENTRY, FLAG_SET);
+}
- kill (-inferior_process_group, SIGINT);
+static void
+proc_trace_sysexit_cmd (args, from_tty)
+ char *args;
+ int from_tty;
+{
+ proc_trace_syscalls (args, from_tty, PR_SYSEXIT, FLAG_SET);
}
-
-/* Convert a pid to printable form. */
-#ifdef TIDGET
-char *
-procfs_pid_to_str (pid)
- int pid;
+static void
+proc_untrace_sysentry_cmd (args, from_tty)
+ char *args;
+ int from_tty;
+{
+ proc_trace_syscalls (args, from_tty, PR_SYSENTRY, FLAG_RESET);
+}
+
+static void
+proc_untrace_sysexit_cmd (args, from_tty)
+ char *args;
+ int from_tty;
{
- static char buf[100];
+ proc_trace_syscalls (args, from_tty, PR_SYSEXIT, FLAG_RESET);
+}
- sprintf (buf, "Kernel thread %d", TIDGET (pid));
- return buf;
+int
+mapping_test (fd, core_addr)
+ int fd;
+ CORE_ADDR core_addr;
+{
+ printf ("File descriptor %d, base address 0x%08x\n", fd, core_addr);
+ if (fd > 0)
+ close (fd);
+ return 0;
}
-#endif /* TIDGET */
-
-static void
-init_procfs_ops ()
+void
+test_mapping_cmd (args, from_tty)
+ char *args;
+ int from_tty;
{
- procfs_ops.to_shortname = "procfs";
- procfs_ops.to_longname = "Unix /proc child process";
- procfs_ops.to_doc = "Unix /proc child process (started by the \"run\" command).";
- procfs_ops.to_open = procfs_open;
- procfs_ops.to_attach = procfs_attach;
- procfs_ops.to_detach = procfs_detach;
- procfs_ops.to_resume = procfs_resume;
- procfs_ops.to_wait = procfs_wait;
- procfs_ops.to_fetch_registers = procfs_fetch_registers;
- procfs_ops.to_store_registers = procfs_store_registers;
- procfs_ops.to_prepare_to_store = procfs_prepare_to_store;
- procfs_ops.to_xfer_memory = procfs_xfer_memory;
- procfs_ops.to_files_info = procfs_files_info;
- procfs_ops.to_insert_breakpoint = memory_insert_breakpoint;
- procfs_ops.to_remove_breakpoint = memory_remove_breakpoint;
- procfs_ops.to_terminal_init = terminal_init_inferior;
- procfs_ops.to_terminal_inferior = terminal_inferior;
- procfs_ops.to_terminal_ours_for_output = terminal_ours_for_output;
- procfs_ops.to_terminal_ours = terminal_ours;
- procfs_ops.to_terminal_info = child_terminal_info;
- procfs_ops.to_kill = procfs_kill_inferior;
- procfs_ops.to_create_inferior = procfs_create_inferior;
- procfs_ops.to_mourn_inferior = procfs_mourn_inferior;
- procfs_ops.to_can_run = procfs_can_run;
- procfs_ops.to_notice_signals = procfs_notice_signals;
- procfs_ops.to_thread_alive = procfs_thread_alive;
-#ifdef TIDGET
- procfs_ops.to_pid_to_str = procfs_pid_to_str;
-#endif
- procfs_ops.to_stop = procfs_stop;
- procfs_ops.to_stratum = process_stratum;
- procfs_ops.to_has_all_memory = 1;
- procfs_ops.to_has_memory = 1;
- procfs_ops.to_has_stack = 1;
- procfs_ops.to_has_registers = 1;
- procfs_ops.to_has_execution = 1;
- procfs_ops.to_magic = OPS_MAGIC;
+ int ret;
+ ret = proc_iterate_over_mappings (mapping_test);
+ printf ("iterate_over_mappings returned %d.\n", ret);
}
void
_initialize_procfs ()
{
-#ifdef HAVE_OPTIONAL_PROC_FS
- char procname[MAX_PROC_NAME_SIZE];
- int fd;
-
- /* If we have an optional /proc filesystem (e.g. under OSF/1),
- don't add procfs support if we cannot access the running
- GDB via /proc. */
- sprintf (procname, STATUS_PROC_NAME_FMT, getpid ());
- if ((fd = open (procname, O_RDONLY)) < 0)
- return;
- close (fd);
-#endif
-
init_procfs_ops ();
add_target (&procfs_ops);
+ add_info ("proc", info_proc_cmd,
+ "Show /proc process information about any running process.\
+Default is the process being debugged.");
+ add_com ("proc-trace-entry", no_class, proc_trace_sysentry_cmd,
+ "Give a trace of entries into the syscall.");
+ add_com ("proc-trace-exit", no_class, proc_trace_sysexit_cmd,
+ "Give a trace of exits from the syscall.");
+ add_com ("proc-untrace-entry", no_class, proc_untrace_sysentry_cmd,
+ "Cancel a trace of entries into the syscall.");
+ add_com ("proc-untrace-exit", no_class, proc_untrace_sysexit_cmd,
+ "Cancel a trace of exits from the syscall.");
+
+ add_com ("test-mapping", no_class, test_mapping_cmd,
+ "test iterate-over-mappings");
+}
+
+/* =================== END, GDB "MODULE" =================== */
+
- add_info ("processes", info_proc,
- "Show process status information using /proc entry.\n\
-Specify process id or use current inferior by default.\n\
-Specify keywords for detailed information; default is summary.\n\
-Keywords are: `all', `faults', `flags', `id', `mappings', `signals',\n\
-`status', `syscalls', and `times'.\n\
-Unambiguous abbreviations may be used.");
- init_syscall_table ();
+/* miscelaneous stubs: */
+/* The following satisfy a few random symbols mostly created by */
+/* the solaris threads implementation, which I will chase down */
+/* later. */
+
+/*
+ * Return a pid for which we guarantee
+ * we will be able to find a 'live' procinfo.
+ */
+
+int
+procfs_first_available ()
+{
+ if (procinfo_list)
+ return procinfo_list->pid;
+ else
+ return -1;
+}
+
+int
+procfs_get_pid_fd (pid)
+ int pid;
+{
+ procinfo *pi;
+
+ if (pid == -1 && inferior_pid != 0)
+ pi = find_procinfo (PIDGET (inferior_pid), 0);
+ else
+ pi = find_procinfo (PIDGET (pid), 0);
+
+ if (pi)
+ return pi->ctl_fd;
+ else
+ return -1;
}
diff --git a/gdb/rdi-share/ardi.c b/gdb/rdi-share/ardi.c
index f7a391e..d1dc191 100644
--- a/gdb/rdi-share/ardi.c
+++ b/gdb/rdi-share/ardi.c
@@ -392,6 +392,7 @@ static void (*old_handler)();
#endif
static bool boot_interrupted = FALSE;
+static volatile bool interrupt_request = FALSE;
static void ardi_sigint_handler(int sig) {
#ifdef DEBUG
@@ -401,6 +402,7 @@ static void ardi_sigint_handler(int sig) {
IGNORE(sig);
#endif
boot_interrupted = TRUE;
+ interrupt_request = TRUE;
#ifndef __unix
signal(SIGINT, ardi_sigint_handler);
#endif
@@ -1306,7 +1308,6 @@ static int HandleStoppedMessage(Packet *packet, void *stateptr) {
return RDIError_NoError;
}
-static volatile bool interrupt_request = FALSE;
static void interrupt_target( void )
{
@@ -1397,6 +1398,7 @@ static int angel_RDI_ExecuteOrStep(PointHandle *handle, word type,
angel_DebugPrint("Waiting for program to finish...\n");
#endif
+ signal(SIGINT, ardi_sigint_handler);
while( executing )
{
if (interrupt_request)
@@ -1406,6 +1408,8 @@ static int angel_RDI_ExecuteOrStep(PointHandle *handle, word type,
}
Adp_AsynchronousProcessing( async_block_on_nothing );
}
+ signal(SIGINT, SIG_IGN);
+
#ifdef TEST_DC_APPL
Adp_Install_DC_Appl_Handler( NULL );
diff --git a/gdb/rdi-share/devsw.c b/gdb/rdi-share/devsw.c
index b48c337..ea666a1 100644
--- a/gdb/rdi-share/devsw.c
+++ b/gdb/rdi-share/devsw.c
@@ -17,6 +17,7 @@
#include <string.h>
#include "adp.h"
+#include "sys.h"
#include "hsys.h"
#include "rxtx.h"
#include "drivers.h"
@@ -107,6 +108,7 @@ static void dumpPacket(FILE *fp, char *label, struct data_packet *p)
{
unsigned r;
int i;
+ unsigned char channel;
if (!fp)
return;
@@ -116,12 +118,14 @@ static void dumpPacket(FILE *fp, char *label, struct data_packet *p)
fprintf(fp,"%02x ",p->data[i]);
fprintf(fp,"\n");
+ channel = p->data[0];
+
r = WordAt(p->data+4);
fprintf(fp,"R=%08x ",r);
fprintf(fp,"%s ", r&0x80000000 ? "H<-T" : "H->T");
- switch ((r>>16) & 0xff)
+ switch (channel)
{
case CI_PRIVATE: fprintf(fp,"CI_PRIVATE: "); break;
case CI_HADP: fprintf(fp,"CI_HADP: "); break;
@@ -176,6 +180,28 @@ static void dumpPacket(FILE *fp, char *label, struct data_packet *p)
case ADP_Stopped: fprintf(fp," ADP_Stopped "); break;
case ADP_TDCC_ToHost: fprintf(fp," ADP_TDCC_ToHost "); break;
case ADP_TDCC_FromHost: fprintf(fp," ADP_TDCC_FromHost "); break;
+
+ case CL_Unrecognised: fprintf(fp," CL_Unrecognised "); break;
+ case CL_WriteC: fprintf(fp," CL_WriteC "); break;
+ case CL_Write0: fprintf(fp," CL_Write0 "); break;
+ case CL_ReadC: fprintf(fp," CL_ReadC "); break;
+ case CL_System: fprintf(fp," CL_System "); break;
+ case CL_GetCmdLine: fprintf(fp," CL_GetCmdLine "); break;
+ case CL_Clock: fprintf(fp," CL_Clock "); break;
+ case CL_Time: fprintf(fp," CL_Time "); break;
+ case CL_Remove: fprintf(fp," CL_Remove "); break;
+ case CL_Rename: fprintf(fp," CL_Rename "); break;
+ case CL_Open: fprintf(fp," CL_Open "); break;
+ case CL_Close: fprintf(fp," CL_Close "); break;
+ case CL_Write: fprintf(fp," CL_Write "); break;
+ case CL_WriteX: fprintf(fp," CL_WriteX "); break;
+ case CL_Read: fprintf(fp," CL_Read "); break;
+ case CL_ReadX: fprintf(fp," CL_ReadX "); break;
+ case CL_Seek: fprintf(fp," CL_Seek "); break;
+ case CL_Flen: fprintf(fp," CL_Flen "); break;
+ case CL_IsTTY: fprintf(fp," CL_IsTTY "); break;
+ case CL_TmpNam: fprintf(fp," CL_TmpNam "); break;
+
default: fprintf(fp," BadReason "); break;
}
@@ -410,7 +436,7 @@ AdpErrs DevSW_Match(const DeviceDescr *device, const char *name,
return (device->DeviceMatch(name, arg) == -1) ? adp_failed : adp_ok;
}
-AdpErrs DevSW_Close(const DeviceDescr *device, const DevChanID type)
+AdpErrs DevSW_Close (DeviceDescr *device, const DevChanID type)
{
DevSWState *ds = (DevSWState *)(device->SwitcherState);
Packet *pk;
diff --git a/gdb/rdi-share/devsw.h b/gdb/rdi-share/devsw.h
index 749e7e6..6a2279d 100644
--- a/gdb/rdi-share/devsw.h
+++ b/gdb/rdi-share/devsw.h
@@ -160,7 +160,7 @@ AdpErrs DevSW_Match(const DeviceDescr *device, const char *name,
* OK: adp_ok
* Error: adp_device_not_open
*/
-AdpErrs DevSW_Close(const DeviceDescr *device, const DevChanID type);
+AdpErrs DevSW_Close(DeviceDescr *device, const DevChanID type);
/*
* Function: DevSW_Read
diff --git a/gdb/rdi-share/etherdrv.c b/gdb/rdi-share/etherdrv.c
index d9c5c0f..b3156b2 100644
--- a/gdb/rdi-share/etherdrv.c
+++ b/gdb/rdi-share/etherdrv.c
@@ -266,9 +266,12 @@ static int open_socket(void)
static void fetch_ports(void)
{
int i;
- const char ctrlpacket[] = CTRL_MAGIC;
- CtrlResponse response;
+ char ctrlpacket[10];
+ CtrlResponse response;
+ memset (ctrlpacket, 0, 10);
+ strcpy (ctrlpacket, CTRL_MAGIC);
+ memset (response, 0, sizeof(CtrlResponse));
/*
* we will try 3 times to elicit a response from the target
*/
diff --git a/gdb/sol-thread.c b/gdb/sol-thread.c
index d896f8e..71e9216 100644
--- a/gdb/sol-thread.c
+++ b/gdb/sol-thread.c
@@ -1446,6 +1446,7 @@ sol_find_new_threads ()
printf_filtered ("No process.\n");
return;
}
+ procfs_find_new_threads (); /* first find new kernel threads. */
p_td_ta_thr_iter (main_ta, sol_find_new_threads_callback, (void *) 0,
TD_THR_ANY_STATE, TD_THR_LOWEST_PRIORITY,
TD_SIGNO_MASK, TD_THR_ANY_USER_FLAGS);
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 578841d..3e62201 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,16 @@
+2000-01-04 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ From Jim Kingdon <kingdon@redhat.com>:
+
+ * gdb.c++/annota2.exp: Fix "delete bps" test to wait for the
+ prompt (cleanup rather than necessity, but still might keep output
+ from spilling to next test).
+
+2000-01-02 Fred Fish <fnf@cygnus.com>
+
+ * gdb.base/ptype.c (FALSE, TRUE): #undef these to avoid clash on
+ AIX, which defines them in <sys/types.h>.
+
1999-12-16 Stan Shebs <shebs@andros.cygnus.com>
* gdb.base/default.exp: Match arm* etc instead of arm in "info
diff --git a/gdb/testsuite/gdb.base/callfuncs.exp b/gdb/testsuite/gdb.base/callfuncs.exp
index 397a255..8d43ec6 100644
--- a/gdb/testsuite/gdb.base/callfuncs.exp
+++ b/gdb/testsuite/gdb.base/callfuncs.exp
@@ -271,7 +271,7 @@ if { $hp_aCC_compiler } {
}
}
-gdb_test "next" ".*"
+gdb_test "next" "t_structs_c\\(struct_val1\\);.*"
do_function_calls
return 0
diff --git a/gdb/testsuite/gdb.base/ptype.c b/gdb/testsuite/gdb.base/ptype.c
index 07d6afe..7b8ca24 100644
--- a/gdb/testsuite/gdb.base/ptype.c
+++ b/gdb/testsuite/gdb.base/ptype.c
@@ -212,6 +212,8 @@ enum colors {yellow, purple, pink} nonprimary;
enum {chevy, ford} clunker;
enum cars {bmw, porsche} sportscar;
+#undef FALSE
+#undef TRUE
typedef enum {FALSE, TRUE} boolean;
boolean v_boolean;
/*note: aCC has bool type predefined with 'false' and 'true'*/
diff --git a/gdb/testsuite/gdb.c++/annota2.exp b/gdb/testsuite/gdb.c++/annota2.exp
index 1e25c5d..91f24a1 100644
--- a/gdb/testsuite/gdb.c++/annota2.exp
+++ b/gdb/testsuite/gdb.c++/annota2.exp
@@ -139,7 +139,7 @@ gdb_expect {
-re ".*Delete all breakpoints. \\(y or n\\) \r\n\032\032query.*$" {
send_gdb "y\n"
gdb_expect {
- -re " " { pass "delete bps" }
+ -re " .*$gdb_prompt$" { pass "delete bps" }
-re ".*$gdb_prompt$" { fail "delete bps" }
timeout { fail "delete bps (timeout)" }
}