Make --target=m88k buildable again.

This commit is contained in:
Kevin Buettner 2001-04-02 14:47:22 +00:00
parent f5c37c66ad
commit 971ff5453a
4 changed files with 27 additions and 16 deletions

View File

@ -1,3 +1,20 @@
2001-04-02 Kevin Buettner <kevinb@redhat.com>
* m88k-tdep.c (examine_prologue): Change type of ``insn'' from
unsigned int to unsigned long. Also, fix format string.
(pop_frame): Fix PC_IN_CALL_DUMMY() call so that it doesn't
use an undeclared variable. Also, delete declaration and
initialization of ``fp'' because it is otherwise unused.
* remote-bug.c (sleep): Delete declaration.
(bug_store_register, bug_write_memory, bug_read_memory)
(bug_insert_breakpoint, bug_remove_breakpoint): Fix sprintf()
format statements and cast certain sprintf() arguments to
eliminate warnings.
(bug_load): Likewise for call to printf_filtered().
* config/m88k/tm-m88k.h (FIX_CALL_DUMMY): Eliminate
assignment to ``pc''. The necessary assignment is done in
hand_function_call() after the invocation of FIX_CALL_DUMMY().
2001-03-20 Daniel Berlin <dberlin@redhat.com>
* symtab.c (completion_list_add_name): Remove duplicate string checks,

View File

@ -585,7 +585,6 @@ extern void m88k_push_dummy_frame ();
(((unsigned long) (fun)) >> 16); \
*(unsigned long *)((char *) (dummy) + 0xa4) |= \
(((unsigned long) (fun)) & 0xffff); \
pc = text_end; \
}
/* Stack must be aligned on 64-bit boundaries when synthesizing

View File

@ -246,7 +246,7 @@ examine_prologue (register CORE_ADDR ip, register CORE_ADDR limit,
{
register CORE_ADDR next_ip;
register int src;
unsigned int insn;
unsigned long insn;
int size, offset;
char must_adjust[32]; /* If set, must adjust offsets in fsr */
int sp_offset = -1; /* -1 means not set (valid must be mult of 8) */
@ -389,7 +389,7 @@ end_of_prologue_found:
/* (we hope...) */
if (fsr->regs[SP_REGNUM] != 0
&& fsr->regs[SP_REGNUM] != frame_sp - sp_offset)
fprintf_unfiltered (gdb_stderr, "Bad saved SP value %x != %x, offset %x!\n",
fprintf_unfiltered (gdb_stderr, "Bad saved SP value %lx != %lx, offset %x!\n",
fsr->regs[SP_REGNUM],
frame_sp - sp_offset, sp_offset);
@ -568,14 +568,12 @@ void
pop_frame (void)
{
register struct frame_info *frame = get_current_frame ();
register CORE_ADDR fp;
register int regnum;
struct frame_saved_regs fsr;
fp = FRAME_FP (frame);
get_frame_saved_regs (frame, &fsr);
if (PC_IN_CALL_DUMMY (read_pc (), read_register (SP_REGNUM), FRAME_FP (fi)))
if (PC_IN_CALL_DUMMY (read_pc (), read_register (SP_REGNUM), frame->frame))
{
/* FIXME: I think get_frame_saved_regs should be handling this so
that we can deal with the saved registers properly (e.g. frame

View File

@ -37,9 +37,6 @@
#include "remote-utils.h"
extern int sleep ();
/* External data declarations */
extern int stop_soon_quietly; /* for wait_for_inferior */
@ -142,7 +139,7 @@ bug_load (char *args, int fromtty)
char *buffer = xmalloc (srec_frame);
printf_filtered ("%s\t: 0x%4x .. 0x%4x ", s->name, s->vma, s->vma + s->_raw_size);
printf_filtered ("%s\t: 0x%4lx .. 0x%4lx ", s->name, s->vma, s->vma + s->_raw_size);
gdb_flush (gdb_stdout);
for (i = 0; i < s->_raw_size; i += srec_frame)
{
@ -514,9 +511,9 @@ bug_store_register (int regno)
if (target_is_m88110 && regno == SFIP_REGNUM)
return;
else if (regno < XFP_REGNUM)
sprintf (buffer, "rs %s %08x",
sprintf (buffer, "rs %s %08lx",
regname,
read_register (regno));
(long) read_register (regno));
else
{
unsigned char *fpreg_buf =
@ -650,7 +647,7 @@ bug_write_memory (CORE_ADDR memaddr, unsigned char *myaddr, int len)
thisgo = srec_bytes;
address = memaddr + done;
sprintf (buf, "S3%02X%08X", thisgo + 4 + 1, address);
sprintf (buf, "S3%02X%08lX", thisgo + 4 + 1, (long) address);
buf += 12;
checksum += (thisgo + 4 + 1
@ -740,7 +737,7 @@ bug_read_memory (CORE_ADDR memaddr, unsigned char *myaddr, int len)
unsigned int inaddr;
unsigned int checksum;
sprintf (request, "du 0 %x:&%d", memaddr, len);
sprintf (request, "du 0 %lx:&%d", (long) memaddr, len);
sr_write_cr (request);
p = buffer = alloca (len);
@ -842,7 +839,7 @@ bug_insert_breakpoint (CORE_ADDR addr, char *save)
char buffer[100];
num_brkpts++;
sprintf (buffer, "br %x", addr);
sprintf (buffer, "br %lx", (long) addr);
sr_write_cr (buffer);
gr_expect_prompt ();
return (0);
@ -868,7 +865,7 @@ bug_remove_breakpoint (CORE_ADDR addr, char *save)
char buffer[100];
num_brkpts--;
sprintf (buffer, "nobr %x", addr);
sprintf (buffer, "nobr %lx", (long) addr);
sr_write_cr (buffer);
gr_expect_prompt ();