import gdb-1999-05-25 snapshot
authorJason Molenda <jmolenda@apple.com>
Tue, 25 May 1999 18:09:09 +0000 (18:09 +0000)
committerJason Molenda <jmolenda@apple.com>
Tue, 25 May 1999 18:09:09 +0000 (18:09 +0000)
121 files changed:
gdb/ChangeLog
gdb/Makefile.in
gdb/alpha-tdep.c
gdb/annotate.c
gdb/arm-tdep.c
gdb/ax-general.c
gdb/blockframe.c
gdb/breakpoint.c
gdb/c-lang.c
gdb/c-typeprint.c
gdb/ch-lang.c
gdb/coffread.c
gdb/command.c
gdb/complaints.c
gdb/config/a29k/tm-a29k.h
gdb/config/alpha/tm-alpha.h
gdb/config/arc/tm-arc.h
gdb/config/arm/tm-arm.h
gdb/config/convex/tm-convex.h
gdb/config/d10v/tm-d10v.h
gdb/config/d30v/tm-d30v.h
gdb/config/fr30/tm-fr30.h
gdb/config/gould/tm-np1.h
gdb/config/gould/tm-pn.h
gdb/config/h8300/tm-h8300.h
gdb/config/h8500/tm-h8500.h
gdb/config/i386/tm-i386.h
gdb/config/i386/tm-i386v.h
gdb/config/i386/tm-sun386.h
gdb/config/i960/tm-i960.h
gdb/config/m32r/tm-m32r.h
gdb/config/m68k/tm-delta68.h
gdb/config/m68k/tm-isi.h
gdb/config/m68k/tm-m68k.h
gdb/config/m68k/tm-news.h
gdb/config/m88k/tm-m88k.h
gdb/config/mips/tm-mips.h
gdb/config/mn10200/tm-mn10200.h
gdb/config/mn10300/tm-mn10300.h
gdb/config/ns32k/tm-merlin.h
gdb/config/ns32k/tm-umax.h
gdb/config/pa/tm-hppa.h
gdb/config/powerpc/tm-ppc-eabi.h
gdb/config/pyr/tm-pyr.h
gdb/config/rs6000/tm-rs6000.h
gdb/config/sh/tm-sh.h
gdb/config/sparc/tm-sp64.h
gdb/config/sparc/tm-sparc.h
gdb/config/tahoe/tm-tahoe.h
gdb/config/tic80/tm-tic80.h
gdb/config/v850/tm-v850.h
gdb/config/vax/tm-vax.h
gdb/config/w65/tm-w65.h
gdb/config/z8k/tm-z8k.h
gdb/convex-tdep.c
gdb/corefile.c
gdb/cp-valprint.c
gdb/d10v-tdep.c
gdb/dbxread.c
gdb/defs.h
gdb/demangle.c
gdb/doc/ChangeLog
gdb/doc/gdbint.texinfo
gdb/elfread.c
gdb/event-loop.c
gdb/event-loop.h
gdb/event-top.c
gdb/f-lang.c
gdb/f-valprint.c
gdb/findvar.c
gdb/fr30-tdep.c
gdb/gdbarch.c
gdb/gdbarch.h
gdb/i386-tdep.c
gdb/infcmd.c
gdb/inflow.c
gdb/infrun.c
gdb/inftarg.c
gdb/jv-lang.c
gdb/jv-typeprint.c
gdb/jv-valprint.c
gdb/language.c
gdb/m2-lang.c
gdb/m68k-tdep.c
gdb/main.c
gdb/maint.c
gdb/mdebugread.c
gdb/mipsread.c
gdb/nlmread.c
gdb/ns32k-tdep.c
gdb/os9kread.c
gdb/parse.c
gdb/parser-defs.h
gdb/remote-d10v.c
gdb/remote-sim.c
gdb/remote.c
gdb/rs6000-tdep.c
gdb/scm-lang.c
gdb/serial.c
gdb/sh-tdep.c
gdb/stabsread.c
gdb/stack.c
gdb/symfile.c
gdb/symtab.c
gdb/tahoe-tdep.c
gdb/target.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/annota1.exp
gdb/testsuite/gdb.base/annota2.cc
gdb/testsuite/gdb.base/annota2.exp
gdb/thread.c
gdb/top.c
gdb/top.h
gdb/tracepoint.c
gdb/typeprint.c
gdb/utils.c
gdb/valops.c
gdb/value.h
gdb/vax-tdep.c
sim/mcore/ChangeLog
sim/mcore/interp.c

index 1801eaed2e301fc56b4ef67bec9be2207453ec2e..8bd37ad8f89cb97a7bf587398f82ff1b01115c85 100644 (file)
@@ -1,3 +1,256 @@
+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.
+
+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.
+       
+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>
 
        * monitor.c (monitor_open): Only assume we have eight
        
 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.
+       * 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>
 
index 3616cb455acae0f0b092b05317936ccdd807980c..3a76eee82a583e72f2b03a6682e130aa0b352a8e 100644 (file)
@@ -219,7 +219,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 = 19990519
+VERSION = 19990525
 DIST=gdb
 
 LINT=/usr/5bin/lint
@@ -1255,7 +1255,7 @@ m88k-tdep.o: m88k-tdep.c $(defs_h) $(gdbcore_h) $(inferior_h)
 
 mac-nat.o: mac-nat.c $(defs_h) gdb_string.h
 
-main.o: main.c top.h $(defs_h) gdb_string.h
+main.o: main.c top.h $(defs_h) gdb_string.h $(event_loop_h)
 
 maint.o: maint.c $(defs_h) $(gdbcmd_h) $(gdbtypes_h) $(symtab_h) language.h \
        $(expression_h) objfiles.h symfile.h
index 9b4716a59afd771620cb2a96579617dbcdb056c8..99fde377a75c22c6b1afe0b6c8f20dbd2b869927 100644 (file)
@@ -59,6 +59,10 @@ static CORE_ADDR after_prologue PARAMS ((CORE_ADDR pc,
 static int alpha_in_prologue PARAMS ((CORE_ADDR pc,
                                alpha_extra_func_info_t proc_desc));
 
+static int alpha_about_to_return PARAMS ((CORE_ADDR pc));
+
+void _initialize_alpha_tdep PARAMS ((void));
+
 /* Heuristic_proc_start may hunt through the text section for a long
    time across a 2400 baud serial line.  Allows the user to limit this
    search.  */
@@ -1395,7 +1399,6 @@ alpha_call_dummy_address ()
     return SYMBOL_VALUE_ADDRESS (sym) + 4;
 }
 
-void _initialize_alpha_tdep PARAMS ((void));
 void
 _initialize_alpha_tdep ()
 {
index 5cde62607c0d69f0a9df89fe108c5f77ab418589..3b4ab3c841117ce2de43b22d6d61ae0469f7540c 100644 (file)
@@ -27,6 +27,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 /* Prototypes for local functions. */
 
+extern void _initialize_annotate PARAMS ((void));
+
 static void print_value_flags PARAMS ((struct type *));
 
 static void breakpoint_changed PARAMS ((struct breakpoint *));
index d6970a2d9b84ea2ed18a5837e31bcbc9fea5fbc5..993e4bfe858fe9f667ed07526434ce995dd974c3 100644 (file)
@@ -137,6 +137,19 @@ arm_saved_pc_after_call (frame)
   return ADDR_BITS_REMOVE (read_register (LR_REGNUM));
 }
 
+int
+arm_frameless_function_invocation (fi)
+     struct frame_info *fi;
+{
+  int frameless;
+  CORE_ADDR func_start, after_prologue;
+  func_start = (get_pc_function_start ((fi)->pc) + FUNCTION_START_OFFSET);
+  after_prologue = func_start;
+  SKIP_PROLOGUE (after_prologue);
+  frameless = (after_prologue == func_start);
+  return frameless;
+}
+
 /* A typical Thumb prologue looks like this:
         push    {r7, lr}
         add     sp, sp, #-28
index 30022a376e2917db4e02f79e2802fa790f8cdceb..072817d73d42aba1ae305b92ad38e127f6ec9df5 100644 (file)
@@ -27,6 +27,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 #include "value.h"
 
+static void grow_expr PARAMS ((struct agent_expr *x, int n));
+
+static void append_const PARAMS ((struct agent_expr *x, LONGEST val, int n));
+
+static LONGEST read_const PARAMS ((struct agent_expr *x, int o, int n));
+
+static void generic_ext PARAMS ((struct agent_expr *x, enum agent_op op, int n));
 \f
 /* Functions for building expressions.  */
 
index 71d19e3cdfebc47f0a84de14a871b7b43223e035..0ead9483fa9dcb17e947b206e3fff513555f1c70 100644 (file)
@@ -381,17 +381,16 @@ get_prev_frame (next_frame)
      define this macro to take two args; a frameinfo pointer
      identifying a frame and a variable to set or clear if it is
      or isn't leafless.  */
-#ifdef FRAMELESS_FUNCTION_INVOCATION
+
   /* Still don't want to worry about this except on the innermost
      frame.  This macro will set FROMLEAF if NEXT_FRAME is a
      frameless function invocation.  */
   if (!(next_frame->next))
     {
-      FRAMELESS_FUNCTION_INVOCATION (next_frame, fromleaf);
+      fromleaf = FRAMELESS_FUNCTION_INVOCATION (next_frame);
       if (fromleaf)
        address = FRAME_FP (next_frame);
     }
-#endif
 
   if (!fromleaf)
     {
index d410a5775244606b3fcdd3c8a1bf6fcb431d5b51..b73305ad19c16d40d18479b6f431e31dea61f3af 100644 (file)
@@ -2713,6 +2713,7 @@ breakpoint_1 (bnum, allflag)
   static char bpenables[] = "nyn";
   char wrap_indent[80];
 
+
   ALL_BREAKPOINTS (b)
     if (bnum == -1
        || bnum == b->number)
index e7aa05574caecfae1f49fa1838d6aa657146cc8d..efed49dbdf8f9fc73fc4b86626795606c79aa108 100644 (file)
@@ -25,6 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #include "language.h"
 #include "c-lang.h"
 
+extern void _initialize_c_language PARAMS ((void));
 static void c_emit_char PARAMS ((int c, GDB_FILE *stream, int quoter));
 
 /* Print the character C on STREAM as part of the contents of a literal
index c0d0333eb6adabd36b3976cfb4281add185e7293..52569f8fc53c6ba37c4567d4704b4ec25cb0c633 100644 (file)
@@ -41,6 +41,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 /* Flag indicating target was compiled by HP compiler */
 extern int hp_som_som_object_present;
 
+static void cp_type_print_method_args PARAMS ((struct type **args, char *prefix, char *varstring, int staticp, GDB_FILE *stream));
+
 static void
 c_type_print_args PARAMS ((struct type *, GDB_FILE *));
 
@@ -203,7 +205,7 @@ cp_type_print_derivation_info (stream, type)
 }
 /* Print the C++ method arguments ARGS to the file STREAM.  */
  
-void
+static void
 cp_type_print_method_args (args, prefix, varstring, staticp, stream)
      struct type **args;
      char *prefix;
index c54e8bb3619319eb69bb1e16547a9b280ea09ddc..d151749f03fffcdf1633f8ccaaa07f0ec386d54d 100644 (file)
@@ -26,6 +26,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #include "language.h"
 #include "ch-lang.h"
 
+extern void _initialize_chill_language PARAMS ((void));
+
 static value_ptr
 evaluate_subexp_chill PARAMS ((struct type *, struct expression *, int *, enum noside));
 
index ae1decaf728e374b19eee77a66de925fc16845db..1a63cfb755280e6c66c589b712a63afc4208c605 100644 (file)
@@ -42,6 +42,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #include "complaints.h"
 #include "target.h"
 
+extern void _initialize_coffread PARAMS ((void));
+
 struct coff_symfile_info {
   file_ptr min_lineno_offset;          /* Where in file lowest line#s are */
   file_ptr max_lineno_offset;          /* 1+last byte of line#s in file */
index fc758e5f5fb2a0a54072390e6217bc66ff400698..0b095d9afad59e2ffdbcd3bf937f36d064646ba7 100644 (file)
@@ -51,6 +51,12 @@ static int parse_binary_operation PARAMS ((char *));
 
 static void print_doc_line PARAMS ((GDB_FILE *, char *));
 
+static struct cmd_list_element *find_cmd PARAMS ((char *command,
+                                                 int len,
+                                                 struct cmd_list_element *clist,
+                                                 int ignore_help_classes,
+                                                 int *nfound));
+
 void _initialize_command PARAMS ((void));
 
 /* Add element named NAME.
@@ -568,6 +574,7 @@ help_cmd_list (list, class, prefix, recurse, stream)
 static struct cmd_list_element *
 find_cmd(command, len, clist, ignore_help_classes, nfound)
      char *command;
+     int len;
      struct cmd_list_element *clist;
      int ignore_help_classes;
      int *nfound;
index e38038d26fb338979e7f5855cb402d6c3c47fc96..0a838a3a709a9956e326324e4b712c45a4a2f595 100644 (file)
@@ -21,6 +21,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #include "complaints.h"
 #include "gdbcmd.h"
 
+extern void _initialize_complaints PARAMS ((void));
+
 /* Structure to manage complaints about symbol file contents.  */
 
 struct complaint complaint_root[1] = {
index cef9345f94b35cf290a1170684f563c943c64125..8fae020d40365125a22945195ad670193e77b883 100644 (file)
@@ -471,11 +471,10 @@ void init_frame_pc ();
 
 /* Define other aspects of the stack frame.  */
 
-/* A macro that tells us whether the function invocation represented
-   by FI does not have a frame on the stack associated with it.  If it
-   does not, FRAMELESS is set to 1, else 0.  */
-#define FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS) \
-  (FRAMELESS) = frameless_look_for_prologue(FI)
+/* An expression that tells us whether the function invocation represented
+   by FI does not have a frame on the stack associated with it. */
+#define FRAMELESS_FUNCTION_INVOCATION(FI) \
+  (frameless_look_for_prologue (FI))
 
 /* Saved pc (i.e. return address).  */
 #define FRAME_SAVED_PC(fraim) \
@@ -494,7 +493,7 @@ extern CORE_ADDR frame_locals_address ();
    the argcount field from it, to support debugging assembler code.
    Problem was, the "argcount" field never did hold the argument
    count.  */
-#define        FRAME_NUM_ARGS(numargs, fi) ((numargs) = -1)
+#define        FRAME_NUM_ARGS(fi) (-1)
 
 #define FRAME_ARGS_ADDRESS(fi) FRAME_LOCALS_ADDRESS (fi)
 
index 51c8dcec9c0f4bb59369aa3398222e379ef4f48b..bbfd2d846e07868fa9bf1174c22d89cbc7359966 100644 (file)
@@ -252,12 +252,11 @@ extern CORE_ADDR alpha_frame_chain PARAMS ((struct frame_info *));
 /* Define other aspects of the stack frame.  */
 
 
-/* A macro that tells us whether the function invocation represented
-   by FI does not have a frame on the stack associated with it.  If it
-   does not, FRAMELESS is set to 1, else 0.  */
+/* An expression that tells us whether the function invocation represented
+   by FI does not have a frame on the stack associated with it. */
 /* We handle this differently for alpha, and maybe we should not */
 
-#define FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS)  {(FRAMELESS) = 0;}
+#define FRAMELESS_FUNCTION_INVOCATION(FI)  (0)
 
 /* Saved Pc.  */
 
@@ -287,7 +286,7 @@ alpha_frame_saved_pc PARAMS ((struct frame_info *));
 /* Return number of args passed to a frame.
    Can return -1, meaning no way to tell.  */
 
-#define FRAME_NUM_ARGS(num, fi)        ((num) = -1)
+#define FRAME_NUM_ARGS(fi)     (-1)
 
 /* Return number of bytes at start of arglist that are not really args.  */
 
@@ -312,7 +311,7 @@ extern void alpha_find_saved_regs PARAMS ((struct frame_info *));
 /* Things needed for making the inferior call functions.  */
 
 #define PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) \
-    sp = alpha_push_arguments((nargs), (args), (sp), (struct_return), (struct_addr))
+  (alpha_push_arguments((nargs), (args), (sp), (struct_return), (struct_addr)))
 extern CORE_ADDR
 alpha_push_arguments PARAMS ((int, struct value **, CORE_ADDR, int, CORE_ADDR));
 
index e170d2d10ad740e616cc769a694d756b6e2e4060..6eb5d81139e6951002769a5c479fb764f11283ca 100644 (file)
@@ -265,17 +265,11 @@ extern void arc_software_single_step PARAMS ((unsigned int, int));
    and has no caller.  */
 #define FRAME_CHAIN_VALID(chain, thisframe) nonnull_frame_chain_valid (chain, thisframe)
 
-/* A macro that tells us whether the function invocation represented
-   by FI does not have a frame on the stack associated with it.  If it
-   does not, FRAMELESS is set to 1, else 0.  */
-
-#define FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS) \
-  do { \
-    if ((FI)->signal_handler_caller) \
-      (FRAMELESS) = 0; \
-    else \
-      (FRAMELESS) = frameless_look_for_prologue (FI); \
-  } while (0)
+/* An expression that tells us whether the function invocation represented
+   by FI does not have a frame on the stack associated with it. */
+
+#define FRAMELESS_FUNCTION_INVOCATION(FI) \
+     (((FI)->signal_handler_caller) ? 0 : frameless_look_for_prologue (FI))
 
 /* Where is the PC for a specific frame.
    A leaf function may never save blink, so we have to check for that here.  */
@@ -300,7 +294,7 @@ CORE_ADDR arc_frame_saved_pc PARAMS ((struct frame_info *));
 /* Set NUMARGS to the number of args passed to a frame.
    Can return -1, meaning no way to tell.  */
 
-#define FRAME_NUM_ARGS(numargs, fi)    (numargs = -1)
+#define FRAME_NUM_ARGS(fi)     (-1)
 
 /* Return number of bytes at start of arglist that are not really args.  */
 
index 54e0954b249561aacf56f4424e60c47b7ba1aadc..cc3a27f66c4a2722a668fd837bbe53f6c3ef0a95 100644 (file)
@@ -313,18 +313,10 @@ extern int arm_frame_chain_valid PARAMS ((CORE_ADDR, struct frame_info *));
 
 /* Define other aspects of the stack frame.  */
 
-/* A macro that tells us whether the function invocation represented
-   by FI does not have a frame on the stack associated with it.  If it
-   does not, FRAMELESS is set to 1, else 0.  */
-#define FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS) \
-{                                                      \
-  CORE_ADDR func_start, after_prologue;                        \
-  func_start = (get_pc_function_start ((FI)->pc) +     \
-               FUNCTION_START_OFFSET);                 \
-  after_prologue = func_start;                         \
-  SKIP_PROLOGUE (after_prologue);                      \
-  (FRAMELESS) = (after_prologue == func_start);                \
-}
+/* An expression that tells us whether the function invocation represented
+   by FI does not have a frame on the stack associated with it. */
+extern int arm_frameless_function_invocation PARAMS ((struct frame_info *frame));
+#define FRAMELESS_FUNCTION_INVOCATION(FI) (arm_frameless_function_invocation (FI))
 
 /* Saved Pc.  */
 
@@ -338,7 +330,7 @@ extern CORE_ADDR arm_frame_saved_pc PARAMS ((struct frame_info *));
 /* Return number of args passed to a frame.
    Can return -1, meaning no way to tell.  */
 
-#define FRAME_NUM_ARGS(numargs, fi) (numargs = -1)
+#define FRAME_NUM_ARGS(fi) (-1)
 
 /* Return number of bytes at start of arglist that are not really args.  */
 
@@ -362,9 +354,8 @@ void frame_find_saved_regs PARAMS((struct frame_info *fi,
 /* Things needed for making the inferior call functions.  */
 
 #define PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) \
-    sp = arm_push_arguments ((nargs), (args), (sp), (struct_return), (struct_addr))
-extern CORE_ADDR
-arm_push_arguments PARAMS ((int, struct value **, CORE_ADDR, int, CORE_ADDR));
+  (arm_push_arguments ((nargs), (args), (sp), (struct_return), (struct_addr)))
+extern CORE_ADDR arm_push_arguments PARAMS ((int, struct value **, CORE_ADDR, int, CORE_ADDR));
 
 /* Push an empty stack frame, to record the current PC, etc.  */
 
index 6558859a53de7b553a2be782c5be9bd28ad9b7d5..212f39da29bf74788351802edffeb991ac49fcc6 100644 (file)
@@ -260,19 +260,13 @@ extern struct value *value_of_trapped_internalvar ();
 
 #define        NEED_TEXT_START_END 1
 
-/* A macro that tells us whether the function invocation represented
-   by FI does not have a frame on the stack associated with it.  If it
-   does not, FRAMELESS is set to 1, else 0.
+/* An expression that tells us whether the function invocation represented
+   by FI does not have a frame on the stack associated with it.
    On convex, check at the return address for `callq' -- if so, frameless,
    otherwise, not.  */
 
-#define FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS) \
-{                                                                      \
-  extern CORE_ADDR text_start, text_end;                               \
-  CORE_ADDR call_addr = SAVED_PC_AFTER_CALL (FI);                      \
-  (FRAMELESS) = (call_addr >= text_start && call_addr < text_end       \
-                && read_memory_integer (call_addr - 6, 1) == 0x22);    \
-}
+extern int convex_frameless_function_invocation PARAMS ((struct frame_info *fi));
+#define FRAMELESS_FUNCTION_INVOCATION(FI) (convex_frameless_function_invocatio (FI))
 
 #define FRAME_SAVED_PC(fi) (read_memory_integer ((fi)->frame, 4))
 
@@ -283,9 +277,8 @@ extern struct value *value_of_trapped_internalvar ();
 /* Return number of args passed to a frame.
    Can return -1, meaning no way to tell.  */
 
-#define FRAME_NUM_ARGS(numargs, fi)  \
-{ numargs = read_memory_integer (FRAME_ARGS_ADDRESS (fi) - 4, 4); \
-  if (numargs < 0 || numargs >= 256) numargs = -1;}
+extern int convex_frame_num_args PARAMS ((struct frame_info *fi));
+#define FRAME_NUM_ARGS(fi) (convex_frame_num_args ((fi)))
 
 /* Return number of bytes at start of arglist that are not really args.  */
 
index d0c1a506e2ccde5e650dea5d2e591b061e20b7c3..f0760dcda76d7d3fea4b713d178b81273394d3c5 100644 (file)
@@ -50,24 +50,19 @@ struct value;
 extern CORE_ADDR d10v_skip_prologue ();
 #define SKIP_PROLOGUE(ip) (d10v_skip_prologue (ip))
 
-
 /* Stack grows downward.  */
-#define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
+#define INNER_THAN(lhs,rhs) (core_addr_lessthan ((lhs), (rhs)))
 
 /* for a breakpoint, use "dbt || nop" */
-#define BREAKPOINT {0x2f, 0x90, 0x5e, 0x00} 
+extern breakpoint_from_pc_fn d10v_breakpoint_from_pc;
+#define BREAKPOINT_FROM_PC(PCPTR,LENPTR) (d10v_breakpoint_from_pc ((PCPTR), (LENPTR)))
 
 /* If your kernel resets the pc after the trap happens you may need to
    define this before including this file.  */
 #define DECR_PC_AFTER_BREAK 4
 
-#define REGISTER_NAMES \
-{ "r0", "r1", "r2", "r3", "r4", "r5",  "r6", "r7", \
-    "r8", "r9", "r10","r11","r12", "r13", "r14","r15",\
-    "psw","bpsw","pc","bpc", "cr4", "cr5", "cr6", "rpt_c",\
-    "rpt_s","rpt_e", "mod_s", "mod_e", "cr12", "cr13", "iba", "cr15",\
-    "imap0","imap1","dmap","a0", "a1"\
-    }
+extern char *d10v_register_name PARAMS ((int reg_nr));
+#define REGISTER_NAME(NR) (d10v_register_name (NR))
 
 #define NUM_REGS 37
 
@@ -94,18 +89,18 @@ extern CORE_ADDR d10v_skip_prologue ();
 
 /* Index within `registers' of the first byte of the space for
    register N.  */
-
-#define REGISTER_BYTE(N)  \
-( ((N) > A0_REGNUM) ? ( ((N)-A0_REGNUM)*8 + A0_REGNUM*2 ) : ((N) * 2) )
+extern int d10v_register_byte PARAMS ((int reg_nr));
+#define REGISTER_BYTE(N) (d10v_register_byte (N))
 
 /* Number of bytes of storage in the actual machine representation
    for register N.  */
-
-#define REGISTER_RAW_SIZE(N) ( ((N) >= A0_REGNUM) ? 8 : 2 )
+extern int d10v_register_raw_size PARAMS ((int reg_nr));
+#define REGISTER_RAW_SIZE(N) (d10v_register_raw_size (N))
 
 /* Number of bytes of storage in the program's representation
    for register N.  */   
-#define REGISTER_VIRTUAL_SIZE(N) ( ((N) >= A0_REGNUM) ? 8 : ( ((N) == PC_REGNUM || (N) == SP_REGNUM) ? 4 : 2 ))
+extern int d10v_register_virtual_size PARAMS ((int reg_nr));
+#define REGISTER_VIRTUAL_SIZE(N) (d10v_register_virtual_size (N))
 
 /* Largest value REGISTER_RAW_SIZE can have.  */
 
@@ -118,8 +113,8 @@ extern CORE_ADDR d10v_skip_prologue ();
 /* Return the GDB type object for the "standard" data type
    of data in register N.  */
 
-#define REGISTER_VIRTUAL_TYPE(N) \
-( ((N) < A0_REGNUM ) ? ((N) == PC_REGNUM || (N) == SP_REGNUM ? builtin_type_long : builtin_type_short) : builtin_type_long_long)
+extern struct type *d10v_register_virtual_type PARAMS ((int reg_nr));
+#define REGISTER_VIRTUAL_TYPE(N) (d10v_register_virtual_type (N))
 
 
 /* convert $pc and $sp to/from virtual addresses */
@@ -139,14 +134,20 @@ extern CORE_ADDR d10v_skip_prologue ();
     store_unsigned_integer ((TO), 2, x); \
 }
 
-#define D10V_MAKE_DADDR(x) ((x) | DMEM_START)
-#define D10V_MAKE_IADDR(x) (((x) << 2) | IMEM_START)
+extern CORE_ADDR d10v_make_daddr PARAMS ((CORE_ADDR x));
+#define D10V_MAKE_DADDR(x) (d10v_make_daddr (x))
+extern CORE_ADDR d10v_make_iaddr PARAMS ((CORE_ADDR x));
+#define D10V_MAKE_IADDR(x) (d10v_make_iaddr (x))
 
-#define D10V_DADDR_P(X) (((X) & 0x3000000) == DMEM_START)
-#define D10V_IADDR_P(X) (((X) & 0x3000000) == IMEM_START)
+extern int d10v_daddr_p PARAMS ((CORE_ADDR x));
+#define D10V_DADDR_P(X) (d10v_daddr_p (X))
+extern int d10v_iaddr_p PARAMS ((CORE_ADDR x));
+#define D10V_IADDR_P(X)  (d10v_iaddr_p (X))
 
-#define D10V_CONVERT_IADDR_TO_RAW(X) (((X) >> 2) & 0xffff)
-#define D10V_CONVERT_DADDR_TO_RAW(X) ((X) & 0xffff)
+extern CORE_ADDR d10v_convert_daddr_to_raw PARAMS ((CORE_ADDR x));
+#define D10V_CONVERT_DADDR_TO_RAW(X) (d10v_convert_daddr_to_raw (X))
+extern CORE_ADDR d10v_convert_iaddr_to_raw PARAMS ((CORE_ADDR x));
+#define D10V_CONVERT_IADDR_TO_RAW(X) (d10v_convert_iaddr_to_raw (X))
 
 #define ARG1_REGNUM R0_REGNUM
 #define ARGN_REGNUM 3
@@ -158,8 +159,8 @@ extern CORE_ADDR d10v_skip_prologue ();
    We store structs through a pointer passed in the first Argument
    register. */
 
-#define STORE_STRUCT_RETURN(ADDR, SP) \
-    { write_register (ARG1_REGNUM, (ADDR));  }
+extern void d10v_store_struct_return PARAMS ((CORE_ADDR addr, CORE_ADDR sp));
+#define STORE_STRUCT_RETURN(ADDR, SP) d10v_store_struct_return ((ADDR), (SP))
 
 
 /* Write into appropriate registers a function return value
@@ -167,16 +168,16 @@ extern CORE_ADDR d10v_skip_prologue ();
 
    Things always get returned in RET1_REGNUM, RET2_REGNUM, ... */
 
-#define STORE_RETURN_VALUE(TYPE,VALBUF) \
-  write_register_bytes (REGISTER_BYTE(RET1_REGNUM), VALBUF, TYPE_LENGTH (TYPE))
+extern void d10v_store_return_value PARAMS ((struct type *type, char *valbuf));
+#define STORE_RETURN_VALUE(TYPE,VALBUF) d10v_store_return_value ((TYPE), (VALBUF))
 
 
 /* Extract from an array REGBUF containing the (raw) register state
    the address in which a function should return its structure value,
    as a CORE_ADDR (or an expression that can be used as one).  */
 
-#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
-     (extract_address ((REGBUF) + REGISTER_BYTE (ARG1_REGNUM), REGISTER_RAW_SIZE (ARG1_REGNUM)) | DMEM_START)
+extern CORE_ADDR d10v_extract_struct_value_address PARAMS ((char *regbuf));
+#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) (d10v_extract_struct_value_address ((REGBUF)))
 
 /* Should we use EXTRACT_STRUCT_VALUE_ADDRESS instead of
    EXTRACT_RETURN_VALUE?  GCC_P is true if compiled with gcc
@@ -208,27 +209,32 @@ extern void d10v_init_extra_frame_info PARAMS (( int fromleaf, struct frame_info
    by FI does not have a frame on the stack associated with it.  If it
    does not, FRAMELESS is set to 1, else 0.  */
 
-#define FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS) \
-  (FRAMELESS) = frameless_look_for_prologue(FI)
+#define FRAMELESS_FUNCTION_INVOCATION(FI) \
+  (frameless_look_for_prologue (FI))
 
+extern CORE_ADDR d10v_frame_chain PARAMS ((struct frame_info *frame));
 #define FRAME_CHAIN(FRAME)       d10v_frame_chain(FRAME)
 extern int d10v_frame_chain_valid PARAMS ((CORE_ADDR, struct frame_info *));
 #define FRAME_CHAIN_VALID(chain, thisframe) d10v_frame_chain_valid (chain, thisframe)
-#define FRAME_SAVED_PC(FRAME)    ((FRAME)->return_pc)   
-#define FRAME_ARGS_ADDRESS(fi)   (fi)->frame
-#define FRAME_LOCALS_ADDRESS(fi) (fi)->frame
+extern CORE_ADDR d10v_frame_saved_pc PARAMS ((struct frame_info *fi));
+#define FRAME_SAVED_PC(fi) (d10v_frame_saved_pc ((fi)))
+extern CORE_ADDR d10v_frame_args_address PARAMS ((struct frame_info *fi));
+#define FRAME_ARGS_ADDRESS(fi) (d10v_frame_args_address ((fi)))
+extern CORE_ADDR d10v_frame_locals_address PARAMS ((struct frame_info *fi));
+#define FRAME_LOCALS_ADDRESS(fi) (d10v_frame_locals_address ((fi)))
 
 /* Immediately after a function call, return the saved pc.  We can't */
 /* use frame->return_pc beause that is determined by reading R13 off the */
 /*stack and that may not be written yet. */
 
-#define SAVED_PC_AFTER_CALL(frame) ((read_register(LR_REGNUM) << 2) | IMEM_START)
+extern CORE_ADDR d10v_saved_pc_after_call PARAMS ((struct frame_info *frame));
+#define SAVED_PC_AFTER_CALL(frame) (d10v_saved_pc_after_call ((frame)))
     
 /* Set VAL to the number of args passed to frame described by FI.
    Can set VAL to -1, meaning no way to tell.  */
 /* We can't tell how many args there are */
 
-#define FRAME_NUM_ARGS(val,fi) (val = -1)
+#define FRAME_NUM_ARGS(fi) (-1)
 
 /* Return number of bytes at start of arglist that are not really args.  */
 
@@ -282,7 +288,7 @@ extern CORE_ADDR d10v_push_return_address PARAMS ((CORE_ADDR pc, CORE_ADDR sp));
        generic_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval)
 
 #define PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) \
-    sp = d10v_push_arguments((nargs), (args), (sp), (struct_return), (struct_addr))
+  (d10v_push_arguments((nargs), (args), (sp), (struct_return), (struct_addr)))
 extern CORE_ADDR d10v_push_arguments PARAMS ((int, struct value **, CORE_ADDR, int, CORE_ADDR));
 
 
@@ -330,7 +336,7 @@ CORE_ADDR d10v_read_fp PARAMS ((void));
    need to be translated into a format that the d10v rom monitor
    understands. */
 
-int remote_d10v_translate_xfer_address PARAMS ((CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr));
+extern void remote_d10v_translate_xfer_address PARAMS ((CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len));
 #define REMOTE_TRANSLATE_XFER_ADDRESS(GDB_ADDR, GDB_LEN, REM_ADDR, REM_LEN) \
-(REM_LEN) = remote_d10v_translate_xfer_address ((GDB_ADDR), (GDB_LEN), &(REM_ADDR))
+ remote_d10v_translate_xfer_address ((GDB_ADDR), (GDB_LEN), (REM_ADDR), (REM_LEN))
 
index 1ce9ccce3a42a29fdaecc5422e02068193f87ac1..dda61b6adfad07ceccc90507562125893501c119 100644 (file)
@@ -212,8 +212,8 @@ extern void d30v_init_extra_frame_info PARAMS (( int fromleaf, struct frame_info
    by FI does not have a frame on the stack associated with it.  If it
    does not, FRAMELESS is set to 1, else 0.  */
 
-#define FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS) \
-  (FRAMELESS) = frameless_look_for_prologue(FI)
+#define FRAMELESS_FUNCTION_INVOCATION(FI) \
+  (frameless_look_for_prologue (FI))
 
 #define FRAME_CHAIN(FRAME)       d30v_frame_chain(FRAME)
 extern int d30v_frame_chain_valid PARAMS ((CORE_ADDR, struct frame_info *));
@@ -235,7 +235,7 @@ extern int d30v_frame_chain_valid PARAMS ((CORE_ADDR, struct frame_info *));
    Can set VAL to -1, meaning no way to tell.  */
 /* We can't tell how many args there are */
 
-#define FRAME_NUM_ARGS(val,fi) (val = -1)
+#define FRAME_NUM_ARGS(fi) (-1)
 
 /* Return number of bytes at start of arglist that are not really args.  */
 
@@ -283,7 +283,7 @@ extern CORE_ADDR d30v_fix_call_dummy PARAMS ((char *, CORE_ADDR, CORE_ADDR,
                                           int, struct value **,
                                           struct type *, int));
 #define PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) \
-    sp = d30v_push_arguments((nargs), (args), (sp), (struct_return), (struct_addr))
+  (d30v_push_arguments((nargs), (args), (sp), (struct_return), (struct_addr)))
 extern CORE_ADDR d30v_push_arguments PARAMS ((int, struct value **, CORE_ADDR, int, CORE_ADDR));
 
 
index d03f8453ba6a7281cc1e64b8caedae8b3b1de78d..93aa9cb8f7f7742044e71c65c8bf835d57f3767a 100644 (file)
@@ -135,7 +135,7 @@ extern void fr30_pop_frame PARAMS ((void));
 
 /* Return number of args passed to a frame.
    Can return -1, meaning no way to tell.  */
-#define FRAME_NUM_ARGS(numargs, fi) (numargs = -1)
+#define FRAME_NUM_ARGS(fi) (-1)
 
 #ifdef __STDC__                /* Forward decls for prototypes */
 struct frame_info;
@@ -190,18 +190,10 @@ extern void fr30_store_return_value PARAMS ((struct type *type, char *valbuf));
 
 /* Define other aspects of the stack frame.  */
 
-/* A macro that tells us whether the function invocation represented
-   by FI does not have a frame on the stack associated with it.  If it
-   does not, FRAMELESS is set to 1, else 0.  */
-#define FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS) \
-{                                                      \
-  CORE_ADDR func_start, after_prologue;                        \
-  func_start = (get_pc_function_start ((FI)->pc) +     \
-               FUNCTION_START_OFFSET);                 \
-  after_prologue = func_start;                         \
-  after_prologue = SKIP_PROLOGUE (after_prologue);     \
-  (FRAMELESS) = (after_prologue == func_start);                \
-}
+/* An expression that tells us whether the function invocation represented
+   by FI does not have a frame on the stack associated with it.  */
+extern int fr30_frameless_function_invocation PARAMS ((struct frame_info *frame));
+#define FRAMELESS_FUNCTION_INVOCATION(FI) (fr30_frameless_function_invocation (FI));
 
 extern void fr30_init_extra_frame_info PARAMS ((struct frame_info *fi));
 #define INIT_EXTRA_FRAME_INFO(fromleaf, fi) fr30_init_extra_frame_info (fi)
@@ -213,7 +205,7 @@ fr30_push_arguments PARAMS ((int nargs, struct value **args, CORE_ADDR sp,
                             int struct_return,
                             CORE_ADDR struct_addr));
 #define PUSH_ARGUMENTS(NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR) \
-  (SP) = fr30_push_arguments (NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR)
+  (fr30_push_arguments (NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR))
 
 #define PC_IN_CALL_DUMMY(PC, SP, FP) generic_pc_in_call_dummy (PC, SP, FP)
 
index 7287155dd3629d84bf9ffc2448b8d15826b74438..cbd05b1bb97dbc8b8788874a4b15ed4aa8504ae9 100644 (file)
 /* OBSOLETE  */
 /* OBSOLETE /* We can check the stab info to see how */
 /* OBSOLETE    many arg we have.  No info in stack will tell us *x/ */
-/* OBSOLETE #define FRAME_NUM_ARGS(val,fi)             (val = findarg(fi)) */
+/* OBSOLETE #define FRAME_NUM_ARGS(fi)         (findarg(fi)) */
 /* OBSOLETE  */
 /* OBSOLETE /* Return number of bytes at start of arglist that are not really args.  *x/ */
 /* OBSOLETE #define FRAME_ARGS_SKIP                    8 */
index b44d4ee3aa83679e6809ae65b92b8e8f4614353b..6d685d6e400c70f2b756b6dfa0ffaeac40a71a9b 100644 (file)
 /* OBSOLETE  */
 /* OBSOLETE /* We can check the stab info to see how */
 /* OBSOLETE    many arg we have.  No info in stack will tell us *x/ */
-/* OBSOLETE #define FRAME_NUM_ARGS(val,fi)             (val = findarg(fi)) */
+/* OBSOLETE #define FRAME_NUM_ARGS(fi)         (findarg(fi)) */
 /* OBSOLETE  */
 /* OBSOLETE /* Return number of bytes at start of arglist that are not really args.  *x/ */
 /* OBSOLETE #define FRAME_ARGS_SKIP                    8 */
index f8f1f6436752998e5ae787faec79317f24d4d036..b402181905da5919e011e064b3d84480f6ca7d3d 100644 (file)
@@ -213,8 +213,8 @@ CORE_ADDR h8300_frame_chain PARAMS ((struct frame_info *));
 /* A macro that tells us whether the function invocation represented
    by FI does not have a frame on the stack associated with it.  If it
    does not, FRAMELESS is set to 1, else 0.  */
-#define FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS) \
-  (FRAMELESS) = frameless_look_for_prologue(FI)
+#define FRAMELESS_FUNCTION_INVOCATION(FI) \
+  (frameless_look_for_prologue (FI))
 
 /* Any function with a frame looks like this
    SECOND ARG
@@ -239,7 +239,7 @@ CORE_ADDR h8300_frame_chain PARAMS ((struct frame_info *));
 /* We can't tell how many args there are
    now that the C compiler delays popping them.  */
 
-#define FRAME_NUM_ARGS(val,fi) (val = -1)
+#define FRAME_NUM_ARGS(fi) (-1)
 
 /* Return number of bytes at start of arglist that are not really args.  */
 
@@ -289,7 +289,7 @@ extern CORE_ADDR h8300_push_return_address PARAMS ((CORE_ADDR, CORE_ADDR));
 #define PC_IN_CALL_DUMMY(PC, SP, FP)   generic_pc_in_call_dummy (PC, SP, FP)
 #define FIX_CALL_DUMMY(DUMMY, START_SP, FUNADDR, NARGS, ARGS, TYPE, GCCP)
 #define PUSH_ARGUMENTS(NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR) \
-  (SP) = h8300_push_arguments (NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR)
+  (h8300_push_arguments (NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR))
 /* Push an empty stack frame, to record the current PC, etc.  */
 #define PUSH_DUMMY_FRAME       generic_push_dummy_frame ()
 /* Discard from the stack the innermost frame, restoring all registers.  */
index 2dded7cf3809f2af677678d8d6a2f5dc50f51cdd..0f34a00923f34409af8f054870110362048d4cdf 100644 (file)
@@ -186,8 +186,8 @@ extern struct type *h8500_register_virtual_type PARAMS ((int regno));
    by FI does not have a frame on the stack associated with it.  If it
    does not, FRAMELESS is set to 1, else 0.  */
 
-#define FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS) \
-  (FRAMELESS) = frameless_look_for_prologue(FI)
+#define FRAMELESS_FUNCTION_INVOCATION(FI) \
+  (frameless_look_for_prologue (FI))
 
 /* Any function with a frame looks like this
    SECOND ARG
@@ -221,7 +221,7 @@ extern CORE_ADDR frame_saved_pc PARAMS ((struct frame_info *frame));
 /* We can't tell how many args there are
    now that the C compiler delays popping them.  */
 
-#define FRAME_NUM_ARGS(val,fi) (val = -1)
+#define FRAME_NUM_ARGS(fi) (-1)
 
 /* Return number of bytes at start of arglist that are not really args.  */
 
index 06d9f855290acd7e7cb895c1fb067be8ccc8223d..11a7a2023d21e40051c7abe28d272fe0153a47c0 100644 (file)
@@ -207,13 +207,8 @@ extern void i386_extract_return_value PARAMS ((struct type *, char [], char *));
    by FI does not have a frame on the stack associated with it.  If it
    does not, FRAMELESS is set to 1, else 0.  */
 
-#define FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS) \
-  do { \
-    if ((FI)->signal_handler_caller) \
-      (FRAMELESS) = 0; \
-    else \
-      (FRAMELESS) = frameless_look_for_prologue(FI); \
-  } while (0)
+#define FRAMELESS_FUNCTION_INVOCATION(FI) \
+     (((FI)->signal_handler_caller) ? 0 : frameless_look_for_prologue(FI))
 
 /* Saved Pc.  Get it from sigcontext if within sigtramp.  */
 
@@ -232,7 +227,7 @@ extern CORE_ADDR sigtramp_saved_pc PARAMS ((struct frame_info *));
 /* Return number of args passed to a frame.  Can return -1, meaning no way
    to tell, which is typical now that the C compiler delays popping them.  */
 
-#define FRAME_NUM_ARGS(numargs, fi) (numargs) = i386_frame_num_args(fi)
+#define FRAME_NUM_ARGS(fi) (i386_frame_num_args(fi))
 
 extern int i386_frame_num_args PARAMS ((struct frame_info *));
 
index bb31cb0c796b7edc7fa12e4fddfcbafabbf97172..05caf9bbe066a60e8216639f2e2ea9004d1ed91e 100644 (file)
@@ -140,8 +140,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
    does not, FRAMELESS is set to 1, else 0.  */
 
 #undef  FRAMELESS_FUNCTION_INVOCATION
-#define FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS) \
-  (FRAMELESS) = frameless_look_for_prologue(FI)
+#define FRAMELESS_FUNCTION_INVOCATION(FI) \
+  (frameless_look_for_prologue (FI))
 
 #undef  FRAME_SAVED_PC
 #define FRAME_SAVED_PC(FRAME) (read_memory_integer ((FRAME)->frame + 4, 4))
@@ -150,7 +150,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
    Can return -1, meaning no way to tell.  */
 
 #undef  FRAME_NUM_ARGS
-#define FRAME_NUM_ARGS(numargs, fi) (numargs) = -1
+#define FRAME_NUM_ARGS(fi) (-1)
 
 #ifdef __STDC__                /* Forward decl's for prototypes */
 struct frame_info;
index 259fd5182387cdeb58179ea75dc19339fb0abdc0..1f60b982714acd940d84df80325414e9ce7ce056 100644 (file)
@@ -186,8 +186,8 @@ double_to_i387 PARAMS ((char *, char *));
    does not, FRAMELESS is set to 1, else 0.  */
 
 #undef  FRAMELESS_FUNCTION_INVOCATION
-#define FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS) \
-{ (FRAMELESS) = frameless_look_for_prologue (FI); }
+#define FRAMELESS_FUNCTION_INVOCATION(FI) \
+     (frameless_look_for_prologue (FI))
 
 #undef  FRAME_SAVED_PC
 #define FRAME_SAVED_PC(FRAME) (read_memory_integer ((FRAME)->frame + 4, 4))
index dcd24e5ee202a32ea6430beca67a7fd67b27cdaa..d5b78f264b47a00eda2ebbecf8a82952a3e9354d 100644 (file)
@@ -286,8 +286,8 @@ extern use_struct_convention_fn i960_use_struct_convention;
    by FI does not have a frame on the stack associated with it.  If it
    does not, FRAMELESS is set to 1, else 0.  */
 
-#define FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS) \
-  { (FRAMELESS) = (leafproc_return ((FI)->pc) != 0); }
+#define FRAMELESS_FUNCTION_INVOCATION(FI) \
+  (leafproc_return ((FI)->pc) != 0)
 
 /* Note that in the i960 architecture the return pointer is saved in the
    *caller's* stack frame.
@@ -317,7 +317,7 @@ extern CORE_ADDR frame_args_address ();             /* i960-tdep.c */
 /* Set NUMARGS to the number of args passed to a frame.
    Can return -1, meaning no way to tell.  */
 
-#define FRAME_NUM_ARGS(numargs, fi)    (numargs = -1)
+#define FRAME_NUM_ARGS(fi)     (-1)
 
 /* Return number of bytes at start of arglist that are not really args.  */
 
index 3a6f231a43ef4864d6cc09de705325054b555dba..5c8fb237ee4da82d9939d4a3583e6f3ed1f7b3c3 100644 (file)
@@ -165,7 +165,7 @@ extern CORE_ADDR m32r_skip_prologue PARAMS ((CORE_ADDR pc));
 /* mvs_no_check  FRAME_LOCALS_ADDRESS */
 #define FRAME_LOCALS_ADDRESS(fi) ((fi)->frame)
 /* mvs_no_check  FRAME_NUM_ARGS */
-#define FRAME_NUM_ARGS(val, fi) ((val) = -1)
+#define FRAME_NUM_ARGS(fi) (-1)
 
 #define COERCE_FLOAT_TO_DOUBLE 1
 
@@ -216,7 +216,7 @@ extern CORE_ADDR m32r_push_arguments PARAMS ((int nargs,
 
 /* mvs_no_check  PUSH_ARGUMENTS */
 #define PUSH_ARGUMENTS(NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR) \
-  (SP) = m32r_push_arguments (NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR)
+  (m32r_push_arguments (NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR))
 
 #define PUSH_RETURN_ADDRESS(PC, SP)      m32r_push_return_address (PC, SP)
 
index 5965bb56f9c650bf4e0a30b24177d5825c670025..e0692fbe714c1acb99b7f779ee713e7f94ccd3cf 100644 (file)
@@ -75,18 +75,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 /* Return number of args passed to a frame.
    Can return -1, meaning no way to tell.  */
 
-#define FRAME_NUM_ARGS(val, fi)  \
-{ register CORE_ADDR pc = FRAME_SAVED_PC (fi);                 \
-  register int insn = 0177777 & read_memory_integer (pc, 2);   \
-  val = 0;                                                     \
-  if (insn == 0047757 || insn == 0157374)  /* lea W(sp),sp or addaw #W,sp */ \
-    val = read_memory_integer (pc + 2, 2);                     \
-  else if ((insn & 0170777) == 0050217 /* addql #N, sp */      \
-          || (insn & 0170777) == 0050117)  /* addqw */         \
-    { val = (insn >> 9) & 7; if (val == 0) val = 8; }          \
-  else if (insn == 0157774) /* addal #WW, sp */                        \
-    val = read_memory_integer (pc + 2, 4);                     \
-  val >>= 2; }
+extern int delta68_frame_num_args PARAMS ((struct frame_info *fi));
+#define FRAME_NUM_ARGS (delta68_frame_num_args ((fi)))
 
 /* On M68040 versions of sysV68 R3V7.1, ptrace(PT_WRITE_I) does not clear
    the processor's instruction cache as it should.  */
index ae8ccbf05fe3f36dddc1f7bae3c6fcb81db46870..5653fe657ddc943a5e1896e45c19f428d18fbbc9 100644 (file)
@@ -41,18 +41,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 /* Return number of args passed to a frame.
    Can return -1, meaning no way to tell.  */
 
-#define FRAME_NUM_ARGS(val, fi)  \
-{ register CORE_ADDR pc = FRAME_SAVED_PC (fi);                 \
-  register int insn = 0177777 & read_memory_integer (pc, 2);   \
-  val = 0;                                                     \
-  if (insn == 0047757 || insn == 0157374)  /* lea W(sp),sp or addaw #W,sp */ \
-    val = read_memory_integer (pc + 2, 2);                     \
-  else if ((insn & 0170777) == 0050217 /* addql #N, sp */      \
-          || (insn & 0170777) == 0050117)  /* addqw */         \
-    { val = (insn >> 9) & 7; if (val == 0) val = 8; }          \
-  else if (insn == 0157774) /* addal #WW, sp */                        \
-    val = read_memory_integer (pc + 2, 4);                     \
-  val >>= 2; }
+extern int isi_frame_num_args PARAMS ((struct frame_info *fi));
+#define FRAME_NUM_ARGS(fi) (isi_frame_num_args ((fi)))
 
 /* Put here the code to store, into a struct frame_saved_regs,
    the addresses of the saved registers of frame described by FRAME_INFO.
index 9cbb41f0801633a1a7d44950ddec90361abfd559..4835b39872ec0b8276fc85f49dde63663040d2c5 100644 (file)
@@ -274,13 +274,8 @@ do                                                                 \
 /* A macro that tells us whether the function invocation represented
    by FI does not have a frame on the stack associated with it.  If it
    does not, FRAMELESS is set to 1, else 0.  */
-#define FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS) \
-  do { \
-    if ((FI)->signal_handler_caller) \
-      (FRAMELESS) = 0; \
-    else \
-      (FRAMELESS) = frameless_look_for_prologue(FI); \
-  } while (0)
+#define FRAMELESS_FUNCTION_INVOCATION(FI) \
+     (((FI)->signal_handler_caller) ? 0 : frameless_look_for_prologue(FI))
 
 /* This was determined by experimentation on hp300 BSD 4.3.  Perhaps
    it corresponds to some offset in /usr/include/sys/user.h or
@@ -311,7 +306,7 @@ do                                                                  \
 /* We can't tell how many args there are
    now that the C compiler delays popping them.  */
 #if !defined (FRAME_NUM_ARGS)
-#define FRAME_NUM_ARGS(val,fi) (val = -1)
+#define FRAME_NUM_ARGS(fi) (-1)
 #endif
 
 /* Return number of bytes at start of arglist that are not really args.  */
index 9fca4467659ea304d2a4ccadd624c35312d825b1..b9736a06ccbe97c1a65393a67e6063ec8ee8dd0f 100644 (file)
@@ -59,17 +59,7 @@ Here is an m-news.h file for gdb.  It supports the 68881 registers.
 /* Return number of args passed to a frame.
    Can return -1, meaning no way to tell.  */
 
-#define FRAME_NUM_ARGS(val, fi)  \
-{ register CORE_ADDR pc = FRAME_SAVED_PC (fi);                 \
-  register int insn = 0177777 & read_memory_integer (pc, 2);   \
-  val = 0;                                                     \
-  if (insn == 0047757 || insn == 0157374)  /* lea W(sp),sp or addaw #W,sp */ \
-    val = read_memory_integer (pc + 2, 2);                     \
-  else if ((insn & 0170777) == 0050217 /* addql #N, sp */      \
-          || (insn & 0170777) == 0050117)  /* addqw */         \
-    { val = (insn >> 9) & 7; if (val == 0) val = 8; }          \
-  else if (insn == 0157774) /* addal #WW, sp */                        \
-    val = read_memory_integer (pc + 2, 4);                     \
-  val >>= 2; }
+extern int news_frame_num_args PARAMS ((struct frame_info *fi));
+#define FRAME_NUM_ARGS (news_frame_num_args ((fi)))
 
 #include "m68k/tm-m68k.h"
index be9ffba2c162ed3dbf90e0131774b290c7fcf467..0259c0b629197e4085f6344502aea0a78a4baded 100644 (file)
@@ -445,8 +445,8 @@ extern int frameless_function_invocation ();
 #define FRAME_CHAIN(thisframe) \
        frame_chain (thisframe)
 
-#define        FRAMELESS_FUNCTION_INVOCATION(frame, fromleaf)  \
-       fromleaf = frameless_function_invocation (frame)
+#define        FRAMELESS_FUNCTION_INVOCATION(frame)    \
+       (frameless_function_invocation (frame))
 
 /* Define other aspects of the stack frame.  */
 
@@ -465,7 +465,7 @@ extern CORE_ADDR frame_locals_address ();
 /* Return number of args passed to a frame.
    Can return -1, meaning no way to tell.  */
 
-#define FRAME_NUM_ARGS(numargs, fi)  ((numargs) = -1)
+#define FRAME_NUM_ARGS(fi)  (-1)
 
 /* Return number of bytes at start of arglist that are not really args.  */
 
index 601d8754f55acfce8bfff93ba5686d276c7ba41c..108a203f7f0f2cbb088025a72d064d6c0a63cb96 100644 (file)
@@ -339,7 +339,7 @@ extern CORE_ADDR mips_frame_chain PARAMS ((struct frame_info *));
    does not, FRAMELESS is set to 1, else 0.  */
 /* We handle this differently for mips, and maybe we should not */
 
-#define FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS)  {(FRAMELESS) = 0;}
+#define FRAMELESS_FUNCTION_INVOCATION(FI)  (0)
 
 /* Saved Pc.  */
 
@@ -353,7 +353,7 @@ extern CORE_ADDR mips_frame_saved_pc PARAMS ((struct frame_info *));
 /* Return number of args passed to a frame.
    Can return -1, meaning no way to tell.  */
 
-#define FRAME_NUM_ARGS(num, fi)        (num = mips_frame_num_args(fi))
+#define FRAME_NUM_ARGS(fi)     (mips_frame_num_args(fi))
 extern int mips_frame_num_args PARAMS ((struct frame_info *));
 
 /* Return number of bytes at start of arglist that are not really args.  */
@@ -382,7 +382,7 @@ extern void mips_find_saved_regs PARAMS ((struct frame_info *));
    handle it. */
 
 #define PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) \
-    sp = mips_push_arguments((nargs), (args), (sp), (struct_return), (struct_addr))
+  (mips_push_arguments((nargs), (args), (sp), (struct_return), (struct_addr)))
 extern CORE_ADDR
 mips_push_arguments PARAMS ((int, struct value **, CORE_ADDR, int, CORE_ADDR));
 
index 99b8f6113eae26adcf9f0d78a5f6a95da79a1682..94cd6ea336764551a26c43c15ab82e50efc90a34 100644 (file)
@@ -172,7 +172,7 @@ extern CORE_ADDR mn10200_skip_prologue PARAMS ((CORE_ADDR));
 
 #define FRAME_ARGS_ADDRESS(fi) ((fi)->frame)
 #define FRAME_LOCALS_ADDRESS(fi) ((fi)->frame)
-#define FRAME_NUM_ARGS(val, fi) ((val) = -1)
+#define FRAME_NUM_ARGS(fi) (-1)
 
 extern void mn10200_pop_frame PARAMS ((struct frame_info *));
 #define POP_FRAME mn10200_pop_frame (get_current_frame ())
@@ -194,7 +194,7 @@ extern CORE_ADDR
 mn10200_push_arguments PARAMS ((int, struct value **, CORE_ADDR,
                             unsigned char, CORE_ADDR));
 #define PUSH_ARGUMENTS(NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR) \
-  (SP) = mn10200_push_arguments (NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR)
+  (mn10200_push_arguments (NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR))
 
 #define PC_IN_CALL_DUMMY(PC, SP, FP) generic_pc_in_call_dummy (PC, SP, FP)
 
index 42b73415d2859c415653a04e489df77831a4a448..ae5f0aa2e5bcaf027cdc0b68edf728040e444ffa 100644 (file)
@@ -119,7 +119,7 @@ extern CORE_ADDR mn10300_skip_prologue PARAMS ((CORE_ADDR));
 
 #define FRAME_ARGS_ADDRESS(fi) ((fi)->frame)
 #define FRAME_LOCALS_ADDRESS(fi) ((fi)->frame)
-#define FRAME_NUM_ARGS(val, fi) ((val) = -1)
+#define FRAME_NUM_ARGS(fi) (-1)
 
 extern void mn10300_pop_frame PARAMS ((struct frame_info *));
 #define POP_FRAME mn10300_pop_frame (get_current_frame ())
@@ -141,7 +141,7 @@ extern CORE_ADDR
 mn10300_push_arguments PARAMS ((int, struct value **, CORE_ADDR,
                                unsigned char, CORE_ADDR ));
 #define PUSH_ARGUMENTS(NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR) \
-  (SP) = mn10300_push_arguments (NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR)
+  (mn10300_push_arguments (NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR))
 
 #define PC_IN_CALL_DUMMY(PC, SP, FP) generic_pc_in_call_dummy (PC, SP, FP)
 
index d5864307162b132b9059f3fe33ea7c52be73e531..9a3edb9cc8a15f867f413e533cb7f0f4a6db0807 100644 (file)
@@ -192,30 +192,8 @@ extern CORE_ADDR merlin_skip_prologue PARAMS ((CORE_ADDR));
 /* Return number of args passed to a frame.
    Can return -1, meaning no way to tell.  */
 
-#define FRAME_NUM_ARGS(numargs, fi)                    \
-{ CORE_ADDR pc;                                                \
-  int insn;                                            \
-  int addr_mode;                                       \
-  int width;                                           \
-                                                       \
-  pc = FRAME_SAVED_PC (fi);                            \
-  insn = read_memory_integer (pc,2);                   \
-  addr_mode = (insn >> 11) & 0x1f;                     \
-  insn = insn & 0x7ff;                                 \
-  if ((insn & 0x7fc) == 0x57c                          \
-      && addr_mode == 0x14) /* immediate */            \
-    { if (insn == 0x57c) /* adjspb */                  \
-       width = 1;                                      \
-      else if (insn == 0x57d) /* adjspw */             \
-       width = 2;                                      \
-      else if (insn == 0x57f) /* adjspd */             \
-       width = 4;                                      \
-      numargs = read_memory_integer (pc+2,width);      \
-      if (width > 1)                                   \
-       flip_bytes (&numargs, width);                   \
-      numargs = - sign_extend (numargs, width*8) / 4; }        \
-  else numargs = -1;                                   \
-}
+extern int merlin_frame_num_args PARAMS ((struct frame_info *fi));
+#define FRAME_NUM_ARGS (merlin_frame_num_args ((fi)))
 
 /* Return number of bytes at start of arglist that are not really args.  */
 
index 925a3e97b24ea8bb59152b1f82d5d8dc8b6f9f32..d4ea4edfcd06924d59af8593d5853076eb58d243 100644 (file)
@@ -271,35 +271,8 @@ extern CORE_ADDR ns32k_get_enter_addr ();
    ways in the stack frame.  sp is even more special:
    the address we return for it IS the sp for the next frame.  */
 
-#define FRAME_FIND_SAVED_REGS(frame_info, frame_saved_regs)    \
-{                                                              \
-  register int regmask, regnum;                                \
-  int          localcount;                                     \
-  register CORE_ADDR   enter_addr;                             \
-  register CORE_ADDR   next_addr;                              \
-                                                               \
-  memset (&(frame_saved_regs), '\0', sizeof (frame_saved_regs));       \
-  enter_addr = ns32k_get_enter_addr ((frame_info)->pc);                \
-  if (enter_addr > 1)                                          \
-    {                                                          \
-      regmask = read_memory_integer (enter_addr+1, 1) & 0xff;  \
-      localcount = ns32k_localcount (enter_addr);              \
-      next_addr = (frame_info)->frame + localcount;            \
-      for (regnum = 0; regnum < 8; regnum++, regmask >>= 1)    \
-       (frame_saved_regs).regs[regnum] = (regmask & 1) ?       \
-                                         (next_addr -= 4) : 0; \
-      (frame_saved_regs).regs[SP_REGNUM] = (frame_info)->frame + 4;\
-      (frame_saved_regs).regs[PC_REGNUM] = (frame_info)->frame + 4;\
-      (frame_saved_regs).regs[FP_REGNUM] =                     \
-                 (read_memory_integer ((frame_info)->frame, 4));\
-    }                                                          \
-  else if (enter_addr == 1)                                    \
-    {                                                          \
-      CORE_ADDR sp = read_register (SP_REGNUM);                        \
-      (frame_saved_regs).regs[PC_REGNUM] = sp;                 \
-      (frame_saved_regs).regs[SP_REGNUM] = sp + 4;             \
-    }                                                          \
-}
+extern int umax_frame_num_args PARAMS ((struct frame_info *fi));
+#define FRAME_NUM_ARGS (umax_frame_num_args ((fi)))
 \f
 /* Things needed for making the inferior call functions.  */
 
index 2fcae42e2b71da7d8f02b12a73f2e8d5e7fe37b9..169a8178010d80124904cd29028aaeeaa4720ee2 100644 (file)
@@ -437,8 +437,8 @@ extern int hppa_frame_chain_valid PARAMS ((CORE_ADDR, struct frame_info *));
 /* A macro that tells us whether the function invocation represented
    by FI does not have a frame on the stack associated with it.  If it
    does not, FRAMELESS is set to 1, else 0.  */
-#define FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS) \
-  (FRAMELESS) = frameless_function_invocation(FI)
+#define FRAMELESS_FUNCTION_INVOCATION(FI) \
+  (frameless_function_invocation (FI))
 extern int frameless_function_invocation PARAMS ((struct frame_info *));
 
 extern CORE_ADDR hppa_frame_saved_pc PARAMS ((struct frame_info *frame));
@@ -452,7 +452,7 @@ extern CORE_ADDR hppa_frame_saved_pc PARAMS ((struct frame_info *frame));
 
 /* We can't tell how many args there are
    now that the C compiler delays popping them.  */
-#define FRAME_NUM_ARGS(val,fi) (val = -1)
+#define FRAME_NUM_ARGS(fi) (-1)
 
 /* Return number of bytes at start of arglist that are not really args.  */
 
@@ -624,7 +624,7 @@ hppa_fix_call_dummy PARAMS ((char *, CORE_ADDR, CORE_ADDR, int,
                             struct value **, struct type *, int));
 
 #define PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) \
-    sp = hppa_push_arguments((nargs), (args), (sp), (struct_return), (struct_addr))
+  (hppa_push_arguments((nargs), (args), (sp), (struct_return), (struct_addr)))
 extern CORE_ADDR
 hppa_push_arguments PARAMS ((int, struct value **, CORE_ADDR, int,
                             CORE_ADDR));
index cd0ec32ed6f811bc81b057c04a16ccbf67021054..41b80a82a8122eaf1879ecba230d2af4e0afca29 100644 (file)
@@ -56,11 +56,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 extern struct frame_info *rs6000_pop_frame PARAMS ((struct frame_info *frame));
 
 extern CORE_ADDR ppc_push_return_address PARAMS ((CORE_ADDR, CORE_ADDR));
-extern CORE_ADDR rs6000_push_arguments PARAMS ((int nargs, 
-                                             struct value **args, 
-                                             CORE_ADDR sp,
-                                             unsigned char struct_return,
-                                             CORE_ADDR struct_addr));
 
 #undef PUSH_DUMMY_FRAME
 #define PUSH_DUMMY_FRAME             generic_push_dummy_frame ()
index fbfe87c3748310641497882382ca55d44dfdbe25..b1deeed775f40cb503b3a191ab7b1208648cbedd 100644 (file)
@@ -332,7 +332,7 @@ do {                                                                \
 /* Return number of args passed to a frame.
    Can return -1, meaning no way to tell.  */
 
-#define FRAME_NUM_ARGS(val, fi)  (val = -1)
+#define FRAME_NUM_ARGS(fi)  (-1)
 
 /* Return number of bytes at start of arglist that are not really args.  */
 
index 159ebc63ffef4ec8292d0b0a5450ed6c04f09a6a..34fe391d849a429fc4d2a134093bdaf4e3cb825c 100644 (file)
@@ -156,9 +156,8 @@ extern void aix_process_linenos PARAMS ((void));
    handle it. */
 
 #define        PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) \
-  sp = push_arguments((nargs), (args), (sp), (struct_return), (struct_addr))
-extern CORE_ADDR push_arguments PARAMS ((int, struct value **, CORE_ADDR,
-                                        int, CORE_ADDR));
+  (rs6000_push_arguments((nargs), (args), (sp), (struct_return), (struct_addr)))
+extern CORE_ADDR rs6000_push_arguments PARAMS ((int, struct value **, CORE_ADDR, int, CORE_ADDR));
 
 /* BREAKPOINT_FROM_PC uses the program counter value to determine the
    breakpoint that should be used */
@@ -378,8 +377,8 @@ CORE_ADDR rs6000_frame_chain PARAMS ((struct frame_info *));
    by FI does not have a frame on the stack associated with it.  If it
    does not, FRAMELESS is set to 1, else 0.  */
 
-#define FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS) \
-  FRAMELESS = frameless_function_invocation (FI)
+#define FRAMELESS_FUNCTION_INVOCATION(FI) \
+  (frameless_function_invocation (FI))
 
 extern int frameless_function_invocation PARAMS((struct frame_info *));
 
@@ -421,7 +420,7 @@ extern CORE_ADDR rs6000_frame_args_address PARAMS ((struct frame_info *));
 /* We can't tell how many args there are
    now that the C compiler delays popping them.  */
 
-#define FRAME_NUM_ARGS(val,fi) (val = -1)
+#define FRAME_NUM_ARGS(fi) (-1)
 
 /* Return number of bytes at start of arglist that are not really args.  */
 
index 2d5f8bd2b3bc2464945b54007a17d498d7c89406..3552300c0d8f75eac990dc9107d0bcc068adf817 100644 (file)
@@ -46,11 +46,10 @@ struct type;
 extern CORE_ADDR sh_skip_prologue PARAMS ((CORE_ADDR));
 #define SKIP_PROLOGUE(ip) (sh_skip_prologue (ip))
 
-
 /* Immediately after a function call, return the saved pc.
    Can't always go through the frames for this because on some machines
    the new frame is not set up until the new function executes
-   some instructions. 
+   some instructions.
 
    The return address is the value saved in the PR register + 4  */
 
@@ -63,7 +62,7 @@ extern CORE_ADDR sh_skip_prologue PARAMS ((CORE_ADDR));
 /* Illegal instruction - used by the simulator for breakpoint
    detection */
 
-#define BREAKPOINT {0xc3, 0xc3}  /* 0xc3c3 is trapa #c3, and it works in big 
+#define BREAKPOINT {0xc3, 0xc3}  /* 0xc3c3 is trapa #c3, and it works in big
                                    and little endian modes  */
 
 #define BIG_REMOTE_BREAKPOINT    { 0xc3, 0x20 }
@@ -77,7 +76,7 @@ extern CORE_ADDR sh_skip_prologue PARAMS ((CORE_ADDR));
 #define REGISTER_TYPE  long
 
 /* Say how much memory is needed to store a copy of the register set */
-#define REGISTER_BYTES    (NUM_REGS*4) 
+#define REGISTER_BYTES    (NUM_REGS*4)
 
 /* Index within `registers' of the first byte of the space for
    register N.  */
@@ -147,7 +146,7 @@ extern char **sh_register_names;
 #define NUM_REALREGS   59
 
 /* Store the address of the place in which to copy the structure the
-   subroutine will return.  This is called from call_function. 
+   subroutine will return.  This is called from call_function.
 
    We store structs through a pointer passed in R0 */
 
@@ -166,7 +165,7 @@ extern void sh_extract_return_value PARAMS ((struct type *, void *, void *));
        sh_extract_return_value (TYPE, REGBUF, VALBUF)
 
 /* Write into appropriate registers a function return value
-   of type TYPE, given in virtual format.  
+   of type TYPE, given in virtual format.
 
    Things always get returned in R0/R1 */
 
@@ -181,25 +180,25 @@ extern void sh_extract_return_value PARAMS ((struct type *, void *, void *));
      extract_address (REGBUF, REGISTER_RAW_SIZE (0))
 
 
-/* Define other aspects of the stack frame. 
+/* Define other aspects of the stack frame.
    we keep a copy of the worked out return pc lying around, since it
    is a useful bit of info */
 
 #define EXTRA_FRAME_INFO \
     CORE_ADDR return_pc; \
     int leaf_function;   \
-    int f_offset;    
+    int f_offset;
 
 #define INIT_EXTRA_FRAME_INFO(fromleaf, fi) \
-    sh_init_extra_frame_info(fromleaf, fi) 
+    sh_init_extra_frame_info(fromleaf, fi)
 extern void sh_init_extra_frame_info PARAMS ((int, struct frame_info *));
 
 /* A macro that tells us whether the function invocation represented
    by FI does not have a frame on the stack associated with it.  If it
    does not, FRAMELESS is set to 1, else 0.  */
 
-#define FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS) \
-  (FRAMELESS) = frameless_look_for_prologue(FI)
+#define FRAMELESS_FUNCTION_INVOCATION(FI) \
+  (frameless_look_for_prologue(FI))
 
 #define FRAME_SAVED_PC(FRAME)          ((FRAME)->return_pc)
 #define FRAME_ARGS_ADDRESS(fi)         ((fi)->frame)
@@ -210,13 +209,13 @@ extern void sh_init_extra_frame_info PARAMS ((int, struct frame_info *));
 
 /* We can't tell how many args there are */
 
-#define FRAME_NUM_ARGS(val,fi) (val = -1)
+#define FRAME_NUM_ARGS(fi) (-1)
 
 /* Return number of bytes at start of arglist that are not really args.  */
 
 #define FRAME_ARGS_SKIP 0
 
-extern void sh_frame_find_saved_regs PARAMS ((struct frame_info *fi, 
+extern void sh_frame_find_saved_regs PARAMS ((struct frame_info *fi,
                                              struct frame_saved_regs *fsr));
 
 /* Put here the code to store, into a struct frame_saved_regs,
@@ -232,8 +231,8 @@ extern void sh_frame_find_saved_regs PARAMS ((struct frame_info *fi,
 
 typedef unsigned short INSN_WORD;
 
-extern CORE_ADDR sh_push_arguments PARAMS ((int nargs, 
-                                           struct value **args, 
+extern CORE_ADDR sh_push_arguments PARAMS ((int nargs,
+                                           struct value **args,
                                            CORE_ADDR sp,
                                            unsigned char struct_return,
                                            CORE_ADDR struct_addr));
@@ -243,7 +242,7 @@ extern CORE_ADDR sh_push_arguments PARAMS ((int nargs,
 #define CALL_DUMMY_LENGTH            (0)
 #define CALL_DUMMY_START_OFFSET      (0)
 #define CALL_DUMMY_BREAKPOINT_OFFSET (0)
-#define FIX_CALL_DUMMY(DUMMY, STARTADDR, FUNADDR, NARGS, ARGS, TYPE, GCCP) 
+#define FIX_CALL_DUMMY(DUMMY, STARTADDR, FUNADDR, NARGS, ARGS, TYPE, GCCP)
 #define CALL_DUMMY_LOCATION          AT_ENTRY_POINT
 #define CALL_DUMMY_ADDRESS()         entry_point_address ()
 extern CORE_ADDR sh_push_return_address   PARAMS ((CORE_ADDR, CORE_ADDR));
@@ -256,9 +255,9 @@ extern CORE_ADDR sh_frame_chain PARAMS ((struct frame_info *));
 #define FRAME_CHAIN_VALID(FP, FRAME) generic_frame_chain_valid (FP, FRAME)
 #define PC_IN_CALL_DUMMY(PC, SP, FP) generic_pc_in_call_dummy (PC, SP, FP)
 #define PUSH_ARGUMENTS(NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR) \
-    (SP) = sh_push_arguments (NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR)
+    (sh_push_arguments (NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR))
 
-/* override the standard get_saved_register function with 
+/* override the standard get_saved_register function with
    one that takes account of generic CALL_DUMMY frames */
 #define GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) \
      generic_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval)
index 40a9a626d0d2b111c3f4a149e02625f31b9a5a4d..693fa08268548b65a2c4ca9161d8c9f56d996d0b 100644 (file)
@@ -369,7 +369,7 @@ extern void sparc64_write_fp PARAMS ((CORE_ADDR));
 
 CORE_ADDR sp64_push_arguments PARAMS ((int, struct value **, CORE_ADDR, unsigned char, CORE_ADDR));
 #undef PUSH_ARGUMENTS
-#define PUSH_ARGUMENTS(A,B,C,D,E) (sp = sp64_push_arguments ((A), (B), (C), (D), (E)))
+#define PUSH_ARGUMENTS(A,B,C,D,E) (sp64_push_arguments ((A), (B), (C), (D), (E)))
 
 #undef EXTRACT_RETURN_VALUE
 #define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
index b2bc3c0431257bc0349dd36678c63a55f6f779b4..f3a9c662d746382ab94edc6f38ba2f58b5b772d1 100644 (file)
@@ -362,8 +362,8 @@ extern CORE_ADDR sparc_frame_chain PARAMS ((struct frame_info *));
 /* A macro that tells us whether the function invocation represented
    by FI does not have a frame on the stack associated with it.  If it
    does not, FRAMELESS is set to 1, else 0.  */
-#define FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS) \
-  (FRAMELESS) = frameless_look_for_prologue(FI)
+#define FRAMELESS_FUNCTION_INVOCATION(FI) \
+  (frameless_look_for_prologue(FI))
 
 /* The location of I0 w.r.t SP.  This is actually dependent on how the system's
    window overflow/underflow routines are written.  Most vendors save the L regs
@@ -390,7 +390,7 @@ extern CORE_ADDR sparc_frame_saved_pc PARAMS ((struct frame_info *));
 
 /* We can't tell how many args there are
    now that the C compiler delays popping them.  */
-#define FRAME_NUM_ARGS(val,fi) (val = -1)
+#define FRAME_NUM_ARGS(fi) (-1)
 
 /* Return number of bytes at start of arglist that are not really args.  */
 
@@ -583,6 +583,6 @@ extern int deferred_stores;
    function calls.  */
 
 #define PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) \
-    sp = sparc_push_arguments((nargs), (args), (sp), (struct_return), (struct_addr))
+  (sparc_push_arguments((nargs), (args), (sp), (struct_return), (struct_addr)))
 extern CORE_ADDR
 sparc_push_arguments PARAMS ((int, struct value **, CORE_ADDR, int, CORE_ADDR));
index 8c8321f371cb39082b7dacf944d3b3f49a9e853c..8711d2457a4e6f908f7adaf44ee18e09d41e398c 100644 (file)
@@ -189,8 +189,8 @@ extern CORE_ADDR tahoe_skip_prologue PARAMS ((CORE_ADDR));
 /* Return number of args passed to a frame.
    Can return -1, meaning no way to tell.  */
 
-#define FRAME_NUM_ARGS(numargs, fi)  \
-{ numargs = ((0xffff & read_memory_integer(((fi)->frame-4),4)) - 4) >> 2; }
+extern int tahoe_frame_num_args PARAMS ((struct frame_info *fi));
+#define FRAME_NUM_ARGS(fi) (tahoe_frame_num_args ((fi)))
 
 /* Return number of bytes at start of arglist that are not really args.  */
 
index 8b33381ae191caf36e81573bbd32d50428787dd0..567beb061f77c0023cfc6ed720d966e2d129e986 100644 (file)
@@ -136,7 +136,7 @@ extern struct frame_info *tic80_pop_frame PARAMS ((struct frame_info *frame));
    Can set VAL to -1, meaning no way to tell.  */
 /* We can't tell how many args there are */
 
-#define FRAME_NUM_ARGS(val,fi) (val = -1)
+#define FRAME_NUM_ARGS(fi) (-1)
 
 #define FRAME_ARGS_SKIP 0
 #define FRAME_ARGS_ADDRESS(fi)   (fi)->frame
@@ -229,7 +229,7 @@ extern CORE_ADDR tic80_push_arguments PARAMS ((int nargs,
                                               CORE_ADDR struct_addr));
 
 #define PUSH_ARGUMENTS(NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR) \
-  (SP) = tic80_push_arguments (NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR)
+  (tic80_push_arguments (NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR))
 
 /* PUSH_RETURN_ADDRESS */
 extern CORE_ADDR tic80_push_return_address PARAMS ((CORE_ADDR, CORE_ADDR));
index 5a11451b1edf699c68e053286bb7385a16d7b048..05fa79db36afb957611038ee317c4f0c238580fb 100644 (file)
@@ -132,7 +132,7 @@ extern CORE_ADDR v850_skip_prologue PARAMS ((CORE_ADDR pc));
 
 #define FRAME_ARGS_ADDRESS(fi) ((fi)->frame)
 #define FRAME_LOCALS_ADDRESS(fi) ((fi)->frame)
-#define FRAME_NUM_ARGS(val, fi) ((val) = -1)
+#define FRAME_NUM_ARGS(fi) (-1)
 
 extern void v850_pop_frame PARAMS ((struct frame_info *frame));
 #define POP_FRAME v850_pop_frame (get_current_frame ())
@@ -155,7 +155,7 @@ v850_push_arguments PARAMS ((int nargs, struct value **args, CORE_ADDR sp,
                             unsigned char struct_return,
                             CORE_ADDR struct_addr));
 #define PUSH_ARGUMENTS(NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR) \
-  (SP) = v850_push_arguments (NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR)
+  (v850_push_arguments (NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR))
 
 #define STORE_STRUCT_RETURN(STRUCT_ADDR, SP)
 
index 62729b370ce323b19045c50266efab28011ea82d..277aa8b8a41919dd09b7f1057ec0b88cdfc9167b 100644 (file)
@@ -173,7 +173,7 @@ extern CORE_ADDR vax_skip_prologue PARAMS ((CORE_ADDR));
    by FI does not have a frame on the stack associated with it.  If it
    does not, FRAMELESS is set to 1, else 0.  */
 /* On the vax, all functions have frames.  */
-#define FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS)  {(FRAMELESS) = 0;}
+#define FRAMELESS_FUNCTION_INVOCATION(FI)  (0)
 
 /* Saved Pc.  Get it from sigcontext if within sigtramp.  */
 
@@ -213,8 +213,8 @@ extern CORE_ADDR vax_skip_prologue PARAMS ((CORE_ADDR));
 /* Return number of args passed to a frame.
    Can return -1, meaning no way to tell.  */
 
-#define FRAME_NUM_ARGS(numargs, fi)  \
-{ numargs = (0xff & read_memory_integer (FRAME_ARGS_ADDRESS (fi), 1)); }
+extern int vax_frame_num_args PARAMS ((struct frame_info *fi));
+#define FRAME_NUM_ARGS(fi) (vax_frame_num_args ((fi)))
 
 /* Return number of bytes at start of arglist that are not really args.  */
 
index 2e354bbb18fa584807586f19616003e652b69338..05d93c3c7b347bf61a882f944c35de609c1c6b66 100644 (file)
@@ -159,8 +159,8 @@ extern CORE_ADDR w65_skip_prologue ();
    by FI does not have a frame on the stack associated with it.  If it
    does not, FRAMELESS is set to 1, else 0.  */
 
-#define FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS) \
-  (FRAMELESS) = frameless_look_for_prologue(FI)
+#define FRAMELESS_FUNCTION_INVOCATION(FI) \
+  (frameless_look_for_prologue (FI))
 
 #define FRAME_CHAIN(FRAME)       w65_frame_chain(FRAME)
 #define FRAME_SAVED_PC(FRAME)    (w65_frame_saved_pc(FRAME))
@@ -172,7 +172,7 @@ extern CORE_ADDR w65_skip_prologue ();
 
 /* We can't tell how many args there are */
 
-#define FRAME_NUM_ARGS(val,fi) (val = -1)
+#define FRAME_NUM_ARGS(fi) (-1)
 
 /* Return number of bytes at start of arglist that are not really args.  */
 
index 1a34b0fcab641b0a982bf944e00cd0410218d77f..3b38d75f1b00e753403fff10672c24acfa2dd48d 100644 (file)
@@ -175,8 +175,8 @@ extern CORE_ADDR mz8k_skip_prologue PARAMS ((CORE_ADDR ip));
 /* A macro that tells us whether the function invocation represented
    by FI does not have a frame on the stack associated with it.  If it
    does not, FRAMELESS is set to 1, else 0.  */
-#define FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS) \
-  (FRAMELESS) = frameless_look_for_prologue(FI)
+#define FRAMELESS_FUNCTION_INVOCATION(FI) \
+  (frameless_look_for_prologue (FI))
 
 #define FRAME_SAVED_PC(FRAME) frame_saved_pc(FRAME)
 
@@ -190,7 +190,7 @@ extern CORE_ADDR mz8k_skip_prologue PARAMS ((CORE_ADDR ip));
 /* We can't tell how many args there are
    now that the C compiler delays popping them.  */
 #if !defined (FRAME_NUM_ARGS)
-#define FRAME_NUM_ARGS(val,fi) (val = -1)
+#define FRAME_NUM_ARGS(fi) (-1)
 #endif
 
 /* Return number of bytes at start of arglist that are not really args.  */
index fd490b107ed3540b2063a7ceabbfb1b461e26922..66161e7930e486fb5633166c8ae9fa7f122a2670 100644 (file)
@@ -80,6 +80,27 @@ convex_skip_prologue (pc)
   return pc;
 }
 
+int
+convex_frameless_function_invocation (fi)
+     struct frame_info *fi;
+{
+  int frameless;
+  extern CORE_ADDR text_start, text_end;
+  CORE_ADDR call_addr = SAVED_PC_AFTER_CALL (FI);
+  frameless = (call_addr >= text_start && call_addr < text_end
+              && read_memory_integer (call_addr - 6, 1) == 0x22);
+  return frameless;
+}
+
+int
+convex_frame_num_args (fi)
+     struct frame_info *fi;
+{
+  int numargs = read_memory_integer (FRAME_ARGS_ADDRESS (fi) - 4, 4);
+  if (numargs < 0 || numargs >= 256)
+    numargs = -1;
+  return numargs;
+}
 
 exec_file_command (filename, from_tty)
      char *filename;
index 6a0bea4f9442529f2383133b7e757d3ce9036098..b720b50323a0b07aeb44631775517c6c017d005e 100644 (file)
@@ -39,6 +39,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 /* Local function declarations.  */
 
+extern void _initialize_core PARAMS ((void));
 static void call_extra_exec_file_hooks PARAMS ((char *filename));
 
 /* You can have any number of hooks for `exec_file_command' command to call.
index eeeb79e010b1b82c54814725f2f4fab9c396b506..ecec1d900dda0b65c460e051d8ef936c2af3f55d 100644 (file)
@@ -44,6 +44,8 @@ int static_field_print;       /* Controls printing of static fields. */
 static struct obstack dont_print_vb_obstack;
 static struct obstack dont_print_statmem_obstack;
 
+extern void _initialize_cp_valprint PARAMS ((void));
+
 static void
 cp_print_static_field PARAMS ((struct type *, value_ptr, GDB_FILE *, int, int,
                               enum val_prettyprint));
index 7f6060337c86c54e7cebe4a6b53e7e5b73eb489a..0ceee9f9e473ffdbe9fce41c1ce1967e94a4256f 100644 (file)
@@ -33,8 +33,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #include "symfile.h"
 #include "objfiles.h"
 
-void d10v_frame_find_saved_regs PARAMS ((struct frame_info *fi,
-                                        struct frame_saved_regs *fsr));
+/* Local functions */
+
+extern void _initialize_d10v_tdep PARAMS ((void));
+
+static void d10v_eva_prepare_to_trace PARAMS ((void));
+
+static void d10v_eva_get_trace_data PARAMS ((void));
 
 int
 d10v_frame_chain_valid (chain, frame)
@@ -61,6 +66,228 @@ d10v_use_struct_convention (gcc_p, type)
 }
 
 
+unsigned char *
+d10v_breakpoint_from_pc (pcptr, lenptr)
+     CORE_ADDR *pcptr;
+     int *lenptr;
+{
+  static unsigned char breakpoint [] = {0x2f, 0x90, 0x5e, 0x00};
+  *lenptr = sizeof (breakpoint);
+  return breakpoint;
+}
+
+char *
+d10v_register_name (reg_nr)
+     int reg_nr;
+{
+  static char *register_names[] = {
+    "r0", "r1", "r2", "r3", "r4", "r5",  "r6", "r7",
+    "r8", "r9", "r10","r11","r12", "r13", "r14","r15",
+    "psw","bpsw","pc","bpc", "cr4", "cr5", "cr6", "rpt_c",
+    "rpt_s","rpt_e", "mod_s", "mod_e", "cr12", "cr13", "iba", "cr15",
+    "imap0","imap1","dmap","a0", "a1"
+  };
+  if (reg_nr < 0)
+    return NULL;
+  if (reg_nr >= (sizeof (register_names) / sizeof (*register_names)))
+    return NULL;
+  return register_names [reg_nr];
+}
+
+
+/* Index within `registers' of the first byte of the space for
+   register REG_NR.  */
+
+int
+d10v_register_byte (reg_nr)
+     int reg_nr;
+{
+  if (reg_nr > A0_REGNUM)
+    return ((reg_nr - A0_REGNUM) * 8 + (A0_REGNUM * 2));
+  else
+    return (reg_nr * 2);
+}
+
+/* Number of bytes of storage in the actual machine representation for
+   register REG_NR.  */
+
+int
+d10v_register_raw_size (reg_nr)
+     int reg_nr;
+{
+  if (reg_nr >= A0_REGNUM)
+    return 8;
+  else
+    return 2;
+}
+
+/* Number of bytes of storage in the program's representation
+   for register N.  */
+
+int
+d10v_register_virtual_size (reg_nr)
+     int reg_nr;
+{
+  if (reg_nr >= A0_REGNUM)
+    return 8;
+  else if (reg_nr == PC_REGNUM || reg_nr == SP_REGNUM)
+    return 4;
+  else
+    return 2;
+}
+
+/* Return the GDB type object for the "standard" data type
+   of data in register N.  */
+
+struct type *
+d10v_register_virtual_type (reg_nr)
+     int reg_nr;
+{
+  if (reg_nr >= A0_REGNUM)
+    return builtin_type_long_long;
+  else if (reg_nr == PC_REGNUM || reg_nr == SP_REGNUM)
+    return builtin_type_long;
+  else
+    return builtin_type_short;
+}
+
+#if 0
+/* convert $pc and $sp to/from virtual addresses */
+#define REGISTER_CONVERTIBLE(N) ((N) == PC_REGNUM || (N) == SP_REGNUM)
+#define REGISTER_CONVERT_TO_VIRTUAL(REGNUM,TYPE,FROM,TO) \
+{ \
+    ULONGEST x = extract_unsigned_integer ((FROM), REGISTER_RAW_SIZE (REGNUM)); \
+    if (REGNUM == PC_REGNUM) x = (x << 2) | IMEM_START; \
+    else x |= DMEM_START; \
+    store_unsigned_integer ((TO), TYPE_LENGTH(TYPE), x); \
+}
+#define REGISTER_CONVERT_TO_RAW(TYPE,REGNUM,FROM,TO) \
+{ \
+    ULONGEST x = extract_unsigned_integer ((FROM), TYPE_LENGTH(TYPE)); \
+    x &= 0x3ffff; \
+    if (REGNUM == PC_REGNUM) x >>= 2; \
+    store_unsigned_integer ((TO), 2, x); \
+}
+#endif
+
+CORE_ADDR
+d10v_make_daddr (x)
+     CORE_ADDR x;
+{
+  return ((x) | DMEM_START);
+}
+
+CORE_ADDR
+d10v_make_iaddr (x)
+     CORE_ADDR x;
+{
+  return (((x) << 2) | IMEM_START);
+}
+
+int
+d10v_daddr_p (x)
+     CORE_ADDR x;
+{
+  return (((x) & 0x3000000) == DMEM_START);
+}
+
+int
+d10v_iaddr_p (x)
+     CORE_ADDR x;
+{
+  return (((x) & 0x3000000) == IMEM_START);
+}
+
+
+CORE_ADDR
+d10v_convert_iaddr_to_raw (x)
+     CORE_ADDR x;
+{
+  return (((x) >> 2) & 0xffff);
+}
+
+CORE_ADDR
+d10v_convert_daddr_to_raw(x)
+     CORE_ADDR x;
+{
+  return ((x) & 0xffff);
+}
+
+/* Store the address of the place in which to copy the structure the
+   subroutine will return.  This is called from call_function. 
+
+   We store structs through a pointer passed in the first Argument
+   register. */
+
+void
+d10v_store_struct_return (addr, sp)
+     CORE_ADDR addr;
+     CORE_ADDR sp;
+{
+  write_register (ARG1_REGNUM, (addr));
+}
+
+/* Write into appropriate registers a function return value
+   of type TYPE, given in virtual format.  
+
+   Things always get returned in RET1_REGNUM, RET2_REGNUM, ... */
+
+void
+d10v_store_return_value (type,valbuf)
+     struct type *type;
+     char *valbuf;
+{
+  write_register_bytes (REGISTER_BYTE (RET1_REGNUM),
+                       valbuf,
+                       TYPE_LENGTH (type));
+}
+
+/* Extract from an array REGBUF containing the (raw) register state
+   the address in which a function should return its structure value,
+   as a CORE_ADDR (or an expression that can be used as one).  */
+
+CORE_ADDR
+d10v_extract_struct_value_address (regbuf)
+     char *regbuf;
+{
+  return (extract_address ((regbuf) + REGISTER_BYTE (ARG1_REGNUM),
+                          REGISTER_RAW_SIZE (ARG1_REGNUM))
+         | DMEM_START);
+}
+
+CORE_ADDR
+d10v_frame_saved_pc (frame)
+     struct frame_info *frame;
+{
+  return ((frame)->return_pc);
+}
+
+CORE_ADDR
+d10v_frame_args_address (fi)
+     struct frame_info *fi;
+{
+  return (fi)->frame;
+}
+
+CORE_ADDR
+d10v_frame_locals_address (fi)
+     struct frame_info *fi;
+{
+  return (fi)->frame;
+}
+
+/* Immediately after a function call, return the saved pc.  We can't
+   use frame->return_pc beause that is determined by reading R13 off
+   the stack and that may not be written yet. */
+
+CORE_ADDR
+d10v_saved_pc_after_call (frame)
+     struct frame_info *frame;
+{
+  return ((read_register(LR_REGNUM) << 2)
+         | IMEM_START);
+}
+
 /* Discard from the stack the innermost frame, restoring all saved
    registers.  */
 
@@ -869,7 +1096,7 @@ print_insn (memaddr, stream)
   return (*tm_print_insn) (memaddr, &tm_print_insn_info);
 }
 
-void
+static void
 d10v_eva_prepare_to_trace ()
 {
   if (!tracing)
@@ -881,7 +1108,7 @@ d10v_eva_prepare_to_trace ()
 /* Collect trace data from the target board and format it into a form
    more useful for display.  */
 
-void
+static void
 d10v_eva_get_trace_data ()
 {
   int count, i, j, oldsize;
index f7521307026da3f4ef379fa9840f8c070183d27d..e61bef926cdbc0bd0a081a4791c97570d6732e48 100644 (file)
@@ -261,6 +261,8 @@ static int bincls_allocated;
 
 /* Local function prototypes */
 
+extern void _initialize_dbxread PARAMS ((void));
+
 static void 
 process_now PARAMS ((struct objfile *));
 
index e63fb1520d50b7c37f059fd18b0178666dbec202..a65baaba003572ae00099f505cb61c6b67ef35d2 100644 (file)
@@ -74,6 +74,10 @@ extern char *strsignal PARAMS ((int));
 
 typedef bfd_vma CORE_ADDR;
 
+extern int core_addr_lessthan PARAMS ((CORE_ADDR lhs, CORE_ADDR rhs));
+extern int core_addr_greaterthan PARAMS ((CORE_ADDR lhs, CORE_ADDR rhs));
+
+
 #ifndef min
 #define min(a, b) ((a) < (b) ? (a) : (b))
 #endif
@@ -248,6 +252,8 @@ extern char *chill_demangle PARAMS ((const char *));
 
 /* From utils.c */
 
+extern void initialize_utils PARAMS ((void));
+
 extern void notice_quit PARAMS ((void));
 
 extern int strcmp_iw PARAMS ((const char *, const char *));
@@ -307,6 +313,8 @@ extern PTR mrealloc PARAMS ((PTR, PTR, size_t));
 extern void mfree PARAMS ((PTR, PTR));
 #endif
 
+extern void init_page_info PARAMS ((void));
+
 /* From demangle.c */
 
 extern void set_demangling_style PARAMS ((char *));
@@ -507,6 +515,15 @@ extern char *symtab_to_filename PARAMS ((struct symtab *));
 
 extern int read_relative_register_raw_bytes PARAMS ((int, char *));
 
+#if __STDC__
+enum lval_type;
+struct frame_info;
+#endif
+void default_get_saved_register PARAMS ((char *raw_buffer, int *optimized,
+                                        CORE_ADDR *addrp,
+                                        struct frame_info *frame, int regnum,
+                                        enum lval_type *lval));
+
 /* From readline (but not in any readline .h files).  */
 
 extern char *tilde_expand PARAMS ((char *));
index 669d9abcd28fca8a83a0bcce97f8edd61d1968cb..0f054ba66f8ab9585b4ce8aaa122d947c3c544c3 100644 (file)
@@ -40,6 +40,8 @@
 #define DEFAULT_DEMANGLING_STYLE AUTO_DEMANGLING_STYLE_STRING
 #endif
 
+extern void _initialize_demangler PARAMS ((void));
+
 /* String name for the current demangling style.  Set by the
    "set demangle-style" command, printed as part of the output by the
    "show demangle-style" command. */
index ab547e8656c753a32fcfa7615f10c57f2018e603..87c39209b43bd7de171a0de8405baefd03ccc9da 100644 (file)
@@ -1,3 +1,12 @@
+Mon May 24 10:07:39 1999  Andrew Cagney  <cagney@b1.cygnus.com>
+
+       * gdbint.texinfo (FRAME_NUM_ARGS): Update definition.  Parameter
+       numargs was dropped.
+
+Thu May 20 12:26:59 1999  Andrew Cagney  <cagney@b1.cygnus.com>
+
+       * gdbint.texinfo (FRAMELESS_FUNCTION_INVOCATION): Update.
+
 Tue Apr 27 19:14:20 1999  Andrew Cagney  <cagney@b1.cygnus.com>
 
        * gdbint.texinfo (SKIP_PROLOGUE, SKIP_PROLOGUE_FRAMELESS_P):
index 6dffb98cd9101f21bd9cc9b3a13b7610120d2029..d8299584e0de482ae9c6d4fb90e1417e9665d8f4 100644 (file)
@@ -1330,10 +1330,10 @@ the processor's floating point unit.
 @item FP_REGNUM
 The number of the frame pointer register.
 
-@item FRAMELESS_FUNCTION_INVOCATION(fi, frameless)
-Define this to set the variable @var{frameless} to 1 if the function
-invocation represented by @var{fi} does not have a stack frame
-associated with it.  Otherwise set it to 0.
+@item FRAMELESS_FUNCTION_INVOCATION(fi)
+Define this to an expression that returns 1 if the function invocation
+represented by @var{fi} does not have a stack frame associated with it.
+Otherwise return 0.
 
 @item FRAME_ARGS_ADDRESS_CORRECT
 stack.c
@@ -1366,9 +1366,10 @@ current stack frame storing each in @code{frame->saved_regs}.  Space for
 
 @var{FRAME_FIND_SAVED_REGS} and @var{EXTRA_FRAME_INFO} are deprecated.
 
-@item FRAME_NUM_ARGS (val, fi)
-For the frame described by @var{fi}, set @var{val} to the number of arguments
-that are being passed.
+@item FRAME_NUM_ARGS (fi)
+For the frame described by @var{fi} return the number of arguments that
+are being passed.  If the number of arguments is not known, return
+@code{-1}.
 
 @item FRAME_SAVED_PC(frame)
 Given @var{frame}, return the pc saved there.  That is, the return
@@ -1529,7 +1530,8 @@ Used in @samp{call_function_by_hand} to remove an artificial stack
 frame.
 
 @item PUSH_ARGUMENTS (nargs, args, sp, struct_return, struct_addr)
-Define this to push arguments onto the stack for inferior function call.
+Define this to push arguments onto the stack for inferior function
+call. Return the updated stack pointer value.
 
 @item PUSH_DUMMY_FRAME
 Used in @samp{call_function_by_hand} to create an artificial stack frame.
index 417039e044de61f39a31c4fcd71fefbe68654945..9c13b00bf4859cfbee99b6f2b3beb29a8563c37f 100644 (file)
@@ -32,6 +32,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #include "complaints.h"
 #include "demangle.h"
 
+extern void _initialize_elfread PARAMS ((void));
+
 /* The struct elfinfo is available only during ELF symbol table and
    psymtab reading.  It is destroyed at the complation of psymtab-reading.
    It's local to elf_symfile_read.  */
index fe1d0f5bd12b5ece603475d43c9d4f002c0519e1..26930343fbdc981ce0e6058f775bd0496afd8328 100644 (file)
@@ -59,7 +59,7 @@ event_queue;
    basically a description of what kind of events gdb is interested
    in, for each fd. */
 
-/* As of 4/30/99 only the input file descriptor is registered with the
+/* As of 1999-04-30 only the input file descriptor is registered with the
    event loop. */
 
 #ifdef HAVE_POLL
@@ -124,7 +124,6 @@ static int async_handler_ready = 0;
 static void invoke_async_signal_handler PARAMS ((void));
 static int gdb_wait_for_event PARAMS ((void));
 static int check_async_ready PARAMS ((void));
-extern display_gdb_prompt PARAMS ((char *));
 \f
 
 /* Insert an event object into the gdb event queue at 
index 69c38e704a09c77229ef06b9b4e10ce46955361a..a366ed3a113cae329c558f9e5b75f822849cbbdf 100644 (file)
@@ -241,3 +241,13 @@ extern void mark_async_signal_handler PARAMS ((async_signal_handler *));
 extern async_signal_handler *
   create_async_signal_handler PARAMS ((async_handler_func *, gdb_client_data));
 
+extern void delete_async_signal_handler PARAMS ((async_signal_handler *async_handler_ptr));
+extern void display_gdb_prompt PARAMS ((char*));
+
+extern void setup_event_loop PARAMS ((void));
+extern void async_init_signals PARAMS ((void));
+
+extern void set_async_editing_command PARAMS ((char *, int, struct cmd_list_element *));
+extern void set_async_annotation_level PARAMS ((char *, int, struct cmd_list_element *));
+extern void set_async_prompt PARAMS ((char *, int, struct cmd_list_element *));
+
index 5851fd2aa4165417c5316f4d26ec2422ef0644a0..d241dda7ad49ffa5246b90209781f242696168fe 100644 (file)
@@ -38,6 +38,9 @@ static void command_line_handler PARAMS ((char *));
 static void gdb_readline2 PARAMS ((void));
 static void pop_prompt PARAMS ((void));
 static void push_prompt PARAMS ((char *, char *, char *));
+static void change_line_handler PARAMS ((void));
+static void change_annotation_level PARAMS ((void));
+static void command_handler PARAMS ((char *));
 
 /* Signal handlers. */
 void handle_sigint PARAMS ((int));
@@ -104,7 +107,7 @@ void (*call_readline) PARAMS ((void));
 /* This is used to determine if GDB is using the readline library or
    its own simplified form of readline. It is used by the asynchronous
    form of the set editing command. 
-   ezannoni: as of 4/29/99 I expect that this
+   ezannoni: as of 1999-04-29 I expect that this
    variable will not be used after gdb is changed to use the event
    loop as default engine, and event-top.c is merged into top.c. */
 int async_command_editing_p;
@@ -219,7 +222,7 @@ setup_event_loop ()
    itself, via gdb_readline2. Also it is used in the opposite case in
    which the user sets editing on again, by restoring readline
    handling of the input. */
-void
+static void
 change_line_handler ()
 {
   if (async_command_editing_p)
@@ -308,7 +311,7 @@ display_gdb_prompt (new_prompt)
    of the prompt stack, if the annotation level desired is 2, otherwise
    it pops the top of the prompt stack when we want the annotation level
    to be the normal ones (1 or 2). */
-void
+static void
 change_annotation_level ()
 {
   char *prefix, *suffix;
@@ -389,10 +392,10 @@ pop_prompt ()
 /* Handles a gdb command. This function is called by
    command_line_handler, which has processed one or more input lines
    into COMMAND. */
-/* NOTE: 4/30/99 This is the asynchronous version of the command_loop
+/* NOTE: 1999-04-30 This is the asynchronous version of the command_loop
    function.  The command_loop function will be obsolete when we
    switch to use the event loop at every execution of gdb. */
-void
+static void
 command_handler (command)
      char *command;
 {
@@ -471,7 +474,7 @@ command_handler (command)
    mechanism within the readline library.  Deal with incomplete commands
    as well, by saving the partial input in a global buffer.  */
 
-/* NOTE: 4/30/99 This is the asynchronous version of the
+/* NOTE: 1999-04-30 This is the asynchronous version of the
    command_line_input function. command_line_input will become
    obsolete once we use the event loop as the default mechanism in
    GDB. */
@@ -689,7 +692,7 @@ command_line_handler (rl)
 /* Does reading of input from terminal w/o the editing features
    provided by the readline library. */
 
-/* NOTE: 4/30/99 Asynchronous version of gdb_readline. gdb_readline
+/* NOTE: 1999-04-30 Asynchronous version of gdb_readline. gdb_readline
    will become obsolete when the event loop is made the default
    execution for gdb. */
 static void
@@ -759,7 +762,7 @@ gdb_readline2 ()
    procedures are the old signal handlers. The event loop will take
    care of invoking the queued procedures to perform the usual tasks
    associated with the reception of the signal. */
-/* NOTE: 4/30/99 This is the asynchronous version of init_signals.
+/* NOTE: 1999-04-30 This is the asynchronous version of init_signals.
    init_signals will become obsolete as we move to have to event loop
    as the default for gdb. */
 void
index 4ee66d58c3f217dca371e13b2d37c3f87f3b515a..53dce631981d5b2b494c563b3415a1de98798b27 100644 (file)
@@ -66,6 +66,7 @@ typedef struct saved_bf_symnum     SAVED_BF, *SAVED_BF_PTR;
 
 /* Local functions */
 
+extern void _initialize_f_language PARAMS ((void));
 #if 0
 static void clear_function_list PARAMS ((void));
 static long get_bf_for_fcn PARAMS ((long));
index bb0b1d0efb1b42cfb7422058c6949a28f772fc38..c1a9e1757d3da87606fecd8d3073ff62413e8edb 100644 (file)
@@ -37,6 +37,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 static int there_is_a_visible_common_named PARAMS ((char *));
 #endif
 
+extern void _initialize_f_valprint PARAMS ((void));
 static void info_common_command PARAMS ((char *, int));
 static void list_all_visible_commons PARAMS ((char *));
 static void f77_print_array PARAMS ((struct type *, char *, CORE_ADDR,
index 74be8c7c5d7d1e4333e166fbaa8cbc8f3420a454..8cfead6618d79efa75f74d16c5c83761934c931b 100644 (file)
@@ -595,21 +595,18 @@ value_of_register (regnum)
 
   /* Convert raw data to virtual format if necessary.  */
 
-#ifdef REGISTER_CONVERTIBLE
   if (REGISTER_CONVERTIBLE (regnum))
     {
       REGISTER_CONVERT_TO_VIRTUAL (regnum, REGISTER_VIRTUAL_TYPE (regnum),
                                   raw_buffer, VALUE_CONTENTS_RAW (reg_val));
     }
+  else if (REGISTER_RAW_SIZE (regnum) == REGISTER_VIRTUAL_SIZE (regnum))
+    memcpy (VALUE_CONTENTS_RAW (reg_val), raw_buffer,
+           REGISTER_RAW_SIZE (regnum));
   else
-#endif
-    if (REGISTER_RAW_SIZE (regnum) == REGISTER_VIRTUAL_SIZE (regnum))
-      memcpy (VALUE_CONTENTS_RAW (reg_val), raw_buffer,
-             REGISTER_RAW_SIZE (regnum));
-    else
-      fatal ("Register \"%s\" (%d) has conflicting raw (%d) and virtual (%d) size",
-            REGISTER_NAME (regnum), regnum,
-            REGISTER_RAW_SIZE (regnum), REGISTER_VIRTUAL_SIZE (regnum));
+    fatal ("Register \"%s\" (%d) has conflicting raw (%d) and virtual (%d) size",
+          REGISTER_NAME (regnum), regnum,
+          REGISTER_RAW_SIZE (regnum), REGISTER_VIRTUAL_SIZE (regnum));
   VALUE_LVAL (reg_val) = lval;
   VALUE_ADDRESS (reg_val) = addr;
   VALUE_REGNO (reg_val) = regnum;
@@ -1553,14 +1550,12 @@ value_from_register (type, regnum, frame)
 
   /* Convert raw data to virtual format if necessary.  */
   
-#ifdef REGISTER_CONVERTIBLE
   if (REGISTER_CONVERTIBLE (regnum))
     {
       REGISTER_CONVERT_TO_VIRTUAL (regnum, type,
                                   raw_buffer, VALUE_CONTENTS_RAW (v));
     }
   else
-#endif
     {
       /* Raw and virtual formats are the same for this register.  */
 
index ae3b886f9a96aeb2089efd94cd8cedaed36462b2..13d9426451450c618332451fad25f933c2c6b3fd 100644 (file)
@@ -28,6 +28,22 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #include "gdbcore.h"
 #include "symfile.h"
 
+/* An expression that tells us whether the function invocation represented
+   by FI does not have a frame on the stack associated with it.  */
+int
+fr30_frameless_function_invocation (fi)
+     struct frame_info *fi;
+{
+  int frameless;
+  CORE_ADDR func_start, after_prologue;
+  func_start = (get_pc_function_start ((fi)->pc) +
+               FUNCTION_START_OFFSET);
+  after_prologue = func_start;
+  after_prologue = SKIP_PROLOGUE (after_prologue);
+  frameless = (after_prologue == func_start);
+  return frameless;
+}
+
 /* Function: pop_frame
    This routine gets called when either the user uses the `return'
    command, or the call dummy breakpoint gets hit.  */
index 87d19069e4e7991dd00c951c1355878e52aca510..fa92a660a041497a1dcbe7114ebd6b9a7da2653f 100644 (file)
@@ -197,7 +197,7 @@ int (*target_architecture_hook) PARAMS ((const struct bfd_arch_info *ap));
 
 /* Do the real work of changing the current architecture */
 
-static int arch_valid PARAMS ((const struct bfd_arch_info *arch));
+static int arch_ok PARAMS ((const struct bfd_arch_info *arch));
 static int
 arch_ok (arch)
      const struct bfd_arch_info *arch;
@@ -211,6 +211,7 @@ arch_ok (arch)
 
 enum set_arch { set_arch_auto, set_arch_manual };
 
+static void set_arch PARAMS ((const struct bfd_arch_info *arch, enum set_arch type));
 static void
 set_arch (arch, type)
      const struct bfd_arch_info *arch;
index f2380db6f59167cfe037f18bb1465419017f9d44..3caa0448366ce8e7410e93106a3657df67fcc3c0 100644 (file)
@@ -111,7 +111,22 @@ extern disassemble_info tm_print_insn_info;
 #endif
 
 
+/* Fallback definition of FRAMELESS_FUNCTION_INVOCATION */
+#ifndef FRAMELESS_FUNCTION_INVOCATION
+#define FRAMELESS_FUNCTION_INVOCATION(FI) (0)
+#endif
+
 
+/* Fallback definition of REGISTER_CONVERTIBLE etc */
+#ifndef REGISTER_CONVERTIBLE
+#define REGISTER_CONVERTIBLE(x) (0)
+#endif
+#ifndef REGISTER_CONVERT_TO_VIRTUAL
+#define REGISTER_CONVERT_TO_VIRTUAL(x, y, z, a)
+#endif
+#ifndef REGISTER_CONVERT_TO_RAW
+#define REGISTER_CONVERT_TO_RAW(x, y, z, a)
+#endif
 
 
 /* Set the dynamic target-system-dependant parameters (architecture,
index 228b1acdde7ce5e5638cb6298bd67f3fd74d61cb..436fd5ee9ab4b57cf85ba97bfb920ad563733337 100644 (file)
@@ -365,7 +365,7 @@ i386_frame_num_args (fi)
 
   int frameless;
 
-  FRAMELESS_FUNCTION_INVOCATION (fi, frameless);
+  frameless = FRAMELESS_FUNCTION_INVOCATION (fi);
   if (frameless)
     /* In the absence of a frame pointer, GDB doesn't get correct values
        for nameless arguments.  Return -1, so it doesn't print any
index 16ec0b7c35566677bb26717291ca2818024c2a5b..eb111694ae2f4b33a50fa6d0e6af53506ee2a03b 100644 (file)
@@ -90,6 +90,10 @@ static void step_command PARAMS ((char *, int));
 
 static void run_command PARAMS ((char *, int));
 
+static void run_no_args_command PARAMS ((char *args, int from_tty));
+
+static void go_command PARAMS ((char *line_no, int from_tty));
+
 void _initialize_infcmd PARAMS ((void));
 
 #define GO_USAGE   "Usage: go <location>\n"
@@ -1098,16 +1102,16 @@ do_registers_info (regnum, fpregs)
        }
 
       /* Convert raw data to virtual format if necessary.  */
-#ifdef REGISTER_CONVERTIBLE
       if (REGISTER_CONVERTIBLE (i))
        {
          REGISTER_CONVERT_TO_VIRTUAL (i, REGISTER_VIRTUAL_TYPE (i),
                                       raw_buffer, virtual_buffer);
        }
       else
-#endif
-       memcpy (virtual_buffer, raw_buffer,
-               REGISTER_VIRTUAL_SIZE (i));
+       {
+         memcpy (virtual_buffer, raw_buffer,
+                 REGISTER_VIRTUAL_SIZE (i));
+       }
 
       /* If virtual format is floating, print it that way, and in raw hex.  */
       if (TYPE_CODE (REGISTER_VIRTUAL_TYPE (i)) == TYPE_CODE_FLT)
@@ -1164,8 +1168,6 @@ do_registers_info (regnum, fpregs)
 }
 #endif /* no DO_REGISTERS_INFO.  */
 
-extern int target_map_name_to_register PARAMS ((char *, int));
-
 void
 registers_info (addr_exp, fpregs)
      char *addr_exp;
index d6a3bb1421aca14d4e9f75d564a76605b03f9d7d..6ce7721a93b2779f6abe5804234e0d75678ff661 100644 (file)
@@ -59,6 +59,8 @@ static void
 handle_sigio PARAMS ((int));
 #endif
 
+extern void _initialize_inflow PARAMS ((void));
+
 static void
 pass_signal PARAMS ((int));
 
index 81b288d247d448be4ecb77410feecfd4e4dd1856..a051ec1c67015d0187679af197ca604e4228329f 100644 (file)
@@ -104,6 +104,32 @@ static int thread_step_needed = 0;
 
 static int use_thread_step_needed = USE_THREAD_STEP_NEEDED;
 
+static void follow_inferior_fork PARAMS ((int parent_pid,
+                                         int child_pid,
+                                         int has_forked,
+                                         int has_vforked));
+
+static void follow_fork PARAMS ((int parent_pid, int child_pid));
+
+static void follow_vfork PARAMS ((int parent_pid, int child_pid));
+
+static void set_schedlock_func PARAMS ((char *args, int from_tty,
+                                       struct cmd_list_element *c));
+
+static int is_internal_shlib_eventpoint PARAMS ((struct breakpoint *ep));
+
+static int stopped_for_internal_shlib_event PARAMS ((bpstat bs));
+
+static int stopped_for_shlib_catchpoint PARAMS ((bpstat bs,
+                                                struct breakpoint **cp_p));
+
+#if __STDC__
+struct execution_control_state;
+#endif
+static int currently_stepping PARAMS ((struct execution_control_state *ecs));
+
+static void xdb_handle_command PARAMS ((char *args, int from_tty));
+
 void _initialize_infrun PARAMS ((void));
 
 /* GET_LONGJMP_TARGET returns the PC at which longjmp() will resume the
@@ -2907,7 +2933,7 @@ stop_stepping:
 
 /* Are we in the middle of stepping?  */
 
-int
+static int
 currently_stepping (ecs)
      struct execution_control_state *ecs;
 {
index 43c2248172353331999e7c39fc5cc2d429444cd1..70d854125f4d86f1e7276038d99f4ae474f7a0a0 100644 (file)
@@ -804,11 +804,7 @@ child_has_exited (pid, wait_status, exit_status)
 static void
 child_mourn_inferior ()
 {
-  /* FIXME: Should be in a header file */
-  extern void proc_remove_foreign PARAMS ((int));
-
   unpush_target (&child_ops);
-  proc_remove_foreign (inferior_pid);
   generic_mourn_inferior ();
 }
 
index a98147aaf497238e091d38b52ee76a4049fd35f7..049d10b9d9f4bcf5aa74aae130418b31fbff0f51 100644 (file)
@@ -44,9 +44,19 @@ struct type *java_float_type;
 struct type *java_double_type;
 struct type *java_void_type;
 
+/* Local functions */
+
+extern void _initialize_java_language PARAMS ((void));
+
 static int java_demangled_signature_length PARAMS ((char*));
 static void java_demangled_signature_copy PARAMS ((char*, char*));
 
+static struct symtab *get_java_class_symtab PARAMS ((void));
+static char *get_java_utf8_name PARAMS ((struct obstack *obstack, value_ptr name));
+static int java_class_is_primitive PARAMS ((value_ptr clas));
+static struct type *java_lookup_type PARAMS ((char *signature));
+static value_ptr java_value_string PARAMS ((char *ptr, int len));
+
 static void java_emit_char PARAMS ((int c, GDB_FILE *stream, int quoter));
 
 /* This objfile contains symtabs that have been dynamically created
@@ -76,7 +86,7 @@ static struct symtab *class_symtab = NULL;
 
 static int class_symtab_space;
 
-struct symtab *
+static struct symtab *
 get_java_class_symtab ()
 {
   if (class_symtab == NULL)
@@ -234,7 +244,7 @@ java_class_from_object (obj_val)
 }
 
 /* Check if CLASS_IS_PRIMITIVE(value of clas): */
-int
+static int
 java_class_is_primitive (clas)
      value_ptr clas;
 {
@@ -800,7 +810,7 @@ java_array_type (type, dims)
 
 /* Create a Java string in the inferior from a (Utf8) literal. */
 
-value_ptr
+static value_ptr
 java_value_string (ptr, len)
      char *ptr;
      int len;
@@ -1071,7 +1081,9 @@ _initialize_java_language ()
    We should use make_run_cleanup to have this be called.
    But will that mess up values in value histry?  FIXME */
 
-void java_rerun_cleanup ()
+extern void java_rerun_cleanup PARAMS ((void));
+void
+java_rerun_cleanup ()
 {
   if (class_symtab != NULL)
     {
index cddf758f73eaf898ca508c214037479176b69042..822b586508a60ddb0c10626244115378c1af83d9 100644 (file)
@@ -28,6 +28,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #include "typeprint.h"
 #include "c-lang.h"
 
+/* Local functions */
+
+static void java_type_print_base PARAMS ((struct type *type, GDB_FILE *stream, int show, int level));
+
 static void
 java_type_print_derivation_info (stream, type)
      GDB_FILE *stream;
@@ -76,7 +80,7 @@ java_type_print_derivation_info (stream, type)
    LEVEL is the number of spaces to indent by.
    We increase it for some recursive calls.  */
 
-void
+static void
 java_type_print_base (type, stream, show, level)
      struct type *type;
      GDB_FILE *stream;
index 797c16a9123ed6d00c2a852ea09a22d9394c066e..a19245a937a99de59c81d2150a583145f9e665f3 100644 (file)
@@ -30,6 +30,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #include "c-lang.h"
 #include "annotate.h"
 
+/* Local functions */
+
+static void java_print_value_fields PARAMS ((struct type *type, char *valaddr, CORE_ADDR address, GDB_FILE *stream, int format, int recurse, enum val_prettyprint pretty));
+
+
 int
 java_value_print (val, stream, format, pretty)
      value_ptr val;
@@ -230,7 +235,7 @@ java_value_print (val, stream, format, pretty)
    DONT_PRINT is an array of baseclass types that we
    should not print, or zero if called from top level.  */
 
-void
+static void
 java_print_value_fields (type, valaddr, address, stream,
                         format, recurse, pretty)
      struct type *type;
index 225d423ec01e5a468acee7ab0243607a847e2c14..394a500f02b9693f82162e3a3efc33ec4aafee54 100644 (file)
@@ -41,6 +41,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #include "target.h"
 #include "parser-defs.h"
 
+extern void _initialize_language PARAMS ((void));
+
 static void
 show_language_command PARAMS ((char *, int));
 
index f5f38a9d3ed66f0ca5bb6f61652609fa89aecba6..a93e5f0ba5891755e0124c633f67f890c820b1cc 100644 (file)
@@ -26,6 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #include "m2-lang.h"
 #include "c-lang.h"
 
+extern void _initialize_m2_language PARAMS ((void));
 static struct type *m2_create_fundamental_type PARAMS ((struct objfile *, int));
 static void m2_printstr PARAMS ((GDB_FILE *stream, char *string, unsigned int length, int width, int force_ellipses));
 static void m2_printchar PARAMS ((int, GDB_FILE *));
index 56e55526f6bab2f1ddcc021182c0a804f2235ba1..769ffe80b50934cf71180ecf4afecf01f00403bb 100644 (file)
@@ -72,6 +72,77 @@ isi_skip_prologue (pc)
   return pc;
 }
 
+/* Return number of args passed to a frame.
+   Can return -1, meaning no way to tell.  */
+
+int
+isi_frame_num_args (fi)
+     struct frame_info *fi;
+{
+  int val;
+  CORE_ADDR pc = FRAME_SAVED_PC (fi);
+  int insn = 0177777 & read_memory_integer (pc, 2);
+  val = 0;
+  if (insn == 0047757 || insn == 0157374)  /* lea W(sp),sp or addaw #W,sp */
+    val = read_memory_integer (pc + 2, 2);
+  else if ((insn & 0170777) == 0050217 /* addql #N, sp */
+          || (insn & 0170777) == 0050117)  /* addqw */
+    {
+      val = (insn >> 9) & 7;
+      if (val == 0)
+       val = 8;
+    }
+  else if (insn == 0157774) /* addal #WW, sp */
+    val = read_memory_integer (pc + 2, 4);
+  val >>= 2;
+  return val;
+}
+
+int
+delta68_frame_num_args (fi)
+     struct frame_info *fi;
+{
+  int val;
+  CORE_ADDR pc = FRAME_SAVED_PC (fi);
+  int insn = 0177777 & read_memory_integer (pc, 2);
+  val = 0;
+  if (insn == 0047757 || insn == 0157374)  /* lea W(sp),sp or addaw #W,sp */
+    val = read_memory_integer (pc + 2, 2);
+  else if ((insn & 0170777) == 0050217 /* addql #N, sp */
+          || (insn & 0170777) == 0050117)  /* addqw */
+    {
+      val = (insn >> 9) & 7;
+      if (val == 0)
+       val = 8;
+    }
+  else if (insn == 0157774) /* addal #WW, sp */
+    val = read_memory_integer (pc + 2, 4);
+  val >>= 2;
+  return val;
+}
+
+int
+news_frame_num_args (fi)
+     struct frame_info *fi;
+{
+  int val;
+  CORE_ADDR pc = FRAME_SAVED_PC (fi);
+  int insn = 0177777 & read_memory_integer (pc, 2);
+  val = 0;
+  if (insn == 0047757 || insn == 0157374)  /* lea W(sp),sp or addaw #W,sp */
+    val = read_memory_integer (pc + 2, 2);
+  else if ((insn & 0170777) == 0050217 /* addql #N, sp */
+          || (insn & 0170777) == 0050117)  /* addqw */
+    {
+      val = (insn >> 9) & 7;
+      if (val == 0)
+       val = 8;
+    }
+  else if (insn == 0157774) /* addal #WW, sp */
+    val = read_memory_integer (pc + 2, 4);
+  val >>= 2;
+  return val;
+}
 
 /* Push an empty stack frame, to record the current PC, etc.  */
 
index 6e94c29ba94a3acdc14130c956b4ee0dc68111de..9d85aaba9a03eef4778e70485b31ba6aca860da2 100644 (file)
@@ -20,6 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 #include "defs.h"
 #include "top.h"
+#include "event-loop.h"
 #include "target.h"
 #include "inferior.h"
 #include "call-cmds.h"
@@ -65,7 +66,6 @@ GDB_FILE *gdb_stderr;
 extern int write_files;
 
 static void print_gdb_help PARAMS ((GDB_FILE *));
-extern void gdb_init PARAMS ((char *));
 
 /* These two are used to set the external editor commands when gdb is farming
    out files to be edited by another program. */
@@ -571,7 +571,7 @@ main (argc, argv)
        {
          /* NOTE: I am commenting this out, because it is not clear
             where this feature is used. It is very old and
-            undocumented. ezannoni: 5/4/99*/
+            undocumented. ezannoni: 1999-05-04*/
 #if 0
          if (cmdarg[i][0] == '-' && cmdarg[i][1] == '\0')
            read_command_file (stdin);
@@ -715,17 +715,6 @@ Report bugs to \"bug-gdb@prep.ai.mit.edu\".\
 }
 
 \f
-void
-init_proc ()
-{
-}
-
-void
-proc_remove_foreign (pid)
-     int pid;
-{
-}
-
 /* All I/O sent to the *_filtered and *_unfiltered functions eventually ends up
    here.  The fputs_unfiltered_hook is primarily used by GUIs to collect all
    output and send it to the GUI, instead of the controlling terminal.  Only
index f32b159d36f372e6db7be49bbd5d81b91cea4cac..46e96d9fb602f0a85fbd73bef49b7596013da6e4 100644 (file)
@@ -38,6 +38,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #include <unistd.h>
 #endif
 
+extern void _initialize_maint_cmds PARAMS ((void));
+
 static void maintenance_command PARAMS ((char *, int));
 
 static void maintenance_dump_me PARAMS ((char *, int));
index 6b6c86e7534733494b1d3214a797b81c2aebf545..12b84553b0f1340dc1b2050b8e5074ba35010bbe 100644 (file)
@@ -88,6 +88,7 @@ typedef struct mips_extra_func_info {
 #include "expression.h"
 #include "language.h"          /* Needed inside partial-stab.h */
 
+extern void _initialize_mdebugread PARAMS ((void));
 
 /* Provide a default mapping from a ecoff register number to a gdb REGNUM.  */
 #ifndef ECOFF_REG_TO_REGNUM
index 614c27ec91facbc58c257a2ae9b22cf3db04c7b1..343a7b1027af59d9fbfbf78bbb5b197fec1247ee 100644 (file)
@@ -41,6 +41,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #include "elf/common.h"
 #include "elf/mips.h"
 
+extern void _initialize_mipsread PARAMS ((void));
+
 static void
 mipscoff_new_init PARAMS ((struct objfile *));
 
index afdea43a6b0131b7e8ca48ac199d4807f073761f..f85d2b5ea09fe35ded70d0017cd849df12829263 100644 (file)
@@ -28,6 +28,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #include "buildsym.h"
 #include "stabsread.h"
 
+extern void _initialize_nlmread PARAMS ((void));
+
 static void
 nlm_new_init PARAMS ((struct objfile *));
 
index 775e8afd53a6002fe1a02478eecae1f75e1f2e5e..7946521f8f690e233c5174614762bbc45031ed10 100644 (file)
@@ -64,6 +64,80 @@ umax_skip_prologue (pc)
   return pc;
 }
 
+/* Return number of args passed to a frame.
+   Can return -1, meaning no way to tell.  */
+
+int
+merlin_frame_num_args (fi)
+     struct frame_info *fi;
+{
+  int numargs;
+  CORE_ADDR pc;
+  int insn;
+  int addr_mode;
+  int width;
+
+  pc = FRAME_SAVED_PC (fi);
+  insn = read_memory_integer (pc,2);
+  addr_mode = (insn >> 11) & 0x1f;
+  insn = insn & 0x7ff;
+  if ((insn & 0x7fc) == 0x57c
+      && addr_mode == 0x14) /* immediate */
+    {
+      if (insn == 0x57c) /* adjspb */
+       width = 1;
+      else if (insn == 0x57d) /* adjspw */
+       width = 2;
+      else if (insn == 0x57f) /* adjspd */
+       width = 4;
+      numargs = read_memory_integer (pc+2,width);
+      if (width > 1)
+       flip_bytes (&numargs, width);
+      numargs = - sign_extend (numargs, width*8) / 4;
+    }
+  else
+    numargs = -1;
+  return numargs;
+}
+
+int
+umax_frame_num_args (fi)
+     struct frame_info *fi;
+{
+  int numargs;
+  CORE_ADDR pc;
+  CORE_ADDR enter_addr;
+  unsigned int insn;
+  unsigned int addr_mode;
+  int width;
+
+  numargs = -1;
+  enter_addr = ns32k_get_enter_addr ((fi)->pc);
+  if (enter_addr > 0)
+    {
+      pc = ((enter_addr == 1)
+           ? SAVED_PC_AFTER_CALL (fi)
+           : FRAME_SAVED_PC (fi));
+      insn = read_memory_integer (pc,2);
+      addr_mode = (insn >> 11) & 0x1f;
+      insn = insn & 0x7ff;
+      if ((insn & 0x7fc) == 0x57c
+         && addr_mode == 0x14) /* immediate */
+       {
+         if (insn == 0x57c) /* adjspb */
+           width = 1;
+         else if (insn == 0x57d) /* adjspw */
+           width = 2;
+         else if (insn == 0x57f) /* adjspd */
+           width = 4;
+         numargs = read_memory_integer (pc+2,width);
+         if (width > 1)
+           flip_bytes (&numargs, width);
+         numargs = - sign_extend (numargs, width*8) / 4;
+       }
+    }
+  return numargs;
+}
 
 
 sign_extend (value, bits)
index 673d415c6e25e6be1ab66b3ac9956475d69a2b01..a9193388d27137f81f94fd538c4e7cc9a1c0fc18 100644 (file)
@@ -60,6 +60,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #include "os9k.h"
 #include "stabsread.h"
 
+extern void _initialize_os9kread PARAMS ((void));
+
 /* Each partial symbol table entry contains a pointer to private data for the
    read_symtab() function to use when expanding a partial symbol table entry
    to a full symbol table entry.
index 76ed1b6f32459417f16bcc7e1d956e43ab1aa2c2..42b0f3b6a3880542f7b7b41b088df68661c03001 100644 (file)
@@ -70,6 +70,8 @@ prefixify_expression PARAMS ((struct expression *));
 static void
 prefixify_subexp PARAMS ((struct expression *, struct expression *, int, int));
 
+void _initialize_parse PARAMS ((void));
+
 /* Data structure for saving values of arglist_len for function calls whose
    arguments contain other function calls.  */
 
index 3226fdd8ad1dce34efd4f22d26ddffbbf8a15fe6..f417692e2d6e9602cba2d740519b04a68f776b37 100644 (file)
@@ -195,4 +195,10 @@ struct op_print
   int right_assoc;
 };
 
+/* The generic method for targets to specify how their registers are
+   named.  The mapping can be derived from three sources:
+   REGISTER_NAME; std_regs; or a target specific alias hook. */
+
+extern int target_map_name_to_register PARAMS ((char *, int));
+
 #endif /* PARSER_DEFS_H */
index d529b2180f6a59d9d980ac8197f569e715741203..aaf9d6899fabf2f5fb34b52be140636658ca8044 100644 (file)
@@ -44,6 +44,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 /* Prototypes for local functions */
 
+extern void _initialize_remote_d10v PARAMS ((void));
+
 static void remote_d10v_open PARAMS ((char *name, int from_tty));
 
 /* Define the target subroutine names */
@@ -65,11 +67,12 @@ remote_d10v_open (name, from_tty)
 /* Translate a GDB virtual ADDR/LEN into a format the remote target
    understands.  Returns number of bytes that can be transfered
    starting at taddr, ZERO if no bytes can be transfered. */
-int
-remote_d10v_translate_xfer_address (memaddr, nr_bytes, taddr)
+void
+remote_d10v_translate_xfer_address (memaddr, nr_bytes, targ_addr, targ_len)
      CORE_ADDR memaddr;
      int nr_bytes;
-     CORE_ADDR *taddr;
+     CORE_ADDR *targ_addr;
+     int *targ_len;
 {
   CORE_ADDR phys;
   CORE_ADDR seg;
@@ -141,7 +144,8 @@ remote_d10v_translate_xfer_address (memaddr, nr_bytes, taddr)
          else
            {
              /* Logical address out side of data segments, not supported */
-             return (0);
+             *targ_len = 0;
+             return;
            }
          break;
        }
@@ -162,7 +166,8 @@ remote_d10v_translate_xfer_address (memaddr, nr_bytes, taddr)
            {
              /* Logical address outside of IMAP[01] segment, not
                 supported */
-             return (0);
+             *targ_len = 0;
+             return;
            }
          if ((off & 0x1ffff) + nr_bytes > 0x1ffffL)
            {
@@ -179,8 +184,11 @@ remote_d10v_translate_xfer_address (memaddr, nr_bytes, taddr)
            {
              phys = ((map & 0x7fL) << 17) + (off & 0x1ffffL);
              if (phys > 0xffffffL)
-               /* Address outside of unified address segment */
-               return (0);
+               {
+                 /* Address outside of unified address segment */
+                 *targ_len = 0;
+                 return;
+               }
              phys |= targ_unified;
              to = "unified";
            }
@@ -206,12 +214,13 @@ remote_d10v_translate_xfer_address (memaddr, nr_bytes, taddr)
        break;
 
       default:
-       return (0);
+       *targ_len = 0;
+       return;
       }
 
 
-  *taddr = phys;
-  return nr_bytes;
+  *targ_addr = phys;
+  *targ_len = nr_bytes;
 }
 
 
index cf41b40ae7accfe5bd9d51cb04ad350730d9ab23..b8ced919847071cff0af6fe96aec25662900cefc 100644 (file)
@@ -39,6 +39,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 /* Prototypes */
 
+extern void _initialize_remote_sim PARAMS ((void));
+
 extern int (*ui_loop_hook) PARAMS ((int signo));
 
 static void dump_mem PARAMS ((char *buf, int len));
index 6ec108c9a3240e00c8eb327662b8886a7b5c6c3d..5bcff883cfe8fb62488732185749162b3a666c4f 100644 (file)
@@ -2347,31 +2347,32 @@ remote_read_bytes (memaddr, myaddr, len)
 }
 \f
 /* Read or write LEN bytes from inferior memory at MEMADDR,
-   transferring to or from debugger address MYADDR.  Write to inferior
-   if SHOULD_WRITE is nonzero.  Returns length of data written or
-   read; 0 for error.  */
+   transferring to or from debugger address BUFFER.  Write to inferior if
+   SHOULD_WRITE is nonzero.  Returns length of data written or read; 0
+   for error.  */
+
+#ifndef REMOTE_TRANSLATE_XFER_ADDRESS
+#define REMOTE_TRANSLATE_XFER_ADDRESS(MEM_ADDR, MEM_LEN, TARG_ADDR, TARG_LEN) \
+   (*(TARG_ADDR) = (MEM_ADDR), *(TARG_LEN) = (MEM_LEN))
+#endif
 
 /* ARGSUSED */
 static int
-remote_xfer_memory (memaddr, myaddr, len, should_write, target)
-     CORE_ADDR memaddr;
-     char *myaddr;
-     int len;
+remote_xfer_memory (mem_addr, buffer, mem_len, should_write, target)
+     CORE_ADDR mem_addr;
+     char *buffer;
+     int mem_len;
      int should_write;
      struct target_ops *target;                        /* ignored */
 {
-#ifdef REMOTE_TRANSLATE_XFER_ADDRESS
-  CORE_ADDR targaddr;
-  int targlen;
-  REMOTE_TRANSLATE_XFER_ADDRESS (memaddr, len, targaddr, targlen);
-  if (targlen == 0)
+  CORE_ADDR targ_addr;
+  int targ_len;
+  REMOTE_TRANSLATE_XFER_ADDRESS (mem_addr, mem_len, &targ_addr, &targ_len);
+  if (targ_len <= 0)
     return 0;
-  memaddr = targaddr;
-  len = targlen;
-#endif
 
-  return dcache_xfer_memory (remote_dcache, memaddr, myaddr,
-                            len, should_write);
+  return dcache_xfer_memory (remote_dcache, targ_addr, buffer,
+                            targ_len, should_write);
 }
 
    
@@ -3384,7 +3385,7 @@ Specify the serial device it is connected to (e.g. /dev/ttya).";
   remote_ops.to_load = generic_load;           
   remote_ops.to_mourn_inferior = remote_mourn;
   remote_ops.to_thread_alive = remote_thread_alive;
-  remote_ops.to_find_new_threads = remote_find_new_threads;
+  remote_ops.to_find_new_threads = (void*) remote_find_new_threads;
   remote_ops.to_stop = remote_stop;
   remote_ops.to_query = remote_query;
   remote_ops.to_stratum = process_stratum;
index a0e744491e83b68938eb2c0f3aefcb86ad557446..2a9d255d0caa4564f8e3ac4e1e28bd14fd74f9d4 100644 (file)
@@ -812,7 +812,7 @@ rs6000_fix_call_dummy (dummyname, pc, fun, nargs, args, type, gcc_p)
    starting from r4. */
 
 CORE_ADDR
-push_arguments (nargs, args, sp, struct_return, struct_addr)
+rs6000_push_arguments (nargs, args, sp, struct_return, struct_addr)
      int nargs;
      value_ptr *args;
      CORE_ADDR sp;
index 7f31ba434833276118e3a115b93790379a1489b4..e72a88b010b29357c280b48b11bea66f2d482236 100644 (file)
@@ -30,6 +30,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #include "gdb_string.h"
 #include "gdbcore.h"
 
+extern void _initialize_scheme_language PARAMS ((void));
 static value_ptr evaluate_subexp_scm PARAMS ((struct type *, struct expression *,
                                              int *, enum noside));
 static value_ptr scm_lookup_name PARAMS ((char *));
index ce420eeadd2825cd633268122f389667af11d1ab..75a221cbc7ad7cf6c800cb92fbcd3f9c75d7a485 100644 (file)
@@ -23,6 +23,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #include "gdb_string.h"
 #include "gdbcmd.h"
 
+extern void _initialize_serial PARAMS ((void));
+
 /* Linked list of serial I/O handlers */
 
 static struct serial_ops *serial_ops_list = NULL;
index 2b25f0d505e7c68b9758553694e944c46dac1093..fa0ecb84c3e934fee4b4a231fd305cbd86d5c707 100644 (file)
@@ -88,7 +88,6 @@ static char *sh3e_reg_names[] = {
 
 char **sh_register_names = sh_generic_reg_names;
 
-
 struct {
   char **regnames;
   int mach;
index a143dba42d5c74b121754d4a1405a04cc1892312..9e1217b65293a1566c0f442da90fd0b78f468e72 100644 (file)
@@ -49,6 +49,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #include "stabsread.h"         /* Our own declarations */
 #undef EXTERN
 
+extern void _initialize_stabsread PARAMS ((void));
+
 /* The routines that read and process a complete stabs for a C struct or 
    C++ class pass lists of data member fields and lists of member function
    fields in an instance of a field_info structure, as defined below.
index 20a6124da5f650eabf9406c9e578b45ad7060fbd..a3f302dbca07b57c63cda4370da15333f74241c7 100644 (file)
@@ -318,7 +318,7 @@ print_args_stub (args)
   int numargs;
   struct print_args_args *p = (struct print_args_args *)args;
 
-  FRAME_NUM_ARGS (numargs, (p->fi));
+  numargs = FRAME_NUM_ARGS (p->fi);
   print_frame_args (p->func, p->fi, numargs, gdb_stdout);
   return 0;
 }
@@ -838,10 +838,8 @@ frame_info (addr_exp, from_tty)
   printf_filtered ("\n");
 
   {
-    int frameless = 0;
-#ifdef FRAMELESS_FUNCTION_INVOCATION
-    FRAMELESS_FUNCTION_INVOCATION (fi, frameless);
-#endif
+    int frameless;
+    frameless = FRAMELESS_FUNCTION_INVOCATION (fi);
     if (frameless)
       printf_filtered (" (FRAMELESS),");
   }
@@ -882,7 +880,7 @@ frame_info (addr_exp, from_tty)
        print_address_numeric (arg_list, 1, gdb_stdout);
        printf_filtered (",");
 
-       FRAME_NUM_ARGS (numargs, fi);
+       numargs = FRAME_NUM_ARGS (fi);
        if (numargs < 0)
          puts_filtered (" args: ");
        else if (numargs == 0)
index 5082f39e4abdda595816a6d9c03238a12978d3f8..914315054897796b201910c5d42f7d6b6a335a54 100644 (file)
@@ -142,6 +142,14 @@ static int simple_read_overlay_table PARAMS ((void));
 
 static int simple_overlay_update_1 PARAMS ((struct obj_section *));
 
+static void add_filename_language PARAMS ((char *ext, enum language lang));
+
+static void set_ext_lang_command PARAMS ((char *args, int from_tty));
+
+static void info_ext_lang_command PARAMS ((char *args, int from_tty));
+
+static void init_filename_language_table PARAMS ((void));
+
 void _initialize_symfile PARAMS ((void));
 
 /* List of all available sym_fns.  On gdb startup, each object file reader
index 15685398b593593e2abb01dd404c64697a1e2f41..4da73617345f98b5928d93774136d21e2b8188af 100644 (file)
@@ -108,6 +108,9 @@ static void print_msymbol_info PARAMS ((struct minimal_symbol *));
 
 static void symtab_symbol_info PARAMS ((char *, namespace_enum, int));
 
+static void overload_list_add_symbol PARAMS ((struct symbol *sym,
+                                             char *oload_name));
+
 void _initialize_symtab PARAMS ((void));
 
 /* */
index c57bc353a8b6b006227fd2544aec93c0c3f6aeab..8bf851d0f4b46f280666975f976a6bf7c6c5afb2 100644 (file)
@@ -61,6 +61,15 @@ tahoe_skip_prologue (pc)
   return pc;
 }
 
+/* Return number of args passed to a frame.
+   Can return -1, meaning no way to tell.  */
+
+int
+tahoe_frame_num_args (fi)
+     struct frame_info *fi;
+{
+  return (((0xffff & read_memory_integer(((fi)->frame-4),4)) - 4) >> 2);
+}
 
 /* Print the Tahoe instruction at address MEMADDR in debugged memory,
    on STREAM.  Returns length of the instruction, in bytes.  */
index fe0e0c001b25b717ffa273fb54c3388abe071b74..d8899439660acb0085a832ea83d91fc30281f9cd 100644 (file)
@@ -82,6 +82,10 @@ find_default_run_target PARAMS ((char *));
 static void
 update_current_target PARAMS ((void));
 
+static void nosupport_runtime PARAMS ((void));
+
+static void normal_target_post_startup_inferior PARAMS ((int pid));
+
 /* Transfer LEN bytes between target address MEMADDR and GDB address MYADDR.
    Returns 0 for success, errno code for failure (which includes partial
    transfers--if you want a more useful response to partial transfers, try
@@ -302,7 +306,7 @@ nosymbol (name, addrp)
 }
 
 /* ARGSUSED */
-void
+static void
 nosupport_runtime ()
 {
   if (!inferior_pid)
@@ -1782,7 +1786,7 @@ normal_pid_to_str (pid)
    notification of forks, etc at inferior creation time; e.g., in
    target_acknowledge_forked_child.
    */
-void
+static void
 normal_target_post_startup_inferior (pid)
   int  pid;
 {
index 8fb2db417417873cd79eed8e9bf8a9c262c34b7c..cf0e78da3fe05bba775ef2eb7603816f395919b4 100644 (file)
@@ -1,3 +1,11 @@
+1999-05-20  Elena Zannoni  <ezannoni@kwikemart.cygnus.com>
+
+       * gdb.base/annota1.exp: Allow any number of "frames-invalid" and 
+       "breakpoint-invalid" to be printed.
+       * gdb.base/annota2.exp: Revise line number for main breakpoint. Allow any 
+       number of "frames-invalid" and "breakpoint-invalid" to be printed.
+       * gdb.base/annota2.cc: Initialize a.x to 0.
+
 1999-05-17  Keith Seitz  <keiths@cygnus.com>
 
        * gdb.base/call-ar-st.exp: Skip "print print_double_array (double_array)"
index fb3703edc317e26cfcae4ba7bf1adc0dd4de8707..b2d0dd04157967eb68dccf2c442c8e0cabc99fe8 100644 (file)
@@ -140,14 +140,16 @@ gdb_expect {
 # annotate-frame-end
 # annotate-stopped
 #
+#exp_internal 1
 send_gdb "run\n"
   gdb_expect {
-    -re "\r\n\032\032post-prompt\r\nStarting program: $binfile \r\n\r\n\032\032frames-invalid\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032breakpoints-invalid\r\n\r\n\032\032starting\(\r\n\r\n\032\032frames-invalid\)+\r\n\r\n\032\032breakpoint 1\r\n\r\nBreakpoint 1, \r\n\032\032frame-begin 0 $hex\r\n\r\n\032\032frame-function-name\r\nmain\r\n\032\032frame-args\r\n \\(\\)\r\n\032\032frame-source-begin\r\n at \r\n\032\032frame-source-file\r\n.*annota1.c\r\n\032\032frame-source-file-end\r\n:\r\n\032\032frame-source-line\r\n$main_line\r\n\032\032frame-source-end\r\n\r\n\r\n\032\032source.*$srcfile:$main_line:.*:beg:$hex\r\n\r\n\032\032frame-end\r\n\r\n\032\032stopped\r\n$gdb_prompt$" \
+    -re "\r\n\032\032post-prompt\r\nStarting program: $binfile \(\r\n\r\n\032\032frames-invalid\)+\(\r\n\r\n\032\032breakpoints-invalid\)*.*\(\r\n\r\n\032\032frames-invalid\)*\r\n\r\n\032\032starting\(\r\n\r\n\032\032frames-invalid\)+\r\n\r\n\032\032breakpoint 1\r\n\r\nBreakpoint 1, \r\n\032\032frame-begin 0 $hex\r\n\r\n\032\032frame-function-name\r\nmain\r\n\032\032frame-args\r\n \\(\\)\r\n\032\032frame-source-begin\r\n at \r\n\032\032frame-source-file\r\n.*annota1.c\r\n\032\032frame-source-file-end\r\n:\r\n\032\032frame-source-line\r\n$main_line\r\n\032\032frame-source-end\r\n\r\n\r\n\032\032source.*$srcfile:$main_line:.*:beg:$hex\r\n\r\n\032\032frame-end\r\n\r\n\032\032stopped\r\n$gdb_prompt$" \
                            { pass "run until main breakpoint" }
     -re ".*$gdb_prompt$"       { fail "run until main breakpoint" }
     timeout                { fail "run until main breakpoint (timeout)" }
   }
-
+#exp_internal 0
+#exit 0
 
 #
 # Let's do a next, to get to a point where the array is initialized
@@ -256,7 +258,7 @@ gdb_expect {
 #
 send_gdb "signal SIGUSR1\n"
 gdb_expect {
-  -re "\r\n\032\032post-prompt\r\nContinuing with signal SIGUSR1.\r\n\r\n\032\032starting\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032breakpoint 2\r\n\r\nBreakpoint 2, \r\n\032\032frame-begin 0 $hex\r\n\r\n\032\032frame-function-name\r\nhandle_USR1\r\n\032\032frame-args\r\n \\(\r\n\032\032arg-begin\r\nsig\r\n\032\032arg-name-end\r\n=\r\n\032\032arg-value -\r\n16\r\n\032\032arg-end\r\n\\)\r\n\032\032frame-source-begin\r\n at \r\n\032\032frame-source-file\r\n${srcdir}/${subdir}/${srcfile}\r\n\032\032frame-source-file-end\r\n:\r\n\032\032frame-source-line\r\n.*\r\n\032\032frame-source-end\r\n\r\n\r\n\032\032source.*annota1.c:.*:185:beg:$hex\r\n\r\n\032\032frame-end\r\n\r\n\032\032stopped\r\n$gdb_prompt$" \
+  -re "\r\n\032\032post-prompt\r\nContinuing with signal SIGUSR1.\r\n\r\n\032\032starting\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032breakpoint 2\r\n\r\nBreakpoint 2, \r\n\032\032frame-begin 0 $hex\r\n\r\n\032\032frame-function-name\r\nhandle_USR1\r\n\032\032frame-args\r\n \\(\r\n\032\032arg-begin\r\nsig\r\n\032\032arg-name-end\r\n=\r\n\032\032arg-value -\r\n$decimal\r\n\032\032arg-end\r\n\\)\r\n\032\032frame-source-begin\r\n at \r\n\032\032frame-source-file\r\n${srcdir}/${subdir}/${srcfile}\r\n\032\032frame-source-file-end\r\n:\r\n\032\032frame-source-line\r\n.*\r\n\032\032frame-source-end\r\n\r\n\r\n\032\032source.*annota1.c:.*:185:beg:$hex\r\n\r\n\032\032frame-end\r\n\r\n\032\032stopped\r\n$gdb_prompt$" \
        { pass "send SIGUSR1" }
   -re ".*$gdb_prompt$"     { fail "send SIGUSR1" }
   timeout                  { fail "send SIGUSR1 (timeout)" }
index f8a25f94d5e582cef24639322674a4a18ec94950..234752e49af20230f41aee10ab4a37bf03e78cde 100644 (file)
@@ -18,6 +18,7 @@ int main()
 {
   A a;
 
+  a.x = 0;
   a.x = 1;
   a.y = 2;
 
index 7c9116bdb7a3d19ac8457e7a185933a49e38dbe9..aabc551f6fede656f3ad810dfcd091b97e796a20 100644 (file)
@@ -61,7 +61,7 @@ if [target_info exists gdb_stub] {
 #
 # line number where we need to stop in main
 #
-set main_line 22
+set main_line 25
 
 # The commands we test here produce many lines of output; disable "press 
 # <return> to continue" prompts.
@@ -71,7 +71,7 @@ gdb_expect -re "$gdb_prompt $"
 #
 # break at main
 #
-gdb_test "break 22" \
+gdb_test "break 25" \
     "Breakpoint.*at.* file .*$srcfile, line.*" \
     "breakpoint main"
 
@@ -95,7 +95,7 @@ gdb_expect {
 
 send_gdb "run\n"
   gdb_expect {
-    -re "\r\n\032\032post-prompt\r\nStarting program: $binfile \r\n\r\n\032\032frames-invalid\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032breakpoints-invalid\r\n\r\n\032\032starting\(\r\n\r\n\032\032frames-invalid\)+\r\n\r\n\032\032breakpoint 1\r\n\r\nBreakpoint 1, \r\n\032\032frame-begin 0 $hex\r\n\r\n\032\032frame-function-name\r\nmain\r\n\032\032frame-args\r\n \\(\\)\r\n\032\032frame-source-begin\r\n at \r\n\032\032frame-source-file\r\n.*annota2.cc\r\n\032\032frame-source-file-end\r\n:\r\n\032\032frame-source-line\r\n$main_line\r\n\032\032frame-source-end\r\n\r\n\r\n\032\032source.*$srcfile:$main_line:.*:beg:$hex\r\n\r\n\032\032frame-end\r\n\r\n\032\032stopped\r\n$gdb_prompt$" \
+    -re "\r\n\032\032post-prompt\r\nStarting program: $binfile \(\r\n\r\n\032\032frames-invalid\)+\(\r\n\r\n\032\032breakpoints-invalid\)*.*\(\r\n\r\n\032\032frames-invalid\)*\r\n\r\n\032\032starting\(\r\n\r\n\032\032frames-invalid\)+\r\n\r\n\032\032breakpoint 1\r\n\r\nBreakpoint 1, \r\n\032\032frame-begin 0 $hex\r\n\r\n\032\032frame-function-name\r\nmain\r\n\032\032frame-args\r\n \\(\\)\r\n\032\032frame-source-begin\r\n at \r\n\032\032frame-source-file\r\n.*annota2.cc\r\n\032\032frame-source-file-end\r\n:\r\n\032\032frame-source-line\r\n$main_line\r\n\032\032frame-source-end\r\n\r\n\r\n\032\032source.*$srcfile:$main_line:.*:beg:$hex\r\n\r\n\032\032frame-end\r\n\r\n\032\032stopped\r\n$gdb_prompt$" \
                            { pass "run until main breakpoint" }
     -re ".*$gdb_prompt$"       { fail "run until main breakpoint" }
     timeout                { fail "run until main breakpoint (timeout)" }
@@ -150,7 +150,7 @@ gdb_expect {
 #
 # break at first line of main. 
 #
-send_gdb "break main\n"
+send_gdb "break 22\n"
 gdb_expect {
   -re  "\r\n\032\032post-prompt\r\n\r\n\032\032breakpoints-invalid\r\nBreakpoint.*at $hex: file.*$srcfile, line.*\r\n$gdb_prompt$" \
            { pass "breakpoint at main" }
@@ -161,14 +161,14 @@ gdb_expect {
 #
 # change value of main_line
 #
-set main_line 19
+set main_line 22
 
 #
 # run program up to breakpoint.
 #
 send_gdb "run\n"
   gdb_expect {
-    -re "\r\n\032\032post-prompt\r\n.*Starting program: $binfile \r\n\r\n\032\032frames-invalid\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032breakpoints-invalid\r\n\r\n\032\032starting\(\r\n\r\n\032\032frames-invalid\)+\r\n\r\n\032\032breakpoint 2\r\n\r\nBreakpoint 2, \r\n\032\032frame-begin 0 $hex\r\n\r\n\032\032frame-function-name\r\nmain\r\n\032\032frame-args\r\n \\(\\)\r\n\032\032frame-source-begin\r\n at \r\n\032\032frame-source-file\r\n.*annota2.cc\r\n\032\032frame-source-file-end\r\n:\r\n\032\032frame-source-line\r\n$main_line\r\n\032\032frame-source-end\r\n\r\n\r\n\032\032source.*$srcfile:$main_line:.*:beg:$hex\r\n\r\n\032\032frame-end\r\n\r\n\032\032stopped\r\n$gdb_prompt$" \
+    -re "\r\n\032\032post-prompt\r\n.*Starting program: $binfile \(\r\n\r\n\032\032frames-invalid\)+\(\r\n\r\n\032\032breakpoints-invalid\)*.*\(\r\n\r\n\032\032frames-invalid\)*\r\n\r\n\032\032starting\(\r\n\r\n\032\032frames-invalid\)+\r\n\r\n\032\032breakpoint 2\r\n\r\nBreakpoint 2, \r\n\032\032frame-begin 0 $hex\r\n\r\n\032\032frame-function-name\r\nmain\r\n\032\032frame-args\r\n \\(\\)\r\n\032\032frame-source-begin\r\n at \r\n\032\032frame-source-file\r\n.*annota2.cc\r\n\032\032frame-source-file-end\r\n:\r\n\032\032frame-source-line\r\n$main_line\r\n\032\032frame-source-end\r\n\r\n\r\n\032\032source.*$srcfile:$main_line:.*:beg:$hex\r\n\r\n\032\032frame-end\r\n\r\n\032\032stopped\r\n$gdb_prompt$" \
                            { pass "run until main breakpoint" }
     -re ".*$gdb_prompt$"       { fail "run until main breakpoint" }
     timeout                { fail "run until main breakpoint (timeout)" }
@@ -191,7 +191,7 @@ gdb_expect {
 #
 send_gdb "next\n"
 gdb_expect {
-   -re "\r\n\032\032post-prompt\r\n\r\n\032\032starting\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032watchpoint 3\r\nWatchpoint 3: a.x\r\n\r\nOld value = 4\r\nNew value = 1\r\n\r\n\032\032frame-begin 0 $hex\r\n\r\n\032\032frame-function-name\r\nmain\r\n\032\032frame-args\r\n \\(\\)\r\n\032\032frame-source-begin\r\n at \r\n\032\032frame-source-file\r\n.*$srcfile\r\n\032\032frame-source-file-end\r\n:\r\n\032\032frame-source-line\r\n20\r\n\032\032frame-source-end\r\n\r\n\r\n\032\032source .*$srcfile.*beg:$hex\r\n\r\n\032\032frame-end\r\n\r\n\032\032stopped\r\n$gdb_prompt$" \
+   -re "\r\n\032\032post-prompt\r\n\r\n\032\032starting\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032watchpoint 3\r\nWatchpoint 3: a.x\r\n\r\nOld value = 0\r\nNew value = 1\r\n\r\n\032\032frame-begin 0 $hex\r\n\r\n\032\032frame-function-name\r\nmain\r\n\032\032frame-args\r\n \\(\\)\r\n\032\032frame-source-begin\r\n at \r\n\032\032frame-source-file\r\n.*$srcfile\r\n\032\032frame-source-file-end\r\n:\r\n\032\032frame-source-line\r\n$decimal\r\n\032\032frame-source-end\r\n\r\n\r\n\032\032source .*$srcfile.*beg:$hex\r\n\r\n\032\032frame-end\r\n\r\n\032\032stopped\r\n$gdb_prompt$" \
           { pass "watch triggered on a.x" }
    -re ".*$gdb_prompt$"  { fail "watch triggered on a.x" }
    timeout    { fail "watch triggered on a.x (timeout)" }
index 9f68547636df45190ddd2231078e2e7d85432ddb..01d152f2d5434128f067bac6e9892f24b245d132 100644 (file)
@@ -96,6 +96,7 @@ static void thread_apply_command PARAMS ((char *, int));
 static void restore_current_thread PARAMS ((int));
 static void switch_to_thread PARAMS ((int pid));
 static void prune_threads PARAMS ((void));
+static int local_find_new_threads PARAMS ((void));
 
 /* If the host has threads, the host machine definition may set this
    macro. But, for remote thread debugging, it gets more complex and
index 60be3cf67543f7d8033a92263f817649a784bc35..d487193ec74e3c16be1f3730067c9f2d2a04ad2c 100644 (file)
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -51,8 +51,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #include "gdb_stat.h"
 #include <ctype.h>
 
-extern void initialize_utils PARAMS ((void));
-
 /* Prototypes for local functions */
 
 static void dont_repeat_command PARAMS ((char *, int));
@@ -71,17 +69,11 @@ static char * line_completion_function PARAMS ((char *, int, char *, int));
 
 static char * readline_line_completion_function PARAMS ((char *, int));
 
-/* NOTE 4/29/99: this function will be static again, after we make the
+/* NOTE 1999-04-29: this function will be static again, after we make the
    event loop be the default command loop for gdb, and we merge
    event-top.c into this file, top.c */
 /* static */ void command_loop_marker PARAMS ((int));
 
-extern void set_async_editing_command PARAMS ((char *, int, struct cmd_list_element *));
-extern void set_async_annotation_level PARAMS ((char *, int, struct cmd_list_element *));
-
-extern void set_async_prompt PARAMS ((char *, int, struct cmd_list_element *));
-
 static void while_command PARAMS ((char *, int));
 
 static void if_command PARAMS ((char *, int));
@@ -149,7 +141,7 @@ static void complete_command PARAMS ((char *, int));
 static void do_nothing PARAMS ((int));
 
 #ifdef SIGHUP
-/* NOTE 4/29/99: This function will be static again, once we modify
+/* NOTE 1999-04-29: This function will be static again, once we modify
    gdb to use the event loop as the default command loop and we merge
    event-top.c into this file, top.c */
 /* static */ int quit_cover PARAMS ((PTR));
@@ -599,7 +591,7 @@ int signo;
 
 /* Just a little helper function for disconnect().  */
 
-/* NOTE 4/29/99: This function will be static again, once we modify
+/* NOTE 1999-04-29: This function will be static again, once we modify
    gdb to use the event loop as the default command loop and we merge
    event-top.c into this file, top.c */
 /* static */ int
@@ -614,20 +606,20 @@ quit_cover (s)
 #endif /* defined SIGHUP */
 \f
 /* Line number we are currently in in a file which is being sourced.  */
-/* NOTE 4/29/99: This variable will be static again, once we modify
+/* NOTE 1999-04-29: This variable will be static again, once we modify
    gdb to use the event loop as the default command loop and we merge
    event-top.c into this file, top.c */
 /* static */ int source_line_number;
 
 /* Name of the file we are sourcing.  */
-/* NOTE 4/29/99: This variable will be static again, once we modify
+/* NOTE 1999-04-29: This variable will be static again, once we modify
    gdb to use the event loop as the default command loop and we merge
    event-top.c into this file, top.c */
 /* static */ char *source_file_name;
 
 /* Buffer containing the error_pre_print used by the source stuff.
    Malloc'd.  */
-/* NOTE 4/29/99: This variable will be static again, once we modify
+/* NOTE 1999-04-29: This variable will be static again, once we modify
    gdb to use the event loop as the default command loop and we merge
    event-top.c into this file, top.c */
 /* static */ char *source_error;
@@ -635,7 +627,7 @@ static int source_error_allocated;
 
 /* Something to glom on to the start of error_pre_print if source_file_name
    is set.  */
-/* NOTE 4/29/99: This variable will be static again, once we modify
+/* NOTE 1999-04-29: This variable will be static again, once we modify
    gdb to use the event loop as the default command loop and we merge
    event-top.c into this file, top.c */
 /* static */ char *source_pre_error;
@@ -695,8 +687,6 @@ gdb_init (argv0)
   else
     init_signals ();
 
-  init_proc ();
-
   /* We need a default language for parsing expressions, so simple things like
      "set width 0" won't fail if no language is explicitly set in a config file
      or implicitly set by reading an executable during startup. */
@@ -1330,7 +1320,7 @@ execute_command (p, from_tty)
 }
 
 /* ARGSUSED */
-/* NOTE 4/29/99: This function will be static again, once we modify
+/* NOTE 1999-04-29: This function will be static again, once we modify
    gdb to use the event loop as the default command loop and we merge
    event-top.c into this file, top.c */
 /* static */ void
@@ -1427,6 +1417,7 @@ command_loop ()
        }
     }
 }
+
 \f
 /* Commands call this if they do not want to be repeated by null lines.  */
 
@@ -1519,7 +1510,7 @@ gdb_readline (prrompt)
    substitution.  These variables are given default values at the end
    of this file.  */
 static int command_editing_p;
-/* NOTE 4/29/99: This variable will be static again, once we modify
+/* NOTE 1999-04-29: This variable will be static again, once we modify
    gdb to use the event loop as the default command loop and we merge
    event-top.c into this file, top.c */
 /* static */ int history_expansion_p;
index 188d184f91f006f3cc67087e0fd7920a6df51589..57e15b9cd880cbeebabacc1d01eb1112a7d1332f 100644 (file)
--- a/gdb/top.h
+++ b/gdb/top.h
@@ -68,9 +68,6 @@ extern int quit_confirm PARAMS ((void));
 extern void quit_force PARAMS ((char *, int));
 extern void quit_command PARAMS ((char *, int));
 
-extern void setup_event_loop PARAMS ((void));
-extern void async_init_signals PARAMS ((void));
-
 /* This function returns a pointer to the string that is used
    by gdb for its command prompt. */
 extern char *get_prompt PARAMS((void));
@@ -83,3 +80,6 @@ extern void set_prompt PARAMS ((char *));
 extern int mapped_symbol_files;
 extern int readnow_symbol_files;
 #define        ALL_CLEANUPS    ((struct cleanup *)0)
+
+/* Perform _initialize initialization */
+extern void gdb_init PARAMS ((char *));
index 65ce851dcc2bc4773e5176034585c364c7554e03..4c27d5153b967198504d28e2354231e2366c58a0 100644 (file)
@@ -139,9 +139,16 @@ static void trace_dump_command            PARAMS ((char *, int));
 /* support routines */
 static void trace_mention                 PARAMS ((struct tracepoint *));
 
+#if __STDC__
 struct collection_list;
+#endif
 static void add_aexpr PARAMS ((struct collection_list *, struct agent_expr *));
 static unsigned char *mem2hex(unsigned char *, unsigned char *, int);
+static void add_register PARAMS ((struct collection_list *collection, unsigned long regno));
+static void free_actions_list PARAMS ((char **actions_list));
+static void free_actions_list_cleanup_wrapper PARAMS ((void*));
+
+extern void _initialize_tracepoint PARAMS ((void));
 
 /* Utility: returns true if "target remote" */
 static int
@@ -1122,7 +1129,7 @@ memrange_sortmerge (memranges)
 }
 
 /* Add a register to a collection list */
-void
+static void
 add_register (collection, regno)
      struct collection_list *collection;
      unsigned long regno;
@@ -1431,7 +1438,14 @@ stringify_collection_list (list, string)
     return *str_list;
 }
 
-void
+static void
+free_actions_list_cleanup_wrapper (al)
+     void *al;
+{
+  free_actions_list (al);
+}
+
+static void
 free_actions_list(actions_list)
      char **actions_list;
 {
@@ -1724,8 +1738,10 @@ trace_start_command (args, from_tty)
          if (t->actions)
            {
              encode_actions (t, &tdp_actions, &stepping_actions);
-             old_chain = make_cleanup (free_actions_list, tdp_actions);
-             (void) make_cleanup (free_actions_list, stepping_actions);
+             old_chain = make_cleanup (free_actions_list_cleanup_wrapper,
+                                       tdp_actions);
+             (void) make_cleanup (free_actions_list_cleanup_wrapper,
+                                  stepping_actions);
 
              /* do_single_steps (t); */
              if (tdp_actions)
index 3ace7beeef3a5c6d40ec98ceeafe115d03ae6235..9f8bd4f6ae7e2b51454af9fcf322d22f1ec6adc7 100644 (file)
@@ -38,6 +38,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 extern int objectprint;                /* Controls looking up an object's derived type
                                   using what we find in its vtables.  */
 
+extern void _initialize_typeprint PARAMS ((void));
+
 static void
 ptype_command PARAMS ((char *, int));
 
index 400210bc5be454c5a30ec4859c7b5742699c30c4..9ccdfed12dee0a34010389396966cf7a30e642a0 100644 (file)
@@ -716,14 +716,6 @@ void notice_quit()
 
 #endif /* !defined(__GO32__) && !defined(_MSC_VER) */
 
-void
-pollquit()
-{
-  notice_quit ();
-  if (quit_flag || immediate_quit)
-    quit ();
-}
-
 /* Control C comes here */
 
 void
@@ -1003,21 +995,7 @@ print_spaces (n, file)
      register int n;
      register GDB_FILE *file;
 {
-  if (file->ts_streamtype == astring)
-    {
-      char *p;
-
-      gdb_file_adjust_strbuf (n, file);
-      p = file->ts_strbuf + strlen (file->ts_strbuf);
-
-      memset (p, ' ', n);
-      p[n] = '\000';
-    }
-  else
-    {
-      while (n-- > 0)
-       fputc (' ', file->ts_filestream);
-    }
+  fputs_unfiltered (n_spaces (n), file);
 }
 
 /* Print a host address.  */
@@ -1288,36 +1266,6 @@ gdb_printchar (c, stream, quoter)
   }
 }
 
-
-
-
-static char * hexlate = "0123456789abcdef" ;
-int fmthex(inbuf,outbuff,length,linelength)
-     unsigned char * inbuf ;
-     unsigned char * outbuff;
-     int length;
-     int linelength;
-{
-  unsigned char byte , nib ;
-  int outlength = 0 ;
-
-  while (length)
-    {
-      if (outlength >= linelength) break ;
-      byte = *inbuf ;
-      inbuf++ ;
-      nib = byte >> 4 ;
-      *outbuff++ = hexlate[nib] ;
-      nib = byte &0x0f ;
-      *outbuff++ = hexlate[nib] ;
-      *outbuff++ = ' ' ;
-      length-- ;
-      outlength += 3 ;
-    }
-  *outbuff = '\0' ; /* null terminate our output line */
-  return outlength ;
-}
-
 \f
 /* Number of lines per page or UINT_MAX if paging is disabled.  */
 static unsigned int lines_per_page;
@@ -1651,14 +1599,24 @@ gdb_file_adjust_strbuf (n, stream)
      GDB_FILE *stream;
 {
   int non_null_chars;
+
+  if (stream->ts_streamtype != astring)
+    return;
   
-  non_null_chars = strlen(stream->ts_strbuf);
-  if (n > (stream->ts_buflen - non_null_chars - 1)) 
+  if (stream->ts_strbuf)
     {
-      stream->ts_buflen = n + non_null_chars + 1;
-      stream->ts_strbuf = xrealloc (stream->ts_strbuf, stream->ts_buflen);
+      /* There is already a buffer allocated */
+      non_null_chars = strlen(stream->ts_strbuf);
+      if (n > (stream->ts_buflen - non_null_chars - 1)) 
+        {
+          stream->ts_buflen = n + non_null_chars + 1;
+          stream->ts_strbuf = xrealloc (stream->ts_strbuf, stream->ts_buflen);
+        }  
     }  
+  else
+    /* No buffer yet, so allocate one of the desired size */
+    stream->ts_strbuf = xmalloc ((n + 1) * sizeof (char));
 } 
 
 GDB_FILE *
@@ -2201,9 +2159,9 @@ char *
 n_spaces (n)
      int n;
 {
-  register char *t;
-  static char *spaces;
-  static int max_spaces;
+  char *t;
+  static char *spaces = 0;
+  static int max_spaces = -1;
 
   if (n > max_spaces)
     {
@@ -2946,3 +2904,22 @@ preg_nz(reg)
     }
   return preg_str;
 }
+
+/* Helper functions for INNER_THAN */
+int
+core_addr_lessthan (lhs, rhs)
+     CORE_ADDR lhs;
+     CORE_ADDR rhs;
+{
+  return (lhs < rhs);
+}
+
+int
+core_addr_greaterthan (lhs, rhs)
+     CORE_ADDR lhs;
+     CORE_ADDR rhs;
+{
+  return (lhs > rhs);
+}
+
+
index 643db86abb7f42d12dd7bbc0473d0157df0cffc6..79f5b516b6a5818e1a61674b3797a4c74bb1c8e3 100644 (file)
@@ -55,9 +55,7 @@ static CORE_ADDR find_function_addr PARAMS ((value_ptr, struct type **));
 static value_ptr value_arg_coerce PARAMS ((value_ptr, struct type *, int));
 
 
-#ifndef PUSH_ARGUMENTS
 static CORE_ADDR value_push PARAMS ((CORE_ADDR, value_ptr));
-#endif
 
 static value_ptr search_struct_field PARAMS ((char *, value_ptr, int,
                                              struct type *, int));
@@ -577,7 +575,6 @@ value_assign (toval, fromval)
      convert FROMVAL's contents now, with result in `raw_buffer',
      and set USE_BUFFER to the number of bytes to write.  */
 
-#ifdef REGISTER_CONVERTIBLE
   if (VALUE_REGNO (toval) >= 0
       && REGISTER_CONVERTIBLE (VALUE_REGNO (toval)))
     {
@@ -590,7 +587,6 @@ value_assign (toval, fromval)
          use_buffer = REGISTER_RAW_SIZE (regno);
        }
     }
-#endif
 
   switch (VALUE_LVAL (toval))
     {
@@ -1072,8 +1068,6 @@ push_bytes (sp, buffer, len)
 
 /* Push onto the stack the specified value VALUE.  */
 
-#ifndef PUSH_ARGUMENTS
-
 static CORE_ADDR
 value_push (sp, arg)
      register CORE_ADDR sp;
@@ -1097,7 +1091,25 @@ value_push (sp, arg)
   return sp;
 }
 
-#endif /* !PUSH_ARGUMENTS */
+#ifndef PUSH_ARGUMENTS
+#define PUSH_ARGUMENTS default_push_arguments
+#endif
+
+CORE_ADDR
+default_push_arguments (nargs, args, struct_return, sp, struct_addr)
+     int nargs;
+     value_ptr *args;
+     int struct_return;
+     CORE_ADDR sp;
+     CORE_ADDR struct_addr;
+{
+  /* ASSERT ( !struct_return); */
+  int i;
+  for (i = nargs - 1; i >= 0; i--)
+    sp = value_push (sp, args[i]);
+  return sp;
+}
+
 
 /* Perform the standard coercions that are specified
    for arguments to be passed to C functions.
@@ -1370,7 +1382,7 @@ hand_function_call (function, nargs, args)
       /* Convex Unix prohibits executing in the stack segment. */
       /* Hope there is empty room at the top of the text segment. */
       extern CORE_ADDR text_end;
-      static checked = 0;
+      static int checked = 0;
       if (!checked)
        for (start_sp = text_end - sizeof_dummy1; start_sp < text_end; ++start_sp)
          if (read_memory_integer (start_sp, 1) != 0)
@@ -1569,12 +1581,7 @@ You must use a pointer to function type variable. Command ignored.", arg_name);
 #endif /* STACK_ALIGN */
 #endif /* NO_EXTRA_ALIGNMENT_NEEDED */
 
-#ifdef PUSH_ARGUMENTS
-  PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr);
-#else /* !PUSH_ARGUMENTS */
-  for (i = nargs - 1; i >= 0; i--)
-    sp = value_push (sp, args[i]);
-#endif /* !PUSH_ARGUMENTS */
+  sp = PUSH_ARGUMENTS (nargs, args, sp, struct_return, struct_addr);
 
 #ifdef PUSH_RETURN_ADDRESS     /* for targets that use no CALL_DUMMY */
   /* There are a number of targets now which actually don't write any
index d3d262a20a87cb31b2c7855ca81dc6eba56bea26..1ea48d2b50effa0e3f379aa709c58f057359abf4 100644 (file)
@@ -566,4 +566,9 @@ extern value_ptr find_function_in_inferior PARAMS ((char *));
 
 extern value_ptr value_allocate_space_in_inferior PARAMS ((int));
 
+extern CORE_ADDR default_push_arguments PARAMS ((int nargs, value_ptr *args,
+                                                int struct_return,
+                                                CORE_ADDR sp,
+                                                CORE_ADDR struct_addr));
+
 #endif /* !defined (VALUE_H) */
index 7e0426035f181c8a7ba4b63ab3ff4a185f72c8c3..a629da6f369411f50124697e2be2901547721bee 100644 (file)
@@ -59,6 +59,18 @@ vax_skip_prologue (pc)
   return pc;
 }
 
+/* Return number of args passed to a frame.
+   Can return -1, meaning no way to tell.  */
+
+int
+vax_frame_num_args (fi)
+     struct frame_info *fi;
+{
+  return (0xff & read_memory_integer (FRAME_ARGS_ADDRESS (fi), 1));
+}
+
+
+
 /* Print the vax instruction at address MEMADDR in debugged memory,
    from disassembler info INFO.
    Returns length of the instruction, in bytes.  */
index 140b96b24299699746c6ca1a1b84e1eafaedff1a..f8b9d93c1046306f18b0ac2a3d053c64f8fb66f8 100644 (file)
@@ -1,3 +1,7 @@
+1999-05-21  Nick Clifton  <nickc@cygnus.com>
+
+       * interp.c (sim_resume): Add more tracing output.
+
 1999-05-17  Keith Seitz  <keiths@cygnus.com>
 
        * interp.c (NUM_MCORE_REGS): Increase by one to allow access to PC.
index 003f6976f92a3be97d4fae835774aad0dc9aa992..810bb0698355faff1f915034b07658b08ca306b8 100644 (file)
@@ -1002,6 +1002,9 @@ sim_resume (sd, step, siggnal)
              break;
            case 0xC:                                   /* jmp */
              pc = cpu.gr[RD];
+             if (tracing && RD == 15)
+               fprintf (stderr, "Func return, r2 = %x, r3 = %x\n",
+                        cpu.gr[2], cpu.gr[3]);
              bonus_cycles++;
              needfetch = 1;
              break;
@@ -1127,6 +1130,9 @@ sim_resume (sd, step, siggnal)
            bonus_cycles += ticks;
          }
          bonus_cycles += 2;  /* min. is 3, so add 2, plus ticks above */
+         if (tracing)
+           fprintf (stderr, "  mult %x by %x to give %x",
+                    cpu.gr[RD], cpu.gr[RS], cpu.gr[RD] * cpu.gr[RS]);
          cpu.gr[RD] = cpu.gr[RD] * cpu.gr[RS];
          break;
        case 0x04:                                      /* loopt */
@@ -1205,6 +1211,8 @@ sim_resume (sd, step, siggnal)
 
        case 0x12:                                      /* mov */
          cpu.gr[RD] = cpu.gr[RS];
+         if (tracing)
+           fprintf (stderr, "MOV %x into reg %d", cpu.gr[RD], RD);
          break;
 
        case 0x13:                                      /* bgenr */
@@ -1513,6 +1521,9 @@ sim_resume (sd, step, siggnal)
          break;
        case 0x7F:                                      /* jsri */
          cpu.gr[15] = pc;
+         if (tracing)
+           fprintf (stderr, "func call: r2 = %x r3 = %x r4 = %x r5 = %x r6 = %x r7 = %x\n",
+                    cpu.gr[2], cpu.gr[3], cpu.gr[4], cpu.gr[5], cpu.gr[6], cpu.gr[7]);
        case 0x70:                                      /* jmpi */
          pc = rlat ((pc + ((inst & 0xFF) << 2)) & 0xFFFFFFFC);
          memops++;
This page took 0.102397 seconds and 4 git commands to generate.