From d9951af428a55c7ecc156c3d8aa4ccea02b99745 Mon Sep 17 00:00:00 2001 From: Stu Grossman Date: Thu, 5 Sep 1996 01:01:05 +0000 Subject: * Makefile.in: Add mswin to SUBDIRS. Add rules for mswin/libwingdb.a and remote-wiggler.o. * breakpoint.c (breakpoint_here_p): Clean up bp enabled test. * (breakpoint_inserted_here_p): New func, just like breakpoint_here_p, except it's honest. Honestly. * breakpoint.h: Proto for above. start-sanitize-gdbtk * configure configure.in: Add host *windows* to list of hosts that don't support GDBtk. end-sanitize-gdbtk * configure configure.in: Add mswin to configdirs if host is i[3456]86-*-windows. * core-aout.c (fetch_core_registers register_addr) gdbcore.h: Change all vars that can contain addresses to type CORE_ADDR. * findvar.c (supply_register): Allow val to be NULL. This means that regno is unsupported. * (read_pc read_pc_pid write_pc write_pc_pid): Make non-pid forms just call pid forms with inferior_pid so that there's only once place to hack PC's and such. * infrun.c (proceed): Don't skip breakpoints if user changed PC. * remote-wiggler.c: New file. Support for BDM interface from Macraigor Systems. * serial.c: Enhance serial logging capability. Add hex and octal output modes (set remotelogbase {hex|octal|ascii}. Also log breaks, timeouts, errors, and eofs. * serial.h: Redefine SERIAL_SEND_BREAK to go through a wrapper function so that we can log breaks. Don't export serial_logfile or serial_logfp. * top.c (execute_command): Don't test for serial_logfp here. Just call serial_log_comand, and let serial.c sort it out. * valops.c (value_of_variable): Don't attempt to establish frames for static and global variables. This makes things work a bit better if the stack or frame pointer is trashed. * config/m68k/monitor.mt (TDEPFILES): Add remote-wiggler.o. * config/m68k/tm-m68k.h: Define STACK_ALIGN. CPU32 can't hack misaligned stacks during function calls. --- gdb/core-aout.c | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) (limited to 'gdb/core-aout.c') diff --git a/gdb/core-aout.c b/gdb/core-aout.c index ec755c5..a529cf9 100644 --- a/gdb/core-aout.c +++ b/gdb/core-aout.c @@ -52,8 +52,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #endif -static void -fetch_core_registers PARAMS ((char *, unsigned, int, unsigned)); +static void fetch_core_registers PARAMS ((char *core_reg_sect, + unsigned core_reg_size, int which, + CORE_ADDR reg_addr)); /* Extract the register values out of the core file and store them where `read_register' will find them. @@ -73,12 +74,12 @@ fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr) char *core_reg_sect; unsigned core_reg_size; int which; - unsigned reg_addr; + CORE_ADDR reg_addr; { - register int regno; - register unsigned int addr; + int regno; + CORE_ADDR addr; int bad_reg = -1; - register reg_ptr = -reg_addr; /* Original u.u_ar0 is -reg_addr. */ + CORE_ADDR reg_ptr = -reg_addr; /* Original u.u_ar0 is -reg_addr. */ int numregs = ARCH_NUM_REGS; /* If u.u_ar0 was an absolute address in the core file, relativize it now, @@ -87,23 +88,21 @@ fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr) CORE_REGISTER_ADDR to offset to the other registers. If this is a modern core file without a upage, reg_ptr will be zero and this is all a big NOP. */ - if (reg_ptr > (int) core_reg_size) + if (reg_ptr > core_reg_size) reg_ptr -= KERNEL_U_ADDR; for (regno = 0; regno < numregs; regno++) { addr = CORE_REGISTER_ADDR (regno, reg_ptr); - if (addr >= core_reg_size) { - if (bad_reg < 0) - bad_reg = regno; - } else { - supply_register (regno, core_reg_sect + addr); - } + if (addr >= core_reg_size + && bad_reg < 0) + bad_reg = regno; + else + supply_register (regno, core_reg_sect + addr); } + if (bad_reg >= 0) - { - error ("Register %s not found in core file.", reg_names[bad_reg]); - } + error ("Register %s not found in core file.", reg_names[bad_reg]); } @@ -112,12 +111,12 @@ fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr) /* Return the address in the core dump or inferior of register REGNO. BLOCKEND is the address of the end of the user structure. */ -unsigned int +CORE_ADDR register_addr (regno, blockend) int regno; - int blockend; + CORE_ADDR blockend; { - int addr; + CORE_ADDR addr; if (regno < 0 || regno >= ARCH_NUM_REGS) error ("Invalid register number %d.", regno); -- cgit v1.1