Protoization.
This commit is contained in:
parent
29e6d33b03
commit
fba45db2fa
284 changed files with 5720 additions and 13265 deletions
|
@ -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>
|
||||
|
||||
* sh-tdep.c (sh_gdbarch_init): For sh4 initialize
|
||||
|
|
|
@ -46,9 +46,7 @@ static CORE_ADDR rstack_high_address = UINT_MAX;
|
|||
/* Should call_function allocate stack space for a struct return? */
|
||||
/* On the a29k objects over 16 words require the caller to allocate space. */
|
||||
int
|
||||
a29k_use_struct_convention (gcc_p, type)
|
||||
int gcc_p;
|
||||
struct type *type;
|
||||
a29k_use_struct_convention (int gcc_p, struct type *type)
|
||||
{
|
||||
return (TYPE_LENGTH (type) > 16 * 4);
|
||||
}
|
||||
|
@ -83,11 +81,7 @@ struct prologue_info
|
|||
frame pointer is being used. */
|
||||
|
||||
CORE_ADDR
|
||||
examine_prologue (pc, rsize, msize, mfp_used)
|
||||
CORE_ADDR pc;
|
||||
unsigned *msize;
|
||||
unsigned *rsize;
|
||||
int *mfp_used;
|
||||
examine_prologue (CORE_ADDR pc, unsigned *rsize, unsigned *msize, int *mfp_used)
|
||||
{
|
||||
long insn;
|
||||
CORE_ADDR p = pc;
|
||||
|
@ -338,8 +332,7 @@ done:
|
|||
to reach some "real" code. */
|
||||
|
||||
CORE_ADDR
|
||||
a29k_skip_prologue (pc)
|
||||
CORE_ADDR pc;
|
||||
a29k_skip_prologue (CORE_ADDR pc)
|
||||
{
|
||||
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 */
|
||||
examine_tag (p, is_trans, argcount, msize, mfp_used)
|
||||
CORE_ADDR p;
|
||||
int *is_trans;
|
||||
int *argcount;
|
||||
unsigned *msize;
|
||||
int *mfp_used;
|
||||
examine_tag (CORE_ADDR p, int *is_trans, int *argcount, unsigned *msize,
|
||||
int *mfp_used)
|
||||
{
|
||||
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. */
|
||||
|
||||
static void
|
||||
init_frame_info (innermost_frame, frame)
|
||||
int innermost_frame;
|
||||
struct frame_info *frame;
|
||||
init_frame_info (int innermost_frame, struct frame_info *frame)
|
||||
{
|
||||
CORE_ADDR p;
|
||||
long insn;
|
||||
|
@ -505,8 +492,7 @@ init_frame_info (innermost_frame, frame)
|
|||
}
|
||||
|
||||
void
|
||||
init_extra_frame_info (frame)
|
||||
struct frame_info *frame;
|
||||
init_extra_frame_info (struct frame_info *frame)
|
||||
{
|
||||
if (frame->next == 0)
|
||||
/* Assume innermost frame. May produce strange results for "info frame"
|
||||
|
@ -521,9 +507,7 @@ init_extra_frame_info (frame)
|
|||
}
|
||||
|
||||
void
|
||||
init_frame_pc (fromleaf, frame)
|
||||
int fromleaf;
|
||||
struct frame_info *frame;
|
||||
init_frame_pc (int fromleaf, struct frame_info *frame)
|
||||
{
|
||||
frame->pc = (fromleaf ? SAVED_PC_AFTER_CALL (frame->next) :
|
||||
frame->next ? FRAME_SAVED_PC (frame->next) : read_pc ());
|
||||
|
@ -535,8 +519,7 @@ init_frame_pc (fromleaf, frame)
|
|||
saved_msp (gcc). */
|
||||
|
||||
CORE_ADDR
|
||||
frame_locals_address (fi)
|
||||
struct frame_info *fi;
|
||||
frame_locals_address (struct frame_info *fi)
|
||||
{
|
||||
if (fi->flags & MFP_USED)
|
||||
return fi->saved_msp;
|
||||
|
@ -556,11 +539,8 @@ frame_locals_address (fi)
|
|||
on where it came from. The contents written into MYADDR are in
|
||||
target format. */
|
||||
void
|
||||
read_register_stack (memaddr, myaddr, actual_mem_addr, lval)
|
||||
CORE_ADDR memaddr;
|
||||
char *myaddr;
|
||||
CORE_ADDR *actual_mem_addr;
|
||||
enum lval_type *lval;
|
||||
read_register_stack (CORE_ADDR memaddr, char *myaddr,
|
||||
CORE_ADDR *actual_mem_addr, enum lval_type *lval)
|
||||
{
|
||||
long rfb = read_register (RFB_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
|
||||
except the length is understood to be 4. */
|
||||
long
|
||||
read_register_stack_integer (memaddr, len)
|
||||
CORE_ADDR memaddr;
|
||||
int len;
|
||||
read_register_stack_integer (CORE_ADDR memaddr, int len)
|
||||
{
|
||||
char buf[4];
|
||||
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
|
||||
*ACTUAL_MEM_ADDR. */
|
||||
static void
|
||||
write_register_stack (memaddr, myaddr, actual_mem_addr)
|
||||
CORE_ADDR memaddr;
|
||||
char *myaddr;
|
||||
CORE_ADDR *actual_mem_addr;
|
||||
write_register_stack (CORE_ADDR memaddr, char *myaddr,
|
||||
CORE_ADDR *actual_mem_addr)
|
||||
{
|
||||
long rfb = read_register (RFB_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. */
|
||||
|
||||
void
|
||||
a29k_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lvalp)
|
||||
char *raw_buffer;
|
||||
int *optimized;
|
||||
CORE_ADDR *addrp;
|
||||
struct frame_info *frame;
|
||||
int regnum;
|
||||
enum lval_type *lvalp;
|
||||
a29k_get_saved_register (char *raw_buffer, int *optimized, CORE_ADDR *addrp,
|
||||
struct frame_info *frame, int regnum,
|
||||
enum lval_type *lvalp)
|
||||
{
|
||||
struct frame_info *fi;
|
||||
CORE_ADDR addr;
|
||||
|
@ -762,7 +734,7 @@ a29k_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lvalp)
|
|||
restoring all saved registers. */
|
||||
|
||||
void
|
||||
pop_frame ()
|
||||
pop_frame (void)
|
||||
{
|
||||
struct frame_info *frame = get_current_frame ();
|
||||
CORE_ADDR rfb = read_register (RFB_REGNUM);
|
||||
|
@ -825,7 +797,7 @@ pop_frame ()
|
|||
/* Push an empty stack frame, to record the current PC, etc. */
|
||||
|
||||
void
|
||||
push_dummy_frame ()
|
||||
push_dummy_frame (void)
|
||||
{
|
||||
long w;
|
||||
CORE_ADDR rab, gr1;
|
||||
|
@ -910,9 +882,7 @@ push_dummy_frame ()
|
|||
good job. */
|
||||
|
||||
struct frame_info *
|
||||
setup_arbitrary_frame (argc, argv)
|
||||
int argc;
|
||||
CORE_ADDR *argv;
|
||||
setup_arbitrary_frame (int argc, CORE_ADDR *argv)
|
||||
{
|
||||
struct frame_info *frame;
|
||||
|
||||
|
@ -939,9 +909,7 @@ setup_arbitrary_frame (argc, argv)
|
|||
}
|
||||
|
||||
int
|
||||
gdb_print_insn_a29k (memaddr, info)
|
||||
bfd_vma memaddr;
|
||||
disassemble_info *info;
|
||||
gdb_print_insn_a29k (bfd_vma memaddr, disassemble_info *info)
|
||||
{
|
||||
if (TARGET_BYTE_ORDER == BIG_ENDIAN)
|
||||
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;
|
||||
|
||||
void
|
||||
a29k_get_processor_type ()
|
||||
a29k_get_processor_type (void)
|
||||
{
|
||||
unsigned int cfg_reg = (unsigned int) read_register (CFG_REGNUM);
|
||||
|
||||
|
@ -1002,8 +970,7 @@ a29k_get_processor_type ()
|
|||
This routine returns true on success */
|
||||
|
||||
int
|
||||
get_longjmp_target (pc)
|
||||
CORE_ADDR *pc;
|
||||
get_longjmp_target (CORE_ADDR *pc)
|
||||
{
|
||||
CORE_ADDR jb_addr;
|
||||
char buf[sizeof (CORE_ADDR)];
|
||||
|
@ -1020,7 +987,7 @@ get_longjmp_target (pc)
|
|||
#endif /* GET_LONGJMP_TARGET */
|
||||
|
||||
void
|
||||
_initialize_a29k_tdep ()
|
||||
_initialize_a29k_tdep (void)
|
||||
{
|
||||
extern CORE_ADDR text_end;
|
||||
|
||||
|
|
|
@ -30,8 +30,7 @@
|
|||
extern int errno;
|
||||
|
||||
void
|
||||
fetch_inferior_registers (ignored)
|
||||
int ignored;
|
||||
fetch_inferior_registers (int ignored)
|
||||
{
|
||||
struct ptrace_$data_regs_m68k inferior_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). */
|
||||
|
||||
void
|
||||
store_inferior_registers (regno)
|
||||
int regno;
|
||||
store_inferior_registers (int regno)
|
||||
{
|
||||
struct ptrace_$data_regs_m68k inferior_registers;
|
||||
struct ptrace_$floating_regs_m68k inferior_fp_registers;
|
||||
|
|
|
@ -31,11 +31,7 @@
|
|||
static void abug_open (char *args, int from_tty);
|
||||
|
||||
static void
|
||||
abug_supply_register (regname, regnamelen, val, vallen)
|
||||
char *regname;
|
||||
int regnamelen;
|
||||
char *val;
|
||||
int vallen;
|
||||
abug_supply_register (char *regname, int regnamelen, char *val, int vallen)
|
||||
{
|
||||
int regno;
|
||||
|
||||
|
@ -148,15 +144,13 @@ init_abug_cmds (void)
|
|||
};
|
||||
|
||||
static void
|
||||
abug_open (args, from_tty)
|
||||
char *args;
|
||||
int from_tty;
|
||||
abug_open (char *args, int from_tty)
|
||||
{
|
||||
monitor_open (args, &abug_cmds, from_tty);
|
||||
}
|
||||
|
||||
void
|
||||
_initialize_abug_rom ()
|
||||
_initialize_abug_rom (void)
|
||||
{
|
||||
init_abug_cmds ();
|
||||
init_monitor_ops (&abug_ops);
|
||||
|
|
|
@ -55,8 +55,7 @@ static void fetch_elf_core_registers (char *, unsigned, int, CORE_ADDR);
|
|||
This routine returns true on success. */
|
||||
|
||||
int
|
||||
get_longjmp_target (pc)
|
||||
CORE_ADDR *pc;
|
||||
get_longjmp_target (CORE_ADDR *pc)
|
||||
{
|
||||
CORE_ADDR jb_addr;
|
||||
char raw_buffer[MAX_REGISTER_RAW_SIZE];
|
||||
|
@ -85,11 +84,8 @@ get_longjmp_target (pc)
|
|||
*/
|
||||
|
||||
static void
|
||||
fetch_osf_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
|
||||
char *core_reg_sect;
|
||||
unsigned core_reg_size;
|
||||
int which;
|
||||
CORE_ADDR reg_addr;
|
||||
fetch_osf_core_registers (char *core_reg_sect, unsigned core_reg_size,
|
||||
int which, CORE_ADDR reg_addr)
|
||||
{
|
||||
register int regno;
|
||||
register int addr;
|
||||
|
@ -138,11 +134,8 @@ fetch_osf_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
|
|||
}
|
||||
|
||||
static void
|
||||
fetch_elf_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
|
||||
char *core_reg_sect;
|
||||
unsigned core_reg_size;
|
||||
int which;
|
||||
CORE_ADDR reg_addr;
|
||||
fetch_elf_core_registers (char *core_reg_sect, unsigned core_reg_size,
|
||||
int which, CORE_ADDR reg_addr)
|
||||
{
|
||||
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. */
|
||||
|
||||
CORE_ADDR
|
||||
register_addr (regno, blockend)
|
||||
int regno;
|
||||
CORE_ADDR blockend;
|
||||
register_addr (int regno, CORE_ADDR blockend)
|
||||
{
|
||||
return REGISTER_PTRACE_ADDR (regno);
|
||||
}
|
||||
|
||||
int
|
||||
kernel_u_size ()
|
||||
kernel_u_size (void)
|
||||
{
|
||||
return (sizeof (struct user));
|
||||
}
|
||||
|
@ -205,8 +196,7 @@ kernel_u_size ()
|
|||
*/
|
||||
|
||||
void
|
||||
supply_gregset (gregsetp)
|
||||
gregset_t *gregsetp;
|
||||
supply_gregset (gregset_t *gregsetp)
|
||||
{
|
||||
register int regi;
|
||||
register long *regp = ALPHA_REGSET_BASE (gregsetp);
|
||||
|
@ -224,9 +214,7 @@ supply_gregset (gregsetp)
|
|||
}
|
||||
|
||||
void
|
||||
fill_gregset (gregsetp, regno)
|
||||
gregset_t *gregsetp;
|
||||
int regno;
|
||||
fill_gregset (gregset_t *gregsetp, int regno)
|
||||
{
|
||||
int regi;
|
||||
register long *regp = ALPHA_REGSET_BASE (gregsetp);
|
||||
|
@ -245,8 +233,7 @@ fill_gregset (gregsetp, regno)
|
|||
*/
|
||||
|
||||
void
|
||||
supply_fpregset (fpregsetp)
|
||||
fpregset_t *fpregsetp;
|
||||
supply_fpregset (fpregset_t *fpregsetp)
|
||||
{
|
||||
register int regi;
|
||||
register long *regp = ALPHA_REGSET_BASE (fpregsetp);
|
||||
|
@ -256,9 +243,7 @@ supply_fpregset (fpregsetp)
|
|||
}
|
||||
|
||||
void
|
||||
fill_fpregset (fpregsetp, regno)
|
||||
fpregset_t *fpregsetp;
|
||||
int regno;
|
||||
fill_fpregset (fpregset_t *fpregsetp, int regno)
|
||||
{
|
||||
int regi;
|
||||
register long *regp = ALPHA_REGSET_BASE (fpregsetp);
|
||||
|
@ -298,7 +283,7 @@ static struct core_fns alpha_elf_core_fns =
|
|||
};
|
||||
|
||||
void
|
||||
_initialize_core_alpha ()
|
||||
_initialize_core_alpha (void)
|
||||
{
|
||||
add_core_fns (&alpha_osf_core_fns);
|
||||
add_core_fns (&alpha_elf_core_fns);
|
||||
|
|
103
gdb/alpha-tdep.c
103
gdb/alpha-tdep.c
|
@ -171,8 +171,7 @@ struct linked_proc_info
|
|||
long alpha_linux_sigtramp_offset (CORE_ADDR pc);
|
||||
#endif
|
||||
long
|
||||
alpha_linux_sigtramp_offset (pc)
|
||||
CORE_ADDR pc;
|
||||
alpha_linux_sigtramp_offset (CORE_ADDR pc)
|
||||
{
|
||||
unsigned int i[3], w;
|
||||
long off;
|
||||
|
@ -215,9 +214,7 @@ alpha_linux_sigtramp_offset (pc)
|
|||
/* Under OSF/1, the __sigtramp routine is frameless and has a frame
|
||||
size of zero, but we are able to backtrace through it. */
|
||||
CORE_ADDR
|
||||
alpha_osf_skip_sigtramp_frame (frame, pc)
|
||||
struct frame_info *frame;
|
||||
CORE_ADDR pc;
|
||||
alpha_osf_skip_sigtramp_frame (struct frame_info *frame, CORE_ADDR pc)
|
||||
{
|
||||
char *name;
|
||||
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. */
|
||||
|
||||
static alpha_extra_func_info_t
|
||||
push_sigtramp_desc (low_addr)
|
||||
CORE_ADDR low_addr;
|
||||
push_sigtramp_desc (CORE_ADDR low_addr)
|
||||
{
|
||||
struct linked_proc_info *link;
|
||||
alpha_extra_func_info_t proc_desc;
|
||||
|
@ -265,8 +261,7 @@ push_sigtramp_desc (low_addr)
|
|||
NULL). */
|
||||
|
||||
void
|
||||
alpha_find_saved_regs (frame)
|
||||
struct frame_info *frame;
|
||||
alpha_find_saved_regs (struct frame_info *frame)
|
||||
{
|
||||
int ireg;
|
||||
CORE_ADDR reg_position;
|
||||
|
@ -354,9 +349,7 @@ alpha_find_saved_regs (frame)
|
|||
}
|
||||
|
||||
static CORE_ADDR
|
||||
read_next_frame_reg (fi, regno)
|
||||
struct frame_info *fi;
|
||||
int regno;
|
||||
read_next_frame_reg (struct frame_info *fi, int regno)
|
||||
{
|
||||
for (; fi; fi = fi->next)
|
||||
{
|
||||
|
@ -376,8 +369,7 @@ read_next_frame_reg (fi, regno)
|
|||
}
|
||||
|
||||
CORE_ADDR
|
||||
alpha_frame_saved_pc (frame)
|
||||
struct frame_info *frame;
|
||||
alpha_frame_saved_pc (struct frame_info *frame)
|
||||
{
|
||||
alpha_extra_func_info_t proc_desc = frame->proc_desc;
|
||||
/* We have to get the saved pc from the sigcontext
|
||||
|
@ -391,8 +383,7 @@ alpha_frame_saved_pc (frame)
|
|||
}
|
||||
|
||||
CORE_ADDR
|
||||
alpha_saved_pc_after_call (frame)
|
||||
struct frame_info *frame;
|
||||
alpha_saved_pc_after_call (struct frame_info *frame)
|
||||
{
|
||||
CORE_ADDR pc = frame->pc;
|
||||
CORE_ADDR tmp;
|
||||
|
@ -421,8 +412,7 @@ static struct frame_saved_regs temp_saved_regs;
|
|||
$zero,($ra),1" on alpha. */
|
||||
|
||||
static int
|
||||
alpha_about_to_return (pc)
|
||||
CORE_ADDR pc;
|
||||
alpha_about_to_return (CORE_ADDR pc)
|
||||
{
|
||||
return read_memory_integer (pc, 4) == 0x6bfa8001;
|
||||
}
|
||||
|
@ -434,8 +424,7 @@ alpha_about_to_return (pc)
|
|||
lines. */
|
||||
|
||||
static CORE_ADDR
|
||||
heuristic_proc_start (pc)
|
||||
CORE_ADDR pc;
|
||||
heuristic_proc_start (CORE_ADDR pc)
|
||||
{
|
||||
CORE_ADDR start_pc = pc;
|
||||
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
|
||||
heuristic_proc_desc (start_pc, limit_pc, next_frame)
|
||||
CORE_ADDR start_pc, limit_pc;
|
||||
struct frame_info *next_frame;
|
||||
heuristic_proc_desc (CORE_ADDR start_pc, CORE_ADDR limit_pc,
|
||||
struct frame_info *next_frame)
|
||||
{
|
||||
CORE_ADDR sp = read_next_frame_reg (next_frame, SP_REGNUM);
|
||||
CORE_ADDR cur_pc;
|
||||
|
@ -612,9 +600,7 @@ heuristic_proc_desc (start_pc, limit_pc, next_frame)
|
|||
find the prologue, then return 0. */
|
||||
|
||||
static CORE_ADDR
|
||||
after_prologue (pc, proc_desc)
|
||||
CORE_ADDR pc;
|
||||
alpha_extra_func_info_t proc_desc;
|
||||
after_prologue (CORE_ADDR pc, alpha_extra_func_info_t proc_desc)
|
||||
{
|
||||
struct symtab_and_line sal;
|
||||
CORE_ADDR func_addr, func_end;
|
||||
|
@ -652,9 +638,7 @@ after_prologue (pc, proc_desc)
|
|||
are definitively *not* in a function prologue. */
|
||||
|
||||
static int
|
||||
alpha_in_prologue (pc, proc_desc)
|
||||
CORE_ADDR pc;
|
||||
alpha_extra_func_info_t proc_desc;
|
||||
alpha_in_prologue (CORE_ADDR pc, alpha_extra_func_info_t proc_desc)
|
||||
{
|
||||
CORE_ADDR after_prologue_pc;
|
||||
|
||||
|
@ -668,9 +652,7 @@ alpha_in_prologue (pc, proc_desc)
|
|||
}
|
||||
|
||||
static alpha_extra_func_info_t
|
||||
find_proc_desc (pc, next_frame)
|
||||
CORE_ADDR pc;
|
||||
struct frame_info *next_frame;
|
||||
find_proc_desc (CORE_ADDR pc, struct frame_info *next_frame)
|
||||
{
|
||||
alpha_extra_func_info_t proc_desc;
|
||||
struct block *b;
|
||||
|
@ -792,8 +774,7 @@ find_proc_desc (pc, next_frame)
|
|||
alpha_extra_func_info_t cached_proc_desc;
|
||||
|
||||
CORE_ADDR
|
||||
alpha_frame_chain (frame)
|
||||
struct frame_info *frame;
|
||||
alpha_frame_chain (struct frame_info *frame)
|
||||
{
|
||||
alpha_extra_func_info_t proc_desc;
|
||||
CORE_ADDR saved_pc = FRAME_SAVED_PC (frame);
|
||||
|
@ -827,8 +808,7 @@ alpha_frame_chain (frame)
|
|||
}
|
||||
|
||||
void
|
||||
init_extra_frame_info (frame)
|
||||
struct frame_info *frame;
|
||||
init_extra_frame_info (struct frame_info *frame)
|
||||
{
|
||||
/* Use proc_desc calculated in frame_chain */
|
||||
alpha_extra_func_info_t proc_desc =
|
||||
|
@ -900,9 +880,7 @@ init_extra_frame_info (frame)
|
|||
arguments without difficulty. */
|
||||
|
||||
struct frame_info *
|
||||
setup_arbitrary_frame (argc, argv)
|
||||
int argc;
|
||||
CORE_ADDR *argv;
|
||||
setup_arbitrary_frame (int argc, CORE_ADDR *argv)
|
||||
{
|
||||
if (argc != 2)
|
||||
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. */
|
||||
|
||||
CORE_ADDR
|
||||
alpha_push_arguments (nargs, args, sp, struct_return, struct_addr)
|
||||
int nargs;
|
||||
value_ptr *args;
|
||||
CORE_ADDR sp;
|
||||
int struct_return;
|
||||
CORE_ADDR struct_addr;
|
||||
alpha_push_arguments (int nargs, value_ptr *args, CORE_ADDR sp,
|
||||
int struct_return, CORE_ADDR struct_addr)
|
||||
{
|
||||
int i;
|
||||
int accumulate_size = struct_return ? 8 : 0;
|
||||
|
@ -1007,7 +981,7 @@ alpha_push_arguments (nargs, args, sp, struct_return, struct_addr)
|
|||
}
|
||||
|
||||
void
|
||||
alpha_push_dummy_frame ()
|
||||
alpha_push_dummy_frame (void)
|
||||
{
|
||||
int ireg;
|
||||
struct linked_proc_info *link;
|
||||
|
@ -1123,7 +1097,7 @@ alpha_push_dummy_frame ()
|
|||
}
|
||||
|
||||
void
|
||||
alpha_pop_frame ()
|
||||
alpha_pop_frame (void)
|
||||
{
|
||||
register int regnum;
|
||||
struct frame_info *frame = get_current_frame ();
|
||||
|
@ -1193,9 +1167,7 @@ alpha_pop_frame ()
|
|||
stuff some day. */
|
||||
|
||||
CORE_ADDR
|
||||
alpha_skip_prologue (pc, lenient)
|
||||
CORE_ADDR pc;
|
||||
int lenient;
|
||||
alpha_skip_prologue (CORE_ADDR pc, int lenient)
|
||||
{
|
||||
unsigned long inst;
|
||||
int offset;
|
||||
|
@ -1272,9 +1244,7 @@ alpha_skip_prologue (pc, lenient)
|
|||
STARTADDR? */
|
||||
|
||||
static int
|
||||
alpha_in_lenient_prologue (startaddr, pc)
|
||||
CORE_ADDR startaddr;
|
||||
CORE_ADDR pc;
|
||||
alpha_in_lenient_prologue (CORE_ADDR startaddr, CORE_ADDR pc)
|
||||
{
|
||||
CORE_ADDR end_prologue = alpha_skip_prologue (startaddr, 1);
|
||||
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
|
||||
of integers in floating point registers is different. */
|
||||
void
|
||||
alpha_register_convert_to_virtual (regnum, valtype, raw_buffer, virtual_buffer)
|
||||
int regnum;
|
||||
struct type *valtype;
|
||||
char *raw_buffer;
|
||||
char *virtual_buffer;
|
||||
alpha_register_convert_to_virtual (int regnum, struct type *valtype,
|
||||
char *raw_buffer, char *virtual_buffer)
|
||||
{
|
||||
if (TYPE_LENGTH (valtype) >= REGISTER_RAW_SIZE (regnum))
|
||||
{
|
||||
|
@ -1317,11 +1284,8 @@ alpha_register_convert_to_virtual (regnum, valtype, raw_buffer, virtual_buffer)
|
|||
}
|
||||
|
||||
void
|
||||
alpha_register_convert_to_raw (valtype, regnum, virtual_buffer, raw_buffer)
|
||||
struct type *valtype;
|
||||
int regnum;
|
||||
char *virtual_buffer;
|
||||
char *raw_buffer;
|
||||
alpha_register_convert_to_raw (struct type *valtype, int regnum,
|
||||
char *virtual_buffer, char *raw_buffer)
|
||||
{
|
||||
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. */
|
||||
|
||||
void
|
||||
alpha_store_return_value (valtype, valbuf)
|
||||
struct type *valtype;
|
||||
char *valbuf;
|
||||
alpha_store_return_value (struct type *valtype, char *valbuf)
|
||||
{
|
||||
char raw_buffer[MAX_REGISTER_RAW_SIZE];
|
||||
int regnum = V0_REGNUM;
|
||||
|
@ -1393,10 +1355,7 @@ alpha_store_return_value (valtype, valbuf)
|
|||
callable as an sfunc. */
|
||||
|
||||
static void
|
||||
reinit_frame_cache_sfunc (args, from_tty, c)
|
||||
char *args;
|
||||
int from_tty;
|
||||
struct cmd_list_element *c;
|
||||
reinit_frame_cache_sfunc (char *args, int from_tty, struct cmd_list_element *c)
|
||||
{
|
||||
reinit_frame_cache ();
|
||||
}
|
||||
|
@ -1407,7 +1366,7 @@ reinit_frame_cache_sfunc (args, from_tty, c)
|
|||
*/
|
||||
|
||||
CORE_ADDR
|
||||
alpha_call_dummy_address ()
|
||||
alpha_call_dummy_address (void)
|
||||
{
|
||||
CORE_ADDR entry;
|
||||
struct minimal_symbol *sym;
|
||||
|
@ -1426,7 +1385,7 @@ alpha_call_dummy_address ()
|
|||
}
|
||||
|
||||
void
|
||||
_initialize_alpha_tdep ()
|
||||
_initialize_alpha_tdep (void)
|
||||
{
|
||||
struct cmd_list_element *c;
|
||||
|
||||
|
|
152
gdb/annotate.c
152
gdb/annotate.c
|
@ -43,8 +43,7 @@ void (*annotate_exited_hook) (void);
|
|||
static int ignore_count_changed = 0;
|
||||
|
||||
static void
|
||||
print_value_flags (t)
|
||||
struct type *t;
|
||||
print_value_flags (struct type *t)
|
||||
{
|
||||
if (can_dereference (t))
|
||||
printf_filtered ("*");
|
||||
|
@ -53,7 +52,7 @@ print_value_flags (t)
|
|||
}
|
||||
|
||||
void
|
||||
breakpoints_changed ()
|
||||
breakpoints_changed (void)
|
||||
{
|
||||
if (annotation_level > 1)
|
||||
{
|
||||
|
@ -78,31 +77,28 @@ annotate_ignore_count_change (void)
|
|||
}
|
||||
|
||||
void
|
||||
annotate_breakpoint (num)
|
||||
int num;
|
||||
annotate_breakpoint (int num)
|
||||
{
|
||||
if (annotation_level > 1)
|
||||
printf_filtered ("\n\032\032breakpoint %d\n", num);
|
||||
}
|
||||
|
||||
void
|
||||
annotate_catchpoint (num)
|
||||
int num;
|
||||
annotate_catchpoint (int num)
|
||||
{
|
||||
if (annotation_level > 1)
|
||||
printf_filtered ("\n\032\032catchpoint %d\n", num);
|
||||
}
|
||||
|
||||
void
|
||||
annotate_watchpoint (num)
|
||||
int num;
|
||||
annotate_watchpoint (int num)
|
||||
{
|
||||
if (annotation_level > 1)
|
||||
printf_filtered ("\n\032\032watchpoint %d\n", num);
|
||||
}
|
||||
|
||||
void
|
||||
annotate_starting ()
|
||||
annotate_starting (void)
|
||||
{
|
||||
|
||||
if (annotate_starting_hook)
|
||||
|
@ -117,7 +113,7 @@ annotate_starting ()
|
|||
}
|
||||
|
||||
void
|
||||
annotate_stopped ()
|
||||
annotate_stopped (void)
|
||||
{
|
||||
if (annotate_stopped_hook)
|
||||
annotate_stopped_hook ();
|
||||
|
@ -134,8 +130,7 @@ annotate_stopped ()
|
|||
}
|
||||
|
||||
void
|
||||
annotate_exited (exitstatus)
|
||||
int exitstatus;
|
||||
annotate_exited (int exitstatus)
|
||||
{
|
||||
if (annotate_exited_hook)
|
||||
annotate_exited_hook ();
|
||||
|
@ -147,7 +142,7 @@ annotate_exited (exitstatus)
|
|||
}
|
||||
|
||||
void
|
||||
annotate_signalled ()
|
||||
annotate_signalled (void)
|
||||
{
|
||||
if (annotate_signalled_hook)
|
||||
annotate_signalled_hook ();
|
||||
|
@ -157,35 +152,35 @@ annotate_signalled ()
|
|||
}
|
||||
|
||||
void
|
||||
annotate_signal_name ()
|
||||
annotate_signal_name (void)
|
||||
{
|
||||
if (annotation_level > 1)
|
||||
printf_filtered ("\n\032\032signal-name\n");
|
||||
}
|
||||
|
||||
void
|
||||
annotate_signal_name_end ()
|
||||
annotate_signal_name_end (void)
|
||||
{
|
||||
if (annotation_level > 1)
|
||||
printf_filtered ("\n\032\032signal-name-end\n");
|
||||
}
|
||||
|
||||
void
|
||||
annotate_signal_string ()
|
||||
annotate_signal_string (void)
|
||||
{
|
||||
if (annotation_level > 1)
|
||||
printf_filtered ("\n\032\032signal-string\n");
|
||||
}
|
||||
|
||||
void
|
||||
annotate_signal_string_end ()
|
||||
annotate_signal_string_end (void)
|
||||
{
|
||||
if (annotation_level > 1)
|
||||
printf_filtered ("\n\032\032signal-string-end\n");
|
||||
}
|
||||
|
||||
void
|
||||
annotate_signal ()
|
||||
annotate_signal (void)
|
||||
{
|
||||
if (annotate_signal_hook)
|
||||
annotate_signal_hook ();
|
||||
|
@ -195,43 +190,42 @@ annotate_signal ()
|
|||
}
|
||||
|
||||
void
|
||||
annotate_breakpoints_headers ()
|
||||
annotate_breakpoints_headers (void)
|
||||
{
|
||||
if (annotation_level > 1)
|
||||
printf_filtered ("\n\032\032breakpoints-headers\n");
|
||||
}
|
||||
|
||||
void
|
||||
annotate_field (num)
|
||||
int num;
|
||||
annotate_field (int num)
|
||||
{
|
||||
if (annotation_level > 1)
|
||||
printf_filtered ("\n\032\032field %d\n", num);
|
||||
}
|
||||
|
||||
void
|
||||
annotate_breakpoints_table ()
|
||||
annotate_breakpoints_table (void)
|
||||
{
|
||||
if (annotation_level > 1)
|
||||
printf_filtered ("\n\032\032breakpoints-table\n");
|
||||
}
|
||||
|
||||
void
|
||||
annotate_record ()
|
||||
annotate_record (void)
|
||||
{
|
||||
if (annotation_level > 1)
|
||||
printf_filtered ("\n\032\032record\n");
|
||||
}
|
||||
|
||||
void
|
||||
annotate_breakpoints_table_end ()
|
||||
annotate_breakpoints_table_end (void)
|
||||
{
|
||||
if (annotation_level > 1)
|
||||
printf_filtered ("\n\032\032breakpoints-table-end\n");
|
||||
}
|
||||
|
||||
void
|
||||
annotate_frames_invalid ()
|
||||
annotate_frames_invalid (void)
|
||||
{
|
||||
if (annotation_level > 1)
|
||||
{
|
||||
|
@ -241,8 +235,7 @@ annotate_frames_invalid ()
|
|||
}
|
||||
|
||||
void
|
||||
annotate_field_begin (type)
|
||||
struct type *type;
|
||||
annotate_field_begin (struct type *type)
|
||||
{
|
||||
if (annotation_level > 1)
|
||||
{
|
||||
|
@ -253,51 +246,49 @@ annotate_field_begin (type)
|
|||
}
|
||||
|
||||
void
|
||||
annotate_field_name_end ()
|
||||
annotate_field_name_end (void)
|
||||
{
|
||||
if (annotation_level > 1)
|
||||
printf_filtered ("\n\032\032field-name-end\n");
|
||||
}
|
||||
|
||||
void
|
||||
annotate_field_value ()
|
||||
annotate_field_value (void)
|
||||
{
|
||||
if (annotation_level > 1)
|
||||
printf_filtered ("\n\032\032field-value\n");
|
||||
}
|
||||
|
||||
void
|
||||
annotate_field_end ()
|
||||
annotate_field_end (void)
|
||||
{
|
||||
if (annotation_level > 1)
|
||||
printf_filtered ("\n\032\032field-end\n");
|
||||
}
|
||||
|
||||
void
|
||||
annotate_quit ()
|
||||
annotate_quit (void)
|
||||
{
|
||||
if (annotation_level > 1)
|
||||
printf_filtered ("\n\032\032quit\n");
|
||||
}
|
||||
|
||||
void
|
||||
annotate_error ()
|
||||
annotate_error (void)
|
||||
{
|
||||
if (annotation_level > 1)
|
||||
printf_filtered ("\n\032\032error\n");
|
||||
}
|
||||
|
||||
void
|
||||
annotate_error_begin ()
|
||||
annotate_error_begin (void)
|
||||
{
|
||||
if (annotation_level > 1)
|
||||
fprintf_filtered (gdb_stderr, "\n\032\032error-begin\n");
|
||||
}
|
||||
|
||||
void
|
||||
annotate_value_history_begin (histindex, type)
|
||||
int histindex;
|
||||
struct type *type;
|
||||
annotate_value_history_begin (int histindex, struct type *type)
|
||||
{
|
||||
if (annotation_level > 1)
|
||||
{
|
||||
|
@ -308,8 +299,7 @@ annotate_value_history_begin (histindex, type)
|
|||
}
|
||||
|
||||
void
|
||||
annotate_value_begin (type)
|
||||
struct type *type;
|
||||
annotate_value_begin (struct type *type)
|
||||
{
|
||||
if (annotation_level > 1)
|
||||
{
|
||||
|
@ -320,92 +310,91 @@ annotate_value_begin (type)
|
|||
}
|
||||
|
||||
void
|
||||
annotate_value_history_value ()
|
||||
annotate_value_history_value (void)
|
||||
{
|
||||
if (annotation_level > 1)
|
||||
printf_filtered ("\n\032\032value-history-value\n");
|
||||
}
|
||||
|
||||
void
|
||||
annotate_value_history_end ()
|
||||
annotate_value_history_end (void)
|
||||
{
|
||||
if (annotation_level > 1)
|
||||
printf_filtered ("\n\032\032value-history-end\n");
|
||||
}
|
||||
|
||||
void
|
||||
annotate_value_end ()
|
||||
annotate_value_end (void)
|
||||
{
|
||||
if (annotation_level > 1)
|
||||
printf_filtered ("\n\032\032value-end\n");
|
||||
}
|
||||
|
||||
void
|
||||
annotate_display_begin ()
|
||||
annotate_display_begin (void)
|
||||
{
|
||||
if (annotation_level > 1)
|
||||
printf_filtered ("\n\032\032display-begin\n");
|
||||
}
|
||||
|
||||
void
|
||||
annotate_display_number_end ()
|
||||
annotate_display_number_end (void)
|
||||
{
|
||||
if (annotation_level > 1)
|
||||
printf_filtered ("\n\032\032display-number-end\n");
|
||||
}
|
||||
|
||||
void
|
||||
annotate_display_format ()
|
||||
annotate_display_format (void)
|
||||
{
|
||||
if (annotation_level > 1)
|
||||
printf_filtered ("\n\032\032display-format\n");
|
||||
}
|
||||
|
||||
void
|
||||
annotate_display_expression ()
|
||||
annotate_display_expression (void)
|
||||
{
|
||||
if (annotation_level > 1)
|
||||
printf_filtered ("\n\032\032display-expression\n");
|
||||
}
|
||||
|
||||
void
|
||||
annotate_display_expression_end ()
|
||||
annotate_display_expression_end (void)
|
||||
{
|
||||
if (annotation_level > 1)
|
||||
printf_filtered ("\n\032\032display-expression-end\n");
|
||||
}
|
||||
|
||||
void
|
||||
annotate_display_value ()
|
||||
annotate_display_value (void)
|
||||
{
|
||||
if (annotation_level > 1)
|
||||
printf_filtered ("\n\032\032display-value\n");
|
||||
}
|
||||
|
||||
void
|
||||
annotate_display_end ()
|
||||
annotate_display_end (void)
|
||||
{
|
||||
if (annotation_level > 1)
|
||||
printf_filtered ("\n\032\032display-end\n");
|
||||
}
|
||||
|
||||
void
|
||||
annotate_arg_begin ()
|
||||
annotate_arg_begin (void)
|
||||
{
|
||||
if (annotation_level > 1)
|
||||
printf_filtered ("\n\032\032arg-begin\n");
|
||||
}
|
||||
|
||||
void
|
||||
annotate_arg_name_end ()
|
||||
annotate_arg_name_end (void)
|
||||
{
|
||||
if (annotation_level > 1)
|
||||
printf_filtered ("\n\032\032arg-name-end\n");
|
||||
}
|
||||
|
||||
void
|
||||
annotate_arg_value (type)
|
||||
struct type *type;
|
||||
annotate_arg_value (struct type *type)
|
||||
{
|
||||
if (annotation_level > 1)
|
||||
{
|
||||
|
@ -416,19 +405,14 @@ annotate_arg_value (type)
|
|||
}
|
||||
|
||||
void
|
||||
annotate_arg_end ()
|
||||
annotate_arg_end (void)
|
||||
{
|
||||
if (annotation_level > 1)
|
||||
printf_filtered ("\n\032\032arg-end\n");
|
||||
}
|
||||
|
||||
void
|
||||
annotate_source (filename, line, character, mid, pc)
|
||||
char *filename;
|
||||
int line;
|
||||
int character;
|
||||
int mid;
|
||||
CORE_ADDR pc;
|
||||
annotate_source (char *filename, int line, int character, int mid, CORE_ADDR pc)
|
||||
{
|
||||
if (annotation_level > 1)
|
||||
printf_filtered ("\n\032\032source ");
|
||||
|
@ -443,9 +427,7 @@ annotate_source (filename, line, character, mid, pc)
|
|||
}
|
||||
|
||||
void
|
||||
annotate_frame_begin (level, pc)
|
||||
int level;
|
||||
CORE_ADDR pc;
|
||||
annotate_frame_begin (int level, CORE_ADDR pc)
|
||||
{
|
||||
if (annotation_level > 1)
|
||||
{
|
||||
|
@ -456,100 +438,98 @@ annotate_frame_begin (level, pc)
|
|||
}
|
||||
|
||||
void
|
||||
annotate_function_call ()
|
||||
annotate_function_call (void)
|
||||
{
|
||||
if (annotation_level > 1)
|
||||
printf_filtered ("\n\032\032function-call\n");
|
||||
}
|
||||
|
||||
void
|
||||
annotate_signal_handler_caller ()
|
||||
annotate_signal_handler_caller (void)
|
||||
{
|
||||
if (annotation_level > 1)
|
||||
printf_filtered ("\n\032\032signal-handler-caller\n");
|
||||
}
|
||||
|
||||
void
|
||||
annotate_frame_address ()
|
||||
annotate_frame_address (void)
|
||||
{
|
||||
if (annotation_level > 1)
|
||||
printf_filtered ("\n\032\032frame-address\n");
|
||||
}
|
||||
|
||||
void
|
||||
annotate_frame_address_end ()
|
||||
annotate_frame_address_end (void)
|
||||
{
|
||||
if (annotation_level > 1)
|
||||
printf_filtered ("\n\032\032frame-address-end\n");
|
||||
}
|
||||
|
||||
void
|
||||
annotate_frame_function_name ()
|
||||
annotate_frame_function_name (void)
|
||||
{
|
||||
if (annotation_level > 1)
|
||||
printf_filtered ("\n\032\032frame-function-name\n");
|
||||
}
|
||||
|
||||
void
|
||||
annotate_frame_args ()
|
||||
annotate_frame_args (void)
|
||||
{
|
||||
if (annotation_level > 1)
|
||||
printf_filtered ("\n\032\032frame-args\n");
|
||||
}
|
||||
|
||||
void
|
||||
annotate_frame_source_begin ()
|
||||
annotate_frame_source_begin (void)
|
||||
{
|
||||
if (annotation_level > 1)
|
||||
printf_filtered ("\n\032\032frame-source-begin\n");
|
||||
}
|
||||
|
||||
void
|
||||
annotate_frame_source_file ()
|
||||
annotate_frame_source_file (void)
|
||||
{
|
||||
if (annotation_level > 1)
|
||||
printf_filtered ("\n\032\032frame-source-file\n");
|
||||
}
|
||||
|
||||
void
|
||||
annotate_frame_source_file_end ()
|
||||
annotate_frame_source_file_end (void)
|
||||
{
|
||||
if (annotation_level > 1)
|
||||
printf_filtered ("\n\032\032frame-source-file-end\n");
|
||||
}
|
||||
|
||||
void
|
||||
annotate_frame_source_line ()
|
||||
annotate_frame_source_line (void)
|
||||
{
|
||||
if (annotation_level > 1)
|
||||
printf_filtered ("\n\032\032frame-source-line\n");
|
||||
}
|
||||
|
||||
void
|
||||
annotate_frame_source_end ()
|
||||
annotate_frame_source_end (void)
|
||||
{
|
||||
if (annotation_level > 1)
|
||||
printf_filtered ("\n\032\032frame-source-end\n");
|
||||
}
|
||||
|
||||
void
|
||||
annotate_frame_where ()
|
||||
annotate_frame_where (void)
|
||||
{
|
||||
if (annotation_level > 1)
|
||||
printf_filtered ("\n\032\032frame-where\n");
|
||||
}
|
||||
|
||||
void
|
||||
annotate_frame_end ()
|
||||
annotate_frame_end (void)
|
||||
{
|
||||
if (annotation_level > 1)
|
||||
printf_filtered ("\n\032\032frame-end\n");
|
||||
}
|
||||
|
||||
void
|
||||
annotate_array_section_begin (index, elttype)
|
||||
int index;
|
||||
struct type *elttype;
|
||||
annotate_array_section_begin (int index, struct type *elttype)
|
||||
{
|
||||
if (annotation_level > 1)
|
||||
{
|
||||
|
@ -560,43 +540,41 @@ annotate_array_section_begin (index, elttype)
|
|||
}
|
||||
|
||||
void
|
||||
annotate_elt_rep (repcount)
|
||||
unsigned int repcount;
|
||||
annotate_elt_rep (unsigned int repcount)
|
||||
{
|
||||
if (annotation_level > 1)
|
||||
printf_filtered ("\n\032\032elt-rep %u\n", repcount);
|
||||
}
|
||||
|
||||
void
|
||||
annotate_elt_rep_end ()
|
||||
annotate_elt_rep_end (void)
|
||||
{
|
||||
if (annotation_level > 1)
|
||||
printf_filtered ("\n\032\032elt-rep-end\n");
|
||||
}
|
||||
|
||||
void
|
||||
annotate_elt ()
|
||||
annotate_elt (void)
|
||||
{
|
||||
if (annotation_level > 1)
|
||||
printf_filtered ("\n\032\032elt\n");
|
||||
}
|
||||
|
||||
void
|
||||
annotate_array_section_end ()
|
||||
annotate_array_section_end (void)
|
||||
{
|
||||
if (annotation_level > 1)
|
||||
printf_filtered ("\n\032\032array-section-end\n");
|
||||
}
|
||||
|
||||
static void
|
||||
breakpoint_changed (b)
|
||||
struct breakpoint *b;
|
||||
breakpoint_changed (struct breakpoint *b)
|
||||
{
|
||||
breakpoints_changed ();
|
||||
}
|
||||
|
||||
void
|
||||
_initialize_annotate ()
|
||||
_initialize_annotate (void)
|
||||
{
|
||||
if (annotation_level > 1)
|
||||
{
|
||||
|
|
|
@ -114,8 +114,7 @@ static int codestream_cnt;
|
|||
: codestream_buf[codestream_off++])
|
||||
|
||||
static unsigned int
|
||||
codestream_fill (peek_flag)
|
||||
int peek_flag;
|
||||
codestream_fill (int peek_flag)
|
||||
{
|
||||
codestream_addr = codestream_next_addr;
|
||||
codestream_next_addr += CODESTREAM_BUFSIZ * sizeof (codestream_buf[0]);
|
||||
|
@ -142,8 +141,7 @@ codestream_fill (peek_flag)
|
|||
}
|
||||
|
||||
static void
|
||||
codestream_seek (place)
|
||||
CORE_ADDR place;
|
||||
codestream_seek (CORE_ADDR place)
|
||||
{
|
||||
codestream_next_addr = place / CODESTREAM_BUFSIZ;
|
||||
codestream_next_addr *= CODESTREAM_BUFSIZ;
|
||||
|
@ -156,9 +154,7 @@ codestream_seek (place)
|
|||
/* This function is currently unused but leave in for now. */
|
||||
|
||||
static void
|
||||
codestream_read (buf, count)
|
||||
unsigned int *buf;
|
||||
int count;
|
||||
codestream_read (unsigned int *buf, int count)
|
||||
{
|
||||
unsigned int *p;
|
||||
int i;
|
||||
|
@ -170,8 +166,7 @@ codestream_read (buf, count)
|
|||
/* Set up prologue scanning and return the first insn. */
|
||||
|
||||
static unsigned int
|
||||
setup_prologue_scan (pc)
|
||||
CORE_ADDR pc;
|
||||
setup_prologue_scan (CORE_ADDR pc)
|
||||
{
|
||||
unsigned int insn;
|
||||
|
||||
|
@ -189,8 +184,7 @@ setup_prologue_scan (pc)
|
|||
*/
|
||||
|
||||
static long
|
||||
arc_get_frame_setup (pc)
|
||||
CORE_ADDR pc;
|
||||
arc_get_frame_setup (CORE_ADDR pc)
|
||||
{
|
||||
unsigned int insn;
|
||||
/* Size of frame or -1 if unrecognizable prologue. */
|
||||
|
@ -277,9 +271,7 @@ arc_get_frame_setup (pc)
|
|||
This allows a quicker answer. */
|
||||
|
||||
CORE_ADDR
|
||||
arc_skip_prologue (pc, frameless_p)
|
||||
CORE_ADDR pc;
|
||||
int frameless_p;
|
||||
arc_skip_prologue (CORE_ADDR pc, int frameless_p)
|
||||
{
|
||||
unsigned int insn;
|
||||
int i, frame_size;
|
||||
|
@ -310,8 +302,7 @@ arc_skip_prologue (pc, frameless_p)
|
|||
This is taken from frameless_look_for_prologue. */
|
||||
|
||||
CORE_ADDR
|
||||
arc_frame_saved_pc (frame)
|
||||
struct frame_info *frame;
|
||||
arc_frame_saved_pc (struct frame_info *frame)
|
||||
{
|
||||
CORE_ADDR func_start;
|
||||
unsigned int insn;
|
||||
|
@ -357,9 +348,7 @@ arc_frame_saved_pc (frame)
|
|||
*/
|
||||
|
||||
void
|
||||
frame_find_saved_regs (fip, fsrp)
|
||||
struct frame_info *fip;
|
||||
struct frame_saved_regs *fsrp;
|
||||
frame_find_saved_regs (struct frame_info *fip, struct frame_saved_regs *fsrp)
|
||||
{
|
||||
long locals;
|
||||
unsigned int insn;
|
||||
|
@ -472,9 +461,7 @@ insn_type;
|
|||
/* ??? Need to verify all cases are properly handled. */
|
||||
|
||||
static insn_type
|
||||
get_insn_type (insn, pc, target)
|
||||
unsigned long insn;
|
||||
CORE_ADDR pc, *target;
|
||||
get_insn_type (unsigned long insn, CORE_ADDR pc, CORE_ADDR *target)
|
||||
{
|
||||
unsigned long limm;
|
||||
|
||||
|
@ -535,9 +522,8 @@ get_insn_type (insn, pc, target)
|
|||
set up a simulated single-step, we undo our damage. */
|
||||
|
||||
void
|
||||
arc_software_single_step (ignore, insert_breakpoints_p)
|
||||
enum target_signal ignore; /* sig but we don't need it */
|
||||
int insert_breakpoints_p;
|
||||
arc_software_single_step (enum target_signal ignore, /* sig but we don't need it */
|
||||
int insert_breakpoints_p)
|
||||
{
|
||||
static CORE_ADDR next_pc, target;
|
||||
static int brktrg_p;
|
||||
|
@ -593,8 +579,7 @@ arc_software_single_step (ignore, insert_breakpoints_p)
|
|||
This routine returns true on success. */
|
||||
|
||||
int
|
||||
get_longjmp_target (pc)
|
||||
CORE_ADDR *pc;
|
||||
get_longjmp_target (CORE_ADDR *pc)
|
||||
{
|
||||
char buf[TARGET_PTR_BIT / TARGET_CHAR_BIT];
|
||||
CORE_ADDR sp, jb_addr;
|
||||
|
@ -621,9 +606,7 @@ get_longjmp_target (pc)
|
|||
/* Disassemble one instruction. */
|
||||
|
||||
static int
|
||||
arc_print_insn (vma, info)
|
||||
bfd_vma vma;
|
||||
disassemble_info *info;
|
||||
arc_print_insn (bfd_vma vma, disassemble_info *info)
|
||||
{
|
||||
static int current_mach;
|
||||
static int current_endian;
|
||||
|
@ -670,9 +653,7 @@ arc_set_cpu_type_command (char *args, int from_tty)
|
|||
}
|
||||
|
||||
static void
|
||||
arc_show_cpu_type_command (args, from_tty)
|
||||
char *args;
|
||||
int from_tty;
|
||||
arc_show_cpu_type_command (char *args, int from_tty)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -680,8 +661,7 @@ arc_show_cpu_type_command (args, from_tty)
|
|||
Result is a boolean indicating success. */
|
||||
|
||||
static int
|
||||
arc_set_cpu_type (str)
|
||||
char *str;
|
||||
arc_set_cpu_type (char *str)
|
||||
{
|
||||
int i, j;
|
||||
|
||||
|
@ -702,7 +682,7 @@ arc_set_cpu_type (str)
|
|||
}
|
||||
|
||||
void
|
||||
_initialize_arc_tdep ()
|
||||
_initialize_arc_tdep (void)
|
||||
{
|
||||
struct cmd_list_element *c;
|
||||
|
||||
|
|
|
@ -151,17 +151,13 @@ generic_prologue_frameless_p (CORE_ADDR ip)
|
|||
/* Helper functions for INNER_THAN */
|
||||
|
||||
int
|
||||
core_addr_lessthan (lhs, rhs)
|
||||
CORE_ADDR lhs;
|
||||
CORE_ADDR rhs;
|
||||
core_addr_lessthan (CORE_ADDR lhs, CORE_ADDR rhs)
|
||||
{
|
||||
return (lhs < rhs);
|
||||
}
|
||||
|
||||
int
|
||||
core_addr_greaterthan (lhs, rhs)
|
||||
CORE_ADDR lhs;
|
||||
CORE_ADDR rhs;
|
||||
core_addr_greaterthan (CORE_ADDR lhs, CORE_ADDR rhs)
|
||||
{
|
||||
return (lhs > rhs);
|
||||
}
|
||||
|
@ -211,16 +207,14 @@ default_double_format (struct gdbarch *gdbarch)
|
|||
/* Misc helper functions for targets. */
|
||||
|
||||
int
|
||||
frame_num_args_unknown (fi)
|
||||
struct frame_info *fi;
|
||||
frame_num_args_unknown (struct frame_info *fi)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
generic_register_convertible_not (num)
|
||||
int num;
|
||||
generic_register_convertible_not (int num)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -539,8 +533,7 @@ info_architecture (char *args, int from_tty)
|
|||
byte-order) using information found in the BFD */
|
||||
|
||||
void
|
||||
set_gdbarch_from_file (abfd)
|
||||
bfd *abfd;
|
||||
set_gdbarch_from_file (bfd *abfd)
|
||||
{
|
||||
if (GDB_MULTI_ARCH)
|
||||
{
|
||||
|
|
189
gdb/ax-gdb.c
189
gdb/ax-gdb.c
|
@ -154,8 +154,7 @@ static void agent_command (char *exp, int from_tty);
|
|||
proletariat? */
|
||||
|
||||
static struct value *
|
||||
const_var_ref (var)
|
||||
struct symbol *var;
|
||||
const_var_ref (struct symbol *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
|
||||
anywhere. */
|
||||
static struct value *
|
||||
const_expr (pc)
|
||||
union exp_element **pc;
|
||||
const_expr (union exp_element **pc)
|
||||
{
|
||||
enum exp_opcode op = (*pc)->opcode;
|
||||
struct value *v1;
|
||||
|
@ -220,8 +218,7 @@ const_expr (pc)
|
|||
/* Like const_expr, but guarantee also that *PC is undisturbed if the
|
||||
expression is not constant. */
|
||||
static struct value *
|
||||
maybe_const_expr (pc)
|
||||
union exp_element **pc;
|
||||
maybe_const_expr (union exp_element **pc)
|
||||
{
|
||||
union exp_element *tentative_pc = *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
|
||||
an expression being used for tracing. */
|
||||
static void
|
||||
gen_traced_pop (ax, value)
|
||||
struct agent_expr *ax;
|
||||
struct axs_value *value;
|
||||
gen_traced_pop (struct agent_expr *ax, struct axs_value *value)
|
||||
{
|
||||
if (trace_kludge)
|
||||
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
|
||||
type TYPE, and the upper bits are zero. Sign-extend if necessary. */
|
||||
static void
|
||||
gen_sign_extend (ax, type)
|
||||
struct agent_expr *ax;
|
||||
struct type *type;
|
||||
gen_sign_extend (struct agent_expr *ax, struct type *type)
|
||||
{
|
||||
/* Do we need to sign-extend this? */
|
||||
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
|
||||
needed. */
|
||||
static void
|
||||
gen_extend (ax, type)
|
||||
struct agent_expr *ax;
|
||||
struct type *type;
|
||||
gen_extend (struct agent_expr *ax, struct type *type)
|
||||
{
|
||||
int bits = type->length * TARGET_CHAR_BIT;
|
||||
/* 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
|
||||
target type, not the pointer type. */
|
||||
static void
|
||||
gen_fetch (ax, type)
|
||||
struct agent_expr *ax;
|
||||
struct type *type;
|
||||
gen_fetch (struct agent_expr *ax, struct type *type)
|
||||
{
|
||||
if (trace_kludge)
|
||||
{
|
||||
|
@ -440,9 +429,7 @@ gen_fetch (ax, type)
|
|||
right shift it by -DISTANCE bits if DISTANCE < 0. This generates
|
||||
unsigned (logical) right shifts. */
|
||||
static void
|
||||
gen_left_shift (ax, distance)
|
||||
struct agent_expr *ax;
|
||||
int distance;
|
||||
gen_left_shift (struct agent_expr *ax, int distance)
|
||||
{
|
||||
if (distance > 0)
|
||||
{
|
||||
|
@ -463,8 +450,7 @@ gen_left_shift (ax, distance)
|
|||
/* Generate code to push the base address of the argument portion of
|
||||
the top stack frame. */
|
||||
static void
|
||||
gen_frame_args_address (ax)
|
||||
struct agent_expr *ax;
|
||||
gen_frame_args_address (struct agent_expr *ax)
|
||||
{
|
||||
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
|
||||
top stack frame. */
|
||||
static void
|
||||
gen_frame_locals_address (ax)
|
||||
struct agent_expr *ax;
|
||||
gen_frame_locals_address (struct agent_expr *ax)
|
||||
{
|
||||
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
|
||||
thing. */
|
||||
static void
|
||||
gen_offset (ax, offset)
|
||||
struct agent_expr *ax;
|
||||
int offset;
|
||||
gen_offset (struct agent_expr *ax, int offset)
|
||||
{
|
||||
/* It would suffice to simply push the offset and add it, but this
|
||||
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
|
||||
VAR's value to the top of the stack. */
|
||||
static void
|
||||
gen_sym_offset (ax, var)
|
||||
struct agent_expr *ax;
|
||||
struct symbol *var;
|
||||
gen_sym_offset (struct agent_expr *ax, struct symbol *var)
|
||||
{
|
||||
gen_offset (ax, SYMBOL_VALUE (var));
|
||||
}
|
||||
|
@ -530,10 +511,7 @@ gen_sym_offset (ax, var)
|
|||
symbol VAR. Set VALUE to describe the result. */
|
||||
|
||||
static void
|
||||
gen_var_ref (ax, value, var)
|
||||
struct agent_expr *ax;
|
||||
struct axs_value *value;
|
||||
struct symbol *var;
|
||||
gen_var_ref (struct agent_expr *ax, struct axs_value *value, struct symbol *var)
|
||||
{
|
||||
/* Dereference any typedefs. */
|
||||
value->type = check_typedef (SYMBOL_TYPE (var));
|
||||
|
@ -648,11 +626,8 @@ gen_var_ref (ax, value, var)
|
|||
/* Generating bytecode from GDB expressions: literals */
|
||||
|
||||
static void
|
||||
gen_int_literal (ax, value, k, type)
|
||||
struct agent_expr *ax;
|
||||
struct axs_value *value;
|
||||
LONGEST k;
|
||||
struct type *type;
|
||||
gen_int_literal (struct agent_expr *ax, struct axs_value *value, LONGEST k,
|
||||
struct type *type)
|
||||
{
|
||||
ax_const_l (ax, k);
|
||||
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
|
||||
that. */
|
||||
static void
|
||||
require_rvalue (ax, value)
|
||||
struct agent_expr *ax;
|
||||
struct axs_value *value;
|
||||
require_rvalue (struct agent_expr *ax, struct axs_value *value)
|
||||
{
|
||||
switch (value->kind)
|
||||
{
|
||||
|
@ -714,9 +687,7 @@ require_rvalue (ax, value)
|
|||
lvalue through unchanged, and let `+' raise an error. */
|
||||
|
||||
static void
|
||||
gen_usual_unary (ax, value)
|
||||
struct agent_expr *ax;
|
||||
struct axs_value *value;
|
||||
gen_usual_unary (struct agent_expr *ax, struct axs_value *value)
|
||||
{
|
||||
/* We don't have to generate any code for the usual integral
|
||||
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
|
||||
type TYPE2, according to the rules described in gen_usual_arithmetic. */
|
||||
static int
|
||||
type_wider_than (type1, type2)
|
||||
struct type *type1, *type2;
|
||||
type_wider_than (struct type *type1, struct type *type2)
|
||||
{
|
||||
return (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. */
|
||||
static struct type *
|
||||
max_type (type1, type2)
|
||||
struct type *type1, *type2;
|
||||
max_type (struct type *type1, struct type *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. */
|
||||
static void
|
||||
gen_conversion (ax, from, to)
|
||||
struct agent_expr *ax;
|
||||
struct type *from, *to;
|
||||
gen_conversion (struct agent_expr *ax, struct type *from, struct type *to)
|
||||
{
|
||||
/* 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
|
||||
emitted to be converted to the type TO. */
|
||||
static int
|
||||
is_nontrivial_conversion (from, to)
|
||||
struct type *from, *to;
|
||||
is_nontrivial_conversion (struct type *from, struct type *to)
|
||||
{
|
||||
struct agent_expr *ax = new_agent_expr (0);
|
||||
int nontrivial;
|
||||
|
@ -841,9 +807,8 @@ is_nontrivial_conversion (from, to)
|
|||
and promotes each argument to that type. *VALUE1 and *VALUE2
|
||||
describe the values as they are passed in, and as they are left. */
|
||||
static void
|
||||
gen_usual_arithmetic (ax, value1, value2)
|
||||
struct agent_expr *ax;
|
||||
struct axs_value *value1, *value2;
|
||||
gen_usual_arithmetic (struct agent_expr *ax, struct axs_value *value1,
|
||||
struct axs_value *value2)
|
||||
{
|
||||
/* Do the usual binary conversions. */
|
||||
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 has integral type. */
|
||||
static void
|
||||
gen_integral_promotions (ax, value)
|
||||
struct agent_expr *ax;
|
||||
struct axs_value *value;
|
||||
gen_integral_promotions (struct agent_expr *ax, struct axs_value *value)
|
||||
{
|
||||
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. */
|
||||
static void
|
||||
gen_cast (ax, value, type)
|
||||
struct agent_expr *ax;
|
||||
struct axs_value *value;
|
||||
struct type *type;
|
||||
gen_cast (struct agent_expr *ax, struct axs_value *value, struct type *type)
|
||||
{
|
||||
/* GCC does allow casts to yield lvalues, so this should be fixed
|
||||
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
|
||||
of the pointer type TYPE. */
|
||||
static void
|
||||
gen_scale (ax, op, type)
|
||||
struct agent_expr *ax;
|
||||
enum agent_op op;
|
||||
struct type *type;
|
||||
gen_scale (struct agent_expr *ax, enum agent_op op, struct 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
|
||||
BINOP_ADD and BINOP_SUBSCRIPT. NAME is used in error messages. */
|
||||
static void
|
||||
gen_add (ax, value, value1, value2, name)
|
||||
struct agent_expr *ax;
|
||||
struct axs_value *value, *value1, *value2;
|
||||
char *name;
|
||||
gen_add (struct agent_expr *ax, struct axs_value *value,
|
||||
struct axs_value *value1, struct axs_value *value2, char *name)
|
||||
{
|
||||
/* Is it INT+PTR? */
|
||||
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
|
||||
that they've undergone the usual binary conversions. */
|
||||
static void
|
||||
gen_sub (ax, value, value1, value2)
|
||||
struct agent_expr *ax;
|
||||
struct axs_value *value, *value1, *value2;
|
||||
gen_sub (struct agent_expr *ax, struct axs_value *value,
|
||||
struct axs_value *value1, struct axs_value *value2)
|
||||
{
|
||||
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
|
||||
operator, used in error messages */
|
||||
static void
|
||||
gen_binop (ax, value, value1, value2, op, op_unsigned, may_carry, name)
|
||||
struct agent_expr *ax;
|
||||
struct axs_value *value, *value1, *value2;
|
||||
enum agent_op op, op_unsigned;
|
||||
int may_carry;
|
||||
char *name;
|
||||
gen_binop (struct agent_expr *ax, struct axs_value *value,
|
||||
struct axs_value *value1, struct axs_value *value2, enum agent_op op,
|
||||
enum agent_op op_unsigned, int may_carry, char *name)
|
||||
{
|
||||
/* We only handle INT op 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
|
||||
gen_logical_not (ax, value)
|
||||
struct agent_expr *ax;
|
||||
struct axs_value *value;
|
||||
gen_logical_not (struct agent_expr *ax, struct axs_value *value)
|
||||
{
|
||||
if (TYPE_CODE (value->type) != TYPE_CODE_INT
|
||||
&& TYPE_CODE (value->type) != TYPE_CODE_PTR)
|
||||
|
@ -1117,9 +1066,7 @@ gen_logical_not (ax, value)
|
|||
|
||||
|
||||
static void
|
||||
gen_complement (ax, value)
|
||||
struct agent_expr *ax;
|
||||
struct axs_value *value;
|
||||
gen_complement (struct agent_expr *ax, struct axs_value *value)
|
||||
{
|
||||
if (TYPE_CODE (value->type) != TYPE_CODE_INT)
|
||||
error ("Illegal type of operand to `~'.");
|
||||
|
@ -1136,9 +1083,7 @@ gen_complement (ax, value)
|
|||
|
||||
/* Dereference the value on the top of the stack. */
|
||||
static void
|
||||
gen_deref (ax, value)
|
||||
struct agent_expr *ax;
|
||||
struct axs_value *value;
|
||||
gen_deref (struct agent_expr *ax, struct axs_value *value)
|
||||
{
|
||||
/* The caller should check the type, because several operators use
|
||||
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. */
|
||||
static void
|
||||
gen_address_of (ax, value)
|
||||
struct agent_expr *ax;
|
||||
struct axs_value *value;
|
||||
gen_address_of (struct agent_expr *ax, struct axs_value *value)
|
||||
{
|
||||
/* Special case for taking the address of a function. The ANSI
|
||||
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
|
||||
its index in TYPE's field array. */
|
||||
static int
|
||||
find_field (type, name)
|
||||
struct type *type;
|
||||
char *name;
|
||||
find_field (struct type *type, char *name)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -1227,11 +1168,8 @@ find_field (type, name)
|
|||
starting and one-past-ending *bit* numbers of the field within the
|
||||
structure. */
|
||||
static void
|
||||
gen_bitfield_ref (ax, value, type, start, end)
|
||||
struct agent_expr *ax;
|
||||
struct axs_value *value;
|
||||
struct type *type;
|
||||
int start, end;
|
||||
gen_bitfield_ref (struct agent_expr *ax, struct axs_value *value,
|
||||
struct type *type, int start, int end)
|
||||
{
|
||||
/* Note that ops[i] fetches 8 << i bits. */
|
||||
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
|
||||
it operates on; we use them in error messages. */
|
||||
static void
|
||||
gen_struct_ref (ax, value, field, operator_name, operand_name)
|
||||
struct agent_expr *ax;
|
||||
struct axs_value *value;
|
||||
char *field;
|
||||
char *operator_name;
|
||||
char *operand_name;
|
||||
gen_struct_ref (struct agent_expr *ax, struct axs_value *value, char *field,
|
||||
char *operator_name, char *operand_name)
|
||||
{
|
||||
struct type *type;
|
||||
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
|
||||
the right operand to be a constant expression. */
|
||||
static void
|
||||
gen_repeat (pc, ax, value)
|
||||
union exp_element **pc;
|
||||
struct agent_expr *ax;
|
||||
struct axs_value *value;
|
||||
gen_repeat (union exp_element **pc, struct agent_expr *ax,
|
||||
struct axs_value *value)
|
||||
{
|
||||
struct axs_value value1;
|
||||
/* 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
|
||||
to the first instruction after the operand. */
|
||||
static void
|
||||
gen_sizeof (pc, ax, value)
|
||||
union exp_element **pc;
|
||||
struct agent_expr *ax;
|
||||
struct axs_value *value;
|
||||
gen_sizeof (union exp_element **pc, struct agent_expr *ax,
|
||||
struct axs_value *value)
|
||||
{
|
||||
/* We don't care about the value of the operand expression; we only
|
||||
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.
|
||||
Append code for the subexpression of EXPR starting at *POS_P to AX. */
|
||||
static void
|
||||
gen_expr (pc, ax, value)
|
||||
union exp_element **pc;
|
||||
struct agent_expr *ax;
|
||||
struct axs_value *value;
|
||||
gen_expr (union exp_element **pc, struct agent_expr *ax,
|
||||
struct axs_value *value)
|
||||
{
|
||||
/* Used to hold the descriptions of operand expressions. */
|
||||
struct axs_value value1, value2;
|
||||
|
@ -1770,9 +1698,7 @@ gen_expr (pc, ax, value)
|
|||
which computes its value. Return the agent expression, and set
|
||||
*VALUE to describe its type, and whether it's an lvalue or rvalue. */
|
||||
struct agent_expr *
|
||||
expr_to_agent (expr, value)
|
||||
struct expression *expr;
|
||||
struct axs_value *value;
|
||||
expr_to_agent (struct expression *expr, struct axs_value *value)
|
||||
{
|
||||
struct cleanup *old_chain = 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. */
|
||||
struct agent_expr *
|
||||
expr_to_address_and_size (expr)
|
||||
struct expression *expr;
|
||||
expr_to_address_and_size (struct expression *expr)
|
||||
{
|
||||
struct axs_value 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
|
||||
registers it relies upon. */
|
||||
struct agent_expr *
|
||||
gen_trace_for_expr (scope, expr)
|
||||
CORE_ADDR scope;
|
||||
struct expression *expr;
|
||||
gen_trace_for_expr (CORE_ADDR scope, struct expression *expr)
|
||||
{
|
||||
struct cleanup *old_chain = 0;
|
||||
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. */
|
||||
|
||||
static void
|
||||
print_axs_value (f, value)
|
||||
struct ui_file *f;
|
||||
struct axs_value *value;
|
||||
print_axs_value (struct ui_file *f, struct axs_value *value)
|
||||
{
|
||||
switch (value->kind)
|
||||
{
|
||||
|
@ -1883,9 +1804,7 @@ print_axs_value (f, value)
|
|||
|
||||
|
||||
static void
|
||||
agent_command (exp, from_tty)
|
||||
char *exp;
|
||||
int from_tty;
|
||||
agent_command (char *exp, int from_tty)
|
||||
{
|
||||
struct cleanup *old_chain = 0;
|
||||
struct expression *expr;
|
||||
|
@ -1920,7 +1839,7 @@ agent_command (exp, from_tty)
|
|||
|
||||
void _initialize_ax_gdb (void);
|
||||
void
|
||||
_initialize_ax_gdb ()
|
||||
_initialize_ax_gdb (void)
|
||||
{
|
||||
add_cmd ("agent", class_maintenance, agent_command,
|
||||
"Translate an expression into remote agent bytecode.",
|
||||
|
|
|
@ -40,8 +40,7 @@ static void generic_ext (struct agent_expr *x, enum agent_op op, int n);
|
|||
|
||||
/* Allocate a new, empty agent expression. */
|
||||
struct agent_expr *
|
||||
new_agent_expr (scope)
|
||||
CORE_ADDR scope;
|
||||
new_agent_expr (CORE_ADDR scope)
|
||||
{
|
||||
struct agent_expr *x = xmalloc (sizeof (*x));
|
||||
x->len = 0;
|
||||
|
@ -55,8 +54,7 @@ new_agent_expr (scope)
|
|||
|
||||
/* Free a agent expression. */
|
||||
void
|
||||
free_agent_expr (x)
|
||||
struct agent_expr *x;
|
||||
free_agent_expr (struct agent_expr *x)
|
||||
{
|
||||
free (x->buf);
|
||||
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
|
||||
affect the length, just the allocated size. */
|
||||
static void
|
||||
grow_expr (x, n)
|
||||
struct agent_expr *x;
|
||||
int n;
|
||||
grow_expr (struct agent_expr *x, int n)
|
||||
{
|
||||
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
|
||||
expression X, in big-endian order. */
|
||||
static void
|
||||
append_const (x, val, n)
|
||||
struct agent_expr *x;
|
||||
LONGEST val;
|
||||
int n;
|
||||
append_const (struct agent_expr *x, LONGEST val, int n)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -115,9 +108,7 @@ append_const (x, val, n)
|
|||
/* Extract an N-byte big-endian unsigned integer from expression X at
|
||||
offset O. */
|
||||
static LONGEST
|
||||
read_const (x, o, n)
|
||||
struct agent_expr *x;
|
||||
int o, n;
|
||||
read_const (struct agent_expr *x, int o, int n)
|
||||
{
|
||||
int i;
|
||||
LONGEST accum = 0;
|
||||
|
@ -135,9 +126,7 @@ read_const (x, o, n)
|
|||
|
||||
/* Append a simple operator OP to EXPR. */
|
||||
void
|
||||
ax_simple (x, op)
|
||||
struct agent_expr *x;
|
||||
enum agent_op op;
|
||||
ax_simple (struct agent_expr *x, enum agent_op op)
|
||||
{
|
||||
grow_expr (x, 1);
|
||||
x->buf[x->len++] = op;
|
||||
|
@ -147,10 +136,7 @@ ax_simple (x, op)
|
|||
/* Append a sign-extension or zero-extension instruction to EXPR, to
|
||||
extend an N-bit value. */
|
||||
static void
|
||||
generic_ext (x, op, n)
|
||||
struct agent_expr *x;
|
||||
enum agent_op op;
|
||||
int n;
|
||||
generic_ext (struct agent_expr *x, enum agent_op op, int n)
|
||||
{
|
||||
/* N must fit in a byte. */
|
||||
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. */
|
||||
void
|
||||
ax_ext (x, n)
|
||||
struct agent_expr *x;
|
||||
int n;
|
||||
ax_ext (struct agent_expr *x, int 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. */
|
||||
void
|
||||
ax_zero_ext (x, n)
|
||||
struct agent_expr *x;
|
||||
int n;
|
||||
ax_zero_ext (struct agent_expr *x, int 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. */
|
||||
void
|
||||
ax_trace_quick (x, n)
|
||||
struct agent_expr *x;
|
||||
int n;
|
||||
ax_trace_quick (struct agent_expr *x, int n)
|
||||
{
|
||||
/* N must fit in a byte. */
|
||||
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
|
||||
to do the backpatching. */
|
||||
int
|
||||
ax_goto (x, op)
|
||||
struct agent_expr *x;
|
||||
enum agent_op op;
|
||||
ax_goto (struct agent_expr *x, enum agent_op op)
|
||||
{
|
||||
grow_expr (x, 3);
|
||||
x->buf[x->len + 0] = op;
|
||||
|
@ -225,10 +203,7 @@ ax_goto (x, op)
|
|||
ax_label (EXPR, PATCH, TARGET)
|
||||
to patch TARGET into the ax_goto instruction. */
|
||||
void
|
||||
ax_label (x, patch, target)
|
||||
struct agent_expr *x;
|
||||
int patch;
|
||||
int target;
|
||||
ax_label (struct agent_expr *x, int patch, int target)
|
||||
{
|
||||
/* Make sure the value is in range. Don't accept 0xffff as an
|
||||
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. */
|
||||
void
|
||||
ax_const_l (x, l)
|
||||
struct agent_expr *x;
|
||||
LONGEST l;
|
||||
ax_const_l (struct agent_expr *x, LONGEST l)
|
||||
{
|
||||
static enum agent_op ops[]
|
||||
=
|
||||
|
@ -274,9 +247,7 @@ ax_const_l (x, l)
|
|||
|
||||
|
||||
void
|
||||
ax_const_d (x, d)
|
||||
struct agent_expr *x;
|
||||
LONGEST d;
|
||||
ax_const_d (struct agent_expr *x, LONGEST d)
|
||||
{
|
||||
/* FIXME: floating-point support not present 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
|
||||
stack. */
|
||||
void
|
||||
ax_reg (x, reg)
|
||||
struct agent_expr *x;
|
||||
int reg;
|
||||
ax_reg (struct agent_expr *x, int reg)
|
||||
{
|
||||
/* Make sure the register number is in range. */
|
||||
if (reg < 0 || reg > 0xffff)
|
||||
|
@ -361,9 +330,7 @@ struct aop_map aop_map[] =
|
|||
|
||||
/* Disassemble the expression EXPR, writing to F. */
|
||||
void
|
||||
ax_print (f, x)
|
||||
struct ui_file *f;
|
||||
struct agent_expr *x;
|
||||
ax_print (struct ui_file *f, struct agent_expr *x)
|
||||
{
|
||||
int i;
|
||||
int is_float = 0;
|
||||
|
@ -411,9 +378,7 @@ ax_print (f, x)
|
|||
/* Given an agent expression AX, fill in an agent_reqs structure REQS
|
||||
describing it. */
|
||||
void
|
||||
ax_reqs (ax, reqs)
|
||||
struct agent_expr *ax;
|
||||
struct agent_reqs *reqs;
|
||||
ax_reqs (struct agent_expr *ax, struct agent_reqs *reqs)
|
||||
{
|
||||
int i;
|
||||
int height;
|
||||
|
|
192
gdb/blockframe.c
192
gdb/blockframe.c
|
@ -41,9 +41,7 @@ void _initialize_blockframe (void);
|
|||
frame is the outermost one and has no caller. */
|
||||
|
||||
int
|
||||
file_frame_chain_valid (chain, thisframe)
|
||||
CORE_ADDR chain;
|
||||
struct frame_info *thisframe;
|
||||
file_frame_chain_valid (CORE_ADDR chain, struct frame_info *thisframe)
|
||||
{
|
||||
return ((chain) != 0
|
||||
&& !inside_entry_file (FRAME_SAVED_PC (thisframe)));
|
||||
|
@ -54,9 +52,7 @@ file_frame_chain_valid (chain, thisframe)
|
|||
the comments in objfiles.h. */
|
||||
|
||||
int
|
||||
func_frame_chain_valid (chain, thisframe)
|
||||
CORE_ADDR chain;
|
||||
struct frame_info *thisframe;
|
||||
func_frame_chain_valid (CORE_ADDR chain, struct frame_info *thisframe)
|
||||
{
|
||||
return ((chain) != 0
|
||||
&& !inside_main_func ((thisframe)->pc)
|
||||
|
@ -66,9 +62,7 @@ func_frame_chain_valid (chain, thisframe)
|
|||
/* A very simple method of determining a valid frame */
|
||||
|
||||
int
|
||||
nonnull_frame_chain_valid (chain, thisframe)
|
||||
CORE_ADDR chain;
|
||||
struct frame_info *thisframe;
|
||||
nonnull_frame_chain_valid (CORE_ADDR chain, struct frame_info *thisframe)
|
||||
{
|
||||
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. */
|
||||
|
||||
int
|
||||
inside_entry_file (addr)
|
||||
CORE_ADDR addr;
|
||||
inside_entry_file (CORE_ADDR addr)
|
||||
{
|
||||
if (addr == 0)
|
||||
return 1;
|
||||
|
@ -110,8 +103,7 @@ inside_entry_file (addr)
|
|||
A PC of zero is always considered to be the bottom of the stack. */
|
||||
|
||||
int
|
||||
inside_main_func (pc)
|
||||
CORE_ADDR pc;
|
||||
inside_main_func (CORE_ADDR pc)
|
||||
{
|
||||
if (pc == 0)
|
||||
return 1;
|
||||
|
@ -149,8 +141,7 @@ inside_main_func (pc)
|
|||
A PC of zero is always considered to be the bottom of the stack. */
|
||||
|
||||
int
|
||||
inside_entry_func (pc)
|
||||
CORE_ADDR pc;
|
||||
inside_entry_func (CORE_ADDR pc)
|
||||
{
|
||||
if (pc == 0)
|
||||
return 1;
|
||||
|
@ -179,15 +170,13 @@ static struct frame_info *current_frame;
|
|||
static struct obstack frame_cache_obstack;
|
||||
|
||||
void *
|
||||
frame_obstack_alloc (size)
|
||||
unsigned long size;
|
||||
frame_obstack_alloc (unsigned long size)
|
||||
{
|
||||
return obstack_alloc (&frame_cache_obstack, size);
|
||||
}
|
||||
|
||||
void
|
||||
frame_saved_regs_zalloc (fi)
|
||||
struct frame_info *fi;
|
||||
frame_saved_regs_zalloc (struct frame_info *fi)
|
||||
{
|
||||
fi->saved_regs = (CORE_ADDR *)
|
||||
frame_obstack_alloc (SIZEOF_FRAME_SAVED_REGS);
|
||||
|
@ -198,7 +187,7 @@ frame_saved_regs_zalloc (fi)
|
|||
/* Return the innermost (currently executing) stack frame. */
|
||||
|
||||
struct frame_info *
|
||||
get_current_frame ()
|
||||
get_current_frame (void)
|
||||
{
|
||||
if (current_frame == NULL)
|
||||
{
|
||||
|
@ -211,8 +200,7 @@ get_current_frame ()
|
|||
}
|
||||
|
||||
void
|
||||
set_current_frame (frame)
|
||||
struct frame_info *frame;
|
||||
set_current_frame (struct frame_info *frame)
|
||||
{
|
||||
current_frame = frame;
|
||||
}
|
||||
|
@ -221,9 +209,7 @@ set_current_frame (frame)
|
|||
Always returns a non-NULL value. */
|
||||
|
||||
struct frame_info *
|
||||
create_new_frame (addr, pc)
|
||||
CORE_ADDR addr;
|
||||
CORE_ADDR pc;
|
||||
create_new_frame (CORE_ADDR addr, CORE_ADDR pc)
|
||||
{
|
||||
struct frame_info *fi;
|
||||
char *name;
|
||||
|
@ -252,8 +238,7 @@ create_new_frame (addr, pc)
|
|||
frame). */
|
||||
|
||||
struct frame_info *
|
||||
get_next_frame (frame)
|
||||
struct frame_info *frame;
|
||||
get_next_frame (struct frame_info *frame)
|
||||
{
|
||||
return frame->next;
|
||||
}
|
||||
|
@ -261,7 +246,7 @@ get_next_frame (frame)
|
|||
/* Flush the entire frame cache. */
|
||||
|
||||
void
|
||||
flush_cached_frames ()
|
||||
flush_cached_frames (void)
|
||||
{
|
||||
/* Since we can't really be sure what the first object allocated was */
|
||||
obstack_free (&frame_cache_obstack, 0);
|
||||
|
@ -275,7 +260,7 @@ flush_cached_frames ()
|
|||
/* Flush the frame cache, and start a new one if necessary. */
|
||||
|
||||
void
|
||||
reinit_frame_cache ()
|
||||
reinit_frame_cache (void)
|
||||
{
|
||||
flush_cached_frames ();
|
||||
|
||||
|
@ -291,8 +276,7 @@ reinit_frame_cache ()
|
|||
function. */
|
||||
|
||||
int
|
||||
frameless_look_for_prologue (frame)
|
||||
struct frame_info *frame;
|
||||
frameless_look_for_prologue (struct frame_info *frame)
|
||||
{
|
||||
CORE_ADDR func_start, after_prologue;
|
||||
|
||||
|
@ -335,8 +319,7 @@ frameless_look_for_prologue (frame)
|
|||
if there is no such frame. */
|
||||
|
||||
struct frame_info *
|
||||
get_prev_frame (next_frame)
|
||||
struct frame_info *next_frame;
|
||||
get_prev_frame (struct frame_info *next_frame)
|
||||
{
|
||||
CORE_ADDR address = 0;
|
||||
struct frame_info *prev;
|
||||
|
@ -496,8 +479,7 @@ get_prev_frame (next_frame)
|
|||
}
|
||||
|
||||
CORE_ADDR
|
||||
get_frame_pc (frame)
|
||||
struct frame_info *frame;
|
||||
get_frame_pc (struct frame_info *frame)
|
||||
{
|
||||
return frame->pc;
|
||||
}
|
||||
|
@ -509,9 +491,8 @@ get_frame_pc (frame)
|
|||
/* Find the addresses in which registers are saved in FRAME. */
|
||||
|
||||
void
|
||||
get_frame_saved_regs (frame, saved_regs_addr)
|
||||
struct frame_info *frame;
|
||||
struct frame_saved_regs *saved_regs_addr;
|
||||
get_frame_saved_regs (struct frame_info *frame,
|
||||
struct frame_saved_regs *saved_regs_addr)
|
||||
{
|
||||
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. */
|
||||
|
||||
struct block *
|
||||
get_frame_block (frame)
|
||||
struct frame_info *frame;
|
||||
get_frame_block (struct frame_info *frame)
|
||||
{
|
||||
CORE_ADDR pc;
|
||||
|
||||
|
@ -554,14 +534,13 @@ get_frame_block (frame)
|
|||
}
|
||||
|
||||
struct block *
|
||||
get_current_block ()
|
||||
get_current_block (void)
|
||||
{
|
||||
return block_for_pc (read_pc ());
|
||||
}
|
||||
|
||||
CORE_ADDR
|
||||
get_pc_function_start (pc)
|
||||
CORE_ADDR pc;
|
||||
get_pc_function_start (CORE_ADDR pc)
|
||||
{
|
||||
register struct block *bl;
|
||||
register struct symbol *symbol;
|
||||
|
@ -588,8 +567,7 @@ get_pc_function_start (pc)
|
|||
/* Return the symbol for the function executing in frame FRAME. */
|
||||
|
||||
struct symbol *
|
||||
get_frame_function (frame)
|
||||
struct frame_info *frame;
|
||||
get_frame_function (struct frame_info *frame)
|
||||
{
|
||||
register struct block *bl = get_frame_block (frame);
|
||||
if (bl == 0)
|
||||
|
@ -604,12 +582,8 @@ get_frame_function (frame)
|
|||
is NULL, we don't pass this information back to the caller. */
|
||||
|
||||
struct blockvector *
|
||||
blockvector_for_pc_sect (pc, section, pindex, symtab)
|
||||
register CORE_ADDR pc;
|
||||
struct sec *section;
|
||||
int *pindex;
|
||||
struct symtab *symtab;
|
||||
|
||||
blockvector_for_pc_sect (register CORE_ADDR pc, struct sec *section,
|
||||
int *pindex, struct symtab *symtab)
|
||||
{
|
||||
register struct block *b;
|
||||
register int bot, top, half;
|
||||
|
@ -662,9 +636,7 @@ blockvector_for_pc_sect (pc, section, pindex, symtab)
|
|||
Backward compatibility, no section. */
|
||||
|
||||
struct blockvector *
|
||||
blockvector_for_pc (pc, pindex)
|
||||
register CORE_ADDR pc;
|
||||
int *pindex;
|
||||
blockvector_for_pc (register CORE_ADDR pc, int *pindex)
|
||||
{
|
||||
return blockvector_for_pc_sect (pc, find_pc_mapped_section (pc),
|
||||
pindex, NULL);
|
||||
|
@ -674,9 +646,7 @@ blockvector_for_pc (pc, pindex)
|
|||
in the specified section, or 0 if there is none. */
|
||||
|
||||
struct block *
|
||||
block_for_pc_sect (pc, section)
|
||||
register CORE_ADDR pc;
|
||||
struct sec *section;
|
||||
block_for_pc_sect (register CORE_ADDR pc, struct sec *section)
|
||||
{
|
||||
register struct blockvector *bl;
|
||||
int index;
|
||||
|
@ -691,8 +661,7 @@ block_for_pc_sect (pc, section)
|
|||
or 0 if there is none. Backward compatibility, no section. */
|
||||
|
||||
struct block *
|
||||
block_for_pc (pc)
|
||||
register CORE_ADDR pc;
|
||||
block_for_pc (register CORE_ADDR 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. */
|
||||
|
||||
struct symbol *
|
||||
find_pc_sect_function (pc, section)
|
||||
CORE_ADDR pc;
|
||||
struct sec *section;
|
||||
find_pc_sect_function (CORE_ADDR pc, struct sec *section)
|
||||
{
|
||||
register struct block *b = block_for_pc_sect (pc, section);
|
||||
if (b == 0)
|
||||
|
@ -715,8 +682,7 @@ find_pc_sect_function (pc, section)
|
|||
Returns 0 if function is not known. Backward compatibility, no section */
|
||||
|
||||
struct symbol *
|
||||
find_pc_function (pc)
|
||||
CORE_ADDR pc;
|
||||
find_pc_function (CORE_ADDR 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. */
|
||||
|
||||
void
|
||||
clear_pc_function_cache ()
|
||||
clear_pc_function_cache (void)
|
||||
{
|
||||
cache_pc_function_low = 0;
|
||||
cache_pc_function_high = 0;
|
||||
|
@ -752,12 +718,8 @@ clear_pc_function_cache ()
|
|||
returns 0. */
|
||||
|
||||
int
|
||||
find_pc_sect_partial_function (pc, section, name, address, endaddr)
|
||||
CORE_ADDR pc;
|
||||
asection *section;
|
||||
char **name;
|
||||
CORE_ADDR *address;
|
||||
CORE_ADDR *endaddr;
|
||||
find_pc_sect_partial_function (CORE_ADDR pc, asection *section, char **name,
|
||||
CORE_ADDR *address, CORE_ADDR *endaddr)
|
||||
{
|
||||
struct partial_symtab *pst;
|
||||
struct symbol *f;
|
||||
|
@ -924,11 +886,8 @@ return_cached_value:
|
|||
/* Backward compatibility, no section argument */
|
||||
|
||||
int
|
||||
find_pc_partial_function (pc, name, address, endaddr)
|
||||
CORE_ADDR pc;
|
||||
char **name;
|
||||
CORE_ADDR *address;
|
||||
CORE_ADDR *endaddr;
|
||||
find_pc_partial_function (CORE_ADDR pc, char **name, CORE_ADDR *address,
|
||||
CORE_ADDR *endaddr)
|
||||
{
|
||||
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. */
|
||||
|
||||
struct frame_info *
|
||||
block_innermost_frame (block)
|
||||
struct block *block;
|
||||
block_innermost_frame (struct block *block)
|
||||
{
|
||||
struct frame_info *frame;
|
||||
register CORE_ADDR start;
|
||||
|
@ -968,8 +926,7 @@ block_innermost_frame (block)
|
|||
or NULL if no FRAME on the chain corresponds to CORE_ADDR. */
|
||||
|
||||
struct frame_info *
|
||||
find_frame_addr_in_frame_chain (frame_addr)
|
||||
CORE_ADDR frame_addr;
|
||||
find_frame_addr_in_frame_chain (CORE_ADDR frame_addr)
|
||||
{
|
||||
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. */
|
||||
|
||||
CORE_ADDR
|
||||
sigtramp_saved_pc (frame)
|
||||
struct frame_info *frame;
|
||||
sigtramp_saved_pc (struct frame_info *frame)
|
||||
{
|
||||
CORE_ADDR sigcontext_addr;
|
||||
char buf[TARGET_PTR_BIT / TARGET_CHAR_BIT];
|
||||
|
@ -1024,20 +980,16 @@ sigtramp_saved_pc (frame)
|
|||
extern CORE_ADDR text_end;
|
||||
|
||||
int
|
||||
pc_in_call_dummy_before_text_end (pc, sp, frame_address)
|
||||
CORE_ADDR pc;
|
||||
CORE_ADDR sp;
|
||||
CORE_ADDR frame_address;
|
||||
pc_in_call_dummy_before_text_end (CORE_ADDR pc, CORE_ADDR sp,
|
||||
CORE_ADDR frame_address)
|
||||
{
|
||||
return ((pc) >= text_end - CALL_DUMMY_LENGTH
|
||||
&& (pc) <= text_end + DECR_PC_AFTER_BREAK);
|
||||
}
|
||||
|
||||
int
|
||||
pc_in_call_dummy_after_text_end (pc, sp, frame_address)
|
||||
CORE_ADDR pc;
|
||||
CORE_ADDR sp;
|
||||
CORE_ADDR frame_address;
|
||||
pc_in_call_dummy_after_text_end (CORE_ADDR pc, CORE_ADDR sp,
|
||||
CORE_ADDR frame_address)
|
||||
{
|
||||
return ((pc) >= text_end
|
||||
&& (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. */
|
||||
|
||||
int
|
||||
pc_in_call_dummy_on_stack (pc, sp, frame_address)
|
||||
CORE_ADDR pc;
|
||||
CORE_ADDR sp;
|
||||
CORE_ADDR frame_address;
|
||||
pc_in_call_dummy_on_stack (CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address)
|
||||
{
|
||||
return (INNER_THAN ((sp), (pc))
|
||||
&& (frame_address != 0)
|
||||
|
@ -1073,10 +1022,8 @@ pc_in_call_dummy_on_stack (pc, sp, frame_address)
|
|||
}
|
||||
|
||||
int
|
||||
pc_in_call_dummy_at_entry_point (pc, sp, frame_address)
|
||||
CORE_ADDR pc;
|
||||
CORE_ADDR sp;
|
||||
CORE_ADDR frame_address;
|
||||
pc_in_call_dummy_at_entry_point (CORE_ADDR pc, CORE_ADDR sp,
|
||||
CORE_ADDR frame_address)
|
||||
{
|
||||
return ((pc) >= CALL_DUMMY_ADDRESS ()
|
||||
&& (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 */
|
||||
|
||||
char *
|
||||
generic_find_dummy_frame (pc, fp)
|
||||
CORE_ADDR pc;
|
||||
CORE_ADDR fp;
|
||||
generic_find_dummy_frame (CORE_ADDR pc, CORE_ADDR fp)
|
||||
{
|
||||
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 */
|
||||
|
||||
int
|
||||
generic_pc_in_call_dummy (pc, sp, fp)
|
||||
CORE_ADDR pc;
|
||||
CORE_ADDR sp;
|
||||
CORE_ADDR fp;
|
||||
generic_pc_in_call_dummy (CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR fp)
|
||||
{
|
||||
/* if find_dummy_frame succeeds, then PC is in a call dummy */
|
||||
/* 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 */
|
||||
|
||||
CORE_ADDR
|
||||
generic_read_register_dummy (pc, fp, regno)
|
||||
CORE_ADDR pc;
|
||||
CORE_ADDR fp;
|
||||
int regno;
|
||||
generic_read_register_dummy (CORE_ADDR pc, CORE_ADDR fp, int regno)
|
||||
{
|
||||
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. */
|
||||
|
||||
void
|
||||
generic_push_dummy_frame ()
|
||||
generic_push_dummy_frame (void)
|
||||
{
|
||||
struct dummy_frame *dummy_frame;
|
||||
CORE_ADDR fp = (get_current_frame ())->frame;
|
||||
|
@ -1217,8 +1156,7 @@ generic_push_dummy_frame ()
|
|||
}
|
||||
|
||||
void
|
||||
generic_save_dummy_frame_tos (sp)
|
||||
CORE_ADDR sp;
|
||||
generic_save_dummy_frame_tos (CORE_ADDR 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. */
|
||||
|
||||
void
|
||||
generic_pop_dummy_frame ()
|
||||
generic_pop_dummy_frame (void)
|
||||
{
|
||||
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 */
|
||||
|
||||
int
|
||||
generic_file_frame_chain_valid (fp, fi)
|
||||
CORE_ADDR fp;
|
||||
struct frame_info *fi;
|
||||
generic_file_frame_chain_valid (CORE_ADDR fp, struct frame_info *fi)
|
||||
{
|
||||
if (PC_IN_CALL_DUMMY (FRAME_SAVED_PC (fi), fp, fp))
|
||||
return 1; /* don't prune CALL_DUMMY frames */
|
||||
|
@ -1276,9 +1212,7 @@ generic_file_frame_chain_valid (fp, fi)
|
|||
}
|
||||
|
||||
int
|
||||
generic_func_frame_chain_valid (fp, fi)
|
||||
CORE_ADDR fp;
|
||||
struct frame_info *fi;
|
||||
generic_func_frame_chain_valid (CORE_ADDR fp, struct frame_info *fi)
|
||||
{
|
||||
if (PC_IN_CALL_DUMMY ((fi)->pc, fp, fp))
|
||||
return 1; /* don't prune CALL_DUMMY frames */
|
||||
|
@ -1294,14 +1228,8 @@ generic_func_frame_chain_valid (fp, fi)
|
|||
the frame being created */
|
||||
|
||||
void
|
||||
generic_fix_call_dummy (dummy, pc, fun, nargs, args, type, gcc_p)
|
||||
char *dummy;
|
||||
CORE_ADDR pc;
|
||||
CORE_ADDR fun;
|
||||
int nargs;
|
||||
struct value **args;
|
||||
struct type *type;
|
||||
int gcc_p;
|
||||
generic_fix_call_dummy (char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs,
|
||||
struct value **args, struct type *type, int gcc_p)
|
||||
{
|
||||
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. */
|
||||
|
||||
void
|
||||
generic_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval)
|
||||
char *raw_buffer;
|
||||
int *optimized;
|
||||
CORE_ADDR *addrp;
|
||||
struct frame_info *frame;
|
||||
int regnum;
|
||||
enum lval_type *lval;
|
||||
generic_get_saved_register (char *raw_buffer, int *optimized, CORE_ADDR *addrp,
|
||||
struct frame_info *frame, int regnum,
|
||||
enum lval_type *lval)
|
||||
{
|
||||
if (!target_has_registers)
|
||||
error ("No registers.");
|
||||
|
|
497
gdb/breakpoint.c
497
gdb/breakpoint.c
File diff suppressed because it is too large
Load diff
|
@ -1104,7 +1104,7 @@ merge_symbol_lists (struct pending **srclist, struct pending **targetlist)
|
|||
corresponding to a psymtab. */
|
||||
|
||||
void
|
||||
buildsym_init ()
|
||||
buildsym_init (void)
|
||||
{
|
||||
free_pendings = NULL;
|
||||
file_symbols = NULL;
|
||||
|
@ -1117,7 +1117,7 @@ buildsym_init ()
|
|||
file, e.g. a shared library). */
|
||||
|
||||
void
|
||||
buildsym_new_init ()
|
||||
buildsym_new_init (void)
|
||||
{
|
||||
buildsym_init ();
|
||||
}
|
||||
|
|
23
gdb/c-lang.c
23
gdb/c-lang.c
|
@ -35,10 +35,7 @@ static void c_emit_char (int c, struct ui_file * stream, int quoter);
|
|||
characters and strings is language specific. */
|
||||
|
||||
static void
|
||||
c_emit_char (c, stream, quoter)
|
||||
register int c;
|
||||
struct ui_file *stream;
|
||||
int quoter;
|
||||
c_emit_char (register int c, struct ui_file *stream, int quoter)
|
||||
{
|
||||
c &= 0xFF; /* Avoid sign bit follies */
|
||||
|
||||
|
@ -83,9 +80,7 @@ c_emit_char (c, stream, quoter)
|
|||
}
|
||||
|
||||
void
|
||||
c_printchar (c, stream)
|
||||
int c;
|
||||
struct ui_file *stream;
|
||||
c_printchar (int c, struct ui_file *stream)
|
||||
{
|
||||
fputc_filtered ('\'', stream);
|
||||
LA_EMIT_CHAR (c, stream, '\'');
|
||||
|
@ -99,12 +94,8 @@ c_printchar (c, stream)
|
|||
printing LENGTH characters, or if FORCE_ELLIPSES. */
|
||||
|
||||
void
|
||||
c_printstr (stream, string, length, width, force_ellipses)
|
||||
struct ui_file *stream;
|
||||
char *string;
|
||||
unsigned int length;
|
||||
int width;
|
||||
int force_ellipses;
|
||||
c_printstr (struct ui_file *stream, char *string, unsigned int length,
|
||||
int width, int force_ellipses)
|
||||
{
|
||||
register unsigned int i;
|
||||
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 */
|
||||
|
||||
struct type *
|
||||
c_create_fundamental_type (objfile, typeid)
|
||||
struct objfile *objfile;
|
||||
int typeid;
|
||||
c_create_fundamental_type (struct objfile *objfile, int typeid)
|
||||
{
|
||||
register struct type *type = NULL;
|
||||
|
||||
|
@ -521,7 +510,7 @@ const struct language_defn asm_language_defn =
|
|||
};
|
||||
|
||||
void
|
||||
_initialize_c_language ()
|
||||
_initialize_c_language (void)
|
||||
{
|
||||
add_language (&c_language_defn);
|
||||
add_language (&cplus_language_defn);
|
||||
|
|
|
@ -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. */
|
||||
|
||||
void
|
||||
c_typedef_print (type, new, stream)
|
||||
struct type *type;
|
||||
struct symbol *new;
|
||||
struct ui_file *stream;
|
||||
c_typedef_print (struct type *type, struct symbol *new, struct ui_file *stream)
|
||||
{
|
||||
CHECK_TYPEDEF (type);
|
||||
switch (current_language->la_language)
|
||||
|
@ -113,12 +110,8 @@ c_typedef_print (type, new, stream)
|
|||
/* LEVEL is the depth to indent lines by. */
|
||||
|
||||
void
|
||||
c_print_type (type, varstring, stream, show, level)
|
||||
struct type *type;
|
||||
char *varstring;
|
||||
struct ui_file *stream;
|
||||
int show;
|
||||
int level;
|
||||
c_print_type (struct type *type, char *varstring, struct ui_file *stream,
|
||||
int show, int level)
|
||||
{
|
||||
register enum type_code code;
|
||||
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 */
|
||||
|
||||
static void
|
||||
cp_type_print_derivation_info (stream, type)
|
||||
struct ui_file *stream;
|
||||
struct type *type;
|
||||
cp_type_print_derivation_info (struct ui_file *stream, struct type *type)
|
||||
{
|
||||
char *name;
|
||||
int i;
|
||||
|
@ -207,12 +198,8 @@ cp_type_print_derivation_info (stream, type)
|
|||
/* Print the C++ method arguments ARGS to the file STREAM. */
|
||||
|
||||
static void
|
||||
cp_type_print_method_args (args, prefix, varstring, staticp, stream)
|
||||
struct type **args;
|
||||
char *prefix;
|
||||
char *varstring;
|
||||
int staticp;
|
||||
struct ui_file *stream;
|
||||
cp_type_print_method_args (struct type **args, char *prefix, char *varstring,
|
||||
int staticp, struct ui_file *stream)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -256,11 +243,8 @@ cp_type_print_method_args (args, prefix, varstring, staticp, stream)
|
|||
SHOW is always zero on recursive calls. */
|
||||
|
||||
void
|
||||
c_type_print_varspec_prefix (type, stream, show, passed_a_ptr)
|
||||
struct type *type;
|
||||
struct ui_file *stream;
|
||||
int show;
|
||||
int passed_a_ptr;
|
||||
c_type_print_varspec_prefix (struct type *type, struct ui_file *stream,
|
||||
int show, int passed_a_ptr)
|
||||
{
|
||||
char *name;
|
||||
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 */
|
||||
|
||||
static void
|
||||
c_type_print_cv_qualifier (type, stream, need_pre_space, need_post_space)
|
||||
struct type *type;
|
||||
struct ui_file *stream;
|
||||
int need_pre_space;
|
||||
int need_post_space;
|
||||
c_type_print_cv_qualifier (struct type *type, struct ui_file *stream,
|
||||
int need_pre_space, int need_post_space)
|
||||
{
|
||||
int flag = 0;
|
||||
|
||||
|
@ -386,9 +367,7 @@ c_type_print_cv_qualifier (type, stream, need_pre_space, need_post_space)
|
|||
|
||||
|
||||
static void
|
||||
c_type_print_args (type, stream)
|
||||
struct type *type;
|
||||
struct ui_file *stream;
|
||||
c_type_print_args (struct type *type, struct ui_file *stream)
|
||||
{
|
||||
int i;
|
||||
struct type **args;
|
||||
|
@ -567,12 +546,8 @@ remove_qualifiers (char *qid)
|
|||
Args work like c_type_print_varspec_prefix. */
|
||||
|
||||
void
|
||||
c_type_print_varspec_suffix (type, stream, show, passed_a_ptr, demangled_args)
|
||||
struct type *type;
|
||||
struct ui_file *stream;
|
||||
int show;
|
||||
int passed_a_ptr;
|
||||
int demangled_args;
|
||||
c_type_print_varspec_suffix (struct type *type, struct ui_file *stream,
|
||||
int show, int passed_a_ptr, int demangled_args)
|
||||
{
|
||||
if (type == 0)
|
||||
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. */
|
||||
|
||||
void
|
||||
c_type_print_base (type, stream, show, level)
|
||||
struct type *type;
|
||||
struct ui_file *stream;
|
||||
int show;
|
||||
int level;
|
||||
c_type_print_base (struct type *type, struct ui_file *stream, int show,
|
||||
int level)
|
||||
{
|
||||
register int i;
|
||||
register int len;
|
||||
|
|
|
@ -44,17 +44,9 @@
|
|||
The PRETTY parameter controls prettyprinting. */
|
||||
|
||||
int
|
||||
c_val_print (type, valaddr, embedded_offset, address, stream, format, deref_ref, recurse,
|
||||
pretty)
|
||||
struct type *type;
|
||||
char *valaddr;
|
||||
int embedded_offset;
|
||||
CORE_ADDR address;
|
||||
struct ui_file *stream;
|
||||
int format;
|
||||
int deref_ref;
|
||||
int recurse;
|
||||
enum val_prettyprint pretty;
|
||||
c_val_print (struct type *type, 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 */
|
||||
unsigned len;
|
||||
|
@ -454,11 +446,8 @@ c_val_print (type, valaddr, embedded_offset, address, stream, format, deref_ref,
|
|||
}
|
||||
|
||||
int
|
||||
c_value_print (val, stream, format, pretty)
|
||||
value_ptr val;
|
||||
struct ui_file *stream;
|
||||
int format;
|
||||
enum val_prettyprint pretty;
|
||||
c_value_print (value_ptr val, struct ui_file *stream, int format,
|
||||
enum val_prettyprint pretty)
|
||||
{
|
||||
struct type *type = VALUE_TYPE (val);
|
||||
struct type *real_type;
|
||||
|
|
117
gdb/ch-exp.c
117
gdb/ch-exp.c
|
@ -200,7 +200,7 @@ static YYSTYPE val_buffer[MAX_LOOK_AHEAD + 1];
|
|||
/*int current_token, lookahead_token; */
|
||||
|
||||
INLINE static enum ch_terminal
|
||||
PEEK_TOKEN ()
|
||||
PEEK_TOKEN (void)
|
||||
{
|
||||
if (terminal_buffer[0] == TOKEN_NOT_READ)
|
||||
{
|
||||
|
@ -213,8 +213,7 @@ PEEK_TOKEN ()
|
|||
#define PEEK_TOKEN1() peek_token_(1)
|
||||
#define PEEK_TOKEN2() peek_token_(2)
|
||||
static enum ch_terminal
|
||||
peek_token_ (i)
|
||||
int i;
|
||||
peek_token_ (int i)
|
||||
{
|
||||
if (i > MAX_LOOK_AHEAD)
|
||||
internal_error ("ch-exp.c - too much lookahead");
|
||||
|
@ -229,9 +228,7 @@ peek_token_ (i)
|
|||
#if 0
|
||||
|
||||
static void
|
||||
pushback_token (code, node)
|
||||
enum ch_terminal code;
|
||||
YYSTYPE node;
|
||||
pushback_token (enum ch_terminal code, YYSTYPE node)
|
||||
{
|
||||
int i;
|
||||
if (terminal_buffer[MAX_LOOK_AHEAD] != TOKEN_NOT_READ)
|
||||
|
@ -248,7 +245,7 @@ pushback_token (code, node)
|
|||
#endif
|
||||
|
||||
static void
|
||||
forward_token_ ()
|
||||
forward_token_ (void)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < MAX_LOOK_AHEAD; i++)
|
||||
|
@ -264,8 +261,7 @@ forward_token_ ()
|
|||
if it isn't TOKEN, the parser is broken. */
|
||||
|
||||
static void
|
||||
require (token)
|
||||
enum ch_terminal token;
|
||||
require (enum ch_terminal token)
|
||||
{
|
||||
if (PEEK_TOKEN () != token)
|
||||
{
|
||||
|
@ -275,8 +271,7 @@ require (token)
|
|||
}
|
||||
|
||||
static int
|
||||
check_token (token)
|
||||
enum ch_terminal token;
|
||||
check_token (enum ch_terminal token)
|
||||
{
|
||||
if (PEEK_TOKEN () != token)
|
||||
return 0;
|
||||
|
@ -288,9 +283,7 @@ check_token (token)
|
|||
else return 1.
|
||||
*/
|
||||
static int
|
||||
expect (token, message)
|
||||
enum ch_terminal token;
|
||||
char *message;
|
||||
expect (enum ch_terminal token, char *message)
|
||||
{
|
||||
if (PEEK_TOKEN () != token)
|
||||
{
|
||||
|
@ -347,7 +340,7 @@ parse_opt_name_string (allow_all)
|
|||
}
|
||||
|
||||
static tree
|
||||
parse_simple_name_string ()
|
||||
parse_simple_name_string (void)
|
||||
{
|
||||
int token = PEEK_TOKEN ();
|
||||
tree name;
|
||||
|
@ -362,7 +355,7 @@ parse_simple_name_string ()
|
|||
}
|
||||
|
||||
static tree
|
||||
parse_name_string ()
|
||||
parse_name_string (void)
|
||||
{
|
||||
tree name = parse_opt_name_string (0);
|
||||
if (name)
|
||||
|
@ -377,7 +370,7 @@ parse_name_string ()
|
|||
Returns if pass 2: a decl or value for identifier. */
|
||||
|
||||
static tree
|
||||
parse_name ()
|
||||
parse_name (void)
|
||||
{
|
||||
tree name = parse_name_string ();
|
||||
if (pass == 1 || ignoring)
|
||||
|
@ -404,8 +397,7 @@ parse_name ()
|
|||
|
||||
#if 0
|
||||
static void
|
||||
pushback_paren_expr (expr)
|
||||
tree expr;
|
||||
pushback_paren_expr (tree expr)
|
||||
{
|
||||
if (pass == 1 && !ignoring)
|
||||
expr = build1 (PAREN_EXPR, NULL_TREE, expr);
|
||||
|
@ -416,7 +408,7 @@ pushback_paren_expr (expr)
|
|||
/* Matches: <case label> */
|
||||
|
||||
static void
|
||||
parse_case_label ()
|
||||
parse_case_label (void)
|
||||
{
|
||||
if (check_token (ELSE))
|
||||
error ("ELSE in tuples labels not implemented");
|
||||
|
@ -430,7 +422,7 @@ parse_case_label ()
|
|||
}
|
||||
|
||||
static int
|
||||
parse_opt_untyped_expr ()
|
||||
parse_opt_untyped_expr (void)
|
||||
{
|
||||
switch (PEEK_TOKEN ())
|
||||
{
|
||||
|
@ -445,7 +437,7 @@ parse_opt_untyped_expr ()
|
|||
}
|
||||
|
||||
static void
|
||||
parse_unary_call ()
|
||||
parse_unary_call (void)
|
||||
{
|
||||
FORWARD_TOKEN ();
|
||||
expect ('(', NULL);
|
||||
|
@ -458,7 +450,7 @@ parse_unary_call ()
|
|||
#if 0
|
||||
|
||||
static struct type *
|
||||
parse_mode_call ()
|
||||
parse_mode_call (void)
|
||||
{
|
||||
struct type *type;
|
||||
FORWARD_TOKEN ();
|
||||
|
@ -474,7 +466,7 @@ parse_mode_call ()
|
|||
#endif
|
||||
|
||||
static struct type *
|
||||
parse_mode_or_normal_call ()
|
||||
parse_mode_or_normal_call (void)
|
||||
{
|
||||
struct type *type;
|
||||
FORWARD_TOKEN ();
|
||||
|
@ -497,7 +489,7 @@ parse_mode_or_normal_call ()
|
|||
Assume we have parsed the function, and are at the '('. */
|
||||
|
||||
static void
|
||||
parse_call ()
|
||||
parse_call (void)
|
||||
{
|
||||
int arg_count;
|
||||
require ('(');
|
||||
|
@ -534,7 +526,7 @@ parse_call ()
|
|||
}
|
||||
|
||||
static void
|
||||
parse_named_record_element ()
|
||||
parse_named_record_element (void)
|
||||
{
|
||||
struct stoken label;
|
||||
char buf[256];
|
||||
|
@ -556,8 +548,7 @@ parse_named_record_element ()
|
|||
/* Returns one or more TREE_LIST nodes, in reverse order. */
|
||||
|
||||
static void
|
||||
parse_tuple_element (type)
|
||||
struct type *type;
|
||||
parse_tuple_element (struct type *type)
|
||||
{
|
||||
if (PEEK_TOKEN () == DOT_FIELD_NAME)
|
||||
{
|
||||
|
@ -622,8 +613,7 @@ parse_tuple_element (type)
|
|||
/* Matches: a COMMA-separated list of tuple elements.
|
||||
Returns a list (of TREE_LIST nodes). */
|
||||
static void
|
||||
parse_opt_element_list (type)
|
||||
struct type *type;
|
||||
parse_opt_element_list (struct type *type)
|
||||
{
|
||||
arglist_len = 0;
|
||||
if (PEEK_TOKEN () == ']')
|
||||
|
@ -643,8 +633,7 @@ parse_opt_element_list (type)
|
|||
If modename is non-NULL it prefixed the tuple. */
|
||||
|
||||
static void
|
||||
parse_tuple (mode)
|
||||
struct type *mode;
|
||||
parse_tuple (struct type *mode)
|
||||
{
|
||||
struct type *type;
|
||||
if (mode)
|
||||
|
@ -672,7 +661,7 @@ parse_tuple (mode)
|
|||
}
|
||||
|
||||
static void
|
||||
parse_primval ()
|
||||
parse_primval (void)
|
||||
{
|
||||
struct type *type;
|
||||
enum exp_opcode op;
|
||||
|
@ -942,7 +931,7 @@ parse_primval ()
|
|||
}
|
||||
|
||||
static void
|
||||
parse_operand6 ()
|
||||
parse_operand6 (void)
|
||||
{
|
||||
if (check_token (RECEIVE))
|
||||
{
|
||||
|
@ -959,7 +948,7 @@ parse_operand6 ()
|
|||
}
|
||||
|
||||
static void
|
||||
parse_operand5 ()
|
||||
parse_operand5 (void)
|
||||
{
|
||||
enum exp_opcode op;
|
||||
/* We are supposed to be looking for a <string repetition operator>,
|
||||
|
@ -990,7 +979,7 @@ parse_operand5 ()
|
|||
}
|
||||
|
||||
static void
|
||||
parse_operand4 ()
|
||||
parse_operand4 (void)
|
||||
{
|
||||
enum exp_opcode op;
|
||||
parse_operand5 ();
|
||||
|
@ -1020,7 +1009,7 @@ parse_operand4 ()
|
|||
}
|
||||
|
||||
static void
|
||||
parse_operand3 ()
|
||||
parse_operand3 (void)
|
||||
{
|
||||
enum exp_opcode op;
|
||||
parse_operand4 ();
|
||||
|
@ -1047,7 +1036,7 @@ parse_operand3 ()
|
|||
}
|
||||
|
||||
static void
|
||||
parse_operand2 ()
|
||||
parse_operand2 (void)
|
||||
{
|
||||
enum exp_opcode op;
|
||||
parse_operand3 ();
|
||||
|
@ -1091,7 +1080,7 @@ parse_operand2 ()
|
|||
}
|
||||
|
||||
static void
|
||||
parse_operand1 ()
|
||||
parse_operand1 (void)
|
||||
{
|
||||
enum exp_opcode op;
|
||||
parse_operand2 ();
|
||||
|
@ -1115,7 +1104,7 @@ parse_operand1 ()
|
|||
}
|
||||
|
||||
static void
|
||||
parse_operand0 ()
|
||||
parse_operand0 (void)
|
||||
{
|
||||
enum exp_opcode op;
|
||||
parse_operand1 ();
|
||||
|
@ -1142,7 +1131,7 @@ parse_operand0 ()
|
|||
}
|
||||
|
||||
static void
|
||||
parse_expr ()
|
||||
parse_expr (void)
|
||||
{
|
||||
parse_operand0 ();
|
||||
if (check_token (GDB_ASSIGNMENT))
|
||||
|
@ -1153,14 +1142,14 @@ parse_expr ()
|
|||
}
|
||||
|
||||
static void
|
||||
parse_then_alternative ()
|
||||
parse_then_alternative (void)
|
||||
{
|
||||
expect (THEN, "missing 'THEN' in 'IF' expression");
|
||||
parse_expr ();
|
||||
}
|
||||
|
||||
static void
|
||||
parse_else_alternative ()
|
||||
parse_else_alternative (void)
|
||||
{
|
||||
if (check_token (ELSIF))
|
||||
parse_if_expression_body ();
|
||||
|
@ -1173,7 +1162,7 @@ parse_else_alternative ()
|
|||
/* Matches: <boolean expression> <then alternative> <else alternative> */
|
||||
|
||||
static void
|
||||
parse_if_expression_body ()
|
||||
parse_if_expression_body (void)
|
||||
{
|
||||
parse_expr ();
|
||||
parse_then_alternative ();
|
||||
|
@ -1182,7 +1171,7 @@ parse_if_expression_body ()
|
|||
}
|
||||
|
||||
static void
|
||||
parse_if_expression ()
|
||||
parse_if_expression (void)
|
||||
{
|
||||
require (IF);
|
||||
parse_if_expression_body ();
|
||||
|
@ -1196,7 +1185,7 @@ parse_if_expression ()
|
|||
You should call convert() to fix up the <untyped_expr>. */
|
||||
|
||||
static void
|
||||
parse_untyped_expr ()
|
||||
parse_untyped_expr (void)
|
||||
{
|
||||
switch (PEEK_TOKEN ())
|
||||
{
|
||||
|
@ -1226,7 +1215,7 @@ parse_untyped_expr ()
|
|||
}
|
||||
|
||||
int
|
||||
chill_parse ()
|
||||
chill_parse (void)
|
||||
{
|
||||
terminal_buffer[0] = TOKEN_NOT_READ;
|
||||
if (PEEK_TOKEN () == TYPENAME && PEEK_TOKEN1 () == END_TOKEN)
|
||||
|
@ -1271,8 +1260,7 @@ static int tempbufindex; /* Current index into buffer */
|
|||
on demand. */
|
||||
|
||||
static void
|
||||
growbuf_by_size (count)
|
||||
int count;
|
||||
growbuf_by_size (int count)
|
||||
{
|
||||
int growby;
|
||||
|
||||
|
@ -1293,7 +1281,7 @@ growbuf_by_size (count)
|
|||
in symbol table lookups. If not successful, returns NULL. */
|
||||
|
||||
static char *
|
||||
match_simple_name_string ()
|
||||
match_simple_name_string (void)
|
||||
{
|
||||
char *tokptr = lexptr;
|
||||
|
||||
|
@ -1321,10 +1309,7 @@ match_simple_name_string ()
|
|||
digits we have encountered. */
|
||||
|
||||
static int
|
||||
decode_integer_value (base, tokptrptr, ivalptr)
|
||||
int base;
|
||||
char **tokptrptr;
|
||||
LONGEST *ivalptr;
|
||||
decode_integer_value (int base, char **tokptrptr, LONGEST *ivalptr)
|
||||
{
|
||||
char *tokptr = *tokptrptr;
|
||||
int temp;
|
||||
|
@ -1395,9 +1380,7 @@ decode_integer_value (base, tokptrptr, ivalptr)
|
|||
}
|
||||
|
||||
static int
|
||||
decode_integer_literal (valptr, tokptrptr)
|
||||
LONGEST *valptr;
|
||||
char **tokptrptr;
|
||||
decode_integer_literal (LONGEST *valptr, char **tokptrptr)
|
||||
{
|
||||
char *tokptr = *tokptrptr;
|
||||
int base = 0;
|
||||
|
@ -1480,7 +1463,7 @@ decode_integer_literal (valptr, tokptrptr)
|
|||
legal floating point value. */
|
||||
|
||||
static enum ch_terminal
|
||||
match_float_literal ()
|
||||
match_float_literal (void)
|
||||
{
|
||||
char *tokptr = lexptr;
|
||||
char *buf;
|
||||
|
@ -1610,7 +1593,7 @@ convert_float:
|
|||
a string, it is simply doubled (I.E. "this""is""one""string") */
|
||||
|
||||
static enum ch_terminal
|
||||
match_string_literal ()
|
||||
match_string_literal (void)
|
||||
{
|
||||
char *tokptr = lexptr;
|
||||
int in_ctrlseq = 0;
|
||||
|
@ -1706,7 +1689,7 @@ match_string_literal ()
|
|||
*/
|
||||
|
||||
static enum ch_terminal
|
||||
match_character_literal ()
|
||||
match_character_literal (void)
|
||||
{
|
||||
char *tokptr = lexptr;
|
||||
LONGEST ival = 0;
|
||||
|
@ -1788,7 +1771,7 @@ match_character_literal ()
|
|||
in any integer literal. */
|
||||
|
||||
static enum ch_terminal
|
||||
match_integer_literal ()
|
||||
match_integer_literal (void)
|
||||
{
|
||||
char *tokptr = lexptr;
|
||||
LONGEST ival;
|
||||
|
@ -1817,7 +1800,7 @@ match_integer_literal ()
|
|||
in any bit-string literal. */
|
||||
|
||||
static enum ch_terminal
|
||||
match_bitstring_literal ()
|
||||
match_bitstring_literal (void)
|
||||
{
|
||||
register char *tokptr = lexptr;
|
||||
int bitoffset = 0;
|
||||
|
@ -1989,7 +1972,7 @@ static const struct token tokentab2[] =
|
|||
operators used are compatible. */
|
||||
|
||||
static enum ch_terminal
|
||||
ch_lex ()
|
||||
ch_lex (void)
|
||||
{
|
||||
unsigned int i;
|
||||
enum ch_terminal token;
|
||||
|
@ -2226,9 +2209,8 @@ ch_lex ()
|
|||
}
|
||||
|
||||
static void
|
||||
write_lower_upper_value (opcode, type)
|
||||
enum exp_opcode opcode; /* Either UNOP_LOWER or UNOP_UPPER */
|
||||
struct type *type;
|
||||
write_lower_upper_value (enum exp_opcode opcode, /* Either UNOP_LOWER or UNOP_UPPER */
|
||||
struct type *type)
|
||||
{
|
||||
if (type == NULL)
|
||||
write_exp_elt_opcode (opcode);
|
||||
|
@ -2244,8 +2226,7 @@ write_lower_upper_value (opcode, type)
|
|||
}
|
||||
|
||||
void
|
||||
chill_error (msg)
|
||||
char *msg;
|
||||
chill_error (char *msg)
|
||||
{
|
||||
/* Never used. */
|
||||
}
|
||||
|
|
|
@ -53,8 +53,7 @@ static void chill_printchar (int, struct ui_file *);
|
|||
characters to derive the demangled form. */
|
||||
|
||||
char *
|
||||
chill_demangle (mangled)
|
||||
const char *mangled;
|
||||
chill_demangle (const char *mangled)
|
||||
{
|
||||
const char *joiner = NULL;
|
||||
char *demangled;
|
||||
|
@ -81,9 +80,7 @@ chill_demangle (mangled)
|
|||
}
|
||||
|
||||
static void
|
||||
chill_printchar (c, stream)
|
||||
register int c;
|
||||
struct ui_file *stream;
|
||||
chill_printchar (register int c, struct ui_file *stream)
|
||||
{
|
||||
c &= 0xFF; /* Avoid sign bit follies */
|
||||
|
||||
|
@ -112,12 +109,8 @@ chill_printchar (c, stream)
|
|||
*/
|
||||
|
||||
static void
|
||||
chill_printstr (stream, string, length, width, force_ellipses)
|
||||
struct ui_file *stream;
|
||||
char *string;
|
||||
unsigned int length;
|
||||
int width;
|
||||
int force_ellipses;
|
||||
chill_printstr (struct ui_file *stream, char *string, unsigned int length,
|
||||
int width, int force_ellipses)
|
||||
{
|
||||
register unsigned int i;
|
||||
unsigned int things_printed = 0;
|
||||
|
@ -228,9 +221,7 @@ chill_printstr (stream, string, length, width, force_ellipses)
|
|||
}
|
||||
|
||||
static struct type *
|
||||
chill_create_fundamental_type (objfile, typeid)
|
||||
struct objfile *objfile;
|
||||
int typeid;
|
||||
chill_create_fundamental_type (struct objfile *objfile, int typeid)
|
||||
{
|
||||
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. */
|
||||
|
||||
LONGEST
|
||||
type_lower_upper (op, type, result_type)
|
||||
enum exp_opcode op; /* Either UNOP_LOWER or UNOP_UPPER */
|
||||
struct type *type;
|
||||
struct type **result_type;
|
||||
type_lower_upper (enum exp_opcode op, /* Either UNOP_LOWER or UNOP_UPPER */
|
||||
struct type *type, struct type **result_type)
|
||||
{
|
||||
LONGEST low, high;
|
||||
*result_type = type;
|
||||
|
@ -400,8 +389,7 @@ type_lower_upper (op, type, result_type)
|
|||
}
|
||||
|
||||
static value_ptr
|
||||
value_chill_length (val)
|
||||
value_ptr val;
|
||||
value_chill_length (value_ptr val)
|
||||
{
|
||||
LONGEST tmp;
|
||||
struct type *type = VALUE_TYPE (val);
|
||||
|
@ -429,8 +417,7 @@ value_chill_length (val)
|
|||
}
|
||||
|
||||
static value_ptr
|
||||
value_chill_card (val)
|
||||
value_ptr val;
|
||||
value_chill_card (value_ptr val)
|
||||
{
|
||||
LONGEST tmp = 0;
|
||||
struct type *type = VALUE_TYPE (val);
|
||||
|
@ -454,9 +441,7 @@ value_chill_card (val)
|
|||
}
|
||||
|
||||
static value_ptr
|
||||
value_chill_max_min (op, val)
|
||||
enum exp_opcode op;
|
||||
value_ptr val;
|
||||
value_chill_max_min (enum exp_opcode op, value_ptr val)
|
||||
{
|
||||
LONGEST tmp = 0;
|
||||
struct type *type = VALUE_TYPE (val);
|
||||
|
@ -509,11 +494,9 @@ value_chill_max_min (op, val)
|
|||
}
|
||||
|
||||
static value_ptr
|
||||
evaluate_subexp_chill (expect_type, exp, pos, noside)
|
||||
struct type *expect_type;
|
||||
register struct expression *exp;
|
||||
register int *pos;
|
||||
enum noside noside;
|
||||
evaluate_subexp_chill (struct type *expect_type,
|
||||
register struct expression *exp, register int *pos,
|
||||
enum noside noside)
|
||||
{
|
||||
int pc = *pos;
|
||||
struct type *type;
|
||||
|
@ -649,7 +632,7 @@ const struct language_defn chill_language_defn =
|
|||
/* Initialization for Chill */
|
||||
|
||||
void
|
||||
_initialize_chill_language ()
|
||||
_initialize_chill_language (void)
|
||||
{
|
||||
builtin_type_chill_bool =
|
||||
init_type (TYPE_CODE_BOOL, TARGET_CHAR_BIT / TARGET_CHAR_BIT,
|
||||
|
|
|
@ -40,12 +40,8 @@
|
|||
static void chill_type_print_base (struct type *, struct ui_file *, int, int);
|
||||
|
||||
void
|
||||
chill_print_type (type, varstring, stream, show, level)
|
||||
struct type *type;
|
||||
char *varstring;
|
||||
struct ui_file *stream;
|
||||
int show;
|
||||
int level;
|
||||
chill_print_type (struct type *type, char *varstring, struct ui_file *stream,
|
||||
int show, int level)
|
||||
{
|
||||
if (varstring != NULL && *varstring != '\0')
|
||||
{
|
||||
|
@ -68,11 +64,8 @@ chill_print_type (type, varstring, stream, show, level)
|
|||
We increase it for some recursive calls. */
|
||||
|
||||
static void
|
||||
chill_type_print_base (type, stream, show, level)
|
||||
struct type *type;
|
||||
struct ui_file *stream;
|
||||
int show;
|
||||
int level;
|
||||
chill_type_print_base (struct type *type, struct ui_file *stream, int show,
|
||||
int level)
|
||||
{
|
||||
register int len;
|
||||
register int i;
|
||||
|
|
|
@ -53,10 +53,7 @@ static void chill_val_print_array_elements (struct type *, char *,
|
|||
decimal integer values. */
|
||||
|
||||
static void
|
||||
chill_print_type_scalar (type, val, stream)
|
||||
struct type *type;
|
||||
LONGEST val;
|
||||
struct ui_file *stream;
|
||||
chill_print_type_scalar (struct type *type, LONGEST val, struct ui_file *stream)
|
||||
{
|
||||
switch (TYPE_CODE (type))
|
||||
{
|
||||
|
@ -99,16 +96,10 @@ chill_print_type_scalar (type, val, stream)
|
|||
element indexes (in Chill syntax). */
|
||||
|
||||
static void
|
||||
chill_val_print_array_elements (type, valaddr, address, stream,
|
||||
format, deref_ref, recurse, pretty)
|
||||
struct type *type;
|
||||
char *valaddr;
|
||||
CORE_ADDR address;
|
||||
struct ui_file *stream;
|
||||
int format;
|
||||
int deref_ref;
|
||||
int recurse;
|
||||
enum val_prettyprint pretty;
|
||||
chill_val_print_array_elements (struct type *type, char *valaddr,
|
||||
CORE_ADDR address, struct ui_file *stream,
|
||||
int format, int deref_ref, int recurse,
|
||||
enum val_prettyprint pretty)
|
||||
{
|
||||
unsigned int i = 0;
|
||||
unsigned int things_printed = 0;
|
||||
|
@ -199,17 +190,9 @@ chill_val_print_array_elements (type, valaddr, address, stream,
|
|||
The PRETTY parameter controls prettyprinting. */
|
||||
|
||||
int
|
||||
chill_val_print (type, valaddr, embedded_offset, address,
|
||||
stream, format, deref_ref, recurse, pretty)
|
||||
struct type *type;
|
||||
char *valaddr;
|
||||
int embedded_offset;
|
||||
CORE_ADDR address;
|
||||
struct ui_file *stream;
|
||||
int format;
|
||||
int deref_ref;
|
||||
int recurse;
|
||||
enum val_prettyprint pretty;
|
||||
chill_val_print (struct type *type, 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;
|
||||
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. */
|
||||
|
||||
static void
|
||||
chill_print_value_fields (type, valaddr, stream, format, recurse, pretty,
|
||||
dont_print)
|
||||
struct type *type;
|
||||
char *valaddr;
|
||||
struct ui_file *stream;
|
||||
int format;
|
||||
int recurse;
|
||||
enum val_prettyprint pretty;
|
||||
struct type **dont_print;
|
||||
chill_print_value_fields (struct type *type, char *valaddr,
|
||||
struct ui_file *stream, int format, int recurse,
|
||||
enum val_prettyprint pretty, struct type **dont_print)
|
||||
{
|
||||
int i, len;
|
||||
int fields_seen = 0;
|
||||
|
@ -586,11 +563,8 @@ chill_print_value_fields (type, valaddr, stream, format, recurse, pretty,
|
|||
}
|
||||
|
||||
int
|
||||
chill_value_print (val, stream, format, pretty)
|
||||
value_ptr val;
|
||||
struct ui_file *stream;
|
||||
int format;
|
||||
enum val_prettyprint pretty;
|
||||
chill_value_print (value_ptr val, struct ui_file *stream, int format,
|
||||
enum val_prettyprint pretty)
|
||||
{
|
||||
struct type *type = VALUE_TYPE (val);
|
||||
struct type *real_type = check_typedef (type);
|
||||
|
|
|
@ -102,18 +102,14 @@ static void out_field_fmt (struct ui_out *uiout, int fldno, char *fldname,
|
|||
/* Mark beginning of a table */
|
||||
|
||||
void
|
||||
cli_table_begin (uiout, nbrofcols, tblid)
|
||||
struct ui_out *uiout;
|
||||
int nbrofcols;
|
||||
char *tblid;
|
||||
cli_table_begin (struct ui_out *uiout, int nbrofcols, char *tblid)
|
||||
{
|
||||
}
|
||||
|
||||
/* Mark beginning of a table body */
|
||||
|
||||
void
|
||||
cli_table_body (uiout)
|
||||
struct ui_out *uiout;
|
||||
cli_table_body (struct ui_out *uiout)
|
||||
{
|
||||
/* first, close the table header line */
|
||||
cli_text (uiout, "\n");
|
||||
|
@ -122,19 +118,15 @@ cli_table_body (uiout)
|
|||
/* Mark end of a table */
|
||||
|
||||
void
|
||||
cli_table_end (uiout)
|
||||
struct ui_out *uiout;
|
||||
cli_table_end (struct ui_out *uiout)
|
||||
{
|
||||
}
|
||||
|
||||
/* Specify table header */
|
||||
|
||||
void
|
||||
cli_table_header (uiout, width, alignment, colhdr)
|
||||
struct ui_out *uiout;
|
||||
int width;
|
||||
enum ui_align alignment;
|
||||
char *colhdr;
|
||||
cli_table_header (struct ui_out *uiout, int width, enum ui_align alignment,
|
||||
char *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 */
|
||||
|
||||
void
|
||||
cli_list_begin (uiout, list_flag, lstid)
|
||||
struct ui_out *uiout;
|
||||
int list_flag;
|
||||
char *lstid;
|
||||
cli_list_begin (struct ui_out *uiout, int list_flag, char *lstid)
|
||||
{
|
||||
}
|
||||
|
||||
/* Mark end of a list */
|
||||
|
||||
void
|
||||
cli_list_end (uiout, list_flag)
|
||||
struct ui_out *uiout;
|
||||
int list_flag;
|
||||
cli_list_end (struct ui_out *uiout, int list_flag)
|
||||
{
|
||||
}
|
||||
|
||||
/* output an int field */
|
||||
|
||||
void
|
||||
cli_field_int (uiout, fldno, width, alignment, fldname, value)
|
||||
struct ui_out *uiout;
|
||||
int fldno;
|
||||
int width;
|
||||
enum ui_align alignment;
|
||||
char *fldname;
|
||||
int value;
|
||||
cli_field_int (struct ui_out *uiout, int fldno, int width,
|
||||
enum ui_align alignment, char *fldname, int value)
|
||||
{
|
||||
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 */
|
||||
|
||||
void
|
||||
cli_field_skip (uiout, fldno, width, alignment, fldname)
|
||||
struct ui_out *uiout;
|
||||
int fldno;
|
||||
int width;
|
||||
enum ui_align alignment;
|
||||
char *fldname;
|
||||
cli_field_skip (struct ui_out *uiout, int fldno, int width,
|
||||
enum ui_align alignment, char *fldname)
|
||||
{
|
||||
cli_field_string (uiout, fldno, width, alignment, fldname, "");
|
||||
}
|
||||
|
@ -251,18 +229,14 @@ cli_field_fmt (struct ui_out *uiout, int fldno,
|
|||
}
|
||||
|
||||
void
|
||||
cli_spaces (uiout, numspaces)
|
||||
struct ui_out *uiout;
|
||||
int numspaces;
|
||||
cli_spaces (struct ui_out *uiout, int numspaces)
|
||||
{
|
||||
struct ui_out_data *data = ui_out_data (uiout);
|
||||
print_spaces_filtered (numspaces, data->stream);
|
||||
}
|
||||
|
||||
void
|
||||
cli_text (uiout, string)
|
||||
struct ui_out *uiout;
|
||||
char *string;
|
||||
cli_text (struct ui_out *uiout, char *string)
|
||||
{
|
||||
struct ui_out_data *data = ui_out_data (uiout);
|
||||
fputs_filtered (string, data->stream);
|
||||
|
@ -277,16 +251,13 @@ cli_message (struct ui_out *uiout, int verbosity, char *format, va_list args)
|
|||
}
|
||||
|
||||
void
|
||||
cli_wrap_hint (uiout, identstring)
|
||||
struct ui_out *uiout;
|
||||
char *identstring;
|
||||
cli_wrap_hint (struct ui_out *uiout, char *identstring)
|
||||
{
|
||||
wrap_here (identstring);
|
||||
}
|
||||
|
||||
void
|
||||
cli_flush (uiout)
|
||||
struct ui_out *uiout;
|
||||
cli_flush (struct ui_out *uiout)
|
||||
{
|
||||
struct ui_out_data *data = ui_out_data (uiout);
|
||||
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 */
|
||||
|
||||
static void
|
||||
field_separator ()
|
||||
field_separator (void)
|
||||
{
|
||||
struct ui_out_data *data = ui_out_data (uiout);
|
||||
fputc_filtered (' ', data->stream);
|
||||
|
@ -334,7 +305,7 @@ cli_out_new (struct ui_file *stream)
|
|||
|
||||
/* standard gdb initialization hook */
|
||||
void
|
||||
_initialize_cli_out ()
|
||||
_initialize_cli_out (void)
|
||||
{
|
||||
/* nothing needs to be done */
|
||||
}
|
||||
|
|
|
@ -48,10 +48,7 @@
|
|||
*/
|
||||
|
||||
void
|
||||
coff_solib_add (arg_string, from_tty, target)
|
||||
char *arg_string;
|
||||
int from_tty;
|
||||
struct target_ops *target;
|
||||
coff_solib_add (char *arg_string, int from_tty, struct target_ops *target)
|
||||
{
|
||||
asection *libsect;
|
||||
|
||||
|
@ -126,7 +123,7 @@ coff_solib_add (arg_string, from_tty, target)
|
|||
*/
|
||||
|
||||
void
|
||||
coff_solib_create_inferior_hook ()
|
||||
coff_solib_create_inferior_hook (void)
|
||||
{
|
||||
coff_solib_add ((char *) 0, 0, (struct target_ops *) 0);
|
||||
}
|
||||
|
|
143
gdb/coffread.c
143
gdb/coffread.c
|
@ -260,10 +260,7 @@ static void coff_locate_sections (bfd *, asection *, PTR);
|
|||
-kingdon). */
|
||||
|
||||
static void
|
||||
coff_locate_sections (abfd, sectp, csip)
|
||||
bfd *abfd;
|
||||
asection *sectp;
|
||||
PTR csip;
|
||||
coff_locate_sections (bfd *abfd, asection *sectp, PTR csip)
|
||||
{
|
||||
register struct coff_symfile_info *csi;
|
||||
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 (abfd, sect, obj)
|
||||
bfd *abfd;
|
||||
asection *sect;
|
||||
PTR obj;
|
||||
find_targ_sec (bfd *abfd, asection *sect, PTR obj)
|
||||
{
|
||||
struct find_targ_sec_arg *args = (struct find_targ_sec_arg *) obj;
|
||||
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. */
|
||||
static int
|
||||
cs_to_section (cs, objfile)
|
||||
struct coff_symbol *cs;
|
||||
struct objfile *objfile;
|
||||
cs_to_section (struct coff_symbol *cs, struct objfile *objfile)
|
||||
{
|
||||
asection *sect = NULL;
|
||||
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 (cs, abfd)
|
||||
struct coff_symbol *cs;
|
||||
bfd *abfd;
|
||||
cs_section_address (struct coff_symbol *cs, bfd *abfd)
|
||||
{
|
||||
asection *sect = NULL;
|
||||
struct find_targ_sec_arg args;
|
||||
|
@ -389,8 +379,7 @@ cs_section_address (cs, abfd)
|
|||
or for associating a new type with the index. */
|
||||
|
||||
static struct type **
|
||||
coff_lookup_type (index)
|
||||
register int index;
|
||||
coff_lookup_type (register int index)
|
||||
{
|
||||
if (index >= type_vector_length)
|
||||
{
|
||||
|
@ -414,8 +403,7 @@ coff_lookup_type (index)
|
|||
This can create an empty (zeroed) type object. */
|
||||
|
||||
static struct type *
|
||||
coff_alloc_type (index)
|
||||
int index;
|
||||
coff_alloc_type (int index)
|
||||
{
|
||||
register struct type **type_addr = coff_lookup_type (index);
|
||||
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. */
|
||||
|
||||
static void
|
||||
coff_start_symtab (name)
|
||||
char *name;
|
||||
coff_start_symtab (char *name)
|
||||
{
|
||||
start_symtab (
|
||||
/* 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. */
|
||||
|
||||
static void
|
||||
complete_symtab (name, start_addr, size)
|
||||
char *name;
|
||||
CORE_ADDR start_addr;
|
||||
unsigned int size;
|
||||
complete_symtab (char *name, CORE_ADDR start_addr, unsigned int size)
|
||||
{
|
||||
if (last_source_file != NULL)
|
||||
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. */
|
||||
|
||||
static void
|
||||
coff_end_symtab (objfile)
|
||||
struct objfile *objfile;
|
||||
coff_end_symtab (struct objfile *objfile)
|
||||
{
|
||||
struct symtab *symtab;
|
||||
|
||||
|
@ -501,11 +484,8 @@ coff_end_symtab (objfile)
|
|||
}
|
||||
|
||||
static void
|
||||
record_minimal_symbol (name, address, type, objfile)
|
||||
char *name;
|
||||
CORE_ADDR address;
|
||||
enum minimal_symbol_type type;
|
||||
struct objfile *objfile;
|
||||
record_minimal_symbol (char *name, CORE_ADDR address,
|
||||
enum minimal_symbol_type type, struct objfile *objfile)
|
||||
{
|
||||
/* We don't want TDESC entry points in the minimal symbol table */
|
||||
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). */
|
||||
|
||||
static void
|
||||
coff_symfile_init (objfile)
|
||||
struct objfile *objfile;
|
||||
coff_symfile_init (struct objfile *objfile)
|
||||
{
|
||||
/* Allocate struct to keep track of stab reading. */
|
||||
objfile->sym_stab_info = (struct dbx_symfile_info *)
|
||||
|
@ -557,10 +536,7 @@ coff_symfile_init (objfile)
|
|||
|
||||
/* ARGSUSED */
|
||||
static void
|
||||
find_linenos (abfd, asect, vpinfo)
|
||||
bfd *abfd;
|
||||
sec_ptr asect;
|
||||
PTR vpinfo;
|
||||
find_linenos (bfd *abfd, sec_ptr asect, PTR vpinfo)
|
||||
{
|
||||
struct coff_symfile_info *info;
|
||||
int size, count;
|
||||
|
@ -597,9 +573,7 @@ static bfd *symfile_bfd;
|
|||
|
||||
/* ARGSUSED */
|
||||
static void
|
||||
coff_symfile_read (objfile, mainline)
|
||||
struct objfile *objfile;
|
||||
int mainline;
|
||||
coff_symfile_read (struct objfile *objfile, int mainline)
|
||||
{
|
||||
struct coff_symfile_info *info;
|
||||
struct dbx_symfile_info *dbxinfo;
|
||||
|
@ -725,8 +699,7 @@ coff_symfile_read (objfile, mainline)
|
|||
}
|
||||
|
||||
static void
|
||||
coff_new_init (ignore)
|
||||
struct objfile *ignore;
|
||||
coff_new_init (struct objfile *ignore)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -736,8 +709,7 @@ coff_new_init (ignore)
|
|||
objfile struct from the global list of known objfiles. */
|
||||
|
||||
static void
|
||||
coff_symfile_finish (objfile)
|
||||
struct objfile *objfile;
|
||||
coff_symfile_finish (struct objfile *objfile)
|
||||
{
|
||||
if (objfile->sym_private != NULL)
|
||||
{
|
||||
|
@ -755,10 +727,8 @@ coff_symfile_finish (objfile)
|
|||
We read them one at a time using read_one_sym (). */
|
||||
|
||||
static void
|
||||
coff_symtab_read (symtab_offset, nsyms, objfile)
|
||||
long symtab_offset;
|
||||
unsigned int nsyms;
|
||||
struct objfile *objfile;
|
||||
coff_symtab_read (long symtab_offset, unsigned int nsyms,
|
||||
struct objfile *objfile)
|
||||
{
|
||||
register struct context_stack *new;
|
||||
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. */
|
||||
|
||||
static void
|
||||
read_one_sym (cs, sym, aux)
|
||||
register struct coff_symbol *cs;
|
||||
register struct internal_syment *sym;
|
||||
register union internal_auxent *aux;
|
||||
read_one_sym (register struct coff_symbol *cs,
|
||||
register struct internal_syment *sym,
|
||||
register union internal_auxent *aux)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -1239,9 +1208,7 @@ read_one_sym (cs, sym, aux)
|
|||
static char *stringtab = NULL;
|
||||
|
||||
static int
|
||||
init_stringtab (abfd, offset)
|
||||
bfd *abfd;
|
||||
long offset;
|
||||
init_stringtab (bfd *abfd, long offset)
|
||||
{
|
||||
long length;
|
||||
int val;
|
||||
|
@ -1280,7 +1247,7 @@ init_stringtab (abfd, offset)
|
|||
}
|
||||
|
||||
static void
|
||||
free_stringtab ()
|
||||
free_stringtab (void)
|
||||
{
|
||||
if (stringtab)
|
||||
free (stringtab);
|
||||
|
@ -1294,8 +1261,7 @@ free_stringtab_cleanup (void *ignore)
|
|||
}
|
||||
|
||||
static char *
|
||||
getsymname (symbol_entry)
|
||||
struct internal_syment *symbol_entry;
|
||||
getsymname (struct internal_syment *symbol_entry)
|
||||
{
|
||||
static char buffer[SYMNMLEN + 1];
|
||||
char *result;
|
||||
|
@ -1320,8 +1286,7 @@ getsymname (symbol_entry)
|
|||
is only good for temporary use. */
|
||||
|
||||
static char *
|
||||
coff_getfilename (aux_entry)
|
||||
union internal_auxent *aux_entry;
|
||||
coff_getfilename (union internal_auxent *aux_entry)
|
||||
{
|
||||
static char buffer[BUFSIZ];
|
||||
register char *temp;
|
||||
|
@ -1355,10 +1320,7 @@ static unsigned long linetab_size;
|
|||
them into GDB's data structures. */
|
||||
|
||||
static int
|
||||
init_lineno (abfd, offset, size)
|
||||
bfd *abfd;
|
||||
long offset;
|
||||
int size;
|
||||
init_lineno (bfd *abfd, long offset, int size)
|
||||
{
|
||||
int val;
|
||||
|
||||
|
@ -1387,7 +1349,7 @@ init_lineno (abfd, offset, size)
|
|||
}
|
||||
|
||||
static void
|
||||
free_linetab ()
|
||||
free_linetab (void)
|
||||
{
|
||||
if (linetab)
|
||||
free (linetab);
|
||||
|
@ -1405,11 +1367,8 @@ free_linetab_cleanup (void *ignore)
|
|||
#endif
|
||||
|
||||
static void
|
||||
enter_linenos (file_offset, first_line, last_line, objfile)
|
||||
long file_offset;
|
||||
register int first_line;
|
||||
register int last_line;
|
||||
struct objfile *objfile;
|
||||
enter_linenos (long file_offset, register int first_line,
|
||||
register int last_line, struct objfile *objfile)
|
||||
{
|
||||
register char *rawptr;
|
||||
struct internal_lineno lptr;
|
||||
|
@ -1446,9 +1405,7 @@ enter_linenos (file_offset, first_line, last_line, objfile)
|
|||
}
|
||||
|
||||
static void
|
||||
patch_type (type, real_type)
|
||||
struct type *type;
|
||||
struct type *real_type;
|
||||
patch_type (struct type *type, struct type *real_type)
|
||||
{
|
||||
register struct type *target = TYPE_TARGET_TYPE (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. */
|
||||
|
||||
static void
|
||||
patch_opaque_types (s)
|
||||
struct symtab *s;
|
||||
patch_opaque_types (struct symtab *s)
|
||||
{
|
||||
register struct block *b;
|
||||
register int i;
|
||||
|
@ -1534,10 +1490,9 @@ patch_opaque_types (s)
|
|||
}
|
||||
|
||||
static struct symbol *
|
||||
process_coff_symbol (cs, aux, objfile)
|
||||
register struct coff_symbol *cs;
|
||||
register union internal_auxent *aux;
|
||||
struct objfile *objfile;
|
||||
process_coff_symbol (register struct coff_symbol *cs,
|
||||
register union internal_auxent *aux,
|
||||
struct objfile *objfile)
|
||||
{
|
||||
register struct symbol *sym
|
||||
= (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. */
|
||||
|
||||
static struct type *
|
||||
decode_type (cs, c_type, aux)
|
||||
register struct coff_symbol *cs;
|
||||
unsigned int c_type;
|
||||
register union internal_auxent *aux;
|
||||
decode_type (register struct coff_symbol *cs, unsigned int c_type,
|
||||
register union internal_auxent *aux)
|
||||
{
|
||||
register struct type *type = 0;
|
||||
unsigned int new_c_type;
|
||||
|
@ -1842,10 +1795,8 @@ decode_type (cs, c_type, aux)
|
|||
return the type that the function returns. */
|
||||
|
||||
static struct type *
|
||||
decode_function_type (cs, c_type, aux)
|
||||
register struct coff_symbol *cs;
|
||||
unsigned int c_type;
|
||||
register union internal_auxent *aux;
|
||||
decode_function_type (register struct coff_symbol *cs, unsigned int c_type,
|
||||
register union internal_auxent *aux)
|
||||
{
|
||||
if (aux->x_sym.x_tagndx.l == 0)
|
||||
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 */
|
||||
|
||||
static struct type *
|
||||
decode_base_type (cs, c_type, aux)
|
||||
register struct coff_symbol *cs;
|
||||
unsigned int c_type;
|
||||
register union internal_auxent *aux;
|
||||
decode_base_type (register struct coff_symbol *cs, unsigned int c_type,
|
||||
register union internal_auxent *aux)
|
||||
{
|
||||
struct type *type;
|
||||
|
||||
|
@ -2010,10 +1959,7 @@ decode_base_type (cs, c_type, aux)
|
|||
object describing the type. */
|
||||
|
||||
static struct type *
|
||||
coff_read_struct_type (index, length, lastsym)
|
||||
int index;
|
||||
int length;
|
||||
int lastsym;
|
||||
coff_read_struct_type (int index, int length, int lastsym)
|
||||
{
|
||||
struct nextfield
|
||||
{
|
||||
|
@ -2108,10 +2054,7 @@ coff_read_struct_type (index, length, lastsym)
|
|||
|
||||
/* ARGSUSED */
|
||||
static struct type *
|
||||
coff_read_enum_type (index, length, lastsym)
|
||||
int index;
|
||||
int length;
|
||||
int lastsym;
|
||||
coff_read_enum_type (int index, int length, int lastsym)
|
||||
{
|
||||
register struct symbol *sym;
|
||||
register struct type *type;
|
||||
|
@ -2228,7 +2171,7 @@ static struct sym_fns coff_sym_fns =
|
|||
};
|
||||
|
||||
void
|
||||
_initialize_coffread ()
|
||||
_initialize_coffread (void)
|
||||
{
|
||||
add_symtab_fns (&coff_sym_fns);
|
||||
}
|
||||
|
|
121
gdb/command.c
121
gdb/command.c
|
@ -145,9 +145,7 @@ add_cmd (name, class, fun, doc, list)
|
|||
Returns a pointer to the deprecated command. */
|
||||
|
||||
struct cmd_list_element *
|
||||
deprecate_cmd (cmd, replacement)
|
||||
struct cmd_list_element *cmd;
|
||||
char *replacement;
|
||||
deprecate_cmd (struct cmd_list_element *cmd, char *replacement)
|
||||
{
|
||||
cmd->flags |= (CMD_DEPRECATED | DEPRECATED_WARN_USER);
|
||||
|
||||
|
@ -182,12 +180,8 @@ add_abbrev_cmd (name, class, fun, doc, list)
|
|||
#endif
|
||||
|
||||
struct cmd_list_element *
|
||||
add_alias_cmd (name, oldname, class, abbrev_flag, list)
|
||||
char *name;
|
||||
char *oldname;
|
||||
enum command_class class;
|
||||
int abbrev_flag;
|
||||
struct cmd_list_element **list;
|
||||
add_alias_cmd (char *name, 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 */
|
||||
char *copied_name;
|
||||
|
@ -260,9 +254,7 @@ add_abbrev_prefix_cmd (name, class, fun, doc, prefixlist, prefixname,
|
|||
|
||||
/* This is an empty "cfunc". */
|
||||
void
|
||||
not_just_help_class_command (args, from_tty)
|
||||
char *args;
|
||||
int from_tty;
|
||||
not_just_help_class_command (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 (args, from_tty, c)
|
||||
char *args;
|
||||
int from_tty;
|
||||
struct cmd_list_element *c;
|
||||
empty_sfunc (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
|
||||
necessarily the head of LIST). */
|
||||
struct cmd_list_element *
|
||||
add_show_from_set (setcmd, list)
|
||||
struct cmd_list_element *setcmd;
|
||||
struct cmd_list_element **list;
|
||||
add_show_from_set (struct cmd_list_element *setcmd,
|
||||
struct cmd_list_element **list)
|
||||
{
|
||||
struct cmd_list_element *showcmd =
|
||||
(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. */
|
||||
|
||||
void
|
||||
delete_cmd (name, list)
|
||||
char *name;
|
||||
struct cmd_list_element **list;
|
||||
delete_cmd (char *name, struct cmd_list_element **list)
|
||||
{
|
||||
register struct cmd_list_element *c;
|
||||
struct cmd_list_element *p;
|
||||
|
@ -516,9 +502,7 @@ apropos_command (char *searchstr, int from_tty)
|
|||
*/
|
||||
|
||||
void
|
||||
help_cmd (command, stream)
|
||||
char *command;
|
||||
struct ui_file *stream;
|
||||
help_cmd (char *command, struct ui_file *stream)
|
||||
{
|
||||
struct cmd_list_element *c;
|
||||
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.
|
||||
*/
|
||||
void
|
||||
help_list (list, cmdtype, class, stream)
|
||||
struct cmd_list_element *list;
|
||||
char *cmdtype;
|
||||
enum command_class class;
|
||||
struct ui_file *stream;
|
||||
help_list (struct cmd_list_element *list, char *cmdtype,
|
||||
enum command_class class, struct ui_file *stream)
|
||||
{
|
||||
int len;
|
||||
char *cmdtype1, *cmdtype2;
|
||||
|
@ -649,9 +630,7 @@ help_all (struct ui_file *stream)
|
|||
|
||||
/* Print only the first line of STR on STREAM. */
|
||||
static void
|
||||
print_doc_line (stream, str)
|
||||
struct ui_file *stream;
|
||||
char *str;
|
||||
print_doc_line (struct ui_file *stream, char *str)
|
||||
{
|
||||
static char *line_buffer = 0;
|
||||
static int line_size;
|
||||
|
@ -700,12 +679,8 @@ print_doc_line (stream, str)
|
|||
* is at the low level, not the high-level).
|
||||
*/
|
||||
void
|
||||
help_cmd_list (list, class, prefix, recurse, stream)
|
||||
struct cmd_list_element *list;
|
||||
enum command_class class;
|
||||
char *prefix;
|
||||
int recurse;
|
||||
struct ui_file *stream;
|
||||
help_cmd_list (struct cmd_list_element *list, enum command_class class,
|
||||
char *prefix, int recurse, struct ui_file *stream)
|
||||
{
|
||||
register struct cmd_list_element *c;
|
||||
|
||||
|
@ -733,12 +708,8 @@ help_cmd_list (list, class, prefix, recurse, stream)
|
|||
found in nfound */
|
||||
|
||||
static struct cmd_list_element *
|
||||
find_cmd (command, len, clist, ignore_help_classes, nfound)
|
||||
char *command;
|
||||
int len;
|
||||
struct cmd_list_element *clist;
|
||||
int ignore_help_classes;
|
||||
int *nfound;
|
||||
find_cmd (char *command, int len, struct cmd_list_element *clist,
|
||||
int ignore_help_classes, int *nfound)
|
||||
{
|
||||
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). */
|
||||
|
||||
struct cmd_list_element *
|
||||
lookup_cmd_1 (text, clist, result_list, ignore_help_classes)
|
||||
char **text;
|
||||
struct cmd_list_element *clist, **result_list;
|
||||
int ignore_help_classes;
|
||||
lookup_cmd_1 (char **text, struct cmd_list_element *clist,
|
||||
struct cmd_list_element **result_list, int ignore_help_classes)
|
||||
{
|
||||
char *p, *command;
|
||||
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 */
|
||||
|
||||
static void
|
||||
undef_cmd_error (cmdtype, q)
|
||||
char *cmdtype, *q;
|
||||
undef_cmd_error (char *cmdtype, char *q)
|
||||
{
|
||||
error ("Undefined %scommand: \"%s\". Try \"help%s%.*s\".",
|
||||
cmdtype,
|
||||
|
@ -957,12 +925,8 @@ undef_cmd_error (cmdtype, q)
|
|||
the function field of the struct cmd_list_element is 0). */
|
||||
|
||||
struct cmd_list_element *
|
||||
lookup_cmd (line, list, cmdtype, allow_unknown, ignore_help_classes)
|
||||
char **line;
|
||||
struct cmd_list_element *list;
|
||||
char *cmdtype;
|
||||
int allow_unknown;
|
||||
int ignore_help_classes;
|
||||
lookup_cmd (char **line, 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 *c =
|
||||
|
@ -1279,11 +1243,8 @@ lookup_cmd_composition (char *text,
|
|||
CMDTYPE precedes the word "command" in the error message. */
|
||||
|
||||
struct cmd_list_element *
|
||||
lookup_cmd (line, list, cmdtype, allow_unknown)
|
||||
char **line;
|
||||
struct cmd_list_element *list;
|
||||
char *cmdtype;
|
||||
int allow_unknown;
|
||||
lookup_cmd (char **line, struct cmd_list_element *list, char *cmdtype,
|
||||
int allow_unknown)
|
||||
{
|
||||
register char *p;
|
||||
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". */
|
||||
|
||||
char **
|
||||
complete_on_cmdlist (list, text, word)
|
||||
struct cmd_list_element *list;
|
||||
char *text;
|
||||
char *word;
|
||||
complete_on_cmdlist (struct cmd_list_element *list, char *text, char *word)
|
||||
{
|
||||
struct cmd_list_element *ptr;
|
||||
char **matchlist;
|
||||
|
@ -1576,8 +1534,7 @@ parse_auto_binary_operation (const char *arg)
|
|||
}
|
||||
|
||||
static int
|
||||
parse_binary_operation (arg)
|
||||
char *arg;
|
||||
parse_binary_operation (char *arg)
|
||||
{
|
||||
int length;
|
||||
|
||||
|
@ -1611,10 +1568,7 @@ parse_binary_operation (arg)
|
|||
directly by the user (i.e. these are just like any other
|
||||
command). C is the command list element for the command. */
|
||||
void
|
||||
do_setshow_command (arg, from_tty, c)
|
||||
char *arg;
|
||||
int from_tty;
|
||||
struct cmd_list_element *c;
|
||||
do_setshow_command (char *arg, int from_tty, struct cmd_list_element *c)
|
||||
{
|
||||
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. */
|
||||
|
||||
void
|
||||
cmd_show_list (list, from_tty, prefix)
|
||||
struct cmd_list_element *list;
|
||||
int from_tty;
|
||||
char *prefix;
|
||||
cmd_show_list (struct cmd_list_element *list, int from_tty, char *prefix)
|
||||
{
|
||||
#ifdef UI_OUT
|
||||
ui_out_list_begin (uiout, "showlist");
|
||||
|
@ -1980,9 +1931,7 @@ cmd_show_list (list, from_tty, prefix)
|
|||
|
||||
/* ARGSUSED */
|
||||
static void
|
||||
shell_escape (arg, from_tty)
|
||||
char *arg;
|
||||
int from_tty;
|
||||
shell_escape (char *arg, int from_tty)
|
||||
{
|
||||
#ifdef CANT_FORK
|
||||
/* If ARG is NULL, they want an inferior shell, but `system' just
|
||||
|
@ -2043,9 +1992,7 @@ shell_escape (arg, from_tty)
|
|||
}
|
||||
|
||||
static void
|
||||
make_command (arg, from_tty)
|
||||
char *arg;
|
||||
int from_tty;
|
||||
make_command (char *arg, int from_tty)
|
||||
{
|
||||
char *p;
|
||||
|
||||
|
@ -2062,9 +2009,7 @@ make_command (arg, from_tty)
|
|||
}
|
||||
|
||||
static void
|
||||
show_user_1 (c, stream)
|
||||
struct cmd_list_element *c;
|
||||
struct ui_file *stream;
|
||||
show_user_1 (struct cmd_list_element *c, struct ui_file *stream)
|
||||
{
|
||||
register struct command_line *cmdlines;
|
||||
|
||||
|
@ -2090,9 +2035,7 @@ show_user_1 (c, stream)
|
|||
|
||||
/* ARGSUSED */
|
||||
static void
|
||||
show_user (args, from_tty)
|
||||
char *args;
|
||||
int from_tty;
|
||||
show_user (char *args, int from_tty)
|
||||
{
|
||||
struct cmd_list_element *c;
|
||||
extern struct cmd_list_element *cmdlist;
|
||||
|
@ -2115,7 +2058,7 @@ show_user (args, from_tty)
|
|||
}
|
||||
|
||||
void
|
||||
_initialize_command ()
|
||||
_initialize_command (void)
|
||||
{
|
||||
add_com ("shell", class_support, shell_escape,
|
||||
"Execute the rest of the line as a shell command. \n\
|
||||
|
|
|
@ -124,9 +124,7 @@ complain (struct complaint *complaint,...)
|
|||
context for the user to figure it out. */
|
||||
|
||||
void
|
||||
clear_complaints (sym_reading, noisy)
|
||||
int sym_reading;
|
||||
int noisy;
|
||||
clear_complaints (int sym_reading, int noisy)
|
||||
{
|
||||
struct complaint *p;
|
||||
|
||||
|
@ -145,7 +143,7 @@ clear_complaints (sym_reading, noisy)
|
|||
}
|
||||
|
||||
void
|
||||
_initialize_complaints ()
|
||||
_initialize_complaints (void)
|
||||
{
|
||||
add_show_from_set
|
||||
(add_set_cmd ("complaints", class_support, var_zinteger,
|
||||
|
|
|
@ -13,9 +13,7 @@ void _initialize_copying (void);
|
|||
|
||||
extern int immediate_quit;
|
||||
static void
|
||||
show_copying_command (ignore, from_tty)
|
||||
char *ignore;
|
||||
int from_tty;
|
||||
show_copying_command (char *ignore, int from_tty)
|
||||
{
|
||||
immediate_quit++;
|
||||
printf_filtered (" GNU GENERAL PUBLIC LICENSE\n");
|
||||
|
@ -279,9 +277,7 @@ show_copying_command (ignore, from_tty)
|
|||
}
|
||||
|
||||
static void
|
||||
show_warranty_command (ignore, from_tty)
|
||||
char *ignore;
|
||||
int from_tty;
|
||||
show_warranty_command (char *ignore, int from_tty)
|
||||
{
|
||||
immediate_quit++;
|
||||
printf_filtered (" NO WARRANTY\n");
|
||||
|
@ -310,7 +306,7 @@ show_warranty_command (ignore, from_tty)
|
|||
}
|
||||
|
||||
void
|
||||
_initialize_copying ()
|
||||
_initialize_copying (void)
|
||||
{
|
||||
add_cmd ("copying", no_class, show_copying_command,
|
||||
"Conditions for redistributing copies of GDB.",
|
||||
|
|
|
@ -73,11 +73,8 @@ void _initialize_core_aout (void);
|
|||
*/
|
||||
|
||||
static void
|
||||
fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
|
||||
char *core_reg_sect;
|
||||
unsigned core_reg_size;
|
||||
int which;
|
||||
CORE_ADDR reg_addr;
|
||||
fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, int which,
|
||||
CORE_ADDR reg_addr)
|
||||
{
|
||||
int regno;
|
||||
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. */
|
||||
|
||||
CORE_ADDR
|
||||
register_addr (regno, blockend)
|
||||
int regno;
|
||||
CORE_ADDR blockend;
|
||||
register_addr (int regno, CORE_ADDR blockend)
|
||||
{
|
||||
CORE_ADDR addr;
|
||||
|
||||
|
@ -144,7 +139,7 @@ static struct core_fns aout_core_fns =
|
|||
};
|
||||
|
||||
void
|
||||
_initialize_core_aout ()
|
||||
_initialize_core_aout (void)
|
||||
{
|
||||
add_core_fns (&aout_core_fns);
|
||||
}
|
||||
|
|
|
@ -133,7 +133,7 @@ static struct core_fns regset_core_fns =
|
|||
};
|
||||
|
||||
void
|
||||
_initialize_core_regset ()
|
||||
_initialize_core_regset (void)
|
||||
{
|
||||
add_core_fns (®set_core_fns);
|
||||
}
|
||||
|
|
|
@ -133,7 +133,7 @@ static struct core_fns solaris_core_fns =
|
|||
};
|
||||
|
||||
void
|
||||
_initialize_core_solaris ()
|
||||
_initialize_core_solaris (void)
|
||||
{
|
||||
add_core_fns (&solaris_core_fns);
|
||||
}
|
||||
|
|
|
@ -65,9 +65,7 @@ bfd *core_bfd = NULL;
|
|||
/* Backward compatability with old way of specifying core files. */
|
||||
|
||||
void
|
||||
core_file_command (filename, from_tty)
|
||||
char *filename;
|
||||
int from_tty;
|
||||
core_file_command (char *filename, int from_tty)
|
||||
{
|
||||
struct target_ops *t;
|
||||
|
||||
|
@ -110,8 +108,7 @@ core_file_command (filename, from_tty)
|
|||
* this function will call all of the hook functions. */
|
||||
|
||||
static void
|
||||
call_extra_exec_file_hooks (filename)
|
||||
char *filename;
|
||||
call_extra_exec_file_hooks (char *filename)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -160,7 +157,7 @@ specify_exec_file_hook (hook)
|
|||
be reopened. */
|
||||
|
||||
void
|
||||
close_exec_file ()
|
||||
close_exec_file (void)
|
||||
{
|
||||
#if 0 /* FIXME */
|
||||
if (exec_bfd)
|
||||
|
@ -169,7 +166,7 @@ close_exec_file ()
|
|||
}
|
||||
|
||||
void
|
||||
reopen_exec_file ()
|
||||
reopen_exec_file (void)
|
||||
{
|
||||
#if 0 /* FIXME */
|
||||
if (exec_bfd)
|
||||
|
@ -199,7 +196,7 @@ reopen_exec_file ()
|
|||
print a warning if they don't go together. */
|
||||
|
||||
void
|
||||
validate_files ()
|
||||
validate_files (void)
|
||||
{
|
||||
if (exec_bfd && core_bfd)
|
||||
{
|
||||
|
@ -215,8 +212,7 @@ validate_files ()
|
|||
otherwise return 0 in that case. */
|
||||
|
||||
char *
|
||||
get_exec_file (err)
|
||||
int err;
|
||||
get_exec_file (int err)
|
||||
{
|
||||
if (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(). */
|
||||
|
||||
void
|
||||
memory_error (status, memaddr)
|
||||
int status;
|
||||
CORE_ADDR memaddr;
|
||||
memory_error (int status, CORE_ADDR memaddr)
|
||||
{
|
||||
struct ui_file *tmp_stream = mem_fileopen ();
|
||||
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. */
|
||||
void
|
||||
read_memory (memaddr, myaddr, len)
|
||||
CORE_ADDR memaddr;
|
||||
char *myaddr;
|
||||
int len;
|
||||
read_memory (CORE_ADDR memaddr, char *myaddr, int len)
|
||||
{
|
||||
int status;
|
||||
status = target_read_memory (memaddr, myaddr, len);
|
||||
|
@ -272,40 +263,29 @@ read_memory (memaddr, myaddr, len)
|
|||
|
||||
/* Like target_read_memory, but slightly different parameters. */
|
||||
int
|
||||
dis_asm_read_memory (memaddr, myaddr, len, info)
|
||||
bfd_vma memaddr;
|
||||
bfd_byte *myaddr;
|
||||
unsigned int len;
|
||||
disassemble_info *info;
|
||||
dis_asm_read_memory (bfd_vma memaddr, bfd_byte *myaddr, unsigned int len,
|
||||
disassemble_info *info)
|
||||
{
|
||||
return target_read_memory (memaddr, (char *) myaddr, len);
|
||||
}
|
||||
|
||||
/* Like memory_error with slightly different parameters. */
|
||||
void
|
||||
dis_asm_memory_error (status, memaddr, info)
|
||||
int status;
|
||||
bfd_vma memaddr;
|
||||
disassemble_info *info;
|
||||
dis_asm_memory_error (int status, bfd_vma memaddr, disassemble_info *info)
|
||||
{
|
||||
memory_error (status, memaddr);
|
||||
}
|
||||
|
||||
/* Like print_address with slightly different parameters. */
|
||||
void
|
||||
dis_asm_print_address (addr, info)
|
||||
bfd_vma addr;
|
||||
struct disassemble_info *info;
|
||||
dis_asm_print_address (bfd_vma addr, struct disassemble_info *info)
|
||||
{
|
||||
print_address (addr, info->stream);
|
||||
}
|
||||
|
||||
/* Same as target_write_memory, but report an error if can't write. */
|
||||
void
|
||||
write_memory (memaddr, myaddr, len)
|
||||
CORE_ADDR memaddr;
|
||||
char *myaddr;
|
||||
int len;
|
||||
write_memory (CORE_ADDR memaddr, char *myaddr, int len)
|
||||
{
|
||||
int status;
|
||||
|
||||
|
@ -317,9 +297,7 @@ write_memory (memaddr, myaddr, len)
|
|||
/* Read an integer from debugged memory, given address and number of bytes. */
|
||||
|
||||
LONGEST
|
||||
read_memory_integer (memaddr, len)
|
||||
CORE_ADDR memaddr;
|
||||
int len;
|
||||
read_memory_integer (CORE_ADDR memaddr, int len)
|
||||
{
|
||||
char buf[sizeof (LONGEST)];
|
||||
|
||||
|
@ -328,9 +306,7 @@ read_memory_integer (memaddr, len)
|
|||
}
|
||||
|
||||
ULONGEST
|
||||
read_memory_unsigned_integer (memaddr, len)
|
||||
CORE_ADDR memaddr;
|
||||
int len;
|
||||
read_memory_unsigned_integer (CORE_ADDR memaddr, int len)
|
||||
{
|
||||
char buf[sizeof (ULONGEST)];
|
||||
|
||||
|
@ -339,10 +315,7 @@ read_memory_unsigned_integer (memaddr, len)
|
|||
}
|
||||
|
||||
void
|
||||
read_memory_string (memaddr, buffer, max_len)
|
||||
CORE_ADDR memaddr;
|
||||
char *buffer;
|
||||
int max_len;
|
||||
read_memory_string (CORE_ADDR memaddr, char *buffer, int max_len)
|
||||
{
|
||||
register char *cp;
|
||||
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 (ignore, from_tty, c)
|
||||
char *ignore;
|
||||
int from_tty;
|
||||
struct cmd_list_element *c;
|
||||
set_gnutarget_command (char *ignore, int from_tty, struct cmd_list_element *c)
|
||||
{
|
||||
if (STREQ (gnutarget_string, "auto"))
|
||||
gnutarget = NULL;
|
||||
|
@ -432,8 +402,7 @@ set_gnutarget_command (ignore, from_tty, c)
|
|||
|
||||
/* Set the gnutarget. */
|
||||
void
|
||||
set_gnutarget (newtarget)
|
||||
char *newtarget;
|
||||
set_gnutarget (char *newtarget)
|
||||
{
|
||||
if (gnutarget_string != NULL)
|
||||
free (gnutarget_string);
|
||||
|
@ -442,7 +411,7 @@ set_gnutarget (newtarget)
|
|||
}
|
||||
|
||||
void
|
||||
_initialize_core ()
|
||||
_initialize_core (void)
|
||||
{
|
||||
struct cmd_list_element *c;
|
||||
c = add_cmd ("core-file", class_files, core_file_command,
|
||||
|
|
|
@ -84,8 +84,7 @@ struct target_ops core_ops;
|
|||
handle. */
|
||||
|
||||
void
|
||||
add_core_fns (cf)
|
||||
struct core_fns *cf;
|
||||
add_core_fns (struct core_fns *cf)
|
||||
{
|
||||
cf->next = core_file_fns;
|
||||
core_file_fns = cf;
|
||||
|
@ -96,9 +95,7 @@ add_core_fns (cf)
|
|||
reading the core file. */
|
||||
|
||||
int
|
||||
default_core_sniffer (our_fns, abfd)
|
||||
struct core_fns *our_fns;
|
||||
bfd *abfd;
|
||||
default_core_sniffer (struct core_fns *our_fns, bfd *abfd)
|
||||
{
|
||||
int result;
|
||||
|
||||
|
@ -112,8 +109,7 @@ default_core_sniffer (our_fns, abfd)
|
|||
selected. */
|
||||
|
||||
static struct core_fns *
|
||||
sniff_core_bfd (abfd)
|
||||
bfd *abfd;
|
||||
sniff_core_bfd (bfd *abfd)
|
||||
{
|
||||
struct core_fns *cf;
|
||||
struct core_fns *yummy = NULL;
|
||||
|
@ -149,8 +145,7 @@ sniff_core_bfd (abfd)
|
|||
core file handler that recognizes it. */
|
||||
|
||||
int
|
||||
default_check_format (abfd)
|
||||
bfd *abfd;
|
||||
default_check_format (bfd *abfd)
|
||||
{
|
||||
return (0);
|
||||
}
|
||||
|
@ -158,8 +153,7 @@ default_check_format (abfd)
|
|||
/* Attempt to recognize core file formats that BFD rejects. */
|
||||
|
||||
static boolean
|
||||
gdb_check_format (abfd)
|
||||
bfd *abfd;
|
||||
gdb_check_format (bfd *abfd)
|
||||
{
|
||||
struct core_fns *cf;
|
||||
|
||||
|
@ -178,8 +172,7 @@ gdb_check_format (abfd)
|
|||
|
||||
/* ARGSUSED */
|
||||
static void
|
||||
core_close (quitting)
|
||||
int quitting;
|
||||
core_close (int quitting)
|
||||
{
|
||||
char *name;
|
||||
|
||||
|
@ -220,8 +213,7 @@ core_close_cleanup (void *ignore)
|
|||
is really an int * which points to from_tty. */
|
||||
|
||||
static int
|
||||
solib_add_stub (from_ttyp)
|
||||
PTR from_ttyp;
|
||||
solib_add_stub (PTR from_ttyp)
|
||||
{
|
||||
SOLIB_ADD (NULL, *(int *) from_ttyp, ¤t_target);
|
||||
re_enable_breakpoints_in_shlibs ();
|
||||
|
@ -233,10 +225,7 @@ solib_add_stub (from_ttyp)
|
|||
list of threads in a core file. */
|
||||
|
||||
static void
|
||||
add_to_thread_list (abfd, asect, reg_sect_arg)
|
||||
bfd *abfd;
|
||||
asection *asect;
|
||||
PTR reg_sect_arg;
|
||||
add_to_thread_list (bfd *abfd, asection *asect, PTR reg_sect_arg)
|
||||
{
|
||||
int thread_id;
|
||||
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. */
|
||||
|
||||
static void
|
||||
core_open (filename, from_tty)
|
||||
char *filename;
|
||||
int from_tty;
|
||||
core_open (char *filename, int from_tty)
|
||||
{
|
||||
const char *p;
|
||||
int siggy;
|
||||
|
@ -375,9 +362,7 @@ your %s; do ``info files''", target_longname);
|
|||
}
|
||||
|
||||
static void
|
||||
core_detach (args, from_tty)
|
||||
char *args;
|
||||
int from_tty;
|
||||
core_detach (char *args, int from_tty)
|
||||
{
|
||||
if (args)
|
||||
error ("Too many arguments");
|
||||
|
@ -451,8 +436,7 @@ get_core_register_section (char *name,
|
|||
|
||||
/* ARGSUSED */
|
||||
static void
|
||||
get_core_registers (regno)
|
||||
int regno;
|
||||
get_core_registers (int regno)
|
||||
{
|
||||
int status;
|
||||
|
||||
|
@ -472,8 +456,7 @@ get_core_registers (regno)
|
|||
}
|
||||
|
||||
static char *
|
||||
core_file_to_sym_file (core)
|
||||
char *core;
|
||||
core_file_to_sym_file (char *core)
|
||||
{
|
||||
CONST char *failing_command;
|
||||
char *p;
|
||||
|
@ -535,8 +518,7 @@ core_file_to_sym_file (core)
|
|||
}
|
||||
|
||||
static void
|
||||
core_files_info (t)
|
||||
struct target_ops *t;
|
||||
core_files_info (struct target_ops *t)
|
||||
{
|
||||
print_section_info (t, core_bfd);
|
||||
}
|
||||
|
@ -545,9 +527,7 @@ core_files_info (t)
|
|||
`gdb internal error' (since generic_mourn calls breakpoint_init_inferior). */
|
||||
|
||||
static int
|
||||
ignore (addr, contents)
|
||||
CORE_ADDR addr;
|
||||
char *contents;
|
||||
ignore (CORE_ADDR addr, char *contents)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -560,8 +540,7 @@ ignore (addr, contents)
|
|||
behaviour.
|
||||
*/
|
||||
static int
|
||||
core_file_thread_alive (tid)
|
||||
int tid;
|
||||
core_file_thread_alive (int tid)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
@ -569,7 +548,7 @@ core_file_thread_alive (tid)
|
|||
/* Fill in core_ops with its defined operations and properties. */
|
||||
|
||||
static void
|
||||
init_core_ops ()
|
||||
init_core_ops (void)
|
||||
{
|
||||
core_ops.to_shortname = "core";
|
||||
core_ops.to_longname = "Local core dump file";
|
||||
|
@ -606,7 +585,7 @@ init_core_ops ()
|
|||
int coreops_suppress_target;
|
||||
|
||||
void
|
||||
_initialize_corelow ()
|
||||
_initialize_corelow (void)
|
||||
{
|
||||
init_core_ops ();
|
||||
|
||||
|
|
|
@ -63,10 +63,7 @@ static void cp_print_hpacc_virtual_table_entries (struct type *, int *,
|
|||
|
||||
|
||||
void
|
||||
cp_print_class_method (valaddr, type, stream)
|
||||
char *valaddr;
|
||||
struct type *type;
|
||||
struct ui_file *stream;
|
||||
cp_print_class_method (char *valaddr, struct type *type, struct ui_file *stream)
|
||||
{
|
||||
struct type *domain;
|
||||
struct fn_field *f = NULL;
|
||||
|
@ -184,8 +181,7 @@ const char hpacc_vtbl_ptr_type_name[] =
|
|||
"pointer to virtual function". */
|
||||
|
||||
int
|
||||
cp_is_vtbl_ptr_type (type)
|
||||
struct type *type;
|
||||
cp_is_vtbl_ptr_type (struct type *type)
|
||||
{
|
||||
char *typename = type_name_no_tag (type);
|
||||
|
||||
|
@ -198,8 +194,7 @@ cp_is_vtbl_ptr_type (type)
|
|||
"pointer to virtual function table". */
|
||||
|
||||
int
|
||||
cp_is_vtbl_member (type)
|
||||
struct type *type;
|
||||
cp_is_vtbl_member (struct type *type)
|
||||
{
|
||||
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. */
|
||||
|
||||
void
|
||||
cp_print_value_fields (type, real_type, valaddr, offset, address, stream, format, recurse, pretty,
|
||||
dont_print_vb, dont_print_statmem)
|
||||
struct type *type;
|
||||
struct type *real_type;
|
||||
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;
|
||||
cp_print_value_fields (struct type *type, struct type *real_type, 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;
|
||||
struct obstack tmp_obstack;
|
||||
|
@ -495,18 +481,10 @@ cp_print_value_fields (type, real_type, valaddr, offset, address, stream, format
|
|||
baseclasses. */
|
||||
|
||||
static void
|
||||
cp_print_value (type, real_type, valaddr, offset, address, stream, format, recurse, pretty,
|
||||
dont_print_vb)
|
||||
struct type *type;
|
||||
struct type *real_type;
|
||||
char *valaddr;
|
||||
int offset;
|
||||
CORE_ADDR address;
|
||||
struct ui_file *stream;
|
||||
int format;
|
||||
int recurse;
|
||||
enum val_prettyprint pretty;
|
||||
struct type **dont_print_vb;
|
||||
cp_print_value (struct type *type, struct type *real_type, 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 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. */
|
||||
|
||||
static void
|
||||
cp_print_static_field (type, val, stream, format, recurse, pretty)
|
||||
struct type *type;
|
||||
value_ptr val;
|
||||
struct ui_file *stream;
|
||||
int format;
|
||||
int recurse;
|
||||
enum val_prettyprint pretty;
|
||||
cp_print_static_field (struct type *type, value_ptr val, struct ui_file *stream,
|
||||
int format, int recurse, enum val_prettyprint pretty)
|
||||
{
|
||||
if (TYPE_CODE (type) == TYPE_CODE_STRUCT)
|
||||
{
|
||||
|
@ -668,11 +641,8 @@ cp_print_static_field (type, val, stream, format, recurse, pretty)
|
|||
}
|
||||
|
||||
void
|
||||
cp_print_class_member (valaddr, domain, stream, prefix)
|
||||
char *valaddr;
|
||||
struct type *domain;
|
||||
struct ui_file *stream;
|
||||
char *prefix;
|
||||
cp_print_class_member (char *valaddr, struct type *domain,
|
||||
struct ui_file *stream, char *prefix)
|
||||
{
|
||||
|
||||
/* VAL is a byte offset into the structure type DOMAIN.
|
||||
|
@ -746,14 +716,10 @@ cp_print_class_member (valaddr, domain, stream, prefix)
|
|||
|
||||
|
||||
static void
|
||||
cp_print_hpacc_virtual_table_entries (type, vfuncs, v, stream, format, recurse, pretty)
|
||||
struct type *type;
|
||||
int *vfuncs;
|
||||
value_ptr v;
|
||||
struct ui_file *stream;
|
||||
int format;
|
||||
int recurse;
|
||||
enum val_prettyprint pretty;
|
||||
cp_print_hpacc_virtual_table_entries (struct type *type, int *vfuncs,
|
||||
value_ptr v, struct ui_file *stream,
|
||||
int format, int recurse,
|
||||
enum val_prettyprint pretty)
|
||||
{
|
||||
int fn, oi;
|
||||
|
||||
|
@ -798,7 +764,7 @@ cp_print_hpacc_virtual_table_entries (type, vfuncs, v, stream, format, recurse,
|
|||
|
||||
|
||||
void
|
||||
_initialize_cp_valprint ()
|
||||
_initialize_cp_valprint (void)
|
||||
{
|
||||
add_show_from_set
|
||||
(add_set_cmd ("static-members", class_support, var_boolean,
|
||||
|
|
|
@ -29,11 +29,7 @@
|
|||
static void cpu32bug_open (char *args, int from_tty);
|
||||
|
||||
static void
|
||||
cpu32bug_supply_register (regname, regnamelen, val, vallen)
|
||||
char *regname;
|
||||
int regnamelen;
|
||||
char *val;
|
||||
int vallen;
|
||||
cpu32bug_supply_register (char *regname, int regnamelen, char *val, int vallen)
|
||||
{
|
||||
int regno;
|
||||
|
||||
|
@ -146,15 +142,13 @@ init_cpu32bug_cmds (void)
|
|||
}; /* init_cpu32bug_cmds */
|
||||
|
||||
static void
|
||||
cpu32bug_open (args, from_tty)
|
||||
char *args;
|
||||
int from_tty;
|
||||
cpu32bug_open (char *args, int from_tty)
|
||||
{
|
||||
monitor_open (args, &cpu32bug_cmds, from_tty);
|
||||
}
|
||||
|
||||
void
|
||||
_initialize_cpu32bug_rom ()
|
||||
_initialize_cpu32bug_rom (void)
|
||||
{
|
||||
init_cpu32bug_cmds ();
|
||||
init_monitor_ops (&cpu32bug_ops);
|
||||
|
|
|
@ -139,8 +139,7 @@ fetch_inferior_registers (regno)
|
|||
Otherwise, REGNO specifies which register (so we can save time). */
|
||||
|
||||
void
|
||||
store_inferior_registers (regno)
|
||||
int regno;
|
||||
store_inferior_registers (int regno)
|
||||
{
|
||||
register unsigned int regaddr;
|
||||
char buf[80];
|
||||
|
@ -249,8 +248,7 @@ store_inferior_registers (regno)
|
|||
|
||||
/* blockend is the address of the end of the user structure */
|
||||
|
||||
m88k_register_u_addr (blockend, regnum)
|
||||
int blockend, regnum;
|
||||
m88k_register_u_addr (int blockend, int regnum)
|
||||
{
|
||||
struct USER u;
|
||||
int ustart = blockend - sizeof (struct USER);
|
||||
|
@ -289,8 +287,7 @@ m88k_register_u_addr (blockend, regnum)
|
|||
register values. */
|
||||
|
||||
void
|
||||
supply_gregset (gregsetp)
|
||||
gregset_t *gregsetp;
|
||||
supply_gregset (gregset_t *gregsetp)
|
||||
{
|
||||
register int regi;
|
||||
register greg_t *regp = (greg_t *) gregsetp;
|
||||
|
@ -307,9 +304,7 @@ supply_gregset (gregsetp)
|
|||
}
|
||||
|
||||
void
|
||||
fill_gregset (gregsetp, regno)
|
||||
gregset_t *gregsetp;
|
||||
int regno;
|
||||
fill_gregset (gregset_t *gregsetp, int regno)
|
||||
{
|
||||
int regi;
|
||||
register greg_t *regp = (greg_t *) gregsetp;
|
||||
|
@ -357,7 +352,7 @@ struct link_map
|
|||
#endif
|
||||
|
||||
void
|
||||
add_shared_symbol_files ()
|
||||
add_shared_symbol_files (void)
|
||||
{
|
||||
void *desc;
|
||||
struct link_map *ld_map, *lm, lms;
|
||||
|
@ -410,8 +405,7 @@ add_shared_symbol_files ()
|
|||
#include <sys/regset.h>
|
||||
|
||||
unsigned int
|
||||
m88k_harris_core_register_addr (regno, reg_ptr)
|
||||
int regno, reg_ptr;
|
||||
m88k_harris_core_register_addr (int regno, int reg_ptr)
|
||||
{
|
||||
unsigned int word_offset;
|
||||
|
||||
|
@ -447,7 +441,7 @@ m88k_harris_core_register_addr (regno, reg_ptr)
|
|||
#endif /* _ES_MP */
|
||||
|
||||
void
|
||||
_initialize_m88k_nat ()
|
||||
_initialize_m88k_nat (void)
|
||||
{
|
||||
#ifdef _ES_MP
|
||||
/* Enable 88110 support, as we don't support the 88100 under ES/MP. */
|
||||
|
@ -465,8 +459,7 @@ _initialize_m88k_nat ()
|
|||
register values. */
|
||||
|
||||
void
|
||||
supply_gregset (gregsetp)
|
||||
gregset_t *gregsetp;
|
||||
supply_gregset (gregset_t *gregsetp)
|
||||
{
|
||||
register int regi;
|
||||
register greg_t *regp = (greg_t *) gregsetp;
|
||||
|
@ -488,8 +481,7 @@ supply_gregset (gregsetp)
|
|||
idea of the current floating point register values. */
|
||||
|
||||
void
|
||||
supply_fpregset (fpregsetp)
|
||||
fpregset_t *fpregsetp;
|
||||
supply_fpregset (fpregset_t *fpregsetp)
|
||||
{
|
||||
register int regi;
|
||||
char *from;
|
||||
|
|
178
gdb/d10v-tdep.c
178
gdb/d10v-tdep.c
|
@ -121,18 +121,14 @@ d10v_stack_align (CORE_ADDR len)
|
|||
registers. */
|
||||
|
||||
int
|
||||
d10v_use_struct_convention (gcc_p, type)
|
||||
int gcc_p;
|
||||
struct type *type;
|
||||
d10v_use_struct_convention (int gcc_p, struct type *type)
|
||||
{
|
||||
return (TYPE_LENGTH (type) > 8);
|
||||
}
|
||||
|
||||
|
||||
unsigned char *
|
||||
d10v_breakpoint_from_pc (pcptr, lenptr)
|
||||
CORE_ADDR *pcptr;
|
||||
int *lenptr;
|
||||
d10v_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
|
||||
{
|
||||
static unsigned char breakpoint[] =
|
||||
{0x2f, 0x90, 0x5e, 0x00};
|
||||
|
@ -288,8 +284,7 @@ d10v_register_sim_regno (int nr)
|
|||
register REG_NR. */
|
||||
|
||||
int
|
||||
d10v_register_byte (reg_nr)
|
||||
int reg_nr;
|
||||
d10v_register_byte (int reg_nr)
|
||||
{
|
||||
if (reg_nr < A0_REGNUM)
|
||||
return (reg_nr * 2);
|
||||
|
@ -306,8 +301,7 @@ d10v_register_byte (reg_nr)
|
|||
register REG_NR. */
|
||||
|
||||
int
|
||||
d10v_register_raw_size (reg_nr)
|
||||
int reg_nr;
|
||||
d10v_register_raw_size (int reg_nr)
|
||||
{
|
||||
if (reg_nr < A0_REGNUM)
|
||||
return 2;
|
||||
|
@ -321,8 +315,7 @@ d10v_register_raw_size (reg_nr)
|
|||
for register N. */
|
||||
|
||||
int
|
||||
d10v_register_virtual_size (reg_nr)
|
||||
int reg_nr;
|
||||
d10v_register_virtual_size (int 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. */
|
||||
|
||||
struct type *
|
||||
d10v_register_virtual_type (reg_nr)
|
||||
int reg_nr;
|
||||
d10v_register_virtual_type (int reg_nr)
|
||||
{
|
||||
if (reg_nr >= A0_REGNUM
|
||||
&& 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 */
|
||||
int
|
||||
d10v_register_convertible (nr)
|
||||
int nr;
|
||||
d10v_register_convertible (int nr)
|
||||
{
|
||||
return ((nr) == PC_REGNUM || (nr) == SP_REGNUM);
|
||||
}
|
||||
|
||||
void
|
||||
d10v_register_convert_to_virtual (regnum, type, from, to)
|
||||
int regnum;
|
||||
struct type *type;
|
||||
char *from;
|
||||
char *to;
|
||||
d10v_register_convert_to_virtual (int regnum, struct type *type, char *from,
|
||||
char *to)
|
||||
{
|
||||
ULONGEST x = extract_unsigned_integer (from, REGISTER_RAW_SIZE (regnum));
|
||||
if (regnum == PC_REGNUM)
|
||||
|
@ -368,11 +356,8 @@ d10v_register_convert_to_virtual (regnum, type, from, to)
|
|||
}
|
||||
|
||||
void
|
||||
d10v_register_convert_to_raw (type, regnum, from, to)
|
||||
struct type *type;
|
||||
int regnum;
|
||||
char *from;
|
||||
char *to;
|
||||
d10v_register_convert_to_raw (struct type *type, int regnum, char *from,
|
||||
char *to)
|
||||
{
|
||||
ULONGEST x = extract_unsigned_integer (from, TYPE_LENGTH (type));
|
||||
x &= 0x3ffff;
|
||||
|
@ -383,44 +368,38 @@ d10v_register_convert_to_raw (type, regnum, from, to)
|
|||
|
||||
|
||||
CORE_ADDR
|
||||
d10v_make_daddr (x)
|
||||
CORE_ADDR x;
|
||||
d10v_make_daddr (CORE_ADDR x)
|
||||
{
|
||||
return ((x) | DMEM_START);
|
||||
}
|
||||
|
||||
CORE_ADDR
|
||||
d10v_make_iaddr (x)
|
||||
CORE_ADDR x;
|
||||
d10v_make_iaddr (CORE_ADDR x)
|
||||
{
|
||||
return (((x) << 2) | IMEM_START);
|
||||
}
|
||||
|
||||
int
|
||||
d10v_daddr_p (x)
|
||||
CORE_ADDR x;
|
||||
d10v_daddr_p (CORE_ADDR x)
|
||||
{
|
||||
return (((x) & 0x3000000) == DMEM_START);
|
||||
}
|
||||
|
||||
int
|
||||
d10v_iaddr_p (x)
|
||||
CORE_ADDR x;
|
||||
d10v_iaddr_p (CORE_ADDR x)
|
||||
{
|
||||
return (((x) & 0x3000000) == IMEM_START);
|
||||
}
|
||||
|
||||
|
||||
CORE_ADDR
|
||||
d10v_convert_iaddr_to_raw (x)
|
||||
CORE_ADDR x;
|
||||
d10v_convert_iaddr_to_raw (CORE_ADDR x)
|
||||
{
|
||||
return (((x) >> 2) & 0xffff);
|
||||
}
|
||||
|
||||
CORE_ADDR
|
||||
d10v_convert_daddr_to_raw (x)
|
||||
CORE_ADDR x;
|
||||
d10v_convert_daddr_to_raw (CORE_ADDR x)
|
||||
{
|
||||
return ((x) & 0xffff);
|
||||
}
|
||||
|
@ -432,9 +411,7 @@ d10v_convert_daddr_to_raw (x)
|
|||
register. */
|
||||
|
||||
void
|
||||
d10v_store_struct_return (addr, sp)
|
||||
CORE_ADDR addr;
|
||||
CORE_ADDR sp;
|
||||
d10v_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
|
||||
{
|
||||
write_register (ARG1_REGNUM, (addr));
|
||||
}
|
||||
|
@ -445,9 +422,7 @@ d10v_store_struct_return (addr, sp)
|
|||
Things always get returned in RET1_REGNUM, RET2_REGNUM, ... */
|
||||
|
||||
void
|
||||
d10v_store_return_value (type, valbuf)
|
||||
struct type *type;
|
||||
char *valbuf;
|
||||
d10v_store_return_value (struct type *type, char *valbuf)
|
||||
{
|
||||
write_register_bytes (REGISTER_BYTE (RET1_REGNUM),
|
||||
valbuf,
|
||||
|
@ -459,8 +434,7 @@ d10v_store_return_value (type, valbuf)
|
|||
as a CORE_ADDR (or an expression that can be used as one). */
|
||||
|
||||
CORE_ADDR
|
||||
d10v_extract_struct_value_address (regbuf)
|
||||
char *regbuf;
|
||||
d10v_extract_struct_value_address (char *regbuf)
|
||||
{
|
||||
return (extract_address ((regbuf) + REGISTER_BYTE (ARG1_REGNUM),
|
||||
REGISTER_RAW_SIZE (ARG1_REGNUM))
|
||||
|
@ -468,22 +442,19 @@ d10v_extract_struct_value_address (regbuf)
|
|||
}
|
||||
|
||||
CORE_ADDR
|
||||
d10v_frame_saved_pc (frame)
|
||||
struct frame_info *frame;
|
||||
d10v_frame_saved_pc (struct frame_info *frame)
|
||||
{
|
||||
return ((frame)->extra_info->return_pc);
|
||||
}
|
||||
|
||||
CORE_ADDR
|
||||
d10v_frame_args_address (fi)
|
||||
struct frame_info *fi;
|
||||
d10v_frame_args_address (struct frame_info *fi)
|
||||
{
|
||||
return (fi)->frame;
|
||||
}
|
||||
|
||||
CORE_ADDR
|
||||
d10v_frame_locals_address (fi)
|
||||
struct frame_info *fi;
|
||||
d10v_frame_locals_address (struct frame_info *fi)
|
||||
{
|
||||
return (fi)->frame;
|
||||
}
|
||||
|
@ -493,8 +464,7 @@ d10v_frame_locals_address (fi)
|
|||
the stack and that may not be written yet. */
|
||||
|
||||
CORE_ADDR
|
||||
d10v_saved_pc_after_call (frame)
|
||||
struct frame_info *frame;
|
||||
d10v_saved_pc_after_call (struct frame_info *frame)
|
||||
{
|
||||
return ((read_register (LR_REGNUM) << 2)
|
||||
| IMEM_START);
|
||||
|
@ -504,14 +474,13 @@ d10v_saved_pc_after_call (frame)
|
|||
registers. */
|
||||
|
||||
void
|
||||
d10v_pop_frame ()
|
||||
d10v_pop_frame (void)
|
||||
{
|
||||
generic_pop_current_frame (do_d10v_pop_frame);
|
||||
}
|
||||
|
||||
static void
|
||||
do_d10v_pop_frame (fi)
|
||||
struct frame_info *fi;
|
||||
do_d10v_pop_frame (struct frame_info *fi)
|
||||
{
|
||||
CORE_ADDR fp;
|
||||
int regnum;
|
||||
|
@ -550,8 +519,7 @@ do_d10v_pop_frame (fi)
|
|||
}
|
||||
|
||||
static int
|
||||
check_prologue (op)
|
||||
unsigned short op;
|
||||
check_prologue (unsigned short op)
|
||||
{
|
||||
/* st rn, @-sp */
|
||||
if ((op & 0x7E1F) == 0x6C1F)
|
||||
|
@ -585,8 +553,7 @@ check_prologue (op)
|
|||
}
|
||||
|
||||
CORE_ADDR
|
||||
d10v_skip_prologue (pc)
|
||||
CORE_ADDR pc;
|
||||
d10v_skip_prologue (CORE_ADDR pc)
|
||||
{
|
||||
unsigned long op;
|
||||
unsigned short op1, op2;
|
||||
|
@ -654,8 +621,7 @@ d10v_skip_prologue (pc)
|
|||
*/
|
||||
|
||||
CORE_ADDR
|
||||
d10v_frame_chain (fi)
|
||||
struct frame_info *fi;
|
||||
d10v_frame_chain (struct frame_info *fi)
|
||||
{
|
||||
d10v_frame_init_saved_regs (fi);
|
||||
|
||||
|
@ -683,10 +649,7 @@ d10v_frame_chain (fi)
|
|||
static int next_addr, uses_frame;
|
||||
|
||||
static int
|
||||
prologue_find_regs (op, fi, addr)
|
||||
unsigned short op;
|
||||
struct frame_info *fi;
|
||||
CORE_ADDR addr;
|
||||
prologue_find_regs (unsigned short op, struct frame_info *fi, CORE_ADDR addr)
|
||||
{
|
||||
int n;
|
||||
|
||||
|
@ -757,8 +720,7 @@ prologue_find_regs (op, fi, addr)
|
|||
for it IS the sp for the next frame. */
|
||||
|
||||
void
|
||||
d10v_frame_init_saved_regs (fi)
|
||||
struct frame_info *fi;
|
||||
d10v_frame_init_saved_regs (struct frame_info *fi)
|
||||
{
|
||||
CORE_ADDR fp, pc;
|
||||
unsigned long op;
|
||||
|
@ -859,9 +821,7 @@ d10v_frame_init_saved_regs (fi)
|
|||
}
|
||||
|
||||
void
|
||||
d10v_init_extra_frame_info (fromleaf, fi)
|
||||
int fromleaf;
|
||||
struct frame_info *fi;
|
||||
d10v_init_extra_frame_info (int fromleaf, struct frame_info *fi)
|
||||
{
|
||||
fi->extra_info = (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
|
||||
show_regs (args, from_tty)
|
||||
char *args;
|
||||
int from_tty;
|
||||
show_regs (char *args, int from_tty)
|
||||
{
|
||||
int a;
|
||||
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
|
||||
d10v_read_pc (pid)
|
||||
int pid;
|
||||
d10v_read_pc (int pid)
|
||||
{
|
||||
int save_pid;
|
||||
CORE_ADDR pc;
|
||||
|
@ -962,9 +919,7 @@ d10v_read_pc (pid)
|
|||
}
|
||||
|
||||
void
|
||||
d10v_write_pc (val, pid)
|
||||
CORE_ADDR val;
|
||||
int pid;
|
||||
d10v_write_pc (CORE_ADDR val, int pid)
|
||||
{
|
||||
int save_pid;
|
||||
|
||||
|
@ -975,27 +930,25 @@ d10v_write_pc (val, pid)
|
|||
}
|
||||
|
||||
CORE_ADDR
|
||||
d10v_read_sp ()
|
||||
d10v_read_sp (void)
|
||||
{
|
||||
return (D10V_MAKE_DADDR (read_register (SP_REGNUM)));
|
||||
}
|
||||
|
||||
void
|
||||
d10v_write_sp (val)
|
||||
CORE_ADDR val;
|
||||
d10v_write_sp (CORE_ADDR val)
|
||||
{
|
||||
write_register (SP_REGNUM, D10V_CONVERT_DADDR_TO_RAW (val));
|
||||
}
|
||||
|
||||
void
|
||||
d10v_write_fp (val)
|
||||
CORE_ADDR val;
|
||||
d10v_write_fp (CORE_ADDR val)
|
||||
{
|
||||
write_register (FP_REGNUM, D10V_CONVERT_DADDR_TO_RAW (val));
|
||||
}
|
||||
|
||||
CORE_ADDR
|
||||
d10v_read_fp ()
|
||||
d10v_read_fp (void)
|
||||
{
|
||||
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 */
|
||||
|
||||
CORE_ADDR
|
||||
d10v_push_return_address (pc, sp)
|
||||
CORE_ADDR pc;
|
||||
CORE_ADDR sp;
|
||||
d10v_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
|
||||
{
|
||||
write_register (LR_REGNUM, D10V_CONVERT_IADDR_TO_RAW (CALL_DUMMY_ADDRESS ()));
|
||||
return sp;
|
||||
|
@ -1027,10 +978,7 @@ struct stack_item
|
|||
static struct stack_item *push_stack_item (struct stack_item *prev,
|
||||
void *contents, int len);
|
||||
static struct stack_item *
|
||||
push_stack_item (prev, contents, len)
|
||||
struct stack_item *prev;
|
||||
void *contents;
|
||||
int len;
|
||||
push_stack_item (struct stack_item *prev, void *contents, int len)
|
||||
{
|
||||
struct stack_item *si;
|
||||
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 (si)
|
||||
struct stack_item *si;
|
||||
pop_stack_item (struct stack_item *si)
|
||||
{
|
||||
struct stack_item *dead = si;
|
||||
si = si->prev;
|
||||
|
@ -1055,12 +1002,8 @@ pop_stack_item (si)
|
|||
|
||||
|
||||
CORE_ADDR
|
||||
d10v_push_arguments (nargs, args, sp, struct_return, struct_addr)
|
||||
int nargs;
|
||||
value_ptr *args;
|
||||
CORE_ADDR sp;
|
||||
int struct_return;
|
||||
CORE_ADDR struct_addr;
|
||||
d10v_push_arguments (int nargs, value_ptr *args, CORE_ADDR sp,
|
||||
int struct_return, CORE_ADDR struct_addr)
|
||||
{
|
||||
int i;
|
||||
int regnum = ARG1_REGNUM;
|
||||
|
@ -1285,9 +1228,7 @@ struct trace_buffer
|
|||
trace_data;
|
||||
|
||||
static void
|
||||
trace_command (args, from_tty)
|
||||
char *args;
|
||||
int from_tty;
|
||||
trace_command (char *args, int from_tty)
|
||||
{
|
||||
/* Clear the host-side trace buffer, allocating space if needed. */
|
||||
trace_data.size = 0;
|
||||
|
@ -1302,9 +1243,7 @@ trace_command (args, from_tty)
|
|||
}
|
||||
|
||||
static void
|
||||
untrace_command (args, from_tty)
|
||||
char *args;
|
||||
int from_tty;
|
||||
untrace_command (char *args, int from_tty)
|
||||
{
|
||||
tracing = 0;
|
||||
|
||||
|
@ -1312,9 +1251,7 @@ untrace_command (args, from_tty)
|
|||
}
|
||||
|
||||
static void
|
||||
trace_info (args, from_tty)
|
||||
char *args;
|
||||
int from_tty;
|
||||
trace_info (char *args, int from_tty)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -1341,9 +1278,7 @@ trace_info (args, from_tty)
|
|||
on STREAM. Returns length of the instruction, in bytes. */
|
||||
|
||||
static int
|
||||
print_insn (memaddr, stream)
|
||||
CORE_ADDR memaddr;
|
||||
struct ui_file *stream;
|
||||
print_insn (CORE_ADDR memaddr, struct ui_file *stream)
|
||||
{
|
||||
/* If there's no disassembler, something is very wrong. */
|
||||
if (tm_print_insn == NULL)
|
||||
|
@ -1357,7 +1292,7 @@ print_insn (memaddr, stream)
|
|||
}
|
||||
|
||||
static void
|
||||
d10v_eva_prepare_to_trace ()
|
||||
d10v_eva_prepare_to_trace (void)
|
||||
{
|
||||
if (!tracing)
|
||||
return;
|
||||
|
@ -1369,7 +1304,7 @@ d10v_eva_prepare_to_trace ()
|
|||
more useful for display. */
|
||||
|
||||
static void
|
||||
d10v_eva_get_trace_data ()
|
||||
d10v_eva_get_trace_data (void)
|
||||
{
|
||||
int count, i, j, oldsize;
|
||||
int trace_addr, trace_seg, trace_cnt, next_cnt;
|
||||
|
@ -1429,9 +1364,7 @@ d10v_eva_get_trace_data ()
|
|||
}
|
||||
|
||||
static void
|
||||
tdisassemble_command (arg, from_tty)
|
||||
char *arg;
|
||||
int from_tty;
|
||||
tdisassemble_command (char *arg, int from_tty)
|
||||
{
|
||||
int i, count;
|
||||
CORE_ADDR low, high;
|
||||
|
@ -1466,8 +1399,7 @@ tdisassemble_command (arg, from_tty)
|
|||
}
|
||||
|
||||
static void
|
||||
display_trace (low, high)
|
||||
int low, high;
|
||||
display_trace (int low, int high)
|
||||
{
|
||||
int i, count, trace_show_source, first, suppress;
|
||||
CORE_ADDR next_address;
|
||||
|
@ -1527,9 +1459,7 @@ display_trace (low, high)
|
|||
static gdbarch_init_ftype d10v_gdbarch_init;
|
||||
|
||||
static struct gdbarch *
|
||||
d10v_gdbarch_init (info, arches)
|
||||
struct gdbarch_info info;
|
||||
struct gdbarch_list *arches;
|
||||
d10v_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
|
||||
{
|
||||
static LONGEST d10v_call_dummy_words[] =
|
||||
{0};
|
||||
|
@ -1686,7 +1616,7 @@ extern void (*target_resume_hook) (void);
|
|||
extern void (*target_wait_loop_hook) (void);
|
||||
|
||||
void
|
||||
_initialize_d10v_tdep ()
|
||||
_initialize_d10v_tdep (void)
|
||||
{
|
||||
register_gdbarch_init (bfd_arch_d10v, d10v_gdbarch_init);
|
||||
|
||||
|
|
100
gdb/d30v-tdep.c
100
gdb/d30v-tdep.c
|
@ -112,7 +112,7 @@ d30v_frame_chain_valid (chain, fi)
|
|||
registers. */
|
||||
|
||||
void
|
||||
d30v_pop_frame ()
|
||||
d30v_pop_frame (void)
|
||||
{
|
||||
struct frame_info *frame = get_current_frame ();
|
||||
CORE_ADDR fp;
|
||||
|
@ -159,8 +159,7 @@ d30v_pop_frame ()
|
|||
}
|
||||
|
||||
static int
|
||||
check_prologue (op)
|
||||
unsigned long op;
|
||||
check_prologue (unsigned long op)
|
||||
{
|
||||
/* add sp,sp,imm -- observed */
|
||||
if ((op & OP_MASK_ALL_BUT_IMM) == OP_ADD_SP_IMM)
|
||||
|
@ -234,8 +233,7 @@ check_prologue (op)
|
|||
}
|
||||
|
||||
CORE_ADDR
|
||||
d30v_skip_prologue (pc)
|
||||
CORE_ADDR pc;
|
||||
d30v_skip_prologue (CORE_ADDR pc)
|
||||
{
|
||||
unsigned long op[2];
|
||||
unsigned long opl, opr; /* left / right sub operations */
|
||||
|
@ -320,8 +318,7 @@ static int end_of_stack;
|
|||
*/
|
||||
|
||||
CORE_ADDR
|
||||
d30v_frame_chain (frame)
|
||||
struct frame_info *frame;
|
||||
d30v_frame_chain (struct frame_info *frame)
|
||||
{
|
||||
struct frame_saved_regs fsr;
|
||||
|
||||
|
@ -351,10 +348,8 @@ static int next_addr, uses_frame;
|
|||
static int frame_size;
|
||||
|
||||
static int
|
||||
prologue_find_regs (op, fsr, addr)
|
||||
unsigned long op;
|
||||
struct frame_saved_regs *fsr;
|
||||
CORE_ADDR addr;
|
||||
prologue_find_regs (unsigned long op, struct frame_saved_regs *fsr,
|
||||
CORE_ADDR addr)
|
||||
{
|
||||
int n;
|
||||
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
|
||||
return for it IS the sp for the next frame. */
|
||||
void
|
||||
d30v_frame_find_saved_regs (fi, fsr)
|
||||
struct frame_info *fi;
|
||||
struct frame_saved_regs *fsr;
|
||||
d30v_frame_find_saved_regs (struct frame_info *fi, struct frame_saved_regs *fsr)
|
||||
{
|
||||
CORE_ADDR fp, pc;
|
||||
unsigned long opl, opr;
|
||||
|
@ -556,9 +549,8 @@ d30v_frame_find_saved_regs (fi, fsr)
|
|||
}
|
||||
|
||||
void
|
||||
d30v_frame_find_saved_regs_offsets (fi, fsr)
|
||||
struct frame_info *fi;
|
||||
struct frame_saved_regs *fsr;
|
||||
d30v_frame_find_saved_regs_offsets (struct frame_info *fi,
|
||||
struct frame_saved_regs *fsr)
|
||||
{
|
||||
CORE_ADDR fp, pc;
|
||||
unsigned long opl, opr;
|
||||
|
@ -677,9 +669,7 @@ d30v_frame_find_saved_regs_offsets (fi, fsr)
|
|||
}
|
||||
|
||||
void
|
||||
d30v_init_extra_frame_info (fromleaf, fi)
|
||||
int fromleaf;
|
||||
struct frame_info *fi;
|
||||
d30v_init_extra_frame_info (int fromleaf, struct frame_info *fi)
|
||||
{
|
||||
struct frame_saved_regs dummy;
|
||||
|
||||
|
@ -709,9 +699,7 @@ d30v_init_extra_frame_info (fromleaf, fi)
|
|||
}
|
||||
|
||||
void
|
||||
d30v_init_frame_pc (fromleaf, prev)
|
||||
int fromleaf;
|
||||
struct frame_info *prev;
|
||||
d30v_init_frame_pc (int fromleaf, struct frame_info *prev)
|
||||
{
|
||||
/* default value, put here so we can breakpoint on it and
|
||||
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 (regnum, tabular)
|
||||
int regnum;
|
||||
int tabular;
|
||||
d30v_print_register (int regnum, int tabular)
|
||||
{
|
||||
if (regnum < A0_REGNUM)
|
||||
{
|
||||
|
@ -754,7 +740,7 @@ d30v_print_register (regnum, tabular)
|
|||
}
|
||||
|
||||
static void
|
||||
d30v_print_flags ()
|
||||
d30v_print_flags (void)
|
||||
{
|
||||
long psw = read_register (PSW_REGNUM);
|
||||
printf_filtered ("flags #1");
|
||||
|
@ -778,17 +764,13 @@ d30v_print_flags ()
|
|||
}
|
||||
|
||||
static void
|
||||
print_flags_command (args, from_tty)
|
||||
char *args;
|
||||
int from_tty;
|
||||
print_flags_command (char *args, int from_tty)
|
||||
{
|
||||
d30v_print_flags ();
|
||||
}
|
||||
|
||||
void
|
||||
d30v_do_registers_info (regnum, fpregs)
|
||||
int regnum;
|
||||
int fpregs;
|
||||
d30v_do_registers_info (int regnum, int fpregs)
|
||||
{
|
||||
long long num1, num2;
|
||||
long psw;
|
||||
|
@ -886,14 +868,8 @@ d30v_do_registers_info (regnum, fpregs)
|
|||
}
|
||||
|
||||
CORE_ADDR
|
||||
d30v_fix_call_dummy (dummyname, start_sp, fun, nargs, args, type, gcc_p)
|
||||
char *dummyname;
|
||||
CORE_ADDR start_sp;
|
||||
CORE_ADDR fun;
|
||||
int nargs;
|
||||
value_ptr *args;
|
||||
struct type *type;
|
||||
int gcc_p;
|
||||
d30v_fix_call_dummy (char *dummyname, CORE_ADDR start_sp, CORE_ADDR fun,
|
||||
int nargs, value_ptr *args, struct type *type, int gcc_p)
|
||||
{
|
||||
int regnum;
|
||||
CORE_ADDR sp;
|
||||
|
@ -916,8 +892,7 @@ d30v_fix_call_dummy (dummyname, start_sp, fun, nargs, args, type, gcc_p)
|
|||
}
|
||||
|
||||
static void
|
||||
d30v_pop_dummy_frame (fi)
|
||||
struct frame_info *fi;
|
||||
d30v_pop_dummy_frame (struct frame_info *fi)
|
||||
{
|
||||
CORE_ADDR sp = fi->dummy;
|
||||
int regnum;
|
||||
|
@ -932,12 +907,8 @@ d30v_pop_dummy_frame (fi)
|
|||
|
||||
|
||||
CORE_ADDR
|
||||
d30v_push_arguments (nargs, args, sp, struct_return, struct_addr)
|
||||
int nargs;
|
||||
value_ptr *args;
|
||||
CORE_ADDR sp;
|
||||
int struct_return;
|
||||
CORE_ADDR struct_addr;
|
||||
d30v_push_arguments (int nargs, value_ptr *args, CORE_ADDR sp,
|
||||
int struct_return, CORE_ADDR struct_addr)
|
||||
{
|
||||
int i, len, index = 0, regnum = 2;
|
||||
char buffer[4], *contents;
|
||||
|
@ -1035,7 +1006,7 @@ d30v_push_arguments (nargs, args, sp, struct_return, struct_addr)
|
|||
/* restored. */
|
||||
|
||||
CORE_ADDR
|
||||
d30v_call_dummy_address ()
|
||||
d30v_call_dummy_address (void)
|
||||
{
|
||||
CORE_ADDR entry;
|
||||
struct minimal_symbol *sym;
|
||||
|
@ -1126,9 +1097,7 @@ struct trace_buffer
|
|||
trace_data;
|
||||
|
||||
static void
|
||||
trace_command (args, from_tty)
|
||||
char *args;
|
||||
int from_tty;
|
||||
trace_command (char *args, int from_tty)
|
||||
{
|
||||
/* Clear the host-side trace buffer, allocating space if needed. */
|
||||
trace_data.size = 0;
|
||||
|
@ -1143,9 +1112,7 @@ trace_command (args, from_tty)
|
|||
}
|
||||
|
||||
static void
|
||||
untrace_command (args, from_tty)
|
||||
char *args;
|
||||
int from_tty;
|
||||
untrace_command (char *args, int from_tty)
|
||||
{
|
||||
tracing = 0;
|
||||
|
||||
|
@ -1153,9 +1120,7 @@ untrace_command (args, from_tty)
|
|||
}
|
||||
|
||||
static void
|
||||
trace_info (args, from_tty)
|
||||
char *args;
|
||||
int from_tty;
|
||||
trace_info (char *args, int from_tty)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -1181,9 +1146,7 @@ trace_info (args, from_tty)
|
|||
on STREAM. Returns length of the instruction, in bytes. */
|
||||
|
||||
static int
|
||||
print_insn (memaddr, stream)
|
||||
CORE_ADDR memaddr;
|
||||
struct ui_file *stream;
|
||||
print_insn (CORE_ADDR memaddr, struct ui_file *stream)
|
||||
{
|
||||
/* If there's no disassembler, something is very wrong. */
|
||||
if (tm_print_insn == NULL)
|
||||
|
@ -1197,7 +1160,7 @@ print_insn (memaddr, stream)
|
|||
}
|
||||
|
||||
void
|
||||
d30v_eva_prepare_to_trace ()
|
||||
d30v_eva_prepare_to_trace (void)
|
||||
{
|
||||
if (!tracing)
|
||||
return;
|
||||
|
@ -1209,7 +1172,7 @@ d30v_eva_prepare_to_trace ()
|
|||
more useful for display. */
|
||||
|
||||
void
|
||||
d30v_eva_get_trace_data ()
|
||||
d30v_eva_get_trace_data (void)
|
||||
{
|
||||
int count, i, j, oldsize;
|
||||
int trace_addr, trace_seg, trace_cnt, next_cnt;
|
||||
|
@ -1269,9 +1232,7 @@ d30v_eva_get_trace_data ()
|
|||
}
|
||||
|
||||
static void
|
||||
tdisassemble_command (arg, from_tty)
|
||||
char *arg;
|
||||
int from_tty;
|
||||
tdisassemble_command (char *arg, int from_tty)
|
||||
{
|
||||
int i, count;
|
||||
CORE_ADDR low, high;
|
||||
|
@ -1308,8 +1269,7 @@ tdisassemble_command (arg, from_tty)
|
|||
}
|
||||
|
||||
static void
|
||||
display_trace (low, high)
|
||||
int low, high;
|
||||
display_trace (int low, int high)
|
||||
{
|
||||
int i, count, trace_show_source, first, suppress;
|
||||
CORE_ADDR next_address;
|
||||
|
@ -1369,7 +1329,7 @@ extern void (*target_resume_hook) (void);
|
|||
extern void (*target_wait_loop_hook) (void);
|
||||
|
||||
void
|
||||
_initialize_d30v_tdep ()
|
||||
_initialize_d30v_tdep (void)
|
||||
{
|
||||
tm_print_insn = print_insn_d30v;
|
||||
|
||||
|
|
|
@ -34,11 +34,7 @@
|
|||
static void dbug_open (char *args, int from_tty);
|
||||
|
||||
static void
|
||||
dbug_supply_register (regname, regnamelen, val, vallen)
|
||||
char *regname;
|
||||
int regnamelen;
|
||||
char *val;
|
||||
int vallen;
|
||||
dbug_supply_register (char *regname, int regnamelen, char *val, int vallen)
|
||||
{
|
||||
int regno;
|
||||
|
||||
|
@ -143,15 +139,13 @@ init_dbug_cmds (void)
|
|||
} /* init_debug_ops */
|
||||
|
||||
static void
|
||||
dbug_open (args, from_tty)
|
||||
char *args;
|
||||
int from_tty;
|
||||
dbug_open (char *args, int from_tty)
|
||||
{
|
||||
monitor_open (args, &dbug_cmds, from_tty);
|
||||
}
|
||||
|
||||
void
|
||||
_initialize_dbug_rom ()
|
||||
_initialize_dbug_rom (void)
|
||||
{
|
||||
init_dbug_cmds ();
|
||||
init_monitor_ops (&dbug_ops);
|
||||
|
|
144
gdb/dbxread.c
144
gdb/dbxread.c
|
@ -319,7 +319,7 @@ static struct partial_symtab *start_psymtab (struct objfile *, char *,
|
|||
/* Free up old header file tables */
|
||||
|
||||
static void
|
||||
free_header_files ()
|
||||
free_header_files (void)
|
||||
{
|
||||
if (this_object_header_files)
|
||||
{
|
||||
|
@ -332,7 +332,7 @@ free_header_files ()
|
|||
/* Allocate new header file tables */
|
||||
|
||||
static void
|
||||
init_header_files ()
|
||||
init_header_files (void)
|
||||
{
|
||||
n_allocated_this_object_header_files = 10;
|
||||
this_object_header_files = (int *) xmalloc (10 * sizeof (int));
|
||||
|
@ -342,8 +342,7 @@ init_header_files ()
|
|||
at the next successive FILENUM. */
|
||||
|
||||
static void
|
||||
add_this_object_header_file (i)
|
||||
int i;
|
||||
add_this_object_header_file (int i)
|
||||
{
|
||||
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. */
|
||||
|
||||
static void
|
||||
add_old_header_file (name, instance)
|
||||
char *name;
|
||||
int instance;
|
||||
add_old_header_file (char *name, int instance)
|
||||
{
|
||||
register struct header_file *p = HEADER_FILES (current_objfile);
|
||||
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". */
|
||||
|
||||
static void
|
||||
add_new_header_file (name, instance)
|
||||
char *name;
|
||||
int instance;
|
||||
add_new_header_file (char *name, int instance)
|
||||
{
|
||||
register int i;
|
||||
register struct header_file *hfile;
|
||||
|
@ -435,8 +430,7 @@ add_new_header_file (name, instance)
|
|||
|
||||
#if 0
|
||||
static struct type **
|
||||
explicit_lookup_type (real_filenum, index)
|
||||
int real_filenum, index;
|
||||
explicit_lookup_type (int real_filenum, int index)
|
||||
{
|
||||
register struct header_file *f = &HEADER_FILES (current_objfile)[real_filenum];
|
||||
|
||||
|
@ -453,11 +447,8 @@ explicit_lookup_type (real_filenum, index)
|
|||
#endif
|
||||
|
||||
static void
|
||||
record_minimal_symbol (name, address, type, objfile)
|
||||
char *name;
|
||||
CORE_ADDR address;
|
||||
int type;
|
||||
struct objfile *objfile;
|
||||
record_minimal_symbol (char *name, CORE_ADDR address, int type,
|
||||
struct objfile *objfile)
|
||||
{
|
||||
enum minimal_symbol_type ms_type;
|
||||
int section;
|
||||
|
@ -626,8 +617,7 @@ dbx_symfile_read (objfile, mainline)
|
|||
file, e.g. a shared library). */
|
||||
|
||||
static void
|
||||
dbx_new_init (ignore)
|
||||
struct objfile *ignore;
|
||||
dbx_new_init (struct objfile *ignore)
|
||||
{
|
||||
stabsread_new_init ();
|
||||
buildsym_new_init ();
|
||||
|
@ -651,8 +641,7 @@ dbx_new_init (ignore)
|
|||
#define DBX_STRINGTAB_SIZE_SIZE sizeof(long) /* FIXME */
|
||||
|
||||
static void
|
||||
dbx_symfile_init (objfile)
|
||||
struct objfile *objfile;
|
||||
dbx_symfile_init (struct objfile *objfile)
|
||||
{
|
||||
int val;
|
||||
bfd *sym_bfd = objfile->obfd;
|
||||
|
@ -769,8 +758,7 @@ dbx_symfile_init (objfile)
|
|||
objfile struct from the global list of known objfiles. */
|
||||
|
||||
static void
|
||||
dbx_symfile_finish (objfile)
|
||||
struct objfile *objfile;
|
||||
dbx_symfile_finish (struct objfile *objfile)
|
||||
{
|
||||
if (objfile->sym_stab_info != NULL)
|
||||
{
|
||||
|
@ -857,8 +845,7 @@ process_later (sym, p, f)
|
|||
/* Call deferred funtions in CONT_LIST. */
|
||||
|
||||
static void
|
||||
process_now (objfile)
|
||||
struct objfile *objfile;
|
||||
process_now (struct objfile *objfile)
|
||||
{
|
||||
int i;
|
||||
int save_symbuf_idx;
|
||||
|
@ -927,8 +914,7 @@ static unsigned int symbuf_read;
|
|||
(into the string table) but this does no harm. */
|
||||
|
||||
static void
|
||||
fill_symbuf (sym_bfd)
|
||||
bfd *sym_bfd;
|
||||
fill_symbuf (bfd *sym_bfd)
|
||||
{
|
||||
unsigned int count;
|
||||
int nbytes;
|
||||
|
@ -991,8 +977,7 @@ fill_symbuf (sym_bfd)
|
|||
call this function to get the continuation. */
|
||||
|
||||
static char *
|
||||
dbx_next_symbol_text (objfile)
|
||||
struct objfile *objfile;
|
||||
dbx_next_symbol_text (struct objfile *objfile)
|
||||
{
|
||||
struct internal_nlist nlist;
|
||||
|
||||
|
@ -1012,9 +997,7 @@ dbx_next_symbol_text (objfile)
|
|||
allocated. */
|
||||
|
||||
static void
|
||||
init_bincl_list (number, objfile)
|
||||
int number;
|
||||
struct objfile *objfile;
|
||||
init_bincl_list (int number, struct objfile *objfile)
|
||||
{
|
||||
bincls_allocated = number;
|
||||
next_bincl = bincl_list = (struct header_file_location *)
|
||||
|
@ -1024,10 +1007,7 @@ init_bincl_list (number, objfile)
|
|||
/* Add a bincl to the list. */
|
||||
|
||||
static void
|
||||
add_bincl_to_list (pst, name, instance)
|
||||
struct partial_symtab *pst;
|
||||
char *name;
|
||||
int instance;
|
||||
add_bincl_to_list (struct partial_symtab *pst, char *name, int instance)
|
||||
{
|
||||
if (next_bincl >= bincl_list + bincls_allocated)
|
||||
{
|
||||
|
@ -1048,9 +1028,7 @@ add_bincl_to_list (pst, name, instance)
|
|||
with that header_file_location. */
|
||||
|
||||
static struct partial_symtab *
|
||||
find_corresponding_bincl_psymtab (name, instance)
|
||||
char *name;
|
||||
int instance;
|
||||
find_corresponding_bincl_psymtab (char *name, int instance)
|
||||
{
|
||||
struct header_file_location *bincl;
|
||||
|
||||
|
@ -1066,8 +1044,7 @@ find_corresponding_bincl_psymtab (name, instance)
|
|||
/* Free the storage allocated for the bincl list. */
|
||||
|
||||
static void
|
||||
free_bincl_list (objfile)
|
||||
struct objfile *objfile;
|
||||
free_bincl_list (struct objfile *objfile)
|
||||
{
|
||||
mfree (objfile->md, (PTR) bincl_list);
|
||||
bincls_allocated = 0;
|
||||
|
@ -1089,8 +1066,7 @@ make_cleanup_free_bincl_list (struct objfile *objfile)
|
|||
add them to the minimal symbol table. */
|
||||
|
||||
static void
|
||||
read_dbx_dynamic_symtab (objfile)
|
||||
struct objfile *objfile;
|
||||
read_dbx_dynamic_symtab (struct objfile *objfile)
|
||||
{
|
||||
bfd *abfd = objfile->obfd;
|
||||
struct cleanup *back_to;
|
||||
|
@ -1232,8 +1208,7 @@ read_dbx_dynamic_symtab (objfile)
|
|||
debugging information is available. */
|
||||
|
||||
static void
|
||||
read_dbx_symtab (objfile)
|
||||
struct objfile *objfile;
|
||||
read_dbx_symtab (struct objfile *objfile)
|
||||
{
|
||||
register struct external_nlist *bufp = 0; /* =0 avoids gcc -Wall glitch */
|
||||
struct internal_nlist nlist;
|
||||
|
@ -1395,13 +1370,9 @@ read_dbx_symtab (objfile)
|
|||
|
||||
|
||||
static struct partial_symtab *
|
||||
start_psymtab (objfile, filename, textlow, ldsymoff, global_syms, static_syms)
|
||||
struct objfile *objfile;
|
||||
char *filename;
|
||||
CORE_ADDR textlow;
|
||||
int ldsymoff;
|
||||
struct partial_symbol **global_syms;
|
||||
struct partial_symbol **static_syms;
|
||||
start_psymtab (struct objfile *objfile, char *filename, CORE_ADDR textlow,
|
||||
int ldsymoff, struct partial_symbol **global_syms,
|
||||
struct partial_symbol **static_syms)
|
||||
{
|
||||
struct partial_symtab *result =
|
||||
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. */
|
||||
|
||||
struct partial_symtab *
|
||||
end_psymtab (pst, include_list, num_includes, capping_symbol_offset,
|
||||
capping_text, dependency_list, number_dependencies, textlow_not_set)
|
||||
struct partial_symtab *pst;
|
||||
char **include_list;
|
||||
int num_includes;
|
||||
int capping_symbol_offset;
|
||||
CORE_ADDR capping_text;
|
||||
struct partial_symtab **dependency_list;
|
||||
int number_dependencies;
|
||||
int textlow_not_set;
|
||||
end_psymtab (struct partial_symtab *pst, char **include_list, 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;
|
||||
struct objfile *objfile = pst->objfile;
|
||||
|
@ -1607,8 +1572,7 @@ end_psymtab (pst, include_list, num_includes, capping_symbol_offset,
|
|||
}
|
||||
|
||||
static void
|
||||
dbx_psymtab_to_symtab_1 (pst)
|
||||
struct partial_symtab *pst;
|
||||
dbx_psymtab_to_symtab_1 (struct partial_symtab *pst)
|
||||
{
|
||||
struct cleanup *old_chain;
|
||||
int i;
|
||||
|
@ -1665,8 +1629,7 @@ dbx_psymtab_to_symtab_1 (pst)
|
|||
Be verbose about it if the user wants that. */
|
||||
|
||||
static void
|
||||
dbx_psymtab_to_symtab (pst)
|
||||
struct partial_symtab *pst;
|
||||
dbx_psymtab_to_symtab (struct partial_symtab *pst)
|
||||
{
|
||||
bfd *sym_bfd;
|
||||
|
||||
|
@ -1709,8 +1672,7 @@ dbx_psymtab_to_symtab (pst)
|
|||
/* Read in a defined section of a specific object file's symbols. */
|
||||
|
||||
static void
|
||||
read_ofile_symtab (pst)
|
||||
struct partial_symtab *pst;
|
||||
read_ofile_symtab (struct partial_symtab *pst)
|
||||
{
|
||||
register char *namestring;
|
||||
register struct external_nlist *bufp;
|
||||
|
@ -1903,12 +1865,9 @@ read_ofile_symtab (pst)
|
|||
It is used in end_symtab. */
|
||||
|
||||
void
|
||||
process_one_symbol (type, desc, valu, name, section_offsets, objfile)
|
||||
int type, desc;
|
||||
CORE_ADDR valu;
|
||||
char *name;
|
||||
struct section_offsets *section_offsets;
|
||||
struct objfile *objfile;
|
||||
process_one_symbol (int type, int desc, CORE_ADDR valu, char *name,
|
||||
struct section_offsets *section_offsets,
|
||||
struct objfile *objfile)
|
||||
{
|
||||
#ifdef SUN_FIXED_LBRAC_BUG
|
||||
/* 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. */
|
||||
|
||||
void
|
||||
coffstab_build_psymtabs (objfile, mainline,
|
||||
textaddr, textsize, stabsects,
|
||||
stabstroffset, stabstrsize)
|
||||
struct objfile *objfile;
|
||||
int mainline;
|
||||
CORE_ADDR textaddr;
|
||||
unsigned int textsize;
|
||||
struct stab_section_list *stabsects;
|
||||
file_ptr stabstroffset;
|
||||
unsigned int stabstrsize;
|
||||
coffstab_build_psymtabs (struct objfile *objfile, int mainline,
|
||||
CORE_ADDR textaddr, unsigned int textsize,
|
||||
struct stab_section_list *stabsects,
|
||||
file_ptr stabstroffset, unsigned int stabstrsize)
|
||||
{
|
||||
int val;
|
||||
bfd *sym_bfd = objfile->obfd;
|
||||
|
@ -2592,15 +2545,9 @@ coffstab_build_psymtabs (objfile, mainline,
|
|||
adjusted for elf details. */
|
||||
|
||||
void
|
||||
elfstab_build_psymtabs (objfile, mainline,
|
||||
staboffset, stabsize,
|
||||
stabstroffset, stabstrsize)
|
||||
struct objfile *objfile;
|
||||
int mainline;
|
||||
file_ptr staboffset;
|
||||
unsigned int stabsize;
|
||||
file_ptr stabstroffset;
|
||||
unsigned int stabstrsize;
|
||||
elfstab_build_psymtabs (struct objfile *objfile, int mainline,
|
||||
file_ptr staboffset, unsigned int stabsize,
|
||||
file_ptr stabstroffset, unsigned int stabstrsize)
|
||||
{
|
||||
int val;
|
||||
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. */
|
||||
|
||||
void
|
||||
stabsect_build_psymtabs (objfile, mainline, stab_name,
|
||||
stabstr_name, text_name)
|
||||
struct objfile *objfile;
|
||||
int mainline;
|
||||
char *stab_name;
|
||||
char *stabstr_name;
|
||||
char *text_name;
|
||||
stabsect_build_psymtabs (struct objfile *objfile, int mainline, char *stab_name,
|
||||
char *stabstr_name, char *text_name)
|
||||
{
|
||||
int val;
|
||||
bfd *sym_bfd = objfile->obfd;
|
||||
|
@ -2750,7 +2692,7 @@ static struct sym_fns aout_sym_fns =
|
|||
};
|
||||
|
||||
void
|
||||
_initialize_dbxread ()
|
||||
_initialize_dbxread (void)
|
||||
{
|
||||
add_symtab_fns (&aout_sym_fns);
|
||||
}
|
||||
|
|
45
gdb/dcache.c
45
gdb/dcache.c
|
@ -173,8 +173,7 @@ DCACHE *last_cache; /* Used by info dcache */
|
|||
/* Free all the data cache blocks, thus discarding all cached data. */
|
||||
|
||||
void
|
||||
dcache_flush (dcache)
|
||||
DCACHE *dcache;
|
||||
dcache_flush (DCACHE *dcache)
|
||||
{
|
||||
int i;
|
||||
dcache->valid_head = 0;
|
||||
|
@ -204,9 +203,7 @@ dcache_flush (dcache)
|
|||
containing it. */
|
||||
|
||||
static struct dcache_block *
|
||||
dcache_hit (dcache, addr)
|
||||
DCACHE *dcache;
|
||||
CORE_ADDR addr;
|
||||
dcache_hit (DCACHE *dcache, CORE_ADDR addr)
|
||||
{
|
||||
register struct dcache_block *db;
|
||||
|
||||
|
@ -230,9 +227,7 @@ dcache_hit (dcache, addr)
|
|||
be written is. */
|
||||
|
||||
static int
|
||||
dcache_write_line (dcache, db)
|
||||
DCACHE *dcache;
|
||||
register struct dcache_block *db;
|
||||
dcache_write_line (DCACHE *dcache, register struct dcache_block *db)
|
||||
{
|
||||
int s;
|
||||
int e;
|
||||
|
@ -280,8 +275,7 @@ dcache_write_line (dcache, db)
|
|||
list...). */
|
||||
|
||||
static struct dcache_block *
|
||||
dcache_alloc (dcache)
|
||||
DCACHE *dcache;
|
||||
dcache_alloc (DCACHE *dcache)
|
||||
{
|
||||
register struct dcache_block *db;
|
||||
|
||||
|
@ -320,10 +314,7 @@ dcache_alloc (dcache)
|
|||
Returns 0 on error. */
|
||||
|
||||
static int
|
||||
dcache_peek_byte (dcache, addr, ptr)
|
||||
DCACHE *dcache;
|
||||
CORE_ADDR addr;
|
||||
char *ptr;
|
||||
dcache_peek_byte (DCACHE *dcache, CORE_ADDR addr, char *ptr)
|
||||
{
|
||||
register struct dcache_block *db = dcache_hit (dcache, addr);
|
||||
int ok = 1;
|
||||
|
@ -361,8 +352,7 @@ dcache_peek_byte (dcache, addr, ptr)
|
|||
|
||||
/* Writeback any dirty lines to the remote. */
|
||||
static int
|
||||
dcache_writeback (dcache)
|
||||
DCACHE *dcache;
|
||||
dcache_writeback (DCACHE *dcache)
|
||||
{
|
||||
struct dcache_block *db;
|
||||
|
||||
|
@ -383,10 +373,7 @@ dcache_writeback (dcache)
|
|||
*/
|
||||
|
||||
static int
|
||||
dcache_poke_byte (dcache, addr, ptr)
|
||||
DCACHE *dcache;
|
||||
CORE_ADDR addr;
|
||||
char *ptr;
|
||||
dcache_poke_byte (DCACHE *dcache, CORE_ADDR addr, char *ptr)
|
||||
{
|
||||
register struct dcache_block *db = dcache_hit (dcache, addr);
|
||||
|
||||
|
@ -405,9 +392,7 @@ dcache_poke_byte (dcache, addr, ptr)
|
|||
|
||||
/* Initialize the data cache. */
|
||||
DCACHE *
|
||||
dcache_init (reading, writing)
|
||||
memxferfunc reading;
|
||||
memxferfunc writing;
|
||||
dcache_init (memxferfunc reading, memxferfunc writing)
|
||||
{
|
||||
int csize = sizeof (struct dcache_block) * DCACHE_SIZE;
|
||||
DCACHE *dcache;
|
||||
|
@ -434,12 +419,8 @@ dcache_init (reading, writing)
|
|||
This routine is indended to be called by remote_xfer_ functions. */
|
||||
|
||||
int
|
||||
dcache_xfer_memory (dcache, memaddr, myaddr, len, should_write)
|
||||
DCACHE *dcache;
|
||||
CORE_ADDR memaddr;
|
||||
char *myaddr;
|
||||
int len;
|
||||
int should_write;
|
||||
dcache_xfer_memory (DCACHE *dcache, CORE_ADDR memaddr, char *myaddr, int len,
|
||||
int should_write)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -470,9 +451,7 @@ dcache_xfer_memory (dcache, memaddr, myaddr, len, should_write)
|
|||
}
|
||||
|
||||
static void
|
||||
dcache_info (exp, tty)
|
||||
char *exp;
|
||||
int tty;
|
||||
dcache_info (char *exp, int tty)
|
||||
{
|
||||
struct dcache_block *p;
|
||||
|
||||
|
@ -510,7 +489,7 @@ set_dcache_state (int what)
|
|||
}
|
||||
|
||||
void
|
||||
_initialize_dcache ()
|
||||
_initialize_dcache (void)
|
||||
{
|
||||
add_show_from_set
|
||||
(add_set_cmd ("remotecache", class_support, var_boolean,
|
||||
|
|
|
@ -34,9 +34,7 @@
|
|||
BLOCKEND is the address of the end of the user structure. */
|
||||
|
||||
CORE_ADDR
|
||||
register_addr (regno, blockend)
|
||||
int regno;
|
||||
CORE_ADDR blockend;
|
||||
register_addr (int regno, CORE_ADDR blockend)
|
||||
{
|
||||
static int sysv68reg[] =
|
||||
{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. */
|
||||
void
|
||||
_initialize_delta68_nat ()
|
||||
_initialize_delta68_nat (void)
|
||||
{
|
||||
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 */
|
||||
memctl (0, 4096, MCT_TEXT);
|
||||
#endif
|
||||
}
|
||||
|
||||
kernel_u_size ()
|
||||
kernel_u_size (void)
|
||||
{
|
||||
return sizeof (struct user);
|
||||
}
|
||||
|
|
|
@ -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. */
|
||||
|
||||
static void
|
||||
set_demangling_command (ignore, from_tty, c)
|
||||
char *ignore;
|
||||
int from_tty;
|
||||
struct cmd_list_element *c;
|
||||
set_demangling_command (char *ignore, int from_tty, struct cmd_list_element *c)
|
||||
{
|
||||
const struct demangler *dem;
|
||||
|
||||
|
@ -184,8 +181,7 @@ set_demangling_command (ignore, from_tty, c)
|
|||
/* Fake a "set demangle-style" command. */
|
||||
|
||||
void
|
||||
set_demangling_style (style)
|
||||
char *style;
|
||||
set_demangling_style (char *style)
|
||||
{
|
||||
if (current_demangling_style_string != NULL)
|
||||
{
|
||||
|
@ -215,14 +211,13 @@ static char cplus_markers[] =
|
|||
{CPLUS_MARKER, '.', '$', '\0'};
|
||||
|
||||
int
|
||||
is_cplus_marker (c)
|
||||
int c;
|
||||
is_cplus_marker (int c)
|
||||
{
|
||||
return c && strchr (cplus_markers, c) != NULL;
|
||||
}
|
||||
|
||||
void
|
||||
_initialize_demangler ()
|
||||
_initialize_demangler (void)
|
||||
{
|
||||
struct cmd_list_element *set, *show;
|
||||
|
||||
|
|
|
@ -30,11 +30,7 @@
|
|||
static void dink32_open (char *args, int from_tty);
|
||||
|
||||
static void
|
||||
dink32_supply_register (regname, regnamelen, val, vallen)
|
||||
char *regname;
|
||||
int regnamelen;
|
||||
char *val;
|
||||
int vallen;
|
||||
dink32_supply_register (char *regname, int regnamelen, char *val, int vallen)
|
||||
{
|
||||
int regno = 0;
|
||||
|
||||
|
@ -100,10 +96,7 @@ dink32_supply_register (regname, regnamelen, val, vallen)
|
|||
}
|
||||
|
||||
static void
|
||||
dink32_load (monops, filename, from_tty)
|
||||
struct monitor_ops *monops;
|
||||
char *filename;
|
||||
int from_tty;
|
||||
dink32_load (struct monitor_ops *monops, char *filename, int from_tty)
|
||||
{
|
||||
extern int inferior_pid;
|
||||
|
||||
|
@ -145,15 +138,13 @@ static char *dink32_inits[] =
|
|||
static struct monitor_ops dink32_cmds;
|
||||
|
||||
static void
|
||||
dink32_open (args, from_tty)
|
||||
char *args;
|
||||
int from_tty;
|
||||
dink32_open (char *args, int from_tty)
|
||||
{
|
||||
monitor_open (args, &dink32_cmds, from_tty);
|
||||
}
|
||||
|
||||
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.init = dink32_inits;
|
||||
|
|
|
@ -47,9 +47,7 @@ static int regmap[] =
|
|||
*/
|
||||
|
||||
int
|
||||
dpx2_register_u_addr (blockend, regnum)
|
||||
int blockend;
|
||||
int regnum;
|
||||
dpx2_register_u_addr (int blockend, int regnum)
|
||||
{
|
||||
if (regnum < FP0_REGNUM)
|
||||
return (blockend + 4 * regmap[regnum]);
|
||||
|
@ -73,7 +71,7 @@ dpx2_register_u_addr (blockend, regnum)
|
|||
CORE_ADDR kernel_u_addr;
|
||||
|
||||
void
|
||||
_initialize_dpx2_nat ()
|
||||
_initialize_dpx2_nat (void)
|
||||
{
|
||||
struct utsname uts;
|
||||
|
||||
|
|
10
gdb/dsrec.c
10
gdb/dsrec.c
|
@ -218,14 +218,8 @@ load_srec (desc, file, load_offset, maxrecsize, flags, hashmark, waitack)
|
|||
*/
|
||||
|
||||
static int
|
||||
make_srec (srec, targ_addr, abfd, sect, sectoff, maxrecsize, flags)
|
||||
char *srec;
|
||||
CORE_ADDR targ_addr;
|
||||
bfd *abfd;
|
||||
asection *sect;
|
||||
int sectoff;
|
||||
int *maxrecsize;
|
||||
int flags;
|
||||
make_srec (char *srec, CORE_ADDR targ_addr, bfd *abfd, asection *sect,
|
||||
int sectoff, int *maxrecsize, int flags)
|
||||
{
|
||||
unsigned char checksum;
|
||||
int tmp;
|
||||
|
|
116
gdb/dstread.c
116
gdb/dstread.c
|
@ -78,9 +78,7 @@ static void dst_record_line (int, CORE_ADDR);
|
|||
/* FIXME: Use record_line instead. */
|
||||
|
||||
static void
|
||||
dst_record_line (line, pc)
|
||||
int line;
|
||||
CORE_ADDR pc;
|
||||
dst_record_line (int line, CORE_ADDR pc)
|
||||
{
|
||||
struct linetable_entry *e;
|
||||
/* 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. */
|
||||
|
||||
static void
|
||||
dst_start_symtab ()
|
||||
dst_start_symtab (void)
|
||||
{
|
||||
/* 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. */
|
||||
|
||||
static void
|
||||
complete_symtab (name, start_addr, size)
|
||||
char *name;
|
||||
CORE_ADDR start_addr;
|
||||
unsigned int size;
|
||||
complete_symtab (char *name, CORE_ADDR start_addr, unsigned int size)
|
||||
{
|
||||
last_source_file = savestring (name, strlen (name));
|
||||
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. */
|
||||
|
||||
static void
|
||||
dst_end_symtab (objfile)
|
||||
struct objfile *objfile;
|
||||
dst_end_symtab (struct objfile *objfile)
|
||||
{
|
||||
register struct symtab *symtab;
|
||||
register struct blockvector *blockvector;
|
||||
|
@ -194,8 +188,7 @@ dst_end_symtab (objfile)
|
|||
The ultimate result is a new symtab (or, FIXME, eventually a psymtab). */
|
||||
|
||||
static void
|
||||
dst_symfile_init (objfile)
|
||||
struct objfile *objfile;
|
||||
dst_symfile_init (struct objfile *objfile)
|
||||
{
|
||||
asection *section;
|
||||
bfd *abfd = objfile->obfd;
|
||||
|
@ -210,10 +203,7 @@ dst_symfile_init (objfile)
|
|||
|
||||
/* ARGSUSED */
|
||||
static void
|
||||
find_dst_sections (abfd, asect, vpinfo)
|
||||
bfd *abfd;
|
||||
sec_ptr asect;
|
||||
PTR vpinfo;
|
||||
find_dst_sections (bfd *abfd, sec_ptr asect, PTR vpinfo)
|
||||
{
|
||||
int size, count;
|
||||
long base;
|
||||
|
@ -252,9 +242,7 @@ static bfd *symfile_bfd;
|
|||
|
||||
/* ARGSUSED */
|
||||
static void
|
||||
dst_symfile_read (objfile, mainline)
|
||||
struct objfile *objfile;
|
||||
int mainline;
|
||||
dst_symfile_read (struct objfile *objfile, int mainline)
|
||||
{
|
||||
bfd *abfd = objfile->obfd;
|
||||
char *name = bfd_get_filename (abfd);
|
||||
|
@ -301,8 +289,7 @@ dst_symfile_read (objfile, mainline)
|
|||
}
|
||||
|
||||
static void
|
||||
dst_new_init (ignore)
|
||||
struct objfile *ignore;
|
||||
dst_new_init (struct objfile *ignore)
|
||||
{
|
||||
/* Nothin' to do */
|
||||
}
|
||||
|
@ -313,8 +300,7 @@ dst_new_init (ignore)
|
|||
objfile struct from the global list of known objfiles. */
|
||||
|
||||
static void
|
||||
dst_symfile_finish (objfile)
|
||||
struct objfile *objfile;
|
||||
dst_symfile_finish (struct objfile *objfile)
|
||||
{
|
||||
/* Nothing to do */
|
||||
}
|
||||
|
@ -327,9 +313,7 @@ dst_symfile_finish (objfile)
|
|||
* this is what was really intended.
|
||||
*/
|
||||
static int
|
||||
get_dst_line (buffer, pc)
|
||||
signed char **buffer;
|
||||
long *pc;
|
||||
get_dst_line (signed char **buffer, long *pc)
|
||||
{
|
||||
static last_pc = 0;
|
||||
static long last_line = 0;
|
||||
|
@ -433,18 +417,14 @@ get_dst_line (buffer, pc)
|
|||
}
|
||||
|
||||
static void
|
||||
enter_all_lines (buffer, address)
|
||||
char *buffer;
|
||||
long address;
|
||||
enter_all_lines (char *buffer, long address)
|
||||
{
|
||||
if (buffer)
|
||||
while (get_dst_line (&buffer, &address));
|
||||
}
|
||||
|
||||
static int
|
||||
get_dst_entry (buffer, ret_entry)
|
||||
char *buffer;
|
||||
dst_rec_ptr_t *ret_entry;
|
||||
get_dst_entry (char *buffer, dst_rec_ptr_t *ret_entry)
|
||||
{
|
||||
int size;
|
||||
dst_rec_ptr_t entry;
|
||||
|
@ -666,10 +646,7 @@ get_dst_entry (buffer, ret_entry)
|
|||
}
|
||||
|
||||
static int
|
||||
next_dst_entry (buffer, entry, table)
|
||||
char **buffer;
|
||||
dst_rec_ptr_t *entry;
|
||||
dst_sec *table;
|
||||
next_dst_entry (char **buffer, dst_rec_ptr_t *entry, dst_sec *table)
|
||||
{
|
||||
if (*buffer - table->buffer >= table->size)
|
||||
{
|
||||
|
@ -687,8 +664,7 @@ next_dst_entry (buffer, entry, table)
|
|||
static dst_rec_ptr_t section_table = NULL;
|
||||
|
||||
char *
|
||||
get_sec_ref (ref)
|
||||
dst_sect_ref_t *ref;
|
||||
get_sec_ref (dst_sect_ref_t *ref)
|
||||
{
|
||||
dst_sec *section = NULL;
|
||||
long offset;
|
||||
|
@ -720,8 +696,7 @@ dst_get_addr (int section, long offset)
|
|||
}
|
||||
|
||||
CORE_ADDR
|
||||
dst_sym_addr (ref)
|
||||
dst_sect_ref_t *ref;
|
||||
dst_sym_addr (dst_sect_ref_t *ref)
|
||||
{
|
||||
if (!section_table || !ref->sect_index)
|
||||
return 0;
|
||||
|
@ -730,8 +705,7 @@ dst_sym_addr (ref)
|
|||
}
|
||||
|
||||
static struct type *
|
||||
create_new_type (objfile)
|
||||
struct objfile *objfile;
|
||||
create_new_type (struct objfile *objfile)
|
||||
{
|
||||
struct type *type;
|
||||
|
||||
|
@ -742,9 +716,7 @@ create_new_type (objfile)
|
|||
}
|
||||
|
||||
static struct symbol *
|
||||
create_new_symbol (objfile, name)
|
||||
struct objfile *objfile;
|
||||
char *name;
|
||||
create_new_symbol (struct objfile *objfile, char *name)
|
||||
{
|
||||
struct symbol *sym = (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_type_desc (objfile, type_desc, base)
|
||||
struct objfile *objfile;
|
||||
dst_type_t *type_desc;
|
||||
dst_rec_ptr_t base;
|
||||
decode_type_desc (struct objfile *objfile, dst_type_t *type_desc,
|
||||
dst_rec_ptr_t base)
|
||||
{
|
||||
struct type *type;
|
||||
dst_rec_ptr_t entry;
|
||||
|
@ -862,8 +832,7 @@ struct structure_list
|
|||
static struct structure_list *struct_list = NULL;
|
||||
|
||||
static struct type *
|
||||
find_dst_structure (name)
|
||||
char *name;
|
||||
find_dst_structure (char *name)
|
||||
{
|
||||
struct structure_list *element;
|
||||
|
||||
|
@ -875,11 +844,8 @@ find_dst_structure (name)
|
|||
|
||||
|
||||
static struct type *
|
||||
decode_dst_structure (objfile, entry, code, version)
|
||||
struct objfile *objfile;
|
||||
dst_rec_ptr_t entry;
|
||||
int code;
|
||||
int version;
|
||||
decode_dst_structure (struct objfile *objfile, dst_rec_ptr_t entry, int code,
|
||||
int version)
|
||||
{
|
||||
struct type *type, *child_type;
|
||||
char *struct_name;
|
||||
|
@ -981,9 +947,7 @@ decode_dst_structure (objfile, entry, code, version)
|
|||
}
|
||||
|
||||
static struct type *
|
||||
decode_dst_type (objfile, entry)
|
||||
struct objfile *objfile;
|
||||
dst_rec_ptr_t entry;
|
||||
decode_dst_type (struct objfile *objfile, dst_rec_ptr_t entry)
|
||||
{
|
||||
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 void
|
||||
decode_dst_locstring (locstr, sym)
|
||||
char *locstr;
|
||||
struct symbol *sym;
|
||||
decode_dst_locstring (char *locstr, struct symbol *sym)
|
||||
{
|
||||
dst_loc_entry_t *entry, *next_entry;
|
||||
CORE_ADDR temp;
|
||||
|
@ -1166,11 +1128,8 @@ decode_dst_locstring (locstr, sym)
|
|||
}
|
||||
|
||||
static struct symbol_list *
|
||||
process_dst_symbols (objfile, entry, name, nsyms_ret)
|
||||
struct objfile *objfile;
|
||||
dst_rec_ptr_t entry;
|
||||
char *name;
|
||||
int *nsyms_ret;
|
||||
process_dst_symbols (struct objfile *objfile, dst_rec_ptr_t entry, char *name,
|
||||
int *nsyms_ret)
|
||||
{
|
||||
struct symbol_list *list = NULL, *element;
|
||||
struct symbol *sym;
|
||||
|
@ -1308,11 +1267,8 @@ process_dst_symbols (objfile, entry, name, nsyms_ret)
|
|||
|
||||
|
||||
static struct symbol *
|
||||
process_dst_function (objfile, entry, name, address)
|
||||
struct objfile *objfile;
|
||||
dst_rec_ptr_t entry;
|
||||
char *name;
|
||||
CORE_ADDR address;
|
||||
process_dst_function (struct objfile *objfile, dst_rec_ptr_t entry, char *name,
|
||||
CORE_ADDR address)
|
||||
{
|
||||
struct symbol *sym;
|
||||
struct type *type, *ftype;
|
||||
|
@ -1369,9 +1325,7 @@ process_dst_function (objfile, entry, name, address)
|
|||
}
|
||||
|
||||
static struct block *
|
||||
process_dst_block (objfile, entry)
|
||||
struct objfile *objfile;
|
||||
dst_rec_ptr_t entry;
|
||||
process_dst_block (struct objfile *objfile, dst_rec_ptr_t entry)
|
||||
{
|
||||
struct block *block;
|
||||
struct symbol *function = NULL;
|
||||
|
@ -1498,8 +1452,7 @@ process_dst_block (objfile, entry)
|
|||
|
||||
|
||||
static void
|
||||
read_dst_symtab (objfile)
|
||||
struct objfile *objfile;
|
||||
read_dst_symtab (struct objfile *objfile)
|
||||
{
|
||||
char *buffer;
|
||||
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
|
||||
them into GDB's data structures. */
|
||||
static int
|
||||
init_one_section (chan, secinfo)
|
||||
int chan;
|
||||
dst_sec *secinfo;
|
||||
init_one_section (int chan, dst_sec *secinfo)
|
||||
{
|
||||
if (secinfo->size == 0
|
||||
|| lseek (chan, secinfo->position, 0) == -1
|
||||
|
@ -1609,8 +1560,7 @@ init_one_section (chan, secinfo)
|
|||
}
|
||||
|
||||
static int
|
||||
init_dst_sections (chan)
|
||||
int chan;
|
||||
init_dst_sections (int chan)
|
||||
{
|
||||
|
||||
if (!init_one_section (chan, &blocks_info) ||
|
||||
|
@ -1652,7 +1602,7 @@ static struct sym_fns dst_sym_fns =
|
|||
};
|
||||
|
||||
void
|
||||
_initialize_dstread ()
|
||||
_initialize_dstread (void)
|
||||
{
|
||||
add_symtab_fns (&dst_sym_fns);
|
||||
}
|
||||
|
|
|
@ -373,11 +373,7 @@ static struct bit_field cause_fields[] =
|
|||
the hex value before passing it to monitor_supply_register. */
|
||||
|
||||
static void
|
||||
r3900_supply_register (regname, regnamelen, val, vallen)
|
||||
char *regname;
|
||||
int regnamelen;
|
||||
char *val;
|
||||
int vallen;
|
||||
r3900_supply_register (char *regname, int regnamelen, char *val, int vallen)
|
||||
{
|
||||
int regno = -1;
|
||||
int i;
|
||||
|
@ -416,7 +412,7 @@ r3900_supply_register (regname, regnamelen, val, vallen)
|
|||
you modify it. */
|
||||
|
||||
static void
|
||||
fetch_bad_vaddr ()
|
||||
fetch_bad_vaddr (void)
|
||||
{
|
||||
char buf[20];
|
||||
|
||||
|
@ -431,8 +427,7 @@ fetch_bad_vaddr ()
|
|||
combined binary value. */
|
||||
|
||||
static unsigned long
|
||||
fetch_fields (bf)
|
||||
struct bit_field *bf;
|
||||
fetch_fields (struct bit_field *bf)
|
||||
{
|
||||
char buf[20];
|
||||
unsigned long val = 0;
|
||||
|
@ -456,9 +451,7 @@ fetch_fields (bf)
|
|||
|
||||
|
||||
static void
|
||||
fetch_bitmapped_register (regno, bf)
|
||||
int regno;
|
||||
struct bit_field *bf;
|
||||
fetch_bitmapped_register (int regno, struct bit_field *bf)
|
||||
{
|
||||
unsigned long val;
|
||||
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. */
|
||||
|
||||
static void
|
||||
r3900_fetch_registers (regno)
|
||||
int regno;
|
||||
r3900_fetch_registers (int regno)
|
||||
{
|
||||
switch (regno)
|
||||
{
|
||||
|
@ -505,9 +497,7 @@ r3900_fetch_registers (regno)
|
|||
/* Write the new value of the bitmapped register to the monitor. */
|
||||
|
||||
static void
|
||||
store_bitmapped_register (regno, bf)
|
||||
int regno;
|
||||
struct bit_field *bf;
|
||||
store_bitmapped_register (int regno, struct bit_field *bf)
|
||||
{
|
||||
unsigned long oldval, newval;
|
||||
|
||||
|
@ -537,8 +527,7 @@ store_bitmapped_register (regno, bf)
|
|||
|
||||
|
||||
static void
|
||||
r3900_store_registers (regno)
|
||||
int regno;
|
||||
r3900_store_registers (int regno)
|
||||
{
|
||||
switch (regno)
|
||||
{
|
||||
|
@ -557,9 +546,7 @@ r3900_store_registers (regno)
|
|||
/* Write a 4-byte integer to the buffer in big-endian order. */
|
||||
|
||||
static void
|
||||
write_long (buf, n)
|
||||
char *buf;
|
||||
long n;
|
||||
write_long (char *buf, long n)
|
||||
{
|
||||
buf[0] = (n >> 24) & 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. */
|
||||
|
||||
static void
|
||||
write_long_le (buf, n)
|
||||
char *buf;
|
||||
long n;
|
||||
write_long_le (char *buf, long n)
|
||||
{
|
||||
buf[0] = n & 0xff;
|
||||
buf[1] = (n >> 8) & 0xff;
|
||||
|
@ -587,8 +572,7 @@ write_long_le (buf, n)
|
|||
character in hexadecimal; otherwise, print it in ASCII. */
|
||||
|
||||
static int
|
||||
debug_readchar (hex)
|
||||
int hex;
|
||||
debug_readchar (int hex)
|
||||
{
|
||||
char buf[10];
|
||||
int c = monitor_readchar ();
|
||||
|
@ -614,9 +598,7 @@ debug_readchar (hex)
|
|||
print the sent buffer in hex. */
|
||||
|
||||
static void
|
||||
debug_write (buf, buflen)
|
||||
unsigned char *buf;
|
||||
int buflen;
|
||||
debug_write (unsigned char *buf, int buflen)
|
||||
{
|
||||
char s[10];
|
||||
|
||||
|
@ -649,7 +631,7 @@ debug_write (buf, buflen)
|
|||
*/
|
||||
|
||||
static void
|
||||
ignore_packet ()
|
||||
ignore_packet (void)
|
||||
{
|
||||
int c;
|
||||
int len;
|
||||
|
@ -688,10 +670,7 @@ ignore_packet ()
|
|||
*/
|
||||
|
||||
static void
|
||||
send_packet (type, buf, buflen, seq)
|
||||
char type;
|
||||
unsigned char *buf;
|
||||
int buflen, seq;
|
||||
send_packet (char type, unsigned char *buf, int buflen, int seq)
|
||||
{
|
||||
unsigned char hdr[4];
|
||||
int len = buflen;
|
||||
|
@ -764,9 +743,7 @@ send_packet (type, buf, buflen, seq)
|
|||
*/
|
||||
|
||||
static void
|
||||
process_read_request (buf, buflen)
|
||||
unsigned char *buf;
|
||||
int buflen;
|
||||
process_read_request (unsigned char *buf, int buflen)
|
||||
{
|
||||
unsigned char len[4];
|
||||
int i, chunk;
|
||||
|
@ -802,10 +779,7 @@ process_read_request (buf, buflen)
|
|||
/* Count loadable sections (helper function for r3900_load). */
|
||||
|
||||
static void
|
||||
count_section (abfd, s, section_count)
|
||||
bfd *abfd;
|
||||
asection *s;
|
||||
unsigned int *section_count;
|
||||
count_section (bfd *abfd, asection *s, unsigned int *section_count)
|
||||
{
|
||||
if (s->flags & SEC_LOAD && bfd_section_size (abfd, s) != 0)
|
||||
(*section_count)++;
|
||||
|
@ -827,10 +801,7 @@ count_section (abfd, s, section_count)
|
|||
*/
|
||||
|
||||
static void
|
||||
load_section (abfd, s, data_count)
|
||||
bfd *abfd;
|
||||
asection *s;
|
||||
unsigned int *data_count;
|
||||
load_section (bfd *abfd, asection *s, unsigned int *data_count)
|
||||
{
|
||||
if (s->flags & SEC_LOAD)
|
||||
{
|
||||
|
@ -886,9 +857,7 @@ load_section (abfd, s, data_count)
|
|||
*/
|
||||
|
||||
static void
|
||||
r3900_load (filename, from_tty)
|
||||
char *filename;
|
||||
int from_tty;
|
||||
r3900_load (char *filename, int from_tty)
|
||||
{
|
||||
bfd *abfd;
|
||||
unsigned int data_count = 0;
|
||||
|
@ -990,9 +959,7 @@ static struct target_ops r3900_ops;
|
|||
static struct monitor_ops r3900_cmds;
|
||||
|
||||
static void
|
||||
r3900_open (args, from_tty)
|
||||
char *args;
|
||||
int from_tty;
|
||||
r3900_open (char *args, int from_tty)
|
||||
{
|
||||
char buf[64];
|
||||
int i;
|
||||
|
@ -1023,7 +990,7 @@ r3900_open (args, from_tty)
|
|||
}
|
||||
|
||||
void
|
||||
_initialize_r3900_rom ()
|
||||
_initialize_r3900_rom (void)
|
||||
{
|
||||
r3900_cmds.flags = MO_NO_ECHO_ON_OPEN |
|
||||
MO_ADDR_BITS_REMOVE |
|
||||
|
|
201
gdb/dwarf2read.c
201
gdb/dwarf2read.c
|
@ -776,8 +776,7 @@ static struct die_info *dwarf_alloc_die (void);
|
|||
information and return true if we have enough to do something. */
|
||||
|
||||
int
|
||||
dwarf2_has_info (abfd)
|
||||
bfd *abfd;
|
||||
dwarf2_has_info (bfd *abfd)
|
||||
{
|
||||
dwarf_info_offset = dwarf_abbrev_offset = dwarf_line_offset = 0;
|
||||
bfd_map_over_sections (abfd, dwarf2_locate_sections, NULL);
|
||||
|
@ -796,10 +795,7 @@ dwarf2_has_info (abfd)
|
|||
in. */
|
||||
|
||||
static void
|
||||
dwarf2_locate_sections (ignore_abfd, sectp, ignore_ptr)
|
||||
bfd *ignore_abfd;
|
||||
asection *sectp;
|
||||
PTR ignore_ptr;
|
||||
dwarf2_locate_sections (bfd *ignore_abfd, asection *sectp, PTR ignore_ptr)
|
||||
{
|
||||
if (STREQ (sectp->name, INFO_SECTION))
|
||||
{
|
||||
|
@ -846,9 +842,7 @@ dwarf2_locate_sections (ignore_abfd, sectp, ignore_ptr)
|
|||
/* Build a partial symbol table. */
|
||||
|
||||
void
|
||||
dwarf2_build_psymtabs (objfile, mainline)
|
||||
struct objfile *objfile;
|
||||
int mainline;
|
||||
dwarf2_build_psymtabs (struct objfile *objfile, int mainline)
|
||||
{
|
||||
|
||||
/* 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. */
|
||||
|
||||
static void
|
||||
dwarf2_build_psymtabs_easy (objfile, mainline)
|
||||
struct objfile *objfile;
|
||||
int mainline;
|
||||
dwarf2_build_psymtabs_easy (struct objfile *objfile, int mainline)
|
||||
{
|
||||
bfd *abfd = objfile->obfd;
|
||||
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. */
|
||||
|
||||
static void
|
||||
dwarf2_build_psymtabs_hard (objfile, mainline)
|
||||
struct objfile *objfile;
|
||||
int mainline;
|
||||
dwarf2_build_psymtabs_hard (struct objfile *objfile, int mainline)
|
||||
{
|
||||
/* Instead of reading this into a big buffer, we should probably use
|
||||
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. */
|
||||
|
||||
static void
|
||||
dwarf2_psymtab_to_symtab (pst)
|
||||
struct partial_symtab *pst;
|
||||
dwarf2_psymtab_to_symtab (struct partial_symtab *pst)
|
||||
{
|
||||
/* FIXME: This is barely more than a stub. */
|
||||
if (pst != NULL)
|
||||
|
@ -1306,8 +1295,7 @@ dwarf2_psymtab_to_symtab (pst)
|
|||
}
|
||||
|
||||
static void
|
||||
psymtab_to_symtab_1 (pst)
|
||||
struct partial_symtab *pst;
|
||||
psymtab_to_symtab_1 (struct partial_symtab *pst)
|
||||
{
|
||||
struct objfile *objfile = pst->objfile;
|
||||
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. */
|
||||
|
||||
static int
|
||||
dwarf2_get_pc_bounds (die, lowpc, highpc, objfile)
|
||||
struct die_info *die;
|
||||
CORE_ADDR *lowpc;
|
||||
CORE_ADDR *highpc;
|
||||
struct objfile *objfile;
|
||||
dwarf2_get_pc_bounds (struct die_info *die, CORE_ADDR *lowpc, CORE_ADDR *highpc,
|
||||
struct objfile *objfile)
|
||||
{
|
||||
struct attribute *attr;
|
||||
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. */
|
||||
|
||||
static void
|
||||
dwarf2_attach_fields_to_type (fip, type, objfile)
|
||||
struct field_info *fip;
|
||||
struct type *type;
|
||||
struct objfile *objfile;
|
||||
dwarf2_attach_fields_to_type (struct field_info *fip, struct type *type,
|
||||
struct objfile *objfile)
|
||||
{
|
||||
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. */
|
||||
|
||||
static void
|
||||
dwarf2_attach_fn_fields_to_type (fip, type, objfile)
|
||||
struct field_info *fip;
|
||||
struct type *type;
|
||||
struct objfile *objfile;
|
||||
dwarf2_attach_fn_fields_to_type (struct field_info *fip, struct type *type,
|
||||
struct objfile *objfile)
|
||||
{
|
||||
struct fnfieldlist *flp;
|
||||
int total_length = 0;
|
||||
|
@ -2684,9 +2665,7 @@ read_tag_volatile_type (struct die_info *die, struct objfile *objfile,
|
|||
attribute to reference it. */
|
||||
|
||||
static void
|
||||
read_tag_string_type (die, objfile)
|
||||
struct die_info *die;
|
||||
struct objfile *objfile;
|
||||
read_tag_string_type (struct die_info *die, struct objfile *objfile)
|
||||
{
|
||||
struct type *type, *range_type, *index_type, *char_type;
|
||||
struct attribute *attr;
|
||||
|
@ -2827,9 +2806,7 @@ read_typedef (struct die_info *die, struct objfile *objfile,
|
|||
it in the TYPE field of the die. */
|
||||
|
||||
static void
|
||||
read_base_type (die, objfile)
|
||||
struct die_info *die;
|
||||
struct objfile *objfile;
|
||||
read_base_type (struct die_info *die, struct objfile *objfile)
|
||||
{
|
||||
struct type *type;
|
||||
struct attribute *attr;
|
||||
|
@ -2948,8 +2925,7 @@ read_comp_unit (char *info_ptr, bfd *abfd,
|
|||
/* Free a linked list of dies. */
|
||||
|
||||
static void
|
||||
free_die_list (dies)
|
||||
struct die_info *dies;
|
||||
free_die_list (struct die_info *dies)
|
||||
{
|
||||
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. */
|
||||
|
||||
static char *
|
||||
dwarf2_read_section (objfile, offset, size)
|
||||
struct objfile *objfile;
|
||||
file_ptr offset;
|
||||
unsigned int size;
|
||||
dwarf2_read_section (struct objfile *objfile, file_ptr offset,
|
||||
unsigned int size)
|
||||
{
|
||||
bfd *abfd = objfile->obfd;
|
||||
char *buf;
|
||||
|
@ -3008,9 +2982,7 @@ dwarf2_read_section (objfile, offset, size)
|
|||
in a hash table. */
|
||||
|
||||
static void
|
||||
dwarf2_read_abbrevs (abfd, offset)
|
||||
bfd *abfd;
|
||||
unsigned int offset;
|
||||
dwarf2_read_abbrevs (bfd *abfd, unsigned int offset)
|
||||
{
|
||||
char *abbrev_ptr;
|
||||
struct abbrev_info *cur_abbrev;
|
||||
|
@ -3083,8 +3055,7 @@ dwarf2_read_abbrevs (abfd, offset)
|
|||
|
||||
/* ARGSUSED */
|
||||
static void
|
||||
dwarf2_empty_abbrev_table (ignore)
|
||||
PTR ignore;
|
||||
dwarf2_empty_abbrev_table (PTR ignore)
|
||||
{
|
||||
int i;
|
||||
struct abbrev_info *abbrev, *next;
|
||||
|
@ -3107,8 +3078,7 @@ dwarf2_empty_abbrev_table (ignore)
|
|||
/* Lookup an abbrev_info structure in the abbrev hash table. */
|
||||
|
||||
static struct abbrev_info *
|
||||
dwarf2_lookup_abbrev (number)
|
||||
unsigned int number;
|
||||
dwarf2_lookup_abbrev (unsigned int number)
|
||||
{
|
||||
unsigned int hash_number;
|
||||
struct abbrev_info *abbrev;
|
||||
|
@ -3416,57 +3386,43 @@ read_attribute (struct attribute *attr, struct attr_abbrev *abbrev,
|
|||
/* read dwarf information from a buffer */
|
||||
|
||||
static unsigned int
|
||||
read_1_byte (abfd, buf)
|
||||
bfd *abfd;
|
||||
char *buf;
|
||||
read_1_byte (bfd *abfd, char *buf)
|
||||
{
|
||||
return bfd_get_8 (abfd, (bfd_byte *) buf);
|
||||
}
|
||||
|
||||
static int
|
||||
read_1_signed_byte (abfd, buf)
|
||||
bfd *abfd;
|
||||
char *buf;
|
||||
read_1_signed_byte (bfd *abfd, char *buf)
|
||||
{
|
||||
return bfd_get_signed_8 (abfd, (bfd_byte *) buf);
|
||||
}
|
||||
|
||||
static unsigned int
|
||||
read_2_bytes (abfd, buf)
|
||||
bfd *abfd;
|
||||
char *buf;
|
||||
read_2_bytes (bfd *abfd, char *buf)
|
||||
{
|
||||
return bfd_get_16 (abfd, (bfd_byte *) buf);
|
||||
}
|
||||
|
||||
static int
|
||||
read_2_signed_bytes (abfd, buf)
|
||||
bfd *abfd;
|
||||
char *buf;
|
||||
read_2_signed_bytes (bfd *abfd, char *buf)
|
||||
{
|
||||
return bfd_get_signed_16 (abfd, (bfd_byte *) buf);
|
||||
}
|
||||
|
||||
static unsigned int
|
||||
read_4_bytes (abfd, buf)
|
||||
bfd *abfd;
|
||||
char *buf;
|
||||
read_4_bytes (bfd *abfd, char *buf)
|
||||
{
|
||||
return bfd_get_32 (abfd, (bfd_byte *) buf);
|
||||
}
|
||||
|
||||
static int
|
||||
read_4_signed_bytes (abfd, buf)
|
||||
bfd *abfd;
|
||||
char *buf;
|
||||
read_4_signed_bytes (bfd *abfd, char *buf)
|
||||
{
|
||||
return bfd_get_signed_32 (abfd, (bfd_byte *) buf);
|
||||
}
|
||||
|
||||
static unsigned long
|
||||
read_8_bytes (abfd, buf)
|
||||
bfd *abfd;
|
||||
char *buf;
|
||||
read_8_bytes (bfd *abfd, char *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 *
|
||||
read_n_bytes (abfd, buf, size)
|
||||
bfd *abfd;
|
||||
char *buf;
|
||||
unsigned int size;
|
||||
read_n_bytes (bfd *abfd, char *buf, unsigned int size)
|
||||
{
|
||||
/* 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
|
||||
|
@ -3542,10 +3495,7 @@ read_n_bytes (abfd, buf, size)
|
|||
}
|
||||
|
||||
static char *
|
||||
read_string (abfd, buf, bytes_read_ptr)
|
||||
bfd *abfd;
|
||||
char *buf;
|
||||
unsigned int *bytes_read_ptr;
|
||||
read_string (bfd *abfd, char *buf, unsigned int *bytes_read_ptr)
|
||||
{
|
||||
/* 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
|
||||
|
@ -3580,10 +3530,7 @@ read_string (abfd, buf, bytes_read_ptr)
|
|||
}
|
||||
|
||||
static unsigned long
|
||||
read_unsigned_leb128 (abfd, buf, bytes_read_ptr)
|
||||
bfd *abfd;
|
||||
char *buf;
|
||||
unsigned int *bytes_read_ptr;
|
||||
read_unsigned_leb128 (bfd *abfd, char *buf, unsigned int *bytes_read_ptr)
|
||||
{
|
||||
unsigned long result;
|
||||
unsigned int num_read;
|
||||
|
@ -3611,10 +3558,7 @@ read_unsigned_leb128 (abfd, buf, bytes_read_ptr)
|
|||
}
|
||||
|
||||
static long
|
||||
read_signed_leb128 (abfd, buf, bytes_read_ptr)
|
||||
bfd *abfd;
|
||||
char *buf;
|
||||
unsigned int *bytes_read_ptr;
|
||||
read_signed_leb128 (bfd *abfd, char *buf, unsigned int *bytes_read_ptr)
|
||||
{
|
||||
long result;
|
||||
int i, shift, size, num_read;
|
||||
|
@ -3646,8 +3590,7 @@ read_signed_leb128 (abfd, buf, bytes_read_ptr)
|
|||
}
|
||||
|
||||
static void
|
||||
set_cu_language (lang)
|
||||
unsigned int lang;
|
||||
set_cu_language (unsigned int lang)
|
||||
{
|
||||
switch (lang)
|
||||
{
|
||||
|
@ -3680,9 +3623,7 @@ set_cu_language (lang)
|
|||
/* Return the named attribute or NULL if not there. */
|
||||
|
||||
static struct attribute *
|
||||
dwarf_attr (die, name)
|
||||
struct die_info *die;
|
||||
unsigned int name;
|
||||
dwarf_attr (struct die_info *die, unsigned int name)
|
||||
{
|
||||
unsigned int i;
|
||||
struct attribute *spec = NULL;
|
||||
|
@ -4005,9 +3946,7 @@ done:
|
|||
subfile, so that `break /srcdir/list0.c:1' works as expected. */
|
||||
|
||||
static void
|
||||
dwarf2_start_subfile (filename, dirname)
|
||||
char *filename;
|
||||
char *dirname;
|
||||
dwarf2_start_subfile (char *filename, char *dirname)
|
||||
{
|
||||
/* If the filename isn't absolute, try to match an existing subfile
|
||||
with the full pathname. */
|
||||
|
@ -4453,9 +4392,7 @@ die_containing_type (struct die_info *die, struct objfile *objfile,
|
|||
|
||||
#if 0
|
||||
static struct type *
|
||||
type_at_offset (offset, objfile)
|
||||
unsigned int offset;
|
||||
struct objfile *objfile;
|
||||
type_at_offset (unsigned int offset, struct objfile *objfile)
|
||||
{
|
||||
struct die_info *die;
|
||||
struct type *type;
|
||||
|
@ -4574,10 +4511,7 @@ read_type_die (struct die_info *die, struct objfile *objfile,
|
|||
}
|
||||
|
||||
static struct type *
|
||||
dwarf_base_type (encoding, size, objfile)
|
||||
int encoding;
|
||||
int size;
|
||||
struct objfile *objfile;
|
||||
dwarf_base_type (int encoding, int size, struct objfile *objfile)
|
||||
{
|
||||
/* FIXME - this should not produce a new (struct type *)
|
||||
every time. It should cache base types. */
|
||||
|
@ -4654,8 +4588,7 @@ dwarf_base_type (encoding, size, objfile)
|
|||
|
||||
#if 0
|
||||
struct die_info *
|
||||
copy_die (old_die)
|
||||
struct die_info *old_die;
|
||||
copy_die (struct die_info *old_die)
|
||||
{
|
||||
struct die_info *new_die;
|
||||
int i, num_attrs;
|
||||
|
@ -4689,8 +4622,7 @@ copy_die (old_die)
|
|||
/* Return sibling of die, NULL if no sibling. */
|
||||
|
||||
struct die_info *
|
||||
sibling_die (die)
|
||||
struct die_info *die;
|
||||
sibling_die (struct die_info *die)
|
||||
{
|
||||
int nesting_level = 0;
|
||||
|
||||
|
@ -4734,8 +4666,7 @@ sibling_die (die)
|
|||
/* Get linkage name of a die, return NULL if not found. */
|
||||
|
||||
static char *
|
||||
dwarf2_linkage_name (die)
|
||||
struct die_info *die;
|
||||
dwarf2_linkage_name (struct die_info *die)
|
||||
{
|
||||
struct attribute *attr;
|
||||
|
||||
|
@ -4751,8 +4682,7 @@ dwarf2_linkage_name (die)
|
|||
/* Convert a DIE tag into its string name. */
|
||||
|
||||
static char *
|
||||
dwarf_tag_name (tag)
|
||||
register unsigned tag;
|
||||
dwarf_tag_name (register unsigned tag)
|
||||
{
|
||||
switch (tag)
|
||||
{
|
||||
|
@ -4868,8 +4798,7 @@ dwarf_tag_name (tag)
|
|||
/* Convert a DWARF attribute code into its string name. */
|
||||
|
||||
static char *
|
||||
dwarf_attr_name (attr)
|
||||
register unsigned attr;
|
||||
dwarf_attr_name (register unsigned attr)
|
||||
{
|
||||
switch (attr)
|
||||
{
|
||||
|
@ -5035,8 +4964,7 @@ dwarf_attr_name (attr)
|
|||
/* Convert a DWARF value form code into its string name. */
|
||||
|
||||
static char *
|
||||
dwarf_form_name (form)
|
||||
register unsigned form;
|
||||
dwarf_form_name (register unsigned form)
|
||||
{
|
||||
switch (form)
|
||||
{
|
||||
|
@ -5090,8 +5018,7 @@ dwarf_form_name (form)
|
|||
/* Convert a DWARF stack opcode into its string name. */
|
||||
|
||||
static char *
|
||||
dwarf_stack_op_name (op)
|
||||
register unsigned op;
|
||||
dwarf_stack_op_name (register unsigned op)
|
||||
{
|
||||
switch (op)
|
||||
{
|
||||
|
@ -5391,8 +5318,7 @@ dwarf_stack_op_name (op)
|
|||
}
|
||||
|
||||
static char *
|
||||
dwarf_bool_name (mybool)
|
||||
unsigned mybool;
|
||||
dwarf_bool_name (unsigned mybool)
|
||||
{
|
||||
if (mybool)
|
||||
return "TRUE";
|
||||
|
@ -5403,8 +5329,7 @@ dwarf_bool_name (mybool)
|
|||
/* Convert a DWARF type code into its string name. */
|
||||
|
||||
static char *
|
||||
dwarf_type_encoding_name (enc)
|
||||
register unsigned enc;
|
||||
dwarf_type_encoding_name (register unsigned enc)
|
||||
{
|
||||
switch (enc)
|
||||
{
|
||||
|
@ -5433,8 +5358,7 @@ dwarf_type_encoding_name (enc)
|
|||
|
||||
#if 0
|
||||
static char *
|
||||
dwarf_cfi_name (cfi_opc)
|
||||
register unsigned cfi_opc;
|
||||
dwarf_cfi_name (register unsigned cfi_opc)
|
||||
{
|
||||
switch (cfi_opc)
|
||||
{
|
||||
|
@ -5484,8 +5408,7 @@ dwarf_cfi_name (cfi_opc)
|
|||
#endif
|
||||
|
||||
void
|
||||
dump_die (die)
|
||||
struct die_info *die;
|
||||
dump_die (struct die_info *die)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
|
@ -5547,8 +5470,7 @@ dump_die (die)
|
|||
}
|
||||
|
||||
void
|
||||
dump_die_list (die)
|
||||
struct die_info *die;
|
||||
dump_die_list (struct die_info *die)
|
||||
{
|
||||
while (die)
|
||||
{
|
||||
|
@ -5558,9 +5480,7 @@ dump_die_list (die)
|
|||
}
|
||||
|
||||
void
|
||||
store_in_ref_table (offset, die)
|
||||
unsigned int offset;
|
||||
struct die_info *die;
|
||||
store_in_ref_table (unsigned int offset, struct die_info *die)
|
||||
{
|
||||
int h;
|
||||
struct die_info *old;
|
||||
|
@ -5573,15 +5493,14 @@ store_in_ref_table (offset, die)
|
|||
|
||||
|
||||
static void
|
||||
dwarf2_empty_hash_tables ()
|
||||
dwarf2_empty_hash_tables (void)
|
||||
{
|
||||
memset (die_ref_table, 0, sizeof (die_ref_table));
|
||||
memset (dwarf2_cached_types, 0, sizeof(dwarf2_cached_types));
|
||||
}
|
||||
|
||||
static unsigned int
|
||||
dwarf2_get_ref_die_offset (attr)
|
||||
struct attribute *attr;
|
||||
dwarf2_get_ref_die_offset (struct attribute *attr)
|
||||
{
|
||||
unsigned int result = 0;
|
||||
|
||||
|
@ -5603,8 +5522,7 @@ dwarf2_get_ref_die_offset (attr)
|
|||
}
|
||||
|
||||
struct die_info *
|
||||
follow_die_ref (offset)
|
||||
unsigned int offset;
|
||||
follow_die_ref (unsigned int offset)
|
||||
{
|
||||
struct die_info *die;
|
||||
int h;
|
||||
|
@ -5623,9 +5541,7 @@ follow_die_ref (offset)
|
|||
}
|
||||
|
||||
static struct type *
|
||||
dwarf2_fundamental_type (objfile, typeid)
|
||||
struct objfile *objfile;
|
||||
int typeid;
|
||||
dwarf2_fundamental_type (struct objfile *objfile, int typeid)
|
||||
{
|
||||
if (typeid < 0 || typeid >= FT_NUM_MEMBERS)
|
||||
{
|
||||
|
@ -5893,14 +5809,13 @@ decode_locdesc (struct dwarf_block *blk, struct objfile *objfile,
|
|||
|
||||
/* ARGSUSED */
|
||||
static void
|
||||
dwarf2_free_tmp_obstack (ignore)
|
||||
PTR ignore;
|
||||
dwarf2_free_tmp_obstack (PTR ignore)
|
||||
{
|
||||
obstack_free (&dwarf2_tmp_obstack, NULL);
|
||||
}
|
||||
|
||||
static struct dwarf_block *
|
||||
dwarf_alloc_block ()
|
||||
dwarf_alloc_block (void)
|
||||
{
|
||||
struct dwarf_block *blk;
|
||||
|
||||
|
@ -5910,7 +5825,7 @@ dwarf_alloc_block ()
|
|||
}
|
||||
|
||||
static struct abbrev_info *
|
||||
dwarf_alloc_abbrev ()
|
||||
dwarf_alloc_abbrev (void)
|
||||
{
|
||||
struct abbrev_info *abbrev;
|
||||
|
||||
|
@ -5920,7 +5835,7 @@ dwarf_alloc_abbrev ()
|
|||
}
|
||||
|
||||
static struct die_info *
|
||||
dwarf_alloc_die ()
|
||||
dwarf_alloc_die (void)
|
||||
{
|
||||
struct die_info *die;
|
||||
|
||||
|
|
189
gdb/dwarfread.c
189
gdb/dwarfread.c
|
@ -576,9 +576,7 @@ static struct type *dwarf_fundamental_type (struct objfile *, int);
|
|||
*/
|
||||
|
||||
static struct type *
|
||||
dwarf_fundamental_type (objfile, typeid)
|
||||
struct objfile *objfile;
|
||||
int typeid;
|
||||
dwarf_fundamental_type (struct objfile *objfile, int typeid)
|
||||
{
|
||||
if (typeid < 0 || typeid >= FT_NUM_MEMBERS)
|
||||
{
|
||||
|
@ -621,8 +619,7 @@ dwarf_fundamental_type (objfile, typeid)
|
|||
*/
|
||||
|
||||
static void
|
||||
set_cu_language (dip)
|
||||
struct dieinfo *dip;
|
||||
set_cu_language (struct dieinfo *dip)
|
||||
{
|
||||
switch (dip->at_language)
|
||||
{
|
||||
|
@ -690,14 +687,9 @@ set_cu_language (dip)
|
|||
*/
|
||||
|
||||
void
|
||||
dwarf_build_psymtabs (objfile, mainline, dbfoff, dbfsize,
|
||||
lnoffset, lnsize)
|
||||
struct objfile *objfile;
|
||||
int mainline;
|
||||
file_ptr dbfoff;
|
||||
unsigned int dbfsize;
|
||||
file_ptr lnoffset;
|
||||
unsigned int lnsize;
|
||||
dwarf_build_psymtabs (struct objfile *objfile, int mainline, file_ptr dbfoff,
|
||||
unsigned int dbfsize, file_ptr lnoffset,
|
||||
unsigned int lnsize)
|
||||
{
|
||||
bfd *abfd = objfile->obfd;
|
||||
struct cleanup *back_to;
|
||||
|
@ -758,11 +750,8 @@ dwarf_build_psymtabs (objfile, mainline, dbfoff, dbfsize,
|
|||
*/
|
||||
|
||||
static void
|
||||
read_lexical_block_scope (dip, thisdie, enddie, objfile)
|
||||
struct dieinfo *dip;
|
||||
char *thisdie;
|
||||
char *enddie;
|
||||
struct objfile *objfile;
|
||||
read_lexical_block_scope (struct dieinfo *dip, char *thisdie, char *enddie,
|
||||
struct objfile *objfile)
|
||||
{
|
||||
register struct context_stack *new;
|
||||
|
||||
|
@ -797,8 +786,7 @@ read_lexical_block_scope (dip, thisdie, enddie, objfile)
|
|||
*/
|
||||
|
||||
static struct type *
|
||||
lookup_utype (die_ref)
|
||||
DIE_REF die_ref;
|
||||
lookup_utype (DIE_REF die_ref)
|
||||
{
|
||||
struct type *type = NULL;
|
||||
int utypeidx;
|
||||
|
@ -838,9 +826,7 @@ lookup_utype (die_ref)
|
|||
*/
|
||||
|
||||
static struct type *
|
||||
alloc_utype (die_ref, utypep)
|
||||
DIE_REF die_ref;
|
||||
struct type *utypep;
|
||||
alloc_utype (DIE_REF die_ref, struct type *utypep)
|
||||
{
|
||||
struct type **typep;
|
||||
int utypeidx;
|
||||
|
@ -886,8 +872,7 @@ alloc_utype (die_ref, utypep)
|
|||
*/
|
||||
|
||||
static void
|
||||
free_utypes (dummy)
|
||||
PTR dummy;
|
||||
free_utypes (PTR dummy)
|
||||
{
|
||||
free (utypes);
|
||||
utypes = NULL;
|
||||
|
@ -913,8 +898,7 @@ free_utypes (dummy)
|
|||
*/
|
||||
|
||||
static struct type *
|
||||
decode_die_type (dip)
|
||||
struct dieinfo *dip;
|
||||
decode_die_type (struct dieinfo *dip)
|
||||
{
|
||||
struct type *type = NULL;
|
||||
|
||||
|
@ -965,11 +949,8 @@ decode_die_type (dip)
|
|||
*/
|
||||
|
||||
static struct type *
|
||||
struct_type (dip, thisdie, enddie, objfile)
|
||||
struct dieinfo *dip;
|
||||
char *thisdie;
|
||||
char *enddie;
|
||||
struct objfile *objfile;
|
||||
struct_type (struct dieinfo *dip, char *thisdie, char *enddie,
|
||||
struct objfile *objfile)
|
||||
{
|
||||
struct type *type;
|
||||
struct nextfield
|
||||
|
@ -1163,11 +1144,8 @@ struct_type (dip, thisdie, enddie, objfile)
|
|||
*/
|
||||
|
||||
static void
|
||||
read_structure_scope (dip, thisdie, enddie, objfile)
|
||||
struct dieinfo *dip;
|
||||
char *thisdie;
|
||||
char *enddie;
|
||||
struct objfile *objfile;
|
||||
read_structure_scope (struct dieinfo *dip, char *thisdie, char *enddie,
|
||||
struct objfile *objfile)
|
||||
{
|
||||
struct type *type;
|
||||
struct symbol *sym;
|
||||
|
@ -1207,8 +1185,7 @@ read_structure_scope (dip, thisdie, enddie, objfile)
|
|||
*/
|
||||
|
||||
static struct type *
|
||||
decode_array_element_type (scan)
|
||||
char *scan;
|
||||
decode_array_element_type (char *scan)
|
||||
{
|
||||
struct type *typep;
|
||||
DIE_REF die_ref;
|
||||
|
@ -1302,9 +1279,7 @@ decode_array_element_type (scan)
|
|||
*/
|
||||
|
||||
static struct type *
|
||||
decode_subscript_data_item (scan, end)
|
||||
char *scan;
|
||||
char *end;
|
||||
decode_subscript_data_item (char *scan, char *end)
|
||||
{
|
||||
struct type *typep = NULL; /* Array type we are building */
|
||||
struct type *nexttype; /* Type of each element (may be array) */
|
||||
|
@ -1384,8 +1359,7 @@ decode_subscript_data_item (scan, end)
|
|||
*/
|
||||
|
||||
static void
|
||||
dwarf_read_array_type (dip)
|
||||
struct dieinfo *dip;
|
||||
dwarf_read_array_type (struct dieinfo *dip)
|
||||
{
|
||||
struct type *type;
|
||||
struct type *utype;
|
||||
|
@ -1449,8 +1423,7 @@ dwarf_read_array_type (dip)
|
|||
*/
|
||||
|
||||
static void
|
||||
read_tag_pointer_type (dip)
|
||||
struct dieinfo *dip;
|
||||
read_tag_pointer_type (struct dieinfo *dip)
|
||||
{
|
||||
struct type *type;
|
||||
struct type *utype;
|
||||
|
@ -1492,8 +1465,7 @@ read_tag_pointer_type (dip)
|
|||
*/
|
||||
|
||||
static void
|
||||
read_tag_string_type (dip)
|
||||
struct dieinfo *dip;
|
||||
read_tag_string_type (struct dieinfo *dip)
|
||||
{
|
||||
struct type *utype;
|
||||
struct type *indextype;
|
||||
|
@ -1564,10 +1536,7 @@ read_tag_string_type (dip)
|
|||
*/
|
||||
|
||||
static void
|
||||
read_subroutine_type (dip, thisdie, enddie)
|
||||
struct dieinfo *dip;
|
||||
char *thisdie;
|
||||
char *enddie;
|
||||
read_subroutine_type (struct dieinfo *dip, char *thisdie, char *enddie)
|
||||
{
|
||||
struct type *type; /* Type that this function returns */
|
||||
struct type *ftype; /* Function that returns above type */
|
||||
|
@ -1624,11 +1593,8 @@ read_subroutine_type (dip, thisdie, enddie)
|
|||
*/
|
||||
|
||||
static void
|
||||
read_enumeration (dip, thisdie, enddie, objfile)
|
||||
struct dieinfo *dip;
|
||||
char *thisdie;
|
||||
char *enddie;
|
||||
struct objfile *objfile;
|
||||
read_enumeration (struct dieinfo *dip, char *thisdie, char *enddie,
|
||||
struct objfile *objfile)
|
||||
{
|
||||
struct type *type;
|
||||
struct symbol *sym;
|
||||
|
@ -1677,9 +1643,7 @@ read_enumeration (dip, thisdie, enddie, objfile)
|
|||
*/
|
||||
|
||||
static struct type *
|
||||
enum_type (dip, objfile)
|
||||
struct dieinfo *dip;
|
||||
struct objfile *objfile;
|
||||
enum_type (struct dieinfo *dip, struct objfile *objfile)
|
||||
{
|
||||
struct type *type;
|
||||
struct nextfield
|
||||
|
@ -1805,11 +1769,8 @@ enum_type (dip, objfile)
|
|||
*/
|
||||
|
||||
static void
|
||||
read_func_scope (dip, thisdie, enddie, objfile)
|
||||
struct dieinfo *dip;
|
||||
char *thisdie;
|
||||
char *enddie;
|
||||
struct objfile *objfile;
|
||||
read_func_scope (struct dieinfo *dip, char *thisdie, char *enddie,
|
||||
struct objfile *objfile)
|
||||
{
|
||||
register struct context_stack *new;
|
||||
|
||||
|
@ -1855,8 +1816,7 @@ read_func_scope (dip, thisdie, enddie, objfile)
|
|||
*/
|
||||
|
||||
static void
|
||||
handle_producer (producer)
|
||||
char *producer;
|
||||
handle_producer (char *producer)
|
||||
{
|
||||
|
||||
/* If this compilation unit was compiled with g++ or gcc, then set the
|
||||
|
@ -1916,11 +1876,8 @@ handle_producer (producer)
|
|||
*/
|
||||
|
||||
static void
|
||||
read_file_scope (dip, thisdie, enddie, objfile)
|
||||
struct dieinfo *dip;
|
||||
char *thisdie;
|
||||
char *enddie;
|
||||
struct objfile *objfile;
|
||||
read_file_scope (struct dieinfo *dip, char *thisdie, char *enddie,
|
||||
struct objfile *objfile)
|
||||
{
|
||||
struct cleanup *back_to;
|
||||
struct symtab *symtab;
|
||||
|
@ -1972,10 +1929,7 @@ read_file_scope (dip, thisdie, enddie, objfile)
|
|||
*/
|
||||
|
||||
static void
|
||||
process_dies (thisdie, enddie, objfile)
|
||||
char *thisdie;
|
||||
char *enddie;
|
||||
struct objfile *objfile;
|
||||
process_dies (char *thisdie, char *enddie, struct objfile *objfile)
|
||||
{
|
||||
char *nextdie;
|
||||
struct dieinfo di;
|
||||
|
@ -2118,8 +2072,7 @@ process_dies (thisdie, enddie, objfile)
|
|||
*/
|
||||
|
||||
static void
|
||||
decode_line_numbers (linetable)
|
||||
char *linetable;
|
||||
decode_line_numbers (char *linetable)
|
||||
{
|
||||
char *tblscan;
|
||||
char *tblend;
|
||||
|
@ -2192,8 +2145,7 @@ decode_line_numbers (linetable)
|
|||
*/
|
||||
|
||||
static int
|
||||
locval (dip)
|
||||
struct dieinfo *dip;
|
||||
locval (struct dieinfo *dip)
|
||||
{
|
||||
unsigned short nbytes;
|
||||
unsigned short locsize;
|
||||
|
@ -2294,8 +2246,7 @@ locval (dip)
|
|||
*/
|
||||
|
||||
static void
|
||||
read_ofile_symtab (pst)
|
||||
struct partial_symtab *pst;
|
||||
read_ofile_symtab (struct partial_symtab *pst)
|
||||
{
|
||||
struct cleanup *back_to;
|
||||
unsigned long lnsize;
|
||||
|
@ -2374,8 +2325,7 @@ read_ofile_symtab (pst)
|
|||
*/
|
||||
|
||||
static void
|
||||
psymtab_to_symtab_1 (pst)
|
||||
struct partial_symtab *pst;
|
||||
psymtab_to_symtab_1 (struct partial_symtab *pst)
|
||||
{
|
||||
int i;
|
||||
struct cleanup *old_chain;
|
||||
|
@ -2447,8 +2397,7 @@ psymtab_to_symtab_1 (pst)
|
|||
*/
|
||||
|
||||
static void
|
||||
dwarf_psymtab_to_symtab (pst)
|
||||
struct partial_symtab *pst;
|
||||
dwarf_psymtab_to_symtab (struct partial_symtab *pst)
|
||||
{
|
||||
|
||||
if (pst != NULL)
|
||||
|
@ -2507,9 +2456,7 @@ dwarf_psymtab_to_symtab (pst)
|
|||
*/
|
||||
|
||||
static void
|
||||
add_enum_psymbol (dip, objfile)
|
||||
struct dieinfo *dip;
|
||||
struct objfile *objfile;
|
||||
add_enum_psymbol (struct dieinfo *dip, struct objfile *objfile)
|
||||
{
|
||||
char *scan;
|
||||
char *listend;
|
||||
|
@ -2558,9 +2505,7 @@ add_enum_psymbol (dip, objfile)
|
|||
*/
|
||||
|
||||
static void
|
||||
add_partial_symbol (dip, objfile)
|
||||
struct dieinfo *dip;
|
||||
struct objfile *objfile;
|
||||
add_partial_symbol (struct dieinfo *dip, struct objfile *objfile)
|
||||
{
|
||||
switch (dip->die_tag)
|
||||
{
|
||||
|
@ -2685,10 +2630,7 @@ NOTES
|
|||
|
||||
|
||||
static void
|
||||
scan_partial_symbols (thisdie, enddie, objfile)
|
||||
char *thisdie;
|
||||
char *enddie;
|
||||
struct objfile *objfile;
|
||||
scan_partial_symbols (char *thisdie, char *enddie, struct objfile *objfile)
|
||||
{
|
||||
char *nextdie;
|
||||
char *temp;
|
||||
|
@ -2809,12 +2751,8 @@ scan_partial_symbols (thisdie, enddie, objfile)
|
|||
*/
|
||||
|
||||
static void
|
||||
scan_compilation_units (thisdie, enddie, dbfoff, lnoffset, objfile)
|
||||
char *thisdie;
|
||||
char *enddie;
|
||||
file_ptr dbfoff;
|
||||
file_ptr lnoffset;
|
||||
struct objfile *objfile;
|
||||
scan_compilation_units (char *thisdie, char *enddie, file_ptr dbfoff,
|
||||
file_ptr lnoffset, struct objfile *objfile)
|
||||
{
|
||||
char *nextdie;
|
||||
struct dieinfo di;
|
||||
|
@ -2904,9 +2842,7 @@ scan_compilation_units (thisdie, enddie, dbfoff, lnoffset, objfile)
|
|||
*/
|
||||
|
||||
static struct symbol *
|
||||
new_symbol (dip, objfile)
|
||||
struct dieinfo *dip;
|
||||
struct objfile *objfile;
|
||||
new_symbol (struct dieinfo *dip, struct objfile *objfile)
|
||||
{
|
||||
struct symbol *sym = NULL;
|
||||
|
||||
|
@ -3066,10 +3002,8 @@ new_symbol (dip, objfile)
|
|||
*/
|
||||
|
||||
static void
|
||||
synthesize_typedef (dip, objfile, type)
|
||||
struct dieinfo *dip;
|
||||
struct objfile *objfile;
|
||||
struct type *type;
|
||||
synthesize_typedef (struct dieinfo *dip, struct objfile *objfile,
|
||||
struct type *type)
|
||||
{
|
||||
struct symbol *sym = NULL;
|
||||
|
||||
|
@ -3113,8 +3047,7 @@ synthesize_typedef (dip, objfile, type)
|
|||
*/
|
||||
|
||||
static struct type *
|
||||
decode_mod_fund_type (typedata)
|
||||
char *typedata;
|
||||
decode_mod_fund_type (char *typedata)
|
||||
{
|
||||
struct type *typep = NULL;
|
||||
unsigned short modcount;
|
||||
|
@ -3160,8 +3093,7 @@ decode_mod_fund_type (typedata)
|
|||
*/
|
||||
|
||||
static struct type *
|
||||
decode_mod_u_d_type (typedata)
|
||||
char *typedata;
|
||||
decode_mod_u_d_type (char *typedata)
|
||||
{
|
||||
struct type *typep = NULL;
|
||||
unsigned short modcount;
|
||||
|
@ -3224,10 +3156,7 @@ decode_mod_u_d_type (typedata)
|
|||
*/
|
||||
|
||||
static struct type *
|
||||
decode_modified_type (modifiers, modcount, mtype)
|
||||
char *modifiers;
|
||||
unsigned int modcount;
|
||||
int mtype;
|
||||
decode_modified_type (char *modifiers, unsigned int modcount, int mtype)
|
||||
{
|
||||
struct type *typep = NULL;
|
||||
unsigned short fundtype;
|
||||
|
@ -3313,8 +3242,7 @@ decode_modified_type (modifiers, modcount, mtype)
|
|||
*/
|
||||
|
||||
static struct type *
|
||||
decode_fund_type (fundtype)
|
||||
unsigned int fundtype;
|
||||
decode_fund_type (unsigned int fundtype)
|
||||
{
|
||||
struct type *typep = NULL;
|
||||
|
||||
|
@ -3446,9 +3374,7 @@ decode_fund_type (fundtype)
|
|||
*/
|
||||
|
||||
static char *
|
||||
create_name (name, obstackp)
|
||||
char *name;
|
||||
struct obstack *obstackp;
|
||||
create_name (char *name, struct obstack *obstackp)
|
||||
{
|
||||
int length;
|
||||
char *newname;
|
||||
|
@ -3514,10 +3440,7 @@ create_name (name, obstackp)
|
|||
*/
|
||||
|
||||
static void
|
||||
basicdieinfo (dip, diep, objfile)
|
||||
struct dieinfo *dip;
|
||||
char *diep;
|
||||
struct objfile *objfile;
|
||||
basicdieinfo (struct dieinfo *dip, char *diep, struct objfile *objfile)
|
||||
{
|
||||
curdie = dip;
|
||||
memset (dip, 0, sizeof (struct dieinfo));
|
||||
|
@ -3576,9 +3499,7 @@ basicdieinfo (dip, diep, objfile)
|
|||
*/
|
||||
|
||||
static void
|
||||
completedieinfo (dip, objfile)
|
||||
struct dieinfo *dip;
|
||||
struct objfile *objfile;
|
||||
completedieinfo (struct dieinfo *dip, struct objfile *objfile)
|
||||
{
|
||||
char *diep; /* Current pointer into raw DIE data */
|
||||
char *end; /* Terminate DIE scan here */
|
||||
|
@ -3790,11 +3711,8 @@ completedieinfo (dip, objfile)
|
|||
*/
|
||||
|
||||
static CORE_ADDR
|
||||
target_to_host (from, nbytes, signextend, objfile)
|
||||
char *from;
|
||||
int nbytes;
|
||||
int signextend; /* FIXME: Unused */
|
||||
struct objfile *objfile;
|
||||
target_to_host (char *from, int nbytes, int signextend, /* FIXME: Unused */
|
||||
struct objfile *objfile)
|
||||
{
|
||||
CORE_ADDR rtnval;
|
||||
|
||||
|
@ -3841,8 +3759,7 @@ target_to_host (from, nbytes, signextend, objfile)
|
|||
*/
|
||||
|
||||
static int
|
||||
attribute_size (attr)
|
||||
unsigned int attr;
|
||||
attribute_size (unsigned int attr)
|
||||
{
|
||||
int nbytes; /* Size of next data for this attribute */
|
||||
unsigned short form; /* Form of the attribute */
|
||||
|
|
|
@ -108,10 +108,7 @@ static void elf_locate_sections (bfd *, asection *, void *);
|
|||
-kingdon). */
|
||||
|
||||
static void
|
||||
elf_locate_sections (ignore_abfd, sectp, eip)
|
||||
bfd *ignore_abfd;
|
||||
asection *sectp;
|
||||
PTR eip;
|
||||
elf_locate_sections (bfd *ignore_abfd, asection *sectp, PTR eip)
|
||||
{
|
||||
register struct elfinfo *ei;
|
||||
|
||||
|
@ -143,8 +140,7 @@ elf_locate_sections (ignore_abfd, sectp, eip)
|
|||
#if 0 /* Currently unused */
|
||||
|
||||
char *
|
||||
elf_interpreter (abfd)
|
||||
bfd *abfd;
|
||||
elf_interpreter (bfd *abfd)
|
||||
{
|
||||
sec_ptr interp_sec;
|
||||
unsigned size;
|
||||
|
@ -171,14 +167,9 @@ elf_interpreter (abfd)
|
|||
#endif
|
||||
|
||||
static struct minimal_symbol *
|
||||
record_minimal_symbol_and_info (name, address, ms_type, info, bfd_section,
|
||||
objfile)
|
||||
char *name;
|
||||
CORE_ADDR address;
|
||||
enum minimal_symbol_type ms_type;
|
||||
char *info; /* FIXME, is this really char *? */
|
||||
asection *bfd_section;
|
||||
struct objfile *objfile;
|
||||
record_minimal_symbol_and_info (char *name, CORE_ADDR address,
|
||||
enum minimal_symbol_type ms_type, char *info, /* FIXME, is this really char *? */
|
||||
asection *bfd_section, struct objfile *objfile)
|
||||
{
|
||||
int section;
|
||||
|
||||
|
@ -233,9 +224,7 @@ record_minimal_symbol_and_info (name, address, ms_type, info, bfd_section,
|
|||
*/
|
||||
|
||||
static void
|
||||
elf_symtab_read (objfile, dynamic)
|
||||
struct objfile *objfile;
|
||||
int dynamic;
|
||||
elf_symtab_read (struct objfile *objfile, int dynamic)
|
||||
{
|
||||
long storage_needed;
|
||||
asymbol *sym;
|
||||
|
@ -578,9 +567,7 @@ elf_symtab_read (objfile, dynamic)
|
|||
capability even for files compiled without -g. */
|
||||
|
||||
static void
|
||||
elf_symfile_read (objfile, mainline)
|
||||
struct objfile *objfile;
|
||||
int mainline;
|
||||
elf_symfile_read (struct objfile *objfile, int mainline)
|
||||
{
|
||||
bfd *abfd = objfile->obfd;
|
||||
struct elfinfo ei;
|
||||
|
@ -688,8 +675,7 @@ elf_symfile_read (objfile, mainline)
|
|||
stab_section_info's, that might be dangling from it. */
|
||||
|
||||
static void
|
||||
free_elfinfo (objp)
|
||||
PTR objp;
|
||||
free_elfinfo (PTR objp)
|
||||
{
|
||||
struct objfile *objfile = (struct objfile *) objp;
|
||||
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. */
|
||||
|
||||
static void
|
||||
elf_new_init (ignore)
|
||||
struct objfile *ignore;
|
||||
elf_new_init (struct objfile *ignore)
|
||||
{
|
||||
stabsread_new_init ();
|
||||
buildsym_new_init ();
|
||||
|
@ -727,8 +712,7 @@ elf_new_init (ignore)
|
|||
objfile struct from the global list of known objfiles. */
|
||||
|
||||
static void
|
||||
elf_symfile_finish (objfile)
|
||||
struct objfile *objfile;
|
||||
elf_symfile_finish (struct objfile *objfile)
|
||||
{
|
||||
if (objfile->sym_stab_info != NULL)
|
||||
{
|
||||
|
@ -746,8 +730,7 @@ elf_symfile_finish (objfile)
|
|||
just a stub. */
|
||||
|
||||
static void
|
||||
elf_symfile_init (objfile)
|
||||
struct objfile *objfile;
|
||||
elf_symfile_init (struct objfile *objfile)
|
||||
{
|
||||
/* ELF objects may be reordered, so set OBJF_REORDERED. If we
|
||||
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. */
|
||||
|
||||
void
|
||||
elfstab_offset_sections (objfile, pst)
|
||||
struct objfile *objfile;
|
||||
struct partial_symtab *pst;
|
||||
elfstab_offset_sections (struct objfile *objfile, struct partial_symtab *pst)
|
||||
{
|
||||
char *filename = pst->filename;
|
||||
struct dbx_symfile_info *dbx = objfile->sym_stab_info;
|
||||
|
@ -832,7 +813,7 @@ static struct sym_fns elf_sym_fns =
|
|||
};
|
||||
|
||||
void
|
||||
_initialize_elfread ()
|
||||
_initialize_elfread (void)
|
||||
{
|
||||
add_symtab_fns (&elf_sym_fns);
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
/* Return a new environment object. */
|
||||
|
||||
struct environ *
|
||||
make_environ ()
|
||||
make_environ (void)
|
||||
{
|
||||
register struct environ *e;
|
||||
|
||||
|
@ -43,8 +43,7 @@ make_environ ()
|
|||
/* Free an environment and all the strings in it. */
|
||||
|
||||
void
|
||||
free_environ (e)
|
||||
register struct environ *e;
|
||||
free_environ (register struct environ *e)
|
||||
{
|
||||
register char **vector = e->vector;
|
||||
|
||||
|
@ -59,8 +58,7 @@ free_environ (e)
|
|||
that all strings in these environments are safe to free. */
|
||||
|
||||
void
|
||||
init_environ (e)
|
||||
register struct environ *e;
|
||||
init_environ (register struct environ *e)
|
||||
{
|
||||
extern char **environ;
|
||||
register int i;
|
||||
|
@ -92,8 +90,7 @@ init_environ (e)
|
|||
This is used to get something to pass to execve. */
|
||||
|
||||
char **
|
||||
environ_vector (e)
|
||||
struct environ *e;
|
||||
environ_vector (struct environ *e)
|
||||
{
|
||||
return e->vector;
|
||||
}
|
||||
|
@ -101,9 +98,7 @@ environ_vector (e)
|
|||
/* Return the value in environment E of variable VAR. */
|
||||
|
||||
char *
|
||||
get_in_environ (e, var)
|
||||
const struct environ *e;
|
||||
const char *var;
|
||||
get_in_environ (const struct environ *e, const char *var)
|
||||
{
|
||||
register int len = strlen (var);
|
||||
register char **vector = e->vector;
|
||||
|
@ -119,10 +114,7 @@ get_in_environ (e, var)
|
|||
/* Store the value in E of VAR as VALUE. */
|
||||
|
||||
void
|
||||
set_in_environ (e, var, value)
|
||||
struct environ *e;
|
||||
const char *var;
|
||||
const char *value;
|
||||
set_in_environ (struct environ *e, const char *var, const char *value)
|
||||
{
|
||||
register int i;
|
||||
register int len = strlen (var);
|
||||
|
@ -169,9 +161,7 @@ set_in_environ (e, var, value)
|
|||
/* Remove the setting for variable VAR from environment E. */
|
||||
|
||||
void
|
||||
unset_in_environ (e, var)
|
||||
struct environ *e;
|
||||
char *var;
|
||||
unset_in_environ (struct environ *e, char *var)
|
||||
{
|
||||
register int len = strlen (var);
|
||||
register char **vector = e->vector;
|
||||
|
|
77
gdb/eval.c
77
gdb/eval.c
|
@ -65,11 +65,8 @@ init_array_element (value_ptr, value_ptr, struct expression *,
|
|||
inline
|
||||
#endif
|
||||
static value_ptr
|
||||
evaluate_subexp (expect_type, exp, pos, noside)
|
||||
struct type *expect_type;
|
||||
register struct expression *exp;
|
||||
register int *pos;
|
||||
enum noside noside;
|
||||
evaluate_subexp (struct type *expect_type, register struct expression *exp,
|
||||
register int *pos, enum noside 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. */
|
||||
|
||||
CORE_ADDR
|
||||
parse_and_eval_address (exp)
|
||||
char *exp;
|
||||
parse_and_eval_address (char *exp)
|
||||
{
|
||||
struct expression *expr = parse_expression (exp);
|
||||
register CORE_ADDR addr;
|
||||
|
@ -95,8 +91,7 @@ parse_and_eval_address (exp)
|
|||
and advanced that variable across the characters parsed. */
|
||||
|
||||
CORE_ADDR
|
||||
parse_and_eval_address_1 (expptr)
|
||||
char **expptr;
|
||||
parse_and_eval_address_1 (char **expptr)
|
||||
{
|
||||
struct expression *expr = parse_exp_1 (expptr, (struct block *) 0, 0);
|
||||
register CORE_ADDR addr;
|
||||
|
@ -109,8 +104,7 @@ parse_and_eval_address_1 (expptr)
|
|||
}
|
||||
|
||||
value_ptr
|
||||
parse_and_eval (exp)
|
||||
char *exp;
|
||||
parse_and_eval (char *exp)
|
||||
{
|
||||
struct expression *expr = parse_expression (exp);
|
||||
register value_ptr val;
|
||||
|
@ -127,8 +121,7 @@ parse_and_eval (exp)
|
|||
EXPP is advanced to point to the comma. */
|
||||
|
||||
value_ptr
|
||||
parse_to_comma_and_eval (expp)
|
||||
char **expp;
|
||||
parse_to_comma_and_eval (char **expp)
|
||||
{
|
||||
struct expression *expr = parse_exp_1 (expp, (struct block *) 0, 1);
|
||||
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. */
|
||||
|
||||
value_ptr
|
||||
evaluate_expression (exp)
|
||||
struct expression *exp;
|
||||
evaluate_expression (struct expression *exp)
|
||||
{
|
||||
int pc = 0;
|
||||
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. */
|
||||
|
||||
value_ptr
|
||||
evaluate_type (exp)
|
||||
struct expression *exp;
|
||||
evaluate_type (struct expression *exp)
|
||||
{
|
||||
int pc = 0;
|
||||
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. */
|
||||
|
||||
static char *
|
||||
get_label (exp, pos)
|
||||
register struct expression *exp;
|
||||
int *pos;
|
||||
get_label (register struct expression *exp, int *pos)
|
||||
{
|
||||
if (exp->elts[*pos].opcode == OP_LABELED)
|
||||
{
|
||||
|
@ -188,12 +177,8 @@ get_label (exp, pos)
|
|||
(in C/C++) for structure types. */
|
||||
|
||||
static value_ptr
|
||||
evaluate_struct_tuple (struct_val, exp, pos, noside, nargs)
|
||||
value_ptr struct_val;
|
||||
register struct expression *exp;
|
||||
register int *pos;
|
||||
enum noside noside;
|
||||
int nargs;
|
||||
evaluate_struct_tuple (value_ptr struct_val, register struct expression *exp,
|
||||
register int *pos, enum noside noside, int nargs)
|
||||
{
|
||||
struct type *struct_type = check_typedef (VALUE_TYPE (struct_val));
|
||||
struct type *substruct_type = struct_type;
|
||||
|
@ -335,12 +320,9 @@ evaluate_struct_tuple (struct_val, exp, pos, noside, nargs)
|
|||
Returns last index value. */
|
||||
|
||||
static LONGEST
|
||||
init_array_element (array, element, exp, pos, noside, low_bound, high_bound)
|
||||
value_ptr array, element;
|
||||
register struct expression *exp;
|
||||
register int *pos;
|
||||
enum noside noside;
|
||||
LONGEST low_bound, high_bound;
|
||||
init_array_element (value_ptr array, value_ptr element,
|
||||
register struct expression *exp, register int *pos,
|
||||
enum noside noside, LONGEST low_bound, LONGEST high_bound)
|
||||
{
|
||||
LONGEST index;
|
||||
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
|
||||
evaluate_subexp_standard (expect_type, exp, pos, noside)
|
||||
struct type *expect_type;
|
||||
register struct expression *exp;
|
||||
register int *pos;
|
||||
enum noside noside;
|
||||
evaluate_subexp_standard (struct type *expect_type,
|
||||
register struct expression *exp, register int *pos,
|
||||
enum noside noside)
|
||||
{
|
||||
enum exp_opcode op;
|
||||
int tem, tem2, tem3;
|
||||
|
@ -1781,10 +1761,8 @@ nosideret:
|
|||
then only the type of the result need be correct. */
|
||||
|
||||
static value_ptr
|
||||
evaluate_subexp_for_address (exp, pos, noside)
|
||||
register struct expression *exp;
|
||||
register int *pos;
|
||||
enum noside noside;
|
||||
evaluate_subexp_for_address (register struct expression *exp, register int *pos,
|
||||
enum noside noside)
|
||||
{
|
||||
enum exp_opcode op;
|
||||
register int pc;
|
||||
|
@ -1863,10 +1841,8 @@ evaluate_subexp_for_address (exp, pos, noside)
|
|||
*/
|
||||
|
||||
value_ptr
|
||||
evaluate_subexp_with_coercion (exp, pos, noside)
|
||||
register struct expression *exp;
|
||||
register int *pos;
|
||||
enum noside noside;
|
||||
evaluate_subexp_with_coercion (register struct expression *exp,
|
||||
register int *pos, enum noside noside)
|
||||
{
|
||||
register enum exp_opcode op;
|
||||
register int pc;
|
||||
|
@ -1902,9 +1878,7 @@ evaluate_subexp_with_coercion (exp, pos, noside)
|
|||
Advance *POS over the subexpression. */
|
||||
|
||||
static value_ptr
|
||||
evaluate_subexp_for_sizeof (exp, pos)
|
||||
register struct expression *exp;
|
||||
register int *pos;
|
||||
evaluate_subexp_for_sizeof (register struct expression *exp, register int *pos)
|
||||
{
|
||||
enum exp_opcode op;
|
||||
register int pc;
|
||||
|
@ -1954,9 +1928,7 @@ evaluate_subexp_for_sizeof (exp, pos)
|
|||
/* Parse a type expression in the string [P..P+LENGTH). */
|
||||
|
||||
struct type *
|
||||
parse_and_eval_type (p, length)
|
||||
char *p;
|
||||
int length;
|
||||
parse_and_eval_type (char *p, int length)
|
||||
{
|
||||
char *tmp = (char *) alloca (length + 4);
|
||||
struct expression *expr;
|
||||
|
@ -1972,8 +1944,7 @@ parse_and_eval_type (p, length)
|
|||
}
|
||||
|
||||
int
|
||||
calc_f77_array_dims (array_type)
|
||||
struct type *array_type;
|
||||
calc_f77_array_dims (struct type *array_type)
|
||||
{
|
||||
int ndimen = 1;
|
||||
struct type *tmp_type;
|
||||
|
|
|
@ -1016,8 +1016,7 @@ async_do_nothing (gdb_client_data arg)
|
|||
/* Tell the event loop what to do if SIGHUP is received.
|
||||
See event-signal.c. */
|
||||
static void
|
||||
handle_sighup (sig)
|
||||
int sig;
|
||||
handle_sighup (int sig)
|
||||
{
|
||||
mark_async_signal_handler_wrapper (sighup_token);
|
||||
signal (sig, handle_sighup);
|
||||
|
|
67
gdb/exec.c
67
gdb/exec.c
|
@ -95,8 +95,7 @@ struct vmap *vmap;
|
|||
|
||||
/* ARGSUSED */
|
||||
static void
|
||||
exec_close (quitting)
|
||||
int quitting;
|
||||
exec_close (int quitting)
|
||||
{
|
||||
int need_symtab_cleanup = 0;
|
||||
struct vmap *vp, *nxt;
|
||||
|
@ -168,9 +167,7 @@ exec_close (quitting)
|
|||
we're supplying the exec pathname late for good reason.) */
|
||||
|
||||
void
|
||||
exec_file_attach (args, from_tty)
|
||||
char *args;
|
||||
int from_tty;
|
||||
exec_file_attach (char *args, int from_tty)
|
||||
{
|
||||
char **argv;
|
||||
char *filename;
|
||||
|
@ -311,9 +308,7 @@ exec_file_attach (args, from_tty)
|
|||
which can take multiple args. */
|
||||
|
||||
void
|
||||
exec_file_command (args, from_tty)
|
||||
char *args;
|
||||
int from_tty;
|
||||
exec_file_command (char *args, int from_tty)
|
||||
{
|
||||
target_preopen (from_tty);
|
||||
exec_file_attach (args, from_tty);
|
||||
|
@ -324,9 +319,7 @@ exec_file_command (args, from_tty)
|
|||
command was added? */
|
||||
|
||||
static void
|
||||
file_command (arg, from_tty)
|
||||
char *arg;
|
||||
int from_tty;
|
||||
file_command (char *arg, int from_tty)
|
||||
{
|
||||
/* FIXME, if we lose on reading the symbol file, we should revert
|
||||
the exec file, but that's rough. */
|
||||
|
@ -342,10 +335,7 @@ file_command (arg, from_tty)
|
|||
we cast it back to its proper type. */
|
||||
|
||||
static void
|
||||
add_to_section_table (abfd, asect, table_pp_char)
|
||||
bfd *abfd;
|
||||
sec_ptr asect;
|
||||
PTR table_pp_char;
|
||||
add_to_section_table (bfd *abfd, sec_ptr asect, PTR table_pp_char)
|
||||
{
|
||||
struct section_table **table_pp = (struct section_table **) table_pp_char;
|
||||
flagword aflag;
|
||||
|
@ -366,9 +356,8 @@ add_to_section_table (abfd, asect, table_pp_char)
|
|||
Returns 0 if OK, 1 on error. */
|
||||
|
||||
int
|
||||
build_section_table (some_bfd, start, end)
|
||||
bfd *some_bfd;
|
||||
struct section_table **start, **end;
|
||||
build_section_table (bfd *some_bfd, struct section_table **start,
|
||||
struct section_table **end)
|
||||
{
|
||||
unsigned count;
|
||||
|
||||
|
@ -385,10 +374,7 @@ build_section_table (some_bfd, start, end)
|
|||
}
|
||||
|
||||
static void
|
||||
bfdsec_to_vmap (abfd, sect, arg3)
|
||||
bfd *abfd;
|
||||
sec_ptr sect;
|
||||
PTR arg3;
|
||||
bfdsec_to_vmap (bfd *abfd, sec_ptr sect, PTR arg3)
|
||||
{
|
||||
struct vmap_and_bfd *vmap_bfd = (struct vmap_and_bfd *) arg3;
|
||||
struct vmap *vp;
|
||||
|
@ -418,9 +404,7 @@ bfdsec_to_vmap (abfd, sect, arg3)
|
|||
Return the new vmap. */
|
||||
|
||||
struct vmap *
|
||||
map_vmap (abfd, arch)
|
||||
bfd *abfd;
|
||||
bfd *arch;
|
||||
map_vmap (bfd *abfd, bfd *arch)
|
||||
{
|
||||
struct vmap_and_bfd vmap_bfd;
|
||||
struct vmap *vp, **vpp;
|
||||
|
@ -463,12 +447,8 @@ map_vmap (abfd, arch)
|
|||
we just tail-call it with more arguments to select between them. */
|
||||
|
||||
int
|
||||
xfer_memory (memaddr, myaddr, len, write, target)
|
||||
CORE_ADDR memaddr;
|
||||
char *myaddr;
|
||||
int len;
|
||||
int write;
|
||||
struct target_ops *target;
|
||||
xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write,
|
||||
struct target_ops *target)
|
||||
{
|
||||
boolean res;
|
||||
struct section_table *p;
|
||||
|
@ -528,9 +508,7 @@ xfer_memory (memaddr, myaddr, len, write, target)
|
|||
|
||||
|
||||
void
|
||||
print_section_info (t, abfd)
|
||||
struct target_ops *t;
|
||||
bfd *abfd;
|
||||
print_section_info (struct target_ops *t, bfd *abfd)
|
||||
{
|
||||
struct section_table *p;
|
||||
|
||||
|
@ -561,8 +539,7 @@ print_section_info (t, abfd)
|
|||
}
|
||||
|
||||
static void
|
||||
exec_files_info (t)
|
||||
struct target_ops *t;
|
||||
exec_files_info (struct target_ops *t)
|
||||
{
|
||||
print_section_info (t, exec_bfd);
|
||||
|
||||
|
@ -596,10 +573,8 @@ exec_files_info (t)
|
|||
in the exec objfile. */
|
||||
|
||||
void
|
||||
exec_set_section_offsets (text_off, data_off, bss_off)
|
||||
bfd_signed_vma text_off;
|
||||
bfd_signed_vma data_off;
|
||||
bfd_signed_vma bss_off;
|
||||
exec_set_section_offsets (bfd_signed_vma text_off, bfd_signed_vma data_off,
|
||||
bfd_signed_vma bss_off)
|
||||
{
|
||||
struct section_table *sect;
|
||||
|
||||
|
@ -630,9 +605,7 @@ exec_set_section_offsets (text_off, data_off, bss_off)
|
|||
}
|
||||
|
||||
static void
|
||||
set_section_command (args, from_tty)
|
||||
char *args;
|
||||
int from_tty;
|
||||
set_section_command (char *args, int from_tty)
|
||||
{
|
||||
struct section_table *p;
|
||||
char *secname;
|
||||
|
@ -676,9 +649,7 @@ set_section_command (args, from_tty)
|
|||
breakpoint_init_inferior). */
|
||||
|
||||
static int
|
||||
ignore (addr, contents)
|
||||
CORE_ADDR addr;
|
||||
char *contents;
|
||||
ignore (CORE_ADDR addr, char *contents)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -687,7 +658,7 @@ ignore (addr, contents)
|
|||
defined. */
|
||||
|
||||
void
|
||||
init_exec_ops ()
|
||||
init_exec_ops (void)
|
||||
{
|
||||
exec_ops.to_shortname = "exec";
|
||||
exec_ops.to_longname = "Local exec file";
|
||||
|
@ -710,7 +681,7 @@ Specify the filename of the executable file.";
|
|||
}
|
||||
|
||||
void
|
||||
_initialize_exec ()
|
||||
_initialize_exec (void)
|
||||
{
|
||||
struct cmd_list_element *c;
|
||||
|
||||
|
|
|
@ -36,9 +36,7 @@ static void print_subexp (struct expression *, int *, struct ui_file *,
|
|||
enum precedence);
|
||||
|
||||
void
|
||||
print_expression (exp, stream)
|
||||
struct expression *exp;
|
||||
struct ui_file *stream;
|
||||
print_expression (struct expression *exp, struct ui_file *stream)
|
||||
{
|
||||
int pc = 0;
|
||||
print_subexp (exp, &pc, stream, PREC_NULL);
|
||||
|
@ -50,11 +48,8 @@ print_expression (exp, stream)
|
|||
parentheses are needed here. */
|
||||
|
||||
static void
|
||||
print_subexp (exp, pos, stream, prec)
|
||||
register struct expression *exp;
|
||||
register int *pos;
|
||||
struct ui_file *stream;
|
||||
enum precedence prec;
|
||||
print_subexp (register struct expression *exp, register int *pos,
|
||||
struct ui_file *stream, enum precedence prec)
|
||||
{
|
||||
register unsigned tem;
|
||||
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
|
||||
current language table. */
|
||||
char *
|
||||
op_string (op)
|
||||
enum exp_opcode op;
|
||||
op_string (enum exp_opcode op)
|
||||
{
|
||||
int tem;
|
||||
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 (opcode)
|
||||
int opcode;
|
||||
op_name (int opcode)
|
||||
{
|
||||
switch (opcode)
|
||||
{
|
||||
|
@ -693,10 +686,8 @@ op_name (opcode)
|
|||
}
|
||||
|
||||
void
|
||||
dump_prefix_expression (exp, stream, note)
|
||||
struct expression *exp;
|
||||
struct ui_file *stream;
|
||||
char *note;
|
||||
dump_prefix_expression (struct expression *exp, struct ui_file *stream,
|
||||
char *note)
|
||||
{
|
||||
int elt;
|
||||
char *opcode_name;
|
||||
|
@ -740,10 +731,7 @@ static int dump_subexp (struct expression *exp, struct ui_file *stream,
|
|||
int elt);
|
||||
|
||||
static int
|
||||
dump_subexp (exp, stream, elt)
|
||||
struct expression *exp;
|
||||
struct ui_file *stream;
|
||||
int elt;
|
||||
dump_subexp (struct expression *exp, struct ui_file *stream, int elt)
|
||||
{
|
||||
static int indent = 0;
|
||||
int i;
|
||||
|
@ -973,10 +961,8 @@ dump_subexp (exp, stream, elt)
|
|||
}
|
||||
|
||||
void
|
||||
dump_postfix_expression (exp, stream, note)
|
||||
struct expression *exp;
|
||||
struct ui_file *stream;
|
||||
char *note;
|
||||
dump_postfix_expression (struct expression *exp, struct ui_file *stream,
|
||||
char *note)
|
||||
{
|
||||
int elt;
|
||||
|
||||
|
|
64
gdb/f-lang.c
64
gdb/f-lang.c
|
@ -98,10 +98,7 @@ static void f_emit_char (int c, struct ui_file * stream, int quoter);
|
|||
be replaced with a true F77 version. */
|
||||
|
||||
static void
|
||||
f_emit_char (c, stream, quoter)
|
||||
register int c;
|
||||
struct ui_file *stream;
|
||||
int quoter;
|
||||
f_emit_char (register int c, struct ui_file *stream, int quoter)
|
||||
{
|
||||
c &= 0xFF; /* Avoid sign bit follies */
|
||||
|
||||
|
@ -147,9 +144,7 @@ f_emit_char (c, stream, quoter)
|
|||
be replaced with a true F77version. */
|
||||
|
||||
static void
|
||||
f_printchar (c, stream)
|
||||
int c;
|
||||
struct ui_file *stream;
|
||||
f_printchar (int c, struct ui_file *stream)
|
||||
{
|
||||
fputs_filtered ("'", stream);
|
||||
LA_EMIT_CHAR (c, stream, '\'');
|
||||
|
@ -164,12 +159,8 @@ f_printchar (c, stream)
|
|||
be replaced with a true F77 version. */
|
||||
|
||||
static void
|
||||
f_printstr (stream, string, length, width, force_ellipses)
|
||||
struct ui_file *stream;
|
||||
char *string;
|
||||
unsigned int length;
|
||||
int width;
|
||||
int force_ellipses;
|
||||
f_printstr (struct ui_file *stream, char *string, unsigned int length,
|
||||
int width, int force_ellipses)
|
||||
{
|
||||
register unsigned int i;
|
||||
unsigned int things_printed = 0;
|
||||
|
@ -256,9 +247,7 @@ f_printstr (stream, string, length, width, force_ellipses)
|
|||
by an experienced F77 programmer. */
|
||||
|
||||
static struct type *
|
||||
f_create_fundamental_type (objfile, typeid)
|
||||
struct objfile *objfile;
|
||||
int typeid;
|
||||
f_create_fundamental_type (struct objfile *objfile, int typeid)
|
||||
{
|
||||
register struct type *type = NULL;
|
||||
|
||||
|
@ -493,7 +482,7 @@ const struct language_defn f_language_defn =
|
|||
};
|
||||
|
||||
void
|
||||
_initialize_f_language ()
|
||||
_initialize_f_language (void)
|
||||
{
|
||||
builtin_type_f_void =
|
||||
init_type (TYPE_CODE_VOID, 1,
|
||||
|
@ -576,7 +565,7 @@ _initialize_f_language ()
|
|||
|
||||
#if 0
|
||||
static SAVED_BF_PTR
|
||||
allocate_saved_bf_node ()
|
||||
allocate_saved_bf_node (void)
|
||||
{
|
||||
SAVED_BF_PTR new;
|
||||
|
||||
|
@ -585,7 +574,7 @@ allocate_saved_bf_node ()
|
|||
}
|
||||
|
||||
static SAVED_FUNCTION *
|
||||
allocate_saved_function_node ()
|
||||
allocate_saved_function_node (void)
|
||||
{
|
||||
SAVED_FUNCTION *new;
|
||||
|
||||
|
@ -594,7 +583,7 @@ allocate_saved_function_node ()
|
|||
}
|
||||
|
||||
static SAVED_F77_COMMON_PTR
|
||||
allocate_saved_f77_common_node ()
|
||||
allocate_saved_f77_common_node (void)
|
||||
{
|
||||
SAVED_F77_COMMON_PTR new;
|
||||
|
||||
|
@ -603,7 +592,7 @@ allocate_saved_f77_common_node ()
|
|||
}
|
||||
|
||||
static COMMON_ENTRY_PTR
|
||||
allocate_common_entry_node ()
|
||||
allocate_common_entry_node (void)
|
||||
{
|
||||
COMMON_ENTRY_PTR new;
|
||||
|
||||
|
@ -630,11 +619,7 @@ static SAVED_BF_PTR tmp_bf_ptr; /* Generic temporary for use
|
|||
the global common block chain */
|
||||
|
||||
static void
|
||||
add_common_block (name, offset, secnum, func_stab)
|
||||
char *name;
|
||||
CORE_ADDR offset;
|
||||
int secnum;
|
||||
char *func_stab;
|
||||
add_common_block (char *name, CORE_ADDR offset, int secnum, char *func_stab)
|
||||
{
|
||||
SAVED_F77_COMMON_PTR tmp;
|
||||
char *c, *local_copy_func_stab;
|
||||
|
@ -703,8 +688,7 @@ add_common_block (name, offset, secnum, func_stab)
|
|||
|
||||
#if 0
|
||||
static void
|
||||
add_common_entry (entry_sym_ptr)
|
||||
struct symbol *entry_sym_ptr;
|
||||
add_common_entry (struct symbol *entry_sym_ptr)
|
||||
{
|
||||
COMMON_ENTRY_PTR tmp;
|
||||
|
||||
|
@ -741,8 +725,7 @@ add_common_entry (entry_sym_ptr)
|
|||
|
||||
#if 0
|
||||
static SAVED_F77_COMMON_PTR
|
||||
find_first_common_named (name)
|
||||
char *name;
|
||||
find_first_common_named (char *name)
|
||||
{
|
||||
|
||||
SAVED_F77_COMMON_PTR tmp;
|
||||
|
@ -764,9 +747,7 @@ find_first_common_named (name)
|
|||
that belongs to function funcname */
|
||||
|
||||
SAVED_F77_COMMON_PTR
|
||||
find_common_for_function (name, funcname)
|
||||
char *name;
|
||||
char *funcname;
|
||||
find_common_for_function (char *name, char *funcname)
|
||||
{
|
||||
|
||||
SAVED_F77_COMMON_PTR tmp;
|
||||
|
@ -791,10 +772,7 @@ find_common_for_function (name, funcname)
|
|||
"name." */
|
||||
|
||||
static void
|
||||
patch_common_entries (blk, offset, secnum)
|
||||
SAVED_F77_COMMON_PTR blk;
|
||||
CORE_ADDR offset;
|
||||
int secnum;
|
||||
patch_common_entries (SAVED_F77_COMMON_PTR blk, CORE_ADDR offset, int secnum)
|
||||
{
|
||||
COMMON_ENTRY_PTR entry;
|
||||
|
||||
|
@ -819,10 +797,7 @@ patch_common_entries (blk, offset, secnum)
|
|||
(which is where common data lives). */
|
||||
|
||||
static void
|
||||
patch_all_commons_by_name (name, offset, secnum)
|
||||
char *name;
|
||||
CORE_ADDR offset;
|
||||
int secnum;
|
||||
patch_all_commons_by_name (char *name, CORE_ADDR offset, int secnum)
|
||||
{
|
||||
|
||||
SAVED_F77_COMMON_PTR tmp;
|
||||
|
@ -890,7 +865,7 @@ else \
|
|||
|
||||
#if 0
|
||||
static void
|
||||
clear_bf_list ()
|
||||
clear_bf_list (void)
|
||||
{
|
||||
|
||||
SAVED_BF_PTR tmp = saved_bf_list;
|
||||
|
@ -911,8 +886,7 @@ int global_remote_debug;
|
|||
#if 0
|
||||
|
||||
static long
|
||||
get_bf_for_fcn (the_function)
|
||||
long the_function;
|
||||
get_bf_for_fcn (long the_function)
|
||||
{
|
||||
SAVED_BF_PTR tmp;
|
||||
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 void
|
||||
clear_function_list ()
|
||||
clear_function_list (void)
|
||||
{
|
||||
SAVED_FUNCTION_PTR tmp = saved_function_list;
|
||||
SAVED_FUNCTION_PTR next = NULL;
|
||||
|
|
|
@ -59,12 +59,8 @@ void f_type_print_base (struct type *, struct ui_file *, int, int);
|
|||
/* LEVEL is the depth to indent lines by. */
|
||||
|
||||
void
|
||||
f_print_type (type, varstring, stream, show, level)
|
||||
struct type *type;
|
||||
char *varstring;
|
||||
struct ui_file *stream;
|
||||
int show;
|
||||
int level;
|
||||
f_print_type (struct type *type, char *varstring, struct ui_file *stream,
|
||||
int show, int level)
|
||||
{
|
||||
register enum type_code code;
|
||||
int demangled_args;
|
||||
|
@ -103,11 +99,8 @@ f_print_type (type, varstring, stream, show, level)
|
|||
SHOW is always zero on recursive calls. */
|
||||
|
||||
void
|
||||
f_type_print_varspec_prefix (type, stream, show, passed_a_ptr)
|
||||
struct type *type;
|
||||
struct ui_file *stream;
|
||||
int show;
|
||||
int passed_a_ptr;
|
||||
f_type_print_varspec_prefix (struct type *type, struct ui_file *stream,
|
||||
int show, int passed_a_ptr)
|
||||
{
|
||||
if (type == 0)
|
||||
return;
|
||||
|
@ -161,9 +154,7 @@ f_type_print_varspec_prefix (type, stream, show, passed_a_ptr)
|
|||
#if 0 /* Currently unused */
|
||||
|
||||
static void
|
||||
f_type_print_args (type, stream)
|
||||
struct type *type;
|
||||
struct ui_file *stream;
|
||||
f_type_print_args (struct type *type, struct ui_file *stream)
|
||||
{
|
||||
int i;
|
||||
struct type **args;
|
||||
|
@ -201,12 +192,8 @@ f_type_print_args (type, stream)
|
|||
Args work like c_type_print_varspec_prefix. */
|
||||
|
||||
static void
|
||||
f_type_print_varspec_suffix (type, stream, show, passed_a_ptr, demangled_args)
|
||||
struct type *type;
|
||||
struct ui_file *stream;
|
||||
int show;
|
||||
int passed_a_ptr;
|
||||
int demangled_args;
|
||||
f_type_print_varspec_suffix (struct type *type, struct ui_file *stream,
|
||||
int show, int passed_a_ptr, int demangled_args)
|
||||
{
|
||||
int upper_bound, lower_bound;
|
||||
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
|
||||
print_equivalent_f77_float_type (type, stream)
|
||||
struct type *type;
|
||||
struct ui_file *stream;
|
||||
print_equivalent_f77_float_type (struct type *type, struct ui_file *stream)
|
||||
{
|
||||
/* Override type name "float" and make it the
|
||||
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. */
|
||||
|
||||
void
|
||||
f_type_print_base (type, stream, show, level)
|
||||
struct type *type;
|
||||
struct ui_file *stream;
|
||||
int show;
|
||||
int level;
|
||||
f_type_print_base (struct type *type, struct ui_file *stream, int show,
|
||||
int level)
|
||||
{
|
||||
int retcode;
|
||||
int upper_bound;
|
||||
|
|
|
@ -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])
|
||||
|
||||
int
|
||||
f77_get_dynamic_lowerbound (type, lower_bound)
|
||||
struct type *type;
|
||||
int *lower_bound;
|
||||
f77_get_dynamic_lowerbound (struct type *type, int *lower_bound)
|
||||
{
|
||||
CORE_ADDR current_frame_addr;
|
||||
CORE_ADDR ptr_to_lower_bound;
|
||||
|
@ -126,9 +124,7 @@ f77_get_dynamic_lowerbound (type, lower_bound)
|
|||
}
|
||||
|
||||
int
|
||||
f77_get_dynamic_upperbound (type, upper_bound)
|
||||
struct type *type;
|
||||
int *upper_bound;
|
||||
f77_get_dynamic_upperbound (struct type *type, int *upper_bound)
|
||||
{
|
||||
CORE_ADDR current_frame_addr = 0;
|
||||
CORE_ADDR ptr_to_upper_bound;
|
||||
|
@ -193,8 +189,7 @@ f77_get_dynamic_upperbound (type, upper_bound)
|
|||
/* Obtain F77 adjustable array dimensions */
|
||||
|
||||
static void
|
||||
f77_get_dynamic_length_of_aggregate (type)
|
||||
struct type *type;
|
||||
f77_get_dynamic_length_of_aggregate (struct type *type)
|
||||
{
|
||||
int upper_bound = -1;
|
||||
int lower_bound = 1;
|
||||
|
@ -232,9 +227,7 @@ f77_get_dynamic_length_of_aggregate (type)
|
|||
type "type". */
|
||||
|
||||
static void
|
||||
f77_create_arrayprint_offset_tbl (type, stream)
|
||||
struct type *type;
|
||||
struct ui_file *stream;
|
||||
f77_create_arrayprint_offset_tbl (struct type *type, struct ui_file *stream)
|
||||
{
|
||||
struct type *tmp_type;
|
||||
int eltlen;
|
||||
|
@ -281,18 +274,9 @@ f77_create_arrayprint_offset_tbl (type, stream)
|
|||
the superior. Address == the address in the inferior. */
|
||||
|
||||
static void
|
||||
f77_print_array_1 (nss, ndimensions, type, valaddr, address,
|
||||
stream, format, deref_ref, recurse, pretty)
|
||||
int nss;
|
||||
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;
|
||||
f77_print_array_1 (int nss, 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;
|
||||
|
||||
|
@ -331,16 +315,9 @@ f77_print_array_1 (nss, ndimensions, type, valaddr, address,
|
|||
stuff and then immediately call f77_print_array_1() */
|
||||
|
||||
static void
|
||||
f77_print_array (type, valaddr, address, stream, format, deref_ref, recurse,
|
||||
pretty)
|
||||
struct type *type;
|
||||
char *valaddr;
|
||||
CORE_ADDR address;
|
||||
struct ui_file *stream;
|
||||
int format;
|
||||
int deref_ref;
|
||||
int recurse;
|
||||
enum val_prettyprint pretty;
|
||||
f77_print_array (struct type *type, char *valaddr, CORE_ADDR address,
|
||||
struct ui_file *stream, int format, int deref_ref, int recurse,
|
||||
enum val_prettyprint pretty)
|
||||
{
|
||||
int ndimensions;
|
||||
|
||||
|
@ -375,17 +352,9 @@ f77_print_array (type, valaddr, address, stream, format, deref_ref, recurse,
|
|||
The PRETTY parameter controls prettyprinting. */
|
||||
|
||||
int
|
||||
f_val_print (type, valaddr, embedded_offset, address, stream, format, deref_ref, recurse,
|
||||
pretty)
|
||||
struct type *type;
|
||||
char *valaddr;
|
||||
int embedded_offset;
|
||||
CORE_ADDR address;
|
||||
struct ui_file *stream;
|
||||
int format;
|
||||
int deref_ref;
|
||||
int recurse;
|
||||
enum val_prettyprint pretty;
|
||||
f_val_print (struct type *type, 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 */
|
||||
struct type *elttype;
|
||||
|
@ -583,8 +552,7 @@ f_val_print (type, valaddr, embedded_offset, address, stream, format, deref_ref,
|
|||
}
|
||||
|
||||
static void
|
||||
list_all_visible_commons (funname)
|
||||
char *funname;
|
||||
list_all_visible_commons (char *funname)
|
||||
{
|
||||
SAVED_F77_COMMON_PTR tmp;
|
||||
|
||||
|
@ -606,9 +574,7 @@ list_all_visible_commons (funname)
|
|||
given name */
|
||||
|
||||
static void
|
||||
info_common_command (comname, from_tty)
|
||||
char *comname;
|
||||
int from_tty;
|
||||
info_common_command (char *comname, int from_tty)
|
||||
{
|
||||
SAVED_F77_COMMON_PTR the_common;
|
||||
COMMON_ENTRY_PTR entry;
|
||||
|
@ -703,8 +669,7 @@ info_common_command (comname, from_tty)
|
|||
|
||||
#if 0
|
||||
static int
|
||||
there_is_a_visible_common_named (comname)
|
||||
char *comname;
|
||||
there_is_a_visible_common_named (char *comname)
|
||||
{
|
||||
SAVED_F77_COMMON_PTR the_common;
|
||||
struct frame_info *fi;
|
||||
|
@ -764,7 +729,7 @@ there_is_a_visible_common_named (comname)
|
|||
#endif
|
||||
|
||||
void
|
||||
_initialize_f_valprint ()
|
||||
_initialize_f_valprint (void)
|
||||
{
|
||||
add_info ("common", info_common_command,
|
||||
"Print out the values contained in a Fortran COMMON block.");
|
||||
|
|
|
@ -388,8 +388,7 @@ store_floating (void *addr, int len, DOUBLEST val)
|
|||
Caller will check return value or die! */
|
||||
|
||||
value_ptr
|
||||
value_of_register (regnum)
|
||||
int regnum;
|
||||
value_of_register (int regnum)
|
||||
{
|
||||
CORE_ADDR addr;
|
||||
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
|
||||
be non-NULL. */
|
||||
int
|
||||
symbol_read_needs_frame (sym)
|
||||
struct symbol *sym;
|
||||
symbol_read_needs_frame (struct symbol *sym)
|
||||
{
|
||||
switch (SYMBOL_CLASS (sym))
|
||||
{
|
||||
|
@ -506,9 +504,7 @@ symbol_read_needs_frame (sym)
|
|||
If FRAME is NULL, use the selected_frame. */
|
||||
|
||||
value_ptr
|
||||
read_var_value (var, frame)
|
||||
register struct symbol *var;
|
||||
struct frame_info *frame;
|
||||
read_var_value (register struct symbol *var, struct frame_info *frame)
|
||||
{
|
||||
register value_ptr v;
|
||||
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! */
|
||||
|
||||
value_ptr
|
||||
value_from_register (type, regnum, frame)
|
||||
struct type *type;
|
||||
int regnum;
|
||||
struct frame_info *frame;
|
||||
value_from_register (struct type *type, int regnum, struct frame_info *frame)
|
||||
{
|
||||
char raw_buffer[MAX_REGISTER_RAW_SIZE];
|
||||
CORE_ADDR addr;
|
||||
|
@ -961,9 +954,7 @@ value_from_register (type, regnum, frame)
|
|||
address. */
|
||||
|
||||
value_ptr
|
||||
locate_var_value (var, frame)
|
||||
register struct symbol *var;
|
||||
struct frame_info *frame;
|
||||
locate_var_value (register struct symbol *var, struct frame_info *frame)
|
||||
{
|
||||
CORE_ADDR addr = 0;
|
||||
struct type *type = SYMBOL_TYPE (var);
|
||||
|
|
|
@ -46,11 +46,7 @@ extern char **environ;
|
|||
* the four arguments "a", "b", "c", "d".
|
||||
*/
|
||||
static void
|
||||
breakup_args (
|
||||
scratch,
|
||||
argv)
|
||||
char *scratch;
|
||||
char **argv;
|
||||
breakup_args (char *scratch, char **argv)
|
||||
{
|
||||
char *cp = scratch;
|
||||
|
||||
|
@ -388,9 +384,7 @@ fork_inferior (exec_file, allargs, env, traceme_fun, init_trace_fun,
|
|||
clone will set it TRUE.
|
||||
*/
|
||||
void
|
||||
clone_and_follow_inferior (child_pid, followed_child)
|
||||
int child_pid;
|
||||
int *followed_child;
|
||||
clone_and_follow_inferior (int child_pid, int *followed_child)
|
||||
{
|
||||
extern int auto_solib_add;
|
||||
|
||||
|
@ -512,8 +506,7 @@ clone_and_follow_inferior (child_pid, followed_child)
|
|||
/* Accept NTRAPS traps from the inferior. */
|
||||
|
||||
void
|
||||
startup_inferior (ntraps)
|
||||
int ntraps;
|
||||
startup_inferior (int ntraps)
|
||||
{
|
||||
int pending_execs = ntraps;
|
||||
int terminal_initted;
|
||||
|
|
|
@ -32,8 +32,7 @@
|
|||
/* An expression that tells us whether the function invocation represented
|
||||
by FI does not have a frame on the stack associated with it. */
|
||||
int
|
||||
fr30_frameless_function_invocation (fi)
|
||||
struct frame_info *fi;
|
||||
fr30_frameless_function_invocation (struct frame_info *fi)
|
||||
{
|
||||
int frameless;
|
||||
CORE_ADDR func_start, after_prologue;
|
||||
|
@ -50,7 +49,7 @@ fr30_frameless_function_invocation (fi)
|
|||
command, or the call dummy breakpoint gets hit. */
|
||||
|
||||
void
|
||||
fr30_pop_frame ()
|
||||
fr30_pop_frame (void)
|
||||
{
|
||||
struct frame_info *frame = get_current_frame ();
|
||||
int regnum;
|
||||
|
@ -159,12 +158,8 @@ fr30_skip_prologue (CORE_ADDR pc)
|
|||
*/
|
||||
|
||||
CORE_ADDR
|
||||
fr30_push_arguments (nargs, args, sp, struct_return, struct_addr)
|
||||
int nargs;
|
||||
value_ptr *args;
|
||||
CORE_ADDR sp;
|
||||
int struct_return;
|
||||
CORE_ADDR struct_addr;
|
||||
fr30_push_arguments (int nargs, value_ptr *args, CORE_ADDR sp,
|
||||
int struct_return, CORE_ADDR struct_addr)
|
||||
{
|
||||
int argreg;
|
||||
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 ()
|
||||
_initialize_fr30_tdep (void)
|
||||
{
|
||||
extern int print_insn_fr30 (bfd_vma, disassemble_info *);
|
||||
tm_print_insn = print_insn_fr30;
|
||||
|
@ -272,8 +267,7 @@ _initialize_fr30_tdep ()
|
|||
static struct frame_info prologue_cache;
|
||||
|
||||
static int
|
||||
check_prologue_cache (fi)
|
||||
struct frame_info *fi;
|
||||
check_prologue_cache (struct frame_info *fi)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -296,8 +290,7 @@ check_prologue_cache (fi)
|
|||
*/
|
||||
|
||||
static void
|
||||
save_prologue_cache (fi)
|
||||
struct frame_info *fi;
|
||||
save_prologue_cache (struct frame_info *fi)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -323,8 +316,7 @@ save_prologue_cache (fi)
|
|||
be determined till after we have scanned the prologue. */
|
||||
|
||||
static void
|
||||
fr30_scan_prologue (fi)
|
||||
struct frame_info *fi;
|
||||
fr30_scan_prologue (struct frame_info *fi)
|
||||
{
|
||||
int sp_offset, fp_offset;
|
||||
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). */
|
||||
|
||||
void
|
||||
fr30_init_extra_frame_info (fi)
|
||||
struct frame_info *fi;
|
||||
fr30_init_extra_frame_info (struct frame_info *fi)
|
||||
{
|
||||
int reg;
|
||||
|
||||
|
@ -507,9 +498,7 @@ fr30_init_extra_frame_info (fi)
|
|||
frame. */
|
||||
|
||||
CORE_ADDR
|
||||
fr30_find_callers_reg (fi, regnum)
|
||||
struct frame_info *fi;
|
||||
int regnum;
|
||||
fr30_find_callers_reg (struct frame_info *fi, int regnum)
|
||||
{
|
||||
for (; fi; fi = fi->next)
|
||||
if (PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
|
||||
|
@ -531,8 +520,7 @@ fr30_find_callers_reg (fi, regnum)
|
|||
|
||||
|
||||
CORE_ADDR
|
||||
fr30_frame_chain (fi)
|
||||
struct frame_info *fi;
|
||||
fr30_frame_chain (struct frame_info *fi)
|
||||
{
|
||||
CORE_ADDR fn_start, callers_pc, fp;
|
||||
struct frame_info caller_fi;
|
||||
|
@ -580,8 +568,7 @@ fr30_frame_chain (fi)
|
|||
will be found. */
|
||||
|
||||
CORE_ADDR
|
||||
fr30_frame_saved_pc (fi)
|
||||
struct frame_info *fi;
|
||||
fr30_frame_saved_pc (struct frame_info *fi)
|
||||
{
|
||||
if (PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
|
||||
return generic_read_register_dummy (fi->pc, fi->frame, PC_REGNUM);
|
||||
|
@ -597,14 +584,8 @@ fr30_frame_saved_pc (fi)
|
|||
*/
|
||||
|
||||
int
|
||||
fr30_fix_call_dummy (dummy, sp, fun, nargs, args, type, gcc_p)
|
||||
char *dummy;
|
||||
CORE_ADDR sp;
|
||||
CORE_ADDR fun;
|
||||
int nargs;
|
||||
value_ptr *args;
|
||||
struct type *type;
|
||||
int gcc_p;
|
||||
fr30_fix_call_dummy (char *dummy, CORE_ADDR sp, CORE_ADDR fun, int nargs,
|
||||
value_ptr *args, struct type *type, int gcc_p)
|
||||
{
|
||||
long offset24;
|
||||
|
||||
|
|
|
@ -3693,8 +3693,7 @@ init_gdbarch_data (struct gdbarch *gdbarch)
|
|||
data-pointer. */
|
||||
|
||||
void *
|
||||
gdbarch_data (data)
|
||||
struct gdbarch_data *data;
|
||||
gdbarch_data (struct gdbarch_data *data)
|
||||
{
|
||||
if (data->index >= current_gdbarch->nr_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);
|
||||
|
||||
void
|
||||
_initialize_gdbarch ()
|
||||
_initialize_gdbarch (void)
|
||||
{
|
||||
struct cmd_list_element *c;
|
||||
|
||||
|
|
|
@ -41,8 +41,7 @@ static int remote_desc;
|
|||
Then return to command level. */
|
||||
|
||||
void
|
||||
perror_with_name (string)
|
||||
char *string;
|
||||
perror_with_name (char *string)
|
||||
{
|
||||
#ifndef STDC_HEADERS
|
||||
extern int sys_nerr;
|
||||
|
@ -63,11 +62,7 @@ perror_with_name (string)
|
|||
}
|
||||
|
||||
static void
|
||||
sync_error (fp, desc, expect, got)
|
||||
FILE *fp;
|
||||
char *desc;
|
||||
int expect;
|
||||
int got;
|
||||
sync_error (FILE *fp, char *desc, int expect, int got)
|
||||
{
|
||||
fprintf (stderr, "\n%s\n", desc);
|
||||
fprintf (stderr, "At logfile offset %ld, expected '0x%x' got '0x%x'\n",
|
||||
|
@ -77,7 +72,7 @@ sync_error (fp, desc, expect, got)
|
|||
}
|
||||
|
||||
void
|
||||
remote_close ()
|
||||
remote_close (void)
|
||||
{
|
||||
close (remote_desc);
|
||||
}
|
||||
|
@ -86,8 +81,7 @@ remote_close ()
|
|||
NAME is the filename used for communication. */
|
||||
|
||||
void
|
||||
remote_open (name)
|
||||
char *name;
|
||||
remote_open (char *name)
|
||||
{
|
||||
extern char *strchr ();
|
||||
|
||||
|
@ -159,8 +153,7 @@ remote_open (name)
|
|||
}
|
||||
|
||||
static int
|
||||
tohex (ch)
|
||||
int ch;
|
||||
tohex (int ch)
|
||||
{
|
||||
if (ch >= '0' && ch <= '9')
|
||||
{
|
||||
|
@ -180,8 +173,7 @@ tohex (ch)
|
|||
}
|
||||
|
||||
static int
|
||||
logchar (fp)
|
||||
FILE *fp;
|
||||
logchar (FILE *fp)
|
||||
{
|
||||
int ch;
|
||||
int ch2;
|
||||
|
@ -244,8 +236,7 @@ logchar (fp)
|
|||
blank) up until a \n is read from fp (which is not matched) */
|
||||
|
||||
void
|
||||
expect (fp)
|
||||
FILE *fp;
|
||||
expect (FILE *fp)
|
||||
{
|
||||
int fromlog;
|
||||
unsigned char fromgdb;
|
||||
|
@ -276,8 +267,7 @@ expect (fp)
|
|||
\n is read from fp (which is discarded and not sent to gdb). */
|
||||
|
||||
void
|
||||
play (fp)
|
||||
FILE *fp;
|
||||
play (FILE *fp)
|
||||
{
|
||||
int fromlog;
|
||||
char ch;
|
||||
|
|
|
@ -58,9 +58,7 @@ int query ();
|
|||
ENV is the environment vector to pass. */
|
||||
|
||||
int
|
||||
create_inferior (program, allargs)
|
||||
char *program;
|
||||
char **allargs;
|
||||
create_inferior (char *program, char **allargs)
|
||||
{
|
||||
int pid;
|
||||
|
||||
|
@ -86,7 +84,7 @@ create_inferior (program, allargs)
|
|||
/* Kill the inferior process. Make us have no inferior. */
|
||||
|
||||
void
|
||||
kill_inferior ()
|
||||
kill_inferior (void)
|
||||
{
|
||||
if (inferior_pid == 0)
|
||||
return;
|
||||
|
@ -97,8 +95,7 @@ kill_inferior ()
|
|||
|
||||
/* Return nonzero if the given thread is still alive. */
|
||||
int
|
||||
mythread_alive (pid)
|
||||
int pid;
|
||||
mythread_alive (int pid)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
@ -106,8 +103,7 @@ mythread_alive (pid)
|
|||
/* Wait for process, returns status */
|
||||
|
||||
unsigned char
|
||||
mywait (status)
|
||||
char *status;
|
||||
mywait (char *status)
|
||||
{
|
||||
int pid;
|
||||
union wait w;
|
||||
|
@ -140,9 +136,7 @@ mywait (status)
|
|||
If SIGNAL is nonzero, give it that signal. */
|
||||
|
||||
void
|
||||
myresume (step, signal)
|
||||
int step;
|
||||
int signal;
|
||||
myresume (int step, int signal)
|
||||
{
|
||||
errno = 0;
|
||||
ptrace (step ? PT_STEP : PT_CONTINUE, inferior_pid, 1, signal, 0);
|
||||
|
@ -164,9 +158,7 @@ myresume (step, signal)
|
|||
#endif
|
||||
|
||||
CORE_ADDR
|
||||
register_addr (regno, blockend)
|
||||
int regno;
|
||||
CORE_ADDR blockend;
|
||||
register_addr (int regno, CORE_ADDR blockend)
|
||||
{
|
||||
CORE_ADDR addr;
|
||||
|
||||
|
@ -181,8 +173,7 @@ register_addr (regno, blockend)
|
|||
/* Fetch one register. */
|
||||
|
||||
static void
|
||||
fetch_register (regno)
|
||||
int regno;
|
||||
fetch_register (int regno)
|
||||
{
|
||||
register unsigned int regaddr;
|
||||
char buf[MAX_REGISTER_RAW_SIZE];
|
||||
|
@ -217,8 +208,7 @@ error_exit:;
|
|||
/* Fetch all registers, or just one, from the child process. */
|
||||
|
||||
void
|
||||
fetch_inferior_registers (regno)
|
||||
int regno;
|
||||
fetch_inferior_registers (int regno)
|
||||
{
|
||||
if (regno == -1 || regno == 0)
|
||||
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). */
|
||||
|
||||
void
|
||||
store_inferior_registers (regno)
|
||||
int regno;
|
||||
store_inferior_registers (int regno)
|
||||
{
|
||||
register unsigned int regaddr;
|
||||
char buf[80];
|
||||
|
@ -295,10 +284,7 @@ store_inferior_registers (regno)
|
|||
/* Copy LEN bytes from inferior's memory starting at MEMADDR
|
||||
to debugger memory starting at MYADDR. */
|
||||
|
||||
read_inferior_memory (memaddr, myaddr, len)
|
||||
CORE_ADDR memaddr;
|
||||
char *myaddr;
|
||||
int len;
|
||||
read_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len)
|
||||
{
|
||||
register int i;
|
||||
/* Round starting address down to longword boundary. */
|
||||
|
@ -325,10 +311,7 @@ read_inferior_memory (memaddr, myaddr, len)
|
|||
returns the value of errno. */
|
||||
|
||||
int
|
||||
write_inferior_memory (memaddr, myaddr, len)
|
||||
CORE_ADDR memaddr;
|
||||
char *myaddr;
|
||||
int len;
|
||||
write_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len)
|
||||
{
|
||||
register int i;
|
||||
/* Round starting address down to longword boundary. */
|
||||
|
@ -369,6 +352,6 @@ write_inferior_memory (memaddr, myaddr, len)
|
|||
}
|
||||
|
||||
void
|
||||
initialize_low ()
|
||||
initialize_low (void)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -66,9 +66,7 @@ static void initialize_arch (void);
|
|||
ENV is the environment vector to pass. */
|
||||
|
||||
int
|
||||
create_inferior (program, allargs)
|
||||
char *program;
|
||||
char **allargs;
|
||||
create_inferior (char *program, char **allargs)
|
||||
{
|
||||
int pid;
|
||||
|
||||
|
@ -94,7 +92,7 @@ create_inferior (program, allargs)
|
|||
/* Kill the inferior process. Make us have no inferior. */
|
||||
|
||||
void
|
||||
kill_inferior ()
|
||||
kill_inferior (void)
|
||||
{
|
||||
if (inferior_pid == 0)
|
||||
return;
|
||||
|
@ -105,8 +103,7 @@ kill_inferior ()
|
|||
|
||||
/* Return nonzero if the given thread is still alive. */
|
||||
int
|
||||
mythread_alive (pid)
|
||||
int pid;
|
||||
mythread_alive (int pid)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
@ -114,8 +111,7 @@ mythread_alive (pid)
|
|||
/* Wait for process, returns status */
|
||||
|
||||
unsigned char
|
||||
mywait (status)
|
||||
char *status;
|
||||
mywait (char *status)
|
||||
{
|
||||
int pid;
|
||||
union wait w;
|
||||
|
@ -148,9 +144,7 @@ mywait (status)
|
|||
If SIGNAL is nonzero, give it that signal. */
|
||||
|
||||
void
|
||||
myresume (step, signal)
|
||||
int step;
|
||||
int signal;
|
||||
myresume (int step, int signal)
|
||||
{
|
||||
errno = 0;
|
||||
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];
|
||||
|
||||
static void
|
||||
initialize_arch ()
|
||||
initialize_arch (void)
|
||||
{
|
||||
/* Initialize the table saying where each register starts in the
|
||||
register file. */
|
||||
|
@ -218,9 +212,7 @@ static int regmap[] =
|
|||
};
|
||||
|
||||
int
|
||||
i386_register_u_addr (blockend, regnum)
|
||||
int blockend;
|
||||
int regnum;
|
||||
i386_register_u_addr (int blockend, int regnum)
|
||||
{
|
||||
#if 0
|
||||
/* this will be needed if fp registers are reinstated */
|
||||
|
@ -242,7 +234,7 @@ i386_register_u_addr (blockend, regnum)
|
|||
}
|
||||
#elif defined(TARGET_M68K)
|
||||
static void
|
||||
initialize_arch ()
|
||||
initialize_arch (void)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -270,9 +262,7 @@ static int regmap[] =
|
|||
is stored. */
|
||||
|
||||
int
|
||||
m68k_linux_register_u_addr (blockend, regnum)
|
||||
int blockend;
|
||||
int regnum;
|
||||
m68k_linux_register_u_addr (int blockend, int regnum)
|
||||
{
|
||||
return (blockend + 4 * regmap[regnum]);
|
||||
}
|
||||
|
@ -551,16 +541,14 @@ ia64_register_u_addr (int blockend, int regnum)
|
|||
}
|
||||
|
||||
static void
|
||||
initialize_arch ()
|
||||
initialize_arch (void)
|
||||
{
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
CORE_ADDR
|
||||
register_addr (regno, blockend)
|
||||
int regno;
|
||||
CORE_ADDR blockend;
|
||||
register_addr (int regno, CORE_ADDR blockend)
|
||||
{
|
||||
CORE_ADDR addr;
|
||||
|
||||
|
@ -575,8 +563,7 @@ register_addr (regno, blockend)
|
|||
/* Fetch one register. */
|
||||
|
||||
static void
|
||||
fetch_register (regno)
|
||||
int regno;
|
||||
fetch_register (int regno)
|
||||
{
|
||||
CORE_ADDR regaddr;
|
||||
register int i;
|
||||
|
@ -610,8 +597,7 @@ error_exit:;
|
|||
/* Fetch all registers, or just one, from the child process. */
|
||||
|
||||
void
|
||||
fetch_inferior_registers (regno)
|
||||
int regno;
|
||||
fetch_inferior_registers (int regno)
|
||||
{
|
||||
if (regno == -1 || regno == 0)
|
||||
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). */
|
||||
|
||||
void
|
||||
store_inferior_registers (regno)
|
||||
int regno;
|
||||
store_inferior_registers (int regno)
|
||||
{
|
||||
CORE_ADDR regaddr;
|
||||
int i;
|
||||
|
@ -690,10 +675,7 @@ store_inferior_registers (regno)
|
|||
to debugger memory starting at MYADDR. */
|
||||
|
||||
void
|
||||
read_inferior_memory (memaddr, myaddr, len)
|
||||
CORE_ADDR memaddr;
|
||||
char *myaddr;
|
||||
int len;
|
||||
read_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len)
|
||||
{
|
||||
register int i;
|
||||
/* Round starting address down to longword boundary. */
|
||||
|
@ -722,10 +704,7 @@ read_inferior_memory (memaddr, myaddr, len)
|
|||
returns the value of errno. */
|
||||
|
||||
int
|
||||
write_inferior_memory (memaddr, myaddr, len)
|
||||
CORE_ADDR memaddr;
|
||||
char *myaddr;
|
||||
int len;
|
||||
write_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len)
|
||||
{
|
||||
register int i;
|
||||
/* Round starting address down to longword boundary. */
|
||||
|
@ -766,7 +745,7 @@ write_inferior_memory (memaddr, myaddr, len)
|
|||
}
|
||||
|
||||
void
|
||||
initialize_low ()
|
||||
initialize_low (void)
|
||||
{
|
||||
initialize_arch ();
|
||||
}
|
||||
|
|
|
@ -53,9 +53,7 @@ char *registers = my_registers;
|
|||
ALLARGS is a vector of program-name and args. */
|
||||
|
||||
int
|
||||
create_inferior (program, allargs)
|
||||
char *program;
|
||||
char **allargs;
|
||||
create_inferior (char *program, char **allargs)
|
||||
{
|
||||
int pid;
|
||||
|
||||
|
@ -91,7 +89,7 @@ create_inferior (program, allargs)
|
|||
/* Kill the inferior process. Make us have no inferior. */
|
||||
|
||||
void
|
||||
kill_inferior ()
|
||||
kill_inferior (void)
|
||||
{
|
||||
if (inferior_pid == 0)
|
||||
return;
|
||||
|
@ -103,8 +101,7 @@ kill_inferior ()
|
|||
|
||||
/* Return nonzero if the given thread is still alive. */
|
||||
int
|
||||
mythread_alive (pid)
|
||||
int pid;
|
||||
mythread_alive (int pid)
|
||||
{
|
||||
/* Arggh. Apparently pthread_kill only works for threads within
|
||||
the process that calls pthread_kill.
|
||||
|
@ -122,8 +119,7 @@ mythread_alive (pid)
|
|||
/* Wait for process, returns status */
|
||||
|
||||
unsigned char
|
||||
mywait (status)
|
||||
char *status;
|
||||
mywait (char *status)
|
||||
{
|
||||
int pid;
|
||||
union wait w;
|
||||
|
@ -186,9 +182,7 @@ mywait (status)
|
|||
If SIGNAL is nonzero, give it that signal. */
|
||||
|
||||
void
|
||||
myresume (step, signal)
|
||||
int step;
|
||||
int signal;
|
||||
myresume (int step, int signal)
|
||||
{
|
||||
errno = 0;
|
||||
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. */
|
||||
|
||||
void
|
||||
fetch_inferior_registers (regno)
|
||||
int regno;
|
||||
fetch_inferior_registers (int regno)
|
||||
{
|
||||
#if 0
|
||||
int whatregs = 0;
|
||||
|
@ -457,8 +450,7 @@ fetch_inferior_registers (regno)
|
|||
this point. */
|
||||
|
||||
void
|
||||
store_inferior_registers (regno)
|
||||
int regno;
|
||||
store_inferior_registers (int regno)
|
||||
{
|
||||
#if 0
|
||||
int whatregs = 0;
|
||||
|
@ -566,7 +558,7 @@ store_inferior_registers (regno)
|
|||
saved context block. */
|
||||
|
||||
static unsigned long
|
||||
lynx_registers_addr ()
|
||||
lynx_registers_addr (void)
|
||||
{
|
||||
CORE_ADDR stblock;
|
||||
int ecpoff = offsetof (st_t, ecp);
|
||||
|
@ -591,8 +583,7 @@ lynx_registers_addr ()
|
|||
marking them as valid so we won't fetch them again. */
|
||||
|
||||
void
|
||||
fetch_inferior_registers (ignored)
|
||||
int ignored;
|
||||
fetch_inferior_registers (int ignored)
|
||||
{
|
||||
int regno;
|
||||
unsigned long reg;
|
||||
|
@ -623,8 +614,7 @@ fetch_inferior_registers (ignored)
|
|||
Otherwise, REGNO specifies which register (so we can save time). */
|
||||
|
||||
void
|
||||
store_inferior_registers (ignored)
|
||||
int ignored;
|
||||
store_inferior_registers (int ignored)
|
||||
{
|
||||
int regno;
|
||||
unsigned long reg;
|
||||
|
@ -662,10 +652,7 @@ store_inferior_registers (ignored)
|
|||
to debugger memory starting at MYADDR. */
|
||||
|
||||
void
|
||||
read_inferior_memory (memaddr, myaddr, len)
|
||||
CORE_ADDR memaddr;
|
||||
char *myaddr;
|
||||
int len;
|
||||
read_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len)
|
||||
{
|
||||
register int i;
|
||||
/* Round starting address down to longword boundary. */
|
||||
|
@ -692,10 +679,7 @@ read_inferior_memory (memaddr, myaddr, len)
|
|||
returns the value of errno. */
|
||||
|
||||
int
|
||||
write_inferior_memory (memaddr, myaddr, len)
|
||||
CORE_ADDR memaddr;
|
||||
char *myaddr;
|
||||
int len;
|
||||
write_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len)
|
||||
{
|
||||
register int i;
|
||||
/* 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
|
||||
initialize_low ()
|
||||
initialize_low (void)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -89,7 +89,7 @@ int i386_register_raw_size[MAX_NUM_REGS] = {
|
|||
int i386_register_byte[MAX_NUM_REGS];
|
||||
|
||||
static void
|
||||
initialize_arch()
|
||||
initialize_arch (void)
|
||||
{
|
||||
/* Initialize the table saying where each register starts in the
|
||||
register file. */
|
||||
|
@ -108,7 +108,7 @@ initialize_arch()
|
|||
|
||||
#ifdef __powerpc__
|
||||
static void
|
||||
initialize_arch()
|
||||
initialize_arch (void)
|
||||
{
|
||||
}
|
||||
#endif /* !__powerpc__ */
|
||||
|
@ -119,9 +119,7 @@ initialize_arch()
|
|||
ENV is the environment vector to pass. */
|
||||
|
||||
int
|
||||
create_inferior (program, allargs)
|
||||
char *program;
|
||||
char **allargs;
|
||||
create_inferior (char *program, char **allargs)
|
||||
{
|
||||
int pid;
|
||||
|
||||
|
@ -147,7 +145,7 @@ create_inferior (program, allargs)
|
|||
/* Kill the inferior process. Make us have no inferior. */
|
||||
|
||||
void
|
||||
kill_inferior ()
|
||||
kill_inferior (void)
|
||||
{
|
||||
if (inferior_pid == 0)
|
||||
return;
|
||||
|
@ -158,8 +156,7 @@ kill_inferior ()
|
|||
|
||||
/* Return nonzero if the given thread is still alive. */
|
||||
int
|
||||
mythread_alive (pid)
|
||||
int pid;
|
||||
mythread_alive (int pid)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
@ -167,8 +164,7 @@ mythread_alive (pid)
|
|||
/* Wait for process, returns status */
|
||||
|
||||
unsigned char
|
||||
mywait (status)
|
||||
char *status;
|
||||
mywait (char *status)
|
||||
{
|
||||
int pid;
|
||||
int w;
|
||||
|
@ -201,9 +197,7 @@ mywait (status)
|
|||
If SIGNAL is nonzero, give it that signal. */
|
||||
|
||||
void
|
||||
myresume (step, signal)
|
||||
int step;
|
||||
int signal;
|
||||
myresume (int step, int signal)
|
||||
{
|
||||
errno = 0;
|
||||
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. */
|
||||
|
||||
void
|
||||
fetch_inferior_registers (ignored)
|
||||
int ignored;
|
||||
fetch_inferior_registers (int ignored)
|
||||
{
|
||||
struct reg inferior_registers;
|
||||
struct env387 inferior_fp_registers;
|
||||
|
@ -271,8 +264,7 @@ fetch_inferior_registers (ignored)
|
|||
Otherwise, REGNO specifies which register (so we can save time). */
|
||||
|
||||
void
|
||||
store_inferior_registers (ignored)
|
||||
int ignored;
|
||||
store_inferior_registers (int ignored)
|
||||
{
|
||||
struct reg inferior_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. */
|
||||
|
||||
void
|
||||
fetch_inferior_registers (regno)
|
||||
int regno;
|
||||
fetch_inferior_registers (int regno)
|
||||
{
|
||||
struct reg inferior_registers;
|
||||
struct fpreg inferior_fp_registers;
|
||||
|
@ -354,8 +345,7 @@ fetch_inferior_registers (regno)
|
|||
Otherwise, REGNO specifies which register (so we can save time). */
|
||||
|
||||
void
|
||||
store_inferior_registers (regno)
|
||||
int regno;
|
||||
store_inferior_registers (int regno)
|
||||
{
|
||||
struct reg inferior_registers;
|
||||
struct fpreg inferior_fp_registers;
|
||||
|
@ -388,10 +378,7 @@ store_inferior_registers (regno)
|
|||
/* Copy LEN bytes from inferior's memory starting at MEMADDR
|
||||
to debugger memory starting at MYADDR. */
|
||||
|
||||
read_inferior_memory (memaddr, myaddr, len)
|
||||
CORE_ADDR memaddr;
|
||||
char *myaddr;
|
||||
int len;
|
||||
read_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len)
|
||||
{
|
||||
register int i;
|
||||
/* Round starting address down to longword boundary. */
|
||||
|
@ -418,10 +405,7 @@ read_inferior_memory (memaddr, myaddr, len)
|
|||
returns the value of errno. */
|
||||
|
||||
int
|
||||
write_inferior_memory (memaddr, myaddr, len)
|
||||
CORE_ADDR memaddr;
|
||||
char *myaddr;
|
||||
int len;
|
||||
write_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len)
|
||||
{
|
||||
register int i;
|
||||
/* Round starting address down to longword boundary. */
|
||||
|
@ -462,7 +446,7 @@ write_inferior_memory (memaddr, myaddr, len)
|
|||
}
|
||||
|
||||
void
|
||||
initialize_low ()
|
||||
initialize_low (void)
|
||||
{
|
||||
initialize_arch ();
|
||||
}
|
||||
|
|
|
@ -41,8 +41,7 @@ static SIM_DESC gdbsim_desc = 0;
|
|||
does not support loading itself. */
|
||||
|
||||
static void
|
||||
generic_load (loadfile_bfd)
|
||||
bfd *loadfile_bfd;
|
||||
generic_load (bfd *loadfile_bfd)
|
||||
{
|
||||
asection *s;
|
||||
|
||||
|
@ -85,9 +84,7 @@ generic_load (loadfile_bfd)
|
|||
}
|
||||
|
||||
int
|
||||
create_inferior (program, argv)
|
||||
char *program;
|
||||
char **argv;
|
||||
create_inferior (char *program, char **argv)
|
||||
{
|
||||
bfd *abfd;
|
||||
int pid = 0;
|
||||
|
@ -145,7 +142,7 @@ create_inferior (program, argv)
|
|||
/* Kill the inferior process. Make us have no inferior. */
|
||||
|
||||
void
|
||||
kill_inferior ()
|
||||
kill_inferior (void)
|
||||
{
|
||||
sim_close (gdbsim_desc, 0);
|
||||
default_callback.shutdown (&default_callback);
|
||||
|
@ -154,8 +151,7 @@ kill_inferior ()
|
|||
/* Fetch one register. */
|
||||
|
||||
static void
|
||||
fetch_register (regno)
|
||||
int regno;
|
||||
fetch_register (int regno)
|
||||
{
|
||||
sim_fetch_register (gdbsim_desc, regno, ®isters[REGISTER_BYTE (regno)],
|
||||
REGISTER_RAW_SIZE (regno));
|
||||
|
@ -164,8 +160,7 @@ fetch_register (regno)
|
|||
/* Fetch all registers, or just one, from the child process. */
|
||||
|
||||
void
|
||||
fetch_inferior_registers (regno)
|
||||
int regno;
|
||||
fetch_inferior_registers (int regno)
|
||||
{
|
||||
if (regno == -1 || regno == 0)
|
||||
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). */
|
||||
|
||||
void
|
||||
store_inferior_registers (regno)
|
||||
int regno;
|
||||
store_inferior_registers (int regno)
|
||||
{
|
||||
if (regno == -1)
|
||||
{
|
||||
|
@ -194,8 +188,7 @@ store_inferior_registers (regno)
|
|||
|
||||
/* Return nonzero if the given thread is still alive. */
|
||||
int
|
||||
mythread_alive (pid)
|
||||
int pid;
|
||||
mythread_alive (int pid)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
@ -203,8 +196,7 @@ mythread_alive (pid)
|
|||
/* Wait for process, returns status */
|
||||
|
||||
unsigned char
|
||||
mywait (status)
|
||||
char *status;
|
||||
mywait (char *status)
|
||||
{
|
||||
int sigrc;
|
||||
enum sim_stop reason;
|
||||
|
@ -240,9 +232,7 @@ mywait (status)
|
|||
If SIGNAL is nonzero, give it that signal. */
|
||||
|
||||
void
|
||||
myresume (step, signo)
|
||||
int step;
|
||||
int signo;
|
||||
myresume (int step, int signo)
|
||||
{
|
||||
/* Should be using target_signal_to_host() or signal numbers in target.h
|
||||
to convert GDB signal number to target signal number. */
|
||||
|
@ -253,10 +243,7 @@ myresume (step, signo)
|
|||
to debugger memory starting at MYADDR. */
|
||||
|
||||
void
|
||||
read_inferior_memory (memaddr, myaddr, len)
|
||||
CORE_ADDR memaddr;
|
||||
char *myaddr;
|
||||
int len;
|
||||
read_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len)
|
||||
{
|
||||
sim_read (gdbsim_desc, memaddr, myaddr, len);
|
||||
}
|
||||
|
@ -267,16 +254,13 @@ read_inferior_memory (memaddr, myaddr, len)
|
|||
returns the value of errno. */
|
||||
|
||||
int
|
||||
write_inferior_memory (memaddr, myaddr, len)
|
||||
CORE_ADDR memaddr;
|
||||
char *myaddr;
|
||||
int len;
|
||||
write_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len)
|
||||
{
|
||||
sim_write (gdbsim_desc, memaddr, myaddr, len); /* should check for error. FIXME!! */
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
initialize_low ()
|
||||
initialize_low (void)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -63,9 +63,7 @@ int query ();
|
|||
ENV is the environment vector to pass. */
|
||||
|
||||
int
|
||||
create_inferior (program, allargs)
|
||||
char *program;
|
||||
char **allargs;
|
||||
create_inferior (char *program, char **allargs)
|
||||
{
|
||||
int pid;
|
||||
|
||||
|
@ -91,7 +89,7 @@ create_inferior (program, allargs)
|
|||
/* Kill the inferior process. Make us have no inferior. */
|
||||
|
||||
void
|
||||
kill_inferior ()
|
||||
kill_inferior (void)
|
||||
{
|
||||
if (inferior_pid == 0)
|
||||
return;
|
||||
|
@ -102,8 +100,7 @@ kill_inferior ()
|
|||
|
||||
/* Return nonzero if the given thread is still alive. */
|
||||
int
|
||||
mythread_alive (pid)
|
||||
int pid;
|
||||
mythread_alive (int pid)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
@ -111,8 +108,7 @@ mythread_alive (pid)
|
|||
/* Wait for process, returns status */
|
||||
|
||||
unsigned char
|
||||
mywait (status)
|
||||
char *status;
|
||||
mywait (char *status)
|
||||
{
|
||||
int pid;
|
||||
union wait w;
|
||||
|
@ -145,9 +141,7 @@ mywait (status)
|
|||
If SIGNAL is nonzero, give it that signal. */
|
||||
|
||||
void
|
||||
myresume (step, signal)
|
||||
int step;
|
||||
int signal;
|
||||
myresume (int step, int signal)
|
||||
{
|
||||
errno = 0;
|
||||
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. */
|
||||
|
||||
void
|
||||
fetch_inferior_registers (ignored)
|
||||
int ignored;
|
||||
fetch_inferior_registers (int ignored)
|
||||
{
|
||||
struct regs inferior_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). */
|
||||
|
||||
void
|
||||
store_inferior_registers (ignored)
|
||||
int ignored;
|
||||
store_inferior_registers (int ignored)
|
||||
{
|
||||
struct regs inferior_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
|
||||
to debugger memory starting at MYADDR. */
|
||||
|
||||
read_inferior_memory (memaddr, myaddr, len)
|
||||
CORE_ADDR memaddr;
|
||||
char *myaddr;
|
||||
int len;
|
||||
read_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len)
|
||||
{
|
||||
register int i;
|
||||
/* Round starting address down to longword boundary. */
|
||||
|
@ -280,10 +269,7 @@ read_inferior_memory (memaddr, myaddr, len)
|
|||
returns the value of errno. */
|
||||
|
||||
int
|
||||
write_inferior_memory (memaddr, myaddr, len)
|
||||
CORE_ADDR memaddr;
|
||||
char *myaddr;
|
||||
int len;
|
||||
write_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len)
|
||||
{
|
||||
register int i;
|
||||
/* Round starting address down to longword boundary. */
|
||||
|
@ -324,6 +310,6 @@ write_inferior_memory (memaddr, myaddr, len)
|
|||
}
|
||||
|
||||
void
|
||||
initialize_low ()
|
||||
initialize_low (void)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -60,9 +60,7 @@ int query ();
|
|||
ENV is the environment vector to pass. */
|
||||
|
||||
int
|
||||
create_inferior (program, allargs)
|
||||
char *program;
|
||||
char **allargs;
|
||||
create_inferior (char *program, char **allargs)
|
||||
{
|
||||
int pid;
|
||||
|
||||
|
@ -88,7 +86,7 @@ create_inferior (program, allargs)
|
|||
/* Kill the inferior process. Make us have no inferior. */
|
||||
|
||||
void
|
||||
kill_inferior ()
|
||||
kill_inferior (void)
|
||||
{
|
||||
if (inferior_pid == 0)
|
||||
return;
|
||||
|
@ -99,8 +97,7 @@ kill_inferior ()
|
|||
|
||||
/* Return nonzero if the given thread is still alive. */
|
||||
int
|
||||
mythread_alive (pid)
|
||||
int pid;
|
||||
mythread_alive (int pid)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
@ -108,8 +105,7 @@ mythread_alive (pid)
|
|||
/* Wait for process, returns status */
|
||||
|
||||
unsigned char
|
||||
mywait (status)
|
||||
char *status;
|
||||
mywait (char *status)
|
||||
{
|
||||
int pid;
|
||||
union wait w;
|
||||
|
@ -142,9 +138,7 @@ mywait (status)
|
|||
If SIGNAL is nonzero, give it that signal. */
|
||||
|
||||
void
|
||||
myresume (step, signal)
|
||||
int step;
|
||||
int signal;
|
||||
myresume (int step, int signal)
|
||||
{
|
||||
errno = 0;
|
||||
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. */
|
||||
|
||||
void
|
||||
fetch_inferior_registers (ignored)
|
||||
int ignored;
|
||||
fetch_inferior_registers (int ignored)
|
||||
{
|
||||
struct regs inferior_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). */
|
||||
|
||||
void
|
||||
store_inferior_registers (ignored)
|
||||
int ignored;
|
||||
store_inferior_registers (int ignored)
|
||||
{
|
||||
struct regs inferior_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
|
||||
to debugger memory starting at MYADDR. */
|
||||
|
||||
read_inferior_memory (memaddr, myaddr, len)
|
||||
CORE_ADDR memaddr;
|
||||
char *myaddr;
|
||||
int len;
|
||||
read_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len)
|
||||
{
|
||||
register int i;
|
||||
/* Round starting address down to longword boundary. */
|
||||
|
@ -259,10 +248,7 @@ read_inferior_memory (memaddr, myaddr, len)
|
|||
returns the value of errno. */
|
||||
|
||||
int
|
||||
write_inferior_memory (memaddr, myaddr, len)
|
||||
CORE_ADDR memaddr;
|
||||
char *myaddr;
|
||||
int len;
|
||||
write_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len)
|
||||
{
|
||||
register int i;
|
||||
/* Round starting address down to longword boundary. */
|
||||
|
@ -303,6 +289,6 @@ write_inferior_memory (memaddr, myaddr, len)
|
|||
}
|
||||
|
||||
void
|
||||
initialize_low ()
|
||||
initialize_low (void)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -41,8 +41,7 @@ static int remote_desc;
|
|||
NAME is the filename used for communication. */
|
||||
|
||||
void
|
||||
remote_open (name)
|
||||
char *name;
|
||||
remote_open (char *name)
|
||||
{
|
||||
int save_fcntl_flags;
|
||||
|
||||
|
@ -162,7 +161,7 @@ remote_open (name)
|
|||
}
|
||||
|
||||
void
|
||||
remote_close ()
|
||||
remote_close (void)
|
||||
{
|
||||
close (remote_desc);
|
||||
}
|
||||
|
@ -170,8 +169,7 @@ remote_close ()
|
|||
/* Convert hex digit A to a number. */
|
||||
|
||||
static int
|
||||
fromhex (a)
|
||||
int a;
|
||||
fromhex (int a)
|
||||
{
|
||||
if (a >= '0' && a <= '9')
|
||||
return a - '0';
|
||||
|
@ -184,8 +182,7 @@ fromhex (a)
|
|||
/* Convert number NIB to a hex digit. */
|
||||
|
||||
static int
|
||||
tohex (nib)
|
||||
int nib;
|
||||
tohex (int nib)
|
||||
{
|
||||
if (nib < 10)
|
||||
return '0' + nib;
|
||||
|
@ -197,8 +194,7 @@ tohex (nib)
|
|||
The data of the packet is in BUF. Returns >= 0 on success, -1 otherwise. */
|
||||
|
||||
int
|
||||
putpkt (buf)
|
||||
char *buf;
|
||||
putpkt (char *buf)
|
||||
{
|
||||
int i;
|
||||
unsigned char csum = 0;
|
||||
|
@ -262,7 +258,7 @@ putpkt (buf)
|
|||
will cause us to send a SIGINT to the child. */
|
||||
|
||||
static void
|
||||
input_interrupt ()
|
||||
input_interrupt (void)
|
||||
{
|
||||
int cc;
|
||||
char c;
|
||||
|
@ -279,13 +275,13 @@ input_interrupt ()
|
|||
}
|
||||
|
||||
void
|
||||
enable_async_io ()
|
||||
enable_async_io (void)
|
||||
{
|
||||
signal (SIGIO, input_interrupt);
|
||||
}
|
||||
|
||||
void
|
||||
disable_async_io ()
|
||||
disable_async_io (void)
|
||||
{
|
||||
signal (SIGIO, SIG_IGN);
|
||||
}
|
||||
|
@ -293,7 +289,7 @@ disable_async_io ()
|
|||
/* Returns next char from remote GDB. -1 if error. */
|
||||
|
||||
static int
|
||||
readchar ()
|
||||
readchar (void)
|
||||
{
|
||||
static char buf[BUFSIZ];
|
||||
static int bufcnt = 0;
|
||||
|
@ -323,8 +319,7 @@ readchar ()
|
|||
and store it in BUF. Returns length of packet, or negative if error. */
|
||||
|
||||
int
|
||||
getpkt (buf)
|
||||
char *buf;
|
||||
getpkt (char *buf)
|
||||
{
|
||||
char *bp;
|
||||
unsigned char csum, c1, c2;
|
||||
|
@ -380,8 +375,7 @@ getpkt (buf)
|
|||
}
|
||||
|
||||
void
|
||||
write_ok (buf)
|
||||
char *buf;
|
||||
write_ok (char *buf)
|
||||
{
|
||||
buf[0] = 'O';
|
||||
buf[1] = 'K';
|
||||
|
@ -389,8 +383,7 @@ write_ok (buf)
|
|||
}
|
||||
|
||||
void
|
||||
write_enn (buf)
|
||||
char *buf;
|
||||
write_enn (char *buf)
|
||||
{
|
||||
buf[0] = 'E';
|
||||
buf[1] = 'N';
|
||||
|
@ -399,9 +392,7 @@ write_enn (buf)
|
|||
}
|
||||
|
||||
void
|
||||
convert_int_to_ascii (from, to, n)
|
||||
char *from, *to;
|
||||
int n;
|
||||
convert_int_to_ascii (char *from, char *to, int n)
|
||||
{
|
||||
int nib;
|
||||
char ch;
|
||||
|
@ -418,9 +409,7 @@ convert_int_to_ascii (from, to, n)
|
|||
|
||||
|
||||
void
|
||||
convert_ascii_to_int (from, to, n)
|
||||
char *from, *to;
|
||||
int n;
|
||||
convert_ascii_to_int (char *from, char *to, int n)
|
||||
{
|
||||
int nib1, nib2;
|
||||
while (n--)
|
||||
|
@ -432,9 +421,7 @@ convert_ascii_to_int (from, to, n)
|
|||
}
|
||||
|
||||
static char *
|
||||
outreg (regno, buf)
|
||||
int regno;
|
||||
char *buf;
|
||||
outreg (int regno, char *buf)
|
||||
{
|
||||
int regsize = REGISTER_RAW_SIZE (regno);
|
||||
|
||||
|
@ -453,10 +440,7 @@ outreg (regno, buf)
|
|||
}
|
||||
|
||||
void
|
||||
prepare_resume_reply (buf, status, signo)
|
||||
char *buf;
|
||||
char status;
|
||||
unsigned char signo;
|
||||
prepare_resume_reply (char *buf, char status, unsigned char signo)
|
||||
{
|
||||
int nib;
|
||||
|
||||
|
@ -512,10 +496,7 @@ prepare_resume_reply (buf, status, signo)
|
|||
}
|
||||
|
||||
void
|
||||
decode_m_packet (from, mem_addr_ptr, len_ptr)
|
||||
char *from;
|
||||
CORE_ADDR *mem_addr_ptr;
|
||||
unsigned int *len_ptr;
|
||||
decode_m_packet (char *from, CORE_ADDR *mem_addr_ptr, unsigned int *len_ptr)
|
||||
{
|
||||
int i = 0, j = 0;
|
||||
char ch;
|
||||
|
@ -537,10 +518,8 @@ decode_m_packet (from, mem_addr_ptr, len_ptr)
|
|||
}
|
||||
|
||||
void
|
||||
decode_M_packet (from, mem_addr_ptr, len_ptr, to)
|
||||
char *from, *to;
|
||||
CORE_ADDR *mem_addr_ptr;
|
||||
unsigned int *len_ptr;
|
||||
decode_M_packet (char *from, CORE_ADDR *mem_addr_ptr, unsigned int *len_ptr,
|
||||
char *to)
|
||||
{
|
||||
int i = 0;
|
||||
char ch;
|
||||
|
|
|
@ -29,8 +29,7 @@
|
|||
Then return to command level. */
|
||||
|
||||
void
|
||||
perror_with_name (string)
|
||||
char *string;
|
||||
perror_with_name (char *string)
|
||||
{
|
||||
#ifndef STDC_HEADERS
|
||||
extern int sys_nerr;
|
||||
|
|
241
gdb/gdbtypes.c
241
gdb/gdbtypes.c
|
@ -101,8 +101,7 @@ static void virtual_base_list_aux (struct type *dclass);
|
|||
in that objfile's type_obstack. */
|
||||
|
||||
struct type *
|
||||
alloc_type (objfile)
|
||||
struct objfile *objfile;
|
||||
alloc_type (struct objfile *objfile)
|
||||
{
|
||||
register struct type *type;
|
||||
|
||||
|
@ -136,9 +135,7 @@ alloc_type (objfile)
|
|||
We allocate new memory if needed. */
|
||||
|
||||
struct type *
|
||||
make_pointer_type (type, typeptr)
|
||||
struct type *type;
|
||||
struct type **typeptr;
|
||||
make_pointer_type (struct type *type, struct type **typeptr)
|
||||
{
|
||||
register struct type *ntype; /* New type */
|
||||
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. */
|
||||
|
||||
struct type *
|
||||
lookup_pointer_type (type)
|
||||
struct type *type;
|
||||
lookup_pointer_type (struct type *type)
|
||||
{
|
||||
return make_pointer_type (type, (struct type **) 0);
|
||||
}
|
||||
|
@ -206,9 +202,7 @@ lookup_pointer_type (type)
|
|||
We allocate new memory if needed. */
|
||||
|
||||
struct type *
|
||||
make_reference_type (type, typeptr)
|
||||
struct type *type;
|
||||
struct type **typeptr;
|
||||
make_reference_type (struct type *type, struct type **typeptr)
|
||||
{
|
||||
register struct type *ntype; /* New type */
|
||||
struct objfile *objfile;
|
||||
|
@ -259,8 +253,7 @@ make_reference_type (type, typeptr)
|
|||
/* Same as above, but caller doesn't care about memory allocation details. */
|
||||
|
||||
struct type *
|
||||
lookup_reference_type (type)
|
||||
struct type *type;
|
||||
lookup_reference_type (struct type *type)
|
||||
{
|
||||
return make_reference_type (type, (struct type **) 0);
|
||||
}
|
||||
|
@ -271,9 +264,7 @@ lookup_reference_type (type)
|
|||
We allocate new memory if needed. */
|
||||
|
||||
struct type *
|
||||
make_function_type (type, typeptr)
|
||||
struct type *type;
|
||||
struct type **typeptr;
|
||||
make_function_type (struct type *type, struct type **typeptr)
|
||||
{
|
||||
register struct type *ntype; /* New type */
|
||||
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. */
|
||||
|
||||
struct type *
|
||||
lookup_function_type (type)
|
||||
struct type *type;
|
||||
lookup_function_type (struct type *type)
|
||||
{
|
||||
return make_function_type (type, (struct type **) 0);
|
||||
}
|
||||
|
@ -324,11 +314,7 @@ lookup_function_type (type)
|
|||
We allocate new memory if needed. */
|
||||
|
||||
struct type *
|
||||
make_cv_type (cnst, voltl, type, typeptr)
|
||||
int cnst;
|
||||
int voltl;
|
||||
struct type *type;
|
||||
struct type **typeptr;
|
||||
make_cv_type (int cnst, int voltl, struct type *type, struct type **typeptr)
|
||||
{
|
||||
register struct type *ntype; /* New 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. */
|
||||
|
||||
struct type *
|
||||
lookup_member_type (type, domain)
|
||||
struct type *type;
|
||||
struct type *domain;
|
||||
lookup_member_type (struct type *type, struct type *domain)
|
||||
{
|
||||
register struct type *mtype;
|
||||
|
||||
|
@ -420,8 +404,7 @@ lookup_member_type (type, domain)
|
|||
This always returns a fresh type. */
|
||||
|
||||
struct type *
|
||||
allocate_stub_method (type)
|
||||
struct type *type;
|
||||
allocate_stub_method (struct type *type)
|
||||
{
|
||||
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? */
|
||||
|
||||
struct type *
|
||||
create_range_type (result_type, index_type, low_bound, high_bound)
|
||||
struct type *result_type;
|
||||
struct type *index_type;
|
||||
int low_bound;
|
||||
int high_bound;
|
||||
create_range_type (struct type *result_type, struct type *index_type,
|
||||
int low_bound, int high_bound)
|
||||
{
|
||||
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. */
|
||||
|
||||
int
|
||||
get_discrete_bounds (type, lowp, highp)
|
||||
struct type *type;
|
||||
LONGEST *lowp, *highp;
|
||||
get_discrete_bounds (struct type *type, LONGEST *lowp, LONGEST *highp)
|
||||
{
|
||||
CHECK_TYPEDEF (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? */
|
||||
|
||||
struct type *
|
||||
create_array_type (result_type, element_type, range_type)
|
||||
struct type *result_type;
|
||||
struct type *element_type;
|
||||
struct type *range_type;
|
||||
create_array_type (struct type *result_type, struct type *element_type,
|
||||
struct type *range_type)
|
||||
{
|
||||
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? */
|
||||
|
||||
struct type *
|
||||
create_string_type (result_type, range_type)
|
||||
struct type *result_type;
|
||||
struct type *range_type;
|
||||
create_string_type (struct type *result_type, struct type *range_type)
|
||||
{
|
||||
result_type = create_array_type (result_type,
|
||||
*current_language->string_char_type,
|
||||
|
@ -613,9 +587,7 @@ create_string_type (result_type, range_type)
|
|||
}
|
||||
|
||||
struct type *
|
||||
create_set_type (result_type, domain_type)
|
||||
struct type *result_type;
|
||||
struct type *domain_type;
|
||||
create_set_type (struct type *result_type, struct type *domain_type)
|
||||
{
|
||||
LONGEST low_bound, high_bound, bit_length;
|
||||
if (result_type == NULL)
|
||||
|
@ -693,10 +665,8 @@ init_simd_type (char *name,
|
|||
allocated. */
|
||||
|
||||
void
|
||||
smash_to_member_type (type, domain, to_type)
|
||||
struct type *type;
|
||||
struct type *domain;
|
||||
struct type *to_type;
|
||||
smash_to_member_type (struct type *type, struct type *domain,
|
||||
struct type *to_type)
|
||||
{
|
||||
struct objfile *objfile;
|
||||
|
||||
|
@ -718,11 +688,8 @@ smash_to_member_type (type, domain, to_type)
|
|||
allocated. */
|
||||
|
||||
void
|
||||
smash_to_method_type (type, domain, to_type, args)
|
||||
struct type *type;
|
||||
struct type *domain;
|
||||
struct type *to_type;
|
||||
struct type **args;
|
||||
smash_to_method_type (struct type *type, struct type *domain,
|
||||
struct type *to_type, struct type **args)
|
||||
{
|
||||
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. */
|
||||
|
||||
char *
|
||||
type_name_no_tag (type)
|
||||
register const struct type *type;
|
||||
type_name_no_tag (register const struct type *type)
|
||||
{
|
||||
if (TYPE_TAG_NAME (type) != NULL)
|
||||
return TYPE_TAG_NAME (type);
|
||||
|
@ -757,8 +723,7 @@ type_name_no_tag (type)
|
|||
Return zero if NAME is not a primitive type. */
|
||||
|
||||
struct type *
|
||||
lookup_primitive_typename (name)
|
||||
char *name;
|
||||
lookup_primitive_typename (char *name)
|
||||
{
|
||||
struct type **const *p;
|
||||
|
||||
|
@ -777,10 +742,7 @@ lookup_primitive_typename (name)
|
|||
If NOERR is nonzero, return zero if NAME is not suitably defined. */
|
||||
|
||||
struct type *
|
||||
lookup_typename (name, block, noerr)
|
||||
char *name;
|
||||
struct block *block;
|
||||
int noerr;
|
||||
lookup_typename (char *name, struct block *block, int noerr)
|
||||
{
|
||||
register struct symbol *sym;
|
||||
register struct type *tmp;
|
||||
|
@ -806,8 +768,7 @@ lookup_typename (name, block, noerr)
|
|||
}
|
||||
|
||||
struct type *
|
||||
lookup_unsigned_typename (name)
|
||||
char *name;
|
||||
lookup_unsigned_typename (char *name)
|
||||
{
|
||||
char *uns = alloca (strlen (name) + 10);
|
||||
|
||||
|
@ -817,8 +778,7 @@ lookup_unsigned_typename (name)
|
|||
}
|
||||
|
||||
struct type *
|
||||
lookup_signed_typename (name)
|
||||
char *name;
|
||||
lookup_signed_typename (char *name)
|
||||
{
|
||||
struct type *t;
|
||||
char *uns = alloca (strlen (name) + 8);
|
||||
|
@ -836,9 +796,7 @@ lookup_signed_typename (name)
|
|||
visible in lexical block BLOCK. */
|
||||
|
||||
struct type *
|
||||
lookup_struct (name, block)
|
||||
char *name;
|
||||
struct block *block;
|
||||
lookup_struct (char *name, struct block *block)
|
||||
{
|
||||
register struct symbol *sym;
|
||||
|
||||
|
@ -860,9 +818,7 @@ lookup_struct (name, block)
|
|||
visible in lexical block BLOCK. */
|
||||
|
||||
struct type *
|
||||
lookup_union (name, block)
|
||||
char *name;
|
||||
struct block *block;
|
||||
lookup_union (char *name, struct block *block)
|
||||
{
|
||||
register struct symbol *sym;
|
||||
struct type *t;
|
||||
|
@ -894,9 +850,7 @@ lookup_union (name, block)
|
|||
visible in lexical block BLOCK. */
|
||||
|
||||
struct type *
|
||||
lookup_enum (name, block)
|
||||
char *name;
|
||||
struct block *block;
|
||||
lookup_enum (char *name, struct block *block)
|
||||
{
|
||||
register struct symbol *sym;
|
||||
|
||||
|
@ -917,10 +871,7 @@ lookup_enum (name, block)
|
|||
visible in lexical block BLOCK. */
|
||||
|
||||
struct type *
|
||||
lookup_template_type (name, type, block)
|
||||
char *name;
|
||||
struct type *type;
|
||||
struct block *block;
|
||||
lookup_template_type (char *name, struct type *type, struct block *block)
|
||||
{
|
||||
struct symbol *sym;
|
||||
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. */
|
||||
|
||||
struct type *
|
||||
lookup_struct_elt_type (type, name, noerr)
|
||||
struct type *type;
|
||||
char *name;
|
||||
int noerr;
|
||||
lookup_struct_elt_type (struct type *type, char *name, int noerr)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -1038,8 +986,7 @@ lookup_struct_elt_type (type, name, noerr)
|
|||
will remain NULL. */
|
||||
|
||||
void
|
||||
fill_in_vptr_fieldno (type)
|
||||
struct type *type;
|
||||
fill_in_vptr_fieldno (struct type *type)
|
||||
{
|
||||
CHECK_TYPEDEF (type);
|
||||
|
||||
|
@ -1068,10 +1015,7 @@ fill_in_vptr_fieldno (type)
|
|||
Return 1 if the destructor was found, otherwise, return 0. */
|
||||
|
||||
int
|
||||
get_destructor_fn_field (t, method_indexp, field_indexp)
|
||||
struct type *t;
|
||||
int *method_indexp;
|
||||
int *field_indexp;
|
||||
get_destructor_fn_field (struct type *t, int *method_indexp, int *field_indexp)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -1110,8 +1054,7 @@ struct complaint stub_noname_complaint =
|
|||
{"stub type has NULL name", 0, 0};
|
||||
|
||||
struct type *
|
||||
check_typedef (type)
|
||||
register struct type *type;
|
||||
check_typedef (register struct type *type)
|
||||
{
|
||||
struct type *orig_type = type;
|
||||
while (TYPE_CODE (type) == TYPE_CODE_TYPEDEF)
|
||||
|
@ -1226,9 +1169,7 @@ check_typedef (type)
|
|||
#define ADD_EXTRA(c) { pextras->str[pextras->len++]=c; }
|
||||
|
||||
static void
|
||||
add_name (pextras, n)
|
||||
struct extra *pextras;
|
||||
char *n;
|
||||
add_name (struct extra *pextras, char *n)
|
||||
{
|
||||
int nlen;
|
||||
|
||||
|
@ -1239,9 +1180,7 @@ add_name (pextras, n)
|
|||
}
|
||||
|
||||
static void
|
||||
add_mangled_type (pextras, t)
|
||||
struct extra *pextras;
|
||||
struct type *t;
|
||||
add_mangled_type (struct extra *pextras, struct type *t)
|
||||
{
|
||||
enum type_code tcode;
|
||||
int tlen, tflags;
|
||||
|
@ -1371,10 +1310,7 @@ add_mangled_type (pextras, t)
|
|||
|
||||
#if 0
|
||||
void
|
||||
cfront_mangle_name (type, i, j)
|
||||
struct type *type;
|
||||
int i;
|
||||
int j;
|
||||
cfront_mangle_name (struct type *type, int i, int j)
|
||||
{
|
||||
struct fn_field *f;
|
||||
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. */
|
||||
|
||||
void
|
||||
check_stub_method (type, method_id, signature_id)
|
||||
struct type *type;
|
||||
int method_id;
|
||||
int signature_id;
|
||||
check_stub_method (struct type *type, int method_id, int signature_id)
|
||||
{
|
||||
struct fn_field *f;
|
||||
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;
|
||||
|
||||
void
|
||||
allocate_cplus_struct_type (type)
|
||||
struct type *type;
|
||||
allocate_cplus_struct_type (struct type *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). */
|
||||
|
||||
struct type *
|
||||
init_type (code, length, flags, name, objfile)
|
||||
enum type_code code;
|
||||
int length;
|
||||
int flags;
|
||||
char *name;
|
||||
struct objfile *objfile;
|
||||
init_type (enum type_code code, int length, int flags, char *name,
|
||||
struct objfile *objfile)
|
||||
{
|
||||
register struct type *type;
|
||||
|
||||
|
@ -1641,9 +1569,7 @@ init_type (code, length, flags, name, objfile)
|
|||
|
||||
|
||||
struct type *
|
||||
lookup_fundamental_type (objfile, typeid)
|
||||
struct objfile *objfile;
|
||||
int typeid;
|
||||
lookup_fundamental_type (struct objfile *objfile, int typeid)
|
||||
{
|
||||
register struct type **typep;
|
||||
register int nbytes;
|
||||
|
@ -1678,8 +1604,7 @@ lookup_fundamental_type (objfile, typeid)
|
|||
}
|
||||
|
||||
int
|
||||
can_dereference (t)
|
||||
struct type *t;
|
||||
can_dereference (struct type *t)
|
||||
{
|
||||
/* FIXME: Should we return true for references as well as pointers? */
|
||||
CHECK_TYPEDEF (t);
|
||||
|
@ -1690,8 +1615,7 @@ can_dereference (t)
|
|||
}
|
||||
|
||||
int
|
||||
is_integral_type (t)
|
||||
struct type *t;
|
||||
is_integral_type (struct type *t)
|
||||
{
|
||||
CHECK_TYPEDEF (t);
|
||||
return
|
||||
|
@ -1710,8 +1634,7 @@ is_integral_type (t)
|
|||
Return true if TYPE is such a Chill varying type. */
|
||||
|
||||
int
|
||||
chill_varying_type (type)
|
||||
struct type *type;
|
||||
chill_varying_type (struct type *type)
|
||||
{
|
||||
if (TYPE_CODE (type) != TYPE_CODE_STRUCT
|
||||
|| TYPE_NFIELDS (type) != 2
|
||||
|
@ -1727,9 +1650,7 @@ chill_varying_type (type)
|
|||
the ancestor relationship even if they're identical */
|
||||
|
||||
int
|
||||
is_ancestor (base, dclass)
|
||||
struct type *base;
|
||||
struct type *dclass;
|
||||
is_ancestor (struct type *base, struct type *dclass)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -1756,8 +1677,7 @@ is_ancestor (base, dclass)
|
|||
runtime models. Return 1 => Yes, 0 => No. */
|
||||
|
||||
int
|
||||
has_vtable (dclass)
|
||||
struct type *dclass;
|
||||
has_vtable (struct type *dclass)
|
||||
{
|
||||
/* In the HP ANSI C++ runtime model, a class has a vtable only if it
|
||||
has virtual functions or virtual bases. */
|
||||
|
@ -1799,8 +1719,7 @@ has_vtable (dclass)
|
|||
and may not work with other runtime models. */
|
||||
|
||||
struct type *
|
||||
primary_base_class (dclass)
|
||||
struct type *dclass;
|
||||
primary_base_class (struct type *dclass)
|
||||
{
|
||||
/* In HP ANSI C++'s runtime model, a "primary base class" of a class
|
||||
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. */
|
||||
|
||||
static void
|
||||
virtual_base_list_aux (dclass)
|
||||
struct type *dclass;
|
||||
virtual_base_list_aux (struct type *dclass)
|
||||
{
|
||||
struct vbase *tmp_vbase;
|
||||
register int i;
|
||||
|
@ -1891,8 +1809,7 @@ virtual_base_list_aux (dclass)
|
|||
and then copies the result into an array to save space. */
|
||||
|
||||
struct type **
|
||||
virtual_base_list (dclass)
|
||||
struct type *dclass;
|
||||
virtual_base_list (struct type *dclass)
|
||||
{
|
||||
register struct vbase *tmp_vbase;
|
||||
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. */
|
||||
|
||||
int
|
||||
virtual_base_list_length (dclass)
|
||||
struct type *dclass;
|
||||
virtual_base_list_length (struct type *dclass)
|
||||
{
|
||||
register int i;
|
||||
register struct vbase *tmp_vbase;
|
||||
|
@ -1948,8 +1864,7 @@ virtual_base_list_length (dclass)
|
|||
primary base, recursively). */
|
||||
|
||||
int
|
||||
virtual_base_list_length_skip_primaries (dclass)
|
||||
struct type *dclass;
|
||||
virtual_base_list_length_skip_primaries (struct type *dclass)
|
||||
{
|
||||
register int i;
|
||||
register struct vbase *tmp_vbase;
|
||||
|
@ -1978,9 +1893,7 @@ virtual_base_list_length_skip_primaries (dclass)
|
|||
indicates "not found" or a problem. */
|
||||
|
||||
int
|
||||
virtual_base_index (base, dclass)
|
||||
struct type *base;
|
||||
struct type *dclass;
|
||||
virtual_base_index (struct type *base, struct type *dclass)
|
||||
{
|
||||
register struct type *vbase;
|
||||
register int i;
|
||||
|
@ -2010,9 +1923,7 @@ virtual_base_index (base, dclass)
|
|||
found" or a problem. */
|
||||
|
||||
int
|
||||
virtual_base_index_skip_primaries (base, dclass)
|
||||
struct type *base;
|
||||
struct type *dclass;
|
||||
virtual_base_index_skip_primaries (struct type *base, struct type *dclass)
|
||||
{
|
||||
register struct type *vbase;
|
||||
register int i, j;
|
||||
|
@ -2044,8 +1955,7 @@ virtual_base_index_skip_primaries (base, dclass)
|
|||
* Position returned is 0-based. */
|
||||
|
||||
int
|
||||
class_index_in_primary_list (dclass)
|
||||
struct type *dclass;
|
||||
class_index_in_primary_list (struct type *dclass)
|
||||
{
|
||||
struct type *pbc; /* primary base class */
|
||||
|
||||
|
@ -2067,8 +1977,7 @@ class_index_in_primary_list (dclass)
|
|||
*/
|
||||
|
||||
int
|
||||
count_virtual_fns (dclass)
|
||||
struct type *dclass;
|
||||
count_virtual_fns (struct type *dclass)
|
||||
{
|
||||
int fn, oi; /* function and overloaded instance indices */
|
||||
int vfuncs; /* count to return */
|
||||
|
@ -2097,9 +2006,7 @@ count_virtual_fns (dclass)
|
|||
* 3 => A is worse than B */
|
||||
|
||||
int
|
||||
compare_badness (a, b)
|
||||
struct badness_vector *a;
|
||||
struct badness_vector *b;
|
||||
compare_badness (struct badness_vector *a, struct badness_vector *b)
|
||||
{
|
||||
int i;
|
||||
int tmp;
|
||||
|
@ -2142,11 +2049,7 @@ compare_badness (a, b)
|
|||
* Return a pointer to a badness vector. This has NARGS + 1 entries. */
|
||||
|
||||
struct badness_vector *
|
||||
rank_function (parms, nparms, args, nargs)
|
||||
struct type **parms;
|
||||
int nparms;
|
||||
struct type **args;
|
||||
int nargs;
|
||||
rank_function (struct type **parms, int nparms, struct type **args, int nargs)
|
||||
{
|
||||
int i;
|
||||
struct badness_vector *bv;
|
||||
|
@ -2187,9 +2090,7 @@ rank_function (parms, nparms, args, nargs)
|
|||
* Generally the "bad" conversions are all uniformly assigned a 100 */
|
||||
|
||||
int
|
||||
rank_one_type (parm, arg)
|
||||
struct type *parm;
|
||||
struct type *arg;
|
||||
rank_one_type (struct type *parm, struct type *arg)
|
||||
{
|
||||
/* Identical type pointers */
|
||||
/* 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 */
|
||||
|
||||
static void
|
||||
print_bit_vector (bits, nbits)
|
||||
B_TYPE *bits;
|
||||
int nbits;
|
||||
print_bit_vector (B_TYPE *bits, int nbits)
|
||||
{
|
||||
int bitno;
|
||||
|
||||
|
@ -2550,9 +2449,7 @@ print_bit_vector (bits, nbits)
|
|||
include it since we may get into a infinitely recursive situation. */
|
||||
|
||||
static void
|
||||
print_arg_types (args, spaces)
|
||||
struct type **args;
|
||||
int spaces;
|
||||
print_arg_types (struct type **args, int spaces)
|
||||
{
|
||||
if (args != NULL)
|
||||
{
|
||||
|
@ -2568,9 +2465,7 @@ print_arg_types (args, spaces)
|
|||
}
|
||||
|
||||
static void
|
||||
dump_fn_fieldlists (type, spaces)
|
||||
struct type *type;
|
||||
int spaces;
|
||||
dump_fn_fieldlists (struct type *type, int spaces)
|
||||
{
|
||||
int method_idx;
|
||||
int overload_idx;
|
||||
|
@ -2633,9 +2528,7 @@ dump_fn_fieldlists (type, spaces)
|
|||
}
|
||||
|
||||
static void
|
||||
print_cplus_stuff (type, spaces)
|
||||
struct type *type;
|
||||
int spaces;
|
||||
print_cplus_stuff (struct type *type, int spaces)
|
||||
{
|
||||
printfi_filtered (spaces, "n_baseclasses %d\n",
|
||||
TYPE_N_BASECLASSES (type));
|
||||
|
@ -2686,9 +2579,7 @@ print_cplus_stuff (type, spaces)
|
|||
static struct obstack dont_print_type_obstack;
|
||||
|
||||
void
|
||||
recursive_dump_type (type, spaces)
|
||||
struct type *type;
|
||||
int spaces;
|
||||
recursive_dump_type (struct type *type, int spaces)
|
||||
{
|
||||
int idx;
|
||||
|
||||
|
@ -2893,7 +2784,7 @@ recursive_dump_type (type, spaces)
|
|||
|
||||
static void build_gdbtypes (void);
|
||||
static void
|
||||
build_gdbtypes ()
|
||||
build_gdbtypes (void)
|
||||
{
|
||||
builtin_type_void =
|
||||
init_type (TYPE_CODE_VOID, 1,
|
||||
|
@ -3050,7 +2941,7 @@ build_gdbtypes ()
|
|||
|
||||
extern void _initialize_gdbtypes (void);
|
||||
void
|
||||
_initialize_gdbtypes ()
|
||||
_initialize_gdbtypes (void)
|
||||
{
|
||||
struct cmd_list_element *c;
|
||||
build_gdbtypes ();
|
||||
|
|
|
@ -633,7 +633,7 @@ _proc_free (struct proc *proc)
|
|||
|
||||
|
||||
struct inf *
|
||||
make_inf ()
|
||||
make_inf (void)
|
||||
{
|
||||
struct inf *inf = malloc (sizeof (struct inf));
|
||||
|
||||
|
@ -1994,7 +1994,7 @@ gnu_resume (int tid, int step, enum target_signal sig)
|
|||
|
||||
|
||||
static void
|
||||
gnu_kill_inferior ()
|
||||
gnu_kill_inferior (void)
|
||||
{
|
||||
struct proc *task = current_inferior->task;
|
||||
if (task)
|
||||
|
@ -2008,7 +2008,7 @@ gnu_kill_inferior ()
|
|||
|
||||
/* Clean up after the inferior dies. */
|
||||
static void
|
||||
gnu_mourn_inferior ()
|
||||
gnu_mourn_inferior (void)
|
||||
{
|
||||
inf_debug (current_inferior, "rip");
|
||||
inf_detach (current_inferior);
|
||||
|
@ -2021,7 +2021,7 @@ gnu_mourn_inferior ()
|
|||
|
||||
/* Set INFERIOR_PID to the first thread available in the child, if any. */
|
||||
static int
|
||||
inf_pick_first_thread ()
|
||||
inf_pick_first_thread (void)
|
||||
{
|
||||
if (current_inferior->task && current_inferior->threads)
|
||||
/* The first thread. */
|
||||
|
@ -2032,7 +2032,7 @@ inf_pick_first_thread ()
|
|||
}
|
||||
|
||||
static struct inf *
|
||||
cur_inf ()
|
||||
cur_inf (void)
|
||||
{
|
||||
if (!current_inferior)
|
||||
current_inferior = make_inf ();
|
||||
|
@ -2040,10 +2040,7 @@ cur_inf ()
|
|||
}
|
||||
|
||||
static void
|
||||
gnu_create_inferior (exec_file, allargs, env)
|
||||
char *exec_file;
|
||||
char *allargs;
|
||||
char **env;
|
||||
gnu_create_inferior (char *exec_file, char *allargs, char **env)
|
||||
{
|
||||
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"
|
||||
commands. */
|
||||
static int
|
||||
gnu_can_run ()
|
||||
gnu_can_run (void)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
@ -2110,9 +2107,7 @@ gnu_can_run ()
|
|||
/* Attach to process PID, then initialize for debugging it
|
||||
and wait for the trace-trap that results from attaching. */
|
||||
static void
|
||||
gnu_attach (args, from_tty)
|
||||
char *args;
|
||||
int from_tty;
|
||||
gnu_attach (char *args, int from_tty)
|
||||
{
|
||||
int pid;
|
||||
char *exec_file;
|
||||
|
@ -2174,9 +2169,7 @@ gnu_attach (args, from_tty)
|
|||
previously attached. It *might* work if the program was
|
||||
started via fork. */
|
||||
static void
|
||||
gnu_detach (args, from_tty)
|
||||
char *args;
|
||||
int from_tty;
|
||||
gnu_detach (char *args, int from_tty)
|
||||
{
|
||||
if (from_tty)
|
||||
{
|
||||
|
@ -2199,7 +2192,7 @@ gnu_detach (args, from_tty)
|
|||
|
||||
|
||||
static void
|
||||
gnu_terminal_init_inferior ()
|
||||
gnu_terminal_init_inferior (void)
|
||||
{
|
||||
assert (current_inferior);
|
||||
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
|
||||
debugged. */
|
||||
static void
|
||||
gnu_prepare_to_store ()
|
||||
gnu_prepare_to_store (void)
|
||||
{
|
||||
#ifdef CHILD_PREPARE_TO_STORE
|
||||
CHILD_PREPARE_TO_STORE ();
|
||||
|
@ -2219,21 +2212,19 @@ gnu_prepare_to_store ()
|
|||
}
|
||||
|
||||
static void
|
||||
gnu_open (arg, from_tty)
|
||||
char *arg;
|
||||
int from_tty;
|
||||
gnu_open (char *arg, int from_tty)
|
||||
{
|
||||
error ("Use the \"run\" command to start a Unix child process.");
|
||||
}
|
||||
|
||||
static void
|
||||
gnu_stop ()
|
||||
gnu_stop (void)
|
||||
{
|
||||
error ("to_stop target function not implemented");
|
||||
}
|
||||
|
||||
static char *
|
||||
gnu_pid_to_exec_file ()
|
||||
gnu_pid_to_exec_file (void)
|
||||
{
|
||||
error ("to_pid_to_exec_file target function not implemented");
|
||||
return NULL;
|
||||
|
@ -2252,11 +2243,7 @@ gnu_thread_alive (int tid)
|
|||
gdb's address space. Return 0 on failure; number of bytes read
|
||||
otherwise. */
|
||||
int
|
||||
gnu_read_inferior (task, addr, myaddr, length)
|
||||
task_t task;
|
||||
CORE_ADDR addr;
|
||||
char *myaddr;
|
||||
int length;
|
||||
gnu_read_inferior (task_t task, CORE_ADDR addr, char *myaddr, int length)
|
||||
{
|
||||
error_t err;
|
||||
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
|
||||
task's address space. */
|
||||
int
|
||||
gnu_write_inferior (task, addr, myaddr, length)
|
||||
task_t task;
|
||||
CORE_ADDR addr;
|
||||
char *myaddr;
|
||||
int length;
|
||||
gnu_write_inferior (task_t task, CORE_ADDR addr, char *myaddr, int length)
|
||||
{
|
||||
error_t err = 0;
|
||||
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. */
|
||||
static struct proc *
|
||||
cur_thread ()
|
||||
cur_thread (void)
|
||||
{
|
||||
struct inf *inf = cur_inf ();
|
||||
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. */
|
||||
static struct inf *
|
||||
active_inf ()
|
||||
active_inf (void)
|
||||
{
|
||||
struct inf *inf = cur_inf ();
|
||||
if (!inf->task)
|
||||
|
@ -3361,8 +3344,7 @@ _initialize_gnu_nat (void)
|
|||
end up looping in mysterious Bpt traps */
|
||||
|
||||
void
|
||||
flush_inferior_icache (pc, amount)
|
||||
CORE_ADDR pc;
|
||||
flush_inferior_icache (CORE_ADDR pc, int amount)
|
||||
{
|
||||
vm_machine_attribute_val_t flush = MATTR_VAL_ICACHE_FLUSH;
|
||||
error_t ret;
|
||||
|
|
|
@ -72,8 +72,7 @@ static void set_machine_hook (char *filename);
|
|||
void h8300_frame_find_saved_regs ();
|
||||
|
||||
CORE_ADDR
|
||||
h8300_skip_prologue (start_pc)
|
||||
CORE_ADDR start_pc;
|
||||
h8300_skip_prologue (CORE_ADDR start_pc)
|
||||
{
|
||||
short int w;
|
||||
int adjust = 0;
|
||||
|
@ -143,9 +142,7 @@ h8300_skip_prologue (start_pc)
|
|||
}
|
||||
|
||||
int
|
||||
gdb_print_insn_h8300 (memaddr, info)
|
||||
bfd_vma memaddr;
|
||||
disassemble_info *info;
|
||||
gdb_print_insn_h8300 (bfd_vma memaddr, disassemble_info *info)
|
||||
{
|
||||
if (h8300smode)
|
||||
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. */
|
||||
|
||||
CORE_ADDR
|
||||
h8300_frame_chain (thisframe)
|
||||
struct frame_info *thisframe;
|
||||
h8300_frame_chain (struct frame_info *thisframe)
|
||||
{
|
||||
if (PC_IN_CALL_DUMMY (thisframe->pc, thisframe->frame, thisframe->frame))
|
||||
{ /* initialize the from_pc now */
|
||||
|
@ -187,9 +183,8 @@ h8300_frame_chain (thisframe)
|
|||
fairly expensive. */
|
||||
|
||||
void
|
||||
h8300_frame_find_saved_regs (fi, fsr)
|
||||
struct frame_info *fi;
|
||||
struct frame_saved_regs *fsr;
|
||||
h8300_frame_find_saved_regs (struct frame_info *fi,
|
||||
struct frame_saved_regs *fsr)
|
||||
{
|
||||
register struct frame_saved_regs *cache_fsr;
|
||||
CORE_ADDR ip;
|
||||
|
@ -232,10 +227,7 @@ h8300_frame_find_saved_regs (fi, fsr)
|
|||
of the instruction. */
|
||||
|
||||
CORE_ADDR
|
||||
NEXT_PROLOGUE_INSN (addr, lim, pword1)
|
||||
CORE_ADDR addr;
|
||||
CORE_ADDR lim;
|
||||
INSN_WORD *pword1;
|
||||
NEXT_PROLOGUE_INSN (CORE_ADDR addr, CORE_ADDR lim, INSN_WORD *pword1)
|
||||
{
|
||||
char buf[2];
|
||||
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. */
|
||||
|
||||
static CORE_ADDR
|
||||
examine_prologue (ip, limit, after_prolog_fp, fsr, fi)
|
||||
register CORE_ADDR ip;
|
||||
register CORE_ADDR limit;
|
||||
CORE_ADDR after_prolog_fp;
|
||||
struct frame_saved_regs *fsr;
|
||||
struct frame_info *fi;
|
||||
examine_prologue (register CORE_ADDR ip, register CORE_ADDR limit,
|
||||
CORE_ADDR after_prolog_fp, struct frame_saved_regs *fsr,
|
||||
struct frame_info *fi)
|
||||
{
|
||||
register CORE_ADDR next_ip;
|
||||
int r;
|
||||
|
@ -416,9 +405,7 @@ examine_prologue (ip, limit, after_prolog_fp, fsr, fi)
|
|||
}
|
||||
|
||||
void
|
||||
h8300_init_extra_frame_info (fromleaf, fi)
|
||||
int fromleaf;
|
||||
struct frame_info *fi;
|
||||
h8300_init_extra_frame_info (int fromleaf, struct frame_info *fi)
|
||||
{
|
||||
fi->fsr = 0; /* Not yet allocated */
|
||||
fi->args_pointer = 0; /* Unknown */
|
||||
|
@ -436,8 +423,7 @@ h8300_init_extra_frame_info (fromleaf, fi)
|
|||
just use the register SRP_REGNUM itself. */
|
||||
|
||||
CORE_ADDR
|
||||
h8300_frame_saved_pc (frame)
|
||||
struct frame_info *frame;
|
||||
h8300_frame_saved_pc (struct frame_info *frame)
|
||||
{
|
||||
if (PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
|
||||
return generic_read_register_dummy (frame->pc, frame->frame, PC_REGNUM);
|
||||
|
@ -446,8 +432,7 @@ h8300_frame_saved_pc (frame)
|
|||
}
|
||||
|
||||
CORE_ADDR
|
||||
frame_locals_address (fi)
|
||||
struct frame_info *fi;
|
||||
frame_locals_address (struct frame_info *fi)
|
||||
{
|
||||
if (PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
|
||||
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. */
|
||||
|
||||
CORE_ADDR
|
||||
frame_args_address (fi)
|
||||
struct frame_info *fi;
|
||||
frame_args_address (struct frame_info *fi)
|
||||
{
|
||||
if (PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
|
||||
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. */
|
||||
|
||||
CORE_ADDR
|
||||
h8300_push_arguments (nargs, args, sp, struct_return, struct_addr)
|
||||
int nargs;
|
||||
struct value **args;
|
||||
CORE_ADDR sp;
|
||||
unsigned char struct_return;
|
||||
CORE_ADDR struct_addr;
|
||||
h8300_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
|
||||
unsigned char struct_return, CORE_ADDR struct_addr)
|
||||
{
|
||||
int stack_align, stack_alloc, stack_offset;
|
||||
int wordsize;
|
||||
|
@ -613,9 +593,7 @@ h8300_push_arguments (nargs, args, sp, struct_return, struct_addr)
|
|||
a JSR/BSR instruction. */
|
||||
|
||||
CORE_ADDR
|
||||
h8300_push_return_address (pc, sp)
|
||||
CORE_ADDR pc;
|
||||
CORE_ADDR sp;
|
||||
h8300_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
|
||||
{
|
||||
unsigned char buf[4];
|
||||
int wordsize;
|
||||
|
@ -637,7 +615,7 @@ h8300_push_return_address (pc, sp)
|
|||
call_function_by_hand after the dummy_frame is finished. */
|
||||
|
||||
void
|
||||
h8300_pop_frame ()
|
||||
h8300_pop_frame (void)
|
||||
{
|
||||
unsigned regnum;
|
||||
struct frame_saved_regs fsr;
|
||||
|
@ -673,10 +651,7 @@ h8300_pop_frame ()
|
|||
Copy that into VALBUF. Be sure to account for CPU type. */
|
||||
|
||||
void
|
||||
h8300_extract_return_value (type, regbuf, valbuf)
|
||||
struct type *type;
|
||||
char *regbuf;
|
||||
char *valbuf;
|
||||
h8300_extract_return_value (struct type *type, char *regbuf, char *valbuf)
|
||||
{
|
||||
int wordsize, len;
|
||||
|
||||
|
@ -716,9 +691,7 @@ h8300_extract_return_value (type, regbuf, valbuf)
|
|||
Primarily used by the RETURN command. */
|
||||
|
||||
void
|
||||
h8300_store_return_value (type, valbuf)
|
||||
struct type *type;
|
||||
char *valbuf;
|
||||
h8300_store_return_value (struct type *type, char *valbuf)
|
||||
{
|
||||
int wordsize, len, regval;
|
||||
|
||||
|
@ -756,7 +729,7 @@ h8300_store_return_value (type, valbuf)
|
|||
struct cmd_list_element *setmemorylist;
|
||||
|
||||
static void
|
||||
set_register_names ()
|
||||
set_register_names (void)
|
||||
{
|
||||
if (h8300hmode != 0)
|
||||
h8300_register_names = h8300h_register_names;
|
||||
|
@ -765,7 +738,7 @@ set_register_names ()
|
|||
}
|
||||
|
||||
static void
|
||||
h8300_command (args, from_tty)
|
||||
h8300_command (int args, int from_tty)
|
||||
{
|
||||
extern int h8300hmode;
|
||||
h8300hmode = 0;
|
||||
|
@ -774,7 +747,7 @@ h8300_command (args, from_tty)
|
|||
}
|
||||
|
||||
static void
|
||||
h8300h_command (args, from_tty)
|
||||
h8300h_command (int args, int from_tty)
|
||||
{
|
||||
extern int h8300hmode;
|
||||
h8300hmode = 1;
|
||||
|
@ -783,7 +756,7 @@ h8300h_command (args, from_tty)
|
|||
}
|
||||
|
||||
static void
|
||||
h8300s_command (args, from_tty)
|
||||
h8300s_command (int args, int from_tty)
|
||||
{
|
||||
extern int h8300smode;
|
||||
extern int h8300hmode;
|
||||
|
@ -794,9 +767,7 @@ h8300s_command (args, from_tty)
|
|||
|
||||
|
||||
static void
|
||||
set_machine (args, from_tty)
|
||||
char *args;
|
||||
int from_tty;
|
||||
set_machine (char *args, int from_tty)
|
||||
{
|
||||
printf_unfiltered ("\"set machine\" must be followed by h8300, h8300h");
|
||||
printf_unfiltered ("or h8300s");
|
||||
|
@ -810,8 +781,7 @@ set_machine (args, from_tty)
|
|||
to be 16 or 32 bits as appropriate for the machine. */
|
||||
|
||||
static void
|
||||
set_machine_hook (filename)
|
||||
char *filename;
|
||||
set_machine_hook (char *filename)
|
||||
{
|
||||
if (bfd_get_mach (exec_bfd) == bfd_mach_h8300s)
|
||||
{
|
||||
|
@ -832,7 +802,7 @@ set_machine_hook (filename)
|
|||
}
|
||||
|
||||
void
|
||||
_initialize_h8300m ()
|
||||
_initialize_h8300m (void)
|
||||
{
|
||||
add_prefix_cmd ("machine", no_class, set_machine,
|
||||
"set the machine type",
|
||||
|
@ -856,7 +826,7 @@ _initialize_h8300m ()
|
|||
|
||||
|
||||
void
|
||||
print_register_hook (regno)
|
||||
print_register_hook (int regno)
|
||||
{
|
||||
if (regno == 8)
|
||||
{
|
||||
|
@ -901,7 +871,7 @@ print_register_hook (regno)
|
|||
}
|
||||
|
||||
void
|
||||
_initialize_h8300_tdep ()
|
||||
_initialize_h8300_tdep (void)
|
||||
{
|
||||
tm_print_insn = gdb_print_insn_h8300;
|
||||
}
|
||||
|
|
|
@ -78,8 +78,7 @@ static int data_size = 2;
|
|||
int minimum_mode = 1;
|
||||
|
||||
CORE_ADDR
|
||||
h8500_skip_prologue (start_pc)
|
||||
CORE_ADDR start_pc;
|
||||
h8500_skip_prologue (CORE_ADDR start_pc)
|
||||
{
|
||||
short int w;
|
||||
|
||||
|
@ -100,8 +99,7 @@ h8500_skip_prologue (start_pc)
|
|||
}
|
||||
|
||||
CORE_ADDR
|
||||
h8500_addr_bits_remove (addr)
|
||||
CORE_ADDR addr;
|
||||
h8500_addr_bits_remove (CORE_ADDR addr)
|
||||
{
|
||||
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. */
|
||||
|
||||
CORE_ADDR
|
||||
h8500_frame_chain (thisframe)
|
||||
struct frame_info *thisframe;
|
||||
h8500_frame_chain (struct frame_info *thisframe)
|
||||
{
|
||||
if (!inside_entry_file (thisframe->pc))
|
||||
return (read_memory_integer (FRAME_FP (thisframe), PTR_SIZE));
|
||||
|
@ -129,10 +126,7 @@ h8500_frame_chain (thisframe)
|
|||
of the instruction. */
|
||||
|
||||
CORE_ADDR
|
||||
NEXT_PROLOGUE_INSN (addr, lim, pword1)
|
||||
CORE_ADDR addr;
|
||||
CORE_ADDR lim;
|
||||
char *pword1;
|
||||
NEXT_PROLOGUE_INSN (CORE_ADDR addr, CORE_ADDR lim, char *pword1)
|
||||
{
|
||||
if (addr < lim + 8)
|
||||
{
|
||||
|
@ -156,14 +150,13 @@ NEXT_PROLOGUE_INSN (addr, lim, pword1)
|
|||
/* Return the saved PC from this frame. */
|
||||
|
||||
CORE_ADDR
|
||||
frame_saved_pc (frame)
|
||||
struct frame_info *frame;
|
||||
frame_saved_pc (struct frame_info *frame)
|
||||
{
|
||||
return read_memory_integer (FRAME_FP (frame) + 2, PTR_SIZE);
|
||||
}
|
||||
|
||||
void
|
||||
h8500_pop_frame ()
|
||||
h8500_pop_frame (void)
|
||||
{
|
||||
unsigned regnum;
|
||||
struct frame_saved_regs fsr;
|
||||
|
@ -181,8 +174,7 @@ h8500_pop_frame ()
|
|||
}
|
||||
|
||||
void
|
||||
print_register_hook (regno)
|
||||
int regno;
|
||||
print_register_hook (int regno)
|
||||
{
|
||||
if (regno == CCR_REGNUM)
|
||||
{
|
||||
|
@ -228,8 +220,7 @@ print_register_hook (regno)
|
|||
}
|
||||
|
||||
int
|
||||
h8500_register_size (regno)
|
||||
int regno;
|
||||
h8500_register_size (int regno)
|
||||
{
|
||||
switch (regno)
|
||||
{
|
||||
|
@ -265,8 +256,7 @@ h8500_register_size (regno)
|
|||
}
|
||||
|
||||
struct type *
|
||||
h8500_register_virtual_type (regno)
|
||||
int regno;
|
||||
h8500_register_virtual_type (int 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. */
|
||||
|
||||
void
|
||||
frame_find_saved_regs (frame_info, frame_saved_regs)
|
||||
struct frame_info *frame_info;
|
||||
struct frame_saved_regs *frame_saved_regs;
|
||||
frame_find_saved_regs (struct frame_info *frame_info,
|
||||
struct frame_saved_regs *frame_saved_regs)
|
||||
{
|
||||
register int regnum;
|
||||
register int regmask;
|
||||
|
@ -387,7 +376,7 @@ lose:;
|
|||
}
|
||||
|
||||
CORE_ADDR
|
||||
saved_pc_after_call ()
|
||||
saved_pc_after_call (void)
|
||||
{
|
||||
int x;
|
||||
int a = read_register (SP_REGNUM);
|
||||
|
@ -404,8 +393,7 @@ saved_pc_after_call ()
|
|||
}
|
||||
|
||||
void
|
||||
h8500_set_pointer_size (newsize)
|
||||
int newsize;
|
||||
h8500_set_pointer_size (int newsize)
|
||||
{
|
||||
static int oldsize = 0;
|
||||
|
||||
|
@ -426,7 +414,7 @@ h8500_set_pointer_size (newsize)
|
|||
}
|
||||
|
||||
static void
|
||||
big_command ()
|
||||
big_command (void)
|
||||
{
|
||||
h8500_set_pointer_size (32);
|
||||
code_size = 4;
|
||||
|
@ -434,7 +422,7 @@ big_command ()
|
|||
}
|
||||
|
||||
static void
|
||||
medium_command ()
|
||||
medium_command (void)
|
||||
{
|
||||
h8500_set_pointer_size (32);
|
||||
code_size = 4;
|
||||
|
@ -442,7 +430,7 @@ medium_command ()
|
|||
}
|
||||
|
||||
static void
|
||||
compact_command ()
|
||||
compact_command (void)
|
||||
{
|
||||
h8500_set_pointer_size (32);
|
||||
code_size = 2;
|
||||
|
@ -450,7 +438,7 @@ compact_command ()
|
|||
}
|
||||
|
||||
static void
|
||||
small_command ()
|
||||
small_command (void)
|
||||
{
|
||||
h8500_set_pointer_size (16);
|
||||
code_size = 2;
|
||||
|
@ -460,9 +448,7 @@ small_command ()
|
|||
static struct cmd_list_element *setmemorylist;
|
||||
|
||||
static void
|
||||
set_memory (args, from_tty)
|
||||
char *args;
|
||||
int from_tty;
|
||||
set_memory (char *args, int from_tty)
|
||||
{
|
||||
printf_unfiltered ("\"set memory\" must be followed by the name of a memory subcommand.\n");
|
||||
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] */
|
||||
|
||||
int
|
||||
h8500_is_trapped_internalvar (name)
|
||||
char *name;
|
||||
h8500_is_trapped_internalvar (char *name)
|
||||
{
|
||||
if (name[0] != 'p')
|
||||
return 0;
|
||||
|
@ -490,8 +475,7 @@ h8500_is_trapped_internalvar (name)
|
|||
}
|
||||
|
||||
value_ptr
|
||||
h8500_value_of_trapped_internalvar (var)
|
||||
struct internalvar *var;
|
||||
h8500_value_of_trapped_internalvar (struct internalvar *var)
|
||||
{
|
||||
LONGEST regval;
|
||||
unsigned char regbuf[4];
|
||||
|
@ -537,10 +521,8 @@ h8500_value_of_trapped_internalvar (var)
|
|||
}
|
||||
|
||||
void
|
||||
h8500_set_trapped_internalvar (var, newval, bitpos, bitsize, offset)
|
||||
struct internalvar *var;
|
||||
int offset, bitpos, bitsize;
|
||||
value_ptr newval;
|
||||
h8500_set_trapped_internalvar (struct internalvar *var, value_ptr newval,
|
||||
int bitpos, int bitsize, int offset)
|
||||
{
|
||||
char *page_regnum, *regnum;
|
||||
char expression[100];
|
||||
|
@ -590,48 +572,43 @@ h8500_set_trapped_internalvar (var, newval, bitpos, bitsize, offset)
|
|||
}
|
||||
|
||||
CORE_ADDR
|
||||
h8500_read_sp ()
|
||||
h8500_read_sp (void)
|
||||
{
|
||||
return read_register (PR7_REGNUM);
|
||||
}
|
||||
|
||||
void
|
||||
h8500_write_sp (v)
|
||||
CORE_ADDR v;
|
||||
h8500_write_sp (CORE_ADDR v)
|
||||
{
|
||||
write_register (PR7_REGNUM, v);
|
||||
}
|
||||
|
||||
CORE_ADDR
|
||||
h8500_read_pc (pid)
|
||||
int pid;
|
||||
h8500_read_pc (int pid)
|
||||
{
|
||||
return read_register (PC_REGNUM);
|
||||
}
|
||||
|
||||
void
|
||||
h8500_write_pc (v, pid)
|
||||
CORE_ADDR v;
|
||||
int pid;
|
||||
h8500_write_pc (CORE_ADDR v, int pid)
|
||||
{
|
||||
write_register (PC_REGNUM, v);
|
||||
}
|
||||
|
||||
CORE_ADDR
|
||||
h8500_read_fp ()
|
||||
h8500_read_fp (void)
|
||||
{
|
||||
return read_register (PR6_REGNUM);
|
||||
}
|
||||
|
||||
void
|
||||
h8500_write_fp (v)
|
||||
CORE_ADDR v;
|
||||
h8500_write_fp (CORE_ADDR v)
|
||||
{
|
||||
write_register (PR6_REGNUM, v);
|
||||
}
|
||||
|
||||
void
|
||||
_initialize_h8500_tdep ()
|
||||
_initialize_h8500_tdep (void)
|
||||
{
|
||||
tm_print_insn = print_insn_h8500;
|
||||
|
||||
|
|
|
@ -72,8 +72,7 @@ static struct partial_symtab *hpread_end_psymtab
|
|||
|
||||
/* check for the existance of a file, given its full pathname */
|
||||
int
|
||||
file_exists (filename)
|
||||
char *filename;
|
||||
file_exists (char *filename)
|
||||
{
|
||||
if (filename)
|
||||
return (access (filename, F_OK) == 0);
|
||||
|
@ -84,8 +83,7 @@ file_exists (filename)
|
|||
/* Translate from the "hp_language" enumeration in hp-symtab.h
|
||||
used in the debug info to gdb's generic enumeration in defs.h. */
|
||||
static enum language
|
||||
trans_lang (in_lang)
|
||||
enum hp_language in_lang;
|
||||
trans_lang (enum hp_language in_lang)
|
||||
{
|
||||
if (in_lang == HP_LANGUAGE_C)
|
||||
return language_c;
|
||||
|
@ -112,8 +110,7 @@ static char main_string[] = "main";
|
|||
|
||||
Return value: 1 if ok, 0 if not */
|
||||
int
|
||||
hpread_call_pxdb (file_name)
|
||||
char *file_name;
|
||||
hpread_call_pxdb (char *file_name)
|
||||
{
|
||||
char *p;
|
||||
int status;
|
||||
|
@ -146,8 +143,7 @@ hpread_call_pxdb (file_name)
|
|||
and the file therefore needs to be re-loaded. Otherwise
|
||||
return 0. */
|
||||
int
|
||||
hpread_pxdb_needed (sym_bfd)
|
||||
bfd *sym_bfd;
|
||||
hpread_pxdb_needed (bfd *sym_bfd)
|
||||
{
|
||||
asection *pinfo_section, *debug_section, *header_section;
|
||||
unsigned int do_pxdb;
|
||||
|
@ -277,8 +273,7 @@ hpread_pxdb_needed (sym_bfd)
|
|||
If so, call pxdb. */
|
||||
|
||||
void
|
||||
do_pxdb (sym_bfd)
|
||||
bfd *sym_bfd;
|
||||
do_pxdb (bfd *sym_bfd)
|
||||
{
|
||||
/* The following code is HP-specific. The "right" way of
|
||||
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 */
|
||||
static void
|
||||
init_pst_syms ()
|
||||
init_pst_syms (void)
|
||||
{
|
||||
pst_syms_count = 0;
|
||||
pst_syms_size = 20;
|
||||
|
@ -382,7 +377,7 @@ init_pst_syms ()
|
|||
|
||||
/* Clean up psymtab symbol index stuff */
|
||||
static void
|
||||
clear_pst_syms ()
|
||||
clear_pst_syms (void)
|
||||
{
|
||||
pst_syms_count = 0;
|
||||
pst_syms_size = 0;
|
||||
|
@ -392,9 +387,7 @@ clear_pst_syms ()
|
|||
|
||||
/* Add information about latest psymtab to symbol index table */
|
||||
static void
|
||||
record_pst_syms (start_sym, end_sym)
|
||||
int start_sym;
|
||||
int end_sym;
|
||||
record_pst_syms (int start_sym, int end_sym)
|
||||
{
|
||||
if (++pst_syms_count > pst_syms_size)
|
||||
{
|
||||
|
@ -416,8 +409,7 @@ record_pst_syms (start_sym, end_sym)
|
|||
|
||||
Return 0 => not found */
|
||||
static int
|
||||
find_next_pst_start (index)
|
||||
int index;
|
||||
find_next_pst_start (int index)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -442,11 +434,8 @@ find_next_pst_start (index)
|
|||
|
||||
Return 0 => not found */
|
||||
static int
|
||||
find_next_file_isym (index, qFD, curr_fd, pxdb_header_p)
|
||||
int index;
|
||||
quick_file_entry *qFD;
|
||||
int curr_fd;
|
||||
PXDB_header_ptr pxdb_header_p;
|
||||
find_next_file_isym (int index, quick_file_entry *qFD, int curr_fd,
|
||||
PXDB_header_ptr pxdb_header_p)
|
||||
{
|
||||
while (VALID_CURR_FILE)
|
||||
{
|
||||
|
@ -464,11 +453,8 @@ find_next_file_isym (index, qFD, curr_fd, pxdb_header_p)
|
|||
|
||||
Return 0 => not found */
|
||||
static int
|
||||
find_next_proc_isym (index, qPD, curr_pd, pxdb_header_p)
|
||||
int index;
|
||||
quick_procedure_entry *qPD;
|
||||
int curr_pd;
|
||||
PXDB_header_ptr pxdb_header_p;
|
||||
find_next_proc_isym (int index, quick_procedure_entry *qPD, int curr_pd,
|
||||
PXDB_header_ptr pxdb_header_p)
|
||||
{
|
||||
while (VALID_CURR_PROC)
|
||||
{
|
||||
|
@ -486,11 +472,8 @@ find_next_proc_isym (index, qPD, curr_pd, pxdb_header_p)
|
|||
|
||||
Return 0 => not found */
|
||||
static int
|
||||
find_next_module_isym (index, qMD, curr_md, pxdb_header_p)
|
||||
int index;
|
||||
quick_module_entry *qMD;
|
||||
int curr_md;
|
||||
PXDB_header_ptr pxdb_header_p;
|
||||
find_next_module_isym (int index, quick_module_entry *qMD, int curr_md,
|
||||
PXDB_header_ptr pxdb_header_p)
|
||||
{
|
||||
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.
|
||||
Return value: 1 if ok, 0 if not */
|
||||
int
|
||||
hpread_get_header (objfile, pxdb_header_p)
|
||||
struct objfile *objfile;
|
||||
PXDB_header_ptr pxdb_header_p;
|
||||
hpread_get_header (struct objfile *objfile, PXDB_header_ptr pxdb_header_p)
|
||||
{
|
||||
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
|
||||
here. */
|
||||
void
|
||||
hpread_symfile_init (objfile)
|
||||
struct objfile *objfile;
|
||||
hpread_symfile_init (struct objfile *objfile)
|
||||
{
|
||||
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). */
|
||||
|
||||
void
|
||||
hpread_build_psymtabs (objfile, mainline)
|
||||
struct objfile *objfile;
|
||||
int mainline;
|
||||
hpread_build_psymtabs (struct objfile *objfile, int mainline)
|
||||
{
|
||||
|
||||
#ifdef DUMPING
|
||||
|
@ -2091,8 +2069,7 @@ hpread_build_psymtabs (objfile, mainline)
|
|||
objfile struct from the global list of known objfiles. */
|
||||
|
||||
void
|
||||
hpread_symfile_finish (objfile)
|
||||
struct objfile *objfile;
|
||||
hpread_symfile_finish (struct objfile *objfile)
|
||||
{
|
||||
if (objfile->sym_private != NULL)
|
||||
{
|
||||
|
@ -2106,27 +2083,21 @@ hpread_symfile_finish (objfile)
|
|||
/* Various small functions to get entries in the debug symbol sections. */
|
||||
|
||||
union dnttentry *
|
||||
hpread_get_lntt (index, objfile)
|
||||
int index;
|
||||
struct objfile *objfile;
|
||||
hpread_get_lntt (int index, struct objfile *objfile)
|
||||
{
|
||||
return (union dnttentry *)
|
||||
&(LNTT (objfile)[(index * sizeof (struct dntt_type_block))]);
|
||||
}
|
||||
|
||||
static union dnttentry *
|
||||
hpread_get_gntt (index, objfile)
|
||||
int index;
|
||||
struct objfile *objfile;
|
||||
hpread_get_gntt (int index, struct objfile *objfile)
|
||||
{
|
||||
return (union dnttentry *)
|
||||
&(GNTT (objfile)[(index * sizeof (struct dntt_type_block))]);
|
||||
}
|
||||
|
||||
union sltentry *
|
||||
hpread_get_slt (index, objfile)
|
||||
int index;
|
||||
struct objfile *objfile;
|
||||
hpread_get_slt (int index, struct objfile *objfile)
|
||||
{
|
||||
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. */
|
||||
|
||||
static unsigned long
|
||||
hpread_get_textlow (global, index, objfile, symcount)
|
||||
int global;
|
||||
int index;
|
||||
struct objfile *objfile;
|
||||
int symcount;
|
||||
hpread_get_textlow (int global, int index, struct objfile *objfile,
|
||||
int symcount)
|
||||
{
|
||||
union dnttentry *dn_bufp;
|
||||
struct minimal_symbol *msymbol;
|
||||
|
@ -2193,14 +2161,10 @@ hpread_get_textlow (global, index, objfile, symcount)
|
|||
(normal). */
|
||||
|
||||
static struct partial_symtab *
|
||||
hpread_start_psymtab (objfile,
|
||||
filename, textlow, ldsymoff, global_syms, static_syms)
|
||||
struct objfile *objfile;
|
||||
char *filename;
|
||||
CORE_ADDR textlow;
|
||||
int ldsymoff;
|
||||
struct partial_symbol **global_syms;
|
||||
struct partial_symbol **static_syms;
|
||||
hpread_start_psymtab (struct objfile *objfile, char *filename,
|
||||
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));
|
||||
extern void hpread_psymtab_to_symtab ();
|
||||
|
@ -2228,15 +2192,11 @@ hpread_start_psymtab (objfile,
|
|||
FIXME: List variables and peculiarities of same. */
|
||||
|
||||
static struct partial_symtab *
|
||||
hpread_end_psymtab (pst, include_list, num_includes, capping_symbol_offset,
|
||||
capping_text, dependency_list, number_dependencies)
|
||||
struct partial_symtab *pst;
|
||||
char **include_list;
|
||||
int num_includes;
|
||||
int capping_symbol_offset;
|
||||
CORE_ADDR capping_text;
|
||||
struct partial_symtab **dependency_list;
|
||||
int number_dependencies;
|
||||
hpread_end_psymtab (struct partial_symtab *pst, char **include_list,
|
||||
int num_includes, int capping_symbol_offset,
|
||||
CORE_ADDR capping_text,
|
||||
struct partial_symtab **dependency_list,
|
||||
int number_dependencies)
|
||||
{
|
||||
int i;
|
||||
struct objfile *objfile = pst->objfile;
|
||||
|
|
|
@ -169,9 +169,7 @@ static struct type *fixup_method = NULL;
|
|||
/* Get the nesting depth for the source line identified by INDEX. */
|
||||
|
||||
static unsigned long
|
||||
hpread_get_scope_start (index, objfile)
|
||||
sltpointer index;
|
||||
struct objfile *objfile;
|
||||
hpread_get_scope_start (sltpointer index, struct objfile *objfile)
|
||||
{
|
||||
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. */
|
||||
|
||||
static unsigned long
|
||||
hpread_get_line (index, objfile)
|
||||
sltpointer index;
|
||||
struct objfile *objfile;
|
||||
hpread_get_line (sltpointer index, struct objfile *objfile)
|
||||
{
|
||||
union sltentry *sl_bufp;
|
||||
|
||||
|
@ -195,9 +191,7 @@ hpread_get_line (index, objfile)
|
|||
/* Find the code address associated with a given sltpointer */
|
||||
|
||||
static CORE_ADDR
|
||||
hpread_get_location (index, objfile)
|
||||
sltpointer index;
|
||||
struct objfile *objfile;
|
||||
hpread_get_location (sltpointer index, struct objfile *objfile)
|
||||
{
|
||||
union sltentry *sl_bufp;
|
||||
int i;
|
||||
|
@ -236,8 +230,7 @@ hpread_get_location (index, objfile)
|
|||
*/
|
||||
|
||||
int
|
||||
hpread_has_name (kind)
|
||||
enum dntt_entry_type kind;
|
||||
hpread_has_name (enum dntt_entry_type kind)
|
||||
{
|
||||
switch (kind)
|
||||
{
|
||||
|
@ -311,8 +304,7 @@ hpread_has_name (kind)
|
|||
table. */
|
||||
|
||||
static void
|
||||
hpread_psymtab_to_symtab_1 (pst)
|
||||
struct partial_symtab *pst;
|
||||
hpread_psymtab_to_symtab_1 (struct partial_symtab *pst)
|
||||
{
|
||||
struct cleanup *old_chain;
|
||||
int i;
|
||||
|
@ -370,8 +362,7 @@ hpread_psymtab_to_symtab_1 (pst)
|
|||
Be verbose about it if the user wants that. */
|
||||
|
||||
void
|
||||
hpread_psymtab_to_symtab (pst)
|
||||
struct partial_symtab *pst;
|
||||
hpread_psymtab_to_symtab (struct partial_symtab *pst)
|
||||
{
|
||||
/* Get out quick if given junk. */
|
||||
if (!pst)
|
||||
|
@ -427,15 +418,9 @@ hpread_psymtab_to_symtab (pst)
|
|||
SECTION_OFFSETS are the relocation offsets which get added to each symbol. */
|
||||
|
||||
static struct symtab *
|
||||
hpread_expand_symtab (objfile, sym_offset, sym_size, text_offset, text_size,
|
||||
section_offsets, filename)
|
||||
struct objfile *objfile;
|
||||
int sym_offset;
|
||||
int sym_size;
|
||||
CORE_ADDR text_offset;
|
||||
int text_size;
|
||||
struct section_offsets *section_offsets;
|
||||
char *filename;
|
||||
hpread_expand_symtab (struct objfile *objfile, int sym_offset, int sym_size,
|
||||
CORE_ADDR text_offset, int text_size,
|
||||
struct section_offsets *section_offsets, char *filename)
|
||||
{
|
||||
char *namestring;
|
||||
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. */
|
||||
|
||||
static int
|
||||
hpread_type_translate (typep)
|
||||
dnttpointer typep;
|
||||
hpread_type_translate (dnttpointer typep)
|
||||
{
|
||||
if (!typep.dntti.immediate)
|
||||
{
|
||||
|
@ -632,9 +616,7 @@ hpread_type_translate (typep)
|
|||
*/
|
||||
|
||||
static struct type **
|
||||
hpread_lookup_type (hp_type, objfile)
|
||||
dnttpointer hp_type;
|
||||
struct objfile *objfile;
|
||||
hpread_lookup_type (dnttpointer hp_type, struct objfile *objfile)
|
||||
{
|
||||
unsigned old_len;
|
||||
int index = hp_type.dnttp.index;
|
||||
|
@ -720,9 +702,7 @@ hpread_lookup_type (hp_type, objfile)
|
|||
have it lying around. */
|
||||
|
||||
static struct type *
|
||||
hpread_alloc_type (hp_type, objfile)
|
||||
dnttpointer hp_type;
|
||||
struct objfile *objfile;
|
||||
hpread_alloc_type (dnttpointer hp_type, struct objfile *objfile)
|
||||
{
|
||||
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. */
|
||||
|
||||
static struct type *
|
||||
hpread_read_enum_type (hp_type, dn_bufp, objfile)
|
||||
dnttpointer hp_type;
|
||||
union dnttentry *dn_bufp;
|
||||
struct objfile *objfile;
|
||||
hpread_read_enum_type (dnttpointer hp_type, union dnttentry *dn_bufp,
|
||||
struct objfile *objfile)
|
||||
{
|
||||
struct type *type;
|
||||
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. */
|
||||
|
||||
static struct type *
|
||||
hpread_read_function_type (hp_type, dn_bufp, objfile, newblock)
|
||||
dnttpointer hp_type;
|
||||
union dnttentry *dn_bufp;
|
||||
struct objfile *objfile;
|
||||
int newblock;
|
||||
hpread_read_function_type (dnttpointer hp_type, union dnttentry *dn_bufp,
|
||||
struct objfile *objfile, int newblock)
|
||||
{
|
||||
struct type *type, *type1;
|
||||
struct pending *syms;
|
||||
|
@ -1025,11 +1000,8 @@ finish:
|
|||
* volatile, please leave it this way.
|
||||
*/
|
||||
static struct type *
|
||||
hpread_read_doc_function_type (hp_type, dn_bufp, objfile, newblock)
|
||||
dnttpointer hp_type;
|
||||
union dnttentry *dn_bufp;
|
||||
struct objfile *objfile;
|
||||
int newblock;
|
||||
hpread_read_doc_function_type (dnttpointer hp_type, union dnttentry *dn_bufp,
|
||||
struct objfile *objfile, int newblock)
|
||||
{
|
||||
struct type *type, *type1;
|
||||
struct pending *syms;
|
||||
|
@ -1218,10 +1190,8 @@ static struct type *current_template = NULL;
|
|||
*/
|
||||
|
||||
static struct type *
|
||||
hpread_read_struct_type (hp_type, dn_bufp, objfile)
|
||||
dnttpointer hp_type;
|
||||
union dnttentry *dn_bufp;
|
||||
struct objfile *objfile;
|
||||
hpread_read_struct_type (dnttpointer hp_type, union dnttentry *dn_bufp,
|
||||
struct objfile *objfile)
|
||||
{
|
||||
/* The data members get linked together into a list of struct nextfield's */
|
||||
struct nextfield
|
||||
|
@ -2059,10 +2029,8 @@ hpread_read_struct_type (hp_type, dn_bufp, objfile)
|
|||
Void return */
|
||||
|
||||
static void
|
||||
fix_static_member_physnames (type, class_name, objfile)
|
||||
struct type *type;
|
||||
char *class_name;
|
||||
struct objfile *objfile;
|
||||
fix_static_member_physnames (struct type *type, char *class_name,
|
||||
struct objfile *objfile)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -2092,10 +2060,8 @@ fix_static_member_physnames (type, class_name, objfile)
|
|||
* Void return. */
|
||||
|
||||
static void
|
||||
fixup_class_method_type (class, method, objfile)
|
||||
struct type *class;
|
||||
struct type *method;
|
||||
struct objfile *objfile;
|
||||
fixup_class_method_type (struct type *class, struct type *method,
|
||||
struct objfile *objfile)
|
||||
{
|
||||
int i, j, k;
|
||||
|
||||
|
@ -2156,9 +2122,7 @@ finish:
|
|||
* This is called from hpread_type_lookup().
|
||||
*/
|
||||
static struct type *
|
||||
hpread_get_nth_template_arg (objfile, n)
|
||||
struct objfile *objfile;
|
||||
int n;
|
||||
hpread_get_nth_template_arg (struct objfile *objfile, int n)
|
||||
{
|
||||
if (current_template != NULL)
|
||||
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. */
|
||||
|
||||
static struct type *
|
||||
hpread_read_templ_arg_type (hp_type, dn_bufp, objfile, name)
|
||||
dnttpointer hp_type;
|
||||
union dnttentry *dn_bufp;
|
||||
struct objfile *objfile;
|
||||
char *name;
|
||||
hpread_read_templ_arg_type (dnttpointer hp_type, union dnttentry *dn_bufp,
|
||||
struct objfile *objfile, char *name)
|
||||
{
|
||||
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. */
|
||||
|
||||
static struct type *
|
||||
hpread_read_set_type (hp_type, dn_bufp, objfile)
|
||||
dnttpointer hp_type;
|
||||
union dnttentry *dn_bufp;
|
||||
struct objfile *objfile;
|
||||
hpread_read_set_type (dnttpointer hp_type, union dnttentry *dn_bufp,
|
||||
struct objfile *objfile)
|
||||
{
|
||||
struct type *type;
|
||||
|
||||
|
@ -2217,10 +2176,8 @@ hpread_read_set_type (hp_type, dn_bufp, objfile)
|
|||
/* Read in and internalize an array debug symbol. */
|
||||
|
||||
static struct type *
|
||||
hpread_read_array_type (hp_type, dn_bufp, objfile)
|
||||
dnttpointer hp_type;
|
||||
union dnttentry *dn_bufp;
|
||||
struct objfile *objfile;
|
||||
hpread_read_array_type (dnttpointer hp_type, union dnttentry *dn_bufp,
|
||||
struct objfile *objfile)
|
||||
{
|
||||
struct type *type;
|
||||
|
||||
|
@ -2277,10 +2234,8 @@ hpread_read_array_type (hp_type, dn_bufp, objfile)
|
|||
|
||||
/* Read in and internalize a subrange debug symbol. */
|
||||
static struct type *
|
||||
hpread_read_subrange_type (hp_type, dn_bufp, objfile)
|
||||
dnttpointer hp_type;
|
||||
union dnttentry *dn_bufp;
|
||||
struct objfile *objfile;
|
||||
hpread_read_subrange_type (dnttpointer hp_type, union dnttentry *dn_bufp,
|
||||
struct objfile *objfile)
|
||||
{
|
||||
struct type *type;
|
||||
|
||||
|
@ -2340,9 +2295,7 @@ hpread_read_subrange_type (hp_type, dn_bufp, objfile)
|
|||
* a struct/class type, etc).
|
||||
*/
|
||||
static struct type *
|
||||
hpread_type_lookup (hp_type, objfile)
|
||||
dnttpointer hp_type;
|
||||
struct objfile *objfile;
|
||||
hpread_type_lookup (dnttpointer hp_type, struct objfile *objfile)
|
||||
{
|
||||
union dnttentry *dn_bufp;
|
||||
struct type *tmp_type;
|
||||
|
@ -2701,11 +2654,9 @@ hpread_type_lookup (hp_type, objfile)
|
|||
}
|
||||
|
||||
static sltpointer
|
||||
hpread_record_lines (subfile, s_idx, e_idx, objfile, offset)
|
||||
struct subfile *subfile;
|
||||
sltpointer s_idx, e_idx;
|
||||
struct objfile *objfile;
|
||||
CORE_ADDR offset;
|
||||
hpread_record_lines (struct subfile *subfile, sltpointer s_idx,
|
||||
sltpointer e_idx, struct objfile *objfile,
|
||||
CORE_ADDR offset)
|
||||
{
|
||||
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.
|
||||
*/
|
||||
char *
|
||||
class_of (functype)
|
||||
struct type *functype;
|
||||
class_of (struct type *functype)
|
||||
{
|
||||
struct type *first_param_type;
|
||||
char *first_param_name;
|
||||
|
@ -2794,19 +2744,11 @@ class_of (functype)
|
|||
*/
|
||||
|
||||
static void
|
||||
hpread_process_one_debug_symbol (dn_bufp, name, section_offsets, objfile,
|
||||
text_offset, text_size, filename,
|
||||
index, at_module_boundary_p
|
||||
)
|
||||
union dnttentry *dn_bufp;
|
||||
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;
|
||||
hpread_process_one_debug_symbol (union dnttentry *dn_bufp, 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;
|
||||
int type;
|
||||
|
@ -3916,10 +3858,8 @@ hpread_process_one_debug_symbol (dn_bufp, name, section_offsets, objfile,
|
|||
|
||||
|
||||
static int
|
||||
hpread_get_scope_depth (dn_bufp, objfile, report_nested)
|
||||
union dnttentry *dn_bufp;
|
||||
struct objfile *objfile;
|
||||
int report_nested;
|
||||
hpread_get_scope_depth (union dnttentry *dn_bufp, struct objfile *objfile,
|
||||
int report_nested)
|
||||
{
|
||||
register int index;
|
||||
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. */
|
||||
|
||||
static void
|
||||
hpread_adjust_bitoffsets (type, bits)
|
||||
struct type *type;
|
||||
int bits;
|
||||
hpread_adjust_bitoffsets (struct type *type, int bits)
|
||||
{
|
||||
register int i;
|
||||
|
||||
|
@ -4000,11 +3938,9 @@ hpread_adjust_bitoffsets (type, bits)
|
|||
is a dnttpointer for the new field after all the skipped ones */
|
||||
|
||||
static dnttpointer
|
||||
hpread_get_next_skip_over_anon_unions (skip_fields, field, fieldp, objfile)
|
||||
int skip_fields;
|
||||
dnttpointer field;
|
||||
union dnttentry **fieldp;
|
||||
struct objfile *objfile;
|
||||
hpread_get_next_skip_over_anon_unions (int skip_fields, dnttpointer field,
|
||||
union dnttentry **fieldp,
|
||||
struct objfile *objfile)
|
||||
{
|
||||
struct type *anon_type;
|
||||
register int i;
|
||||
|
|
|
@ -60,7 +60,7 @@ static struct hpnlist nl[] =
|
|||
|
||||
/* read the value of the u area from the hp-ux kernel */
|
||||
void
|
||||
_initialize_hp300ux_nat ()
|
||||
_initialize_hp300ux_nat (void)
|
||||
{
|
||||
#ifndef HPUX_VERSION_5
|
||||
nlist ("/hp-ux", nl);
|
||||
|
@ -77,9 +77,7 @@ _initialize_hp300ux_nat ()
|
|||
- kernel_u_addr)
|
||||
|
||||
static void
|
||||
fetch_inferior_register (regno, regaddr)
|
||||
register int regno;
|
||||
register unsigned int regaddr;
|
||||
fetch_inferior_register (register int regno, register unsigned int regaddr)
|
||||
{
|
||||
#ifndef HPUX_VERSION_5
|
||||
if (regno == PS_REGNUM)
|
||||
|
@ -115,10 +113,7 @@ fetch_inferior_register (regno, regaddr)
|
|||
}
|
||||
|
||||
static void
|
||||
store_inferior_register_1 (regno, regaddr, val)
|
||||
int regno;
|
||||
unsigned int regaddr;
|
||||
int val;
|
||||
store_inferior_register_1 (int regno, unsigned int regaddr, int val)
|
||||
{
|
||||
errno = 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
|
||||
store_inferior_register (regno, regaddr)
|
||||
register int regno;
|
||||
register unsigned int regaddr;
|
||||
store_inferior_register (register int regno, register unsigned int regaddr)
|
||||
{
|
||||
#ifndef HPUX_VERSION_5
|
||||
if (regno == PS_REGNUM)
|
||||
|
@ -173,8 +166,7 @@ store_inferior_register (regno, regaddr)
|
|||
}
|
||||
|
||||
void
|
||||
fetch_inferior_registers (regno)
|
||||
int regno;
|
||||
fetch_inferior_registers (int regno)
|
||||
{
|
||||
struct user u;
|
||||
register unsigned int ar0_offset;
|
||||
|
@ -199,8 +191,7 @@ fetch_inferior_registers (regno)
|
|||
Otherwise, REGNO specifies which register (so we can save time). */
|
||||
|
||||
void
|
||||
store_inferior_registers (regno)
|
||||
register int regno;
|
||||
store_inferior_registers (register int regno)
|
||||
{
|
||||
struct user u;
|
||||
register unsigned int ar0_offset;
|
||||
|
@ -226,7 +217,7 @@ store_inferior_registers (regno)
|
|||
}
|
||||
|
||||
int
|
||||
getpagesize ()
|
||||
getpagesize (void)
|
||||
{
|
||||
return 4096;
|
||||
}
|
||||
|
|
246
gdb/hppa-tdep.c
246
gdb/hppa-tdep.c
|
@ -150,9 +150,7 @@ extern value_ptr find_function_in_inferior (char *);
|
|||
|
||||
/* Should call_function allocate stack space for a struct return? */
|
||||
int
|
||||
hppa_use_struct_convention (gcc_p, type)
|
||||
int gcc_p;
|
||||
struct type *type;
|
||||
hppa_use_struct_convention (int gcc_p, struct type *type)
|
||||
{
|
||||
return (TYPE_LENGTH (type) > 2 * REGISTER_SIZE);
|
||||
}
|
||||
|
@ -165,8 +163,7 @@ hppa_use_struct_convention (gcc_p, type)
|
|||
value. */
|
||||
|
||||
static int
|
||||
sign_extend (val, bits)
|
||||
unsigned val, bits;
|
||||
sign_extend (unsigned val, unsigned bits)
|
||||
{
|
||||
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! */
|
||||
|
||||
static int
|
||||
low_sign_extend (val, bits)
|
||||
unsigned val, bits;
|
||||
low_sign_extend (unsigned val, unsigned bits)
|
||||
{
|
||||
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 */
|
||||
|
||||
static int
|
||||
extract_5_load (word)
|
||||
unsigned word;
|
||||
extract_5_load (unsigned word)
|
||||
{
|
||||
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 */
|
||||
|
||||
static unsigned
|
||||
extract_5r_store (word)
|
||||
unsigned word;
|
||||
extract_5r_store (unsigned word)
|
||||
{
|
||||
return (word & MASK_5);
|
||||
}
|
||||
|
@ -201,8 +195,7 @@ extract_5r_store (word)
|
|||
/* extract the immediate field from a {sr}sm instruction */
|
||||
|
||||
static unsigned
|
||||
extract_5R_store (word)
|
||||
unsigned word;
|
||||
extract_5R_store (unsigned word)
|
||||
{
|
||||
return (word >> 16 & MASK_5);
|
||||
}
|
||||
|
@ -210,8 +203,7 @@ extract_5R_store (word)
|
|||
/* extract a 14 bit immediate field */
|
||||
|
||||
static int
|
||||
extract_14 (word)
|
||||
unsigned word;
|
||||
extract_14 (unsigned word)
|
||||
{
|
||||
return low_sign_extend (word & MASK_14, 14);
|
||||
}
|
||||
|
@ -219,9 +211,7 @@ extract_14 (word)
|
|||
/* deposit a 14 bit constant in a word */
|
||||
|
||||
static unsigned
|
||||
deposit_14 (opnd, word)
|
||||
int opnd;
|
||||
unsigned word;
|
||||
deposit_14 (int opnd, unsigned word)
|
||||
{
|
||||
unsigned sign = (opnd < 0 ? 1 : 0);
|
||||
|
||||
|
@ -231,8 +221,7 @@ deposit_14 (opnd, word)
|
|||
/* extract a 21 bit constant */
|
||||
|
||||
static int
|
||||
extract_21 (word)
|
||||
unsigned word;
|
||||
extract_21 (unsigned word)
|
||||
{
|
||||
int val;
|
||||
|
||||
|
@ -255,8 +244,7 @@ extract_21 (word)
|
|||
the low 21 bits of opnd are relevant */
|
||||
|
||||
static unsigned
|
||||
deposit_21 (opnd, word)
|
||||
unsigned opnd, word;
|
||||
deposit_21 (unsigned opnd, unsigned word)
|
||||
{
|
||||
unsigned val = 0;
|
||||
|
||||
|
@ -276,8 +264,7 @@ deposit_21 (opnd, word)
|
|||
19 bit signed value. */
|
||||
|
||||
static int
|
||||
extract_17 (word)
|
||||
unsigned word;
|
||||
extract_17 (unsigned word)
|
||||
{
|
||||
return sign_extend (GET_FIELD (word, 19, 28) |
|
||||
GET_FIELD (word, 29, 29) << 10 |
|
||||
|
@ -291,9 +278,7 @@ extract_17 (word)
|
|||
larger than the first, and zero if they are equal. */
|
||||
|
||||
static int
|
||||
compare_unwind_entries (arg1, arg2)
|
||||
const void *arg1;
|
||||
const void *arg2;
|
||||
compare_unwind_entries (const void *arg1, const void *arg2)
|
||||
{
|
||||
const struct unwind_table_entry *a = arg1;
|
||||
const struct unwind_table_entry *b = arg2;
|
||||
|
@ -321,12 +306,9 @@ record_text_segment_lowaddr (abfd, section, ignored)
|
|||
}
|
||||
|
||||
static void
|
||||
internalize_unwinds (objfile, table, section, entries, size, text_offset)
|
||||
struct objfile *objfile;
|
||||
struct unwind_table_entry *table;
|
||||
asection *section;
|
||||
unsigned int entries, size;
|
||||
CORE_ADDR text_offset;
|
||||
internalize_unwinds (struct objfile *objfile, struct unwind_table_entry *table,
|
||||
asection *section, unsigned int entries, unsigned int size,
|
||||
CORE_ADDR text_offset)
|
||||
{
|
||||
/* We will read the unwind entries into temporary memory, then
|
||||
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. */
|
||||
|
||||
static void
|
||||
read_unwind_info (objfile)
|
||||
struct objfile *objfile;
|
||||
read_unwind_info (struct objfile *objfile)
|
||||
{
|
||||
asection *unwind_sec, *stub_unwind_sec;
|
||||
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. */
|
||||
|
||||
struct unwind_table_entry *
|
||||
find_unwind_entry (pc)
|
||||
CORE_ADDR pc;
|
||||
find_unwind_entry (CORE_ADDR pc)
|
||||
{
|
||||
int first, middle, last;
|
||||
struct objfile *objfile;
|
||||
|
@ -624,8 +604,7 @@ find_unwind_entry (pc)
|
|||
bizarre way in which someone (?) decided they wanted to handle
|
||||
frame pointerless code in GDB. */
|
||||
int
|
||||
hpread_adjust_stack_address (func_addr)
|
||||
CORE_ADDR func_addr;
|
||||
hpread_adjust_stack_address (CORE_ADDR func_addr)
|
||||
{
|
||||
struct unwind_table_entry *u;
|
||||
|
||||
|
@ -640,8 +619,7 @@ hpread_adjust_stack_address (func_addr)
|
|||
kind. */
|
||||
|
||||
static int
|
||||
pc_in_interrupt_handler (pc)
|
||||
CORE_ADDR pc;
|
||||
pc_in_interrupt_handler (CORE_ADDR pc)
|
||||
{
|
||||
struct unwind_table_entry *u;
|
||||
struct minimal_symbol *msym_us;
|
||||
|
@ -663,8 +641,7 @@ pc_in_interrupt_handler (pc)
|
|||
?!? Need to handle stubs which appear in PA64 code. */
|
||||
|
||||
static int
|
||||
pc_in_linker_stub (pc)
|
||||
CORE_ADDR pc;
|
||||
pc_in_linker_stub (CORE_ADDR pc)
|
||||
{
|
||||
int found_magic_instruction = 0;
|
||||
int i;
|
||||
|
@ -729,8 +706,7 @@ pc_in_linker_stub (pc)
|
|||
}
|
||||
|
||||
static int
|
||||
find_return_regnum (pc)
|
||||
CORE_ADDR pc;
|
||||
find_return_regnum (CORE_ADDR pc)
|
||||
{
|
||||
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. */
|
||||
static int
|
||||
find_proc_framesize (pc)
|
||||
CORE_ADDR pc;
|
||||
find_proc_framesize (CORE_ADDR pc)
|
||||
{
|
||||
struct unwind_table_entry *u;
|
||||
struct minimal_symbol *msym_us;
|
||||
|
@ -783,8 +758,7 @@ find_proc_framesize (pc)
|
|||
static int rp_saved (CORE_ADDR);
|
||||
|
||||
static int
|
||||
rp_saved (pc)
|
||||
CORE_ADDR pc;
|
||||
rp_saved (CORE_ADDR pc)
|
||||
{
|
||||
struct unwind_table_entry *u;
|
||||
|
||||
|
@ -823,8 +797,7 @@ rp_saved (pc)
|
|||
}
|
||||
|
||||
int
|
||||
frameless_function_invocation (frame)
|
||||
struct frame_info *frame;
|
||||
frameless_function_invocation (struct frame_info *frame)
|
||||
{
|
||||
struct unwind_table_entry *u;
|
||||
|
||||
|
@ -837,8 +810,7 @@ frameless_function_invocation (frame)
|
|||
}
|
||||
|
||||
CORE_ADDR
|
||||
saved_pc_after_call (frame)
|
||||
struct frame_info *frame;
|
||||
saved_pc_after_call (struct frame_info *frame)
|
||||
{
|
||||
int ret_regnum;
|
||||
CORE_ADDR pc;
|
||||
|
@ -857,8 +829,7 @@ saved_pc_after_call (frame)
|
|||
}
|
||||
|
||||
CORE_ADDR
|
||||
hppa_frame_saved_pc (frame)
|
||||
struct frame_info *frame;
|
||||
hppa_frame_saved_pc (struct frame_info *frame)
|
||||
{
|
||||
CORE_ADDR pc = get_frame_pc (frame);
|
||||
struct unwind_table_entry *u;
|
||||
|
@ -1037,9 +1008,7 @@ hppa_frame_saved_pc (frame)
|
|||
in a system call. */
|
||||
|
||||
void
|
||||
init_extra_frame_info (fromleaf, frame)
|
||||
int fromleaf;
|
||||
struct frame_info *frame;
|
||||
init_extra_frame_info (int fromleaf, struct frame_info *frame)
|
||||
{
|
||||
int flags;
|
||||
int framesize;
|
||||
|
@ -1096,8 +1065,7 @@ init_extra_frame_info (fromleaf, frame)
|
|||
a frame pointer calls code without a frame pointer. */
|
||||
|
||||
CORE_ADDR
|
||||
frame_chain (frame)
|
||||
struct frame_info *frame;
|
||||
frame_chain (struct frame_info *frame)
|
||||
{
|
||||
int my_framesize, caller_framesize;
|
||||
struct unwind_table_entry *u;
|
||||
|
@ -1353,9 +1321,7 @@ frame_chain (frame)
|
|||
was compiled with gcc. */
|
||||
|
||||
int
|
||||
hppa_frame_chain_valid (chain, thisframe)
|
||||
CORE_ADDR chain;
|
||||
struct frame_info *thisframe;
|
||||
hppa_frame_chain_valid (CORE_ADDR chain, struct frame_info *thisframe)
|
||||
{
|
||||
struct minimal_symbol *msym_us;
|
||||
struct minimal_symbol *msym_start;
|
||||
|
@ -1416,8 +1382,7 @@ hppa_frame_chain_valid (chain, thisframe)
|
|||
to be aligned to a 64-byte boundary. */
|
||||
|
||||
void
|
||||
push_dummy_frame (inf_status)
|
||||
struct inferior_status *inf_status;
|
||||
push_dummy_frame (struct inferior_status *inf_status)
|
||||
{
|
||||
CORE_ADDR sp, pc, pcspace;
|
||||
register int regnum;
|
||||
|
@ -1494,9 +1459,8 @@ push_dummy_frame (inf_status)
|
|||
}
|
||||
|
||||
static void
|
||||
find_dummy_frame_regs (frame, frame_saved_regs)
|
||||
struct frame_info *frame;
|
||||
struct frame_saved_regs *frame_saved_regs;
|
||||
find_dummy_frame_regs (struct frame_info *frame,
|
||||
struct frame_saved_regs *frame_saved_regs)
|
||||
{
|
||||
CORE_ADDR fp = frame->frame;
|
||||
int i;
|
||||
|
@ -1536,7 +1500,7 @@ find_dummy_frame_regs (frame, frame_saved_regs)
|
|||
}
|
||||
|
||||
void
|
||||
hppa_pop_frame ()
|
||||
hppa_pop_frame (void)
|
||||
{
|
||||
register struct frame_info *frame = get_current_frame ();
|
||||
register CORE_ADDR fp, npc, target_pc;
|
||||
|
@ -1634,8 +1598,7 @@ hppa_pop_frame ()
|
|||
queue space registers. */
|
||||
|
||||
static int
|
||||
restore_pc_queue (fsr)
|
||||
struct frame_saved_regs *fsr;
|
||||
restore_pc_queue (struct frame_saved_regs *fsr)
|
||||
{
|
||||
CORE_ADDR pc = read_pc ();
|
||||
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. */
|
||||
|
||||
CORE_ADDR
|
||||
hppa_push_arguments (nargs, args, sp, struct_return, struct_addr)
|
||||
int nargs;
|
||||
value_ptr *args;
|
||||
CORE_ADDR sp;
|
||||
int struct_return;
|
||||
CORE_ADDR struct_addr;
|
||||
hppa_push_arguments (int nargs, value_ptr *args, CORE_ADDR sp,
|
||||
int struct_return, CORE_ADDR struct_addr)
|
||||
{
|
||||
/* array of arguments' offsets */
|
||||
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. */
|
||||
|
||||
CORE_ADDR
|
||||
hppa_push_arguments (nargs, args, sp, struct_return, struct_addr)
|
||||
int nargs;
|
||||
value_ptr *args;
|
||||
CORE_ADDR sp;
|
||||
int struct_return;
|
||||
CORE_ADDR struct_addr;
|
||||
hppa_push_arguments (int nargs, value_ptr *args, CORE_ADDR sp,
|
||||
int struct_return, CORE_ADDR struct_addr)
|
||||
{
|
||||
/* array of arguments' offsets */
|
||||
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
|
||||
registers were saved when the function called completed. */
|
||||
value_ptr
|
||||
hppa_value_returned_from_stack (valtype, addr)
|
||||
register struct type *valtype;
|
||||
CORE_ADDR addr;
|
||||
hppa_value_returned_from_stack (register struct type *valtype, CORE_ADDR addr)
|
||||
{
|
||||
register value_ptr val;
|
||||
|
||||
|
@ -1957,9 +1910,7 @@ hppa_value_returned_from_stack (valtype, addr)
|
|||
man entry for shl_findsym */
|
||||
|
||||
CORE_ADDR
|
||||
find_stub_with_shl_get (function, handle)
|
||||
struct minimal_symbol *function;
|
||||
CORE_ADDR handle;
|
||||
find_stub_with_shl_get (struct minimal_symbol *function, CORE_ADDR handle)
|
||||
{
|
||||
struct symbol *get_sym, *symbol2;
|
||||
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. */
|
||||
|
||||
CORE_ADDR
|
||||
hppa_fix_call_dummy (dummy, pc, fun, nargs, args, type, gcc_p)
|
||||
char *dummy;
|
||||
CORE_ADDR pc;
|
||||
CORE_ADDR fun;
|
||||
int nargs;
|
||||
value_ptr *args;
|
||||
struct type *type;
|
||||
int gcc_p;
|
||||
hppa_fix_call_dummy (char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs,
|
||||
value_ptr *args, struct type *type, int gcc_p)
|
||||
{
|
||||
CORE_ADDR dyncall_addr;
|
||||
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
|
||||
and cause a warning. */
|
||||
CORE_ADDR
|
||||
target_read_fp (pid)
|
||||
int pid;
|
||||
target_read_fp (int pid)
|
||||
{
|
||||
int flags = read_register (FLAGS_REGNUM);
|
||||
|
||||
|
@ -2461,8 +2405,7 @@ target_read_fp (pid)
|
|||
bits. */
|
||||
|
||||
CORE_ADDR
|
||||
target_read_pc (pid)
|
||||
int pid;
|
||||
target_read_pc (int pid)
|
||||
{
|
||||
int flags = read_register_pid (FLAGS_REGNUM, pid);
|
||||
|
||||
|
@ -2479,9 +2422,7 @@ target_read_pc (pid)
|
|||
PC value into %r31. */
|
||||
|
||||
void
|
||||
target_write_pc (v, pid)
|
||||
CORE_ADDR v;
|
||||
int pid;
|
||||
target_write_pc (CORE_ADDR v, int pid)
|
||||
{
|
||||
int flags = read_register_pid (FLAGS_REGNUM, pid);
|
||||
|
||||
|
@ -2501,8 +2442,7 @@ target_write_pc (v, pid)
|
|||
alignment required by their fields. */
|
||||
|
||||
static int
|
||||
hppa_alignof (type)
|
||||
struct type *type;
|
||||
hppa_alignof (struct type *type)
|
||||
{
|
||||
int max_align, align, i;
|
||||
CHECK_TYPEDEF (type);
|
||||
|
@ -2536,9 +2476,7 @@ hppa_alignof (type)
|
|||
/* Print the register regnum, or all registers if regnum is -1 */
|
||||
|
||||
void
|
||||
pa_do_registers_info (regnum, fpregs)
|
||||
int regnum;
|
||||
int fpregs;
|
||||
pa_do_registers_info (int regnum, int fpregs)
|
||||
{
|
||||
char raw_regs[REGISTER_BYTES];
|
||||
int i;
|
||||
|
@ -2581,11 +2519,8 @@ pa_do_registers_info (regnum, fpregs)
|
|||
|
||||
/********** new function ********************/
|
||||
void
|
||||
pa_do_strcat_registers_info (regnum, fpregs, stream, precision)
|
||||
int regnum;
|
||||
int fpregs;
|
||||
struct ui_file *stream;
|
||||
enum precision_type precision;
|
||||
pa_do_strcat_registers_info (int regnum, int fpregs, struct ui_file *stream,
|
||||
enum precision_type precision)
|
||||
{
|
||||
char raw_regs[REGISTER_BYTES];
|
||||
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,
|
||||
with two elements. */
|
||||
static void
|
||||
pa_register_look_aside (raw_regs, regnum, raw_val)
|
||||
char *raw_regs;
|
||||
int regnum;
|
||||
long *raw_val;
|
||||
pa_register_look_aside (char *raw_regs, int regnum, long *raw_val)
|
||||
{
|
||||
static int know_which = 0; /* False */
|
||||
|
||||
|
@ -2740,10 +2672,7 @@ error_exit:
|
|||
/* "Info all-reg" command */
|
||||
|
||||
static void
|
||||
pa_print_registers (raw_regs, regnum, fpregs)
|
||||
char *raw_regs;
|
||||
int regnum;
|
||||
int fpregs;
|
||||
pa_print_registers (char *raw_regs, int regnum, int fpregs)
|
||||
{
|
||||
int i, j;
|
||||
/* Alas, we are compiled so that "long long" is 32 bits */
|
||||
|
@ -2795,11 +2724,8 @@ pa_print_registers (raw_regs, regnum, fpregs)
|
|||
|
||||
/************* new function ******************/
|
||||
static void
|
||||
pa_strcat_registers (raw_regs, regnum, fpregs, stream)
|
||||
char *raw_regs;
|
||||
int regnum;
|
||||
int fpregs;
|
||||
struct ui_file *stream;
|
||||
pa_strcat_registers (char *raw_regs, int regnum, int fpregs,
|
||||
struct ui_file *stream)
|
||||
{
|
||||
int i, j;
|
||||
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
|
||||
pa_print_fp_reg (i)
|
||||
int i;
|
||||
pa_print_fp_reg (int i)
|
||||
{
|
||||
char raw_buffer[MAX_REGISTER_RAW_SIZE];
|
||||
char virtual_buffer[MAX_REGISTER_VIRTUAL_SIZE];
|
||||
|
@ -2890,10 +2815,7 @@ pa_print_fp_reg (i)
|
|||
|
||||
/*************** new function ***********************/
|
||||
static void
|
||||
pa_strcat_fp_reg (i, stream, precision)
|
||||
int i;
|
||||
struct ui_file *stream;
|
||||
enum precision_type precision;
|
||||
pa_strcat_fp_reg (int i, struct ui_file *stream, enum precision_type precision)
|
||||
{
|
||||
char raw_buffer[MAX_REGISTER_RAW_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). */
|
||||
|
||||
int
|
||||
in_solib_call_trampoline (pc, name)
|
||||
CORE_ADDR pc;
|
||||
char *name;
|
||||
in_solib_call_trampoline (CORE_ADDR pc, char *name)
|
||||
{
|
||||
struct minimal_symbol *minsym;
|
||||
struct unwind_table_entry *u;
|
||||
|
@ -3098,9 +3018,7 @@ in_solib_call_trampoline (pc, name)
|
|||
just shared library trampolines (import, export). */
|
||||
|
||||
int
|
||||
in_solib_return_trampoline (pc, name)
|
||||
CORE_ADDR pc;
|
||||
char *name;
|
||||
in_solib_return_trampoline (CORE_ADDR pc, char *name)
|
||||
{
|
||||
struct unwind_table_entry *u;
|
||||
|
||||
|
@ -3173,9 +3091,7 @@ in_solib_return_trampoline (pc, name)
|
|||
used in dynamic executables. */
|
||||
|
||||
CORE_ADDR
|
||||
skip_trampoline_code (pc, name)
|
||||
CORE_ADDR pc;
|
||||
char *name;
|
||||
skip_trampoline_code (CORE_ADDR pc, char *name)
|
||||
{
|
||||
long orig_pc = pc;
|
||||
long prev_inst, curr_inst, loc;
|
||||
|
@ -3450,8 +3366,7 @@ skip_trampoline_code (pc, name)
|
|||
This only handles instructions commonly found in prologues. */
|
||||
|
||||
static int
|
||||
prologue_inst_adjust_sp (inst)
|
||||
unsigned long inst;
|
||||
prologue_inst_adjust_sp (unsigned long inst)
|
||||
{
|
||||
/* This must persist across calls. */
|
||||
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. */
|
||||
|
||||
static int
|
||||
is_branch (inst)
|
||||
unsigned long inst;
|
||||
is_branch (unsigned long inst)
|
||||
{
|
||||
switch (inst >> 26)
|
||||
{
|
||||
|
@ -3524,8 +3438,7 @@ is_branch (inst)
|
|||
zero it INST does not save a GR. */
|
||||
|
||||
static int
|
||||
inst_saves_gr (inst)
|
||||
unsigned long inst;
|
||||
inst_saves_gr (unsigned long inst)
|
||||
{
|
||||
/* Does it look like a stw? */
|
||||
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? */
|
||||
|
||||
static int
|
||||
inst_saves_fr (inst)
|
||||
unsigned long inst;
|
||||
inst_saves_fr (unsigned long inst)
|
||||
{
|
||||
/* is this an FSTD ? */
|
||||
if ((inst & 0xfc00dfc0) == 0x2c001200)
|
||||
|
@ -3588,8 +3500,7 @@ inst_saves_fr (inst)
|
|||
|
||||
|
||||
CORE_ADDR
|
||||
skip_prologue_hard_way (pc)
|
||||
CORE_ADDR pc;
|
||||
skip_prologue_hard_way (CORE_ADDR pc)
|
||||
{
|
||||
char buf[4];
|
||||
CORE_ADDR orig_pc = pc;
|
||||
|
@ -3821,8 +3732,7 @@ restart:
|
|||
we can determine it from the debug symbols. Else return zero. */
|
||||
|
||||
static CORE_ADDR
|
||||
after_prologue (pc)
|
||||
CORE_ADDR pc;
|
||||
after_prologue (CORE_ADDR pc)
|
||||
{
|
||||
struct symtab_and_line sal;
|
||||
CORE_ADDR func_addr, func_end;
|
||||
|
@ -3863,8 +3773,7 @@ after_prologue (pc)
|
|||
stuff some day. */
|
||||
|
||||
CORE_ADDR
|
||||
hppa_skip_prologue (pc)
|
||||
CORE_ADDR pc;
|
||||
hppa_skip_prologue (CORE_ADDR pc)
|
||||
{
|
||||
unsigned long inst;
|
||||
int offset;
|
||||
|
@ -3896,9 +3805,8 @@ hppa_skip_prologue (pc)
|
|||
the address we return for it IS the sp for the next frame. */
|
||||
|
||||
void
|
||||
hppa_frame_find_saved_regs (frame_info, frame_saved_regs)
|
||||
struct frame_info *frame_info;
|
||||
struct frame_saved_regs *frame_saved_regs;
|
||||
hppa_frame_find_saved_regs (struct frame_info *frame_info,
|
||||
struct frame_saved_regs *frame_saved_regs)
|
||||
{
|
||||
CORE_ADDR pc;
|
||||
struct unwind_table_entry *u;
|
||||
|
@ -4185,7 +4093,7 @@ static struct symtab_and_line *break_callback_sal = 0;
|
|||
0 => success
|
||||
1 => failure */
|
||||
int
|
||||
setup_d_pid_in_inferior ()
|
||||
setup_d_pid_in_inferior (void)
|
||||
{
|
||||
CORE_ADDR anaddr;
|
||||
struct minimal_symbol *msymbol;
|
||||
|
@ -4219,7 +4127,7 @@ setup_d_pid_in_inferior ()
|
|||
1 => success */
|
||||
|
||||
static int
|
||||
initialize_hp_cxx_exception_support ()
|
||||
initialize_hp_cxx_exception_support (void)
|
||||
{
|
||||
struct symtabs_and_lines sals;
|
||||
struct cleanup *old_chain;
|
||||
|
@ -4440,9 +4348,7 @@ initialize_hp_cxx_exception_support ()
|
|||
address was found. */
|
||||
|
||||
struct symtab_and_line *
|
||||
child_enable_exception_callback (kind, enable)
|
||||
enum exception_event_kind kind;
|
||||
int enable;
|
||||
child_enable_exception_callback (enum exception_event_kind kind, int enable)
|
||||
{
|
||||
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
|
||||
in the future */
|
||||
struct exception_event_record *
|
||||
child_get_current_exception_event ()
|
||||
child_get_current_exception_event (void)
|
||||
{
|
||||
CORE_ADDR event_kind;
|
||||
CORE_ADDR throw_addr;
|
||||
|
@ -4591,9 +4497,7 @@ child_get_current_exception_event ()
|
|||
}
|
||||
|
||||
static void
|
||||
unwind_command (exp, from_tty)
|
||||
char *exp;
|
||||
int from_tty;
|
||||
unwind_command (char *exp, int from_tty)
|
||||
{
|
||||
CORE_ADDR address;
|
||||
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
|
||||
putting the BPT instruction in and taking it out. */
|
||||
int
|
||||
hppa_prepare_to_proceed ()
|
||||
hppa_prepare_to_proceed (void)
|
||||
{
|
||||
pid_t old_thread;
|
||||
pid_t current_thread;
|
||||
|
@ -4743,7 +4647,7 @@ hppa_prepare_to_proceed ()
|
|||
#endif /* PREPARE_TO_PROCEED */
|
||||
|
||||
void
|
||||
hppa_skip_permanent_breakpoint ()
|
||||
hppa_skip_permanent_breakpoint (void)
|
||||
{
|
||||
/* To step over a breakpoint instruction on the PA takes some
|
||||
fiddling with the instruction address queue.
|
||||
|
@ -4767,7 +4671,7 @@ hppa_skip_permanent_breakpoint ()
|
|||
}
|
||||
|
||||
void
|
||||
_initialize_hppa_tdep ()
|
||||
_initialize_hppa_tdep (void)
|
||||
{
|
||||
tm_print_insn = print_insn_hppa;
|
||||
|
||||
|
|
|
@ -50,8 +50,7 @@
|
|||
/* Fetch one register. */
|
||||
|
||||
static void
|
||||
fetch_register (regno)
|
||||
int regno;
|
||||
fetch_register (int regno)
|
||||
{
|
||||
register unsigned int regaddr;
|
||||
char buf[MAX_REGISTER_RAW_SIZE];
|
||||
|
@ -87,8 +86,7 @@ error_exit:;
|
|||
/* Fetch all registers, or just one, from the child process. */
|
||||
|
||||
void
|
||||
fetch_inferior_registers (regno)
|
||||
int regno;
|
||||
fetch_inferior_registers (int regno)
|
||||
{
|
||||
if (regno == -1)
|
||||
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). */
|
||||
|
||||
void
|
||||
store_inferior_registers (regno)
|
||||
int regno;
|
||||
store_inferior_registers (int regno)
|
||||
{
|
||||
register unsigned int regaddr;
|
||||
char buf[80];
|
||||
|
@ -190,8 +187,7 @@ store_inferior_registers (regno)
|
|||
#define PT_PROT 21
|
||||
|
||||
int
|
||||
hppa_set_watchpoint (addr, len, flag)
|
||||
int addr, len, flag;
|
||||
hppa_set_watchpoint (int addr, int len, int flag)
|
||||
{
|
||||
int pt_args[3];
|
||||
pt_args[0] = addr;
|
||||
|
|
138
gdb/hppah-nat.c
138
gdb/hppah-nat.c
|
@ -36,8 +36,7 @@ extern CORE_ADDR text_end;
|
|||
static void fetch_register (int);
|
||||
|
||||
void
|
||||
fetch_inferior_registers (regno)
|
||||
int regno;
|
||||
fetch_inferior_registers (int regno)
|
||||
{
|
||||
if (regno == -1)
|
||||
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). */
|
||||
|
||||
void
|
||||
store_inferior_registers (regno)
|
||||
int regno;
|
||||
store_inferior_registers (int regno)
|
||||
{
|
||||
register unsigned int regaddr;
|
||||
char buf[80];
|
||||
|
@ -178,8 +176,7 @@ store_inferior_registers (regno)
|
|||
|
||||
/* Fetch a register's value from the process's U area. */
|
||||
static void
|
||||
fetch_register (regno)
|
||||
int regno;
|
||||
fetch_register (int regno)
|
||||
{
|
||||
char buf[MAX_REGISTER_RAW_SIZE];
|
||||
unsigned int addr, len, offset;
|
||||
|
@ -378,7 +375,7 @@ child_xfer_memory (memaddr, myaddr, len, write, target)
|
|||
|
||||
|
||||
void
|
||||
child_post_follow_inferior_by_clone ()
|
||||
child_post_follow_inferior_by_clone (void)
|
||||
{
|
||||
int status;
|
||||
|
||||
|
@ -396,11 +393,8 @@ child_post_follow_inferior_by_clone ()
|
|||
|
||||
|
||||
void
|
||||
child_post_follow_vfork (parent_pid, followed_parent, child_pid, followed_child)
|
||||
int parent_pid;
|
||||
int followed_parent;
|
||||
int child_pid;
|
||||
int followed_child;
|
||||
child_post_follow_vfork (int parent_pid, int followed_parent, int child_pid,
|
||||
int followed_child)
|
||||
{
|
||||
/* 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
|
||||
|
@ -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
|
||||
this with a null--it's going to be printed via a "%s". */
|
||||
char *
|
||||
child_pid_to_str (pid)
|
||||
pid_t pid;
|
||||
child_pid_to_str (pid_t pid)
|
||||
{
|
||||
/* Static because address returned */
|
||||
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.
|
||||
See infttrace.c for details. */
|
||||
char *
|
||||
hppa_tid_to_str (tid)
|
||||
pid_t tid;
|
||||
hppa_tid_to_str (pid_t tid)
|
||||
{
|
||||
/* Static because address returned */
|
||||
static char buf[30];
|
||||
|
@ -515,10 +507,7 @@ extern int parent_attach_all (int, PTRACE_ARG3_TYPE, int);
|
|||
child_acknowledge_created_inferior.) */
|
||||
|
||||
int
|
||||
parent_attach_all (pid, addr, data)
|
||||
int pid;
|
||||
PTRACE_ARG3_TYPE addr;
|
||||
int data;
|
||||
parent_attach_all (int pid, PTRACE_ARG3_TYPE addr, int data)
|
||||
{
|
||||
int pt_status = 0;
|
||||
|
||||
|
@ -555,8 +544,7 @@ parent_attach_all (pid, addr, data)
|
|||
#endif
|
||||
|
||||
int
|
||||
hppa_require_attach (pid)
|
||||
int pid;
|
||||
hppa_require_attach (int pid)
|
||||
{
|
||||
int pt_status;
|
||||
CORE_ADDR pc;
|
||||
|
@ -589,9 +577,7 @@ hppa_require_attach (pid)
|
|||
}
|
||||
|
||||
int
|
||||
hppa_require_detach (pid, signal)
|
||||
int pid;
|
||||
int signal;
|
||||
hppa_require_detach (int pid, int signal)
|
||||
{
|
||||
errno = 0;
|
||||
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. */
|
||||
|
||||
void
|
||||
hppa_enable_page_protection_events (pid)
|
||||
int pid;
|
||||
hppa_enable_page_protection_events (int pid)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
hppa_disable_page_protection_events (pid)
|
||||
int pid;
|
||||
hppa_disable_page_protection_events (int pid)
|
||||
{
|
||||
}
|
||||
|
||||
int
|
||||
hppa_insert_hw_watchpoint (pid, start, len, type)
|
||||
int pid;
|
||||
CORE_ADDR start;
|
||||
LONGEST len;
|
||||
int type;
|
||||
hppa_insert_hw_watchpoint (int pid, CORE_ADDR start, LONGEST len, int type)
|
||||
{
|
||||
error ("Hardware watchpoints not implemented on this platform.");
|
||||
}
|
||||
|
||||
int
|
||||
hppa_remove_hw_watchpoint (pid, start, len, type)
|
||||
int pid;
|
||||
CORE_ADDR start;
|
||||
LONGEST len;
|
||||
enum bptype type;
|
||||
hppa_remove_hw_watchpoint (int pid, CORE_ADDR start, LONGEST len,
|
||||
enum bptype type)
|
||||
{
|
||||
error ("Hardware watchpoints not implemented on this platform.");
|
||||
}
|
||||
|
||||
int
|
||||
hppa_can_use_hw_watchpoint (type, cnt, ot)
|
||||
enum bptype type;
|
||||
int cnt;
|
||||
enum bptype ot;
|
||||
hppa_can_use_hw_watchpoint (enum bptype type, int cnt, enum bptype ot)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
hppa_range_profitable_for_hw_watchpoint (pid, start, len)
|
||||
int pid;
|
||||
CORE_ADDR start;
|
||||
LONGEST len;
|
||||
hppa_range_profitable_for_hw_watchpoint (int pid, CORE_ADDR start, LONGEST len)
|
||||
{
|
||||
error ("Hardware watchpoints not implemented on this platform.");
|
||||
}
|
||||
|
||||
char *
|
||||
hppa_pid_or_tid_to_str (id)
|
||||
pid_t id;
|
||||
hppa_pid_or_tid_to_str (pid_t id)
|
||||
{
|
||||
/* In the ptrace world, there are only processes. */
|
||||
return child_pid_to_str (id);
|
||||
|
@ -666,15 +636,13 @@ hppa_pid_or_tid_to_str (id)
|
|||
hppa-tdep.c. */
|
||||
|
||||
pid_t
|
||||
hppa_switched_threads (pid)
|
||||
pid_t pid;
|
||||
hppa_switched_threads (pid_t pid)
|
||||
{
|
||||
return (pid_t) 0;
|
||||
}
|
||||
|
||||
void
|
||||
hppa_ensure_vforking_parent_remains_stopped (pid)
|
||||
int pid;
|
||||
hppa_ensure_vforking_parent_remains_stopped (int pid)
|
||||
{
|
||||
/* This assumes that the vforked parent is presently stopped, and
|
||||
that the vforked child has just delivered its first exec event.
|
||||
|
@ -686,14 +654,13 @@ hppa_ensure_vforking_parent_remains_stopped (pid)
|
|||
}
|
||||
|
||||
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. */
|
||||
}
|
||||
|
||||
void
|
||||
require_notification_of_events (pid)
|
||||
int pid;
|
||||
require_notification_of_events (int pid)
|
||||
{
|
||||
#if defined(PT_SET_EVENT_MASK)
|
||||
int pt_status;
|
||||
|
@ -758,8 +725,7 @@ require_notification_of_events (pid)
|
|||
}
|
||||
|
||||
void
|
||||
require_notification_of_exec_events (pid)
|
||||
int pid;
|
||||
require_notification_of_exec_events (int pid)
|
||||
{
|
||||
#if defined(PT_SET_EVENT_MASK)
|
||||
int pt_status;
|
||||
|
@ -800,8 +766,7 @@ require_notification_of_exec_events (pid)
|
|||
ID of the child process, after the debugger has forked. */
|
||||
|
||||
void
|
||||
child_acknowledge_created_inferior (pid)
|
||||
int pid;
|
||||
child_acknowledge_created_inferior (int pid)
|
||||
{
|
||||
/* We need a memory home for a constant. */
|
||||
int tc_magic_parent = PT_VERSION;
|
||||
|
@ -848,22 +813,19 @@ child_acknowledge_created_inferior (pid)
|
|||
}
|
||||
|
||||
void
|
||||
child_post_startup_inferior (pid)
|
||||
int pid;
|
||||
child_post_startup_inferior (int pid)
|
||||
{
|
||||
require_notification_of_events (pid);
|
||||
}
|
||||
|
||||
void
|
||||
child_post_attach (pid)
|
||||
int pid;
|
||||
child_post_attach (int pid)
|
||||
{
|
||||
require_notification_of_events (pid);
|
||||
}
|
||||
|
||||
int
|
||||
child_insert_fork_catchpoint (pid)
|
||||
int pid;
|
||||
child_insert_fork_catchpoint (int pid)
|
||||
{
|
||||
/* This request is only available on HPUX 10.0 and later. */
|
||||
#if !defined(PT_SET_EVENT_MASK)
|
||||
|
@ -877,8 +839,7 @@ child_insert_fork_catchpoint (pid)
|
|||
}
|
||||
|
||||
int
|
||||
child_remove_fork_catchpoint (pid)
|
||||
int pid;
|
||||
child_remove_fork_catchpoint (int pid)
|
||||
{
|
||||
/* This request is only available on HPUX 10.0 and later. */
|
||||
#if !defined(PT_SET_EVENT_MASK)
|
||||
|
@ -892,8 +853,7 @@ child_remove_fork_catchpoint (pid)
|
|||
}
|
||||
|
||||
int
|
||||
child_insert_vfork_catchpoint (pid)
|
||||
int pid;
|
||||
child_insert_vfork_catchpoint (int pid)
|
||||
{
|
||||
/* This request is only available on HPUX 10.0 and later. */
|
||||
#if !defined(PT_SET_EVENT_MASK)
|
||||
|
@ -907,8 +867,7 @@ child_insert_vfork_catchpoint (pid)
|
|||
}
|
||||
|
||||
int
|
||||
child_remove_vfork_catchpoint (pid)
|
||||
int pid;
|
||||
child_remove_vfork_catchpoint (int pid)
|
||||
{
|
||||
/* This request is only available on HPUX 10.0 and later. */
|
||||
#if !defined(PT_SET_EVENT_MASK)
|
||||
|
@ -922,9 +881,7 @@ child_remove_vfork_catchpoint (pid)
|
|||
}
|
||||
|
||||
int
|
||||
child_has_forked (pid, childpid)
|
||||
int pid;
|
||||
int *childpid;
|
||||
child_has_forked (int pid, int *childpid)
|
||||
{
|
||||
/* This request is only available on HPUX 10.0 and later. */
|
||||
#if !defined(PT_GET_PROCESS_STATE)
|
||||
|
@ -955,9 +912,7 @@ child_has_forked (pid, childpid)
|
|||
}
|
||||
|
||||
int
|
||||
child_has_vforked (pid, childpid)
|
||||
int pid;
|
||||
int *childpid;
|
||||
child_has_vforked (int pid, int *childpid)
|
||||
{
|
||||
/* This request is only available on HPUX 10.0 and later. */
|
||||
#if !defined(PT_GET_PROCESS_STATE)
|
||||
|
@ -989,15 +944,14 @@ child_has_vforked (pid, childpid)
|
|||
}
|
||||
|
||||
int
|
||||
child_can_follow_vfork_prior_to_exec ()
|
||||
child_can_follow_vfork_prior_to_exec (void)
|
||||
{
|
||||
/* ptrace doesn't allow this. */
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
child_insert_exec_catchpoint (pid)
|
||||
int pid;
|
||||
child_insert_exec_catchpoint (int pid)
|
||||
{
|
||||
/* This request is only available on HPUX 10.0 and later. */
|
||||
#if !defined(PT_SET_EVENT_MASK)
|
||||
|
@ -1012,8 +966,7 @@ child_insert_exec_catchpoint (pid)
|
|||
}
|
||||
|
||||
int
|
||||
child_remove_exec_catchpoint (pid)
|
||||
int pid;
|
||||
child_remove_exec_catchpoint (int pid)
|
||||
{
|
||||
/* This request is only available on HPUX 10.0 and later. */
|
||||
#if !defined(PT_SET_EVENT_MASK)
|
||||
|
@ -1028,9 +981,7 @@ child_remove_exec_catchpoint (pid)
|
|||
}
|
||||
|
||||
int
|
||||
child_has_execd (pid, execd_pathname)
|
||||
int pid;
|
||||
char **execd_pathname;
|
||||
child_has_execd (int pid, char **execd_pathname)
|
||||
{
|
||||
/* This request is only available on HPUX 10.0 and later. */
|
||||
#if !defined(PT_GET_PROCESS_STATE)
|
||||
|
@ -1063,16 +1014,13 @@ child_has_execd (pid, execd_pathname)
|
|||
}
|
||||
|
||||
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. */
|
||||
}
|
||||
|
||||
int
|
||||
child_has_syscall_event (pid, kind, syscall_id)
|
||||
int pid;
|
||||
enum target_waitkind *kind;
|
||||
int *syscall_id;
|
||||
child_has_syscall_event (int pid, enum target_waitkind *kind, int *syscall_id)
|
||||
{
|
||||
/* This request is only available on HPUX 10.30 and later, via
|
||||
the ttrace interface. */
|
||||
|
@ -1083,8 +1031,7 @@ child_has_syscall_event (pid, kind, syscall_id)
|
|||
}
|
||||
|
||||
char *
|
||||
child_pid_to_exec_file (pid)
|
||||
int pid;
|
||||
child_pid_to_exec_file (int pid)
|
||||
{
|
||||
static char exec_file_buffer[1024];
|
||||
int pt_status;
|
||||
|
@ -1150,7 +1097,7 @@ child_pid_to_exec_file (pid)
|
|||
}
|
||||
|
||||
void
|
||||
pre_fork_inferior ()
|
||||
pre_fork_inferior (void)
|
||||
{
|
||||
int status;
|
||||
|
||||
|
@ -1176,8 +1123,7 @@ pre_fork_inferior ()
|
|||
return "TRUE". */
|
||||
|
||||
int
|
||||
child_thread_alive (pid)
|
||||
int pid;
|
||||
child_thread_alive (int pid)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -37,8 +37,7 @@
|
|||
*/
|
||||
|
||||
void
|
||||
fetch_inferior_registers (regno)
|
||||
int regno;
|
||||
fetch_inferior_registers (int regno)
|
||||
{
|
||||
kern_return_t ret;
|
||||
thread_state_data_t state;
|
||||
|
@ -76,8 +75,7 @@ fetch_inferior_registers (regno)
|
|||
* On mach3 all registers are always saved in one call.
|
||||
*/
|
||||
void
|
||||
store_inferior_registers (regno)
|
||||
int regno;
|
||||
store_inferior_registers (int regno)
|
||||
{
|
||||
kern_return_t ret;
|
||||
thread_state_data_t state;
|
||||
|
|
159
gdb/hpread.c
159
gdb/hpread.c
|
@ -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. */
|
||||
|
||||
void
|
||||
hpread_symfile_init (objfile)
|
||||
struct objfile *objfile;
|
||||
hpread_symfile_init (struct objfile *objfile)
|
||||
{
|
||||
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). */
|
||||
|
||||
void
|
||||
hpread_build_psymtabs (objfile, mainline)
|
||||
struct objfile *objfile;
|
||||
int mainline;
|
||||
hpread_build_psymtabs (struct objfile *objfile, int mainline)
|
||||
{
|
||||
char *namestring;
|
||||
int past_first_source_file = 0;
|
||||
|
@ -626,8 +623,7 @@ hpread_build_psymtabs (objfile, mainline)
|
|||
objfile struct from the global list of known objfiles. */
|
||||
|
||||
void
|
||||
hpread_symfile_finish (objfile)
|
||||
struct objfile *objfile;
|
||||
hpread_symfile_finish (struct objfile *objfile)
|
||||
{
|
||||
if (objfile->sym_private != NULL)
|
||||
{
|
||||
|
@ -641,27 +637,21 @@ hpread_symfile_finish (objfile)
|
|||
/* Various small functions to get entries in the debug symbol sections. */
|
||||
|
||||
static union dnttentry *
|
||||
hpread_get_lntt (index, objfile)
|
||||
int index;
|
||||
struct objfile *objfile;
|
||||
hpread_get_lntt (int index, struct objfile *objfile)
|
||||
{
|
||||
return (union dnttentry *)
|
||||
&(LNTT (objfile)[(index * sizeof (struct dntt_type_block))]);
|
||||
}
|
||||
|
||||
static union dnttentry *
|
||||
hpread_get_gntt (index, objfile)
|
||||
int index;
|
||||
struct objfile *objfile;
|
||||
hpread_get_gntt (int index, struct objfile *objfile)
|
||||
{
|
||||
return (union dnttentry *)
|
||||
&(GNTT (objfile)[(index * sizeof (struct dntt_type_block))]);
|
||||
}
|
||||
|
||||
static union sltentry *
|
||||
hpread_get_slt (index, objfile)
|
||||
int index;
|
||||
struct objfile *objfile;
|
||||
hpread_get_slt (int index, struct objfile *objfile)
|
||||
{
|
||||
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. */
|
||||
|
||||
static unsigned long
|
||||
hpread_get_textlow (global, index, objfile)
|
||||
int global;
|
||||
int index;
|
||||
struct objfile *objfile;
|
||||
hpread_get_textlow (int global, int index, struct objfile *objfile)
|
||||
{
|
||||
union dnttentry *dn_bufp;
|
||||
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. */
|
||||
|
||||
static unsigned long
|
||||
hpread_get_depth (index, objfile)
|
||||
sltpointer index;
|
||||
struct objfile *objfile;
|
||||
hpread_get_depth (sltpointer index, struct objfile *objfile)
|
||||
{
|
||||
union sltentry *sl_bufp;
|
||||
|
||||
|
@ -721,9 +706,7 @@ hpread_get_depth (index, objfile)
|
|||
/* Get the source line number the the line identified by INDEX. */
|
||||
|
||||
static unsigned long
|
||||
hpread_get_line (index, objfile)
|
||||
sltpointer index;
|
||||
struct objfile *objfile;
|
||||
hpread_get_line (sltpointer index, struct objfile *objfile)
|
||||
{
|
||||
union sltentry *sl_bufp;
|
||||
|
||||
|
@ -732,9 +715,7 @@ hpread_get_line (index, objfile)
|
|||
}
|
||||
|
||||
static CORE_ADDR
|
||||
hpread_get_location (index, objfile)
|
||||
sltpointer index;
|
||||
struct objfile *objfile;
|
||||
hpread_get_location (sltpointer index, struct objfile *objfile)
|
||||
{
|
||||
union sltentry *sl_bufp;
|
||||
int i;
|
||||
|
@ -763,8 +744,7 @@ hpread_get_location (index, objfile)
|
|||
it, else return 0. */
|
||||
|
||||
static int
|
||||
hpread_has_name (kind)
|
||||
enum dntt_entry_type kind;
|
||||
hpread_has_name (enum dntt_entry_type kind)
|
||||
{
|
||||
switch (kind)
|
||||
{
|
||||
|
@ -815,14 +795,10 @@ hpread_has_name (kind)
|
|||
(normal). */
|
||||
|
||||
static struct partial_symtab *
|
||||
hpread_start_psymtab (objfile, filename, textlow, ldsymoff, global_syms,
|
||||
static_syms)
|
||||
struct objfile *objfile;
|
||||
char *filename;
|
||||
CORE_ADDR textlow;
|
||||
int ldsymoff;
|
||||
struct partial_symbol **global_syms;
|
||||
struct partial_symbol **static_syms;
|
||||
hpread_start_psymtab (struct objfile *objfile, char *filename,
|
||||
CORE_ADDR textlow, int ldsymoff,
|
||||
struct partial_symbol **global_syms,
|
||||
struct partial_symbol **static_syms)
|
||||
{
|
||||
struct partial_symtab *result =
|
||||
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. */
|
||||
|
||||
static struct partial_symtab *
|
||||
hpread_end_psymtab (pst, include_list, num_includes, capping_symbol_offset,
|
||||
capping_text, dependency_list, number_dependencies)
|
||||
struct partial_symtab *pst;
|
||||
char **include_list;
|
||||
int num_includes;
|
||||
int capping_symbol_offset;
|
||||
CORE_ADDR capping_text;
|
||||
struct partial_symtab **dependency_list;
|
||||
int number_dependencies;
|
||||
hpread_end_psymtab (struct partial_symtab *pst, char **include_list,
|
||||
int num_includes, int capping_symbol_offset,
|
||||
CORE_ADDR capping_text,
|
||||
struct partial_symtab **dependency_list,
|
||||
int number_dependencies)
|
||||
{
|
||||
int i;
|
||||
struct objfile *objfile = pst->objfile;
|
||||
|
@ -941,8 +913,7 @@ hpread_end_psymtab (pst, include_list, num_includes, capping_symbol_offset,
|
|||
table. */
|
||||
|
||||
static void
|
||||
hpread_psymtab_to_symtab_1 (pst)
|
||||
struct partial_symtab *pst;
|
||||
hpread_psymtab_to_symtab_1 (struct partial_symtab *pst)
|
||||
{
|
||||
struct cleanup *old_chain;
|
||||
int i;
|
||||
|
@ -1000,8 +971,7 @@ hpread_psymtab_to_symtab_1 (pst)
|
|||
Be verbose about it if the user wants that. */
|
||||
|
||||
static void
|
||||
hpread_psymtab_to_symtab (pst)
|
||||
struct partial_symtab *pst;
|
||||
hpread_psymtab_to_symtab (struct partial_symtab *pst)
|
||||
{
|
||||
/* Get out quick if given junk. */
|
||||
if (!pst)
|
||||
|
@ -1048,15 +1018,9 @@ hpread_psymtab_to_symtab (pst)
|
|||
SECTION_OFFSETS are the relocation offsets which get added to each symbol. */
|
||||
|
||||
static struct symtab *
|
||||
hpread_expand_symtab (objfile, sym_offset, sym_size, text_offset, text_size,
|
||||
section_offsets, filename)
|
||||
struct objfile *objfile;
|
||||
int sym_offset;
|
||||
int sym_size;
|
||||
CORE_ADDR text_offset;
|
||||
int text_size;
|
||||
struct section_offsets *section_offsets;
|
||||
char *filename;
|
||||
hpread_expand_symtab (struct objfile *objfile, int sym_offset, int sym_size,
|
||||
CORE_ADDR text_offset, int text_size,
|
||||
struct section_offsets *section_offsets, char *filename)
|
||||
{
|
||||
char *namestring;
|
||||
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. */
|
||||
|
||||
static int
|
||||
hpread_type_translate (typep)
|
||||
dnttpointer typep;
|
||||
hpread_type_translate (dnttpointer typep)
|
||||
{
|
||||
if (!typep.dntti.immediate)
|
||||
abort ();
|
||||
|
@ -1180,9 +1143,7 @@ hpread_type_translate (typep)
|
|||
/* Return the type associated with the index found in HP_TYPE. */
|
||||
|
||||
static struct type **
|
||||
hpread_lookup_type (hp_type, objfile)
|
||||
dnttpointer hp_type;
|
||||
struct objfile *objfile;
|
||||
hpread_lookup_type (dnttpointer hp_type, struct objfile *objfile)
|
||||
{
|
||||
unsigned old_len;
|
||||
int index = hp_type.dnttp.index;
|
||||
|
@ -1223,9 +1184,7 @@ hpread_lookup_type (hp_type, objfile)
|
|||
have it lying around. */
|
||||
|
||||
static struct type *
|
||||
hpread_alloc_type (hp_type, objfile)
|
||||
dnttpointer hp_type;
|
||||
struct objfile *objfile;
|
||||
hpread_alloc_type (dnttpointer hp_type, struct objfile *objfile)
|
||||
{
|
||||
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. */
|
||||
|
||||
static struct type *
|
||||
hpread_read_enum_type (hp_type, dn_bufp, objfile)
|
||||
dnttpointer hp_type;
|
||||
union dnttentry *dn_bufp;
|
||||
struct objfile *objfile;
|
||||
hpread_read_enum_type (dnttpointer hp_type, union dnttentry *dn_bufp,
|
||||
struct objfile *objfile)
|
||||
{
|
||||
struct type *type;
|
||||
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. */
|
||||
|
||||
static struct type *
|
||||
hpread_read_function_type (hp_type, dn_bufp, objfile)
|
||||
dnttpointer hp_type;
|
||||
union dnttentry *dn_bufp;
|
||||
struct objfile *objfile;
|
||||
hpread_read_function_type (dnttpointer hp_type, union dnttentry *dn_bufp,
|
||||
struct objfile *objfile)
|
||||
{
|
||||
struct type *type, *type1;
|
||||
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. */
|
||||
|
||||
static struct type *
|
||||
hpread_read_struct_type (hp_type, dn_bufp, objfile)
|
||||
dnttpointer hp_type;
|
||||
union dnttentry *dn_bufp;
|
||||
struct objfile *objfile;
|
||||
hpread_read_struct_type (dnttpointer hp_type, union dnttentry *dn_bufp,
|
||||
struct objfile *objfile)
|
||||
{
|
||||
struct nextfield
|
||||
{
|
||||
|
@ -1510,10 +1463,8 @@ hpread_read_struct_type (hp_type, dn_bufp, objfile)
|
|||
/* Read in and internalize a set debug symbol. */
|
||||
|
||||
static struct type *
|
||||
hpread_read_set_type (hp_type, dn_bufp, objfile)
|
||||
dnttpointer hp_type;
|
||||
union dnttentry *dn_bufp;
|
||||
struct objfile *objfile;
|
||||
hpread_read_set_type (dnttpointer hp_type, union dnttentry *dn_bufp,
|
||||
struct objfile *objfile)
|
||||
{
|
||||
struct type *type;
|
||||
|
||||
|
@ -1534,10 +1485,8 @@ hpread_read_set_type (hp_type, dn_bufp, objfile)
|
|||
/* Read in and internalize an array debug symbol. */
|
||||
|
||||
static struct type *
|
||||
hpread_read_array_type (hp_type, dn_bufp, objfile)
|
||||
dnttpointer hp_type;
|
||||
union dnttentry *dn_bufp;
|
||||
struct objfile *objfile;
|
||||
hpread_read_array_type (dnttpointer hp_type, union dnttentry *dn_bufp,
|
||||
struct objfile *objfile)
|
||||
{
|
||||
struct type *type;
|
||||
union dnttentry save;
|
||||
|
@ -1576,10 +1525,8 @@ hpread_read_array_type (hp_type, dn_bufp, objfile)
|
|||
|
||||
/* Read in and internalize a subrange debug symbol. */
|
||||
static struct type *
|
||||
hpread_read_subrange_type (hp_type, dn_bufp, objfile)
|
||||
dnttpointer hp_type;
|
||||
union dnttentry *dn_bufp;
|
||||
struct objfile *objfile;
|
||||
hpread_read_subrange_type (dnttpointer hp_type, union dnttentry *dn_bufp,
|
||||
struct objfile *objfile)
|
||||
{
|
||||
struct type *type;
|
||||
|
||||
|
@ -1611,9 +1558,7 @@ hpread_read_subrange_type (hp_type, dn_bufp, objfile)
|
|||
}
|
||||
|
||||
static struct type *
|
||||
hpread_type_lookup (hp_type, objfile)
|
||||
dnttpointer hp_type;
|
||||
struct objfile *objfile;
|
||||
hpread_type_lookup (dnttpointer hp_type, struct objfile *objfile)
|
||||
{
|
||||
union dnttentry *dn_bufp;
|
||||
|
||||
|
@ -1729,11 +1674,9 @@ hpread_type_lookup (hp_type, objfile)
|
|||
}
|
||||
|
||||
static sltpointer
|
||||
hpread_record_lines (subfile, s_idx, e_idx, objfile, offset)
|
||||
struct subfile *subfile;
|
||||
sltpointer s_idx, e_idx;
|
||||
struct objfile *objfile;
|
||||
CORE_ADDR offset;
|
||||
hpread_record_lines (struct subfile *subfile, sltpointer s_idx,
|
||||
sltpointer e_idx, struct objfile *objfile,
|
||||
CORE_ADDR offset)
|
||||
{
|
||||
union sltentry *sl_bufp;
|
||||
|
||||
|
@ -1753,16 +1696,10 @@ hpread_record_lines (subfile, s_idx, e_idx, objfile, offset)
|
|||
/* Internalize one native debug symbol. */
|
||||
|
||||
static void
|
||||
hpread_process_one_debug_symbol (dn_bufp, name, section_offsets, objfile,
|
||||
text_offset, text_size, filename, index)
|
||||
union dnttentry *dn_bufp;
|
||||
char *name;
|
||||
struct section_offsets *section_offsets;
|
||||
struct objfile *objfile;
|
||||
CORE_ADDR text_offset;
|
||||
int text_size;
|
||||
char *filename;
|
||||
int index;
|
||||
hpread_process_one_debug_symbol (union dnttentry *dn_bufp, char *name,
|
||||
struct section_offsets *section_offsets,
|
||||
struct objfile *objfile, CORE_ADDR text_offset,
|
||||
int text_size, char *filename, int index)
|
||||
{
|
||||
unsigned long desc;
|
||||
int type;
|
||||
|
|
|
@ -100,14 +100,13 @@ static struct target_ops hpux_thread_ops;
|
|||
|
||||
|
||||
static struct cleanup *
|
||||
save_inferior_pid ()
|
||||
save_inferior_pid (void)
|
||||
{
|
||||
return make_cleanup (restore_inferior_pid, inferior_pid);
|
||||
}
|
||||
|
||||
static void
|
||||
restore_inferior_pid (pid)
|
||||
int pid;
|
||||
restore_inferior_pid (int pid)
|
||||
{
|
||||
inferior_pid = pid;
|
||||
}
|
||||
|
@ -119,7 +118,7 @@ static int cached_active_thread;
|
|||
static cma__t_int_tcb cached_tcb;
|
||||
|
||||
static int
|
||||
find_active_thread ()
|
||||
find_active_thread (void)
|
||||
{
|
||||
static cma__t_int_tcb tcb;
|
||||
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 (thread)
|
||||
int thread;
|
||||
find_tcb (int thread)
|
||||
{
|
||||
cma__t_known_object queue_header;
|
||||
cma__t_queue *queue_ptr;
|
||||
|
@ -179,9 +177,7 @@ find_tcb (thread)
|
|||
|
||||
/* ARGSUSED */
|
||||
static void
|
||||
hpux_thread_open (arg, from_tty)
|
||||
char *arg;
|
||||
int from_tty;
|
||||
hpux_thread_open (char *arg, int 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. */
|
||||
|
||||
static void
|
||||
hpux_thread_attach (args, from_tty)
|
||||
char *args;
|
||||
int from_tty;
|
||||
hpux_thread_attach (char *args, int 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). */
|
||||
|
||||
static void
|
||||
hpux_thread_detach (args, from_tty)
|
||||
char *args;
|
||||
int from_tty;
|
||||
hpux_thread_detach (char *args, int from_tty)
|
||||
{
|
||||
child_ops.to_detach (args, from_tty);
|
||||
}
|
||||
|
@ -221,10 +213,7 @@ hpux_thread_detach (args, from_tty)
|
|||
for procfs. */
|
||||
|
||||
static void
|
||||
hpux_thread_resume (pid, step, signo)
|
||||
int pid;
|
||||
int step;
|
||||
enum target_signal signo;
|
||||
hpux_thread_resume (int pid, int step, enum target_signal signo)
|
||||
{
|
||||
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. */
|
||||
|
||||
static int
|
||||
hpux_thread_wait (pid, ourstatus)
|
||||
int pid;
|
||||
struct target_waitstatus *ourstatus;
|
||||
hpux_thread_wait (int pid, struct target_waitstatus *ourstatus)
|
||||
{
|
||||
int rtnval;
|
||||
struct cleanup *old_chain;
|
||||
|
@ -303,8 +290,7 @@ static char regmap[NUM_REGS] =
|
|||
};
|
||||
|
||||
static void
|
||||
hpux_thread_fetch_registers (regno)
|
||||
int regno;
|
||||
hpux_thread_fetch_registers (int regno)
|
||||
{
|
||||
cma__t_int_tcb tcb, *tcb_ptr;
|
||||
struct cleanup *old_chain;
|
||||
|
@ -366,8 +352,7 @@ hpux_thread_fetch_registers (regno)
|
|||
}
|
||||
|
||||
static void
|
||||
hpux_thread_store_registers (regno)
|
||||
int regno;
|
||||
hpux_thread_store_registers (int regno)
|
||||
{
|
||||
cma__t_int_tcb tcb, *tcb_ptr;
|
||||
struct cleanup *old_chain;
|
||||
|
@ -442,7 +427,7 @@ hpux_thread_store_registers (regno)
|
|||
debugged. */
|
||||
|
||||
static void
|
||||
hpux_thread_prepare_to_store ()
|
||||
hpux_thread_prepare_to_store (void)
|
||||
{
|
||||
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. */
|
||||
|
||||
static void
|
||||
hpux_thread_files_info (ignore)
|
||||
struct target_ops *ignore;
|
||||
hpux_thread_files_info (struct target_ops *ignore)
|
||||
{
|
||||
child_ops.to_files_info (ignore);
|
||||
}
|
||||
|
||||
static void
|
||||
hpux_thread_kill_inferior ()
|
||||
hpux_thread_kill_inferior (void)
|
||||
{
|
||||
child_ops.to_kill ();
|
||||
}
|
||||
|
||||
static void
|
||||
hpux_thread_notice_signals (pid)
|
||||
int pid;
|
||||
hpux_thread_notice_signals (int 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. */
|
||||
|
||||
static void
|
||||
hpux_thread_create_inferior (exec_file, allargs, env)
|
||||
char *exec_file;
|
||||
char *allargs;
|
||||
char **env;
|
||||
hpux_thread_create_inferior (char *exec_file, char *allargs, char **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 *);
|
||||
|
||||
void
|
||||
hpux_thread_new_objfile (objfile)
|
||||
struct objfile *objfile;
|
||||
hpux_thread_new_objfile (struct objfile *objfile)
|
||||
{
|
||||
struct minimal_symbol *ms;
|
||||
|
||||
|
@ -562,7 +541,7 @@ quit:
|
|||
/* Clean up after the inferior dies. */
|
||||
|
||||
static void
|
||||
hpux_thread_mourn_inferior ()
|
||||
hpux_thread_mourn_inferior (void)
|
||||
{
|
||||
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. */
|
||||
|
||||
static int
|
||||
hpux_thread_can_run ()
|
||||
hpux_thread_can_run (void)
|
||||
{
|
||||
return child_suppress_run;
|
||||
}
|
||||
|
||||
static int
|
||||
hpux_thread_alive (pid)
|
||||
int pid;
|
||||
hpux_thread_alive (int pid)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void
|
||||
hpux_thread_stop ()
|
||||
hpux_thread_stop (void)
|
||||
{
|
||||
child_ops.to_stop ();
|
||||
}
|
||||
|
@ -591,8 +569,7 @@ hpux_thread_stop ()
|
|||
/* Convert a pid to printable form. */
|
||||
|
||||
char *
|
||||
hpux_pid_to_str (pid)
|
||||
int pid;
|
||||
hpux_pid_to_str (int pid)
|
||||
{
|
||||
static char buf[100];
|
||||
|
||||
|
@ -602,7 +579,7 @@ hpux_pid_to_str (pid)
|
|||
}
|
||||
|
||||
static void
|
||||
init_hpux_thread_ops ()
|
||||
init_hpux_thread_ops (void)
|
||||
{
|
||||
hpux_thread_ops.to_shortname = "hpux-threads";
|
||||
hpux_thread_ops.to_longname = "HPUX threads and pthread.";
|
||||
|
@ -641,7 +618,7 @@ init_hpux_thread_ops ()
|
|||
}
|
||||
|
||||
void
|
||||
_initialize_hpux_thread ()
|
||||
_initialize_hpux_thread (void)
|
||||
{
|
||||
init_hpux_thread_ops ();
|
||||
add_target (&hpux_thread_ops);
|
||||
|
|
|
@ -146,8 +146,7 @@ int have_ptrace_getxfpregs =
|
|||
/* Fetch one register. */
|
||||
|
||||
static void
|
||||
fetch_register (regno)
|
||||
int regno;
|
||||
fetch_register (int regno)
|
||||
{
|
||||
/* This isn't really an address. But ptrace thinks of it as one. */
|
||||
CORE_ADDR regaddr;
|
||||
|
@ -192,8 +191,7 @@ fetch_register (regno)
|
|||
Otherwise, REGNO specifies which register (so we can save time). */
|
||||
|
||||
void
|
||||
old_fetch_inferior_registers (regno)
|
||||
int regno;
|
||||
old_fetch_inferior_registers (int regno)
|
||||
{
|
||||
if (regno >= 0)
|
||||
{
|
||||
|
@ -216,8 +214,7 @@ old_fetch_inferior_registers (regno)
|
|||
/* Store one register. */
|
||||
|
||||
static void
|
||||
store_register (regno)
|
||||
int regno;
|
||||
store_register (int regno)
|
||||
{
|
||||
/* This isn't really an address. But ptrace thinks of it as one. */
|
||||
CORE_ADDR regaddr;
|
||||
|
@ -258,8 +255,7 @@ store_register (regno)
|
|||
Otherwise, REGNO specifies which register (so we can save time). */
|
||||
|
||||
void
|
||||
old_store_inferior_registers (regno)
|
||||
int regno;
|
||||
old_store_inferior_registers (int regno)
|
||||
{
|
||||
if (regno >= 0)
|
||||
{
|
||||
|
@ -1151,7 +1147,7 @@ static struct core_fns linux_elf_core_fns =
|
|||
};
|
||||
|
||||
void
|
||||
_initialize_i386_linux_nat ()
|
||||
_initialize_i386_linux_nat (void)
|
||||
{
|
||||
add_core_fns (&linux_elf_core_fns);
|
||||
}
|
||||
|
|
|
@ -449,7 +449,7 @@ static char remcomOutBuffer[BUFMAX];
|
|||
/* scan for the sequence $<data>#<checksum> */
|
||||
|
||||
unsigned char *
|
||||
getpacket ()
|
||||
getpacket (void)
|
||||
{
|
||||
unsigned char *buffer = &remcomInBuffer[0];
|
||||
unsigned char checksum;
|
||||
|
@ -562,7 +562,7 @@ static void (*volatile mem_fault_routine)() = NULL;
|
|||
static volatile int mem_err = 0;
|
||||
|
||||
void
|
||||
set_mem_err ()
|
||||
set_mem_err (void)
|
||||
{
|
||||
mem_err = 1;
|
||||
}
|
||||
|
@ -572,16 +572,13 @@ set_mem_err ()
|
|||
to mem_fault, they won't get restored, so there better not be any
|
||||
saved). */
|
||||
int
|
||||
get_char (addr)
|
||||
char *addr;
|
||||
get_char (char *addr)
|
||||
{
|
||||
return *addr;
|
||||
}
|
||||
|
||||
void
|
||||
set_char (addr, val)
|
||||
char *addr;
|
||||
int val;
|
||||
set_char (char *addr, int val)
|
||||
{
|
||||
*addr = val;
|
||||
}
|
||||
|
|
|
@ -123,8 +123,7 @@ static int codestream_cnt;
|
|||
codestream_fill(0) : codestream_buf[codestream_off++])
|
||||
|
||||
static unsigned char
|
||||
codestream_fill (peek_flag)
|
||||
int peek_flag;
|
||||
codestream_fill (int peek_flag)
|
||||
{
|
||||
codestream_addr = codestream_next_addr;
|
||||
codestream_next_addr += CODESTREAM_BUFSIZ;
|
||||
|
@ -139,8 +138,7 @@ codestream_fill (peek_flag)
|
|||
}
|
||||
|
||||
static void
|
||||
codestream_seek (place)
|
||||
CORE_ADDR place;
|
||||
codestream_seek (CORE_ADDR place)
|
||||
{
|
||||
codestream_next_addr = place / CODESTREAM_BUFSIZ;
|
||||
codestream_next_addr *= CODESTREAM_BUFSIZ;
|
||||
|
@ -151,9 +149,7 @@ codestream_seek (place)
|
|||
}
|
||||
|
||||
static void
|
||||
codestream_read (buf, count)
|
||||
unsigned char *buf;
|
||||
int count;
|
||||
codestream_read (unsigned char *buf, int count)
|
||||
{
|
||||
unsigned char *p;
|
||||
int i;
|
||||
|
@ -165,7 +161,7 @@ codestream_read (buf, count)
|
|||
/* next instruction is a jump, move to target */
|
||||
|
||||
static void
|
||||
i386_follow_jump ()
|
||||
i386_follow_jump (void)
|
||||
{
|
||||
unsigned char buf[4];
|
||||
long delta;
|
||||
|
@ -223,8 +219,7 @@ i386_follow_jump ()
|
|||
*/
|
||||
|
||||
static long
|
||||
i386_get_frame_setup (pc)
|
||||
CORE_ADDR pc;
|
||||
i386_get_frame_setup (CORE_ADDR pc)
|
||||
{
|
||||
unsigned char op;
|
||||
|
||||
|
@ -375,8 +370,7 @@ i386_get_frame_setup (pc)
|
|||
Can return -1, meaning no way to tell. */
|
||||
|
||||
int
|
||||
i386_frame_num_args (fi)
|
||||
struct frame_info *fi;
|
||||
i386_frame_num_args (struct frame_info *fi)
|
||||
{
|
||||
#if 1
|
||||
return -1;
|
||||
|
@ -477,8 +471,7 @@ i386_frame_num_args (fi)
|
|||
*/
|
||||
|
||||
void
|
||||
i386_frame_init_saved_regs (fip)
|
||||
struct frame_info *fip;
|
||||
i386_frame_init_saved_regs (struct frame_info *fip)
|
||||
{
|
||||
long locals = -1;
|
||||
unsigned char op;
|
||||
|
@ -539,8 +532,7 @@ i386_frame_init_saved_regs (fip)
|
|||
/* return pc of first real instruction */
|
||||
|
||||
int
|
||||
i386_skip_prologue (pc)
|
||||
int pc;
|
||||
i386_skip_prologue (int pc)
|
||||
{
|
||||
unsigned char op;
|
||||
int i;
|
||||
|
@ -621,7 +613,7 @@ i386_skip_prologue (pc)
|
|||
}
|
||||
|
||||
void
|
||||
i386_push_dummy_frame ()
|
||||
i386_push_dummy_frame (void)
|
||||
{
|
||||
CORE_ADDR sp = read_register (SP_REGNUM);
|
||||
int regnum;
|
||||
|
@ -659,7 +651,7 @@ i386_fix_call_dummy (char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs,
|
|||
}
|
||||
|
||||
void
|
||||
i386_pop_frame ()
|
||||
i386_pop_frame (void)
|
||||
{
|
||||
struct frame_info *frame = get_current_frame ();
|
||||
CORE_ADDR fp;
|
||||
|
@ -694,8 +686,7 @@ i386_pop_frame ()
|
|||
This routine returns true on success. */
|
||||
|
||||
int
|
||||
get_longjmp_target (pc)
|
||||
CORE_ADDR *pc;
|
||||
get_longjmp_target (CORE_ADDR *pc)
|
||||
{
|
||||
char buf[TARGET_PTR_BIT / TARGET_CHAR_BIT];
|
||||
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. */
|
||||
|
||||
CORE_ADDR
|
||||
i386v4_sigtramp_saved_pc (frame)
|
||||
struct frame_info *frame;
|
||||
i386v4_sigtramp_saved_pc (struct frame_info *frame)
|
||||
{
|
||||
CORE_ADDR saved_pc_offset = 4;
|
||||
char *name = NULL;
|
||||
|
@ -843,8 +833,7 @@ i386v4_sigtramp_saved_pc (frame)
|
|||
it is done for C too. */
|
||||
|
||||
char *
|
||||
sunpro_static_transform_name (name)
|
||||
char *name;
|
||||
sunpro_static_transform_name (char *name)
|
||||
{
|
||||
char *p;
|
||||
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. */
|
||||
|
||||
CORE_ADDR
|
||||
skip_trampoline_code (pc, name)
|
||||
CORE_ADDR pc;
|
||||
char *name;
|
||||
skip_trampoline_code (CORE_ADDR pc, char *name)
|
||||
{
|
||||
if (pc && read_memory_unsigned_integer (pc, 2) == 0x25ff) /* jmp *(dest) */
|
||||
{
|
||||
|
@ -891,9 +878,7 @@ skip_trampoline_code (pc, name)
|
|||
}
|
||||
|
||||
static int
|
||||
gdb_print_insn_i386 (memaddr, info)
|
||||
bfd_vma memaddr;
|
||||
disassemble_info *info;
|
||||
gdb_print_insn_i386 (bfd_vma memaddr, disassemble_info *info)
|
||||
{
|
||||
if (disassembly_flavor == att_flavor)
|
||||
return print_insn_i386_att (memaddr, info);
|
||||
|
@ -909,16 +894,14 @@ gdb_print_insn_i386 (memaddr, info)
|
|||
command, and does that. */
|
||||
|
||||
static void
|
||||
set_disassembly_flavor_sfunc (args, from_tty, c)
|
||||
char *args;
|
||||
int from_tty;
|
||||
struct cmd_list_element *c;
|
||||
set_disassembly_flavor_sfunc (char *args, int from_tty,
|
||||
struct cmd_list_element *c)
|
||||
{
|
||||
set_disassembly_flavor ();
|
||||
}
|
||||
|
||||
static void
|
||||
set_disassembly_flavor ()
|
||||
set_disassembly_flavor (void)
|
||||
{
|
||||
if (disassembly_flavor == att_flavor)
|
||||
set_architecture_from_arch_mach (bfd_arch_i386, bfd_mach_i386_i386);
|
||||
|
@ -928,7 +911,7 @@ set_disassembly_flavor ()
|
|||
|
||||
|
||||
void
|
||||
_initialize_i386_tdep ()
|
||||
_initialize_i386_tdep (void)
|
||||
{
|
||||
/* Initialize the table saying where each register starts in the
|
||||
register file. */
|
||||
|
|
|
@ -70,9 +70,7 @@ static int regmap[] =
|
|||
*/
|
||||
|
||||
int
|
||||
i386_register_u_addr (blockend, regnum)
|
||||
int blockend;
|
||||
int regnum;
|
||||
i386_register_u_addr (int blockend, int regnum)
|
||||
{
|
||||
#if 0
|
||||
/* this will be needed if fp registers are reinstated */
|
||||
|
@ -115,9 +113,7 @@ struct env387
|
|||
};
|
||||
|
||||
static
|
||||
print_387_status (status, ep)
|
||||
unsigned short status;
|
||||
struct env387 *ep;
|
||||
print_387_status (unsigned short status, struct env387 *ep)
|
||||
{
|
||||
int i;
|
||||
int bothstatus;
|
||||
|
@ -183,7 +179,7 @@ print_387_status (status, ep)
|
|||
static struct env387 core_env387;
|
||||
|
||||
void
|
||||
i386_float_info ()
|
||||
i386_float_info (void)
|
||||
{
|
||||
struct env387 fps;
|
||||
int fpsaved = 0;
|
||||
|
@ -232,8 +228,7 @@ i386_float_info ()
|
|||
|
||||
/* Fetch one register. */
|
||||
static void
|
||||
fetch_register (regno)
|
||||
int regno;
|
||||
fetch_register (int regno)
|
||||
{
|
||||
char buf[MAX_REGISTER_RAW_SIZE];
|
||||
if (regno < FP0_REGNUM)
|
||||
|
@ -246,8 +241,7 @@ fetch_register (regno)
|
|||
}
|
||||
|
||||
void
|
||||
fetch_inferior_registers (regno)
|
||||
int regno;
|
||||
fetch_inferior_registers (int regno)
|
||||
{
|
||||
if (regno < 0)
|
||||
for (regno = 0; regno < NUM_REGS; regno++)
|
||||
|
@ -258,8 +252,7 @@ fetch_inferior_registers (regno)
|
|||
|
||||
/* store one register */
|
||||
static void
|
||||
store_register (regno)
|
||||
int regno;
|
||||
store_register (int regno)
|
||||
{
|
||||
char buf[80];
|
||||
errno = 0;
|
||||
|
@ -281,8 +274,7 @@ store_register (regno)
|
|||
If REGNO is -1, do this for all registers.
|
||||
Otherwise, REGNO specifies which register (so we can save time). */
|
||||
void
|
||||
store_inferior_registers (regno)
|
||||
int regno;
|
||||
store_inferior_registers (int regno)
|
||||
{
|
||||
if (regno < 0)
|
||||
for (regno = 0; regno < NUM_REGS; regno++)
|
||||
|
@ -366,7 +358,7 @@ static struct core_fns i386aix_core_fns =
|
|||
};
|
||||
|
||||
void
|
||||
_initialize_core_i386aix ()
|
||||
_initialize_core_i386aix (void)
|
||||
{
|
||||
add_core_fns (&i386aix_core_fns);
|
||||
}
|
||||
|
|
|
@ -29,8 +29,7 @@
|
|||
#include "gdbcore.h" /* for registers_fetched() */
|
||||
|
||||
void
|
||||
fetch_inferior_registers (regno)
|
||||
int regno;
|
||||
fetch_inferior_registers (int regno)
|
||||
{
|
||||
struct reg inferior_registers;
|
||||
|
||||
|
@ -40,8 +39,7 @@ fetch_inferior_registers (regno)
|
|||
}
|
||||
|
||||
void
|
||||
store_inferior_registers (regno)
|
||||
int regno;
|
||||
store_inferior_registers (int regno)
|
||||
{
|
||||
struct reg inferior_registers;
|
||||
|
||||
|
@ -56,11 +54,8 @@ struct md_core
|
|||
};
|
||||
|
||||
void
|
||||
fetch_core_registers (core_reg_sect, core_reg_size, which, ignore)
|
||||
char *core_reg_sect;
|
||||
unsigned core_reg_size;
|
||||
int which;
|
||||
CORE_ADDR ignore;
|
||||
fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, int which,
|
||||
CORE_ADDR ignore)
|
||||
{
|
||||
struct md_core *core_reg = (struct md_core *) core_reg_sect;
|
||||
|
||||
|
@ -108,9 +103,7 @@ static int sregmap[] =
|
|||
place where ES is stored. */
|
||||
|
||||
int
|
||||
i386_register_u_addr (blockend, regnum)
|
||||
int blockend;
|
||||
int regnum;
|
||||
i386_register_u_addr (int blockend, int regnum)
|
||||
{
|
||||
/* The following condition is a kludge to get at the proper register map
|
||||
depending upon the state of pcb_flag.
|
||||
|
@ -174,9 +167,7 @@ struct env387
|
|||
};
|
||||
|
||||
static void
|
||||
print_387_status (status, ep)
|
||||
unsigned short status;
|
||||
struct env387 *ep;
|
||||
print_387_status (unsigned short status, struct env387 *ep)
|
||||
{
|
||||
int i;
|
||||
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 */
|
||||
int i;
|
||||
|
@ -288,7 +279,7 @@ i386_float_info ()
|
|||
}
|
||||
|
||||
int
|
||||
kernel_u_size ()
|
||||
kernel_u_size (void)
|
||||
{
|
||||
return (sizeof (struct user));
|
||||
}
|
||||
|
|
|
@ -30,8 +30,7 @@
|
|||
system calls use a different calling sequence. */
|
||||
|
||||
CORE_ADDR
|
||||
i386lynx_saved_pc_after_call (frame)
|
||||
struct frame_info *frame;
|
||||
i386lynx_saved_pc_after_call (struct frame_info *frame)
|
||||
{
|
||||
char opcode[7];
|
||||
static const unsigned char call_inst[] =
|
||||
|
|
|
@ -101,8 +101,7 @@ static int reg_offset[] =
|
|||
*/
|
||||
|
||||
void
|
||||
fetch_inferior_registers (regno)
|
||||
int regno;
|
||||
fetch_inferior_registers (int regno)
|
||||
{
|
||||
kern_return_t ret;
|
||||
thread_state_data_t state;
|
||||
|
@ -147,8 +146,7 @@ fetch_inferior_registers (regno)
|
|||
* On mach3 all registers are always saved in one call.
|
||||
*/
|
||||
void
|
||||
store_inferior_registers (regno)
|
||||
int regno;
|
||||
store_inferior_registers (int regno)
|
||||
{
|
||||
kern_return_t ret;
|
||||
thread_state_data_t state;
|
||||
|
@ -221,9 +219,7 @@ store_inferior_registers (regno)
|
|||
*/
|
||||
|
||||
CORE_ADDR
|
||||
register_addr (regno, blockend)
|
||||
int regno;
|
||||
CORE_ADDR blockend;
|
||||
register_addr (int regno, CORE_ADDR blockend)
|
||||
{
|
||||
CORE_ADDR addr;
|
||||
|
||||
|
@ -261,9 +257,7 @@ struct env387
|
|||
* Should move it to i387-tdep.c but you need to export struct env387
|
||||
*/
|
||||
private
|
||||
print_387_status (status, ep)
|
||||
unsigned short status;
|
||||
struct env387 *ep;
|
||||
print_387_status (unsigned short status, struct env387 *ep)
|
||||
{
|
||||
int i;
|
||||
int bothstatus;
|
||||
|
@ -358,8 +352,7 @@ typedef struct fpstate
|
|||
/* Mach 3 specific routines.
|
||||
*/
|
||||
private boolean_t
|
||||
get_i387_state (fstate)
|
||||
struct fpstate *fstate;
|
||||
get_i387_state (struct fpstate *fstate)
|
||||
{
|
||||
kern_return_t ret;
|
||||
thread_state_data_t state;
|
||||
|
@ -396,8 +389,7 @@ get_i387_state (fstate)
|
|||
}
|
||||
|
||||
private boolean_t
|
||||
get_i387_core_state (fstate)
|
||||
struct fpstate *fstate;
|
||||
get_i387_core_state (struct fpstate *fstate)
|
||||
{
|
||||
/* Not implemented yet. Core files do not contain float state. */
|
||||
return FALSE;
|
||||
|
@ -407,7 +399,7 @@ get_i387_core_state (fstate)
|
|||
* This is called by "info float" command
|
||||
*/
|
||||
void
|
||||
i386_mach3_float_info ()
|
||||
i386_mach3_float_info (void)
|
||||
{
|
||||
char buf[sizeof (struct fpstate) + 2 * sizeof (int)];
|
||||
boolean_t valid = FALSE;
|
||||
|
|
|
@ -68,8 +68,7 @@ fetch_inferior_registers (regno)
|
|||
Otherwise, REGNO specifies which register (so we can save time). */
|
||||
|
||||
void
|
||||
store_inferior_registers (regno)
|
||||
int regno;
|
||||
store_inferior_registers (int regno)
|
||||
{
|
||||
struct regs inferior_registers;
|
||||
struct fp_state inferior_fp_registers;
|
||||
|
@ -156,7 +155,7 @@ static struct core_fns i386mach_core_fns =
|
|||
};
|
||||
|
||||
void
|
||||
_initialize_core_i386mach ()
|
||||
_initialize_core_i386mach (void)
|
||||
{
|
||||
add_core_fns (&i386mach_core_fns);
|
||||
}
|
||||
|
|
|
@ -51,8 +51,7 @@ struct env387
|
|||
};
|
||||
|
||||
void
|
||||
fetch_inferior_registers (regno)
|
||||
int regno;
|
||||
fetch_inferior_registers (int regno)
|
||||
{
|
||||
struct reg inferior_registers;
|
||||
struct env387 inferior_fpregisters;
|
||||
|
@ -101,8 +100,7 @@ fetch_inferior_registers (regno)
|
|||
}
|
||||
|
||||
void
|
||||
store_inferior_registers (regno)
|
||||
int regno;
|
||||
store_inferior_registers (int regno)
|
||||
{
|
||||
struct reg inferior_registers;
|
||||
struct env387 inferior_fpregisters;
|
||||
|
@ -165,11 +163,8 @@ struct md_core
|
|||
};
|
||||
|
||||
static void
|
||||
fetch_core_registers (core_reg_sect, core_reg_size, which, ignore)
|
||||
char *core_reg_sect;
|
||||
unsigned core_reg_size;
|
||||
int which;
|
||||
CORE_ADDR ignore;
|
||||
fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, int which,
|
||||
CORE_ADDR ignore)
|
||||
{
|
||||
struct md_core *core_reg = (struct md_core *) core_reg_sect;
|
||||
|
||||
|
@ -212,7 +207,7 @@ static struct core_fns i386nbsd_core_fns =
|
|||
};
|
||||
|
||||
void
|
||||
_initialize_i386nbsd_nat ()
|
||||
_initialize_i386nbsd_nat (void)
|
||||
{
|
||||
add_core_fns (&i386nbsd_core_fns);
|
||||
}
|
||||
|
|
|
@ -87,9 +87,7 @@ static int regmap[] =
|
|||
*/
|
||||
|
||||
int
|
||||
i386_register_u_addr (blockend, regnum)
|
||||
int blockend;
|
||||
int regnum;
|
||||
i386_register_u_addr (int blockend, int regnum)
|
||||
{
|
||||
struct user u;
|
||||
int fpstate;
|
||||
|
@ -116,7 +114,7 @@ i386_register_u_addr (blockend, regnum)
|
|||
}
|
||||
|
||||
int
|
||||
kernel_u_size ()
|
||||
kernel_u_size (void)
|
||||
{
|
||||
return (sizeof (struct user));
|
||||
}
|
||||
|
@ -142,22 +140,14 @@ i386_insert_nonaligned_watchpoint (int, CORE_ADDR, CORE_ADDR, int, int);
|
|||
/* Insert a watchpoint. */
|
||||
|
||||
int
|
||||
i386_insert_watchpoint (pid, addr, len, rw)
|
||||
int pid;
|
||||
CORE_ADDR addr;
|
||||
int len;
|
||||
int rw;
|
||||
i386_insert_watchpoint (int pid, CORE_ADDR addr, int len, int rw)
|
||||
{
|
||||
return i386_insert_aligned_watchpoint (pid, addr, addr, len, rw);
|
||||
}
|
||||
|
||||
static int
|
||||
i386_insert_aligned_watchpoint (pid, waddr, addr, len, rw)
|
||||
int pid;
|
||||
CORE_ADDR waddr;
|
||||
CORE_ADDR addr;
|
||||
int len;
|
||||
int rw;
|
||||
i386_insert_aligned_watchpoint (int pid, CORE_ADDR waddr, CORE_ADDR addr,
|
||||
int len, int rw)
|
||||
{
|
||||
int i;
|
||||
int read_write_bits, len_bits;
|
||||
|
@ -216,12 +206,8 @@ i386_insert_aligned_watchpoint (pid, waddr, addr, len, rw)
|
|||
}
|
||||
|
||||
static int
|
||||
i386_insert_nonaligned_watchpoint (pid, waddr, addr, len, rw)
|
||||
int pid;
|
||||
CORE_ADDR waddr;
|
||||
CORE_ADDR addr;
|
||||
int len;
|
||||
int rw;
|
||||
i386_insert_nonaligned_watchpoint (int pid, CORE_ADDR waddr, CORE_ADDR addr,
|
||||
int len, int rw)
|
||||
{
|
||||
int align;
|
||||
int size;
|
||||
|
@ -257,10 +243,7 @@ i386_insert_nonaligned_watchpoint (pid, waddr, addr, len, rw)
|
|||
/* Remove a watchpoint. */
|
||||
|
||||
int
|
||||
i386_remove_watchpoint (pid, addr, len)
|
||||
int pid;
|
||||
CORE_ADDR addr;
|
||||
int len;
|
||||
i386_remove_watchpoint (int pid, CORE_ADDR addr, int len)
|
||||
{
|
||||
int i;
|
||||
int register_number;
|
||||
|
@ -285,8 +268,7 @@ i386_remove_watchpoint (pid, addr, len)
|
|||
/* Check if stopped by a watchpoint. */
|
||||
|
||||
CORE_ADDR
|
||||
i386_stopped_by_watchpoint (pid)
|
||||
int pid;
|
||||
i386_stopped_by_watchpoint (int pid)
|
||||
{
|
||||
int i;
|
||||
int status;
|
||||
|
|
|
@ -112,8 +112,7 @@ void fill_fpregset (fpregset_t *, int);
|
|||
register values. */
|
||||
|
||||
void
|
||||
supply_gregset (gregsetp)
|
||||
gregset_t *gregsetp;
|
||||
supply_gregset (gregset_t *gregsetp)
|
||||
{
|
||||
register int regi;
|
||||
register greg_t *regp = (greg_t *) gregsetp;
|
||||
|
@ -126,9 +125,7 @@ supply_gregset (gregsetp)
|
|||
}
|
||||
|
||||
void
|
||||
fill_gregset (gregsetp, regno)
|
||||
gregset_t *gregsetp;
|
||||
int regno;
|
||||
fill_gregset (gregset_t *gregsetp, int regno)
|
||||
{
|
||||
int regi;
|
||||
register greg_t *regp = (greg_t *) gregsetp;
|
||||
|
@ -176,8 +173,7 @@ static const int freg_offset_map[] =
|
|||
};
|
||||
|
||||
void
|
||||
supply_fpregset (fpregsetp)
|
||||
fpregset_t *fpregsetp;
|
||||
supply_fpregset (fpregset_t *fpregsetp)
|
||||
{
|
||||
int regi;
|
||||
|
||||
|
@ -212,9 +208,7 @@ supply_fpregset (fpregsetp)
|
|||
them all. */
|
||||
|
||||
void
|
||||
fill_fpregset (fpregsetp, regno)
|
||||
fpregset_t *fpregsetp;
|
||||
int regno;
|
||||
fill_fpregset (fpregset_t *fpregsetp, int regno)
|
||||
{
|
||||
int regi;
|
||||
|
||||
|
|
|
@ -34,17 +34,13 @@ void i387_to_double (char *from, char *to);
|
|||
void double_to_i387 (char *from, char *to);
|
||||
|
||||
void
|
||||
i387_to_double (from, to)
|
||||
char *from;
|
||||
char *to;
|
||||
i387_to_double (char *from, char *to)
|
||||
{
|
||||
floatformat_to_double (&floatformat_i387_ext, from, (double *) to);
|
||||
}
|
||||
|
||||
void
|
||||
double_to_i387 (from, to)
|
||||
char *from;
|
||||
char *to;
|
||||
double_to_i387 (char *from, char *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_control_bits (control)
|
||||
unsigned int control;
|
||||
print_387_control_bits (unsigned int control)
|
||||
{
|
||||
switch ((control >> 8) & 3)
|
||||
{
|
||||
|
@ -117,8 +112,7 @@ print_387_control_bits (control)
|
|||
}
|
||||
|
||||
void
|
||||
print_387_control_word (control)
|
||||
unsigned int control;
|
||||
print_387_control_word (unsigned int control)
|
||||
{
|
||||
printf_filtered ("control %s:", local_hex_string(control & 0xffff));
|
||||
print_387_control_bits (control);
|
||||
|
@ -126,8 +120,7 @@ print_387_control_word (control)
|
|||
}
|
||||
|
||||
static void
|
||||
print_387_status_bits (status)
|
||||
unsigned int status;
|
||||
print_387_status_bits (unsigned int status)
|
||||
{
|
||||
printf_unfiltered (" flags %d%d%d%d; ",
|
||||
(status & 0x4000) != 0,
|
||||
|
@ -149,8 +142,7 @@ print_387_status_bits (status)
|
|||
}
|
||||
|
||||
void
|
||||
print_387_status_word (status)
|
||||
unsigned int status;
|
||||
print_387_status_word (unsigned int status)
|
||||
{
|
||||
printf_filtered ("status %s:", local_hex_string (status & 0xffff));
|
||||
print_387_status_bits (status);
|
||||
|
|
|
@ -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. */
|
||||
|
||||
int
|
||||
i960_use_struct_convention (gcc_p, type)
|
||||
int gcc_p;
|
||||
struct type *type;
|
||||
i960_use_struct_convention (int gcc_p, struct type *type)
|
||||
{
|
||||
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. */
|
||||
|
||||
static void
|
||||
check_host ()
|
||||
check_host (void)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -170,11 +168,8 @@ check_host ()
|
|||
(((addr) < (lim)) ? next_insn (addr, pword1, pword2) : 0)
|
||||
|
||||
static CORE_ADDR
|
||||
examine_prologue (ip, limit, frame_addr, fsr)
|
||||
register CORE_ADDR ip;
|
||||
register CORE_ADDR limit;
|
||||
CORE_ADDR frame_addr;
|
||||
struct frame_saved_regs *fsr;
|
||||
examine_prologue (register CORE_ADDR ip, register CORE_ADDR limit,
|
||||
CORE_ADDR frame_addr, struct frame_saved_regs *fsr)
|
||||
{
|
||||
register CORE_ADDR next_ip;
|
||||
register int src, dst;
|
||||
|
@ -359,9 +354,7 @@ CORE_ADDR (ip);
|
|||
fairly expensive. */
|
||||
|
||||
void
|
||||
frame_find_saved_regs (fi, fsr)
|
||||
struct frame_info *fi;
|
||||
struct frame_saved_regs *fsr;
|
||||
frame_find_saved_regs (struct frame_info *fi, struct frame_saved_regs *fsr)
|
||||
{
|
||||
register CORE_ADDR next_addr;
|
||||
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. */
|
||||
|
||||
CORE_ADDR
|
||||
frame_args_address (fi, must_be_correct)
|
||||
struct frame_info *fi;
|
||||
frame_args_address (struct frame_info *fi, int must_be_correct)
|
||||
{
|
||||
struct frame_saved_regs fsr;
|
||||
CORE_ADDR ap;
|
||||
|
@ -459,8 +451,7 @@ frame_args_address (fi, must_be_correct)
|
|||
described by FI. Returns 0 if the address is unknown. */
|
||||
|
||||
CORE_ADDR
|
||||
frame_struct_result_address (fi)
|
||||
struct frame_info *fi;
|
||||
frame_struct_result_address (struct frame_info *fi)
|
||||
{
|
||||
struct frame_saved_regs fsr;
|
||||
CORE_ADDR ap;
|
||||
|
@ -551,8 +542,7 @@ leafproc_return (ip)
|
|||
unless the function is a leaf procedure. */
|
||||
|
||||
CORE_ADDR
|
||||
saved_pc_after_call (frame)
|
||||
struct frame_info *frame;
|
||||
saved_pc_after_call (struct frame_info *frame)
|
||||
{
|
||||
CORE_ADDR saved_pc;
|
||||
|
||||
|
@ -620,8 +610,7 @@ i960_pop_frame (void)
|
|||
corresponds. */
|
||||
|
||||
enum target_signal
|
||||
i960_fault_to_signal (fault)
|
||||
int fault;
|
||||
i960_fault_to_signal (int fault)
|
||||
{
|
||||
switch (fault)
|
||||
{
|
||||
|
@ -794,9 +783,7 @@ mem (memaddr, word1, word2, noprint)
|
|||
'pword2'. */
|
||||
|
||||
static CORE_ADDR
|
||||
next_insn (memaddr, pword1, pword2)
|
||||
unsigned int *pword1, *pword2;
|
||||
CORE_ADDR memaddr;
|
||||
next_insn (CORE_ADDR memaddr, unsigned int *pword1, unsigned int *pword2)
|
||||
{
|
||||
int len;
|
||||
char buf[8];
|
||||
|
@ -852,9 +839,7 @@ next_insn (memaddr, pword1, pword2)
|
|||
they display this frame. */
|
||||
|
||||
int
|
||||
mon960_frame_chain_valid (chain, curframe)
|
||||
CORE_ADDR chain;
|
||||
struct frame_info *curframe;
|
||||
mon960_frame_chain_valid (CORE_ADDR chain, struct frame_info *curframe)
|
||||
{
|
||||
struct symbol *sym;
|
||||
struct minimal_symbol *msymbol;
|
||||
|
@ -898,7 +883,7 @@ mon960_frame_chain_valid (chain, curframe)
|
|||
|
||||
|
||||
void
|
||||
_initialize_i960_tdep ()
|
||||
_initialize_i960_tdep (void)
|
||||
{
|
||||
check_host ();
|
||||
|
||||
|
|
|
@ -296,9 +296,7 @@ static int u_offsets[] =
|
|||
};
|
||||
|
||||
CORE_ADDR
|
||||
register_addr (regno, blockend)
|
||||
int regno;
|
||||
CORE_ADDR blockend;
|
||||
register_addr (int regno, CORE_ADDR blockend)
|
||||
{
|
||||
CORE_ADDR addr;
|
||||
|
||||
|
@ -356,8 +354,7 @@ int ia64_cannot_store_register (regno)
|
|||
}
|
||||
|
||||
void
|
||||
supply_gregset (gregsetp)
|
||||
gregset_t *gregsetp;
|
||||
supply_gregset (gregset_t *gregsetp)
|
||||
{
|
||||
int regi;
|
||||
greg_t *regp = (greg_t *) gregsetp;
|
||||
|
@ -393,9 +390,7 @@ supply_gregset (gregsetp)
|
|||
}
|
||||
|
||||
void
|
||||
fill_gregset (gregsetp, regno)
|
||||
gregset_t *gregsetp;
|
||||
int regno;
|
||||
fill_gregset (gregset_t *gregsetp, int regno)
|
||||
{
|
||||
int regi;
|
||||
greg_t *regp = (greg_t *) gregsetp;
|
||||
|
@ -439,8 +434,7 @@ fill_gregset (gregsetp, regno)
|
|||
idea of the current floating point register values. */
|
||||
|
||||
void
|
||||
supply_fpregset (fpregsetp)
|
||||
fpregset_t *fpregsetp;
|
||||
supply_fpregset (fpregset_t *fpregsetp)
|
||||
{
|
||||
register int regi;
|
||||
char *from;
|
||||
|
@ -458,9 +452,7 @@ supply_fpregset (fpregsetp)
|
|||
them all. */
|
||||
|
||||
void
|
||||
fill_fpregset (fpregsetp, regno)
|
||||
fpregset_t *fpregsetp;
|
||||
int regno;
|
||||
fill_fpregset (fpregset_t *fpregsetp, int regno)
|
||||
{
|
||||
int regi;
|
||||
char *to;
|
||||
|
|
|
@ -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
|
||||
to figure out if Z-packets are supported or not. Oh, well. */
|
||||
unsigned char *
|
||||
ia64_breakpoint_from_pc (pcptr, lenptr)
|
||||
CORE_ADDR *pcptr;
|
||||
int *lenptr;
|
||||
ia64_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
|
||||
{
|
||||
static unsigned char breakpoint[] =
|
||||
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue