diff options
author | Kevin Buettner <kevinb@redhat.com> | 2001-04-02 14:47:22 +0000 |
---|---|---|
committer | Kevin Buettner <kevinb@redhat.com> | 2001-04-02 14:47:22 +0000 |
commit | 4bf91b3d2f129876b00c4655241caeaeab40af0e (patch) | |
tree | 10d420a197245108c85176076c4f22b17949f75d | |
parent | 296c084014c4117a01984221078c56ad1bbc29bd (diff) | |
download | gdb-4bf91b3d2f129876b00c4655241caeaeab40af0e.tar.gz |
Make --target=m88k buildable again.
-rw-r--r-- | gdb/ChangeLog | 17 | ||||
-rw-r--r-- | gdb/config/m88k/tm-m88k.h | 1 | ||||
-rw-r--r-- | gdb/m88k-tdep.c | 8 | ||||
-rw-r--r-- | gdb/remote-bug.c | 17 |
4 files changed, 27 insertions, 16 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index acba6c29e00..fcd036dd838 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -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, diff --git a/gdb/config/m88k/tm-m88k.h b/gdb/config/m88k/tm-m88k.h index d74eb80c795..077ec32a6f3 100644 --- a/gdb/config/m88k/tm-m88k.h +++ b/gdb/config/m88k/tm-m88k.h @@ -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 diff --git a/gdb/m88k-tdep.c b/gdb/m88k-tdep.c index b978dd9aeec..195722b2254 100644 --- a/gdb/m88k-tdep.c +++ b/gdb/m88k-tdep.c @@ -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 diff --git a/gdb/remote-bug.c b/gdb/remote-bug.c index c36f5db99ee..96c24913a73 100644 --- a/gdb/remote-bug.c +++ b/gdb/remote-bug.c @@ -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 (); |