summaryrefslogtreecommitdiff
path: root/gdb/block.h
Commit message (Collapse)AuthorAgeFilesLines
* 2008-11-20 Stan Shebs <stan@codesourcery.com>Stan Shebs2008-11-211-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Multi-process (primarily multi-exec) support. 2008-10-14 Stan Shebs <stan@codesourcery.com> * blockframe.c (get_frame_block): Get inferior from frame. * block.c (block_for_pc_inf): New function. * block.h (block_for_pc_inf): Declare. * symfile.c (find_pc_inf_sect): New function. * symfile.h (find_pc_inf_sect): Declare. * symtab.c (find_pc_inf_line): New function. * symtab.h (find_pc_inf_line): Declare. * frame.c (struct frame_info) New field inferior. (fprint_frame_id): Display inferior. (get_frame_id): Set inferior_num from inferior. (frame_id_eq): Compare inferiors. (create_sentinel_frame): Set inferior. (create_new_frame): Copy inferior from sentinel. (get_prev_frame_raw): Copy inferior from next frame. (find_frame_sal): Use find_pc_inf_line. (get_frame_inferior): New function. * frame.h (struct frame_id): New field inferior_num. * breakpoint.c (expand_sals_by_inferiors): Copy section from input sal to expanded sals. * symtab.c (expand_line_sal): Ditto. 2008-10-10 Stan Shebs <stan@codesourcery.com> * remote.c (discard_pending_stop_replies): Initialize prev. * infrun.c (infrun_thread_stop_requested): Ditto. 2008-10-08 Stan Shebs <stan@codesourcery.com> * inferior.h (struct inferior): Rename environ field to inf_environ. * inferior.c (print_inferior): Ditto. 2008-10-01 Stan Shebs <stan@codesourcery.com> * inferior.h (detach_fork): Declare here... * linux-fork.h (detach_fork): ...instead of here. * linux-fork.c (detach_fork): Move to... * infrun.c (detach_fork): ...here. * remote.c (detach_fork): Remove decl. 2008-09-30 Stan Shebs <stan@codesourcery.com> * linespec.c (decode_line_1): Better default for one-exec case. * remote (remote_start_remote): Use the exec in the one-exec case. 2008-09-29 Stan Shebs <stan@codesourcery.com> * infcmd.c (attach_command): If only one exec, assume it is the attached inferior's exec. (attach_command_post_wait): Set inferior's exec from the one that was found. * inf-ptrace.c (inf_ptrace_attach): Only report exec file if if there is just one present. (inf_ptrace_detach): Use inferior to get correct exec name. 2008-09-29 Stan Shebs <stan@codesourcery.com> * inferior.c (print_inferior): Use exec short names, and drop unused address space display. 2008-09-26 Stan Shebs <stan@codesourcery.com> * breakpoint.c (should_be_inserted): Test for no inferior. (clone_breakpoint_location): New function, broken out from... (update_breakpoint_inferiors): ...here, also tweak conditions for adding a location. (insert_breakpoint_location): Don't count non-running inferiors. (remove_breakpoint): Set tmp_inf. (print_one_breakpoint_location): Add allflag arg, use to always show inf. (print_one_breakpoint): Add allflag arg. (do_captured_breakpoint_query): Fix caller. (breakpoint_1): Ditto. * exec.c (create_exec): Save full pathname as exec name. (find_exec_by_name): Use find_exec_by_substr. * fork-child.c (fork_inferior): Warn if exec not found for new inferior. 2008-09-25 Stan Shebs <stan@codesourcery.com> * breakpoint.c (should_be_inserted): Don't insert in inferiors that are not running. (update_breakpoint_inferiors): New function. (insert_breakpoints): Call it. (insert_breakpoint_locations): Don't insert in inferiors that are not running. (set_raw_breakpoint_without_location): Set trigger set from current itset here... (set_raw_breakpoint): Instead of here. Also add default fillins for the location's inferior. (add_location_to_breakpoint): Similarly. (expand_sals_by_inferiors): New function. (breakpoint_re_set_one): Call it. (resolve_sal_pc): Don't set sal inferior. * breakpoint.h (struct breakpoint): Remove exec field, never used. * inferior.h (inferior_list): Declare. * inferior.c (inferior_list): Make public. (add_inferior_to_itset): Auto-add inferiors after exec's inferior. (first_inferior_in_set): Check for zero-length vector. * exec.c (xfer_memory): Use tmp_inf as inferior if set. * infcmd.c (focus_command): Improve user feedback. * linespec.c (build_canonical_line_spec): Record exec name as part of canonical spec. (symbol_found): Canonicalize specs more. (decode_indirect): Revert rewrite from 2008-09-14. (decode_sharp): Use find_exec_by_substr, better error messages. * minsyms.c (lookup_minimal_symbol_in_exec): New function. (lookup_minimal_symbol_in_exec_1): New function, body of lookup_minimal_symbol. * symtab.h (lookup_minimal_symbol_in_exec): Declare. * symtab.c (find_function_start_sal): Set inferior to use. (append_expanded_sal): Return pointer to the new sal. * remote.c (remote_xfer_memory): Better parms to ptid_build, remove debug print. (remote_xfer_partial): Ditto. 2008-09-22 Pedro Alves <pedro@codesourcery.com> * inferior.c (itset_member): Fix typo. 2008-09-22 Stan Shebs <stan@codesourcery.com> * inferior.h (current_inf): Remove declaration. (tmp_inf): Declare. * inferior.c (current_inf): Remove. (tmp_inf): New global, hack to bypass passing inferior throughout target stack. (print_inferior): Don't report current_inf. (add_inferior_command): Don't use current_inf. (name_inferior_command): Use first inferior of current_itset. (update_itset): Handle NULL case. (add_inferior_itset): Recursively add all inferiors derived from an exec if the exec's own inferior is present. (first_inferior_in_set): New function. (free_inferior): Comment out until references cleared reliably. * infcmd.c (focus_command): Don't set current_inf. (get_inferior_args): Use first_inferior_in_set instead of current_inf. (set_inferior_args): Ditto. (set_inferior_args_vector): Ditto. (notice_args_set): Ditto. * breakpoint.c (insert_breakpoint_locations): Remove insertion test using current_inf, set tmp_inf. (reattach_breakpoints): Set tmp_inf. (bpstat_check_breakpoint_conditions): Test trigger set here... (bpstat_stop_status): ... instead of here. (bpstat_check_trigger_set): Add special case for exec's own inferior. (print_one_breakpoint_location): Also test for multiple inferiors before displaying location's inferior, flag trigger set with "i/t" instead of "focus". (check_duplicates): Pass location's inferior to... (check_duplicates_for): Add inferior arg and use. (set_raw_breakpoint): Override sal inferior with one from the trigger set. (add_location_to_breakpoint): Ditto. * remote.c (remote_xfer_memory): Switch inferiors if tmp_inf is set to something different from inferior_ptid. (remote_xfer_partial): Ditto. * top.c (execute_command): Always update the current itset. 2008-09-19 Stan Shebs <stan@codesourcery.com> * inferior.c (set_inferior_exec): New function. (set_inferior_exec_command): New command. * inferior.h: Declare set_inferior_exec. * fork-child.c (fork_inferior): Set the inferior's exec. * remote.c (extended_remote_create_inferior_1): Ditto. gdb/doc/ * gdb.texinfo (Debugging Multiple Programs): Describe set-exec. 2008-09-18 Stan Shebs <stan@codesourcery.com> * target.c (target_resize_to_sections): Adjust execs' section tables too. 2008-09-17 Stan Shebs <stan@codesourcery.com> gdb/doc/ * gdb.texinfo (Invoking GDB): Describe multiple program args. (File Options): Describe multi-program effects. (Multiple Programs): New section, multi-program debugging. (Forks): Rename section from "Processes". (Specify Location): Describe the #-syntax. (Variables): Describe the #-syntax. (Files): Describe add-file and add-exec-file. (Maintenance Commands): Describe maint print execs. 2008-09-15 Stan Shebs <stan@codesourcery.com> * exec.c (addr_space_info_command): Don't try to display host address. 2008-09-14 Stan Shebs <stan@codesourcery.com> * c-exp.y: (yylex): Accept '#' in identifiers. * linespec.c (decode_sharp): New function. (decode_line_1): Use it for #-syntax. (decode_indirect): Rewrite to accept exec arg and iterate over inferiors. (struct d_i_data): New struct for inferior iteration. (decode_indirect_callback): New function. (decode_variable): Pass in exec, use in symbol lookup. 2008-09-14 Stan Shebs <stan@codesourcery.com> * breakpoint.h (struct bp_location): Add inferior field instead of address space field. * breakpoint.c (insert_breakpoint_locations): Only insert in appropriate inferior. (bpstat_check_trigger_set): New function. (bpstat_stop_status): Call it, check location's inferior also. (print_one_breakpoint_location): Report location's inferior. (set_raw_breakpoint): Set location inferior, clear an experiment. (add_location_to_breakpoint): Ditto. (expand_line_sal_maybe): Check for non-NULL original function. (resolve_sal_pc): Set sal inferior. (clear_command): Be careful to not clear anything twice. * symtab.h: Update declarations of symbol lookups. (struct symtab_and_line): Change address space to inferior field. * symtab.c (init_sal): Clear inferior field. (append_expanded_sal): Set inferior. (lookup_symbol_in_language_1): New function. (lookup_symbol_in_language): Call it. (lookup_symbol_in_exec_in_language): New function. (lookup_symbol): Detect #-syntax and find exec to use. (lookup_symbol_aux): Add exec argument and use it. (lookup_symbol_aux_symtabs): Ditto. (lookup_symbol_aux_psymtabs): Ditto. (basic_lookup_symbol_nonlocal): Ditto. (lookup_symbol_static): Ditto. (lookup_symbol_global): Ditto. * ada-lang.c (cp_lookup_symbol_nonlocal): Ditto. * cp-support.h (cp_lookup_symbol_nonlocal): Ditto. * cp-namespace.c (cp_lookup_symbol_nonlocal): Ditto. * language.h (struct language_defn): Ditto. * scm-valprint.c (scm_inferior_print): Add exec arg to lookup_symbol_global. * source.c (select_source_symtab): Use current_exec. * addrspace.h (struct addr_space): New field num. * exec.h (struct exec): New fields sections and sections_end. * exec.c (exec_file_attach_1): Set them from exec_ops, set inferior's address space name from exec. (find_exec_by_substr): New function. (build_section_table): Don't free old table. (print_section_info): Use exec's section table. (next_address_space_num): New global, numbering for address spaces. (new_address_space): Use it. (addr_space_info_command): Display it. * infcmd.c (set_current_exec): Set exec_ops section table. * inferior.h (update_itset): Declare. * inferior.c (add_inferior_silent): Set address space. (print_inferior): Display it. (number_of_inferiors): New function. (itset_member): New function. 2008-09-04 Stan Shebs <stan@codesourcery.com> * corefile.c (close_exec_file): Remove #if 0 block. (validate_files): Use first_exec instead of exec_bfd. (get_exec_file): Ditto. * corelow.c (core_open): Ditto. * utils.c (string_to_core_addr): Ditto. * arch-utils.c (gdbarch_update_p): Ditto. * linux-thread-db.c (enable_thread_event): Ditto. (thread_db_get_thread_local_address ): Ditto. * exec.c (find_exec_by_name): Test short name also. (file_command): Set current exec. 2008-09-03 Stan Shebs <stan@codesourcery.com> * inferior.c (add_threads_to_itset): Default to including all of an inferior's threads. 2008-08-31 Stan Shebs <stan@codesourcery.com> Parsing for i/t sets. * inferior.h (struct itset_entry): New struct. (struct itset): Make thread lists be per-inferior, add parse state variables. * inferior.c: (add_inferior_command): Add error checking and confirmation. (remove_inferior_command): Update for itset restructuring. (new_itset): Don't pass in dynamic-ness, call parse_itset_spec. (update_itset): Similarly. (parse_itset_spec): New, parsing of itset spec. (parse_itset_list, parse_itset_range, etc): New. (make_itset_from_spec): Rewrite. (dump_itset): Rewrite to reflect itset structure. * infcmd.c (focus_command): Similarly. 2008-08-25 Stan Shebs <stan@codesourcery.com> First part of multiprocess support. * Makefile.in (COMMON_OBS): Add inferior.o. * addrspace.h: New file. * breakpoints.h (struct bp_location): Add address space field. (struct breakpoint): Add trigger set and exec fields. * breakpoints.c (print_one_breakpoint_location): Display trigger set. (set_raw_breakpoint): Set trigger set from current itset. * corefile.c (reopen_exec_file): Rewrite for multiple execs. (get_exec_file): Add case for current_exec. * corelow.c (is_core_file): New function. (core_files_info): Pass additional arg to print_section_info. * exec.h (struct exec): New struct. * exec.c (execs): New global. (exec_bfd_mtime): Remove. (last_exec_created, current_exec, first_exec): New globals. (exec_close): Clear all exec objects. (exec_file_clear): Tweak user message. (exec_file_add): New function. (exec_file_attach_1): New function, body of exec_file_attach, plus new code to handle multiple execs. (exec_file_attach): Call it. (exec_file_update): New function. (create_exec, find_exec_by_name, number_of_execs): New functions. (exec_file_command): Rephrase query, set current exec. (add_exec_file_command): New command. (add_file_command): New command. (print_section_info): Add exec argument. (exec_files_info): Rewrite for multiple execs. (maintenance_print_execs): New function. (new_address_space): New function. (addr_space_info_command): New command. * gdbcore.h (exec_bfd_mtime): Remove decl. (exec_file_add): Declare. * infcmd.c: Include exec.h. (current_itset): New global. (set_current_exec): New function. (focus_command): New command. (get_inferior_args): Maybe get from the current inferior. (set_inferior_args): Also set in current inferior. (set_inferior_args_vector): Similarly. (notice_args_set): Similarly. (attach_command): Rephrase query. * inferior.h (struct inferior): New struct. (struct itset): New struct. * inferior.c: New file, management of multiple inferiors. * main.c (captured_main): Rewrite to allow multiple executables, pids, and corefiles on the command line. * maint.c (maintenance_info_sections): Rewrite for multiple execs. * objfiles.h (struct objfile): New field for exec. (ALL_OBJFILES_FOR_EXEC, ALL_PRIMARY_SYMTABS_FOR_EXEC, ALL_PSYMTABS_FOR_EXEC): New macros. * objfiles.c (allocate_objfile): Clear exec field. * solib.c (clear_solib): Use first_exec instead of exec_bfd. * source.c (select_source_symtab): Use ALL_OBJFILES_FOR_EXEC. (find_source_lines): Use mtime from exec. * symfile.c (syms_from_objfile): Don't clear objfile if multiple execs. (new_symfile_objfile): Get objfile's exec from last_exec_created. (symbol_file_clear): Rephrase messages. (reread_symbols): Update objfile's exec if necessary. * symmisc.c (dump_objfile): Dump objfile's exec also. (maintenance_print_objfiles): Report symfile_objfile. * symtab.h (struct symtab_and_line): Add address space field. * symtab.c (find_pc_sect_psymtab): Look for a plausible exec, and then use it. (lookup_symbol_aux_symtabs): Use current exec. (lookup_symbol_aux_symtabs): Ditto. (basic_lookup_transparent_type): Ditto. (find_pc_sect_symtab): Ditto. * target.h (print_section_info): Add arg to decl. * tui/tui-win.c: Rename "focus" command to "ffocus". gdb/testsuite: 2008-11-20 Stan Shebs <stan@codesourcery.com> 2008-09-14 Stan Shebs <stan@codesourcery.com> * gdb.gdb/selftest.exp: Update to reflect current sources. * Makefile.in (ALL_SUBDIRS): Add gdb.multi. * configure.ac (AC_OUTPUT): Add gdb.multi/Makefile. * configure: Regenerate. * gdb.multi/Makefile.in: New. * gdb.multi/hello.c, hangout.c, goodbye.c: New source files. * gdb.multi/base.exp: New file, basic multiprocess tests. 2008-08-25 Stan Shebs <stan@codesourcery.com> * config/monitor.exp: Match on rephrased message. * gdb.base/attach.exp: Ditto. * gdb.base/default.exp: Ditto. * lib/gdb.exp: Ditto.
* * breakpoint.h (struct bp_location): Change type of sectionUlrich Weigand2008-09-051-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | member to "struct obj_section *". * tracepoint.h (struct tracepoint): Likewise. * symtab.h (struct general_symbol_info): Replace bfd_section member with obj_section. (struct symtab_and_line): Change type of section member to "struct obj_section *". (SYMBOL_BFD_SECTION): Remove macro, replace by ... (SYMBOL_OBJ_SECTION): ... this. * minsym.c (prim_record_minimal_symbol_and_info): Record symbol section as obj_section instead of bfd_section. * ada-lang.c (ada_decode_symbol): Use gsymbol->obj_section directly instead of looking of obj_section from bfd_section. * objfiles.h (find_pc_sect_section): Remove. * objfiles.c (find_pc_sect_section): Remove. (find_pc_section): Inline find_pc_sect_section code. * symfile.h (find_pc_overlay): Return struct obj_section *. (find_pc_mapped_section): Likewise. (section_is_overlay, section_is_mapped): Change type of section argument to struct obj_section *. (pc_in_mapped_range, pc_in_unmapped_range): Likewise. (overlay_mapped_address, overlay_unmapped_address): Likewise. (symbol_overlayed_address): Likewise. * symtab.h (symbol_overlayed_address): Likewise. * symfile.c (overlay_is_mapped): Remove. (section_is_mapped): Inline overlay_is_mapped code. Update. (overlay_invalidate_all): Update. (section_is_overlay): Change section argument to type "struct obj_section *". Use bfd_ methods. (pc_in_unmapped_range): Likewise. Handle relocated sections. (pc_in_mapped_range): Likewise. Handle relocated sections. (sections_overlap): Likewise. (overlay_unmapped_address): Likewise. (overlay_mapped_address): Likewise. (symbol_overlayed_address): Likewise. (find_pc_overlay): Return struct obj_section *. (find_pc_mapped_section): Likewise. (list_overlays_command): Update. (map_overlay_command, unmap_overlay_command): Update. (simple_overlay_update): Update. * block.h (blockvector_for_pc_sect): Change section argument to type "struct obj_section *". (block_for_pc_sect): Likewise. * block.c (blockvector_for_pc_sect): Change section argument to type "struct obj_section *". (block_for_pc_sect): Likewise. * symtab.h (find_pc_sect_function, find_pc_sect_psymtab, find_pc_sect_symtab, find_pc_sect_psymbol, find_pc_sect_line, lookup_minimal_symbol_by_pc_section, find_function_start_pc): Likewise. (matching_bfd_sections): Rename to ... (matching_obj_sections): ... this. Update argument types. * blockframe.c (find_pc_sect_function): Likewise. * breakpoint.c (describe_other_breakpoints): Likewise. (breakpoint_has_pc, check_duplicates_for): Likewise. * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Likewise. (lookup_minimal_symbol_by_pc_section): Likewise. * symtab.c (find_pc_sect_psymtab_closer): Likewise. (find_pc_sect_psymtab, find_pc_sect_psymbol, find_pc_sect_symtab, find_pc_sect_line, find_function_start_pc): Likewise. (matching_bfd_sections): Rename to ... (matching_obj_sections): ... this. Update argument types. * blockframe.c (find_pc_partial_function): Update to section type changes. No longer call find_pc_sect_section. (cache_pc_function_section): Change to type "struct obj_section *". * breakpoint.c (resolve_sal_pc): Update to section type changes. * exec.c (xfer_memory): Likewise. * findvar.c (read_var_value): Likewise. * infcmd.c (jump_command): Likewise. * linespec.c (minsym_found): Likewise. * maint.c (maintenance_translate_address): Likewise. * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Likewise. (lookup_solib_trampoline_symbol_by_pc): Likewise. * parse.c (write_exp_msymbol): Likewise. * printcmd.c (build_address_symbolic): Likewise. (address_info, sym_info): Likewise. * symmisc.c (dump_msymbols, print_symbol): Likewise. * symtab.c (fixup_section): Likewise. (fixup_symbol_section, fixup_psymbol_section): Likewise. (find_pc_line, find_function_start_sal): Likewise. * target.c (memory_xfer_partial): Likewise. * hppa-hpux-tdep.c (hppa64_hpux_in_solib_call_trampoline): Likewise. * spu-tdep.c (spu_overlay_update): Likewise.
* * block.c (block_function): Renamed to ...Daniel Jacobowitz2008-07-151-1/+1
| | | | | | (block_linkage_function): ... this. All callers changed. * block.h (block_function): Renamed to ... (block_linkage_function): ... this.
* Updated copyright notices for most files.Daniel Jacobowitz2008-01-011-1/+1
|
* Support lexical blocks and function bodies that occupyJim Blandy2007-12-041-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | non-contiguous address ranges. * addrmap.c, addrmap.h: New files. * block.h (struct addrmap): New forward declaration. (struct blockvector): New member, 'map'. (BLOCKVECTOR_MAP): New accessor macro. * block.c: #include "addrmap.h" (blockvector_for_pc_sect): If the blockvector we've found has an address map, use it instead of searching the blocks. * buildsym.c: #include "addrmap.h" (pending_addrmap_obstack, pending_addrmap_interesting): New static variables. (really_free_pendings): If we have a pending addrmap, free it too. (record_block_range): New function. (make_blockvector): If we have an interesting pending addrmap, record it in the new blockvector. (start_symtab, buildsym_init): Assert that there is no pending addrmap now; we should have cleaned up any addrmaps we'd built previously. (end_symtab): If there is a pending addrmap left over that didn't get included in the blockvector, free it. * buildsym.h (struct addrmap): New forward declaration. (record_block_range): New prototype. * objfiles.c: #include "addrmap.h". (objfile_relocate): Relocate the blockvector's address map, if present. * dwarf2read.c (dwarf2_record_block_ranges): New function. (read_func_scope, read_lexical_block_scope): Call it. * Makefile.in (SFILES): Add addrmap.c. (addrmap_h): New header dependency variable. (COMMON_OBS): Add addrmap.o. (addrmap.o): New rule.l (block.o, objfiles.o, buildsym.o): Depend on $(addrmap_h). * block.c (blockvector_for_pc, blockvector_for_pc_sect): Return a pointer to the block, not its index in the blockvector. (block_for_pc_sect): Use the returned block, instead of looking it up ourselves. * block.h (blockvector_for_pc, blockvector_for_pc_sect): Update declarations. * breakpoint.c (resolve_sal_pc): Use returned block, instead of looking it up ourselves. * stack.c (print_frame_label_vars): Disable function, which depends on the block's index. * buildsym.c (finish_block): Return the block we've built. * buildsym.h (finish_block): Update prototype. * defs.h (CORE_ADDR_MAX): New constant.
* * block.h (struct block): Remove "gcc_compile_flag" member.Ulrich Weigand2007-10-121-13/+0
| | | | | | | | | | | | | | | | | | | | | | (BLOCK_GCC_COMPILED): Remove. * block.c (allocate_block): Do not clear BLOCK_GCC_COMPILED. * buildsym.c (finish_block): Do not set it. * symmisc.c (dump_symtab_1): Do not dump it. * value.h (using_struct_return): Remove "gcc_p" argument. * value.c (using_struct_return): Likewise. * eval.c (evaluate_subexp_standard): Adapt callers. * infcall.c (call_function_by_hand): Likewise. * stack.c (return_command): Likewise. * sparc-tdep.c (sparc32_push_dummy_code): Likewise. * gdbarch.sh (push_dummy_code): Remove "using_gcc" parameter. * gdbarch.c, gdbarch.h: Regenerate. * cris-tdep.c (cris_push_dummy_code): Adapt prototype. * hppa-hpux-tdep.c (hppa_hpux_push_dummy_code): Likewise. * sparc-tdep.c (sparc32_push_dummy_code): Likewise. * infcall.c (generic_push_dummy_code, push_dummy_code): Likewise. (push_dummy_code, call_function_by_hand): Adapt callers.
* Switch the license of all .c files to GPLv3.Joel Brobecker2007-08-231-4/+2
| | | | | Switch the license of all .h files to GPLv3. Switch the license of all .cc files to GPLv3.
* Copyright updates for 2007.Daniel Jacobowitz2007-01-091-1/+1
|
* * breakpoint.c:Eli Zaretskii2005-12-171-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * arm-tdep.c: * ia64-tdep.c: * i386-tdep.c: * hpread.c: * hppa-tdep.c: * hppa-hpux-tdep.c: * gnu-nat.c: * gdbtypes.c: * gdbarch.h: * gdbarch.c: * eval.c: * dwarf2read.c: * dbxread.c: * copying: * symfile.c: * stabsread.c: * sh64-tdep.c: * sh-tdep.c: * s390-tdep.c: * rs6000-tdep.c: * remote.c: * remote-mips.c: * mips-tdep.c: * mdebugread.c: * linux-nat.c: * infrun.c: * xcoffread.c: * win32-nat.c: * valops.c: * utils.c: * tracepoint.c: * target.c: * symtab.c: * c-exp.y: * ada-valprint.c: * ada-typeprint.c: * ada-lex.l: * ada-lang.h: * ada-lang.c: * ada-exp.y: * alphafbsd-tdep.c: * alphabsd-tdep.h: * alphabsd-tdep.c: * alphabsd-nat.c: * alpha-tdep.h: * alpha-tdep.c: * alpha-osf1-tdep.c: * alpha-nat.c: * alpha-mdebug-tdep.c: * alpha-linux-tdep.c: * alpha-linux-nat.c: * aix-thread.c: * abug-rom.c: * arch-utils.c: * annotate.h: * annotate.c: * amd64obsd-tdep.c: * amd64obsd-nat.c: * amd64nbsd-tdep.c: * amd64nbsd-nat.c: * amd64fbsd-tdep.c: * amd64fbsd-nat.c: * amd64bsd-nat.c: * amd64-tdep.h: * amd64-tdep.c: * amd64-sol2-tdep.c: * amd64-nat.h: * amd64-nat.c: * amd64-linux-tdep.c: * amd64-linux-nat.c: * alphanbsd-tdep.c: * block.h: * block.c: * bfd-target.h: * bfd-target.c: * bcache.h: * bcache.c: * ax.h: * ax-general.c: * ax-gdb.h: * ax-gdb.c: * avr-tdep.c: * auxv.h: * auxv.c: * armnbsd-tdep.c: * armnbsd-nat.c: * arm-tdep.h: * arm-linux-nat.c: * arch-utils.h: * charset.c: * call-cmds.h: * c-valprint.c: * c-typeprint.c: * c-lang.h: * c-lang.c: * buildsym.h: * buildsym.c: * bsd-uthread.h: * bsd-uthread.c: * bsd-kvm.h: * bsd-kvm.c: * breakpoint.h: * core-regset.c: * core-aout.c: * completer.h: * completer.c: * complaints.h: * complaints.c: * command.h: * coffread.c: * coff-solib.h: * coff-solib.c: * coff-pe-read.h: * coff-pe-read.c: * cli-out.h: * cli-out.c: * charset.h: * dink32-rom.c: * dictionary.h: * dictionary.c: * demangle.c: * defs.h: * dcache.h: * dcache.c: * d10v-tdep.c: * cpu32bug-rom.c: * cp-valprint.c: * cp-support.h: * cp-support.c: * cp-namespace.c: * cp-abi.h: * cp-abi.c: * corelow.c: * corefile.c: * environ.c: * elfread.c: * dwarfread.c: * dwarf2loc.c: * dwarf2expr.h: * dwarf2expr.c: * dwarf2-frame.h: * dwarf2-frame.c: * dve3900-rom.c: * dummy-frame.h: * dummy-frame.c: * dsrec.c: * doublest.h: * doublest.c: * disasm.h: * disasm.c: * fork-child.c: * findvar.c: * fbsd-nat.h: * fbsd-nat.c: * f-valprint.c: * f-typeprint.c: * f-lang.h: * f-lang.c: * expression.h: * expprint.c: * exec.h: * exec.c: * exceptions.h: * exceptions.c: * event-top.h: * event-top.c: * event-loop.h: * event-loop.c: * gdb.c: * gdb-stabs.h: * gdb-events.h: * gdb-events.c: * gcore.c: * frv-tdep.h: * frv-tdep.c: * frv-linux-tdep.c: * frame.h: * frame.c: * frame-unwind.h: * frame-unwind.c: * frame-base.h: * frame-base.c: * gdb_vfork.h: * gdb_thread_db.h: * gdb_string.h: * gdb_stat.h: * gdb_regex.h: * gdb_ptrace.h: * gdb_proc_service.h: * gdb_obstack.h: * gdb_locale.h: * gdb_dirent.h: * gdb_curses.h: * gdb_assert.h: * gdbarch.sh: * gdb.h: * hpux-thread.c: * hppabsd-nat.c: * hppa-tdep.h: * hpacc-abi.c: * h8300-tdep.c: * gregset.h: * go32-nat.c: * gnu-v3-abi.c: * gnu-v2-abi.h: * gnu-v2-abi.c: * gnu-nat.h: * glibc-tdep.c: * gdbtypes.h: * gdbcore.h: * gdbcmd.h: * i386nbsd-tdep.c: * i386nbsd-nat.c: * i386gnu-tdep.c: * i386gnu-nat.c: * i386fbsd-tdep.c: * i386fbsd-nat.c: * i386bsd-tdep.c: * i386bsd-nat.h: * i386bsd-nat.c: * i386-tdep.h: * i386-sol2-nat.c: * i386-nto-tdep.c: * i386-nat.c: * i386-linux-tdep.h: * i386-linux-tdep.c: * i386-linux-nat.c: * i386-cygwin-tdep.c: * inf-ttrace.c: * inf-ptrace.h: * inf-ptrace.c: * inf-loop.h: * inf-loop.c: * inf-child.h: * inf-child.c: * ia64-tdep.h: * ia64-linux-nat.c: * i387-tdep.h: * i387-tdep.c: * i386v4-nat.c: * i386v-nat.c: * i386obsd-tdep.c: * i386obsd-nat.c: * kod.c: * jv-valprint.c: * jv-typeprint.c: * jv-lang.h: * jv-lang.c: * irix5-nat.c: * iq2000-tdep.c: * interps.h: * interps.c: * inftarg.c: * inflow.h: * inflow.c: * inferior.h: * infcmd.c: * infcall.h: * infcall.c: * inf-ttrace.h: * m32r-tdep.h: * m32r-tdep.c: * m32r-rom.c: * m32r-linux-tdep.c: * m32r-linux-nat.c: * m2-valprint.c: * m2-typeprint.c: * m2-lang.h: * m2-lang.c: * lynx-nat.c: * linux-thread-db.c: * linux-nat.h: * linespec.c: * libunwind-frame.h: * libunwind-frame.c: * language.h: * language.c: * macroexp.c: * macrocmd.c: * m88kbsd-nat.c: * m88k-tdep.h: * m88k-tdep.c: * m68klinux-tdep.c: * m68klinux-nat.c: * m68kbsd-tdep.c: * m68kbsd-nat.c: * m68k-tdep.h: * m68k-tdep.c: * mips-linux-nat.c: * mips-irix-tdep.c: * minsyms.c: * memattr.h: * memattr.c: * mem-break.c: * mdebugread.h: * main.h: * main.c: * macrotab.h: * macrotab.c: * macroscope.h: * macroscope.c: * macroexp.h: * nbsd-tdep.c: * mt-tdep.c: * monitor.h: * monitor.c: * mn10300-tdep.h: * mn10300-tdep.c: * mn10300-linux-tdep.c: * mipsv4-nat.c: * mipsread.c: * mipsnbsd-tdep.h: * mipsnbsd-tdep.c: * mipsnbsd-nat.c: * mips64obsd-tdep.c: * mips64obsd-nat.c: * mips-tdep.h: * mips-mdebug-tdep.c: * mips-linux-tdep.c: * osabi.h: * osabi.c: * ocd.h: * ocd.c: * observer.c: * objfiles.h: * objfiles.c: * objc-lang.h: * objc-lang.c: * objc-exp.y: * nto-tdep.h: * nto-tdep.c: * nto-procfs.c: * nlmread.c: * nbsd-tdep.h: * ppcobsd-tdep.c: * ppcobsd-nat.c: * ppcnbsd-tdep.h: * ppcnbsd-tdep.c: * ppcnbsd-nat.c: * ppcbug-rom.c: * ppc-tdep.h: * ppc-sysv-tdep.c: * ppc-linux-tdep.c: * ppc-linux-nat.c: * ppc-bdm.c: * parser-defs.h: * parse.c: * p-valprint.c: * p-typeprint.c: * p-lang.h: * p-lang.c: * remote-fileio.h: * remote-fileio.c: * remote-est.c: * remote-e7000.c: * regset.h: * regset.c: * reggroups.h: * reggroups.c: * regcache.h: * regcache.c: * proc-why.c: * proc-service.c: * proc-events.c: * printcmd.c: * ppcobsd-tdep.h: * sentinel-frame.h: * sentinel-frame.c: * scm-valprint.c: * scm-tags.h: * scm-lang.h: * scm-lang.c: * scm-exp.c: * s390-tdep.h: * rom68k-rom.c: * remote.h: * remote-utils.c: * remote-st.c: * remote-sim.c: * remote-sds.c: * remote-rdp.c: * remote-rdi.c: * remote-hms.c: * sim-regno.h: * shnbsd-tdep.h: * shnbsd-tdep.c: * shnbsd-nat.c: * sh-tdep.h: * serial.h: * serial.c: * ser-unix.h: * ser-unix.c: * ser-tcp.c: * ser-pipe.c: * ser-go32.c: * ser-e7kpc.c: * ser-base.h: * ser-base.c: * solib.c: * solib-svr4.h: * solib-svr4.c: * solib-sunos.c: * solib-som.h: * solib-som.c: * solib-pa64.h: * solib-pa64.c: * solib-osf.c: * solib-null.c: * solib-legacy.c: * solib-irix.c: * solib-frv.c: * solib-aix5.c: * sol-thread.c: * sparc64-linux-tdep.c: * sparc64-linux-nat.c: * sparc-tdep.h: * sparc-tdep.c: * sparc-sol2-tdep.c: * sparc-sol2-nat.c: * sparc-nat.h: * sparc-nat.c: * sparc-linux-tdep.c: * sparc-linux-nat.c: * source.h: * source.c: * somread.c: * solist.h: * solib.h: * std-regs.c: * stack.h: * stack.c: * stabsread.h: * sparcobsd-tdep.c: * sparcnbsd-tdep.c: * sparcnbsd-nat.c: * sparc64obsd-tdep.c: * sparc64nbsd-tdep.c: * sparc64nbsd-nat.c: * sparc64fbsd-tdep.c: * sparc64fbsd-nat.c: * sparc64-tdep.h: * sparc64-tdep.c: * sparc64-sol2-tdep.c: * sparc64-nat.c: * ui-file.c: * typeprint.h: * typeprint.c: * tramp-frame.h: * tramp-frame.c: * trad-frame.h: * trad-frame.c: * tracepoint.h: * top.c: * tobs.inc: * thread.c: * terminal.h: * target.h: * symfile.h: * stop-gdb.c: * vaxbsd-nat.c: * vax-tdep.h: * vax-tdep.c: * vax-nat.c: * varobj.h: * varobj.c: * value.h: * value.c: * valprint.h: * valprint.c: * v850-tdep.c: * uw-thread.c: * user-regs.c: * ui-out.h: * ui-out.c: * ui-file.h: * xcoffsolib.h: * xcoffsolib.c: * wrapper.c: * wince.c: * wince-stub.h: * wince-stub.c: * vaxobsd-tdep.c: * vaxnbsd-tdep.c: * gdb_gcore.sh: * copying.c: * configure.ac: * aclocal.m4: * acinclude.m4: * reply_mig_hack.awk: * observer.sh: * gdb_mbuild.sh: * arm-linux-tdep.c: * blockframe.c: * dbug-rom.c: * environ.h: * dwarf2loc.h: * gdb-events.sh: * glibc-tdep.h: * gdb_wait.h: * gdbthread.h: * i386-sol2-tdep.c: * hppabsd-tdep.c: * hppa-linux-nat.c: * hppa-hpux-nat.c: * ia64-linux-tdep.c: * infptrace.c: * linespec.h: * maint.c: * mips-mdebug-tdep.h: * remote-m32r-sdi.c: * s390-nat.c: * rs6000-nat.c: * remote-utils.h: * sh3-rom.c: * sh-linux-tdep.c: * top.h: * symtab.h: * symmisc.c: * symfile-mem.c: * srec.h: * user-regs.h: * version.h: * valarith.c: * xstormy16-tdep.c: * wrapper.h: * Makefile.in: * f-exp.y: * cris-tdep.c: * cp-name-parser.y: * procfs.c: * proc-utils.h: * proc-flags.c: * proc-api.c: * p-exp.y: * m68hc11-tdep.c: * m2-exp.y: * kod.h: * kod-cisco.c: * jv-exp.y: * hppa-linux-tdep.c: Add (c) after Copyright. Update the FSF address.
* 2004-01-17 Andrew Cagney <cagney@redhat.com>Andrew Cagney2004-01-181-3/+1
| | | | | | * mdebugread.c (compare_blocks): Make addr_diff a LONGEST. * block.h: Make GLOBAL_BLOCK, STATIC_BLOCK, FIRST_LOCAL_BLOOCK enums.
* 2003-09-11 David Carlton <carlton@kealia.com>David Carlton2003-09-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gdbtypes.h: Add TYPE_CODE_NAMESPACE. * gdbtypes.c (init_type): Handle TYPE_CODE_NAMESPACE. (recursive_dump_type): Ditto. * printcmd.c (print_formatted): Ditto. * typeprint.c (print_type_scalar): Ditto. * c-typeprint.c (c_type_print_varspec_prefix): Ditto. (c_type_print_varspec_suffix, c_type_print_base): Ditto. * cp-support.h: Declare cp_check_possible_namespace_symbols, maint_cplus_cmd_list. * cp-support.c: Make maint_cplus_cmd_list extern. * cp-namespace.c: Include objfiles.h, gdbtypes.h, dictionary.h, command.h. (lookup_symbol_file): Look in possible namespace blocks when appropriate. (initialize_namespace_symtab): New. (get_possible_namespace_block, free_namespace_block) (check_possible_namespace_symbols) (check_possible_namespace_symbols_loop) (check_one_possible_namespace_symbol) (lookup_possible_namespace_symbol, maintenance_cplus_namespace) (_initialize_cp_namespace): Ditto. * block.h: Declare allocate_block. * block.c (allocate_block): New. * jv-lang.c (get_java_class_symtab): Allocate blocks via allocate_block. * symfile.h: Update declaration of add_psymbol_to_list. * symfile.c (add_psymbol_to_list): Return the partial symbol in question. * dwarf2read.c (dwarf2_build_psymtabs_hard): Add argument to scan_partial_symbols_call. (scan_partial_symbols): Add NAMESPACE argument; update calls to helper functions. (add_partial_symbol): If necessary, scan mangled names for names of namespaces. (add_partial_namespace): Add NAMESPACE argument; generate partial symbols associated to namespaces. (add_partial_enumeration): Add NAMESPACE argument. (new_symbol): Allow namespace syms. (read_namespace): Generate namespace syms. * objfiles.h: Add opaque declaration of struct symtab. (struct objfile): Add cp_namespace_symtab member. * objfiles.c (allocate_objfile): Set objfile->cp_namespace_symtab. * Makefile.in (cp-namespace.o): Depend on objfiles_h, gdbtypes_h, dictionary_h, command_h. 2003-09-11 David Carlton <carlton@kealia.com> * gdb.c++/namespace.exp: Add tests for namespace types. * gdb.c++/maint.exp (test_help): Test 'help maint cp namespace'. (test_namespace): New.
* 2003-06-11 David Carlton <carlton@bactrian.org>David Carlton2003-06-111-47/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * dictionary.h: New. * dictionary.c: New. * block.h: Add opaque declaration for struct dictionary. (struct block): Add 'dict' member; delete 'hashtable', 'nsyms', 'sym' members. (BLOCK_DICT): New macro. Delete macros BLOCK_HASHTABLE, BLOCK_NSYMS, BLOCK_SYM, BLOCK_BUCKETS, BLOCK_BUCKET, BLOCK_HASHTABLE_SIZE, BLOCK_SHOULD_SORT. (ALL_BLOCK_SYMBOLS): Update definition. * Makefile.in (SFILES): Add dictionary.c. (dictionary_h): New. (COMMON_OBS): Add dictionary.o. (dictionary.o): New. (ada-lang.o): Depend on dictionary_h. (buildsym.o, coffread.o, jv-lang.o, mdebugread.o, objfiles.o) (stack.o, symmisc.o, symtab.o, tracepoint.o, valops.o) (mi-cmd-stack.o): Ditto. (gdbtk-cmds.o): Update dependencies. (gdbtk-stack.o): Ditto. * ada-lang.c: Include dictionary.h. (symtab_for_sym): Update uses of ALL_BLOCK_SYMBOLS. (fill_in_ada_prototype, debug_print_block): Ditto. (ada_add_block_symbols): Update uses of ALL_BLOCK_SYMBOLS; replace explicit iteration by use of ALL_BLOCK_SYMBOLS. Delete variable 'is_sorted'. * mdebugread.c: Include dictionary.h. (struct parse_stack): Delete 'maxsyms' member. (parse_symbol): Update calls to new_block. Delete calls to shrink_block. Use dictionary methods. (psymtab_to_symtab_1): Delete calls to sort_symtab_syms. Update calls to new_symtab. Don't maintain maxsyms data. (mylookup_symbol): Update use of ALL_BLOCK_SYMBOLS. (add_symbol): Just call dict_add_symbol. (new_symtab): Delete 'maxsyms' argument. (new_symtab): Update calls to new_block. (new_block): Delete 'maxsyms' argument; add 'function' argument. (shrink_block): Delete function. (fixup_sigtramp): Update call to new_block. Add symbol via dict_add_symbol. * jv-lang.c: Include dictionary.h. (get_java_class_symtab): Set the BLOCK_DICT of the blocks appropriately. Set class_symtab->free_func. Make sure the blockvector is big enough to hold two blocks. (add_class_symtab_symbol): Use dictionary methods. (free_class_block): New function. (type_from_class): Replace explicit iteration by ALL_BLOCK_SYMBOLS. * symtab.h (struct symtab): Replace 'free_ptr' method by 'free_func'. * dwarf2read.c (psymtab_to_symtab_1): Delete call to sort_symtab_syms. * dwarfread.c (psymtab_to_symtab_1): Delete call to sort_symtab_syms. * coffread.c (coff_symfile_read): Delete call to sort_symtab_syms. Include dictionary.h. (patch_opaque_types): Update use of ALL_BLOCK_SYMBOLS. * dbxread.c (dbx_psymtab_to_symtab_1): Delete call to sort_symtab_syms. * objfiles.c: Include dictionary.h. (objfile_relocate): Update use of ALL_BLOCK_SYMBOLS. * buildsym.c: Include dictionary.h. (finish_block): Use dictionary methods. (end_symtab): Set free_func to NULL, not free_ptr. * tracepoint.c: Include dictionary.h. (add_local_symbols): Update use of ALL_BLOCK_SYMBOLS. (scope_info): Ditto. * stack.c: Include dictionary.h. (print_block_frame_locals): Update use of ALL_BLOCK_SYMBOLS. (print_block_frame_labels, print_frame_arg_vars) (print_frame_args): Ditto. * symmisc.c (free_symtab_block): Use dictionary methods. (dump_symtab): Ditto. (free_symtab): Replace use of 'free_ptr' by 'free_func'. Include dictionary.h. * symfile.h: Delete declarations of sort_block_syms, sort_symtab_syms. * symfile.c (sort_block_syms): Delete. (sort_symtab_syms): Delete. * symtab.c: Include dictionary.h. (lookup_block_symbol): Use dictionary iterators. (find_pc_sect_symtab): Update use of ALL_BLOCK_SYMBOLS. (search_symbols, make_symbol_completion_list): Ditto. (make_symbol_overload_list): Ditto. * valops.c (value_of_local): Use dict_empty. Include dictionary.h. 2003-06-11 David Carlton <carlton@bactrian.org> * generic/gdbtk-stack.c: Include dictionary.h. (gdb_block_vars): Update use of ALL_BLOCK_SYMBOLS. (gdb_get_blocks, gdb_get_vars_command): Ditto. * generic/gdbtk-cmds.c: Include dictionary.h. (gdb_listfuncs): Update use of ALL_BLOCK_SYMBOLS. 2003-06-11 David Carlton <carlton@bactrian.org> * mi-cmd-stack.c: Include dictionary.h. (list_args_or_locals): Update use of ALL_BLOCK_SYMBOLS.
* 2003-06-11 David Carlton <carlton@bactrian.org>David Carlton2003-06-111-8/+0
| | | | | | | | | | | | | | | | | | * block.h (BLOCK_SHOULD_SORT): Delete. * symtab.c (lookup_block_symbol): Don't worry about sorted linear blocks. * ada-lang.c (ada_add_block_symbols): Ditto. * symfile.c (sort_block_syms): Delete. (sort_symtab_syms): Ditto. * symfile.h: Delete sort_symtabs_syms and sort_block_syms declarations. * coffread.c (coff_symfile_read): Don't call sort_symtab_syms. * dbxread.c (dbx_psymtab_to_symtab_1): Ditto. * dwarf2read.c (psymtab_to_symtab_1): Ditto. * dwarfread.c (psymtab_to_symtab_1): Ditto. * hpread.c (hpread_psymtab_to_symtab_1): Ditto. * mdebugread.c (psymtab_to_symtab_1): Ditto. * xcoffread.c (xcoff_psymtab_to_symtab_1): Ditto.
* 2003-06-02 David Carlton <carlton@math.stanford.edu>David Carlton2003-06-021-2/+2
| | | | | | | * block.c (contained_in): Add 'const' to arguments. (block_function): Ditto. * block.h: Update declarations for block_function and contained_in.
* 2003-05-19 David Carlton <carlton@bactrian.org>David Carlton2003-05-201-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | Partial fix for PR c++/827. * cp-support.h: Include symtab.h. Declare cp_lookup_symbol_nonlocal, cp_lookup_symbol_namespace. * cp-namespace.c: Update contributors. (cp_lookup_symbol_nonlocal): New. (lookup_namespace_scope, cp_lookup_symbol_namespace) (lookup_symbol_file): Ditto. * c-lang.c (cplus_language_defn): Use cp_lookup_symbol_nonlocal. * block.h: Declare block_scope, block_using, block_global_block. * block.c (block_scope): New. (block_using, block_global_block): Ditto. * Makefile.in (cp_support_h): Depend on symtab_h. * config/djgpp/fnchange.lst: Add testsuite/gdb.c++/namespace1.cc. 2003-05-19 David Carlton <carlton@bactrian.org> * gdb.c++/namespace.exp: Add namespace scope and anonymous namespace tests. Bump copyright date. * gdb.c++/namespace.cc: Add anonymous namespace and namespace C. (main): Call C::D::marker2. * gdb.c++/namespace1.cc: New file.
* 2003-05-19 David Carlton <carlton@bactrian.org>David Carlton2003-05-201-0/+2
| | | | | | | | * block.h: Declare block_static_block. * block.c (block_static_block): New. * symtab.c (lookup_symbol_aux): Remove 'static_block' argument to lookup_symbol_aux_local, calling block_static_block instead. (lookup_symbol_aux_local): Delete 'static_block' argument.
* 2003-04-15 David Carlton <carlton@math.stanford.edu>David Carlton2003-04-151-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Makefile.in (SFILES): Add cp-namespace.c. (COMMON_OBS): Add cp-namespace.o. (block.o): Depend on gdb_obstack_h and cp_support_h. (buildsym.o): Depend on cp_support_h. (cp-namespace.o): New. (cp-support.o): Depend on gdb_string_h, demangle_h, gdb_assert_h, gdb_obstack_h, symtab_h, symfile_h, and gdbcmd_h. (dwarf2read.o): Depend on cp_support_h. * jv-lang.c (get_java_class_symtab): Set BLOCK_NAMESPACE. * dwarf2read.c (process_die): Set processing_has_namespace_info, processing_current_namespace. (read_namespace): Update processing_current_namespace; check for anonymous namespaces. (dwarf2_name): New function. (dwarf2_extension): Ditto. * cp-support.h: Update copyright, contributors. Add inclusion guards. Add opaque declaration for structs obstack, block, symbol. (struct using_direct): New struct. Add declarations for cp_find_first_component, cp_entire_prefix_len, processing_has_namespace_info, processing_current_namespace, cp_is_anonymous, cp_add_using_directive, cp_initialize_namespace, cp_finalize_namespace, cp_set_block_scope, cp_scan_for_anonymous_namespaces. * cp-namespace.c: New file. * cp-support.c: Update copyright. Include ctype.h, gdb_assert.h, gdbcmd.h. New variable maint_cplus_cmd_list. (cp_find_first_component): New function. (cp_entire_prefix_len, maint_cplus_command) (first_component_command, _initialize_cp_support): Ditto. * buildsym.c: Include cp-support.h. New variable using_list. (add_symbol_to_list): Check for anonymous namespaces. (finish_block): Set block's scope. (start_symtab): Initialize C++ namespace support. (end_symtab): Finalize C++ namespace support. * block.h: Add opaque declarations for structs block_namespace_info, using_direct, and obstack. Add declarations for block_set_scope and block_set_using. (struct block): Add 'language_specific' member. (BLOCK_NAMESPACE): New macro. * block.c: Include gdb_obstack.h and cp-support.h. (struct block_namespace_info): New struct. (block_set_scope): New function. (block_set_using, block_initialize_namespace): Ditto. 2003-04-15 David Carlton <carlton@math.stanford.edu> * gdb.c++/maint.exp: New file.
* 2003-02-19 David Carlton <carlton@math.stanford.edu>David Carlton2003-02-201-0/+183
* Makefile.in (SFILES): Add block.c. (block_h): New. (COMMON_OBS): Add block.o. (block.o): New. (x86-64-tdep.o): Add $(block_h). (values.o, valops.o, tracepoint.o, symtab.o, symmisc.o, symfile.o) (stack.o, printcmd.o, p-exp.tab.o, parse.o, objfiles.o) (objc-exp.tab.o, objc-lang.o, nlmread.o, mips-tdep.o, mdebugread.o) (m2-exp.tab.o, linespec.o, jv-lang.o, jv-exp.tab.o, infcmd.o) (f-valprint.o, findvar.o, f-exp.tab.o, expprint.o, coffread.o) (c-exp.tab.o, buildsym.o, breakpoint.o, blockframe.o, ax-gdb.o) (alpha-tdep.o, ada-lang.o, ada-exp.tab.o, mi-cmd-stack.o): Ditto. * value.h: Add opaque declaration for struct block. * parser-defs.h, objc-lang.h, buildsym.h, breakpoint.h: Ditto. * ada-lang.h: Ditto. * x86-64-tdep.c: #include "block.h" * values.c, valops.c, tracepoint.c, symtab.c, symmisc.c: Ditto. * symfile.c, stack.c, printcmd.c, p-exp.y, parse.c: Ditto. * objfiles.c, objc-exp.y, objc-lang.c, nlmread.c: Ditto. * mips-tdep.c, mdebugread.c, m2-exp.y, linespec.c: Ditto. * jv-lang.c, jv-exp.y, infcmd.c, f-valprint.c: Ditto. * findvar.c, f-exp.y, expprint.c, coffread.c, c-exp.y: Ditto. * buildsym.c, breakpoint.c, blockframe.c, ax-gdb.c: Ditto. * alpha-tdep.c, ada-lang.c, ada-exp.y: Ditto. * blockframe.c (blockvector_for_pc_sect): Move to "block.c". (blockvector_for_pc, block_for_pc_sect, block_for_pc): Ditto. * symtab.c (block_function): Ditto. (contained_in): Ditto. * frame.h: Move block_for_pc and block_for_pc_sect declarations to block.h. Add opaque declaration for struct block. * symtab.h: Move block_function and contained_in declarations to block.h. Add opaque declarations for struct block, struct blockvector. (struct block): Move to block.h. (struct blockvector): Ditto. (BLOCK_START, BLOCK_END, BLOCK_FUNCTION, BLOCK_SUPERBLOCK) (BLOCK_GCC_COMPILED, BLOCK_HASHTABLE, BLOCK_NSYMS, BLOCK_SYM) (BLOCK_BUCKETS, BLOCK_BUCKET, BLOCK_HASHTABLE_SIZE) (ALL_BLOCK_SYMBOLS, BLOCK_SHOULD_SORT, BLOCKVECTOR_NBLOCKS) (BLOCKVECTOR_BLOCK, GLOBAL_BLOCK, STATIC_BLOCK, FIRST_LOCAL_BLOCK): Ditto. * block.c: New file. * block.h: New file. 2003-02-19 David Carlton <carlton@math.stanford.edu> * mi-cmd-stack.c: #include "block.h"