Commit Graph

428 Commits

Author SHA1 Message Date
Jim Blandy 4478b372e9 * gdbarch.sh (POINTER_TO_ADDRESS, ADDRESS_TO_POINTER): Two new
functions which architectures can redefine, defaulting to
generic_pointer_to_address and generic_address_to_pointer.
* findvar.c (extract_typed_address, store_typed_address,
generic_pointer_to_address, generic_address_to_pointer): New
functions.
(POINTER_TO_ADDRESS, ADDRESS_TO_POINTER): Provide default
definitions.
(extract_address, store_address): Doc fixes.
* values.c (value_as_pointer): Doc fix.
(value_from_pointer): New function.
* defs.h (extract_typed_address, store_typed_address): New
declarations.
* inferior.h (generic_address_to_pointer,
generic_pointer_to_address): New declarations.
* value.h (value_from_pointer): New declaration.

* ax-gdb.c (const_var_ref): Use value_from_pointer, not
value_from_longest.
* blockframe.c (generic_push_dummy_frame): Use read_pc and
read_sp, not read_register.
* c-valprint.c (c_val_print): Use extract_typed_address instead of
extract_address to extract vtable entries and references.
* cp-valprint.c (cp_print_value_fields): Use value_from_pointer
instead of value_from_longest to extract the vtable's address.
* eval.c (evaluate_subexp_standard): Use value_from_pointer
instead of value_from_longest to compute `this', and for doing
pointer-to-member dereferencing.
* findvar.c (read_register): Use extract_unsigned_integer, not
extract_address.
(read_var_value): Use store_typed_address instead of store_address
for building label values.
(locate_var_value): Use value_from_pointer instead of
value_from_longest.
* hppa-tdep.c (find_stub_with_shl_get): Use value_from_pointer,
instead of value_from_longest, to build arguments to __d_shl_get.
* printcmd.c (set_next_address): Use value_from_pointer, not
value_from_longest.
(x_command): Use value_from_pointer, not value_from_longest.
* tracepoint.c (set_traceframe_context): Use value_from_pointer,
not value_from_longest.
* valarith.c (value_add, value_sub): Use value_from_pointer, not
value_from_longest.
* valops.c (find_function_in_inferior, value_coerce_array,
value_coerce_function, value_addr, hand_function_call): Same.
* value.h (COERCE_REF): Use unpack_pointer, not unpack_long.
* values.c (unpack_long): Use extract_typed_address to produce
addresses from pointers and references, not extract_address.
(value_from_longest): Use store_typed_address instead of
store_address to produce pointer and reference values.
2000-04-14 18:43:41 +00:00
Andrew Cagney 1ad03bde8a Rename gdbarch-utils.[hc] to arch-utils.[hc] 2000-04-09 14:37:28 +00:00
Andrew Cagney c0e8c25248 * gdbarch-utils.h, gdbarch-utils.c: New files.
* Makefile.in (SFILES, COMMON_OBS): Update.
(gdbarch_utils_h) Define.
(gdbarch-utils.o): Add dependencies.

* gdbarch.c, gdbarch.sh: Include "gdbarch-utils.h". Fix code
handling default method values.
(startup_gdbarch): Rename default_gdbarch, name misleading.
(breakpoint_from_pc): Default to legacy_breakpoint_from_pc.
(register_name): Default to legacy_register_name.
(call_dummy_words): Default to legacy_call_dummy_words.
(sizeof_call_dummy_words): Default to
legacy_sizeof_call_dummy_words.
(register_convertible): Default to
generic_register_convertible_not.
(breakpoint_from_pc): Default to legacy_breakpoint_from_pc.
(remote_translate_xfer_address): Default to
generic_remote_translate_xfer_address.
(frameless_function_invocation): Default to
generic_frameless_function_invocation_not.
2000-04-03 00:00:32 +00:00
Andrew Cagney 59233f88f1 gdbarch cleanups. 2000-03-30 05:32:23 +00:00
Daniel Berlin 5d161b2419 The set debug changes 2000-03-28 02:25:14 +00:00
Jim Blandy 058f20d52a * gdbarch.sh: Emit a definition and declaration for gdbarch_free,
a companion to gdbarch_alloc, which allows a gdbarch init function
to free partially-built gdbarch structures.
* gdbarch.c, gdbarch.h: Regenerated.
2000-03-21 20:40:43 +00:00
Jim Blandy b9a8e3bfd4 Bring COERCE_FLOAT_TO_DOUBLE under gdbarch's control.
* valops.c (COERCE_FLOAT_TO_DOUBLE): Rework definition to be
more function-like.
(default_coerce_float_to_double, standard_coerce_float_to_double):
New functions.
(value_arg_coerce): Adjust for new definition.
* value.h (default_coerce_float_to_double,
standard_coerce_float_to_double): New declarations for the above.
* gdbarch.sh (coerce_float_to_double): New entry, replacing macro.
* gdbarch.c, gdbarch.h: Regenerated.
* tm-alpha.h, tm-fr30.h, tm-m32r.h, tm-mips.h, tm-hppa.h,
tm-rs6000.h, tm-sh.h, tm-sparc.h (COERCE_FLOAT_TO_DOUBLE): Change
definitions.
* mips-tdep.c (mips_coerce_float_to_double): Supply our own custom
function here.
(mips_gdbarch_init): Install that as our coerce_float_to_double
function.
2000-02-22 19:18:53 +00:00
Andrew Cagney 03f2053f96 Replace ../include/wait.h with gdb_wait.h. 2000-02-09 08:52:47 +00:00
Jason Molenda c4093a6ab3 import gdb-1999-12-13 snapshot 1999-12-14 01:06:04 +00:00
Jason Molenda e514a9d642 import gdb-1999-10-25 snapshot 1999-10-26 03:43:48 +00:00
Jason Molenda 917317f4c6 import gdb-1999-10-18 snapshot 1999-10-19 02:47:02 +00:00
Jason Molenda 104c1213b4 import gdb-1999-08-30 snapshot 1999-08-31 01:14:27 +00:00
Jason Molenda 7be570e7ce import gdb-1999-08-16 snapshot 1999-08-16 19:57:19 +00:00
Jason Molenda 96baa820df import gdb-1999-08-09 snapshot 1999-08-09 21:36:23 +00:00
Jason Molenda adf40b2e16 import gdb-1999-07-19 snapshot 1999-07-19 23:30:11 +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 392a587b05 import gdb-1999-05-25 snapshot 1999-05-25 18:09:09 +00:00
Stan Shebs b83266a0e1 import gdb-19990504 snapshot 1999-05-05 14:45:51 +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 c634a08ff8 HPMERGE:
Pass gdb_stderr instead of stderr.
In serial.c, fix call to gdb_fclose() - pass gdb_file** not gdb_file*
1999-01-18 01:24:06 +00:00
Andrew Cagney 2e64ee9aae CARP:
Pass gdbarch_info by value to the arch init function.
Review doco.
Update mips-tdep.c
1998-12-18 03:21:45 +00:00
Andrew Cagney dcf46491d8 CARP:
Add multi-arch code!
1998-12-16 15:01:03 +00:00
Andrew Cagney 5036d102ed * gdbarch.c (show_architecture): Use TARGET_ARCHITECTURE.
* gdbarch.h, gdbarch.c: Fix typo's. Use struct's in preference to
types.
* gdbarch.h, gdbarch.c (gdbarch_debug): Add ``set archdebug'' to
command set.
1998-12-16 01:17:50 +00:00
Andrew Cagney f7e85b1bc1 CARP:
Consolidate the semi-dynamic target system dependant GDB parameters
moving them all into a new file.
1998-12-14 02:37:16 +00:00