* monitor.c (monitor_load_srec monitor_make_srec): Move all
authorStu Grossman <grossman@cygnus>
Tue, 14 Nov 1995 23:40:18 +0000 (23:40 +0000)
committerStu Grossman <grossman@cygnus>
Tue, 14 Nov 1995 23:40:18 +0000 (23:40 +0000)
S-record download code into srec.c.
* srec.c srec.h:  New files.  Contain S-record loading routines
formerly in monitor.c.
* serial.c serial.h:  New routine just like fprintf, but uses
serial_t instead of FILE *.
* sh-tdep.c (frame_find_saved_regs init_extra_frame_info):
Don't add four to saved pc (makes things match manual).  Also, fix
bug where we didn't get pc from stack frame correctly.
* config/sh/tm-sh.h (SAVED_PC_AFTER_CALL):  Don't add four to
saved pc.  Real hardware does this for you.
* sh3-rom.c (sh3_load):  New routine.  Sets up for download then
calls generic S-record loader.
* config/h8300/h8300.mt, config/h8500/h8500.mt,
config/m68k/monitor.mt, config/pa/hppapro.mt, config/sh/sh.mt:
Add srec.o to TDEPFILES.

gdb/config/h8500/h8500.mt
gdb/config/pa/hppapro.mt
gdb/config/sh/sh.mt
gdb/config/sh/tm-sh.h

index 711fdbea6d8a8955fa0ea45cc326fa22639eccfd..61677618f29d7c29ae5460773671e053c18231c8 100644 (file)
@@ -1,5 +1,5 @@
 # Target: H8500 with HMS monitor and H8 simulator
-TDEPFILES= h8500-tdep.o monitor.o remote-hms.o
+TDEPFILES= h8500-tdep.o monitor.o remote-hms.o srec.o
 TM_FILE= tm-h8500.h
 
 SIM_OBS = remote-sim.o
index af4b1884b064828a2c2082e5d6e832c361becf29..b1d1cbb40fd5196855ad44015e585e20294f0c5d 100644 (file)
@@ -1,3 +1,3 @@
 # Target: PA based debug monitor
-TDEPFILES= hppa-tdep.o op50-rom.o w89k-rom.o monitor.o xmodem.o
+TDEPFILES= hppa-tdep.o op50-rom.o w89k-rom.o monitor.o xmodem.o srec.o
 TM_FILE= tm-pro.h
index 6182b877d9ce1375fa7d8399016e0e8740bb40fa..c08948bd1d050ee62189dfde73bd7d8c4b3bbd69 100644 (file)
@@ -1,5 +1,5 @@
 # Target: Hitachi Super-H with ICE and simulator
-TDEPFILES= sh-tdep.o monitor.o sh3-rom.o remote-e7000.o ser-e7kpc.o
+TDEPFILES= sh-tdep.o monitor.o sh3-rom.o remote-e7000.o ser-e7kpc.o srec.o
 TM_FILE= tm-sh.h
 
 SIM_OBS = remote-sim.o
index 8f56ebb546a2146392450ddba69f38ff5b1cd2b7..726cb96f318d57f6d260e1fdc19edf3a5367dd23 100644 (file)
@@ -49,7 +49,7 @@ extern CORE_ADDR sh_skip_prologue ();
    The return address is the value saved in the PR register + 4  */
 
 #define SAVED_PC_AFTER_CALL(frame) \
-  (ADDR_BITS_REMOVE(read_register(PR_REGNUM))+4)
+  (ADDR_BITS_REMOVE(read_register(PR_REGNUM)))
 
 /* Stack grows downward.  */