import gdb-1999-05-25 snapshot

This commit is contained in:
Jason Molenda 1999-05-25 18:09:09 +00:00
parent 751d21b5b9
commit 392a587b05
121 changed files with 1297 additions and 523 deletions

View 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
@ -22,10 +275,10 @@
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>

View 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

View 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 ()
{

View 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 *));

View 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

View 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));
/* Functions for building expressions. */

View 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)
{

View 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)

View 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

View 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;

View 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));

View 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 */

View 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;

View 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] = {

View 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)

View 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));

View 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. */
/* 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) \
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))
/* 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. */

View 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. */

View 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. */

View 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))

View 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));

View 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)

View File

@ -336,7 +336,7 @@
/* 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 */

View File

@ -312,7 +312,7 @@
/* 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 */

View 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. */

View 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. */

View 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 *));

View 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;

View 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))

View 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. */

View 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)

View 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. */

View 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.

View 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. */

View 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"

View 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. */

View 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));

View 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)

View 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)

View 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. */

View 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)))
/* Things needed for making the inferior call functions. */

View 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));

View 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 ()

View 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. */

View 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. */

View 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)

View 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) \

View 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));

View 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. */

View 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));

View 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)

View 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. */

View 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. */

View 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. */

View 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;

View 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.

View 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));

View 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;

View 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 *));

View 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 *));

View 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. */

View 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):

View 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.

View 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. */

View 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 *));
/* Insert an event object into the gdb event queue at

View 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 *));

View 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

View 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));

View 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,

View 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. */

View 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. */

View 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;

View File

@ -111,8 +111,23 @@ 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,
byte-order, ...) using information found in the BFD */

View 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

View 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;

View File

@ -59,6 +59,8 @@ static void
handle_sigio PARAMS ((int));
#endif
extern void _initialize_inflow PARAMS ((void));
static void
pass_signal PARAMS ((int));

View 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;
{

View 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 ();
}

View 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)
{

View 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;

View 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;

View 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));

View 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 *));

View 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. */

View 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\".\
}
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

View 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));

View 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

View 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 *));

View 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 *));

View 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)

View 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.

View 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. */

View 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 */

View 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;
}

View 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));

View File

@ -2347,31 +2347,32 @@ remote_read_bytes (memaddr, myaddr, len)
}
/* 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;

View 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;

View 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 *));

View 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;

View File

@ -88,7 +88,6 @@ static char *sh3e_reg_names[] = {
char **sh_register_names = sh_generic_reg_names;
struct {
char **regnames;
int mach;

Some files were not shown because too many files have changed in this diff Show More