Protoization.

This commit is contained in:
Kevin Buettner 2000-07-30 01:48:28 +00:00
parent 29e6d33b03
commit fba45db2fa
284 changed files with 5720 additions and 13265 deletions

View file

@ -1,3 +1,75 @@
2000-07-29 Kevin Buettner <kevinb@redhat.com>
* a29k-tdep.c, a68v-nat.c, abug-rom.c, alpha-nat.c,
alpha-tdep.c, annotate.c, arc-tdep.c, arch-utils.c, ax-gdb.c,
ax-general.c, blockframe.c, breakpoint.c, buildsym.c,
c-lang.c, c-typeprint.c, c-valprint.c, ch-exp.c, ch-lang.c,
ch-typeprint.c, ch-valprint.c, cli-out.c, coff-solib.c,
coffread.c, command.c, complaints.c, copying.c, core-aout.c,
core-regset.c, core-sol2.c, corefile.c, corelow.c,
cp-valprint.c, cpu32bug-rom.c, cxux-nat.c, d10v-tdep.c,
d30v-tdep.c, dbug-rom.c, dbxread.c, dcache.c, delta68-nat.c,
demangle.c, dink32-rom.c, dpx2-nat.c, dsrec.c, dstread.c,
dve3900-rom.c, dwarf2read.c, dwarfread.c, elfread.c,
environ.c, eval.c, event-top.c, exec.c, expprint.c, f-lang.c,
f-typeprint.c, f-valprint.c, findvar.c, fork-child.c,
fr30-tdep.c, gdbarch.c, gdbserver/gdbreplay.c,
gdbserver/low-hppabsd.c, gdbserver/low-linux.c,
gdbserver/low-lynx.c, gdbserver/low-nbsd.c,
gdbserver/low-sim.c, gdbserver/low-sparc.c,
gdbserver/low-sun3.c, gdbserver/remote-utils.c,
gdbserver/utils.c, gdbtypes.c, gnu-nat.c, h8300-tdep.c,
h8500-tdep.c, hp-psymtab-read.c, hp-symtab-read.c,
hp300ux-nat.c, hppa-tdep.c, hppab-nat.c, hppah-nat.c,
hppam3-nat.c, hpread.c, hpux-thread.c, i386-linux-nat.c,
i386-stub.c, i386-tdep.c, i386aix-nat.c, i386b-nat.c,
i386ly-tdep.c, i386m3-nat.c, i386mach-nat.c, i386nbsd-nat.c,
i386v-nat.c, i386v4-nat.c, i387-tdep.c, i960-tdep.c,
ia64-linux-nat.c, ia64-tdep.c, infcmd.c, inflow.c,
infptrace.c, infrun.c, inftarg.c, infttrace.c, irix4-nat.c,
irix5-nat.c, jv-lang.c, jv-typeprint.c, jv-valprint.c,
kdb-start.c, kod-cisco.c, kod.c, language.c, lin-thread.c,
linux-thread.c, lynx-nat.c, m2-lang.c, m2-typeprint.c,
m2-valprint.c, m3-nat.c, m32r-rom.c, m32r-stub.c, m32r-tdep.c,
m68hc11-tdep.c, m68k-stub.c, m68k-tdep.c, m68klinux-nat.c,
m68knbsd-nat.c, m88k-nat.c, m88k-tdep.c, mac-nat.c,
mac-xdep.c, maint.c, mcore-rom.c, mcore-tdep.c, mdebugread.c,
mem-break.c, mi/mi-cmds.c, mi/mi-main.c, mi/mi-out.c,
mi/mi-parse.c, minsyms.c, mips-nat.c, mips-tdep.c,
mipsm3-nat.c, mipsread.c, mipsv4-nat.c, mn10200-tdep.c,
mn10300-tdep.c, mon960-rom.c, monitor.c, news-xdep.c,
nindy-tdep.c, nlm/gdbserve.c, nlm/i386.c, nlm/ppc.c,
nlmread.c, ns32k-tdep.c, ns32km3-nat.c, ns32knbsd-nat.c,
objfiles.c, ocd.c, op50-rom.c, os9kread.c, osfsolib.c,
p-lang.c, p-typeprint.c, p-valprint.c, pa64solib.c, parse.c,
ppc-bdm.c, ppc-linux-nat.c, ppc-linux-tdep.c, ppcbug-rom.c,
ppcnbsd-nat.c, printcmd.c, proc-api.c, proc-events.c,
proc-flags.c, proc-why.c, procfs.c, ptx4-nat.c,
remote-adapt.c, remote-array.c, remote-bug.c, remote-e7000.c,
remote-eb.c, remote-es.c, remote-est.c, remote-hms.c,
remote-mips.c, remote-mm.c, remote-nindy.c, remote-nrom.c,
remote-os9k.c, remote-rdi.c, remote-rdp.c, remote-sds.c,
remote-sim.c, remote-st.c, remote-udi.c, remote-utils.c,
remote-vx.c, remote-vx29k.c, remote-vx68.c, remote-vx960.c,
remote-vxmips.c, remote-vxsparc.c, remote.c, rom68k-rom.c,
rs6000-tdep.c, scm-exp.c, scm-lang.c, scm-valprint.c,
ser-e7kpc.c, ser-go32.c, ser-mac.c, ser-ocd.c, ser-unix.c,
sh-stub.c, sh-tdep.c, sh3-rom.c, sol-thread.c, solib.c,
somread.c, somsolib.c, source.c, sparc-nat.c, sparc-stub.c,
sparc-tdep.c, sparcl-stub.c, sparcl-tdep.c, sparclet-rom.c,
sparclet-stub.c, stabsread.c, stack.c, standalone.c,
stop-gdb.c, stuff.c, sun3-nat.c, sun386-nat.c, symfile.c,
symm-nat.c, symm-tdep.c, symmisc.c, symtab.c, target.c,
thread.c, tic80-tdep.c, top.c, tracepoint.c, tui/tui-file.c,
tui/tui.c, tui/tuiLayout.c, tui/tuiRegs.c, tui/tuiStack.c,
tui/tuiWin.c, typeprint.c, ui-file.c, ui-out.c, ultra3-nat.c,
ultra3-xdep.c, umax-xdep.c, utils.c, v850-tdep.c, v850ice.c,
valarith.c, valops.c, valprint.c, values.c, varobj.c,
vax-tdep.c, w65-tdep.c, w89k-rom.c, win32-nat.c, wince.c,
wrapper.c, xcoffread.c, xcoffsolib.c, xmodem.c, z8k-tdep.c:
Convert old-style, pre-ISO function definitions to prototyped
form.
2000-07-28 Elena Zannoni <ezannoni@kwikemart.cygnus.com> 2000-07-28 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
* sh-tdep.c (sh_gdbarch_init): For sh4 initialize * sh-tdep.c (sh_gdbarch_init): For sh4 initialize

View file

@ -46,9 +46,7 @@ static CORE_ADDR rstack_high_address = UINT_MAX;
/* Should call_function allocate stack space for a struct return? */ /* Should call_function allocate stack space for a struct return? */
/* On the a29k objects over 16 words require the caller to allocate space. */ /* On the a29k objects over 16 words require the caller to allocate space. */
int int
a29k_use_struct_convention (gcc_p, type) a29k_use_struct_convention (int gcc_p, struct type *type)
int gcc_p;
struct type *type;
{ {
return (TYPE_LENGTH (type) > 16 * 4); return (TYPE_LENGTH (type) > 16 * 4);
} }
@ -83,11 +81,7 @@ struct prologue_info
frame pointer is being used. */ frame pointer is being used. */
CORE_ADDR CORE_ADDR
examine_prologue (pc, rsize, msize, mfp_used) examine_prologue (CORE_ADDR pc, unsigned *rsize, unsigned *msize, int *mfp_used)
CORE_ADDR pc;
unsigned *msize;
unsigned *rsize;
int *mfp_used;
{ {
long insn; long insn;
CORE_ADDR p = pc; CORE_ADDR p = pc;
@ -338,8 +332,7 @@ done:
to reach some "real" code. */ to reach some "real" code. */
CORE_ADDR CORE_ADDR
a29k_skip_prologue (pc) a29k_skip_prologue (CORE_ADDR pc)
CORE_ADDR pc;
{ {
return examine_prologue (pc, NULL, NULL, NULL); return examine_prologue (pc, NULL, NULL, NULL);
} }
@ -355,12 +348,8 @@ a29k_skip_prologue (pc)
*/ */
static int /* 0/1 - failure/success of finding the tag word */ static int /* 0/1 - failure/success of finding the tag word */
examine_tag (p, is_trans, argcount, msize, mfp_used) examine_tag (CORE_ADDR p, int *is_trans, int *argcount, unsigned *msize,
CORE_ADDR p; int *mfp_used)
int *is_trans;
int *argcount;
unsigned *msize;
int *mfp_used;
{ {
unsigned int tag1, tag2; unsigned int tag1, tag2;
@ -398,9 +387,7 @@ examine_tag (p, is_trans, argcount, msize, mfp_used)
of stacks and the frame cache in tm-a29k.h for more detail. */ of stacks and the frame cache in tm-a29k.h for more detail. */
static void static void
init_frame_info (innermost_frame, frame) init_frame_info (int innermost_frame, struct frame_info *frame)
int innermost_frame;
struct frame_info *frame;
{ {
CORE_ADDR p; CORE_ADDR p;
long insn; long insn;
@ -505,8 +492,7 @@ init_frame_info (innermost_frame, frame)
} }
void void
init_extra_frame_info (frame) init_extra_frame_info (struct frame_info *frame)
struct frame_info *frame;
{ {
if (frame->next == 0) if (frame->next == 0)
/* Assume innermost frame. May produce strange results for "info frame" /* Assume innermost frame. May produce strange results for "info frame"
@ -521,9 +507,7 @@ init_extra_frame_info (frame)
} }
void void
init_frame_pc (fromleaf, frame) init_frame_pc (int fromleaf, struct frame_info *frame)
int fromleaf;
struct frame_info *frame;
{ {
frame->pc = (fromleaf ? SAVED_PC_AFTER_CALL (frame->next) : frame->pc = (fromleaf ? SAVED_PC_AFTER_CALL (frame->next) :
frame->next ? FRAME_SAVED_PC (frame->next) : read_pc ()); frame->next ? FRAME_SAVED_PC (frame->next) : read_pc ());
@ -535,8 +519,7 @@ init_frame_pc (fromleaf, frame)
saved_msp (gcc). */ saved_msp (gcc). */
CORE_ADDR CORE_ADDR
frame_locals_address (fi) frame_locals_address (struct frame_info *fi)
struct frame_info *fi;
{ {
if (fi->flags & MFP_USED) if (fi->flags & MFP_USED)
return fi->saved_msp; return fi->saved_msp;
@ -556,11 +539,8 @@ frame_locals_address (fi)
on where it came from. The contents written into MYADDR are in on where it came from. The contents written into MYADDR are in
target format. */ target format. */
void void
read_register_stack (memaddr, myaddr, actual_mem_addr, lval) read_register_stack (CORE_ADDR memaddr, char *myaddr,
CORE_ADDR memaddr; CORE_ADDR *actual_mem_addr, enum lval_type *lval)
char *myaddr;
CORE_ADDR *actual_mem_addr;
enum lval_type *lval;
{ {
long rfb = read_register (RFB_REGNUM); long rfb = read_register (RFB_REGNUM);
long rsp = read_register (RSP_REGNUM); long rsp = read_register (RSP_REGNUM);
@ -616,9 +596,7 @@ read_register_stack (memaddr, myaddr, actual_mem_addr, lval)
/* Analogous to read_memory_integer /* Analogous to read_memory_integer
except the length is understood to be 4. */ except the length is understood to be 4. */
long long
read_register_stack_integer (memaddr, len) read_register_stack_integer (CORE_ADDR memaddr, int len)
CORE_ADDR memaddr;
int len;
{ {
char buf[4]; char buf[4];
read_register_stack (memaddr, buf, NULL, NULL); read_register_stack (memaddr, buf, NULL, NULL);
@ -629,10 +607,8 @@ read_register_stack_integer (memaddr, len)
at MEMADDR and put the actual address written into in at MEMADDR and put the actual address written into in
*ACTUAL_MEM_ADDR. */ *ACTUAL_MEM_ADDR. */
static void static void
write_register_stack (memaddr, myaddr, actual_mem_addr) write_register_stack (CORE_ADDR memaddr, char *myaddr,
CORE_ADDR memaddr; CORE_ADDR *actual_mem_addr)
char *myaddr;
CORE_ADDR *actual_mem_addr;
{ {
long rfb = read_register (RFB_REGNUM); long rfb = read_register (RFB_REGNUM);
long rsp = read_register (RSP_REGNUM); long rsp = read_register (RSP_REGNUM);
@ -673,13 +649,9 @@ write_register_stack (memaddr, myaddr, actual_mem_addr)
The argument RAW_BUFFER must point to aligned memory. */ The argument RAW_BUFFER must point to aligned memory. */
void void
a29k_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lvalp) a29k_get_saved_register (char *raw_buffer, int *optimized, CORE_ADDR *addrp,
char *raw_buffer; struct frame_info *frame, int regnum,
int *optimized; enum lval_type *lvalp)
CORE_ADDR *addrp;
struct frame_info *frame;
int regnum;
enum lval_type *lvalp;
{ {
struct frame_info *fi; struct frame_info *fi;
CORE_ADDR addr; CORE_ADDR addr;
@ -762,7 +734,7 @@ a29k_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lvalp)
restoring all saved registers. */ restoring all saved registers. */
void void
pop_frame () pop_frame (void)
{ {
struct frame_info *frame = get_current_frame (); struct frame_info *frame = get_current_frame ();
CORE_ADDR rfb = read_register (RFB_REGNUM); CORE_ADDR rfb = read_register (RFB_REGNUM);
@ -825,7 +797,7 @@ pop_frame ()
/* Push an empty stack frame, to record the current PC, etc. */ /* Push an empty stack frame, to record the current PC, etc. */
void void
push_dummy_frame () push_dummy_frame (void)
{ {
long w; long w;
CORE_ADDR rab, gr1; CORE_ADDR rab, gr1;
@ -910,9 +882,7 @@ push_dummy_frame ()
good job. */ good job. */
struct frame_info * struct frame_info *
setup_arbitrary_frame (argc, argv) setup_arbitrary_frame (int argc, CORE_ADDR *argv)
int argc;
CORE_ADDR *argv;
{ {
struct frame_info *frame; struct frame_info *frame;
@ -939,9 +909,7 @@ setup_arbitrary_frame (argc, argv)
} }
int int
gdb_print_insn_a29k (memaddr, info) gdb_print_insn_a29k (bfd_vma memaddr, disassemble_info *info)
bfd_vma memaddr;
disassemble_info *info;
{ {
if (TARGET_BYTE_ORDER == BIG_ENDIAN) if (TARGET_BYTE_ORDER == BIG_ENDIAN)
return print_insn_big_a29k (memaddr, info); return print_insn_big_a29k (memaddr, info);
@ -952,7 +920,7 @@ gdb_print_insn_a29k (memaddr, info)
enum a29k_processor_types processor_type = a29k_unknown; enum a29k_processor_types processor_type = a29k_unknown;
void void
a29k_get_processor_type () a29k_get_processor_type (void)
{ {
unsigned int cfg_reg = (unsigned int) read_register (CFG_REGNUM); unsigned int cfg_reg = (unsigned int) read_register (CFG_REGNUM);
@ -1002,8 +970,7 @@ a29k_get_processor_type ()
This routine returns true on success */ This routine returns true on success */
int int
get_longjmp_target (pc) get_longjmp_target (CORE_ADDR *pc)
CORE_ADDR *pc;
{ {
CORE_ADDR jb_addr; CORE_ADDR jb_addr;
char buf[sizeof (CORE_ADDR)]; char buf[sizeof (CORE_ADDR)];
@ -1020,7 +987,7 @@ get_longjmp_target (pc)
#endif /* GET_LONGJMP_TARGET */ #endif /* GET_LONGJMP_TARGET */
void void
_initialize_a29k_tdep () _initialize_a29k_tdep (void)
{ {
extern CORE_ADDR text_end; extern CORE_ADDR text_end;

View file

@ -30,8 +30,7 @@
extern int errno; extern int errno;
void void
fetch_inferior_registers (ignored) fetch_inferior_registers (int ignored)
int ignored;
{ {
struct ptrace_$data_regs_m68k inferior_registers; struct ptrace_$data_regs_m68k inferior_registers;
struct ptrace_$floating_regs_m68k inferior_fp_registers; struct ptrace_$floating_regs_m68k inferior_fp_registers;
@ -72,8 +71,7 @@ fetch_inferior_registers (ignored)
Otherwise, REGNO specifies which register (so we can save time). */ Otherwise, REGNO specifies which register (so we can save time). */
void void
store_inferior_registers (regno) store_inferior_registers (int regno)
int regno;
{ {
struct ptrace_$data_regs_m68k inferior_registers; struct ptrace_$data_regs_m68k inferior_registers;
struct ptrace_$floating_regs_m68k inferior_fp_registers; struct ptrace_$floating_regs_m68k inferior_fp_registers;

View file

@ -31,11 +31,7 @@
static void abug_open (char *args, int from_tty); static void abug_open (char *args, int from_tty);
static void static void
abug_supply_register (regname, regnamelen, val, vallen) abug_supply_register (char *regname, int regnamelen, char *val, int vallen)
char *regname;
int regnamelen;
char *val;
int vallen;
{ {
int regno; int regno;
@ -148,15 +144,13 @@ init_abug_cmds (void)
}; };
static void static void
abug_open (args, from_tty) abug_open (char *args, int from_tty)
char *args;
int from_tty;
{ {
monitor_open (args, &abug_cmds, from_tty); monitor_open (args, &abug_cmds, from_tty);
} }
void void
_initialize_abug_rom () _initialize_abug_rom (void)
{ {
init_abug_cmds (); init_abug_cmds ();
init_monitor_ops (&abug_ops); init_monitor_ops (&abug_ops);

View file

@ -55,8 +55,7 @@ static void fetch_elf_core_registers (char *, unsigned, int, CORE_ADDR);
This routine returns true on success. */ This routine returns true on success. */
int int
get_longjmp_target (pc) get_longjmp_target (CORE_ADDR *pc)
CORE_ADDR *pc;
{ {
CORE_ADDR jb_addr; CORE_ADDR jb_addr;
char raw_buffer[MAX_REGISTER_RAW_SIZE]; char raw_buffer[MAX_REGISTER_RAW_SIZE];
@ -85,11 +84,8 @@ get_longjmp_target (pc)
*/ */
static void static void
fetch_osf_core_registers (core_reg_sect, core_reg_size, which, reg_addr) fetch_osf_core_registers (char *core_reg_sect, unsigned core_reg_size,
char *core_reg_sect; int which, CORE_ADDR reg_addr)
unsigned core_reg_size;
int which;
CORE_ADDR reg_addr;
{ {
register int regno; register int regno;
register int addr; register int addr;
@ -138,11 +134,8 @@ fetch_osf_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
} }
static void static void
fetch_elf_core_registers (core_reg_sect, core_reg_size, which, reg_addr) fetch_elf_core_registers (char *core_reg_sect, unsigned core_reg_size,
char *core_reg_sect; int which, CORE_ADDR reg_addr)
unsigned core_reg_size;
int which;
CORE_ADDR reg_addr;
{ {
if (core_reg_size < 32 * 8) if (core_reg_size < 32 * 8)
{ {
@ -181,15 +174,13 @@ fetch_elf_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
/* Return the ptrace ``address'' of register REGNO. */ /* Return the ptrace ``address'' of register REGNO. */
CORE_ADDR CORE_ADDR
register_addr (regno, blockend) register_addr (int regno, CORE_ADDR blockend)
int regno;
CORE_ADDR blockend;
{ {
return REGISTER_PTRACE_ADDR (regno); return REGISTER_PTRACE_ADDR (regno);
} }
int int
kernel_u_size () kernel_u_size (void)
{ {
return (sizeof (struct user)); return (sizeof (struct user));
} }
@ -205,8 +196,7 @@ kernel_u_size ()
*/ */
void void
supply_gregset (gregsetp) supply_gregset (gregset_t *gregsetp)
gregset_t *gregsetp;
{ {
register int regi; register int regi;
register long *regp = ALPHA_REGSET_BASE (gregsetp); register long *regp = ALPHA_REGSET_BASE (gregsetp);
@ -224,9 +214,7 @@ supply_gregset (gregsetp)
} }
void void
fill_gregset (gregsetp, regno) fill_gregset (gregset_t *gregsetp, int regno)
gregset_t *gregsetp;
int regno;
{ {
int regi; int regi;
register long *regp = ALPHA_REGSET_BASE (gregsetp); register long *regp = ALPHA_REGSET_BASE (gregsetp);
@ -245,8 +233,7 @@ fill_gregset (gregsetp, regno)
*/ */
void void
supply_fpregset (fpregsetp) supply_fpregset (fpregset_t *fpregsetp)
fpregset_t *fpregsetp;
{ {
register int regi; register int regi;
register long *regp = ALPHA_REGSET_BASE (fpregsetp); register long *regp = ALPHA_REGSET_BASE (fpregsetp);
@ -256,9 +243,7 @@ supply_fpregset (fpregsetp)
} }
void void
fill_fpregset (fpregsetp, regno) fill_fpregset (fpregset_t *fpregsetp, int regno)
fpregset_t *fpregsetp;
int regno;
{ {
int regi; int regi;
register long *regp = ALPHA_REGSET_BASE (fpregsetp); register long *regp = ALPHA_REGSET_BASE (fpregsetp);
@ -298,7 +283,7 @@ static struct core_fns alpha_elf_core_fns =
}; };
void void
_initialize_core_alpha () _initialize_core_alpha (void)
{ {
add_core_fns (&alpha_osf_core_fns); add_core_fns (&alpha_osf_core_fns);
add_core_fns (&alpha_elf_core_fns); add_core_fns (&alpha_elf_core_fns);

View file

@ -171,8 +171,7 @@ struct linked_proc_info
long alpha_linux_sigtramp_offset (CORE_ADDR pc); long alpha_linux_sigtramp_offset (CORE_ADDR pc);
#endif #endif
long long
alpha_linux_sigtramp_offset (pc) alpha_linux_sigtramp_offset (CORE_ADDR pc)
CORE_ADDR pc;
{ {
unsigned int i[3], w; unsigned int i[3], w;
long off; long off;
@ -215,9 +214,7 @@ alpha_linux_sigtramp_offset (pc)
/* Under OSF/1, the __sigtramp routine is frameless and has a frame /* Under OSF/1, the __sigtramp routine is frameless and has a frame
size of zero, but we are able to backtrace through it. */ size of zero, but we are able to backtrace through it. */
CORE_ADDR CORE_ADDR
alpha_osf_skip_sigtramp_frame (frame, pc) alpha_osf_skip_sigtramp_frame (struct frame_info *frame, CORE_ADDR pc)
struct frame_info *frame;
CORE_ADDR pc;
{ {
char *name; char *name;
find_pc_partial_function (pc, &name, (CORE_ADDR *) NULL, (CORE_ADDR *) NULL); find_pc_partial_function (pc, &name, (CORE_ADDR *) NULL, (CORE_ADDR *) NULL);
@ -233,8 +230,7 @@ alpha_osf_skip_sigtramp_frame (frame, pc)
descriptor is added to the linked_proc_desc_table. */ descriptor is added to the linked_proc_desc_table. */
static alpha_extra_func_info_t static alpha_extra_func_info_t
push_sigtramp_desc (low_addr) push_sigtramp_desc (CORE_ADDR low_addr)
CORE_ADDR low_addr;
{ {
struct linked_proc_info *link; struct linked_proc_info *link;
alpha_extra_func_info_t proc_desc; alpha_extra_func_info_t proc_desc;
@ -265,8 +261,7 @@ push_sigtramp_desc (low_addr)
NULL). */ NULL). */
void void
alpha_find_saved_regs (frame) alpha_find_saved_regs (struct frame_info *frame)
struct frame_info *frame;
{ {
int ireg; int ireg;
CORE_ADDR reg_position; CORE_ADDR reg_position;
@ -354,9 +349,7 @@ alpha_find_saved_regs (frame)
} }
static CORE_ADDR static CORE_ADDR
read_next_frame_reg (fi, regno) read_next_frame_reg (struct frame_info *fi, int regno)
struct frame_info *fi;
int regno;
{ {
for (; fi; fi = fi->next) for (; fi; fi = fi->next)
{ {
@ -376,8 +369,7 @@ read_next_frame_reg (fi, regno)
} }
CORE_ADDR CORE_ADDR
alpha_frame_saved_pc (frame) alpha_frame_saved_pc (struct frame_info *frame)
struct frame_info *frame;
{ {
alpha_extra_func_info_t proc_desc = frame->proc_desc; alpha_extra_func_info_t proc_desc = frame->proc_desc;
/* We have to get the saved pc from the sigcontext /* We have to get the saved pc from the sigcontext
@ -391,8 +383,7 @@ alpha_frame_saved_pc (frame)
} }
CORE_ADDR CORE_ADDR
alpha_saved_pc_after_call (frame) alpha_saved_pc_after_call (struct frame_info *frame)
struct frame_info *frame;
{ {
CORE_ADDR pc = frame->pc; CORE_ADDR pc = frame->pc;
CORE_ADDR tmp; CORE_ADDR tmp;
@ -421,8 +412,7 @@ static struct frame_saved_regs temp_saved_regs;
$zero,($ra),1" on alpha. */ $zero,($ra),1" on alpha. */
static int static int
alpha_about_to_return (pc) alpha_about_to_return (CORE_ADDR pc)
CORE_ADDR pc;
{ {
return read_memory_integer (pc, 4) == 0x6bfa8001; return read_memory_integer (pc, 4) == 0x6bfa8001;
} }
@ -434,8 +424,7 @@ alpha_about_to_return (pc)
lines. */ lines. */
static CORE_ADDR static CORE_ADDR
heuristic_proc_start (pc) heuristic_proc_start (CORE_ADDR pc)
CORE_ADDR pc;
{ {
CORE_ADDR start_pc = pc; CORE_ADDR start_pc = pc;
CORE_ADDR fence = start_pc - heuristic_fence_post; CORE_ADDR fence = start_pc - heuristic_fence_post;
@ -488,9 +477,8 @@ Otherwise, you told GDB there was a function where there isn't one, or\n\
} }
static alpha_extra_func_info_t static alpha_extra_func_info_t
heuristic_proc_desc (start_pc, limit_pc, next_frame) heuristic_proc_desc (CORE_ADDR start_pc, CORE_ADDR limit_pc,
CORE_ADDR start_pc, limit_pc; struct frame_info *next_frame)
struct frame_info *next_frame;
{ {
CORE_ADDR sp = read_next_frame_reg (next_frame, SP_REGNUM); CORE_ADDR sp = read_next_frame_reg (next_frame, SP_REGNUM);
CORE_ADDR cur_pc; CORE_ADDR cur_pc;
@ -612,9 +600,7 @@ heuristic_proc_desc (start_pc, limit_pc, next_frame)
find the prologue, then return 0. */ find the prologue, then return 0. */
static CORE_ADDR static CORE_ADDR
after_prologue (pc, proc_desc) after_prologue (CORE_ADDR pc, alpha_extra_func_info_t proc_desc)
CORE_ADDR pc;
alpha_extra_func_info_t proc_desc;
{ {
struct symtab_and_line sal; struct symtab_and_line sal;
CORE_ADDR func_addr, func_end; CORE_ADDR func_addr, func_end;
@ -652,9 +638,7 @@ after_prologue (pc, proc_desc)
are definitively *not* in a function prologue. */ are definitively *not* in a function prologue. */
static int static int
alpha_in_prologue (pc, proc_desc) alpha_in_prologue (CORE_ADDR pc, alpha_extra_func_info_t proc_desc)
CORE_ADDR pc;
alpha_extra_func_info_t proc_desc;
{ {
CORE_ADDR after_prologue_pc; CORE_ADDR after_prologue_pc;
@ -668,9 +652,7 @@ alpha_in_prologue (pc, proc_desc)
} }
static alpha_extra_func_info_t static alpha_extra_func_info_t
find_proc_desc (pc, next_frame) find_proc_desc (CORE_ADDR pc, struct frame_info *next_frame)
CORE_ADDR pc;
struct frame_info *next_frame;
{ {
alpha_extra_func_info_t proc_desc; alpha_extra_func_info_t proc_desc;
struct block *b; struct block *b;
@ -792,8 +774,7 @@ find_proc_desc (pc, next_frame)
alpha_extra_func_info_t cached_proc_desc; alpha_extra_func_info_t cached_proc_desc;
CORE_ADDR CORE_ADDR
alpha_frame_chain (frame) alpha_frame_chain (struct frame_info *frame)
struct frame_info *frame;
{ {
alpha_extra_func_info_t proc_desc; alpha_extra_func_info_t proc_desc;
CORE_ADDR saved_pc = FRAME_SAVED_PC (frame); CORE_ADDR saved_pc = FRAME_SAVED_PC (frame);
@ -827,8 +808,7 @@ alpha_frame_chain (frame)
} }
void void
init_extra_frame_info (frame) init_extra_frame_info (struct frame_info *frame)
struct frame_info *frame;
{ {
/* Use proc_desc calculated in frame_chain */ /* Use proc_desc calculated in frame_chain */
alpha_extra_func_info_t proc_desc = alpha_extra_func_info_t proc_desc =
@ -900,9 +880,7 @@ init_extra_frame_info (frame)
arguments without difficulty. */ arguments without difficulty. */
struct frame_info * struct frame_info *
setup_arbitrary_frame (argc, argv) setup_arbitrary_frame (int argc, CORE_ADDR *argv)
int argc;
CORE_ADDR *argv;
{ {
if (argc != 2) if (argc != 2)
error ("ALPHA frame specifications require two arguments: sp and pc"); error ("ALPHA frame specifications require two arguments: sp and pc");
@ -921,12 +899,8 @@ setup_arbitrary_frame (argc, argv)
structure to be returned is passed as a hidden first argument. */ structure to be returned is passed as a hidden first argument. */
CORE_ADDR CORE_ADDR
alpha_push_arguments (nargs, args, sp, struct_return, struct_addr) alpha_push_arguments (int nargs, value_ptr *args, CORE_ADDR sp,
int nargs; int struct_return, CORE_ADDR struct_addr)
value_ptr *args;
CORE_ADDR sp;
int struct_return;
CORE_ADDR struct_addr;
{ {
int i; int i;
int accumulate_size = struct_return ? 8 : 0; int accumulate_size = struct_return ? 8 : 0;
@ -1007,7 +981,7 @@ alpha_push_arguments (nargs, args, sp, struct_return, struct_addr)
} }
void void
alpha_push_dummy_frame () alpha_push_dummy_frame (void)
{ {
int ireg; int ireg;
struct linked_proc_info *link; struct linked_proc_info *link;
@ -1123,7 +1097,7 @@ alpha_push_dummy_frame ()
} }
void void
alpha_pop_frame () alpha_pop_frame (void)
{ {
register int regnum; register int regnum;
struct frame_info *frame = get_current_frame (); struct frame_info *frame = get_current_frame ();
@ -1193,9 +1167,7 @@ alpha_pop_frame ()
stuff some day. */ stuff some day. */
CORE_ADDR CORE_ADDR
alpha_skip_prologue (pc, lenient) alpha_skip_prologue (CORE_ADDR pc, int lenient)
CORE_ADDR pc;
int lenient;
{ {
unsigned long inst; unsigned long inst;
int offset; int offset;
@ -1272,9 +1244,7 @@ alpha_skip_prologue (pc, lenient)
STARTADDR? */ STARTADDR? */
static int static int
alpha_in_lenient_prologue (startaddr, pc) alpha_in_lenient_prologue (CORE_ADDR startaddr, CORE_ADDR pc)
CORE_ADDR startaddr;
CORE_ADDR pc;
{ {
CORE_ADDR end_prologue = alpha_skip_prologue (startaddr, 1); CORE_ADDR end_prologue = alpha_skip_prologue (startaddr, 1);
return pc >= startaddr && pc < end_prologue; return pc >= startaddr && pc < end_prologue;
@ -1288,11 +1258,8 @@ alpha_in_lenient_prologue (startaddr, pc)
memory format is an integer with 4 bytes or less, as the representation memory format is an integer with 4 bytes or less, as the representation
of integers in floating point registers is different. */ of integers in floating point registers is different. */
void void
alpha_register_convert_to_virtual (regnum, valtype, raw_buffer, virtual_buffer) alpha_register_convert_to_virtual (int regnum, struct type *valtype,
int regnum; char *raw_buffer, char *virtual_buffer)
struct type *valtype;
char *raw_buffer;
char *virtual_buffer;
{ {
if (TYPE_LENGTH (valtype) >= REGISTER_RAW_SIZE (regnum)) if (TYPE_LENGTH (valtype) >= REGISTER_RAW_SIZE (regnum))
{ {
@ -1317,11 +1284,8 @@ alpha_register_convert_to_virtual (regnum, valtype, raw_buffer, virtual_buffer)
} }
void void
alpha_register_convert_to_raw (valtype, regnum, virtual_buffer, raw_buffer) alpha_register_convert_to_raw (struct type *valtype, int regnum,
struct type *valtype; char *virtual_buffer, char *raw_buffer)
int regnum;
char *virtual_buffer;
char *raw_buffer;
{ {
if (TYPE_LENGTH (valtype) >= REGISTER_RAW_SIZE (regnum)) if (TYPE_LENGTH (valtype) >= REGISTER_RAW_SIZE (regnum))
{ {
@ -1369,9 +1333,7 @@ alpha_extract_return_value (valtype, regbuf, valbuf)
write its value into the appropriate register. */ write its value into the appropriate register. */
void void
alpha_store_return_value (valtype, valbuf) alpha_store_return_value (struct type *valtype, char *valbuf)
struct type *valtype;
char *valbuf;
{ {
char raw_buffer[MAX_REGISTER_RAW_SIZE]; char raw_buffer[MAX_REGISTER_RAW_SIZE];
int regnum = V0_REGNUM; int regnum = V0_REGNUM;
@ -1393,10 +1355,7 @@ alpha_store_return_value (valtype, valbuf)
callable as an sfunc. */ callable as an sfunc. */
static void static void
reinit_frame_cache_sfunc (args, from_tty, c) reinit_frame_cache_sfunc (char *args, int from_tty, struct cmd_list_element *c)
char *args;
int from_tty;
struct cmd_list_element *c;
{ {
reinit_frame_cache (); reinit_frame_cache ();
} }
@ -1407,7 +1366,7 @@ reinit_frame_cache_sfunc (args, from_tty, c)
*/ */
CORE_ADDR CORE_ADDR
alpha_call_dummy_address () alpha_call_dummy_address (void)
{ {
CORE_ADDR entry; CORE_ADDR entry;
struct minimal_symbol *sym; struct minimal_symbol *sym;
@ -1426,7 +1385,7 @@ alpha_call_dummy_address ()
} }
void void
_initialize_alpha_tdep () _initialize_alpha_tdep (void)
{ {
struct cmd_list_element *c; struct cmd_list_element *c;

View file

@ -43,8 +43,7 @@ void (*annotate_exited_hook) (void);
static int ignore_count_changed = 0; static int ignore_count_changed = 0;
static void static void
print_value_flags (t) print_value_flags (struct type *t)
struct type *t;
{ {
if (can_dereference (t)) if (can_dereference (t))
printf_filtered ("*"); printf_filtered ("*");
@ -53,7 +52,7 @@ print_value_flags (t)
} }
void void
breakpoints_changed () breakpoints_changed (void)
{ {
if (annotation_level > 1) if (annotation_level > 1)
{ {
@ -78,31 +77,28 @@ annotate_ignore_count_change (void)
} }
void void
annotate_breakpoint (num) annotate_breakpoint (int num)
int num;
{ {
if (annotation_level > 1) if (annotation_level > 1)
printf_filtered ("\n\032\032breakpoint %d\n", num); printf_filtered ("\n\032\032breakpoint %d\n", num);
} }
void void
annotate_catchpoint (num) annotate_catchpoint (int num)
int num;
{ {
if (annotation_level > 1) if (annotation_level > 1)
printf_filtered ("\n\032\032catchpoint %d\n", num); printf_filtered ("\n\032\032catchpoint %d\n", num);
} }
void void
annotate_watchpoint (num) annotate_watchpoint (int num)
int num;
{ {
if (annotation_level > 1) if (annotation_level > 1)
printf_filtered ("\n\032\032watchpoint %d\n", num); printf_filtered ("\n\032\032watchpoint %d\n", num);
} }
void void
annotate_starting () annotate_starting (void)
{ {
if (annotate_starting_hook) if (annotate_starting_hook)
@ -117,7 +113,7 @@ annotate_starting ()
} }
void void
annotate_stopped () annotate_stopped (void)
{ {
if (annotate_stopped_hook) if (annotate_stopped_hook)
annotate_stopped_hook (); annotate_stopped_hook ();
@ -134,8 +130,7 @@ annotate_stopped ()
} }
void void
annotate_exited (exitstatus) annotate_exited (int exitstatus)
int exitstatus;
{ {
if (annotate_exited_hook) if (annotate_exited_hook)
annotate_exited_hook (); annotate_exited_hook ();
@ -147,7 +142,7 @@ annotate_exited (exitstatus)
} }
void void
annotate_signalled () annotate_signalled (void)
{ {
if (annotate_signalled_hook) if (annotate_signalled_hook)
annotate_signalled_hook (); annotate_signalled_hook ();
@ -157,35 +152,35 @@ annotate_signalled ()
} }
void void
annotate_signal_name () annotate_signal_name (void)
{ {
if (annotation_level > 1) if (annotation_level > 1)
printf_filtered ("\n\032\032signal-name\n"); printf_filtered ("\n\032\032signal-name\n");
} }
void void
annotate_signal_name_end () annotate_signal_name_end (void)
{ {
if (annotation_level > 1) if (annotation_level > 1)
printf_filtered ("\n\032\032signal-name-end\n"); printf_filtered ("\n\032\032signal-name-end\n");
} }
void void
annotate_signal_string () annotate_signal_string (void)
{ {
if (annotation_level > 1) if (annotation_level > 1)
printf_filtered ("\n\032\032signal-string\n"); printf_filtered ("\n\032\032signal-string\n");
} }
void void
annotate_signal_string_end () annotate_signal_string_end (void)
{ {
if (annotation_level > 1) if (annotation_level > 1)
printf_filtered ("\n\032\032signal-string-end\n"); printf_filtered ("\n\032\032signal-string-end\n");
} }
void void
annotate_signal () annotate_signal (void)
{ {
if (annotate_signal_hook) if (annotate_signal_hook)
annotate_signal_hook (); annotate_signal_hook ();
@ -195,43 +190,42 @@ annotate_signal ()
} }
void void
annotate_breakpoints_headers () annotate_breakpoints_headers (void)
{ {
if (annotation_level > 1) if (annotation_level > 1)
printf_filtered ("\n\032\032breakpoints-headers\n"); printf_filtered ("\n\032\032breakpoints-headers\n");
} }
void void
annotate_field (num) annotate_field (int num)
int num;
{ {
if (annotation_level > 1) if (annotation_level > 1)
printf_filtered ("\n\032\032field %d\n", num); printf_filtered ("\n\032\032field %d\n", num);
} }
void void
annotate_breakpoints_table () annotate_breakpoints_table (void)
{ {
if (annotation_level > 1) if (annotation_level > 1)
printf_filtered ("\n\032\032breakpoints-table\n"); printf_filtered ("\n\032\032breakpoints-table\n");
} }
void void
annotate_record () annotate_record (void)
{ {
if (annotation_level > 1) if (annotation_level > 1)
printf_filtered ("\n\032\032record\n"); printf_filtered ("\n\032\032record\n");
} }
void void
annotate_breakpoints_table_end () annotate_breakpoints_table_end (void)
{ {
if (annotation_level > 1) if (annotation_level > 1)
printf_filtered ("\n\032\032breakpoints-table-end\n"); printf_filtered ("\n\032\032breakpoints-table-end\n");
} }
void void
annotate_frames_invalid () annotate_frames_invalid (void)
{ {
if (annotation_level > 1) if (annotation_level > 1)
{ {
@ -241,8 +235,7 @@ annotate_frames_invalid ()
} }
void void
annotate_field_begin (type) annotate_field_begin (struct type *type)
struct type *type;
{ {
if (annotation_level > 1) if (annotation_level > 1)
{ {
@ -253,51 +246,49 @@ annotate_field_begin (type)
} }
void void
annotate_field_name_end () annotate_field_name_end (void)
{ {
if (annotation_level > 1) if (annotation_level > 1)
printf_filtered ("\n\032\032field-name-end\n"); printf_filtered ("\n\032\032field-name-end\n");
} }
void void
annotate_field_value () annotate_field_value (void)
{ {
if (annotation_level > 1) if (annotation_level > 1)
printf_filtered ("\n\032\032field-value\n"); printf_filtered ("\n\032\032field-value\n");
} }
void void
annotate_field_end () annotate_field_end (void)
{ {
if (annotation_level > 1) if (annotation_level > 1)
printf_filtered ("\n\032\032field-end\n"); printf_filtered ("\n\032\032field-end\n");
} }
void void
annotate_quit () annotate_quit (void)
{ {
if (annotation_level > 1) if (annotation_level > 1)
printf_filtered ("\n\032\032quit\n"); printf_filtered ("\n\032\032quit\n");
} }
void void
annotate_error () annotate_error (void)
{ {
if (annotation_level > 1) if (annotation_level > 1)
printf_filtered ("\n\032\032error\n"); printf_filtered ("\n\032\032error\n");
} }
void void
annotate_error_begin () annotate_error_begin (void)
{ {
if (annotation_level > 1) if (annotation_level > 1)
fprintf_filtered (gdb_stderr, "\n\032\032error-begin\n"); fprintf_filtered (gdb_stderr, "\n\032\032error-begin\n");
} }
void void
annotate_value_history_begin (histindex, type) annotate_value_history_begin (int histindex, struct type *type)
int histindex;
struct type *type;
{ {
if (annotation_level > 1) if (annotation_level > 1)
{ {
@ -308,8 +299,7 @@ annotate_value_history_begin (histindex, type)
} }
void void
annotate_value_begin (type) annotate_value_begin (struct type *type)
struct type *type;
{ {
if (annotation_level > 1) if (annotation_level > 1)
{ {
@ -320,92 +310,91 @@ annotate_value_begin (type)
} }
void void
annotate_value_history_value () annotate_value_history_value (void)
{ {
if (annotation_level > 1) if (annotation_level > 1)
printf_filtered ("\n\032\032value-history-value\n"); printf_filtered ("\n\032\032value-history-value\n");
} }
void void
annotate_value_history_end () annotate_value_history_end (void)
{ {
if (annotation_level > 1) if (annotation_level > 1)
printf_filtered ("\n\032\032value-history-end\n"); printf_filtered ("\n\032\032value-history-end\n");
} }
void void
annotate_value_end () annotate_value_end (void)
{ {
if (annotation_level > 1) if (annotation_level > 1)
printf_filtered ("\n\032\032value-end\n"); printf_filtered ("\n\032\032value-end\n");
} }
void void
annotate_display_begin () annotate_display_begin (void)
{ {
if (annotation_level > 1) if (annotation_level > 1)
printf_filtered ("\n\032\032display-begin\n"); printf_filtered ("\n\032\032display-begin\n");
} }
void void
annotate_display_number_end () annotate_display_number_end (void)
{ {
if (annotation_level > 1) if (annotation_level > 1)
printf_filtered ("\n\032\032display-number-end\n"); printf_filtered ("\n\032\032display-number-end\n");
} }
void void
annotate_display_format () annotate_display_format (void)
{ {
if (annotation_level > 1) if (annotation_level > 1)
printf_filtered ("\n\032\032display-format\n"); printf_filtered ("\n\032\032display-format\n");
} }
void void
annotate_display_expression () annotate_display_expression (void)
{ {
if (annotation_level > 1) if (annotation_level > 1)
printf_filtered ("\n\032\032display-expression\n"); printf_filtered ("\n\032\032display-expression\n");
} }
void void
annotate_display_expression_end () annotate_display_expression_end (void)
{ {
if (annotation_level > 1) if (annotation_level > 1)
printf_filtered ("\n\032\032display-expression-end\n"); printf_filtered ("\n\032\032display-expression-end\n");
} }
void void
annotate_display_value () annotate_display_value (void)
{ {
if (annotation_level > 1) if (annotation_level > 1)
printf_filtered ("\n\032\032display-value\n"); printf_filtered ("\n\032\032display-value\n");
} }
void void
annotate_display_end () annotate_display_end (void)
{ {
if (annotation_level > 1) if (annotation_level > 1)
printf_filtered ("\n\032\032display-end\n"); printf_filtered ("\n\032\032display-end\n");
} }
void void
annotate_arg_begin () annotate_arg_begin (void)
{ {
if (annotation_level > 1) if (annotation_level > 1)
printf_filtered ("\n\032\032arg-begin\n"); printf_filtered ("\n\032\032arg-begin\n");
} }
void void
annotate_arg_name_end () annotate_arg_name_end (void)
{ {
if (annotation_level > 1) if (annotation_level > 1)
printf_filtered ("\n\032\032arg-name-end\n"); printf_filtered ("\n\032\032arg-name-end\n");
} }
void void
annotate_arg_value (type) annotate_arg_value (struct type *type)
struct type *type;
{ {
if (annotation_level > 1) if (annotation_level > 1)
{ {
@ -416,19 +405,14 @@ annotate_arg_value (type)
} }
void void
annotate_arg_end () annotate_arg_end (void)
{ {
if (annotation_level > 1) if (annotation_level > 1)
printf_filtered ("\n\032\032arg-end\n"); printf_filtered ("\n\032\032arg-end\n");
} }
void void
annotate_source (filename, line, character, mid, pc) annotate_source (char *filename, int line, int character, int mid, CORE_ADDR pc)
char *filename;
int line;
int character;
int mid;
CORE_ADDR pc;
{ {
if (annotation_level > 1) if (annotation_level > 1)
printf_filtered ("\n\032\032source "); printf_filtered ("\n\032\032source ");
@ -443,9 +427,7 @@ annotate_source (filename, line, character, mid, pc)
} }
void void
annotate_frame_begin (level, pc) annotate_frame_begin (int level, CORE_ADDR pc)
int level;
CORE_ADDR pc;
{ {
if (annotation_level > 1) if (annotation_level > 1)
{ {
@ -456,100 +438,98 @@ annotate_frame_begin (level, pc)
} }
void void
annotate_function_call () annotate_function_call (void)
{ {
if (annotation_level > 1) if (annotation_level > 1)
printf_filtered ("\n\032\032function-call\n"); printf_filtered ("\n\032\032function-call\n");
} }
void void
annotate_signal_handler_caller () annotate_signal_handler_caller (void)
{ {
if (annotation_level > 1) if (annotation_level > 1)
printf_filtered ("\n\032\032signal-handler-caller\n"); printf_filtered ("\n\032\032signal-handler-caller\n");
} }
void void
annotate_frame_address () annotate_frame_address (void)
{ {
if (annotation_level > 1) if (annotation_level > 1)
printf_filtered ("\n\032\032frame-address\n"); printf_filtered ("\n\032\032frame-address\n");
} }
void void
annotate_frame_address_end () annotate_frame_address_end (void)
{ {
if (annotation_level > 1) if (annotation_level > 1)
printf_filtered ("\n\032\032frame-address-end\n"); printf_filtered ("\n\032\032frame-address-end\n");
} }
void void
annotate_frame_function_name () annotate_frame_function_name (void)
{ {
if (annotation_level > 1) if (annotation_level > 1)
printf_filtered ("\n\032\032frame-function-name\n"); printf_filtered ("\n\032\032frame-function-name\n");
} }
void void
annotate_frame_args () annotate_frame_args (void)
{ {
if (annotation_level > 1) if (annotation_level > 1)
printf_filtered ("\n\032\032frame-args\n"); printf_filtered ("\n\032\032frame-args\n");
} }
void void
annotate_frame_source_begin () annotate_frame_source_begin (void)
{ {
if (annotation_level > 1) if (annotation_level > 1)
printf_filtered ("\n\032\032frame-source-begin\n"); printf_filtered ("\n\032\032frame-source-begin\n");
} }
void void
annotate_frame_source_file () annotate_frame_source_file (void)
{ {
if (annotation_level > 1) if (annotation_level > 1)
printf_filtered ("\n\032\032frame-source-file\n"); printf_filtered ("\n\032\032frame-source-file\n");
} }
void void
annotate_frame_source_file_end () annotate_frame_source_file_end (void)
{ {
if (annotation_level > 1) if (annotation_level > 1)
printf_filtered ("\n\032\032frame-source-file-end\n"); printf_filtered ("\n\032\032frame-source-file-end\n");
} }
void void
annotate_frame_source_line () annotate_frame_source_line (void)
{ {
if (annotation_level > 1) if (annotation_level > 1)
printf_filtered ("\n\032\032frame-source-line\n"); printf_filtered ("\n\032\032frame-source-line\n");
} }
void void
annotate_frame_source_end () annotate_frame_source_end (void)
{ {
if (annotation_level > 1) if (annotation_level > 1)
printf_filtered ("\n\032\032frame-source-end\n"); printf_filtered ("\n\032\032frame-source-end\n");
} }
void void
annotate_frame_where () annotate_frame_where (void)
{ {
if (annotation_level > 1) if (annotation_level > 1)
printf_filtered ("\n\032\032frame-where\n"); printf_filtered ("\n\032\032frame-where\n");
} }
void void
annotate_frame_end () annotate_frame_end (void)
{ {
if (annotation_level > 1) if (annotation_level > 1)
printf_filtered ("\n\032\032frame-end\n"); printf_filtered ("\n\032\032frame-end\n");
} }
void void
annotate_array_section_begin (index, elttype) annotate_array_section_begin (int index, struct type *elttype)
int index;
struct type *elttype;
{ {
if (annotation_level > 1) if (annotation_level > 1)
{ {
@ -560,43 +540,41 @@ annotate_array_section_begin (index, elttype)
} }
void void
annotate_elt_rep (repcount) annotate_elt_rep (unsigned int repcount)
unsigned int repcount;
{ {
if (annotation_level > 1) if (annotation_level > 1)
printf_filtered ("\n\032\032elt-rep %u\n", repcount); printf_filtered ("\n\032\032elt-rep %u\n", repcount);
} }
void void
annotate_elt_rep_end () annotate_elt_rep_end (void)
{ {
if (annotation_level > 1) if (annotation_level > 1)
printf_filtered ("\n\032\032elt-rep-end\n"); printf_filtered ("\n\032\032elt-rep-end\n");
} }
void void
annotate_elt () annotate_elt (void)
{ {
if (annotation_level > 1) if (annotation_level > 1)
printf_filtered ("\n\032\032elt\n"); printf_filtered ("\n\032\032elt\n");
} }
void void
annotate_array_section_end () annotate_array_section_end (void)
{ {
if (annotation_level > 1) if (annotation_level > 1)
printf_filtered ("\n\032\032array-section-end\n"); printf_filtered ("\n\032\032array-section-end\n");
} }
static void static void
breakpoint_changed (b) breakpoint_changed (struct breakpoint *b)
struct breakpoint *b;
{ {
breakpoints_changed (); breakpoints_changed ();
} }
void void
_initialize_annotate () _initialize_annotate (void)
{ {
if (annotation_level > 1) if (annotation_level > 1)
{ {

View file

@ -114,8 +114,7 @@ static int codestream_cnt;
: codestream_buf[codestream_off++]) : codestream_buf[codestream_off++])
static unsigned int static unsigned int
codestream_fill (peek_flag) codestream_fill (int peek_flag)
int peek_flag;
{ {
codestream_addr = codestream_next_addr; codestream_addr = codestream_next_addr;
codestream_next_addr += CODESTREAM_BUFSIZ * sizeof (codestream_buf[0]); codestream_next_addr += CODESTREAM_BUFSIZ * sizeof (codestream_buf[0]);
@ -142,8 +141,7 @@ codestream_fill (peek_flag)
} }
static void static void
codestream_seek (place) codestream_seek (CORE_ADDR place)
CORE_ADDR place;
{ {
codestream_next_addr = place / CODESTREAM_BUFSIZ; codestream_next_addr = place / CODESTREAM_BUFSIZ;
codestream_next_addr *= CODESTREAM_BUFSIZ; codestream_next_addr *= CODESTREAM_BUFSIZ;
@ -156,9 +154,7 @@ codestream_seek (place)
/* This function is currently unused but leave in for now. */ /* This function is currently unused but leave in for now. */
static void static void
codestream_read (buf, count) codestream_read (unsigned int *buf, int count)
unsigned int *buf;
int count;
{ {
unsigned int *p; unsigned int *p;
int i; int i;
@ -170,8 +166,7 @@ codestream_read (buf, count)
/* Set up prologue scanning and return the first insn. */ /* Set up prologue scanning and return the first insn. */
static unsigned int static unsigned int
setup_prologue_scan (pc) setup_prologue_scan (CORE_ADDR pc)
CORE_ADDR pc;
{ {
unsigned int insn; unsigned int insn;
@ -189,8 +184,7 @@ setup_prologue_scan (pc)
*/ */
static long static long
arc_get_frame_setup (pc) arc_get_frame_setup (CORE_ADDR pc)
CORE_ADDR pc;
{ {
unsigned int insn; unsigned int insn;
/* Size of frame or -1 if unrecognizable prologue. */ /* Size of frame or -1 if unrecognizable prologue. */
@ -277,9 +271,7 @@ arc_get_frame_setup (pc)
This allows a quicker answer. */ This allows a quicker answer. */
CORE_ADDR CORE_ADDR
arc_skip_prologue (pc, frameless_p) arc_skip_prologue (CORE_ADDR pc, int frameless_p)
CORE_ADDR pc;
int frameless_p;
{ {
unsigned int insn; unsigned int insn;
int i, frame_size; int i, frame_size;
@ -310,8 +302,7 @@ arc_skip_prologue (pc, frameless_p)
This is taken from frameless_look_for_prologue. */ This is taken from frameless_look_for_prologue. */
CORE_ADDR CORE_ADDR
arc_frame_saved_pc (frame) arc_frame_saved_pc (struct frame_info *frame)
struct frame_info *frame;
{ {
CORE_ADDR func_start; CORE_ADDR func_start;
unsigned int insn; unsigned int insn;
@ -357,9 +348,7 @@ arc_frame_saved_pc (frame)
*/ */
void void
frame_find_saved_regs (fip, fsrp) frame_find_saved_regs (struct frame_info *fip, struct frame_saved_regs *fsrp)
struct frame_info *fip;
struct frame_saved_regs *fsrp;
{ {
long locals; long locals;
unsigned int insn; unsigned int insn;
@ -472,9 +461,7 @@ insn_type;
/* ??? Need to verify all cases are properly handled. */ /* ??? Need to verify all cases are properly handled. */
static insn_type static insn_type
get_insn_type (insn, pc, target) get_insn_type (unsigned long insn, CORE_ADDR pc, CORE_ADDR *target)
unsigned long insn;
CORE_ADDR pc, *target;
{ {
unsigned long limm; unsigned long limm;
@ -535,9 +522,8 @@ get_insn_type (insn, pc, target)
set up a simulated single-step, we undo our damage. */ set up a simulated single-step, we undo our damage. */
void void
arc_software_single_step (ignore, insert_breakpoints_p) arc_software_single_step (enum target_signal ignore, /* sig but we don't need it */
enum target_signal ignore; /* sig but we don't need it */ int insert_breakpoints_p)
int insert_breakpoints_p;
{ {
static CORE_ADDR next_pc, target; static CORE_ADDR next_pc, target;
static int brktrg_p; static int brktrg_p;
@ -593,8 +579,7 @@ arc_software_single_step (ignore, insert_breakpoints_p)
This routine returns true on success. */ This routine returns true on success. */
int int
get_longjmp_target (pc) get_longjmp_target (CORE_ADDR *pc)
CORE_ADDR *pc;
{ {
char buf[TARGET_PTR_BIT / TARGET_CHAR_BIT]; char buf[TARGET_PTR_BIT / TARGET_CHAR_BIT];
CORE_ADDR sp, jb_addr; CORE_ADDR sp, jb_addr;
@ -621,9 +606,7 @@ get_longjmp_target (pc)
/* Disassemble one instruction. */ /* Disassemble one instruction. */
static int static int
arc_print_insn (vma, info) arc_print_insn (bfd_vma vma, disassemble_info *info)
bfd_vma vma;
disassemble_info *info;
{ {
static int current_mach; static int current_mach;
static int current_endian; static int current_endian;
@ -670,9 +653,7 @@ arc_set_cpu_type_command (char *args, int from_tty)
} }
static void static void
arc_show_cpu_type_command (args, from_tty) arc_show_cpu_type_command (char *args, int from_tty)
char *args;
int from_tty;
{ {
} }
@ -680,8 +661,7 @@ arc_show_cpu_type_command (args, from_tty)
Result is a boolean indicating success. */ Result is a boolean indicating success. */
static int static int
arc_set_cpu_type (str) arc_set_cpu_type (char *str)
char *str;
{ {
int i, j; int i, j;
@ -702,7 +682,7 @@ arc_set_cpu_type (str)
} }
void void
_initialize_arc_tdep () _initialize_arc_tdep (void)
{ {
struct cmd_list_element *c; struct cmd_list_element *c;

View file

@ -151,17 +151,13 @@ generic_prologue_frameless_p (CORE_ADDR ip)
/* Helper functions for INNER_THAN */ /* Helper functions for INNER_THAN */
int int
core_addr_lessthan (lhs, rhs) core_addr_lessthan (CORE_ADDR lhs, CORE_ADDR rhs)
CORE_ADDR lhs;
CORE_ADDR rhs;
{ {
return (lhs < rhs); return (lhs < rhs);
} }
int int
core_addr_greaterthan (lhs, rhs) core_addr_greaterthan (CORE_ADDR lhs, CORE_ADDR rhs)
CORE_ADDR lhs;
CORE_ADDR rhs;
{ {
return (lhs > rhs); return (lhs > rhs);
} }
@ -211,16 +207,14 @@ default_double_format (struct gdbarch *gdbarch)
/* Misc helper functions for targets. */ /* Misc helper functions for targets. */
int int
frame_num_args_unknown (fi) frame_num_args_unknown (struct frame_info *fi)
struct frame_info *fi;
{ {
return -1; return -1;
} }
int int
generic_register_convertible_not (num) generic_register_convertible_not (int num)
int num;
{ {
return 0; return 0;
} }
@ -539,8 +533,7 @@ info_architecture (char *args, int from_tty)
byte-order) using information found in the BFD */ byte-order) using information found in the BFD */
void void
set_gdbarch_from_file (abfd) set_gdbarch_from_file (bfd *abfd)
bfd *abfd;
{ {
if (GDB_MULTI_ARCH) if (GDB_MULTI_ARCH)
{ {

View file

@ -154,8 +154,7 @@ static void agent_command (char *exp, int from_tty);
proletariat? */ proletariat? */
static struct value * static struct value *
const_var_ref (var) const_var_ref (struct symbol *var)
struct symbol *var;
{ {
struct type *type = SYMBOL_TYPE (var); struct type *type = SYMBOL_TYPE (var);
@ -178,8 +177,7 @@ const_var_ref (var)
advanced to the end of it. If we return zero, *PC could be advanced to the end of it. If we return zero, *PC could be
anywhere. */ anywhere. */
static struct value * static struct value *
const_expr (pc) const_expr (union exp_element **pc)
union exp_element **pc;
{ {
enum exp_opcode op = (*pc)->opcode; enum exp_opcode op = (*pc)->opcode;
struct value *v1; struct value *v1;
@ -220,8 +218,7 @@ const_expr (pc)
/* Like const_expr, but guarantee also that *PC is undisturbed if the /* Like const_expr, but guarantee also that *PC is undisturbed if the
expression is not constant. */ expression is not constant. */
static struct value * static struct value *
maybe_const_expr (pc) maybe_const_expr (union exp_element **pc)
union exp_element **pc;
{ {
union exp_element *tentative_pc = *pc; union exp_element *tentative_pc = *pc;
struct value *v = const_expr (&tentative_pc); struct value *v = const_expr (&tentative_pc);
@ -307,9 +304,7 @@ static int trace_kludge;
the value. Useful on the left side of a comma, and at the end of the value. Useful on the left side of a comma, and at the end of
an expression being used for tracing. */ an expression being used for tracing. */
static void static void
gen_traced_pop (ax, value) gen_traced_pop (struct agent_expr *ax, struct axs_value *value)
struct agent_expr *ax;
struct axs_value *value;
{ {
if (trace_kludge) if (trace_kludge)
switch (value->kind) switch (value->kind)
@ -354,9 +349,7 @@ gen_traced_pop (ax, value)
/* Assume that the lower bits of the top of the stack is a value of /* Assume that the lower bits of the top of the stack is a value of
type TYPE, and the upper bits are zero. Sign-extend if necessary. */ type TYPE, and the upper bits are zero. Sign-extend if necessary. */
static void static void
gen_sign_extend (ax, type) gen_sign_extend (struct agent_expr *ax, struct type *type)
struct agent_expr *ax;
struct type *type;
{ {
/* Do we need to sign-extend this? */ /* Do we need to sign-extend this? */
if (!TYPE_UNSIGNED (type)) if (!TYPE_UNSIGNED (type))
@ -368,9 +361,7 @@ gen_sign_extend (ax, type)
TYPE, and the upper bits are garbage. Sign-extend or truncate as TYPE, and the upper bits are garbage. Sign-extend or truncate as
needed. */ needed. */
static void static void
gen_extend (ax, type) gen_extend (struct agent_expr *ax, struct type *type)
struct agent_expr *ax;
struct type *type;
{ {
int bits = type->length * TARGET_CHAR_BIT; int bits = type->length * TARGET_CHAR_BIT;
/* I just had to. */ /* I just had to. */
@ -382,9 +373,7 @@ gen_extend (ax, type)
to TYPE"; generate code to fetch its value. Note that TYPE is the to TYPE"; generate code to fetch its value. Note that TYPE is the
target type, not the pointer type. */ target type, not the pointer type. */
static void static void
gen_fetch (ax, type) gen_fetch (struct agent_expr *ax, struct type *type)
struct agent_expr *ax;
struct type *type;
{ {
if (trace_kludge) if (trace_kludge)
{ {
@ -440,9 +429,7 @@ gen_fetch (ax, type)
right shift it by -DISTANCE bits if DISTANCE < 0. This generates right shift it by -DISTANCE bits if DISTANCE < 0. This generates
unsigned (logical) right shifts. */ unsigned (logical) right shifts. */
static void static void
gen_left_shift (ax, distance) gen_left_shift (struct agent_expr *ax, int distance)
struct agent_expr *ax;
int distance;
{ {
if (distance > 0) if (distance > 0)
{ {
@ -463,8 +450,7 @@ gen_left_shift (ax, distance)
/* Generate code to push the base address of the argument portion of /* Generate code to push the base address of the argument portion of
the top stack frame. */ the top stack frame. */
static void static void
gen_frame_args_address (ax) gen_frame_args_address (struct agent_expr *ax)
struct agent_expr *ax;
{ {
long frame_reg, frame_offset; long frame_reg, frame_offset;
@ -477,8 +463,7 @@ gen_frame_args_address (ax)
/* Generate code to push the base address of the locals portion of the /* Generate code to push the base address of the locals portion of the
top stack frame. */ top stack frame. */
static void static void
gen_frame_locals_address (ax) gen_frame_locals_address (struct agent_expr *ax)
struct agent_expr *ax;
{ {
long frame_reg, frame_offset; long frame_reg, frame_offset;
@ -494,9 +479,7 @@ gen_frame_locals_address (ax)
programming in ML, it would be clearer why these are the same programming in ML, it would be clearer why these are the same
thing. */ thing. */
static void static void
gen_offset (ax, offset) gen_offset (struct agent_expr *ax, int offset)
struct agent_expr *ax;
int offset;
{ {
/* It would suffice to simply push the offset and add it, but this /* It would suffice to simply push the offset and add it, but this
makes it easier to read positive and negative offsets in the makes it easier to read positive and negative offsets in the
@ -518,9 +501,7 @@ gen_offset (ax, offset)
address (stack frame, base register, etc.) Generate code to add address (stack frame, base register, etc.) Generate code to add
VAR's value to the top of the stack. */ VAR's value to the top of the stack. */
static void static void
gen_sym_offset (ax, var) gen_sym_offset (struct agent_expr *ax, struct symbol *var)
struct agent_expr *ax;
struct symbol *var;
{ {
gen_offset (ax, SYMBOL_VALUE (var)); gen_offset (ax, SYMBOL_VALUE (var));
} }
@ -530,10 +511,7 @@ gen_sym_offset (ax, var)
symbol VAR. Set VALUE to describe the result. */ symbol VAR. Set VALUE to describe the result. */
static void static void
gen_var_ref (ax, value, var) gen_var_ref (struct agent_expr *ax, struct axs_value *value, struct symbol *var)
struct agent_expr *ax;
struct axs_value *value;
struct symbol *var;
{ {
/* Dereference any typedefs. */ /* Dereference any typedefs. */
value->type = check_typedef (SYMBOL_TYPE (var)); value->type = check_typedef (SYMBOL_TYPE (var));
@ -648,11 +626,8 @@ gen_var_ref (ax, value, var)
/* Generating bytecode from GDB expressions: literals */ /* Generating bytecode from GDB expressions: literals */
static void static void
gen_int_literal (ax, value, k, type) gen_int_literal (struct agent_expr *ax, struct axs_value *value, LONGEST k,
struct agent_expr *ax; struct type *type)
struct axs_value *value;
LONGEST k;
struct type *type;
{ {
ax_const_l (ax, k); ax_const_l (ax, k);
value->kind = axs_rvalue; value->kind = axs_rvalue;
@ -667,9 +642,7 @@ gen_int_literal (ax, value, k, type)
try to make an rvalue out of it. Signal an error if we can't do try to make an rvalue out of it. Signal an error if we can't do
that. */ that. */
static void static void
require_rvalue (ax, value) require_rvalue (struct agent_expr *ax, struct axs_value *value)
struct agent_expr *ax;
struct axs_value *value;
{ {
switch (value->kind) switch (value->kind)
{ {
@ -714,9 +687,7 @@ require_rvalue (ax, value)
lvalue through unchanged, and let `+' raise an error. */ lvalue through unchanged, and let `+' raise an error. */
static void static void
gen_usual_unary (ax, value) gen_usual_unary (struct agent_expr *ax, struct axs_value *value)
struct agent_expr *ax;
struct axs_value *value;
{ {
/* We don't have to generate any code for the usual integral /* We don't have to generate any code for the usual integral
conversions, since values are always represented as full-width on conversions, since values are always represented as full-width on
@ -763,8 +734,7 @@ gen_usual_unary (ax, value)
/* Return non-zero iff the type TYPE1 is considered "wider" than the /* Return non-zero iff the type TYPE1 is considered "wider" than the
type TYPE2, according to the rules described in gen_usual_arithmetic. */ type TYPE2, according to the rules described in gen_usual_arithmetic. */
static int static int
type_wider_than (type1, type2) type_wider_than (struct type *type1, struct type *type2)
struct type *type1, *type2;
{ {
return (TYPE_LENGTH (type1) > TYPE_LENGTH (type2) return (TYPE_LENGTH (type1) > TYPE_LENGTH (type2)
|| (TYPE_LENGTH (type1) == TYPE_LENGTH (type2) || (TYPE_LENGTH (type1) == TYPE_LENGTH (type2)
@ -775,8 +745,7 @@ type_wider_than (type1, type2)
/* Return the "wider" of the two types TYPE1 and TYPE2. */ /* Return the "wider" of the two types TYPE1 and TYPE2. */
static struct type * static struct type *
max_type (type1, type2) max_type (struct type *type1, struct type *type2)
struct type *type1, *type2;
{ {
return type_wider_than (type1, type2) ? type1 : type2; return type_wider_than (type1, type2) ? type1 : type2;
} }
@ -784,9 +753,7 @@ max_type (type1, type2)
/* Generate code to convert a scalar value of type FROM to type TO. */ /* Generate code to convert a scalar value of type FROM to type TO. */
static void static void
gen_conversion (ax, from, to) gen_conversion (struct agent_expr *ax, struct type *from, struct type *to)
struct agent_expr *ax;
struct type *from, *to;
{ {
/* Perhaps there is a more graceful way to state these rules. */ /* Perhaps there is a more graceful way to state these rules. */
@ -816,8 +783,7 @@ gen_conversion (ax, from, to)
/* Return non-zero iff the type FROM will require any bytecodes to be /* Return non-zero iff the type FROM will require any bytecodes to be
emitted to be converted to the type TO. */ emitted to be converted to the type TO. */
static int static int
is_nontrivial_conversion (from, to) is_nontrivial_conversion (struct type *from, struct type *to)
struct type *from, *to;
{ {
struct agent_expr *ax = new_agent_expr (0); struct agent_expr *ax = new_agent_expr (0);
int nontrivial; int nontrivial;
@ -841,9 +807,8 @@ is_nontrivial_conversion (from, to)
and promotes each argument to that type. *VALUE1 and *VALUE2 and promotes each argument to that type. *VALUE1 and *VALUE2
describe the values as they are passed in, and as they are left. */ describe the values as they are passed in, and as they are left. */
static void static void
gen_usual_arithmetic (ax, value1, value2) gen_usual_arithmetic (struct agent_expr *ax, struct axs_value *value1,
struct agent_expr *ax; struct axs_value *value2)
struct axs_value *value1, *value2;
{ {
/* Do the usual binary conversions. */ /* Do the usual binary conversions. */
if (TYPE_CODE (value1->type) == TYPE_CODE_INT if (TYPE_CODE (value1->type) == TYPE_CODE_INT
@ -879,9 +844,7 @@ gen_usual_arithmetic (ax, value1, value2)
the value on the top of the stack, as described by VALUE. Assume the value on the top of the stack, as described by VALUE. Assume
the value has integral type. */ the value has integral type. */
static void static void
gen_integral_promotions (ax, value) gen_integral_promotions (struct agent_expr *ax, struct axs_value *value)
struct agent_expr *ax;
struct axs_value *value;
{ {
if (!type_wider_than (value->type, builtin_type_int)) if (!type_wider_than (value->type, builtin_type_int))
{ {
@ -898,10 +861,7 @@ gen_integral_promotions (ax, value)
/* Generate code for a cast to TYPE. */ /* Generate code for a cast to TYPE. */
static void static void
gen_cast (ax, value, type) gen_cast (struct agent_expr *ax, struct axs_value *value, struct type *type)
struct agent_expr *ax;
struct axs_value *value;
struct type *type;
{ {
/* GCC does allow casts to yield lvalues, so this should be fixed /* GCC does allow casts to yield lvalues, so this should be fixed
before merging these changes into the trunk. */ before merging these changes into the trunk. */
@ -956,10 +916,7 @@ gen_cast (ax, value, type)
/* Scale the integer on the top of the stack by the size of the target /* Scale the integer on the top of the stack by the size of the target
of the pointer type TYPE. */ of the pointer type TYPE. */
static void static void
gen_scale (ax, op, type) gen_scale (struct agent_expr *ax, enum agent_op op, struct type *type)
struct agent_expr *ax;
enum agent_op op;
struct type *type;
{ {
struct type *element = TYPE_TARGET_TYPE (type); struct type *element = TYPE_TARGET_TYPE (type);
@ -977,10 +934,8 @@ gen_scale (ax, op, type)
they've undergone the usual binary conversions. Used by both they've undergone the usual binary conversions. Used by both
BINOP_ADD and BINOP_SUBSCRIPT. NAME is used in error messages. */ BINOP_ADD and BINOP_SUBSCRIPT. NAME is used in error messages. */
static void static void
gen_add (ax, value, value1, value2, name) gen_add (struct agent_expr *ax, struct axs_value *value,
struct agent_expr *ax; struct axs_value *value1, struct axs_value *value2, char *name)
struct axs_value *value, *value1, *value2;
char *name;
{ {
/* Is it INT+PTR? */ /* Is it INT+PTR? */
if (value1->type->code == TYPE_CODE_INT if (value1->type->code == TYPE_CODE_INT
@ -1026,9 +981,8 @@ gen_add (ax, value, value1, value2, name)
value; we assume VALUE1 and VALUE2 describe the two operands, and value; we assume VALUE1 and VALUE2 describe the two operands, and
that they've undergone the usual binary conversions. */ that they've undergone the usual binary conversions. */
static void static void
gen_sub (ax, value, value1, value2) gen_sub (struct agent_expr *ax, struct axs_value *value,
struct agent_expr *ax; struct axs_value *value1, struct axs_value *value2)
struct axs_value *value, *value1, *value2;
{ {
if (value1->type->code == TYPE_CODE_PTR) if (value1->type->code == TYPE_CODE_PTR)
{ {
@ -1080,12 +1034,9 @@ an integer nor a pointer of the same type.");
result needs to be extended. NAME is the English name of the result needs to be extended. NAME is the English name of the
operator, used in error messages */ operator, used in error messages */
static void static void
gen_binop (ax, value, value1, value2, op, op_unsigned, may_carry, name) gen_binop (struct agent_expr *ax, struct axs_value *value,
struct agent_expr *ax; struct axs_value *value1, struct axs_value *value2, enum agent_op op,
struct axs_value *value, *value1, *value2; enum agent_op op_unsigned, int may_carry, char *name)
enum agent_op op, op_unsigned;
int may_carry;
char *name;
{ {
/* We only handle INT op INT. */ /* We only handle INT op INT. */
if ((value1->type->code != TYPE_CODE_INT) if ((value1->type->code != TYPE_CODE_INT)
@ -1102,9 +1053,7 @@ gen_binop (ax, value, value1, value2, op, op_unsigned, may_carry, name)
static void static void
gen_logical_not (ax, value) gen_logical_not (struct agent_expr *ax, struct axs_value *value)
struct agent_expr *ax;
struct axs_value *value;
{ {
if (TYPE_CODE (value->type) != TYPE_CODE_INT if (TYPE_CODE (value->type) != TYPE_CODE_INT
&& TYPE_CODE (value->type) != TYPE_CODE_PTR) && TYPE_CODE (value->type) != TYPE_CODE_PTR)
@ -1117,9 +1066,7 @@ gen_logical_not (ax, value)
static void static void
gen_complement (ax, value) gen_complement (struct agent_expr *ax, struct axs_value *value)
struct agent_expr *ax;
struct axs_value *value;
{ {
if (TYPE_CODE (value->type) != TYPE_CODE_INT) if (TYPE_CODE (value->type) != TYPE_CODE_INT)
error ("Illegal type of operand to `~'."); error ("Illegal type of operand to `~'.");
@ -1136,9 +1083,7 @@ gen_complement (ax, value)
/* Dereference the value on the top of the stack. */ /* Dereference the value on the top of the stack. */
static void static void
gen_deref (ax, value) gen_deref (struct agent_expr *ax, struct axs_value *value)
struct agent_expr *ax;
struct axs_value *value;
{ {
/* The caller should check the type, because several operators use /* The caller should check the type, because several operators use
this, and we don't know what error message to generate. */ this, and we don't know what error message to generate. */
@ -1158,9 +1103,7 @@ gen_deref (ax, value)
/* Produce the address of the lvalue on the top of the stack. */ /* Produce the address of the lvalue on the top of the stack. */
static void static void
gen_address_of (ax, value) gen_address_of (struct agent_expr *ax, struct axs_value *value)
struct agent_expr *ax;
struct axs_value *value;
{ {
/* Special case for taking the address of a function. The ANSI /* Special case for taking the address of a function. The ANSI
standard describes this as a special case, too, so this standard describes this as a special case, too, so this
@ -1192,9 +1135,7 @@ gen_address_of (ax, value)
/* Find the field in the structure type TYPE named NAME, and return /* Find the field in the structure type TYPE named NAME, and return
its index in TYPE's field array. */ its index in TYPE's field array. */
static int static int
find_field (type, name) find_field (struct type *type, char *name)
struct type *type;
char *name;
{ {
int i; int i;
@ -1227,11 +1168,8 @@ find_field (type, name)
starting and one-past-ending *bit* numbers of the field within the starting and one-past-ending *bit* numbers of the field within the
structure. */ structure. */
static void static void
gen_bitfield_ref (ax, value, type, start, end) gen_bitfield_ref (struct agent_expr *ax, struct axs_value *value,
struct agent_expr *ax; struct type *type, int start, int end)
struct axs_value *value;
struct type *type;
int start, end;
{ {
/* Note that ops[i] fetches 8 << i bits. */ /* Note that ops[i] fetches 8 << i bits. */
static enum agent_op ops[] static enum agent_op ops[]
@ -1390,12 +1328,8 @@ gen_bitfield_ref (ax, value, type, start, end)
the operator being compiled, and OPERAND_NAME is the kind of thing the operator being compiled, and OPERAND_NAME is the kind of thing
it operates on; we use them in error messages. */ it operates on; we use them in error messages. */
static void static void
gen_struct_ref (ax, value, field, operator_name, operand_name) gen_struct_ref (struct agent_expr *ax, struct axs_value *value, char *field,
struct agent_expr *ax; char *operator_name, char *operand_name)
struct axs_value *value;
char *field;
char *operator_name;
char *operand_name;
{ {
struct type *type; struct type *type;
int i; int i;
@ -1450,10 +1384,8 @@ gen_struct_ref (ax, value, field, operator_name, operand_name)
stack slots, doing weird things with sizeof, etc. So we require stack slots, doing weird things with sizeof, etc. So we require
the right operand to be a constant expression. */ the right operand to be a constant expression. */
static void static void
gen_repeat (pc, ax, value) gen_repeat (union exp_element **pc, struct agent_expr *ax,
union exp_element **pc; struct axs_value *value)
struct agent_expr *ax;
struct axs_value *value;
{ {
struct axs_value value1; struct axs_value value1;
/* We don't want to turn this into an rvalue, so no conversions /* We don't want to turn this into an rvalue, so no conversions
@ -1495,10 +1427,8 @@ gen_repeat (pc, ax, value)
*PC should point at the start of the operand expression; we advance it *PC should point at the start of the operand expression; we advance it
to the first instruction after the operand. */ to the first instruction after the operand. */
static void static void
gen_sizeof (pc, ax, value) gen_sizeof (union exp_element **pc, struct agent_expr *ax,
union exp_element **pc; struct axs_value *value)
struct agent_expr *ax;
struct axs_value *value;
{ {
/* We don't care about the value of the operand expression; we only /* We don't care about the value of the operand expression; we only
care about its type. However, in the current arrangement, the care about its type. However, in the current arrangement, the
@ -1522,10 +1452,8 @@ gen_sizeof (pc, ax, value)
/* A gen_expr function written by a Gen-X'er guy. /* A gen_expr function written by a Gen-X'er guy.
Append code for the subexpression of EXPR starting at *POS_P to AX. */ Append code for the subexpression of EXPR starting at *POS_P to AX. */
static void static void
gen_expr (pc, ax, value) gen_expr (union exp_element **pc, struct agent_expr *ax,
union exp_element **pc; struct axs_value *value)
struct agent_expr *ax;
struct axs_value *value;
{ {
/* Used to hold the descriptions of operand expressions. */ /* Used to hold the descriptions of operand expressions. */
struct axs_value value1, value2; struct axs_value value1, value2;
@ -1770,9 +1698,7 @@ gen_expr (pc, ax, value)
which computes its value. Return the agent expression, and set which computes its value. Return the agent expression, and set
*VALUE to describe its type, and whether it's an lvalue or rvalue. */ *VALUE to describe its type, and whether it's an lvalue or rvalue. */
struct agent_expr * struct agent_expr *
expr_to_agent (expr, value) expr_to_agent (struct expression *expr, struct axs_value *value)
struct expression *expr;
struct axs_value *value;
{ {
struct cleanup *old_chain = 0; struct cleanup *old_chain = 0;
struct agent_expr *ax = new_agent_expr (0); struct agent_expr *ax = new_agent_expr (0);
@ -1799,8 +1725,7 @@ expr_to_agent (expr, value)
Not sure this function is useful at all. */ Not sure this function is useful at all. */
struct agent_expr * struct agent_expr *
expr_to_address_and_size (expr) expr_to_address_and_size (struct expression *expr)
struct expression *expr;
{ {
struct axs_value value; struct axs_value value;
struct agent_expr *ax = expr_to_agent (expr, &value); struct agent_expr *ax = expr_to_agent (expr, &value);
@ -1825,9 +1750,7 @@ expr_to_address_and_size (expr)
caller can then use the ax_reqs function to discover which caller can then use the ax_reqs function to discover which
registers it relies upon. */ registers it relies upon. */
struct agent_expr * struct agent_expr *
gen_trace_for_expr (scope, expr) gen_trace_for_expr (CORE_ADDR scope, struct expression *expr)
CORE_ADDR scope;
struct expression *expr;
{ {
struct cleanup *old_chain = 0; struct cleanup *old_chain = 0;
struct agent_expr *ax = new_agent_expr (scope); struct agent_expr *ax = new_agent_expr (scope);
@ -1858,9 +1781,7 @@ gen_trace_for_expr (scope, expr)
/* The "agent" command, for testing: compile and disassemble an expression. */ /* The "agent" command, for testing: compile and disassemble an expression. */
static void static void
print_axs_value (f, value) print_axs_value (struct ui_file *f, struct axs_value *value)
struct ui_file *f;
struct axs_value *value;
{ {
switch (value->kind) switch (value->kind)
{ {
@ -1883,9 +1804,7 @@ print_axs_value (f, value)
static void static void
agent_command (exp, from_tty) agent_command (char *exp, int from_tty)
char *exp;
int from_tty;
{ {
struct cleanup *old_chain = 0; struct cleanup *old_chain = 0;
struct expression *expr; struct expression *expr;
@ -1920,7 +1839,7 @@ agent_command (exp, from_tty)
void _initialize_ax_gdb (void); void _initialize_ax_gdb (void);
void void
_initialize_ax_gdb () _initialize_ax_gdb (void)
{ {
add_cmd ("agent", class_maintenance, agent_command, add_cmd ("agent", class_maintenance, agent_command,
"Translate an expression into remote agent bytecode.", "Translate an expression into remote agent bytecode.",

View file

@ -40,8 +40,7 @@ static void generic_ext (struct agent_expr *x, enum agent_op op, int n);
/* Allocate a new, empty agent expression. */ /* Allocate a new, empty agent expression. */
struct agent_expr * struct agent_expr *
new_agent_expr (scope) new_agent_expr (CORE_ADDR scope)
CORE_ADDR scope;
{ {
struct agent_expr *x = xmalloc (sizeof (*x)); struct agent_expr *x = xmalloc (sizeof (*x));
x->len = 0; x->len = 0;
@ -55,8 +54,7 @@ new_agent_expr (scope)
/* Free a agent expression. */ /* Free a agent expression. */
void void
free_agent_expr (x) free_agent_expr (struct agent_expr *x)
struct agent_expr *x;
{ {
free (x->buf); free (x->buf);
free (x); free (x);
@ -78,9 +76,7 @@ make_cleanup_free_agent_expr (struct agent_expr *x)
/* Make sure that X has room for at least N more bytes. This doesn't /* Make sure that X has room for at least N more bytes. This doesn't
affect the length, just the allocated size. */ affect the length, just the allocated size. */
static void static void
grow_expr (x, n) grow_expr (struct agent_expr *x, int n)
struct agent_expr *x;
int n;
{ {
if (x->len + n > x->size) if (x->len + n > x->size)
{ {
@ -95,10 +91,7 @@ grow_expr (x, n)
/* Append the low N bytes of VAL as an N-byte integer to the /* Append the low N bytes of VAL as an N-byte integer to the
expression X, in big-endian order. */ expression X, in big-endian order. */
static void static void
append_const (x, val, n) append_const (struct agent_expr *x, LONGEST val, int n)
struct agent_expr *x;
LONGEST val;
int n;
{ {
int i; int i;
@ -115,9 +108,7 @@ append_const (x, val, n)
/* Extract an N-byte big-endian unsigned integer from expression X at /* Extract an N-byte big-endian unsigned integer from expression X at
offset O. */ offset O. */
static LONGEST static LONGEST
read_const (x, o, n) read_const (struct agent_expr *x, int o, int n)
struct agent_expr *x;
int o, n;
{ {
int i; int i;
LONGEST accum = 0; LONGEST accum = 0;
@ -135,9 +126,7 @@ read_const (x, o, n)
/* Append a simple operator OP to EXPR. */ /* Append a simple operator OP to EXPR. */
void void
ax_simple (x, op) ax_simple (struct agent_expr *x, enum agent_op op)
struct agent_expr *x;
enum agent_op op;
{ {
grow_expr (x, 1); grow_expr (x, 1);
x->buf[x->len++] = op; x->buf[x->len++] = op;
@ -147,10 +136,7 @@ ax_simple (x, op)
/* Append a sign-extension or zero-extension instruction to EXPR, to /* Append a sign-extension or zero-extension instruction to EXPR, to
extend an N-bit value. */ extend an N-bit value. */
static void static void
generic_ext (x, op, n) generic_ext (struct agent_expr *x, enum agent_op op, int n)
struct agent_expr *x;
enum agent_op op;
int n;
{ {
/* N must fit in a byte. */ /* N must fit in a byte. */
if (n < 0 || n > 255) if (n < 0 || n > 255)
@ -167,9 +153,7 @@ generic_ext (x, op, n)
/* Append a sign-extension instruction to EXPR, to extend an N-bit value. */ /* Append a sign-extension instruction to EXPR, to extend an N-bit value. */
void void
ax_ext (x, n) ax_ext (struct agent_expr *x, int n)
struct agent_expr *x;
int n;
{ {
generic_ext (x, aop_ext, n); generic_ext (x, aop_ext, n);
} }
@ -177,9 +161,7 @@ ax_ext (x, n)
/* Append a zero-extension instruction to EXPR, to extend an N-bit value. */ /* Append a zero-extension instruction to EXPR, to extend an N-bit value. */
void void
ax_zero_ext (x, n) ax_zero_ext (struct agent_expr *x, int n)
struct agent_expr *x;
int n;
{ {
generic_ext (x, aop_zero_ext, n); generic_ext (x, aop_zero_ext, n);
} }
@ -187,9 +169,7 @@ ax_zero_ext (x, n)
/* Append a trace_quick instruction to EXPR, to record N bytes. */ /* Append a trace_quick instruction to EXPR, to record N bytes. */
void void
ax_trace_quick (x, n) ax_trace_quick (struct agent_expr *x, int n)
struct agent_expr *x;
int n;
{ {
/* N must fit in a byte. */ /* N must fit in a byte. */
if (n < 0 || n > 255) if (n < 0 || n > 255)
@ -208,9 +188,7 @@ ax_trace_quick (x, n)
can backpatch it once we do know the target offset. Use ax_label can backpatch it once we do know the target offset. Use ax_label
to do the backpatching. */ to do the backpatching. */
int int
ax_goto (x, op) ax_goto (struct agent_expr *x, enum agent_op op)
struct agent_expr *x;
enum agent_op op;
{ {
grow_expr (x, 3); grow_expr (x, 3);
x->buf[x->len + 0] = op; x->buf[x->len + 0] = op;
@ -225,10 +203,7 @@ ax_goto (x, op)
ax_label (EXPR, PATCH, TARGET) ax_label (EXPR, PATCH, TARGET)
to patch TARGET into the ax_goto instruction. */ to patch TARGET into the ax_goto instruction. */
void void
ax_label (x, patch, target) ax_label (struct agent_expr *x, int patch, int target)
struct agent_expr *x;
int patch;
int target;
{ {
/* Make sure the value is in range. Don't accept 0xffff as an /* Make sure the value is in range. Don't accept 0xffff as an
offset; that's our magic sentinel value for unpatched branches. */ offset; that's our magic sentinel value for unpatched branches. */
@ -242,9 +217,7 @@ ax_label (x, patch, target)
/* Assemble code to push a constant on the stack. */ /* Assemble code to push a constant on the stack. */
void void
ax_const_l (x, l) ax_const_l (struct agent_expr *x, LONGEST l)
struct agent_expr *x;
LONGEST l;
{ {
static enum agent_op ops[] static enum agent_op ops[]
= =
@ -274,9 +247,7 @@ ax_const_l (x, l)
void void
ax_const_d (x, d) ax_const_d (struct agent_expr *x, LONGEST d)
struct agent_expr *x;
LONGEST d;
{ {
/* FIXME: floating-point support not present yet. */ /* FIXME: floating-point support not present yet. */
error ("GDB bug: ax-general.c (ax_const_d): floating point not supported yet"); error ("GDB bug: ax-general.c (ax_const_d): floating point not supported yet");
@ -286,9 +257,7 @@ ax_const_d (x, d)
/* Assemble code to push the value of register number REG on the /* Assemble code to push the value of register number REG on the
stack. */ stack. */
void void
ax_reg (x, reg) ax_reg (struct agent_expr *x, int reg)
struct agent_expr *x;
int reg;
{ {
/* Make sure the register number is in range. */ /* Make sure the register number is in range. */
if (reg < 0 || reg > 0xffff) if (reg < 0 || reg > 0xffff)
@ -361,9 +330,7 @@ struct aop_map aop_map[] =
/* Disassemble the expression EXPR, writing to F. */ /* Disassemble the expression EXPR, writing to F. */
void void
ax_print (f, x) ax_print (struct ui_file *f, struct agent_expr *x)
struct ui_file *f;
struct agent_expr *x;
{ {
int i; int i;
int is_float = 0; int is_float = 0;
@ -411,9 +378,7 @@ ax_print (f, x)
/* Given an agent expression AX, fill in an agent_reqs structure REQS /* Given an agent expression AX, fill in an agent_reqs structure REQS
describing it. */ describing it. */
void void
ax_reqs (ax, reqs) ax_reqs (struct agent_expr *ax, struct agent_reqs *reqs)
struct agent_expr *ax;
struct agent_reqs *reqs;
{ {
int i; int i;
int height; int height;

View file

@ -41,9 +41,7 @@ void _initialize_blockframe (void);
frame is the outermost one and has no caller. */ frame is the outermost one and has no caller. */
int int
file_frame_chain_valid (chain, thisframe) file_frame_chain_valid (CORE_ADDR chain, struct frame_info *thisframe)
CORE_ADDR chain;
struct frame_info *thisframe;
{ {
return ((chain) != 0 return ((chain) != 0
&& !inside_entry_file (FRAME_SAVED_PC (thisframe))); && !inside_entry_file (FRAME_SAVED_PC (thisframe)));
@ -54,9 +52,7 @@ file_frame_chain_valid (chain, thisframe)
the comments in objfiles.h. */ the comments in objfiles.h. */
int int
func_frame_chain_valid (chain, thisframe) func_frame_chain_valid (CORE_ADDR chain, struct frame_info *thisframe)
CORE_ADDR chain;
struct frame_info *thisframe;
{ {
return ((chain) != 0 return ((chain) != 0
&& !inside_main_func ((thisframe)->pc) && !inside_main_func ((thisframe)->pc)
@ -66,9 +62,7 @@ func_frame_chain_valid (chain, thisframe)
/* A very simple method of determining a valid frame */ /* A very simple method of determining a valid frame */
int int
nonnull_frame_chain_valid (chain, thisframe) nonnull_frame_chain_valid (CORE_ADDR chain, struct frame_info *thisframe)
CORE_ADDR chain;
struct frame_info *thisframe;
{ {
return ((chain) != 0); return ((chain) != 0);
} }
@ -82,8 +76,7 @@ nonnull_frame_chain_valid (chain, thisframe)
A PC of zero is always considered to be the bottom of the stack. */ A PC of zero is always considered to be the bottom of the stack. */
int int
inside_entry_file (addr) inside_entry_file (CORE_ADDR addr)
CORE_ADDR addr;
{ {
if (addr == 0) if (addr == 0)
return 1; return 1;
@ -110,8 +103,7 @@ inside_entry_file (addr)
A PC of zero is always considered to be the bottom of the stack. */ A PC of zero is always considered to be the bottom of the stack. */
int int
inside_main_func (pc) inside_main_func (CORE_ADDR pc)
CORE_ADDR pc;
{ {
if (pc == 0) if (pc == 0)
return 1; return 1;
@ -149,8 +141,7 @@ inside_main_func (pc)
A PC of zero is always considered to be the bottom of the stack. */ A PC of zero is always considered to be the bottom of the stack. */
int int
inside_entry_func (pc) inside_entry_func (CORE_ADDR pc)
CORE_ADDR pc;
{ {
if (pc == 0) if (pc == 0)
return 1; return 1;
@ -179,15 +170,13 @@ static struct frame_info *current_frame;
static struct obstack frame_cache_obstack; static struct obstack frame_cache_obstack;
void * void *
frame_obstack_alloc (size) frame_obstack_alloc (unsigned long size)
unsigned long size;
{ {
return obstack_alloc (&frame_cache_obstack, size); return obstack_alloc (&frame_cache_obstack, size);
} }
void void
frame_saved_regs_zalloc (fi) frame_saved_regs_zalloc (struct frame_info *fi)
struct frame_info *fi;
{ {
fi->saved_regs = (CORE_ADDR *) fi->saved_regs = (CORE_ADDR *)
frame_obstack_alloc (SIZEOF_FRAME_SAVED_REGS); frame_obstack_alloc (SIZEOF_FRAME_SAVED_REGS);
@ -198,7 +187,7 @@ frame_saved_regs_zalloc (fi)
/* Return the innermost (currently executing) stack frame. */ /* Return the innermost (currently executing) stack frame. */
struct frame_info * struct frame_info *
get_current_frame () get_current_frame (void)
{ {
if (current_frame == NULL) if (current_frame == NULL)
{ {
@ -211,8 +200,7 @@ get_current_frame ()
} }
void void
set_current_frame (frame) set_current_frame (struct frame_info *frame)
struct frame_info *frame;
{ {
current_frame = frame; current_frame = frame;
} }
@ -221,9 +209,7 @@ set_current_frame (frame)
Always returns a non-NULL value. */ Always returns a non-NULL value. */
struct frame_info * struct frame_info *
create_new_frame (addr, pc) create_new_frame (CORE_ADDR addr, CORE_ADDR pc)
CORE_ADDR addr;
CORE_ADDR pc;
{ {
struct frame_info *fi; struct frame_info *fi;
char *name; char *name;
@ -252,8 +238,7 @@ create_new_frame (addr, pc)
frame). */ frame). */
struct frame_info * struct frame_info *
get_next_frame (frame) get_next_frame (struct frame_info *frame)
struct frame_info *frame;
{ {
return frame->next; return frame->next;
} }
@ -261,7 +246,7 @@ get_next_frame (frame)
/* Flush the entire frame cache. */ /* Flush the entire frame cache. */
void void
flush_cached_frames () flush_cached_frames (void)
{ {
/* Since we can't really be sure what the first object allocated was */ /* Since we can't really be sure what the first object allocated was */
obstack_free (&frame_cache_obstack, 0); obstack_free (&frame_cache_obstack, 0);
@ -275,7 +260,7 @@ flush_cached_frames ()
/* Flush the frame cache, and start a new one if necessary. */ /* Flush the frame cache, and start a new one if necessary. */
void void
reinit_frame_cache () reinit_frame_cache (void)
{ {
flush_cached_frames (); flush_cached_frames ();
@ -291,8 +276,7 @@ reinit_frame_cache ()
function. */ function. */
int int
frameless_look_for_prologue (frame) frameless_look_for_prologue (struct frame_info *frame)
struct frame_info *frame;
{ {
CORE_ADDR func_start, after_prologue; CORE_ADDR func_start, after_prologue;
@ -335,8 +319,7 @@ frameless_look_for_prologue (frame)
if there is no such frame. */ if there is no such frame. */
struct frame_info * struct frame_info *
get_prev_frame (next_frame) get_prev_frame (struct frame_info *next_frame)
struct frame_info *next_frame;
{ {
CORE_ADDR address = 0; CORE_ADDR address = 0;
struct frame_info *prev; struct frame_info *prev;
@ -496,8 +479,7 @@ get_prev_frame (next_frame)
} }
CORE_ADDR CORE_ADDR
get_frame_pc (frame) get_frame_pc (struct frame_info *frame)
struct frame_info *frame;
{ {
return frame->pc; return frame->pc;
} }
@ -509,9 +491,8 @@ get_frame_pc (frame)
/* Find the addresses in which registers are saved in FRAME. */ /* Find the addresses in which registers are saved in FRAME. */
void void
get_frame_saved_regs (frame, saved_regs_addr) get_frame_saved_regs (struct frame_info *frame,
struct frame_info *frame; struct frame_saved_regs *saved_regs_addr)
struct frame_saved_regs *saved_regs_addr;
{ {
if (frame->saved_regs == NULL) if (frame->saved_regs == NULL)
{ {
@ -536,8 +517,7 @@ get_frame_saved_regs (frame, saved_regs_addr)
in a specified stack frame. The frame address is assumed valid. */ in a specified stack frame. The frame address is assumed valid. */
struct block * struct block *
get_frame_block (frame) get_frame_block (struct frame_info *frame)
struct frame_info *frame;
{ {
CORE_ADDR pc; CORE_ADDR pc;
@ -554,14 +534,13 @@ get_frame_block (frame)
} }
struct block * struct block *
get_current_block () get_current_block (void)
{ {
return block_for_pc (read_pc ()); return block_for_pc (read_pc ());
} }
CORE_ADDR CORE_ADDR
get_pc_function_start (pc) get_pc_function_start (CORE_ADDR pc)
CORE_ADDR pc;
{ {
register struct block *bl; register struct block *bl;
register struct symbol *symbol; register struct symbol *symbol;
@ -588,8 +567,7 @@ get_pc_function_start (pc)
/* Return the symbol for the function executing in frame FRAME. */ /* Return the symbol for the function executing in frame FRAME. */
struct symbol * struct symbol *
get_frame_function (frame) get_frame_function (struct frame_info *frame)
struct frame_info *frame;
{ {
register struct block *bl = get_frame_block (frame); register struct block *bl = get_frame_block (frame);
if (bl == 0) if (bl == 0)
@ -604,12 +582,8 @@ get_frame_function (frame)
is NULL, we don't pass this information back to the caller. */ is NULL, we don't pass this information back to the caller. */
struct blockvector * struct blockvector *
blockvector_for_pc_sect (pc, section, pindex, symtab) blockvector_for_pc_sect (register CORE_ADDR pc, struct sec *section,
register CORE_ADDR pc; int *pindex, struct symtab *symtab)
struct sec *section;
int *pindex;
struct symtab *symtab;
{ {
register struct block *b; register struct block *b;
register int bot, top, half; register int bot, top, half;
@ -662,9 +636,7 @@ blockvector_for_pc_sect (pc, section, pindex, symtab)
Backward compatibility, no section. */ Backward compatibility, no section. */
struct blockvector * struct blockvector *
blockvector_for_pc (pc, pindex) blockvector_for_pc (register CORE_ADDR pc, int *pindex)
register CORE_ADDR pc;
int *pindex;
{ {
return blockvector_for_pc_sect (pc, find_pc_mapped_section (pc), return blockvector_for_pc_sect (pc, find_pc_mapped_section (pc),
pindex, NULL); pindex, NULL);
@ -674,9 +646,7 @@ blockvector_for_pc (pc, pindex)
in the specified section, or 0 if there is none. */ in the specified section, or 0 if there is none. */
struct block * struct block *
block_for_pc_sect (pc, section) block_for_pc_sect (register CORE_ADDR pc, struct sec *section)
register CORE_ADDR pc;
struct sec *section;
{ {
register struct blockvector *bl; register struct blockvector *bl;
int index; int index;
@ -691,8 +661,7 @@ block_for_pc_sect (pc, section)
or 0 if there is none. Backward compatibility, no section. */ or 0 if there is none. Backward compatibility, no section. */
struct block * struct block *
block_for_pc (pc) block_for_pc (register CORE_ADDR pc)
register CORE_ADDR pc;
{ {
return block_for_pc_sect (pc, find_pc_mapped_section (pc)); return block_for_pc_sect (pc, find_pc_mapped_section (pc));
} }
@ -701,9 +670,7 @@ block_for_pc (pc)
Returns 0 if function is not known. */ Returns 0 if function is not known. */
struct symbol * struct symbol *
find_pc_sect_function (pc, section) find_pc_sect_function (CORE_ADDR pc, struct sec *section)
CORE_ADDR pc;
struct sec *section;
{ {
register struct block *b = block_for_pc_sect (pc, section); register struct block *b = block_for_pc_sect (pc, section);
if (b == 0) if (b == 0)
@ -715,8 +682,7 @@ find_pc_sect_function (pc, section)
Returns 0 if function is not known. Backward compatibility, no section */ Returns 0 if function is not known. Backward compatibility, no section */
struct symbol * struct symbol *
find_pc_function (pc) find_pc_function (CORE_ADDR pc)
CORE_ADDR pc;
{ {
return find_pc_sect_function (pc, find_pc_mapped_section (pc)); return find_pc_sect_function (pc, find_pc_mapped_section (pc));
} }
@ -732,7 +698,7 @@ static struct sec *cache_pc_function_section = NULL;
/* Clear cache, e.g. when symbol table is discarded. */ /* Clear cache, e.g. when symbol table is discarded. */
void void
clear_pc_function_cache () clear_pc_function_cache (void)
{ {
cache_pc_function_low = 0; cache_pc_function_low = 0;
cache_pc_function_high = 0; cache_pc_function_high = 0;
@ -752,12 +718,8 @@ clear_pc_function_cache ()
returns 0. */ returns 0. */
int int
find_pc_sect_partial_function (pc, section, name, address, endaddr) find_pc_sect_partial_function (CORE_ADDR pc, asection *section, char **name,
CORE_ADDR pc; CORE_ADDR *address, CORE_ADDR *endaddr)
asection *section;
char **name;
CORE_ADDR *address;
CORE_ADDR *endaddr;
{ {
struct partial_symtab *pst; struct partial_symtab *pst;
struct symbol *f; struct symbol *f;
@ -924,11 +886,8 @@ return_cached_value:
/* Backward compatibility, no section argument */ /* Backward compatibility, no section argument */
int int
find_pc_partial_function (pc, name, address, endaddr) find_pc_partial_function (CORE_ADDR pc, char **name, CORE_ADDR *address,
CORE_ADDR pc; CORE_ADDR *endaddr)
char **name;
CORE_ADDR *address;
CORE_ADDR *endaddr;
{ {
asection *section; asection *section;
@ -940,8 +899,7 @@ find_pc_partial_function (pc, name, address, endaddr)
or NULL if there is no such frame. If BLOCK is NULL, just return NULL. */ or NULL if there is no such frame. If BLOCK is NULL, just return NULL. */
struct frame_info * struct frame_info *
block_innermost_frame (block) block_innermost_frame (struct block *block)
struct block *block;
{ {
struct frame_info *frame; struct frame_info *frame;
register CORE_ADDR start; register CORE_ADDR start;
@ -968,8 +926,7 @@ block_innermost_frame (block)
or NULL if no FRAME on the chain corresponds to CORE_ADDR. */ or NULL if no FRAME on the chain corresponds to CORE_ADDR. */
struct frame_info * struct frame_info *
find_frame_addr_in_frame_chain (frame_addr) find_frame_addr_in_frame_chain (CORE_ADDR frame_addr)
CORE_ADDR frame_addr;
{ {
struct frame_info *frame = NULL; struct frame_info *frame = NULL;
@ -990,8 +947,7 @@ find_frame_addr_in_frame_chain (frame_addr)
/* Get saved user PC for sigtramp from sigcontext for BSD style sigtramp. */ /* Get saved user PC for sigtramp from sigcontext for BSD style sigtramp. */
CORE_ADDR CORE_ADDR
sigtramp_saved_pc (frame) sigtramp_saved_pc (struct frame_info *frame)
struct frame_info *frame;
{ {
CORE_ADDR sigcontext_addr; CORE_ADDR sigcontext_addr;
char buf[TARGET_PTR_BIT / TARGET_CHAR_BIT]; char buf[TARGET_PTR_BIT / TARGET_CHAR_BIT];
@ -1024,20 +980,16 @@ sigtramp_saved_pc (frame)
extern CORE_ADDR text_end; extern CORE_ADDR text_end;
int int
pc_in_call_dummy_before_text_end (pc, sp, frame_address) pc_in_call_dummy_before_text_end (CORE_ADDR pc, CORE_ADDR sp,
CORE_ADDR pc; CORE_ADDR frame_address)
CORE_ADDR sp;
CORE_ADDR frame_address;
{ {
return ((pc) >= text_end - CALL_DUMMY_LENGTH return ((pc) >= text_end - CALL_DUMMY_LENGTH
&& (pc) <= text_end + DECR_PC_AFTER_BREAK); && (pc) <= text_end + DECR_PC_AFTER_BREAK);
} }
int int
pc_in_call_dummy_after_text_end (pc, sp, frame_address) pc_in_call_dummy_after_text_end (CORE_ADDR pc, CORE_ADDR sp,
CORE_ADDR pc; CORE_ADDR frame_address)
CORE_ADDR sp;
CORE_ADDR frame_address;
{ {
return ((pc) >= text_end return ((pc) >= text_end
&& (pc) <= text_end + CALL_DUMMY_LENGTH + DECR_PC_AFTER_BREAK); && (pc) <= text_end + CALL_DUMMY_LENGTH + DECR_PC_AFTER_BREAK);
@ -1062,10 +1014,7 @@ pc_in_call_dummy_after_text_end (pc, sp, frame_address)
allocate other kinds of code on the stack. */ allocate other kinds of code on the stack. */
int int
pc_in_call_dummy_on_stack (pc, sp, frame_address) pc_in_call_dummy_on_stack (CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address)
CORE_ADDR pc;
CORE_ADDR sp;
CORE_ADDR frame_address;
{ {
return (INNER_THAN ((sp), (pc)) return (INNER_THAN ((sp), (pc))
&& (frame_address != 0) && (frame_address != 0)
@ -1073,10 +1022,8 @@ pc_in_call_dummy_on_stack (pc, sp, frame_address)
} }
int int
pc_in_call_dummy_at_entry_point (pc, sp, frame_address) pc_in_call_dummy_at_entry_point (CORE_ADDR pc, CORE_ADDR sp,
CORE_ADDR pc; CORE_ADDR frame_address)
CORE_ADDR sp;
CORE_ADDR frame_address;
{ {
return ((pc) >= CALL_DUMMY_ADDRESS () return ((pc) >= CALL_DUMMY_ADDRESS ()
&& (pc) <= (CALL_DUMMY_ADDRESS () + DECR_PC_AFTER_BREAK)); && (pc) <= (CALL_DUMMY_ADDRESS () + DECR_PC_AFTER_BREAK));
@ -1123,9 +1070,7 @@ static struct dummy_frame *dummy_frame_stack = NULL;
This is the work-horse for pc_in_call_dummy and read_register_dummy */ This is the work-horse for pc_in_call_dummy and read_register_dummy */
char * char *
generic_find_dummy_frame (pc, fp) generic_find_dummy_frame (CORE_ADDR pc, CORE_ADDR fp)
CORE_ADDR pc;
CORE_ADDR fp;
{ {
struct dummy_frame *dummyframe; struct dummy_frame *dummyframe;
@ -1147,10 +1092,7 @@ generic_find_dummy_frame (pc, fp)
Return true if this is a dummy frame created by gdb for an inferior call */ Return true if this is a dummy frame created by gdb for an inferior call */
int int
generic_pc_in_call_dummy (pc, sp, fp) generic_pc_in_call_dummy (CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR fp)
CORE_ADDR pc;
CORE_ADDR sp;
CORE_ADDR fp;
{ {
/* if find_dummy_frame succeeds, then PC is in a call dummy */ /* if find_dummy_frame succeeds, then PC is in a call dummy */
/* Note: SP and not FP is passed on. */ /* Note: SP and not FP is passed on. */
@ -1161,10 +1103,7 @@ generic_pc_in_call_dummy (pc, sp, fp)
Find a saved register from before GDB calls a function in the inferior */ Find a saved register from before GDB calls a function in the inferior */
CORE_ADDR CORE_ADDR
generic_read_register_dummy (pc, fp, regno) generic_read_register_dummy (CORE_ADDR pc, CORE_ADDR fp, int regno)
CORE_ADDR pc;
CORE_ADDR fp;
int regno;
{ {
char *dummy_regs = generic_find_dummy_frame (pc, fp); char *dummy_regs = generic_find_dummy_frame (pc, fp);
@ -1183,7 +1122,7 @@ generic_read_register_dummy (pc, fp, regno)
where a breakpoint is laying in wait. */ where a breakpoint is laying in wait. */
void void
generic_push_dummy_frame () generic_push_dummy_frame (void)
{ {
struct dummy_frame *dummy_frame; struct dummy_frame *dummy_frame;
CORE_ADDR fp = (get_current_frame ())->frame; CORE_ADDR fp = (get_current_frame ())->frame;
@ -1217,8 +1156,7 @@ generic_push_dummy_frame ()
} }
void void
generic_save_dummy_frame_tos (sp) generic_save_dummy_frame_tos (CORE_ADDR sp)
CORE_ADDR sp;
{ {
dummy_frame_stack->top = sp; dummy_frame_stack->top = sp;
} }
@ -1241,7 +1179,7 @@ generic_pop_current_frame (void (*popper) (struct frame_info * frame))
Restore the machine state from a saved dummy stack frame. */ Restore the machine state from a saved dummy stack frame. */
void void
generic_pop_dummy_frame () generic_pop_dummy_frame (void)
{ {
struct dummy_frame *dummy_frame = dummy_frame_stack; struct dummy_frame *dummy_frame = dummy_frame_stack;
@ -1263,9 +1201,7 @@ generic_pop_dummy_frame ()
and false for the CRT0 start-up frame. Purpose is to terminate backtrace */ and false for the CRT0 start-up frame. Purpose is to terminate backtrace */
int int
generic_file_frame_chain_valid (fp, fi) generic_file_frame_chain_valid (CORE_ADDR fp, struct frame_info *fi)
CORE_ADDR fp;
struct frame_info *fi;
{ {
if (PC_IN_CALL_DUMMY (FRAME_SAVED_PC (fi), fp, fp)) if (PC_IN_CALL_DUMMY (FRAME_SAVED_PC (fi), fp, fp))
return 1; /* don't prune CALL_DUMMY frames */ return 1; /* don't prune CALL_DUMMY frames */
@ -1276,9 +1212,7 @@ generic_file_frame_chain_valid (fp, fi)
} }
int int
generic_func_frame_chain_valid (fp, fi) generic_func_frame_chain_valid (CORE_ADDR fp, struct frame_info *fi)
CORE_ADDR fp;
struct frame_info *fi;
{ {
if (PC_IN_CALL_DUMMY ((fi)->pc, fp, fp)) if (PC_IN_CALL_DUMMY ((fi)->pc, fp, fp))
return 1; /* don't prune CALL_DUMMY frames */ return 1; /* don't prune CALL_DUMMY frames */
@ -1294,14 +1228,8 @@ generic_func_frame_chain_valid (fp, fi)
the frame being created */ the frame being created */
void void
generic_fix_call_dummy (dummy, pc, fun, nargs, args, type, gcc_p) generic_fix_call_dummy (char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs,
char *dummy; struct value **args, struct type *type, int gcc_p)
CORE_ADDR pc;
CORE_ADDR fun;
int nargs;
struct value **args;
struct type *type;
int gcc_p;
{ {
return; return;
} }
@ -1331,13 +1259,9 @@ generic_fix_call_dummy (dummy, pc, fun, nargs, args, type, gcc_p)
The argument RAW_BUFFER must point to aligned memory. */ The argument RAW_BUFFER must point to aligned memory. */
void void
generic_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval) generic_get_saved_register (char *raw_buffer, int *optimized, CORE_ADDR *addrp,
char *raw_buffer; struct frame_info *frame, int regnum,
int *optimized; enum lval_type *lval)
CORE_ADDR *addrp;
struct frame_info *frame;
int regnum;
enum lval_type *lval;
{ {
if (!target_has_registers) if (!target_has_registers)
error ("No registers."); error ("No registers.");

File diff suppressed because it is too large Load diff

View file

@ -1104,7 +1104,7 @@ merge_symbol_lists (struct pending **srclist, struct pending **targetlist)
corresponding to a psymtab. */ corresponding to a psymtab. */
void void
buildsym_init () buildsym_init (void)
{ {
free_pendings = NULL; free_pendings = NULL;
file_symbols = NULL; file_symbols = NULL;
@ -1117,7 +1117,7 @@ buildsym_init ()
file, e.g. a shared library). */ file, e.g. a shared library). */
void void
buildsym_new_init () buildsym_new_init (void)
{ {
buildsym_init (); buildsym_init ();
} }

View file

@ -35,10 +35,7 @@ static void c_emit_char (int c, struct ui_file * stream, int quoter);
characters and strings is language specific. */ characters and strings is language specific. */
static void static void
c_emit_char (c, stream, quoter) c_emit_char (register int c, struct ui_file *stream, int quoter)
register int c;
struct ui_file *stream;
int quoter;
{ {
c &= 0xFF; /* Avoid sign bit follies */ c &= 0xFF; /* Avoid sign bit follies */
@ -83,9 +80,7 @@ c_emit_char (c, stream, quoter)
} }
void void
c_printchar (c, stream) c_printchar (int c, struct ui_file *stream)
int c;
struct ui_file *stream;
{ {
fputc_filtered ('\'', stream); fputc_filtered ('\'', stream);
LA_EMIT_CHAR (c, stream, '\''); LA_EMIT_CHAR (c, stream, '\'');
@ -99,12 +94,8 @@ c_printchar (c, stream)
printing LENGTH characters, or if FORCE_ELLIPSES. */ printing LENGTH characters, or if FORCE_ELLIPSES. */
void void
c_printstr (stream, string, length, width, force_ellipses) c_printstr (struct ui_file *stream, char *string, unsigned int length,
struct ui_file *stream; int width, int force_ellipses)
char *string;
unsigned int length;
int width;
int force_ellipses;
{ {
register unsigned int i; register unsigned int i;
unsigned int things_printed = 0; unsigned int things_printed = 0;
@ -223,9 +214,7 @@ c_printstr (stream, string, length, width, force_ellipses)
debugging information supplied by the compiler. fnf@cygnus.com */ debugging information supplied by the compiler. fnf@cygnus.com */
struct type * struct type *
c_create_fundamental_type (objfile, typeid) c_create_fundamental_type (struct objfile *objfile, int typeid)
struct objfile *objfile;
int typeid;
{ {
register struct type *type = NULL; register struct type *type = NULL;
@ -521,7 +510,7 @@ const struct language_defn asm_language_defn =
}; };
void void
_initialize_c_language () _initialize_c_language (void)
{ {
add_language (&c_language_defn); add_language (&c_language_defn);
add_language (&cplus_language_defn); add_language (&cplus_language_defn);

View file

@ -63,10 +63,7 @@ static void c_type_print_cv_qualifier (struct type *, struct ui_file *,
NEW is the new name for a type TYPE. */ NEW is the new name for a type TYPE. */
void void
c_typedef_print (type, new, stream) c_typedef_print (struct type *type, struct symbol *new, struct ui_file *stream)
struct type *type;
struct symbol *new;
struct ui_file *stream;
{ {
CHECK_TYPEDEF (type); CHECK_TYPEDEF (type);
switch (current_language->la_language) switch (current_language->la_language)
@ -113,12 +110,8 @@ c_typedef_print (type, new, stream)
/* LEVEL is the depth to indent lines by. */ /* LEVEL is the depth to indent lines by. */
void void
c_print_type (type, varstring, stream, show, level) c_print_type (struct type *type, char *varstring, struct ui_file *stream,
struct type *type; int show, int level)
char *varstring;
struct ui_file *stream;
int show;
int level;
{ {
register enum type_code code; register enum type_code code;
int demangled_args; int demangled_args;
@ -182,9 +175,7 @@ c_print_type (type, varstring, stream, show, level)
derivation via protected inheritance, so gdb can print it out */ derivation via protected inheritance, so gdb can print it out */
static void static void
cp_type_print_derivation_info (stream, type) cp_type_print_derivation_info (struct ui_file *stream, struct type *type)
struct ui_file *stream;
struct type *type;
{ {
char *name; char *name;
int i; int i;
@ -207,12 +198,8 @@ cp_type_print_derivation_info (stream, type)
/* Print the C++ method arguments ARGS to the file STREAM. */ /* Print the C++ method arguments ARGS to the file STREAM. */
static void static void
cp_type_print_method_args (args, prefix, varstring, staticp, stream) cp_type_print_method_args (struct type **args, char *prefix, char *varstring,
struct type **args; int staticp, struct ui_file *stream)
char *prefix;
char *varstring;
int staticp;
struct ui_file *stream;
{ {
int i; int i;
@ -256,11 +243,8 @@ cp_type_print_method_args (args, prefix, varstring, staticp, stream)
SHOW is always zero on recursive calls. */ SHOW is always zero on recursive calls. */
void void
c_type_print_varspec_prefix (type, stream, show, passed_a_ptr) c_type_print_varspec_prefix (struct type *type, struct ui_file *stream,
struct type *type; int show, int passed_a_ptr)
struct ui_file *stream;
int show;
int passed_a_ptr;
{ {
char *name; char *name;
if (type == 0) if (type == 0)
@ -354,11 +338,8 @@ c_type_print_varspec_prefix (type, stream, show, passed_a_ptr)
NEED_SPACE = 1 indicates an initial white space is needed */ NEED_SPACE = 1 indicates an initial white space is needed */
static void static void
c_type_print_cv_qualifier (type, stream, need_pre_space, need_post_space) c_type_print_cv_qualifier (struct type *type, struct ui_file *stream,
struct type *type; int need_pre_space, int need_post_space)
struct ui_file *stream;
int need_pre_space;
int need_post_space;
{ {
int flag = 0; int flag = 0;
@ -386,9 +367,7 @@ c_type_print_cv_qualifier (type, stream, need_pre_space, need_post_space)
static void static void
c_type_print_args (type, stream) c_type_print_args (struct type *type, struct ui_file *stream)
struct type *type;
struct ui_file *stream;
{ {
int i; int i;
struct type **args; struct type **args;
@ -567,12 +546,8 @@ remove_qualifiers (char *qid)
Args work like c_type_print_varspec_prefix. */ Args work like c_type_print_varspec_prefix. */
void void
c_type_print_varspec_suffix (type, stream, show, passed_a_ptr, demangled_args) c_type_print_varspec_suffix (struct type *type, struct ui_file *stream,
struct type *type; int show, int passed_a_ptr, int demangled_args)
struct ui_file *stream;
int show;
int passed_a_ptr;
int demangled_args;
{ {
if (type == 0) if (type == 0)
return; return;
@ -690,11 +665,8 @@ c_type_print_varspec_suffix (type, stream, show, passed_a_ptr, demangled_args)
We increase it for some recursive calls. */ We increase it for some recursive calls. */
void void
c_type_print_base (type, stream, show, level) c_type_print_base (struct type *type, struct ui_file *stream, int show,
struct type *type; int level)
struct ui_file *stream;
int show;
int level;
{ {
register int i; register int i;
register int len; register int len;

View file

@ -44,17 +44,9 @@
The PRETTY parameter controls prettyprinting. */ The PRETTY parameter controls prettyprinting. */
int int
c_val_print (type, valaddr, embedded_offset, address, stream, format, deref_ref, recurse, c_val_print (struct type *type, char *valaddr, int embedded_offset,
pretty) CORE_ADDR address, struct ui_file *stream, int format,
struct type *type; int deref_ref, int recurse, enum val_prettyprint pretty)
char *valaddr;
int embedded_offset;
CORE_ADDR address;
struct ui_file *stream;
int format;
int deref_ref;
int recurse;
enum val_prettyprint pretty;
{ {
register unsigned int i = 0; /* Number of characters printed */ register unsigned int i = 0; /* Number of characters printed */
unsigned len; unsigned len;
@ -454,11 +446,8 @@ c_val_print (type, valaddr, embedded_offset, address, stream, format, deref_ref,
} }
int int
c_value_print (val, stream, format, pretty) c_value_print (value_ptr val, struct ui_file *stream, int format,
value_ptr val; enum val_prettyprint pretty)
struct ui_file *stream;
int format;
enum val_prettyprint pretty;
{ {
struct type *type = VALUE_TYPE (val); struct type *type = VALUE_TYPE (val);
struct type *real_type; struct type *real_type;

View file

@ -200,7 +200,7 @@ static YYSTYPE val_buffer[MAX_LOOK_AHEAD + 1];
/*int current_token, lookahead_token; */ /*int current_token, lookahead_token; */
INLINE static enum ch_terminal INLINE static enum ch_terminal
PEEK_TOKEN () PEEK_TOKEN (void)
{ {
if (terminal_buffer[0] == TOKEN_NOT_READ) if (terminal_buffer[0] == TOKEN_NOT_READ)
{ {
@ -213,8 +213,7 @@ PEEK_TOKEN ()
#define PEEK_TOKEN1() peek_token_(1) #define PEEK_TOKEN1() peek_token_(1)
#define PEEK_TOKEN2() peek_token_(2) #define PEEK_TOKEN2() peek_token_(2)
static enum ch_terminal static enum ch_terminal
peek_token_ (i) peek_token_ (int i)
int i;
{ {
if (i > MAX_LOOK_AHEAD) if (i > MAX_LOOK_AHEAD)
internal_error ("ch-exp.c - too much lookahead"); internal_error ("ch-exp.c - too much lookahead");
@ -229,9 +228,7 @@ peek_token_ (i)
#if 0 #if 0
static void static void
pushback_token (code, node) pushback_token (enum ch_terminal code, YYSTYPE node)
enum ch_terminal code;
YYSTYPE node;
{ {
int i; int i;
if (terminal_buffer[MAX_LOOK_AHEAD] != TOKEN_NOT_READ) if (terminal_buffer[MAX_LOOK_AHEAD] != TOKEN_NOT_READ)
@ -248,7 +245,7 @@ pushback_token (code, node)
#endif #endif
static void static void
forward_token_ () forward_token_ (void)
{ {
int i; int i;
for (i = 0; i < MAX_LOOK_AHEAD; i++) for (i = 0; i < MAX_LOOK_AHEAD; i++)
@ -264,8 +261,7 @@ forward_token_ ()
if it isn't TOKEN, the parser is broken. */ if it isn't TOKEN, the parser is broken. */
static void static void
require (token) require (enum ch_terminal token)
enum ch_terminal token;
{ {
if (PEEK_TOKEN () != token) if (PEEK_TOKEN () != token)
{ {
@ -275,8 +271,7 @@ require (token)
} }
static int static int
check_token (token) check_token (enum ch_terminal token)
enum ch_terminal token;
{ {
if (PEEK_TOKEN () != token) if (PEEK_TOKEN () != token)
return 0; return 0;
@ -288,9 +283,7 @@ check_token (token)
else return 1. else return 1.
*/ */
static int static int
expect (token, message) expect (enum ch_terminal token, char *message)
enum ch_terminal token;
char *message;
{ {
if (PEEK_TOKEN () != token) if (PEEK_TOKEN () != token)
{ {
@ -347,7 +340,7 @@ parse_opt_name_string (allow_all)
} }
static tree static tree
parse_simple_name_string () parse_simple_name_string (void)
{ {
int token = PEEK_TOKEN (); int token = PEEK_TOKEN ();
tree name; tree name;
@ -362,7 +355,7 @@ parse_simple_name_string ()
} }
static tree static tree
parse_name_string () parse_name_string (void)
{ {
tree name = parse_opt_name_string (0); tree name = parse_opt_name_string (0);
if (name) if (name)
@ -377,7 +370,7 @@ parse_name_string ()
Returns if pass 2: a decl or value for identifier. */ Returns if pass 2: a decl or value for identifier. */
static tree static tree
parse_name () parse_name (void)
{ {
tree name = parse_name_string (); tree name = parse_name_string ();
if (pass == 1 || ignoring) if (pass == 1 || ignoring)
@ -404,8 +397,7 @@ parse_name ()
#if 0 #if 0
static void static void
pushback_paren_expr (expr) pushback_paren_expr (tree expr)
tree expr;
{ {
if (pass == 1 && !ignoring) if (pass == 1 && !ignoring)
expr = build1 (PAREN_EXPR, NULL_TREE, expr); expr = build1 (PAREN_EXPR, NULL_TREE, expr);
@ -416,7 +408,7 @@ pushback_paren_expr (expr)
/* Matches: <case label> */ /* Matches: <case label> */
static void static void
parse_case_label () parse_case_label (void)
{ {
if (check_token (ELSE)) if (check_token (ELSE))
error ("ELSE in tuples labels not implemented"); error ("ELSE in tuples labels not implemented");
@ -430,7 +422,7 @@ parse_case_label ()
} }
static int static int
parse_opt_untyped_expr () parse_opt_untyped_expr (void)
{ {
switch (PEEK_TOKEN ()) switch (PEEK_TOKEN ())
{ {
@ -445,7 +437,7 @@ parse_opt_untyped_expr ()
} }
static void static void
parse_unary_call () parse_unary_call (void)
{ {
FORWARD_TOKEN (); FORWARD_TOKEN ();
expect ('(', NULL); expect ('(', NULL);
@ -458,7 +450,7 @@ parse_unary_call ()
#if 0 #if 0
static struct type * static struct type *
parse_mode_call () parse_mode_call (void)
{ {
struct type *type; struct type *type;
FORWARD_TOKEN (); FORWARD_TOKEN ();
@ -474,7 +466,7 @@ parse_mode_call ()
#endif #endif
static struct type * static struct type *
parse_mode_or_normal_call () parse_mode_or_normal_call (void)
{ {
struct type *type; struct type *type;
FORWARD_TOKEN (); FORWARD_TOKEN ();
@ -497,7 +489,7 @@ parse_mode_or_normal_call ()
Assume we have parsed the function, and are at the '('. */ Assume we have parsed the function, and are at the '('. */
static void static void
parse_call () parse_call (void)
{ {
int arg_count; int arg_count;
require ('('); require ('(');
@ -534,7 +526,7 @@ parse_call ()
} }
static void static void
parse_named_record_element () parse_named_record_element (void)
{ {
struct stoken label; struct stoken label;
char buf[256]; char buf[256];
@ -556,8 +548,7 @@ parse_named_record_element ()
/* Returns one or more TREE_LIST nodes, in reverse order. */ /* Returns one or more TREE_LIST nodes, in reverse order. */
static void static void
parse_tuple_element (type) parse_tuple_element (struct type *type)
struct type *type;
{ {
if (PEEK_TOKEN () == DOT_FIELD_NAME) if (PEEK_TOKEN () == DOT_FIELD_NAME)
{ {
@ -622,8 +613,7 @@ parse_tuple_element (type)
/* Matches: a COMMA-separated list of tuple elements. /* Matches: a COMMA-separated list of tuple elements.
Returns a list (of TREE_LIST nodes). */ Returns a list (of TREE_LIST nodes). */
static void static void
parse_opt_element_list (type) parse_opt_element_list (struct type *type)
struct type *type;
{ {
arglist_len = 0; arglist_len = 0;
if (PEEK_TOKEN () == ']') if (PEEK_TOKEN () == ']')
@ -643,8 +633,7 @@ parse_opt_element_list (type)
If modename is non-NULL it prefixed the tuple. */ If modename is non-NULL it prefixed the tuple. */
static void static void
parse_tuple (mode) parse_tuple (struct type *mode)
struct type *mode;
{ {
struct type *type; struct type *type;
if (mode) if (mode)
@ -672,7 +661,7 @@ parse_tuple (mode)
} }
static void static void
parse_primval () parse_primval (void)
{ {
struct type *type; struct type *type;
enum exp_opcode op; enum exp_opcode op;
@ -942,7 +931,7 @@ parse_primval ()
} }
static void static void
parse_operand6 () parse_operand6 (void)
{ {
if (check_token (RECEIVE)) if (check_token (RECEIVE))
{ {
@ -959,7 +948,7 @@ parse_operand6 ()
} }
static void static void
parse_operand5 () parse_operand5 (void)
{ {
enum exp_opcode op; enum exp_opcode op;
/* We are supposed to be looking for a <string repetition operator>, /* We are supposed to be looking for a <string repetition operator>,
@ -990,7 +979,7 @@ parse_operand5 ()
} }
static void static void
parse_operand4 () parse_operand4 (void)
{ {
enum exp_opcode op; enum exp_opcode op;
parse_operand5 (); parse_operand5 ();
@ -1020,7 +1009,7 @@ parse_operand4 ()
} }
static void static void
parse_operand3 () parse_operand3 (void)
{ {
enum exp_opcode op; enum exp_opcode op;
parse_operand4 (); parse_operand4 ();
@ -1047,7 +1036,7 @@ parse_operand3 ()
} }
static void static void
parse_operand2 () parse_operand2 (void)
{ {
enum exp_opcode op; enum exp_opcode op;
parse_operand3 (); parse_operand3 ();
@ -1091,7 +1080,7 @@ parse_operand2 ()
} }
static void static void
parse_operand1 () parse_operand1 (void)
{ {
enum exp_opcode op; enum exp_opcode op;
parse_operand2 (); parse_operand2 ();
@ -1115,7 +1104,7 @@ parse_operand1 ()
} }
static void static void
parse_operand0 () parse_operand0 (void)
{ {
enum exp_opcode op; enum exp_opcode op;
parse_operand1 (); parse_operand1 ();
@ -1142,7 +1131,7 @@ parse_operand0 ()
} }
static void static void
parse_expr () parse_expr (void)
{ {
parse_operand0 (); parse_operand0 ();
if (check_token (GDB_ASSIGNMENT)) if (check_token (GDB_ASSIGNMENT))
@ -1153,14 +1142,14 @@ parse_expr ()
} }
static void static void
parse_then_alternative () parse_then_alternative (void)
{ {
expect (THEN, "missing 'THEN' in 'IF' expression"); expect (THEN, "missing 'THEN' in 'IF' expression");
parse_expr (); parse_expr ();
} }
static void static void
parse_else_alternative () parse_else_alternative (void)
{ {
if (check_token (ELSIF)) if (check_token (ELSIF))
parse_if_expression_body (); parse_if_expression_body ();
@ -1173,7 +1162,7 @@ parse_else_alternative ()
/* Matches: <boolean expression> <then alternative> <else alternative> */ /* Matches: <boolean expression> <then alternative> <else alternative> */
static void static void
parse_if_expression_body () parse_if_expression_body (void)
{ {
parse_expr (); parse_expr ();
parse_then_alternative (); parse_then_alternative ();
@ -1182,7 +1171,7 @@ parse_if_expression_body ()
} }
static void static void
parse_if_expression () parse_if_expression (void)
{ {
require (IF); require (IF);
parse_if_expression_body (); parse_if_expression_body ();
@ -1196,7 +1185,7 @@ parse_if_expression ()
You should call convert() to fix up the <untyped_expr>. */ You should call convert() to fix up the <untyped_expr>. */
static void static void
parse_untyped_expr () parse_untyped_expr (void)
{ {
switch (PEEK_TOKEN ()) switch (PEEK_TOKEN ())
{ {
@ -1226,7 +1215,7 @@ parse_untyped_expr ()
} }
int int
chill_parse () chill_parse (void)
{ {
terminal_buffer[0] = TOKEN_NOT_READ; terminal_buffer[0] = TOKEN_NOT_READ;
if (PEEK_TOKEN () == TYPENAME && PEEK_TOKEN1 () == END_TOKEN) if (PEEK_TOKEN () == TYPENAME && PEEK_TOKEN1 () == END_TOKEN)
@ -1271,8 +1260,7 @@ static int tempbufindex; /* Current index into buffer */
on demand. */ on demand. */
static void static void
growbuf_by_size (count) growbuf_by_size (int count)
int count;
{ {
int growby; int growby;
@ -1293,7 +1281,7 @@ growbuf_by_size (count)
in symbol table lookups. If not successful, returns NULL. */ in symbol table lookups. If not successful, returns NULL. */
static char * static char *
match_simple_name_string () match_simple_name_string (void)
{ {
char *tokptr = lexptr; char *tokptr = lexptr;
@ -1321,10 +1309,7 @@ match_simple_name_string ()
digits we have encountered. */ digits we have encountered. */
static int static int
decode_integer_value (base, tokptrptr, ivalptr) decode_integer_value (int base, char **tokptrptr, LONGEST *ivalptr)
int base;
char **tokptrptr;
LONGEST *ivalptr;
{ {
char *tokptr = *tokptrptr; char *tokptr = *tokptrptr;
int temp; int temp;
@ -1395,9 +1380,7 @@ decode_integer_value (base, tokptrptr, ivalptr)
} }
static int static int
decode_integer_literal (valptr, tokptrptr) decode_integer_literal (LONGEST *valptr, char **tokptrptr)
LONGEST *valptr;
char **tokptrptr;
{ {
char *tokptr = *tokptrptr; char *tokptr = *tokptrptr;
int base = 0; int base = 0;
@ -1480,7 +1463,7 @@ decode_integer_literal (valptr, tokptrptr)
legal floating point value. */ legal floating point value. */
static enum ch_terminal static enum ch_terminal
match_float_literal () match_float_literal (void)
{ {
char *tokptr = lexptr; char *tokptr = lexptr;
char *buf; char *buf;
@ -1610,7 +1593,7 @@ convert_float:
a string, it is simply doubled (I.E. "this""is""one""string") */ a string, it is simply doubled (I.E. "this""is""one""string") */
static enum ch_terminal static enum ch_terminal
match_string_literal () match_string_literal (void)
{ {
char *tokptr = lexptr; char *tokptr = lexptr;
int in_ctrlseq = 0; int in_ctrlseq = 0;
@ -1706,7 +1689,7 @@ match_string_literal ()
*/ */
static enum ch_terminal static enum ch_terminal
match_character_literal () match_character_literal (void)
{ {
char *tokptr = lexptr; char *tokptr = lexptr;
LONGEST ival = 0; LONGEST ival = 0;
@ -1788,7 +1771,7 @@ match_character_literal ()
in any integer literal. */ in any integer literal. */
static enum ch_terminal static enum ch_terminal
match_integer_literal () match_integer_literal (void)
{ {
char *tokptr = lexptr; char *tokptr = lexptr;
LONGEST ival; LONGEST ival;
@ -1817,7 +1800,7 @@ match_integer_literal ()
in any bit-string literal. */ in any bit-string literal. */
static enum ch_terminal static enum ch_terminal
match_bitstring_literal () match_bitstring_literal (void)
{ {
register char *tokptr = lexptr; register char *tokptr = lexptr;
int bitoffset = 0; int bitoffset = 0;
@ -1989,7 +1972,7 @@ static const struct token tokentab2[] =
operators used are compatible. */ operators used are compatible. */
static enum ch_terminal static enum ch_terminal
ch_lex () ch_lex (void)
{ {
unsigned int i; unsigned int i;
enum ch_terminal token; enum ch_terminal token;
@ -2226,9 +2209,8 @@ ch_lex ()
} }
static void static void
write_lower_upper_value (opcode, type) write_lower_upper_value (enum exp_opcode opcode, /* Either UNOP_LOWER or UNOP_UPPER */
enum exp_opcode opcode; /* Either UNOP_LOWER or UNOP_UPPER */ struct type *type)
struct type *type;
{ {
if (type == NULL) if (type == NULL)
write_exp_elt_opcode (opcode); write_exp_elt_opcode (opcode);
@ -2244,8 +2226,7 @@ write_lower_upper_value (opcode, type)
} }
void void
chill_error (msg) chill_error (char *msg)
char *msg;
{ {
/* Never used. */ /* Never used. */
} }

View file

@ -53,8 +53,7 @@ static void chill_printchar (int, struct ui_file *);
characters to derive the demangled form. */ characters to derive the demangled form. */
char * char *
chill_demangle (mangled) chill_demangle (const char *mangled)
const char *mangled;
{ {
const char *joiner = NULL; const char *joiner = NULL;
char *demangled; char *demangled;
@ -81,9 +80,7 @@ chill_demangle (mangled)
} }
static void static void
chill_printchar (c, stream) chill_printchar (register int c, struct ui_file *stream)
register int c;
struct ui_file *stream;
{ {
c &= 0xFF; /* Avoid sign bit follies */ c &= 0xFF; /* Avoid sign bit follies */
@ -112,12 +109,8 @@ chill_printchar (c, stream)
*/ */
static void static void
chill_printstr (stream, string, length, width, force_ellipses) chill_printstr (struct ui_file *stream, char *string, unsigned int length,
struct ui_file *stream; int width, int force_ellipses)
char *string;
unsigned int length;
int width;
int force_ellipses;
{ {
register unsigned int i; register unsigned int i;
unsigned int things_printed = 0; unsigned int things_printed = 0;
@ -228,9 +221,7 @@ chill_printstr (stream, string, length, width, force_ellipses)
} }
static struct type * static struct type *
chill_create_fundamental_type (objfile, typeid) chill_create_fundamental_type (struct objfile *objfile, int typeid)
struct objfile *objfile;
int typeid;
{ {
register struct type *type = NULL; register struct type *type = NULL;
@ -346,10 +337,8 @@ struct type **CONST_PTR (chill_builtin_types[]) =
*RESULT_TYPE is the appropriate type for the result. */ *RESULT_TYPE is the appropriate type for the result. */
LONGEST LONGEST
type_lower_upper (op, type, result_type) type_lower_upper (enum exp_opcode op, /* Either UNOP_LOWER or UNOP_UPPER */
enum exp_opcode op; /* Either UNOP_LOWER or UNOP_UPPER */ struct type *type, struct type **result_type)
struct type *type;
struct type **result_type;
{ {
LONGEST low, high; LONGEST low, high;
*result_type = type; *result_type = type;
@ -400,8 +389,7 @@ type_lower_upper (op, type, result_type)
} }
static value_ptr static value_ptr
value_chill_length (val) value_chill_length (value_ptr val)
value_ptr val;
{ {
LONGEST tmp; LONGEST tmp;
struct type *type = VALUE_TYPE (val); struct type *type = VALUE_TYPE (val);
@ -429,8 +417,7 @@ value_chill_length (val)
} }
static value_ptr static value_ptr
value_chill_card (val) value_chill_card (value_ptr val)
value_ptr val;
{ {
LONGEST tmp = 0; LONGEST tmp = 0;
struct type *type = VALUE_TYPE (val); struct type *type = VALUE_TYPE (val);
@ -454,9 +441,7 @@ value_chill_card (val)
} }
static value_ptr static value_ptr
value_chill_max_min (op, val) value_chill_max_min (enum exp_opcode op, value_ptr val)
enum exp_opcode op;
value_ptr val;
{ {
LONGEST tmp = 0; LONGEST tmp = 0;
struct type *type = VALUE_TYPE (val); struct type *type = VALUE_TYPE (val);
@ -509,11 +494,9 @@ value_chill_max_min (op, val)
} }
static value_ptr static value_ptr
evaluate_subexp_chill (expect_type, exp, pos, noside) evaluate_subexp_chill (struct type *expect_type,
struct type *expect_type; register struct expression *exp, register int *pos,
register struct expression *exp; enum noside noside)
register int *pos;
enum noside noside;
{ {
int pc = *pos; int pc = *pos;
struct type *type; struct type *type;
@ -649,7 +632,7 @@ const struct language_defn chill_language_defn =
/* Initialization for Chill */ /* Initialization for Chill */
void void
_initialize_chill_language () _initialize_chill_language (void)
{ {
builtin_type_chill_bool = builtin_type_chill_bool =
init_type (TYPE_CODE_BOOL, TARGET_CHAR_BIT / TARGET_CHAR_BIT, init_type (TYPE_CODE_BOOL, TARGET_CHAR_BIT / TARGET_CHAR_BIT,

View file

@ -40,12 +40,8 @@
static void chill_type_print_base (struct type *, struct ui_file *, int, int); static void chill_type_print_base (struct type *, struct ui_file *, int, int);
void void
chill_print_type (type, varstring, stream, show, level) chill_print_type (struct type *type, char *varstring, struct ui_file *stream,
struct type *type; int show, int level)
char *varstring;
struct ui_file *stream;
int show;
int level;
{ {
if (varstring != NULL && *varstring != '\0') if (varstring != NULL && *varstring != '\0')
{ {
@ -68,11 +64,8 @@ chill_print_type (type, varstring, stream, show, level)
We increase it for some recursive calls. */ We increase it for some recursive calls. */
static void static void
chill_type_print_base (type, stream, show, level) chill_type_print_base (struct type *type, struct ui_file *stream, int show,
struct type *type; int level)
struct ui_file *stream;
int show;
int level;
{ {
register int len; register int len;
register int i; register int i;

View file

@ -53,10 +53,7 @@ static void chill_val_print_array_elements (struct type *, char *,
decimal integer values. */ decimal integer values. */
static void static void
chill_print_type_scalar (type, val, stream) chill_print_type_scalar (struct type *type, LONGEST val, struct ui_file *stream)
struct type *type;
LONGEST val;
struct ui_file *stream;
{ {
switch (TYPE_CODE (type)) switch (TYPE_CODE (type))
{ {
@ -99,16 +96,10 @@ chill_print_type_scalar (type, val, stream)
element indexes (in Chill syntax). */ element indexes (in Chill syntax). */
static void static void
chill_val_print_array_elements (type, valaddr, address, stream, chill_val_print_array_elements (struct type *type, char *valaddr,
format, deref_ref, recurse, pretty) CORE_ADDR address, struct ui_file *stream,
struct type *type; int format, int deref_ref, int recurse,
char *valaddr; enum val_prettyprint pretty)
CORE_ADDR address;
struct ui_file *stream;
int format;
int deref_ref;
int recurse;
enum val_prettyprint pretty;
{ {
unsigned int i = 0; unsigned int i = 0;
unsigned int things_printed = 0; unsigned int things_printed = 0;
@ -199,17 +190,9 @@ chill_val_print_array_elements (type, valaddr, address, stream,
The PRETTY parameter controls prettyprinting. */ The PRETTY parameter controls prettyprinting. */
int int
chill_val_print (type, valaddr, embedded_offset, address, chill_val_print (struct type *type, char *valaddr, int embedded_offset,
stream, format, deref_ref, recurse, pretty) CORE_ADDR address, struct ui_file *stream, int format,
struct type *type; int deref_ref, int recurse, enum val_prettyprint pretty)
char *valaddr;
int embedded_offset;
CORE_ADDR address;
struct ui_file *stream;
int format;
int deref_ref;
int recurse;
enum val_prettyprint pretty;
{ {
LONGEST val; LONGEST val;
unsigned int i = 0; /* Number of characters printed. */ unsigned int i = 0; /* Number of characters printed. */
@ -514,15 +497,9 @@ chill_val_print (type, valaddr, embedded_offset, address,
should not print, or zero if called from top level. */ should not print, or zero if called from top level. */
static void static void
chill_print_value_fields (type, valaddr, stream, format, recurse, pretty, chill_print_value_fields (struct type *type, char *valaddr,
dont_print) struct ui_file *stream, int format, int recurse,
struct type *type; enum val_prettyprint pretty, struct type **dont_print)
char *valaddr;
struct ui_file *stream;
int format;
int recurse;
enum val_prettyprint pretty;
struct type **dont_print;
{ {
int i, len; int i, len;
int fields_seen = 0; int fields_seen = 0;
@ -586,11 +563,8 @@ chill_print_value_fields (type, valaddr, stream, format, recurse, pretty,
} }
int int
chill_value_print (val, stream, format, pretty) chill_value_print (value_ptr val, struct ui_file *stream, int format,
value_ptr val; enum val_prettyprint pretty)
struct ui_file *stream;
int format;
enum val_prettyprint pretty;
{ {
struct type *type = VALUE_TYPE (val); struct type *type = VALUE_TYPE (val);
struct type *real_type = check_typedef (type); struct type *real_type = check_typedef (type);

View file

@ -102,18 +102,14 @@ static void out_field_fmt (struct ui_out *uiout, int fldno, char *fldname,
/* Mark beginning of a table */ /* Mark beginning of a table */
void void
cli_table_begin (uiout, nbrofcols, tblid) cli_table_begin (struct ui_out *uiout, int nbrofcols, char *tblid)
struct ui_out *uiout;
int nbrofcols;
char *tblid;
{ {
} }
/* Mark beginning of a table body */ /* Mark beginning of a table body */
void void
cli_table_body (uiout) cli_table_body (struct ui_out *uiout)
struct ui_out *uiout;
{ {
/* first, close the table header line */ /* first, close the table header line */
cli_text (uiout, "\n"); cli_text (uiout, "\n");
@ -122,19 +118,15 @@ cli_table_body (uiout)
/* Mark end of a table */ /* Mark end of a table */
void void
cli_table_end (uiout) cli_table_end (struct ui_out *uiout)
struct ui_out *uiout;
{ {
} }
/* Specify table header */ /* Specify table header */
void void
cli_table_header (uiout, width, alignment, colhdr) cli_table_header (struct ui_out *uiout, int width, enum ui_align alignment,
struct ui_out *uiout; char *colhdr)
int width;
enum ui_align alignment;
char *colhdr;
{ {
cli_field_string (uiout, 0, width, alignment, 0, colhdr); cli_field_string (uiout, 0, width, alignment, 0, colhdr);
} }
@ -142,32 +134,22 @@ cli_table_header (uiout, width, alignment, colhdr)
/* Mark beginning of a list */ /* Mark beginning of a list */
void void
cli_list_begin (uiout, list_flag, lstid) cli_list_begin (struct ui_out *uiout, int list_flag, char *lstid)
struct ui_out *uiout;
int list_flag;
char *lstid;
{ {
} }
/* Mark end of a list */ /* Mark end of a list */
void void
cli_list_end (uiout, list_flag) cli_list_end (struct ui_out *uiout, int list_flag)
struct ui_out *uiout;
int list_flag;
{ {
} }
/* output an int field */ /* output an int field */
void void
cli_field_int (uiout, fldno, width, alignment, fldname, value) cli_field_int (struct ui_out *uiout, int fldno, int width,
struct ui_out *uiout; enum ui_align alignment, char *fldname, int value)
int fldno;
int width;
enum ui_align alignment;
char *fldname;
int value;
{ {
char buffer[20]; /* FIXME: how many chars long a %d can become? */ char buffer[20]; /* FIXME: how many chars long a %d can become? */
@ -178,12 +160,8 @@ cli_field_int (uiout, fldno, width, alignment, fldname, value)
/* used to ommit a field */ /* used to ommit a field */
void void
cli_field_skip (uiout, fldno, width, alignment, fldname) cli_field_skip (struct ui_out *uiout, int fldno, int width,
struct ui_out *uiout; enum ui_align alignment, char *fldname)
int fldno;
int width;
enum ui_align alignment;
char *fldname;
{ {
cli_field_string (uiout, fldno, width, alignment, fldname, ""); cli_field_string (uiout, fldno, width, alignment, fldname, "");
} }
@ -251,18 +229,14 @@ cli_field_fmt (struct ui_out *uiout, int fldno,
} }
void void
cli_spaces (uiout, numspaces) cli_spaces (struct ui_out *uiout, int numspaces)
struct ui_out *uiout;
int numspaces;
{ {
struct ui_out_data *data = ui_out_data (uiout); struct ui_out_data *data = ui_out_data (uiout);
print_spaces_filtered (numspaces, data->stream); print_spaces_filtered (numspaces, data->stream);
} }
void void
cli_text (uiout, string) cli_text (struct ui_out *uiout, char *string)
struct ui_out *uiout;
char *string;
{ {
struct ui_out_data *data = ui_out_data (uiout); struct ui_out_data *data = ui_out_data (uiout);
fputs_filtered (string, data->stream); fputs_filtered (string, data->stream);
@ -277,16 +251,13 @@ cli_message (struct ui_out *uiout, int verbosity, char *format, va_list args)
} }
void void
cli_wrap_hint (uiout, identstring) cli_wrap_hint (struct ui_out *uiout, char *identstring)
struct ui_out *uiout;
char *identstring;
{ {
wrap_here (identstring); wrap_here (identstring);
} }
void void
cli_flush (uiout) cli_flush (struct ui_out *uiout)
struct ui_out *uiout;
{ {
struct ui_out_data *data = ui_out_data (uiout); struct ui_out_data *data = ui_out_data (uiout);
gdb_flush (data->stream); gdb_flush (data->stream);
@ -314,7 +285,7 @@ out_field_fmt (struct ui_out *uiout, int fldno, char *fldname,
/* access to ui_out format private members */ /* access to ui_out format private members */
static void static void
field_separator () field_separator (void)
{ {
struct ui_out_data *data = ui_out_data (uiout); struct ui_out_data *data = ui_out_data (uiout);
fputc_filtered (' ', data->stream); fputc_filtered (' ', data->stream);
@ -334,7 +305,7 @@ cli_out_new (struct ui_file *stream)
/* standard gdb initialization hook */ /* standard gdb initialization hook */
void void
_initialize_cli_out () _initialize_cli_out (void)
{ {
/* nothing needs to be done */ /* nothing needs to be done */
} }

View file

@ -48,10 +48,7 @@
*/ */
void void
coff_solib_add (arg_string, from_tty, target) coff_solib_add (char *arg_string, int from_tty, struct target_ops *target)
char *arg_string;
int from_tty;
struct target_ops *target;
{ {
asection *libsect; asection *libsect;
@ -126,7 +123,7 @@ coff_solib_add (arg_string, from_tty, target)
*/ */
void void
coff_solib_create_inferior_hook () coff_solib_create_inferior_hook (void)
{ {
coff_solib_add ((char *) 0, 0, (struct target_ops *) 0); coff_solib_add ((char *) 0, 0, (struct target_ops *) 0);
} }

View file

@ -260,10 +260,7 @@ static void coff_locate_sections (bfd *, asection *, PTR);
-kingdon). */ -kingdon). */
static void static void
coff_locate_sections (abfd, sectp, csip) coff_locate_sections (bfd *abfd, asection *sectp, PTR csip)
bfd *abfd;
asection *sectp;
PTR csip;
{ {
register struct coff_symfile_info *csi; register struct coff_symfile_info *csi;
const char *name; const char *name;
@ -324,10 +321,7 @@ struct find_targ_sec_arg
static void find_targ_sec (bfd *, asection *, void *); static void find_targ_sec (bfd *, asection *, void *);
static void static void
find_targ_sec (abfd, sect, obj) find_targ_sec (bfd *abfd, asection *sect, PTR obj)
bfd *abfd;
asection *sect;
PTR obj;
{ {
struct find_targ_sec_arg *args = (struct find_targ_sec_arg *) obj; struct find_targ_sec_arg *args = (struct find_targ_sec_arg *) obj;
if (sect->target_index == args->targ_index) if (sect->target_index == args->targ_index)
@ -336,9 +330,7 @@ find_targ_sec (abfd, sect, obj)
/* Return the section number (SECT_OFF_*) that CS points to. */ /* Return the section number (SECT_OFF_*) that CS points to. */
static int static int
cs_to_section (cs, objfile) cs_to_section (struct coff_symbol *cs, struct objfile *objfile)
struct coff_symbol *cs;
struct objfile *objfile;
{ {
asection *sect = NULL; asection *sect = NULL;
struct find_targ_sec_arg args; struct find_targ_sec_arg args;
@ -365,9 +357,7 @@ cs_to_section (cs, objfile)
static CORE_ADDR cs_section_address (struct coff_symbol *, bfd *); static CORE_ADDR cs_section_address (struct coff_symbol *, bfd *);
static CORE_ADDR static CORE_ADDR
cs_section_address (cs, abfd) cs_section_address (struct coff_symbol *cs, bfd *abfd)
struct coff_symbol *cs;
bfd *abfd;
{ {
asection *sect = NULL; asection *sect = NULL;
struct find_targ_sec_arg args; struct find_targ_sec_arg args;
@ -389,8 +379,7 @@ cs_section_address (cs, abfd)
or for associating a new type with the index. */ or for associating a new type with the index. */
static struct type ** static struct type **
coff_lookup_type (index) coff_lookup_type (register int index)
register int index;
{ {
if (index >= type_vector_length) if (index >= type_vector_length)
{ {
@ -414,8 +403,7 @@ coff_lookup_type (index)
This can create an empty (zeroed) type object. */ This can create an empty (zeroed) type object. */
static struct type * static struct type *
coff_alloc_type (index) coff_alloc_type (int index)
int index;
{ {
register struct type **type_addr = coff_lookup_type (index); register struct type **type_addr = coff_lookup_type (index);
register struct type *type = *type_addr; register struct type *type = *type_addr;
@ -436,8 +424,7 @@ coff_alloc_type (index)
it indicates the start of data for one original source file. */ it indicates the start of data for one original source file. */
static void static void
coff_start_symtab (name) coff_start_symtab (char *name)
char *name;
{ {
start_symtab ( start_symtab (
/* We fill in the filename later. start_symtab puts /* We fill in the filename later. start_symtab puts
@ -459,10 +446,7 @@ coff_start_symtab (name)
text address for the file, and SIZE is the number of bytes of text. */ text address for the file, and SIZE is the number of bytes of text. */
static void static void
complete_symtab (name, start_addr, size) complete_symtab (char *name, CORE_ADDR start_addr, unsigned int size)
char *name;
CORE_ADDR start_addr;
unsigned int size;
{ {
if (last_source_file != NULL) if (last_source_file != NULL)
free (last_source_file); free (last_source_file);
@ -484,8 +468,7 @@ complete_symtab (name, start_addr, size)
struct symtab for that file and put it in the list of all such. */ struct symtab for that file and put it in the list of all such. */
static void static void
coff_end_symtab (objfile) coff_end_symtab (struct objfile *objfile)
struct objfile *objfile;
{ {
struct symtab *symtab; struct symtab *symtab;
@ -501,11 +484,8 @@ coff_end_symtab (objfile)
} }
static void static void
record_minimal_symbol (name, address, type, objfile) record_minimal_symbol (char *name, CORE_ADDR address,
char *name; enum minimal_symbol_type type, struct objfile *objfile)
CORE_ADDR address;
enum minimal_symbol_type type;
struct objfile *objfile;
{ {
/* We don't want TDESC entry points in the minimal symbol table */ /* We don't want TDESC entry points in the minimal symbol table */
if (name[0] == '@') if (name[0] == '@')
@ -528,8 +508,7 @@ record_minimal_symbol (name, address, type, objfile)
The ultimate result is a new symtab (or, FIXME, eventually a psymtab). */ The ultimate result is a new symtab (or, FIXME, eventually a psymtab). */
static void static void
coff_symfile_init (objfile) coff_symfile_init (struct objfile *objfile)
struct objfile *objfile;
{ {
/* Allocate struct to keep track of stab reading. */ /* Allocate struct to keep track of stab reading. */
objfile->sym_stab_info = (struct dbx_symfile_info *) objfile->sym_stab_info = (struct dbx_symfile_info *)
@ -557,10 +536,7 @@ coff_symfile_init (objfile)
/* ARGSUSED */ /* ARGSUSED */
static void static void
find_linenos (abfd, asect, vpinfo) find_linenos (bfd *abfd, sec_ptr asect, PTR vpinfo)
bfd *abfd;
sec_ptr asect;
PTR vpinfo;
{ {
struct coff_symfile_info *info; struct coff_symfile_info *info;
int size, count; int size, count;
@ -597,9 +573,7 @@ static bfd *symfile_bfd;
/* ARGSUSED */ /* ARGSUSED */
static void static void
coff_symfile_read (objfile, mainline) coff_symfile_read (struct objfile *objfile, int mainline)
struct objfile *objfile;
int mainline;
{ {
struct coff_symfile_info *info; struct coff_symfile_info *info;
struct dbx_symfile_info *dbxinfo; struct dbx_symfile_info *dbxinfo;
@ -725,8 +699,7 @@ coff_symfile_read (objfile, mainline)
} }
static void static void
coff_new_init (ignore) coff_new_init (struct objfile *ignore)
struct objfile *ignore;
{ {
} }
@ -736,8 +709,7 @@ coff_new_init (ignore)
objfile struct from the global list of known objfiles. */ objfile struct from the global list of known objfiles. */
static void static void
coff_symfile_finish (objfile) coff_symfile_finish (struct objfile *objfile)
struct objfile *objfile;
{ {
if (objfile->sym_private != NULL) if (objfile->sym_private != NULL)
{ {
@ -755,10 +727,8 @@ coff_symfile_finish (objfile)
We read them one at a time using read_one_sym (). */ We read them one at a time using read_one_sym (). */
static void static void
coff_symtab_read (symtab_offset, nsyms, objfile) coff_symtab_read (long symtab_offset, unsigned int nsyms,
long symtab_offset; struct objfile *objfile)
unsigned int nsyms;
struct objfile *objfile;
{ {
register struct context_stack *new; register struct context_stack *new;
struct coff_symbol coff_symbol; struct coff_symbol coff_symbol;
@ -1169,10 +1139,9 @@ coff_symtab_read (symtab_offset, nsyms, objfile)
in internal_auxent form, and skip any other auxents. */ in internal_auxent form, and skip any other auxents. */
static void static void
read_one_sym (cs, sym, aux) read_one_sym (register struct coff_symbol *cs,
register struct coff_symbol *cs; register struct internal_syment *sym,
register struct internal_syment *sym; register union internal_auxent *aux)
register union internal_auxent *aux;
{ {
int i; int i;
@ -1239,9 +1208,7 @@ read_one_sym (cs, sym, aux)
static char *stringtab = NULL; static char *stringtab = NULL;
static int static int
init_stringtab (abfd, offset) init_stringtab (bfd *abfd, long offset)
bfd *abfd;
long offset;
{ {
long length; long length;
int val; int val;
@ -1280,7 +1247,7 @@ init_stringtab (abfd, offset)
} }
static void static void
free_stringtab () free_stringtab (void)
{ {
if (stringtab) if (stringtab)
free (stringtab); free (stringtab);
@ -1294,8 +1261,7 @@ free_stringtab_cleanup (void *ignore)
} }
static char * static char *
getsymname (symbol_entry) getsymname (struct internal_syment *symbol_entry)
struct internal_syment *symbol_entry;
{ {
static char buffer[SYMNMLEN + 1]; static char buffer[SYMNMLEN + 1];
char *result; char *result;
@ -1320,8 +1286,7 @@ getsymname (symbol_entry)
is only good for temporary use. */ is only good for temporary use. */
static char * static char *
coff_getfilename (aux_entry) coff_getfilename (union internal_auxent *aux_entry)
union internal_auxent *aux_entry;
{ {
static char buffer[BUFSIZ]; static char buffer[BUFSIZ];
register char *temp; register char *temp;
@ -1355,10 +1320,7 @@ static unsigned long linetab_size;
them into GDB's data structures. */ them into GDB's data structures. */
static int static int
init_lineno (abfd, offset, size) init_lineno (bfd *abfd, long offset, int size)
bfd *abfd;
long offset;
int size;
{ {
int val; int val;
@ -1387,7 +1349,7 @@ init_lineno (abfd, offset, size)
} }
static void static void
free_linetab () free_linetab (void)
{ {
if (linetab) if (linetab)
free (linetab); free (linetab);
@ -1405,11 +1367,8 @@ free_linetab_cleanup (void *ignore)
#endif #endif
static void static void
enter_linenos (file_offset, first_line, last_line, objfile) enter_linenos (long file_offset, register int first_line,
long file_offset; register int last_line, struct objfile *objfile)
register int first_line;
register int last_line;
struct objfile *objfile;
{ {
register char *rawptr; register char *rawptr;
struct internal_lineno lptr; struct internal_lineno lptr;
@ -1446,9 +1405,7 @@ enter_linenos (file_offset, first_line, last_line, objfile)
} }
static void static void
patch_type (type, real_type) patch_type (struct type *type, struct type *real_type)
struct type *type;
struct type *real_type;
{ {
register struct type *target = TYPE_TARGET_TYPE (type); register struct type *target = TYPE_TARGET_TYPE (type);
register struct type *real_target = TYPE_TARGET_TYPE (real_type); register struct type *real_target = TYPE_TARGET_TYPE (real_type);
@ -1472,8 +1429,7 @@ patch_type (type, real_type)
so that they can be used to print out opaque data structures properly. */ so that they can be used to print out opaque data structures properly. */
static void static void
patch_opaque_types (s) patch_opaque_types (struct symtab *s)
struct symtab *s;
{ {
register struct block *b; register struct block *b;
register int i; register int i;
@ -1534,10 +1490,9 @@ patch_opaque_types (s)
} }
static struct symbol * static struct symbol *
process_coff_symbol (cs, aux, objfile) process_coff_symbol (register struct coff_symbol *cs,
register struct coff_symbol *cs; register union internal_auxent *aux,
register union internal_auxent *aux; struct objfile *objfile)
struct objfile *objfile;
{ {
register struct symbol *sym register struct symbol *sym
= (struct symbol *) obstack_alloc (&objfile->symbol_obstack, = (struct symbol *) obstack_alloc (&objfile->symbol_obstack,
@ -1761,10 +1716,8 @@ process_coff_symbol (cs, aux, objfile)
/* Decode a coff type specifier; return the type that is meant. */ /* Decode a coff type specifier; return the type that is meant. */
static struct type * static struct type *
decode_type (cs, c_type, aux) decode_type (register struct coff_symbol *cs, unsigned int c_type,
register struct coff_symbol *cs; register union internal_auxent *aux)
unsigned int c_type;
register union internal_auxent *aux;
{ {
register struct type *type = 0; register struct type *type = 0;
unsigned int new_c_type; unsigned int new_c_type;
@ -1842,10 +1795,8 @@ decode_type (cs, c_type, aux)
return the type that the function returns. */ return the type that the function returns. */
static struct type * static struct type *
decode_function_type (cs, c_type, aux) decode_function_type (register struct coff_symbol *cs, unsigned int c_type,
register struct coff_symbol *cs; register union internal_auxent *aux)
unsigned int c_type;
register union internal_auxent *aux;
{ {
if (aux->x_sym.x_tagndx.l == 0) if (aux->x_sym.x_tagndx.l == 0)
cs->c_naux = 0; /* auxent refers to function, not base type */ cs->c_naux = 0; /* auxent refers to function, not base type */
@ -1856,10 +1807,8 @@ decode_function_type (cs, c_type, aux)
/* basic C types */ /* basic C types */
static struct type * static struct type *
decode_base_type (cs, c_type, aux) decode_base_type (register struct coff_symbol *cs, unsigned int c_type,
register struct coff_symbol *cs; register union internal_auxent *aux)
unsigned int c_type;
register union internal_auxent *aux;
{ {
struct type *type; struct type *type;
@ -2010,10 +1959,7 @@ decode_base_type (cs, c_type, aux)
object describing the type. */ object describing the type. */
static struct type * static struct type *
coff_read_struct_type (index, length, lastsym) coff_read_struct_type (int index, int length, int lastsym)
int index;
int length;
int lastsym;
{ {
struct nextfield struct nextfield
{ {
@ -2108,10 +2054,7 @@ coff_read_struct_type (index, length, lastsym)
/* ARGSUSED */ /* ARGSUSED */
static struct type * static struct type *
coff_read_enum_type (index, length, lastsym) coff_read_enum_type (int index, int length, int lastsym)
int index;
int length;
int lastsym;
{ {
register struct symbol *sym; register struct symbol *sym;
register struct type *type; register struct type *type;
@ -2228,7 +2171,7 @@ static struct sym_fns coff_sym_fns =
}; };
void void
_initialize_coffread () _initialize_coffread (void)
{ {
add_symtab_fns (&coff_sym_fns); add_symtab_fns (&coff_sym_fns);
} }

View file

@ -145,9 +145,7 @@ add_cmd (name, class, fun, doc, list)
Returns a pointer to the deprecated command. */ Returns a pointer to the deprecated command. */
struct cmd_list_element * struct cmd_list_element *
deprecate_cmd (cmd, replacement) deprecate_cmd (struct cmd_list_element *cmd, char *replacement)
struct cmd_list_element *cmd;
char *replacement;
{ {
cmd->flags |= (CMD_DEPRECATED | DEPRECATED_WARN_USER); cmd->flags |= (CMD_DEPRECATED | DEPRECATED_WARN_USER);
@ -182,12 +180,8 @@ add_abbrev_cmd (name, class, fun, doc, list)
#endif #endif
struct cmd_list_element * struct cmd_list_element *
add_alias_cmd (name, oldname, class, abbrev_flag, list) add_alias_cmd (char *name, char *oldname, enum command_class class,
char *name; int abbrev_flag, struct cmd_list_element **list)
char *oldname;
enum command_class class;
int abbrev_flag;
struct cmd_list_element **list;
{ {
/* Must do this since lookup_cmd tries to side-effect its first arg */ /* Must do this since lookup_cmd tries to side-effect its first arg */
char *copied_name; char *copied_name;
@ -260,9 +254,7 @@ add_abbrev_prefix_cmd (name, class, fun, doc, prefixlist, prefixname,
/* This is an empty "cfunc". */ /* This is an empty "cfunc". */
void void
not_just_help_class_command (args, from_tty) not_just_help_class_command (char *args, int from_tty)
char *args;
int from_tty;
{ {
} }
@ -270,10 +262,7 @@ not_just_help_class_command (args, from_tty)
static void empty_sfunc (char *, int, struct cmd_list_element *); static void empty_sfunc (char *, int, struct cmd_list_element *);
static void static void
empty_sfunc (args, from_tty, c) empty_sfunc (char *args, int from_tty, struct cmd_list_element *c)
char *args;
int from_tty;
struct cmd_list_element *c;
{ {
} }
@ -350,9 +339,8 @@ add_set_auto_boolean_cmd (char *name,
command to LIST and return a pointer to the added command (not command to LIST and return a pointer to the added command (not
necessarily the head of LIST). */ necessarily the head of LIST). */
struct cmd_list_element * struct cmd_list_element *
add_show_from_set (setcmd, list) add_show_from_set (struct cmd_list_element *setcmd,
struct cmd_list_element *setcmd; struct cmd_list_element **list)
struct cmd_list_element **list;
{ {
struct cmd_list_element *showcmd = struct cmd_list_element *showcmd =
(struct cmd_list_element *) xmalloc (sizeof (struct cmd_list_element)); (struct cmd_list_element *) xmalloc (sizeof (struct cmd_list_element));
@ -391,9 +379,7 @@ add_show_from_set (setcmd, list)
/* Remove the command named NAME from the command list. */ /* Remove the command named NAME from the command list. */
void void
delete_cmd (name, list) delete_cmd (char *name, struct cmd_list_element **list)
char *name;
struct cmd_list_element **list;
{ {
register struct cmd_list_element *c; register struct cmd_list_element *c;
struct cmd_list_element *p; struct cmd_list_element *p;
@ -516,9 +502,7 @@ apropos_command (char *searchstr, int from_tty)
*/ */
void void
help_cmd (command, stream) help_cmd (char *command, struct ui_file *stream)
char *command;
struct ui_file *stream;
{ {
struct cmd_list_element *c; struct cmd_list_element *c;
extern struct cmd_list_element *cmdlist; extern struct cmd_list_element *cmdlist;
@ -585,11 +569,8 @@ help_cmd (command, stream)
* If you call this routine with a class >= 0, it recurses. * If you call this routine with a class >= 0, it recurses.
*/ */
void void
help_list (list, cmdtype, class, stream) help_list (struct cmd_list_element *list, char *cmdtype,
struct cmd_list_element *list; enum command_class class, struct ui_file *stream)
char *cmdtype;
enum command_class class;
struct ui_file *stream;
{ {
int len; int len;
char *cmdtype1, *cmdtype2; char *cmdtype1, *cmdtype2;
@ -649,9 +630,7 @@ help_all (struct ui_file *stream)
/* Print only the first line of STR on STREAM. */ /* Print only the first line of STR on STREAM. */
static void static void
print_doc_line (stream, str) print_doc_line (struct ui_file *stream, char *str)
struct ui_file *stream;
char *str;
{ {
static char *line_buffer = 0; static char *line_buffer = 0;
static int line_size; static int line_size;
@ -700,12 +679,8 @@ print_doc_line (stream, str)
* is at the low level, not the high-level). * is at the low level, not the high-level).
*/ */
void void
help_cmd_list (list, class, prefix, recurse, stream) help_cmd_list (struct cmd_list_element *list, enum command_class class,
struct cmd_list_element *list; char *prefix, int recurse, struct ui_file *stream)
enum command_class class;
char *prefix;
int recurse;
struct ui_file *stream;
{ {
register struct cmd_list_element *c; register struct cmd_list_element *c;
@ -733,12 +708,8 @@ help_cmd_list (list, class, prefix, recurse, stream)
found in nfound */ found in nfound */
static struct cmd_list_element * static struct cmd_list_element *
find_cmd (command, len, clist, ignore_help_classes, nfound) find_cmd (char *command, int len, struct cmd_list_element *clist,
char *command; int ignore_help_classes, int *nfound)
int len;
struct cmd_list_element *clist;
int ignore_help_classes;
int *nfound;
{ {
struct cmd_list_element *found, *c; struct cmd_list_element *found, *c;
@ -796,10 +767,8 @@ find_cmd (command, len, clist, ignore_help_classes, nfound)
the struct cmd_list_element is NULL). */ the struct cmd_list_element is NULL). */
struct cmd_list_element * struct cmd_list_element *
lookup_cmd_1 (text, clist, result_list, ignore_help_classes) lookup_cmd_1 (char **text, struct cmd_list_element *clist,
char **text; struct cmd_list_element **result_list, int ignore_help_classes)
struct cmd_list_element *clist, **result_list;
int ignore_help_classes;
{ {
char *p, *command; char *p, *command;
int len, tmp, nfound; int len, tmp, nfound;
@ -931,8 +900,7 @@ lookup_cmd_1 (text, clist, result_list, ignore_help_classes)
/* All this hair to move the space to the front of cmdtype */ /* All this hair to move the space to the front of cmdtype */
static void static void
undef_cmd_error (cmdtype, q) undef_cmd_error (char *cmdtype, char *q)
char *cmdtype, *q;
{ {
error ("Undefined %scommand: \"%s\". Try \"help%s%.*s\".", error ("Undefined %scommand: \"%s\". Try \"help%s%.*s\".",
cmdtype, cmdtype,
@ -957,12 +925,8 @@ undef_cmd_error (cmdtype, q)
the function field of the struct cmd_list_element is 0). */ the function field of the struct cmd_list_element is 0). */
struct cmd_list_element * struct cmd_list_element *
lookup_cmd (line, list, cmdtype, allow_unknown, ignore_help_classes) lookup_cmd (char **line, struct cmd_list_element *list, char *cmdtype,
char **line; int allow_unknown, int ignore_help_classes)
struct cmd_list_element *list;
char *cmdtype;
int allow_unknown;
int ignore_help_classes;
{ {
struct cmd_list_element *last_list = 0; struct cmd_list_element *last_list = 0;
struct cmd_list_element *c = struct cmd_list_element *c =
@ -1279,11 +1243,8 @@ lookup_cmd_composition (char *text,
CMDTYPE precedes the word "command" in the error message. */ CMDTYPE precedes the word "command" in the error message. */
struct cmd_list_element * struct cmd_list_element *
lookup_cmd (line, list, cmdtype, allow_unknown) lookup_cmd (char **line, struct cmd_list_element *list, char *cmdtype,
char **line; int allow_unknown)
struct cmd_list_element *list;
char *cmdtype;
int allow_unknown;
{ {
register char *p; register char *p;
register struct cmd_list_element *c, *found; register struct cmd_list_element *c, *found;
@ -1415,10 +1376,7 @@ lookup_cmd (line, list, cmdtype, allow_unknown)
"oobar"; if WORD is "baz/foo", return "baz/foobar". */ "oobar"; if WORD is "baz/foo", return "baz/foobar". */
char ** char **
complete_on_cmdlist (list, text, word) complete_on_cmdlist (struct cmd_list_element *list, char *text, char *word)
struct cmd_list_element *list;
char *text;
char *word;
{ {
struct cmd_list_element *ptr; struct cmd_list_element *ptr;
char **matchlist; char **matchlist;
@ -1576,8 +1534,7 @@ parse_auto_binary_operation (const char *arg)
} }
static int static int
parse_binary_operation (arg) parse_binary_operation (char *arg)
char *arg;
{ {
int length; int length;
@ -1611,10 +1568,7 @@ parse_binary_operation (arg)
directly by the user (i.e. these are just like any other directly by the user (i.e. these are just like any other
command). C is the command list element for the command. */ command). C is the command list element for the command. */
void void
do_setshow_command (arg, from_tty, c) do_setshow_command (char *arg, int from_tty, struct cmd_list_element *c)
char *arg;
int from_tty;
struct cmd_list_element *c;
{ {
if (c->type == set_cmd) if (c->type == set_cmd)
{ {
@ -1932,10 +1886,7 @@ do_setshow_command (arg, from_tty, c)
/* Show all the settings in a list of show commands. */ /* Show all the settings in a list of show commands. */
void void
cmd_show_list (list, from_tty, prefix) cmd_show_list (struct cmd_list_element *list, int from_tty, char *prefix)
struct cmd_list_element *list;
int from_tty;
char *prefix;
{ {
#ifdef UI_OUT #ifdef UI_OUT
ui_out_list_begin (uiout, "showlist"); ui_out_list_begin (uiout, "showlist");
@ -1980,9 +1931,7 @@ cmd_show_list (list, from_tty, prefix)
/* ARGSUSED */ /* ARGSUSED */
static void static void
shell_escape (arg, from_tty) shell_escape (char *arg, int from_tty)
char *arg;
int from_tty;
{ {
#ifdef CANT_FORK #ifdef CANT_FORK
/* If ARG is NULL, they want an inferior shell, but `system' just /* If ARG is NULL, they want an inferior shell, but `system' just
@ -2043,9 +1992,7 @@ shell_escape (arg, from_tty)
} }
static void static void
make_command (arg, from_tty) make_command (char *arg, int from_tty)
char *arg;
int from_tty;
{ {
char *p; char *p;
@ -2062,9 +2009,7 @@ make_command (arg, from_tty)
} }
static void static void
show_user_1 (c, stream) show_user_1 (struct cmd_list_element *c, struct ui_file *stream)
struct cmd_list_element *c;
struct ui_file *stream;
{ {
register struct command_line *cmdlines; register struct command_line *cmdlines;
@ -2090,9 +2035,7 @@ show_user_1 (c, stream)
/* ARGSUSED */ /* ARGSUSED */
static void static void
show_user (args, from_tty) show_user (char *args, int from_tty)
char *args;
int from_tty;
{ {
struct cmd_list_element *c; struct cmd_list_element *c;
extern struct cmd_list_element *cmdlist; extern struct cmd_list_element *cmdlist;
@ -2115,7 +2058,7 @@ show_user (args, from_tty)
} }
void void
_initialize_command () _initialize_command (void)
{ {
add_com ("shell", class_support, shell_escape, add_com ("shell", class_support, shell_escape,
"Execute the rest of the line as a shell command. \n\ "Execute the rest of the line as a shell command. \n\

View file

@ -124,9 +124,7 @@ complain (struct complaint *complaint,...)
context for the user to figure it out. */ context for the user to figure it out. */
void void
clear_complaints (sym_reading, noisy) clear_complaints (int sym_reading, int noisy)
int sym_reading;
int noisy;
{ {
struct complaint *p; struct complaint *p;
@ -145,7 +143,7 @@ clear_complaints (sym_reading, noisy)
} }
void void
_initialize_complaints () _initialize_complaints (void)
{ {
add_show_from_set add_show_from_set
(add_set_cmd ("complaints", class_support, var_zinteger, (add_set_cmd ("complaints", class_support, var_zinteger,

View file

@ -13,9 +13,7 @@ void _initialize_copying (void);
extern int immediate_quit; extern int immediate_quit;
static void static void
show_copying_command (ignore, from_tty) show_copying_command (char *ignore, int from_tty)
char *ignore;
int from_tty;
{ {
immediate_quit++; immediate_quit++;
printf_filtered (" GNU GENERAL PUBLIC LICENSE\n"); printf_filtered (" GNU GENERAL PUBLIC LICENSE\n");
@ -279,9 +277,7 @@ show_copying_command (ignore, from_tty)
} }
static void static void
show_warranty_command (ignore, from_tty) show_warranty_command (char *ignore, int from_tty)
char *ignore;
int from_tty;
{ {
immediate_quit++; immediate_quit++;
printf_filtered (" NO WARRANTY\n"); printf_filtered (" NO WARRANTY\n");
@ -310,7 +306,7 @@ show_warranty_command (ignore, from_tty)
} }
void void
_initialize_copying () _initialize_copying (void)
{ {
add_cmd ("copying", no_class, show_copying_command, add_cmd ("copying", no_class, show_copying_command,
"Conditions for redistributing copies of GDB.", "Conditions for redistributing copies of GDB.",

View file

@ -73,11 +73,8 @@ void _initialize_core_aout (void);
*/ */
static void static void
fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr) fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, int which,
char *core_reg_sect; CORE_ADDR reg_addr)
unsigned core_reg_size;
int which;
CORE_ADDR reg_addr;
{ {
int regno; int regno;
CORE_ADDR addr; CORE_ADDR addr;
@ -115,9 +112,7 @@ fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
BLOCKEND is the address of the end of the user structure. */ BLOCKEND is the address of the end of the user structure. */
CORE_ADDR CORE_ADDR
register_addr (regno, blockend) register_addr (int regno, CORE_ADDR blockend)
int regno;
CORE_ADDR blockend;
{ {
CORE_ADDR addr; CORE_ADDR addr;
@ -144,7 +139,7 @@ static struct core_fns aout_core_fns =
}; };
void void
_initialize_core_aout () _initialize_core_aout (void)
{ {
add_core_fns (&aout_core_fns); add_core_fns (&aout_core_fns);
} }

View file

@ -133,7 +133,7 @@ static struct core_fns regset_core_fns =
}; };
void void
_initialize_core_regset () _initialize_core_regset (void)
{ {
add_core_fns (&regset_core_fns); add_core_fns (&regset_core_fns);
} }

View file

@ -133,7 +133,7 @@ static struct core_fns solaris_core_fns =
}; };
void void
_initialize_core_solaris () _initialize_core_solaris (void)
{ {
add_core_fns (&solaris_core_fns); add_core_fns (&solaris_core_fns);
} }

View file

@ -65,9 +65,7 @@ bfd *core_bfd = NULL;
/* Backward compatability with old way of specifying core files. */ /* Backward compatability with old way of specifying core files. */
void void
core_file_command (filename, from_tty) core_file_command (char *filename, int from_tty)
char *filename;
int from_tty;
{ {
struct target_ops *t; struct target_ops *t;
@ -110,8 +108,7 @@ core_file_command (filename, from_tty)
* this function will call all of the hook functions. */ * this function will call all of the hook functions. */
static void static void
call_extra_exec_file_hooks (filename) call_extra_exec_file_hooks (char *filename)
char *filename;
{ {
int i; int i;
@ -160,7 +157,7 @@ specify_exec_file_hook (hook)
be reopened. */ be reopened. */
void void
close_exec_file () close_exec_file (void)
{ {
#if 0 /* FIXME */ #if 0 /* FIXME */
if (exec_bfd) if (exec_bfd)
@ -169,7 +166,7 @@ close_exec_file ()
} }
void void
reopen_exec_file () reopen_exec_file (void)
{ {
#if 0 /* FIXME */ #if 0 /* FIXME */
if (exec_bfd) if (exec_bfd)
@ -199,7 +196,7 @@ reopen_exec_file ()
print a warning if they don't go together. */ print a warning if they don't go together. */
void void
validate_files () validate_files (void)
{ {
if (exec_bfd && core_bfd) if (exec_bfd && core_bfd)
{ {
@ -215,8 +212,7 @@ validate_files ()
otherwise return 0 in that case. */ otherwise return 0 in that case. */
char * char *
get_exec_file (err) get_exec_file (int err)
int err;
{ {
if (exec_bfd) if (exec_bfd)
return bfd_get_filename (exec_bfd); return bfd_get_filename (exec_bfd);
@ -232,9 +228,7 @@ Use the \"file\" or \"exec-file\" command.");
/* Report a memory error with error(). */ /* Report a memory error with error(). */
void void
memory_error (status, memaddr) memory_error (int status, CORE_ADDR memaddr)
int status;
CORE_ADDR memaddr;
{ {
struct ui_file *tmp_stream = mem_fileopen (); struct ui_file *tmp_stream = mem_fileopen ();
make_cleanup_ui_file_delete (tmp_stream); make_cleanup_ui_file_delete (tmp_stream);
@ -259,10 +253,7 @@ memory_error (status, memaddr)
/* Same as target_read_memory, but report an error if can't read. */ /* Same as target_read_memory, but report an error if can't read. */
void void
read_memory (memaddr, myaddr, len) read_memory (CORE_ADDR memaddr, char *myaddr, int len)
CORE_ADDR memaddr;
char *myaddr;
int len;
{ {
int status; int status;
status = target_read_memory (memaddr, myaddr, len); status = target_read_memory (memaddr, myaddr, len);
@ -272,40 +263,29 @@ read_memory (memaddr, myaddr, len)
/* Like target_read_memory, but slightly different parameters. */ /* Like target_read_memory, but slightly different parameters. */
int int
dis_asm_read_memory (memaddr, myaddr, len, info) dis_asm_read_memory (bfd_vma memaddr, bfd_byte *myaddr, unsigned int len,
bfd_vma memaddr; disassemble_info *info)
bfd_byte *myaddr;
unsigned int len;
disassemble_info *info;
{ {
return target_read_memory (memaddr, (char *) myaddr, len); return target_read_memory (memaddr, (char *) myaddr, len);
} }
/* Like memory_error with slightly different parameters. */ /* Like memory_error with slightly different parameters. */
void void
dis_asm_memory_error (status, memaddr, info) dis_asm_memory_error (int status, bfd_vma memaddr, disassemble_info *info)
int status;
bfd_vma memaddr;
disassemble_info *info;
{ {
memory_error (status, memaddr); memory_error (status, memaddr);
} }
/* Like print_address with slightly different parameters. */ /* Like print_address with slightly different parameters. */
void void
dis_asm_print_address (addr, info) dis_asm_print_address (bfd_vma addr, struct disassemble_info *info)
bfd_vma addr;
struct disassemble_info *info;
{ {
print_address (addr, info->stream); print_address (addr, info->stream);
} }
/* Same as target_write_memory, but report an error if can't write. */ /* Same as target_write_memory, but report an error if can't write. */
void void
write_memory (memaddr, myaddr, len) write_memory (CORE_ADDR memaddr, char *myaddr, int len)
CORE_ADDR memaddr;
char *myaddr;
int len;
{ {
int status; int status;
@ -317,9 +297,7 @@ write_memory (memaddr, myaddr, len)
/* Read an integer from debugged memory, given address and number of bytes. */ /* Read an integer from debugged memory, given address and number of bytes. */
LONGEST LONGEST
read_memory_integer (memaddr, len) read_memory_integer (CORE_ADDR memaddr, int len)
CORE_ADDR memaddr;
int len;
{ {
char buf[sizeof (LONGEST)]; char buf[sizeof (LONGEST)];
@ -328,9 +306,7 @@ read_memory_integer (memaddr, len)
} }
ULONGEST ULONGEST
read_memory_unsigned_integer (memaddr, len) read_memory_unsigned_integer (CORE_ADDR memaddr, int len)
CORE_ADDR memaddr;
int len;
{ {
char buf[sizeof (ULONGEST)]; char buf[sizeof (ULONGEST)];
@ -339,10 +315,7 @@ read_memory_unsigned_integer (memaddr, len)
} }
void void
read_memory_string (memaddr, buffer, max_len) read_memory_string (CORE_ADDR memaddr, char *buffer, int max_len)
CORE_ADDR memaddr;
char *buffer;
int max_len;
{ {
register char *cp; register char *cp;
register int i; register int i;
@ -419,10 +392,7 @@ static char *gnutarget_string;
static void set_gnutarget_command (char *, int, struct cmd_list_element *); static void set_gnutarget_command (char *, int, struct cmd_list_element *);
static void static void
set_gnutarget_command (ignore, from_tty, c) set_gnutarget_command (char *ignore, int from_tty, struct cmd_list_element *c)
char *ignore;
int from_tty;
struct cmd_list_element *c;
{ {
if (STREQ (gnutarget_string, "auto")) if (STREQ (gnutarget_string, "auto"))
gnutarget = NULL; gnutarget = NULL;
@ -432,8 +402,7 @@ set_gnutarget_command (ignore, from_tty, c)
/* Set the gnutarget. */ /* Set the gnutarget. */
void void
set_gnutarget (newtarget) set_gnutarget (char *newtarget)
char *newtarget;
{ {
if (gnutarget_string != NULL) if (gnutarget_string != NULL)
free (gnutarget_string); free (gnutarget_string);
@ -442,7 +411,7 @@ set_gnutarget (newtarget)
} }
void void
_initialize_core () _initialize_core (void)
{ {
struct cmd_list_element *c; struct cmd_list_element *c;
c = add_cmd ("core-file", class_files, core_file_command, c = add_cmd ("core-file", class_files, core_file_command,

View file

@ -84,8 +84,7 @@ struct target_ops core_ops;
handle. */ handle. */
void void
add_core_fns (cf) add_core_fns (struct core_fns *cf)
struct core_fns *cf;
{ {
cf->next = core_file_fns; cf->next = core_file_fns;
core_file_fns = cf; core_file_fns = cf;
@ -96,9 +95,7 @@ add_core_fns (cf)
reading the core file. */ reading the core file. */
int int
default_core_sniffer (our_fns, abfd) default_core_sniffer (struct core_fns *our_fns, bfd *abfd)
struct core_fns *our_fns;
bfd *abfd;
{ {
int result; int result;
@ -112,8 +109,7 @@ default_core_sniffer (our_fns, abfd)
selected. */ selected. */
static struct core_fns * static struct core_fns *
sniff_core_bfd (abfd) sniff_core_bfd (bfd *abfd)
bfd *abfd;
{ {
struct core_fns *cf; struct core_fns *cf;
struct core_fns *yummy = NULL; struct core_fns *yummy = NULL;
@ -149,8 +145,7 @@ sniff_core_bfd (abfd)
core file handler that recognizes it. */ core file handler that recognizes it. */
int int
default_check_format (abfd) default_check_format (bfd *abfd)
bfd *abfd;
{ {
return (0); return (0);
} }
@ -158,8 +153,7 @@ default_check_format (abfd)
/* Attempt to recognize core file formats that BFD rejects. */ /* Attempt to recognize core file formats that BFD rejects. */
static boolean static boolean
gdb_check_format (abfd) gdb_check_format (bfd *abfd)
bfd *abfd;
{ {
struct core_fns *cf; struct core_fns *cf;
@ -178,8 +172,7 @@ gdb_check_format (abfd)
/* ARGSUSED */ /* ARGSUSED */
static void static void
core_close (quitting) core_close (int quitting)
int quitting;
{ {
char *name; char *name;
@ -220,8 +213,7 @@ core_close_cleanup (void *ignore)
is really an int * which points to from_tty. */ is really an int * which points to from_tty. */
static int static int
solib_add_stub (from_ttyp) solib_add_stub (PTR from_ttyp)
PTR from_ttyp;
{ {
SOLIB_ADD (NULL, *(int *) from_ttyp, &current_target); SOLIB_ADD (NULL, *(int *) from_ttyp, &current_target);
re_enable_breakpoints_in_shlibs (); re_enable_breakpoints_in_shlibs ();
@ -233,10 +225,7 @@ solib_add_stub (from_ttyp)
list of threads in a core file. */ list of threads in a core file. */
static void static void
add_to_thread_list (abfd, asect, reg_sect_arg) add_to_thread_list (bfd *abfd, asection *asect, PTR reg_sect_arg)
bfd *abfd;
asection *asect;
PTR reg_sect_arg;
{ {
int thread_id; int thread_id;
asection *reg_sect = (asection *) reg_sect_arg; asection *reg_sect = (asection *) reg_sect_arg;
@ -258,9 +247,7 @@ add_to_thread_list (abfd, asect, reg_sect_arg)
/* This routine opens and sets up the core file bfd. */ /* This routine opens and sets up the core file bfd. */
static void static void
core_open (filename, from_tty) core_open (char *filename, int from_tty)
char *filename;
int from_tty;
{ {
const char *p; const char *p;
int siggy; int siggy;
@ -375,9 +362,7 @@ your %s; do ``info files''", target_longname);
} }
static void static void
core_detach (args, from_tty) core_detach (char *args, int from_tty)
char *args;
int from_tty;
{ {
if (args) if (args)
error ("Too many arguments"); error ("Too many arguments");
@ -451,8 +436,7 @@ get_core_register_section (char *name,
/* ARGSUSED */ /* ARGSUSED */
static void static void
get_core_registers (regno) get_core_registers (int regno)
int regno;
{ {
int status; int status;
@ -472,8 +456,7 @@ get_core_registers (regno)
} }
static char * static char *
core_file_to_sym_file (core) core_file_to_sym_file (char *core)
char *core;
{ {
CONST char *failing_command; CONST char *failing_command;
char *p; char *p;
@ -535,8 +518,7 @@ core_file_to_sym_file (core)
} }
static void static void
core_files_info (t) core_files_info (struct target_ops *t)
struct target_ops *t;
{ {
print_section_info (t, core_bfd); print_section_info (t, core_bfd);
} }
@ -545,9 +527,7 @@ core_files_info (t)
`gdb internal error' (since generic_mourn calls breakpoint_init_inferior). */ `gdb internal error' (since generic_mourn calls breakpoint_init_inferior). */
static int static int
ignore (addr, contents) ignore (CORE_ADDR addr, char *contents)
CORE_ADDR addr;
char *contents;
{ {
return 0; return 0;
} }
@ -560,8 +540,7 @@ ignore (addr, contents)
behaviour. behaviour.
*/ */
static int static int
core_file_thread_alive (tid) core_file_thread_alive (int tid)
int tid;
{ {
return 1; return 1;
} }
@ -569,7 +548,7 @@ core_file_thread_alive (tid)
/* Fill in core_ops with its defined operations and properties. */ /* Fill in core_ops with its defined operations and properties. */
static void static void
init_core_ops () init_core_ops (void)
{ {
core_ops.to_shortname = "core"; core_ops.to_shortname = "core";
core_ops.to_longname = "Local core dump file"; core_ops.to_longname = "Local core dump file";
@ -606,7 +585,7 @@ init_core_ops ()
int coreops_suppress_target; int coreops_suppress_target;
void void
_initialize_corelow () _initialize_corelow (void)
{ {
init_core_ops (); init_core_ops ();

View file

@ -63,10 +63,7 @@ static void cp_print_hpacc_virtual_table_entries (struct type *, int *,
void void
cp_print_class_method (valaddr, type, stream) cp_print_class_method (char *valaddr, struct type *type, struct ui_file *stream)
char *valaddr;
struct type *type;
struct ui_file *stream;
{ {
struct type *domain; struct type *domain;
struct fn_field *f = NULL; struct fn_field *f = NULL;
@ -184,8 +181,7 @@ const char hpacc_vtbl_ptr_type_name[] =
"pointer to virtual function". */ "pointer to virtual function". */
int int
cp_is_vtbl_ptr_type (type) cp_is_vtbl_ptr_type (struct type *type)
struct type *type;
{ {
char *typename = type_name_no_tag (type); char *typename = type_name_no_tag (type);
@ -198,8 +194,7 @@ cp_is_vtbl_ptr_type (type)
"pointer to virtual function table". */ "pointer to virtual function table". */
int int
cp_is_vtbl_member (type) cp_is_vtbl_member (struct type *type)
struct type *type;
{ {
if (TYPE_CODE (type) == TYPE_CODE_PTR) if (TYPE_CODE (type) == TYPE_CODE_PTR)
{ {
@ -232,19 +227,10 @@ cp_is_vtbl_member (type)
should not print, or zero if called from top level. */ should not print, or zero if called from top level. */
void void
cp_print_value_fields (type, real_type, valaddr, offset, address, stream, format, recurse, pretty, cp_print_value_fields (struct type *type, struct type *real_type, char *valaddr,
dont_print_vb, dont_print_statmem) int offset, CORE_ADDR address, struct ui_file *stream,
struct type *type; int format, int recurse, enum val_prettyprint pretty,
struct type *real_type; struct type **dont_print_vb, int dont_print_statmem)
char *valaddr;
int offset;
CORE_ADDR address;
struct ui_file *stream;
int format;
int recurse;
enum val_prettyprint pretty;
struct type **dont_print_vb;
int dont_print_statmem;
{ {
int i, len, n_baseclasses; int i, len, n_baseclasses;
struct obstack tmp_obstack; struct obstack tmp_obstack;
@ -495,18 +481,10 @@ cp_print_value_fields (type, real_type, valaddr, offset, address, stream, format
baseclasses. */ baseclasses. */
static void static void
cp_print_value (type, real_type, valaddr, offset, address, stream, format, recurse, pretty, cp_print_value (struct type *type, struct type *real_type, char *valaddr,
dont_print_vb) int offset, CORE_ADDR address, struct ui_file *stream,
struct type *type; int format, int recurse, enum val_prettyprint pretty,
struct type *real_type; struct type **dont_print_vb)
char *valaddr;
int offset;
CORE_ADDR address;
struct ui_file *stream;
int format;
int recurse;
enum val_prettyprint pretty;
struct type **dont_print_vb;
{ {
struct obstack tmp_obstack; struct obstack tmp_obstack;
struct type **last_dont_print struct type **last_dont_print
@ -627,13 +605,8 @@ cp_print_value (type, real_type, valaddr, offset, address, stream, format, recur
have the same meanings as in c_val_print. */ have the same meanings as in c_val_print. */
static void static void
cp_print_static_field (type, val, stream, format, recurse, pretty) cp_print_static_field (struct type *type, value_ptr val, struct ui_file *stream,
struct type *type; int format, int recurse, enum val_prettyprint pretty)
value_ptr val;
struct ui_file *stream;
int format;
int recurse;
enum val_prettyprint pretty;
{ {
if (TYPE_CODE (type) == TYPE_CODE_STRUCT) if (TYPE_CODE (type) == TYPE_CODE_STRUCT)
{ {
@ -668,11 +641,8 @@ cp_print_static_field (type, val, stream, format, recurse, pretty)
} }
void void
cp_print_class_member (valaddr, domain, stream, prefix) cp_print_class_member (char *valaddr, struct type *domain,
char *valaddr; struct ui_file *stream, char *prefix)
struct type *domain;
struct ui_file *stream;
char *prefix;
{ {
/* VAL is a byte offset into the structure type DOMAIN. /* VAL is a byte offset into the structure type DOMAIN.
@ -746,14 +716,10 @@ cp_print_class_member (valaddr, domain, stream, prefix)
static void static void
cp_print_hpacc_virtual_table_entries (type, vfuncs, v, stream, format, recurse, pretty) cp_print_hpacc_virtual_table_entries (struct type *type, int *vfuncs,
struct type *type; value_ptr v, struct ui_file *stream,
int *vfuncs; int format, int recurse,
value_ptr v; enum val_prettyprint pretty)
struct ui_file *stream;
int format;
int recurse;
enum val_prettyprint pretty;
{ {
int fn, oi; int fn, oi;
@ -798,7 +764,7 @@ cp_print_hpacc_virtual_table_entries (type, vfuncs, v, stream, format, recurse,
void void
_initialize_cp_valprint () _initialize_cp_valprint (void)
{ {
add_show_from_set add_show_from_set
(add_set_cmd ("static-members", class_support, var_boolean, (add_set_cmd ("static-members", class_support, var_boolean,

View file

@ -29,11 +29,7 @@
static void cpu32bug_open (char *args, int from_tty); static void cpu32bug_open (char *args, int from_tty);
static void static void
cpu32bug_supply_register (regname, regnamelen, val, vallen) cpu32bug_supply_register (char *regname, int regnamelen, char *val, int vallen)
char *regname;
int regnamelen;
char *val;
int vallen;
{ {
int regno; int regno;
@ -146,15 +142,13 @@ init_cpu32bug_cmds (void)
}; /* init_cpu32bug_cmds */ }; /* init_cpu32bug_cmds */
static void static void
cpu32bug_open (args, from_tty) cpu32bug_open (char *args, int from_tty)
char *args;
int from_tty;
{ {
monitor_open (args, &cpu32bug_cmds, from_tty); monitor_open (args, &cpu32bug_cmds, from_tty);
} }
void void
_initialize_cpu32bug_rom () _initialize_cpu32bug_rom (void)
{ {
init_cpu32bug_cmds (); init_cpu32bug_cmds ();
init_monitor_ops (&cpu32bug_ops); init_monitor_ops (&cpu32bug_ops);

View file

@ -139,8 +139,7 @@ fetch_inferior_registers (regno)
Otherwise, REGNO specifies which register (so we can save time). */ Otherwise, REGNO specifies which register (so we can save time). */
void void
store_inferior_registers (regno) store_inferior_registers (int regno)
int regno;
{ {
register unsigned int regaddr; register unsigned int regaddr;
char buf[80]; char buf[80];
@ -249,8 +248,7 @@ store_inferior_registers (regno)
/* blockend is the address of the end of the user structure */ /* blockend is the address of the end of the user structure */
m88k_register_u_addr (blockend, regnum) m88k_register_u_addr (int blockend, int regnum)
int blockend, regnum;
{ {
struct USER u; struct USER u;
int ustart = blockend - sizeof (struct USER); int ustart = blockend - sizeof (struct USER);
@ -289,8 +287,7 @@ m88k_register_u_addr (blockend, regnum)
register values. */ register values. */
void void
supply_gregset (gregsetp) supply_gregset (gregset_t *gregsetp)
gregset_t *gregsetp;
{ {
register int regi; register int regi;
register greg_t *regp = (greg_t *) gregsetp; register greg_t *regp = (greg_t *) gregsetp;
@ -307,9 +304,7 @@ supply_gregset (gregsetp)
} }
void void
fill_gregset (gregsetp, regno) fill_gregset (gregset_t *gregsetp, int regno)
gregset_t *gregsetp;
int regno;
{ {
int regi; int regi;
register greg_t *regp = (greg_t *) gregsetp; register greg_t *regp = (greg_t *) gregsetp;
@ -357,7 +352,7 @@ struct link_map
#endif #endif
void void
add_shared_symbol_files () add_shared_symbol_files (void)
{ {
void *desc; void *desc;
struct link_map *ld_map, *lm, lms; struct link_map *ld_map, *lm, lms;
@ -410,8 +405,7 @@ add_shared_symbol_files ()
#include <sys/regset.h> #include <sys/regset.h>
unsigned int unsigned int
m88k_harris_core_register_addr (regno, reg_ptr) m88k_harris_core_register_addr (int regno, int reg_ptr)
int regno, reg_ptr;
{ {
unsigned int word_offset; unsigned int word_offset;
@ -447,7 +441,7 @@ m88k_harris_core_register_addr (regno, reg_ptr)
#endif /* _ES_MP */ #endif /* _ES_MP */
void void
_initialize_m88k_nat () _initialize_m88k_nat (void)
{ {
#ifdef _ES_MP #ifdef _ES_MP
/* Enable 88110 support, as we don't support the 88100 under ES/MP. */ /* Enable 88110 support, as we don't support the 88100 under ES/MP. */
@ -465,8 +459,7 @@ _initialize_m88k_nat ()
register values. */ register values. */
void void
supply_gregset (gregsetp) supply_gregset (gregset_t *gregsetp)
gregset_t *gregsetp;
{ {
register int regi; register int regi;
register greg_t *regp = (greg_t *) gregsetp; register greg_t *regp = (greg_t *) gregsetp;
@ -488,8 +481,7 @@ supply_gregset (gregsetp)
idea of the current floating point register values. */ idea of the current floating point register values. */
void void
supply_fpregset (fpregsetp) supply_fpregset (fpregset_t *fpregsetp)
fpregset_t *fpregsetp;
{ {
register int regi; register int regi;
char *from; char *from;

View file

@ -121,18 +121,14 @@ d10v_stack_align (CORE_ADDR len)
registers. */ registers. */
int int
d10v_use_struct_convention (gcc_p, type) d10v_use_struct_convention (int gcc_p, struct type *type)
int gcc_p;
struct type *type;
{ {
return (TYPE_LENGTH (type) > 8); return (TYPE_LENGTH (type) > 8);
} }
unsigned char * unsigned char *
d10v_breakpoint_from_pc (pcptr, lenptr) d10v_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
CORE_ADDR *pcptr;
int *lenptr;
{ {
static unsigned char breakpoint[] = static unsigned char breakpoint[] =
{0x2f, 0x90, 0x5e, 0x00}; {0x2f, 0x90, 0x5e, 0x00};
@ -288,8 +284,7 @@ d10v_register_sim_regno (int nr)
register REG_NR. */ register REG_NR. */
int int
d10v_register_byte (reg_nr) d10v_register_byte (int reg_nr)
int reg_nr;
{ {
if (reg_nr < A0_REGNUM) if (reg_nr < A0_REGNUM)
return (reg_nr * 2); return (reg_nr * 2);
@ -306,8 +301,7 @@ d10v_register_byte (reg_nr)
register REG_NR. */ register REG_NR. */
int int
d10v_register_raw_size (reg_nr) d10v_register_raw_size (int reg_nr)
int reg_nr;
{ {
if (reg_nr < A0_REGNUM) if (reg_nr < A0_REGNUM)
return 2; return 2;
@ -321,8 +315,7 @@ d10v_register_raw_size (reg_nr)
for register N. */ for register N. */
int int
d10v_register_virtual_size (reg_nr) d10v_register_virtual_size (int reg_nr)
int reg_nr;
{ {
return TYPE_LENGTH (REGISTER_VIRTUAL_TYPE (reg_nr)); return TYPE_LENGTH (REGISTER_VIRTUAL_TYPE (reg_nr));
} }
@ -331,8 +324,7 @@ d10v_register_virtual_size (reg_nr)
of data in register N. */ of data in register N. */
struct type * struct type *
d10v_register_virtual_type (reg_nr) d10v_register_virtual_type (int reg_nr)
int reg_nr;
{ {
if (reg_nr >= A0_REGNUM if (reg_nr >= A0_REGNUM
&& reg_nr < (A0_REGNUM + NR_A_REGS)) && reg_nr < (A0_REGNUM + NR_A_REGS))
@ -346,18 +338,14 @@ d10v_register_virtual_type (reg_nr)
/* convert $pc and $sp to/from virtual addresses */ /* convert $pc and $sp to/from virtual addresses */
int int
d10v_register_convertible (nr) d10v_register_convertible (int nr)
int nr;
{ {
return ((nr) == PC_REGNUM || (nr) == SP_REGNUM); return ((nr) == PC_REGNUM || (nr) == SP_REGNUM);
} }
void void
d10v_register_convert_to_virtual (regnum, type, from, to) d10v_register_convert_to_virtual (int regnum, struct type *type, char *from,
int regnum; char *to)
struct type *type;
char *from;
char *to;
{ {
ULONGEST x = extract_unsigned_integer (from, REGISTER_RAW_SIZE (regnum)); ULONGEST x = extract_unsigned_integer (from, REGISTER_RAW_SIZE (regnum));
if (regnum == PC_REGNUM) if (regnum == PC_REGNUM)
@ -368,11 +356,8 @@ d10v_register_convert_to_virtual (regnum, type, from, to)
} }
void void
d10v_register_convert_to_raw (type, regnum, from, to) d10v_register_convert_to_raw (struct type *type, int regnum, char *from,
struct type *type; char *to)
int regnum;
char *from;
char *to;
{ {
ULONGEST x = extract_unsigned_integer (from, TYPE_LENGTH (type)); ULONGEST x = extract_unsigned_integer (from, TYPE_LENGTH (type));
x &= 0x3ffff; x &= 0x3ffff;
@ -383,44 +368,38 @@ d10v_register_convert_to_raw (type, regnum, from, to)
CORE_ADDR CORE_ADDR
d10v_make_daddr (x) d10v_make_daddr (CORE_ADDR x)
CORE_ADDR x;
{ {
return ((x) | DMEM_START); return ((x) | DMEM_START);
} }
CORE_ADDR CORE_ADDR
d10v_make_iaddr (x) d10v_make_iaddr (CORE_ADDR x)
CORE_ADDR x;
{ {
return (((x) << 2) | IMEM_START); return (((x) << 2) | IMEM_START);
} }
int int
d10v_daddr_p (x) d10v_daddr_p (CORE_ADDR x)
CORE_ADDR x;
{ {
return (((x) & 0x3000000) == DMEM_START); return (((x) & 0x3000000) == DMEM_START);
} }
int int
d10v_iaddr_p (x) d10v_iaddr_p (CORE_ADDR x)
CORE_ADDR x;
{ {
return (((x) & 0x3000000) == IMEM_START); return (((x) & 0x3000000) == IMEM_START);
} }
CORE_ADDR CORE_ADDR
d10v_convert_iaddr_to_raw (x) d10v_convert_iaddr_to_raw (CORE_ADDR x)
CORE_ADDR x;
{ {
return (((x) >> 2) & 0xffff); return (((x) >> 2) & 0xffff);
} }
CORE_ADDR CORE_ADDR
d10v_convert_daddr_to_raw (x) d10v_convert_daddr_to_raw (CORE_ADDR x)
CORE_ADDR x;
{ {
return ((x) & 0xffff); return ((x) & 0xffff);
} }
@ -432,9 +411,7 @@ d10v_convert_daddr_to_raw (x)
register. */ register. */
void void
d10v_store_struct_return (addr, sp) d10v_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
CORE_ADDR addr;
CORE_ADDR sp;
{ {
write_register (ARG1_REGNUM, (addr)); write_register (ARG1_REGNUM, (addr));
} }
@ -445,9 +422,7 @@ d10v_store_struct_return (addr, sp)
Things always get returned in RET1_REGNUM, RET2_REGNUM, ... */ Things always get returned in RET1_REGNUM, RET2_REGNUM, ... */
void void
d10v_store_return_value (type, valbuf) d10v_store_return_value (struct type *type, char *valbuf)
struct type *type;
char *valbuf;
{ {
write_register_bytes (REGISTER_BYTE (RET1_REGNUM), write_register_bytes (REGISTER_BYTE (RET1_REGNUM),
valbuf, valbuf,
@ -459,8 +434,7 @@ d10v_store_return_value (type, valbuf)
as a CORE_ADDR (or an expression that can be used as one). */ as a CORE_ADDR (or an expression that can be used as one). */
CORE_ADDR CORE_ADDR
d10v_extract_struct_value_address (regbuf) d10v_extract_struct_value_address (char *regbuf)
char *regbuf;
{ {
return (extract_address ((regbuf) + REGISTER_BYTE (ARG1_REGNUM), return (extract_address ((regbuf) + REGISTER_BYTE (ARG1_REGNUM),
REGISTER_RAW_SIZE (ARG1_REGNUM)) REGISTER_RAW_SIZE (ARG1_REGNUM))
@ -468,22 +442,19 @@ d10v_extract_struct_value_address (regbuf)
} }
CORE_ADDR CORE_ADDR
d10v_frame_saved_pc (frame) d10v_frame_saved_pc (struct frame_info *frame)
struct frame_info *frame;
{ {
return ((frame)->extra_info->return_pc); return ((frame)->extra_info->return_pc);
} }
CORE_ADDR CORE_ADDR
d10v_frame_args_address (fi) d10v_frame_args_address (struct frame_info *fi)
struct frame_info *fi;
{ {
return (fi)->frame; return (fi)->frame;
} }
CORE_ADDR CORE_ADDR
d10v_frame_locals_address (fi) d10v_frame_locals_address (struct frame_info *fi)
struct frame_info *fi;
{ {
return (fi)->frame; return (fi)->frame;
} }
@ -493,8 +464,7 @@ d10v_frame_locals_address (fi)
the stack and that may not be written yet. */ the stack and that may not be written yet. */
CORE_ADDR CORE_ADDR
d10v_saved_pc_after_call (frame) d10v_saved_pc_after_call (struct frame_info *frame)
struct frame_info *frame;
{ {
return ((read_register (LR_REGNUM) << 2) return ((read_register (LR_REGNUM) << 2)
| IMEM_START); | IMEM_START);
@ -504,14 +474,13 @@ d10v_saved_pc_after_call (frame)
registers. */ registers. */
void void
d10v_pop_frame () d10v_pop_frame (void)
{ {
generic_pop_current_frame (do_d10v_pop_frame); generic_pop_current_frame (do_d10v_pop_frame);
} }
static void static void
do_d10v_pop_frame (fi) do_d10v_pop_frame (struct frame_info *fi)
struct frame_info *fi;
{ {
CORE_ADDR fp; CORE_ADDR fp;
int regnum; int regnum;
@ -550,8 +519,7 @@ do_d10v_pop_frame (fi)
} }
static int static int
check_prologue (op) check_prologue (unsigned short op)
unsigned short op;
{ {
/* st rn, @-sp */ /* st rn, @-sp */
if ((op & 0x7E1F) == 0x6C1F) if ((op & 0x7E1F) == 0x6C1F)
@ -585,8 +553,7 @@ check_prologue (op)
} }
CORE_ADDR CORE_ADDR
d10v_skip_prologue (pc) d10v_skip_prologue (CORE_ADDR pc)
CORE_ADDR pc;
{ {
unsigned long op; unsigned long op;
unsigned short op1, op2; unsigned short op1, op2;
@ -654,8 +621,7 @@ d10v_skip_prologue (pc)
*/ */
CORE_ADDR CORE_ADDR
d10v_frame_chain (fi) d10v_frame_chain (struct frame_info *fi)
struct frame_info *fi;
{ {
d10v_frame_init_saved_regs (fi); d10v_frame_init_saved_regs (fi);
@ -683,10 +649,7 @@ d10v_frame_chain (fi)
static int next_addr, uses_frame; static int next_addr, uses_frame;
static int static int
prologue_find_regs (op, fi, addr) prologue_find_regs (unsigned short op, struct frame_info *fi, CORE_ADDR addr)
unsigned short op;
struct frame_info *fi;
CORE_ADDR addr;
{ {
int n; int n;
@ -757,8 +720,7 @@ prologue_find_regs (op, fi, addr)
for it IS the sp for the next frame. */ for it IS the sp for the next frame. */
void void
d10v_frame_init_saved_regs (fi) d10v_frame_init_saved_regs (struct frame_info *fi)
struct frame_info *fi;
{ {
CORE_ADDR fp, pc; CORE_ADDR fp, pc;
unsigned long op; unsigned long op;
@ -859,9 +821,7 @@ d10v_frame_init_saved_regs (fi)
} }
void void
d10v_init_extra_frame_info (fromleaf, fi) d10v_init_extra_frame_info (int fromleaf, struct frame_info *fi)
int fromleaf;
struct frame_info *fi;
{ {
fi->extra_info = (struct frame_extra_info *) fi->extra_info = (struct frame_extra_info *)
frame_obstack_alloc (sizeof (struct frame_extra_info)); frame_obstack_alloc (sizeof (struct frame_extra_info));
@ -884,9 +844,7 @@ d10v_init_extra_frame_info (fromleaf, fi)
} }
static void static void
show_regs (args, from_tty) show_regs (char *args, int from_tty)
char *args;
int from_tty;
{ {
int a; int a;
printf_filtered ("PC=%04lx (0x%lx) PSW=%04lx RPT_S=%04lx RPT_E=%04lx RPT_C=%04lx\n", printf_filtered ("PC=%04lx (0x%lx) PSW=%04lx RPT_S=%04lx RPT_E=%04lx RPT_C=%04lx\n",
@ -946,8 +904,7 @@ show_regs (args, from_tty)
} }
CORE_ADDR CORE_ADDR
d10v_read_pc (pid) d10v_read_pc (int pid)
int pid;
{ {
int save_pid; int save_pid;
CORE_ADDR pc; CORE_ADDR pc;
@ -962,9 +919,7 @@ d10v_read_pc (pid)
} }
void void
d10v_write_pc (val, pid) d10v_write_pc (CORE_ADDR val, int pid)
CORE_ADDR val;
int pid;
{ {
int save_pid; int save_pid;
@ -975,27 +930,25 @@ d10v_write_pc (val, pid)
} }
CORE_ADDR CORE_ADDR
d10v_read_sp () d10v_read_sp (void)
{ {
return (D10V_MAKE_DADDR (read_register (SP_REGNUM))); return (D10V_MAKE_DADDR (read_register (SP_REGNUM)));
} }
void void
d10v_write_sp (val) d10v_write_sp (CORE_ADDR val)
CORE_ADDR val;
{ {
write_register (SP_REGNUM, D10V_CONVERT_DADDR_TO_RAW (val)); write_register (SP_REGNUM, D10V_CONVERT_DADDR_TO_RAW (val));
} }
void void
d10v_write_fp (val) d10v_write_fp (CORE_ADDR val)
CORE_ADDR val;
{ {
write_register (FP_REGNUM, D10V_CONVERT_DADDR_TO_RAW (val)); write_register (FP_REGNUM, D10V_CONVERT_DADDR_TO_RAW (val));
} }
CORE_ADDR CORE_ADDR
d10v_read_fp () d10v_read_fp (void)
{ {
return (D10V_MAKE_DADDR (read_register (FP_REGNUM))); return (D10V_MAKE_DADDR (read_register (FP_REGNUM)));
} }
@ -1005,9 +958,7 @@ d10v_read_fp ()
Needed for targets where we don't actually execute a JSR/BSR instruction */ Needed for targets where we don't actually execute a JSR/BSR instruction */
CORE_ADDR CORE_ADDR
d10v_push_return_address (pc, sp) d10v_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
CORE_ADDR pc;
CORE_ADDR sp;
{ {
write_register (LR_REGNUM, D10V_CONVERT_IADDR_TO_RAW (CALL_DUMMY_ADDRESS ())); write_register (LR_REGNUM, D10V_CONVERT_IADDR_TO_RAW (CALL_DUMMY_ADDRESS ()));
return sp; return sp;
@ -1027,10 +978,7 @@ struct stack_item
static struct stack_item *push_stack_item (struct stack_item *prev, static struct stack_item *push_stack_item (struct stack_item *prev,
void *contents, int len); void *contents, int len);
static struct stack_item * static struct stack_item *
push_stack_item (prev, contents, len) push_stack_item (struct stack_item *prev, void *contents, int len)
struct stack_item *prev;
void *contents;
int len;
{ {
struct stack_item *si; struct stack_item *si;
si = xmalloc (sizeof (struct stack_item)); si = xmalloc (sizeof (struct stack_item));
@ -1043,8 +991,7 @@ push_stack_item (prev, contents, len)
static struct stack_item *pop_stack_item (struct stack_item *si); static struct stack_item *pop_stack_item (struct stack_item *si);
static struct stack_item * static struct stack_item *
pop_stack_item (si) pop_stack_item (struct stack_item *si)
struct stack_item *si;
{ {
struct stack_item *dead = si; struct stack_item *dead = si;
si = si->prev; si = si->prev;
@ -1055,12 +1002,8 @@ pop_stack_item (si)
CORE_ADDR CORE_ADDR
d10v_push_arguments (nargs, args, sp, struct_return, struct_addr) d10v_push_arguments (int nargs, value_ptr *args, CORE_ADDR sp,
int nargs; int struct_return, CORE_ADDR struct_addr)
value_ptr *args;
CORE_ADDR sp;
int struct_return;
CORE_ADDR struct_addr;
{ {
int i; int i;
int regnum = ARG1_REGNUM; int regnum = ARG1_REGNUM;
@ -1285,9 +1228,7 @@ struct trace_buffer
trace_data; trace_data;
static void static void
trace_command (args, from_tty) trace_command (char *args, int from_tty)
char *args;
int from_tty;
{ {
/* Clear the host-side trace buffer, allocating space if needed. */ /* Clear the host-side trace buffer, allocating space if needed. */
trace_data.size = 0; trace_data.size = 0;
@ -1302,9 +1243,7 @@ trace_command (args, from_tty)
} }
static void static void
untrace_command (args, from_tty) untrace_command (char *args, int from_tty)
char *args;
int from_tty;
{ {
tracing = 0; tracing = 0;
@ -1312,9 +1251,7 @@ untrace_command (args, from_tty)
} }
static void static void
trace_info (args, from_tty) trace_info (char *args, int from_tty)
char *args;
int from_tty;
{ {
int i; int i;
@ -1341,9 +1278,7 @@ trace_info (args, from_tty)
on STREAM. Returns length of the instruction, in bytes. */ on STREAM. Returns length of the instruction, in bytes. */
static int static int
print_insn (memaddr, stream) print_insn (CORE_ADDR memaddr, struct ui_file *stream)
CORE_ADDR memaddr;
struct ui_file *stream;
{ {
/* If there's no disassembler, something is very wrong. */ /* If there's no disassembler, something is very wrong. */
if (tm_print_insn == NULL) if (tm_print_insn == NULL)
@ -1357,7 +1292,7 @@ print_insn (memaddr, stream)
} }
static void static void
d10v_eva_prepare_to_trace () d10v_eva_prepare_to_trace (void)
{ {
if (!tracing) if (!tracing)
return; return;
@ -1369,7 +1304,7 @@ d10v_eva_prepare_to_trace ()
more useful for display. */ more useful for display. */
static void static void
d10v_eva_get_trace_data () d10v_eva_get_trace_data (void)
{ {
int count, i, j, oldsize; int count, i, j, oldsize;
int trace_addr, trace_seg, trace_cnt, next_cnt; int trace_addr, trace_seg, trace_cnt, next_cnt;
@ -1429,9 +1364,7 @@ d10v_eva_get_trace_data ()
} }
static void static void
tdisassemble_command (arg, from_tty) tdisassemble_command (char *arg, int from_tty)
char *arg;
int from_tty;
{ {
int i, count; int i, count;
CORE_ADDR low, high; CORE_ADDR low, high;
@ -1466,8 +1399,7 @@ tdisassemble_command (arg, from_tty)
} }
static void static void
display_trace (low, high) display_trace (int low, int high)
int low, high;
{ {
int i, count, trace_show_source, first, suppress; int i, count, trace_show_source, first, suppress;
CORE_ADDR next_address; CORE_ADDR next_address;
@ -1527,9 +1459,7 @@ display_trace (low, high)
static gdbarch_init_ftype d10v_gdbarch_init; static gdbarch_init_ftype d10v_gdbarch_init;
static struct gdbarch * static struct gdbarch *
d10v_gdbarch_init (info, arches) d10v_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
struct gdbarch_info info;
struct gdbarch_list *arches;
{ {
static LONGEST d10v_call_dummy_words[] = static LONGEST d10v_call_dummy_words[] =
{0}; {0};
@ -1686,7 +1616,7 @@ extern void (*target_resume_hook) (void);
extern void (*target_wait_loop_hook) (void); extern void (*target_wait_loop_hook) (void);
void void
_initialize_d10v_tdep () _initialize_d10v_tdep (void)
{ {
register_gdbarch_init (bfd_arch_d10v, d10v_gdbarch_init); register_gdbarch_init (bfd_arch_d10v, d10v_gdbarch_init);

View file

@ -112,7 +112,7 @@ d30v_frame_chain_valid (chain, fi)
registers. */ registers. */
void void
d30v_pop_frame () d30v_pop_frame (void)
{ {
struct frame_info *frame = get_current_frame (); struct frame_info *frame = get_current_frame ();
CORE_ADDR fp; CORE_ADDR fp;
@ -159,8 +159,7 @@ d30v_pop_frame ()
} }
static int static int
check_prologue (op) check_prologue (unsigned long op)
unsigned long op;
{ {
/* add sp,sp,imm -- observed */ /* add sp,sp,imm -- observed */
if ((op & OP_MASK_ALL_BUT_IMM) == OP_ADD_SP_IMM) if ((op & OP_MASK_ALL_BUT_IMM) == OP_ADD_SP_IMM)
@ -234,8 +233,7 @@ check_prologue (op)
} }
CORE_ADDR CORE_ADDR
d30v_skip_prologue (pc) d30v_skip_prologue (CORE_ADDR pc)
CORE_ADDR pc;
{ {
unsigned long op[2]; unsigned long op[2];
unsigned long opl, opr; /* left / right sub operations */ unsigned long opl, opr; /* left / right sub operations */
@ -320,8 +318,7 @@ static int end_of_stack;
*/ */
CORE_ADDR CORE_ADDR
d30v_frame_chain (frame) d30v_frame_chain (struct frame_info *frame)
struct frame_info *frame;
{ {
struct frame_saved_regs fsr; struct frame_saved_regs fsr;
@ -351,10 +348,8 @@ static int next_addr, uses_frame;
static int frame_size; static int frame_size;
static int static int
prologue_find_regs (op, fsr, addr) prologue_find_regs (unsigned long op, struct frame_saved_regs *fsr,
unsigned long op; CORE_ADDR addr)
struct frame_saved_regs *fsr;
CORE_ADDR addr;
{ {
int n; int n;
int offset; int offset;
@ -503,9 +498,7 @@ prologue_find_regs (op, fsr, addr)
ways in the stack frame. sp is even more special: the address we ways in the stack frame. sp is even more special: the address we
return for it IS the sp for the next frame. */ return for it IS the sp for the next frame. */
void void
d30v_frame_find_saved_regs (fi, fsr) d30v_frame_find_saved_regs (struct frame_info *fi, struct frame_saved_regs *fsr)
struct frame_info *fi;
struct frame_saved_regs *fsr;
{ {
CORE_ADDR fp, pc; CORE_ADDR fp, pc;
unsigned long opl, opr; unsigned long opl, opr;
@ -556,9 +549,8 @@ d30v_frame_find_saved_regs (fi, fsr)
} }
void void
d30v_frame_find_saved_regs_offsets (fi, fsr) d30v_frame_find_saved_regs_offsets (struct frame_info *fi,
struct frame_info *fi; struct frame_saved_regs *fsr)
struct frame_saved_regs *fsr;
{ {
CORE_ADDR fp, pc; CORE_ADDR fp, pc;
unsigned long opl, opr; unsigned long opl, opr;
@ -677,9 +669,7 @@ d30v_frame_find_saved_regs_offsets (fi, fsr)
} }
void void
d30v_init_extra_frame_info (fromleaf, fi) d30v_init_extra_frame_info (int fromleaf, struct frame_info *fi)
int fromleaf;
struct frame_info *fi;
{ {
struct frame_saved_regs dummy; struct frame_saved_regs dummy;
@ -709,9 +699,7 @@ d30v_init_extra_frame_info (fromleaf, fi)
} }
void void
d30v_init_frame_pc (fromleaf, prev) d30v_init_frame_pc (int fromleaf, struct frame_info *prev)
int fromleaf;
struct frame_info *prev;
{ {
/* default value, put here so we can breakpoint on it and /* default value, put here so we can breakpoint on it and
see if the default value is really the right thing to use */ see if the default value is really the right thing to use */
@ -722,9 +710,7 @@ d30v_init_frame_pc (fromleaf, prev)
static void d30v_print_register (int regnum, int tabular); static void d30v_print_register (int regnum, int tabular);
static void static void
d30v_print_register (regnum, tabular) d30v_print_register (int regnum, int tabular)
int regnum;
int tabular;
{ {
if (regnum < A0_REGNUM) if (regnum < A0_REGNUM)
{ {
@ -754,7 +740,7 @@ d30v_print_register (regnum, tabular)
} }
static void static void
d30v_print_flags () d30v_print_flags (void)
{ {
long psw = read_register (PSW_REGNUM); long psw = read_register (PSW_REGNUM);
printf_filtered ("flags #1"); printf_filtered ("flags #1");
@ -778,17 +764,13 @@ d30v_print_flags ()
} }
static void static void
print_flags_command (args, from_tty) print_flags_command (char *args, int from_tty)
char *args;
int from_tty;
{ {
d30v_print_flags (); d30v_print_flags ();
} }
void void
d30v_do_registers_info (regnum, fpregs) d30v_do_registers_info (int regnum, int fpregs)
int regnum;
int fpregs;
{ {
long long num1, num2; long long num1, num2;
long psw; long psw;
@ -886,14 +868,8 @@ d30v_do_registers_info (regnum, fpregs)
} }
CORE_ADDR CORE_ADDR
d30v_fix_call_dummy (dummyname, start_sp, fun, nargs, args, type, gcc_p) d30v_fix_call_dummy (char *dummyname, CORE_ADDR start_sp, CORE_ADDR fun,
char *dummyname; int nargs, value_ptr *args, struct type *type, int gcc_p)
CORE_ADDR start_sp;
CORE_ADDR fun;
int nargs;
value_ptr *args;
struct type *type;
int gcc_p;
{ {
int regnum; int regnum;
CORE_ADDR sp; CORE_ADDR sp;
@ -916,8 +892,7 @@ d30v_fix_call_dummy (dummyname, start_sp, fun, nargs, args, type, gcc_p)
} }
static void static void
d30v_pop_dummy_frame (fi) d30v_pop_dummy_frame (struct frame_info *fi)
struct frame_info *fi;
{ {
CORE_ADDR sp = fi->dummy; CORE_ADDR sp = fi->dummy;
int regnum; int regnum;
@ -932,12 +907,8 @@ d30v_pop_dummy_frame (fi)
CORE_ADDR CORE_ADDR
d30v_push_arguments (nargs, args, sp, struct_return, struct_addr) d30v_push_arguments (int nargs, value_ptr *args, CORE_ADDR sp,
int nargs; int struct_return, CORE_ADDR struct_addr)
value_ptr *args;
CORE_ADDR sp;
int struct_return;
CORE_ADDR struct_addr;
{ {
int i, len, index = 0, regnum = 2; int i, len, index = 0, regnum = 2;
char buffer[4], *contents; char buffer[4], *contents;
@ -1035,7 +1006,7 @@ d30v_push_arguments (nargs, args, sp, struct_return, struct_addr)
/* restored. */ /* restored. */
CORE_ADDR CORE_ADDR
d30v_call_dummy_address () d30v_call_dummy_address (void)
{ {
CORE_ADDR entry; CORE_ADDR entry;
struct minimal_symbol *sym; struct minimal_symbol *sym;
@ -1126,9 +1097,7 @@ struct trace_buffer
trace_data; trace_data;
static void static void
trace_command (args, from_tty) trace_command (char *args, int from_tty)
char *args;
int from_tty;
{ {
/* Clear the host-side trace buffer, allocating space if needed. */ /* Clear the host-side trace buffer, allocating space if needed. */
trace_data.size = 0; trace_data.size = 0;
@ -1143,9 +1112,7 @@ trace_command (args, from_tty)
} }
static void static void
untrace_command (args, from_tty) untrace_command (char *args, int from_tty)
char *args;
int from_tty;
{ {
tracing = 0; tracing = 0;
@ -1153,9 +1120,7 @@ untrace_command (args, from_tty)
} }
static void static void
trace_info (args, from_tty) trace_info (char *args, int from_tty)
char *args;
int from_tty;
{ {
int i; int i;
@ -1181,9 +1146,7 @@ trace_info (args, from_tty)
on STREAM. Returns length of the instruction, in bytes. */ on STREAM. Returns length of the instruction, in bytes. */
static int static int
print_insn (memaddr, stream) print_insn (CORE_ADDR memaddr, struct ui_file *stream)
CORE_ADDR memaddr;
struct ui_file *stream;
{ {
/* If there's no disassembler, something is very wrong. */ /* If there's no disassembler, something is very wrong. */
if (tm_print_insn == NULL) if (tm_print_insn == NULL)
@ -1197,7 +1160,7 @@ print_insn (memaddr, stream)
} }
void void
d30v_eva_prepare_to_trace () d30v_eva_prepare_to_trace (void)
{ {
if (!tracing) if (!tracing)
return; return;
@ -1209,7 +1172,7 @@ d30v_eva_prepare_to_trace ()
more useful for display. */ more useful for display. */
void void
d30v_eva_get_trace_data () d30v_eva_get_trace_data (void)
{ {
int count, i, j, oldsize; int count, i, j, oldsize;
int trace_addr, trace_seg, trace_cnt, next_cnt; int trace_addr, trace_seg, trace_cnt, next_cnt;
@ -1269,9 +1232,7 @@ d30v_eva_get_trace_data ()
} }
static void static void
tdisassemble_command (arg, from_tty) tdisassemble_command (char *arg, int from_tty)
char *arg;
int from_tty;
{ {
int i, count; int i, count;
CORE_ADDR low, high; CORE_ADDR low, high;
@ -1308,8 +1269,7 @@ tdisassemble_command (arg, from_tty)
} }
static void static void
display_trace (low, high) display_trace (int low, int high)
int low, high;
{ {
int i, count, trace_show_source, first, suppress; int i, count, trace_show_source, first, suppress;
CORE_ADDR next_address; CORE_ADDR next_address;
@ -1369,7 +1329,7 @@ extern void (*target_resume_hook) (void);
extern void (*target_wait_loop_hook) (void); extern void (*target_wait_loop_hook) (void);
void void
_initialize_d30v_tdep () _initialize_d30v_tdep (void)
{ {
tm_print_insn = print_insn_d30v; tm_print_insn = print_insn_d30v;

View file

@ -34,11 +34,7 @@
static void dbug_open (char *args, int from_tty); static void dbug_open (char *args, int from_tty);
static void static void
dbug_supply_register (regname, regnamelen, val, vallen) dbug_supply_register (char *regname, int regnamelen, char *val, int vallen)
char *regname;
int regnamelen;
char *val;
int vallen;
{ {
int regno; int regno;
@ -143,15 +139,13 @@ init_dbug_cmds (void)
} /* init_debug_ops */ } /* init_debug_ops */
static void static void
dbug_open (args, from_tty) dbug_open (char *args, int from_tty)
char *args;
int from_tty;
{ {
monitor_open (args, &dbug_cmds, from_tty); monitor_open (args, &dbug_cmds, from_tty);
} }
void void
_initialize_dbug_rom () _initialize_dbug_rom (void)
{ {
init_dbug_cmds (); init_dbug_cmds ();
init_monitor_ops (&dbug_ops); init_monitor_ops (&dbug_ops);

View file

@ -319,7 +319,7 @@ static struct partial_symtab *start_psymtab (struct objfile *, char *,
/* Free up old header file tables */ /* Free up old header file tables */
static void static void
free_header_files () free_header_files (void)
{ {
if (this_object_header_files) if (this_object_header_files)
{ {
@ -332,7 +332,7 @@ free_header_files ()
/* Allocate new header file tables */ /* Allocate new header file tables */
static void static void
init_header_files () init_header_files (void)
{ {
n_allocated_this_object_header_files = 10; n_allocated_this_object_header_files = 10;
this_object_header_files = (int *) xmalloc (10 * sizeof (int)); this_object_header_files = (int *) xmalloc (10 * sizeof (int));
@ -342,8 +342,7 @@ init_header_files ()
at the next successive FILENUM. */ at the next successive FILENUM. */
static void static void
add_this_object_header_file (i) add_this_object_header_file (int i)
int i;
{ {
if (n_this_object_header_files == n_allocated_this_object_header_files) if (n_this_object_header_files == n_allocated_this_object_header_files)
{ {
@ -362,9 +361,7 @@ add_this_object_header_file (i)
symbol tables for the same header file. */ symbol tables for the same header file. */
static void static void
add_old_header_file (name, instance) add_old_header_file (char *name, int instance)
char *name;
int instance;
{ {
register struct header_file *p = HEADER_FILES (current_objfile); register struct header_file *p = HEADER_FILES (current_objfile);
register int i; register int i;
@ -390,9 +387,7 @@ add_old_header_file (name, instance)
so we record the file when its "begin" is seen and ignore the "end". */ so we record the file when its "begin" is seen and ignore the "end". */
static void static void
add_new_header_file (name, instance) add_new_header_file (char *name, int instance)
char *name;
int instance;
{ {
register int i; register int i;
register struct header_file *hfile; register struct header_file *hfile;
@ -435,8 +430,7 @@ add_new_header_file (name, instance)
#if 0 #if 0
static struct type ** static struct type **
explicit_lookup_type (real_filenum, index) explicit_lookup_type (int real_filenum, int index)
int real_filenum, index;
{ {
register struct header_file *f = &HEADER_FILES (current_objfile)[real_filenum]; register struct header_file *f = &HEADER_FILES (current_objfile)[real_filenum];
@ -453,11 +447,8 @@ explicit_lookup_type (real_filenum, index)
#endif #endif
static void static void
record_minimal_symbol (name, address, type, objfile) record_minimal_symbol (char *name, CORE_ADDR address, int type,
char *name; struct objfile *objfile)
CORE_ADDR address;
int type;
struct objfile *objfile;
{ {
enum minimal_symbol_type ms_type; enum minimal_symbol_type ms_type;
int section; int section;
@ -626,8 +617,7 @@ dbx_symfile_read (objfile, mainline)
file, e.g. a shared library). */ file, e.g. a shared library). */
static void static void
dbx_new_init (ignore) dbx_new_init (struct objfile *ignore)
struct objfile *ignore;
{ {
stabsread_new_init (); stabsread_new_init ();
buildsym_new_init (); buildsym_new_init ();
@ -651,8 +641,7 @@ dbx_new_init (ignore)
#define DBX_STRINGTAB_SIZE_SIZE sizeof(long) /* FIXME */ #define DBX_STRINGTAB_SIZE_SIZE sizeof(long) /* FIXME */
static void static void
dbx_symfile_init (objfile) dbx_symfile_init (struct objfile *objfile)
struct objfile *objfile;
{ {
int val; int val;
bfd *sym_bfd = objfile->obfd; bfd *sym_bfd = objfile->obfd;
@ -769,8 +758,7 @@ dbx_symfile_init (objfile)
objfile struct from the global list of known objfiles. */ objfile struct from the global list of known objfiles. */
static void static void
dbx_symfile_finish (objfile) dbx_symfile_finish (struct objfile *objfile)
struct objfile *objfile;
{ {
if (objfile->sym_stab_info != NULL) if (objfile->sym_stab_info != NULL)
{ {
@ -857,8 +845,7 @@ process_later (sym, p, f)
/* Call deferred funtions in CONT_LIST. */ /* Call deferred funtions in CONT_LIST. */
static void static void
process_now (objfile) process_now (struct objfile *objfile)
struct objfile *objfile;
{ {
int i; int i;
int save_symbuf_idx; int save_symbuf_idx;
@ -927,8 +914,7 @@ static unsigned int symbuf_read;
(into the string table) but this does no harm. */ (into the string table) but this does no harm. */
static void static void
fill_symbuf (sym_bfd) fill_symbuf (bfd *sym_bfd)
bfd *sym_bfd;
{ {
unsigned int count; unsigned int count;
int nbytes; int nbytes;
@ -991,8 +977,7 @@ fill_symbuf (sym_bfd)
call this function to get the continuation. */ call this function to get the continuation. */
static char * static char *
dbx_next_symbol_text (objfile) dbx_next_symbol_text (struct objfile *objfile)
struct objfile *objfile;
{ {
struct internal_nlist nlist; struct internal_nlist nlist;
@ -1012,9 +997,7 @@ dbx_next_symbol_text (objfile)
allocated. */ allocated. */
static void static void
init_bincl_list (number, objfile) init_bincl_list (int number, struct objfile *objfile)
int number;
struct objfile *objfile;
{ {
bincls_allocated = number; bincls_allocated = number;
next_bincl = bincl_list = (struct header_file_location *) next_bincl = bincl_list = (struct header_file_location *)
@ -1024,10 +1007,7 @@ init_bincl_list (number, objfile)
/* Add a bincl to the list. */ /* Add a bincl to the list. */
static void static void
add_bincl_to_list (pst, name, instance) add_bincl_to_list (struct partial_symtab *pst, char *name, int instance)
struct partial_symtab *pst;
char *name;
int instance;
{ {
if (next_bincl >= bincl_list + bincls_allocated) if (next_bincl >= bincl_list + bincls_allocated)
{ {
@ -1048,9 +1028,7 @@ add_bincl_to_list (pst, name, instance)
with that header_file_location. */ with that header_file_location. */
static struct partial_symtab * static struct partial_symtab *
find_corresponding_bincl_psymtab (name, instance) find_corresponding_bincl_psymtab (char *name, int instance)
char *name;
int instance;
{ {
struct header_file_location *bincl; struct header_file_location *bincl;
@ -1066,8 +1044,7 @@ find_corresponding_bincl_psymtab (name, instance)
/* Free the storage allocated for the bincl list. */ /* Free the storage allocated for the bincl list. */
static void static void
free_bincl_list (objfile) free_bincl_list (struct objfile *objfile)
struct objfile *objfile;
{ {
mfree (objfile->md, (PTR) bincl_list); mfree (objfile->md, (PTR) bincl_list);
bincls_allocated = 0; bincls_allocated = 0;
@ -1089,8 +1066,7 @@ make_cleanup_free_bincl_list (struct objfile *objfile)
add them to the minimal symbol table. */ add them to the minimal symbol table. */
static void static void
read_dbx_dynamic_symtab (objfile) read_dbx_dynamic_symtab (struct objfile *objfile)
struct objfile *objfile;
{ {
bfd *abfd = objfile->obfd; bfd *abfd = objfile->obfd;
struct cleanup *back_to; struct cleanup *back_to;
@ -1232,8 +1208,7 @@ read_dbx_dynamic_symtab (objfile)
debugging information is available. */ debugging information is available. */
static void static void
read_dbx_symtab (objfile) read_dbx_symtab (struct objfile *objfile)
struct objfile *objfile;
{ {
register struct external_nlist *bufp = 0; /* =0 avoids gcc -Wall glitch */ register struct external_nlist *bufp = 0; /* =0 avoids gcc -Wall glitch */
struct internal_nlist nlist; struct internal_nlist nlist;
@ -1395,13 +1370,9 @@ read_dbx_symtab (objfile)
static struct partial_symtab * static struct partial_symtab *
start_psymtab (objfile, filename, textlow, ldsymoff, global_syms, static_syms) start_psymtab (struct objfile *objfile, char *filename, CORE_ADDR textlow,
struct objfile *objfile; int ldsymoff, struct partial_symbol **global_syms,
char *filename; struct partial_symbol **static_syms)
CORE_ADDR textlow;
int ldsymoff;
struct partial_symbol **global_syms;
struct partial_symbol **static_syms;
{ {
struct partial_symtab *result = struct partial_symtab *result =
start_psymtab_common (objfile, objfile->section_offsets, start_psymtab_common (objfile, objfile->section_offsets,
@ -1434,16 +1405,10 @@ start_psymtab (objfile, filename, textlow, ldsymoff, global_syms, static_syms)
FIXME: List variables and peculiarities of same. */ FIXME: List variables and peculiarities of same. */
struct partial_symtab * struct partial_symtab *
end_psymtab (pst, include_list, num_includes, capping_symbol_offset, end_psymtab (struct partial_symtab *pst, char **include_list, int num_includes,
capping_text, dependency_list, number_dependencies, textlow_not_set) int capping_symbol_offset, CORE_ADDR capping_text,
struct partial_symtab *pst; struct partial_symtab **dependency_list, int number_dependencies,
char **include_list; int textlow_not_set)
int num_includes;
int capping_symbol_offset;
CORE_ADDR capping_text;
struct partial_symtab **dependency_list;
int number_dependencies;
int textlow_not_set;
{ {
int i; int i;
struct objfile *objfile = pst->objfile; struct objfile *objfile = pst->objfile;
@ -1607,8 +1572,7 @@ end_psymtab (pst, include_list, num_includes, capping_symbol_offset,
} }
static void static void
dbx_psymtab_to_symtab_1 (pst) dbx_psymtab_to_symtab_1 (struct partial_symtab *pst)
struct partial_symtab *pst;
{ {
struct cleanup *old_chain; struct cleanup *old_chain;
int i; int i;
@ -1665,8 +1629,7 @@ dbx_psymtab_to_symtab_1 (pst)
Be verbose about it if the user wants that. */ Be verbose about it if the user wants that. */
static void static void
dbx_psymtab_to_symtab (pst) dbx_psymtab_to_symtab (struct partial_symtab *pst)
struct partial_symtab *pst;
{ {
bfd *sym_bfd; bfd *sym_bfd;
@ -1709,8 +1672,7 @@ dbx_psymtab_to_symtab (pst)
/* Read in a defined section of a specific object file's symbols. */ /* Read in a defined section of a specific object file's symbols. */
static void static void
read_ofile_symtab (pst) read_ofile_symtab (struct partial_symtab *pst)
struct partial_symtab *pst;
{ {
register char *namestring; register char *namestring;
register struct external_nlist *bufp; register struct external_nlist *bufp;
@ -1903,12 +1865,9 @@ read_ofile_symtab (pst)
It is used in end_symtab. */ It is used in end_symtab. */
void void
process_one_symbol (type, desc, valu, name, section_offsets, objfile) process_one_symbol (int type, int desc, CORE_ADDR valu, char *name,
int type, desc; struct section_offsets *section_offsets,
CORE_ADDR valu; struct objfile *objfile)
char *name;
struct section_offsets *section_offsets;
struct objfile *objfile;
{ {
#ifdef SUN_FIXED_LBRAC_BUG #ifdef SUN_FIXED_LBRAC_BUG
/* If SUN_FIXED_LBRAC_BUG is defined, then it tells us whether we need /* If SUN_FIXED_LBRAC_BUG is defined, then it tells us whether we need
@ -2491,16 +2450,10 @@ process_one_symbol (type, desc, valu, name, section_offsets, objfile)
adjusted for coff details. */ adjusted for coff details. */
void void
coffstab_build_psymtabs (objfile, mainline, coffstab_build_psymtabs (struct objfile *objfile, int mainline,
textaddr, textsize, stabsects, CORE_ADDR textaddr, unsigned int textsize,
stabstroffset, stabstrsize) struct stab_section_list *stabsects,
struct objfile *objfile; file_ptr stabstroffset, unsigned int stabstrsize)
int mainline;
CORE_ADDR textaddr;
unsigned int textsize;
struct stab_section_list *stabsects;
file_ptr stabstroffset;
unsigned int stabstrsize;
{ {
int val; int val;
bfd *sym_bfd = objfile->obfd; bfd *sym_bfd = objfile->obfd;
@ -2592,15 +2545,9 @@ coffstab_build_psymtabs (objfile, mainline,
adjusted for elf details. */ adjusted for elf details. */
void void
elfstab_build_psymtabs (objfile, mainline, elfstab_build_psymtabs (struct objfile *objfile, int mainline,
staboffset, stabsize, file_ptr staboffset, unsigned int stabsize,
stabstroffset, stabstrsize) file_ptr stabstroffset, unsigned int stabstrsize)
struct objfile *objfile;
int mainline;
file_ptr staboffset;
unsigned int stabsize;
file_ptr stabstroffset;
unsigned int stabstrsize;
{ {
int val; int val;
bfd *sym_bfd = objfile->obfd; bfd *sym_bfd = objfile->obfd;
@ -2668,13 +2615,8 @@ elfstab_build_psymtabs (objfile, mainline,
This routine is mostly copied from dbx_symfile_init and dbx_symfile_read. */ This routine is mostly copied from dbx_symfile_init and dbx_symfile_read. */
void void
stabsect_build_psymtabs (objfile, mainline, stab_name, stabsect_build_psymtabs (struct objfile *objfile, int mainline, char *stab_name,
stabstr_name, text_name) char *stabstr_name, char *text_name)
struct objfile *objfile;
int mainline;
char *stab_name;
char *stabstr_name;
char *text_name;
{ {
int val; int val;
bfd *sym_bfd = objfile->obfd; bfd *sym_bfd = objfile->obfd;
@ -2750,7 +2692,7 @@ static struct sym_fns aout_sym_fns =
}; };
void void
_initialize_dbxread () _initialize_dbxread (void)
{ {
add_symtab_fns (&aout_sym_fns); add_symtab_fns (&aout_sym_fns);
} }

View file

@ -173,8 +173,7 @@ DCACHE *last_cache; /* Used by info dcache */
/* Free all the data cache blocks, thus discarding all cached data. */ /* Free all the data cache blocks, thus discarding all cached data. */
void void
dcache_flush (dcache) dcache_flush (DCACHE *dcache)
DCACHE *dcache;
{ {
int i; int i;
dcache->valid_head = 0; dcache->valid_head = 0;
@ -204,9 +203,7 @@ dcache_flush (dcache)
containing it. */ containing it. */
static struct dcache_block * static struct dcache_block *
dcache_hit (dcache, addr) dcache_hit (DCACHE *dcache, CORE_ADDR addr)
DCACHE *dcache;
CORE_ADDR addr;
{ {
register struct dcache_block *db; register struct dcache_block *db;
@ -230,9 +227,7 @@ dcache_hit (dcache, addr)
be written is. */ be written is. */
static int static int
dcache_write_line (dcache, db) dcache_write_line (DCACHE *dcache, register struct dcache_block *db)
DCACHE *dcache;
register struct dcache_block *db;
{ {
int s; int s;
int e; int e;
@ -280,8 +275,7 @@ dcache_write_line (dcache, db)
list...). */ list...). */
static struct dcache_block * static struct dcache_block *
dcache_alloc (dcache) dcache_alloc (DCACHE *dcache)
DCACHE *dcache;
{ {
register struct dcache_block *db; register struct dcache_block *db;
@ -320,10 +314,7 @@ dcache_alloc (dcache)
Returns 0 on error. */ Returns 0 on error. */
static int static int
dcache_peek_byte (dcache, addr, ptr) dcache_peek_byte (DCACHE *dcache, CORE_ADDR addr, char *ptr)
DCACHE *dcache;
CORE_ADDR addr;
char *ptr;
{ {
register struct dcache_block *db = dcache_hit (dcache, addr); register struct dcache_block *db = dcache_hit (dcache, addr);
int ok = 1; int ok = 1;
@ -361,8 +352,7 @@ dcache_peek_byte (dcache, addr, ptr)
/* Writeback any dirty lines to the remote. */ /* Writeback any dirty lines to the remote. */
static int static int
dcache_writeback (dcache) dcache_writeback (DCACHE *dcache)
DCACHE *dcache;
{ {
struct dcache_block *db; struct dcache_block *db;
@ -383,10 +373,7 @@ dcache_writeback (dcache)
*/ */
static int static int
dcache_poke_byte (dcache, addr, ptr) dcache_poke_byte (DCACHE *dcache, CORE_ADDR addr, char *ptr)
DCACHE *dcache;
CORE_ADDR addr;
char *ptr;
{ {
register struct dcache_block *db = dcache_hit (dcache, addr); register struct dcache_block *db = dcache_hit (dcache, addr);
@ -405,9 +392,7 @@ dcache_poke_byte (dcache, addr, ptr)
/* Initialize the data cache. */ /* Initialize the data cache. */
DCACHE * DCACHE *
dcache_init (reading, writing) dcache_init (memxferfunc reading, memxferfunc writing)
memxferfunc reading;
memxferfunc writing;
{ {
int csize = sizeof (struct dcache_block) * DCACHE_SIZE; int csize = sizeof (struct dcache_block) * DCACHE_SIZE;
DCACHE *dcache; DCACHE *dcache;
@ -434,12 +419,8 @@ dcache_init (reading, writing)
This routine is indended to be called by remote_xfer_ functions. */ This routine is indended to be called by remote_xfer_ functions. */
int int
dcache_xfer_memory (dcache, memaddr, myaddr, len, should_write) dcache_xfer_memory (DCACHE *dcache, CORE_ADDR memaddr, char *myaddr, int len,
DCACHE *dcache; int should_write)
CORE_ADDR memaddr;
char *myaddr;
int len;
int should_write;
{ {
int i; int i;
@ -470,9 +451,7 @@ dcache_xfer_memory (dcache, memaddr, myaddr, len, should_write)
} }
static void static void
dcache_info (exp, tty) dcache_info (char *exp, int tty)
char *exp;
int tty;
{ {
struct dcache_block *p; struct dcache_block *p;
@ -510,7 +489,7 @@ set_dcache_state (int what)
} }
void void
_initialize_dcache () _initialize_dcache (void)
{ {
add_show_from_set add_show_from_set
(add_set_cmd ("remotecache", class_support, var_boolean, (add_set_cmd ("remotecache", class_support, var_boolean,

View file

@ -34,9 +34,7 @@
BLOCKEND is the address of the end of the user structure. */ BLOCKEND is the address of the end of the user structure. */
CORE_ADDR CORE_ADDR
register_addr (regno, blockend) register_addr (int regno, CORE_ADDR blockend)
int regno;
CORE_ADDR blockend;
{ {
static int sysv68reg[] = static int sysv68reg[] =
{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, -1, 15, 16}; {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, -1, 15, 16};
@ -64,7 +62,7 @@ CORE_ADDR kernel_u_addr;
/* Read the value of the u area from the kernel. */ /* Read the value of the u area from the kernel. */
void void
_initialize_delta68_nat () _initialize_delta68_nat (void)
{ {
struct nlist nl[2]; struct nlist nl[2];
@ -79,14 +77,14 @@ _initialize_delta68_nat ()
} }
} }
clear_insn_cache () clear_insn_cache (void)
{ {
#ifdef MCT_TEXT /* in sys/signal.h on sysV68 R3V7.1 */ #ifdef MCT_TEXT /* in sys/signal.h on sysV68 R3V7.1 */
memctl (0, 4096, MCT_TEXT); memctl (0, 4096, MCT_TEXT);
#endif #endif
} }
kernel_u_size () kernel_u_size (void)
{ {
return sizeof (struct user); return sizeof (struct user);
} }

View file

@ -120,10 +120,7 @@ static void set_demangling_command (char *, int, struct cmd_list_element *);
a malloc'd string, even if it is a null-string. */ a malloc'd string, even if it is a null-string. */
static void static void
set_demangling_command (ignore, from_tty, c) set_demangling_command (char *ignore, int from_tty, struct cmd_list_element *c)
char *ignore;
int from_tty;
struct cmd_list_element *c;
{ {
const struct demangler *dem; const struct demangler *dem;
@ -184,8 +181,7 @@ set_demangling_command (ignore, from_tty, c)
/* Fake a "set demangle-style" command. */ /* Fake a "set demangle-style" command. */
void void
set_demangling_style (style) set_demangling_style (char *style)
char *style;
{ {
if (current_demangling_style_string != NULL) if (current_demangling_style_string != NULL)
{ {
@ -215,14 +211,13 @@ static char cplus_markers[] =
{CPLUS_MARKER, '.', '$', '\0'}; {CPLUS_MARKER, '.', '$', '\0'};
int int
is_cplus_marker (c) is_cplus_marker (int c)
int c;
{ {
return c && strchr (cplus_markers, c) != NULL; return c && strchr (cplus_markers, c) != NULL;
} }
void void
_initialize_demangler () _initialize_demangler (void)
{ {
struct cmd_list_element *set, *show; struct cmd_list_element *set, *show;

View file

@ -30,11 +30,7 @@
static void dink32_open (char *args, int from_tty); static void dink32_open (char *args, int from_tty);
static void static void
dink32_supply_register (regname, regnamelen, val, vallen) dink32_supply_register (char *regname, int regnamelen, char *val, int vallen)
char *regname;
int regnamelen;
char *val;
int vallen;
{ {
int regno = 0; int regno = 0;
@ -100,10 +96,7 @@ dink32_supply_register (regname, regnamelen, val, vallen)
} }
static void static void
dink32_load (monops, filename, from_tty) dink32_load (struct monitor_ops *monops, char *filename, int from_tty)
struct monitor_ops *monops;
char *filename;
int from_tty;
{ {
extern int inferior_pid; extern int inferior_pid;
@ -145,15 +138,13 @@ static char *dink32_inits[] =
static struct monitor_ops dink32_cmds; static struct monitor_ops dink32_cmds;
static void static void
dink32_open (args, from_tty) dink32_open (char *args, int from_tty)
char *args;
int from_tty;
{ {
monitor_open (args, &dink32_cmds, from_tty); monitor_open (args, &dink32_cmds, from_tty);
} }
void void
_initialize_dink32_rom () _initialize_dink32_rom (void)
{ {
dink32_cmds.flags = MO_HEX_PREFIX | MO_GETMEM_NEEDS_RANGE | MO_FILL_USES_ADDR | MO_HANDLE_NL | MO_32_REGS_PAIRED | MO_SETREG_INTERACTIVE | MO_SETMEM_INTERACTIVE | MO_GETMEM_16_BOUNDARY | MO_CLR_BREAK_1_BASED | MO_SREC_ACK | MO_SREC_ACK_ROTATE; dink32_cmds.flags = MO_HEX_PREFIX | MO_GETMEM_NEEDS_RANGE | MO_FILL_USES_ADDR | MO_HANDLE_NL | MO_32_REGS_PAIRED | MO_SETREG_INTERACTIVE | MO_SETMEM_INTERACTIVE | MO_GETMEM_16_BOUNDARY | MO_CLR_BREAK_1_BASED | MO_SREC_ACK | MO_SREC_ACK_ROTATE;
dink32_cmds.init = dink32_inits; dink32_cmds.init = dink32_inits;

View file

@ -47,9 +47,7 @@ static int regmap[] =
*/ */
int int
dpx2_register_u_addr (blockend, regnum) dpx2_register_u_addr (int blockend, int regnum)
int blockend;
int regnum;
{ {
if (regnum < FP0_REGNUM) if (regnum < FP0_REGNUM)
return (blockend + 4 * regmap[regnum]); return (blockend + 4 * regmap[regnum]);
@ -73,7 +71,7 @@ dpx2_register_u_addr (blockend, regnum)
CORE_ADDR kernel_u_addr; CORE_ADDR kernel_u_addr;
void void
_initialize_dpx2_nat () _initialize_dpx2_nat (void)
{ {
struct utsname uts; struct utsname uts;

View file

@ -218,14 +218,8 @@ load_srec (desc, file, load_offset, maxrecsize, flags, hashmark, waitack)
*/ */
static int static int
make_srec (srec, targ_addr, abfd, sect, sectoff, maxrecsize, flags) make_srec (char *srec, CORE_ADDR targ_addr, bfd *abfd, asection *sect,
char *srec; int sectoff, int *maxrecsize, int flags)
CORE_ADDR targ_addr;
bfd *abfd;
asection *sect;
int sectoff;
int *maxrecsize;
int flags;
{ {
unsigned char checksum; unsigned char checksum;
int tmp; int tmp;

View file

@ -78,9 +78,7 @@ static void dst_record_line (int, CORE_ADDR);
/* FIXME: Use record_line instead. */ /* FIXME: Use record_line instead. */
static void static void
dst_record_line (line, pc) dst_record_line (int line, CORE_ADDR pc)
int line;
CORE_ADDR pc;
{ {
struct linetable_entry *e; struct linetable_entry *e;
/* Make sure line vector is big enough. */ /* Make sure line vector is big enough. */
@ -104,7 +102,7 @@ dst_record_line (line, pc)
/* FIXME: use start_symtab, like coffread.c now does. */ /* FIXME: use start_symtab, like coffread.c now does. */
static void static void
dst_start_symtab () dst_start_symtab (void)
{ {
/* Initialize the source file line number information for this file. */ /* Initialize the source file line number information for this file. */
@ -124,10 +122,7 @@ dst_start_symtab ()
text address for the file, and SIZE is the number of bytes of text. */ text address for the file, and SIZE is the number of bytes of text. */
static void static void
complete_symtab (name, start_addr, size) complete_symtab (char *name, CORE_ADDR start_addr, unsigned int size)
char *name;
CORE_ADDR start_addr;
unsigned int size;
{ {
last_source_file = savestring (name, strlen (name)); last_source_file = savestring (name, strlen (name));
cur_src_start_addr = start_addr; cur_src_start_addr = start_addr;
@ -148,8 +143,7 @@ complete_symtab (name, start_addr, size)
/* FIXME: Use end_symtab, like coffread.c now does. */ /* FIXME: Use end_symtab, like coffread.c now does. */
static void static void
dst_end_symtab (objfile) dst_end_symtab (struct objfile *objfile)
struct objfile *objfile;
{ {
register struct symtab *symtab; register struct symtab *symtab;
register struct blockvector *blockvector; register struct blockvector *blockvector;
@ -194,8 +188,7 @@ dst_end_symtab (objfile)
The ultimate result is a new symtab (or, FIXME, eventually a psymtab). */ The ultimate result is a new symtab (or, FIXME, eventually a psymtab). */
static void static void
dst_symfile_init (objfile) dst_symfile_init (struct objfile *objfile)
struct objfile *objfile;
{ {
asection *section; asection *section;
bfd *abfd = objfile->obfd; bfd *abfd = objfile->obfd;
@ -210,10 +203,7 @@ dst_symfile_init (objfile)
/* ARGSUSED */ /* ARGSUSED */
static void static void
find_dst_sections (abfd, asect, vpinfo) find_dst_sections (bfd *abfd, sec_ptr asect, PTR vpinfo)
bfd *abfd;
sec_ptr asect;
PTR vpinfo;
{ {
int size, count; int size, count;
long base; long base;
@ -252,9 +242,7 @@ static bfd *symfile_bfd;
/* ARGSUSED */ /* ARGSUSED */
static void static void
dst_symfile_read (objfile, mainline) dst_symfile_read (struct objfile *objfile, int mainline)
struct objfile *objfile;
int mainline;
{ {
bfd *abfd = objfile->obfd; bfd *abfd = objfile->obfd;
char *name = bfd_get_filename (abfd); char *name = bfd_get_filename (abfd);
@ -301,8 +289,7 @@ dst_symfile_read (objfile, mainline)
} }
static void static void
dst_new_init (ignore) dst_new_init (struct objfile *ignore)
struct objfile *ignore;
{ {
/* Nothin' to do */ /* Nothin' to do */
} }
@ -313,8 +300,7 @@ dst_new_init (ignore)
objfile struct from the global list of known objfiles. */ objfile struct from the global list of known objfiles. */
static void static void
dst_symfile_finish (objfile) dst_symfile_finish (struct objfile *objfile)
struct objfile *objfile;
{ {
/* Nothing to do */ /* Nothing to do */
} }
@ -327,9 +313,7 @@ dst_symfile_finish (objfile)
* this is what was really intended. * this is what was really intended.
*/ */
static int static int
get_dst_line (buffer, pc) get_dst_line (signed char **buffer, long *pc)
signed char **buffer;
long *pc;
{ {
static last_pc = 0; static last_pc = 0;
static long last_line = 0; static long last_line = 0;
@ -433,18 +417,14 @@ get_dst_line (buffer, pc)
} }
static void static void
enter_all_lines (buffer, address) enter_all_lines (char *buffer, long address)
char *buffer;
long address;
{ {
if (buffer) if (buffer)
while (get_dst_line (&buffer, &address)); while (get_dst_line (&buffer, &address));
} }
static int static int
get_dst_entry (buffer, ret_entry) get_dst_entry (char *buffer, dst_rec_ptr_t *ret_entry)
char *buffer;
dst_rec_ptr_t *ret_entry;
{ {
int size; int size;
dst_rec_ptr_t entry; dst_rec_ptr_t entry;
@ -666,10 +646,7 @@ get_dst_entry (buffer, ret_entry)
} }
static int static int
next_dst_entry (buffer, entry, table) next_dst_entry (char **buffer, dst_rec_ptr_t *entry, dst_sec *table)
char **buffer;
dst_rec_ptr_t *entry;
dst_sec *table;
{ {
if (*buffer - table->buffer >= table->size) if (*buffer - table->buffer >= table->size)
{ {
@ -687,8 +664,7 @@ next_dst_entry (buffer, entry, table)
static dst_rec_ptr_t section_table = NULL; static dst_rec_ptr_t section_table = NULL;
char * char *
get_sec_ref (ref) get_sec_ref (dst_sect_ref_t *ref)
dst_sect_ref_t *ref;
{ {
dst_sec *section = NULL; dst_sec *section = NULL;
long offset; long offset;
@ -720,8 +696,7 @@ dst_get_addr (int section, long offset)
} }
CORE_ADDR CORE_ADDR
dst_sym_addr (ref) dst_sym_addr (dst_sect_ref_t *ref)
dst_sect_ref_t *ref;
{ {
if (!section_table || !ref->sect_index) if (!section_table || !ref->sect_index)
return 0; return 0;
@ -730,8 +705,7 @@ dst_sym_addr (ref)
} }
static struct type * static struct type *
create_new_type (objfile) create_new_type (struct objfile *objfile)
struct objfile *objfile;
{ {
struct type *type; struct type *type;
@ -742,9 +716,7 @@ create_new_type (objfile)
} }
static struct symbol * static struct symbol *
create_new_symbol (objfile, name) create_new_symbol (struct objfile *objfile, char *name)
struct objfile *objfile;
char *name;
{ {
struct symbol *sym = (struct symbol *) struct symbol *sym = (struct symbol *)
obstack_alloc (&objfile->symbol_obstack, sizeof (struct symbol)); obstack_alloc (&objfile->symbol_obstack, sizeof (struct symbol));
@ -761,10 +733,8 @@ create_new_symbol (objfile, name)
static struct type *decode_dst_type (struct objfile *, dst_rec_ptr_t); static struct type *decode_dst_type (struct objfile *, dst_rec_ptr_t);
static struct type * static struct type *
decode_type_desc (objfile, type_desc, base) decode_type_desc (struct objfile *objfile, dst_type_t *type_desc,
struct objfile *objfile; dst_rec_ptr_t base)
dst_type_t *type_desc;
dst_rec_ptr_t base;
{ {
struct type *type; struct type *type;
dst_rec_ptr_t entry; dst_rec_ptr_t entry;
@ -862,8 +832,7 @@ struct structure_list
static struct structure_list *struct_list = NULL; static struct structure_list *struct_list = NULL;
static struct type * static struct type *
find_dst_structure (name) find_dst_structure (char *name)
char *name;
{ {
struct structure_list *element; struct structure_list *element;
@ -875,11 +844,8 @@ find_dst_structure (name)
static struct type * static struct type *
decode_dst_structure (objfile, entry, code, version) decode_dst_structure (struct objfile *objfile, dst_rec_ptr_t entry, int code,
struct objfile *objfile; int version)
dst_rec_ptr_t entry;
int code;
int version;
{ {
struct type *type, *child_type; struct type *type, *child_type;
char *struct_name; char *struct_name;
@ -981,9 +947,7 @@ decode_dst_structure (objfile, entry, code, version)
} }
static struct type * static struct type *
decode_dst_type (objfile, entry) decode_dst_type (struct objfile *objfile, dst_rec_ptr_t entry)
struct objfile *objfile;
dst_rec_ptr_t entry;
{ {
struct type *child_type, *type, *range_type, *index_type; struct type *child_type, *type, *range_type, *index_type;
@ -1047,9 +1011,7 @@ static struct symbol_list *dst_global_symbols = NULL;
static int total_globals = 0; static int total_globals = 0;
static void static void
decode_dst_locstring (locstr, sym) decode_dst_locstring (char *locstr, struct symbol *sym)
char *locstr;
struct symbol *sym;
{ {
dst_loc_entry_t *entry, *next_entry; dst_loc_entry_t *entry, *next_entry;
CORE_ADDR temp; CORE_ADDR temp;
@ -1166,11 +1128,8 @@ decode_dst_locstring (locstr, sym)
} }
static struct symbol_list * static struct symbol_list *
process_dst_symbols (objfile, entry, name, nsyms_ret) process_dst_symbols (struct objfile *objfile, dst_rec_ptr_t entry, char *name,
struct objfile *objfile; int *nsyms_ret)
dst_rec_ptr_t entry;
char *name;
int *nsyms_ret;
{ {
struct symbol_list *list = NULL, *element; struct symbol_list *list = NULL, *element;
struct symbol *sym; struct symbol *sym;
@ -1308,11 +1267,8 @@ process_dst_symbols (objfile, entry, name, nsyms_ret)
static struct symbol * static struct symbol *
process_dst_function (objfile, entry, name, address) process_dst_function (struct objfile *objfile, dst_rec_ptr_t entry, char *name,
struct objfile *objfile; CORE_ADDR address)
dst_rec_ptr_t entry;
char *name;
CORE_ADDR address;
{ {
struct symbol *sym; struct symbol *sym;
struct type *type, *ftype; struct type *type, *ftype;
@ -1369,9 +1325,7 @@ process_dst_function (objfile, entry, name, address)
} }
static struct block * static struct block *
process_dst_block (objfile, entry) process_dst_block (struct objfile *objfile, dst_rec_ptr_t entry)
struct objfile *objfile;
dst_rec_ptr_t entry;
{ {
struct block *block; struct block *block;
struct symbol *function = NULL; struct symbol *function = NULL;
@ -1498,8 +1452,7 @@ process_dst_block (objfile, entry)
static void static void
read_dst_symtab (objfile) read_dst_symtab (struct objfile *objfile)
struct objfile *objfile;
{ {
char *buffer; char *buffer;
dst_rec_ptr_t entry, file_table, root_block; dst_rec_ptr_t entry, file_table, root_block;
@ -1595,9 +1548,7 @@ static unsigned long linetab_size;
external (unswapped) format in memory; we'll swap them as we enter external (unswapped) format in memory; we'll swap them as we enter
them into GDB's data structures. */ them into GDB's data structures. */
static int static int
init_one_section (chan, secinfo) init_one_section (int chan, dst_sec *secinfo)
int chan;
dst_sec *secinfo;
{ {
if (secinfo->size == 0 if (secinfo->size == 0
|| lseek (chan, secinfo->position, 0) == -1 || lseek (chan, secinfo->position, 0) == -1
@ -1609,8 +1560,7 @@ init_one_section (chan, secinfo)
} }
static int static int
init_dst_sections (chan) init_dst_sections (int chan)
int chan;
{ {
if (!init_one_section (chan, &blocks_info) || if (!init_one_section (chan, &blocks_info) ||
@ -1652,7 +1602,7 @@ static struct sym_fns dst_sym_fns =
}; };
void void
_initialize_dstread () _initialize_dstread (void)
{ {
add_symtab_fns (&dst_sym_fns); add_symtab_fns (&dst_sym_fns);
} }

View file

@ -373,11 +373,7 @@ static struct bit_field cause_fields[] =
the hex value before passing it to monitor_supply_register. */ the hex value before passing it to monitor_supply_register. */
static void static void
r3900_supply_register (regname, regnamelen, val, vallen) r3900_supply_register (char *regname, int regnamelen, char *val, int vallen)
char *regname;
int regnamelen;
char *val;
int vallen;
{ {
int regno = -1; int regno = -1;
int i; int i;
@ -416,7 +412,7 @@ r3900_supply_register (regname, regnamelen, val, vallen)
you modify it. */ you modify it. */
static void static void
fetch_bad_vaddr () fetch_bad_vaddr (void)
{ {
char buf[20]; char buf[20];
@ -431,8 +427,7 @@ fetch_bad_vaddr ()
combined binary value. */ combined binary value. */
static unsigned long static unsigned long
fetch_fields (bf) fetch_fields (struct bit_field *bf)
struct bit_field *bf;
{ {
char buf[20]; char buf[20];
unsigned long val = 0; unsigned long val = 0;
@ -456,9 +451,7 @@ fetch_fields (bf)
static void static void
fetch_bitmapped_register (regno, bf) fetch_bitmapped_register (int regno, struct bit_field *bf)
int regno;
struct bit_field *bf;
{ {
unsigned long val; unsigned long val;
unsigned char regbuf[MAX_REGISTER_RAW_SIZE]; unsigned char regbuf[MAX_REGISTER_RAW_SIZE];
@ -482,8 +475,7 @@ fetch_bitmapped_register (regno, bf)
a very unusual fashion by the monitor, and must be handled specially. */ a very unusual fashion by the monitor, and must be handled specially. */
static void static void
r3900_fetch_registers (regno) r3900_fetch_registers (int regno)
int regno;
{ {
switch (regno) switch (regno)
{ {
@ -505,9 +497,7 @@ r3900_fetch_registers (regno)
/* Write the new value of the bitmapped register to the monitor. */ /* Write the new value of the bitmapped register to the monitor. */
static void static void
store_bitmapped_register (regno, bf) store_bitmapped_register (int regno, struct bit_field *bf)
int regno;
struct bit_field *bf;
{ {
unsigned long oldval, newval; unsigned long oldval, newval;
@ -537,8 +527,7 @@ store_bitmapped_register (regno, bf)
static void static void
r3900_store_registers (regno) r3900_store_registers (int regno)
int regno;
{ {
switch (regno) switch (regno)
{ {
@ -557,9 +546,7 @@ r3900_store_registers (regno)
/* Write a 4-byte integer to the buffer in big-endian order. */ /* Write a 4-byte integer to the buffer in big-endian order. */
static void static void
write_long (buf, n) write_long (char *buf, long n)
char *buf;
long n;
{ {
buf[0] = (n >> 24) & 0xff; buf[0] = (n >> 24) & 0xff;
buf[1] = (n >> 16) & 0xff; buf[1] = (n >> 16) & 0xff;
@ -571,9 +558,7 @@ write_long (buf, n)
/* Write a 4-byte integer to the buffer in little-endian order. */ /* Write a 4-byte integer to the buffer in little-endian order. */
static void static void
write_long_le (buf, n) write_long_le (char *buf, long n)
char *buf;
long n;
{ {
buf[0] = n & 0xff; buf[0] = n & 0xff;
buf[1] = (n >> 8) & 0xff; buf[1] = (n >> 8) & 0xff;
@ -587,8 +572,7 @@ write_long_le (buf, n)
character in hexadecimal; otherwise, print it in ASCII. */ character in hexadecimal; otherwise, print it in ASCII. */
static int static int
debug_readchar (hex) debug_readchar (int hex)
int hex;
{ {
char buf[10]; char buf[10];
int c = monitor_readchar (); int c = monitor_readchar ();
@ -614,9 +598,7 @@ debug_readchar (hex)
print the sent buffer in hex. */ print the sent buffer in hex. */
static void static void
debug_write (buf, buflen) debug_write (unsigned char *buf, int buflen)
unsigned char *buf;
int buflen;
{ {
char s[10]; char s[10];
@ -649,7 +631,7 @@ debug_write (buf, buflen)
*/ */
static void static void
ignore_packet () ignore_packet (void)
{ {
int c; int c;
int len; int len;
@ -688,10 +670,7 @@ ignore_packet ()
*/ */
static void static void
send_packet (type, buf, buflen, seq) send_packet (char type, unsigned char *buf, int buflen, int seq)
char type;
unsigned char *buf;
int buflen, seq;
{ {
unsigned char hdr[4]; unsigned char hdr[4];
int len = buflen; int len = buflen;
@ -764,9 +743,7 @@ send_packet (type, buf, buflen, seq)
*/ */
static void static void
process_read_request (buf, buflen) process_read_request (unsigned char *buf, int buflen)
unsigned char *buf;
int buflen;
{ {
unsigned char len[4]; unsigned char len[4];
int i, chunk; int i, chunk;
@ -802,10 +779,7 @@ process_read_request (buf, buflen)
/* Count loadable sections (helper function for r3900_load). */ /* Count loadable sections (helper function for r3900_load). */
static void static void
count_section (abfd, s, section_count) count_section (bfd *abfd, asection *s, unsigned int *section_count)
bfd *abfd;
asection *s;
unsigned int *section_count;
{ {
if (s->flags & SEC_LOAD && bfd_section_size (abfd, s) != 0) if (s->flags & SEC_LOAD && bfd_section_size (abfd, s) != 0)
(*section_count)++; (*section_count)++;
@ -827,10 +801,7 @@ count_section (abfd, s, section_count)
*/ */
static void static void
load_section (abfd, s, data_count) load_section (bfd *abfd, asection *s, unsigned int *data_count)
bfd *abfd;
asection *s;
unsigned int *data_count;
{ {
if (s->flags & SEC_LOAD) if (s->flags & SEC_LOAD)
{ {
@ -886,9 +857,7 @@ load_section (abfd, s, data_count)
*/ */
static void static void
r3900_load (filename, from_tty) r3900_load (char *filename, int from_tty)
char *filename;
int from_tty;
{ {
bfd *abfd; bfd *abfd;
unsigned int data_count = 0; unsigned int data_count = 0;
@ -990,9 +959,7 @@ static struct target_ops r3900_ops;
static struct monitor_ops r3900_cmds; static struct monitor_ops r3900_cmds;
static void static void
r3900_open (args, from_tty) r3900_open (char *args, int from_tty)
char *args;
int from_tty;
{ {
char buf[64]; char buf[64];
int i; int i;
@ -1023,7 +990,7 @@ r3900_open (args, from_tty)
} }
void void
_initialize_r3900_rom () _initialize_r3900_rom (void)
{ {
r3900_cmds.flags = MO_NO_ECHO_ON_OPEN | r3900_cmds.flags = MO_NO_ECHO_ON_OPEN |
MO_ADDR_BITS_REMOVE | MO_ADDR_BITS_REMOVE |

View file

@ -776,8 +776,7 @@ static struct die_info *dwarf_alloc_die (void);
information and return true if we have enough to do something. */ information and return true if we have enough to do something. */
int int
dwarf2_has_info (abfd) dwarf2_has_info (bfd *abfd)
bfd *abfd;
{ {
dwarf_info_offset = dwarf_abbrev_offset = dwarf_line_offset = 0; dwarf_info_offset = dwarf_abbrev_offset = dwarf_line_offset = 0;
bfd_map_over_sections (abfd, dwarf2_locate_sections, NULL); bfd_map_over_sections (abfd, dwarf2_locate_sections, NULL);
@ -796,10 +795,7 @@ dwarf2_has_info (abfd)
in. */ in. */
static void static void
dwarf2_locate_sections (ignore_abfd, sectp, ignore_ptr) dwarf2_locate_sections (bfd *ignore_abfd, asection *sectp, PTR ignore_ptr)
bfd *ignore_abfd;
asection *sectp;
PTR ignore_ptr;
{ {
if (STREQ (sectp->name, INFO_SECTION)) if (STREQ (sectp->name, INFO_SECTION))
{ {
@ -846,9 +842,7 @@ dwarf2_locate_sections (ignore_abfd, sectp, ignore_ptr)
/* Build a partial symbol table. */ /* Build a partial symbol table. */
void void
dwarf2_build_psymtabs (objfile, mainline) dwarf2_build_psymtabs (struct objfile *objfile, int mainline)
struct objfile *objfile;
int mainline;
{ {
/* We definitely need the .debug_info and .debug_abbrev sections */ /* We definitely need the .debug_info and .debug_abbrev sections */
@ -891,9 +885,7 @@ dwarf2_build_psymtabs (objfile, mainline)
.debug_pubnames and .debug_aranges sections. */ .debug_pubnames and .debug_aranges sections. */
static void static void
dwarf2_build_psymtabs_easy (objfile, mainline) dwarf2_build_psymtabs_easy (struct objfile *objfile, int mainline)
struct objfile *objfile;
int mainline;
{ {
bfd *abfd = objfile->obfd; bfd *abfd = objfile->obfd;
char *aranges_buffer, *pubnames_buffer; char *aranges_buffer, *pubnames_buffer;
@ -950,9 +942,7 @@ read_comp_unit_head (struct comp_unit_head *cu_header,
.debug_info and .debug_abbrev sections. */ .debug_info and .debug_abbrev sections. */
static void static void
dwarf2_build_psymtabs_hard (objfile, mainline) dwarf2_build_psymtabs_hard (struct objfile *objfile, int mainline)
struct objfile *objfile;
int mainline;
{ {
/* Instead of reading this into a big buffer, we should probably use /* Instead of reading this into a big buffer, we should probably use
mmap() on architectures that support it. (FIXME) */ mmap() on architectures that support it. (FIXME) */
@ -1278,8 +1268,7 @@ add_partial_symbol (struct partial_die_info *pdi, struct objfile *objfile,
/* Expand this partial symbol table into a full symbol table. */ /* Expand this partial symbol table into a full symbol table. */
static void static void
dwarf2_psymtab_to_symtab (pst) dwarf2_psymtab_to_symtab (struct partial_symtab *pst)
struct partial_symtab *pst;
{ {
/* FIXME: This is barely more than a stub. */ /* FIXME: This is barely more than a stub. */
if (pst != NULL) if (pst != NULL)
@ -1306,8 +1295,7 @@ dwarf2_psymtab_to_symtab (pst)
} }
static void static void
psymtab_to_symtab_1 (pst) psymtab_to_symtab_1 (struct partial_symtab *pst)
struct partial_symtab *pst;
{ {
struct objfile *objfile = pst->objfile; struct objfile *objfile = pst->objfile;
bfd *abfd = objfile->obfd; bfd *abfd = objfile->obfd;
@ -1684,11 +1672,8 @@ read_lexical_block_scope (struct die_info *die, struct objfile *objfile,
Return 1 if the attributes are present and valid, otherwise, return 0. */ Return 1 if the attributes are present and valid, otherwise, return 0. */
static int static int
dwarf2_get_pc_bounds (die, lowpc, highpc, objfile) dwarf2_get_pc_bounds (struct die_info *die, CORE_ADDR *lowpc, CORE_ADDR *highpc,
struct die_info *die; struct objfile *objfile)
CORE_ADDR *lowpc;
CORE_ADDR *highpc;
struct objfile *objfile;
{ {
struct attribute *attr; struct attribute *attr;
CORE_ADDR low; CORE_ADDR low;
@ -1885,10 +1870,8 @@ dwarf2_add_field (struct field_info *fip, struct die_info *die,
/* Create the vector of fields, and attach it to the type. */ /* Create the vector of fields, and attach it to the type. */
static void static void
dwarf2_attach_fields_to_type (fip, type, objfile) dwarf2_attach_fields_to_type (struct field_info *fip, struct type *type,
struct field_info *fip; struct objfile *objfile)
struct type *type;
struct objfile *objfile;
{ {
int nfields = fip->nfields; int nfields = fip->nfields;
@ -2102,10 +2085,8 @@ dwarf2_add_member_fn (struct field_info *fip, struct die_info *die,
/* Create the vector of member function fields, and attach it to the type. */ /* Create the vector of member function fields, and attach it to the type. */
static void static void
dwarf2_attach_fn_fields_to_type (fip, type, objfile) dwarf2_attach_fn_fields_to_type (struct field_info *fip, struct type *type,
struct field_info *fip; struct objfile *objfile)
struct type *type;
struct objfile *objfile;
{ {
struct fnfieldlist *flp; struct fnfieldlist *flp;
int total_length = 0; int total_length = 0;
@ -2684,9 +2665,7 @@ read_tag_volatile_type (struct die_info *die, struct objfile *objfile,
attribute to reference it. */ attribute to reference it. */
static void static void
read_tag_string_type (die, objfile) read_tag_string_type (struct die_info *die, struct objfile *objfile)
struct die_info *die;
struct objfile *objfile;
{ {
struct type *type, *range_type, *index_type, *char_type; struct type *type, *range_type, *index_type, *char_type;
struct attribute *attr; struct attribute *attr;
@ -2827,9 +2806,7 @@ read_typedef (struct die_info *die, struct objfile *objfile,
it in the TYPE field of the die. */ it in the TYPE field of the die. */
static void static void
read_base_type (die, objfile) read_base_type (struct die_info *die, struct objfile *objfile)
struct die_info *die;
struct objfile *objfile;
{ {
struct type *type; struct type *type;
struct attribute *attr; struct attribute *attr;
@ -2948,8 +2925,7 @@ read_comp_unit (char *info_ptr, bfd *abfd,
/* Free a linked list of dies. */ /* Free a linked list of dies. */
static void static void
free_die_list (dies) free_die_list (struct die_info *dies)
struct die_info *dies;
{ {
struct die_info *die, *next; struct die_info *die, *next;
@ -2980,10 +2956,8 @@ make_cleanup_free_die_list (struct die_info *dies)
object file specified by OBJFILE into the psymbol_obstack and return it. */ object file specified by OBJFILE into the psymbol_obstack and return it. */
static char * static char *
dwarf2_read_section (objfile, offset, size) dwarf2_read_section (struct objfile *objfile, file_ptr offset,
struct objfile *objfile; unsigned int size)
file_ptr offset;
unsigned int size;
{ {
bfd *abfd = objfile->obfd; bfd *abfd = objfile->obfd;
char *buf; char *buf;
@ -3008,9 +2982,7 @@ dwarf2_read_section (objfile, offset, size)
in a hash table. */ in a hash table. */
static void static void
dwarf2_read_abbrevs (abfd, offset) dwarf2_read_abbrevs (bfd *abfd, unsigned int offset)
bfd *abfd;
unsigned int offset;
{ {
char *abbrev_ptr; char *abbrev_ptr;
struct abbrev_info *cur_abbrev; struct abbrev_info *cur_abbrev;
@ -3083,8 +3055,7 @@ dwarf2_read_abbrevs (abfd, offset)
/* ARGSUSED */ /* ARGSUSED */
static void static void
dwarf2_empty_abbrev_table (ignore) dwarf2_empty_abbrev_table (PTR ignore)
PTR ignore;
{ {
int i; int i;
struct abbrev_info *abbrev, *next; struct abbrev_info *abbrev, *next;
@ -3107,8 +3078,7 @@ dwarf2_empty_abbrev_table (ignore)
/* Lookup an abbrev_info structure in the abbrev hash table. */ /* Lookup an abbrev_info structure in the abbrev hash table. */
static struct abbrev_info * static struct abbrev_info *
dwarf2_lookup_abbrev (number) dwarf2_lookup_abbrev (unsigned int number)
unsigned int number;
{ {
unsigned int hash_number; unsigned int hash_number;
struct abbrev_info *abbrev; struct abbrev_info *abbrev;
@ -3416,57 +3386,43 @@ read_attribute (struct attribute *attr, struct attr_abbrev *abbrev,
/* read dwarf information from a buffer */ /* read dwarf information from a buffer */
static unsigned int static unsigned int
read_1_byte (abfd, buf) read_1_byte (bfd *abfd, char *buf)
bfd *abfd;
char *buf;
{ {
return bfd_get_8 (abfd, (bfd_byte *) buf); return bfd_get_8 (abfd, (bfd_byte *) buf);
} }
static int static int
read_1_signed_byte (abfd, buf) read_1_signed_byte (bfd *abfd, char *buf)
bfd *abfd;
char *buf;
{ {
return bfd_get_signed_8 (abfd, (bfd_byte *) buf); return bfd_get_signed_8 (abfd, (bfd_byte *) buf);
} }
static unsigned int static unsigned int
read_2_bytes (abfd, buf) read_2_bytes (bfd *abfd, char *buf)
bfd *abfd;
char *buf;
{ {
return bfd_get_16 (abfd, (bfd_byte *) buf); return bfd_get_16 (abfd, (bfd_byte *) buf);
} }
static int static int
read_2_signed_bytes (abfd, buf) read_2_signed_bytes (bfd *abfd, char *buf)
bfd *abfd;
char *buf;
{ {
return bfd_get_signed_16 (abfd, (bfd_byte *) buf); return bfd_get_signed_16 (abfd, (bfd_byte *) buf);
} }
static unsigned int static unsigned int
read_4_bytes (abfd, buf) read_4_bytes (bfd *abfd, char *buf)
bfd *abfd;
char *buf;
{ {
return bfd_get_32 (abfd, (bfd_byte *) buf); return bfd_get_32 (abfd, (bfd_byte *) buf);
} }
static int static int
read_4_signed_bytes (abfd, buf) read_4_signed_bytes (bfd *abfd, char *buf)
bfd *abfd;
char *buf;
{ {
return bfd_get_signed_32 (abfd, (bfd_byte *) buf); return bfd_get_signed_32 (abfd, (bfd_byte *) buf);
} }
static unsigned long static unsigned long
read_8_bytes (abfd, buf) read_8_bytes (bfd *abfd, char *buf)
bfd *abfd;
char *buf;
{ {
return bfd_get_64 (abfd, (bfd_byte *) buf); return bfd_get_64 (abfd, (bfd_byte *) buf);
} }
@ -3517,10 +3473,7 @@ read_address (bfd *abfd, char *buf, const struct comp_unit_head *cu_header,
} }
static char * static char *
read_n_bytes (abfd, buf, size) read_n_bytes (bfd *abfd, char *buf, unsigned int size)
bfd *abfd;
char *buf;
unsigned int size;
{ {
/* If the size of a host char is 8 bits, we can return a pointer /* If the size of a host char is 8 bits, we can return a pointer
to the buffer, otherwise we have to copy the data to a buffer to the buffer, otherwise we have to copy the data to a buffer
@ -3542,10 +3495,7 @@ read_n_bytes (abfd, buf, size)
} }
static char * static char *
read_string (abfd, buf, bytes_read_ptr) read_string (bfd *abfd, char *buf, unsigned int *bytes_read_ptr)
bfd *abfd;
char *buf;
unsigned int *bytes_read_ptr;
{ {
/* If the size of a host char is 8 bits, we can return a pointer /* If the size of a host char is 8 bits, we can return a pointer
to the string, otherwise we have to copy the string to a buffer to the string, otherwise we have to copy the string to a buffer
@ -3580,10 +3530,7 @@ read_string (abfd, buf, bytes_read_ptr)
} }
static unsigned long static unsigned long
read_unsigned_leb128 (abfd, buf, bytes_read_ptr) read_unsigned_leb128 (bfd *abfd, char *buf, unsigned int *bytes_read_ptr)
bfd *abfd;
char *buf;
unsigned int *bytes_read_ptr;
{ {
unsigned long result; unsigned long result;
unsigned int num_read; unsigned int num_read;
@ -3611,10 +3558,7 @@ read_unsigned_leb128 (abfd, buf, bytes_read_ptr)
} }
static long static long
read_signed_leb128 (abfd, buf, bytes_read_ptr) read_signed_leb128 (bfd *abfd, char *buf, unsigned int *bytes_read_ptr)
bfd *abfd;
char *buf;
unsigned int *bytes_read_ptr;
{ {
long result; long result;
int i, shift, size, num_read; int i, shift, size, num_read;
@ -3646,8 +3590,7 @@ read_signed_leb128 (abfd, buf, bytes_read_ptr)
} }
static void static void
set_cu_language (lang) set_cu_language (unsigned int lang)
unsigned int lang;
{ {
switch (lang) switch (lang)
{ {
@ -3680,9 +3623,7 @@ set_cu_language (lang)
/* Return the named attribute or NULL if not there. */ /* Return the named attribute or NULL if not there. */
static struct attribute * static struct attribute *
dwarf_attr (die, name) dwarf_attr (struct die_info *die, unsigned int name)
struct die_info *die;
unsigned int name;
{ {
unsigned int i; unsigned int i;
struct attribute *spec = NULL; struct attribute *spec = NULL;
@ -4005,9 +3946,7 @@ done:
subfile, so that `break /srcdir/list0.c:1' works as expected. */ subfile, so that `break /srcdir/list0.c:1' works as expected. */
static void static void
dwarf2_start_subfile (filename, dirname) dwarf2_start_subfile (char *filename, char *dirname)
char *filename;
char *dirname;
{ {
/* If the filename isn't absolute, try to match an existing subfile /* If the filename isn't absolute, try to match an existing subfile
with the full pathname. */ with the full pathname. */
@ -4453,9 +4392,7 @@ die_containing_type (struct die_info *die, struct objfile *objfile,
#if 0 #if 0
static struct type * static struct type *
type_at_offset (offset, objfile) type_at_offset (unsigned int offset, struct objfile *objfile)
unsigned int offset;
struct objfile *objfile;
{ {
struct die_info *die; struct die_info *die;
struct type *type; struct type *type;
@ -4574,10 +4511,7 @@ read_type_die (struct die_info *die, struct objfile *objfile,
} }
static struct type * static struct type *
dwarf_base_type (encoding, size, objfile) dwarf_base_type (int encoding, int size, struct objfile *objfile)
int encoding;
int size;
struct objfile *objfile;
{ {
/* FIXME - this should not produce a new (struct type *) /* FIXME - this should not produce a new (struct type *)
every time. It should cache base types. */ every time. It should cache base types. */
@ -4654,8 +4588,7 @@ dwarf_base_type (encoding, size, objfile)
#if 0 #if 0
struct die_info * struct die_info *
copy_die (old_die) copy_die (struct die_info *old_die)
struct die_info *old_die;
{ {
struct die_info *new_die; struct die_info *new_die;
int i, num_attrs; int i, num_attrs;
@ -4689,8 +4622,7 @@ copy_die (old_die)
/* Return sibling of die, NULL if no sibling. */ /* Return sibling of die, NULL if no sibling. */
struct die_info * struct die_info *
sibling_die (die) sibling_die (struct die_info *die)
struct die_info *die;
{ {
int nesting_level = 0; int nesting_level = 0;
@ -4734,8 +4666,7 @@ sibling_die (die)
/* Get linkage name of a die, return NULL if not found. */ /* Get linkage name of a die, return NULL if not found. */
static char * static char *
dwarf2_linkage_name (die) dwarf2_linkage_name (struct die_info *die)
struct die_info *die;
{ {
struct attribute *attr; struct attribute *attr;
@ -4751,8 +4682,7 @@ dwarf2_linkage_name (die)
/* Convert a DIE tag into its string name. */ /* Convert a DIE tag into its string name. */
static char * static char *
dwarf_tag_name (tag) dwarf_tag_name (register unsigned tag)
register unsigned tag;
{ {
switch (tag) switch (tag)
{ {
@ -4868,8 +4798,7 @@ dwarf_tag_name (tag)
/* Convert a DWARF attribute code into its string name. */ /* Convert a DWARF attribute code into its string name. */
static char * static char *
dwarf_attr_name (attr) dwarf_attr_name (register unsigned attr)
register unsigned attr;
{ {
switch (attr) switch (attr)
{ {
@ -5035,8 +4964,7 @@ dwarf_attr_name (attr)
/* Convert a DWARF value form code into its string name. */ /* Convert a DWARF value form code into its string name. */
static char * static char *
dwarf_form_name (form) dwarf_form_name (register unsigned form)
register unsigned form;
{ {
switch (form) switch (form)
{ {
@ -5090,8 +5018,7 @@ dwarf_form_name (form)
/* Convert a DWARF stack opcode into its string name. */ /* Convert a DWARF stack opcode into its string name. */
static char * static char *
dwarf_stack_op_name (op) dwarf_stack_op_name (register unsigned op)
register unsigned op;
{ {
switch (op) switch (op)
{ {
@ -5391,8 +5318,7 @@ dwarf_stack_op_name (op)
} }
static char * static char *
dwarf_bool_name (mybool) dwarf_bool_name (unsigned mybool)
unsigned mybool;
{ {
if (mybool) if (mybool)
return "TRUE"; return "TRUE";
@ -5403,8 +5329,7 @@ dwarf_bool_name (mybool)
/* Convert a DWARF type code into its string name. */ /* Convert a DWARF type code into its string name. */
static char * static char *
dwarf_type_encoding_name (enc) dwarf_type_encoding_name (register unsigned enc)
register unsigned enc;
{ {
switch (enc) switch (enc)
{ {
@ -5433,8 +5358,7 @@ dwarf_type_encoding_name (enc)
#if 0 #if 0
static char * static char *
dwarf_cfi_name (cfi_opc) dwarf_cfi_name (register unsigned cfi_opc)
register unsigned cfi_opc;
{ {
switch (cfi_opc) switch (cfi_opc)
{ {
@ -5484,8 +5408,7 @@ dwarf_cfi_name (cfi_opc)
#endif #endif
void void
dump_die (die) dump_die (struct die_info *die)
struct die_info *die;
{ {
unsigned int i; unsigned int i;
@ -5547,8 +5470,7 @@ dump_die (die)
} }
void void
dump_die_list (die) dump_die_list (struct die_info *die)
struct die_info *die;
{ {
while (die) while (die)
{ {
@ -5558,9 +5480,7 @@ dump_die_list (die)
} }
void void
store_in_ref_table (offset, die) store_in_ref_table (unsigned int offset, struct die_info *die)
unsigned int offset;
struct die_info *die;
{ {
int h; int h;
struct die_info *old; struct die_info *old;
@ -5573,15 +5493,14 @@ store_in_ref_table (offset, die)
static void static void
dwarf2_empty_hash_tables () dwarf2_empty_hash_tables (void)
{ {
memset (die_ref_table, 0, sizeof (die_ref_table)); memset (die_ref_table, 0, sizeof (die_ref_table));
memset (dwarf2_cached_types, 0, sizeof(dwarf2_cached_types)); memset (dwarf2_cached_types, 0, sizeof(dwarf2_cached_types));
} }
static unsigned int static unsigned int
dwarf2_get_ref_die_offset (attr) dwarf2_get_ref_die_offset (struct attribute *attr)
struct attribute *attr;
{ {
unsigned int result = 0; unsigned int result = 0;
@ -5603,8 +5522,7 @@ dwarf2_get_ref_die_offset (attr)
} }
struct die_info * struct die_info *
follow_die_ref (offset) follow_die_ref (unsigned int offset)
unsigned int offset;
{ {
struct die_info *die; struct die_info *die;
int h; int h;
@ -5623,9 +5541,7 @@ follow_die_ref (offset)
} }
static struct type * static struct type *
dwarf2_fundamental_type (objfile, typeid) dwarf2_fundamental_type (struct objfile *objfile, int typeid)
struct objfile *objfile;
int typeid;
{ {
if (typeid < 0 || typeid >= FT_NUM_MEMBERS) if (typeid < 0 || typeid >= FT_NUM_MEMBERS)
{ {
@ -5893,14 +5809,13 @@ decode_locdesc (struct dwarf_block *blk, struct objfile *objfile,
/* ARGSUSED */ /* ARGSUSED */
static void static void
dwarf2_free_tmp_obstack (ignore) dwarf2_free_tmp_obstack (PTR ignore)
PTR ignore;
{ {
obstack_free (&dwarf2_tmp_obstack, NULL); obstack_free (&dwarf2_tmp_obstack, NULL);
} }
static struct dwarf_block * static struct dwarf_block *
dwarf_alloc_block () dwarf_alloc_block (void)
{ {
struct dwarf_block *blk; struct dwarf_block *blk;
@ -5910,7 +5825,7 @@ dwarf_alloc_block ()
} }
static struct abbrev_info * static struct abbrev_info *
dwarf_alloc_abbrev () dwarf_alloc_abbrev (void)
{ {
struct abbrev_info *abbrev; struct abbrev_info *abbrev;
@ -5920,7 +5835,7 @@ dwarf_alloc_abbrev ()
} }
static struct die_info * static struct die_info *
dwarf_alloc_die () dwarf_alloc_die (void)
{ {
struct die_info *die; struct die_info *die;

View file

@ -576,9 +576,7 @@ static struct type *dwarf_fundamental_type (struct objfile *, int);
*/ */
static struct type * static struct type *
dwarf_fundamental_type (objfile, typeid) dwarf_fundamental_type (struct objfile *objfile, int typeid)
struct objfile *objfile;
int typeid;
{ {
if (typeid < 0 || typeid >= FT_NUM_MEMBERS) if (typeid < 0 || typeid >= FT_NUM_MEMBERS)
{ {
@ -621,8 +619,7 @@ dwarf_fundamental_type (objfile, typeid)
*/ */
static void static void
set_cu_language (dip) set_cu_language (struct dieinfo *dip)
struct dieinfo *dip;
{ {
switch (dip->at_language) switch (dip->at_language)
{ {
@ -690,14 +687,9 @@ set_cu_language (dip)
*/ */
void void
dwarf_build_psymtabs (objfile, mainline, dbfoff, dbfsize, dwarf_build_psymtabs (struct objfile *objfile, int mainline, file_ptr dbfoff,
lnoffset, lnsize) unsigned int dbfsize, file_ptr lnoffset,
struct objfile *objfile; unsigned int lnsize)
int mainline;
file_ptr dbfoff;
unsigned int dbfsize;
file_ptr lnoffset;
unsigned int lnsize;
{ {
bfd *abfd = objfile->obfd; bfd *abfd = objfile->obfd;
struct cleanup *back_to; struct cleanup *back_to;
@ -758,11 +750,8 @@ dwarf_build_psymtabs (objfile, mainline, dbfoff, dbfsize,
*/ */
static void static void
read_lexical_block_scope (dip, thisdie, enddie, objfile) read_lexical_block_scope (struct dieinfo *dip, char *thisdie, char *enddie,
struct dieinfo *dip; struct objfile *objfile)
char *thisdie;
char *enddie;
struct objfile *objfile;
{ {
register struct context_stack *new; register struct context_stack *new;
@ -797,8 +786,7 @@ read_lexical_block_scope (dip, thisdie, enddie, objfile)
*/ */
static struct type * static struct type *
lookup_utype (die_ref) lookup_utype (DIE_REF die_ref)
DIE_REF die_ref;
{ {
struct type *type = NULL; struct type *type = NULL;
int utypeidx; int utypeidx;
@ -838,9 +826,7 @@ lookup_utype (die_ref)
*/ */
static struct type * static struct type *
alloc_utype (die_ref, utypep) alloc_utype (DIE_REF die_ref, struct type *utypep)
DIE_REF die_ref;
struct type *utypep;
{ {
struct type **typep; struct type **typep;
int utypeidx; int utypeidx;
@ -886,8 +872,7 @@ alloc_utype (die_ref, utypep)
*/ */
static void static void
free_utypes (dummy) free_utypes (PTR dummy)
PTR dummy;
{ {
free (utypes); free (utypes);
utypes = NULL; utypes = NULL;
@ -913,8 +898,7 @@ free_utypes (dummy)
*/ */
static struct type * static struct type *
decode_die_type (dip) decode_die_type (struct dieinfo *dip)
struct dieinfo *dip;
{ {
struct type *type = NULL; struct type *type = NULL;
@ -965,11 +949,8 @@ decode_die_type (dip)
*/ */
static struct type * static struct type *
struct_type (dip, thisdie, enddie, objfile) struct_type (struct dieinfo *dip, char *thisdie, char *enddie,
struct dieinfo *dip; struct objfile *objfile)
char *thisdie;
char *enddie;
struct objfile *objfile;
{ {
struct type *type; struct type *type;
struct nextfield struct nextfield
@ -1163,11 +1144,8 @@ struct_type (dip, thisdie, enddie, objfile)
*/ */
static void static void
read_structure_scope (dip, thisdie, enddie, objfile) read_structure_scope (struct dieinfo *dip, char *thisdie, char *enddie,
struct dieinfo *dip; struct objfile *objfile)
char *thisdie;
char *enddie;
struct objfile *objfile;
{ {
struct type *type; struct type *type;
struct symbol *sym; struct symbol *sym;
@ -1207,8 +1185,7 @@ read_structure_scope (dip, thisdie, enddie, objfile)
*/ */
static struct type * static struct type *
decode_array_element_type (scan) decode_array_element_type (char *scan)
char *scan;
{ {
struct type *typep; struct type *typep;
DIE_REF die_ref; DIE_REF die_ref;
@ -1302,9 +1279,7 @@ decode_array_element_type (scan)
*/ */
static struct type * static struct type *
decode_subscript_data_item (scan, end) decode_subscript_data_item (char *scan, char *end)
char *scan;
char *end;
{ {
struct type *typep = NULL; /* Array type we are building */ struct type *typep = NULL; /* Array type we are building */
struct type *nexttype; /* Type of each element (may be array) */ struct type *nexttype; /* Type of each element (may be array) */
@ -1384,8 +1359,7 @@ decode_subscript_data_item (scan, end)
*/ */
static void static void
dwarf_read_array_type (dip) dwarf_read_array_type (struct dieinfo *dip)
struct dieinfo *dip;
{ {
struct type *type; struct type *type;
struct type *utype; struct type *utype;
@ -1449,8 +1423,7 @@ dwarf_read_array_type (dip)
*/ */
static void static void
read_tag_pointer_type (dip) read_tag_pointer_type (struct dieinfo *dip)
struct dieinfo *dip;
{ {
struct type *type; struct type *type;
struct type *utype; struct type *utype;
@ -1492,8 +1465,7 @@ read_tag_pointer_type (dip)
*/ */
static void static void
read_tag_string_type (dip) read_tag_string_type (struct dieinfo *dip)
struct dieinfo *dip;
{ {
struct type *utype; struct type *utype;
struct type *indextype; struct type *indextype;
@ -1564,10 +1536,7 @@ read_tag_string_type (dip)
*/ */
static void static void
read_subroutine_type (dip, thisdie, enddie) read_subroutine_type (struct dieinfo *dip, char *thisdie, char *enddie)
struct dieinfo *dip;
char *thisdie;
char *enddie;
{ {
struct type *type; /* Type that this function returns */ struct type *type; /* Type that this function returns */
struct type *ftype; /* Function that returns above type */ struct type *ftype; /* Function that returns above type */
@ -1624,11 +1593,8 @@ read_subroutine_type (dip, thisdie, enddie)
*/ */
static void static void
read_enumeration (dip, thisdie, enddie, objfile) read_enumeration (struct dieinfo *dip, char *thisdie, char *enddie,
struct dieinfo *dip; struct objfile *objfile)
char *thisdie;
char *enddie;
struct objfile *objfile;
{ {
struct type *type; struct type *type;
struct symbol *sym; struct symbol *sym;
@ -1677,9 +1643,7 @@ read_enumeration (dip, thisdie, enddie, objfile)
*/ */
static struct type * static struct type *
enum_type (dip, objfile) enum_type (struct dieinfo *dip, struct objfile *objfile)
struct dieinfo *dip;
struct objfile *objfile;
{ {
struct type *type; struct type *type;
struct nextfield struct nextfield
@ -1805,11 +1769,8 @@ enum_type (dip, objfile)
*/ */
static void static void
read_func_scope (dip, thisdie, enddie, objfile) read_func_scope (struct dieinfo *dip, char *thisdie, char *enddie,
struct dieinfo *dip; struct objfile *objfile)
char *thisdie;
char *enddie;
struct objfile *objfile;
{ {
register struct context_stack *new; register struct context_stack *new;
@ -1855,8 +1816,7 @@ read_func_scope (dip, thisdie, enddie, objfile)
*/ */
static void static void
handle_producer (producer) handle_producer (char *producer)
char *producer;
{ {
/* If this compilation unit was compiled with g++ or gcc, then set the /* If this compilation unit was compiled with g++ or gcc, then set the
@ -1916,11 +1876,8 @@ handle_producer (producer)
*/ */
static void static void
read_file_scope (dip, thisdie, enddie, objfile) read_file_scope (struct dieinfo *dip, char *thisdie, char *enddie,
struct dieinfo *dip; struct objfile *objfile)
char *thisdie;
char *enddie;
struct objfile *objfile;
{ {
struct cleanup *back_to; struct cleanup *back_to;
struct symtab *symtab; struct symtab *symtab;
@ -1972,10 +1929,7 @@ read_file_scope (dip, thisdie, enddie, objfile)
*/ */
static void static void
process_dies (thisdie, enddie, objfile) process_dies (char *thisdie, char *enddie, struct objfile *objfile)
char *thisdie;
char *enddie;
struct objfile *objfile;
{ {
char *nextdie; char *nextdie;
struct dieinfo di; struct dieinfo di;
@ -2118,8 +2072,7 @@ process_dies (thisdie, enddie, objfile)
*/ */
static void static void
decode_line_numbers (linetable) decode_line_numbers (char *linetable)
char *linetable;
{ {
char *tblscan; char *tblscan;
char *tblend; char *tblend;
@ -2192,8 +2145,7 @@ decode_line_numbers (linetable)
*/ */
static int static int
locval (dip) locval (struct dieinfo *dip)
struct dieinfo *dip;
{ {
unsigned short nbytes; unsigned short nbytes;
unsigned short locsize; unsigned short locsize;
@ -2294,8 +2246,7 @@ locval (dip)
*/ */
static void static void
read_ofile_symtab (pst) read_ofile_symtab (struct partial_symtab *pst)
struct partial_symtab *pst;
{ {
struct cleanup *back_to; struct cleanup *back_to;
unsigned long lnsize; unsigned long lnsize;
@ -2374,8 +2325,7 @@ read_ofile_symtab (pst)
*/ */
static void static void
psymtab_to_symtab_1 (pst) psymtab_to_symtab_1 (struct partial_symtab *pst)
struct partial_symtab *pst;
{ {
int i; int i;
struct cleanup *old_chain; struct cleanup *old_chain;
@ -2447,8 +2397,7 @@ psymtab_to_symtab_1 (pst)
*/ */
static void static void
dwarf_psymtab_to_symtab (pst) dwarf_psymtab_to_symtab (struct partial_symtab *pst)
struct partial_symtab *pst;
{ {
if (pst != NULL) if (pst != NULL)
@ -2507,9 +2456,7 @@ dwarf_psymtab_to_symtab (pst)
*/ */
static void static void
add_enum_psymbol (dip, objfile) add_enum_psymbol (struct dieinfo *dip, struct objfile *objfile)
struct dieinfo *dip;
struct objfile *objfile;
{ {
char *scan; char *scan;
char *listend; char *listend;
@ -2558,9 +2505,7 @@ add_enum_psymbol (dip, objfile)
*/ */
static void static void
add_partial_symbol (dip, objfile) add_partial_symbol (struct dieinfo *dip, struct objfile *objfile)
struct dieinfo *dip;
struct objfile *objfile;
{ {
switch (dip->die_tag) switch (dip->die_tag)
{ {
@ -2685,10 +2630,7 @@ NOTES
static void static void
scan_partial_symbols (thisdie, enddie, objfile) scan_partial_symbols (char *thisdie, char *enddie, struct objfile *objfile)
char *thisdie;
char *enddie;
struct objfile *objfile;
{ {
char *nextdie; char *nextdie;
char *temp; char *temp;
@ -2809,12 +2751,8 @@ scan_partial_symbols (thisdie, enddie, objfile)
*/ */
static void static void
scan_compilation_units (thisdie, enddie, dbfoff, lnoffset, objfile) scan_compilation_units (char *thisdie, char *enddie, file_ptr dbfoff,
char *thisdie; file_ptr lnoffset, struct objfile *objfile)
char *enddie;
file_ptr dbfoff;
file_ptr lnoffset;
struct objfile *objfile;
{ {
char *nextdie; char *nextdie;
struct dieinfo di; struct dieinfo di;
@ -2904,9 +2842,7 @@ scan_compilation_units (thisdie, enddie, dbfoff, lnoffset, objfile)
*/ */
static struct symbol * static struct symbol *
new_symbol (dip, objfile) new_symbol (struct dieinfo *dip, struct objfile *objfile)
struct dieinfo *dip;
struct objfile *objfile;
{ {
struct symbol *sym = NULL; struct symbol *sym = NULL;
@ -3066,10 +3002,8 @@ new_symbol (dip, objfile)
*/ */
static void static void
synthesize_typedef (dip, objfile, type) synthesize_typedef (struct dieinfo *dip, struct objfile *objfile,
struct dieinfo *dip; struct type *type)
struct objfile *objfile;
struct type *type;
{ {
struct symbol *sym = NULL; struct symbol *sym = NULL;
@ -3113,8 +3047,7 @@ synthesize_typedef (dip, objfile, type)
*/ */
static struct type * static struct type *
decode_mod_fund_type (typedata) decode_mod_fund_type (char *typedata)
char *typedata;
{ {
struct type *typep = NULL; struct type *typep = NULL;
unsigned short modcount; unsigned short modcount;
@ -3160,8 +3093,7 @@ decode_mod_fund_type (typedata)
*/ */
static struct type * static struct type *
decode_mod_u_d_type (typedata) decode_mod_u_d_type (char *typedata)
char *typedata;
{ {
struct type *typep = NULL; struct type *typep = NULL;
unsigned short modcount; unsigned short modcount;
@ -3224,10 +3156,7 @@ decode_mod_u_d_type (typedata)
*/ */
static struct type * static struct type *
decode_modified_type (modifiers, modcount, mtype) decode_modified_type (char *modifiers, unsigned int modcount, int mtype)
char *modifiers;
unsigned int modcount;
int mtype;
{ {
struct type *typep = NULL; struct type *typep = NULL;
unsigned short fundtype; unsigned short fundtype;
@ -3313,8 +3242,7 @@ decode_modified_type (modifiers, modcount, mtype)
*/ */
static struct type * static struct type *
decode_fund_type (fundtype) decode_fund_type (unsigned int fundtype)
unsigned int fundtype;
{ {
struct type *typep = NULL; struct type *typep = NULL;
@ -3446,9 +3374,7 @@ decode_fund_type (fundtype)
*/ */
static char * static char *
create_name (name, obstackp) create_name (char *name, struct obstack *obstackp)
char *name;
struct obstack *obstackp;
{ {
int length; int length;
char *newname; char *newname;
@ -3514,10 +3440,7 @@ create_name (name, obstackp)
*/ */
static void static void
basicdieinfo (dip, diep, objfile) basicdieinfo (struct dieinfo *dip, char *diep, struct objfile *objfile)
struct dieinfo *dip;
char *diep;
struct objfile *objfile;
{ {
curdie = dip; curdie = dip;
memset (dip, 0, sizeof (struct dieinfo)); memset (dip, 0, sizeof (struct dieinfo));
@ -3576,9 +3499,7 @@ basicdieinfo (dip, diep, objfile)
*/ */
static void static void
completedieinfo (dip, objfile) completedieinfo (struct dieinfo *dip, struct objfile *objfile)
struct dieinfo *dip;
struct objfile *objfile;
{ {
char *diep; /* Current pointer into raw DIE data */ char *diep; /* Current pointer into raw DIE data */
char *end; /* Terminate DIE scan here */ char *end; /* Terminate DIE scan here */
@ -3790,11 +3711,8 @@ completedieinfo (dip, objfile)
*/ */
static CORE_ADDR static CORE_ADDR
target_to_host (from, nbytes, signextend, objfile) target_to_host (char *from, int nbytes, int signextend, /* FIXME: Unused */
char *from; struct objfile *objfile)
int nbytes;
int signextend; /* FIXME: Unused */
struct objfile *objfile;
{ {
CORE_ADDR rtnval; CORE_ADDR rtnval;
@ -3841,8 +3759,7 @@ target_to_host (from, nbytes, signextend, objfile)
*/ */
static int static int
attribute_size (attr) attribute_size (unsigned int attr)
unsigned int attr;
{ {
int nbytes; /* Size of next data for this attribute */ int nbytes; /* Size of next data for this attribute */
unsigned short form; /* Form of the attribute */ unsigned short form; /* Form of the attribute */

View file

@ -108,10 +108,7 @@ static void elf_locate_sections (bfd *, asection *, void *);
-kingdon). */ -kingdon). */
static void static void
elf_locate_sections (ignore_abfd, sectp, eip) elf_locate_sections (bfd *ignore_abfd, asection *sectp, PTR eip)
bfd *ignore_abfd;
asection *sectp;
PTR eip;
{ {
register struct elfinfo *ei; register struct elfinfo *ei;
@ -143,8 +140,7 @@ elf_locate_sections (ignore_abfd, sectp, eip)
#if 0 /* Currently unused */ #if 0 /* Currently unused */
char * char *
elf_interpreter (abfd) elf_interpreter (bfd *abfd)
bfd *abfd;
{ {
sec_ptr interp_sec; sec_ptr interp_sec;
unsigned size; unsigned size;
@ -171,14 +167,9 @@ elf_interpreter (abfd)
#endif #endif
static struct minimal_symbol * static struct minimal_symbol *
record_minimal_symbol_and_info (name, address, ms_type, info, bfd_section, record_minimal_symbol_and_info (char *name, CORE_ADDR address,
objfile) enum minimal_symbol_type ms_type, char *info, /* FIXME, is this really char *? */
char *name; asection *bfd_section, struct objfile *objfile)
CORE_ADDR address;
enum minimal_symbol_type ms_type;
char *info; /* FIXME, is this really char *? */
asection *bfd_section;
struct objfile *objfile;
{ {
int section; int section;
@ -233,9 +224,7 @@ record_minimal_symbol_and_info (name, address, ms_type, info, bfd_section,
*/ */
static void static void
elf_symtab_read (objfile, dynamic) elf_symtab_read (struct objfile *objfile, int dynamic)
struct objfile *objfile;
int dynamic;
{ {
long storage_needed; long storage_needed;
asymbol *sym; asymbol *sym;
@ -578,9 +567,7 @@ elf_symtab_read (objfile, dynamic)
capability even for files compiled without -g. */ capability even for files compiled without -g. */
static void static void
elf_symfile_read (objfile, mainline) elf_symfile_read (struct objfile *objfile, int mainline)
struct objfile *objfile;
int mainline;
{ {
bfd *abfd = objfile->obfd; bfd *abfd = objfile->obfd;
struct elfinfo ei; struct elfinfo ei;
@ -688,8 +675,7 @@ elf_symfile_read (objfile, mainline)
stab_section_info's, that might be dangling from it. */ stab_section_info's, that might be dangling from it. */
static void static void
free_elfinfo (objp) free_elfinfo (PTR objp)
PTR objp;
{ {
struct objfile *objfile = (struct objfile *) objp; struct objfile *objfile = (struct objfile *) objp;
struct dbx_symfile_info *dbxinfo = objfile->sym_stab_info; struct dbx_symfile_info *dbxinfo = objfile->sym_stab_info;
@ -714,8 +700,7 @@ free_elfinfo (objp)
We reinitialize buildsym, since we may be reading stabs from an ELF file. */ We reinitialize buildsym, since we may be reading stabs from an ELF file. */
static void static void
elf_new_init (ignore) elf_new_init (struct objfile *ignore)
struct objfile *ignore;
{ {
stabsread_new_init (); stabsread_new_init ();
buildsym_new_init (); buildsym_new_init ();
@ -727,8 +712,7 @@ elf_new_init (ignore)
objfile struct from the global list of known objfiles. */ objfile struct from the global list of known objfiles. */
static void static void
elf_symfile_finish (objfile) elf_symfile_finish (struct objfile *objfile)
struct objfile *objfile;
{ {
if (objfile->sym_stab_info != NULL) if (objfile->sym_stab_info != NULL)
{ {
@ -746,8 +730,7 @@ elf_symfile_finish (objfile)
just a stub. */ just a stub. */
static void static void
elf_symfile_init (objfile) elf_symfile_init (struct objfile *objfile)
struct objfile *objfile;
{ {
/* ELF objects may be reordered, so set OBJF_REORDERED. If we /* ELF objects may be reordered, so set OBJF_REORDERED. If we
find this causes a significant slowdown in gdb then we could find this causes a significant slowdown in gdb then we could
@ -764,9 +747,7 @@ elf_symfile_init (objfile)
with wierd names. Go get 'em when needed. */ with wierd names. Go get 'em when needed. */
void void
elfstab_offset_sections (objfile, pst) elfstab_offset_sections (struct objfile *objfile, struct partial_symtab *pst)
struct objfile *objfile;
struct partial_symtab *pst;
{ {
char *filename = pst->filename; char *filename = pst->filename;
struct dbx_symfile_info *dbx = objfile->sym_stab_info; struct dbx_symfile_info *dbx = objfile->sym_stab_info;
@ -832,7 +813,7 @@ static struct sym_fns elf_sym_fns =
}; };
void void
_initialize_elfread () _initialize_elfread (void)
{ {
add_symtab_fns (&elf_sym_fns); add_symtab_fns (&elf_sym_fns);
} }

View file

@ -28,7 +28,7 @@
/* Return a new environment object. */ /* Return a new environment object. */
struct environ * struct environ *
make_environ () make_environ (void)
{ {
register struct environ *e; register struct environ *e;
@ -43,8 +43,7 @@ make_environ ()
/* Free an environment and all the strings in it. */ /* Free an environment and all the strings in it. */
void void
free_environ (e) free_environ (register struct environ *e)
register struct environ *e;
{ {
register char **vector = e->vector; register char **vector = e->vector;
@ -59,8 +58,7 @@ free_environ (e)
that all strings in these environments are safe to free. */ that all strings in these environments are safe to free. */
void void
init_environ (e) init_environ (register struct environ *e)
register struct environ *e;
{ {
extern char **environ; extern char **environ;
register int i; register int i;
@ -92,8 +90,7 @@ init_environ (e)
This is used to get something to pass to execve. */ This is used to get something to pass to execve. */
char ** char **
environ_vector (e) environ_vector (struct environ *e)
struct environ *e;
{ {
return e->vector; return e->vector;
} }
@ -101,9 +98,7 @@ environ_vector (e)
/* Return the value in environment E of variable VAR. */ /* Return the value in environment E of variable VAR. */
char * char *
get_in_environ (e, var) get_in_environ (const struct environ *e, const char *var)
const struct environ *e;
const char *var;
{ {
register int len = strlen (var); register int len = strlen (var);
register char **vector = e->vector; register char **vector = e->vector;
@ -119,10 +114,7 @@ get_in_environ (e, var)
/* Store the value in E of VAR as VALUE. */ /* Store the value in E of VAR as VALUE. */
void void
set_in_environ (e, var, value) set_in_environ (struct environ *e, const char *var, const char *value)
struct environ *e;
const char *var;
const char *value;
{ {
register int i; register int i;
register int len = strlen (var); register int len = strlen (var);
@ -169,9 +161,7 @@ set_in_environ (e, var, value)
/* Remove the setting for variable VAR from environment E. */ /* Remove the setting for variable VAR from environment E. */
void void
unset_in_environ (e, var) unset_in_environ (struct environ *e, char *var)
struct environ *e;
char *var;
{ {
register int len = strlen (var); register int len = strlen (var);
register char **vector = e->vector; register char **vector = e->vector;

View file

@ -65,11 +65,8 @@ init_array_element (value_ptr, value_ptr, struct expression *,
inline inline
#endif #endif
static value_ptr static value_ptr
evaluate_subexp (expect_type, exp, pos, noside) evaluate_subexp (struct type *expect_type, register struct expression *exp,
struct type *expect_type; register int *pos, enum noside noside)
register struct expression *exp;
register int *pos;
enum noside noside;
{ {
return (*exp->language_defn->evaluate_exp) (expect_type, exp, pos, noside); return (*exp->language_defn->evaluate_exp) (expect_type, exp, pos, noside);
} }
@ -78,8 +75,7 @@ evaluate_subexp (expect_type, exp, pos, noside)
and return the result as a number. */ and return the result as a number. */
CORE_ADDR CORE_ADDR
parse_and_eval_address (exp) parse_and_eval_address (char *exp)
char *exp;
{ {
struct expression *expr = parse_expression (exp); struct expression *expr = parse_expression (exp);
register CORE_ADDR addr; register CORE_ADDR addr;
@ -95,8 +91,7 @@ parse_and_eval_address (exp)
and advanced that variable across the characters parsed. */ and advanced that variable across the characters parsed. */
CORE_ADDR CORE_ADDR
parse_and_eval_address_1 (expptr) parse_and_eval_address_1 (char **expptr)
char **expptr;
{ {
struct expression *expr = parse_exp_1 (expptr, (struct block *) 0, 0); struct expression *expr = parse_exp_1 (expptr, (struct block *) 0, 0);
register CORE_ADDR addr; register CORE_ADDR addr;
@ -109,8 +104,7 @@ parse_and_eval_address_1 (expptr)
} }
value_ptr value_ptr
parse_and_eval (exp) parse_and_eval (char *exp)
char *exp;
{ {
struct expression *expr = parse_expression (exp); struct expression *expr = parse_expression (exp);
register value_ptr val; register value_ptr val;
@ -127,8 +121,7 @@ parse_and_eval (exp)
EXPP is advanced to point to the comma. */ EXPP is advanced to point to the comma. */
value_ptr value_ptr
parse_to_comma_and_eval (expp) parse_to_comma_and_eval (char **expp)
char **expp;
{ {
struct expression *expr = parse_exp_1 (expp, (struct block *) 0, 1); struct expression *expr = parse_exp_1 (expp, (struct block *) 0, 1);
register value_ptr val; register value_ptr val;
@ -146,8 +139,7 @@ parse_to_comma_and_eval (expp)
See expression.h for info on the format of an expression. */ See expression.h for info on the format of an expression. */
value_ptr value_ptr
evaluate_expression (exp) evaluate_expression (struct expression *exp)
struct expression *exp;
{ {
int pc = 0; int pc = 0;
return evaluate_subexp (NULL_TYPE, exp, &pc, EVAL_NORMAL); return evaluate_subexp (NULL_TYPE, exp, &pc, EVAL_NORMAL);
@ -157,8 +149,7 @@ evaluate_expression (exp)
and getting a value whose type alone is correct. */ and getting a value whose type alone is correct. */
value_ptr value_ptr
evaluate_type (exp) evaluate_type (struct expression *exp)
struct expression *exp;
{ {
int pc = 0; int pc = 0;
return evaluate_subexp (NULL_TYPE, exp, &pc, EVAL_AVOID_SIDE_EFFECTS); return evaluate_subexp (NULL_TYPE, exp, &pc, EVAL_AVOID_SIDE_EFFECTS);
@ -168,9 +159,7 @@ evaluate_type (exp)
returning the label. Otherwise, does nothing and returns NULL. */ returning the label. Otherwise, does nothing and returns NULL. */
static char * static char *
get_label (exp, pos) get_label (register struct expression *exp, int *pos)
register struct expression *exp;
int *pos;
{ {
if (exp->elts[*pos].opcode == OP_LABELED) if (exp->elts[*pos].opcode == OP_LABELED)
{ {
@ -188,12 +177,8 @@ get_label (exp, pos)
(in C/C++) for structure types. */ (in C/C++) for structure types. */
static value_ptr static value_ptr
evaluate_struct_tuple (struct_val, exp, pos, noside, nargs) evaluate_struct_tuple (value_ptr struct_val, register struct expression *exp,
value_ptr struct_val; register int *pos, enum noside noside, int nargs)
register struct expression *exp;
register int *pos;
enum noside noside;
int nargs;
{ {
struct type *struct_type = check_typedef (VALUE_TYPE (struct_val)); struct type *struct_type = check_typedef (VALUE_TYPE (struct_val));
struct type *substruct_type = struct_type; struct type *substruct_type = struct_type;
@ -335,12 +320,9 @@ evaluate_struct_tuple (struct_val, exp, pos, noside, nargs)
Returns last index value. */ Returns last index value. */
static LONGEST static LONGEST
init_array_element (array, element, exp, pos, noside, low_bound, high_bound) init_array_element (value_ptr array, value_ptr element,
value_ptr array, element; register struct expression *exp, register int *pos,
register struct expression *exp; enum noside noside, LONGEST low_bound, LONGEST high_bound)
register int *pos;
enum noside noside;
LONGEST low_bound, high_bound;
{ {
LONGEST index; LONGEST index;
int element_size = TYPE_LENGTH (VALUE_TYPE (element)); int element_size = TYPE_LENGTH (VALUE_TYPE (element));
@ -379,11 +361,9 @@ init_array_element (array, element, exp, pos, noside, low_bound, high_bound)
} }
value_ptr value_ptr
evaluate_subexp_standard (expect_type, exp, pos, noside) evaluate_subexp_standard (struct type *expect_type,
struct type *expect_type; register struct expression *exp, register int *pos,
register struct expression *exp; enum noside noside)
register int *pos;
enum noside noside;
{ {
enum exp_opcode op; enum exp_opcode op;
int tem, tem2, tem3; int tem, tem2, tem3;
@ -1781,10 +1761,8 @@ nosideret:
then only the type of the result need be correct. */ then only the type of the result need be correct. */
static value_ptr static value_ptr
evaluate_subexp_for_address (exp, pos, noside) evaluate_subexp_for_address (register struct expression *exp, register int *pos,
register struct expression *exp; enum noside noside)
register int *pos;
enum noside noside;
{ {
enum exp_opcode op; enum exp_opcode op;
register int pc; register int pc;
@ -1863,10 +1841,8 @@ evaluate_subexp_for_address (exp, pos, noside)
*/ */
value_ptr value_ptr
evaluate_subexp_with_coercion (exp, pos, noside) evaluate_subexp_with_coercion (register struct expression *exp,
register struct expression *exp; register int *pos, enum noside noside)
register int *pos;
enum noside noside;
{ {
register enum exp_opcode op; register enum exp_opcode op;
register int pc; register int pc;
@ -1902,9 +1878,7 @@ evaluate_subexp_with_coercion (exp, pos, noside)
Advance *POS over the subexpression. */ Advance *POS over the subexpression. */
static value_ptr static value_ptr
evaluate_subexp_for_sizeof (exp, pos) evaluate_subexp_for_sizeof (register struct expression *exp, register int *pos)
register struct expression *exp;
register int *pos;
{ {
enum exp_opcode op; enum exp_opcode op;
register int pc; register int pc;
@ -1954,9 +1928,7 @@ evaluate_subexp_for_sizeof (exp, pos)
/* Parse a type expression in the string [P..P+LENGTH). */ /* Parse a type expression in the string [P..P+LENGTH). */
struct type * struct type *
parse_and_eval_type (p, length) parse_and_eval_type (char *p, int length)
char *p;
int length;
{ {
char *tmp = (char *) alloca (length + 4); char *tmp = (char *) alloca (length + 4);
struct expression *expr; struct expression *expr;
@ -1972,8 +1944,7 @@ parse_and_eval_type (p, length)
} }
int int
calc_f77_array_dims (array_type) calc_f77_array_dims (struct type *array_type)
struct type *array_type;
{ {
int ndimen = 1; int ndimen = 1;
struct type *tmp_type; struct type *tmp_type;

View file

@ -1016,8 +1016,7 @@ async_do_nothing (gdb_client_data arg)
/* Tell the event loop what to do if SIGHUP is received. /* Tell the event loop what to do if SIGHUP is received.
See event-signal.c. */ See event-signal.c. */
static void static void
handle_sighup (sig) handle_sighup (int sig)
int sig;
{ {
mark_async_signal_handler_wrapper (sighup_token); mark_async_signal_handler_wrapper (sighup_token);
signal (sig, handle_sighup); signal (sig, handle_sighup);

View file

@ -95,8 +95,7 @@ struct vmap *vmap;
/* ARGSUSED */ /* ARGSUSED */
static void static void
exec_close (quitting) exec_close (int quitting)
int quitting;
{ {
int need_symtab_cleanup = 0; int need_symtab_cleanup = 0;
struct vmap *vp, *nxt; struct vmap *vp, *nxt;
@ -168,9 +167,7 @@ exec_close (quitting)
we're supplying the exec pathname late for good reason.) */ we're supplying the exec pathname late for good reason.) */
void void
exec_file_attach (args, from_tty) exec_file_attach (char *args, int from_tty)
char *args;
int from_tty;
{ {
char **argv; char **argv;
char *filename; char *filename;
@ -311,9 +308,7 @@ exec_file_attach (args, from_tty)
which can take multiple args. */ which can take multiple args. */
void void
exec_file_command (args, from_tty) exec_file_command (char *args, int from_tty)
char *args;
int from_tty;
{ {
target_preopen (from_tty); target_preopen (from_tty);
exec_file_attach (args, from_tty); exec_file_attach (args, from_tty);
@ -324,9 +319,7 @@ exec_file_command (args, from_tty)
command was added? */ command was added? */
static void static void
file_command (arg, from_tty) file_command (char *arg, int from_tty)
char *arg;
int from_tty;
{ {
/* FIXME, if we lose on reading the symbol file, we should revert /* FIXME, if we lose on reading the symbol file, we should revert
the exec file, but that's rough. */ the exec file, but that's rough. */
@ -342,10 +335,7 @@ file_command (arg, from_tty)
we cast it back to its proper type. */ we cast it back to its proper type. */
static void static void
add_to_section_table (abfd, asect, table_pp_char) add_to_section_table (bfd *abfd, sec_ptr asect, PTR table_pp_char)
bfd *abfd;
sec_ptr asect;
PTR table_pp_char;
{ {
struct section_table **table_pp = (struct section_table **) table_pp_char; struct section_table **table_pp = (struct section_table **) table_pp_char;
flagword aflag; flagword aflag;
@ -366,9 +356,8 @@ add_to_section_table (abfd, asect, table_pp_char)
Returns 0 if OK, 1 on error. */ Returns 0 if OK, 1 on error. */
int int
build_section_table (some_bfd, start, end) build_section_table (bfd *some_bfd, struct section_table **start,
bfd *some_bfd; struct section_table **end)
struct section_table **start, **end;
{ {
unsigned count; unsigned count;
@ -385,10 +374,7 @@ build_section_table (some_bfd, start, end)
} }
static void static void
bfdsec_to_vmap (abfd, sect, arg3) bfdsec_to_vmap (bfd *abfd, sec_ptr sect, PTR arg3)
bfd *abfd;
sec_ptr sect;
PTR arg3;
{ {
struct vmap_and_bfd *vmap_bfd = (struct vmap_and_bfd *) arg3; struct vmap_and_bfd *vmap_bfd = (struct vmap_and_bfd *) arg3;
struct vmap *vp; struct vmap *vp;
@ -418,9 +404,7 @@ bfdsec_to_vmap (abfd, sect, arg3)
Return the new vmap. */ Return the new vmap. */
struct vmap * struct vmap *
map_vmap (abfd, arch) map_vmap (bfd *abfd, bfd *arch)
bfd *abfd;
bfd *arch;
{ {
struct vmap_and_bfd vmap_bfd; struct vmap_and_bfd vmap_bfd;
struct vmap *vp, **vpp; struct vmap *vp, **vpp;
@ -463,12 +447,8 @@ map_vmap (abfd, arch)
we just tail-call it with more arguments to select between them. */ we just tail-call it with more arguments to select between them. */
int int
xfer_memory (memaddr, myaddr, len, write, target) xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write,
CORE_ADDR memaddr; struct target_ops *target)
char *myaddr;
int len;
int write;
struct target_ops *target;
{ {
boolean res; boolean res;
struct section_table *p; struct section_table *p;
@ -528,9 +508,7 @@ xfer_memory (memaddr, myaddr, len, write, target)
void void
print_section_info (t, abfd) print_section_info (struct target_ops *t, bfd *abfd)
struct target_ops *t;
bfd *abfd;
{ {
struct section_table *p; struct section_table *p;
@ -561,8 +539,7 @@ print_section_info (t, abfd)
} }
static void static void
exec_files_info (t) exec_files_info (struct target_ops *t)
struct target_ops *t;
{ {
print_section_info (t, exec_bfd); print_section_info (t, exec_bfd);
@ -596,10 +573,8 @@ exec_files_info (t)
in the exec objfile. */ in the exec objfile. */
void void
exec_set_section_offsets (text_off, data_off, bss_off) exec_set_section_offsets (bfd_signed_vma text_off, bfd_signed_vma data_off,
bfd_signed_vma text_off; bfd_signed_vma bss_off)
bfd_signed_vma data_off;
bfd_signed_vma bss_off;
{ {
struct section_table *sect; struct section_table *sect;
@ -630,9 +605,7 @@ exec_set_section_offsets (text_off, data_off, bss_off)
} }
static void static void
set_section_command (args, from_tty) set_section_command (char *args, int from_tty)
char *args;
int from_tty;
{ {
struct section_table *p; struct section_table *p;
char *secname; char *secname;
@ -676,9 +649,7 @@ set_section_command (args, from_tty)
breakpoint_init_inferior). */ breakpoint_init_inferior). */
static int static int
ignore (addr, contents) ignore (CORE_ADDR addr, char *contents)
CORE_ADDR addr;
char *contents;
{ {
return 0; return 0;
} }
@ -687,7 +658,7 @@ ignore (addr, contents)
defined. */ defined. */
void void
init_exec_ops () init_exec_ops (void)
{ {
exec_ops.to_shortname = "exec"; exec_ops.to_shortname = "exec";
exec_ops.to_longname = "Local exec file"; exec_ops.to_longname = "Local exec file";
@ -710,7 +681,7 @@ Specify the filename of the executable file.";
} }
void void
_initialize_exec () _initialize_exec (void)
{ {
struct cmd_list_element *c; struct cmd_list_element *c;

View file

@ -36,9 +36,7 @@ static void print_subexp (struct expression *, int *, struct ui_file *,
enum precedence); enum precedence);
void void
print_expression (exp, stream) print_expression (struct expression *exp, struct ui_file *stream)
struct expression *exp;
struct ui_file *stream;
{ {
int pc = 0; int pc = 0;
print_subexp (exp, &pc, stream, PREC_NULL); print_subexp (exp, &pc, stream, PREC_NULL);
@ -50,11 +48,8 @@ print_expression (exp, stream)
parentheses are needed here. */ parentheses are needed here. */
static void static void
print_subexp (exp, pos, stream, prec) print_subexp (register struct expression *exp, register int *pos,
register struct expression *exp; struct ui_file *stream, enum precedence prec)
register int *pos;
struct ui_file *stream;
enum precedence prec;
{ {
register unsigned tem; register unsigned tem;
register const struct op_print *op_print_tab; register const struct op_print *op_print_tab;
@ -488,8 +483,7 @@ print_subexp (exp, pos, stream, prec)
a string. NULL indicates that the opcode was not found in the a string. NULL indicates that the opcode was not found in the
current language table. */ current language table. */
char * char *
op_string (op) op_string (enum exp_opcode op)
enum exp_opcode op;
{ {
int tem; int tem;
register const struct op_print *op_print_tab; register const struct op_print *op_print_tab;
@ -507,8 +501,7 @@ op_string (op)
static char *op_name (int opcode); static char *op_name (int opcode);
static char * static char *
op_name (opcode) op_name (int opcode)
int opcode;
{ {
switch (opcode) switch (opcode)
{ {
@ -693,10 +686,8 @@ op_name (opcode)
} }
void void
dump_prefix_expression (exp, stream, note) dump_prefix_expression (struct expression *exp, struct ui_file *stream,
struct expression *exp; char *note)
struct ui_file *stream;
char *note;
{ {
int elt; int elt;
char *opcode_name; char *opcode_name;
@ -740,10 +731,7 @@ static int dump_subexp (struct expression *exp, struct ui_file *stream,
int elt); int elt);
static int static int
dump_subexp (exp, stream, elt) dump_subexp (struct expression *exp, struct ui_file *stream, int elt)
struct expression *exp;
struct ui_file *stream;
int elt;
{ {
static int indent = 0; static int indent = 0;
int i; int i;
@ -973,10 +961,8 @@ dump_subexp (exp, stream, elt)
} }
void void
dump_postfix_expression (exp, stream, note) dump_postfix_expression (struct expression *exp, struct ui_file *stream,
struct expression *exp; char *note)
struct ui_file *stream;
char *note;
{ {
int elt; int elt;

View file

@ -98,10 +98,7 @@ static void f_emit_char (int c, struct ui_file * stream, int quoter);
be replaced with a true F77 version. */ be replaced with a true F77 version. */
static void static void
f_emit_char (c, stream, quoter) f_emit_char (register int c, struct ui_file *stream, int quoter)
register int c;
struct ui_file *stream;
int quoter;
{ {
c &= 0xFF; /* Avoid sign bit follies */ c &= 0xFF; /* Avoid sign bit follies */
@ -147,9 +144,7 @@ f_emit_char (c, stream, quoter)
be replaced with a true F77version. */ be replaced with a true F77version. */
static void static void
f_printchar (c, stream) f_printchar (int c, struct ui_file *stream)
int c;
struct ui_file *stream;
{ {
fputs_filtered ("'", stream); fputs_filtered ("'", stream);
LA_EMIT_CHAR (c, stream, '\''); LA_EMIT_CHAR (c, stream, '\'');
@ -164,12 +159,8 @@ f_printchar (c, stream)
be replaced with a true F77 version. */ be replaced with a true F77 version. */
static void static void
f_printstr (stream, string, length, width, force_ellipses) f_printstr (struct ui_file *stream, char *string, unsigned int length,
struct ui_file *stream; int width, int force_ellipses)
char *string;
unsigned int length;
int width;
int force_ellipses;
{ {
register unsigned int i; register unsigned int i;
unsigned int things_printed = 0; unsigned int things_printed = 0;
@ -256,9 +247,7 @@ f_printstr (stream, string, length, width, force_ellipses)
by an experienced F77 programmer. */ by an experienced F77 programmer. */
static struct type * static struct type *
f_create_fundamental_type (objfile, typeid) f_create_fundamental_type (struct objfile *objfile, int typeid)
struct objfile *objfile;
int typeid;
{ {
register struct type *type = NULL; register struct type *type = NULL;
@ -493,7 +482,7 @@ const struct language_defn f_language_defn =
}; };
void void
_initialize_f_language () _initialize_f_language (void)
{ {
builtin_type_f_void = builtin_type_f_void =
init_type (TYPE_CODE_VOID, 1, init_type (TYPE_CODE_VOID, 1,
@ -576,7 +565,7 @@ _initialize_f_language ()
#if 0 #if 0
static SAVED_BF_PTR static SAVED_BF_PTR
allocate_saved_bf_node () allocate_saved_bf_node (void)
{ {
SAVED_BF_PTR new; SAVED_BF_PTR new;
@ -585,7 +574,7 @@ allocate_saved_bf_node ()
} }
static SAVED_FUNCTION * static SAVED_FUNCTION *
allocate_saved_function_node () allocate_saved_function_node (void)
{ {
SAVED_FUNCTION *new; SAVED_FUNCTION *new;
@ -594,7 +583,7 @@ allocate_saved_function_node ()
} }
static SAVED_F77_COMMON_PTR static SAVED_F77_COMMON_PTR
allocate_saved_f77_common_node () allocate_saved_f77_common_node (void)
{ {
SAVED_F77_COMMON_PTR new; SAVED_F77_COMMON_PTR new;
@ -603,7 +592,7 @@ allocate_saved_f77_common_node ()
} }
static COMMON_ENTRY_PTR static COMMON_ENTRY_PTR
allocate_common_entry_node () allocate_common_entry_node (void)
{ {
COMMON_ENTRY_PTR new; COMMON_ENTRY_PTR new;
@ -630,11 +619,7 @@ static SAVED_BF_PTR tmp_bf_ptr; /* Generic temporary for use
the global common block chain */ the global common block chain */
static void static void
add_common_block (name, offset, secnum, func_stab) add_common_block (char *name, CORE_ADDR offset, int secnum, char *func_stab)
char *name;
CORE_ADDR offset;
int secnum;
char *func_stab;
{ {
SAVED_F77_COMMON_PTR tmp; SAVED_F77_COMMON_PTR tmp;
char *c, *local_copy_func_stab; char *c, *local_copy_func_stab;
@ -703,8 +688,7 @@ add_common_block (name, offset, secnum, func_stab)
#if 0 #if 0
static void static void
add_common_entry (entry_sym_ptr) add_common_entry (struct symbol *entry_sym_ptr)
struct symbol *entry_sym_ptr;
{ {
COMMON_ENTRY_PTR tmp; COMMON_ENTRY_PTR tmp;
@ -741,8 +725,7 @@ add_common_entry (entry_sym_ptr)
#if 0 #if 0
static SAVED_F77_COMMON_PTR static SAVED_F77_COMMON_PTR
find_first_common_named (name) find_first_common_named (char *name)
char *name;
{ {
SAVED_F77_COMMON_PTR tmp; SAVED_F77_COMMON_PTR tmp;
@ -764,9 +747,7 @@ find_first_common_named (name)
that belongs to function funcname */ that belongs to function funcname */
SAVED_F77_COMMON_PTR SAVED_F77_COMMON_PTR
find_common_for_function (name, funcname) find_common_for_function (char *name, char *funcname)
char *name;
char *funcname;
{ {
SAVED_F77_COMMON_PTR tmp; SAVED_F77_COMMON_PTR tmp;
@ -791,10 +772,7 @@ find_common_for_function (name, funcname)
"name." */ "name." */
static void static void
patch_common_entries (blk, offset, secnum) patch_common_entries (SAVED_F77_COMMON_PTR blk, CORE_ADDR offset, int secnum)
SAVED_F77_COMMON_PTR blk;
CORE_ADDR offset;
int secnum;
{ {
COMMON_ENTRY_PTR entry; COMMON_ENTRY_PTR entry;
@ -819,10 +797,7 @@ patch_common_entries (blk, offset, secnum)
(which is where common data lives). */ (which is where common data lives). */
static void static void
patch_all_commons_by_name (name, offset, secnum) patch_all_commons_by_name (char *name, CORE_ADDR offset, int secnum)
char *name;
CORE_ADDR offset;
int secnum;
{ {
SAVED_F77_COMMON_PTR tmp; SAVED_F77_COMMON_PTR tmp;
@ -890,7 +865,7 @@ else \
#if 0 #if 0
static void static void
clear_bf_list () clear_bf_list (void)
{ {
SAVED_BF_PTR tmp = saved_bf_list; SAVED_BF_PTR tmp = saved_bf_list;
@ -911,8 +886,7 @@ int global_remote_debug;
#if 0 #if 0
static long static long
get_bf_for_fcn (the_function) get_bf_for_fcn (long the_function)
long the_function;
{ {
SAVED_BF_PTR tmp; SAVED_BF_PTR tmp;
int nprobes = 0; int nprobes = 0;
@ -963,7 +937,7 @@ static SAVED_FUNCTION_PTR saved_function_list = NULL;
static SAVED_FUNCTION_PTR saved_function_list_end = NULL; static SAVED_FUNCTION_PTR saved_function_list_end = NULL;
static void static void
clear_function_list () clear_function_list (void)
{ {
SAVED_FUNCTION_PTR tmp = saved_function_list; SAVED_FUNCTION_PTR tmp = saved_function_list;
SAVED_FUNCTION_PTR next = NULL; SAVED_FUNCTION_PTR next = NULL;

View file

@ -59,12 +59,8 @@ void f_type_print_base (struct type *, struct ui_file *, int, int);
/* LEVEL is the depth to indent lines by. */ /* LEVEL is the depth to indent lines by. */
void void
f_print_type (type, varstring, stream, show, level) f_print_type (struct type *type, char *varstring, struct ui_file *stream,
struct type *type; int show, int level)
char *varstring;
struct ui_file *stream;
int show;
int level;
{ {
register enum type_code code; register enum type_code code;
int demangled_args; int demangled_args;
@ -103,11 +99,8 @@ f_print_type (type, varstring, stream, show, level)
SHOW is always zero on recursive calls. */ SHOW is always zero on recursive calls. */
void void
f_type_print_varspec_prefix (type, stream, show, passed_a_ptr) f_type_print_varspec_prefix (struct type *type, struct ui_file *stream,
struct type *type; int show, int passed_a_ptr)
struct ui_file *stream;
int show;
int passed_a_ptr;
{ {
if (type == 0) if (type == 0)
return; return;
@ -161,9 +154,7 @@ f_type_print_varspec_prefix (type, stream, show, passed_a_ptr)
#if 0 /* Currently unused */ #if 0 /* Currently unused */
static void static void
f_type_print_args (type, stream) f_type_print_args (struct type *type, struct ui_file *stream)
struct type *type;
struct ui_file *stream;
{ {
int i; int i;
struct type **args; struct type **args;
@ -201,12 +192,8 @@ f_type_print_args (type, stream)
Args work like c_type_print_varspec_prefix. */ Args work like c_type_print_varspec_prefix. */
static void static void
f_type_print_varspec_suffix (type, stream, show, passed_a_ptr, demangled_args) f_type_print_varspec_suffix (struct type *type, struct ui_file *stream,
struct type *type; int show, int passed_a_ptr, int demangled_args)
struct ui_file *stream;
int show;
int passed_a_ptr;
int demangled_args;
{ {
int upper_bound, lower_bound; int upper_bound, lower_bound;
int lower_bound_was_default = 0; int lower_bound_was_default = 0;
@ -312,9 +299,7 @@ f_type_print_varspec_suffix (type, stream, show, passed_a_ptr, demangled_args)
} }
static void static void
print_equivalent_f77_float_type (type, stream) print_equivalent_f77_float_type (struct type *type, struct ui_file *stream)
struct type *type;
struct ui_file *stream;
{ {
/* Override type name "float" and make it the /* Override type name "float" and make it the
appropriate real. XLC stupidly outputs -12 as a type appropriate real. XLC stupidly outputs -12 as a type
@ -337,11 +322,8 @@ print_equivalent_f77_float_type (type, stream)
We increase it for some recursive calls. */ We increase it for some recursive calls. */
void void
f_type_print_base (type, stream, show, level) f_type_print_base (struct type *type, struct ui_file *stream, int show,
struct type *type; int level)
struct ui_file *stream;
int show;
int level;
{ {
int retcode; int retcode;
int upper_bound; int upper_bound;

View file

@ -66,9 +66,7 @@ int f77_array_offset_tbl[MAX_FORTRAN_DIMS + 1][2];
#define F77_DIM_OFFSET(n) (f77_array_offset_tbl[n][0]) #define F77_DIM_OFFSET(n) (f77_array_offset_tbl[n][0])
int int
f77_get_dynamic_lowerbound (type, lower_bound) f77_get_dynamic_lowerbound (struct type *type, int *lower_bound)
struct type *type;
int *lower_bound;
{ {
CORE_ADDR current_frame_addr; CORE_ADDR current_frame_addr;
CORE_ADDR ptr_to_lower_bound; CORE_ADDR ptr_to_lower_bound;
@ -126,9 +124,7 @@ f77_get_dynamic_lowerbound (type, lower_bound)
} }
int int
f77_get_dynamic_upperbound (type, upper_bound) f77_get_dynamic_upperbound (struct type *type, int *upper_bound)
struct type *type;
int *upper_bound;
{ {
CORE_ADDR current_frame_addr = 0; CORE_ADDR current_frame_addr = 0;
CORE_ADDR ptr_to_upper_bound; CORE_ADDR ptr_to_upper_bound;
@ -193,8 +189,7 @@ f77_get_dynamic_upperbound (type, upper_bound)
/* Obtain F77 adjustable array dimensions */ /* Obtain F77 adjustable array dimensions */
static void static void
f77_get_dynamic_length_of_aggregate (type) f77_get_dynamic_length_of_aggregate (struct type *type)
struct type *type;
{ {
int upper_bound = -1; int upper_bound = -1;
int lower_bound = 1; int lower_bound = 1;
@ -232,9 +227,7 @@ f77_get_dynamic_length_of_aggregate (type)
type "type". */ type "type". */
static void static void
f77_create_arrayprint_offset_tbl (type, stream) f77_create_arrayprint_offset_tbl (struct type *type, struct ui_file *stream)
struct type *type;
struct ui_file *stream;
{ {
struct type *tmp_type; struct type *tmp_type;
int eltlen; int eltlen;
@ -281,18 +274,9 @@ f77_create_arrayprint_offset_tbl (type, stream)
the superior. Address == the address in the inferior. */ the superior. Address == the address in the inferior. */
static void static void
f77_print_array_1 (nss, ndimensions, type, valaddr, address, f77_print_array_1 (int nss, int ndimensions, struct type *type, char *valaddr,
stream, format, deref_ref, recurse, pretty) CORE_ADDR address, struct ui_file *stream, int format,
int nss; int deref_ref, int recurse, enum val_prettyprint pretty)
int ndimensions;
struct type *type;
char *valaddr;
CORE_ADDR address;
struct ui_file *stream;
int format;
int deref_ref;
int recurse;
enum val_prettyprint pretty;
{ {
int i; int i;
@ -331,16 +315,9 @@ f77_print_array_1 (nss, ndimensions, type, valaddr, address,
stuff and then immediately call f77_print_array_1() */ stuff and then immediately call f77_print_array_1() */
static void static void
f77_print_array (type, valaddr, address, stream, format, deref_ref, recurse, f77_print_array (struct type *type, char *valaddr, CORE_ADDR address,
pretty) struct ui_file *stream, int format, int deref_ref, int recurse,
struct type *type; enum val_prettyprint pretty)
char *valaddr;
CORE_ADDR address;
struct ui_file *stream;
int format;
int deref_ref;
int recurse;
enum val_prettyprint pretty;
{ {
int ndimensions; int ndimensions;
@ -375,17 +352,9 @@ f77_print_array (type, valaddr, address, stream, format, deref_ref, recurse,
The PRETTY parameter controls prettyprinting. */ The PRETTY parameter controls prettyprinting. */
int int
f_val_print (type, valaddr, embedded_offset, address, stream, format, deref_ref, recurse, f_val_print (struct type *type, char *valaddr, int embedded_offset,
pretty) CORE_ADDR address, struct ui_file *stream, int format,
struct type *type; int deref_ref, int recurse, enum val_prettyprint pretty)
char *valaddr;
int embedded_offset;
CORE_ADDR address;
struct ui_file *stream;
int format;
int deref_ref;
int recurse;
enum val_prettyprint pretty;
{ {
register unsigned int i = 0; /* Number of characters printed */ register unsigned int i = 0; /* Number of characters printed */
struct type *elttype; struct type *elttype;
@ -583,8 +552,7 @@ f_val_print (type, valaddr, embedded_offset, address, stream, format, deref_ref,
} }
static void static void
list_all_visible_commons (funname) list_all_visible_commons (char *funname)
char *funname;
{ {
SAVED_F77_COMMON_PTR tmp; SAVED_F77_COMMON_PTR tmp;
@ -606,9 +574,7 @@ list_all_visible_commons (funname)
given name */ given name */
static void static void
info_common_command (comname, from_tty) info_common_command (char *comname, int from_tty)
char *comname;
int from_tty;
{ {
SAVED_F77_COMMON_PTR the_common; SAVED_F77_COMMON_PTR the_common;
COMMON_ENTRY_PTR entry; COMMON_ENTRY_PTR entry;
@ -703,8 +669,7 @@ info_common_command (comname, from_tty)
#if 0 #if 0
static int static int
there_is_a_visible_common_named (comname) there_is_a_visible_common_named (char *comname)
char *comname;
{ {
SAVED_F77_COMMON_PTR the_common; SAVED_F77_COMMON_PTR the_common;
struct frame_info *fi; struct frame_info *fi;
@ -764,7 +729,7 @@ there_is_a_visible_common_named (comname)
#endif #endif
void void
_initialize_f_valprint () _initialize_f_valprint (void)
{ {
add_info ("common", info_common_command, add_info ("common", info_common_command,
"Print out the values contained in a Fortran COMMON block."); "Print out the values contained in a Fortran COMMON block.");

View file

@ -388,8 +388,7 @@ store_floating (void *addr, int len, DOUBLEST val)
Caller will check return value or die! */ Caller will check return value or die! */
value_ptr value_ptr
value_of_register (regnum) value_of_register (int regnum)
int regnum;
{ {
CORE_ADDR addr; CORE_ADDR addr;
int optim; int optim;
@ -460,8 +459,7 @@ address_to_signed_pointer (struct type *type, void *buf, CORE_ADDR addr)
up caring what frame it is being evaluated relative to? SYM must up caring what frame it is being evaluated relative to? SYM must
be non-NULL. */ be non-NULL. */
int int
symbol_read_needs_frame (sym) symbol_read_needs_frame (struct symbol *sym)
struct symbol *sym;
{ {
switch (SYMBOL_CLASS (sym)) switch (SYMBOL_CLASS (sym))
{ {
@ -506,9 +504,7 @@ symbol_read_needs_frame (sym)
If FRAME is NULL, use the selected_frame. */ If FRAME is NULL, use the selected_frame. */
value_ptr value_ptr
read_var_value (var, frame) read_var_value (register struct symbol *var, struct frame_info *frame)
register struct symbol *var;
struct frame_info *frame;
{ {
register value_ptr v; register value_ptr v;
struct type *type = SYMBOL_TYPE (var); struct type *type = SYMBOL_TYPE (var);
@ -713,10 +709,7 @@ addresses have not been bound by the dynamic loader. Try again when executable i
Caller will check return value or die! */ Caller will check return value or die! */
value_ptr value_ptr
value_from_register (type, regnum, frame) value_from_register (struct type *type, int regnum, struct frame_info *frame)
struct type *type;
int regnum;
struct frame_info *frame;
{ {
char raw_buffer[MAX_REGISTER_RAW_SIZE]; char raw_buffer[MAX_REGISTER_RAW_SIZE];
CORE_ADDR addr; CORE_ADDR addr;
@ -961,9 +954,7 @@ value_from_register (type, regnum, frame)
address. */ address. */
value_ptr value_ptr
locate_var_value (var, frame) locate_var_value (register struct symbol *var, struct frame_info *frame)
register struct symbol *var;
struct frame_info *frame;
{ {
CORE_ADDR addr = 0; CORE_ADDR addr = 0;
struct type *type = SYMBOL_TYPE (var); struct type *type = SYMBOL_TYPE (var);

View file

@ -46,11 +46,7 @@ extern char **environ;
* the four arguments "a", "b", "c", "d". * the four arguments "a", "b", "c", "d".
*/ */
static void static void
breakup_args ( breakup_args (char *scratch, char **argv)
scratch,
argv)
char *scratch;
char **argv;
{ {
char *cp = scratch; char *cp = scratch;
@ -388,9 +384,7 @@ fork_inferior (exec_file, allargs, env, traceme_fun, init_trace_fun,
clone will set it TRUE. clone will set it TRUE.
*/ */
void void
clone_and_follow_inferior (child_pid, followed_child) clone_and_follow_inferior (int child_pid, int *followed_child)
int child_pid;
int *followed_child;
{ {
extern int auto_solib_add; extern int auto_solib_add;
@ -512,8 +506,7 @@ clone_and_follow_inferior (child_pid, followed_child)
/* Accept NTRAPS traps from the inferior. */ /* Accept NTRAPS traps from the inferior. */
void void
startup_inferior (ntraps) startup_inferior (int ntraps)
int ntraps;
{ {
int pending_execs = ntraps; int pending_execs = ntraps;
int terminal_initted; int terminal_initted;

View file

@ -32,8 +32,7 @@
/* An expression that tells us whether the function invocation represented /* An expression that tells us whether the function invocation represented
by FI does not have a frame on the stack associated with it. */ by FI does not have a frame on the stack associated with it. */
int int
fr30_frameless_function_invocation (fi) fr30_frameless_function_invocation (struct frame_info *fi)
struct frame_info *fi;
{ {
int frameless; int frameless;
CORE_ADDR func_start, after_prologue; CORE_ADDR func_start, after_prologue;
@ -50,7 +49,7 @@ fr30_frameless_function_invocation (fi)
command, or the call dummy breakpoint gets hit. */ command, or the call dummy breakpoint gets hit. */
void void
fr30_pop_frame () fr30_pop_frame (void)
{ {
struct frame_info *frame = get_current_frame (); struct frame_info *frame = get_current_frame ();
int regnum; int regnum;
@ -159,12 +158,8 @@ fr30_skip_prologue (CORE_ADDR pc)
*/ */
CORE_ADDR CORE_ADDR
fr30_push_arguments (nargs, args, sp, struct_return, struct_addr) fr30_push_arguments (int nargs, value_ptr *args, CORE_ADDR sp,
int nargs; int struct_return, CORE_ADDR struct_addr)
value_ptr *args;
CORE_ADDR sp;
int struct_return;
CORE_ADDR struct_addr;
{ {
int argreg; int argreg;
int argnum; int argnum;
@ -245,7 +240,7 @@ fr30_push_arguments (nargs, args, sp, struct_return, struct_addr)
void _initialize_fr30_tdep (void); void _initialize_fr30_tdep (void);
void void
_initialize_fr30_tdep () _initialize_fr30_tdep (void)
{ {
extern int print_insn_fr30 (bfd_vma, disassemble_info *); extern int print_insn_fr30 (bfd_vma, disassemble_info *);
tm_print_insn = print_insn_fr30; tm_print_insn = print_insn_fr30;
@ -272,8 +267,7 @@ _initialize_fr30_tdep ()
static struct frame_info prologue_cache; static struct frame_info prologue_cache;
static int static int
check_prologue_cache (fi) check_prologue_cache (struct frame_info *fi)
struct frame_info *fi;
{ {
int i; int i;
@ -296,8 +290,7 @@ check_prologue_cache (fi)
*/ */
static void static void
save_prologue_cache (fi) save_prologue_cache (struct frame_info *fi)
struct frame_info *fi;
{ {
int i; int i;
@ -323,8 +316,7 @@ save_prologue_cache (fi)
be determined till after we have scanned the prologue. */ be determined till after we have scanned the prologue. */
static void static void
fr30_scan_prologue (fi) fr30_scan_prologue (struct frame_info *fi)
struct frame_info *fi;
{ {
int sp_offset, fp_offset; int sp_offset, fp_offset;
CORE_ADDR prologue_start, prologue_end, current_pc; CORE_ADDR prologue_start, prologue_end, current_pc;
@ -460,8 +452,7 @@ fr30_scan_prologue (fi)
pointer just prior to calling the target function (see run_stack_dummy). */ pointer just prior to calling the target function (see run_stack_dummy). */
void void
fr30_init_extra_frame_info (fi) fr30_init_extra_frame_info (struct frame_info *fi)
struct frame_info *fi;
{ {
int reg; int reg;
@ -507,9 +498,7 @@ fr30_init_extra_frame_info (fi)
frame. */ frame. */
CORE_ADDR CORE_ADDR
fr30_find_callers_reg (fi, regnum) fr30_find_callers_reg (struct frame_info *fi, int regnum)
struct frame_info *fi;
int regnum;
{ {
for (; fi; fi = fi->next) for (; fi; fi = fi->next)
if (PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame)) if (PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
@ -531,8 +520,7 @@ fr30_find_callers_reg (fi, regnum)
CORE_ADDR CORE_ADDR
fr30_frame_chain (fi) fr30_frame_chain (struct frame_info *fi)
struct frame_info *fi;
{ {
CORE_ADDR fn_start, callers_pc, fp; CORE_ADDR fn_start, callers_pc, fp;
struct frame_info caller_fi; struct frame_info caller_fi;
@ -580,8 +568,7 @@ fr30_frame_chain (fi)
will be found. */ will be found. */
CORE_ADDR CORE_ADDR
fr30_frame_saved_pc (fi) fr30_frame_saved_pc (struct frame_info *fi)
struct frame_info *fi;
{ {
if (PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame)) if (PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
return generic_read_register_dummy (fi->pc, fi->frame, PC_REGNUM); return generic_read_register_dummy (fi->pc, fi->frame, PC_REGNUM);
@ -597,14 +584,8 @@ fr30_frame_saved_pc (fi)
*/ */
int int
fr30_fix_call_dummy (dummy, sp, fun, nargs, args, type, gcc_p) fr30_fix_call_dummy (char *dummy, CORE_ADDR sp, CORE_ADDR fun, int nargs,
char *dummy; value_ptr *args, struct type *type, int gcc_p)
CORE_ADDR sp;
CORE_ADDR fun;
int nargs;
value_ptr *args;
struct type *type;
int gcc_p;
{ {
long offset24; long offset24;

View file

@ -3693,8 +3693,7 @@ init_gdbarch_data (struct gdbarch *gdbarch)
data-pointer. */ data-pointer. */
void * void *
gdbarch_data (data) gdbarch_data (struct gdbarch_data *data)
struct gdbarch_data *data;
{ {
if (data->index >= current_gdbarch->nr_data) if (data->index >= current_gdbarch->nr_data)
internal_error ("gdbarch_data: request for non-existant data."); internal_error ("gdbarch_data: request for non-existant data.");
@ -4086,7 +4085,7 @@ disassemble_info tm_print_insn_info;
extern void _initialize_gdbarch (void); extern void _initialize_gdbarch (void);
void void
_initialize_gdbarch () _initialize_gdbarch (void)
{ {
struct cmd_list_element *c; struct cmd_list_element *c;

View file

@ -41,8 +41,7 @@ static int remote_desc;
Then return to command level. */ Then return to command level. */
void void
perror_with_name (string) perror_with_name (char *string)
char *string;
{ {
#ifndef STDC_HEADERS #ifndef STDC_HEADERS
extern int sys_nerr; extern int sys_nerr;
@ -63,11 +62,7 @@ perror_with_name (string)
} }
static void static void
sync_error (fp, desc, expect, got) sync_error (FILE *fp, char *desc, int expect, int got)
FILE *fp;
char *desc;
int expect;
int got;
{ {
fprintf (stderr, "\n%s\n", desc); fprintf (stderr, "\n%s\n", desc);
fprintf (stderr, "At logfile offset %ld, expected '0x%x' got '0x%x'\n", fprintf (stderr, "At logfile offset %ld, expected '0x%x' got '0x%x'\n",
@ -77,7 +72,7 @@ sync_error (fp, desc, expect, got)
} }
void void
remote_close () remote_close (void)
{ {
close (remote_desc); close (remote_desc);
} }
@ -86,8 +81,7 @@ remote_close ()
NAME is the filename used for communication. */ NAME is the filename used for communication. */
void void
remote_open (name) remote_open (char *name)
char *name;
{ {
extern char *strchr (); extern char *strchr ();
@ -159,8 +153,7 @@ remote_open (name)
} }
static int static int
tohex (ch) tohex (int ch)
int ch;
{ {
if (ch >= '0' && ch <= '9') if (ch >= '0' && ch <= '9')
{ {
@ -180,8 +173,7 @@ tohex (ch)
} }
static int static int
logchar (fp) logchar (FILE *fp)
FILE *fp;
{ {
int ch; int ch;
int ch2; int ch2;
@ -244,8 +236,7 @@ logchar (fp)
blank) up until a \n is read from fp (which is not matched) */ blank) up until a \n is read from fp (which is not matched) */
void void
expect (fp) expect (FILE *fp)
FILE *fp;
{ {
int fromlog; int fromlog;
unsigned char fromgdb; unsigned char fromgdb;
@ -276,8 +267,7 @@ expect (fp)
\n is read from fp (which is discarded and not sent to gdb). */ \n is read from fp (which is discarded and not sent to gdb). */
void void
play (fp) play (FILE *fp)
FILE *fp;
{ {
int fromlog; int fromlog;
char ch; char ch;

View file

@ -58,9 +58,7 @@ int query ();
ENV is the environment vector to pass. */ ENV is the environment vector to pass. */
int int
create_inferior (program, allargs) create_inferior (char *program, char **allargs)
char *program;
char **allargs;
{ {
int pid; int pid;
@ -86,7 +84,7 @@ create_inferior (program, allargs)
/* Kill the inferior process. Make us have no inferior. */ /* Kill the inferior process. Make us have no inferior. */
void void
kill_inferior () kill_inferior (void)
{ {
if (inferior_pid == 0) if (inferior_pid == 0)
return; return;
@ -97,8 +95,7 @@ kill_inferior ()
/* Return nonzero if the given thread is still alive. */ /* Return nonzero if the given thread is still alive. */
int int
mythread_alive (pid) mythread_alive (int pid)
int pid;
{ {
return 1; return 1;
} }
@ -106,8 +103,7 @@ mythread_alive (pid)
/* Wait for process, returns status */ /* Wait for process, returns status */
unsigned char unsigned char
mywait (status) mywait (char *status)
char *status;
{ {
int pid; int pid;
union wait w; union wait w;
@ -140,9 +136,7 @@ mywait (status)
If SIGNAL is nonzero, give it that signal. */ If SIGNAL is nonzero, give it that signal. */
void void
myresume (step, signal) myresume (int step, int signal)
int step;
int signal;
{ {
errno = 0; errno = 0;
ptrace (step ? PT_STEP : PT_CONTINUE, inferior_pid, 1, signal, 0); ptrace (step ? PT_STEP : PT_CONTINUE, inferior_pid, 1, signal, 0);
@ -164,9 +158,7 @@ myresume (step, signal)
#endif #endif
CORE_ADDR CORE_ADDR
register_addr (regno, blockend) register_addr (int regno, CORE_ADDR blockend)
int regno;
CORE_ADDR blockend;
{ {
CORE_ADDR addr; CORE_ADDR addr;
@ -181,8 +173,7 @@ register_addr (regno, blockend)
/* Fetch one register. */ /* Fetch one register. */
static void static void
fetch_register (regno) fetch_register (int regno)
int regno;
{ {
register unsigned int regaddr; register unsigned int regaddr;
char buf[MAX_REGISTER_RAW_SIZE]; char buf[MAX_REGISTER_RAW_SIZE];
@ -217,8 +208,7 @@ error_exit:;
/* Fetch all registers, or just one, from the child process. */ /* Fetch all registers, or just one, from the child process. */
void void
fetch_inferior_registers (regno) fetch_inferior_registers (int regno)
int regno;
{ {
if (regno == -1 || regno == 0) if (regno == -1 || regno == 0)
for (regno = 0; regno < NUM_REGS; regno++) for (regno = 0; regno < NUM_REGS; regno++)
@ -232,8 +222,7 @@ fetch_inferior_registers (regno)
Otherwise, REGNO specifies which register (so we can save time). */ Otherwise, REGNO specifies which register (so we can save time). */
void void
store_inferior_registers (regno) store_inferior_registers (int regno)
int regno;
{ {
register unsigned int regaddr; register unsigned int regaddr;
char buf[80]; char buf[80];
@ -295,10 +284,7 @@ store_inferior_registers (regno)
/* Copy LEN bytes from inferior's memory starting at MEMADDR /* Copy LEN bytes from inferior's memory starting at MEMADDR
to debugger memory starting at MYADDR. */ to debugger memory starting at MYADDR. */
read_inferior_memory (memaddr, myaddr, len) read_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len)
CORE_ADDR memaddr;
char *myaddr;
int len;
{ {
register int i; register int i;
/* Round starting address down to longword boundary. */ /* Round starting address down to longword boundary. */
@ -325,10 +311,7 @@ read_inferior_memory (memaddr, myaddr, len)
returns the value of errno. */ returns the value of errno. */
int int
write_inferior_memory (memaddr, myaddr, len) write_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len)
CORE_ADDR memaddr;
char *myaddr;
int len;
{ {
register int i; register int i;
/* Round starting address down to longword boundary. */ /* Round starting address down to longword boundary. */
@ -369,6 +352,6 @@ write_inferior_memory (memaddr, myaddr, len)
} }
void void
initialize_low () initialize_low (void)
{ {
} }

View file

@ -66,9 +66,7 @@ static void initialize_arch (void);
ENV is the environment vector to pass. */ ENV is the environment vector to pass. */
int int
create_inferior (program, allargs) create_inferior (char *program, char **allargs)
char *program;
char **allargs;
{ {
int pid; int pid;
@ -94,7 +92,7 @@ create_inferior (program, allargs)
/* Kill the inferior process. Make us have no inferior. */ /* Kill the inferior process. Make us have no inferior. */
void void
kill_inferior () kill_inferior (void)
{ {
if (inferior_pid == 0) if (inferior_pid == 0)
return; return;
@ -105,8 +103,7 @@ kill_inferior ()
/* Return nonzero if the given thread is still alive. */ /* Return nonzero if the given thread is still alive. */
int int
mythread_alive (pid) mythread_alive (int pid)
int pid;
{ {
return 1; return 1;
} }
@ -114,8 +111,7 @@ mythread_alive (pid)
/* Wait for process, returns status */ /* Wait for process, returns status */
unsigned char unsigned char
mywait (status) mywait (char *status)
char *status;
{ {
int pid; int pid;
union wait w; union wait w;
@ -148,9 +144,7 @@ mywait (status)
If SIGNAL is nonzero, give it that signal. */ If SIGNAL is nonzero, give it that signal. */
void void
myresume (step, signal) myresume (int step, int signal)
int step;
int signal;
{ {
errno = 0; errno = 0;
ptrace (step ? PTRACE_SINGLESTEP : PTRACE_CONT, inferior_pid, 1, signal); ptrace (step ? PTRACE_SINGLESTEP : PTRACE_CONT, inferior_pid, 1, signal);
@ -191,7 +185,7 @@ int i386_register_raw_size[MAX_NUM_REGS] = {
int i386_register_byte[MAX_NUM_REGS]; int i386_register_byte[MAX_NUM_REGS];
static void static void
initialize_arch () initialize_arch (void)
{ {
/* Initialize the table saying where each register starts in the /* Initialize the table saying where each register starts in the
register file. */ register file. */
@ -218,9 +212,7 @@ static int regmap[] =
}; };
int int
i386_register_u_addr (blockend, regnum) i386_register_u_addr (int blockend, int regnum)
int blockend;
int regnum;
{ {
#if 0 #if 0
/* this will be needed if fp registers are reinstated */ /* this will be needed if fp registers are reinstated */
@ -242,7 +234,7 @@ i386_register_u_addr (blockend, regnum)
} }
#elif defined(TARGET_M68K) #elif defined(TARGET_M68K)
static void static void
initialize_arch () initialize_arch (void)
{ {
return; return;
} }
@ -270,9 +262,7 @@ static int regmap[] =
is stored. */ is stored. */
int int
m68k_linux_register_u_addr (blockend, regnum) m68k_linux_register_u_addr (int blockend, int regnum)
int blockend;
int regnum;
{ {
return (blockend + 4 * regmap[regnum]); return (blockend + 4 * regmap[regnum]);
} }
@ -551,16 +541,14 @@ ia64_register_u_addr (int blockend, int regnum)
} }
static void static void
initialize_arch () initialize_arch (void)
{ {
return; return;
} }
#endif #endif
CORE_ADDR CORE_ADDR
register_addr (regno, blockend) register_addr (int regno, CORE_ADDR blockend)
int regno;
CORE_ADDR blockend;
{ {
CORE_ADDR addr; CORE_ADDR addr;
@ -575,8 +563,7 @@ register_addr (regno, blockend)
/* Fetch one register. */ /* Fetch one register. */
static void static void
fetch_register (regno) fetch_register (int regno)
int regno;
{ {
CORE_ADDR regaddr; CORE_ADDR regaddr;
register int i; register int i;
@ -610,8 +597,7 @@ error_exit:;
/* Fetch all registers, or just one, from the child process. */ /* Fetch all registers, or just one, from the child process. */
void void
fetch_inferior_registers (regno) fetch_inferior_registers (int regno)
int regno;
{ {
if (regno == -1 || regno == 0) if (regno == -1 || regno == 0)
for (regno = 0; regno < NUM_REGS - NUM_FREGS; regno++) for (regno = 0; regno < NUM_REGS - NUM_FREGS; regno++)
@ -625,8 +611,7 @@ fetch_inferior_registers (regno)
Otherwise, REGNO specifies which register (so we can save time). */ Otherwise, REGNO specifies which register (so we can save time). */
void void
store_inferior_registers (regno) store_inferior_registers (int regno)
int regno;
{ {
CORE_ADDR regaddr; CORE_ADDR regaddr;
int i; int i;
@ -690,10 +675,7 @@ store_inferior_registers (regno)
to debugger memory starting at MYADDR. */ to debugger memory starting at MYADDR. */
void void
read_inferior_memory (memaddr, myaddr, len) read_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len)
CORE_ADDR memaddr;
char *myaddr;
int len;
{ {
register int i; register int i;
/* Round starting address down to longword boundary. */ /* Round starting address down to longword boundary. */
@ -722,10 +704,7 @@ read_inferior_memory (memaddr, myaddr, len)
returns the value of errno. */ returns the value of errno. */
int int
write_inferior_memory (memaddr, myaddr, len) write_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len)
CORE_ADDR memaddr;
char *myaddr;
int len;
{ {
register int i; register int i;
/* Round starting address down to longword boundary. */ /* Round starting address down to longword boundary. */
@ -766,7 +745,7 @@ write_inferior_memory (memaddr, myaddr, len)
} }
void void
initialize_low () initialize_low (void)
{ {
initialize_arch (); initialize_arch ();
} }

View file

@ -53,9 +53,7 @@ char *registers = my_registers;
ALLARGS is a vector of program-name and args. */ ALLARGS is a vector of program-name and args. */
int int
create_inferior (program, allargs) create_inferior (char *program, char **allargs)
char *program;
char **allargs;
{ {
int pid; int pid;
@ -91,7 +89,7 @@ create_inferior (program, allargs)
/* Kill the inferior process. Make us have no inferior. */ /* Kill the inferior process. Make us have no inferior. */
void void
kill_inferior () kill_inferior (void)
{ {
if (inferior_pid == 0) if (inferior_pid == 0)
return; return;
@ -103,8 +101,7 @@ kill_inferior ()
/* Return nonzero if the given thread is still alive. */ /* Return nonzero if the given thread is still alive. */
int int
mythread_alive (pid) mythread_alive (int pid)
int pid;
{ {
/* Arggh. Apparently pthread_kill only works for threads within /* Arggh. Apparently pthread_kill only works for threads within
the process that calls pthread_kill. the process that calls pthread_kill.
@ -122,8 +119,7 @@ mythread_alive (pid)
/* Wait for process, returns status */ /* Wait for process, returns status */
unsigned char unsigned char
mywait (status) mywait (char *status)
char *status;
{ {
int pid; int pid;
union wait w; union wait w;
@ -186,9 +182,7 @@ mywait (status)
If SIGNAL is nonzero, give it that signal. */ If SIGNAL is nonzero, give it that signal. */
void void
myresume (step, signal) myresume (int step, int signal)
int step;
int signal;
{ {
errno = 0; errno = 0;
ptrace (step ? PTRACE_SINGLESTEP_ONE : PTRACE_CONT, ptrace (step ? PTRACE_SINGLESTEP_ONE : PTRACE_CONT,
@ -352,8 +346,7 @@ static int regmap[] =
It also handles knows where to find the I & L regs on the stack. */ It also handles knows where to find the I & L regs on the stack. */
void void
fetch_inferior_registers (regno) fetch_inferior_registers (int regno)
int regno;
{ {
#if 0 #if 0
int whatregs = 0; int whatregs = 0;
@ -457,8 +450,7 @@ fetch_inferior_registers (regno)
this point. */ this point. */
void void
store_inferior_registers (regno) store_inferior_registers (int regno)
int regno;
{ {
#if 0 #if 0
int whatregs = 0; int whatregs = 0;
@ -566,7 +558,7 @@ store_inferior_registers (regno)
saved context block. */ saved context block. */
static unsigned long static unsigned long
lynx_registers_addr () lynx_registers_addr (void)
{ {
CORE_ADDR stblock; CORE_ADDR stblock;
int ecpoff = offsetof (st_t, ecp); int ecpoff = offsetof (st_t, ecp);
@ -591,8 +583,7 @@ lynx_registers_addr ()
marking them as valid so we won't fetch them again. */ marking them as valid so we won't fetch them again. */
void void
fetch_inferior_registers (ignored) fetch_inferior_registers (int ignored)
int ignored;
{ {
int regno; int regno;
unsigned long reg; unsigned long reg;
@ -623,8 +614,7 @@ fetch_inferior_registers (ignored)
Otherwise, REGNO specifies which register (so we can save time). */ Otherwise, REGNO specifies which register (so we can save time). */
void void
store_inferior_registers (ignored) store_inferior_registers (int ignored)
int ignored;
{ {
int regno; int regno;
unsigned long reg; unsigned long reg;
@ -662,10 +652,7 @@ store_inferior_registers (ignored)
to debugger memory starting at MYADDR. */ to debugger memory starting at MYADDR. */
void void
read_inferior_memory (memaddr, myaddr, len) read_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len)
CORE_ADDR memaddr;
char *myaddr;
int len;
{ {
register int i; register int i;
/* Round starting address down to longword boundary. */ /* Round starting address down to longword boundary. */
@ -692,10 +679,7 @@ read_inferior_memory (memaddr, myaddr, len)
returns the value of errno. */ returns the value of errno. */
int int
write_inferior_memory (memaddr, myaddr, len) write_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len)
CORE_ADDR memaddr;
char *myaddr;
int len;
{ {
register int i; register int i;
/* Round starting address down to longword boundary. */ /* Round starting address down to longword boundary. */
@ -748,6 +732,6 @@ ptrace (PTRACE_POKETEXT): errno=%d, pid=0x%x, addr=0x%x, buffer[i] = 0x%x\n",
} }
void void
initialize_low () initialize_low (void)
{ {
} }

View file

@ -89,7 +89,7 @@ int i386_register_raw_size[MAX_NUM_REGS] = {
int i386_register_byte[MAX_NUM_REGS]; int i386_register_byte[MAX_NUM_REGS];
static void static void
initialize_arch() initialize_arch (void)
{ {
/* Initialize the table saying where each register starts in the /* Initialize the table saying where each register starts in the
register file. */ register file. */
@ -108,7 +108,7 @@ initialize_arch()
#ifdef __powerpc__ #ifdef __powerpc__
static void static void
initialize_arch() initialize_arch (void)
{ {
} }
#endif /* !__powerpc__ */ #endif /* !__powerpc__ */
@ -119,9 +119,7 @@ initialize_arch()
ENV is the environment vector to pass. */ ENV is the environment vector to pass. */
int int
create_inferior (program, allargs) create_inferior (char *program, char **allargs)
char *program;
char **allargs;
{ {
int pid; int pid;
@ -147,7 +145,7 @@ create_inferior (program, allargs)
/* Kill the inferior process. Make us have no inferior. */ /* Kill the inferior process. Make us have no inferior. */
void void
kill_inferior () kill_inferior (void)
{ {
if (inferior_pid == 0) if (inferior_pid == 0)
return; return;
@ -158,8 +156,7 @@ kill_inferior ()
/* Return nonzero if the given thread is still alive. */ /* Return nonzero if the given thread is still alive. */
int int
mythread_alive (pid) mythread_alive (int pid)
int pid;
{ {
return 1; return 1;
} }
@ -167,8 +164,7 @@ mythread_alive (pid)
/* Wait for process, returns status */ /* Wait for process, returns status */
unsigned char unsigned char
mywait (status) mywait (char *status)
char *status;
{ {
int pid; int pid;
int w; int w;
@ -201,9 +197,7 @@ mywait (status)
If SIGNAL is nonzero, give it that signal. */ If SIGNAL is nonzero, give it that signal. */
void void
myresume (step, signal) myresume (int step, int signal)
int step;
int signal;
{ {
errno = 0; errno = 0;
ptrace (step ? PT_STEP : PT_CONTINUE, inferior_pid, ptrace (step ? PT_STEP : PT_CONTINUE, inferior_pid,
@ -219,8 +213,7 @@ myresume (step, signal)
marking them as valid so we won't fetch them again. */ marking them as valid so we won't fetch them again. */
void void
fetch_inferior_registers (ignored) fetch_inferior_registers (int ignored)
int ignored;
{ {
struct reg inferior_registers; struct reg inferior_registers;
struct env387 inferior_fp_registers; struct env387 inferior_fp_registers;
@ -271,8 +264,7 @@ fetch_inferior_registers (ignored)
Otherwise, REGNO specifies which register (so we can save time). */ Otherwise, REGNO specifies which register (so we can save time). */
void void
store_inferior_registers (ignored) store_inferior_registers (int ignored)
int ignored;
{ {
struct reg inferior_registers; struct reg inferior_registers;
struct env387 inferior_fp_registers; struct env387 inferior_fp_registers;
@ -325,8 +317,7 @@ store_inferior_registers (ignored)
marking them as valid so we won't fetch them again. */ marking them as valid so we won't fetch them again. */
void void
fetch_inferior_registers (regno) fetch_inferior_registers (int regno)
int regno;
{ {
struct reg inferior_registers; struct reg inferior_registers;
struct fpreg inferior_fp_registers; struct fpreg inferior_fp_registers;
@ -354,8 +345,7 @@ fetch_inferior_registers (regno)
Otherwise, REGNO specifies which register (so we can save time). */ Otherwise, REGNO specifies which register (so we can save time). */
void void
store_inferior_registers (regno) store_inferior_registers (int regno)
int regno;
{ {
struct reg inferior_registers; struct reg inferior_registers;
struct fpreg inferior_fp_registers; struct fpreg inferior_fp_registers;
@ -388,10 +378,7 @@ store_inferior_registers (regno)
/* Copy LEN bytes from inferior's memory starting at MEMADDR /* Copy LEN bytes from inferior's memory starting at MEMADDR
to debugger memory starting at MYADDR. */ to debugger memory starting at MYADDR. */
read_inferior_memory (memaddr, myaddr, len) read_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len)
CORE_ADDR memaddr;
char *myaddr;
int len;
{ {
register int i; register int i;
/* Round starting address down to longword boundary. */ /* Round starting address down to longword boundary. */
@ -418,10 +405,7 @@ read_inferior_memory (memaddr, myaddr, len)
returns the value of errno. */ returns the value of errno. */
int int
write_inferior_memory (memaddr, myaddr, len) write_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len)
CORE_ADDR memaddr;
char *myaddr;
int len;
{ {
register int i; register int i;
/* Round starting address down to longword boundary. */ /* Round starting address down to longword boundary. */
@ -462,7 +446,7 @@ write_inferior_memory (memaddr, myaddr, len)
} }
void void
initialize_low () initialize_low (void)
{ {
initialize_arch (); initialize_arch ();
} }

View file

@ -41,8 +41,7 @@ static SIM_DESC gdbsim_desc = 0;
does not support loading itself. */ does not support loading itself. */
static void static void
generic_load (loadfile_bfd) generic_load (bfd *loadfile_bfd)
bfd *loadfile_bfd;
{ {
asection *s; asection *s;
@ -85,9 +84,7 @@ generic_load (loadfile_bfd)
} }
int int
create_inferior (program, argv) create_inferior (char *program, char **argv)
char *program;
char **argv;
{ {
bfd *abfd; bfd *abfd;
int pid = 0; int pid = 0;
@ -145,7 +142,7 @@ create_inferior (program, argv)
/* Kill the inferior process. Make us have no inferior. */ /* Kill the inferior process. Make us have no inferior. */
void void
kill_inferior () kill_inferior (void)
{ {
sim_close (gdbsim_desc, 0); sim_close (gdbsim_desc, 0);
default_callback.shutdown (&default_callback); default_callback.shutdown (&default_callback);
@ -154,8 +151,7 @@ kill_inferior ()
/* Fetch one register. */ /* Fetch one register. */
static void static void
fetch_register (regno) fetch_register (int regno)
int regno;
{ {
sim_fetch_register (gdbsim_desc, regno, &registers[REGISTER_BYTE (regno)], sim_fetch_register (gdbsim_desc, regno, &registers[REGISTER_BYTE (regno)],
REGISTER_RAW_SIZE (regno)); REGISTER_RAW_SIZE (regno));
@ -164,8 +160,7 @@ fetch_register (regno)
/* Fetch all registers, or just one, from the child process. */ /* Fetch all registers, or just one, from the child process. */
void void
fetch_inferior_registers (regno) fetch_inferior_registers (int regno)
int regno;
{ {
if (regno == -1 || regno == 0) if (regno == -1 || regno == 0)
for (regno = 0; regno < NUM_REGS /*-NUM_FREGS*/ ; regno++) for (regno = 0; regno < NUM_REGS /*-NUM_FREGS*/ ; regno++)
@ -179,8 +174,7 @@ fetch_inferior_registers (regno)
Otherwise, REGNO specifies which register (so we can save time). */ Otherwise, REGNO specifies which register (so we can save time). */
void void
store_inferior_registers (regno) store_inferior_registers (int regno)
int regno;
{ {
if (regno == -1) if (regno == -1)
{ {
@ -194,8 +188,7 @@ store_inferior_registers (regno)
/* Return nonzero if the given thread is still alive. */ /* Return nonzero if the given thread is still alive. */
int int
mythread_alive (pid) mythread_alive (int pid)
int pid;
{ {
return 1; return 1;
} }
@ -203,8 +196,7 @@ mythread_alive (pid)
/* Wait for process, returns status */ /* Wait for process, returns status */
unsigned char unsigned char
mywait (status) mywait (char *status)
char *status;
{ {
int sigrc; int sigrc;
enum sim_stop reason; enum sim_stop reason;
@ -240,9 +232,7 @@ mywait (status)
If SIGNAL is nonzero, give it that signal. */ If SIGNAL is nonzero, give it that signal. */
void void
myresume (step, signo) myresume (int step, int signo)
int step;
int signo;
{ {
/* Should be using target_signal_to_host() or signal numbers in target.h /* Should be using target_signal_to_host() or signal numbers in target.h
to convert GDB signal number to target signal number. */ to convert GDB signal number to target signal number. */
@ -253,10 +243,7 @@ myresume (step, signo)
to debugger memory starting at MYADDR. */ to debugger memory starting at MYADDR. */
void void
read_inferior_memory (memaddr, myaddr, len) read_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len)
CORE_ADDR memaddr;
char *myaddr;
int len;
{ {
sim_read (gdbsim_desc, memaddr, myaddr, len); sim_read (gdbsim_desc, memaddr, myaddr, len);
} }
@ -267,16 +254,13 @@ read_inferior_memory (memaddr, myaddr, len)
returns the value of errno. */ returns the value of errno. */
int int
write_inferior_memory (memaddr, myaddr, len) write_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len)
CORE_ADDR memaddr;
char *myaddr;
int len;
{ {
sim_write (gdbsim_desc, memaddr, myaddr, len); /* should check for error. FIXME!! */ sim_write (gdbsim_desc, memaddr, myaddr, len); /* should check for error. FIXME!! */
return 0; return 0;
} }
void void
initialize_low () initialize_low (void)
{ {
} }

View file

@ -63,9 +63,7 @@ int query ();
ENV is the environment vector to pass. */ ENV is the environment vector to pass. */
int int
create_inferior (program, allargs) create_inferior (char *program, char **allargs)
char *program;
char **allargs;
{ {
int pid; int pid;
@ -91,7 +89,7 @@ create_inferior (program, allargs)
/* Kill the inferior process. Make us have no inferior. */ /* Kill the inferior process. Make us have no inferior. */
void void
kill_inferior () kill_inferior (void)
{ {
if (inferior_pid == 0) if (inferior_pid == 0)
return; return;
@ -102,8 +100,7 @@ kill_inferior ()
/* Return nonzero if the given thread is still alive. */ /* Return nonzero if the given thread is still alive. */
int int
mythread_alive (pid) mythread_alive (int pid)
int pid;
{ {
return 1; return 1;
} }
@ -111,8 +108,7 @@ mythread_alive (pid)
/* Wait for process, returns status */ /* Wait for process, returns status */
unsigned char unsigned char
mywait (status) mywait (char *status)
char *status;
{ {
int pid; int pid;
union wait w; union wait w;
@ -145,9 +141,7 @@ mywait (status)
If SIGNAL is nonzero, give it that signal. */ If SIGNAL is nonzero, give it that signal. */
void void
myresume (step, signal) myresume (int step, int signal)
int step;
int signal;
{ {
errno = 0; errno = 0;
ptrace (step ? PTRACE_SINGLESTEP : PTRACE_CONT, inferior_pid, 1, signal); ptrace (step ? PTRACE_SINGLESTEP : PTRACE_CONT, inferior_pid, 1, signal);
@ -160,8 +154,7 @@ myresume (step, signal)
marking them as valid so we won't fetch them again. */ marking them as valid so we won't fetch them again. */
void void
fetch_inferior_registers (ignored) fetch_inferior_registers (int ignored)
int ignored;
{ {
struct regs inferior_registers; struct regs inferior_registers;
struct fp_status inferior_fp_registers; struct fp_status inferior_fp_registers;
@ -207,8 +200,7 @@ fetch_inferior_registers (ignored)
Otherwise, REGNO specifies which register (so we can save time). */ Otherwise, REGNO specifies which register (so we can save time). */
void void
store_inferior_registers (ignored) store_inferior_registers (int ignored)
int ignored;
{ {
struct regs inferior_registers; struct regs inferior_registers;
struct fp_status inferior_fp_registers; struct fp_status inferior_fp_registers;
@ -250,10 +242,7 @@ store_inferior_registers (ignored)
/* Copy LEN bytes from inferior's memory starting at MEMADDR /* Copy LEN bytes from inferior's memory starting at MEMADDR
to debugger memory starting at MYADDR. */ to debugger memory starting at MYADDR. */
read_inferior_memory (memaddr, myaddr, len) read_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len)
CORE_ADDR memaddr;
char *myaddr;
int len;
{ {
register int i; register int i;
/* Round starting address down to longword boundary. */ /* Round starting address down to longword boundary. */
@ -280,10 +269,7 @@ read_inferior_memory (memaddr, myaddr, len)
returns the value of errno. */ returns the value of errno. */
int int
write_inferior_memory (memaddr, myaddr, len) write_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len)
CORE_ADDR memaddr;
char *myaddr;
int len;
{ {
register int i; register int i;
/* Round starting address down to longword boundary. */ /* Round starting address down to longword boundary. */
@ -324,6 +310,6 @@ write_inferior_memory (memaddr, myaddr, len)
} }
void void
initialize_low () initialize_low (void)
{ {
} }

View file

@ -60,9 +60,7 @@ int query ();
ENV is the environment vector to pass. */ ENV is the environment vector to pass. */
int int
create_inferior (program, allargs) create_inferior (char *program, char **allargs)
char *program;
char **allargs;
{ {
int pid; int pid;
@ -88,7 +86,7 @@ create_inferior (program, allargs)
/* Kill the inferior process. Make us have no inferior. */ /* Kill the inferior process. Make us have no inferior. */
void void
kill_inferior () kill_inferior (void)
{ {
if (inferior_pid == 0) if (inferior_pid == 0)
return; return;
@ -99,8 +97,7 @@ kill_inferior ()
/* Return nonzero if the given thread is still alive. */ /* Return nonzero if the given thread is still alive. */
int int
mythread_alive (pid) mythread_alive (int pid)
int pid;
{ {
return 1; return 1;
} }
@ -108,8 +105,7 @@ mythread_alive (pid)
/* Wait for process, returns status */ /* Wait for process, returns status */
unsigned char unsigned char
mywait (status) mywait (char *status)
char *status;
{ {
int pid; int pid;
union wait w; union wait w;
@ -142,9 +138,7 @@ mywait (status)
If SIGNAL is nonzero, give it that signal. */ If SIGNAL is nonzero, give it that signal. */
void void
myresume (step, signal) myresume (int step, int signal)
int step;
int signal;
{ {
errno = 0; errno = 0;
ptrace (step ? PTRACE_SINGLESTEP : PTRACE_CONT, inferior_pid, 1, signal); ptrace (step ? PTRACE_SINGLESTEP : PTRACE_CONT, inferior_pid, 1, signal);
@ -157,8 +151,7 @@ myresume (step, signal)
marking them as valid so we won't fetch them again. */ marking them as valid so we won't fetch them again. */
void void
fetch_inferior_registers (ignored) fetch_inferior_registers (int ignored)
int ignored;
{ {
struct regs inferior_registers; struct regs inferior_registers;
struct fp_status inferior_fp_registers; struct fp_status inferior_fp_registers;
@ -190,8 +183,7 @@ fetch_inferior_registers (ignored)
Otherwise, REGNO specifies which register (so we can save time). */ Otherwise, REGNO specifies which register (so we can save time). */
void void
store_inferior_registers (ignored) store_inferior_registers (int ignored)
int ignored;
{ {
struct regs inferior_registers; struct regs inferior_registers;
struct fp_status inferior_fp_registers; struct fp_status inferior_fp_registers;
@ -229,10 +221,7 @@ store_inferior_registers (ignored)
/* Copy LEN bytes from inferior's memory starting at MEMADDR /* Copy LEN bytes from inferior's memory starting at MEMADDR
to debugger memory starting at MYADDR. */ to debugger memory starting at MYADDR. */
read_inferior_memory (memaddr, myaddr, len) read_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len)
CORE_ADDR memaddr;
char *myaddr;
int len;
{ {
register int i; register int i;
/* Round starting address down to longword boundary. */ /* Round starting address down to longword boundary. */
@ -259,10 +248,7 @@ read_inferior_memory (memaddr, myaddr, len)
returns the value of errno. */ returns the value of errno. */
int int
write_inferior_memory (memaddr, myaddr, len) write_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len)
CORE_ADDR memaddr;
char *myaddr;
int len;
{ {
register int i; register int i;
/* Round starting address down to longword boundary. */ /* Round starting address down to longword boundary. */
@ -303,6 +289,6 @@ write_inferior_memory (memaddr, myaddr, len)
} }
void void
initialize_low () initialize_low (void)
{ {
} }

View file

@ -41,8 +41,7 @@ static int remote_desc;
NAME is the filename used for communication. */ NAME is the filename used for communication. */
void void
remote_open (name) remote_open (char *name)
char *name;
{ {
int save_fcntl_flags; int save_fcntl_flags;
@ -162,7 +161,7 @@ remote_open (name)
} }
void void
remote_close () remote_close (void)
{ {
close (remote_desc); close (remote_desc);
} }
@ -170,8 +169,7 @@ remote_close ()
/* Convert hex digit A to a number. */ /* Convert hex digit A to a number. */
static int static int
fromhex (a) fromhex (int a)
int a;
{ {
if (a >= '0' && a <= '9') if (a >= '0' && a <= '9')
return a - '0'; return a - '0';
@ -184,8 +182,7 @@ fromhex (a)
/* Convert number NIB to a hex digit. */ /* Convert number NIB to a hex digit. */
static int static int
tohex (nib) tohex (int nib)
int nib;
{ {
if (nib < 10) if (nib < 10)
return '0' + nib; return '0' + nib;
@ -197,8 +194,7 @@ tohex (nib)
The data of the packet is in BUF. Returns >= 0 on success, -1 otherwise. */ The data of the packet is in BUF. Returns >= 0 on success, -1 otherwise. */
int int
putpkt (buf) putpkt (char *buf)
char *buf;
{ {
int i; int i;
unsigned char csum = 0; unsigned char csum = 0;
@ -262,7 +258,7 @@ putpkt (buf)
will cause us to send a SIGINT to the child. */ will cause us to send a SIGINT to the child. */
static void static void
input_interrupt () input_interrupt (void)
{ {
int cc; int cc;
char c; char c;
@ -279,13 +275,13 @@ input_interrupt ()
} }
void void
enable_async_io () enable_async_io (void)
{ {
signal (SIGIO, input_interrupt); signal (SIGIO, input_interrupt);
} }
void void
disable_async_io () disable_async_io (void)
{ {
signal (SIGIO, SIG_IGN); signal (SIGIO, SIG_IGN);
} }
@ -293,7 +289,7 @@ disable_async_io ()
/* Returns next char from remote GDB. -1 if error. */ /* Returns next char from remote GDB. -1 if error. */
static int static int
readchar () readchar (void)
{ {
static char buf[BUFSIZ]; static char buf[BUFSIZ];
static int bufcnt = 0; static int bufcnt = 0;
@ -323,8 +319,7 @@ readchar ()
and store it in BUF. Returns length of packet, or negative if error. */ and store it in BUF. Returns length of packet, or negative if error. */
int int
getpkt (buf) getpkt (char *buf)
char *buf;
{ {
char *bp; char *bp;
unsigned char csum, c1, c2; unsigned char csum, c1, c2;
@ -380,8 +375,7 @@ getpkt (buf)
} }
void void
write_ok (buf) write_ok (char *buf)
char *buf;
{ {
buf[0] = 'O'; buf[0] = 'O';
buf[1] = 'K'; buf[1] = 'K';
@ -389,8 +383,7 @@ write_ok (buf)
} }
void void
write_enn (buf) write_enn (char *buf)
char *buf;
{ {
buf[0] = 'E'; buf[0] = 'E';
buf[1] = 'N'; buf[1] = 'N';
@ -399,9 +392,7 @@ write_enn (buf)
} }
void void
convert_int_to_ascii (from, to, n) convert_int_to_ascii (char *from, char *to, int n)
char *from, *to;
int n;
{ {
int nib; int nib;
char ch; char ch;
@ -418,9 +409,7 @@ convert_int_to_ascii (from, to, n)
void void
convert_ascii_to_int (from, to, n) convert_ascii_to_int (char *from, char *to, int n)
char *from, *to;
int n;
{ {
int nib1, nib2; int nib1, nib2;
while (n--) while (n--)
@ -432,9 +421,7 @@ convert_ascii_to_int (from, to, n)
} }
static char * static char *
outreg (regno, buf) outreg (int regno, char *buf)
int regno;
char *buf;
{ {
int regsize = REGISTER_RAW_SIZE (regno); int regsize = REGISTER_RAW_SIZE (regno);
@ -453,10 +440,7 @@ outreg (regno, buf)
} }
void void
prepare_resume_reply (buf, status, signo) prepare_resume_reply (char *buf, char status, unsigned char signo)
char *buf;
char status;
unsigned char signo;
{ {
int nib; int nib;
@ -512,10 +496,7 @@ prepare_resume_reply (buf, status, signo)
} }
void void
decode_m_packet (from, mem_addr_ptr, len_ptr) decode_m_packet (char *from, CORE_ADDR *mem_addr_ptr, unsigned int *len_ptr)
char *from;
CORE_ADDR *mem_addr_ptr;
unsigned int *len_ptr;
{ {
int i = 0, j = 0; int i = 0, j = 0;
char ch; char ch;
@ -537,10 +518,8 @@ decode_m_packet (from, mem_addr_ptr, len_ptr)
} }
void void
decode_M_packet (from, mem_addr_ptr, len_ptr, to) decode_M_packet (char *from, CORE_ADDR *mem_addr_ptr, unsigned int *len_ptr,
char *from, *to; char *to)
CORE_ADDR *mem_addr_ptr;
unsigned int *len_ptr;
{ {
int i = 0; int i = 0;
char ch; char ch;

View file

@ -29,8 +29,7 @@
Then return to command level. */ Then return to command level. */
void void
perror_with_name (string) perror_with_name (char *string)
char *string;
{ {
#ifndef STDC_HEADERS #ifndef STDC_HEADERS
extern int sys_nerr; extern int sys_nerr;

View file

@ -101,8 +101,7 @@ static void virtual_base_list_aux (struct type *dclass);
in that objfile's type_obstack. */ in that objfile's type_obstack. */
struct type * struct type *
alloc_type (objfile) alloc_type (struct objfile *objfile)
struct objfile *objfile;
{ {
register struct type *type; register struct type *type;
@ -136,9 +135,7 @@ alloc_type (objfile)
We allocate new memory if needed. */ We allocate new memory if needed. */
struct type * struct type *
make_pointer_type (type, typeptr) make_pointer_type (struct type *type, struct type **typeptr)
struct type *type;
struct type **typeptr;
{ {
register struct type *ntype; /* New type */ register struct type *ntype; /* New type */
struct objfile *objfile; struct objfile *objfile;
@ -194,8 +191,7 @@ make_pointer_type (type, typeptr)
May need to construct such a type if this is the first use. */ May need to construct such a type if this is the first use. */
struct type * struct type *
lookup_pointer_type (type) lookup_pointer_type (struct type *type)
struct type *type;
{ {
return make_pointer_type (type, (struct type **) 0); return make_pointer_type (type, (struct type **) 0);
} }
@ -206,9 +202,7 @@ lookup_pointer_type (type)
We allocate new memory if needed. */ We allocate new memory if needed. */
struct type * struct type *
make_reference_type (type, typeptr) make_reference_type (struct type *type, struct type **typeptr)
struct type *type;
struct type **typeptr;
{ {
register struct type *ntype; /* New type */ register struct type *ntype; /* New type */
struct objfile *objfile; struct objfile *objfile;
@ -259,8 +253,7 @@ make_reference_type (type, typeptr)
/* Same as above, but caller doesn't care about memory allocation details. */ /* Same as above, but caller doesn't care about memory allocation details. */
struct type * struct type *
lookup_reference_type (type) lookup_reference_type (struct type *type)
struct type *type;
{ {
return make_reference_type (type, (struct type **) 0); return make_reference_type (type, (struct type **) 0);
} }
@ -271,9 +264,7 @@ lookup_reference_type (type)
We allocate new memory if needed. */ We allocate new memory if needed. */
struct type * struct type *
make_function_type (type, typeptr) make_function_type (struct type *type, struct type **typeptr)
struct type *type;
struct type **typeptr;
{ {
register struct type *ntype; /* New type */ register struct type *ntype; /* New type */
struct objfile *objfile; struct objfile *objfile;
@ -306,8 +297,7 @@ make_function_type (type, typeptr)
May need to construct such a type if this is the first use. */ May need to construct such a type if this is the first use. */
struct type * struct type *
lookup_function_type (type) lookup_function_type (struct type *type)
struct type *type;
{ {
return make_function_type (type, (struct type **) 0); return make_function_type (type, (struct type **) 0);
} }
@ -324,11 +314,7 @@ lookup_function_type (type)
We allocate new memory if needed. */ We allocate new memory if needed. */
struct type * struct type *
make_cv_type (cnst, voltl, type, typeptr) make_cv_type (int cnst, int voltl, struct type *type, struct type **typeptr)
int cnst;
int voltl;
struct type *type;
struct type **typeptr;
{ {
register struct type *ntype; /* New type */ register struct type *ntype; /* New type */
register struct type *tmp_type = type; /* tmp type */ register struct type *tmp_type = type; /* tmp type */
@ -402,9 +388,7 @@ make_cv_type (cnst, voltl, type, typeptr)
of the aggregate that the member belongs to. */ of the aggregate that the member belongs to. */
struct type * struct type *
lookup_member_type (type, domain) lookup_member_type (struct type *type, struct type *domain)
struct type *type;
struct type *domain;
{ {
register struct type *mtype; register struct type *mtype;
@ -420,8 +404,7 @@ lookup_member_type (type, domain)
This always returns a fresh type. */ This always returns a fresh type. */
struct type * struct type *
allocate_stub_method (type) allocate_stub_method (struct type *type)
struct type *type;
{ {
struct type *mtype; struct type *mtype;
@ -445,11 +428,8 @@ allocate_stub_method (type)
sure it is TYPE_CODE_UNDEF before we bash it into a range type? */ sure it is TYPE_CODE_UNDEF before we bash it into a range type? */
struct type * struct type *
create_range_type (result_type, index_type, low_bound, high_bound) create_range_type (struct type *result_type, struct type *index_type,
struct type *result_type; int low_bound, int high_bound)
struct type *index_type;
int low_bound;
int high_bound;
{ {
if (result_type == NULL) if (result_type == NULL)
{ {
@ -481,9 +461,7 @@ create_range_type (result_type, index_type, low_bound, high_bound)
will fit in LONGEST), or -1 otherwise. */ will fit in LONGEST), or -1 otherwise. */
int int
get_discrete_bounds (type, lowp, highp) get_discrete_bounds (struct type *type, LONGEST *lowp, LONGEST *highp)
struct type *type;
LONGEST *lowp, *highp;
{ {
CHECK_TYPEDEF (type); CHECK_TYPEDEF (type);
switch (TYPE_CODE (type)) switch (TYPE_CODE (type))
@ -557,10 +535,8 @@ get_discrete_bounds (type, lowp, highp)
sure it is TYPE_CODE_UNDEF before we bash it into an array type? */ sure it is TYPE_CODE_UNDEF before we bash it into an array type? */
struct type * struct type *
create_array_type (result_type, element_type, range_type) create_array_type (struct type *result_type, struct type *element_type,
struct type *result_type; struct type *range_type)
struct type *element_type;
struct type *range_type;
{ {
LONGEST low_bound, high_bound; LONGEST low_bound, high_bound;
@ -601,9 +577,7 @@ create_array_type (result_type, element_type, range_type)
sure it is TYPE_CODE_UNDEF before we bash it into a string type? */ sure it is TYPE_CODE_UNDEF before we bash it into a string type? */
struct type * struct type *
create_string_type (result_type, range_type) create_string_type (struct type *result_type, struct type *range_type)
struct type *result_type;
struct type *range_type;
{ {
result_type = create_array_type (result_type, result_type = create_array_type (result_type,
*current_language->string_char_type, *current_language->string_char_type,
@ -613,9 +587,7 @@ create_string_type (result_type, range_type)
} }
struct type * struct type *
create_set_type (result_type, domain_type) create_set_type (struct type *result_type, struct type *domain_type)
struct type *result_type;
struct type *domain_type;
{ {
LONGEST low_bound, high_bound, bit_length; LONGEST low_bound, high_bound, bit_length;
if (result_type == NULL) if (result_type == NULL)
@ -693,10 +665,8 @@ init_simd_type (char *name,
allocated. */ allocated. */
void void
smash_to_member_type (type, domain, to_type) smash_to_member_type (struct type *type, struct type *domain,
struct type *type; struct type *to_type)
struct type *domain;
struct type *to_type;
{ {
struct objfile *objfile; struct objfile *objfile;
@ -718,11 +688,8 @@ smash_to_member_type (type, domain, to_type)
allocated. */ allocated. */
void void
smash_to_method_type (type, domain, to_type, args) smash_to_method_type (struct type *type, struct type *domain,
struct type *type; struct type *to_type, struct type **args)
struct type *domain;
struct type *to_type;
struct type **args;
{ {
struct objfile *objfile; struct objfile *objfile;
@ -741,8 +708,7 @@ smash_to_method_type (type, domain, to_type, args)
"union ", or "enum ". If the type has a NULL name, return NULL. */ "union ", or "enum ". If the type has a NULL name, return NULL. */
char * char *
type_name_no_tag (type) type_name_no_tag (register const struct type *type)
register const struct type *type;
{ {
if (TYPE_TAG_NAME (type) != NULL) if (TYPE_TAG_NAME (type) != NULL)
return TYPE_TAG_NAME (type); return TYPE_TAG_NAME (type);
@ -757,8 +723,7 @@ type_name_no_tag (type)
Return zero if NAME is not a primitive type. */ Return zero if NAME is not a primitive type. */
struct type * struct type *
lookup_primitive_typename (name) lookup_primitive_typename (char *name)
char *name;
{ {
struct type **const *p; struct type **const *p;
@ -777,10 +742,7 @@ lookup_primitive_typename (name)
If NOERR is nonzero, return zero if NAME is not suitably defined. */ If NOERR is nonzero, return zero if NAME is not suitably defined. */
struct type * struct type *
lookup_typename (name, block, noerr) lookup_typename (char *name, struct block *block, int noerr)
char *name;
struct block *block;
int noerr;
{ {
register struct symbol *sym; register struct symbol *sym;
register struct type *tmp; register struct type *tmp;
@ -806,8 +768,7 @@ lookup_typename (name, block, noerr)
} }
struct type * struct type *
lookup_unsigned_typename (name) lookup_unsigned_typename (char *name)
char *name;
{ {
char *uns = alloca (strlen (name) + 10); char *uns = alloca (strlen (name) + 10);
@ -817,8 +778,7 @@ lookup_unsigned_typename (name)
} }
struct type * struct type *
lookup_signed_typename (name) lookup_signed_typename (char *name)
char *name;
{ {
struct type *t; struct type *t;
char *uns = alloca (strlen (name) + 8); char *uns = alloca (strlen (name) + 8);
@ -836,9 +796,7 @@ lookup_signed_typename (name)
visible in lexical block BLOCK. */ visible in lexical block BLOCK. */
struct type * struct type *
lookup_struct (name, block) lookup_struct (char *name, struct block *block)
char *name;
struct block *block;
{ {
register struct symbol *sym; register struct symbol *sym;
@ -860,9 +818,7 @@ lookup_struct (name, block)
visible in lexical block BLOCK. */ visible in lexical block BLOCK. */
struct type * struct type *
lookup_union (name, block) lookup_union (char *name, struct block *block)
char *name;
struct block *block;
{ {
register struct symbol *sym; register struct symbol *sym;
struct type *t; struct type *t;
@ -894,9 +850,7 @@ lookup_union (name, block)
visible in lexical block BLOCK. */ visible in lexical block BLOCK. */
struct type * struct type *
lookup_enum (name, block) lookup_enum (char *name, struct block *block)
char *name;
struct block *block;
{ {
register struct symbol *sym; register struct symbol *sym;
@ -917,10 +871,7 @@ lookup_enum (name, block)
visible in lexical block BLOCK. */ visible in lexical block BLOCK. */
struct type * struct type *
lookup_template_type (name, type, block) lookup_template_type (char *name, struct type *type, struct block *block)
char *name;
struct type *type;
struct block *block;
{ {
struct symbol *sym; struct symbol *sym;
char *nam = (char *) alloca (strlen (name) + strlen (type->name) + 4); char *nam = (char *) alloca (strlen (name) + strlen (type->name) + 4);
@ -953,10 +904,7 @@ lookup_template_type (name, type, block)
If NAME is the name of a baseclass type, return that type. */ If NAME is the name of a baseclass type, return that type. */
struct type * struct type *
lookup_struct_elt_type (type, name, noerr) lookup_struct_elt_type (struct type *type, char *name, int noerr)
struct type *type;
char *name;
int noerr;
{ {
int i; int i;
@ -1038,8 +986,7 @@ lookup_struct_elt_type (type, name, noerr)
will remain NULL. */ will remain NULL. */
void void
fill_in_vptr_fieldno (type) fill_in_vptr_fieldno (struct type *type)
struct type *type;
{ {
CHECK_TYPEDEF (type); CHECK_TYPEDEF (type);
@ -1068,10 +1015,7 @@ fill_in_vptr_fieldno (type)
Return 1 if the destructor was found, otherwise, return 0. */ Return 1 if the destructor was found, otherwise, return 0. */
int int
get_destructor_fn_field (t, method_indexp, field_indexp) get_destructor_fn_field (struct type *t, int *method_indexp, int *field_indexp)
struct type *t;
int *method_indexp;
int *field_indexp;
{ {
int i; int i;
@ -1110,8 +1054,7 @@ struct complaint stub_noname_complaint =
{"stub type has NULL name", 0, 0}; {"stub type has NULL name", 0, 0};
struct type * struct type *
check_typedef (type) check_typedef (register struct type *type)
register struct type *type;
{ {
struct type *orig_type = type; struct type *orig_type = type;
while (TYPE_CODE (type) == TYPE_CODE_TYPEDEF) while (TYPE_CODE (type) == TYPE_CODE_TYPEDEF)
@ -1226,9 +1169,7 @@ check_typedef (type)
#define ADD_EXTRA(c) { pextras->str[pextras->len++]=c; } #define ADD_EXTRA(c) { pextras->str[pextras->len++]=c; }
static void static void
add_name (pextras, n) add_name (struct extra *pextras, char *n)
struct extra *pextras;
char *n;
{ {
int nlen; int nlen;
@ -1239,9 +1180,7 @@ add_name (pextras, n)
} }
static void static void
add_mangled_type (pextras, t) add_mangled_type (struct extra *pextras, struct type *t)
struct extra *pextras;
struct type *t;
{ {
enum type_code tcode; enum type_code tcode;
int tlen, tflags; int tlen, tflags;
@ -1371,10 +1310,7 @@ add_mangled_type (pextras, t)
#if 0 #if 0
void void
cfront_mangle_name (type, i, j) cfront_mangle_name (struct type *type, int i, int j)
struct type *type;
int i;
int j;
{ {
struct fn_field *f; struct fn_field *f;
char *mangled_name = gdb_mangle_name (type, i, j); char *mangled_name = gdb_mangle_name (type, i, j);
@ -1460,10 +1396,7 @@ safe_parse_type (char *p, int length)
the space required for them. */ the space required for them. */
void void
check_stub_method (type, method_id, signature_id) check_stub_method (struct type *type, int method_id, int signature_id)
struct type *type;
int method_id;
int signature_id;
{ {
struct fn_field *f; struct fn_field *f;
char *mangled_name = gdb_mangle_name (type, method_id, signature_id); char *mangled_name = gdb_mangle_name (type, method_id, signature_id);
@ -1568,8 +1501,7 @@ check_stub_method (type, method_id, signature_id)
const struct cplus_struct_type cplus_struct_default; const struct cplus_struct_type cplus_struct_default;
void void
allocate_cplus_struct_type (type) allocate_cplus_struct_type (struct type *type)
struct type *type;
{ {
if (!HAVE_CPLUS_STRUCT (type)) if (!HAVE_CPLUS_STRUCT (type))
{ {
@ -1587,12 +1519,8 @@ allocate_cplus_struct_type (type)
in particular, where init_type is called with a NULL value for NAME). */ in particular, where init_type is called with a NULL value for NAME). */
struct type * struct type *
init_type (code, length, flags, name, objfile) init_type (enum type_code code, int length, int flags, char *name,
enum type_code code; struct objfile *objfile)
int length;
int flags;
char *name;
struct objfile *objfile;
{ {
register struct type *type; register struct type *type;
@ -1641,9 +1569,7 @@ init_type (code, length, flags, name, objfile)
struct type * struct type *
lookup_fundamental_type (objfile, typeid) lookup_fundamental_type (struct objfile *objfile, int typeid)
struct objfile *objfile;
int typeid;
{ {
register struct type **typep; register struct type **typep;
register int nbytes; register int nbytes;
@ -1678,8 +1604,7 @@ lookup_fundamental_type (objfile, typeid)
} }
int int
can_dereference (t) can_dereference (struct type *t)
struct type *t;
{ {
/* FIXME: Should we return true for references as well as pointers? */ /* FIXME: Should we return true for references as well as pointers? */
CHECK_TYPEDEF (t); CHECK_TYPEDEF (t);
@ -1690,8 +1615,7 @@ can_dereference (t)
} }
int int
is_integral_type (t) is_integral_type (struct type *t)
struct type *t;
{ {
CHECK_TYPEDEF (t); CHECK_TYPEDEF (t);
return return
@ -1710,8 +1634,7 @@ is_integral_type (t)
Return true if TYPE is such a Chill varying type. */ Return true if TYPE is such a Chill varying type. */
int int
chill_varying_type (type) chill_varying_type (struct type *type)
struct type *type;
{ {
if (TYPE_CODE (type) != TYPE_CODE_STRUCT if (TYPE_CODE (type) != TYPE_CODE_STRUCT
|| TYPE_NFIELDS (type) != 2 || TYPE_NFIELDS (type) != 2
@ -1727,9 +1650,7 @@ chill_varying_type (type)
the ancestor relationship even if they're identical */ the ancestor relationship even if they're identical */
int int
is_ancestor (base, dclass) is_ancestor (struct type *base, struct type *dclass)
struct type *base;
struct type *dclass;
{ {
int i; int i;
@ -1756,8 +1677,7 @@ is_ancestor (base, dclass)
runtime models. Return 1 => Yes, 0 => No. */ runtime models. Return 1 => Yes, 0 => No. */
int int
has_vtable (dclass) has_vtable (struct type *dclass)
struct type *dclass;
{ {
/* In the HP ANSI C++ runtime model, a class has a vtable only if it /* In the HP ANSI C++ runtime model, a class has a vtable only if it
has virtual functions or virtual bases. */ has virtual functions or virtual bases. */
@ -1799,8 +1719,7 @@ has_vtable (dclass)
and may not work with other runtime models. */ and may not work with other runtime models. */
struct type * struct type *
primary_base_class (dclass) primary_base_class (struct type *dclass)
struct type *dclass;
{ {
/* In HP ANSI C++'s runtime model, a "primary base class" of a class /* In HP ANSI C++'s runtime model, a "primary base class" of a class
is the first directly inherited, non-virtual base class that is the first directly inherited, non-virtual base class that
@ -1832,8 +1751,7 @@ static struct vbase *current_vbase_list = NULL;
copies the items out in reverse order. */ copies the items out in reverse order. */
static void static void
virtual_base_list_aux (dclass) virtual_base_list_aux (struct type *dclass)
struct type *dclass;
{ {
struct vbase *tmp_vbase; struct vbase *tmp_vbase;
register int i; register int i;
@ -1891,8 +1809,7 @@ virtual_base_list_aux (dclass)
and then copies the result into an array to save space. */ and then copies the result into an array to save space. */
struct type ** struct type **
virtual_base_list (dclass) virtual_base_list (struct type *dclass)
struct type *dclass;
{ {
register struct vbase *tmp_vbase; register struct vbase *tmp_vbase;
register struct vbase *tmp_vbase_2; register struct vbase *tmp_vbase_2;
@ -1929,8 +1846,7 @@ virtual_base_list (dclass)
/* Return the length of the virtual base list of the type DCLASS. */ /* Return the length of the virtual base list of the type DCLASS. */
int int
virtual_base_list_length (dclass) virtual_base_list_length (struct type *dclass)
struct type *dclass;
{ {
register int i; register int i;
register struct vbase *tmp_vbase; register struct vbase *tmp_vbase;
@ -1948,8 +1864,7 @@ virtual_base_list_length (dclass)
primary base, recursively). */ primary base, recursively). */
int int
virtual_base_list_length_skip_primaries (dclass) virtual_base_list_length_skip_primaries (struct type *dclass)
struct type *dclass;
{ {
register int i; register int i;
register struct vbase *tmp_vbase; register struct vbase *tmp_vbase;
@ -1978,9 +1893,7 @@ virtual_base_list_length_skip_primaries (dclass)
indicates "not found" or a problem. */ indicates "not found" or a problem. */
int int
virtual_base_index (base, dclass) virtual_base_index (struct type *base, struct type *dclass)
struct type *base;
struct type *dclass;
{ {
register struct type *vbase; register struct type *vbase;
register int i; register int i;
@ -2010,9 +1923,7 @@ virtual_base_index (base, dclass)
found" or a problem. */ found" or a problem. */
int int
virtual_base_index_skip_primaries (base, dclass) virtual_base_index_skip_primaries (struct type *base, struct type *dclass)
struct type *base;
struct type *dclass;
{ {
register struct type *vbase; register struct type *vbase;
register int i, j; register int i, j;
@ -2044,8 +1955,7 @@ virtual_base_index_skip_primaries (base, dclass)
* Position returned is 0-based. */ * Position returned is 0-based. */
int int
class_index_in_primary_list (dclass) class_index_in_primary_list (struct type *dclass)
struct type *dclass;
{ {
struct type *pbc; /* primary base class */ struct type *pbc; /* primary base class */
@ -2067,8 +1977,7 @@ class_index_in_primary_list (dclass)
*/ */
int int
count_virtual_fns (dclass) count_virtual_fns (struct type *dclass)
struct type *dclass;
{ {
int fn, oi; /* function and overloaded instance indices */ int fn, oi; /* function and overloaded instance indices */
int vfuncs; /* count to return */ int vfuncs; /* count to return */
@ -2097,9 +2006,7 @@ count_virtual_fns (dclass)
* 3 => A is worse than B */ * 3 => A is worse than B */
int int
compare_badness (a, b) compare_badness (struct badness_vector *a, struct badness_vector *b)
struct badness_vector *a;
struct badness_vector *b;
{ {
int i; int i;
int tmp; int tmp;
@ -2142,11 +2049,7 @@ compare_badness (a, b)
* Return a pointer to a badness vector. This has NARGS + 1 entries. */ * Return a pointer to a badness vector. This has NARGS + 1 entries. */
struct badness_vector * struct badness_vector *
rank_function (parms, nparms, args, nargs) rank_function (struct type **parms, int nparms, struct type **args, int nargs)
struct type **parms;
int nparms;
struct type **args;
int nargs;
{ {
int i; int i;
struct badness_vector *bv; struct badness_vector *bv;
@ -2187,9 +2090,7 @@ rank_function (parms, nparms, args, nargs)
* Generally the "bad" conversions are all uniformly assigned a 100 */ * Generally the "bad" conversions are all uniformly assigned a 100 */
int int
rank_one_type (parm, arg) rank_one_type (struct type *parm, struct type *arg)
struct type *parm;
struct type *arg;
{ {
/* Identical type pointers */ /* Identical type pointers */
/* However, this still doesn't catch all cases of same type for arg /* However, this still doesn't catch all cases of same type for arg
@ -2520,9 +2421,7 @@ rank_one_type (parm, arg)
/* End of functions for overload resolution */ /* End of functions for overload resolution */
static void static void
print_bit_vector (bits, nbits) print_bit_vector (B_TYPE *bits, int nbits)
B_TYPE *bits;
int nbits;
{ {
int bitno; int bitno;
@ -2550,9 +2449,7 @@ print_bit_vector (bits, nbits)
include it since we may get into a infinitely recursive situation. */ include it since we may get into a infinitely recursive situation. */
static void static void
print_arg_types (args, spaces) print_arg_types (struct type **args, int spaces)
struct type **args;
int spaces;
{ {
if (args != NULL) if (args != NULL)
{ {
@ -2568,9 +2465,7 @@ print_arg_types (args, spaces)
} }
static void static void
dump_fn_fieldlists (type, spaces) dump_fn_fieldlists (struct type *type, int spaces)
struct type *type;
int spaces;
{ {
int method_idx; int method_idx;
int overload_idx; int overload_idx;
@ -2633,9 +2528,7 @@ dump_fn_fieldlists (type, spaces)
} }
static void static void
print_cplus_stuff (type, spaces) print_cplus_stuff (struct type *type, int spaces)
struct type *type;
int spaces;
{ {
printfi_filtered (spaces, "n_baseclasses %d\n", printfi_filtered (spaces, "n_baseclasses %d\n",
TYPE_N_BASECLASSES (type)); TYPE_N_BASECLASSES (type));
@ -2686,9 +2579,7 @@ print_cplus_stuff (type, spaces)
static struct obstack dont_print_type_obstack; static struct obstack dont_print_type_obstack;
void void
recursive_dump_type (type, spaces) recursive_dump_type (struct type *type, int spaces)
struct type *type;
int spaces;
{ {
int idx; int idx;
@ -2893,7 +2784,7 @@ recursive_dump_type (type, spaces)
static void build_gdbtypes (void); static void build_gdbtypes (void);
static void static void
build_gdbtypes () build_gdbtypes (void)
{ {
builtin_type_void = builtin_type_void =
init_type (TYPE_CODE_VOID, 1, init_type (TYPE_CODE_VOID, 1,
@ -3050,7 +2941,7 @@ build_gdbtypes ()
extern void _initialize_gdbtypes (void); extern void _initialize_gdbtypes (void);
void void
_initialize_gdbtypes () _initialize_gdbtypes (void)
{ {
struct cmd_list_element *c; struct cmd_list_element *c;
build_gdbtypes (); build_gdbtypes ();

View file

@ -633,7 +633,7 @@ _proc_free (struct proc *proc)
struct inf * struct inf *
make_inf () make_inf (void)
{ {
struct inf *inf = malloc (sizeof (struct inf)); struct inf *inf = malloc (sizeof (struct inf));
@ -1994,7 +1994,7 @@ gnu_resume (int tid, int step, enum target_signal sig)
static void static void
gnu_kill_inferior () gnu_kill_inferior (void)
{ {
struct proc *task = current_inferior->task; struct proc *task = current_inferior->task;
if (task) if (task)
@ -2008,7 +2008,7 @@ gnu_kill_inferior ()
/* Clean up after the inferior dies. */ /* Clean up after the inferior dies. */
static void static void
gnu_mourn_inferior () gnu_mourn_inferior (void)
{ {
inf_debug (current_inferior, "rip"); inf_debug (current_inferior, "rip");
inf_detach (current_inferior); inf_detach (current_inferior);
@ -2021,7 +2021,7 @@ gnu_mourn_inferior ()
/* Set INFERIOR_PID to the first thread available in the child, if any. */ /* Set INFERIOR_PID to the first thread available in the child, if any. */
static int static int
inf_pick_first_thread () inf_pick_first_thread (void)
{ {
if (current_inferior->task && current_inferior->threads) if (current_inferior->task && current_inferior->threads)
/* The first thread. */ /* The first thread. */
@ -2032,7 +2032,7 @@ inf_pick_first_thread ()
} }
static struct inf * static struct inf *
cur_inf () cur_inf (void)
{ {
if (!current_inferior) if (!current_inferior)
current_inferior = make_inf (); current_inferior = make_inf ();
@ -2040,10 +2040,7 @@ cur_inf ()
} }
static void static void
gnu_create_inferior (exec_file, allargs, env) gnu_create_inferior (char *exec_file, char *allargs, char **env)
char *exec_file;
char *allargs;
char **env;
{ {
struct inf *inf = cur_inf (); struct inf *inf = cur_inf ();
@ -2099,7 +2096,7 @@ gnu_create_inferior (exec_file, allargs, env)
/* Mark our target-struct as eligible for stray "run" and "attach" /* Mark our target-struct as eligible for stray "run" and "attach"
commands. */ commands. */
static int static int
gnu_can_run () gnu_can_run (void)
{ {
return 1; return 1;
} }
@ -2110,9 +2107,7 @@ gnu_can_run ()
/* Attach to process PID, then initialize for debugging it /* Attach to process PID, then initialize for debugging it
and wait for the trace-trap that results from attaching. */ and wait for the trace-trap that results from attaching. */
static void static void
gnu_attach (args, from_tty) gnu_attach (char *args, int from_tty)
char *args;
int from_tty;
{ {
int pid; int pid;
char *exec_file; char *exec_file;
@ -2174,9 +2169,7 @@ gnu_attach (args, from_tty)
previously attached. It *might* work if the program was previously attached. It *might* work if the program was
started via fork. */ started via fork. */
static void static void
gnu_detach (args, from_tty) gnu_detach (char *args, int from_tty)
char *args;
int from_tty;
{ {
if (from_tty) if (from_tty)
{ {
@ -2199,7 +2192,7 @@ gnu_detach (args, from_tty)
static void static void
gnu_terminal_init_inferior () gnu_terminal_init_inferior (void)
{ {
assert (current_inferior); assert (current_inferior);
terminal_init_inferior_with_pgrp (current_inferior->pid); terminal_init_inferior_with_pgrp (current_inferior->pid);
@ -2211,7 +2204,7 @@ gnu_terminal_init_inferior ()
that registers contains all the registers from the program being that registers contains all the registers from the program being
debugged. */ debugged. */
static void static void
gnu_prepare_to_store () gnu_prepare_to_store (void)
{ {
#ifdef CHILD_PREPARE_TO_STORE #ifdef CHILD_PREPARE_TO_STORE
CHILD_PREPARE_TO_STORE (); CHILD_PREPARE_TO_STORE ();
@ -2219,21 +2212,19 @@ gnu_prepare_to_store ()
} }
static void static void
gnu_open (arg, from_tty) gnu_open (char *arg, int from_tty)
char *arg;
int from_tty;
{ {
error ("Use the \"run\" command to start a Unix child process."); error ("Use the \"run\" command to start a Unix child process.");
} }
static void static void
gnu_stop () gnu_stop (void)
{ {
error ("to_stop target function not implemented"); error ("to_stop target function not implemented");
} }
static char * static char *
gnu_pid_to_exec_file () gnu_pid_to_exec_file (void)
{ {
error ("to_pid_to_exec_file target function not implemented"); error ("to_pid_to_exec_file target function not implemented");
return NULL; return NULL;
@ -2252,11 +2243,7 @@ gnu_thread_alive (int tid)
gdb's address space. Return 0 on failure; number of bytes read gdb's address space. Return 0 on failure; number of bytes read
otherwise. */ otherwise. */
int int
gnu_read_inferior (task, addr, myaddr, length) gnu_read_inferior (task_t task, CORE_ADDR addr, char *myaddr, int length)
task_t task;
CORE_ADDR addr;
char *myaddr;
int length;
{ {
error_t err; error_t err;
vm_address_t low_address = (vm_address_t) trunc_page (addr); vm_address_t low_address = (vm_address_t) trunc_page (addr);
@ -2300,11 +2287,7 @@ struct obstack region_obstack;
/* Write gdb's LEN bytes from MYADDR and copy it to ADDR in inferior /* Write gdb's LEN bytes from MYADDR and copy it to ADDR in inferior
task's address space. */ task's address space. */
int int
gnu_write_inferior (task, addr, myaddr, length) gnu_write_inferior (task_t task, CORE_ADDR addr, char *myaddr, int length)
task_t task;
CORE_ADDR addr;
char *myaddr;
int length;
{ {
error_t err = 0; error_t err = 0;
vm_address_t low_address = (vm_address_t) trunc_page (addr); vm_address_t low_address = (vm_address_t) trunc_page (addr);
@ -2672,7 +2655,7 @@ check_empty (char *args, char *cmd_prefix)
/* Returns the alive thread named by INFERIOR_PID, or signals an error. */ /* Returns the alive thread named by INFERIOR_PID, or signals an error. */
static struct proc * static struct proc *
cur_thread () cur_thread (void)
{ {
struct inf *inf = cur_inf (); struct inf *inf = cur_inf ();
struct proc *thread = inf_tid_to_thread (inf, inferior_pid); struct proc *thread = inf_tid_to_thread (inf, inferior_pid);
@ -2683,7 +2666,7 @@ cur_thread ()
/* Returns the current inferior, but signals an error if it has no task. */ /* Returns the current inferior, but signals an error if it has no task. */
static struct inf * static struct inf *
active_inf () active_inf (void)
{ {
struct inf *inf = cur_inf (); struct inf *inf = cur_inf ();
if (!inf->task) if (!inf->task)
@ -3361,8 +3344,7 @@ _initialize_gnu_nat (void)
end up looping in mysterious Bpt traps */ end up looping in mysterious Bpt traps */
void void
flush_inferior_icache (pc, amount) flush_inferior_icache (CORE_ADDR pc, int amount)
CORE_ADDR pc;
{ {
vm_machine_attribute_val_t flush = MATTR_VAL_ICACHE_FLUSH; vm_machine_attribute_val_t flush = MATTR_VAL_ICACHE_FLUSH;
error_t ret; error_t ret;

View file

@ -72,8 +72,7 @@ static void set_machine_hook (char *filename);
void h8300_frame_find_saved_regs (); void h8300_frame_find_saved_regs ();
CORE_ADDR CORE_ADDR
h8300_skip_prologue (start_pc) h8300_skip_prologue (CORE_ADDR start_pc)
CORE_ADDR start_pc;
{ {
short int w; short int w;
int adjust = 0; int adjust = 0;
@ -143,9 +142,7 @@ h8300_skip_prologue (start_pc)
} }
int int
gdb_print_insn_h8300 (memaddr, info) gdb_print_insn_h8300 (bfd_vma memaddr, disassemble_info *info)
bfd_vma memaddr;
disassemble_info *info;
{ {
if (h8300smode) if (h8300smode)
return print_insn_h8300s (memaddr, info); return print_insn_h8300s (memaddr, info);
@ -163,8 +160,7 @@ gdb_print_insn_h8300 (memaddr, info)
the function prologue to determine the caller's sp value, and return it. */ the function prologue to determine the caller's sp value, and return it. */
CORE_ADDR CORE_ADDR
h8300_frame_chain (thisframe) h8300_frame_chain (struct frame_info *thisframe)
struct frame_info *thisframe;
{ {
if (PC_IN_CALL_DUMMY (thisframe->pc, thisframe->frame, thisframe->frame)) if (PC_IN_CALL_DUMMY (thisframe->pc, thisframe->frame, thisframe->frame))
{ /* initialize the from_pc now */ { /* initialize the from_pc now */
@ -187,9 +183,8 @@ h8300_frame_chain (thisframe)
fairly expensive. */ fairly expensive. */
void void
h8300_frame_find_saved_regs (fi, fsr) h8300_frame_find_saved_regs (struct frame_info *fi,
struct frame_info *fi; struct frame_saved_regs *fsr)
struct frame_saved_regs *fsr;
{ {
register struct frame_saved_regs *cache_fsr; register struct frame_saved_regs *cache_fsr;
CORE_ADDR ip; CORE_ADDR ip;
@ -232,10 +227,7 @@ h8300_frame_find_saved_regs (fi, fsr)
of the instruction. */ of the instruction. */
CORE_ADDR CORE_ADDR
NEXT_PROLOGUE_INSN (addr, lim, pword1) NEXT_PROLOGUE_INSN (CORE_ADDR addr, CORE_ADDR lim, INSN_WORD *pword1)
CORE_ADDR addr;
CORE_ADDR lim;
INSN_WORD *pword1;
{ {
char buf[2]; char buf[2];
if (addr < lim + 8) if (addr < lim + 8)
@ -258,12 +250,9 @@ NEXT_PROLOGUE_INSN (addr, lim, pword1)
to reflect the offsets of the arg pointer and the locals pointer. */ to reflect the offsets of the arg pointer and the locals pointer. */
static CORE_ADDR static CORE_ADDR
examine_prologue (ip, limit, after_prolog_fp, fsr, fi) examine_prologue (register CORE_ADDR ip, register CORE_ADDR limit,
register CORE_ADDR ip; CORE_ADDR after_prolog_fp, struct frame_saved_regs *fsr,
register CORE_ADDR limit; struct frame_info *fi)
CORE_ADDR after_prolog_fp;
struct frame_saved_regs *fsr;
struct frame_info *fi;
{ {
register CORE_ADDR next_ip; register CORE_ADDR next_ip;
int r; int r;
@ -416,9 +405,7 @@ examine_prologue (ip, limit, after_prolog_fp, fsr, fi)
} }
void void
h8300_init_extra_frame_info (fromleaf, fi) h8300_init_extra_frame_info (int fromleaf, struct frame_info *fi)
int fromleaf;
struct frame_info *fi;
{ {
fi->fsr = 0; /* Not yet allocated */ fi->fsr = 0; /* Not yet allocated */
fi->args_pointer = 0; /* Unknown */ fi->args_pointer = 0; /* Unknown */
@ -436,8 +423,7 @@ h8300_init_extra_frame_info (fromleaf, fi)
just use the register SRP_REGNUM itself. */ just use the register SRP_REGNUM itself. */
CORE_ADDR CORE_ADDR
h8300_frame_saved_pc (frame) h8300_frame_saved_pc (struct frame_info *frame)
struct frame_info *frame;
{ {
if (PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame)) if (PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
return generic_read_register_dummy (frame->pc, frame->frame, PC_REGNUM); return generic_read_register_dummy (frame->pc, frame->frame, PC_REGNUM);
@ -446,8 +432,7 @@ h8300_frame_saved_pc (frame)
} }
CORE_ADDR CORE_ADDR
frame_locals_address (fi) frame_locals_address (struct frame_info *fi)
struct frame_info *fi;
{ {
if (PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame)) if (PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
return (CORE_ADDR) 0; /* Not sure what else to do... */ return (CORE_ADDR) 0; /* Not sure what else to do... */
@ -465,8 +450,7 @@ frame_locals_address (fi)
described by FI. Returns 0 if the address is unknown. */ described by FI. Returns 0 if the address is unknown. */
CORE_ADDR CORE_ADDR
frame_args_address (fi) frame_args_address (struct frame_info *fi)
struct frame_info *fi;
{ {
if (PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame)) if (PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
return (CORE_ADDR) 0; /* Not sure what else to do... */ return (CORE_ADDR) 0; /* Not sure what else to do... */
@ -519,12 +503,8 @@ frame_args_address (fi)
the other arguments passed in via registers R0 to R2. */ the other arguments passed in via registers R0 to R2. */
CORE_ADDR CORE_ADDR
h8300_push_arguments (nargs, args, sp, struct_return, struct_addr) h8300_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
int nargs; unsigned char struct_return, CORE_ADDR struct_addr)
struct value **args;
CORE_ADDR sp;
unsigned char struct_return;
CORE_ADDR struct_addr;
{ {
int stack_align, stack_alloc, stack_offset; int stack_align, stack_alloc, stack_offset;
int wordsize; int wordsize;
@ -613,9 +593,7 @@ h8300_push_arguments (nargs, args, sp, struct_return, struct_addr)
a JSR/BSR instruction. */ a JSR/BSR instruction. */
CORE_ADDR CORE_ADDR
h8300_push_return_address (pc, sp) h8300_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
CORE_ADDR pc;
CORE_ADDR sp;
{ {
unsigned char buf[4]; unsigned char buf[4];
int wordsize; int wordsize;
@ -637,7 +615,7 @@ h8300_push_return_address (pc, sp)
call_function_by_hand after the dummy_frame is finished. */ call_function_by_hand after the dummy_frame is finished. */
void void
h8300_pop_frame () h8300_pop_frame (void)
{ {
unsigned regnum; unsigned regnum;
struct frame_saved_regs fsr; struct frame_saved_regs fsr;
@ -673,10 +651,7 @@ h8300_pop_frame ()
Copy that into VALBUF. Be sure to account for CPU type. */ Copy that into VALBUF. Be sure to account for CPU type. */
void void
h8300_extract_return_value (type, regbuf, valbuf) h8300_extract_return_value (struct type *type, char *regbuf, char *valbuf)
struct type *type;
char *regbuf;
char *valbuf;
{ {
int wordsize, len; int wordsize, len;
@ -716,9 +691,7 @@ h8300_extract_return_value (type, regbuf, valbuf)
Primarily used by the RETURN command. */ Primarily used by the RETURN command. */
void void
h8300_store_return_value (type, valbuf) h8300_store_return_value (struct type *type, char *valbuf)
struct type *type;
char *valbuf;
{ {
int wordsize, len, regval; int wordsize, len, regval;
@ -756,7 +729,7 @@ h8300_store_return_value (type, valbuf)
struct cmd_list_element *setmemorylist; struct cmd_list_element *setmemorylist;
static void static void
set_register_names () set_register_names (void)
{ {
if (h8300hmode != 0) if (h8300hmode != 0)
h8300_register_names = h8300h_register_names; h8300_register_names = h8300h_register_names;
@ -765,7 +738,7 @@ set_register_names ()
} }
static void static void
h8300_command (args, from_tty) h8300_command (int args, int from_tty)
{ {
extern int h8300hmode; extern int h8300hmode;
h8300hmode = 0; h8300hmode = 0;
@ -774,7 +747,7 @@ h8300_command (args, from_tty)
} }
static void static void
h8300h_command (args, from_tty) h8300h_command (int args, int from_tty)
{ {
extern int h8300hmode; extern int h8300hmode;
h8300hmode = 1; h8300hmode = 1;
@ -783,7 +756,7 @@ h8300h_command (args, from_tty)
} }
static void static void
h8300s_command (args, from_tty) h8300s_command (int args, int from_tty)
{ {
extern int h8300smode; extern int h8300smode;
extern int h8300hmode; extern int h8300hmode;
@ -794,9 +767,7 @@ h8300s_command (args, from_tty)
static void static void
set_machine (args, from_tty) set_machine (char *args, int from_tty)
char *args;
int from_tty;
{ {
printf_unfiltered ("\"set machine\" must be followed by h8300, h8300h"); printf_unfiltered ("\"set machine\" must be followed by h8300, h8300h");
printf_unfiltered ("or h8300s"); printf_unfiltered ("or h8300s");
@ -810,8 +781,7 @@ set_machine (args, from_tty)
to be 16 or 32 bits as appropriate for the machine. */ to be 16 or 32 bits as appropriate for the machine. */
static void static void
set_machine_hook (filename) set_machine_hook (char *filename)
char *filename;
{ {
if (bfd_get_mach (exec_bfd) == bfd_mach_h8300s) if (bfd_get_mach (exec_bfd) == bfd_mach_h8300s)
{ {
@ -832,7 +802,7 @@ set_machine_hook (filename)
} }
void void
_initialize_h8300m () _initialize_h8300m (void)
{ {
add_prefix_cmd ("machine", no_class, set_machine, add_prefix_cmd ("machine", no_class, set_machine,
"set the machine type", "set the machine type",
@ -856,7 +826,7 @@ _initialize_h8300m ()
void void
print_register_hook (regno) print_register_hook (int regno)
{ {
if (regno == 8) if (regno == 8)
{ {
@ -901,7 +871,7 @@ print_register_hook (regno)
} }
void void
_initialize_h8300_tdep () _initialize_h8300_tdep (void)
{ {
tm_print_insn = gdb_print_insn_h8300; tm_print_insn = gdb_print_insn_h8300;
} }

View file

@ -78,8 +78,7 @@ static int data_size = 2;
int minimum_mode = 1; int minimum_mode = 1;
CORE_ADDR CORE_ADDR
h8500_skip_prologue (start_pc) h8500_skip_prologue (CORE_ADDR start_pc)
CORE_ADDR start_pc;
{ {
short int w; short int w;
@ -100,8 +99,7 @@ h8500_skip_prologue (start_pc)
} }
CORE_ADDR CORE_ADDR
h8500_addr_bits_remove (addr) h8500_addr_bits_remove (CORE_ADDR addr)
CORE_ADDR addr;
{ {
return ((addr) & 0xffffff); return ((addr) & 0xffffff);
} }
@ -114,8 +112,7 @@ h8500_addr_bits_remove (addr)
the function prologue to determine the caller's sp value, and return it. */ the function prologue to determine the caller's sp value, and return it. */
CORE_ADDR CORE_ADDR
h8500_frame_chain (thisframe) h8500_frame_chain (struct frame_info *thisframe)
struct frame_info *thisframe;
{ {
if (!inside_entry_file (thisframe->pc)) if (!inside_entry_file (thisframe->pc))
return (read_memory_integer (FRAME_FP (thisframe), PTR_SIZE)); return (read_memory_integer (FRAME_FP (thisframe), PTR_SIZE));
@ -129,10 +126,7 @@ h8500_frame_chain (thisframe)
of the instruction. */ of the instruction. */
CORE_ADDR CORE_ADDR
NEXT_PROLOGUE_INSN (addr, lim, pword1) NEXT_PROLOGUE_INSN (CORE_ADDR addr, CORE_ADDR lim, char *pword1)
CORE_ADDR addr;
CORE_ADDR lim;
char *pword1;
{ {
if (addr < lim + 8) if (addr < lim + 8)
{ {
@ -156,14 +150,13 @@ NEXT_PROLOGUE_INSN (addr, lim, pword1)
/* Return the saved PC from this frame. */ /* Return the saved PC from this frame. */
CORE_ADDR CORE_ADDR
frame_saved_pc (frame) frame_saved_pc (struct frame_info *frame)
struct frame_info *frame;
{ {
return read_memory_integer (FRAME_FP (frame) + 2, PTR_SIZE); return read_memory_integer (FRAME_FP (frame) + 2, PTR_SIZE);
} }
void void
h8500_pop_frame () h8500_pop_frame (void)
{ {
unsigned regnum; unsigned regnum;
struct frame_saved_regs fsr; struct frame_saved_regs fsr;
@ -181,8 +174,7 @@ h8500_pop_frame ()
} }
void void
print_register_hook (regno) print_register_hook (int regno)
int regno;
{ {
if (regno == CCR_REGNUM) if (regno == CCR_REGNUM)
{ {
@ -228,8 +220,7 @@ print_register_hook (regno)
} }
int int
h8500_register_size (regno) h8500_register_size (int regno)
int regno;
{ {
switch (regno) switch (regno)
{ {
@ -265,8 +256,7 @@ h8500_register_size (regno)
} }
struct type * struct type *
h8500_register_virtual_type (regno) h8500_register_virtual_type (int regno)
int regno;
{ {
switch (regno) switch (regno)
{ {
@ -307,9 +297,8 @@ h8500_register_virtual_type (regno)
the address we return for it IS the sp for the next frame. */ the address we return for it IS the sp for the next frame. */
void void
frame_find_saved_regs (frame_info, frame_saved_regs) frame_find_saved_regs (struct frame_info *frame_info,
struct frame_info *frame_info; struct frame_saved_regs *frame_saved_regs)
struct frame_saved_regs *frame_saved_regs;
{ {
register int regnum; register int regnum;
register int regmask; register int regmask;
@ -387,7 +376,7 @@ lose:;
} }
CORE_ADDR CORE_ADDR
saved_pc_after_call () saved_pc_after_call (void)
{ {
int x; int x;
int a = read_register (SP_REGNUM); int a = read_register (SP_REGNUM);
@ -404,8 +393,7 @@ saved_pc_after_call ()
} }
void void
h8500_set_pointer_size (newsize) h8500_set_pointer_size (int newsize)
int newsize;
{ {
static int oldsize = 0; static int oldsize = 0;
@ -426,7 +414,7 @@ h8500_set_pointer_size (newsize)
} }
static void static void
big_command () big_command (void)
{ {
h8500_set_pointer_size (32); h8500_set_pointer_size (32);
code_size = 4; code_size = 4;
@ -434,7 +422,7 @@ big_command ()
} }
static void static void
medium_command () medium_command (void)
{ {
h8500_set_pointer_size (32); h8500_set_pointer_size (32);
code_size = 4; code_size = 4;
@ -442,7 +430,7 @@ medium_command ()
} }
static void static void
compact_command () compact_command (void)
{ {
h8500_set_pointer_size (32); h8500_set_pointer_size (32);
code_size = 2; code_size = 2;
@ -450,7 +438,7 @@ compact_command ()
} }
static void static void
small_command () small_command (void)
{ {
h8500_set_pointer_size (16); h8500_set_pointer_size (16);
code_size = 2; code_size = 2;
@ -460,9 +448,7 @@ small_command ()
static struct cmd_list_element *setmemorylist; static struct cmd_list_element *setmemorylist;
static void static void
set_memory (args, from_tty) set_memory (char *args, int from_tty)
char *args;
int from_tty;
{ {
printf_unfiltered ("\"set memory\" must be followed by the name of a memory subcommand.\n"); printf_unfiltered ("\"set memory\" must be followed by the name of a memory subcommand.\n");
help_list (setmemorylist, "set memory ", -1, gdb_stdout); help_list (setmemorylist, "set memory ", -1, gdb_stdout);
@ -471,8 +457,7 @@ set_memory (args, from_tty)
/* See if variable name is ppc or pr[0-7] */ /* See if variable name is ppc or pr[0-7] */
int int
h8500_is_trapped_internalvar (name) h8500_is_trapped_internalvar (char *name)
char *name;
{ {
if (name[0] != 'p') if (name[0] != 'p')
return 0; return 0;
@ -490,8 +475,7 @@ h8500_is_trapped_internalvar (name)
} }
value_ptr value_ptr
h8500_value_of_trapped_internalvar (var) h8500_value_of_trapped_internalvar (struct internalvar *var)
struct internalvar *var;
{ {
LONGEST regval; LONGEST regval;
unsigned char regbuf[4]; unsigned char regbuf[4];
@ -537,10 +521,8 @@ h8500_value_of_trapped_internalvar (var)
} }
void void
h8500_set_trapped_internalvar (var, newval, bitpos, bitsize, offset) h8500_set_trapped_internalvar (struct internalvar *var, value_ptr newval,
struct internalvar *var; int bitpos, int bitsize, int offset)
int offset, bitpos, bitsize;
value_ptr newval;
{ {
char *page_regnum, *regnum; char *page_regnum, *regnum;
char expression[100]; char expression[100];
@ -590,48 +572,43 @@ h8500_set_trapped_internalvar (var, newval, bitpos, bitsize, offset)
} }
CORE_ADDR CORE_ADDR
h8500_read_sp () h8500_read_sp (void)
{ {
return read_register (PR7_REGNUM); return read_register (PR7_REGNUM);
} }
void void
h8500_write_sp (v) h8500_write_sp (CORE_ADDR v)
CORE_ADDR v;
{ {
write_register (PR7_REGNUM, v); write_register (PR7_REGNUM, v);
} }
CORE_ADDR CORE_ADDR
h8500_read_pc (pid) h8500_read_pc (int pid)
int pid;
{ {
return read_register (PC_REGNUM); return read_register (PC_REGNUM);
} }
void void
h8500_write_pc (v, pid) h8500_write_pc (CORE_ADDR v, int pid)
CORE_ADDR v;
int pid;
{ {
write_register (PC_REGNUM, v); write_register (PC_REGNUM, v);
} }
CORE_ADDR CORE_ADDR
h8500_read_fp () h8500_read_fp (void)
{ {
return read_register (PR6_REGNUM); return read_register (PR6_REGNUM);
} }
void void
h8500_write_fp (v) h8500_write_fp (CORE_ADDR v)
CORE_ADDR v;
{ {
write_register (PR6_REGNUM, v); write_register (PR6_REGNUM, v);
} }
void void
_initialize_h8500_tdep () _initialize_h8500_tdep (void)
{ {
tm_print_insn = print_insn_h8500; tm_print_insn = print_insn_h8500;

View file

@ -72,8 +72,7 @@ static struct partial_symtab *hpread_end_psymtab
/* check for the existance of a file, given its full pathname */ /* check for the existance of a file, given its full pathname */
int int
file_exists (filename) file_exists (char *filename)
char *filename;
{ {
if (filename) if (filename)
return (access (filename, F_OK) == 0); return (access (filename, F_OK) == 0);
@ -84,8 +83,7 @@ file_exists (filename)
/* Translate from the "hp_language" enumeration in hp-symtab.h /* Translate from the "hp_language" enumeration in hp-symtab.h
used in the debug info to gdb's generic enumeration in defs.h. */ used in the debug info to gdb's generic enumeration in defs.h. */
static enum language static enum language
trans_lang (in_lang) trans_lang (enum hp_language in_lang)
enum hp_language in_lang;
{ {
if (in_lang == HP_LANGUAGE_C) if (in_lang == HP_LANGUAGE_C)
return language_c; return language_c;
@ -112,8 +110,7 @@ static char main_string[] = "main";
Return value: 1 if ok, 0 if not */ Return value: 1 if ok, 0 if not */
int int
hpread_call_pxdb (file_name) hpread_call_pxdb (char *file_name)
char *file_name;
{ {
char *p; char *p;
int status; int status;
@ -146,8 +143,7 @@ hpread_call_pxdb (file_name)
and the file therefore needs to be re-loaded. Otherwise and the file therefore needs to be re-loaded. Otherwise
return 0. */ return 0. */
int int
hpread_pxdb_needed (sym_bfd) hpread_pxdb_needed (bfd *sym_bfd)
bfd *sym_bfd;
{ {
asection *pinfo_section, *debug_section, *header_section; asection *pinfo_section, *debug_section, *header_section;
unsigned int do_pxdb; unsigned int do_pxdb;
@ -277,8 +273,7 @@ hpread_pxdb_needed (sym_bfd)
If so, call pxdb. */ If so, call pxdb. */
void void
do_pxdb (sym_bfd) do_pxdb (bfd *sym_bfd)
bfd *sym_bfd;
{ {
/* The following code is HP-specific. The "right" way of /* The following code is HP-specific. The "right" way of
doing this is unknown, but we bet would involve a target- doing this is unknown, but we bet would involve a target-
@ -373,7 +368,7 @@ static boolean told_objfile = 0;
/* Set up psymtab symbol index stuff */ /* Set up psymtab symbol index stuff */
static void static void
init_pst_syms () init_pst_syms (void)
{ {
pst_syms_count = 0; pst_syms_count = 0;
pst_syms_size = 20; pst_syms_size = 20;
@ -382,7 +377,7 @@ init_pst_syms ()
/* Clean up psymtab symbol index stuff */ /* Clean up psymtab symbol index stuff */
static void static void
clear_pst_syms () clear_pst_syms (void)
{ {
pst_syms_count = 0; pst_syms_count = 0;
pst_syms_size = 0; pst_syms_size = 0;
@ -392,9 +387,7 @@ clear_pst_syms ()
/* Add information about latest psymtab to symbol index table */ /* Add information about latest psymtab to symbol index table */
static void static void
record_pst_syms (start_sym, end_sym) record_pst_syms (int start_sym, int end_sym)
int start_sym;
int end_sym;
{ {
if (++pst_syms_count > pst_syms_size) if (++pst_syms_count > pst_syms_size)
{ {
@ -416,8 +409,7 @@ record_pst_syms (start_sym, end_sym)
Return 0 => not found */ Return 0 => not found */
static int static int
find_next_pst_start (index) find_next_pst_start (int index)
int index;
{ {
int i; int i;
@ -442,11 +434,8 @@ find_next_pst_start (index)
Return 0 => not found */ Return 0 => not found */
static int static int
find_next_file_isym (index, qFD, curr_fd, pxdb_header_p) find_next_file_isym (int index, quick_file_entry *qFD, int curr_fd,
int index; PXDB_header_ptr pxdb_header_p)
quick_file_entry *qFD;
int curr_fd;
PXDB_header_ptr pxdb_header_p;
{ {
while (VALID_CURR_FILE) while (VALID_CURR_FILE)
{ {
@ -464,11 +453,8 @@ find_next_file_isym (index, qFD, curr_fd, pxdb_header_p)
Return 0 => not found */ Return 0 => not found */
static int static int
find_next_proc_isym (index, qPD, curr_pd, pxdb_header_p) find_next_proc_isym (int index, quick_procedure_entry *qPD, int curr_pd,
int index; PXDB_header_ptr pxdb_header_p)
quick_procedure_entry *qPD;
int curr_pd;
PXDB_header_ptr pxdb_header_p;
{ {
while (VALID_CURR_PROC) while (VALID_CURR_PROC)
{ {
@ -486,11 +472,8 @@ find_next_proc_isym (index, qPD, curr_pd, pxdb_header_p)
Return 0 => not found */ Return 0 => not found */
static int static int
find_next_module_isym (index, qMD, curr_md, pxdb_header_p) find_next_module_isym (int index, quick_module_entry *qMD, int curr_md,
int index; PXDB_header_ptr pxdb_header_p)
quick_module_entry *qMD;
int curr_md;
PXDB_header_ptr pxdb_header_p;
{ {
while (VALID_CURR_MODULE) while (VALID_CURR_MODULE)
{ {
@ -1348,9 +1331,7 @@ hpread_quick_traverse (objfile, gntt_bits, vt_bits, pxdb_header_p)
/* Get appropriate header, based on pxdb type. /* Get appropriate header, based on pxdb type.
Return value: 1 if ok, 0 if not */ Return value: 1 if ok, 0 if not */
int int
hpread_get_header (objfile, pxdb_header_p) hpread_get_header (struct objfile *objfile, PXDB_header_ptr pxdb_header_p)
struct objfile *objfile;
PXDB_header_ptr pxdb_header_p;
{ {
asection *pinfo_section, *debug_section, *header_section; asection *pinfo_section, *debug_section, *header_section;
@ -1468,8 +1449,7 @@ hpread_get_header (objfile, pxdb_header_p)
FIXME, there should be a cleaner peephole into the BFD environment FIXME, there should be a cleaner peephole into the BFD environment
here. */ here. */
void void
hpread_symfile_init (objfile) hpread_symfile_init (struct objfile *objfile)
struct objfile *objfile;
{ {
asection *vt_section, *slt_section, *lntt_section, *gntt_section; asection *vt_section, *slt_section, *lntt_section, *gntt_section;
@ -1566,9 +1546,7 @@ hpread_symfile_init (objfile)
opposed to a shared lib or dynamically loaded file). */ opposed to a shared lib or dynamically loaded file). */
void void
hpread_build_psymtabs (objfile, mainline) hpread_build_psymtabs (struct objfile *objfile, int mainline)
struct objfile *objfile;
int mainline;
{ {
#ifdef DUMPING #ifdef DUMPING
@ -2091,8 +2069,7 @@ hpread_build_psymtabs (objfile, mainline)
objfile struct from the global list of known objfiles. */ objfile struct from the global list of known objfiles. */
void void
hpread_symfile_finish (objfile) hpread_symfile_finish (struct objfile *objfile)
struct objfile *objfile;
{ {
if (objfile->sym_private != NULL) if (objfile->sym_private != NULL)
{ {
@ -2106,27 +2083,21 @@ hpread_symfile_finish (objfile)
/* Various small functions to get entries in the debug symbol sections. */ /* Various small functions to get entries in the debug symbol sections. */
union dnttentry * union dnttentry *
hpread_get_lntt (index, objfile) hpread_get_lntt (int index, struct objfile *objfile)
int index;
struct objfile *objfile;
{ {
return (union dnttentry *) return (union dnttentry *)
&(LNTT (objfile)[(index * sizeof (struct dntt_type_block))]); &(LNTT (objfile)[(index * sizeof (struct dntt_type_block))]);
} }
static union dnttentry * static union dnttentry *
hpread_get_gntt (index, objfile) hpread_get_gntt (int index, struct objfile *objfile)
int index;
struct objfile *objfile;
{ {
return (union dnttentry *) return (union dnttentry *)
&(GNTT (objfile)[(index * sizeof (struct dntt_type_block))]); &(GNTT (objfile)[(index * sizeof (struct dntt_type_block))]);
} }
union sltentry * union sltentry *
hpread_get_slt (index, objfile) hpread_get_slt (int index, struct objfile *objfile)
int index;
struct objfile *objfile;
{ {
return (union sltentry *) &(SLT (objfile)[index * sizeof (union sltentry)]); return (union sltentry *) &(SLT (objfile)[index * sizeof (union sltentry)]);
} }
@ -2137,11 +2108,8 @@ hpread_get_slt (index, objfile)
the existance of DNTT_TYPE_FUNCTION symbols. */ the existance of DNTT_TYPE_FUNCTION symbols. */
static unsigned long static unsigned long
hpread_get_textlow (global, index, objfile, symcount) hpread_get_textlow (int global, int index, struct objfile *objfile,
int global; int symcount)
int index;
struct objfile *objfile;
int symcount;
{ {
union dnttentry *dn_bufp; union dnttentry *dn_bufp;
struct minimal_symbol *msymbol; struct minimal_symbol *msymbol;
@ -2193,14 +2161,10 @@ hpread_get_textlow (global, index, objfile, symcount)
(normal). */ (normal). */
static struct partial_symtab * static struct partial_symtab *
hpread_start_psymtab (objfile, hpread_start_psymtab (struct objfile *objfile, char *filename,
filename, textlow, ldsymoff, global_syms, static_syms) CORE_ADDR textlow, int ldsymoff,
struct objfile *objfile; struct partial_symbol **global_syms,
char *filename; struct partial_symbol **static_syms)
CORE_ADDR textlow;
int ldsymoff;
struct partial_symbol **global_syms;
struct partial_symbol **static_syms;
{ {
int offset = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile)); int offset = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
extern void hpread_psymtab_to_symtab (); extern void hpread_psymtab_to_symtab ();
@ -2228,15 +2192,11 @@ hpread_start_psymtab (objfile,
FIXME: List variables and peculiarities of same. */ FIXME: List variables and peculiarities of same. */
static struct partial_symtab * static struct partial_symtab *
hpread_end_psymtab (pst, include_list, num_includes, capping_symbol_offset, hpread_end_psymtab (struct partial_symtab *pst, char **include_list,
capping_text, dependency_list, number_dependencies) int num_includes, int capping_symbol_offset,
struct partial_symtab *pst; CORE_ADDR capping_text,
char **include_list; struct partial_symtab **dependency_list,
int num_includes; int number_dependencies)
int capping_symbol_offset;
CORE_ADDR capping_text;
struct partial_symtab **dependency_list;
int number_dependencies;
{ {
int i; int i;
struct objfile *objfile = pst->objfile; struct objfile *objfile = pst->objfile;

View file

@ -169,9 +169,7 @@ static struct type *fixup_method = NULL;
/* Get the nesting depth for the source line identified by INDEX. */ /* Get the nesting depth for the source line identified by INDEX. */
static unsigned long static unsigned long
hpread_get_scope_start (index, objfile) hpread_get_scope_start (sltpointer index, struct objfile *objfile)
sltpointer index;
struct objfile *objfile;
{ {
union sltentry *sl_bufp; union sltentry *sl_bufp;
@ -182,9 +180,7 @@ hpread_get_scope_start (index, objfile)
/* Get the source line number the the line identified by INDEX. */ /* Get the source line number the the line identified by INDEX. */
static unsigned long static unsigned long
hpread_get_line (index, objfile) hpread_get_line (sltpointer index, struct objfile *objfile)
sltpointer index;
struct objfile *objfile;
{ {
union sltentry *sl_bufp; union sltentry *sl_bufp;
@ -195,9 +191,7 @@ hpread_get_line (index, objfile)
/* Find the code address associated with a given sltpointer */ /* Find the code address associated with a given sltpointer */
static CORE_ADDR static CORE_ADDR
hpread_get_location (index, objfile) hpread_get_location (sltpointer index, struct objfile *objfile)
sltpointer index;
struct objfile *objfile;
{ {
union sltentry *sl_bufp; union sltentry *sl_bufp;
int i; int i;
@ -236,8 +230,7 @@ hpread_get_location (index, objfile)
*/ */
int int
hpread_has_name (kind) hpread_has_name (enum dntt_entry_type kind)
enum dntt_entry_type kind;
{ {
switch (kind) switch (kind)
{ {
@ -311,8 +304,7 @@ hpread_has_name (kind)
table. */ table. */
static void static void
hpread_psymtab_to_symtab_1 (pst) hpread_psymtab_to_symtab_1 (struct partial_symtab *pst)
struct partial_symtab *pst;
{ {
struct cleanup *old_chain; struct cleanup *old_chain;
int i; int i;
@ -370,8 +362,7 @@ hpread_psymtab_to_symtab_1 (pst)
Be verbose about it if the user wants that. */ Be verbose about it if the user wants that. */
void void
hpread_psymtab_to_symtab (pst) hpread_psymtab_to_symtab (struct partial_symtab *pst)
struct partial_symtab *pst;
{ {
/* Get out quick if given junk. */ /* Get out quick if given junk. */
if (!pst) if (!pst)
@ -427,15 +418,9 @@ hpread_psymtab_to_symtab (pst)
SECTION_OFFSETS are the relocation offsets which get added to each symbol. */ SECTION_OFFSETS are the relocation offsets which get added to each symbol. */
static struct symtab * static struct symtab *
hpread_expand_symtab (objfile, sym_offset, sym_size, text_offset, text_size, hpread_expand_symtab (struct objfile *objfile, int sym_offset, int sym_size,
section_offsets, filename) CORE_ADDR text_offset, int text_size,
struct objfile *objfile; struct section_offsets *section_offsets, char *filename)
int sym_offset;
int sym_size;
CORE_ADDR text_offset;
int text_size;
struct section_offsets *section_offsets;
char *filename;
{ {
char *namestring; char *namestring;
union dnttentry *dn_bufp; union dnttentry *dn_bufp;
@ -540,8 +525,7 @@ hpread_expand_symtab (objfile, sym_offset, sym_size, text_offset, text_size,
/* Convert basic types from HP debug format into GDB internal format. */ /* Convert basic types from HP debug format into GDB internal format. */
static int static int
hpread_type_translate (typep) hpread_type_translate (dnttpointer typep)
dnttpointer typep;
{ {
if (!typep.dntti.immediate) if (!typep.dntti.immediate)
{ {
@ -632,9 +616,7 @@ hpread_type_translate (typep)
*/ */
static struct type ** static struct type **
hpread_lookup_type (hp_type, objfile) hpread_lookup_type (dnttpointer hp_type, struct objfile *objfile)
dnttpointer hp_type;
struct objfile *objfile;
{ {
unsigned old_len; unsigned old_len;
int index = hp_type.dnttp.index; int index = hp_type.dnttp.index;
@ -720,9 +702,7 @@ hpread_lookup_type (hp_type, objfile)
have it lying around. */ have it lying around. */
static struct type * static struct type *
hpread_alloc_type (hp_type, objfile) hpread_alloc_type (dnttpointer hp_type, struct objfile *objfile)
dnttpointer hp_type;
struct objfile *objfile;
{ {
struct type **type_addr; struct type **type_addr;
@ -744,10 +724,8 @@ hpread_alloc_type (hp_type, objfile)
/* Read a native enumerated type and return it in GDB internal form. */ /* Read a native enumerated type and return it in GDB internal form. */
static struct type * static struct type *
hpread_read_enum_type (hp_type, dn_bufp, objfile) hpread_read_enum_type (dnttpointer hp_type, union dnttentry *dn_bufp,
dnttpointer hp_type; struct objfile *objfile)
union dnttentry *dn_bufp;
struct objfile *objfile;
{ {
struct type *type; struct type *type;
struct pending **symlist, *osyms, *syms; struct pending **symlist, *osyms, *syms;
@ -839,11 +817,8 @@ hpread_read_enum_type (hp_type, dn_bufp, objfile)
/* Read and internalize a native function debug symbol. */ /* Read and internalize a native function debug symbol. */
static struct type * static struct type *
hpread_read_function_type (hp_type, dn_bufp, objfile, newblock) hpread_read_function_type (dnttpointer hp_type, union dnttentry *dn_bufp,
dnttpointer hp_type; struct objfile *objfile, int newblock)
union dnttentry *dn_bufp;
struct objfile *objfile;
int newblock;
{ {
struct type *type, *type1; struct type *type, *type1;
struct pending *syms; struct pending *syms;
@ -1025,11 +1000,8 @@ finish:
* volatile, please leave it this way. * volatile, please leave it this way.
*/ */
static struct type * static struct type *
hpread_read_doc_function_type (hp_type, dn_bufp, objfile, newblock) hpread_read_doc_function_type (dnttpointer hp_type, union dnttentry *dn_bufp,
dnttpointer hp_type; struct objfile *objfile, int newblock)
union dnttentry *dn_bufp;
struct objfile *objfile;
int newblock;
{ {
struct type *type, *type1; struct type *type, *type1;
struct pending *syms; struct pending *syms;
@ -1218,10 +1190,8 @@ static struct type *current_template = NULL;
*/ */
static struct type * static struct type *
hpread_read_struct_type (hp_type, dn_bufp, objfile) hpread_read_struct_type (dnttpointer hp_type, union dnttentry *dn_bufp,
dnttpointer hp_type; struct objfile *objfile)
union dnttentry *dn_bufp;
struct objfile *objfile;
{ {
/* The data members get linked together into a list of struct nextfield's */ /* The data members get linked together into a list of struct nextfield's */
struct nextfield struct nextfield
@ -2059,10 +2029,8 @@ hpread_read_struct_type (hp_type, dn_bufp, objfile)
Void return */ Void return */
static void static void
fix_static_member_physnames (type, class_name, objfile) fix_static_member_physnames (struct type *type, char *class_name,
struct type *type; struct objfile *objfile)
char *class_name;
struct objfile *objfile;
{ {
int i; int i;
@ -2092,10 +2060,8 @@ fix_static_member_physnames (type, class_name, objfile)
* Void return. */ * Void return. */
static void static void
fixup_class_method_type (class, method, objfile) fixup_class_method_type (struct type *class, struct type *method,
struct type *class; struct objfile *objfile)
struct type *method;
struct objfile *objfile;
{ {
int i, j, k; int i, j, k;
@ -2156,9 +2122,7 @@ finish:
* This is called from hpread_type_lookup(). * This is called from hpread_type_lookup().
*/ */
static struct type * static struct type *
hpread_get_nth_template_arg (objfile, n) hpread_get_nth_template_arg (struct objfile *objfile, int n)
struct objfile *objfile;
int n;
{ {
if (current_template != NULL) if (current_template != NULL)
return TYPE_TEMPLATE_ARG (current_template, n).type; return TYPE_TEMPLATE_ARG (current_template, n).type;
@ -2169,11 +2133,8 @@ hpread_get_nth_template_arg (objfile, n)
/* Read in and internalize a TEMPL_ARG (template arg) symbol. */ /* Read in and internalize a TEMPL_ARG (template arg) symbol. */
static struct type * static struct type *
hpread_read_templ_arg_type (hp_type, dn_bufp, objfile, name) hpread_read_templ_arg_type (dnttpointer hp_type, union dnttentry *dn_bufp,
dnttpointer hp_type; struct objfile *objfile, char *name)
union dnttentry *dn_bufp;
struct objfile *objfile;
char *name;
{ {
struct type *type; struct type *type;
@ -2193,10 +2154,8 @@ hpread_read_templ_arg_type (hp_type, dn_bufp, objfile, name)
/* Read in and internalize a set debug symbol. */ /* Read in and internalize a set debug symbol. */
static struct type * static struct type *
hpread_read_set_type (hp_type, dn_bufp, objfile) hpread_read_set_type (dnttpointer hp_type, union dnttentry *dn_bufp,
dnttpointer hp_type; struct objfile *objfile)
union dnttentry *dn_bufp;
struct objfile *objfile;
{ {
struct type *type; struct type *type;
@ -2217,10 +2176,8 @@ hpread_read_set_type (hp_type, dn_bufp, objfile)
/* Read in and internalize an array debug symbol. */ /* Read in and internalize an array debug symbol. */
static struct type * static struct type *
hpread_read_array_type (hp_type, dn_bufp, objfile) hpread_read_array_type (dnttpointer hp_type, union dnttentry *dn_bufp,
dnttpointer hp_type; struct objfile *objfile)
union dnttentry *dn_bufp;
struct objfile *objfile;
{ {
struct type *type; struct type *type;
@ -2277,10 +2234,8 @@ hpread_read_array_type (hp_type, dn_bufp, objfile)
/* Read in and internalize a subrange debug symbol. */ /* Read in and internalize a subrange debug symbol. */
static struct type * static struct type *
hpread_read_subrange_type (hp_type, dn_bufp, objfile) hpread_read_subrange_type (dnttpointer hp_type, union dnttentry *dn_bufp,
dnttpointer hp_type; struct objfile *objfile)
union dnttentry *dn_bufp;
struct objfile *objfile;
{ {
struct type *type; struct type *type;
@ -2340,9 +2295,7 @@ hpread_read_subrange_type (hp_type, dn_bufp, objfile)
* a struct/class type, etc). * a struct/class type, etc).
*/ */
static struct type * static struct type *
hpread_type_lookup (hp_type, objfile) hpread_type_lookup (dnttpointer hp_type, struct objfile *objfile)
dnttpointer hp_type;
struct objfile *objfile;
{ {
union dnttentry *dn_bufp; union dnttentry *dn_bufp;
struct type *tmp_type; struct type *tmp_type;
@ -2701,11 +2654,9 @@ hpread_type_lookup (hp_type, objfile)
} }
static sltpointer static sltpointer
hpread_record_lines (subfile, s_idx, e_idx, objfile, offset) hpread_record_lines (struct subfile *subfile, sltpointer s_idx,
struct subfile *subfile; sltpointer e_idx, struct objfile *objfile,
sltpointer s_idx, e_idx; CORE_ADDR offset)
struct objfile *objfile;
CORE_ADDR offset;
{ {
union sltentry *sl_bufp; union sltentry *sl_bufp;
@ -2733,8 +2684,7 @@ hpread_record_lines (subfile, s_idx, e_idx, objfile, offset)
* If "f" is not a member function, return NULL. * If "f" is not a member function, return NULL.
*/ */
char * char *
class_of (functype) class_of (struct type *functype)
struct type *functype;
{ {
struct type *first_param_type; struct type *first_param_type;
char *first_param_name; char *first_param_name;
@ -2794,19 +2744,11 @@ class_of (functype)
*/ */
static void static void
hpread_process_one_debug_symbol (dn_bufp, name, section_offsets, objfile, hpread_process_one_debug_symbol (union dnttentry *dn_bufp, char *name,
text_offset, text_size, filename, struct section_offsets *section_offsets,
index, at_module_boundary_p struct objfile *objfile, CORE_ADDR text_offset,
) int text_size, char *filename, int index,
union dnttentry *dn_bufp; int *at_module_boundary_p)
char *name;
struct section_offsets *section_offsets;
struct objfile *objfile;
CORE_ADDR text_offset;
int text_size;
char *filename;
int index;
int *at_module_boundary_p;
{ {
unsigned long desc; unsigned long desc;
int type; int type;
@ -3916,10 +3858,8 @@ hpread_process_one_debug_symbol (dn_bufp, name, section_offsets, objfile,
static int static int
hpread_get_scope_depth (dn_bufp, objfile, report_nested) hpread_get_scope_depth (union dnttentry *dn_bufp, struct objfile *objfile,
union dnttentry *dn_bufp; int report_nested)
struct objfile *objfile;
int report_nested;
{ {
register int index; register int index;
register union dnttentry *dn_tmp; register union dnttentry *dn_tmp;
@ -3964,9 +3904,7 @@ hpread_get_scope_depth (dn_bufp, objfile, report_nested)
enclosing structure instead of relative to the union itself. */ enclosing structure instead of relative to the union itself. */
static void static void
hpread_adjust_bitoffsets (type, bits) hpread_adjust_bitoffsets (struct type *type, int bits)
struct type *type;
int bits;
{ {
register int i; register int i;
@ -4000,11 +3938,9 @@ hpread_adjust_bitoffsets (type, bits)
is a dnttpointer for the new field after all the skipped ones */ is a dnttpointer for the new field after all the skipped ones */
static dnttpointer static dnttpointer
hpread_get_next_skip_over_anon_unions (skip_fields, field, fieldp, objfile) hpread_get_next_skip_over_anon_unions (int skip_fields, dnttpointer field,
int skip_fields; union dnttentry **fieldp,
dnttpointer field; struct objfile *objfile)
union dnttentry **fieldp;
struct objfile *objfile;
{ {
struct type *anon_type; struct type *anon_type;
register int i; register int i;

View file

@ -60,7 +60,7 @@ static struct hpnlist nl[] =
/* read the value of the u area from the hp-ux kernel */ /* read the value of the u area from the hp-ux kernel */
void void
_initialize_hp300ux_nat () _initialize_hp300ux_nat (void)
{ {
#ifndef HPUX_VERSION_5 #ifndef HPUX_VERSION_5
nlist ("/hp-ux", nl); nlist ("/hp-ux", nl);
@ -77,9 +77,7 @@ _initialize_hp300ux_nat ()
- kernel_u_addr) - kernel_u_addr)
static void static void
fetch_inferior_register (regno, regaddr) fetch_inferior_register (register int regno, register unsigned int regaddr)
register int regno;
register unsigned int regaddr;
{ {
#ifndef HPUX_VERSION_5 #ifndef HPUX_VERSION_5
if (regno == PS_REGNUM) if (regno == PS_REGNUM)
@ -115,10 +113,7 @@ fetch_inferior_register (regno, regaddr)
} }
static void static void
store_inferior_register_1 (regno, regaddr, val) store_inferior_register_1 (int regno, unsigned int regaddr, int val)
int regno;
unsigned int regaddr;
int val;
{ {
errno = 0; errno = 0;
ptrace (PT_WUAREA, inferior_pid, (PTRACE_ARG3_TYPE) regaddr, val, 0); ptrace (PT_WUAREA, inferior_pid, (PTRACE_ARG3_TYPE) regaddr, val, 0);
@ -137,9 +132,7 @@ store_inferior_register_1 (regno, regaddr, val)
} }
static void static void
store_inferior_register (regno, regaddr) store_inferior_register (register int regno, register unsigned int regaddr)
register int regno;
register unsigned int regaddr;
{ {
#ifndef HPUX_VERSION_5 #ifndef HPUX_VERSION_5
if (regno == PS_REGNUM) if (regno == PS_REGNUM)
@ -173,8 +166,7 @@ store_inferior_register (regno, regaddr)
} }
void void
fetch_inferior_registers (regno) fetch_inferior_registers (int regno)
int regno;
{ {
struct user u; struct user u;
register unsigned int ar0_offset; register unsigned int ar0_offset;
@ -199,8 +191,7 @@ fetch_inferior_registers (regno)
Otherwise, REGNO specifies which register (so we can save time). */ Otherwise, REGNO specifies which register (so we can save time). */
void void
store_inferior_registers (regno) store_inferior_registers (register int regno)
register int regno;
{ {
struct user u; struct user u;
register unsigned int ar0_offset; register unsigned int ar0_offset;
@ -226,7 +217,7 @@ store_inferior_registers (regno)
} }
int int
getpagesize () getpagesize (void)
{ {
return 4096; return 4096;
} }

View file

@ -150,9 +150,7 @@ extern value_ptr find_function_in_inferior (char *);
/* Should call_function allocate stack space for a struct return? */ /* Should call_function allocate stack space for a struct return? */
int int
hppa_use_struct_convention (gcc_p, type) hppa_use_struct_convention (int gcc_p, struct type *type)
int gcc_p;
struct type *type;
{ {
return (TYPE_LENGTH (type) > 2 * REGISTER_SIZE); return (TYPE_LENGTH (type) > 2 * REGISTER_SIZE);
} }
@ -165,8 +163,7 @@ hppa_use_struct_convention (gcc_p, type)
value. */ value. */
static int static int
sign_extend (val, bits) sign_extend (unsigned val, unsigned bits)
unsigned val, bits;
{ {
return (int) (val >> (bits - 1) ? (-1 << bits) | val : val); return (int) (val >> (bits - 1) ? (-1 << bits) | val : val);
} }
@ -174,8 +171,7 @@ sign_extend (val, bits)
/* For many immediate values the sign bit is the low bit! */ /* For many immediate values the sign bit is the low bit! */
static int static int
low_sign_extend (val, bits) low_sign_extend (unsigned val, unsigned bits)
unsigned val, bits;
{ {
return (int) ((val & 0x1 ? (-1 << (bits - 1)) : 0) | val >> 1); return (int) ((val & 0x1 ? (-1 << (bits - 1)) : 0) | val >> 1);
} }
@ -183,8 +179,7 @@ low_sign_extend (val, bits)
/* extract the immediate field from a ld{bhw}s instruction */ /* extract the immediate field from a ld{bhw}s instruction */
static int static int
extract_5_load (word) extract_5_load (unsigned word)
unsigned word;
{ {
return low_sign_extend (word >> 16 & MASK_5, 5); return low_sign_extend (word >> 16 & MASK_5, 5);
} }
@ -192,8 +187,7 @@ extract_5_load (word)
/* extract the immediate field from a break instruction */ /* extract the immediate field from a break instruction */
static unsigned static unsigned
extract_5r_store (word) extract_5r_store (unsigned word)
unsigned word;
{ {
return (word & MASK_5); return (word & MASK_5);
} }
@ -201,8 +195,7 @@ extract_5r_store (word)
/* extract the immediate field from a {sr}sm instruction */ /* extract the immediate field from a {sr}sm instruction */
static unsigned static unsigned
extract_5R_store (word) extract_5R_store (unsigned word)
unsigned word;
{ {
return (word >> 16 & MASK_5); return (word >> 16 & MASK_5);
} }
@ -210,8 +203,7 @@ extract_5R_store (word)
/* extract a 14 bit immediate field */ /* extract a 14 bit immediate field */
static int static int
extract_14 (word) extract_14 (unsigned word)
unsigned word;
{ {
return low_sign_extend (word & MASK_14, 14); return low_sign_extend (word & MASK_14, 14);
} }
@ -219,9 +211,7 @@ extract_14 (word)
/* deposit a 14 bit constant in a word */ /* deposit a 14 bit constant in a word */
static unsigned static unsigned
deposit_14 (opnd, word) deposit_14 (int opnd, unsigned word)
int opnd;
unsigned word;
{ {
unsigned sign = (opnd < 0 ? 1 : 0); unsigned sign = (opnd < 0 ? 1 : 0);
@ -231,8 +221,7 @@ deposit_14 (opnd, word)
/* extract a 21 bit constant */ /* extract a 21 bit constant */
static int static int
extract_21 (word) extract_21 (unsigned word)
unsigned word;
{ {
int val; int val;
@ -255,8 +244,7 @@ extract_21 (word)
the low 21 bits of opnd are relevant */ the low 21 bits of opnd are relevant */
static unsigned static unsigned
deposit_21 (opnd, word) deposit_21 (unsigned opnd, unsigned word)
unsigned opnd, word;
{ {
unsigned val = 0; unsigned val = 0;
@ -276,8 +264,7 @@ deposit_21 (opnd, word)
19 bit signed value. */ 19 bit signed value. */
static int static int
extract_17 (word) extract_17 (unsigned word)
unsigned word;
{ {
return sign_extend (GET_FIELD (word, 19, 28) | return sign_extend (GET_FIELD (word, 19, 28) |
GET_FIELD (word, 29, 29) << 10 | GET_FIELD (word, 29, 29) << 10 |
@ -291,9 +278,7 @@ extract_17 (word)
larger than the first, and zero if they are equal. */ larger than the first, and zero if they are equal. */
static int static int
compare_unwind_entries (arg1, arg2) compare_unwind_entries (const void *arg1, const void *arg2)
const void *arg1;
const void *arg2;
{ {
const struct unwind_table_entry *a = arg1; const struct unwind_table_entry *a = arg1;
const struct unwind_table_entry *b = arg2; const struct unwind_table_entry *b = arg2;
@ -321,12 +306,9 @@ record_text_segment_lowaddr (abfd, section, ignored)
} }
static void static void
internalize_unwinds (objfile, table, section, entries, size, text_offset) internalize_unwinds (struct objfile *objfile, struct unwind_table_entry *table,
struct objfile *objfile; asection *section, unsigned int entries, unsigned int size,
struct unwind_table_entry *table; CORE_ADDR text_offset)
asection *section;
unsigned int entries, size;
CORE_ADDR text_offset;
{ {
/* We will read the unwind entries into temporary memory, then /* We will read the unwind entries into temporary memory, then
fill in the actual unwind table. */ fill in the actual unwind table. */
@ -418,8 +400,7 @@ internalize_unwinds (objfile, table, section, entries, size, text_offset)
gets freed when the objfile is destroyed. */ gets freed when the objfile is destroyed. */
static void static void
read_unwind_info (objfile) read_unwind_info (struct objfile *objfile)
struct objfile *objfile;
{ {
asection *unwind_sec, *stub_unwind_sec; asection *unwind_sec, *stub_unwind_sec;
unsigned unwind_size, stub_unwind_size, total_size; unsigned unwind_size, stub_unwind_size, total_size;
@ -561,8 +542,7 @@ read_unwind_info (objfile)
search of the unwind tables, we depend upon them to be sorted. */ search of the unwind tables, we depend upon them to be sorted. */
struct unwind_table_entry * struct unwind_table_entry *
find_unwind_entry (pc) find_unwind_entry (CORE_ADDR pc)
CORE_ADDR pc;
{ {
int first, middle, last; int first, middle, last;
struct objfile *objfile; struct objfile *objfile;
@ -624,8 +604,7 @@ find_unwind_entry (pc)
bizarre way in which someone (?) decided they wanted to handle bizarre way in which someone (?) decided they wanted to handle
frame pointerless code in GDB. */ frame pointerless code in GDB. */
int int
hpread_adjust_stack_address (func_addr) hpread_adjust_stack_address (CORE_ADDR func_addr)
CORE_ADDR func_addr;
{ {
struct unwind_table_entry *u; struct unwind_table_entry *u;
@ -640,8 +619,7 @@ hpread_adjust_stack_address (func_addr)
kind. */ kind. */
static int static int
pc_in_interrupt_handler (pc) pc_in_interrupt_handler (CORE_ADDR pc)
CORE_ADDR pc;
{ {
struct unwind_table_entry *u; struct unwind_table_entry *u;
struct minimal_symbol *msym_us; struct minimal_symbol *msym_us;
@ -663,8 +641,7 @@ pc_in_interrupt_handler (pc)
?!? Need to handle stubs which appear in PA64 code. */ ?!? Need to handle stubs which appear in PA64 code. */
static int static int
pc_in_linker_stub (pc) pc_in_linker_stub (CORE_ADDR pc)
CORE_ADDR pc;
{ {
int found_magic_instruction = 0; int found_magic_instruction = 0;
int i; int i;
@ -729,8 +706,7 @@ pc_in_linker_stub (pc)
} }
static int static int
find_return_regnum (pc) find_return_regnum (CORE_ADDR pc)
CORE_ADDR pc;
{ {
struct unwind_table_entry *u; struct unwind_table_entry *u;
@ -747,8 +723,7 @@ find_return_regnum (pc)
/* Return size of frame, or -1 if we should use a frame pointer. */ /* Return size of frame, or -1 if we should use a frame pointer. */
static int static int
find_proc_framesize (pc) find_proc_framesize (CORE_ADDR pc)
CORE_ADDR pc;
{ {
struct unwind_table_entry *u; struct unwind_table_entry *u;
struct minimal_symbol *msym_us; struct minimal_symbol *msym_us;
@ -783,8 +758,7 @@ find_proc_framesize (pc)
static int rp_saved (CORE_ADDR); static int rp_saved (CORE_ADDR);
static int static int
rp_saved (pc) rp_saved (CORE_ADDR pc)
CORE_ADDR pc;
{ {
struct unwind_table_entry *u; struct unwind_table_entry *u;
@ -823,8 +797,7 @@ rp_saved (pc)
} }
int int
frameless_function_invocation (frame) frameless_function_invocation (struct frame_info *frame)
struct frame_info *frame;
{ {
struct unwind_table_entry *u; struct unwind_table_entry *u;
@ -837,8 +810,7 @@ frameless_function_invocation (frame)
} }
CORE_ADDR CORE_ADDR
saved_pc_after_call (frame) saved_pc_after_call (struct frame_info *frame)
struct frame_info *frame;
{ {
int ret_regnum; int ret_regnum;
CORE_ADDR pc; CORE_ADDR pc;
@ -857,8 +829,7 @@ saved_pc_after_call (frame)
} }
CORE_ADDR CORE_ADDR
hppa_frame_saved_pc (frame) hppa_frame_saved_pc (struct frame_info *frame)
struct frame_info *frame;
{ {
CORE_ADDR pc = get_frame_pc (frame); CORE_ADDR pc = get_frame_pc (frame);
struct unwind_table_entry *u; struct unwind_table_entry *u;
@ -1037,9 +1008,7 @@ hppa_frame_saved_pc (frame)
in a system call. */ in a system call. */
void void
init_extra_frame_info (fromleaf, frame) init_extra_frame_info (int fromleaf, struct frame_info *frame)
int fromleaf;
struct frame_info *frame;
{ {
int flags; int flags;
int framesize; int framesize;
@ -1096,8 +1065,7 @@ init_extra_frame_info (fromleaf, frame)
a frame pointer calls code without a frame pointer. */ a frame pointer calls code without a frame pointer. */
CORE_ADDR CORE_ADDR
frame_chain (frame) frame_chain (struct frame_info *frame)
struct frame_info *frame;
{ {
int my_framesize, caller_framesize; int my_framesize, caller_framesize;
struct unwind_table_entry *u; struct unwind_table_entry *u;
@ -1353,9 +1321,7 @@ frame_chain (frame)
was compiled with gcc. */ was compiled with gcc. */
int int
hppa_frame_chain_valid (chain, thisframe) hppa_frame_chain_valid (CORE_ADDR chain, struct frame_info *thisframe)
CORE_ADDR chain;
struct frame_info *thisframe;
{ {
struct minimal_symbol *msym_us; struct minimal_symbol *msym_us;
struct minimal_symbol *msym_start; struct minimal_symbol *msym_start;
@ -1416,8 +1382,7 @@ hppa_frame_chain_valid (chain, thisframe)
to be aligned to a 64-byte boundary. */ to be aligned to a 64-byte boundary. */
void void
push_dummy_frame (inf_status) push_dummy_frame (struct inferior_status *inf_status)
struct inferior_status *inf_status;
{ {
CORE_ADDR sp, pc, pcspace; CORE_ADDR sp, pc, pcspace;
register int regnum; register int regnum;
@ -1494,9 +1459,8 @@ push_dummy_frame (inf_status)
} }
static void static void
find_dummy_frame_regs (frame, frame_saved_regs) find_dummy_frame_regs (struct frame_info *frame,
struct frame_info *frame; struct frame_saved_regs *frame_saved_regs)
struct frame_saved_regs *frame_saved_regs;
{ {
CORE_ADDR fp = frame->frame; CORE_ADDR fp = frame->frame;
int i; int i;
@ -1536,7 +1500,7 @@ find_dummy_frame_regs (frame, frame_saved_regs)
} }
void void
hppa_pop_frame () hppa_pop_frame (void)
{ {
register struct frame_info *frame = get_current_frame (); register struct frame_info *frame = get_current_frame ();
register CORE_ADDR fp, npc, target_pc; register CORE_ADDR fp, npc, target_pc;
@ -1634,8 +1598,7 @@ hppa_pop_frame ()
queue space registers. */ queue space registers. */
static int static int
restore_pc_queue (fsr) restore_pc_queue (struct frame_saved_regs *fsr)
struct frame_saved_regs *fsr;
{ {
CORE_ADDR pc = read_pc (); CORE_ADDR pc = read_pc ();
CORE_ADDR new_pc = read_memory_integer (fsr->regs[PCOQ_HEAD_REGNUM], CORE_ADDR new_pc = read_memory_integer (fsr->regs[PCOQ_HEAD_REGNUM],
@ -1705,12 +1668,8 @@ restore_pc_queue (fsr)
to the callee, so we do that too. */ to the callee, so we do that too. */
CORE_ADDR CORE_ADDR
hppa_push_arguments (nargs, args, sp, struct_return, struct_addr) hppa_push_arguments (int nargs, value_ptr *args, CORE_ADDR sp,
int nargs; int struct_return, CORE_ADDR struct_addr)
value_ptr *args;
CORE_ADDR sp;
int struct_return;
CORE_ADDR struct_addr;
{ {
/* array of arguments' offsets */ /* array of arguments' offsets */
int *offset = (int *) alloca (nargs * sizeof (int)); int *offset = (int *) alloca (nargs * sizeof (int));
@ -1828,12 +1787,8 @@ hppa_push_arguments (nargs, args, sp, struct_return, struct_addr)
arguments into registers as needed by the ABI. */ arguments into registers as needed by the ABI. */
CORE_ADDR CORE_ADDR
hppa_push_arguments (nargs, args, sp, struct_return, struct_addr) hppa_push_arguments (int nargs, value_ptr *args, CORE_ADDR sp,
int nargs; int struct_return, CORE_ADDR struct_addr)
value_ptr *args;
CORE_ADDR sp;
int struct_return;
CORE_ADDR struct_addr;
{ {
/* array of arguments' offsets */ /* array of arguments' offsets */
int *offset = (int *) alloca (nargs * sizeof (int)); int *offset = (int *) alloca (nargs * sizeof (int));
@ -1922,9 +1877,7 @@ hppa_push_arguments (nargs, args, sp, struct_return, struct_addr)
gets the value from the stack rather than from the buffer where all the gets the value from the stack rather than from the buffer where all the
registers were saved when the function called completed. */ registers were saved when the function called completed. */
value_ptr value_ptr
hppa_value_returned_from_stack (valtype, addr) hppa_value_returned_from_stack (register struct type *valtype, CORE_ADDR addr)
register struct type *valtype;
CORE_ADDR addr;
{ {
register value_ptr val; register value_ptr val;
@ -1957,9 +1910,7 @@ hppa_value_returned_from_stack (valtype, addr)
man entry for shl_findsym */ man entry for shl_findsym */
CORE_ADDR CORE_ADDR
find_stub_with_shl_get (function, handle) find_stub_with_shl_get (struct minimal_symbol *function, CORE_ADDR handle)
struct minimal_symbol *function;
CORE_ADDR handle;
{ {
struct symbol *get_sym, *symbol2; struct symbol *get_sym, *symbol2;
struct minimal_symbol *buff_minsym, *msymbol; struct minimal_symbol *buff_minsym, *msymbol;
@ -2058,14 +2009,8 @@ cover_find_stub_with_shl_get (PTR args_untyped)
Please contact Jeff Law (law@cygnus.com) before changing this code. */ Please contact Jeff Law (law@cygnus.com) before changing this code. */
CORE_ADDR CORE_ADDR
hppa_fix_call_dummy (dummy, pc, fun, nargs, args, type, gcc_p) hppa_fix_call_dummy (char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs,
char *dummy; value_ptr *args, struct type *type, int gcc_p)
CORE_ADDR pc;
CORE_ADDR fun;
int nargs;
value_ptr *args;
struct type *type;
int gcc_p;
{ {
CORE_ADDR dyncall_addr; CORE_ADDR dyncall_addr;
struct minimal_symbol *msymbol; struct minimal_symbol *msymbol;
@ -2441,8 +2386,7 @@ hppa_fix_call_dummy (dummy, pc, fun, nargs, args, type, gcc_p)
We'll return zero in that case, rather than attempting to read it We'll return zero in that case, rather than attempting to read it
and cause a warning. */ and cause a warning. */
CORE_ADDR CORE_ADDR
target_read_fp (pid) target_read_fp (int pid)
int pid;
{ {
int flags = read_register (FLAGS_REGNUM); int flags = read_register (FLAGS_REGNUM);
@ -2461,8 +2405,7 @@ target_read_fp (pid)
bits. */ bits. */
CORE_ADDR CORE_ADDR
target_read_pc (pid) target_read_pc (int pid)
int pid;
{ {
int flags = read_register_pid (FLAGS_REGNUM, pid); int flags = read_register_pid (FLAGS_REGNUM, pid);
@ -2479,9 +2422,7 @@ target_read_pc (pid)
PC value into %r31. */ PC value into %r31. */
void void
target_write_pc (v, pid) target_write_pc (CORE_ADDR v, int pid)
CORE_ADDR v;
int pid;
{ {
int flags = read_register_pid (FLAGS_REGNUM, pid); int flags = read_register_pid (FLAGS_REGNUM, pid);
@ -2501,8 +2442,7 @@ target_write_pc (v, pid)
alignment required by their fields. */ alignment required by their fields. */
static int static int
hppa_alignof (type) hppa_alignof (struct type *type)
struct type *type;
{ {
int max_align, align, i; int max_align, align, i;
CHECK_TYPEDEF (type); CHECK_TYPEDEF (type);
@ -2536,9 +2476,7 @@ hppa_alignof (type)
/* Print the register regnum, or all registers if regnum is -1 */ /* Print the register regnum, or all registers if regnum is -1 */
void void
pa_do_registers_info (regnum, fpregs) pa_do_registers_info (int regnum, int fpregs)
int regnum;
int fpregs;
{ {
char raw_regs[REGISTER_BYTES]; char raw_regs[REGISTER_BYTES];
int i; int i;
@ -2581,11 +2519,8 @@ pa_do_registers_info (regnum, fpregs)
/********** new function ********************/ /********** new function ********************/
void void
pa_do_strcat_registers_info (regnum, fpregs, stream, precision) pa_do_strcat_registers_info (int regnum, int fpregs, struct ui_file *stream,
int regnum; enum precision_type precision)
int fpregs;
struct ui_file *stream;
enum precision_type precision;
{ {
char raw_regs[REGISTER_BYTES]; char raw_regs[REGISTER_BYTES];
int i; int i;
@ -2634,10 +2569,7 @@ pa_do_strcat_registers_info (regnum, fpregs, stream, precision)
Note that reg_val is really expected to be an array of longs, Note that reg_val is really expected to be an array of longs,
with two elements. */ with two elements. */
static void static void
pa_register_look_aside (raw_regs, regnum, raw_val) pa_register_look_aside (char *raw_regs, int regnum, long *raw_val)
char *raw_regs;
int regnum;
long *raw_val;
{ {
static int know_which = 0; /* False */ static int know_which = 0; /* False */
@ -2740,10 +2672,7 @@ error_exit:
/* "Info all-reg" command */ /* "Info all-reg" command */
static void static void
pa_print_registers (raw_regs, regnum, fpregs) pa_print_registers (char *raw_regs, int regnum, int fpregs)
char *raw_regs;
int regnum;
int fpregs;
{ {
int i, j; int i, j;
/* Alas, we are compiled so that "long long" is 32 bits */ /* Alas, we are compiled so that "long long" is 32 bits */
@ -2795,11 +2724,8 @@ pa_print_registers (raw_regs, regnum, fpregs)
/************* new function ******************/ /************* new function ******************/
static void static void
pa_strcat_registers (raw_regs, regnum, fpregs, stream) pa_strcat_registers (char *raw_regs, int regnum, int fpregs,
char *raw_regs; struct ui_file *stream)
int regnum;
int fpregs;
struct ui_file *stream;
{ {
int i, j; int i, j;
long raw_val[2]; /* Alas, we are compiled so that "long long" is 32 bits */ long raw_val[2]; /* Alas, we are compiled so that "long long" is 32 bits */
@ -2846,8 +2772,7 @@ pa_strcat_registers (raw_regs, regnum, fpregs, stream)
} }
static void static void
pa_print_fp_reg (i) pa_print_fp_reg (int i)
int i;
{ {
char raw_buffer[MAX_REGISTER_RAW_SIZE]; char raw_buffer[MAX_REGISTER_RAW_SIZE];
char virtual_buffer[MAX_REGISTER_VIRTUAL_SIZE]; char virtual_buffer[MAX_REGISTER_VIRTUAL_SIZE];
@ -2890,10 +2815,7 @@ pa_print_fp_reg (i)
/*************** new function ***********************/ /*************** new function ***********************/
static void static void
pa_strcat_fp_reg (i, stream, precision) pa_strcat_fp_reg (int i, struct ui_file *stream, enum precision_type precision)
int i;
struct ui_file *stream;
enum precision_type precision;
{ {
char raw_buffer[MAX_REGISTER_RAW_SIZE]; char raw_buffer[MAX_REGISTER_RAW_SIZE];
char virtual_buffer[MAX_REGISTER_VIRTUAL_SIZE]; char virtual_buffer[MAX_REGISTER_VIRTUAL_SIZE];
@ -2936,9 +2858,7 @@ pa_strcat_fp_reg (i, stream, precision)
just shared library trampolines (import, export). */ just shared library trampolines (import, export). */
int int
in_solib_call_trampoline (pc, name) in_solib_call_trampoline (CORE_ADDR pc, char *name)
CORE_ADDR pc;
char *name;
{ {
struct minimal_symbol *minsym; struct minimal_symbol *minsym;
struct unwind_table_entry *u; struct unwind_table_entry *u;
@ -3098,9 +3018,7 @@ in_solib_call_trampoline (pc, name)
just shared library trampolines (import, export). */ just shared library trampolines (import, export). */
int int
in_solib_return_trampoline (pc, name) in_solib_return_trampoline (CORE_ADDR pc, char *name)
CORE_ADDR pc;
char *name;
{ {
struct unwind_table_entry *u; struct unwind_table_entry *u;
@ -3173,9 +3091,7 @@ in_solib_return_trampoline (pc, name)
used in dynamic executables. */ used in dynamic executables. */
CORE_ADDR CORE_ADDR
skip_trampoline_code (pc, name) skip_trampoline_code (CORE_ADDR pc, char *name)
CORE_ADDR pc;
char *name;
{ {
long orig_pc = pc; long orig_pc = pc;
long prev_inst, curr_inst, loc; long prev_inst, curr_inst, loc;
@ -3450,8 +3366,7 @@ skip_trampoline_code (pc, name)
This only handles instructions commonly found in prologues. */ This only handles instructions commonly found in prologues. */
static int static int
prologue_inst_adjust_sp (inst) prologue_inst_adjust_sp (unsigned long inst)
unsigned long inst;
{ {
/* This must persist across calls. */ /* This must persist across calls. */
static int save_high21; static int save_high21;
@ -3490,8 +3405,7 @@ prologue_inst_adjust_sp (inst)
/* Return nonzero if INST is a branch of some kind, else return zero. */ /* Return nonzero if INST is a branch of some kind, else return zero. */
static int static int
is_branch (inst) is_branch (unsigned long inst)
unsigned long inst;
{ {
switch (inst >> 26) switch (inst >> 26)
{ {
@ -3524,8 +3438,7 @@ is_branch (inst)
zero it INST does not save a GR. */ zero it INST does not save a GR. */
static int static int
inst_saves_gr (inst) inst_saves_gr (unsigned long inst)
unsigned long inst;
{ {
/* Does it look like a stw? */ /* Does it look like a stw? */
if ((inst >> 26) == 0x1a || (inst >> 26) == 0x1b if ((inst >> 26) == 0x1a || (inst >> 26) == 0x1b
@ -3564,8 +3477,7 @@ inst_saves_gr (inst)
FIXME: What about argument stores with the HP compiler in ANSI mode? */ FIXME: What about argument stores with the HP compiler in ANSI mode? */
static int static int
inst_saves_fr (inst) inst_saves_fr (unsigned long inst)
unsigned long inst;
{ {
/* is this an FSTD ? */ /* is this an FSTD ? */
if ((inst & 0xfc00dfc0) == 0x2c001200) if ((inst & 0xfc00dfc0) == 0x2c001200)
@ -3588,8 +3500,7 @@ inst_saves_fr (inst)
CORE_ADDR CORE_ADDR
skip_prologue_hard_way (pc) skip_prologue_hard_way (CORE_ADDR pc)
CORE_ADDR pc;
{ {
char buf[4]; char buf[4];
CORE_ADDR orig_pc = pc; CORE_ADDR orig_pc = pc;
@ -3821,8 +3732,7 @@ restart:
we can determine it from the debug symbols. Else return zero. */ we can determine it from the debug symbols. Else return zero. */
static CORE_ADDR static CORE_ADDR
after_prologue (pc) after_prologue (CORE_ADDR pc)
CORE_ADDR pc;
{ {
struct symtab_and_line sal; struct symtab_and_line sal;
CORE_ADDR func_addr, func_end; CORE_ADDR func_addr, func_end;
@ -3863,8 +3773,7 @@ after_prologue (pc)
stuff some day. */ stuff some day. */
CORE_ADDR CORE_ADDR
hppa_skip_prologue (pc) hppa_skip_prologue (CORE_ADDR pc)
CORE_ADDR pc;
{ {
unsigned long inst; unsigned long inst;
int offset; int offset;
@ -3896,9 +3805,8 @@ hppa_skip_prologue (pc)
the address we return for it IS the sp for the next frame. */ the address we return for it IS the sp for the next frame. */
void void
hppa_frame_find_saved_regs (frame_info, frame_saved_regs) hppa_frame_find_saved_regs (struct frame_info *frame_info,
struct frame_info *frame_info; struct frame_saved_regs *frame_saved_regs)
struct frame_saved_regs *frame_saved_regs;
{ {
CORE_ADDR pc; CORE_ADDR pc;
struct unwind_table_entry *u; struct unwind_table_entry *u;
@ -4185,7 +4093,7 @@ static struct symtab_and_line *break_callback_sal = 0;
0 => success 0 => success
1 => failure */ 1 => failure */
int int
setup_d_pid_in_inferior () setup_d_pid_in_inferior (void)
{ {
CORE_ADDR anaddr; CORE_ADDR anaddr;
struct minimal_symbol *msymbol; struct minimal_symbol *msymbol;
@ -4219,7 +4127,7 @@ setup_d_pid_in_inferior ()
1 => success */ 1 => success */
static int static int
initialize_hp_cxx_exception_support () initialize_hp_cxx_exception_support (void)
{ {
struct symtabs_and_lines sals; struct symtabs_and_lines sals;
struct cleanup *old_chain; struct cleanup *old_chain;
@ -4440,9 +4348,7 @@ initialize_hp_cxx_exception_support ()
address was found. */ address was found. */
struct symtab_and_line * struct symtab_and_line *
child_enable_exception_callback (kind, enable) child_enable_exception_callback (enum exception_event_kind kind, int enable)
enum exception_event_kind kind;
int enable;
{ {
char buf[4]; char buf[4];
@ -4532,7 +4438,7 @@ static struct symtab_and_line null_symtab_and_line =
and where it will be caught. More information may be reported and where it will be caught. More information may be reported
in the future */ in the future */
struct exception_event_record * struct exception_event_record *
child_get_current_exception_event () child_get_current_exception_event (void)
{ {
CORE_ADDR event_kind; CORE_ADDR event_kind;
CORE_ADDR throw_addr; CORE_ADDR throw_addr;
@ -4591,9 +4497,7 @@ child_get_current_exception_event ()
} }
static void static void
unwind_command (exp, from_tty) unwind_command (char *exp, int from_tty)
char *exp;
int from_tty;
{ {
CORE_ADDR address; CORE_ADDR address;
struct unwind_table_entry *u; struct unwind_table_entry *u;
@ -4698,7 +4602,7 @@ unwind_command (exp, from_tty)
here, that's what counts, as core gdb is the one which is here, that's what counts, as core gdb is the one which is
putting the BPT instruction in and taking it out. */ putting the BPT instruction in and taking it out. */
int int
hppa_prepare_to_proceed () hppa_prepare_to_proceed (void)
{ {
pid_t old_thread; pid_t old_thread;
pid_t current_thread; pid_t current_thread;
@ -4743,7 +4647,7 @@ hppa_prepare_to_proceed ()
#endif /* PREPARE_TO_PROCEED */ #endif /* PREPARE_TO_PROCEED */
void void
hppa_skip_permanent_breakpoint () hppa_skip_permanent_breakpoint (void)
{ {
/* To step over a breakpoint instruction on the PA takes some /* To step over a breakpoint instruction on the PA takes some
fiddling with the instruction address queue. fiddling with the instruction address queue.
@ -4767,7 +4671,7 @@ hppa_skip_permanent_breakpoint ()
} }
void void
_initialize_hppa_tdep () _initialize_hppa_tdep (void)
{ {
tm_print_insn = print_insn_hppa; tm_print_insn = print_insn_hppa;

View file

@ -50,8 +50,7 @@
/* Fetch one register. */ /* Fetch one register. */
static void static void
fetch_register (regno) fetch_register (int regno)
int regno;
{ {
register unsigned int regaddr; register unsigned int regaddr;
char buf[MAX_REGISTER_RAW_SIZE]; char buf[MAX_REGISTER_RAW_SIZE];
@ -87,8 +86,7 @@ error_exit:;
/* Fetch all registers, or just one, from the child process. */ /* Fetch all registers, or just one, from the child process. */
void void
fetch_inferior_registers (regno) fetch_inferior_registers (int regno)
int regno;
{ {
if (regno == -1) if (regno == -1)
for (regno = 0; regno < NUM_REGS; regno++) for (regno = 0; regno < NUM_REGS; regno++)
@ -102,8 +100,7 @@ fetch_inferior_registers (regno)
Otherwise, REGNO specifies which register (so we can save time). */ Otherwise, REGNO specifies which register (so we can save time). */
void void
store_inferior_registers (regno) store_inferior_registers (int regno)
int regno;
{ {
register unsigned int regaddr; register unsigned int regaddr;
char buf[80]; char buf[80];
@ -190,8 +187,7 @@ store_inferior_registers (regno)
#define PT_PROT 21 #define PT_PROT 21
int int
hppa_set_watchpoint (addr, len, flag) hppa_set_watchpoint (int addr, int len, int flag)
int addr, len, flag;
{ {
int pt_args[3]; int pt_args[3];
pt_args[0] = addr; pt_args[0] = addr;

View file

@ -36,8 +36,7 @@ extern CORE_ADDR text_end;
static void fetch_register (int); static void fetch_register (int);
void void
fetch_inferior_registers (regno) fetch_inferior_registers (int regno)
int regno;
{ {
if (regno == -1) if (regno == -1)
for (regno = 0; regno < NUM_REGS; regno++) for (regno = 0; regno < NUM_REGS; regno++)
@ -54,8 +53,7 @@ fetch_inferior_registers (regno)
Otherwise, REGNO specifies which register (so we can save time). */ Otherwise, REGNO specifies which register (so we can save time). */
void void
store_inferior_registers (regno) store_inferior_registers (int regno)
int regno;
{ {
register unsigned int regaddr; register unsigned int regaddr;
char buf[80]; char buf[80];
@ -178,8 +176,7 @@ store_inferior_registers (regno)
/* Fetch a register's value from the process's U area. */ /* Fetch a register's value from the process's U area. */
static void static void
fetch_register (regno) fetch_register (int regno)
int regno;
{ {
char buf[MAX_REGISTER_RAW_SIZE]; char buf[MAX_REGISTER_RAW_SIZE];
unsigned int addr, len, offset; unsigned int addr, len, offset;
@ -378,7 +375,7 @@ child_xfer_memory (memaddr, myaddr, len, write, target)
void void
child_post_follow_inferior_by_clone () child_post_follow_inferior_by_clone (void)
{ {
int status; int status;
@ -396,11 +393,8 @@ child_post_follow_inferior_by_clone ()
void void
child_post_follow_vfork (parent_pid, followed_parent, child_pid, followed_child) child_post_follow_vfork (int parent_pid, int followed_parent, int child_pid,
int parent_pid; int followed_child)
int followed_parent;
int child_pid;
int followed_child;
{ {
/* Are we a debugger that followed the parent of a vfork? If so, /* Are we a debugger that followed the parent of a vfork? If so,
then recall that the child's vfork event was delivered to us then recall that the child's vfork event was delivered to us
@ -438,8 +432,7 @@ child_post_follow_vfork (parent_pid, followed_parent, child_pid, followed_child)
/* Format a process id, given PID. Be sure to terminate /* Format a process id, given PID. Be sure to terminate
this with a null--it's going to be printed via a "%s". */ this with a null--it's going to be printed via a "%s". */
char * char *
child_pid_to_str (pid) child_pid_to_str (pid_t pid)
pid_t pid;
{ {
/* Static because address returned */ /* Static because address returned */
static char buf[30]; static char buf[30];
@ -456,8 +449,7 @@ child_pid_to_str (pid)
Note: This is a core-gdb tid, not the actual system tid. Note: This is a core-gdb tid, not the actual system tid.
See infttrace.c for details. */ See infttrace.c for details. */
char * char *
hppa_tid_to_str (tid) hppa_tid_to_str (pid_t tid)
pid_t tid;
{ {
/* Static because address returned */ /* Static because address returned */
static char buf[30]; static char buf[30];
@ -515,10 +507,7 @@ extern int parent_attach_all (int, PTRACE_ARG3_TYPE, int);
child_acknowledge_created_inferior.) */ child_acknowledge_created_inferior.) */
int int
parent_attach_all (pid, addr, data) parent_attach_all (int pid, PTRACE_ARG3_TYPE addr, int data)
int pid;
PTRACE_ARG3_TYPE addr;
int data;
{ {
int pt_status = 0; int pt_status = 0;
@ -555,8 +544,7 @@ parent_attach_all (pid, addr, data)
#endif #endif
int int
hppa_require_attach (pid) hppa_require_attach (int pid)
int pid;
{ {
int pt_status; int pt_status;
CORE_ADDR pc; CORE_ADDR pc;
@ -589,9 +577,7 @@ hppa_require_attach (pid)
} }
int int
hppa_require_detach (pid, signal) hppa_require_detach (int pid, int signal)
int pid;
int signal;
{ {
errno = 0; errno = 0;
call_ptrace (PT_DETACH, pid, (PTRACE_ARG3_TYPE) 1, signal); call_ptrace (PT_DETACH, pid, (PTRACE_ARG3_TYPE) 1, signal);
@ -604,58 +590,42 @@ hppa_require_detach (pid, signal)
dummy versions, which perform no useful work. */ dummy versions, which perform no useful work. */
void void
hppa_enable_page_protection_events (pid) hppa_enable_page_protection_events (int pid)
int pid;
{ {
} }
void void
hppa_disable_page_protection_events (pid) hppa_disable_page_protection_events (int pid)
int pid;
{ {
} }
int int
hppa_insert_hw_watchpoint (pid, start, len, type) hppa_insert_hw_watchpoint (int pid, CORE_ADDR start, LONGEST len, int type)
int pid;
CORE_ADDR start;
LONGEST len;
int type;
{ {
error ("Hardware watchpoints not implemented on this platform."); error ("Hardware watchpoints not implemented on this platform.");
} }
int int
hppa_remove_hw_watchpoint (pid, start, len, type) hppa_remove_hw_watchpoint (int pid, CORE_ADDR start, LONGEST len,
int pid; enum bptype type)
CORE_ADDR start;
LONGEST len;
enum bptype type;
{ {
error ("Hardware watchpoints not implemented on this platform."); error ("Hardware watchpoints not implemented on this platform.");
} }
int int
hppa_can_use_hw_watchpoint (type, cnt, ot) hppa_can_use_hw_watchpoint (enum bptype type, int cnt, enum bptype ot)
enum bptype type;
int cnt;
enum bptype ot;
{ {
return 0; return 0;
} }
int int
hppa_range_profitable_for_hw_watchpoint (pid, start, len) hppa_range_profitable_for_hw_watchpoint (int pid, CORE_ADDR start, LONGEST len)
int pid;
CORE_ADDR start;
LONGEST len;
{ {
error ("Hardware watchpoints not implemented on this platform."); error ("Hardware watchpoints not implemented on this platform.");
} }
char * char *
hppa_pid_or_tid_to_str (id) hppa_pid_or_tid_to_str (pid_t id)
pid_t id;
{ {
/* In the ptrace world, there are only processes. */ /* In the ptrace world, there are only processes. */
return child_pid_to_str (id); return child_pid_to_str (id);
@ -666,15 +636,13 @@ hppa_pid_or_tid_to_str (id)
hppa-tdep.c. */ hppa-tdep.c. */
pid_t pid_t
hppa_switched_threads (pid) hppa_switched_threads (pid_t pid)
pid_t pid;
{ {
return (pid_t) 0; return (pid_t) 0;
} }
void void
hppa_ensure_vforking_parent_remains_stopped (pid) hppa_ensure_vforking_parent_remains_stopped (int pid)
int pid;
{ {
/* This assumes that the vforked parent is presently stopped, and /* This assumes that the vforked parent is presently stopped, and
that the vforked child has just delivered its first exec event. that the vforked child has just delivered its first exec event.
@ -686,14 +654,13 @@ hppa_ensure_vforking_parent_remains_stopped (pid)
} }
int int
hppa_resume_execd_vforking_child_to_get_parent_vfork () hppa_resume_execd_vforking_child_to_get_parent_vfork (void)
{ {
return 1; /* Yes, the child must be resumed. */ return 1; /* Yes, the child must be resumed. */
} }
void void
require_notification_of_events (pid) require_notification_of_events (int pid)
int pid;
{ {
#if defined(PT_SET_EVENT_MASK) #if defined(PT_SET_EVENT_MASK)
int pt_status; int pt_status;
@ -758,8 +725,7 @@ require_notification_of_events (pid)
} }
void void
require_notification_of_exec_events (pid) require_notification_of_exec_events (int pid)
int pid;
{ {
#if defined(PT_SET_EVENT_MASK) #if defined(PT_SET_EVENT_MASK)
int pt_status; int pt_status;
@ -800,8 +766,7 @@ require_notification_of_exec_events (pid)
ID of the child process, after the debugger has forked. */ ID of the child process, after the debugger has forked. */
void void
child_acknowledge_created_inferior (pid) child_acknowledge_created_inferior (int pid)
int pid;
{ {
/* We need a memory home for a constant. */ /* We need a memory home for a constant. */
int tc_magic_parent = PT_VERSION; int tc_magic_parent = PT_VERSION;
@ -848,22 +813,19 @@ child_acknowledge_created_inferior (pid)
} }
void void
child_post_startup_inferior (pid) child_post_startup_inferior (int pid)
int pid;
{ {
require_notification_of_events (pid); require_notification_of_events (pid);
} }
void void
child_post_attach (pid) child_post_attach (int pid)
int pid;
{ {
require_notification_of_events (pid); require_notification_of_events (pid);
} }
int int
child_insert_fork_catchpoint (pid) child_insert_fork_catchpoint (int pid)
int pid;
{ {
/* This request is only available on HPUX 10.0 and later. */ /* This request is only available on HPUX 10.0 and later. */
#if !defined(PT_SET_EVENT_MASK) #if !defined(PT_SET_EVENT_MASK)
@ -877,8 +839,7 @@ child_insert_fork_catchpoint (pid)
} }
int int
child_remove_fork_catchpoint (pid) child_remove_fork_catchpoint (int pid)
int pid;
{ {
/* This request is only available on HPUX 10.0 and later. */ /* This request is only available on HPUX 10.0 and later. */
#if !defined(PT_SET_EVENT_MASK) #if !defined(PT_SET_EVENT_MASK)
@ -892,8 +853,7 @@ child_remove_fork_catchpoint (pid)
} }
int int
child_insert_vfork_catchpoint (pid) child_insert_vfork_catchpoint (int pid)
int pid;
{ {
/* This request is only available on HPUX 10.0 and later. */ /* This request is only available on HPUX 10.0 and later. */
#if !defined(PT_SET_EVENT_MASK) #if !defined(PT_SET_EVENT_MASK)
@ -907,8 +867,7 @@ child_insert_vfork_catchpoint (pid)
} }
int int
child_remove_vfork_catchpoint (pid) child_remove_vfork_catchpoint (int pid)
int pid;
{ {
/* This request is only available on HPUX 10.0 and later. */ /* This request is only available on HPUX 10.0 and later. */
#if !defined(PT_SET_EVENT_MASK) #if !defined(PT_SET_EVENT_MASK)
@ -922,9 +881,7 @@ child_remove_vfork_catchpoint (pid)
} }
int int
child_has_forked (pid, childpid) child_has_forked (int pid, int *childpid)
int pid;
int *childpid;
{ {
/* This request is only available on HPUX 10.0 and later. */ /* This request is only available on HPUX 10.0 and later. */
#if !defined(PT_GET_PROCESS_STATE) #if !defined(PT_GET_PROCESS_STATE)
@ -955,9 +912,7 @@ child_has_forked (pid, childpid)
} }
int int
child_has_vforked (pid, childpid) child_has_vforked (int pid, int *childpid)
int pid;
int *childpid;
{ {
/* This request is only available on HPUX 10.0 and later. */ /* This request is only available on HPUX 10.0 and later. */
#if !defined(PT_GET_PROCESS_STATE) #if !defined(PT_GET_PROCESS_STATE)
@ -989,15 +944,14 @@ child_has_vforked (pid, childpid)
} }
int int
child_can_follow_vfork_prior_to_exec () child_can_follow_vfork_prior_to_exec (void)
{ {
/* ptrace doesn't allow this. */ /* ptrace doesn't allow this. */
return 0; return 0;
} }
int int
child_insert_exec_catchpoint (pid) child_insert_exec_catchpoint (int pid)
int pid;
{ {
/* This request is only available on HPUX 10.0 and later. */ /* This request is only available on HPUX 10.0 and later. */
#if !defined(PT_SET_EVENT_MASK) #if !defined(PT_SET_EVENT_MASK)
@ -1012,8 +966,7 @@ child_insert_exec_catchpoint (pid)
} }
int int
child_remove_exec_catchpoint (pid) child_remove_exec_catchpoint (int pid)
int pid;
{ {
/* This request is only available on HPUX 10.0 and later. */ /* This request is only available on HPUX 10.0 and later. */
#if !defined(PT_SET_EVENT_MASK) #if !defined(PT_SET_EVENT_MASK)
@ -1028,9 +981,7 @@ child_remove_exec_catchpoint (pid)
} }
int int
child_has_execd (pid, execd_pathname) child_has_execd (int pid, char **execd_pathname)
int pid;
char **execd_pathname;
{ {
/* This request is only available on HPUX 10.0 and later. */ /* This request is only available on HPUX 10.0 and later. */
#if !defined(PT_GET_PROCESS_STATE) #if !defined(PT_GET_PROCESS_STATE)
@ -1063,16 +1014,13 @@ child_has_execd (pid, execd_pathname)
} }
int int
child_reported_exec_events_per_exec_call () child_reported_exec_events_per_exec_call (void)
{ {
return 2; /* ptrace reports the event twice per call. */ return 2; /* ptrace reports the event twice per call. */
} }
int int
child_has_syscall_event (pid, kind, syscall_id) child_has_syscall_event (int pid, enum target_waitkind *kind, int *syscall_id)
int pid;
enum target_waitkind *kind;
int *syscall_id;
{ {
/* This request is only available on HPUX 10.30 and later, via /* This request is only available on HPUX 10.30 and later, via
the ttrace interface. */ the ttrace interface. */
@ -1083,8 +1031,7 @@ child_has_syscall_event (pid, kind, syscall_id)
} }
char * char *
child_pid_to_exec_file (pid) child_pid_to_exec_file (int pid)
int pid;
{ {
static char exec_file_buffer[1024]; static char exec_file_buffer[1024];
int pt_status; int pt_status;
@ -1150,7 +1097,7 @@ child_pid_to_exec_file (pid)
} }
void void
pre_fork_inferior () pre_fork_inferior (void)
{ {
int status; int status;
@ -1176,8 +1123,7 @@ pre_fork_inferior ()
return "TRUE". */ return "TRUE". */
int int
child_thread_alive (pid) child_thread_alive (int pid)
int pid;
{ {
return 1; return 1;
} }

View file

@ -37,8 +37,7 @@
*/ */
void void
fetch_inferior_registers (regno) fetch_inferior_registers (int regno)
int regno;
{ {
kern_return_t ret; kern_return_t ret;
thread_state_data_t state; thread_state_data_t state;
@ -76,8 +75,7 @@ fetch_inferior_registers (regno)
* On mach3 all registers are always saved in one call. * On mach3 all registers are always saved in one call.
*/ */
void void
store_inferior_registers (regno) store_inferior_registers (int regno)
int regno;
{ {
kern_return_t ret; kern_return_t ret;
thread_state_data_t state; thread_state_data_t state;

View file

@ -213,8 +213,7 @@ static int hpread_has_name (enum dntt_entry_type);
FIXME, there should be a cleaner peephole into the BFD environment here. */ FIXME, there should be a cleaner peephole into the BFD environment here. */
void void
hpread_symfile_init (objfile) hpread_symfile_init (struct objfile *objfile)
struct objfile *objfile;
{ {
asection *vt_section, *slt_section, *lntt_section, *gntt_section; asection *vt_section, *slt_section, *lntt_section, *gntt_section;
@ -301,9 +300,7 @@ hpread_symfile_init (objfile)
table (as opposed to a shared lib or dynamically loaded file). */ table (as opposed to a shared lib or dynamically loaded file). */
void void
hpread_build_psymtabs (objfile, mainline) hpread_build_psymtabs (struct objfile *objfile, int mainline)
struct objfile *objfile;
int mainline;
{ {
char *namestring; char *namestring;
int past_first_source_file = 0; int past_first_source_file = 0;
@ -626,8 +623,7 @@ hpread_build_psymtabs (objfile, mainline)
objfile struct from the global list of known objfiles. */ objfile struct from the global list of known objfiles. */
void void
hpread_symfile_finish (objfile) hpread_symfile_finish (struct objfile *objfile)
struct objfile *objfile;
{ {
if (objfile->sym_private != NULL) if (objfile->sym_private != NULL)
{ {
@ -641,27 +637,21 @@ hpread_symfile_finish (objfile)
/* Various small functions to get entries in the debug symbol sections. */ /* Various small functions to get entries in the debug symbol sections. */
static union dnttentry * static union dnttentry *
hpread_get_lntt (index, objfile) hpread_get_lntt (int index, struct objfile *objfile)
int index;
struct objfile *objfile;
{ {
return (union dnttentry *) return (union dnttentry *)
&(LNTT (objfile)[(index * sizeof (struct dntt_type_block))]); &(LNTT (objfile)[(index * sizeof (struct dntt_type_block))]);
} }
static union dnttentry * static union dnttentry *
hpread_get_gntt (index, objfile) hpread_get_gntt (int index, struct objfile *objfile)
int index;
struct objfile *objfile;
{ {
return (union dnttentry *) return (union dnttentry *)
&(GNTT (objfile)[(index * sizeof (struct dntt_type_block))]); &(GNTT (objfile)[(index * sizeof (struct dntt_type_block))]);
} }
static union sltentry * static union sltentry *
hpread_get_slt (index, objfile) hpread_get_slt (int index, struct objfile *objfile)
int index;
struct objfile *objfile;
{ {
return (union sltentry *) &(SLT (objfile)[index * sizeof (union sltentry)]); return (union sltentry *) &(SLT (objfile)[index * sizeof (union sltentry)]);
} }
@ -672,10 +662,7 @@ hpread_get_slt (index, objfile)
the existance of DNTT_TYPE_FUNCTION symbols. */ the existance of DNTT_TYPE_FUNCTION symbols. */
static unsigned long static unsigned long
hpread_get_textlow (global, index, objfile) hpread_get_textlow (int global, int index, struct objfile *objfile)
int global;
int index;
struct objfile *objfile;
{ {
union dnttentry *dn_bufp; union dnttentry *dn_bufp;
struct minimal_symbol *msymbol; struct minimal_symbol *msymbol;
@ -708,9 +695,7 @@ hpread_get_textlow (global, index, objfile)
/* Get the nesting depth for the source line identified by INDEX. */ /* Get the nesting depth for the source line identified by INDEX. */
static unsigned long static unsigned long
hpread_get_depth (index, objfile) hpread_get_depth (sltpointer index, struct objfile *objfile)
sltpointer index;
struct objfile *objfile;
{ {
union sltentry *sl_bufp; union sltentry *sl_bufp;
@ -721,9 +706,7 @@ hpread_get_depth (index, objfile)
/* Get the source line number the the line identified by INDEX. */ /* Get the source line number the the line identified by INDEX. */
static unsigned long static unsigned long
hpread_get_line (index, objfile) hpread_get_line (sltpointer index, struct objfile *objfile)
sltpointer index;
struct objfile *objfile;
{ {
union sltentry *sl_bufp; union sltentry *sl_bufp;
@ -732,9 +715,7 @@ hpread_get_line (index, objfile)
} }
static CORE_ADDR static CORE_ADDR
hpread_get_location (index, objfile) hpread_get_location (sltpointer index, struct objfile *objfile)
sltpointer index;
struct objfile *objfile;
{ {
union sltentry *sl_bufp; union sltentry *sl_bufp;
int i; int i;
@ -763,8 +744,7 @@ hpread_get_location (index, objfile)
it, else return 0. */ it, else return 0. */
static int static int
hpread_has_name (kind) hpread_has_name (enum dntt_entry_type kind)
enum dntt_entry_type kind;
{ {
switch (kind) switch (kind)
{ {
@ -815,14 +795,10 @@ hpread_has_name (kind)
(normal). */ (normal). */
static struct partial_symtab * static struct partial_symtab *
hpread_start_psymtab (objfile, filename, textlow, ldsymoff, global_syms, hpread_start_psymtab (struct objfile *objfile, char *filename,
static_syms) CORE_ADDR textlow, int ldsymoff,
struct objfile *objfile; struct partial_symbol **global_syms,
char *filename; struct partial_symbol **static_syms)
CORE_ADDR textlow;
int ldsymoff;
struct partial_symbol **global_syms;
struct partial_symbol **static_syms;
{ {
struct partial_symtab *result = struct partial_symtab *result =
start_psymtab_common (objfile, section_offsets, start_psymtab_common (objfile, section_offsets,
@ -843,15 +819,11 @@ hpread_start_psymtab (objfile, filename, textlow, ldsymoff, global_syms,
FIXME: List variables and peculiarities of same. */ FIXME: List variables and peculiarities of same. */
static struct partial_symtab * static struct partial_symtab *
hpread_end_psymtab (pst, include_list, num_includes, capping_symbol_offset, hpread_end_psymtab (struct partial_symtab *pst, char **include_list,
capping_text, dependency_list, number_dependencies) int num_includes, int capping_symbol_offset,
struct partial_symtab *pst; CORE_ADDR capping_text,
char **include_list; struct partial_symtab **dependency_list,
int num_includes; int number_dependencies)
int capping_symbol_offset;
CORE_ADDR capping_text;
struct partial_symtab **dependency_list;
int number_dependencies;
{ {
int i; int i;
struct objfile *objfile = pst->objfile; struct objfile *objfile = pst->objfile;
@ -941,8 +913,7 @@ hpread_end_psymtab (pst, include_list, num_includes, capping_symbol_offset,
table. */ table. */
static void static void
hpread_psymtab_to_symtab_1 (pst) hpread_psymtab_to_symtab_1 (struct partial_symtab *pst)
struct partial_symtab *pst;
{ {
struct cleanup *old_chain; struct cleanup *old_chain;
int i; int i;
@ -1000,8 +971,7 @@ hpread_psymtab_to_symtab_1 (pst)
Be verbose about it if the user wants that. */ Be verbose about it if the user wants that. */
static void static void
hpread_psymtab_to_symtab (pst) hpread_psymtab_to_symtab (struct partial_symtab *pst)
struct partial_symtab *pst;
{ {
/* Get out quick if given junk. */ /* Get out quick if given junk. */
if (!pst) if (!pst)
@ -1048,15 +1018,9 @@ hpread_psymtab_to_symtab (pst)
SECTION_OFFSETS are the relocation offsets which get added to each symbol. */ SECTION_OFFSETS are the relocation offsets which get added to each symbol. */
static struct symtab * static struct symtab *
hpread_expand_symtab (objfile, sym_offset, sym_size, text_offset, text_size, hpread_expand_symtab (struct objfile *objfile, int sym_offset, int sym_size,
section_offsets, filename) CORE_ADDR text_offset, int text_size,
struct objfile *objfile; struct section_offsets *section_offsets, char *filename)
int sym_offset;
int sym_size;
CORE_ADDR text_offset;
int text_size;
struct section_offsets *section_offsets;
char *filename;
{ {
char *namestring; char *namestring;
union dnttentry *dn_bufp; union dnttentry *dn_bufp;
@ -1107,8 +1071,7 @@ hpread_expand_symtab (objfile, sym_offset, sym_size, text_offset, text_size,
/* Convert basic types from HP debug format into GDB internal format. */ /* Convert basic types from HP debug format into GDB internal format. */
static int static int
hpread_type_translate (typep) hpread_type_translate (dnttpointer typep)
dnttpointer typep;
{ {
if (!typep.dntti.immediate) if (!typep.dntti.immediate)
abort (); abort ();
@ -1180,9 +1143,7 @@ hpread_type_translate (typep)
/* Return the type associated with the index found in HP_TYPE. */ /* Return the type associated with the index found in HP_TYPE. */
static struct type ** static struct type **
hpread_lookup_type (hp_type, objfile) hpread_lookup_type (dnttpointer hp_type, struct objfile *objfile)
dnttpointer hp_type;
struct objfile *objfile;
{ {
unsigned old_len; unsigned old_len;
int index = hp_type.dnttp.index; int index = hp_type.dnttp.index;
@ -1223,9 +1184,7 @@ hpread_lookup_type (hp_type, objfile)
have it lying around. */ have it lying around. */
static struct type * static struct type *
hpread_alloc_type (hp_type, objfile) hpread_alloc_type (dnttpointer hp_type, struct objfile *objfile)
dnttpointer hp_type;
struct objfile *objfile;
{ {
struct type **type_addr; struct type **type_addr;
@ -1241,10 +1200,8 @@ hpread_alloc_type (hp_type, objfile)
/* Read a native enumerated type and return it in GDB internal form. */ /* Read a native enumerated type and return it in GDB internal form. */
static struct type * static struct type *
hpread_read_enum_type (hp_type, dn_bufp, objfile) hpread_read_enum_type (dnttpointer hp_type, union dnttentry *dn_bufp,
dnttpointer hp_type; struct objfile *objfile)
union dnttentry *dn_bufp;
struct objfile *objfile;
{ {
struct type *type; struct type *type;
struct pending **symlist, *osyms, *syms; struct pending **symlist, *osyms, *syms;
@ -1320,10 +1277,8 @@ hpread_read_enum_type (hp_type, dn_bufp, objfile)
/* Read and internalize a native function debug symbol. */ /* Read and internalize a native function debug symbol. */
static struct type * static struct type *
hpread_read_function_type (hp_type, dn_bufp, objfile) hpread_read_function_type (dnttpointer hp_type, union dnttentry *dn_bufp,
dnttpointer hp_type; struct objfile *objfile)
union dnttentry *dn_bufp;
struct objfile *objfile;
{ {
struct type *type, *type1; struct type *type, *type1;
struct pending **symlist, *osyms, *syms; struct pending **symlist, *osyms, *syms;
@ -1430,10 +1385,8 @@ hpread_read_function_type (hp_type, dn_bufp, objfile)
/* Read in and internalize a structure definition. */ /* Read in and internalize a structure definition. */
static struct type * static struct type *
hpread_read_struct_type (hp_type, dn_bufp, objfile) hpread_read_struct_type (dnttpointer hp_type, union dnttentry *dn_bufp,
dnttpointer hp_type; struct objfile *objfile)
union dnttentry *dn_bufp;
struct objfile *objfile;
{ {
struct nextfield struct nextfield
{ {
@ -1510,10 +1463,8 @@ hpread_read_struct_type (hp_type, dn_bufp, objfile)
/* Read in and internalize a set debug symbol. */ /* Read in and internalize a set debug symbol. */
static struct type * static struct type *
hpread_read_set_type (hp_type, dn_bufp, objfile) hpread_read_set_type (dnttpointer hp_type, union dnttentry *dn_bufp,
dnttpointer hp_type; struct objfile *objfile)
union dnttentry *dn_bufp;
struct objfile *objfile;
{ {
struct type *type; struct type *type;
@ -1534,10 +1485,8 @@ hpread_read_set_type (hp_type, dn_bufp, objfile)
/* Read in and internalize an array debug symbol. */ /* Read in and internalize an array debug symbol. */
static struct type * static struct type *
hpread_read_array_type (hp_type, dn_bufp, objfile) hpread_read_array_type (dnttpointer hp_type, union dnttentry *dn_bufp,
dnttpointer hp_type; struct objfile *objfile)
union dnttentry *dn_bufp;
struct objfile *objfile;
{ {
struct type *type; struct type *type;
union dnttentry save; union dnttentry save;
@ -1576,10 +1525,8 @@ hpread_read_array_type (hp_type, dn_bufp, objfile)
/* Read in and internalize a subrange debug symbol. */ /* Read in and internalize a subrange debug symbol. */
static struct type * static struct type *
hpread_read_subrange_type (hp_type, dn_bufp, objfile) hpread_read_subrange_type (dnttpointer hp_type, union dnttentry *dn_bufp,
dnttpointer hp_type; struct objfile *objfile)
union dnttentry *dn_bufp;
struct objfile *objfile;
{ {
struct type *type; struct type *type;
@ -1611,9 +1558,7 @@ hpread_read_subrange_type (hp_type, dn_bufp, objfile)
} }
static struct type * static struct type *
hpread_type_lookup (hp_type, objfile) hpread_type_lookup (dnttpointer hp_type, struct objfile *objfile)
dnttpointer hp_type;
struct objfile *objfile;
{ {
union dnttentry *dn_bufp; union dnttentry *dn_bufp;
@ -1729,11 +1674,9 @@ hpread_type_lookup (hp_type, objfile)
} }
static sltpointer static sltpointer
hpread_record_lines (subfile, s_idx, e_idx, objfile, offset) hpread_record_lines (struct subfile *subfile, sltpointer s_idx,
struct subfile *subfile; sltpointer e_idx, struct objfile *objfile,
sltpointer s_idx, e_idx; CORE_ADDR offset)
struct objfile *objfile;
CORE_ADDR offset;
{ {
union sltentry *sl_bufp; union sltentry *sl_bufp;
@ -1753,16 +1696,10 @@ hpread_record_lines (subfile, s_idx, e_idx, objfile, offset)
/* Internalize one native debug symbol. */ /* Internalize one native debug symbol. */
static void static void
hpread_process_one_debug_symbol (dn_bufp, name, section_offsets, objfile, hpread_process_one_debug_symbol (union dnttentry *dn_bufp, char *name,
text_offset, text_size, filename, index) struct section_offsets *section_offsets,
union dnttentry *dn_bufp; struct objfile *objfile, CORE_ADDR text_offset,
char *name; int text_size, char *filename, int index)
struct section_offsets *section_offsets;
struct objfile *objfile;
CORE_ADDR text_offset;
int text_size;
char *filename;
int index;
{ {
unsigned long desc; unsigned long desc;
int type; int type;

View file

@ -100,14 +100,13 @@ static struct target_ops hpux_thread_ops;
static struct cleanup * static struct cleanup *
save_inferior_pid () save_inferior_pid (void)
{ {
return make_cleanup (restore_inferior_pid, inferior_pid); return make_cleanup (restore_inferior_pid, inferior_pid);
} }
static void static void
restore_inferior_pid (pid) restore_inferior_pid (int pid)
int pid;
{ {
inferior_pid = pid; inferior_pid = pid;
} }
@ -119,7 +118,7 @@ static int cached_active_thread;
static cma__t_int_tcb cached_tcb; static cma__t_int_tcb cached_tcb;
static int static int
find_active_thread () find_active_thread (void)
{ {
static cma__t_int_tcb tcb; static cma__t_int_tcb tcb;
CORE_ADDR tcb_ptr; CORE_ADDR tcb_ptr;
@ -139,8 +138,7 @@ find_active_thread ()
static cma__t_int_tcb *find_tcb (int thread); static cma__t_int_tcb *find_tcb (int thread);
static cma__t_int_tcb * static cma__t_int_tcb *
find_tcb (thread) find_tcb (int thread)
int thread;
{ {
cma__t_known_object queue_header; cma__t_known_object queue_header;
cma__t_queue *queue_ptr; cma__t_queue *queue_ptr;
@ -179,9 +177,7 @@ find_tcb (thread)
/* ARGSUSED */ /* ARGSUSED */
static void static void
hpux_thread_open (arg, from_tty) hpux_thread_open (char *arg, int from_tty)
char *arg;
int from_tty;
{ {
child_ops.to_open (arg, from_tty); child_ops.to_open (arg, from_tty);
} }
@ -190,9 +186,7 @@ hpux_thread_open (arg, from_tty)
and wait for the trace-trap that results from attaching. */ and wait for the trace-trap that results from attaching. */
static void static void
hpux_thread_attach (args, from_tty) hpux_thread_attach (char *args, int from_tty)
char *args;
int from_tty;
{ {
child_ops.to_attach (args, from_tty); child_ops.to_attach (args, from_tty);
@ -208,9 +202,7 @@ hpux_thread_attach (args, from_tty)
started via the normal ptrace (PTRACE_TRACEME). */ started via the normal ptrace (PTRACE_TRACEME). */
static void static void
hpux_thread_detach (args, from_tty) hpux_thread_detach (char *args, int from_tty)
char *args;
int from_tty;
{ {
child_ops.to_detach (args, from_tty); child_ops.to_detach (args, from_tty);
} }
@ -221,10 +213,7 @@ hpux_thread_detach (args, from_tty)
for procfs. */ for procfs. */
static void static void
hpux_thread_resume (pid, step, signo) hpux_thread_resume (int pid, int step, enum target_signal signo)
int pid;
int step;
enum target_signal signo;
{ {
struct cleanup *old_chain; struct cleanup *old_chain;
@ -253,9 +242,7 @@ hpux_thread_resume (pid, step, signo)
to a LWP id, and vice versa on the way out. */ to a LWP id, and vice versa on the way out. */
static int static int
hpux_thread_wait (pid, ourstatus) hpux_thread_wait (int pid, struct target_waitstatus *ourstatus)
int pid;
struct target_waitstatus *ourstatus;
{ {
int rtnval; int rtnval;
struct cleanup *old_chain; struct cleanup *old_chain;
@ -303,8 +290,7 @@ static char regmap[NUM_REGS] =
}; };
static void static void
hpux_thread_fetch_registers (regno) hpux_thread_fetch_registers (int regno)
int regno;
{ {
cma__t_int_tcb tcb, *tcb_ptr; cma__t_int_tcb tcb, *tcb_ptr;
struct cleanup *old_chain; struct cleanup *old_chain;
@ -366,8 +352,7 @@ hpux_thread_fetch_registers (regno)
} }
static void static void
hpux_thread_store_registers (regno) hpux_thread_store_registers (int regno)
int regno;
{ {
cma__t_int_tcb tcb, *tcb_ptr; cma__t_int_tcb tcb, *tcb_ptr;
struct cleanup *old_chain; struct cleanup *old_chain;
@ -442,7 +427,7 @@ hpux_thread_store_registers (regno)
debugged. */ debugged. */
static void static void
hpux_thread_prepare_to_store () hpux_thread_prepare_to_store (void)
{ {
child_ops.to_prepare_to_store (); child_ops.to_prepare_to_store ();
} }
@ -472,21 +457,19 @@ hpux_thread_xfer_memory (memaddr, myaddr, len, dowrite, target)
/* Print status information about what we're accessing. */ /* Print status information about what we're accessing. */
static void static void
hpux_thread_files_info (ignore) hpux_thread_files_info (struct target_ops *ignore)
struct target_ops *ignore;
{ {
child_ops.to_files_info (ignore); child_ops.to_files_info (ignore);
} }
static void static void
hpux_thread_kill_inferior () hpux_thread_kill_inferior (void)
{ {
child_ops.to_kill (); child_ops.to_kill ();
} }
static void static void
hpux_thread_notice_signals (pid) hpux_thread_notice_signals (int pid)
int pid;
{ {
child_ops.to_notice_signals (pid); child_ops.to_notice_signals (pid);
} }
@ -494,10 +477,7 @@ hpux_thread_notice_signals (pid)
/* Fork an inferior process, and start debugging it with /proc. */ /* Fork an inferior process, and start debugging it with /proc. */
static void static void
hpux_thread_create_inferior (exec_file, allargs, env) hpux_thread_create_inferior (char *exec_file, char *allargs, char **env)
char *exec_file;
char *allargs;
char **env;
{ {
child_ops.to_create_inferior (exec_file, allargs, env); child_ops.to_create_inferior (exec_file, allargs, env);
@ -527,8 +507,7 @@ hpux_thread_create_inferior (exec_file, allargs, env)
static void (*target_new_objfile_chain) (struct objfile *); static void (*target_new_objfile_chain) (struct objfile *);
void void
hpux_thread_new_objfile (objfile) hpux_thread_new_objfile (struct objfile *objfile)
struct objfile *objfile;
{ {
struct minimal_symbol *ms; struct minimal_symbol *ms;
@ -562,7 +541,7 @@ quit:
/* Clean up after the inferior dies. */ /* Clean up after the inferior dies. */
static void static void
hpux_thread_mourn_inferior () hpux_thread_mourn_inferior (void)
{ {
child_ops.to_mourn_inferior (); child_ops.to_mourn_inferior ();
} }
@ -570,20 +549,19 @@ hpux_thread_mourn_inferior ()
/* Mark our target-struct as eligible for stray "run" and "attach" commands. */ /* Mark our target-struct as eligible for stray "run" and "attach" commands. */
static int static int
hpux_thread_can_run () hpux_thread_can_run (void)
{ {
return child_suppress_run; return child_suppress_run;
} }
static int static int
hpux_thread_alive (pid) hpux_thread_alive (int pid)
int pid;
{ {
return 1; return 1;
} }
static void static void
hpux_thread_stop () hpux_thread_stop (void)
{ {
child_ops.to_stop (); child_ops.to_stop ();
} }
@ -591,8 +569,7 @@ hpux_thread_stop ()
/* Convert a pid to printable form. */ /* Convert a pid to printable form. */
char * char *
hpux_pid_to_str (pid) hpux_pid_to_str (int pid)
int pid;
{ {
static char buf[100]; static char buf[100];
@ -602,7 +579,7 @@ hpux_pid_to_str (pid)
} }
static void static void
init_hpux_thread_ops () init_hpux_thread_ops (void)
{ {
hpux_thread_ops.to_shortname = "hpux-threads"; hpux_thread_ops.to_shortname = "hpux-threads";
hpux_thread_ops.to_longname = "HPUX threads and pthread."; hpux_thread_ops.to_longname = "HPUX threads and pthread.";
@ -641,7 +618,7 @@ init_hpux_thread_ops ()
} }
void void
_initialize_hpux_thread () _initialize_hpux_thread (void)
{ {
init_hpux_thread_ops (); init_hpux_thread_ops ();
add_target (&hpux_thread_ops); add_target (&hpux_thread_ops);

View file

@ -146,8 +146,7 @@ int have_ptrace_getxfpregs =
/* Fetch one register. */ /* Fetch one register. */
static void static void
fetch_register (regno) fetch_register (int regno)
int regno;
{ {
/* This isn't really an address. But ptrace thinks of it as one. */ /* This isn't really an address. But ptrace thinks of it as one. */
CORE_ADDR regaddr; CORE_ADDR regaddr;
@ -192,8 +191,7 @@ fetch_register (regno)
Otherwise, REGNO specifies which register (so we can save time). */ Otherwise, REGNO specifies which register (so we can save time). */
void void
old_fetch_inferior_registers (regno) old_fetch_inferior_registers (int regno)
int regno;
{ {
if (regno >= 0) if (regno >= 0)
{ {
@ -216,8 +214,7 @@ old_fetch_inferior_registers (regno)
/* Store one register. */ /* Store one register. */
static void static void
store_register (regno) store_register (int regno)
int regno;
{ {
/* This isn't really an address. But ptrace thinks of it as one. */ /* This isn't really an address. But ptrace thinks of it as one. */
CORE_ADDR regaddr; CORE_ADDR regaddr;
@ -258,8 +255,7 @@ store_register (regno)
Otherwise, REGNO specifies which register (so we can save time). */ Otherwise, REGNO specifies which register (so we can save time). */
void void
old_store_inferior_registers (regno) old_store_inferior_registers (int regno)
int regno;
{ {
if (regno >= 0) if (regno >= 0)
{ {
@ -1151,7 +1147,7 @@ static struct core_fns linux_elf_core_fns =
}; };
void void
_initialize_i386_linux_nat () _initialize_i386_linux_nat (void)
{ {
add_core_fns (&linux_elf_core_fns); add_core_fns (&linux_elf_core_fns);
} }

View file

@ -449,7 +449,7 @@ static char remcomOutBuffer[BUFMAX];
/* scan for the sequence $<data>#<checksum> */ /* scan for the sequence $<data>#<checksum> */
unsigned char * unsigned char *
getpacket () getpacket (void)
{ {
unsigned char *buffer = &remcomInBuffer[0]; unsigned char *buffer = &remcomInBuffer[0];
unsigned char checksum; unsigned char checksum;
@ -562,7 +562,7 @@ static void (*volatile mem_fault_routine)() = NULL;
static volatile int mem_err = 0; static volatile int mem_err = 0;
void void
set_mem_err () set_mem_err (void)
{ {
mem_err = 1; mem_err = 1;
} }
@ -572,16 +572,13 @@ set_mem_err ()
to mem_fault, they won't get restored, so there better not be any to mem_fault, they won't get restored, so there better not be any
saved). */ saved). */
int int
get_char (addr) get_char (char *addr)
char *addr;
{ {
return *addr; return *addr;
} }
void void
set_char (addr, val) set_char (char *addr, int val)
char *addr;
int val;
{ {
*addr = val; *addr = val;
} }

View file

@ -123,8 +123,7 @@ static int codestream_cnt;
codestream_fill(0) : codestream_buf[codestream_off++]) codestream_fill(0) : codestream_buf[codestream_off++])
static unsigned char static unsigned char
codestream_fill (peek_flag) codestream_fill (int peek_flag)
int peek_flag;
{ {
codestream_addr = codestream_next_addr; codestream_addr = codestream_next_addr;
codestream_next_addr += CODESTREAM_BUFSIZ; codestream_next_addr += CODESTREAM_BUFSIZ;
@ -139,8 +138,7 @@ codestream_fill (peek_flag)
} }
static void static void
codestream_seek (place) codestream_seek (CORE_ADDR place)
CORE_ADDR place;
{ {
codestream_next_addr = place / CODESTREAM_BUFSIZ; codestream_next_addr = place / CODESTREAM_BUFSIZ;
codestream_next_addr *= CODESTREAM_BUFSIZ; codestream_next_addr *= CODESTREAM_BUFSIZ;
@ -151,9 +149,7 @@ codestream_seek (place)
} }
static void static void
codestream_read (buf, count) codestream_read (unsigned char *buf, int count)
unsigned char *buf;
int count;
{ {
unsigned char *p; unsigned char *p;
int i; int i;
@ -165,7 +161,7 @@ codestream_read (buf, count)
/* next instruction is a jump, move to target */ /* next instruction is a jump, move to target */
static void static void
i386_follow_jump () i386_follow_jump (void)
{ {
unsigned char buf[4]; unsigned char buf[4];
long delta; long delta;
@ -223,8 +219,7 @@ i386_follow_jump ()
*/ */
static long static long
i386_get_frame_setup (pc) i386_get_frame_setup (CORE_ADDR pc)
CORE_ADDR pc;
{ {
unsigned char op; unsigned char op;
@ -375,8 +370,7 @@ i386_get_frame_setup (pc)
Can return -1, meaning no way to tell. */ Can return -1, meaning no way to tell. */
int int
i386_frame_num_args (fi) i386_frame_num_args (struct frame_info *fi)
struct frame_info *fi;
{ {
#if 1 #if 1
return -1; return -1;
@ -477,8 +471,7 @@ i386_frame_num_args (fi)
*/ */
void void
i386_frame_init_saved_regs (fip) i386_frame_init_saved_regs (struct frame_info *fip)
struct frame_info *fip;
{ {
long locals = -1; long locals = -1;
unsigned char op; unsigned char op;
@ -539,8 +532,7 @@ i386_frame_init_saved_regs (fip)
/* return pc of first real instruction */ /* return pc of first real instruction */
int int
i386_skip_prologue (pc) i386_skip_prologue (int pc)
int pc;
{ {
unsigned char op; unsigned char op;
int i; int i;
@ -621,7 +613,7 @@ i386_skip_prologue (pc)
} }
void void
i386_push_dummy_frame () i386_push_dummy_frame (void)
{ {
CORE_ADDR sp = read_register (SP_REGNUM); CORE_ADDR sp = read_register (SP_REGNUM);
int regnum; int regnum;
@ -659,7 +651,7 @@ i386_fix_call_dummy (char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs,
} }
void void
i386_pop_frame () i386_pop_frame (void)
{ {
struct frame_info *frame = get_current_frame (); struct frame_info *frame = get_current_frame ();
CORE_ADDR fp; CORE_ADDR fp;
@ -694,8 +686,7 @@ i386_pop_frame ()
This routine returns true on success. */ This routine returns true on success. */
int int
get_longjmp_target (pc) get_longjmp_target (CORE_ADDR *pc)
CORE_ADDR *pc;
{ {
char buf[TARGET_PTR_BIT / TARGET_CHAR_BIT]; char buf[TARGET_PTR_BIT / TARGET_CHAR_BIT];
CORE_ADDR sp, jb_addr; CORE_ADDR sp, jb_addr;
@ -814,8 +805,7 @@ i386_register_convert_to_raw (struct type *type, int regnum,
for all three variants of SVR4 sigtramps. */ for all three variants of SVR4 sigtramps. */
CORE_ADDR CORE_ADDR
i386v4_sigtramp_saved_pc (frame) i386v4_sigtramp_saved_pc (struct frame_info *frame)
struct frame_info *frame;
{ {
CORE_ADDR saved_pc_offset = 4; CORE_ADDR saved_pc_offset = 4;
char *name = NULL; char *name = NULL;
@ -843,8 +833,7 @@ i386v4_sigtramp_saved_pc (frame)
it is done for C too. */ it is done for C too. */
char * char *
sunpro_static_transform_name (name) sunpro_static_transform_name (char *name)
char *name;
{ {
char *p; char *p;
if (IS_STATIC_TRANSFORM_NAME (name)) if (IS_STATIC_TRANSFORM_NAME (name))
@ -869,9 +858,7 @@ sunpro_static_transform_name (name)
/* Stuff for WIN32 PE style DLL's but is pretty generic really. */ /* Stuff for WIN32 PE style DLL's but is pretty generic really. */
CORE_ADDR CORE_ADDR
skip_trampoline_code (pc, name) skip_trampoline_code (CORE_ADDR pc, char *name)
CORE_ADDR pc;
char *name;
{ {
if (pc && read_memory_unsigned_integer (pc, 2) == 0x25ff) /* jmp *(dest) */ if (pc && read_memory_unsigned_integer (pc, 2) == 0x25ff) /* jmp *(dest) */
{ {
@ -891,9 +878,7 @@ skip_trampoline_code (pc, name)
} }
static int static int
gdb_print_insn_i386 (memaddr, info) gdb_print_insn_i386 (bfd_vma memaddr, disassemble_info *info)
bfd_vma memaddr;
disassemble_info *info;
{ {
if (disassembly_flavor == att_flavor) if (disassembly_flavor == att_flavor)
return print_insn_i386_att (memaddr, info); return print_insn_i386_att (memaddr, info);
@ -909,16 +894,14 @@ gdb_print_insn_i386 (memaddr, info)
command, and does that. */ command, and does that. */
static void static void
set_disassembly_flavor_sfunc (args, from_tty, c) set_disassembly_flavor_sfunc (char *args, int from_tty,
char *args; struct cmd_list_element *c)
int from_tty;
struct cmd_list_element *c;
{ {
set_disassembly_flavor (); set_disassembly_flavor ();
} }
static void static void
set_disassembly_flavor () set_disassembly_flavor (void)
{ {
if (disassembly_flavor == att_flavor) if (disassembly_flavor == att_flavor)
set_architecture_from_arch_mach (bfd_arch_i386, bfd_mach_i386_i386); set_architecture_from_arch_mach (bfd_arch_i386, bfd_mach_i386_i386);
@ -928,7 +911,7 @@ set_disassembly_flavor ()
void void
_initialize_i386_tdep () _initialize_i386_tdep (void)
{ {
/* Initialize the table saying where each register starts in the /* Initialize the table saying where each register starts in the
register file. */ register file. */

View file

@ -70,9 +70,7 @@ static int regmap[] =
*/ */
int int
i386_register_u_addr (blockend, regnum) i386_register_u_addr (int blockend, int regnum)
int blockend;
int regnum;
{ {
#if 0 #if 0
/* this will be needed if fp registers are reinstated */ /* this will be needed if fp registers are reinstated */
@ -115,9 +113,7 @@ struct env387
}; };
static static
print_387_status (status, ep) print_387_status (unsigned short status, struct env387 *ep)
unsigned short status;
struct env387 *ep;
{ {
int i; int i;
int bothstatus; int bothstatus;
@ -183,7 +179,7 @@ print_387_status (status, ep)
static struct env387 core_env387; static struct env387 core_env387;
void void
i386_float_info () i386_float_info (void)
{ {
struct env387 fps; struct env387 fps;
int fpsaved = 0; int fpsaved = 0;
@ -232,8 +228,7 @@ i386_float_info ()
/* Fetch one register. */ /* Fetch one register. */
static void static void
fetch_register (regno) fetch_register (int regno)
int regno;
{ {
char buf[MAX_REGISTER_RAW_SIZE]; char buf[MAX_REGISTER_RAW_SIZE];
if (regno < FP0_REGNUM) if (regno < FP0_REGNUM)
@ -246,8 +241,7 @@ fetch_register (regno)
} }
void void
fetch_inferior_registers (regno) fetch_inferior_registers (int regno)
int regno;
{ {
if (regno < 0) if (regno < 0)
for (regno = 0; regno < NUM_REGS; regno++) for (regno = 0; regno < NUM_REGS; regno++)
@ -258,8 +252,7 @@ fetch_inferior_registers (regno)
/* store one register */ /* store one register */
static void static void
store_register (regno) store_register (int regno)
int regno;
{ {
char buf[80]; char buf[80];
errno = 0; errno = 0;
@ -281,8 +274,7 @@ store_register (regno)
If REGNO is -1, do this for all registers. If REGNO is -1, do this for all registers.
Otherwise, REGNO specifies which register (so we can save time). */ Otherwise, REGNO specifies which register (so we can save time). */
void void
store_inferior_registers (regno) store_inferior_registers (int regno)
int regno;
{ {
if (regno < 0) if (regno < 0)
for (regno = 0; regno < NUM_REGS; regno++) for (regno = 0; regno < NUM_REGS; regno++)
@ -366,7 +358,7 @@ static struct core_fns i386aix_core_fns =
}; };
void void
_initialize_core_i386aix () _initialize_core_i386aix (void)
{ {
add_core_fns (&i386aix_core_fns); add_core_fns (&i386aix_core_fns);
} }

View file

@ -29,8 +29,7 @@
#include "gdbcore.h" /* for registers_fetched() */ #include "gdbcore.h" /* for registers_fetched() */
void void
fetch_inferior_registers (regno) fetch_inferior_registers (int regno)
int regno;
{ {
struct reg inferior_registers; struct reg inferior_registers;
@ -40,8 +39,7 @@ fetch_inferior_registers (regno)
} }
void void
store_inferior_registers (regno) store_inferior_registers (int regno)
int regno;
{ {
struct reg inferior_registers; struct reg inferior_registers;
@ -56,11 +54,8 @@ struct md_core
}; };
void void
fetch_core_registers (core_reg_sect, core_reg_size, which, ignore) fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, int which,
char *core_reg_sect; CORE_ADDR ignore)
unsigned core_reg_size;
int which;
CORE_ADDR ignore;
{ {
struct md_core *core_reg = (struct md_core *) core_reg_sect; struct md_core *core_reg = (struct md_core *) core_reg_sect;
@ -108,9 +103,7 @@ static int sregmap[] =
place where ES is stored. */ place where ES is stored. */
int int
i386_register_u_addr (blockend, regnum) i386_register_u_addr (int blockend, int regnum)
int blockend;
int regnum;
{ {
/* The following condition is a kludge to get at the proper register map /* The following condition is a kludge to get at the proper register map
depending upon the state of pcb_flag. depending upon the state of pcb_flag.
@ -174,9 +167,7 @@ struct env387
}; };
static void static void
print_387_status (status, ep) print_387_status (unsigned short status, struct env387 *ep)
unsigned short status;
struct env387 *ep;
{ {
int i; int i;
int bothstatus; int bothstatus;
@ -239,7 +230,7 @@ print_387_status (status, ep)
} }
} }
i386_float_info () i386_float_info (void)
{ {
struct user u; /* just for address computations */ struct user u; /* just for address computations */
int i; int i;
@ -288,7 +279,7 @@ i386_float_info ()
} }
int int
kernel_u_size () kernel_u_size (void)
{ {
return (sizeof (struct user)); return (sizeof (struct user));
} }

View file

@ -30,8 +30,7 @@
system calls use a different calling sequence. */ system calls use a different calling sequence. */
CORE_ADDR CORE_ADDR
i386lynx_saved_pc_after_call (frame) i386lynx_saved_pc_after_call (struct frame_info *frame)
struct frame_info *frame;
{ {
char opcode[7]; char opcode[7];
static const unsigned char call_inst[] = static const unsigned char call_inst[] =

View file

@ -101,8 +101,7 @@ static int reg_offset[] =
*/ */
void void
fetch_inferior_registers (regno) fetch_inferior_registers (int regno)
int regno;
{ {
kern_return_t ret; kern_return_t ret;
thread_state_data_t state; thread_state_data_t state;
@ -147,8 +146,7 @@ fetch_inferior_registers (regno)
* On mach3 all registers are always saved in one call. * On mach3 all registers are always saved in one call.
*/ */
void void
store_inferior_registers (regno) store_inferior_registers (int regno)
int regno;
{ {
kern_return_t ret; kern_return_t ret;
thread_state_data_t state; thread_state_data_t state;
@ -221,9 +219,7 @@ store_inferior_registers (regno)
*/ */
CORE_ADDR CORE_ADDR
register_addr (regno, blockend) register_addr (int regno, CORE_ADDR blockend)
int regno;
CORE_ADDR blockend;
{ {
CORE_ADDR addr; CORE_ADDR addr;
@ -261,9 +257,7 @@ struct env387
* Should move it to i387-tdep.c but you need to export struct env387 * Should move it to i387-tdep.c but you need to export struct env387
*/ */
private private
print_387_status (status, ep) print_387_status (unsigned short status, struct env387 *ep)
unsigned short status;
struct env387 *ep;
{ {
int i; int i;
int bothstatus; int bothstatus;
@ -358,8 +352,7 @@ typedef struct fpstate
/* Mach 3 specific routines. /* Mach 3 specific routines.
*/ */
private boolean_t private boolean_t
get_i387_state (fstate) get_i387_state (struct fpstate *fstate)
struct fpstate *fstate;
{ {
kern_return_t ret; kern_return_t ret;
thread_state_data_t state; thread_state_data_t state;
@ -396,8 +389,7 @@ get_i387_state (fstate)
} }
private boolean_t private boolean_t
get_i387_core_state (fstate) get_i387_core_state (struct fpstate *fstate)
struct fpstate *fstate;
{ {
/* Not implemented yet. Core files do not contain float state. */ /* Not implemented yet. Core files do not contain float state. */
return FALSE; return FALSE;
@ -407,7 +399,7 @@ get_i387_core_state (fstate)
* This is called by "info float" command * This is called by "info float" command
*/ */
void void
i386_mach3_float_info () i386_mach3_float_info (void)
{ {
char buf[sizeof (struct fpstate) + 2 * sizeof (int)]; char buf[sizeof (struct fpstate) + 2 * sizeof (int)];
boolean_t valid = FALSE; boolean_t valid = FALSE;

View file

@ -68,8 +68,7 @@ fetch_inferior_registers (regno)
Otherwise, REGNO specifies which register (so we can save time). */ Otherwise, REGNO specifies which register (so we can save time). */
void void
store_inferior_registers (regno) store_inferior_registers (int regno)
int regno;
{ {
struct regs inferior_registers; struct regs inferior_registers;
struct fp_state inferior_fp_registers; struct fp_state inferior_fp_registers;
@ -156,7 +155,7 @@ static struct core_fns i386mach_core_fns =
}; };
void void
_initialize_core_i386mach () _initialize_core_i386mach (void)
{ {
add_core_fns (&i386mach_core_fns); add_core_fns (&i386mach_core_fns);
} }

View file

@ -51,8 +51,7 @@ struct env387
}; };
void void
fetch_inferior_registers (regno) fetch_inferior_registers (int regno)
int regno;
{ {
struct reg inferior_registers; struct reg inferior_registers;
struct env387 inferior_fpregisters; struct env387 inferior_fpregisters;
@ -101,8 +100,7 @@ fetch_inferior_registers (regno)
} }
void void
store_inferior_registers (regno) store_inferior_registers (int regno)
int regno;
{ {
struct reg inferior_registers; struct reg inferior_registers;
struct env387 inferior_fpregisters; struct env387 inferior_fpregisters;
@ -165,11 +163,8 @@ struct md_core
}; };
static void static void
fetch_core_registers (core_reg_sect, core_reg_size, which, ignore) fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, int which,
char *core_reg_sect; CORE_ADDR ignore)
unsigned core_reg_size;
int which;
CORE_ADDR ignore;
{ {
struct md_core *core_reg = (struct md_core *) core_reg_sect; struct md_core *core_reg = (struct md_core *) core_reg_sect;
@ -212,7 +207,7 @@ static struct core_fns i386nbsd_core_fns =
}; };
void void
_initialize_i386nbsd_nat () _initialize_i386nbsd_nat (void)
{ {
add_core_fns (&i386nbsd_core_fns); add_core_fns (&i386nbsd_core_fns);
} }

View file

@ -87,9 +87,7 @@ static int regmap[] =
*/ */
int int
i386_register_u_addr (blockend, regnum) i386_register_u_addr (int blockend, int regnum)
int blockend;
int regnum;
{ {
struct user u; struct user u;
int fpstate; int fpstate;
@ -116,7 +114,7 @@ i386_register_u_addr (blockend, regnum)
} }
int int
kernel_u_size () kernel_u_size (void)
{ {
return (sizeof (struct user)); return (sizeof (struct user));
} }
@ -142,22 +140,14 @@ i386_insert_nonaligned_watchpoint (int, CORE_ADDR, CORE_ADDR, int, int);
/* Insert a watchpoint. */ /* Insert a watchpoint. */
int int
i386_insert_watchpoint (pid, addr, len, rw) i386_insert_watchpoint (int pid, CORE_ADDR addr, int len, int rw)
int pid;
CORE_ADDR addr;
int len;
int rw;
{ {
return i386_insert_aligned_watchpoint (pid, addr, addr, len, rw); return i386_insert_aligned_watchpoint (pid, addr, addr, len, rw);
} }
static int static int
i386_insert_aligned_watchpoint (pid, waddr, addr, len, rw) i386_insert_aligned_watchpoint (int pid, CORE_ADDR waddr, CORE_ADDR addr,
int pid; int len, int rw)
CORE_ADDR waddr;
CORE_ADDR addr;
int len;
int rw;
{ {
int i; int i;
int read_write_bits, len_bits; int read_write_bits, len_bits;
@ -216,12 +206,8 @@ i386_insert_aligned_watchpoint (pid, waddr, addr, len, rw)
} }
static int static int
i386_insert_nonaligned_watchpoint (pid, waddr, addr, len, rw) i386_insert_nonaligned_watchpoint (int pid, CORE_ADDR waddr, CORE_ADDR addr,
int pid; int len, int rw)
CORE_ADDR waddr;
CORE_ADDR addr;
int len;
int rw;
{ {
int align; int align;
int size; int size;
@ -257,10 +243,7 @@ i386_insert_nonaligned_watchpoint (pid, waddr, addr, len, rw)
/* Remove a watchpoint. */ /* Remove a watchpoint. */
int int
i386_remove_watchpoint (pid, addr, len) i386_remove_watchpoint (int pid, CORE_ADDR addr, int len)
int pid;
CORE_ADDR addr;
int len;
{ {
int i; int i;
int register_number; int register_number;
@ -285,8 +268,7 @@ i386_remove_watchpoint (pid, addr, len)
/* Check if stopped by a watchpoint. */ /* Check if stopped by a watchpoint. */
CORE_ADDR CORE_ADDR
i386_stopped_by_watchpoint (pid) i386_stopped_by_watchpoint (int pid)
int pid;
{ {
int i; int i;
int status; int status;

View file

@ -112,8 +112,7 @@ void fill_fpregset (fpregset_t *, int);
register values. */ register values. */
void void
supply_gregset (gregsetp) supply_gregset (gregset_t *gregsetp)
gregset_t *gregsetp;
{ {
register int regi; register int regi;
register greg_t *regp = (greg_t *) gregsetp; register greg_t *regp = (greg_t *) gregsetp;
@ -126,9 +125,7 @@ supply_gregset (gregsetp)
} }
void void
fill_gregset (gregsetp, regno) fill_gregset (gregset_t *gregsetp, int regno)
gregset_t *gregsetp;
int regno;
{ {
int regi; int regi;
register greg_t *regp = (greg_t *) gregsetp; register greg_t *regp = (greg_t *) gregsetp;
@ -176,8 +173,7 @@ static const int freg_offset_map[] =
}; };
void void
supply_fpregset (fpregsetp) supply_fpregset (fpregset_t *fpregsetp)
fpregset_t *fpregsetp;
{ {
int regi; int regi;
@ -212,9 +208,7 @@ supply_fpregset (fpregsetp)
them all. */ them all. */
void void
fill_fpregset (fpregsetp, regno) fill_fpregset (fpregset_t *fpregsetp, int regno)
fpregset_t *fpregsetp;
int regno;
{ {
int regi; int regi;

View file

@ -34,17 +34,13 @@ void i387_to_double (char *from, char *to);
void double_to_i387 (char *from, char *to); void double_to_i387 (char *from, char *to);
void void
i387_to_double (from, to) i387_to_double (char *from, char *to)
char *from;
char *to;
{ {
floatformat_to_double (&floatformat_i387_ext, from, (double *) to); floatformat_to_double (&floatformat_i387_ext, from, (double *) to);
} }
void void
double_to_i387 (from, to) double_to_i387 (char *from, char *to)
char *from;
char *to;
{ {
floatformat_from_double (&floatformat_i387_ext, (double *) from, to); floatformat_from_double (&floatformat_i387_ext, (double *) from, to);
} }
@ -60,8 +56,7 @@ static void print_387_control_bits (unsigned int control);
static void print_387_status_bits (unsigned int status); static void print_387_status_bits (unsigned int status);
static void static void
print_387_control_bits (control) print_387_control_bits (unsigned int control)
unsigned int control;
{ {
switch ((control >> 8) & 3) switch ((control >> 8) & 3)
{ {
@ -117,8 +112,7 @@ print_387_control_bits (control)
} }
void void
print_387_control_word (control) print_387_control_word (unsigned int control)
unsigned int control;
{ {
printf_filtered ("control %s:", local_hex_string(control & 0xffff)); printf_filtered ("control %s:", local_hex_string(control & 0xffff));
print_387_control_bits (control); print_387_control_bits (control);
@ -126,8 +120,7 @@ print_387_control_word (control)
} }
static void static void
print_387_status_bits (status) print_387_status_bits (unsigned int status)
unsigned int status;
{ {
printf_unfiltered (" flags %d%d%d%d; ", printf_unfiltered (" flags %d%d%d%d; ",
(status & 0x4000) != 0, (status & 0x4000) != 0,
@ -149,8 +142,7 @@ print_387_status_bits (status)
} }
void void
print_387_status_word (status) print_387_status_word (unsigned int status)
unsigned int status;
{ {
printf_filtered ("status %s:", local_hex_string (status & 0xffff)); printf_filtered ("status %s:", local_hex_string (status & 0xffff));
print_387_status_bits (status); print_387_status_bits (status);

View file

@ -47,9 +47,7 @@ static CORE_ADDR next_insn (CORE_ADDR memaddr,
If it's more than 16 bytes long, g13 pointed to it on entry. */ If it's more than 16 bytes long, g13 pointed to it on entry. */
int int
i960_use_struct_convention (gcc_p, type) i960_use_struct_convention (int gcc_p, struct type *type)
int gcc_p;
struct type *type;
{ {
return (TYPE_LENGTH (type) > 16); return (TYPE_LENGTH (type) > 16);
} }
@ -58,7 +56,7 @@ i960_use_struct_convention (gcc_p, type)
This routine must be called as part of gdb initialization. */ This routine must be called as part of gdb initialization. */
static void static void
check_host () check_host (void)
{ {
int i; int i;
@ -170,11 +168,8 @@ check_host ()
(((addr) < (lim)) ? next_insn (addr, pword1, pword2) : 0) (((addr) < (lim)) ? next_insn (addr, pword1, pword2) : 0)
static CORE_ADDR static CORE_ADDR
examine_prologue (ip, limit, frame_addr, fsr) examine_prologue (register CORE_ADDR ip, register CORE_ADDR limit,
register CORE_ADDR ip; CORE_ADDR frame_addr, struct frame_saved_regs *fsr)
register CORE_ADDR limit;
CORE_ADDR frame_addr;
struct frame_saved_regs *fsr;
{ {
register CORE_ADDR next_ip; register CORE_ADDR next_ip;
register int src, dst; register int src, dst;
@ -359,9 +354,7 @@ CORE_ADDR (ip);
fairly expensive. */ fairly expensive. */
void void
frame_find_saved_regs (fi, fsr) frame_find_saved_regs (struct frame_info *fi, struct frame_saved_regs *fsr)
struct frame_info *fi;
struct frame_saved_regs *fsr;
{ {
register CORE_ADDR next_addr; register CORE_ADDR next_addr;
register CORE_ADDR *saved_regs; register CORE_ADDR *saved_regs;
@ -427,8 +420,7 @@ frame_find_saved_regs (fi, fsr)
described by FI. Returns 0 if the address is unknown. */ described by FI. Returns 0 if the address is unknown. */
CORE_ADDR CORE_ADDR
frame_args_address (fi, must_be_correct) frame_args_address (struct frame_info *fi, int must_be_correct)
struct frame_info *fi;
{ {
struct frame_saved_regs fsr; struct frame_saved_regs fsr;
CORE_ADDR ap; CORE_ADDR ap;
@ -459,8 +451,7 @@ frame_args_address (fi, must_be_correct)
described by FI. Returns 0 if the address is unknown. */ described by FI. Returns 0 if the address is unknown. */
CORE_ADDR CORE_ADDR
frame_struct_result_address (fi) frame_struct_result_address (struct frame_info *fi)
struct frame_info *fi;
{ {
struct frame_saved_regs fsr; struct frame_saved_regs fsr;
CORE_ADDR ap; CORE_ADDR ap;
@ -551,8 +542,7 @@ leafproc_return (ip)
unless the function is a leaf procedure. */ unless the function is a leaf procedure. */
CORE_ADDR CORE_ADDR
saved_pc_after_call (frame) saved_pc_after_call (struct frame_info *frame)
struct frame_info *frame;
{ {
CORE_ADDR saved_pc; CORE_ADDR saved_pc;
@ -620,8 +610,7 @@ i960_pop_frame (void)
corresponds. */ corresponds. */
enum target_signal enum target_signal
i960_fault_to_signal (fault) i960_fault_to_signal (int fault)
int fault;
{ {
switch (fault) switch (fault)
{ {
@ -794,9 +783,7 @@ mem (memaddr, word1, word2, noprint)
'pword2'. */ 'pword2'. */
static CORE_ADDR static CORE_ADDR
next_insn (memaddr, pword1, pword2) next_insn (CORE_ADDR memaddr, unsigned int *pword1, unsigned int *pword2)
unsigned int *pword1, *pword2;
CORE_ADDR memaddr;
{ {
int len; int len;
char buf[8]; char buf[8];
@ -852,9 +839,7 @@ next_insn (memaddr, pword1, pword2)
they display this frame. */ they display this frame. */
int int
mon960_frame_chain_valid (chain, curframe) mon960_frame_chain_valid (CORE_ADDR chain, struct frame_info *curframe)
CORE_ADDR chain;
struct frame_info *curframe;
{ {
struct symbol *sym; struct symbol *sym;
struct minimal_symbol *msymbol; struct minimal_symbol *msymbol;
@ -898,7 +883,7 @@ mon960_frame_chain_valid (chain, curframe)
void void
_initialize_i960_tdep () _initialize_i960_tdep (void)
{ {
check_host (); check_host ();

View file

@ -296,9 +296,7 @@ static int u_offsets[] =
}; };
CORE_ADDR CORE_ADDR
register_addr (regno, blockend) register_addr (int regno, CORE_ADDR blockend)
int regno;
CORE_ADDR blockend;
{ {
CORE_ADDR addr; CORE_ADDR addr;
@ -356,8 +354,7 @@ int ia64_cannot_store_register (regno)
} }
void void
supply_gregset (gregsetp) supply_gregset (gregset_t *gregsetp)
gregset_t *gregsetp;
{ {
int regi; int regi;
greg_t *regp = (greg_t *) gregsetp; greg_t *regp = (greg_t *) gregsetp;
@ -393,9 +390,7 @@ supply_gregset (gregsetp)
} }
void void
fill_gregset (gregsetp, regno) fill_gregset (gregset_t *gregsetp, int regno)
gregset_t *gregsetp;
int regno;
{ {
int regi; int regi;
greg_t *regp = (greg_t *) gregsetp; greg_t *regp = (greg_t *) gregsetp;
@ -439,8 +434,7 @@ fill_gregset (gregsetp, regno)
idea of the current floating point register values. */ idea of the current floating point register values. */
void void
supply_fpregset (fpregsetp) supply_fpregset (fpregset_t *fpregsetp)
fpregset_t *fpregsetp;
{ {
register int regi; register int regi;
char *from; char *from;
@ -458,9 +452,7 @@ supply_fpregset (fpregsetp)
them all. */ them all. */
void void
fill_fpregset (fpregsetp, regno) fill_fpregset (fpregset_t *fpregsetp, int regno)
fpregset_t *fpregsetp;
int regno;
{ {
int regi; int regi;
char *to; char *to;

View file

@ -564,9 +564,7 @@ ia64_memory_remove_breakpoint (CORE_ADDR addr, char *contents_cache)
/* We don't really want to use this, but remote.c needs to call it in order /* We don't really want to use this, but remote.c needs to call it in order
to figure out if Z-packets are supported or not. Oh, well. */ to figure out if Z-packets are supported or not. Oh, well. */
unsigned char * unsigned char *
ia64_breakpoint_from_pc (pcptr, lenptr) ia64_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
CORE_ADDR *pcptr;
int *lenptr;
{ {
static unsigned char breakpoint[] = static unsigned char breakpoint[] =
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };

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