Commit Graph

57 Commits

Author SHA1 Message Date
Andrew Cagney ea7c478fe2 s/value_ptr/struct value */ 2001-07-15 20:10:02 +00:00
Jim Blandy 75af7f6801 Clean up the D10V port so that GDB and the target program no
longer disagree on how big pointers are.
* findvar.c (value_from_register): Remove special case code for D10V.
* printcmd.c (print_frame_args): Same.
* valops.c (value_at, value_fetch_lazy): Same.
* values.c (unpack_long): Same.
* gdbarch.sh: Changes to effect the following:
* gdbarch.h (GDB_TARGET_IS_D10V, D10V_MAKE_DADDR,
gdbarch_d10v_make_daddr_ftype, gdbarch_d10v_make_daddr,
set_gdbarch_d10v_make_daddr, D10V_MAKE_IADDR,
gdbarch_d10v_make_iaddr_ftype, gdbarch_d10v_make_iaddr,
set_gdbarch_d10v_make_iaddr, D10V_DADDR_P,
gdbarch_d10v_daddr_p_ftype, gdbarch_d10v_daddr_p,
set_gdbarch_d10v_daddr_p, D10V_IADDR_P,
gdbarch_d10v_iaddr_p_ftype, gdbarch_d10v_iaddr_p,
set_gdbarch_d10v_iaddr_p, D10V_CONVERT_DADDR_TO_RAW,
gdbarch_d10v_convert_daddr_to_raw_ftype,
gdbarch_d10v_convert_daddr_to_raw,
set_gdbarch_d10v_convert_daddr_to_raw, D10V_CONVERT_IADDR_TO_RAW,
gdbarch_d10v_convert_iaddr_to_raw_ftype,
gdbarch_d10v_convert_iaddr_to_raw,
set_gdbarch_d10v_convert_iaddr_to_raw): Delete declarations.
* gdbarch.c: Delete the corresponding definitions.
(struct gdbarch): Delete members d10v_make_daddr,
d10v_make_iaddr, d10v_daddr_p, d10v_iaddr_p,
d10v_convert_daddr_to_raw, and d10v_convert_iaddr_to_raw.
(startup_gdbarch): Remove initializers for the above.
(verify_gdbarch, gdbarch_dump): Don't verify or dump them any
more.
* d10v-tdep.c (d10v_register_virtual_type): Rather that
claiming the stack pointer and PC are 32 bits long (which they
aren't), say that the stack pointer is an int16_t, and the
program counter is a function pointer.  This allows the rest
of GDB to make the appropriate conversions between the code
pointer format and real addresses.
(d10v_register_convertible, d10v_register_convert_to_virtual,
d10v_register_convert_to_raw): Delete function; no registers
are convertible now, so we use
generic_register_convertible_not instead.
(d10v_address_to_pointer, d10v_pointer_to_address): New gdbarch
methods.
(d10v_push_arguments, d10v_extract_return_value): Remove special
cases for code and data pointers.
(d10v_gdbarch_init): Set gdbarch_ptr_bit to 16, so that GDB and
the target agree on how large pointers are.  Say that addresses
are 32 bits long.  Register the address_to_pointer and
pointer_to_address conversion functions.  Since no registers are
convertible now, register generic_register_convertible_not as the
gdbarch_register_convertible method instead of
d10v_register_convertible.  Remove registrations for
d10v_register_convert_to_virtual,
d10v_register_convert_to_raw, gdbarch_d10v_make_daddr,
gdbarch_d10v_make_iaddr, gdbarch_d10v_daddr_p,
gdbarch_d10v_iaddr_p, gdbarch_d10v_convert_daddr_to_raw, and
gdbarch_d10v_convert_iaddr_to_raw.
2001-07-10 21:24:48 +00:00
Jim Blandy 7b57012552 * d10v-tdep.c (d10v_frame_chain, d10v_frame_init_saved_regs,
show_regs, d10v_read_pc, d10v_write_pc, d10v_read_sp,
d10v_write_sp, d10v_write_fp, d10v_read_fp,
d10v_push_return_address): Call the functions d10v_make_daddr,
d10v_make_iaddr, d10v_convert_iaddr_to_raw, and
d10v_convert_daddr_to_raw, not the global macros D10V_MAKE_DADDR,
D10V_MAKE_IADDR, D10V_CONVERT_IADDR_TO_RAW, and
D10V_CONVERT_DADDR_TO_RAW.
2001-07-05 21:27:08 +00:00
Jim Blandy bf93dfed85 * d10v-tdep.c (d10v_ts2_dmap_register): Doc fix. 2001-06-28 23:12:18 +00:00
Jim Blandy f5e1cf12f7 * d10v-tdep.c (10v_frame_chain_valid, d10v_use_struct_convention,
d10v_breakpoint_from_pc, d10v_register_byte,
d10v_register_raw_size, d10v_register_virtual_size,
d10v_register_virtual_type, d10v_register_convertible,
d10v_register_convert_to_virtual, d10v_register_convert_to_raw,
d10v_make_daddr, d10v_make_iaddr, d10v_daddr_p, d10v_iaddr_p,
d10v_convert_iaddr_to_raw, d10v_convert_daddr_to_raw,
d10v_store_struct_return, d10v_store_return_value,
d10v_extract_struct_value_address, d10v_frame_saved_pc,
d10v_saved_pc_after_call, d10v_pop_frame, d10v_skip_prologue,
d10v_frame_chain, d10v_frame_init_saved_regs,
d10v_init_extra_frame_info, d10v_read_pc, d10v_write_pc,
d10v_read_sp, d10v_write_sp, d10v_write_fp, d10v_read_fp,
d10v_push_return_address, d10v_push_arguments,
d10v_extract_return_value): Make these functions static.
2001-06-28 22:10:41 +00:00
Kevin Buettner 39f770628a Phase 1 of the ptid_t changes. 2001-05-04 04:15:33 +00:00
Kevin Buettner b6ba6518e9 Update/correct copyright notices. 2001-03-06 08:22:02 +00:00
Andrew Cagney 4e052eda91 Create new file regcache.h. Update all uses. 2001-03-01 01:39:22 +00:00
Andrew Cagney 8e65ff28b0 Add __FILE__ and __LINE__ parameter to internal_error() /
internal_verror().
2001-02-08 06:03:54 +00:00
Michael Snyder c347ee3e51 2000-12-20 Michael Snyder <msnyder@mvstp600e.cygnus.com>
* arch-utils.c (default_frame_address): New function.  Default
        implementation of frame_args_address and frame_locals_address.
        * arch-utils.h (default_frame_address): Export.
        * d10v-tdep.c (d10v_gdbarch_init): Use default_frame_address.
        (d10v_frame_args_address, d10v_frame_locals_address): Delete.
        * sh-tdep.c (sh_gdbarch_init): Use default_frame_address.
        (sh_frame_args_address, sh_frame_locals_address): Delete.
        * sparc-tdep.c (sparc_gdbarch_init): Use default_frame_address.
        (sparc_frame_address): Delete.
2001-01-02 20:21:53 +00:00
Kevin Buettner b8c9b27d1e Replace free() with xfree(). 2000-12-15 01:01:51 +00:00
David Anderson 114d1f2c1d Spelling correction in comment: dependant->dependent 2000-09-01 23:45:13 +00:00
Kevin Buettner 726230095e Protoization. 2000-08-13 01:22:17 +00:00
Andrew Cagney 0a49d05ee0 Multi-arch EXTRA_STACK_ALIGNMENT_NEEDED (nee NO_EXTRA_ALIGNMENT_NEEDED). 2000-08-04 03:17:57 +00:00
Andrew Cagney 7c7651b2d0 Multi-arch REGISTER_SIM_REGNO. Update d10v. 2000-08-02 11:05:50 +00:00
Kevin Buettner fba45db2fa Protoization. 2000-07-30 01:48:28 +00:00
Kevin Buettner 507f3c78fb Eliminate PARAMS from function pointer declarations. 2000-06-04 00:41:10 +00:00
Andrew Cagney f0d4cc9e0e Multiarch TARGET_FLOAT_FORMAT, TARGET_DOUBLE_FORMAT,
TARGET_LONG_DOUBLE_FORMAT.  Update d10v.
2000-06-02 01:59:13 +00:00
Kevin Buettner a14ed312fd PARAMS removal. 2000-05-28 01:12:42 +00:00
Andrew Cagney 28d069e647 Include "arch-utils.h". 2000-04-27 04:25:45 +00:00
Andrew Cagney 23964bcd46 * d10v-tdep.c (d10v_gdbarch_init): Initialize stack_align.
(d10v_stack_align): Make static.
* config/d10v/tm-d10v.h (STACK_ALIGN): Delete.
2000-04-21 04:21:21 +00:00
Andrew Cagney 489137c036 Stop GDB mis-aligning the stack when doing inferior function calls. 2000-02-09 04:46:47 +00:00
Jason Molenda d9fcf2fb1c import gdb-2000-02-01 snapshot 2000-02-02 00:21:19 +00:00
Jason Molenda 4ce44c668d import gdb-1999-11-16 snapshot 1999-11-17 02:31:06 +00:00
Jason Molenda 11cf874164 import gdb-1999-11-08 snapshot 1999-11-09 01:23:30 +00:00
Jason Molenda c2c6d25f0d import gdb-1999-09-21 1999-09-22 03:28:34 +00:00
Jason Molenda cff3e48be7 import gdb-1999-09-13 snapshot 1999-09-13 21:40:00 +00:00
Stan Shebs d4f3574e77 import gdb-1999-09-08 snapshot 1999-09-09 00:02:17 +00:00
Jason Molenda 104c1213b4 import gdb-1999-08-30 snapshot 1999-08-31 01:14:27 +00:00
Jason Molenda c5aa993b1f import gdb-1999-07-07 post reformat 1999-07-07 20:19:36 +00:00
Jason Molenda 0f71a2f66f import gdb-1999-06-14 snapshot 1999-06-14 18:08:47 +00:00
Jason Molenda cce74817d9 import gdb-1999-06-07 snapshot 1999-06-07 19:19:32 +00:00
Jason Molenda ac9a91a77c import gdb-1999-06-01 snapshot 1999-06-01 15:44:41 +00:00
Jason Molenda 392a587b05 import gdb-1999-05-25 snapshot 1999-05-25 18:09:09 +00:00
Stan Shebs 7a292a7adf import gdb-19990422 snapshot 1999-04-26 18:34:20 +00:00
Stan Shebs c906108c21 Initial creation of sourceware repository 1999-04-16 01:35:26 +00:00
Stan Shebs 071ea11e85 Initial creation of sourceware repository 1999-04-16 01:34:07 +00:00
Andrew Cagney b696009406 CARP:
Cleanup FRAME_CHAIN_VALID. Replace all macro's with functions.
1998-11-30 10:56:16 +00:00
Andrew Cagney 98760eab33 CARP: Convert macro definitions of USE_STRUCT_CONVENTION into target
specific functions.
1998-11-23 12:35:23 +00:00
Andrew Cagney 19735aeaa1 * d10v-tdep.c (d10v_extract_return_value): Wierd. GCC wants to return
odd sized register quantities with only half of the first register used!
* config/d10v/tm-d10v.h (USE_STRUCT_CONVENTION): Use stack when size > 8.
1998-04-01 04:52:37 +00:00
Andrew Cagney 9df3ba709f * d10v-tdep.c (show_regs): Avoid use of %llx when printing 8 byte
accumulators.
1998-02-12 07:32:58 +00:00
Andrew Cagney f6826586c5 D10V memory map changed. Update.
Replace all references to [ID]MEM_ADDR with conversion macros.
1998-02-10 07:05:32 +00:00
Andrew Cagney 608addd440 * config/d10v/tm-d10v.h (D10V_CONVERT_IADDR_TO_RAW,
D10V_CONVERT_DADDR_TO_RAW): Define.
	* d10v-tdep.c (d10v_push_arguments): Re-write.  Pass arguments in
 	registers, regardless of their size, when they fit.
1998-02-06 07:26:11 +00:00
Andrew Cagney 9961ca7ab5 o Update GDB to match changes to d10v abi (ARG1 in r0 instead of r2).
o Fix code assuming that host/target were both bigendian.
o Replace d10v push dummy frame code with version using new common
  generic generic version.
o Find/fix more cases where a value needs to be translated to/from
  instruction (IMAP) or data (DMAP) spaces.
1998-02-06 04:09:35 +00:00
Fred Fish 77636dea0a * config/d10v/tm-d10v.h (CALL_DUMMY): Define as "{ 0 }".
(TARGET_READ_FP): Define to d10v_read_fp rather than d10v_read_sp.
	(TARGET_WRITE_FP): Define to d10v_write_fp rather than d10v_write_sp.
	(d10v_write_fp, d10v_read_fp): Add prototypes.
	* symtab.c (decode_line_1): Remove assignment of sals[0].pc field.
	* symfile.c (simple_overlay_update, simple_overlay_update_1):
	Ignore the size of overlay sections.  This check is redundant anyway.
	* printcmd.c (print_frame_args): Ditto.
	* valops.c (value_fetch_lazy): Ditto.
	* values.c (unpack_long): Ditto.
	* d10v-tdep.c (d10v_frame_chain, d10v_frame_find_saved_regs,
	d10v_init_extra_frame_info): Fix some minor bugs so the finish command
 	works properly.
	(show_regs): Change num1 and num2 types from "long long" to "LONGEST".
	(d10v_read_fp, d10v_write_fp): New functions.
	(d10v_push_arguments): Remove unneeded assigns to "val" and "contents".
	(d10v_push_arguments): Fix for pointers and structs.
	(d10v_extract_return_value): Fix for pointers and chars.
1998-01-23 15:44:12 +00:00
Stan Shebs a9b9b4071f * remote.c (target_resume_hook, target_wait_loop_hook): New
globals.
 	(remote_resume, remote_wait): Use them.
	* d10v-tdep.c: Set the above hooks.
	(tracesource): New GDB variable, controls source display in
 	traces.
	(display_trace): Find and display source line if requested.
	(trace_info): Mention empty trace buffer if appropriate.
	(tdisassemble_command): Robustify argument handling.
1997-03-24 00:08:26 +00:00
Martin Hunt 294f72b25b Sun Dec 22 15:52:25 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* d10v-tdep.c (d10v_skip_prologue): PR11287.  Fix problem where
	some breakpoints weren't being set.
1996-12-22 23:56:01 +00:00
Stan Shebs 48712b3060 * d10v-tdep.c: Add support for examination and interpretation
of instruction trace buffer.
	(trace, untrace, info trace, tdisassemble): New commands.
1996-12-06 07:37:24 +00:00
Martin Hunt d716b33d85 Wed Nov 20 19:09:16 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* infcmd.c (do_registers_info): Call val_print with the
	virtual buf instead of the raw buf.  Needed for REGISTER_CONVERT
	to work with non-floating point regs.

start-sanitize-d10v
	* d10v-tdep.c (d10v_skip_prologue): If we have line debugging
	information, then the end of the prologue should the first
	assembly instruction of the first source line.

	* values.c (value_from_longest): Put in D10V call to
	fix up address pointers.

	* config/d10v/tm-d10v.h (REGISTER_VIRTUAL_SIZE): Modified.
	(REGISTER_VIRTUAL_TYPE): Modified for PC_REGNUM and SP_REGNUM.
	(REGISTER_CONVERTIBLE): Make PC and SP convertible.
	(REGISTER_CONVERT_TO_VIRTUAL): Define.
	(REGISTER_CONVERT_TO_RAW): Define.
	(D10V_MAKE_DADDR): Define.
	(D10V_MAKE_IADDR): Define.
end-sanitize-d10v
1996-11-21 03:19:37 +00:00
Martin Hunt 81a6f5b208 Thu Nov 7 15:19:08 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* d10v-tdep.c: Fix some problems with inferior function calls.
	* config/d10v/tm-d10v.h (EXTRA_FRAME_INFO): Change dummy to be
	a pointer to the dummy's stack instead of just a flag.
1996-11-07 23:23:57 +00:00