aboutsummaryrefslogtreecommitdiff
path: root/gdb/findvar.c
AgeCommit message (Collapse)AuthorFilesLines
2002-10-212002-10-21 Elena Zannoni <ezannoni@redhat.com>Elena Zannoni1-0/+6
* findvar.c (read_var_value): Temporarily disable TLS code, until complete TLS support is added.
2002-10-212002-10-21 Jim Blandy <jimb@redhat.com>Elena Zannoni1-0/+17
Elena Zannoni <ezannoni@redhat.com> * symtab.h (address_class): Re-add LOC_THREAD_LOCAL_STATIC for thread local storage locations. (struct symbol): Add objfile field. (SYMBOL_OBJFILE): Define. * dwarf2read.c (is_thread_local): New static variable. (new_symbol): If variable is in thread local fill in address class and objfile appropriately. (decode_locdesc): Recognize and handle DW_OP_GNU_push_tls_address stack operation. * printcmd.c (address_info): Print the information for thread local storage variable. * findvar.c (read_var_value): In case of thread local variable, defer to the target vector code to compute address.
2002-10-212002-10-21 Elena Zannoni <ezannoni@redhat.com>Elena Zannoni1-2/+2
* symtab.h (address_class): Rename LOC_THREAD_LOCAL_STATIC to LOC_HP_THREAD_LOCAL_STATIC. * hpread.c (hpread_process_one_debug_symbol): Ditto. * printcmd.c (address_info): Ditto. * findvar.c (symbol_read_needs_frame, read_var_value): Ditto.
2002-07-242002-07-24 Andrew Cagney <cagney@redhat.com>Andrew Cagney1-8/+8
* findvar.c (extract_unsigned_integer): Make `addr' parameter constant. Same for local pointer variables. (extract_signed_integer): Ditto. * defs.h (extract_unsigned_integer): Update. (extract_signed_integer): Update.
2002-05-15* regcache.c (register_valid): Revise comments refering to "NotAndrew Cagney1-0/+7
available" and "unavailable". * frame.c (frame_register_read): Ditto. * findvar.c (value_of_register): Ditto.
2002-05-12* arch-utils.h (legacy_register_to_value): Declare.Andrew Cagney1-4/+4
(legacy_value_to_register): Declare. (legacy_convert_register_p): Declare. * arch-utils.c (legacy_register_to_value): New function. (legacy_value_to_register): New function. (legacy_convert_register_p): New function. * gdbarch.sh (REGISTER_TO_VALUE): Define. (VALUE_TO_REGISTER): Define. (CONVERT_REGISTER_P): Define. * gdbarch.h, gdbarch.c: Regenerate. * valops.c (value_assign): Use CONVERT_REGISTER_P and VALUE_TO_REGISTER. * findvar.c (value_from_register): Use REGISTER_TO_VALUE and CONVERT_REGISTER_P. * gdbint.texinfo (Target Architecture Definition): Document REGISTER_TO_VALUE and VALUE_TO_REGISTER and CONVERT_REGISTER_P. (Target Architecture Definition): Revise section `Using Different Register and Memory Data Representations'. Add section `Raw and Virtual Register Representations'.
2002-04-23* findvar.c (extract_signed_integer): Cast printf argumentJason Thorpe1-2/+2
to suppress format warning. (extract_unsigned_integer): Likewise. * infcmd.c (registers_info): Likewise. * top.c (get_prompt_1): Likewise. * valops.c (value_assign): Likewise. * valprint.c (print_decimal): Likewise.
2002-04-09* findvar.c: Include "builtin-regs.h".Andrew Cagney1-0/+6
(value_of_register): Call value_of_builtin_reg when applicable. * parse.c: Include "builtin-regs.h" and "gdb_assert.h". (target_map_name_to_register): Call builtin_reg_map_name_to_regnum. * Makefile.in (SFILES): Add builtin-regs.c and std-regs.c. (COMMON_OBS): Add builtin-regs.o and std-regs.o. (builtin_regs_h): Define. (builtin-regs.o): New target. (findvar.o): Add $(builtin_regs_h). * builtin-regs.c, builtin-regs.h: New files. * std-regs.c: New file. Partial fix for PR gdb/251.
2002-04-05gdb/ChangeLog:Jim Blandy1-1/+1
* stack.c (get_selected_block): Add new argument `addr_in_block', used to return the exact code address we used to select the block, not just the block. * blockframe.c (get_frame_block, get_current_block): Same. * frame.h (get_frame_block, get_current_block, get_selected_block): Update declarations. * linespec.c, stack.c, blockframe.c, breakpoint.c, findvar.c, linespec.c, varobj.c, printcmd.c, symtab.c: Callers changed. gdb/mi/ChangeLog: * mi-cmd-stack.c (list_args_or_locals): Pass new arg to get_frame_block. (See entry in gdb/ChangeLog.)
2002-03-16* eval.c (evaluate_subexp_standard): Pass ``selected_frame'' toAndrew Cagney1-7/+7
value_of_register. * findvar.c (value_of_register): Add ``frame'' parameter. Pass to get_saved_register. * value.h (value_of_register): Update.
2002-02-10* gdbarch.sh (TARGET_LONG_DOUBLE_FORMAT): Default toAndrew Cagney1-6/+0
default_double_format. * gdbarch.h, gdbarch.c: Re-generate. * findvar.c (floatformat_unknown): Delete variable definition. * doublest.h (floatformat_unknown): Delete variable declaration.
2002-01-05s/BIG_ENDIAN/BFD_ENDIAN_BIG/Andrew Cagney1-6/+6
2001-12-032001-11-30 Pierre Muller <muller@ics.u-strasbg.fr>Pierre Muller1-2/+15
* findvar.c (locate_var_value): Specify in which register a register variable is stored.
2001-11-10s/value_ptr/struct value */Andrew Cagney1-11/+11
2001-10-16* value.h (value_as_address): Rename value_as_pointer.Andrew Cagney1-4/+4
* eval.c, findvar.c, gnu-v2-abi.c, gnu-v3-abi.c, jv-lang.c, jv-valprint.c, printcmd.c, stack.c, top.c, valarith.c, valops.c, values.c: Update.
2001-09-24* findvar.c (read_var_value): For LOC_INDIRECT and LOC_REF_ARGAndrew Cagney1-18/+25
convert the pointer into a CORE_ADDRs.
2001-08-01* defs.h (HOST_FLOAT_FORMAT, HOST_DOUBLE_FORMAT)Andrew Cagney1-96/+0
(HOST_FLOAT_FORMAT, HOST_DOUBLE_FORMAT) (HOST_LONG_DOUBLE_FORMAT, DOUBLEST) (floatformat_to_doublest, floatformat_from_doublest) (floatformat_is_negative, floatformat_is_nan) (floatformat_mantissa, store_floating) (extract_floating): Move declaration from here. * doublest.h: To here. New file. * utils.c (get_field, floatformat_to_doublest, put_field) (ldfrexp, floatformat_from_doublest, floatformat_is_negative) (floatformat_is_nan, floatformat_mantissa) (FLOATFORMAT_CHAR_BIT): Move from here. * doublest.c: To here. New file. * findvar.c (store_floating, extract_floating): Move from here. * doublest.c: To here. * Makefile.in (SFILES): Add doublest.c. (COMMON_OBS): Add doublest.o. (doublest.o): Specify dependencies. (doublest_h): Define. * config/m88k/tm-m88k.h: Include "doublest.h". * config/i960/tm-i960.h: Ditto. * config/i386/tm-symmetry.h: Ditto. * rs6000-tdep.c, valarith.c: Ditto. * valprint.c, stabsread.c, sh-tdep.c: Ditto. * ia64-tdep.c, i387-tdep.c, i386-tdep.c: Ditto. * values.c, arm-tdep.c, arm-linux-tdep.c: Ditto. * alpha-tdep.c, ax.h, expression.h: Ditto. * sh-tdep.c, parse.c, top.c, value.h: Ditto. * Makefile.in (arm-tdep.o): Add $(doublest_h). (i386-tdep.o, i387-tdep.o, ia64-tdep.o): Ditto. (rs6000-tdep.o, stabsread.o, valarith.o): Ditto. (values.o, valprint.o, arm-linux-tdep.o): Ditto. (alpha-tdep.o, ax_h, parse.o, top.o, value_h): Ditto. (parser_defs_h): Ditto. (expression_h): Add $(doublest_h) and $(symtab_h).
2001-07-16 * findvar.c (read_var_value): Apply value_as_pointer() toNicholas Duffek1-13/+6
addresses retrieved from the target for LOC_BASEREG and LOC_BASEREG_ARG variables.
2001-07-10Clean up the D10V port so that GDB and the target program noJim Blandy1-23/+0
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-03-06Update/correct copyright notices.Kevin Buettner1-1/+2
2001-03-01Create new file regcache.h. Update all uses.Andrew Cagney1-0/+1
2001-02-08Add __FILE__ and __LINE__ parameter to internal_error() /Andrew Cagney1-5/+9
internal_verror().
2001-02-062001-02-06 Michael Snyder <msnyder@makita.cygnus.com>Michael Snyder1-4/+4
Submitted by Paul Hilfinger (hilfingr@gnat.com) and Andrei Petrov (and@genesyslab.com). * findvar.c: Buffers of size MAX_REGISTER_RAW_SIZE or REGISTER_BYTES must be allocated dynamically, since these are no longer constants. * infcmd.c: Ditto. * regcache.c: Ditto. * remote.c: Ditto. * sol-thread.c: Ditto. * valops.c: Ditto. * config/sparc/sun4sol2.mh (MH_CFLAGS): Add -I/usr/include/v9, as a work-around for a missing Sun header file in solaris for sparc64.
2000-07-30Protoization.Kevin Buettner1-14/+5
2000-07-102000-07-07 Michael Snyder <msnyder@cleaver.cygnus.com>Michael Snyder1-810/+5
* findvar.c (_initialize_findvar, build_findvar, write_fp, read_fp, generic_target_write_fp, generic_target_read_fp, write_sp, read_sp, generic_target_write_sp, generic_target_read_sp, write_pc, read_pc, generic_target_write_pc, generic_target_read_pc, write_pc_pid, read_pc_pid, supply_register, write_register_pid, write_register, read_register_pid, read_register, write_register_bytes, read_register_bytes, write_register_gen, read_register_gen, registers_fetched, registers_changed, find_saved_register, read_relative_register_raw_bytes, default_get_saved_register, read_relative_register_raw_bytes_for_frame, get_saved_register): Move from this file into new file regcache.c. (register_valid, registers_pid, registers): Ditto. * regcache.c: New file to hold the register cache. (register_cached): New function to read register_valid array. * value.h (register_cached): Declare. * defs.h (default_get_saved_register): Delete decl of static function. * Makefile.in: Add regcache module.
2000-06-04Add host_pointer_to_address() and address_to_host_pointer(). AddAndrew Cagney1-2/+12
signed_pointer_to_address() etc. Rename generic_pointer_to_address() to unsigned_pointer_to_address() etc.
2000-05-28PARAMS removal.Kevin Buettner1-7/+7
2000-05-242000-05-24 Michael Snyder <msnyder@seadog.cygnus.com>Michael Snyder1-18/+14
* findvar.c (value_from_register): Factor code, simplify logic.
2000-05-02Multi-arch NPC_REGNUM NNPC_REGNUM.Andrew Cagney1-4/+0
2000-04-272000-04-27 Michael Snyder <msnyder@seadog.cygnus.com>Michael Snyder1-3/+6
* jv-valprint.c (java_val_print): Add arg declaration, fix compiler warning. * corelow.c (core_open): Call set_gdbarch_from_file so that gdbarch becomes aware of the architecture encoded in the corefile. * findvar.c (write_register_gen): Export this useful interface. * value.h (write_register_gen): Declare.
2000-04-17* remote.c (REMOTE_TRANSLATE_XFER_ADDRESS), mem-break.cAndrew Cagney1-8/+0
(MEMORY_INSERT_BREAKPOINT, MEMORY_REMOVE_BREAKPOINT), target.h (BREAKPOINT_FROM_PC), valops.c (COERCE_FLOAT_TO_DOUBLE), gdbarch.sh (D10V_MAKE_DADDR, D10V_MAKE_IADDR, FRAMELESS_FUNCTION_INVOCATION, REGISTER_CONVERTIBLE, REGISTER_CONVERT_TO_VIRTUAL, REGISTER_CONVERT_TO_RAW, REGISTER_NAME), findvar.c (POINTER_TO_ADDRESS, ADDRESS_TO_POINTER): Delete default definition. Handled by gdbarch. * gdbarch.sh: Make multi-arch defaults, defaults for non- multi-arch targets. (REGISTER_NAME, COERCE_FLOAT_TO_DOUBLE, REGISTER_CONVERTIBLE, REGISTER_CONVERT_TO_VIRTUAL, REGISTER_CONVERT_TO_RAW, D10V_MAKE_DADDR, D10V_MAKE_IADDR, BREAKPOINT_FROM_PC, MEMORY_INSERT_BREAKPOINT, MEMORY_REMOVE_BREAKPOINT, REMOTE_TRANSLATE_XFER_ADDRESS, FRAMELESS_FUNCTION_INVOCATION): Provide default/legacy implementation. (REGISTER_NAMES, CALL_DUMMY): Allow legacy definition. * gdbarch.h, gdbarch.c: Re-generate.
2000-04-16* findvar.c (store_typed_address, extract_typed_address): FixJim Blandy1-2/+2
function names in error messages.
2000-04-14* gdbarch.sh (POINTER_TO_ADDRESS, ADDRESS_TO_POINTER): Two newJim Blandy1-12/+98
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-03-312000-03-29 Mark Kettenis <kettenis@gnu.org>Mark Kettenis1-8/+0
* findvar.c (extract_floating): Remove reference to TARGET_EXTRACT_FLOATING. (store_floating): Remove reference to TARGET_STORE_FLOATING.
2000-03-04Convert extract/store functions to ISO-C.Andrew Cagney1-26/+8
2000-03-02Fixes for extract_floating() and store_floating().Kevin Buettner1-13/+8
2000-02-08 Clean up compiler warnings:Jim Kingdon1-1/+1
* bcache.h, bcache.c, c-valprint.c, coffread.c, stabsread.c, stack.c, valprint.c: Change variables to unsigned. * bcache.c: Rearrange to avoid warnings about variables not being set. * c-lang.c, ch-lang.c, f-lang.c, m2-lang.c: Include valprint.h rather than declaring print_max and repeat_count_threashold ourselves (incorrectly). * valprint.h: Do declare repeat_count_threashold. * ch-exp.c: Use default case for internal error. * findvar.c: Don't omit argument type. * symtab.c: Remove unused variable.
2000-02-01import gdb-2000-01-31 snapshotJason Molenda1-0/+27
1999-12-07import gdb-1999-12-06 snapshotJason Molenda1-62/+42
1999-09-09import gdb-1999-09-08 snapshotStan Shebs1-0/+8
1999-08-09import gdb-1999-08-09 snapshotJason Molenda1-10/+12
1999-07-07import gdb-1999-07-07 post reformatJason Molenda1-104/+112
1999-06-14import gdb-1999-06-14 snapshotJason Molenda1-28/+118
1999-05-25import gdb-1999-05-25 snapshotJason Molenda1-11/+6
1999-04-26import gdb-19990422 snapshotStan Shebs1-30/+48
1999-04-16Initial creation of sourceware repositorygdb-4_18-branchpointStan Shebs1-0/+1630
1999-04-16Initial creation of sourceware repositoryStan Shebs1-1553/+0
1998-12-10CARP:Andrew Cagney1-2/+2
Rename REGISTER_NAMES{} -> REGISTER_NAME().
1998-12-091998-12-08 Philippe De Muyter <phdm@macqel.be>Jason Molenda1-80/+152
* config/xm-aix4.h (SIGWINCH_HANDLER): Function `aix_resize_window' must accept a signal number as parameter. * config/rs6000/xm-rs6000.h (SIGWINCH_HANDLER): Ditto. * utils.c (initialize_utils): Give a parameter to `SIGWINCH_HANDLER'. * inferior.h (register_valid): Variable's type is `SIGNED char', not `char'. * findvar.c (register_valid): Ditto. * defs.h (make_cleanup_func): Protect parameter list by `PARAMS'. * gdbthread.h (unbind_target_thread_vector): Likewise.
1996-04-12 * defs.h: Define TARGET_{FLOAT DOUBLE LONG_DOUBLE}_FORMATStu Grossman1-22/+6
defaults for bi-endian targets. Replace function pointers for floatformat routines with macros. No need for these to be runtime selectable. * findvar.c: Get rid of floatformat function pointers. Use macros in extract_floating and store_floating. * remote-nindy.c (nindy_fetch_registers nindy_store_registers): Use floatformat macros.