aboutsummaryrefslogtreecommitdiff
path: root/gdb/varobj.c
AgeCommit message (Collapse)AuthorFilesLines
2004-07-262004-07-26 Andrew Cagney <cagney@gnu.org>Andrew Cagney1-1/+1
* cli/cli-decode.c (deprecated_add_show_from_set): Deprecate. * xcoffsolib.c (_initialize_xcoffsolib): Update. * wince.c (_initialize_wince): Update. * win32-nat.c (_initialize_win32_nat): Update. * varobj.c (_initialize_varobj): Update. * valops.c (_initialize_valops): Update. * utils.c (initialize_utils, initialize_utils): Update. * tui/tui-win.c (_initialize_tui_win): Update. * top.c (init_main): Update. * symfile.c (_initialize_symfile): Update. * source.c (_initialize_source): Update. * somsolib.c (_initialize_som_solib): Update. * solib.c (_initialize_solib): Update. * solib-frv.c (_initialize_frv_solib): Update. * serial.c (_initialize_serial): Update. * ser-go32.c (_initialize_ser_dos, _initialize_ser_dos): Update. * remote.c (_initialize_remote, _initialize_remote): Update. * remote-vx.c (_initialize_vx): Update. * remote-utils.c (_initialize_sr_support): Update. * remote-sds.c (_initialize_remote_sds): Update. * remote-mips.c (_initialize_remote_mips): Update. * remote-e7000.c (_initialize_remote_e7000): Update. * proc-api.c (_initialize_proc_api): Update. * printcmd.c: Update. * parse.c (_initialize_parse): Update. * pa64solib.c (_initialize_pa64_solib): Update. * p-valprint.c (_initialize_pascal_valprint): Update. * monitor.c (_initialize_remote_monitors): Update. * mips-tdep.c (_initialize_mips_tdep): Update. * mcore-tdep.c (_initialize_mcore_tdep): Update. * maint.c (_initialize_maint_cmds): Update. * lin-lwp.c (_initialize_lin_lwp): Update. * language.c (_initialize_language): Update. * kod.c (_initialize_kod): Update. * infrun.c (set_schedlock_func, _initialize_infrun): Update. * i386-tdep.c (_initialize_i386_tdep): Update. * gdbtypes.c (build_gdbtypes, _initialize_gdbtypes): Update. * gdbarch.sh: Update. * gdbarch.c: Re-generate. * gdb-events.sh: Update. * gdb-events.c: Re-generate. * frame.c (_initialize_frame): Update. * exec.c: Update. * demangle.c (_initialize_demangler): Update. * dcache.c (_initialize_dcache): Update. * cris-tdep.c (_initialize_cris_tdep, cris_version_update): Update. * cp-valprint.c (_initialize_cp_valprint): Update. * corefile.c (_initialize_core): Update. * command.h: Update. * cli/cli-decode.h: Update. * cli/cli-cmds.c (init_cli_cmds): Update. * charset.c (_initialize_charset): Update. * breakpoint.c (_initialize_breakpoint): Update. * arm-tdep.c (_initialize_arm_tdep_initialize_arm_tdep): Update. * alpha-tdep.c (_initialize_alpha_tdep): Update. * aix-thread.c (_initialize_aix_thread): Update.
2004-06-282004-06-26 Andrew Cagney <cagney@gnu.org>Andrew Cagney1-5/+5
* xcoffsolib.c (xcoff_solib_address): Replace xasprintf with xstrprintf. * varobj.c (varobj_gen_name, create_child, c_name_of_child) (c_value_of_variable): Ditto. * utils.c (internal_vproblem): Ditto. * solib-aix5.c (build_so_list_from_mapfile): Ditto. * remote.c (add_packet_config_cmd): Ditto. * remote-rdp.c (rdp_set_command_line): Ditto. * regcache.c (regcache_dump): Ditto. * frv-tdep.c (new_variant, new_variant): Ditto. * fbsd-proc.c (child_pid_to_exec_file): Ditto. (fbsd_find_memory_regions): Ditto. * breakpoint.c (create_thread_event_breakpoint) (create_breakpoints): Ditto. * aix-thread.c (aix_thread_pid_to_str): Ditto. * ada-lang.c (is_package_name): Ditto. Also delete xmalloc call. Index: doc/ChangeLog 2004-06-26 Andrew Cagney <cagney@gnu.org> * gdbint.texinfo (Coding): Replace xasprintf with xstrprintf.
2003-09-03 * arm-tdep.c: Include frame-unwind.h, frame-base.h, andDaniel Jacobowitz1-1/+1
trad-frame.h. (arm_get_cache): Delete macro. (struct arm_prologue_cache): Update comments. Make saved_regs into a trad_frame_saved_reg pointer. Remove unwound_pc; rename unwound_sp to prev_sp. (thumb_scan_prologue): Update for cache changes. Don't call DEPRECATED_PC_IN_CALL_DUMMY. (arm_scan_prologue): Update for cache changes. Take NEXT_FRAME argument and use it in desperation search for our prologue. Do not search past the specified PC. (arm_make_prologue_cache): Simplify. (arm_prologue_this_id, arm_prologue_prev_register) (arm_prologue_unwind, arm_prologue_unwind_sniffer) (arm_normal_frame_base, arm_normal_base, arm_make_sigtramp_cache) (arm_sigtramp_this_id, arm_sigtramp_prev_register) (arm_sigtramp_unwind, arm_sigtramp_unwind_sniffer) (arm_unwind_dummy_id, arm_unwind_pc, arm_unwind_sp): New. (arm_frame_chain_valid, arm_find_callers_reg) (arm_frame_saved_pc, arm_read_fp, arm_frame_init_saved_regs) (arm_pop_frame): Delete obsolete methods. (arm_minimal_frame_chain, arm_minimal_frame_info): Delete. (arm_gdbarch_init): Update for new frame methods. Register prologue and sigtramp unwinders. Set the default frame base method. * Makefile.in (arm-tdep.o): Update dependencies. * varobj.c (find_frame_addr_in_frame_chain): Call get_frame_base_address. * std-regs.c (value_of_builtin_frame_fp_reg): Likewise.
2003-06-19 * varobj.c (get_type, get_target_type): Use check_typedef.Daniel Jacobowitz1-7/+6
2002-12-042002-12-03 Andrew Cagney <ac131313@redhat.com>Andrew Cagney1-4/+3
* frame.h (get_frame_id): Convert to a function. (null_frame_id, frame_id_p): Declare. (frame_id_eq, frame_id_inner): Declare. (frame_id_build): New function. * frame.c (get_frame_id): Update. Use null_frame_id. (frame_find_by_id): Rewrite using frame_id_p, frame_id_eq and frame_id_inner. (null_frame_id, frame_id_p): Define. (frame_id_eq, frame_id_inner): Define. (frame_id_build): New function. * varobj.c (varobj_create): Update. (varobj_update): Update. * valops.c (value_assign): Update. (new_root_variable): Update. * infrun.c (save_inferior_status): Update. * breakpoint.c (watch_command_1): Update.
2002-11-292002-11-29 Andrew Cagney <ac131313@redhat.com>Andrew Cagney1-3/+3
* stack.c (selected_frame, select_frame): Move from here ... * frame.c (selected_frame, select_frame): ... to here. Include "language.h". * Makefile.in (frame.o): Update dependencies. * frame.c (get_selected_frame): New function. * frame.h (get_selected_frame): Declare. (deprecated_selected_frame): Rename selected_frame. * ada-lang.c, ada-tasks.c, breakpoint.c, corelow.c: Update. * eval.c, f-valprint.c, findvar.c, frame.c, frame.h: Update. * h8300-tdep.c, h8500-tdep.c, hppa-tdep.c, infcmd.c: Update. * inflow.c, infrun.c, macroscope.c, mips-tdep.c: Update. * mn10300-tdep.c, ocd.c, regcache.h, remote-e7000.c: Update. * remote-mips.c, remote-rdp.c, sh-tdep.c, sparc-tdep.c: Update. * stack.c, thread.c, tracepoint.c, valops.c, varobj.c: Update. * z8k-tdep.c, cli/cli-cmds.c: Update. Index: mi/ChangeLog 2002-11-29 Andrew Cagney <ac131313@redhat.com> * mi/mi-cmd-stack.c, mi/mi-main.c: Update to use deprecated_selected_frame. Index: tui/ChangeLog 2002-11-29 Andrew Cagney <ac131313@redhat.com> * tui/tui-hooks.c: Update to use deprecated_selected_frame. * tui/tui.c, tui/tuiDisassem.c, tui/tuiRegs.c: Ditto. * tui/tuiSource.c, tui/tuiSourceWin.c, tui/tuiWin.c: Ditto.
2002-11-242002-11-24 Pierre Muller <muller@ics.u-strasbg.fr>Pierre Muller1-1/+1
* varobj.c (find_frame_addr_in_frame_chain): Use get_frame_base instead of FRAME_FP, obvious fix.
2002-11-242002-11-23 Andrew Cagney <ac131313@redhat.com>Andrew Cagney1-0/+27
* blockframe.c (find_frame_addr_in_frame_chain): Move function from here ... * varobj.c (find_frame_addr_in_frame_chain): ... to here. (varobj_create): Note that frame ID should be used. * frame.h (find_frame_addr_in_frame_chain): Delete declaration.
2002-11-052002-11-05 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston1-37/+78
* varobj.c (child_exists, cplus_number_of_children): Change STREQ macro references to strcmp. (cplus_name_of_child): Change code to handle the fact that fields are not necessarily contiguous with regards to their access control. This is a fix for PR gdb/792.
2002-10-232002-10-23 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston1-3/+13
* NEWS: add recent mi fixes. * varobj.c (struct varobj): Add new "updated" flag. (new_variable): Default "updated" flag to 0. (varobj_set_value): Set "updated" flag to 1 if value changes. (varobj_update): Check varobj "updated" flag before comparing old and refreshed values. Fix for PR gdb/702.
2002-09-24 * varobj.c (c_type_of_child): Use get_target_type insteadKeith Seitz1-5/+11
of TYPE_TARGET_TYPE.
2002-08-02Fri Aug 2 15:53:50 2002 Andrew Cagney <cagney@redhat.com>Andrew Cagney1-0/+1
* gdbarch.sh: Include "gdb_string.h". * gdbarch.c: Regenerate. * regcache.c: Include "gdb_string.h". * ax-general.c: Ditto. * varobj.c: Ditto. * std-regs.c: Ditto. * fbsd-proc.c: Ditto. * thread.c: Ditto. * Makefile.in (regcache.o): Update dependencies. (thread.o, gdbarch.o): Ditto. (ax-general.o, gdbarch.o): Ditto. (varobj.o, std-regs.o): Ditto. (fbsd-proc.o): Specify dependencies.
2002-07-032002-07-03 Martin M. Hunt <hunt@redhat.com>Martin Hunt1-43/+28
* varobj.c (struct varobj_root): Change frame from CORE_ADDR to struct frame_id. (varobj_create): Store frame_id for root. (varobj_gen_name): Use xasprintf. (varobj_update): Save and restore frame using get_frame_id() and frame_find_by_id(). (create_child): Use xasprintf. (new_root_variable): Initialize frame_id. (c_name_of_child): Use xasprintf. Call find_frame_by_id(). (c_value_of_variable): Use xasprintf. Move mem_fileopen call to prevent memory leak.
2002-06-15* defs.h (auto_boolean): Declare enum.Andrew Cagney1-9/+13
* command.h (cmd_auto_boolean): Delete enum. * mips-tdep.c (mask_address_var): Update. (mips_mask_address_p): Update. (show_mask_address): Update. * remote.c (struct packet_config): Update. (update_packet_config): Update. (show_packet_config_cmd): Update. (packet_ok): Update. (add_packet_config_cmd): Update. (_initialize_remote): * command.h: Update. * cli/cli-setshow.c (parse_auto_binary_operation): Update. (do_setshow_command): Update. * cli/cli-decode.c (add_set_auto_boolean_cmd): Update. * cli/cli-decode.h: Update.
2002-05-05* frame.h (select_frame): Delete level parameter.Andrew Cagney1-4/+4
* stack.c (select_frame): Update. Use frame_relative_level to obtain the frame's level. (select_and_print_frame): Update call. (select_frame_command): Ditto. (up_silently_base): Ditto. (down_silently_base): Ditto. * ocd.c (ocd_start_remote): Ditto. * remote-rdp.c (remote_rdp_open): Ditto. * remote-mips.c (mips_initialize): Ditto. (common_open): Ditto. * remote-e7000.c (e7000_start_remote): Ditto. * m3-nat.c (select_thread): Ditto. * hppa-tdep.c (child_get_current_exception_event): Ditto. (child_get_current_exception_event): Ditto. * varobj.c (varobj_create): Ditto. (varobj_update): Ditto. (c_value_of_root): Ditto. * tracepoint.c (finish_tfind_command): Ditto. * corelow.c (core_open): Ditto. * arch-utils.c (generic_prepare_to_proceed): Ditto. * thread.c (info_threads_command): Ditto. (switch_to_thread): Ditto. * infrun.c (normal_stop): Ditto. (restore_selected_frame): Ditto. (restore_inferior_status): Ditto. * breakpoint.c (insert_breakpoints): Ditto. (watchpoint_check): Ditto. (bpstat_stop_status): Ditto. (do_enable_breakpoint): Ditto. * blockframe.c (flush_cached_frames): Ditto. (reinit_frame_cache): Ditto.
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-01-13 * varobj.c (varobj_set_value): Make sure that there were noKeith Seitz1-62/+68
errors evaluating the object before attempting to set its value. value_cast now properly adjusts VALUE_ADDRESS for baseclasses, so this offset adjustment is no longer necessary. (create_child): Don't set the error flag if the child is a CPLUS_FAKE_CHILD. (value_of_child): If value_fetch_lazy fails, return NULL so that callers will be notified that an error occurred. (c_value_of_variable): Delay check of variable's validity until later. We actually want all structs and unions to have the value "{...}". Do not return "???" for variables which could not be evaluated. This error condition must be returned to the caller so that it can get the error condition from gdb. (cplus_name_of_child): Adjust index for vptr before figuring out the name of the child. (cplus_value_of_child): If a child's (real) parent is not valid, don't even bother trying to give a value for it. Just return an error. Change all instances in this function. (cplus_type_of_child): If our parent is one of the "fake" parents, we need to get at the type of the real parent, and derive the child's true type using this information.
2001-11-20 * varobj.c (c_value_of_child): Release memory for "name" whenKeith Seitz1-2/+6
finshed using it. (c_type_of_child): Likewise. (cplus_value_of_child): Isolate the use of name_of_child to one case that needs it. Release memory for "name" when finished using it.
2001-11-19 * varobj.c (c_value_of_child): Use the wrapper function,Keith Seitz1-6/+7
gdb_value_struct_elt. (cplus_value_of_child): Likewise.
2001-11-01s/value_ptr/struct value */Andrew Cagney1-38/+40
2001-11-01Re-indent.Andrew Cagney1-192/+190
2001-10-10 * varobj.c (cplus_value_of_child): Deal with a failureKeith Seitz1-1/+4
to dereference a pointer object.
2001-08-17 * varobj.c (varobj_update): Change first parameter toKeith Seitz1-13/+18
pointer to struct varobj*. This function can delete varobjs, so we need to give callers the new varobj when this happens. (value_of_root): Update "var", too, if "var_handle" changes. * varobj.h (varobj_update): Likewise.
2001-05-102001-05-10 Fernando Nasser <fnasser@redhat.com>Fernando Nasser1-1/+1
* varobj.c (c_number_of_children): Fix memory leak. Delete unwanted old variables, not just unregister them.
2001-05-102001-05-10 Fernando Nasser <fnasser@redhat.com>Fernando Nasser1-8/+9
* varobj.c (c_number_of_children): Check for target type of void*, not the target type name. Allow dereferencing char*.
2001-03-27* arch-utils.c (#include "gdbthread.h"): Removed.J.T. Conklin1-1/+0
(#include "symfile.h"): Removed. (XMALLOC): Removed unused macro. * breakpoint.c (tbreak_command): Removed local declaration. (awatch_command, do_enable_breakpoint, set_breakpoint_count): Remove duplicate declarations. (bpstat_should_step, bpstat_have_active_hw_watchpoints) (remove_solib_event_breakpoints): Fix indentation botch. * c-typeprint.c (#include "command.h"): Removed. (#include "gdbcmd.h"): Removed. * ch-exp.c (ch_terminal_match_float_literal, parse_expr) (parse_primval, parse_untyped_expr, parse_opt_untyped_expr): Removed duplicate declarations. * ch-typeprint.c (#include "command.h"): Removed. (#include "gdbcmd.h"): Removed. * corefile.c (#include "frame.h"): Removed (#include "symfile.h"): Removed. (#include "language.h"): Removed. * dbxread.c (#include "command.h"): Removed. * environ.c (#include "gdbcore.h"): Removed. * event-loop.c (#include "top.h"): Removed. * f-typeprint.c (#include "command.h"): Removed. (#include "gdbcmd.h"): Removed. (#include "language.h"): Removed. (#include "typeprint.h"): Removed. (#include "frame.h"): Removed. * gdbtypes.h (print_type_scalar): Removed declaration. * infcmd.c (#include "completer.h"): Removed. * language.c (#include "frame.h"): Removed. * m2-typeprint.c (#include "command.h"): Removed. (#include "gdbcmd.h"): Removed. (#include "language.h"): Removed. * m2-valprint.c (#include "valprint.h"): Removed. * p-typeprint.c (#include "command.h"): Removed. (#include "gdbcmd.h"): Removed. * p-valprint.c (#include "typeprint.h"): Removed. * parse.c (#include "linespec.h"): Removed. * regcache.c (#include "frame.h"): Removed. * remote.c (#include "frame.h"): Removed. (getpkt_sane): Make static. * source.c (#include "completer.h"): Removed. * stack.c (#include "symfile.h"): Removed. (#include "objfiles.h"): Removed. * symfile.c (#include "completer.h"): Removed. * tracepoint.c (#include "completer.h"): Removed. * values.c (#include "frame.h"): Removed. * varobj.c (#include "valprint.h"): Removed. * wrapper.c (#include "frame.h"): Removed. * memattr.c (create_mem_region): Removed unused variable. * remote-nrom.c: Removed spurious semicolon after init_nrom_ops. -------------------------------------------------------------------
2001-01-262001-01-24 Jeff Holcomb <jeffh@redhat.com>Jeff Holcomb1-2/+2
* remote-udi.c (udi_open): Change strdup to xstrdup. * thread.c (thread_apply_all_command): Change strdup to xstrdup. Update copyright message. * varobj.c (delete_variable_1): Likewise. * gdb_string.h: Remove declaration of strdup. Update copyright message. * config/xm-mpw.h: Likewise. * config/i386/xm-i386mach.h: Likewise. * config/m68k/xm-apollo68b.h: Likewise. * config/m68k/xm-hp300bsd.h: Likewise. * config/rs6000/xm-rs6000.h: Likewise. * config/vax/xm-vaxult.h: Remove declaration of strdup. * config/vax/xm-vaxult2.h: Likewise.
2001-01-19Replace FREEIF() with xfree().Andrew Cagney1-10/+5
2000-12-15Replace free() with xfree().Kevin Buettner1-4/+4
2000-11-29Fix -Wuninitialized warnings.Andrew Cagney1-2/+3
2000-11-10Protoization.Kevin Buettner1-6/+2
2000-11-062000-11-06 Fernando Nasser <fnasser@totem.toronto.redhat.com>Fernando Nasser1-1/+2
* wrapper.c (gdb_value_assign): New function. Longjump-free version of value_assign. (wrap_value_assign): New function. Wrapper for value_assign. * wrapper.h: Add declaration for the above. * varobj.c (varobj_set_value): Use gdb_value_assign, not value_assign which can longjump. Do not change varobj value if assign fails.
2000-10-132000-10-13 Fernando Nasser <fnasser@totem.to.cygnus.com>Fernando Nasser1-0/+1
* varobj.c (type_changeable): Arrays are not changeable. Trying to check for updates was causing an error if the array lived in a register as gdb value_equal() cannot handle that case yet.
2000-10-132000-10-13 Fernando Nasser <fnasser@totem.to.cygnus.com>Fernando Nasser1-13/+16
* varobj.c (varobj_update): Prevent uninitialized error code to be returned on type_changed. Also, prevent value_equal() to be called for the types we do not want to test for updates.
2000-09-162000-09-15 Fernando Nasser <fnasser@totem.to.cygnus.com>Fernando Nasser1-2/+3
* varobj.c (varobj_set_value): Call wrapped version of parse_exp_1() to avoid longjumps.
2000-07-30Protoization.Kevin Buettner1-129/+53
2000-06-04Eliminate PARAMS from function pointer declarations.Kevin Buettner1-8/+8
2000-05-28PARAMS removal.Kevin Buettner1-57/+56
2000-05-22Purge (almost) make_cleanup_func.Andrew Cagney1-1/+15
2000-03-302000-03-30 Fernando Nasser <fnasser@cygnus.com>Fernando Nasser1-1/+7
* wrapper.c (gdb_value_subscript, wrap_value_subscript): New functions. Safe version of value_subscript. * varobj.c (): Use gdb_value_subscript() to get an array element value.
2000-03-132000-03-13 James Ingham <jingham@leda.cygnus.com>Jim Ingham1-42/+153
Add support for a variable object that tries to evaluate itself in the currently selected frame, rather than in a fixed frame. * wrapper.c,h (gdb_parse_exp_1): Added a wrapper for gdb_parse_exp_1. * varobj.h: Added USE_CURRENT_FRAME to varobj_type & changed def'n of varobj_create. * varobj.c (varobj_list): Return type indicates whether the variable's type has changed (for current frame variables). (varobj_update): Handle the case where the variable's type has changed. (delete_variable_1): Allow for deletion of variables that have not been installed yet. (new_root_variable): Initialize use_selected_frame variable. (value_of_root): This is where most of the work to handle "current frame" variables was added. Most of the complexity involves handling the case where the type of the variable has changed. (varobj_create): Add a "type" argument, to tell if the variable is one of these "current frame" variables. Also protect call to parse_exp_1 from long jumping. * mi-var-block.exp: The error report from varobj_create changed since I am now trapping parse_exp_1 errors. Change the tests to match the new error message. * mi-var-child.exp: Ditto. * mi-var-cmd.exp: Ditto. * lib/gdb.exp: Fix the gdbtk_start routine to correctly find all the library directories. * gdbtk-varobj.c (variable_create): Pass the correct "how_specified" flag to the varobj_create routine.
2000-02-03import gdb-2000-02-02 snapshotJason Molenda1-0/+2421