2006-07-18  Jason Molenda  (jmolenda@apple.com)

        * amd64-tdep.c (amd64_analyze_prologue): Skip over fix-and-continue
        generated nop insns when looking for the prologue.

2006-06-13  Jim Ingham  <jingham@apple.com>

	* Makefile.in: Uncomment the LIBXML2 variables
	* config.in: Put the LIBXML2 defines back (lost
	in the merge.)
	
2006-06-12  Jim Ingham  <jingham@apple.com>

	* charset.c: Add a utf-8 charset.
	(utf_8_print_literally): New function.
	(utf_8_to_control): New function.
	(utf_8_family_charset): New function.
	(register_charset): Register it.
	* configure.ac: Make UTF-8 the macosx native
	default.
	
2006-06-11  Stan Shebs  <shebs@apple.com>

	* checkpoint.c (create_checkpoint_command): Add a check.
	(collect_checkpoint): Improve cpfork lookup, use direct_memcache_get.
	(delete_checkpoint): New.
	(map_checkpoint_numbers): New.
	(clear_all_checkpoints): Rename from clear_checkpoints.
	(_initialize_checkpoint): Add checkpoint deletion command.
	* infcmd.c (kill_if_already_running): Clear checkpoints.
	(attach_command): Ditto.
	* top.c (quit_target): Ditto.
	* infrun.c (proceed): Query about proceeding after rollback.

2006-06-05  Jim Ingham  <jingham@apple.com>

	* valops.c (allocate_string_in_inferior): New function.
	(value_clear_inferior_string_pool): New function.
	(value_string): use allocate_string_in_inferior.
	* target.c (generic_mourn_inferior): Clear out string pool.
	* values.h: define value_clear_inferior_string_pool.
	
2006-06-01  Jim Ingham  <jingham@apple.com>

	* source.c (set_pathname_substitution): New function.
	(_initialize_source): Add set_pathname_substution as
	the set function.

2006-06-01  Jason Molenda  (jmolenda@apple.com)

	* Makefile.in (gdb): Remove MACOSX_DEPLOYMENT_TARGET setting;
	it was only needed while we were weak linking to Carbon.

2006-06-01  Jim Ingham  (jingham@apple.com)

	* varobj.c (varobj_create): Check the return from
	gdb_value_fetch_lazy, and set error if it fails.
	(varobj_update): Call value_fetch_lazy on the new
	value if necessary, and handle the error if this
	doesn't work.

2006-05-30  Jason Molenda  (jmolenda@apple.com)

	* configure.ac: Link to Carbon normally, not weak.
	* configure: Regenerated.

2006-05-30  Jim Ingham  <jingham@apple.com>

	* varobj.c (varobj_get_type_index_from_fake_child): Skip
	static fields.
	(cplus_real_type_index_for_fake_child_ind): Ditto.

2006-05-25  Jason Molenda  (jmolenda@apple.com)

	* dbxread.c (read_oso_nlists): Do ingest file static variables
	which have had a ".[0-9]+" suffix added by the compiler.

2006-05-24  Jason Molenda  (jmolenda@apple.com)

	* dbxread.c (read_dbx_symtab): Only skip the first character
	of the name if it is the bfd_prefix_char, i.e. don't skip the
	first char of ObjC method function names.
	(read_oso_nlists): Don't create OSO nlist records for artifical
	nlist entries that contain "." in the names.

2006-05-24  Jason Molenda  (jmolenda@apple.com)

	* Makefile.in (gdb): Set MACOSX_DEPLOYMENT_TARGET when doing the
	final app link to avoid weak linking warnings from the static link
	editor.

2006-05-23  Jim Ingham  <jingham@apple.com>

	* configure.ac: If the carbon framework exists, weak link to it.
	* Makefile.in: Add the carbon framework weakly to the gdb link.
	* infrun.c (normal_stop): Move the call to the stop_command to 
	AFTER the point where the bottom frame is set.  Otherwise the
	hook-stop commands will get the old version of the cursal, not the
	current one.
	
2006-05-23  Jason Molenda  (jmolenda@apple.com)

	* objc-lang.c: Update for 64-bit objc runtime.
	(get_addrsize): New function.  May prove to be too inefficient to
	fetch this every time; possibly cache the value and dirty the cache
	when exec_bfd is changed.
	(print_object_command): Whitespace fixes; treat address values as such.
	(read_objc_method): Updated for 64 bit objc runtime.
	(read_objc_method_list_nmethods): Ditto.  Renamed from 
	read_objc_methlist_nmethods to be consistent with the structure
	name in the objc runtime.
	(read_objc_method_list_method): Ditto.
	(read_objc_object): Updated for 64 bit objc runtime.
	(read_objc_super): Ditto.
	(read_objc_class): Ditto.
	(find_implementation_from_class): Ditto.
	(value_objc_target_type): Ditto.

2006-05-22  Jason Molenda  (jmolenda@apple.com)

	* linespec.c (decode_line_1): Don't do method lookup for
	"main".

2006-05-17  Jason Molenda  (jmolenda@apple.com)

	* target.c (deprecated_debug_xfer_memory): Use paddr_nz to print
	addresses, not any of the printf builtin formatters.
	(debug_to_insert_breakpoint): Ditto.
	(debug_to_remove_breakpoint): Ditto.

2006-05-15  Jim Ingham <jingham@apple.com>

	* objfiles.c (objfile_set_load_state): Discriminate between
	real error and the user not requesting auto-loading.
	(objfile_name_set_load_state): Ditto.

2006-05-11  Jim Ingham <jingham@apple.com>

	* config/xm-macosx.h: Include signal.h.
	* fork-child.c (startup_inferior): Recognize a crash in the
	shell instead of in the inferior process and flag it as such.

2006-05-10  Greg Clayton  (gclayton.com)

	* dbxread.c (read_dbx_symtab): Skip adding any debug map symbols
	when we have a dSYM file.

	* symfile.c (symbol_file_add_with_addrs_or_offsets): Moved the
	code that locates and parses the dSYM file for a given objfile to
	happen before syms_from_objfile() gets called. When we know if a
	dSYM file exists and is that the UUIDs match for a given executable
	before calling syms_from_objfile(), we will know wether to ignore
	the debug map entries we may find in the main executable.

	* elfread.c (elf_symtab_read): Change #ifdef condition that
	surrounds msym->filename code to only be enabled for when
	SOFUN_ADDRESS_MAYBE_MISSING is defined and NM_NEXTSTEP is NOT
	defined since we don't need the filename member for OS X
	development. The only place that sets this member is in elfread.c.

	* symmisc.c (dump_msymbols): Ditto.

	* symtab.h (struct minimal_symbo): Ditto.

	* minsyms.c (lookup_minimal_symbol): Ditto.
	(prim_record_minimal_symbol_and_info): Added initialization for the
	filename member of minimal_symbol since it was not getting
	initialized to NULL.

2006-05-09  Jason Molenda  (jmolenda@apple.com)

	* procfs.c (proc_update_threads): Fix flipped bit in a comment
	from cosmic ray hitting cvs server or something.

2006-05-02  Jason Molenda  (jmolenda@apple.com)

        * environ.c (smuggle_dyld_settings): dyld no longer truncates
        DYLD_FRAMEWORK_PATH etc to an empty string; it now excludes it
        entirely from the child's environment.  Fix logic in this function
        to handle that correctly.

2006-05-02  Stan Shebs  <shebs@apple.com>

	* checkpoint.h (enum cp_type): New, for types of checkpoints.
	(struct checkpoint): Add type and logical prev/next fields.
	* checkpoint.c: General redesign to use new fields, various
	cleanup.
	(_initialize_checkpoint): New commands "redo" and "now".
	* infrun.c (normal_stop): Move auto-checkpointing to end.

2006-03-28  Eric Albert  (ejalbert@apple.com)

	* i386-tdep.h (struct gdbarch_tdep): Update the comment for wordsize to
	account for x86-64.

2006-03-23  Eric Albert  (ejalbert@apple.com)

	* config/i386/macosx.mt (TDEPFILES): Add amd64-tdep.o.

2006-04-28  Jason Molenda  (jmolenda@apple.com)

	* fix-and-continue.c (create_current_active_funcs_list): Don't xstrdup
	a NULL char* like we tend to have in DWARF programs.

2006-04-27  Jason Molenda  (jmolenda@apple.com)

	* dbxread.c (record_minimal_symbol): Update DBX_TEXT_SECTION et al
	to use a struct obj_section instead of BFD asection.
	(dbx_symfile_init): Don't initialize DBX_TEXT_SECTION et al here.
	We don't use this code path so I'm not updating it to the new
	behavior.
	* gdb-stabs.h: (struct dbx_symfile_info): Update text_section et al
	to struct obj_sections.

2006-04-21  Jason Molenda  (jmolenda@apple.com)

	* dbxread.c (read_dbx_symtab): Add function static data to
	the psymtab w/ its mangled name; put static data in the 
	static psymtab table, not the global one.
	* dwarf2read.c (convert_oso_map_to_final_map): Look up names from
	the .o file nlist records in the psymtab instead of an unscoped
	global lookup via minimal_symbol_lookup to get the correct one.
	(read_file_scope): Prefer the psymtab's textlow/texthigh settings
	when a debug map was processed - it will have the correct range of
	addresses that functions are contained within.
	* symtab.h (lookup_minimal_symbol_by_pc_section_from_objfile): Add
	prototype.

2006-04-19  Jim Ingham <jingham@apple.com>

	* varobj.c (c_value_of_variable): Ensure the varobj's child count
	is initialized before printing.

2006-04-17  Jim Ingham <jingham@apple.com>

	* varobj.c (varobj_value_struct_elt_by_index): Do the work of
	value_struct_elt, but look up by index in the TYPE_FIELDS array
	instead of by name.
        (varobj_lookup_struct_elt_type_by_index): Ditto for 
	lookup_struct_elt_type.	
	(varobj_get_type_index_from_fake_child): New function.
	(cplus_make_name_of_child): Use 
	varobj_get_type_index_from_fake_child.
	(create_child): Use the index to create the anonymous
	child names.  This makes testsuites easier to write...
	(c_value_of_child); Don't use the element name to lookup 
	the child, it's not unique for anonymous structures & unions.
	(c_type_of_child): Ditto.
	(cplus_value_of_child): Ditto.
	(cplus_type_of_child): Ditto.
	
2006-04-17  Jason Molenda  (jmolenda@apple.com)

	* objfiles.c (objfile_relocate): Relocate the deprecated_sym_stab_info
        (aka DBX_SYMFILE_INFO) member of the struct objfile along with 
	everything else.

2006-04-  Greg Clayton  (gclayton.com)

	* symfile.c (find_separate_debug_file): We now search for dSYM 
	files at one extra location for bundles where we do not strip 
	the executable bundle extension before appending the dSYM 
	bundle path information.

2006-04-13  Jason Molenda  (jmolenda@apple.com)

	* symtab.c (symbol_set_names): Demangle the symbol name
	even if a demangled version is found in the cache so that
	the symbol's language is correctly initialized.
	* dbxread.c (read_dbx_symtab): Add GSYMs to the psymtab.

2006-04-13  Jason Molenda  (jmolenda@apple.com)

	* dwarf2read.c (struct dwarf2_cu): Add comp_dir field.
	(read_file_scope): Set comp_dir.
	(dwarf_decode_lines): Pass cu->comp_dir.
	(dwarf2_start_subfile): If dirname is relative, prepend
	comp_dir.
	(build_dummy_cu): Copy over comp_dir setting.

2006-04-11  Jason Molenda  (jmolenda@apple.com)

	* dwarf2read.c (translate_debug_map_address): Note whether
	the highpc was set on the failing lookup.
	(dwarf2_get_pc_bounds): If no address attributes found, don't try
	to translate the 0's.

2006-04-11  Jason Molenda  (jmolenda@apple.com)

	* dwarf2read.c: Add "set debug debugmap" switch to get information
	about how addresses are being translated by the DWARF debug map
	between the .o file and the executable.
	(show_debug_debugmap): New function.
	(translate_debug_map_address): Print translation results when
	'set debug debugmap 1'.
	(translate_common_symbol_debug_map_address): Ditto.
	(dwarf_decode_lines): Indicate start & end of line program
	processing for easier reading of the output.

2006-04-11  Jason Molenda  (jmolenda@apple.com)

	* objfiles.c (make_cleanup_restrict_to_shlib): Whitespace cleanup.
	* linespec.c (intersect_sals, decode_line_1): Ditto.

2006-04-05  Stan Shebs  <shebs@apple.com>

	* dwarf2loc.c (dwarf2_evaluate_loc_desc): Handle DW_op_pieces better.

2006-03-31  Greg Clayton  (gclayton@apple.com)

	* objc-lang.c (value_objc_target_type): Modified the function to be
	able to look into the class heiarchy generated by DWARF for objective C
	to find the "isa" member for dynamic typing.

2006-03-31  Jim Ingham  <jingham@apple.com>

	* cli/cli-cmds.c (ambiguous_line_spec): Check first to make sure
	that the linespecs point to different file:lines.  Return whether
	it was ambiguous or not.
	(edit_command): Use the return value from ambiguous_line_spec.
	(list_command): Ditto.

	* linespec.c (decode_line_1): Handle the case where a file:line match
	generated multiple hits, and some of the hits were on the file:line, 
	but others were because the file was included, but it didn't get any
	code from the given line.

2006-03-31  Greg Clayton  (gclayton@apple.com)
	* symfile.c (check_for_matching_uuid): removed unused variable named
	'uuid_size'.
	(add_objfile_prefix): New function for append_psymbols_as_msymbols() 
	that will correctly prefix minsym names.
	(find_section_for_addr): New function for append_psymbols_as_msymbols() 
	that will find the best section in an objfile for a partial symbol 
	address.
	(append_psymbols_as_msymbols): New function that appends minsyms to an
	objfile by translating it's dSYM partial symbols. Debugging fully 
	stripped executables with a dSYM file now has better stepping abilities.
	(symbol_file_add_with_addrs_or_offsets): We now generate minsyms for
	objfiles that have dSYM files in case the executable has been stripped.
	
	* ppc-macosx-frameinfo.c (ppc_frame_function_properties): Check 
	this_frame against NULL before calling get_frame_pc() since that can
	crash gdb. Both 'this_frame' and 'bounds' can be NULL when an executable
	has been stripped and when get_prev_frame() determines that we are
	inside the 'main' function.
	
	* dbxread.c (record_minimal_symbol): Fixed address range comparisons
	to be inclusive of the low address for the __text and __textcoal_nt
	sections.

2006-03-30  Jason Molenda  (jmolenda@apple.com)

	* gdbtypes.c (make_cv_type): Fix conditional expression for
	returning builtin_type_error.

2006-03-30  Jason Molenda  (jmolenda@apple.com)

	* dwarf2read.c (dwarf2_get_pc_bounds): Fix double-translating of
	DW_AT_ranges addresses when processing a debug map.

2006-03-30  Jason Molenda  (jmolenda@apple.com)

	* gdbtypes.c (make_cvs_type): Return builtin_type_error and try
        to continue instead of asserting and exiting the debugger when
	our target is an error/invalid type.  Paper over invalid stabs
	definitions as best we can.

2006-03-28  Stan Shebs  <shebs@apple.com>

        * defs.h (lval_type): Add new enum lval_register_literal.
        * eval.c (evaluate_subexp_standard): Use it when evaluating
        literal register references.
        * valops.c (value_assign): Test it when deciding whether to
        use CONVERT_REGISTER_P code.
        * frame.c (put_frame_register): Add lval_register_literal case.
        * breakpoint.c (can_use_hardware_watchpoint): Ditto.

2006-03-28  Jim Ingham  (jingham@apple.com)

        * cp-abi.c (is_destructor_name): Check for the destructor
	name being unmangled.
	* linespec.c (collect_methods): Ditto.
	
	* symtab.c (skip_non_matching_bfd): fix up the logic and
	make it clearer.

2006-03-28  Jason Molenda  (jmolenda@apple.com)

	* frame.h: Provide prototype for inside_main_func.
	* config/i386/tm-i386-macosx.h: Include tm-i386-macosx.h.

2006-03-28  Jason Molenda  (jmolenda@apple.com)

	* dwarf2read.c (set_cu_language): Recognize DW_LANG_ObjC and 
	DW_LANG_ObjC_plus_plus.

2006-03-28  Stan Shebs  (shebs@apple.com)

	* checkpoint.c (_initialize_checkpoint): Make rollback command
	"rollback" instead of "rb".

2006-03-28  Jim Ingham  (jingham@apple.com)

	* configure.ac: Disable TUI by default.

2006-03-28  Eric Albert  (ejalbert@apple.com)

	* i386-tdep.h (struct gdbarch_tdep): Update the comment for wordsize to
	account for x86-64.

2006-03-23  Eric Albert  (ejalbert@apple.com)

	* config/i386/macosx.mt (TDEPFILES): Add amd64-tdep.o.

2006-03-21  Jason Molenda  (jmolenda@apple.com)

	* objfiles.h (ALL_OBJFILES_SAFE): Update to use new objfile_get_first,
	objfile_get_next iterator functions.
	* breakpoint.c (parse_breakpoint_sals): Use ALL_OBJFILES_SAFE because
	the objfile struct can be freed out from under us when the symbol
	load level is raised.

2006-03-16  Jason Molenda  (jmolenda@apple.com)

	* blockframe.c (addr_inside_main_func): Revive old function.
	* symtab.h: Declare it.
	* objfiles.h (struct entry_info): New fields for main() bounds.
	* objfiles.c (init_entry_point_info): Init them.

2006-03-15  Jason Molenda  (jmolenda@apple.com)

	* dwarf2read.c, linespec.c, objc-lang.c, objfiles.c: Make last checkin
	conform.

2006-03-15  Greg Clayton  (gclayton@apple.com)

	* breakpoint.c (breakpoint_re_set): don't add the separate debug
	objfile to the restrict list anymore.
	
	* dbxread.c (open_bfd_from_oso): replaced the first two arguments with
	'struct partial_symtab *pst' to allow access to the 'pst->objfile' so
	we can check if a separate debug file (dSYM) exists and not call the
	error function if one exists for the pst->objfile.
	(oso_scan_partial_symtab): fix the call to open_bfd_from_oso to use the
	new prototype.
	(dbx_psymtab_to_symtab_1): ditto
	
	* dwarf2read.c (dwarf2_debug_map_psymtab_to_symtab): only call error
	when a .o file for a debug map OSO is missing if there is no dSYM file.
	(dwarf2_get_pc_bounds): fixup addresses for DW_AT_ranges attributes
	when using dwarf with debug map.
	(process_structure_scope): make sure that class constants get parsed *

	* linespec.c (apple_sals_pushback): added new function to append a
	number of symtab_and_line struct entries to a symtabs_and_lines
	collection.
	(apple_intersect_sals): new function that will only add non duplicate
	symtab_and_line struct entries from	the 'src_sals' list of
	symtabs_and_lines struct to 'dst_sals'.
	(decode_line_1): Instead of just appending two symtabs_and_lines
	structs, we now make sure there are no duplicates. Duplicates can be
	found due if a dwarf with debug maps executable is used along with a
	dSYM file. A memory leak was also plugged from the 'this_result.sals'
	member.
	(decode_compound): removed unused variables 'values' and 'sym_arr'
	
	* objc-lang.c (find_methods): restrict the scope of the search when
	calling find_pc_sect_function() to the current objfile that we already
	have else we will get a recursive call that modifies the restrict list
	and will cause an infinite loop.
	
	* objfiles.c (objfile_add_to_restrict_list): stop separate debug
	objfiles from being able to be added to the restrict list. We will add
	the main objfile for a separate debug objfile if someone tries to add a
	separate debug objfile.
	(make_cleanup_restrict_to_shlib): no longer add the separate debug
	objfiles to the restrict list as it is no longer necessary.
	(objfile_get_first): modified this iterator initialization routine to
	always return the separate debug objfile first if one exists for the
	first item in the restrict list.
	(objfile_get_next): modified this iterator function to only increment
	the restrict list position pointer when we are getting the next objfile
	for an objfile that isn't a separate debug objfile (dSYM). If the
	current file is a separate debug objfile (dSYM), then we return the
	it's original objfile as the next item to search. This helps us to
	guarantee that separate debug objfiles always get searched first in the
	restrict list and so we don't get incosistent results when we have both
	a debug map executable that also has a dSYM file.
	
	* symfile.h : changed the prototype for open_bfd_from_oso to match it's
	new type.

2006-03-15  Jim Ingham  <jingham@apple.com>

        * breakpoint.c (break_command_2): If the not_found_ptr is set,
        assume the caller meant to return NOT_FOUND_ERROR.
	* linespec.c (symtab_from_filename): NOT_FOUND_ERROR is the
        correct error to throw here.

2006-03-15  Jim Ingham  <jingham@apple.com>

        * breakpoint.c (insert_breakpoints): Catch errors in
	value_fetch_lazy.  Mark the breakpoint as not currently set.
	(watchpoint_check): Don't try to check the watchpoint if it
	hasn't been successfully inserted yet.

2006-03-15  Jim Ingham  <jingham@apple.com>

	linespec.c (decode_line_1): Make sure start_here gets set.

2006-03-15  Jim Ingham  <jingham@apple.com>

        * symtab.c (find_pc_sect_psymtab): Break the ALL_PSYMTABS loop
	into ALL_OBJFILES and ALL_OBJFILE_PSYMTABS so you can migrate
        the sections test into the outer loop.

2006-03-15  Jason Molenda  (jmolenda@apple.com)
	* dwarf2read.c (struct oso_final_addr_tuple): Add 'oso_high_addr'
	and 'present_in_final' fields so each record gives its complete
	address range and indicates whether it was coalesced/dead-code-stripped
	or not.
	(compare_map_entries_oso_addr): Update for new field names.
	(convert_oso_map_to_final_map): Update for new field names.
	Add a tuple for functions that were coalesced/DCS'ed instead of
	skipping them.  Fill in 'oso_high_addr' fields once the array
	is sorted.
	(compare_translation_tuples_highpc): New function for bsearch().
	(compare_translation_tuples_nothighpc): Ditto.
	(translate_debug_map_address): Update to new field names.
	Use bsearch() to find the matching tuple.

2006-03-13  Jim Ingham  <jingham@apple.com>

	* dbxread.c (typename_concat): Don't pass NULL prefix/suffix to
	functions that will crash.
	
2006-03-08  Jason Molenda  (jmolenda@apple.com)

	* linespec.c (decode_line_1): Don't try to iterate over the line
	table if this psymtab doesn't have one.

2006-03-08  Jim Ingham  (jingham@apple.com)

	* symfile.c (reread_symbols): Remove merge mistake of calling
	clear_symtab_users() all the time.

2006-03-06  Jason Molenda  (jmolenda@apple.com)

	* dbxread.c (open_bfd_from_oso): More informative error message
	when the .o file containing debug info can't be found.

2006-03-06  Jason Molenda  (jmolenda@apple.com)

	* dbxread.c (read_dbx_symtab): Create a psymtab record when we
	come across a vtable and creating a debug map so we know to expand
	this psymtab to find a definition of that class.

2006-03-02  Jason Molenda  (jmolenda@apple.com)

        * dbxread.c (process_one_symbol): Ignore N_OSO stabs when creating
        a symtab.

2006-03-02  Jim Ingham <jingham@apple.com>

	* infrun.c (handle_inferior_event): Check for a null previous
	frame before passing it to insert_step_resume_breakpoint_at_frame.
	
2006-02-24  Greg Clayton  (gclayton@apple.com)
        
        * breakpoint.c (set_bp_objfile): set the breakpoint objfile
        to the actual executable instead of the separate debug
        objfile to keep the UI and test cases happy, and it also
        makes more sense.
        (breakpoint_re_set): add the separate_debug_objfile to the 
        restrict list when resetting breakpoints to make sure we  
        can find our breakpoint again.
        
        * dwarf2read.c (dwarf_decode_lines): fixed an issue where
        an extra psymtab was being created for an already existing
        and valid source file due to a mismatch in relative and
        absolute paths.
        
        * fix-and-continue.c (file_exists_p): made file_exists_p
        global instead of static so it can be reused by
        find_separate_debug_file() in symfile.c.
        
        * defs.h (file_exists_p): Add prototype.
        
        * objfiles.c (objfile_remove_from_restrict): removed unused variables
        named 'cached_symfile_dir' and 'check_timestamp'.
        (objfile_delete_from_ordered_sections): return if we run into a separate
        debug objfile and do not delete since these will never get added in the
        first place and would cause unnecessary warnings.
        (objfile_add_to_ordered_sections): return if we run into a separate
        debug objfile and do not add sections since these are not needed by the
        program and can cause false matches to non-existent code.
        (free_objfile): correctly set the separate_debug_objfile
        member to NULL if the member gets freed to avoid a stale
        pointer from existing.
        (find_pc_sect_section): do not check any separate debug objfiles when
        looking for pc sections as they are not valid code.
        (push_front_restrict_list): added for make_cleanup_restrict_to_shlib to
        keep the code common since it is used more than once.
        (clear_restrict_list): added for make_cleanup_restrict_to_shlib to
        keep the code common since it is used more than once.
        (make_cleanup_restrict_to_shlib): always add an objfile and
        it's separate debug objfile (dSYM) when restricting things
        to a specific shared library so we can find symbols for 
        things in our separate debug object files.
        (_initialize_objfiles): remove unused variable named 'c'.
        
        * objfiles.h : added a new objfile->flags bit called
        OBJF_SEPARATE_DEBUG_FILE so we can stop a separate debug
        objfile (dSYM) from being added to the ordered section list
        since it gets added while the separate debug objfile is
        being created and before the 'separate_debug_objfile_backlink'
        member can be correctly set.

        * symfile.c (copy_section_addr_info): fixed the copy function
        to copy all members including the apple local member
        addrs_are_offsets.
        (place_section): removed unused variable named 'cur_offset'.
        (check_for_matching_uuid): added function that can
        match the UUID of two files (the executable and the separate
        debub objfile (dSYM)) to make sure we are using the correct
        debug information for an executable and post a warning if
        we have a mismatch.
        (symbol_file_add_with_addrs_or_offsets): add the
        OBJF_SEPARATE_DEBUG_FILE to the symbol_file_add() function
        call to make sure we know we are creating a separate debub
        objfile (dSYM) and so that we don't try to add it's section
        list to the ordered section lists and check the UUID of the
        two files to make sure we have the correct files.
        (get_debug_link_info): remove unused variable named 'p'.
        (find_separate_debug_file): Created an Apple specific version that looks
        for a dSYM file.
        (find_sym_fns): removed an unused variable named 'our_target'.
        (generic_load): removed unused variables.
        (reread_separate_symbols): Fixed a stale pointer issue with
        objfile->separate_debug_objfile after it gets freed and add
        the OBJF_SEPARATE_DEBUG_FILE flag to the creation args for
        the new separate debug objfile (dSYM) to make sure it's
        sections don't get added to our ordered section list. We
        also check the UUID to ensure proper executable and debug
        object file matching. Fixed a memory leak with the "debug_file"
        string.

        * symtab.c (skip_non_matching_bfd): added a function to centralize
        some code that was being pasted about that got more complex after adding
        dSYM support.
        (find_pc_sect_psymtab): now use skip_non_matching_bfd() function
        to check for matching objfile or separate debug objfile.
        (find_pc_sect_symtab): ditto.

2006-02-24  Jim Ingham (jingham@apple.com)

	* linespec.c (symtab_from_filename): Set not_found_ptr before
	throwing an error.

2006-02-24  Jim Ingham (jingham@apple.com)

	* utils.c (internal_vproblem): Print the reason we're exiting
	when unexpectedly exiting in MI mode.
	(query): Indicate an auto-answered answer.

2006-02-24  Jason Molenda  (jmolenda@apple.com)

	* dwarf2read.c (translate_common_symbol_debug_map_addres): Correctly
	handle the case where there is no debug map.

2006-02-24  Jason Molenda  (jmolenda@apple.com)

	* dwarf2read.c (translate_debug_map_address): Return a status
	value as well as take a new flag indicating whether the address
	being translated is a DW_AT_high_pc or not.
	(process_full_comp_unit): Update call to translate_debug_map_address.
	Handle the case where the function at that address is not in the
	executable.
	(read_file_scope): Ditto.
	(dwarf2_get_pc_bounds): Ditto.
	(read_partial_die): Ditto.
	(var_decode_location): Ditto.
	(new_symbol): Ditto.
	(dwarf2_const_value): Ditto.
	(decode_locdesc): Ditto.
	(dwarf_decode_lines): Don't record lines if the last address
	seen did not make the final executable.  Assumes we have a
	DW_LNE_set_address at least at the beginning of functions.

2006-02-22  Jason Molenda  (jmolenda@apple.com)

	* linespec.c (add_matching_methods): If the method name isn't
	a mangled name prepend the containing class name and do a
	lookup_symbol on the qualified source function name.

2006-02-22  Jason Molenda  (jmolenda@apple.com)

	* dwarf2read.c (dwarf2_debug_map_psymtab_to_symtab): Mark psymtab
	as read in once we've read it in.
	* dbxread.c (read_dbx_symtab): Handle cases where the first function
	listed in a compilation unit's debug map is not the lowest address
	function.

2006-02-20  Stan Shebs  <shebs@apple.com>

	* breakpoint.c (do_captured_breakpoint): Update comments, merge
	issues were resolved.

2006-02-13  Jason Molenda  (jmolenda@apple.com)

	* i386-tdep.c (i386_follow_jump): Don't follow the jump if
	we're (unnecessarily, sigh) examining a dyld stub trampoline.

	* dwarf2read.c (convert_oso_map_to_final_map): Don't add
	the slide for a minsyms that's absolute.

	* objc-lang.c (find_objc_msgsend): Re-enable code which allows
	for a msgsend function to be the last one in an objfile and 
	still get the range right.

2006-02-07  Jason Molenda  (jmolenda@apple.com)

	* dwarf2read.c (translate_debug_map_address): Correctly handle the 
	case where a debug map is not being used.

2006-02-07  Jason Molenda  (jmolenda@apple.com)

	* dbxread.c (read_oso_nlists): Fix off by one error when resizing
	nlists/common symbols array.

2006-02-07  Jason Molenda  (jmolenda@apple.com)

	* dbxread.c (read_oso_nlists): Create both the nlists array as well
	as the common_symnames array of common symbol names that were 
	discovered in the .o file.
	* symfile.h: Update prototype for read_oso_nlists.
	* dwarf2read.c (struct oso_to_final_addr_map): In addition to the
	{name, .o file addr, final addr} tuple array add an array of
        {name, final addr} pairs for common symbols which have no address
        in the .o file.
	(compare_map_entries_name): Callback function for qsort.
	(convert_oso_map_to_final_map): Create common symbol pairs array in
        addition to regular address tuple array.
	(free_address_map): Free the common symbol names as well.
	(translate_common_symbol_debug_map_address): New function to look up
	potential common symbols.
	(dwarf2_debug_map_psymtab_to_symtab): Create the common symbols 
	array as well.
	(var_decode_location): If the address of something in the dwarf says
	it is at 0x0, see if the symbol is in the common symbols array before
	following the usual DEBUGMAP_XLATE procedure.

2006-02-07  Jason Molenda  (jmolenda@apple.com)

	* dbxread.c: Include mach-o.h
	(read_dbx_symtab): Don't set up a PSYMTAB_OSO_STATICS list; I ended
	up not using that in the final implementation.
	(read_oso_nlists): Remove unused variables.  Don't return anything.
	* symfile.h: Update read_oso_nlists prototype.

2006-02-06  Jason Molenda  (jmolenda@apple.com)

	* defs.h: Include <stdint.h>.

2006-02-06  Greg Clayton  (gclayton@apple.com)

	* varobj.c (varobj_create): NULL out block_found before evaluating
	the variable expression to avoid a situation where member variables in
	objective C may not evaluate correctly when a block is specified due to
	the expression parser using a stale value from a previous expression.

2006-02-03  Jason Molenda  (jmolenda@apple.com)

	* dwarf2read.c (convert_oso_map_to_final_map): Factor off
	slide offset when adding address to translation table.

2006-02-01  Jason Molenda  (jmolenda@apple.com)

	* dwarf2read.c (dwarf2_debug_map_psymtab_to_symtab): Need to 
	initialize the type_hash element or we'll jump into random
	memory later on.

2006-02-01  Jason Molenda  (jmolenda@apple.com)

	* dwarf2read.c (dwarf2_debug_map_psymtab_to_symtab): Call my own
	psymtab-to-symtab converter, not the regulard dwarf one.

2006-02-01  Jason Molenda  (jmolenda@apple.com)

	* dwarf2read.c (dwarf2_debug_map_psymtab_to_symtab): Process the
	dependencies of a pst before trying to process the pst.  Don't
	try to read an OSO for a header file.

2006-02-01  Jason Molenda  (jmolenda@apple.com)

	* dwarf2read.c (translate_debug_map_address): Handle function as
	last symbol in file correctly.

2006-02-01  Jason Molenda  (jmolenda@apple.com)

	* dwarf2read.c (convert_oso_map_to_final_map): Don't leak memory.
	(translate_debug_map_address): Handle a compilation unit with one
	symbol correctly.
	(dwarf_decode_lines): Don't re-translate addresses who've had an
	offset added to them.

2006-01-31  Jason Molenda  (jmolenda@apple.com)

	* dwarf2read.c: Final part of DWARF debug map support.
         (DEBUGMAP_XLATE): New macro.
	(struct oso_final_addr_tuple, oso_to_final_addr_map): New structs.
	(struct dwarf2_cu): New element, addr_map.
	(dwarf2_has_info): Move contents into..
	(dwarf2_has_info_1): Here.
	(dwarf2_build_psymtabs): Move the section of this function that
	reads the dwarf sections into memory into..
	(dwarf2_copy_dwarf_from_file): Here.
	(compare_map_entries): New.
	(convert_oso_map_to_final_map): New.
	(free_address_map): New.
	(translate_debug_map_address): New.
	(dwarf2_debug_map_psymtab_to_symtab): New.
	(load_full_comp_unit): Take an addr_map parameter.
	(process_full_comp_unit): Pass addresses through DEBUGMAP_XLATE.
	(dwarf2_get_pc_bounds): Ditto.
	(dwarf2_read_section): Take a bfd parameter.
	(read_partial_die): Pass addresses through DEBUGMAP_XLATE.
	(var_decode_location): Ditto.
	(new_symbol): Ditto.
	(dwarf2_const_value): Ditto.
	(decode_locdesc): Ditto.

	* symfile.h (struct nlist_rec): Unconst name to reduce casting.
	* dwarf2-frame.c: Update dwarf2_read_section prototype to note
	new bfd parameter.
	(dwarf2_build_frame_info): Updated.

2006-01-31  Jason Molenda  (jmolenda@apple.com)

	* dbxread.c (read_oso_nlists): New function to read the nlist
	records of a dwarf .o file (i.e. read the minsyms).
	(stabsect_read_strtab_from_oso): Comment cleanup.
	* symfile.h (struct nlist_rec): Structure used by read_oso_nlists.
	(open_bfd_from_oso, read_oso_nlists): Add prototypes.

2006-01-25  Stan Shebs  <shebs@apple.com>

	* configure.ac: Move ac_cv_func_mmap_fixed_mapped setting up far
	enough to actually have an effect.
	* configure: Regenerate.

	* checkpoint.c (memcache_put): Ifdef a native-only call.

2006-01-23  Greg Clayton  (gclayton@apple.com)

	* cp-support.c (cp_func_name): Added a test for full_name being NULL.

2006-01-19  Jason Molenda  (jmolenda@apple.com)

	* dwarf2read.c (INFO_SECTION, ABBREV_SECTION, etc): DWARF is now
	in segment "__DWARF", not "__DWARFA".
	(db_error): Whitespace tweak.

2006-01-19  Jason Molenda  (jmolenda@apple.com)

	* dwarf2read.c (dwarf_info_vma, dwarf_abbrev_vma, dwarf_line_vma,
	dwarf_str_vma): Remove.
	(struct dwarf2_per_objfile): Ditto.
	(dwarf2_has_info): Don't initialize dwarf section vma's.
	(dwarf2_build_psymtabs_hard): Ditto.
	(dwarf2_locate_sections): Don't use dwarf section vma's.
	(read_comp_unit_head): Ditto.
	(psymtab_to_symtab_1): Ditto.
	(read_file_scope): Ditto.
	(read_indirect_string): Ditto.

2006-01-18  Jason Molenda  (jmolenda@apple.com)

	* dbxread.c (struct oso_fun_static, struct oso_fun_list, 
	struct oso_pst_list): Move these out of the symloc psymtab private
	struct into the generic partial_symtab struct in symtab.h.
	(LDSYM_OSO_NAME, LDSYM_OSO_MTIME, LDSYM_OSO_STATICS, LDSYM_OSO_PLIST):
	rename to PSYMTAB_OSO_* and move to symtab.h.
	(read_dbx_symtab): Add a new state variable, in_dwarf_debug_map, which
	notes when the current SO file is a DWARF debug map.  In that case,
	handle N_FUN and STSYM specially; let the rest be processed as
	usual.
	(start_psymtab): Don't initialize the OSO structures in the symloc;
	the generic psymtab creator does it.
	(add_oso_pst_to_list): Macro names updated.
	(end_psymtab): Ditto.
	(oso_scan_partial_symtab): Ditto.
	(dbx_psymtab_to_symtab_1): Ditto.
	(read_ofile_symtab_from_oso): Ditto.
	* dwarf2read (dwarf2_debug_map_psymtab_to_symtab): A stub function
	to be defined.
	* symfile.c (allocate_psymtab): Initialize the OSO fields in the
	generic partial_symtab struct.
	* symfile.h: Prototype for dwarf2_debug_map_psymtab_to_symtab.
	* symtab.h: (struct partial_symtab): Add OSO fields.
	Add struct oso_fun_static, oso_fun_list, oso_pst_list from
	dbxread.c.  Add PSYMTAB_OSO_NAME etc accessor macros from
	dbxread.c

2006-01-17  Stan Shebs  <shebs@apple.com>

	* infrun.c (set_schedlock_func): Clear a merge confusion.

2006-01-16  Jason Molenda  (jmolenda@apple.com)

	* dbxread.c (read_dbx_symtab): Recognize & ignore empty OSO stabs.

2006-01-12  Jim Ingham  <jingham@apple.com>

	* symtab.c (find_function_start_sal): Catch the case where
	the block is NULL.  Can happen sometimes when the stabs get
	mangled, for instance.
	
	* dbxread.c (read_ofile_symtab_from_oso): Add checks for NULL
	cur_file_name and oso_static->name to handle some error cases
	without crashing.
	
2006-01-12  Stan Shebs  <shebs@apple.com>

	* ppc-sysv-tdep.c (ppc_push_argument): Use our vector reg count.
	(ppc_push_arguments): Pad the dummy stack with an extra 32
	bytes, for luck.
	
2006-01-11  Jim Ingham  <jingham@apple.com>

	* gdbtypes.c (create_array_type): If you are creating an array
	whose elements are another array, make sure the element array's
	length is > 0.  It might not have gotten correctly calculated
	yet...
	
2006-01-11  Caroline Tice  <ctice@apple.com>

	*dwarf2read.c (read_in_db_abbrev_table): Delete redundant forward 
	declaration.
	(dwarf_attr_name): Add case for DW_AT_APPLE_repository_abstract_origin.

2006-01-10  Jim Ingham  <jingham@apple.com>

	* stabsread.c (attach_fields_to_type): If a type is a typedef
	of an undefined type, add it to the undefined_types list.

	* Makefile.in: Restore the makefile goop that finds runtest so
	you can run make check from the gdb directory.

2006-01-10  Eric Albert  (ejalbert@apple.com)

	* i386-tdep.c (i386_gdbarch_init): Long double is 128 bits on darwin.

2006-01-10  Eric Albert  (ejalbert@apple.com)

	* valprint.c (print_ostype): Use unpack_long() to get the value
	instead of assuming it's a memory location.  Take a type parameter.
	* valprint.h (print_ostype): Prototype updated.
	* printcmd.c (print_formatted, print_scalar_formatted): Update callers.

2006-01-09  Stan Shebs  <shebs@apple.com>

	* ppc-sysv-tdep.c (ppc_push_argument): Fix a merge mess
	by using VALUE_REGNUM.

2006-01-06  Jason Molenda  (jmolenda@apple.com)

	* dwarf2read.c: Minor cleanups on Caroline's type repository
	patch:  Removing commented-out code, clarifying a few
	comments, removing some unintended whitespace changes that
	were made in the patch.

2006-01-06  Caroline Tice  <ctice@apple.com>

	* Makefile.in (LIBSQLITE3):  Add new link library option for sqlite3.
	(INSTALLED_LIBS):  Add LIBSQLITE3 to the list.
	* db-access-functions.h: New file.
	* dwarf2read.c (db-access-functions.h):  Add new #include.
	(struct dwarf2_cu):  Add 2 new fields: repository and repository_name.
	(struct partial_die_info):  Add 5 new fields: has_repo_specification,
	has_repository, has_repository_type, repo_spec_id and repo_name..
	(struct die_info): Add 1 new field: repository_id.
	(zeroed_partial_die):  Comment it out to eliminate warning.
	(read_comp_unit_head): Comment out signed_addr to eliminate warning.
	(open_dwarf_repository): New function.
	(dwarf2_read_repository_abbrevs): New function.
	(build_dummy_cu): New function.
	(build_dummy_objfile): New function.
	(read_in_db_abbrev_table): New function.
	(db_error): New function.
	(db_lookup_type): New function.
	(fill_in_die_info): New function.
	(get_uleb128): New function.
	(db_read_attribute_value): New function.
	(follow_db_ref): New function.
	(set_repository_cu_language): New function.
	(get_repository_name): New function.
	(finalize_stmts): New function.
	(find_open_repository): New function.
	(increment_use_count): New function.
	(decrement_use_count): New function.
	(enum db_status): New type.
	(struct objfile_list_node): New type.
	(struct database_info): New type.
	(byte_swap_p): New global variable.
	(dwarf2_build_psymtabs_hard): Initialize byte_swap_p; add code to call
	functions to read in the repository abbreviations table if appropriate,
	and initialize the repository language.  Also fix the stuff to initialize
	the dwarf_*_vma files in the pst (update it to use dwarf2_per_objfile).
	(add_partial_symbol):  For variables, add check of  has_repository_type.
	(skip_one_die):  Add case for DW_FORM_APPLE_db_str.
	(psymtab_to_symtab_1):  Update the dwarf_*_vma things correctly from 
	dwarf2_per_objfile.
	(read_partial_die): Initialize the new fields has_repository, 
	has_repo_specification and has_repository_type; check possible
	string attributes for DW_FORM_APPLE_db_str and call get_repository_name
	if appropriate; add cases to check for DW_AT_APPLE_repository_type and
	DW_AT_APPLE_repository_specification.  If the partial die uses a
	repository, call open_dwarf_repository to open the appropriate database.
	(read_full_die):  Add and initialize repository_name and comp_dir 
	variables, also update them if die attributes are appropriate; initialize 
	die->repository_id; call open_dwarf_repository if approriate.
	(read_attribute_value):  Add case for DW_FORM_APPLE_db_str.
	(dwarf2_attr):  Add and initialize repository_spec variable; check
	attributes for a repository string or a repository reference and
	do the right thing if found.
	(die_type): Check type attribute to see if it's a repository type 
	reference, and if so get the appropriate type from the repository data.
	(copy_die): Initialize repository_id field.
	(dwarf_attr_name):  Add cases for the 6 new DW_AT_APPLE_repository_*
	attributes.
	(dwarf_form_name):  Add case for DW_FORM_APPLE_db_str.
	(dump_die): Add case for DW_FORM_APPLE_db_str.
	(dwarf2_get_attr_constant_value):  Add check for DW_FORM_APPLE_db_str.
	(enum rb_tree_colors): New type.
	(struct rb_tree_node): New type.
	(rb_tree-find_node): New function.
	(left_rotate): New function.
	(right_rotate): New function.
	(plain_tree_insert): New function.
	(rb_tree_insert): New function.
	(MAX_OPEN_DBS): New constant.
	(repositories): New global variable.
	(num_open_dbs): New global variable.
	(lookup_repository_type): New function.
	(initialize_repositories): New function.
	(close_dwarf_repositories): New function.
	(SELECT_DIE_STR): New constant.
	(FIND_STRING_STR): New constant.
	(db_stmt1): New global variable.
	(db_stmt2): New global variable.
	(struct attr_pair): New type.
	(db_read_1_byte): New function.
	(db_read_2_bytes): New function.
	(db_read_4_bytes): New function.
	(db_read_8_bytes): New function.
	(db_read_n_bytes): New function.
	(db_read_unsigned_leb128): New function.
	(db_read_signed_leb128): New function.
	(Various places):  Add type casts or comment out dead declarations to 
	eliminate compiler warnings.
	* objfiles.c (db-access-function.h): Add new include statement.
	(create_objfile): Initialize uses_sql_repository field.
	(free_objfile):  If uses_sql_repository field is set call 
	close_dwarf_repositories.
	(get_objfile_registry_num_registrations): New function.
	* objfiles.h (<sqlite3.h>): New include statement.
	(struct objfile): Add new field uses_sql_repository.
	Add extern declaration for get_objfile_registry_num_registrations.
	* ../include/elf/dwarf2.h (DW_FORM_APPLE_db_str): Add new DWARF form.
	(DW_AT_APPLE_repository_file): Add new DWARF attribute.
	(DW_AT_APPLE_repository_type): Add new DWARF attribute.
	(DW_AT_APPLE_repository_name): Add new DWARF attribute.
	(DW_AT_APPLE_repository_specification): Add new DWARF attribute.
	(DW_AT_APPLE_repository_import): Add new DWARF attribute.
	(DW_AT_APPLE_repository_abstract_origin): Add new DWARF attribute.

2006-01-04  Greg Clayton  (gclayton@apple.com)

	* symtab.c (lookup_symtab_all): Safeguarded against null return from 
	symtab_to_fullname.
	(lookup_partial_symbol, completion_list_add_name): Removed unused variables
	and cleaned up a const warning.

2005-12-29  Stan Shebs  <shebs@apple.com>

	Start of checkpoint and undo support.
	* checkpoint.c: New file, checkpoint support.
	* checkpoint.h: New file.
	* Makefile.in (BASE_OBS): Add checkpoint.o.
	(checkpoint.o): Add dependencies.
	* infcmd.c (run_command_1): Always clear checkpoints.
	(re_execute_command, re_exec_1, re_exec_once): New functions,
	used to create intermediate checkpoints on demand.
	* infrun.c (normal_stop): Maybe create a checkpoint.
	* regcache.c (regcache_compare): New function.

2005-12-20  Jason Molenda  (jmolenda@apple.com)

	* varobj.c (varobj_create): Mark some more Apple Local code
	as such.  Remove APPLE MERGE #if 0'ed code markers.
	(varobj_update): Remove some now-unused variables to reduce
	warnings.

2005-12-16  Jim Ingham  <jingham@apple.com>

	* Makefile.in: Set the rc_version in version.c.
	* version.h: declare rc_version.
	
2005-12-15  Jason Molenda  (jmolenda@apple.com)

	* dbxread.c (read_dbx_symtab): Keep marching on if we have bogus
	stabs debug info and we're looking for OSOs.

2005-12-15  Jim Ingham  <jingham@apple.com>

	* valops.c (value_of_this): Don't error if complain is 0.
	
2005-12-13  Jason Molenda  (jmolenda@apple.com)

	* utils.c (error_stream): Remove #if 0'ed APPLE LOCAL change
	that doesn't belong here any more after the merge.
	* exceptions.c (print_exception): Add the code here, to suppress
	console error printing when we're in MI mode.

2005-12-13  Jason Molenda  (jmolenda@apple.com)

	* symtab.c (rbreak_command): Commit Jim's change to rbreak's
        bp setting to be safe for all ObjC method names.

2005-12-05  Jason Molenda  (jmolenda@apple.com)

	* linespec.c (decode_line_1): symtab_form_filename returns a
	file_symtab_arr, not a file_symtab.
	* symtab.c (lookup_symtab_all, add_partial_symtab_to_array): Note
	some APPLE LOCAL code.
	(lookup_symtab_all): Don't recompute file basename.
	* objc-lang.c (lookup_objc_class): Don't complain when we can't look
	up ObjC classes (which always happens in non-ObjC programs).

2005-11-28  Jason Molenda  (jmolenda@apple.com)

	* disasm.c (gdb_disassemble_info_null): Use gdb_null instead
	of rolling it ourself.
	(fprintf_null): Removed.

2005-11-28  Jason Molenda  (jmolenda@apple.com)

	* config/i386/tm-i386-macosx.h: Don't include tm-i386.h.
	* config/i386/xm-i386-macosx.h: Don't include xm-i386.h.
	* i386-tdep.c (i386_match_insn): Fix syntax error.
	(i386_push_dummy_call): VALUE_ENCLOSING_TYPE is a function now.

2005-11-17  Jason Molenda  (jmolenda@apple.com)

        * infcall.c (inferior_function_calls_disabled_p): New global variable
        to control whether inferior function calls are allowed (should be a
        target vector entry).
        (hand_function_call): If inf func calls disabled, throw an error.
        * infcall.h (inferior_function_calls_disabled_p): Provide extern decl.
        * objc-lang.h (lookup_objc_class_p): Provide extern decl.

2005-11-17  Jason Molenda  (jmolenda@apple.com)

        * fix-and-continue.c (redirect_statics): Also look in the new __IMPORT,
        __pointers section for non-lazy symbol pointers.

2005-11-09  Jason Molenda  (jmolenda@apple.com)

	* config/powerpc/xm-ppc-macosx.h: Don't define the host fp
	formats here.
	* config/i386/xm-i386-macosx.h: Ditto.
	* configure.host: Add definitions for the PPC host fp
	formats.

2005-11-08  Jason Molenda  (jmolenda@apple.com)

	* breakpoint.c (_initialize_breakpoint): Update
	add_set_cmd to add_setshow_string_cmd calls.
	* dbxread.c (read_dbx_symtab): Fix merge mistakes.
	* linespec.c: Update prototype.
	* objc-lang.c (print_object_command): Use value_type instead of
	VALUE_TYPE.
	* source.c (open_source_file_fullpath): Change to work with new
	style.
	(find_and_open_source): Update call of same.
	* symfile.h: Update prototype.
	* symtab.c (lookup_symtab_all): Change call to symtab_to_filename
	to call symtab_to_fullname instead.
	* valops.c (value_of_this): Fix call to get_selected_frame.

2005-10-31  Jim Ingham  <jingham@apple.com>

       * i386-tdep.c (i386_follow_jump): Use 32 bit math to calculate
       the pc relative offset for the JMP instruction.

2005-10-26  Jim Ingham  <jingham@apple.com>

       * dbxread.c (read_ofile_symtab_from_oso): Delete unnecessary
       warning.
       (open_bfd_from_oso): pass expected format to open_bfd_matching_arch.
       exec.c (exec_file_attach): Ditto.
       symfile.c (symfile_bfd_open): Ditto.
       (reread_symbols): Ditto.
       (open_bfd_matching_arch): Take in the expected
       type of the archive slice.
       symfile.h: Change def'n of open_bfd_matching_arch to accept format.

2005-10-07  Jim Ingham  <jingham@apple.com>

       * linespec.c (decode_all_digits_exhaustive): New function,
       same as decode_all_digits, but returns all the matches
       in the linetable of the input symtab.
       (symtab_from_filename): Return an array of ALL the symtabs
       that match the given filename.
       (decode_line_1): Handle getting ALL the symtabs matching
       the file name, and all the symtab_and_lines matching the line.
       * symtab.c (add_symtab_to_array): New function.
       (lookup_symtab_all): New function.
       (lookup_partial_symtab): Return all the matches, not just the
       first match.
       (add_partial_symtab_to_array): New function.
       (lookup_partial_symtab_all): New function.
       * symtab.h: Def'ns of lookup_symtab_all and
       lookup_partial_symtab_all.

2005-11-04  Jason Molenda  (jmolenda@apple.com)

	* configure.ac: Fix APPLE LOCAL block.
	* configure: Regenerated.

2005-10-24  Jim Ingham  (jingham@apple.com)

	* dbxread.c (end_psymtab): A psymtab isn't empty if it has an OSO
	record.

2005-10-19  Jim Ingham  (jingham@apple.com)

	* gdbtypes.c (make_cv_type): Return builtin_type_error if
	an undefined type is being cast.

2005-10-19  Jim Ingham  (jingham@apple.com)

	* stabsread.c (read_type): When looking up a forward reference type,
	if the type is already defined, just return it.

2005-10-19  Jason Molenda  (jmolenda@apple.com)

	* environ.c (smuggle_dyld_settings): New function to copy
	environment variables in GDB_DYLD_* to DYLD_*.
	* environ.h: Prototype.
	* infcmd.c (_initialize_infcmd): Call it.

2005-10-13  Klee Dienes  <kdienes@apple.com>
	
	* gdbthread.h (switch_to_thread): Add prototype.
	* thread.c (switch_to_thread): Make external.

2005-10-13  Klee Dienes  <kdienes@apple.com>

	* valops.c (allocate_space_in_inferior_malloc): Set
	unwind-on-signal to 1 while calling malloc.

2005-10-11  Klee Dienes  <kdienes@apple.com>

        * target.c (update_current_target): Add field for
        to_allocate_memory.  Set default to
        allocate_space_in_inferior_malloc.
        * target.c (struct target): Add field for to_allocate_memory.
        (target_allocate_memory): New macro.
        * value.h (allocate_space_in_inferior_malloc): New function.
	* valops.c (allocate_space_in_inferior_malloc): New function.
	Same as value_allocate_space_in_inferior, but returns a CORE_ADDR
	instead of a value.  Check to be sure it's safe to call malloc().
	(value_allocate_space_in_inferior): Implement using
	target_allocate_memory.
	Fixes <rdar://problem/4287513>.
	
2005-10-11  Jim Ingham  <jingham@apple.com>

	* eval.c (evaluate_subexp_standard): If EVAL_SKIP, bail out
	before you try to lookup methods in the target (which is set
	to 1 in this case).

	* linespec.c (decode_compound): Accept and set "not_found_ptr".
	(find_method): ditto.
	(decode_line_1) pass not_found_ptr to decode_compund.

	* varobj.c (cplus_value_of_child): Make a copy of the parent's 
	value before calling value_cast.
	
2005-10-11  Klee Dienes  <kdienes@apple.com>

	* doublest.c (floatformat_byteorders_are_reversed): New function.
	(floatformats_same_except_for_byteorder): New function.
	(swap_bytes): New function.
	(floatformat_to_doublest): If the type is a type supported by the
	host, but simply byteswapped, just do the byteswapping instead of
	using the generic float code.
	Fixes <rdar://problem/4236262>.

	* i386-tdep.c (i386_push_dummy_call): Fix the dummy stack frame to
	look like a "normal" stack frame.  In particular, make sure it has
	a correct $ebp chain.  Fixes <rdar://problem/4281948>.

2005-10-03  Jim Ingham  <jingham@apple.com>

	* source.c (open_source_file): Don't free fullname if we
	aren't going to use it.  Happens when we found a file from
	the pathname-substitution path.
	
2005-10-03  Jason Molenda  (jmolenda@apple.com)

	* breakpoint.c (print_it_typical): Use "times" as the field for 
	hit-count, to be consistent with all the other breakpoint printers.

2005-09-30  Jim Ingham  <jingham@apple.com>

	* stabsread.c (cleanup_undefined_types): Don't call replace_type
	if the types instance flag's aren't the same.

	* symmisc.c (equivalence_table_build): Only consider names of
	the form foo$[0-9A-Z] as equivalent to foo.
	
2005-09-30  Jason Molenda  (jmolenda@apple.com)

        * Makefile: Try to make gdb binary setgid procmod. 
        * fork-child.c (fork_inferior): Give up elevated group privs.
        * ser-pipe.c (pipe_open): Ditto.
        * cli/cli-cmds.c (shell_escape): Ditto.

        * breakpoint.c (print_it_typical): Print the current hit count of
        the breakpoint.

2005-09-27  Jim Ingham  <jingham@apple.com>

	* dbxread.c (read_dbx_symtab): Relax the pattern checking for the
	Symbol Separation .o file.
	(read_ofile_symtab_from_oso) Add some more error checking when we
	go to match up the function list with the FUN stabs we are seeing
	in the .o file.
	* varobj.c (create_child): Cons up a fake name for anonymous struct
	fields.
	
2005-09-26  Jason Molenda  (jmolenda@apple.com)

	* i386-tdep.c (i386_push_dummy_call): Pad the dummy stack frame
	so it is properly 16-byte aligned.

2005-09-15  Klee Dienes  <kdienes@apple.com>

	* breakpoint.c (print_exception_catchpoint): New function.
	(print_one_exception_catchpoint): New function.
	(print_mention_exception_catchpoint): New function.
	(print_catch_info): Now takes a breakpoint *, instead of a bpstat.
	(print_one_breakpoint): Use print_one_exception_catchpoint.
	(print_it_typical): Use print_exception_catchpoint.
	(mention): Use print_mention_exception_catchpoint.

2005-09-15  Klee Dienes  <kdienes@apple.com>

	* infrun.c (set_scheduler_locking_mode): Update error strings.
	(set_schedlock_helper): Ditto.

2005-09-14  Jim Ingham  <jingham@apple.com>

	* defs.h (Debugger_state): Put back, MacsBug uses it
	(state_change_hook): ditto
	* top.c (state_change_hook): ditto.
	(quit_target): ditto.
	* infcmd.c (run_command, continue_command,
	signal_command): ditto.
	* inflow.c (kill_command): ditto.
	* infrun.c (handle_inferior_event): ditto.
	* main.c (main): ditto.
	* symfile.c (symbol_file_clear, symbol_file_command):
	ditto.
	
2005-09-13  Eric Albert (ejalbert@apple.com)

	* objc-lang.c (print_object_command): Try to call  
	_CFPrintForDebugger() for print-object if _NSPrintForDebugger() 
	is not present.

2005-09-13  Jim Ingham  <jingham@apple.com>

	* stabsread.c (read_type): When processing forward reference
	stab def'ns, don't use a type you looked up by name unless it
	fill the type slot currently being defined.
	
2005-09-12  Jason Molenda  (jmolenda@apple.com)

	* objc-lang.c (print_object_command): Revert last patch until
	I have a chance to look into why it caused regressions.

2005-09-12  Eric Albert  (ejalbert@apple.com)

        * objc-lang.c (print_object_command): Add support for calling
        CFPrintForDebugger() if the dylib with NSPrintForDebugger() isn't
        loaded.

2005-09-12  Klee Dienes  <kdienes@apple.com>

	* disasm.h (find_pc_offset): Add new arguments, return type.
	* disasm.c (gdbarch_instruction_length): New function.
	(find_pc_offset): Update comment.  Add new arguments.  Convert
	to use gdbarch_instruction_length.  Add support to control
	limiting the PC to the current function.  Enhance error reporting.

2005-09-07  Jim Ingham  <jingham@apple.com>

	* dbxread.c: These changes are to support reading debug info
	from a .o file that has multiple N_SO sections in it.
	(stabs_seek): When you were using the internal buffer, this was
	seeking backwards from the pointer, which is just wrong.
	(init_oso_pst_list, add_oso_pst_to_list, end_oso_pst_list): New
	functions.
	(read_dbx_symtab): Build up the list of N_SO sections sharing
	one N_OSO.
	(start_psymtab): Null out the LDSYM_OSO_PST_LIST pointer.
	(end_psymtab): Null the LDSYM_OSO_* fields for the PST's we
	make for BINCL/EINCL header includes.
	(oso_scan_partial_symtab): New function.
	(dbx_psymtab_to_symtab_1): Call oso_scan_partial_symtab to build
	up dependencies for the partial_symtabs that share this .o.
	(read_ofile_symtab_from_oso): Use the LDSYMOFF since we now set
	that in oso_scan_partial_symtab.
	
	And this supports timing checking between final linked executable
	and the .o file:
	(read_dbx_symtab): Record OSO_MTIME from the N_OSO stab.
	(open_bfd_from_oso): Check time stamp.

	* gdbtypes.c (smash_types)L Don't delete the chain when you smash types.
	You will need to fix up the other elements on it.
	(make_qualified_type): Handle the case where both TYPE & STORAGE
	may have qualified elements already.
	
2005-09-06  Klee Dienes  <kdienes@apple.com>

	* configure.in: Remove the code to hard-code long double support
	to "no" on all platforms.  Add code to default long double support
	to "yes" on Mac OS X.

2005-09-06  Klee Dienes  <kdienes@apple.com>

	* config/i386/xm-i386-macosx.h (HOST_LONG_DOUBLE_FORMAT): Only set
	this if we are compiling with gcc-4.0 or above.

2005-09-06  Klee Dienes <kdienes@apple.com>

	Restore patch by Jim Ingham <jingham@apple.com> from 2003-03-03
	that was lost in a subsequent merge.  Includes the following
	additional changes:

	* breakpoint.c (bpstat_stop_status): Properly resume the inferior
	and step over the catchpoint if we stop at a catchpoint for which
	the condition doesn't hold.
	(mention): MI-ify the catchpoint output.

	Added the OBJFILE parameter to all instances of
	target->to_find_exception_catchpoints.
	
	Original ChangeLog by Jim:

	This set of changes updates the "catch catch" and "catch throw".
	The output is mi-ified, the object type being thrown is added,
	you can set a regexp for which objects to stop on both for
	catches & throws.  It adds one target-vector entry to the
	catchpoint support: to_find_exception_catchpoints.  This
	just splits out the "enabling" and the "setting breakpoints
	on catchpoints" parts of the target catchpoint support.

	* breakpoint.c: Define enabled flags & regexp strings.
	(print_it_typical): MI-ify the catchpoint printing info.
	(print_catch_info): New function, for printing info.
	(bpstat_stop_status): Only process the "catch" breakpoint
	that matches the stop address.  Check the catch regexp
	to see if we should stop here.  MI-ify the catch stop
	message.
	(update_exception_catchpoints): New function, more convenient
	client function than target_enable_exception_callback/
	create_exception_catchpoints.
	(current_exception_should_stop): New function.
	(catch_exception_command_1): use update_exception_catchpoints.
	(exception_catchpoints_enabled): New function, needed for the mi 
	command.
	(disable_exception_catch): New function, so you don't have to 
	remove all the catch breakpoints by hand.
	(_initialize_breakpoint): Add set commands for the exception
	type regexp's.
	* breakpoint.h: Add declarations for new functions.
	* inftarg.c (child_enable_exception_callback): No longer return
	the SALS, this is done by child_find_exception_catchpoints.
	(child_find_exception_catchpoints): stubbed out version of this.
	(init_child_ops): add child_find_exception_catchpoints.
	* stack.c (catch_info): Still does nothing, but in the new form.
	* symtab.h: Add exception_type to exception_event_record & accessor
	macro.
	* target.c: Add to_find_exception_catchpoints everywhere necessary.
	* target.h: ditto.

	* infcmd.c (_initialize_infcmd): String constants can't have
	un-backslashed newlines.  gcc-3.3 actually makes this an error
	so we ought to fix it...

2005-09-06  Jim Ingham  <jingham@apple.com>

	* stabsread.c (process_symbol_types_only): Missing break.
	(find_name_end): Add the "correct" algorithm for names that
	have "::" in them.  But the correct version is #if 0'ed because
	it makes stabs reading ~6% slower without corresponding benefit.
	
2005-09-01  Klee Dienes  <kdienes@apple.com>

	* disasm.c (fprintf_null): New function.
	(gdb_disassemble_info_null): New function.  Returns a struct
	disassemble_info that generates no output.
	(gdb_disassembly): Don't pass in file_string and line_num; they
	weren't used anyway.
	(find_pc_offset): New function.

	* disasm.h (gdb_disassembly): Update prototype.

	* cli/cli-cmds.c: Update call to gdb_disassembly.

2005-08-19  Jim Ingham  <jingham@apple.com>

	* dbxread.c (open_bfd_from_oso): Handle the case where
	the file path of an OSO stab has a "()" in the name.
	
2005-08-15  Jim Ingham  <jingham@apple.com>

	* buildsym.c (end_symtab): Call cleanup_undefined_arrays.
	* gdbtypes.c (add_undefined_arrays): New function.
	(cleanup_undefined_arrays): New function.
	(create_array_type): Call add_undefined_arrays.
	* gdbtypes.h: Declare cleanup_undefined_arrays.
	
	* stabsread.c (read_struct_type): Take out the 
	code that adjusts the length of variants.  This is now
	redundant, and is done in dbx_fixup_variants.

2005-08-14  Jim Ingham  <jingham@apple.com>

	* buildsym.c (end_symtab): Call cleanup_undefined_fields.
	* stabsread.c (dbx_fixup_variants): New function.
	(read_type): Call dbx_fixup_variants on all the newly defined
	types.
        (add_undefined_field): New function.
	(cleanup_undefined_fields): New function.
	(adjust_field_bitsize): New function.
	(read_one_struc_field): Use adjust_field_bitsize.
	(attach_fields_to_type): If field type is undefined, add it to
	the undefined fields for fixup.

	* stabsread.h: declare cleanup_undefined_fields

2005-08-12  Jim Ingham  <jingham@apple.com>

	* dbxread.c (read_ofile_symtab_from_oso): Thinko in how we rewind
	past the SO stabs when we seek for the right SO section.

2005-08-11  Jim Ingham  <jingham@apple.com>

        * dbxread.c (read_ofile_symtab_from_oso): Handle the case where
	one OSO file might have more than one N_SO section in it.
	* stabsread.c (cleanup_undefined_types): Don't complain about
	the type being undefined unless it actually is still undefined.
	* (read_type): Set the "type" variable to the value of dbx_fixup_type,
	since it might be used later on in read_type.

2005-08-10  Jason Molenda  (jmolenda@apple.com)

	* stabsread.c (cleanup_undefined_types): Remove extra "." at end
	of complaint.

2005-08-02  Jim Ingham  <jingham@apple.com>

	* dbxread.c (dbx_psymtab_to_symtab_1): Remove a debugging
	printf.
	
2005-08-01  Jim Ingham  <jingham@apple.com>

	* stabsread.c (dbx_fixup_type): New function.
	(read_type): Fix the type in the slot for a given typenumber,
	don't just replace it with the new type.  Otherwise the 
	references to it won't get fixed up.
	
2005-07-28  Jim Ingham  <jingham@apple.com>

	* dbxread.c (read_dbx_symtab): We recognize the symbol 
	separation file from the N_OSO name, not the N_SO name.
	(read_ofile_symtab_from_oso): Read over the stabs from
	coalesced functions and extract the types.
	* stabsread.c (process_symbol_types_only): New function,
	the parsing side of extracting types from a stab.
	
2005-07-27  Jim Ingham  <jingham@apple.com>

	This set of changes implements keeping debug information
	in the .o file, and mapping the addresses from there using
	a minimal set of debug information in the final linked image.

	
	* dbxread.c: (read_ofile_symtab_from_oso, 
	stabsect_read_strtab_from_oso, open_bfd_from_oso, 
	cleanup_oso_data, lookup_psymbol_from_namestring,
	oso_statics_pop):
	New functions.
	(fill_symbuf): If using stabs_data, don't bother copying it
	into the symbuf, just use it out of stabs_data.
	(INTERNALIZE_SYMBOL, NEXT_SYMBOL, PEEK_SYMBOL): Return whether
	the N_SECT flag was set on the external nlist.
	(set_namestring_1): New function, read the namestring without
	using the objfile directly.
	(set_namestring): Change to use set_namestring_1.
	(read_dbx_symtab): Process the N_OSO stab.  
	Also, if we saw an N_OSO, then build up a queue of static symbols 
	so we can map them back when reading in the .o file.
	Don't read symbols from the SYMBOL_STUB section, they just confuse us.
	Add symbol separation files to the dependency list by hand.
	Don't duplicate the code for handling 'F' and 'f' FUN stabs.
	Read in the N_OPT symbols when reading the psymtab.  ld64 doesn't
	give addresses to ANY N_SO stabs, and that confuses us if we don't
	know we are processing gcc compilations in the psymtab.
	(start_psymtab): Null out OSO name and OSO statics.
	Record the language in the psymtab, we will need it.
	(dbx_psymtab_to_symtab_1): Add support for reading out of the .o.
	(process_one_symbol): Remove compiler warning.
	* symtab.h: Add language to psymtab.
	* config/tm-macosx.h: change INTERNALIZE_SYMBOL to take sect_p.
	
	* event-top.c (async_request_quit): Check for immediate_quit.

	* symfile.c (open_bfd_matching_arch): Make a common idiom into a 
	function.
	Also use it where needed.
	* symfile.h: declare open_bfd_matching_arch.
	* exec.c: use open_bfd_matching_arch.

	* stabsread.c (read_type): Obvious merge goof.
	Also check for ERROR and don't continue processing array type.

	* symtab.c (lookup_partial_symbol): Fix thinko in looking up 
	with both demangled & mangled names.

	
2005-06-30  Jim Ingham  <jingham@apple.com>

	* symtab.c (rbreak_command): Add -shlib to the case where
	we only found minsymbols as well, so we don't set all the
	rbreak breakpoints on the same symbol.
	
2005-06-23  Jim Ingham  <jingham@apple.com>

	* valops.c (value_of_this): Use get_selected_frame rather
	than accessing the deprecated_selected_frame directly.
	
2005-06-20  Jim Ingham  <jingham@apple.com>

	* c-exp.y (yylex): Look up symbol as ObjC class even if
	we don't have debug info for it.  We don't need that to
	call a method on the object.
	* objc-lang.c (print_object_command): If the class has
	an unknown type, cast it to id before calling po.

2005-06-14  Jim Ingham  <jingham@apple.com>

	* defs.h: Add a declaration of get_scheduler_lock_ptid.
	* infrun.c (get_scheduler_lock_ptid): New function.
	(set_schedlock_helper): Use scheduler_run_this_ptid instead
	of setting scheduler_lock_ptid by hand.
	(resume): Ditto.
	(init_wait_for_inferior): Ditto

	* objc-lang.c (print_object_command): Make the unsafe call
	a warning not an error.  Otherwise you can't use po in a
	breakpoint command without aborting the command...

	* thread.c (switch_to_thread): Move the code to switch the
	locked thread if the scheduler locking is on from
	do_captured_thread_select to here, this is a more basic
	function.

2005-06-07  Jason Molenda  (jmolenda@apple.com)

	* i386-tdep.c (i386_frame_setup_skip_insns): Add instructions
	found in prologues on a Red Hat FedoraCore2 system.

2005-09-12  Jason Molenda  (jmolenda@apple.com)

        * objc-lang.c (print_object_command): Revert last patch until
        I have a chance to look into why it caused regressions. 

2005-09-12  Eric Albert  (ejalbert@apple.com)

	* objc-lang.c (print_object_command): Add support for calling
	CFPrintForDebugger() if the dylib with NSPrintForDebugger() isn't 
	loaded.

2005-09-01  Klee Dienes  <kdienes@apple.com>

	* disasm.c (fprintf_null): New function.
	(gdb_disassemble_info_null): New function.  Returns a struct
	disassemble_info that generates no output.
	(gdb_disassembly): Don't pass in file_string and line_num; they
	weren't used anyway.
	(find_pc_offset): New function.

	* disasm.h (gdb_disassembly): Update prototype.

	* cli/cli-cmds.c: Update call to gdb_disassembly.

2005-08-09  Klee Dienes  <kdienes@shark.dienesfamily.org>

	* varobj.c (struct value_rtti_args): Remove.
	(wrapped_value_rtti_target_type): Remove.
	(safe_value_rtti_target_type): Fix exception-handling.

2005-08-09  Klee Dienes  <kdienes@shark.dienesfamily.org>

	* objc-lang.c (struct selector_entry): VAL should be a CORE_ADDR,
	not an int (since it's used to store the address of the selector
	in memory).

2005-08-03  Klee Dienes  <kdienes@apple.com>

	* breakpoint.c (print_it_typical): Use async_reason_lookup.

2005-08-02  Klee Dienes  <kdienes@apple.com>

	* findvar.c (extract_unsigned_integer): Use
	extract_unsigned_integer_with_byte_order, not
	extract_signed_integer_with_byte_order.

2005-08-02  Klee Dienes  <kdienes@apple.com>

	* config/powerpc/macosx.mh (NATDEPFILES): Include gcore.o.

2005-07-26  Stan Shebs  <shebs@apple.com>

	* breakpoint.c (_initialize_breakpoint): Restore a missing
	line in command help.
	* infrun.c: Bring back HP-era macros TARGET_DISABLE_HW_WATCHPOINTS
	and TARGET_ENABLE_HW_WATCHPOINTS.
	(handle_inferior_event): Use them.
	* ppc-sysv-tdep.c (ppc_darwin_abi_return_value): Use a ULONGEST
	to work around truncation problem in 32-bit mode.
	* config/nm-macosx.h (HAVE_NONSTEPPABLE_WATCHPOINT): Re-enable.

2005-07-11  Klee Dienes <klee@apple.com>

	* ppc-sysv-tdep.c (do_ppc_sysv_return_value): Use
	ppc_copy_from_greg.

2005-07-11  Klee Dienes <klee@apple.com>

	* breakpoint.c (break_command_2): Propagate the entire exception
	upward, instead of just the reason.
	* thread.c (gdb_thread_select): Pass the address of the entire
	args struct, not just the string.
	
2005-07-07  Klee Dienes <klee@apple.com>

	* varobj.c: Clean up various merge messes.

2005-07-07  Klee Dienes <klee@apple.com>

	* interps.c (current_interp): Restore; was omitted from interps.c.
	* event-loop.c (start_event_loop): Set the global uiout to the
	uiout for the current interpreter.  This is necessary because the
	interpreter-switching code is now wrapped in a cleanup handler
	that resets the uiout.  We should clearly come up with a better
	way of managing the global interpreter and uiout, in any event,
	but this appears to work for now.

2005-07-07  Stan Shebs  <shebs@apple.com>

	* eval.c (evaluate_subexp_standard): Resolve a merge
	standard, fix some local markers.
	* infcall.c (hand_function_call): Set values_type from
	check_typedef call.
	* infcmd.c (default_print_registers_info): Fix a merge mess.
	* ppc-sysv-tdep.c (ppc_copy_into_greg): Use new API.
	(ppc_push_argument): Similarly.
	* printcmd.c (print_formatted): Tweak local markers.
	* procfs.c: Revert to FSF version.
	* valops.c (hp_som_som_object_present): Delete leftover decl.

2005-07-05  Stan Shebs  <shebs@apple.com>

	* frame.c (frame_debug): Make globally visible.

2005-06-28  Stan Shebs  <shebs@apple.com>

	* arch-utils.c: Remove our size/offset caching code, now handled
	in generic machinery.
	(reg_cache_hack__architecture_changed_hook): Delete.
	(generic_register_size): Revert to FSF version.
	(generic_register_byte): Likewise.
	* arch-utils.h (reg_cache_hack__architecture_changed_hook):
	Delete decl.
	* bcache.h: Add a local marker.
	* breakpoint.c: Likewise.
	* breakpoint.h: Likewise.
	* completer.c: Add local markers.
	* completer.h: Likewise.
	* frame.c (deprecated_frame_next_hack): Rename to
	frame_next_hack.
	(deprecated_frame_cache_hack): Similarly.
	(default_print_extra_frame_info): Remove, no longer used.
	* frame.h: Adjust decls to match.
	* rs6000-tdep.c: Reduce FSF discrepancies.
	(_initialize_rs6000_tdep): Make usable for non-Darwin
	configs.
	* solib.c (symbol_add_stub): Fix merge mess.
	* solib.h: Reduce FSF discrepancy.
	* somread.c: Revert to FSF version.
	* stack.c (frame_info): Revive extra frame info
	printing, using macro instead of gdbarch.
	* config/nm-macosx.h (CHILD_PREPARE_TO_STORE): Delete,
	no longer needed.

2005-06-23  Stan Shebs  <shebs@apple.com>

	* breakpoint.c: Add some local markers.
	(break_at_finish_command, etc): Delete some old
	dead code.
	(condition_command): Clean up merge conflicts.
	(condition_command_1): Likewise.
	(do_captured_breakpoint): Likewise.
	(disable_exception_catch): Likewise.
	(catch_command_1): Fix FSF discrepancy.
	* breakpoint.h: Add local markers.
	* buildsym.c (record_line): Add local marker.
	* c-exp.y: Add local markers.
	* frame.c: Add local markers.
	* frame.h: Delete decls of deleted functions.
	* infcmd.c: Add local markers.
	(jump_command): Fix async patch.
	(print_return_value): Fix FSF discrepancies.
	(_initialize_infcmd): Fix attach's completer.
	* infrun.c (handle_inferior_event): Recover
	local patches in disappeared handle_step_into_function.
	* inftarg.c: Add local markers.
	* interps.h: Delete unused decl.
	* linespec.c: Add local markers.
	(symtab_from_filename): Fix merge mess.
	(decode_variable): Likewise.
	(minsym_found): Likewise.
	* linespec.h: Add local marker.
	* stack.c: Add local markers.
	* target.c: Add local markers, delete
	unused decls.

2005-06-21  Klee Dienes  <klee@apple.com>
	
	* breakpoint.c (do_captured_parse_breakpoint): Now returns void.
	(watchpoint_equal): Convert to use gdb_byte.
	(break_command_2): Convert to use the new exception handling
	mechanism.

2005-06-21  Klee Dienes  <klee@apple.com>

	* cli/cli-setshow.c (do_setshow_command): Re-merge the "always
	show the options for an enumerated value" patch originally done by
	Jim.  Revert our removal of an extra declaration, to match the FSF
	sources.  Add APPLE_LOCAL marker.

2005-06-21  Klee Dienes  <klee@apple.com>

	* minsyms.c (prim_record_minimal_symbol_and_info): Re-factor the
	mst_file_text check up one level.  Don't modify the symbol name
	when checking it against __gcc_compiled.  Update comments.
	(Restoring a patch originally done by Jim that somehow got lost in
	the merge.)

2005-06-21  Klee Dienes  <klee@apple.com>

	* infcall.c (hand_function_call): Complete the merge.  Rename
	value_type to values_type, to avoid name conflict.  Replace
	CHECK_TYPEDEF with check_typedef.  Update comments.

2005-06-21  Klee Dienes  <klee@apple.com>

	* wrapper.c: Convert entire file to the new exception-handling
	code.  Move Apple-specific #includes to end of the #include list.
	Remove all wrap_* prototypes and functions.
	(struct gdb_wrapper_arguments): Remove.
	(struct captured_value_struct_elt_args): Remove.
	(gdb_parse_exp_1): Convert to TRY_CATCH.
	(wrap_parse_exp_1): Remove.
	(gdb_evaluate_expression): Convert to TRY_CATCH.
	(wrap_evaluate_expression): Remove.
	(gdb_print_expression): Convert to TRY_CATCH.
	(wrap_print_expression): Remove.
	(gdb_evaluate_type): Convert to TRY_CATCH.
	(wrap_evaluate_type): Remove.
	(gdb_value_fetch_lazy): Convert to TRY_CATCH.
	(wrap_value_fetch_lazy): Remove.
	(wrap_value_equal): Remove.
	(wrap_value_subscript): Remove.
	(wrap_value_ind): Remove.
	(wrap_value_cast): Remove.
	(wrap_parse_and_eval_type): Remove.
	(gdb_value_struct_elt): Convert to TRY_CATCH.
	(do_captured_value_struct_elt): Remove.
	(gdb_varobj_get_value): Convert to TRY_CATCH.
	(wrap_varobj_get_value): Remove.
	(wrap_value_objc_target_type): Remove.
	(safe_value_objc_target_type): Convert to TRY_CATCH.

2005-06-20  Stan Shebs  <shebs@apple.com>

	* config/powerpc/macosx.mt: Use DEPRECATED_TM_FILE
	instead of TM_FILE for the target header.
	* config/i386/macosx.mt: Likewise.

2005-06-17  Stan Shebs  <shebs@apple.com>

	Reduce hair-tearing differences between Apple and FSF versions
	of symbol_file_add* functions.
	* symfile.c (symbol_file_add_with_addrs_or_offsets): Rename to
	symbol_file_add_name_with_addrs_or_offsets and fix callers.
	(symbol_file_add_bfd_with_addrs_or_offsets): Rename
	to symbol_file_add_with_addrs_or_offsets.
	(symbol_file_add_bfd): Remove, redundant with
	symbol_file_add_from_bfd.
	(symbol_file_add_from_bfd): Call symbol_file_add_with_addrs_or_offsets.
	(symbol_file_add): Call symbol_file_add_name_with_addrs_or_offsets.
	(symbol_file_add_main_1): Call
	symbol_file_add_name_with_addrs_or_offsets.
	* symfile.h (symbol_file_add_bfd): Remove decl.

2005-06-17  Klee Dienes  <kdienes@apple.com>

	symfile.c (reread_symbols): Fix up the Apple-local patches to
	the stat check --- the FSF folks added their own check, but it's not
	quite right.

2005-06-15  Klee Dienes  <kdienes@apple.com>

	* configure: Regenerate.
	* configure.ac: Add AC_PROG_LIBTOOL.

2005-06-07  Jason Molenda  (jmolenda@apple.com)

        * i386-tdep.c (i386_frame_setup_skip_insns): Add instructions
        found in prologues on a Red Hat FedoraCore2 system.

2005-06-04  Jason Molenda  (jmolenda@apple.com)

	* i386-tdep.c: A little merge cleanup.  Haven't tried compiling yet,
	just eyeballing.

2005-05-30  Stan Shebs  <shebs@apple.com>

	* block.c (blockvector_for_pc_sect): Note a mysterious
	change.
	* breakpoint.c (insert_bp_location): Mark local changes.
	(insert_breakpoints): Likewise.
	(software_breakpoint_inserted_here_p): Likewise, remove
	if 0 block.
	(print_it_typical): Mark local change.
	(watchpoint_equal): Note as Apple-only.
	(watchpoint_check): Mark local changes.
	(bpstat_stop_status, print_one_breakpoint,
	user_settable_breakpoint, resolve_pending_breakpoint,
	disable_breakpoints_in_shlibs, mention,
	delete_breakpoint, delete_command,
	breakpoint_re_set_one, save_breakpoints_command): Mark
	local changes.
	* breakpoint.h: Likewise.
	* buildsym.c (add_symbol_to_list, finish_block,
	make_blockvector, start_subfile): Likewise.
	(end_symtab): Remove if 0 block.
	* buildsym.h: Mark local change.
	* c-typeprint.c (cp_type_print_method_args): Likewise.
	(c_type_print_args): Likewise.
	* cli-out.c: Likewise.
	* completer.c: Tweak FSF discrepancy.
	* corelow.c (core_close): Mark local change.
	* cp-abi.c, cp-abi.h, cp-namespace.c: Likewise.
	* stabsread.c (read_member_functions): Remove
	long if 0 block.
	* symfile.c, symfile.h, symtab.h: Tweak cosmetic FSF
	discrepancies.
	* cli/cli-cmds.c, cli/cli-cmds.h, cli/cli-decode.c,
	cli/cli-script.c: Likewise, and mark local changes.

2005-05-27  Klee Dienes  <kdienes@apple.com>

	* minsyms.c (prim_record_minimal_symbol_and_info): Don't build
	the equivalent symbol table here; these symbols are going to get freed
	and replaced by versions on the obstack.
	(install_minimal_symbols): Instead, build them here, by
	calling the new function equivalence_table_build().

	* symmisc.c (equivalence_table_build): New function.  Based on the
	original code from prim_record_minimal_symbol_and_info.

	* symtab.h (equivalence_table_build): Add prototype.
	(equivalence_table_add): If the table hasn't been allocated,
	something has gone very wrong --- issue an internal error, instead
	of just covering it up.
	
2005-05-27  Klee Dienes  <kdienes@apple.com>

	* linespec.c (decode_variable): Add new boolean argument
	EQUIVALENCIES, to determine if decode_variable should look up
	equivalent symbols.
	(minsym_found): Ditto.  Also, when returning the canonical names,
	single-quote them so they won't be re-evaluated for equivalent
	symbols later.
	(decode_line_one): If we are parsing a single-quoted string, tell
	decode_variable not to look up equivalent symbols.
	(decode_dollar): Tell minsym_found not to look up equivalent
	symbols.
	(decode_variable): Propagate CANONCIAL through to minsym_found.
	
2005-05-27  Klee Dienes  <kdienes@apple.com>

	* breakpoint.c (bpstat_copy): Release the copy of the value in
	the bpstat, so it doesn't get freed out from underneath us.

2005-05-27  Klee Dienes  <kdienes@apple.com>

	* frame.c (get_prev_frame): Allow a single duplicate frame in the
	stack (generating a warning), but generate an error if there are
	two or more duplicates in a row.  This allows us to recover from a
	minor prologue parsing error, but still prevents an infinite loop
	from spamming the user.

2005-05-26  Stan Shebs  <shebs@apple.com>

	* arch-utils.c, arch-utils.h (generic_dynamic_trampoline_nextpc):
	 Remove.
	(show_endian): Tweak local markers.
	* blockframe.c (deprecated_inside_entry_file): Likewise.
	(inside_main_func): Likewise.
	* breakpoint.c: Add some local markers.
	* breakpoint.h: Likewise.
	* c-valprint.c: Likewise.
	* corefile.c: Tweak local markers.
	* gdbarch.sh, gdbarch.c, gdbarch.h: Remove
	dynamic_trampoline_nextpc bits.
	* hpread.c (hpread_alloc_type): Revert local change.
	* utils.c: Whack a newline.
	* value.h: Tweak whitespace and local markers.
	* varobj.c: Add some local markers.
	* wrapper.c: Likewise.

2005-05-26  Jason Molenda  (jmolenda@apple.com)

	* serial.c (serial_open): Comment fix.

2005-05-25  Stan Shebs  <shebs@apple.com>

	* breakpoint.c, c-typeprint.c, cli/cli-out.c, eval.c,
	event-top.c, fork-child.c, frame.h, infcmd.c, inftarg.c,
	jv-exp.y, main.c, maint.c, minsym.c, objc-lang.c,
	ppc-tdep.h, remote.c, source.c, stabsread.h, stack.c,
	symfile.c, target.h, thread.c, top.c, ui-out.c,
	cli/cli-decode.h, cli/cli-script.c, mi/mi-cmd-break.c,
	mi/mi-cmd-file.c, mi/mi-cmd-var.c, mi/mi-main.c: Cosmetic
	changes to reduce discrepancy with FSF versions.
	* corefile.c (memory_error): Remove use of always-zero
	error_hook.
	* defs.h: Remove redundant include of ansidecl.h, remove
	junk cygwin and NeXT_PDO passes.
	* elfread.c (elf_symtab_read): Remove old PDO bit.
	* eval.c (evaluate_subexp_standard): Remove reference
	to undefined variable symbol_generation.
	* gdb_locale.h: Remove include of ansidecl.h and
	undef of _.
	* gdbarch.sh, gdbarch.c, gdbarch.h: Remove clear_gdbarch_swap,
	declarations of swapout_gdbarch_swap and swapin_gdbarch_swap,
	all unused.
	* macosx/macosx-nat-dyld.c: Likewise.
	* jv-lang.c: Remove unused static class_symtab_space.
	* m2-exp.y: Remove unused NOTUI.
	* minsym.c (lookup_minimal_symbol_text): Remove local #if 0 bit.
	(lookup_minimal_symbol_by_pc_section_from): Likewise.
	(lookup_minimal_symbol_by_pc): Remove #if O FSF bit, risky
	for bad patching in merges.
	* objfiles.c (objfile_purse_solibs): Remove local commented-out
	code.
	* rs6000-tdep.c: Add a local marker.
	* serial.h, serial.c, ser-pipe.c, ser-tcp.c, ser-unix.c,
	macosx/macosx-nat.c: Don't use altered names for open,
	close, and write fields of struct.
	* stabsread.c: Don't include limits.h.
	(os9k_stabs): Remove.
	* symtab.c (gdb_mangle_name): Remove local #if 0 code.
	* target.c (debug_to_core_file_to_sym_file): Likewise.
	* gdbtk-cmds.c, gdbtk-hooks.c: Add local markers.

2005-05-22  Stan Shebs  <shebs@apple.com>

	* Makefile.in: whack old nindy bits left over from merge.
	* dbxread.c (unparse_stabtype): Remove, never used.
	* arch-utils.c, cp-namespace.c, symfile.c: Add a newline.
	* bcache.c: Lose a newline.

2005-05-19  Jim Ingham  <jingham@apple.com>

	* varobj.c: Added "lookup_dynamic_type" variable to the
	value_of_child ftype.
	(value_of_child): Pass this in.
	(c_value_of_child): Set it properly.
	(java_value_of_child): Ditto
	(cplus_value_of_child): Ditto, plus make sure if we are
	a baseclass, we use TYPE_PTR if our parent was a pointer
	to the object.
	(cplus_type_of_child): Again, base-classes need to be
	pointers to base-class if their parents were as well.
	(cplus_path_expr_of_child): Need to use the dynamic child
	for the cast if it is available.

2005-05-19  Stan Shebs  <shebs@apple.com>

	* coffread.c, event-loop.c, exec.c, fork-child.c,
	gdbarch.h, gdbarch.sh, gdbcore.h, hpux-thread.c,
	i386-tdep.c, infcall.c, infcmd.c, memattr.c, objfiles.c,
	objfiles.h, solib.c: Clear random small differences
	from FSF versions, cosmetic or unused code.

	* defs.h (Debugger_state): Remove, not needed.
	(state_change_hook): Likewise.
	* top.c (state_change_hook): Remove.
	(quit_target): Remove use of state_change_hook.
	* infcmd.c (run_command, continue_command,
	signal_command): Likewise.
	* inflow.c (kill_command): Likewise.
	* infrun.c (handle_inferior_event): Likewise.
	* main.c (main): Likewise.
	* symfile.c (symbol_file_clear, symbol_file_command):
	Likewise.

2005-05-19  Jason Molenda  (jmolenda@apple.com)

	* i386-tdep.c (i386_frame_setup_skip_insns): Add xorps.

2005-05-18  Stan Shebs  <shebs@apple.com>

	Remove cached symfile machinery.
	* Makefile.in: Remove reference to cached-symfile.o.
	* jv-lang.c (get_dynamics_objfile): Only use Apple version of
	allocate_objfile.
	* objfiles.c: Restore to layout more like to FSF code,
	remove FSF_OBJFILES stuff since diverged from FSF, merge
	cached symfile commands from removed files for compat (but
	they are no-ops).
	* objfiles.h (OBJF_MAPPED): Remove.
	(allocate_objfile): Remove excess decl.
	* symfile.c (MAPPED_SYMFILES): Remove.
	(symbol_file_add_bfd_with_addrs_or_offset): Only use Apple version of
        allocate_objfile, prune out mapped symfile code.
	(add_symbol_file_command): Remove -mapped option.
	(reread_separate_symbols): Remove use of OBJF_MAPPED.

2005-05-16  Jason Molenda  (jmolenda@apple.com)

	* fix-and-continue.c (update_picbase_register): Add a debug printer.
	* i386-tdep.c (i386_find_picbase_setup): i386_frame_setup_skip_insns
	now skips over the picbase register call, so look for that in the 
	matched insns.

2005-05-12  Jim Ingham  <jingham@apple.com>

	* dwarf2read.c: Add the dwarf_*_vma values to the dwarf2_pinfo
	structure.  Add accessor macros.
	(dwarf2_build_psymtabs_hard): Store our hacky
	dwarf_*_vma addresses in the pst.
	(psymtab_to_symtab_1): reset the dwarf_*_vma addresses out of
	the pst.
	
2005-05-10  Jim Ingham  <jingham@apple.com>

        * breakpoint.c (breakpoint_create): Don't let the condition setting
        for a pending breakpoint "error", catch the error and issue a warning
        instead.

        * objc-exp.y: Use find_template_name_end to step over a template 
        rather than doing it by hand.

2005-05-09  Klee Dienes <kdienes@apple.com>

	* stabsread.c (define_symbol): Add support for
	CodeWarrior-style boolean constants.

2005-05-09  Klee Dienes <kdienes@apple.com>

	* dbxread.c (end_fun_absolute_p): New variable.
	(process_one_symbol): Add support for absolute-address N_FUN
	stabs.
	(_initialize_dbxread): Add "function-end-absolute" GDB variable.

2005-05-09  Jason Molenda  (jmolenda@apple.com)

	* i386-tdep.c (i386_analyze_frame_setup): Remove FIXME comment
	I'd added - I believe I was mistaken.

2005-05-03  Ronnie Misra  (rgmisra@apple.com)
        Edited by Jason Molenda (jmolenda@apple.com)

	* remote.c (remote_ops): Make global so we can access it from
	macosx-nat.c.
	* serials.c (serial_open): Recognize "unix" style serial connections
	(socket connections).

2005-05-02  Jim Ingham  <jingham@apple.com>

	* breakpoint.c (tell_breakpoints_objfile_changed): Always check the
	bp_objfile against the one passed in, regardless of whether the 
	breakpoint is set or not.
	
2005-04-29  Klee Dienes  <kdienes@apple.com>

	* valarith.c (value_subscripted_rvalue): Fix comparison
	against upper bound.

2005-04-29  Jason Molenda  (jmolenda@apple.com)

	* i386-tdep.c (i386_find_esp_adjustments): New function, necessary
	for finding our way in -momit-leaf-frame-pointer frames.
	(i386_frame_cache): Add new case to handle genuinely frameless
	functions.

2005-04-29  Klee Dienes  <kdienes@apple.com>

	* infrun.c: Include "ppc-macosx-regnums.h" when necessary.
	(handle_inferior_event): If we are doing a metrowerks-step,
	use ($pc == $lr) to determine if we have just returned from a
	function, since we won't have any other symbol information
	available.

2005-04-29  Klee Dienes  <kdienes@apple.com>

	* eval.c (evaluate_subexp_with_coercion): Don't coerce vectors to
	pointers, even though they are nominally arrays.

	* gdbtypes.c (use_stride): New variable.
	(create_range_type): Add new 'stride' field.
	(get_array_bounds): New function.
	(_initialize_gdbtypes): Add 'use-array-stride' GDB variable.

	* gdbtypes.h (TYPE_STRIDE): New accessor.
	(get_array_bounds): Add prototype.

	* stabsread.c (read_type): Add support for the @T= (stride)
	parameter.  Set the stride to -1 if we notice the @V (vectory)
	parameter on an Intel target.

	* valarith.c (value_subscripted_rvalue): No longer pass the lower
	bound explicitly; we can calculate it from the range type.  Add
	support for reverse array strides.
	(value_subscript): Use get_array_bounds and the new prototype for
	value_subscripted_rvalue.  Pull in the change from FSF that
	doesn't print a "out of range" warning if the array is declared to
	be of unspecified size.  Add support for reverse strides.

	* valprint.c (val_elt_addr):  New function.
	(val_print_array_elements): Update to use val_elt_addr.

2005-04-29  Jim Ingham  <jingham@apple.com>

	* valops.c (value_cast): Don't COERCE_REF a reference type, since
	that turns it into a struct and then when we go to cast it back
	to a reference, we cast the value not the address.
	
2005-04-26  Jim Ingham  <jingham@apple.com>

	* breakpoint.c (resolve_pending_breakpoint): Pass a choices array
	with -1, so if there are multiple hits we will choose all the
	hits.
	(re_enable_breakpoints_in_shlibs): catch errors from 
	resolve_pending_breakpoint.
	* stabsread.c (read_struct_type): If we see a redefined type,
	read the new stab in.  Otherwise we may miss some in-line
	type definitions that we might need.
	(find_name_end): gcc emits some ObjC++ symbol names with the ObjC bit
	AFTER the _ZWhatever.  find_name_end should skip over the ObjC part
	of these symbols.
	* valops.c (check_field): If "this" is not a aggregate, warn and return
	not a member of this, rather than error-ing.  Otherwise you will halt 
	searches whenever you are in a frame with bad stabs for "this".

2005-04-26  Jason Molenda  (jmolenda@apple.com)

	* printcmd.c (decode_format): Recognize "T".
	(print_formatted): Call print_ostype for "T".
	(print_scalar_formatted): Ditto.
	(do_examine): Recognize "T".
	(_initialize_printcmd): Add "T" to "help x" documentation.
	* valprint.c (print_ostype): Print out an OSType variable's contents.
	* valprint.h (print_ostype): Add prototype.
	* varobj.c (varobj_format_string): Add "unsigned" and "OSType".
	(format_code): Matching update.
	(varobj_set_display_format): Handle FORMAT_OSTYPE.
	* varobj.h (enum varobj_display_formats): Add FORMAT_OSTYPE.

2005-04-25  Jason Molenda  (jmolenda@apple.com)

	* target.c (debug_check_is_objfile_loaded): A "debug target" printer
	function.
	(setup_target_debug): Add it to the vector.

2005-04-21  Jim Ingham  <jingham@apple.com>

	* breakpoint.c (resolve_pending_breakpoint): move the 
	delete_breakpoint call into this function, it's much
	cleaner that way.
	(re_enable_breakpoints_in_shlibs): Take delete_breakpoint
	out of here.
	(do_enable_breakpoint): Ditto
	(create_breakpoints): Swap the resolved breakpoint for
	the pending breakpoint in the list (if there is only one
	resolved breakpoint.)
	
2005-04-20  Jason Molenda  (jmolenda@apple.com)

	* i386-tdep.c (i386_match_insn): New parameter, to indicate that
	we should avoid matching a prologue instruction or not.
	(i386_frame_setup_skip_insns): Add all the instructions that
	were scheduled into prologues in any dylib/framework on a gcc 3.3
	compiled system.
	(i386_analyze_frame_setup): Return the instruction following the
	last frame-setup instruction we saw.  Update call of i386_match_insn.
	(i386_find_picbase_setup): Update calls to i386_match_insn.
	(maintenance_i386_prologue_parser): Look 48 bytes into the function
	before giving up, by default.  Fix status printing statements a bit.

2005-04-18  Klee Dienes  <kdienes@apple.com>
	
	* minsyms.c (lookup_minimal_symbol): Don't crash if a minsym
	doesn't have filename set in the SOFUN_ADDRESS_MAYBE_MISSING
	code-path.

2005-04-18  Klee Dienes  <kdienes@apple.com>

	* arch-utils.c (show_endian): Add MI support.

2005-04-15  Jason Molenda  (jmolenda@apple.com)

	* i386-tdep.c (maintenance_i386_prologue_parser): Add a new maint
	command to run gdb's prologue analyzer on a selected address/function
	and report how far it got.

2005-04-14  Jason Molenda  (jmolenda@apple.com)

	* i386-tdep.c (i386_analyze_frame_setup): Don't scan into the
	following function by accident.
	(i386_frame_cache): Detect frames that cannot possibly be frameless,
	so we can make assumptions about the stack setup, regardless of our
	ability to parse the function's prologue.

2005-04-14  Jason Molenda  (jmolenda@apple.com)

	* i386-tdep.c (i386_analyze_frame_setup): Recognize the push $0x0
	as an alternative to push %ebp in a prolgoue.

2005-04-14  Jason Molenda  (jmolenda@apple.com)

	* i386-tdep.c (i386_frame_setup_skip_insns): Add instructions
	found in hand-written assembly in objc_msgForward.
	(i386_analyze_frame_setup): Allow for any of the non-prologue
	instructions to occur before push %ebp.

2005-04-09  Jason Molenda  (jmolenda@apple.com)

        * fix-and-continue.c (redirect_old_function): Write an x86
        Fix and Continue trampoline.
        (decode_fix_and_continue_trampoline): Recognize an x86 F&C trampoline.
        (update_picbase_register): CAll out to i386_find_picbase_setup() (new
        function) to find the picbase for a function, if any is used.
        (fix_and_continue_supported): F&C is now supported on x86.

        * i386-tdep.c (I386_MAX_INSN_LEN, struct i386_insn, i386_match_insn,
        i386_frame_setup_skip_insns, i386_analyze_frame_setup):  Import FSF
        gdb TOT sources for these structs/variables/functions (2005-04-07).
        I ended up modifying all of these with minor Apple Local changes.
        (i386_frame_setup_insns): New array, a list of instructions that
        are expected in a function prologue.
        (i386_find_picbase_setup): New function; skip over instructions that
        are expected in a prologue, and instructions that sometimes get
        scheduled into a prologue, looking for the CALL insn that will set up
        the PIC base for this function.
        * i386-tdep.h: Prototype for i386_find_picbase_setup.

2005-04-06  Klee Dienes  <kdienes@gdbrulez.apple.com>

        * findvar.c (extract_signed_integer_with_byte_order): Construct
        from extract_signed_integer.
        (extract_signed_integer): Update to use
        extract_signed_integer_with_byte_order.
        (extract_unsigned_integer_with_byte_order): Ditto.
        (extract_unsigned_integer): Ditto.
        (extract_long_unsigned_integer_with_byte_order): Ditto.
        (extract_long_unsigned_integer): Ditto.
        (store_signed_integer_with_byte_order): Ditto.
        (store_signed_integer): Ditto.

        * gdbtypes.h (struct main_type): Use the last two bits of the
        'type' field, for the new field 'byte_order', to store the byte
        order of the given type.
        (TYPE_BYTE_ORDER): Add accessor for 'byte_order'.

        * gdbtypes.c (alloc_type): Initialize the byte order to
        BFD_ENDIAN_UNKNOWN.

        * i386-linux-nat.c (swap_fpxregs): New function.  Byte-reverses
        the xmm register sections of a fxsave region.
        (fetch_fpxregs): Call swap_fpxregs on the xmm data.
        (store_fpxregs): Call swap_fpxregs on the xmm data.

        * i386-tdep.c (builtin_type_vec128i_big): New type, for big-endian
        128-bit vectors (used by the XMM register store).
        (init_vector_type): Taken from gdbtypes.c.
        (build_builtin_type_vec128i_big): Create the big-endian XMM
        register type.
        (i386_register_type): Return builtin_type_vec128i_big for XMM
        registers.
        (_initialize_i386_tdep): Call build_builtin_type_vec128i_big.

        * i387-tdep.c (i387_swap_fxsave): New function.  Byte-reverses the
        xmm register sections of a fxsave region.

        * i387-tdep.h (i387_swap_fxsave): Add prototype.

        * valprint.c (val_print_type_code_int): Update to use the
        _with_byte_order variants of the print/extract functions.
        (print_hex_chars_with_byte_order): Construct from print_hex_chars.
        (print_hex_chars): Update to use print_hex_chars_with_byte_order.
        (print_char_chars_with_byte_order): Ditto.
        (print_char_chars): Ditto.

        * valprint.h (print_hex_chars_with_byte_order): Add prototype.
	(print_char_chars_with_byte_order): Add prototype.

        * values.c (unpack_long): Update to use the _with_byte_order
        variants of the print/extract functions.

2005-03-31  Jim Ingham  <jingham@apple.com>

	* i386-tdep.c (i386_analyze_frame_setup): Really look for
	    mov $XXX, reg
	rather than just doing it when reg == %ecx
	
	* fork-child.c (_initialize_fork_child): Typo in the help string.
	
2005-03-30  Jim Ingham  <jingham@apple.com>

	* fix-and-continue.c (decode_fix_and_continue_trampoline): Make this 
	a no-op for anything other than PPC.

	* i386-tdep.c (i386_analyze_frame_setup): Add cmpl to the list of
	instructions we might find after the push %ebp, since the compiler
	sometimes puts it there.

	* config/i386/tm-i386-macosx.h: Remove definitions for the
	skip_trampoline functions - they are now generic macosx functions.
	
2005-03-24  Jason Molenda  (jmolenda@apple.com)

        * configure.in: Force AC_FUNC_MMAP's result to 'yes' - it
        needs to run a test case to say 'yes' so cross-host builds
        end up with mmap support turned off.
	Replaced the configdirs variable with separate invocations of
        AC_CONFIG_SUBDIRS as the new autoconf wants to have done.
	(matches FSF TOT)
        * acloal.m4, configure, */configure: Regenerated.

2005-03-18  Jim Ingham  <jingham@apple.com>

	* remote.c (init_remote_ops): Make sure that the asyn_mask_value
	is 0 for asynchronous remote target.
	* target.c (update_current_target): Inheriting data values doesn't
	work with the INHERIT method, since 0 means "doesn't provide a
	value".

2005-03-18  Jason Molenda  (jmolenda@apple.com)

	* objfiles.c (_initialize_objfiles): Don't put the 
	auto-raise-load-levels in a #if HAVE_MMAP section of code.

2005-03-11  Jason Molenda  (jmolenda@apple.com)

	* i386-tdep.c (i386_frame_cache): Revert a bit of Klee's 2005-02-23
	patch that was causing problems with source-level 'next'ing.

2005-03-11  Jason Molenda  (jmolenda@apple.com)

	* symfile.c (symfile_bfd_open): Mark symbol files as cacheable so
	we don't fill the bfd cache.

2005-03-04  Jim Ingham  <jingham@apple.com>

	* objfiles.c (objfile_name_set_load_state): New function.
	* objfiles.h: declare objfile_name_set_load_state.
	* breakpoint.c (breakpoint_re_set_one): If a shlib is specified
	for the breakpoint, raise it's load level here just to make sure
	that someone hasn't downgraded it between the time you first
	set the breakpoint and now.
	
2005-03-02  Jim Ingham  <jingham@apple.com>

	* breakpoint.c (gnu_v3_update_exception_catchpoints): If the library
	in which we are setting the exception breakpoint hasn't been loaded
	yet, set the bp_waiting_load state.
	(breakpoint_re_set_one): Also reset exception breakpoints that are 
	waiting load.
	(breakpoint_update): The check for breakpoint type is bogus, don't set
	the waiting state if you don't intend the breakpoint to be updated.
	
2005-02-24  Jim Ingham  <jingham@apple.com>

	* objfiles.c (objfile_set_load_state): Add the force parameter
	and obey it.
	(pc_set_load_state): Ditto.
	(_initialize_objfiles): Add the "set auto-raise-load-levels" flag.
	* objfiles.h: Change the declarations of objfile_set_load_state
	and pc_set_load_state.
	* breakpoint.c (parse_breakpoint_sals): Pass force parameter.
	* fix-and-continue.c (raise_objfile_load_level): Ditto.
	* infrun.c (handle_step_into_function): Ditto
	* stack.c (print_frame_info): Ditto
	
	* frame.c (frame_id_equal): Turn off the code_addr = 0 means wildcard
	behavior altogether.

	* stack.c (symbol_file_add_main_1): Obey the load rules for the
	main executable.

	* thread.c (thread_apply_all_command): Don't report the thread switch
	back to the original thread, it is just confusing spam.
	
2005-02-23  Klee Dienes  <kdienes@apple.com>

	* i386-tdep.c (i386_frame_cache): Use 0(%ebp) as the default value
	for the previous %ebp when not on the top of the stack.  Don't try
	to be too clever about deciding a function is frameless, or
	partially constructed, unless we were able to parse the prologue.
	(i386_frame_this_id): Truncate the backtrace when we reach a NULL
	%ebp for the previous frame.

2005-02-23  Klee Dienes  <kdienes@apple.com>

	* corefile.c (captured_read_memory_integer_arguments): Allow
	either a signed or unsigned result.  Add 'signedp' to determine
	which field to use.
	(do_captured_read_memory_integer): Honor the value of 'signedp'.
	(safe_read_memory_integer): Update to set signedp, and retrieve
	the signed value.
	(safe_read_memory_unsigned_integer): New function.

	* gdbcore.h (safe_read_memory_unsigned_integer): Add prototype.
	
2005-02-21  Jason Molenda  (jmolenda@apple.com)

	* fix-and-continue.c (fix_and_continue_supported): New function
	to determine if F&C is supported for the given executable or not.
	* defs.h: Prototype for above.

2005-02-18  Klee Dienes  <kdienes@apple.com>

	* symfile.c (symbol_file_add_main_1): Check the load rules when
	loading symfile_objfile as well.

2005-02-17  Jim Ingham  <jingham@apple.com>

	* breakpoint.c (insert_bp_location): Breakpoints that
	are pure address breakpoints, with no associated objfile
	should always be inserted.  We assume the user knew what
	she was doing in this case.
	(breakpoint_re_set_one): Ditto.
	(breakpoint_update): Ditto.
	
	* linespec.c (decode_line_2): Obey funfirstline for
	symbols which are in objfiles with no debug info as 
	well.
	(decode_objc): Ditto.

2005-02-10  Jim Ingham  <jingham@apple.com>

	* breakpoint.h: Add the bp_set_state enum, use it
	for the bp_set_state element of struct breakpoint.
	* breakpoint.c: First, revert the changes of 
	2005-01-21, this is a better way to do it.
	Second, everywhere bp_set_p appears, convert to
	bp_set_state, and use the enum.
	(breakpoint_re_set_one): If we fail to set the breakpoint
	all the way because it's objfile isn't loaded yet,
	don't delete it, mark it as bp_state_waiting_load.
	(breakpoint_update): If there are any bp_state_waiting_load
	breakpoints, try to set them in the objfile they were found
	in.
	
2005-02-01  Jim Ingham  <jingham@apple.com>

	* ppc-sysv-tdep.c (ppc_push_argument): Follow the 
	Mac OS X ABI and don't 8-byte align long long's.
	
	* breakpoint.c (breakpoint_re_set_all): Continue after
	deleting longjmp breakpoint.
	
2005-02-01  Jason Molenda  (jmolenda@apple.com)

        * fix-and-continue.c (check_restriction_cxx_zerolink): Correct
        error message syntax.

2005-01-31  Jim Ingham  <jingham@apple.com>

	* printcmd.c (address_info): Check for a NULL block before
	accessing it.
	
2005-01-28  Jim Ingham  <jingham@apple.com>

	* objfiles.c (objfile_set_restrict_list): New function.
	(objfile_matches_name): Return different values for an
	exact match & a basename match.
	(make_cleanup_restrict_to_objfile_list): New function.
	(make_cleanup_restrict_to_shlib): If you have multiple
	basename only matches, then look in all those matches.
	* objfiles.h: def'n of objfile_matches_name_return enum.
	
2005-01-25  Jim Ingham  <jingham@apple.com>

	* breakpoint.c (breakpoint_re_set_all): Delete the
	old longjmp breakpoints before making them again.
	FIXME: Probably should just flag whether we have done 
	this once, and not do it again.
	
2005-01-21  Jim Ingham  <jingham@apple.com>

	* breakpoint.c (set_bp_objfile): New function.
	(set_raw_breakpoint): use set_bp_objfile.
	(create_breakpoints): Ditto.
	(breakpoint_re_set_one): If we can't set the 
	breakpoint because it's objfile isn't loaded yet
	return 1 to indicate this to our callers.
	Also use set_bp_objfile.
	(breakpoint_re_set_all): Pass up the return value
	from breakpoint_re_set_one.
	(breakpoint_update): If we couldn't reset the breakpoint
	because a library hadn't loaded yet, don't reset the
	symbol & breakpoint generations, so we will retry setting
	the breakpoint again next time around.
	
2005-01-13  Jason Molenda  (jmolenda@apple.com)

	* symfile.h: Include symtab.h to pick up domain_enum decl.

2005-01-13  Jason Molenda  (jmolenda@apple.com)

	* jv-lang.c (get_dynamics_objfile): Proper # of args to 
	allocate_objfile().
	* objfiles.h: Add prototype for cached symfile version of
	allocate_objfile() so all callers are using the right prototype.
	* symfile.c: Don't include macosx/cached-symfile for allocate_objfile
	prototype.
	(TEXT_SEGMENT_NAME): Provide default for non-macosx platforms.

2005-01-12  Jason Molenda  (jmolenda@apple.com)

	* objfiles.h (struct objfile): New field, syms_only_objfile.
	* objfiles.c (allocate_objfile): Set SYMS_ONLY_OBJFILE field of
	struct objfile to 0 by default.
	* symfile.c (add_symbol_file_command): Mark objfile that we add
	via add-symbol-file as such so breakpoint insertion isn't confused.

2005-01-12  Jason Molenda  (jmolenda@apple.com)

	* fix-and-continue.c (fix_command_1): Raise the load level of
	the original dylib AFTER we tell zerolink to page it in, not
	before.

2005-01-11  Jason Molenda  (jmolenda@apple.com)

        * symfile.c (syms_from_objfile): Use the text segment name,
        not the text section name, to find the load address of the 
        file.
        (add_symbol_file_command): Ditto.
        * config/tm-macosx.h (TEXT_SEGMENT_NAME): Define.

2005-01-04  Jason Molenda  (jmolenda@apple.com)

	* breakpoint.c: Don't include macosx-nat-dyld-process.h here any
	more; we're going through the target vector as of 2004-12-22.

2005-01-04  Jason Molenda  (jmolenda@apple.com)

	* breakpoint.c (insert_bp_location): Skip objfile-loaded check if
	we're evaluating a watchpoint.  Those are considerably more complicated
	to handle correctly.
	(set_raw_breakpoint): Find the appropriate objfile for a breakpoint
	and stash that away for the is-objfile-loaded check in 
	insert_bp_location.
	* objfiles.c (objfile_purge_solibs): Revert 2004-12-21 change and 
	#if 0 out the code that clears the object_files chain when we
	mourn the inferior.

2004-12-22  Jim Ingham  <jingham@apple.com>

       * target.h: Add to_check_is_objfile_loaded to target vector.
       * target.c: INHERIT & de_fault to_check_is_objfile_loaded. 
       * breakpoint.c (insert_bp_location): Switch to using
       target_check_is_objfile_loaded.

2004-12-21  Jason Molenda  (jmolenda@apple.com)

	* objfiles.c (objfile_purge_solibs): Remove Apple Local #if 0 around the
	purgy bits of this function.

2004-12-17  Jason Molenda  (jmolenda@apple.com)

	* breakpoint.c: Conditionally include macosx-nat-dyld-process.h at the
	top of the file.
	* infcall.c: Ditto.
	* objfiles.c: Ditto.

2004-12-15  Jim Ingham  <jingham@apple.com>

	* objfiles.c (free_objfile): Move the call to
	delete_objfile_from_ordered_sections to before we close the bfd.
	We use the bfd sections in that call...

	* minsyms.c (lookup_minimal_symbol_by_pc_section_from_objfile): If
	we don't find a minsym in the correct section, return NULL rather
	than the last minsym we looked at.
	
2004-12-14  Jason Molenda  (jmolenda@apple.com)

	* fix-and-continue.c (do_final_fix_fixups_static_syms): This func does
	nothing if oldobj is null; skip out early.
	(check_restrictions_locals): Move expensive loop invariant out of
	the loop.

2004-12-13  Jim Ingham  <jingham@apple.com)

	* cli/cli-cmds.c (ambiguous_line_spec): Handle the case where
	one of the line specs has a NULL symtab.
	* source.c (ambiguous_line_spec): This copy of the function is
	never used, and is gone from the FSF tree.  Delete it from here
	so we don't waste time maintaining it...
	
2004-12-09  Jason Molenda  (jmolenda@apple.com)

	* fix-and-continue.c: Move macosx-nat-dyld-process.h inclusion to
	the right spot.

2004-12-08  Jason Molenda  (jmolenda@apple.com)

	* fix-and-continue.c (get_fixed_file): Include macosx-nat-dyld-process.h	
	to get prototype.
	* infcall.c (hand_function_call): Include macosx-nat-infthread.h to 
	get prototype.
	* objfiles.c (objfile_purge_solib): Add comment.
	(objfile_set_load_state): Include macosx-nat-dyld.h to get prototype.
	* breakpoint.c (insert_bp_location): Re-enable code to check if an
	objfile is actually resident in memory; use the NM_NEXTSTEP conditional
	to suppress the macosx/ function call when we're building host x host
	w/o the dyld interface code.

2004-12-06  Jason Molenda  (jmolenda@apple.com)

	* breakpoint.c (insert_bp_location): This won't work for host x host
	builds where we don't have any of the macosx-nat-dyld* files build. :/
	Comment it out for tonight's submission so I can find another way to do
	this somehow.

2004-12-06  Jason Molenda  (jmolenda@apple.com)

	* breakpoint.c (insert_bp_location): Check if the objfile is resident
	in memory before we insert the breakpoint.

2004-12-04  Eric Albert <ejalbert@apple.com>

	* config/i386/macosx.mh (MACOSX_FILES): Add macosx-nat.o to match
	a change from 2003-03-13. [3677049]

2004-11-30  Jason Molenda  (jmolenda@apple.com)

	* i386-tdep.h (struct gdbarch_tdep): Add a 'wordsize' field so the
	macosx-nat-dyld.c code doesn't need ppc vs x86 ifdefs.
	* i386-tdep.c (i386_gdbarch_init): Set wordsize to 4.

2004-11-30  Jason Molenda  (jmolenda@apple.com)

	* main.c (captured_main): Call source_file () instead of 
	source_command () when we have a pathname for a file to source and
	we don't want that pathname going through the argv parser and messing
	things up.
	* top.h (source_file): Prototype.
	* cli/cli-cmds.c (source_command): Move the actual sourcing over
	to source_file ().  This function now handles the argument parsing.
	(source_file): New function, which handles the sourcing.

2004-11-24  Jim Ingham  <jingham@apple.com>

        * breakpoint.c (break_command_2): Make sure the index 
	is in range before looking up the sal with it.
	(breakpoint_re_set_one): Don't use the osect if we 
	failed to find it.
	
	* ppc-sysv-tdep.c (ppc_push_argument): If we are passed
	a 8 byte value that comes from a register (value->regno != -1)
	and we are running a 32 bit app, then artificially strip
	the upper 4 bytes.
	
2004-11-23  Jim Ingham  <jingham@apple.com>

	* breakpoint.c (safe_breakpoint_sals_to_pc): New
	function.
	(wrap_breakpoint_sals_to_pc): New function.
	(break_command_2): Use safe_breakpoint_sals_to_pc.
	
2004-11-15  Jim Ingham  <jingham@apple.com>

	* defs.h: Backport the def'n of return_value enum from
	the current gdb.
	* infcmd.c (print_return_value): Ditto.
	* values.c (using_struct_return): adjust test for the
	new return values.
	* ppc-sysv-tdep.c (ppc_darwin_abi_return_value): Fetch the
	struct return from r3 so we can display the value.
	
2004-11-12  Jim Ingham  <jingham@apple.com>

	* ppc-sysv-tdep.c (ppc_copy_into_greg): New function.
	(ppc_copy_from_greg): New function.
	(ppc_push_argument): Use ppc_copy_into_greg.
	(ppc_push_arguments): ditto.
	(do_ppc_sysv_return_value): Use ppc_copy_from_greg.
	
2004-11-05  Jim Ingham  <jingham@apple.com>

	* gdbtypes.c (init_type): If we are defining a long double type
	whose length is not the standard length, then make an explicit
	floatformat for it so we won't get confused.
	* ppc-sysv-tdep.c (ppc_push_argument): Don't assume floating point
	numbers are only 4 & 8 bytes.  Also don't cast a 16 byte long double
	down to an 8 byte one.
	* (do_ppc_sysv_return_value): A 16 byte long double is passed back
	through $f1 & $f2.
	* stabsread.c (define_symbol): When we go to name a previously unnamed
	symbol, if is not the same length as the canonical long double, make 
	a floatformat for it.
	
2004-11-04  Jim Ingham  <jingham@inghji.apple.com>

	* objc-lang.c (find_implementation_from_class): Handle the mlist
	being NULL, and the CLS_NO_METHOD_ARRAY case, where the method list
	is an array of methods, rather than a pointer to the first chunk.

2004-11-02  Jason Molenda  (jmolenda@apple.com)

	* arch-utils.c: Add two small caches of the size of registers and
	the offsets of registers, to speed up the (vastly common) computation
	of these.
	(reg_cache_hack__architecture_changed_hook): Reset the caches on
	arch change.
	(generic_register_size): Set cache if not initialized; use cache if 
	initialized.
	(generic_register_byte): Ditto.
	* arch-utils.h: Prototype for reg_cache_hack__architecture_changed_hook.
	* gdbarch.c (deprecated_current_gdbarch_select_hack): Call reg cache
	hook.

2004-10-26  Jim Ingham  <jingham@apple.com>

	* breakpoint.c (print_one_breakpoint): Print the shared
	library the breakpoint was set in if we are using the MI.

	* breakpoint.c (break_command_2): Add "indices" parameter,
	and if we are using the MI and have multiple hits, use this
	to determine which of the hits we should accept.
	* (resolve_pending_breakpoint): Pass indices parameter.
	* (re_enable_breakpoints_in_shlib): Ditto
	* (create_breakpoints): Ditto
	* (gdb_breakpoint): Ditto, also add an indices parameter 
	so the MI can provide the indices.
	* gdb.h: Change declaration of gdb_breakpoints

	* infcmd.c (continue_command): If you aren't at a breakpoint,
	we weren't handling the ignore argument to continue properly
	because we didn't remember that bpstat_num returns -1 for 
	no breakpoint...

	* linespec.c (minsym_found): Add "canonical" argument.
	* (decode_variable): Pass canonical to minsym_found.
	* (minsym_found): Look for an "equivalent symbol" if this
	objfile has them.  Set the canonical name as well.
	* minsyms.c (prim_record_minimal_symbol_and_info): Build the
	table of "equivalent symbols".
	* objfiles.c (allocate_objfile): Hacky way to get us to check for
	equivalent symbols in libSystem only.  FIXME: find some target
	way to do this.
	* (free_objfile): Delete the equivalence table if needed.
	* objfile.h: Add equivalence table pointer to the objfile.
	* symfile.c (reread_symbols): Clear out the equivalence table.
	* symmisc.c (equivalence_table_initialize): New function.
	* (equivalence_table_delete): New function.
	* (equivalence_table_add): New function.
	* (find_equivalent_msymbol): New function.
	* symtab.h: Declare the public functions above.
	
2004-10-26  Jason Molenda  (jmolenda@apple.com)

	* eval.c (evaluate_subexp_standard): Look in the objc runtime
	to see if a method is defined for an object directly, instead of
	making a couple calls into the inferior to ask the objc runtime
	the same thing.  Stub out the FSF code in a vain attempt to avoid
	extraneous conflicts.
	* objc-lang.c (find_implementation): Make extern, for above.
	* objc-lang.h (find_implementation): Add prototype.
	* objc-exp.y: I don't believe this code to look up a symbol
	as a class is ever correct, so prefix it with a symbol name
	lookup first.  This means that a class name w/o debug info
	(that previously was looked up by this code) will be skipped,
	but I am doubtful this is used for anything, and the symbol
	lookup is cheap.  (and the objc runtime call we were previously
	making all over the place was expensive.)

2004-10-13  Jim Ingham  <jingham@inghji.apple.com>

	* thread.c (thread_apply_all_command): Use "safe_execute_command"
	rather than execute command so we will traverse ALL the threads
	even if there is an error in one thread.

2004-10-12  Jim Ingham  <jingham@apple.com>

	* config/tm-macosx.h: Define SOFUN_ADDRESS_MAYBE_MISSING
	since gcc 4.0 on Darwin has started always setting it to 0.
	* minsyms.c (lookup_minimal_symbol_text): #ifdef'ing out a
	copy & paste error.
	
2004-10-10  Klee Dienes  <kdienes@apple.com>

	* dbxread.c: Many reversions to FSF sources. Revert
	dbx_symfile_read to FSF sources; moved the Mach-O specific version
	to machoread.c.  Moved mmap_strtabflag to machoread.c. Move the
	TEXT_SECTION_NAME / DATA_SECTION_NAME stuff to machoread.c.  Don't
	just store the bfd from which we are reading symbols for
	fill_symbuf; store the entire objfile (so we know the symbol
	stride) (i.e., processing_objfile instead of symfile_bfd).  Revert
	the calls to stabsect_build_psymtabs to the FSF sources.  Lots of
	whitespace reversions to the FSF sources.
	* nlmread.c (nlm_symfile_read): Revert to original call to stabsect_build_psymtabs.
	* stabsread.c (define_symbol): Take 'prefix' as a const string.
	* stabsread.h (define_symbol): Ditto.

2004-10-08  Jason Molenda  (jmolenda@apple.com)

	* corefile.c (reopen_exec_file): Call 
	tell_objc_msgsend_cacher_objfile_changed notifier func.
	* symfile.c (reread_symbols, remove_symbol_file_command): Ditto.
	* objc-lang.c (find_objc_msgsend): If we've already cached the
	locations of the method call funcs and the cache is not stale,
	don't recompute them.
	(tell_objc_msgsend_cacher_objfile_changed): Invalidate the
	method call function address cache.
	* objc-lang.c: Add prototype.

2004-10-07  Jason Molenda  (jmolenda@apple.com)

	* fix-and-continue.c (fix_command_1):  Further fixes to
	output of realpath().

2004-10-06  Jason Molenda  (jmolenda@apple.com)

	* fix-and-continue.c (fix_command_1): Be more suspcicious about
	the filenames provided to F&C.  There's apparently a failure mode
	given a bad filename where gdb can crash but I forgot the exact
	details so I didn't repo.

2004-10-04  Jim Ingham  <jingham@apple.com>

	* symtab.c (search_symbols): If the symbol & the msymbol
	don't have the same address, they probably aren't the
	same symbol.
	
2004-09-29  Jim Ingham  <jingham@apple.com>

	* breakpoint.c (describe_other_breakpoints): Call 
	breakpoint_address_is_meaningful before mentioning a
	breakpoint as a duplicate.
	
2004-09-28  Jim Ingham  <jingham@apple.com>

        * infcmd.c: Make pid_info non-static.
	* inferior.h: Export it.
	
	* utils.c: remove the exec save & restore.  These HAVE to
	be done when the continuation is run, so you can't split
	the exec_error_chain across a catcher call.
	* (do_exec_cleanups): Check for the case where the
	exec_cleanup_chain is NULL, but the old_chain is not.  Don't
	crash, but just return silently.  This is probably because an
	error wiped out the exec_cleanup_chain.
	* defs.h: remove the definition of exec save & restore.
	
2004-09-27  Jim Ingham  <jingham@apple.com>

	* utils.c: remove the exec_error save & restore.  The async
	execution code relies on these getting run inside the catcher
	in complete_execution, so setting them aside won't work.
	* top.c: Ditto
	* defs.h: Ditto
	
2004-09-24  Jim Ingham  <jingham@apple.com>

	* utils.c (save_exec_cleanups, save_exec_error_cleanups,
	restore_exec_cleanups, restore_exec_error_cleanups): New functions.
	* defs.h: Declare the above.
	* top.c (catcher): Save off the exec & exec_error cleanup 
	chains, as well as the standard cleanup chain.
	(throw_exceptions): Add comment explaining that if you
	do all cleanups on any chain here, you have to preserve it in
	the catcher function.
	
2004-09-23  Jason Molenda  (jmolenda@apple.com)

	* fix-and-continue.c (fix_command): Move argument expansion
	into fix_command_1().
	(fix_command_1): New function, called from CLI and MI front ends,
	formerly fix_command_helper().
	(get_fixed_file): Raise struct objfile's symbol reading level
	after the new bundle has been loaded.
	(pre_load_and_check_file): Ditto, for the pre-loaded bundle.
	(raise_objfile_load_level): Function to raise the symbol reading
	level of a given struct objfile.
	
	* defs.h: New prototype for fix_command_1().

2004-09-23  Klee Dienes  <kdienes@apple.com>

	* i386-tdep.c (i386_analyze_frame_setup): Recognize 'mov $1, %edx'
	in function prologue (patch from Eric Albert).

2004-09-20  Jim Ingham  <jingham@apple.com>

	* stabsread.c (attach_fields_to_type): Since the type length was 
	moved out of main_type, we need to update it here for all the
	types in the type chain.
	
2004-09-16  Jim Ingham  <jingham@apple.com>

	* eval.c (eval_subexp_standard): Don't set a type for the
	objc_msgSend call.  This ends up getting used by some twisted
	logic as the type OF the method call if we can't find the debug
	info for it.  The twisted logic should be cleaned up, but this
	will do for now.
	
2004-09-15  Jason Molenda  (jmolenda@apple.com)

	* linespec.c (decode_objc): Fix number mash-up from merging of
	muon-branch code to TOT.

2004-09-15  Jim Ingham  <jingham@apple.com>

	* varobj.c (c_value_of_variable): Pass 0 for the deref_ref parameter
	of val_print.  You never want to have the dereferenced value in the 
	varobj's value, that's what the children are for.
	
2004-09-14  Jim Ingham  <jingham@apple.com>

	* language.c (make_cleanup_restore_language): New function.
	(do_set_langauge): New function.
	* language.h: declare make_cleanup_restore_language.
	* linespec.c (find_methods): Since this is a C++ specific function,
	set the language to C++ before searching for the methods.
	
2004-09-10  Jim Ingham  <jingham@apple.com>

	* infrun.c (init_execution_control_state): reset the ws->code to -1.
	(handle_inferior_event): Print the extra info from target_waitstatus
	if available.
	* target.h: Add code & address fields to the target_waitstatus.
	
2004-09-09  Jason Molenda  (jmolenda@apple.com)

	* Makefile.in (LIBXML2_CFLAGS, LIBXML2_LDFLAGS): New settings.
	* configure.in: Test for libxml2 header files/libraries/settings.
	Define LIBXML2_IS_USABLE if everything appears to be in order.
	Substitute LIBXML2_INCLUDES, LIBXML2_LIBS in Makefile.in.
	* configure: Regenerated.
	* config.in: Regenerated.

2004-09-09  Jim Ingham  <jingham@apple.com>

	* linespec.c (symtab_from_filename): The "No symbols loaded"
	error was not respecting the not_found_ptr.
	
2004-09-08  Jim Ingham  <jingham@apple.com>

	* breakpoint.c (print_one_breakpoint): Since we keep the breakpoint
	condition around to see if we can parse it once we are running,
	we need to print the not-yet parsed condition string.
	
2004-09-08  Jason Molenda  (jmolenda@apple.com)

        * cli/cli-script.c (read_next_line): Accept zero or more whitespace
        chars after 'if' or 'while' commands in user-defined commands.
	Submitted to the FSF 2004-09-08.

2004-09-07  Jim Ingham <jingham@apple.com>

	* breakpoint.c (break_command_1): Fix a bug with quoted filenames.
	* symtab.c (rbreak_command): Pass the shared library name from the
	symtab down to break_command using the -shlib argument.
	
2004-09-07  Jason Molenda  (jmolenda@apple.com)

	* c-exp.y (OBJC_SELECTOR): Add semicolon at end of grammar rule
	for compatability with some versions of bison.

2004-09-02  Jason Molenda  (jmolenda@apple.com)

	* completer.h (gdb_completer_command_word_break_characters,
	gdb_completer_quote_characters): These now have static linkage;
	don't list them in a header file.
	* cp-abi.h (switch_to_cp_abi): Ditto.
	* gdbarch.sh (target_byte_order, target_byte_order_auto): Ditto.
	* gdbarch.h: Regenerated.
	* gdbtypes.c (cplus_struct_default): Remove const qualifier because
	of the NONULL macros in gdbtypes.h
	* gdbtypes.h (cplus_struct_default): Ditto.
	* stabsread.h (add_undefined_type): Function no longer has extern 
	linkage.
	* target.h (cleanup_target): Ditto.

2004-08-31  Jason Molenda  (jmolenda@apple.com)

	* breakpoint.c (parse_breakpoint_sals): OK, this change
	should be correct now.
	(break_command_2): Don't output the error message buffer when we're 
	doing a pending breakpoint and a shlib was specified.

2004-08-30  Jason Molenda  (jmolenda@apple.com)

	* breakpoint.c (parse_breakpoint_sals): Back out previous
	change; it just moves the error over to linespec.c.

2004-08-30  Jason Molenda  (jmolenda@apple.com)

	* breakpoint.c (parse_breakpoint_sals): Don't issue error msg
	about solib not found if we're setting a pending (aka future)
	breakpoint.

2004-08-26  Jason Molenda  (jmolenda@apple.com)

        * dbxread.c (objfile_contains_objc): Simplfy ObjC check.

2004-08-26  Jim Ingham  <jingham@apple.com>

	* dbxread.c: Switch the default for mmap-string-tables
	to on.
	
2004-08-25  Jason Molenda  (jmolenda@apple.com)

	* dbxread.c (read_dbx_symtab): Pass in the # of nlist stab
	records instead of getting it from the objfile.  
	(dbx_symfile_read): Set the offset/number of stab symbol
	table entries depending on whether this is a load-rules
	extern/container or not.  
	(dbx_symfile_init): Duplicate initialization of
	DBX_LOCAL_STAB_* and DBX_NONLOCAL_STAB_* just like
	in (stabsect_build_psymtabs).
	(coffstab_build_psymtabs): For safe keeping, initialize
	the DBX_LOCAL_STAB_* and DBX_NONLOCAL_STAB_* structure
	members to 0.
	(elfstab_build_psymtabs): Ditto.
	(objfile_contains_objc): New function, to check for telltale
	BFD sections that indicate we're working with an ObjC objfile.
	* objfiles.h: Add an Apple Local marker.

2004-08-24  Jason Molenda  (jmolenda@apple.com)

	* dbxread.c (stabsect_build_psymtabs):  Look for
	the local_stab_name and nonlocal_stab_name BFD sections
	and record the #'s from those sections in the objfile if
	they're present, else record 0's.
	* gdb-stabs.h (struct dbx_symfile_info): New fields
	to record local/non-local nlist stab records if that 
	information is available to us.
	(DBX_LOCAL_STAB_OFFSET, DBX_LOCAL_STAB_COUNT, DBX_NONLOCAL_STAB_OFFSET,
	DBX_NONLOCAL_STAB_COUNT): Accessor macros.
	* minsyms.c: Two small typeos in comments.
	* nlmread.c (nlm_symfile_read): Update call to stabsect_build_psymtabs
	to provided NULL values for new arguments.
	* stabsread.h (stabsect_build_psymtabs): Update prototype to list
	new arguments.

2004-08-24  Jason Molenda  (jmolenda@apple.com)

	* eval.c (evaluate_subexp): Make prototype and func defn match.
	* configure.in: Define USE_MMALLOC to 1.
	* configure: Regenerate.

2004-08-26  Jim Ingham <jingham@apple.com>

	* Makefile.in: igore errors if _objcInit isn't in gdb when we go
	to run strip.  It was removed late in Tiger.

	* dbxread.c (stabsect_read_psymtabs): Use
	bfd_get_section_contents_in_window_with_mode so we can pass the
	read-only flag.

	*infrun.c (handle_step_into_function): Try to up the debug level
	to OBJF_SYM_ALL before testing for presence of source line info.

2004-08-10  Jim Ingham  <jingham@apple.com>

	* breakpoint.c (parse_breakpoint_sals): If requested_shlib is set
	then ensure the symbol load level is all before setting the
	breakpoint.
	* dbxread.c (read_dbx_symtab): Immediately skip over stabs if we
	aren't reading them in.  Also added a comment.
	* objfiles.c (objfile_set_load_state): New function.
	(pc_set_load_state): New function.
	* objfiles.h: declare these.
	* stack.c: Make sure any objfiles on the stack are fully loaded.
	
2004-08-09  Jim Ingham  <jingham@apple.com>

	* cp-namespace.c ((cp_lookup_transparent_type_loop): Fix recursion
	bug.  Applying patch from D. Carlton on 2004-03-05.
	
2004-08-09  Jason Molenda  (jmolenda@apple.com)

        * dbxread.c (read_so_stab_language_hint): New function.
        (read_dbx_symtab): Prefer language from SO stab's desc field
        over language based on the suffix of the source filename.
        (start_psymtab): Only use the source filename suffix if the
        language hasn't been already set.
        (process_one_symbol): When expanding psymtab to symtab, use the
        desc field to set the language if it contains anything meaningful.

2004-08-09  Klee Dienes  <kdienes@apple.com>

	* gdb/gdb.1: Replace the hard-coded pathname with
	GDB_DOCUMENTATION_DIRECTORY (see change to the top-level
	Makefile).

2004-07-30  Klee Dienes  <kdienes@apple.com>

	* exec.c (exec_file_attach): Remove extraneous check for 'osabi <= 0'.
	* symfile.c (symfile_bfd_open): Deduce the osabi if not
	already set, using the same logic as exec_file_attach.  Don't
	error out if a member of an archive isn't an executable; just
	continue scanning.

2004-07-29  Klee Dienes  <kdienes@apple.com>

	* dbxread.c (stabsect_build_psymtabs): Warn, not error, if there
	is no data section.

2004-07-28  Klee Dienes  <kdienes@apple.com>

        * corefile.c (core_file_command): Split into core_file_attach.
        * gdbcore.h (core_file_attach): Add prototype.
        * main.c (quote_string): Remove (it was unused).
        Call core_file_attach in place instead of core_file_command.

2004-07-21  Klee Dienes  <kdienes@apple.com>

	* exec.c (exec_file_attach): Use the osabi code to select the
	correct version of the archive file.
	* symfile.c (symfile_bfd_open): Ditto.
	(reread_symbols): Ditto.

2004-07-21  Klee Dienes  <kdienes@apple.com>

	* top.c (_initialize_symread): Remove.

2004-07-21  Klee Dienes  <kdienes@apple.com>

	* valops.c (value_ind): Use value_as_address, not
	value_as_long, to get the value of the address when implicitly
	using an int as a pointer in a c-style deference.

2004-07-21  Jim Ingham  <jingham@apple.com>

	* interps.c (set_interpreter_cmd): "set interpreter"
	to the current interpreter should be a no-op.
	
	* symfile.c (add_symbol_file_command): If we got no
	offset addresses, pass a NULL section_addrs rather
	than a section_addrs with 0 num_sections.  The former
	is what the code below us is expecting.
	
2004-07-16  Jason Molenda  (jmolenda@apple.com)

	* gdb.1: Update path to full gdb documentation.

2004-07-13  Jim Ingham  <jingham@apple.com>

	* linespec.c (decode_variable): Treat the case were no
	symbols are found as a "file not found" error.  This will
	allow future break to work in a ~/.gdbinit file.
	
2004-06-18  Jim Ingham  <jingham@apple.com>

	* dummy-frame.c: Add the frame's ptid to the dummy
	frame.
	(find_dummy_frame): Match the ptid as well.
	(pc_in_dummy_frame): Ditto.
	(generic_push_dummy_frame): Ditto, also record the
	ptid for the new frame.
	(discard_innermost_dummy): Only discard the innermost
	frame for the current ptid.
	(generic_pop_dummy_frame): Pass in the current ptid.
	
2004-06-17  Jason Molenda  (jmolenda@apple.com)

	* config/powerpc/macosx.mt: Don't ref ppc-macosx-frameops.c.

2004-06-17  Jason Molenda  (jmolenda@apple.com)

	* dbxread.c (set_namestring): Add objfile prefix regardless of
	whether symbol starts with the expected prefix or not.

2004-06-15  Jim Ingham  <jingham@apple.com>

	* infrun.c (handle_inferior_event): Adopt Daniel
	Jacobowitz's patch of 2004-03-09, remove special
	case code for signals to another thread.
	
2004-06-08  Jim Ingham  <jingham@apple.com>

        * objfiles.c (objfile_matches_name): A better way to
        handle caches symfiles is to use the bfd name if there
        is a cached symfile.
	
2004-05-28  Jim Ingham  <jingham@apple.com>

	* (breakpoint.c): break_command_2: If the interpreter is mi, then
	just return all the matches, don't set them.
	* linespec.c (decode_line_2): Add another parameter - the
	number of symbol-full matches.  Then print the matches from
	non-debugging symbols more helpfully.
	(decode_objc): Pass in the new argument to decode_line_2.
	(find_method): Ditto.
	
2004-05-27  Klee Dienes  <kdienes@apple.com>

	* frame.c (deprecated_frame_next_hack): New function.
	(deprecated_frame_cache_hack): New function.
	(default_print_extra_frame_info): New function.
	* frame.h (deprecated_frame_next_hack): Add prototype.
	(deprecated_frame_cache_hack): Add prototype.
	(default_print_extra_frame_info): Add prototype.
	* gdbarch.c: Re-generate.	
	* gdbarch.h: Re-generate.	
	* gdbarch.sh (DEPRECATED_PRINT_EXTRA_FRAME_INFO): New method.
	* stack.c (frame_info): Restore call to PRINT_EXTRA_FRAME_INFO.
	
2004-05-26  Jason Molenda  (jmolenda@apple.com)

	* completer.c (gdb_completer_command_word_break_characters):
	Add APPLE LOCAL comment about the change here.
	* language.c (default_word_break_characters): Update this
	copy of the gdb_completer_command_word_break_characters
	strings so that it matches the completer.c version; add
	APPLE LOCAL marker.

2004-05-26  Jim Ingham  <jingham@apple.com>

	* objc-lang.c: Add _objc_msgSend_rtp to objc_methcall array.
	(find_objc_msgsend): If the symbol is the last symbol in the
	objfile, get its end address from the end address of
	the section containing the symbol.
	
2004-05-21  Jim Ingham  <jingham@apple.com>

        * objfiles.c (objfile_matches_name): Consider the names a
        match if the objfile has a ".syms" on the end.

2004-05-21  Jason Molenda  (jmolenda@apple.com)

	* dwarf2read.c: Change DWARF segment names APPLE LOCAL
	modification to look for segment name gcc'll be emitting
	as of this weekend.

2004-05-21  Jason Molenda  (jmolenda@apple.com)

	* infcmd.c (print_return_value): Correct error string printing
	to include the type in question when struct/unions are used.
	* typeprint.c (type_sprint): Make comment a bit more explicit;
	note APPLE LOCALness.

2004-05-19  Klee Dienes  <kdienes@apple.com>  

	* Makefile.in: Re-arrange order of library inclusion, to deal
	with monolithing libSystem.dylib on Tiger (cribbed from Jim's patch
	for an earlier Tiger submission).

2004-05-18  Stan Shebs  <shebs@apple.com>

       * dwarf2read.c (dwarf_info_vma, dwarf_abbrev_vma, dwarf_line_vma,
       dwarf_str_vma): New globals.
       (INFO_SECTION, ABBREV_SECTION, etc): Set to names reported by BFD.
       (dwarf2_locate_sections): Set dwarf_info_vma and friends from bfd
       vmas.
       (read_comp_unit_head): Adjust abbrev offset by vma, comment out
       nonstandard extension.
       (read_file_scope): Adjust offsets by vma.

2004-05-15  Jim Ingham  <jingham@apple.com>

	* varobj.c (varobj_create): Handle static & global varobj's which
	have no set frame.
	* varobj.h: Add NO_FRAME_NEEDED to the varobj_type.

2004-05-14  Jim Ingham  <jingham@apple.com>

	These changes are just a scrub of uses of language_cplus to
	see places where we should also be accepting language_objcplus.
	
	* objc-lang.c (objcplus_demangle): New function.
	Use this for the language demangle for ObjC++.  It tries the
	ObjC demangler, and if that fails, tries the C++ one.
	* symtab.c (symbol_find_demangled_name): ObjC++ names can be
	mangled too...
	(symbol_natural_name): Ditto.
	* buildsym.c (add_symbol_to_list): ObjC++ has namespaces...
	(finish_block): ObjC++ has same scoping rules as C++
	(start_subfile): Don't demote ObjC++ to C for subfiles.
	* c-exp.y: ObjC++ & C++ share template true, false & other keywords.
	(c-typeprint.c): ObjC++ uses void, etc, like C++ does.
	* objc-exp.y: Ditto.
	* dbxread.c (read_dbx_symtab): Don't demote ObjC++ to C.
	* eval.c (evaluate_subexp_standard): Do overload resolution
	in ObjC++ as well as C++.
	* language.c (lang_bool_type): ObjC++ has the bool type like 
	C++ does.
	* stack.c (print_frame_info): ObjC++ names can be C++ mangled names.
	(frame_info): Ditto
	(get_frame_language): Update a comment.
	* symfile.c (symbol_find_demangled_name): This should work with
	ObjC++ as well.
	
2004-05-14  Jason Molenda  (jmolenda@apple.com)

	* target.c (update_current_target): Remove some unnecessary
	deltas from the FSF version.  Add APPLE LOCAL comment around
	remaining diff.
	(push_target): Don't call setup_target_debug() here; document
	why.

2004-05-13  Jason Molenda  (jmolenda@apple.com)

	* frame.c (get_prev_frame): Revert the two-identical-frames
	back to a warning from an error.  It's rarely an unrecoverable
	error so it's better to try than to give up.

2004-05-13  Jason Molenda  (jmolenda@apple.com)

	* objfiles.c (use_mapped_symbol_files): Set default value
	to 0 -- don't try to use cached symfiles until Klee has a
	chance to make it work again with newly merged sources.

2004-05-12  Jim Ingham  <jingham@apple.com>

        * gdbtypes.c (make_cv_type): We may be resolving an opaque
	type as well as a stub type.  So include that in the assert 
	when we are copying over a type from one objfile to another.
	
	* frame.c (refine_prologue_limit): Don't reset prev_line
	to the prologue value every time round the loop!
	
2004-05-11  Jim Ingham  <jingham@apple.com>

	* breakpoint.c (breakpoint_re_set_all): Don't need to call
	re_enable_breakpoints_in_shlibs.  We will already know to
	reset them from tell_breakpoints_objfile_changed, so this is
	not necessary, and as long as PC_SOLIB doesn't work this will
	end up disabling ALL breakpoints.
	
2004-05-10  Jim Ingham  <jingham@apple.com>

	* breakpoint.c (disable_breakpoints_in_shlibs): Comment out the
	test for PC_SOLIB till it works on Mac OS X.
	(re_enable_breakpoints_in_shlibs): Ditto.

	* dbxread.c (record_minimal_symbol): Look both in the straight
	text section and the coalesced text section when assigning a
	symbol to a section.
	(dbx_symfile_init): Look up the coalesced text section as well
	as the straight text section.
	(stabsect_build_psymtabs): Add a coalesced text section name.
	* gdb-stabs.h: Change declaration of stabsect_build_psymtabs.
	Also add coalesced text addresses to the stabs_symfile_info.
	* nlmread.c (nlm_symfile_read): Mutatis mutandi for above.
	* config/tm-macosx.h: Add COALESCED_TEXT_SECTION_NAME.
	
2004-05-06  Klee Dienes <kdienes@apple.com>

	* ppc-sysv-tdep.c (ppc_darwin_abi_return_value): New function.
	(ppc64_darwin_abi_push_dummy_call): New function (currently
	stubbed out, final code to go in later).
	(ppc64_darwin_abi_return value): New function (currently
	stubbed out, final code to go in later).
	* ppc-tdep.h (ppc64_darwin_abi_push_dummy_call): Add prototype.
	(ppc64_darwin_abi_return_value): Add prototype.
	(ppc_darwin_abi_return_value): Add prototype.

2004-05-06  Jim Ingham  <jingham@apple.com>

	* dbxread.c (read_dbx_symtab): Strip the leading character
	right when we read in the symtab.
	* minsyms.c (lookup_minimal_symbol): The change above meant
	we successfully demangle minsyms when we read in the symtab,
	so we don't need to do it here.
	(objfile_demangle_msymbols): No longer needed.
	(install_minimal_symbols): Don't strip the leading character
	here, since we already did it in dbxread.c.
	* objfiles.h: delete objfile_demangle_msymbols.
	* symtab.c (search_symbols) Don't need objfile_demangle_msymbols.
	
	* maint.c (maintenance_demangle): Revert to the older behavior
	rather than call language_demangle.  It is stupid that you have
	to be currently in a C++ file for maint demangle to work.

2004-05-05  Jason Molenda  (jmolenda@apple.com)

	* stabsread.c: Revert Apple Local changes to support very
	large non-negative enum values.  We don't have any occurences
	of this in our libraries any longer and the contemporary gcc 
	makes it hard to write them.

2004-05-05  Jason Molenda  (jmolenda@apple.com)

        * inflow.c (kill_command): Don't query for confirmation if
        we're MIish.

2004-04-29  Jason Molenda  (jmolenda@apple.com)

	* symtab.c (rbreak_command): Correct the canonicalization of
	strings so decode_line_1 can spot the ObjC method calls correctly.

2004-04-29  Jim Ingham  <jingham@apple.com>

	* objfiles.c (number_of_dots): New function
	(objfiles_add_to_ordered_sections): Don't add the bfd sections
	that correspond to the Mach-O segments to the ordered sections
	array.
	(objfile_delete_from_ordered_sections): Don't try to remove them
	either.
	
2004-04-28  Jason Molenda  (jmolenda@apple.com)

	* ppc-tdep.h: Add prototype for rs6000_fetch_pointer_argument.
	* rs6000-tdep.c (rs6000_fetch_pointer_argument): Change to non-static
	so ppc-macosx-tdep.c can get at it.

2004-04-28  Jason Molenda  (jmolenda@apple.com)

	* blockframe.c (inside_main_func): Don't restrict search for main()
	to just the main symbol file - not valid if ZeroLink'ed.
	Short-circuit symbol lookups; new sources will search for main()
	two times for each frame in a backtrace.

2004-04-28  Jim Ingham  <jingham@apple.com>

	* breakpoint.c: Refactor break_command_1 so that we
	could use it in gdb_breakpoints.  Refactor condition_command
	for the same reason.  Also get create_breakpoints to keep
	track of the breakpoints that it makes and pass them back
	to the caller.

	* tui/tui-interp.c (_initialize_tui_interp): Don't force
	the tui interp in place of the console interp.  The tui
	interp is not as well tested, and should not be the default!
	
2004-04-27  Jason Molenda  (jmolenda@apple.com)

	* objfiles.c (sanity_check_symtab_obsoleted_flag): Use the
	ALL_SYMTABS_INCL_OBSOLETED iterating macro so we don't
	re-call this sanity_check function.
	(sanity_check_psymtab_obsoleted_flag): Ditto.
	(symtab_get_first, symtab_get_next): Only do the sanity
	checks on 'obsolete' boolean if we're skipping obsolete
	symtabs.
	(psymtab_get_first, psymtab_get_next): Ditto.
	* symfile.h (ALL_PSYMTABS_INCL_OBSOLETED): Add macro.

2004-04-22  Jim Ingham  <jingham@apple.com>

	This is more merge of our breakpoint changes to the
	FSF TOT.  This adopts the gnu_v3 exception catching
	to Mac OS X, adds "break -shlib" and the code to be 
	more discriminating about when we reset breakpoints
	in shared libraries.

	* breakpoint.c: Too many to list separately...
	* breakpoint.h: Add bp_gnu_v3_catch_catch and
	bp_gnu_b3_catch_throw breakpoint types.
	* inftarg.c: Change def'n of enable_exception_callback
	target vector back to the FSF version.
	* stack.c (catch_info): Ditto.
	* target.c: Ditto.
	* mi/mi-cmd-break.c (mi_cmd_break_catch): Ditto.
	
	* linespec.c (decode_all_digits): Renamed 
	make_cleanup_temporarily_restrict_to_objfile.
	(minsym_found): Pass the section to find_pc_sect_line
	if we have it.
	* objfiles.c (make_cleanup_temporarily_restrict_to_objfile):
	renamed.
	(objfile_matches_name): New function.

	* symtab.c (find_pc_sect_psymtab): If you are given a 
	non-null section, don't look in objfiles that are not
	in the bfd for that section.
	(find_pc_sect_symtab): Ditto.

2004-04-19  Klee Dienes  <kdienes@apple.com>

	* symfile.c (symfile_bfd_open): Use current_gdbarch to determine
	which subfile to load from a fat binary (instead of using
	#ifdefs).

2004-04-15  Jim Ingham  <jingham@apple.com>

	* breakpoint.c: More pending breakpoint notification
	changes.  Decided to make a separate resolve notify
	event rather than routing it through mention.
	* gdb-events.sh: Ditto.

2004-04-15  Jason Molenda  (jmolenda@apple.com)

	* infrun.c: Add APPLE LOCAL markers around our changes.
	A few minor reorgs to make future merges easier.
	Removal of some old FSF code that slipped in.
	(process_event_stop_test): Reinstate local mod to use value
	of SOLIB_ADD.

2004-04-14  Jim Ingham  <jingham@apple.com>

	This is the first set of changes merging our changes to
	breakpoint.c from the muon branch to TOT.
	* breakpoint.c: Too many to list individually...
	* breakpoint.h: ditto
	* gdb-events.sh: Need to pass the parent pending breakpoint
	into the notify events, so we can tell clients that the
	new breakpoints are related to it.
	* gdb-events.c: regenerate
	* gdb-events.h: regenerate
	
	* symfile.c (reread_symbols): Restore a local mod that
	bypasses the file pointer cached in the objfile's bfd
	and goes to the actual file on disk when we want the
	mtime of the file. 
	
2004-04-13  Jason Molenda  (jmolenda@apple.com)

	* infrun.c (follow_fork): Remove unused variable.
	(handle_step_into_function): Remove some Apple local code that
	is no longer necessary (and causes a few problems as-is).

	* fix-and-continue.c (struct active_func): Instead of keeping a
	copy of the frame, let's just save the information we need and print
	it ourselves.
	(free_active_threads_struct): Free new struct active_func fields.
	(create_current_active_funcs_list): Initialize new struct active_func
	fields.
	(print_active_functions): Print new struct active_func fields.

2004-04-09  Jason Molenda  (jmolenda@apple.com)

	* top.c (_initialize_fix): Remove stubbed out routine.
	* symtab.c (lookup_block_symbol): Remove obsolete checks from lookup.
	* fix-and-continue.c: First set of changes to work in the post-merge
	world.  Still a bunch of failures to fix.

2004-04-09  Jason Molenda  (jmolenda@apple.com)

	* minsyms.c (lookup_minimal_symbol_by_pc_section_from): Move pc_section
	variable from here...
	(lookup_minimal_symbol_by_pc_section): To here.

2004-04-09  Klee Dienes  <kdienes@apple.com>

	* minsyms.c (lookup_minimal_symbol_by_pc): Don't use
	find_pc_section; trust lookup_minimal_symbol_by_pc_section to do
	the right thing.
	(lookup_minimal_symbol_by_pc_section_from_objfile): Remove the
	find_pc_section check for symbols after the last section.
	(lookup_minimal_symbol_by_pc_section): Add the check here.
	
2004-04-09  Klee Dienes  <kdienes@apple.com>

	* frame.c (frame_unwind_address_in_block): Don't subtract 1 from a
	0 address.
	(frame_id_eq): Don't treat a 0 code-address as a wild-card.

2004-04-06  Jason Molenda  (jmolenda@apple.com)

	* gdb.1: Update pointer to Apple local documentation.

2004-03-30  Klee Dienes  <kdienes@apple.com>

	* symfile.c (add_symbol_file_command): Update help text.
	
2004-03-29  Jim Ingham  <jingham@apple.com>

	* varobj.c (varobj_pc_in_valid_block_p): Don't go through
	a frame-id to an address to get the frame, just call frame_from_id.
	
2004-03-29  Klee Dienes  <kdienes@apple.com>

	* breakpoint.c (watchpoint_equal): Re-add.
	(watchpoint_check): Re-add call to watchpoint_equal.

2004-03-29  Klee Dienes  <kdienes@apple.com>

	* symfile.c (add_symbol_file_command): Add syntax for specifying
	text address without a -s option.  Update usage string.  Fix crash
	when passing section offsets.

2004-03-29  Jason Molenda  (jmolenda@apple.com)

	* cli/cli-setshow.c (do_setshow_command): Update error message
	to match current FSF error message.

2004-03-26  Jason Molenda  (jmolenda@apple.com)

	* breakpoint.c (future_break_command, 
          restore_saved_pending_break_support): Re-add future-break command,
	using the new pending_break_support that came with the merge.
	(_initialize_breakpoint): Register it.

2004-03-26  Jason Molenda  (jmolenda@apple.com)

	* buildsym.c (end_symtab): Move symtab obsolete flag setting from
	here...
	* symfile.c (allocate_symtab): ...to here.  So we don't miss any
	possible symtab allocations.

2004-03-26  Klee Dienes  <kdienes@apple.com>

	* infcall.c (hand_function_call): Don't stomp value_type by
	calling find_function_addr() twice.

2004-03-26  Jim Ingham (jingham@apple.com)

	* breakpoint.c (print_it_typical): Add back in the printing
	of the "commands" field for breakpoint hits.
	
2004-03-25  Jason Molenda  (jmolenda@apple.com)

	* configure: Regenerated with updated ../gettext.m4.
	* defs.h: Don't include "tui.h".
	* main.c: Use ifdef, not if, for USE_MMALLOC.
	* macosx/macosx-nat-dyld.c: Ditto.

2004-03-01  Jim Ingham   <jingham@apple.com>

	* linespec.c (decode_all_digits): Pass in funfirstline, and
	move past the prologue if it is set.
	
2004-03-01  Klee Dienes  <kdienes@apple.com>

	* ppc-sysv-tdep.c: Move the calls to set $sp and $lr, and call
	target_store_registers, into the *_push_dummy_call functions
	themselves.
	* ppc-tdep.h: Add prototype for ppc_darwin_abi_push_dummy_call.


2004-02-27  Jim Ingham  <jingham@apple.com>

        * printcmd.c (print_address_symbolic): If the target
	address size is greater than the size of a CORE_ADDR,
	undo the sign extension that might have occured when 
	we read in the address.
	
	These changes are needed to implement the mi command
	-break-commands.
	
	* breakpoint.c (find_breakpoint): New function.
	(breakpoint_add_commands): New function.
	(breakpoint_print_commands): New function.
	(commands_command): refactor to use breakpoint_add_commands.
	* breakpoint.h: Added new functions.
	* defs.h: added read_command_lines_1.
	* cli/cli-script.c: get_command_line: Pass the CLI read_next_line
	into recurse_read_control_structure.
	(read_next_line) Now return char * & just read, don't process.
	(process_next_line): New function, separates reading & processing.
	(recurse_read_control_structure): take a function pointer to the
	read function.
	(read_command_lines): Use read_command_lines_1 and the CLI
	read_next_line function.
	(read_command_lines_1): New function.
	
2004-02-03  Jim Ingham  <jingham@apple.com>

        * objc-lang.c (find_methods): If matching an objc function
	name, make sure the whole name matches, not just the part that
	parse_method recognizes.

	* objc-lang.c (print_object_command): Check that it is safe
	to call functions on this thread before running the printForDebugger.
	(_initialize_objc_lang): Add the set variable to turn off the
	behavior above.
	target.c (update_target, cleanup_current_target): Handle new
	check_call_safe entry.
	target.h: Add check_call_safe entry.
	
	* dbxread.c (process_one_symbol): Add a hack to work around the
	fact that gcc3 doesn't emit LBRAC/RBRAC stabs for functions with
	no locals at the function scope.

2004-01-30  Jim Ingham  <jingham@apple.com>

	* objc-lang.c (find_implementation_from_class): The end of method
	list marker in the ObjC runtime is EITHER a 0 method, or a -1
	method pointer.
	(value_objc_target_type): pass in the block so we don't accidentally
	find another struct with the same name as our class.
	* objc-lang.h: mutatis mutandi for value_objc_target_type.
	* varobj.c (varobj_fixup_value): Pass the block down so we can
	get it to value_objc_target_type.
	(variable_language): Use C++ for the language for objects made in
	ObjC++ files.
	(value_of_child): pass block to varobj_fixup_value.
	(c_value_of_root): ditto.
	* wrapper.c (safe_value_objc_target_type): pass down the block again.
	* wrapper.h: mutatis mutandi for safe_value_objc_target_type.
	
2003-12-03  Jim Ingham  <jingham@apple.com>

	* stack.c (get_frame_language): Make sure the function sym is
	not null before getting its language.

2003-11-20  Jim Ingham  <jingham@apple.com>

	* breakpoint.c (re_enable_breakpoints_in_shlib): Add a call
	to check_duplicates.  You should always do this whenever you
	enable a breakpoint!

2003-11-14  Klee Dienes  <kdienes@apple.com>

	* target.c (push_target): Move the cleanup_target and target
	debugging code from here ...
	(update_current_target): ... to here.
	(unpush_target): Remove call to cleanup_target ().
	* symfile.c (add_symbol_file_command): Update the section tables, and any breakpoints.

2003-11-14  Jim Ingham  <jingham@apple.com>

	* eval.c (evaluate_subexp_with_coercion): Add in a missing
	check_typedef (present in the FSF version).
	* varobj.c (create_child): Same mistake repeated here.

2003-11-13  Jim Ingham  <jingham@apple.com>

	* varobj.c (c_value_of_variable): Use the accessor function to
	get the number of children of an array variable.  If you just
	use the structure member, the value may not have been set yet.

2003-11-12  Jim Ingham  <jingham@apple.com>

	* breakpoint.c (breakpoint_re_set_one): When we successfully reset
	a breakpoint, reset the bp_objfile.

	* varobj.c (varobj_create): If we can't get either the value OR the
	type from the parsed expression, discard it.  We will then reparse it
	later and maybe we will be in the right scope to do it correctly.
	* (varobj_type_is_equal_p): Don't return true if both inputs are NULL.
	* (value_of_root): Don't try to get the value if the type is NULL, even
	if the expression is not, as this is unlikely to work.

2003-11-03  Jim Ingham  <jingham@apple.com>

	* cli/cli-setshow.c (do_setshow_command): Replace fprintf_unfiltered
	with fputs_unfiltered to avoid compiler warnings.

2003-10-31  Jason Molenda  (jmolenda@apple.com)

	* fix-and-continue.c (load_fixed_objfile): Don't pass 
	NSLINKMODULE_OPTION_BINDNOW to NSLinkModule() if the inferior
	is a ZeroLinked app.

2003-10-30  Jim Ingham  <jingham@apple.com>

	* stack.c (return_command): Add a call to the stack_changed
	hook at the end of the command.

2003-10-28  Jim Ingham  <jingham@apple.com>

	* breakpoint.c (bpstat_stop_status): Wrap the call to parse_exp_1 in a
	catch_errors.  If the expression parse raises an error for some reason,
	then we will blow past the code which reinserts the instruction under
	the breakpoint, which is not good.
	(condition_command): Wrap the call to parse_exp_1.  For now, we handle
	errors in parsing the expression in the same way (leaving the condition
	in place in the hopes that when you hit the breakpoint it will be 
	successfully parsed.  But this will allow us to be more discriminating
	if we want to.
	(set_raw_breakpoint): Initialize the breakpoint's objfile field.
	(create_breakpoints): Set the breakpoint's objfile when the breakpoint
	is set.
	(tell_breakpoints_objfile_changed): Only unset a set breakpoint if it 
	was set IN the objfile that has changed.
	* breakpoint.h: Add bp_objfile to the breakpoint structure.
	
	* objc-lang.c (find_imps): coding convention cleanup.

	* cli/cli-setshow.c (do_setshow_command):  Give the valid options for
	all error messages for enum type commands.

2003-10-22  Jason Molenda  (jmolenda@apple.com)

	* infcmd.c (pid_info): New function, to return the process id
	of the inferior.
	(_initialize_infcmd): Register "info pid" command.

2003-10-21  Jason Molenda  (jmolenda@apple.com)

	* fix-and-continue.c (struct fixedobj): Drop symtab and objfile
	pointers; in some circumstances objfiles can be copied around and
	freed so these pointers are not guaranteed to persist.
	(build_list_of_current_objfiles, find_newly_added_objfile): Use the
	names of objfiles from now on, so finding the struct objfile just
	added is not necessary.
	(find_symtab_by_name): A new convenience function.
	(mark_previous_fixes_obsolete): Find fixed file's objfile pointer
	when needed.  A not mark globals as obsolete; this should be done
	by redirect_statics().  I missed a spot in the Sept 25 change.
	(get_fixed_file): Updated for new struct fixedobj layout.
	(do_final_fix_fixups): Updated to get objfile ptr when needed.
	(find_orig_static_symbols): Ditto.
	(find_and_parse_nonlazy_ptr_sect): Ditto.
	(build_list_of_objfiles_to_update): Ditto.
	(force_psymtab_expansion): Use PSYMTAB_TO_SYMTAB macro.
	(expand_all_objfile_psymtabs): Ditto.
	(find_original_object_file_name): Ditto.

2003-10-18  Jim Ingham  <jingham@apple.com>

	* frame.c (refine_prologue_limit): Don't advance the prologue sal unless
	we actually cross a boundary between two different source lines.
	
2003-10-17  Jim Ingham  <jingham@apple.com>

	* breakpoint.c (set_raw_breakpoint): Initialize requested_shlib field.
	* (create_breakpoints): Set requested_shlib field.
	* (make_cleanup_restrict_search_to_shlib): New function.
	* (parse_breakpoint_sals): If requested_shlib is set, then restrict
	the search to that objfile.
	* (break_command_1): Pass requested_shlib to do_captured_breakpoint.
	* (do_captured_breakpoint): Accept & use requested_shlib.
	* If the interpreter is mi-like and we get multiple breakpoint choices,
	then just report all the hits but don't set any breakpoints.
	* (gdb_breakpoint): Handle the requested_shlib.
	* (delete_breakpoint): Free the requested_shlib string.
	* (breakpoint_re_set_one): Restrict search to the requested_shlib if
	it has been set for the breakpoint.
	* breakpoint.h: Add requested_shlib to struct breakpoint.
	* gdb.h: Add requested_shlib to gdb_breakpoint declaration.
	* linespec.c (decode_objc): If ui is mi-like tell select_symbols to 
	select all hits.
	* (select_symbols): Listen to the "all" parameter, and don't query the 
	user.
	* objfiles.c: (objfile_restrict_search): return old restrict value.
	* (do_cleanup_temporarily_restrict_objfile): New function.
	* (make_cleanup_temporarily_restrict_to_objfile): New function.
	* objfiles.h: export make_cleanup_temporarily_restrict_to_objfile.

	* breakpoint.c (save_breakpoints_command): Handle save files with spaces
	in the path.
	* cli/cli-cmds.c (cd_command): Handle paths with spaces.
	* (source_command): Ditto.
	
2003-10-16  Jason Molenda  (jmolenda@apple.com)

	* linespec.c (select_symbols_args): Correct 'canceled' spelling.

2003-10-03  James Ingham  <jingham@apple.com>

	* eval.c (evaluate_subexp_standard): Add a check for
	deprecated_selected_frame not NULL before calling
	value_of_register.  This wart is the result of not getting the
	complete register unwind implementation, and should go away when
	we do our next complete merge.

2003-09-29  Jason Molenda  (jmolenda@apple.com)

	* utils.c (internal_error_problem, internal_warning_problem): Do not
	prompt the user "Create a core file of GDB? (y or n)" when we get
	an internal error.  It's really annoying, and no one wants to.

2003-09-29  Klee Dienes  <kdienes@apple.com>

	* symfile.c (symbol_file_add_bfd_with_addrs_or_offsets): Check for
	symfile_objfile != NULL, not have_symbols.
	(symbol_file_clear): Ditto.
	(reread_symbols): Move the "#if 0" outside the entire test for
	have_symbols, not just the inner part.

2003-09-26  Jim Ingham  <jingham@apple.com>

        * interpreter.c (gdb_new_interpreter): Accept and set the
	complete_proc.
	(gdb_interpreter_complete): New function.
	* interpreter.h: Add the complete_proc.
	* cli/cli-cmds.c (cli_interpreter_complete): New function.
	(complete_command): Recast to use cli_interpreter_complete.
	* cli/cli-cmds.h: Add cli_interpreter_complete.
        * cli-out.c (_initialize_cli_out): add cli_interpreter_complete.
	
2003-09-25  Jason Molenda  (jmolenda@apple.com)

	* fix-and-continue.c (struct fixedobj): Retain pointer to the symtab
	for the source file being replaced in thix fix object.
	(mark_previous_fixes_obsolete): Don't mark file static/global data
	obsolete -- leave that for redirect_statics() to do.
	(get_fixed_file): Initialize new symtab pointer in fixedobj.
	(find_orig_static_symbols): Instead of looking for file static data
	in just the original object file, search the original object file
	and every fixed objfile we've added so far.  So if a new global var
	is added in the 5th fix of a file, the 6th and 7th fixes will all
	have that global var pointing to the 5th fix where it originated.

2003-09-24  Jim Ingham  <jingham@apple.com>

	* completer.c (complete_line): For filename completions,
	when you look for the last word before the cursor, actually
	start from the cursor & work backwards, rather than starting
	from the word you were handed.  Starting from the word
	doesn't work if the input contains more than one word - as
	it does in the complete command.

2003-08-22  Jim Ingham <jingham@apple.com>

	* objc-lang.c (value_objc_target_type): Add a check for the
	base type of the value passed in being null, and for a
	structure that has no elements.  The latter can happen, for
	instance, if we get a C++ object with a base class but no
	data in the class of the static type.

2003-09-19  Jason Molenda  (jmolenda@apple.com)

	* fix-and-continue.c (fix_command_helper): Ask ZeroLink to load
	an object file before we search for the original source file.

2003-09-18  Jim Ingham  <jingham@apple.com>

	* cli/cli-setshow.c (do_setshow_command): Don't just dump the
	doc line to gdb_stdout, it won't show up in the console-quoted
	interpreter then...

2003-09-16  Jason Molenda  (jmolenda@apple.com)

	* objfiles.c (sanity_check_symtab_obsolete): Try to find the
	objfile that contains the bad symtab -- chances are all fields
	of the symtab will be 0 if we hit this function, including the
	filename.
	(sanity_check_psymtab_obsolete): Ditto.

2003-09-09  Jason Molenda  (jmolenda@apple.com)

	* symtab.c (rbreak_command): Revert last.  Works correctly with
	TOT FSF sources, but not our current sources.

2003-09-09  Jason Molenda  (jmolenda@apple.com)

	* symtab.c (rbreak_command): Change quoting of canonicalized
	filename:function-name arguments for easier parsing of ObjC
	method names.

2003-09-09  Klee Dienes  <kdienes@apple.com>

	* breakpoint.c (break_command_1): Only store the breakpoint as a
	future-break if it has a valid address string.  Use catch_errors
	for all breakpoint setting, even if we aren't going to bother
	doing anything if it fails.

2003-09-02  Klee Dienes  <kdienes@apple.com>

	* gdbtypes.c (check_typedef): Only modify TYPE_LENGTH if it
	actually needs changing, in case the symbol data is in a read-only
	section.
	* source.c (open_source_file): Only modify s->fullname if we
	successfully open the file.
	* symfile.c (symbol_file_add_bfd_with_addrs_or_offsets): If we are
	relocating a cached symbol file, make the pages writable when
	calling objfile_relocate.
	
2003-08-27  Jason Molenda  (jmolenda@apple.com)

	* objc-lang.c (find_methods): Make static.  Move prototype
	here from objc-lang.h so linespec.c can include objc-lang.h
        without a conflict with its find_methods function.
	* objc-lang.h (find_methods): Move prototype to objc-lang.c.

2003-08-26  Jason Molenda  (jmolenda@apple.com)

	* Makefile.in: Update mi-main.c's dependencies.

2003-08-22  Jason Molenda  (jmolenda@apple.com)

        * stack.c (backtrace_command_1): Save and restore current source
        line value around the backtrace cmd.

2003-08-22  Jim Ingham <jingham@apple.com>

	* blockframe.c (inside_entry_file, inside_entry_func,
	inside_main_func): Don't treat a pc of 0 as the bottom of
	the stack.  Otherwise you won't be able to backtrace past
	a call through a NULL function pointer.
	* frame.c (get_prev_frame): Don't treat a pc value of 0 in
	the bottom-most frame as an error.  It is much more likely
	the user has called through a NULL pointer.

	* value.h: Turn off the METHOD_PTR_IS_VIRTUAL macro for
	now, it makes no sense on Mac OS X (or most modern systems
	for that matter...)

2003-08-08  Jason Molenda  (jmolenda@apple.com)

        * event-loop.c (use_poll): Don't use poll() just because the
        poll() wrapper is present in the system library--stick with select()
        for now.

2003-08-06  Jim Ingham  <jingham@apple.com>

	* symfile.c (reread_symbols): Call objfile_relocate on the new
	objfile.  Since you are keeping the old offsets you have to reapply
	them, or the new objfile won't get properly slid.  In the longer term,
	we probably ought to let the solib layer handle symbol rereading, since
	it knows where things land.

	* cli-setshow.c (do_setshow_command): Don't print the doc string if the
	interpreter is mi_like.  The mi uses the cli show command to report gdb
	variable values, and is not expecting the doc string.

2003-08-06  Klee Dienes  <kdienes@apple.com>

	* objfiles.c (_initialize_objfiles): Add aliases for
	generate-cached-symfiles and use-cached-symfiles.

2003-08-05  Jim Ingham  (jingham@apple.com)

	* inflow.c (terminal_inferior, terminal_ours_2, child_terminal_info): 
	check that inferior_ttystate is not null before passing it on to 
	functions that will crash if it is null.

	* objc-lang.c (find_methods): Use find_pc_function_sect instead of 
	find_pc_function.  Since we know the section here, this will find the 
	correct sym if we are looking up a pc before we run, and have a shared
	libraries that overlap each other.

	* cli-decode.c (print_doc_line): Use the stream we have been passed in
	rather than calling ui_out_text to print the doc line.

2003-08-04  Jason Molenda  (jmolenda@apple.com)

	* objfiles.c (sanity_check_symtab_obsoleted_flag): Update comment.	
	(sanity_check_psymtab_obsoleted_flag): Ditto.

2003-08-04  Jason Molenda  (jmolenda@apple.com)

	* fix-and-continue.c (check_restriction_cxx_zerolink): New function
	to see if the file being fixed is C++, and if so, whether the inferior
	is using ZeroLink.
	(do_pre_load_checks): Run this new check.

2003-07-31  Jim Ingham  <jingham@apple.com>

        * breakpoint.c (bpstat_do_actions): Copy the bpstat passed in and
	use that in the loop that actually does the actions.  This way we
	don't have to worry that somebody might have freed the bpstat
	(always stop_bpstat) our from under us.

2003-07-31  Klee Dienes  (kdienes@apple.com)

	* objc-lang.c (lookup_child_selector): Rename to
	lookup_child_selector_nocache.
	(selector_entry): New struct.
	(SELECTOR_HASH_SIZE): New define.
	(selector_hash_generation): New variable.
	(reset_child_selector_cache): New function.
	(lookup_child_selector): New function; uses the selector cache.

2003-07-31  Jim Ingham  (jingham@apple.com)

	* symfile.c (add_symbol_file_command): Fix a misplaced "?" in the
	prompt string.  This was causing suprious testsuite failures in
	relocate.exp.

2003-07-31  Jason Molenda  (jmolenda@apple.com)

	* fix-and-continue.c (struct fixinfo): Store the name of the
	original executable/dylib as well as the name of the original
	source file, instead of pointers to the objfile/psymtab.
	(fix_command_helper): Find original object file at this level.
	(mark_previous_fixes_obsolete): Update to use accessor functions
	to get original symtab/psymtab.
	(free_half_finished_fixinfo): Free new xstrdup'ed memory of original
	executable's filename.
	(find_orig_static_symbols): Use accessor function to find
	original objfile/symtab.
	(redirect_statics): Properly cast NULLs to avoid warnings with 
	64-bit CORE_ADDR.
	(build_list_of_objfiles_to_update): Use accessor function to get
	original objfile.
	do_final_fix_fixups_static_syms): Ditto.
	(pre_load_and_check_file): Properly cat NULL to avoid warnings
	with 64-bit CORE_ADDR.
	(pre_load_and_check_file): Hoist original objfile from here
	to fix_command_helper().
	(do_pre_load_checks): Sanity check the new names.
	(check_restrictions_globals): Use accessor functions to get
	original objfile.
	(check_restrictions_statics): Ditto.
	(find_original_objfile): This function removed, but really transformed
	into ...
	(find_original_object_file_name): This function added.  Much similarity
	to the old find_original_objfile().
	(find_original_object_file): Accessor function to get the original
	object file.
	(find_original_symtab): Similar.
	(find_original_psymtab): Similar.

2003-07-29  Jim Ingham  (jingham@apple.com)

	* breakpoint.c (print_one_breakpoint): replace calls to
	print_expression with gdb_print_expression, which is the safe
	version.  Also, when printing the breakpoint condition, if 
	print_expression fails, just print the cond_string.
	* (breakpoint_1): replace call to ui_out_table_begin with
	make_cleanup_ui_out_table_begin_end, and do_cleanups to close
	the table.  Also replace a few more print_expression calls
	with the safe version.
	* ui-out.c (do_cleanup_table_end): New function.
	(make_cleanup_ui_out_table_begin_end): New function
	* ui-out.h: declare make_cleanup_ui_out_table_begin_end.
	* wrapper.c (wrap_print_expression): New function.
	(gdb_print_expression): New function.
	* wrapper.h: declare gdb_print_expression.

	* varobj.c (varobj_create): use get_selected_frame, not
	get_current_frame to get the saved frame id.  The latter
	returns the currently executing frame, not the currently
	selected frame, which is not what we want here.  Also if
	we aren't using varobj_runs_all_threads, make a null_cleanup
	for the schedlock_chain cleanup.
	
2003-07-25  Jim Ingham  (jingham@apple.com)

	* objfiles.c (objfile_delete_from_ordered_sections): Don't add
	1 to the section begin to find the to-be-deleted section index.
	This will fail for sections that are only one byte long.

2003-07-24  Jason Molenda  (jmolenda@apple.com)

	* fix-and-continue.c (get_fixed_file): Only call 
	remove_objfile_from_dyld_records in a native gdb.

2003-07-24  Klee Dienes  <kdienes@apple.com>

	* objfiles.c (link_objfile): Check to see that the objfile hasn't
	already been linked, before linking.

2003-07-24  Jason Molenda  (jmolenda@apple.com)

	* fix-and-continue.c (load_fixed_objfile): Return a result
	code if NSLinkModule fails.
	(get_fixed_file): When load_fixed_objfile fails, find objfile for
	aborted file and remove it from gdb's global linked list structures.
	* objfiles.c (free_objfile): Add two APPLE LOCAL markers.
	* Makefile.in (fix-and-continue.o): Add dependency on 
	macosx-nat-dyld-process.h.

2003-07-24  Jim Ingham (jingham@apple.com)

	This patch adds an "ordered_sections" lookup table to objfiles.c
	so that the pc->obj_section lookup can be done with a binary search
	rather than a linear search.

	* minsyms.c (lookup_minimal_symbol_by_pc_section_from_objfile): Delete 
	the call to find_pc_section just to check that the pc is actually in
	a known section.  Since this routine often gets called in a loop with
	the same pc it is more efficient for the callers to do this check.
	(lookup_minimal_symbol_by_pc_section): Use the ordered_sections lookup
	to find the minsym.  If it fails we still fall back on the old search.
	
	* objfiles.c (backward_section_compare): New function.
	(forward_int_compare): New function
	(objfile_delete_from_ordered_sections ): New function.
	(get_insert_index_in_ordered_sections): New function.
	(objfile_add_to_ordered_sections): New function.
	(find_in_ordered_sections_index): New function.
	(find_pc_sect_in_ordered_sections): New function.
	(build_objfile_section_table): Add the new sections to the 
	ordered_sections table.
	(free_objfile): remove the sections from the ordered_sections table.
	(objfile_relocate): remove the obj_sections from their old locations
	in the ordered_sections table, and move them to their relocated
	locations.
	(find_pc_sect_section): Use the ordered_sections table.  If this fails
	fall back on the original ALL_OBJSECTIONS search.
	* objfiles.h: Add declarations to the new exported functions.
	* symfile.c (reread_symbols): Clear the old objfile's obj_sections from
	the ordered_sections array.

	* eval.c (evaluate_subexp_standard): Fix little goof, funaddr was used
	before being set.
	
	* symtab.h: Cast the -1 error return to CORE_ADDR.  This removes a
	bunch of warnings from objfiles.c.

2003-07-09  Jim Ingham (jingham@apple.com)

	* breakpoint.c (insert_breakpoints): Revert the change that called
	error_stream if there was an error in setting a breakpoint.  The
	upstream code actually can handle the return value, but was not 
	expecting an actual error (i.e. longjmp).

	* printcmd.c (print_frame_args): Work around a problem with
	f2c'ed C code where the debug info says it is a .f file,
	but it is actually C so the variable names are case sensitive.
	gdb would assume a lookup_symbol never fails, and crash
	when it did.

2003-07-08  Jason Molenda  (jmolenda@apple.com)

	* cli-out.c (cli_interpreter_resume): Clear print_frame_more_info_hook
	when returning to a console interpreter.
	(cli_quoted_interpreter_resume): Ditto.

2003-06-30  Jason Molenda  (jmolenda@apple.com)

	* fix-and-continue.c (load_fixed_objfile): Clarify 
	NSCreateObjectFileImageFromFile failure error message (tell user
	to retry fix).

2003-06-20  Jason Molenda  (jmolenda@apple.com)

	* fix-and-continue.c (create_current_active_funcs_list): Make
	struct symbol copy deeper.
	(free_active_threads_struct): Free deeper struct symbol copy.

2003-06-19  Jason Molenda  (jmolenda@apple.com)

	* fix-and-continue.c (load_fixed_objfile): Wrap error message prettily.
	(create_current_active_funcs_list): Copy the symbol we find, instead
	of saving a pointer to it.  They can sneakily move around, it seems.
	(free_active_threads_struct): Free the copied symbol.

2003-06-19  Jason Molenda  (jmolenda@apple.com)

	* fix-and-continue.c (fix_command_helper): Mark previous fixes,
	and the original source file, obsolete only after the new bundle
	has successfully been loaded.
	(mark_previous_fixes_obsolete): Don't mark the newest bundle
	as obsolete.

2003-06-19  Jason Molenda  (jmolenda@apple.com)

	* fix-and-continue.c (find_objfile_by_name): If we fail to find
	an objfile by a given name, search the objfile's bfd structures;
	when cached-symfiles are being used, the objfile->name member is
	the cached-symfile name.

2003-06-18  Jason Molenda  (jmolenda@apple.com)

	* fix-and-continue.c (load_fixed_objfile): Expand on error message
	a bit.
	(create_current_threads_list): Don't issue warning message when
	we can't change to a thread.  Will revisit this later.
	(check_restrictions_statics): Don't include EOL at end of warning()
	text.

2003-06-17  Jason Molenda  (jmolenda@apple.com)

	* fix-and-continue.c (load_fixed_objfile): Include return value
	from NSCreateObjectFileImageFromFile in error message.
	(find_orig_static_symbols): Add a debug warning for set debug
	fix-and-continue.

2003-06-17  Jason Molenda  (jmolenda@apple.com)

	* fix-and-continue.c (create_current_threads_list): If we are unable
	to switch to a thread, skip that thread instead of aborting fix.
	A call to prune_threads() before I step through the list, but I
	think that function is intended to be static to thread.c, so we'll
	go with this for now.

2003-06-17  Jason Molenda  (jmolenda@apple.com)

	* fix-and-continue.c (check_restrictions_statics): If gdb has an
	incomplete type for a static, either the old or the new, skip the
	checks.  They won't be meaningful, and we'll probably abort the
	fix needlessly.

2003-06-13  Jim Ingham (jingham@apple.com)

	* utils.c (make_cleanup_set_restore_scheduler_locking_mode): Change
	function to actually set up a locking mode restore cleanup.

2003-06-11  Jason Molenda  (jmolenda@apple.com)

	* fix-and-continue.c (redirect_statics): Don't redirect static
	if we can't find symbol OR msymbol for it.

2003-06-03  Jason Molenda  (jmolenda@apple.com)

	* fix-and-continue.c (fix_command_helper): Add cleanup
	to set/restore the current language settings based on the fix file
	filename.
	(tell_zerolink): Don't assume an object filename was provided
	if the inferior is a ZL app.
	(load_fixed_objfile): Check return value of NSLinkModule() and
	give an error about failure.  More work needed here in the future
	to catch the failing NSLinkModule instead of letting it SIGABRT
	the inferior.
	(find_orig_static_symbols): Add case to find coalesced symbols.
	(do_final_fix_fixups_static_syms): Ditto.
	(check_restrictions_statics): If we can't find the symbol we're
	looking for, probably a mangling problem -- report failure as such.
	Add case to find coalesced symbols.  Allow addition of
	static symbols, will doc restriction that static initialization
	won't happen automatically.
	(check_restrictions_locals): Use linkage name instead of source name;
	needed for languages where these are different.  Add case to find
	coalesced symbols.
	(expand_all_objfile_psymtabs): New function.
	(find_original_objfile): When searching for a source filename,
	don't accidentally match the pre-loaded F&C bundle.
	(search_for_coalesced_symbol): New function.
	(restore_language): New function.
	(set_current_language): New function.
	(find_original_objfile): Make error message a little more
	clear.

	* symfile.c (deduce_language_from_filename): This function uses
	its arg const-correctly.
	* symtab.h (deduce_language_from_filename): Correct prototype.
	* Makefile.in (fix-and-continue.o): Add dependency on language.h

2003-06-01  Jason Molenda  (jmolenda@apple.com)

	* fix-and-continue.c (check_restrictions_statics): Skip the
	_OBJC_* symbols used by the ObjC runtime -- the simplistic
	handling of them as if they were normal statics is not correct.
	Also, remove a chunk of #if 0'ed code.

2003-06-01  Jim Ingham  (jingham@apple.com)

	* symtab.c (find_line_pc_range): If we know we have asked for
	the pc by line number, once we have found the line, just report
	the pc, don't go back to the minsyms and look again.  That part
	of the code is ONLY to handle some cases where we asked by
	pc...

	* inf-loop.c (handle_inferior_event): If fetch_inferior_event
	errors out, then set target_executing to 0.  We don't really
	know, but this is the best guess of what is going on.

	These changes add internal control over the scheduler mode,
	and then uses that in the varobj code to stop other threads
	from running while we evaluate variable objects.

	* defs.h: Add def'ns for the scheduler_locking functions.
	* infcmd.c (run_stack_dummy): Signal a premature return if
	we stopped in a different thread from the one we tried to
	run the function.
	* infrun.c (scheduler_lock_on_p): New function.
	(scheduler_run_this_ptid): New function.
	(set_schedlock_helper): New function.
	(set_scheduler_locking_mode): New function.
	(set_schedlock_func): Use the new set_schedlock_helper.
	(init_wait_inferior): Clear the scheduler_lock_ptid.
	(resume): If you have the schedlock_mode on, resume the 
	scheduler_lock_ptid if that thread still exists.
	* thread.c (do_captured_thread_select): If the scheduler locking 
	is on, then switch the scheduler_locking_ptid to the newly 
	selected thread.
	* utils.c (do_set_schedlock_mode, 
	make_cleanup_set_restore_scheduler_locking_mode): New functions.
	* varobj.c (varobj_create): Lock the scheduler while we create 
	the variables.
	(varobj_set_value): and when we update the value.
	(c_value_of_root): and when we update the root variable.
	(_initialize_varobj): Add a variable: varobj-print-object to control
	whether to lock the scheduler for updating varobj's.

	* objc_lang.c (value_objc_target_type): Fix the warning message.
	* wrapper.c (safe_value_objc_target_type): Suppress error messages.

	* symtab.c (find_line_pc_range): If we know the line was specified by
	line number not address, then don't look it up in the minimal tables.
	We found it already, use the linetable entry we just got instead.
	
2003-05-30  Jason Molenda  (jmolenda@apple.com)

	Support for Fix and Continue to interoperate with ZeroLink.

	* fix-and-continue.c (struct fixinfo): Rename "obj_filename" to 
	bundle_filename to more accurately represent what it is.  
	Add "object_filename" variable.  All users updated.
        (struct fixedobj): Change "object_filename" to "bundle_filename" to
	correctly reflect what it is.  Callers updated.
	(fix_command): Record the 3rd argument of an object filename if 
	provided.
	(fix_command_helper): Accept and record a third argument of an object
	filename.  Call tell_zerolink() at the correct place.
	(tell_zerolink): New function (previously a placeholder stub).
	(inferior_is_zerolinked_p): New function (previously a placeholder stub)
2003-05-21  Jason Molenda  (jmolenda@apple.com)

	* fix-and-continue.c (fix_command_helper): Return error if a bundle
	filename is reused.
	(find_objfile_by_name): New helper func.
	(mark_previous_fixes_obsolete): Check for NULL objfile ptr; issue
	warning but continue on if we find one.  This should not happen.
	(get_fixed_file): Don't hook new fixedobj structure on to the
	fixed_object_files linked list until we've successfully loaded it
	via dyld.
	(load_fixed_objfile): Change error message to be less amusing.

2003-05-16  Jim Ingham  <jingham@apple.com>

	* varobj.c (c_type_of_child): Call TYPE_TARGET_TYPE when getting
	the type of an array element.  This preserves the typedef info,
	which is useful.

2003-05-13  Jim Ingham  <jingham@apple.com>

	* varobj.c (varobj_create): Never hold onto struct frame *'s
	across calls that might run the inferior (in this case
	gdb_parse_expression).  Hold onto frame_id's instead.

2003-05-12  Jim Ingham  <jingham@apple.com>

	This set of changes adds support in the varobj system for
	getting the dynamic type of ObjC objects.
	* objc-lang.c (value_objc_target_type): New function, return
	the dynamic type of a value pointing to an ObjC object.
	* objc-lang.h: declare value_objc_target_type.
	* varobj.c (varobj_fixup_value): If you don't find a C++ dynamic
	type, look for an ObjC one.  FIXME - this should be abstracted
	somehow.
	(c_type_of_child): Call get_type, not just check_typedef to get
	the parent's type.  Needed to use dynamic types.
	* wrapper.c (wrap_value_objc_target_type,
	safe_value_objc_target_type): A safe interface to
	value_objc_target_type.
	* wrapper.h: Declare safe_value_objc_target_type.

	* infcmd.c (run_command): Handle the case there 
	target_create_inferior actually fails to run the inferior at all.
	Reset target_executing, and get control of stdin back.

2003-05-07  Jim Ingham  <jingham@apple.com>

	* valops.c (hand_function_call): On Mac OS X, call a function
	to prepare the thread before saving away register state.  We
	need to call thread_abort_safely to coax the thread out of the
	kernel before we can get its state or safely call functions on
	it.

2003-05-08  Jason Molenda  (jmolenda@apple.com)

	* symtab.c (lookup_symbol_aux_symtabs): Iterate over obsoleted
	objfiles--there may be non-obsoleted symbols contained therein.
	(lookup_transparent_type): Ditto.

	* fix-and-continue.c (struct file_static_fixups): Change member names.
	(find_new_static_symbols): Record the new minsym as well.
	(find_orig_static_symbols): Record the original minsym as well.
	(redirect_statics): Add sanity checks for the minsyms.  Actually
	update the nl_symbol_ptr section so references go to the right place.
	(find_and_parse_nonlazy_ptr_sect): Initialize new minsym members.

2003-05-07  Klee Dienes <kdienes@apple.com>

	* symfile.c (reread_symbols): Use stat() on the file when we
	have a filename, not bfd_get_mtime().

2003-05-07  Jim Ingham  (jingham@apple.com)

	* varobj.c: Turn varobj_use_dynamic_type default back to 1.

2003-05-07  Jason Molenda  (jmolenda@apple.com)

	* stabsread.c (scan_file_globals): Scan for the matching minsym for
	a symbol in the current objfile before looking at the main application.
        That SVR4 assumption doesn't play well with F&C (and most likely
        two level namespaces, as well.)

	* fix-and-continue.c (struct file_static_fixups): Structure to
	record locations of file global/static data.
	(redirect_file_statics): Top-level function to redirect file
	static variables to the original version's addresses.
	(find_orig_static_symbols, redirect_statics, 
	find_and_parse_nonlazy_ptr_sect): Support functions.

2003-05-07  Jim Ingham  <jingham@apple.com>

	* wrapper.c: (gdb_evaluate_type, wrapped_evaluate_type): evaluate_type 
	returns a value, not a type, dummy!
	* varobj.c (varobj_create): use gdb_evaluate_type correctly.
	
2003-05-06  Klee Dienes  <kdienes@apple.com>

	* fix-and-continue.c (update_picbase_register): Wrap with
	TARGET_POWERPC as a temporary measure to allow building on
	Intel.

2003-05-06  Jim Ingham  (jingham@apple.com)

	* varobj.c (varobj_create): Use a wrapped version of evaluate_type,
	since even finding the type of an objc method call can sometimes 
	crash.  Then handle the case where we get this error.
	(varobj_get_value): Handle the case where the value is NULL even if
	the expression is good.
	(value_of_root): If the type is NULL, then we just need to recreate
	the varobj to get it into a good state.
	(c_number_of_children): Handle the case where the type is NULL.
	* wrapper.c (wrap_evaluate_type): New function.
	(gdb_evaluate_type): A wrapped version that also sets unwind_on_signal.
	* wrapper.h: declare gdb_evaluate_type.

2003-05-05  Jason Molenda  (jmolenda@apple.com)

	* fix-and-continue.c (fix_and_continue_debug_flag): New global flag.
	(fix_command): Only print debug messages if fix_and_continue_debug_flag.
	(do_final_fix_fixups_static_syms): Ditto.
	(_initialize_fix): Add 'set debug fix-and-continue' setting.
	* Makefile (fix-and-continue.o): Update dependencies.

2003-05-02  Jason Molenda  (jmolenda@apple.com)

	* fix-and-continue.c (do_final_fix_fixups_global_syms): Initialize
	oldsym before it is used.  Use paddr_nz for printing CORE_ADDRs.
	(do_final_fix_fixups_static_syms): Ditto.
	(update_picbase_register): New function to divine and set
	the picbase register and address for a function we're about to 
	execute mid-way through.
	(print_active_functions): Change result message from file-fix-file
	to format its output more in the correct MI style.
	* Makefile.in (fix-and-continue.o): Update dependencies.
	* defs.h: Add prototype for update_picbase_register.

	* objfiles.h (ALL_SYMTABS_INCL_OBSOLETED): New macro for iterating
	over all objfiles + symtabs, including any obsoleted symtabs.
	* symtab.c (lookup_symbol_aux_block): Allow this function to match
	a symtab marked obsolete.
	(find_pc_sect_symtab): Ditto.

2003-05-01  Jim Ingham (jingham@apple.com)

	* symmisc.c (print_symbol): Trap the case where the block for a symbol
	is null.
	* dbxread.c: Initialize the context stack to null so the trap above
	will work if the block never gets set.

	* utils.c (do_restore_uiout_cleanup, make_cleanup_restore_uiout): Add
	cleanups to restore a given uiout.
	* defs.h: declare make_cleanup_restore_uiout.

	* defs.h: declare gdb_quitting
	* top.c (quit_force) set gdb_quitting if we are really quitting.
	* corefile.c (reopen_exec_file): Don't reread the file if we are 
	quitting.

2003-05-01  Jason Molenda  (jmolenda@apple.com)

	* fix-and-continue.c (fix_command): Accept and ignore third argument.
	(mark_previous_fixes_obsolete): Use INCL_OBSOLETED iterator for symtabs;
	mark old symtabs/psymtabs as obsolete.
	(do_final_fix_fixups): Use INCL_OBSOLETED iterator.
	(do_final_fix_fixups_global_syms): Ditto.
	(do_final_fix_fixups_static_syms): Ditto.
	(check_restrictions_globals): Ditto.
	(check_restrictions_statics): Ditto.
	(check_restrictions_locals): Ditto.
	(force_psymtab_expansion): Ditto.
	* objfiles.c (sanity_check_symtab_obsoleted_flag): Temporary debug
	function.  
	(sanity_check_psymtab_obsoleted_flag): Temporary debug function.
	(symtab_get_first): Initial iterator for symtab structures with
	obsolete markers.
	(symtab_get_next): Continuing iterator for symtab structures with
	obsolete markers.
	(psymtab_get_first): Initial iterator for partial_symtab structures 
	with obsolete markers.
	(psymtab_get_next): Continuing iterator for partial_symtab structures 
	with obsolete markers.
	* objfiles.h: Prototypes for above functions.  Use them in 
	ALL_OBJFILE_SYMTABS and ALL_OBJFILE_PSYMTABS.  Add new
	ALL_OBJFILE_SYMTABS_INCL_OBSOLETED and 
	ALL_OBJFILE_PSYMTABS_INCL_OBSOLETED iterator macros.
	* buildsym.c (end_symtab): Initialize symtab obsolete flag.
	* coffread.c (coff_symfile_read): Use ALL_OBJFILE_SYMTABS to iterate.
	* dbxread.c (end_psymtab): Initialize partial_symtab obsolete flag.
	* mdebugread.c (parse_partial_symbols): Initialize partial_symtab
	obsolete flag.
	* source.c (select_source_symtab): Use ALL_OBJFILE_SYMTABS iteartor.
	(select_source_symtab): Ditto.
	(forget_cached_source_info): Ditto.
	* symfile.c (symbol_file_add_bfd_with_addrs_or_offset): Use
	ALL_OBJFILE_PSYMTABS iterator.
	(allocate_psymtab): Initialise partial_symtab obsolete value.
	(cashier_psymtab): Use ALL_OBJFILE_PSYMTABS iterator.
	* symmisc.c (dump_objfile): Use ALL_OBJFILE_PSYMTABS iterator.
	* symtab.h (struct symtab): Add obsolete flag.  Add
	SYMTAB_OBSOLETED macro for selecting.
	(struct partial_symtab): Add obsolete flag.  Add PSYMTAB_OBSOLETED
	macro for selecting.

2003-04-30  Jim Ingham (jingham@apple.com)

	* varobj.c (c_value_of_root): Move the call to release value INSIDE
	the test for gdb_evaluate_expression passing.  Otherwise we might try
	to release a null value.

2003-04-29  Jim Ingham (jingham@apple.com)

	* wrapper.c (gdb_evaluate_expression): Set unwindonsignal when you do
	evaluate_expression here.  We don't want to leave a crash on the stack
	when we are updating varobj's that contain functions, since that would
	mess up evaluating the next one.

2003-04-25  Jim Ingham (jingham@apple.com)

	* event-top.c (handle_sigint): Have to set quit_flag here, or we won't
	quit till we get back to the event loop, which is not good.
	(async_request_quit): Don't set quit_flag here, but rather assume whoever
	queued you up set it, and if it got unset that means a call to
	QUIT has already handled the signal, and you don't need to.

	linespec.c (select_symbols): Add a call to QUIT to the symbol iteration
	loops - in some cases there could be quite a few matching symbols.

2003-04-24  Klee Dienes  <kdienes@apple.com>

	* Makefile.in (COMMON_OBJS): Remove version.o.
	(gdb): Add version.o explicitly to the link line; build
	version.o as part of the target rule.

2003-04-23  Jason Molenda  (jmolenda@apple.com)

	* fix-and-continue.c (create_current_threads_list): Fix call
	to gdb_thread_select.
	* Makefile.in: Update dependencies for fix-and-continue.c.

2003-04-23  Jim Ingham (jingham@apple.com)

	* gdb.h: declare make_cleanup_restore_current_thread, add print
	argument to gdb_thread_select.
	* thread.c (make_cleanup_restore_current_thread, restore_current_thread):
	add a "print" argument so you can restore the current thread quietly.
	* (gdb_thread_select): Add a "print" argument so you can set the current
	thread quietly.

	* ui_out.c (ui_out_is_mi_like): Check for the impl being null,
	and call a null uiout NOT mi-like.

2003-04-23  Jason Molenda  (jmolenda@apple.com)

	* fix-and-continue.c (hi16, lo16): Rename to encode_{hi16,lo16}.
	Update callers.
	(decode_hi16_lo16): New function.  
	(decode_fix_and_continue_trampoline): New function, previously
	in macosx/ppc-macosx-tdep.c.  Entirely arch specific, but all the
	other arch specific functions are in f-and-c.c right now anyway
	so I'll keep them together.  Fix a couple of bugs while moving it.
	* defs.h: Add prototype for decode_fix_and_continue_trampoline.
	* symtab.c (search_symbols): Don't match obsolete syms/msyms.

2003-04-22  Jim Ingham (jingham@apple.com)

	This change adds a "console-quoted" interpreter, so that from
	the mi you can run a console-like interpreter, the difference
	being that all the output comes in mi console wrapping.

	* cli-out.c (cli_quoted_out_new): New function.
	(cli_quoted_interpreter_resume): New function.
	(_initialize_cli_out): Create the console-quoted interpreter.

2003-04-22  Jason Molenda  (jmolenda@apple.com)

	* objfiles.c (objfile_remove_from_restrict_list): Remove objfile
	from restrict list at the same time as we remove it from objfile
	list.

2003-04-21  Jason Molenda  (jmolenda@apple.com)

	* objc-lang.c (find_methods): Don't match obsoleted symbols.

2003-04-18  Jason Molenda  (jmolenda@apple.com)

	* gdbtypes.c (lookup_struct_elt_type): Use type_sprint() for printing
	a type.
	* varobj.c (varobj_get_type): Ditto.
	(varobj_get_dynamic_type): Ditto.

2003-04-17  Klee Dienes  <kdienes@apple.com>

	* symfile.c (reread_symbols): Remove call to flush the bfd cache.
	This was used earlier to make sure that any cached mtimes on bfd
	files got reset, but now we just make sure the mtimes are never
	cached in the first place.
	(symbol_file_add_bfd_with_addrs_or_offsets): Properly relocate a
	cached symfile that has been read in.

2003-04-17  Jason Molenda  (jmolenda@apple.com)

	* fix-and-continue.c (check_restrictions_locals): Skip non-function 
	blocks.  Use SYMBOL_MATCHES_NAME to check function name equivalency.
	(check_restrictions_globals): Change type checking to use new type 
	printer.
	(check_restrictions_statics): Ditto.
	(check_restrictions_function): Rewrite.
	(sym_is_argument, sym_is_local): New helper functions.
	* typeprint.c (type_sprint): New func.
	* value.h: Prototype.

2003-04-17  Jim Ingham (jingham@apple.com)

	* gdbtypes.c (lookup_struct_elem_type): Replace the lame error
	reporting (some to stderr, some to the error call) with a real
	error message passed to error.  Otherwise the mi gets a useless
	error return value.

2003-04-15  Jason Molenda  (jmolenda@apple.com)

	* fix-and-continue.c (check_restrictions_statics): Only check static
	functions for now.  Use found sym's namespace when searching for old
	version; a few other small corner cases.
	(check_restrictions_locals): Fill in stub with content to iterate
	over local blocks of fix file.
	(check_restrictions_function): First version of function to check
	for invalid changes to functions in a fix.
	(in_active_func): Use SYMBOL_MATCHES_NAME.
	(remove_type_prefix): Removed.

2003-04-14  Jim Ingham (jingham@apple.com)

	This set of changes implements two features:
	1) When resetting breakpoints, the ALL_OBJFILES macro is restricted
	to ONLY those files that have been added since the last time 
	breakpoint_update was called.  When breakpoint_re_set is called
	you pass in the objfile that has changed, and these form the list
	of changed objfiles.
	2) Once a breakpoint is set, it is not reset till the objfile it was
	set in is changed.  When objfiles change, you must call the new
	function tell_breakpoints_objfile_changed.

	* breakpoint.c (create_internal_breakpoint): set bp_set_p.
	(create_breakpoints): Ditto.
	(watch_command_1): Ditto.
	(breakpoint_re_set_1): Ditto.
	(breakpoints_update): Handle catchpoint resetting here, with
	the restricted search in place.
	(breakpoint_re_set): Take an objfile as argument, and add it
	to the restrict list.	
	(breakpoint_re_set_all): use the objfile_restrict_search for
	bp_breakpoint type breakpoints.
	(tell_breakpoints_objfile_changed): New function.
	* breakpoint.h: Add bp_set_p to the breakpoint structure.
	Change def'n of breakpoint_re_set.
	Add def'n of tell_breakpoints_objfile_changed.
	* objfiles.c (objfile_relocate): Mutatis mutandi for 
	breakpoint_re_set change.
	* rs6000-nat.c: Ditto.
	* symfile.c (new_symfile_objfile): Ditto.
	(clear_symtab_users): Ditto.
	
	* corefile.c (reopen_exec_file): Mark all breakpoints as
	unset, since who knows what may happen next.
	* symfile.c (reread_symbols): Call tell_breakpoints_objfile_changed.
	(remove_symbol_file_command): Ditto.

	* exec.c (exec_close): Don't call macosx_init_dyld_symfile
	on close.  It is not necessary.

	* objfiles.c (objfile_restrict_search): New function.
	(objfile_add_to_restrict_list): New function.
	(objfile_clear_restrict_list): New function.
	(objfile_get_first): New function.
	(objfile_get_next): New function.
	* objfiles.h: Fix ALL_OBJFILES to use the iterators above,
	and declare the other restrict list helper functions.
	* infrun.c (lookup_minimal_symbol): Use the objfile_get_first
	and objfile_get_next iterators.
	(lookup_minimal_symbol_text): Ditto.
	* source.c (select_source_symtab): Ditto.
	(forget_cached_source_info): Ditto.
	* symfile.c (reread_symbols): Ditto.	

2003-04-11  Jim Ingham (jingham@apple.com)

	* exec.c (exec_file_attach): On MacOSX, if you didn't find the
	exec file with the given name, see if the name you were given
	points to an app bundle.
	* symfile.c (symfile_bfd_open): Ditto.
	Also, add a mainline parameter, so you only do the app bundle
	check if this is indeed the main executable.
	(safe_symfile_bfd_open): Mutatis mutandi for mainline parameter
	to symfile_bfd_open.
	(symfile_bfd_open_helper): Ditto.
	* symfile.h: Ditto.
	* fix-and-continue.c (pre_load_and_check_file) Ditto.
	* somread.c (som_symfile_read): Ditto.
	
2003-04-10  Jason Molenda  (jmolenda@apple.com)

	* fix-and-continue.c (check_restrictions_globals): Tidy up.
	Don't check the blockvectors of symtabs who are referencing another
	symtab's blockvector.  Use proper type code for detecting functions.
	(check_restrictions_statics): Initial version.
	(in_active_func): Match either mangled or demangled names.

2003-04-08  Jason Molenda  (jmolenda@apple.com)

	* fix-and-continue.c (file_exists_p): Check if a file exists
	before we try to fix it.
	(fix_command_helper): Call file_exists_p.
	(inferior_is_zerolinked_p): Placeholder stub.
	(do_pre_load_checks): Add calls to restriction check functions.
	(check_restrictions_globals): Initial checks on global symbols.
	(check_restrictions_statics): Placeholder stub.
	(check_restrictions_locals): Placeholder stub.

2003-04-03  Jason Molenda  (jmolenda@apple.com)

	Back out change to avoid updating old fix objfiles - I couldn't
	cover all the BFD/dyld layers like this.

	* fix-and-continue.c (mark_previous_fixes_obsolete): Don't change
	old fix objfiles' mtime to LONG_MAX.
	* symfile.c (reread_symbols): Revert change to ignore objfiles with
	newer timestamps than the actual files.

2003-04-02  Jason Molenda  (jmolenda@apple.com)

	* fix-and-continue.c (build_list_of_objfiles_to_update): Helper
	func; build up a list of all object files we need to update when
	a new fix comes in.
	(do_final_fix_fixups): Change to use build_list_of_objfiles_to_update.
	(get_fixinfo_for_new_request): Fix a little buglet.

2003-04-02  Jason Molenda  (jmolenda@apple.com)

	* fix-and-continue.c: Revert most of the previous change (the bit
	about hiding the objfiles.)  It didn't work out after all.

2003-04-02  Jason Molenda  (jmolenda@apple.com)

	* fix-and-continue.c (pre_load_and_check_file): Zero out
	addrs struct.

	Try hiding earlier versions of fixed objfiles so the same objfile
	name can be used for several different files.
	(get_fixed_file): Instead of full objfile list, remove the objfiles
	with the same name from the master object_files list, to be restored
	after the new objfile is loaded.
	(build_list_of_current_objfiles): Rewritten as 
	hide_old_fixed_objfiles().
	(restore_hidden_objfiles): New func.
	(find_newly_added_objfile): Simplified.

2003-04-01  Jason Molenda  (jmolenda@apple.com)

	* fix-and-continue.c (mark_previous_fixes_obsolete): Fill out
	stubbed function.
	(get_fixed_file): Mark fixedobj->next with NULL for clarity.
	(build_list_of_current_objfiles): Fix typeo.
	* symfile.c (add_symbol_file_command): Clean up output for simple
	usage.
	(reread_symbols): Modify objfile re-loading slightly so multiple
	fixes to the same objfile don't trigger auto-reloading and updating
	of old versions.

2003-03-31  Jason Molenda  (jmolenda@apple.com)

	* fix-and-continue.c (struct active_func): Also record the frame_info
	for the function that we found, for later reporting via MI.
	(create_current_active_funcs_list): Allocate it.
	(free_active_threads_struct): Free it.
        (print_active_functions): Print the "replaced-functions" message
        if uiout is MI-like.

2003-03-31  Jason Molenda  (jmolenda@apple.com)

	* objc-lang.c (print_object_command): Set unwindonsignal 
	unconditionally while print-object'ing.

2003-03-27  Klee Dienes <kdienes@apple.com>

	* infrun.c (handle_inferior_event): Revert the change from
	2002-11-07 in the MI case, as CodeWarrior was depending on the extra
	output.

2003-03-25  Jason Molenda  (jmolenda@apple.com)

        * fix-and-continue.c (load_fixed_objfile): Add
        NSLINKMODULE_OPTION_DONT_CALL_MOD_INIT_ROUTINES flag to NSLinkModule
        call.

2003-03-25  Jim Ingham (jingham@apple.com)

	* interpreter.c (gdb_set_interpreter): Don't run do_all_continuations
	here, since that may run a continuation from the enclosing interpreter
	in the wrong context.

	* breakpoint.c (breakpoint_re_set_one): Don't try to set the overlay
	breakpoint.  It is bogus that this is attempted unconditionally, so 
	I am removing it unconditionally.

2003-03-25  Jason Molenda  (jmolenda@apple.com)

	* defs.h: Include prototype for make_cleanup_ui_out_delete.
	* fix-and-continue.c (fixedlib): Rename structure to "fixedobj" -
	a more descriptive name.
	(fix_command): Print a little status message when completed and 
	using CLI.
	(get_fixinfo_for_new_request): Fix mistake when fixing an objfile
	more than once.
	(get_fixed_file): Initialize tail of objfile linked list to NULL.
	(create_current_threads_list): Turn off output while switching
	threads around; save the current thread before we start switching
	through all the threads.

2003-03-18  Jason Molenda  (jmolenda@apple.com)

	* configure.in: Default is --with-mmalloc on MacOS X.
	* configure: Regenerated.

2003-03-18  Jason Molenda  (jmolenda@apple.com)

	* fix-and-continue.c: New file.
	* Makefile.in: Build it.
	* buildsym.c (add_symbol_to_list): Mark sym as not obsolete.
	* minsyms.c (lookup_minimal_symbol): Ignore syms not marked obsolete.
	(lookup_minimal_symbol_text): Ditto.
	(prim_record_minimal_symbol_and_info): Mark as not obsolete.
	(install_minimal_symbols): Ditto.
	* symtab.h: Add obsolete flag to ginfo; SYMBOL_OBSOLETED and
	MSYMBOL_OBSOLETED.
	* symtab.c (lookup_symbol_aux): Skip obsolete syms.
	(lookup_symbol_aux_block): Ditto.
	(lookup_symbol_aux_symtabs): Ditto.
	(lookup_symbol_aux_psymtabs): Ditto.
	(lookup_symbol_aux_minsyms): Ditto.
	(lookup_transparent_type): Ditto.
	(lookup_block_symbol): Ditto.
	
2003-03-18  Jim Ingham <jingham@apple.com>

	* cli/cli-script.c (execute_control_command): call the mi interpreter
	through the mi_interpreter_exec_bp_cmd function, which will keep 
	the mi from registering two continuations, one for the original
	command that set the target going, and one from the interpreter
	exec command.

2003-03-13  Klee Dienes <kdienes@apple.com>

	* osabi.c (gdb_osabi_names): Rename "Darwin 64-bit" to "Darwin64",
	to avoid whitespace-parsing hassles.
	* config/powerpc/macosx.mh (MACOSX_FILES): add macosx-nat.o.

2003-03-07  Jim Ingham <jingham@apple.com>

	* dbxread.c (read_dbx_symtab): Revert the change that peeked at
	the stab after a BINCL stab, and would discard the pair if the
	next one was an EINCL.  This throws off the include file
	numbering, and the type symbols no longer match up correctly.
	* (process_one_symbol): restore a fix to the fake line record
	created when we see a new FUN stab.  This change was accepted
	by the FSF on 2-26-03, so we can retire the APPLE LOCAL marker
	then.
	* stabsread.c (read_type): Restore a fix for handling embedded
	built-in type definitions that somehow got lost in the latest
	merge.
	* (read_member_functions): Stub out Daniel.J.'s code to fix up
	some constructor & destructor def'ns.  This did very little for
	gcc-3 and was very slow.
	
	
2003-03-03  Jim Ingham <jingham@apple.com>

	This set of changes updates the "catch catch" and "catch throw".
	The output is mi-ified, the object type being thrown is added,
	you can set a regexp for which objects to stop on both for
	catches & throws.  It adds one target-vector entry to the
	catchpoint support: to_find_exception_catchpoints.  This
	just splits out the "enabling" and the "setting breakpoints
	on catchpoints" parts of the target catchpoint support.

	* breakpoint.c: Define enabled flags & regexp strings.
	(print_it_typical): MI-ify the catchpoint printing info.
	(print_catch_info): New function, for printing info.
	(bpstat_stop_status): Only process the "catch" breakpoint
	that matches the stop address.  Check the catch regexp
	to see if we should stop here.  MI-ify the catch stop
	message.
	(update_exception_catchpoints): New function, more convenient
	client function than target_enable_exception_callback/
	create_exception_catchpoints.
	(current_exception_should_stop): New function.
	(catch_exception_command_1): use update_exception_catchpoints.
	(exception_catchpoints_enabled): New function, needed for the mi 
	command.
	(disable_exception_catch): New function, so you don't have to 
	remove all the catch breakpoints by hand.
	(_initialize_breakpoint): Add set commands for the exception
	type regexp's.
	* breakpoint.h: Add declarations for new functions.
	* hppa-tdep.c: I didn't test this, I just did mutatis mutandi
	changes for the changes I made to the rest of the interface.
	* inftarg.c (child_enable_exception_callback): No longer return
	the SALS, this is done by child_find_exception_catchpoints.
	(child_find_exception_catchpoints): stubbed out version of this.
	(init_child_ops): add child_find_exception_catchpoints.
	* stack.c (catch_info): Still does nothing, but in the new form.
	* symtab.h: Add exception_type to exception_event_record & accessor
	macro.
	* target.c: Add to_find_exception_catchpoints everywhere necessary.
	* target.h: ditto.

	* infcmd.c (_initialize_infcmd): String constants can't have
	un-backslashed newlines.  gcc-3.3 actually makes this an error
	so we ought to fix it...

2003-02-22  Klee Dienes <kdienes@apple.com>

	* objfiles.c (_initialize_objfiles): Rename
	xxx-precompiled-symbol-tables to *-precompiled-symfiles.
	* symfile.c (new_symfile_objfile): Pass prefix to
	allocate_objfile.
	* symtab.c (fixup_section): Only modify the bfd_section if it
	actually differs from the value we will be setting it to (prevents
	errors accessing read-protected cached symfiles).

2003-02-16  Jason Molenda  (jmolenda@apple.com)

	* symmisc.c (print_objfile_statistics): Patch accepted at FSF - use
	the final text that was accepted.

2003-02-12  Jason Molenda  (jmolenda@apple.com)

        * symmisc.c (print_objfile_statistics): Include information about
        the number of psymtabs and symtabs in each object file.

2003-02-11  Jim Ingham (jingham@apple.com)

	* source.c (add_path): Look for quoted strings in the dir
	list, and ingest the quoted string as a whole.

2003-02-07  Klee Dienes <kdienes@apple.com>

 	* valops.c (hand_function_call): Make sure expected_type is
	non-NULL before calling check_typedef on it.

2003-02-06  Jason Molenda  (jmolenda@apple.com)

	* breakpoint.c (reset_allow_objc_selectors_flag): Move function from
	here...
	* linespec.c (reset_allow_objc_selectors_flag): To here.
	(allow_objc_selectors_flag): Define storage for this global.
	* linespec.h: Add prototype and extern for above.
	* symtab.c (allow_objc_selectors_flag): Don't declare storage here.
	(rbreak_command): When setting breakpoints on matching symbol names,
	disable objc_selectors_flag to avoid ambiguous breakpoint dialogue.

2003-02-03  Jim Ingham (jingham@apple.com)

	* valops.c (hand_function_call): If you were passed in an
	expected_type, remember to call check_typedef on it before
	using it. 

	* c-exp.y: For objc++ member data, look at the language
	of the current function to determine whether to emit OP_THIS
	or OP_OBJC_SELF.
	* stack.c (frame_info): For objc++, try cplus_demangle AND
	objc_demangle.
	(get_frame_language): For objc++, report the function's language,
	not the symtabs, since and objc++ file can be a mix of objc and
	c++ functions.
	* top.c (execute_command): Don't complain if the automatic language
	is objc++, and you see the frame language is c++.  This is fine,
	it just means we detected a c++ function.
	* valops.c (value_of_this): For objc++ use the frame's language
	to determine whether to hang the instance data off of "this" or
	"self".  This last bit is kind of bogus, since we are just checking
	what to do here, and then we have to redo the logic in c-exp.y when
	we actually get around to emitting the opcodes.

2003-01-21  Jim Ingham (jingham@apple.com)

        * varobj.h: declare new function varobj_is_fake_child.
        * varobj.c (varobj_is_fake_child): New function, does what it says.

2003-01-14  Jim Ingham (jingham@apple.com)

	* utils.c (fprintf_symbol_filtered): If the language is objcplus,
	then try both C++ demangling, and if that fails, try ObjC demangling.

2003-01-13  Jason Molenda  (jmolenda@apple.com)

	* symtab.c (lookup_symbol): Demangle C++ names if ObjC++.
	(lookup_symbol_aux_minsyms): Don't re-invoke lookup_symbol_aux
	with tricky mangled+mangled name.

2002-01-07  Klee Dienes <kdienes@apple.com>

	* Makefile.in: Remove i387-nat.o.
	* configure.in: Revert host/target Makefile fragment configuring
	to FSF sources.  Update to autoconf-2.57.  Add AC_MSG_CHECKING
	commands for the fragment names.
	* configure: Regenerate.
	
2002-01-07  Klee Dienes <kdienes@apple.com>

	* config/i386/macosx.mt (TDEPFILES): Add machoread.o,
	symread.o, and pefread.o.

2002-01-07  Klee Dienes <kdienes@apple.com>

	* varobj.c (varobj_use_dynamic_type): Default to zero.

2002-01-06  Klee Dienes <kdienes@apple.com>

	* configure.in: Update to use AC_CONFIG_COMMANDS, and to stop
	using CONFIG_HEADERS (for autoconf 2.56).
	* configure: Regenerate.
	* aclocal.m4: Regenerate.
	* Makefile.in: Update to use libtool.

2002-01-06  Klee Dienes <kdienes@apple.com>

	* exec.c: Remove UI_OUT conditionals.
	* infrun.c: Remove UI_OUT conditionals.
	* linespec.c (lookup_symbol_linkage): Provide temporary definition.
	(SYMBOL_PRINT_NAME): Provide temporary definition.
	* osabi.c (gdb_osabi_names): Change "Mac OS X" to "Darwin".	
	* defs.h:  Remove UI_OUT conditionals.
	(enum gdb_osabi): Add GDB_OSABI_DARWIN.

2002-12-15  Klee Dienes <kdienes@apple.com>

	* defs.h: Removed the gxmalloc/gxrealloc/etc. redefinitions.
	* utils.c (nomem): Remove FSF whitespace diffs.
	(xfree): Remove; now provided by libiberty.
 
2002-12-13  Jim Ingham <jingham@apple.com>

	* breakpoint.c (breakpoint_re_set_one): Use a cleanup to reset
	the allow_objc_selectors_flag.

2002-12-11  Klee Dienes  <kdienes@apple.com>

	* ppc-tdep.h (ppc_sysv_abi_push_arguments): Move prototype to
	ppc-linux-tdep section.
	(ppc_darwin_abi_push_arguments): Add prototype.
	* ppc-sysv-tdep.c (round2): Rename to ROUND_UP.
	(ppc_stack_abi): New struct.  Specifies ABI rules for argument
	pushing.
	(ppc_stack_context): New struct.  Stores register/stack state
	throughout an invocation of ppc_push_arugments.
	(ppc_push_argument): New function.
	(ppc_push_arguments): New function, based on what used to be
	ppc_sysv_abi_push_arguments.
	(ppc_sysv_abi_push_arguments): Implement in terms of ppc_push_arguments.
	(ppc_darwin_abi_push_arguments): New function.
	
2002-12-11  Klee Dienes  <kdienes@apple.com>

	* linespec.c (decode_variable): Skip all the way to the end when
	it's not quoted, not just to the end of the last close-paren.

2002-12-11  Klee Dienes  <kdienes@apple.com>

	* gdbtypes.h (type_code_name): Add prototype.
	* gdbtypes.c (type_code_name): New function.  Returns a
	constant string	containing the ASCII name of the type code.
	(recursive_dump_type): Use type_code_name.

2002-12-07  Klee Dienes  <kdienes@apple.com>

	* Makefile.in (COMMON_OBS): Remove machoread.o, symread.o, and
	pefread.o.
	* config/powerpc/macosx.mt (TDEPFILES): add machoread.o,
	symread.o, and pefread.o.
	* config/i386/macosx.mt (TDEPFILES): add machoread.o,
	symread.o, and pefread.o.

2002-12-06  Klee Dienes  <kdienes@apple.com>

	* dbxread.c (read_dbx_symtab): Ignore BINCLs that are
	immediately followed by EINCLs.

2002-12-06  Klee Dienes  <kdienes@apple.com>

	* dbxread.c (header_file_location): New field 'hash'.
	(add_bincl_to_list): Set the 'hash' field.
	(find_corresponding_bincl_psymtab): Compute the hash of 'name'
	and use that to pre-check the comparison.
 
2002-12-07  Klee Dienes  <kdienes@apple.com>

	* infrun.c: Replace step_frame_address with step_frame_id.
	Use frame_id_eq to compare frame IDs.

2002-11-30  Klee Dienes  <kdienes@apple.com>

	* stabsread.h (dbx_lookup_type): Add objfile to the signature.
	* bcache.c (bcache_specify_allocation_with arg): Update prototype.
	(bcache_specify_allocation): Update prototype.
	* bcache.h (bcache_specify_allocation_with arg): Update prototype.
	(bcache_specify_allocation): Update prototype.
	* buildsym.c (finish_block): Clear the field structs before using.
	* gdbarch.h (*_gdb_arch_swap): Add prototypes.
	* gdbarch.c (*_gdb_arch_swap): Make statics.
	* gdbtypes.c (check_stub_method_group): Use TYPE_ALLOC to allocate
	TYPE_FN_FIELDLIST_NAME, not xmalloc.
	* objfiles.h (link_objfile): Add prototype.
	* objfiles.c (link_objfile): New function.
	(allocate_objfile): Update to use linn_objfile.
	(unlink_objfile): Update comment.
	* gdbtypes.h (INIT_CPLUS_SPECIFIC): Use a NULL value to mean "no
	cplus data".
	(HAVE_CPLUS_STRUCT): Update to the new convention.
	(TYPE_CPLUS_SPECIFIC_NONULL): Return a pointer to an empty cplus
	struct if called for a type with a NULL cplus struct pointer.
	(TYPE_xxx): Update to use TYPE_CPLUS_SPECIFIC_NONULL.
	* hpread.c (hpread_alloc_type): Rely on alloc_type to leave the
	cplus_specific field set to NULL.
	* mdebugread.c (new_type): Ditto.
	* stabsread.c (rs6000_builtin_type): Pass in an objfile;
	use when allocating new types.
	(dbx_lookup_type): Add objfile to the prototype for use when
	allocating new types.  No longer cache returned types; just create
	a new one on the objfile type obstack for each call --- fix this later.
	(read_cfront_member_functions): Allocate the new physname on the
	type obstack.
	(define_symbol): Update calls to use the new dbx_lookup_type_interface.
	(update_method_from_phsyname): Pass in an objfile; use to store
	the returned method name.
	(read_member_functions): Use obsavestring, not savestring;
	obconcat, not concat; use new signature for
	update_method_name_from_physname.
	(read_one_struct_field): Use obsavestring, not savestring.
	(read_cfront_static_fields): Use obsavestring, not savestring.
	(read_args): Use obstack_alloc, not xmalloc for the new field structs.
	
2002-11-23  Klee Dienes  <kdienes@apple.com>

	* objfiles.c (objfile_relocate): Be smarter about how we sort
	the line-table.

2002-11-23  Klee Dienes  <kdienes@apple.com>

	symfile.c (symbol_file_add_bfd): ANSIfy prototype.

2002-11-23  Klee Dienes  <kdienes@apple.com>

	* objfiles.c: Include buildsym.h.
	(objfile_relocate): Re-sort the linetable after relocating.
	* Makefile.in (objfiles.o): Update dependencies.
	* buildsym.c (compare_line_numbers): Make global.
	* buildsym.h (compare_line_numbers): Add prototype.

2002-11-22  Klee Dienes  <kdienes@apple.com>

	* eval.c: Change NSSTRING->OBJC_NSSTRING, SELECTOR->OBJC_SELECTOR,
	etc., to match the FSF patches.
	* frame.h (frame_type): Remove merge typo.

2002-11-22  Klee Dienes  <kdienes@apple.com>

	* c-exp.y: Convert Obj-C to ObjC in comments.
	Change NSSTRING->OBJC_NSSTRING, SELECTOR->OBJC_SELECTOR, etc.,
	to match the FSF patches.
	* defs.h (xrealloc): Define to gxrealloc, not grealloc.
	* stack.c: Merge Jason's fixes to print MI information for
	synthetic stack frames to the FSF sources.

2002-11-22  Klee Dienes  <kdienes@apple.com>

	* thread.c (do_captured_thread_select): Pass the user-visible
	thread-id (1, 2, etc.) to context_hook, not the internal
	thread-id.

2002-11-21  Klee Dienes  <kdienes@apple.com>

	* objc-lang.c (print_object_command): Validate the address before
	passing it to the print routine.

2002-11-19  Jason Molenda  (jmolenda@apple.com)

	* printcmd.c (_initialize_printcmd): Add alias "set var" for
	"set variable" to avoid a few testsuite failures 
	(gdb.c++/anon-union.exp) that depend on "set var" being 
	unambiguous (due to our addition of 'varobj-print-object').

2002-11-15  Jason Molenda  (jmolenda@apple.com)

        * stack.c (print_frame_info_base): Apply patch submitted to FSF
        to print proper FRAME tuple for synthesized frames (call dummies,
        signal handlers), plus one Apple local change.
	* thread.c (gdb_thread_select): Drop Apple local changed I'd added
	a few weeks back - KeithS fixed it differently in mi/mi-main.c and
	my solution was causing a double-free error when mixed with his.

2002-11-18  Klee Dienes  <kdienes@apple.com>

	* defs.h: Declare gxmalloc/gxrealloc/gxcalloc/gxfree.  Define
	xmalloc/xrealloc/xcalloc/xfree to refer to them (to prevent
	name conflicts with liberty).
	* infrun.c: Use xstrdup instead of strsave.
	* interpreter.c: Use xstrdup instead of strsave.
	* main.c: Use xstrdup instead of strsave.
	* top.c: Use xstrdup instead of strsave.
	* utils.c: Remove NeXT-specific code.o Remove GDB_FILE_ISATTY.
	Convert several functions to ANSI prototypes.  Remove special-case
	for size_t definition.  Remove strsave.  Re-add xmalloc/xmmalloc
	definitions from the FSF sources.
	* config/i386/macosx.mh: Remove special-case of TERMCAP.
	* config/powerpc/macosx.mh: Remove special-case of TERMCAP.
	
2002-11-16  Klee Dienes  <kdienes@apple.com>

	* jv-lang.c: Use FSF_OBJFILES as the condition to choose FSF
	vs. Apple objfile support.
	* objfiles.c: Ditto.
	* symfile.c: Ditto.

2002-11-15  Klee Dienes  <kdienes@apple.com>

	* Makefile.in: Remove MACOSX_NAT_DEPFILES; the four files in
	question should be platform-independent.  Re-add cached-symfile.o,
	machoread.o, symread.o, and pefread.o to COMMON_OBS.
	* configure.in: No longer default --with-mmalloc to true; it
	should work without it.  Remove OSX-specific config tests.

2002-11-15  Klee Dienes  <kdienes@apple.com>

	* stabsread.c (read_args): Re-write.  Fixed stack underflows
	for 0 or 1 types specified and overflow for > 1024 type specified.

2002-11-15  Klee Dienes  <kdienes@apple.com>

	* config/nm-macosx.h: Define ENABLE...MACOSX...HACKS... .

2002-11-15  Klee Dienes  <kdienes@apple.com>

	* symmisc.c (maintenance_check_symtabs): Also check the mangled
	name when doing the "only found in".  A bit of a hack, but
	pending a fix to lookup_block_symbol, it's the only practical way.

2002-11-15  Klee Dienes  <kdienes@apple.com>

	* symtab.c (symbol_init_demangled_name): Re-write.  Try C++
	demangling for Objective-C++ code as well as C++ code.

2002-11-15  Klee Dienes  <kdienes@apple.com>

	* objfiles.c (allocate_objfile): Initialize symflags to -1 (all
	bits set).

2002-11-15  Klee Dienes  <kdienes@apple.com>
	
	* buildsym.h (pop_context): Check for stack underflow.
	* dbxread.c (process_one_symbol): Complain and stop processing
	that symbol if we are already at the top of the context stack for
	a function-end N_FUN (this would imply an umatched RBRAC).  Ditto
	when processing N_RBRAC.

2002-11-11  Klee Dienes  <kdienes@apple.com>

	* linespec.c: Remove whitespace diffs from the FSF sources.

2002-11-10  Klee Dienes  <kdienes@apple.com>

	* valarith.c (value_subscripted_rvalue): Set the VALUE_REGNO
	field of the new value to that of the type being subscripted.
	* value.h (struct value): Update comment.

2002-11-10  Klee Dienes  <kdienes@apple.com>

	* c-exp.y (yylex): Store the initial character of the token in
	tokchr.  Use to determine if a string is a string (tokchr is '"')
	or a nsstring (tokchr is '@').
	* linespec.c (decode_objc): No longer pass next_component.
	(decode_line_1): Move the Obj-C selector parsing before the file
	check.  Objective-C functions with a filename:function created by
	a previous canonicalization will already be fully canonicalized;
	we don't support users typing 'break file:selector'.

2002-11-10  Klee Dienes  <kdienes@apple.com>

	* linespec.c (set_flags): Add new parameter, if_pointer;
	returns pointer to the space before the 'if' in an if-clause, if
	present.
	(decode_line_1): Factor into decode_line_1 and decode_line_2;
	decode_line_2 contains the "guts"; while decode_line_1 calls
	set_flags, and conceals the trailing 'if'.

2002-11-09  Klee Dienes  <kdienes@apple.com>

	* corelow.c (core_close): Use target_resize_to_sections
	instead of resizing to_sections by hand.
	* exec.c (exec_close): Ditto.
	* defs.h (strsave): Add prototype.
	* symfile.c (syms_from_objfile): Call new_symfile_objfile and
	target_new_objfile_hook even if the symfile had no symbols.
	* target.c (target_info): Display the information for
	current_target in place of the top target-stack entry.
	(target_resize_to_sections): Also update
	current_target.to_sections, if appropriate.
	* cached-symfile.c: Fix a few warnings.

2002-11-08  Klee Dienes   <kdienes@apple.com>

	* breakpoint.c (do_captured_breakpoint): Ignore
	future-breakpoints if no address string is specified.

2002-11-07  Klee Dienes   <kdienes@apple.com>

	* infrun.c (handle_inferior_event): Remove the extra "[Switching
	to ...]" message; just rely on the one from normal_stop.  We had
	used this message as a poor-man's thread-created notification,
	which I'm not sure was ever really all that useful (this is a
	reversion to the FSF sources).

2002-11-07  Jim Ingham   <jingham@apple.com>

        * varobj.c (value_of_child): If we change the value we get from
	the lang->value_of_child, we need to free the old value, and
	release the new one.

	* varobj.c (value_of_child): Don't apply gdb_value_ind to a 
	base class whose typecode is TYPE_CODE_REF.  You already have
	the address of the class structure, so this is unnecessary.

	* stabsread.c (update_method_name_from_physname): Complain rather
	than erroring here.  The fact that you can't demangle one method
	shouldn't abort the whole symbol parsing.

2002-11-06  Klee Dienes  <kdienes@apple.com>

	* exec.c (exec_close): Only call macosx_init_dyld_symfile if
	we're not quitting.

2002-11-06  Klee Dienes  <kdienes@apple.com>

	* exec.c (exec_close): Call macosx_init_dyld_symfile to notify the
	macosx layer of the exec_bfd change.
	(exec_file_attach): Ditto.

2002-11-01  Klee Dienes  <kdienes@apple.com>

	* utils.c (init_mmalloc_default_pool): Use a page-checked
	allocator instead of malloc as the default allocator if
	GDB_ENABLE_PAGECHECK is set in the environment.  Wrap the default
	allocator with mmalloc_check_create if GDB_ENABLE_MMALLOC_CHECK is
	set.
	
2002-11-01  Klee Dienes  <kdienes@apple.com>

	* cp-abi.c (set_cp_abi_as_auto_default): Alloc (len + 1) when
	allocating a string, not just len.

2002-10-30  Jim Ingham   <jingham@apple.com>

	Changes to make the varobj variables track the dynamic type
	of C++ class pointers:

	* varobj.c: Added dynamic_type field to the varobj struct.
	* Added a varobj_changelist to hand to clients, instead of 
	handing out an array of varobj's.
	* Added a varobj_type_changed enum to make the type change
	code easier to read.  This also passes through the 
	value_of_{root,child} functions.
	* Added safe versions of value_rtti_type & 
	value_rtti_target_type.
	* (varobj_fixup_value): New function.  This determines the dynamic 
	type from rtti, and fixes up the value to include the dynamic object.
	* (varobj_create): use varobj_fixup_value.
	* (varobj_get_dynamic_type) new function, gets a string representation
	of the dynamic type.
	* (varobj_update): instead of handing back a list of varobj's,
	hand back a token to a changelist, which clients can use 
	varobj_changelist_pop to retrieve the contents.  Handle the case of
	dynamic type changing both for a root variable and its children.
	* (create_child): value_of_child needs a type_changed.
	* (new_variable): initialize dynamic_type.
	* (get_type): use the dynamic type if present.
	* (varobj_changelist_init, varobj_changelist_pop, varobj_add_to_changelist):
	New functions, manipulate the varobj_update changelist.
	* (varobj_type_is_equal_p): New utility function.
	* (value_of_root): handle dynamic type changing.
	* (value_of_child): use varobj_fixup_value, handle dynamic type
	changing.
	* (type_changeable -> varobj_value_is_changeable_p): Old name was
	confusing, since it has nothing to do with types changing.
	* (c_value_of_root): use varobj_fixup_value, handle type changes.
	* (c_type_of_child): protect against null child.
	* (_initialize_varobj): Add a set variable to turn off dynamic type
	determination.

	* varobj.h: Added varobj_type_change, opaque reference to 
	varobj_changelist, updated varobj_update, and added 
	varobj_changelist_pop.

	* also changed mi-cmd-var.c to match these changes.

2002-10-30  Jason Molenda  (jmolenda@apple.com)

        * ui-out.c (ui_out_cleanup_after_error): Move table close out of
        levels-loop.  Adjust closing to work for either tuples or lists.

2002-10-30  Klee Dienes  <kdienes@apple.com>

	* exec.c (exec_file_attach): Replace checks for __i386__ and
	__ppc__ with TARGET_I386 and TARGET_POWERPC.  This is still ugly,
	but at least it's not broken when cross-compiling.
	* symfile.c (symfile_bfd_open): Ditto.
	(reread_symbols): Ditto.

2002-10-29  Klee Dienes  <kdienes@apple.com>

	* breakpoint.c (bpstat_copy): Copy the command lines as well
	as the old value, to match what is freed in bpstat_clear.

2002-10-28  Klee Dienes  <kdienes@apple.com>

	* Makefile.in: Rename INTL_DEPS to INTL_DEP, to match other variable names.
	Remove the strip-gdb target; integrate into the gdb and
	insight targets themselves.  Add new variables LIBTOOL and
	LINK; use in the gdb and insight link commands.
	* configure.in: Add AC_PROG_LIBTOOL.
	* configure: Regenerate.
	* aclocal.m4: Regenerate.

2002-10-28  Klee Dienes  <kdienes@apple.com>

	* symtab.c (find_line_pc_helper): Remove; integrate
	into find_line_pc_range.
	(find_line_pc): No longer use the value passed in for 'pc';
	set it to zero at the start of the function.
	(find_line_pc_range): Only open the source file if
	lines_are_chars is set.  Integrate find_line_pc_helper.

2002-10-28  Klee Dienes  <kdienes@apple.com>

	* config/nm-macosx.h: Move declarations of functions for
	macros next to the macros that use them.
	
2002-10-24  Jason Molenda  (jmolenda@apple.com)

	* Makefile.in (MACOSX_NAT_DEPFILES): New variable to list MacOS X
	specific object files.
	(COMMON_OBS): Don't list MacOS X specific object files here.
	* configure.in: Only enable mmalloc by default on MacOS X systems.
	(MACOSX_NAT_DEPFILES): List MacOS X specific object files.
	* config.in, configure: Regenerated.
	* gcore.c (derive_heap_segment): Fix up find_function_in_inferior
	call to match new calling convention.
	* objfiles.c: Replace #if 0's with host detection macro.
	(allocate_objfile): Fix up bcache_xmalloc() calls.
	* jv-lang.c (get_dynamics_objfile): On only MacOS X systems, use
	MacOS X specific allocate_objfile() call.
	* symfile.c (symbol_file_add_bfd):  On only MacOS X systems, use
	MacOS X specific allocate_objfile() call.

2002-10-23  Klee Dienes  <kdienes@apple.com>

	* infrun.c (handle_inferior_event): No longer do
	DECR_PC_AFTER_BREAK after a watchpoint, as it breaks
	page-protection watchpoints on i386.  This is likely non-portable;
	my guess is that we will need to add a DECR_PC_AFTER_WATCHPOINT
	target macro.

2002-10-23  Klee Dienes <kdienes@apple.com>

	* config/powerpc/nm-ppc-macosx.h: Remove definition of
	TARGET_NATIVE (it's unused in the current sources).

2002-10-22  Jason Molenda  (jmolenda@apple.com)

	* varobj.c (varobj_set_display_format): Recognize unsigned setting.

2002-10-21  Klee Dienes  <kdienes@apple.com>

	* c-exp.y ('0' - '9'): Use 'tokchr' for the first character,
	not 'c'.

2002-10-21  Klee Dienes  <kdienes@apple.com>

	* c-exp.y ('0' - '9'): Revert to FSF code; memory leak in
	parse_number has since been fixed.

2002-10-21  Klee Dienes  <kdienes@apple.com>

	* config/nm-macosx.h (macosx_solib_add): Add prototype.
	(macosx_disable_page_protection_events): Add prototype.

2002-10-17  Klee Dienes  <kdienes@apple.com>

	* Makefile.in (version.c): Use the default FSF version if
	$(VERSION) is not set by the Makefile.

2002-10-17  Klee Dienes  <kdienes@apple.com>

	* symfile.c (syms_from_objfile) On macosx systems, call
	macosx_init_dyld_symfile to notify the dyld layer of the
	update to symfile_objfile.
	(new_symfile_objfile): Ditto.

2002-10-16  Jason Molenda  (jmolenda@apple.com)

	* objc-lang.c (_initialize_objc_language): Remove extraneous \n at
	end of help msg.
	* thread.c (gdb_thread_select): On failure, return GDB_RC_FAIL.

2002-10-16  Jim Ingham   <jingham@apple.com>

	* configure, configure.in: Turn off gdbtk by default for
	Mac OS X.

2002-10-16  Klee Dienes  <kdienes@apple.com>

	* stabsread.c (read_tilde_fields): Use name[sizeof(vptr_name)-2]
	to get the last character of a char[] buffer, not
	name[sizeof(vptr_name)-1].

2002-10-16  Klee Dienes  <kdienes@apple.com>

	* dbxread.c (read_type_psym_p): Default to 'set'.

2002-10-14  Klee Dienes  <kdienes@apple.com>

	* c-valprint.c (c_val_print): Print "<unknown type>", not "<error
	type>", for TYPE_CODE_ERROR.  It would perhaps be worth adding a
	new enum to distinguish TYPE_CODE_ERROR from TYPE_CODE_UNKNOWN,
	but for the moment, the "<error type>" is rather confusing to the
	user.
	* f-valprint.c (f_val_print): Ditto.
	* p-valprint.c (p_val_print): Ditto.
	
2002-10-14  Klee Dienes  <kdienes@apple.com>

	* symfile.c (symbol_file_clear): Only clear symfile_objfile, not
	all objfiles, in response to 'symbol-file' with no argument.  Call
	macosx_dyld_init_symfile to properly update the macosx conception
	of the current set of load-state.

2002-10-13  Klee Dienes  <kdienes@apple.com>

	* arch-utils.c (generic_dynamic_trampoline_nextpc): Add.
	* arch-utils.h (generic_dynamic_trampoline_nextpc): Add.
	* gdbarch.sh (DYNAMIC_TRAMPOLINE_NEXTPC): Add.
	* gdbarch.c: Regenerate.
	* gdbarch.c: Ditto.
	
2002-10-06  Klee Dienes  <kdienes@apple.com>

	* rs6000-tdep.c (rs6000_info_powerpc_command): Make global.
	* ppc-tdep.h (rs6000_info_powerpc_command): Add prototype.
	* rs6000-tdep.c (info_powerpc_cmdlist): Make global.
	* ppc-tdep.h (info_powerpc_cmdlist): Add prototype.

2002-10-06  Klee Dienes  <kdienes@apple.com>

	* findvar.c (read_memory_typed_address): New function.
	* gdbcore.h (read_memory_typed_address): Add prototype.
        * blockframe.c (sigtramp_saved_pc): Use
        read_memory_typed_address to read a value destined for a
        CORE_ADDR, not read_memory_integer.
        * f-valprint.c (f77_get_dynamic_upperbound): Ditto.
        (f77_get_dynamic_lowerbound): Ditto.
	* symfile.c (simple_read_overlay_region_table): Revert
	to read_memory_integer (I believe this is incorrect, but the
	code is commented out, and I don't have a good way to test
	it).

2002-10-05  Klee Dienes  <kdienes@apple.com>

	* blockframe.c: Revert whitespace changes from the Cygnus sources.
	* gnu-nat.c: Revert to Cygnus sources.
	* i386-tdep.c: Restore read_memory_unsigned_integer to
	read_memory_integer.

2002-10-05  Klee Dienes  <kdienes@apple.com>

	* config/xm-aix4.h config/xm-nbsd.h config/alpha/xm-alphalinux.h
	config/alpha/xm-alphaosf.h config/arm/xm-linux.h
	config/i386/linux.mh config/i386/nm-fbsd.h config/i386/nm-linux.h
	config/i386/xm-cygwin.h config/i386/xm-i386bsd.h
	config/i386/xm-i386gnu.h config/i386/xm-i386v.h
	config/i386/xm-ptx.h config/i386/xm-symmetry.h
	config/ia64/xm-aix.h config/ia64/xm-linux.h
	config/m68k/xm-apollo68b.h config/m68k/xm-apollo68v.h
	config/m68k/xm-delta68.h config/m68k/xm-dpx2.h
	config/m68k/xm-hp300bsd.h config/m68k/xm-hp300hpux.h
	config/m68k/xm-m68k.h config/m68k/xm-sun2.h config/m68k/xm-sun3.h
	config/mips/xm-irix3.h config/mips/xm-irix5.h
	config/mips/xm-linux.h config/mips/xm-mips.h
	config/mips/xm-mipsm3.h config/mips/xm-riscos.h
	config/pa/hpux1020.mt config/pa/tm-hppa.h config/pa/tm-hppah.h
	config/pa/xm-hppab.h config/pa/xm-hppah.h
	config/powerpc/xm-linux.h config/rs6000/xm-rs6000.h
	config/s390/xm-linux.h config/sparc/tm-sparc.h config/vax/xm-vax.h:
	Revert to Cygnus sources.

2002-10-05  Klee Dienes  <kdienes@apple.com>

	* Makefile.in: Fold the Apple search-path changes into the target
	for init.c.  This was specifically necessary in order to ensure
	that _initialize_gdbtypes was called first among the init
	functions (see the comment in gdbtypes.c).
	* osabi.h (enum gdb_osabi): Add GDB_OSABI_MACOSX.
	* osabi.c (gdb_osabi_names): Add string for GDB_OSABI_MACOSX.

2002-10-05  Klee Dienes  <kdienes@apple.com>

	* i387-tdep.c (i387_supply_register): When called with NULL as a
	buffer, mark the register as not provided (to mirror the behavior
	of supply_register).
	(i387_supply_fxsave): Ditto.
	(i387_supply_fsave): Ditto (inherits the behavior from i387_supply_register).

2002-10-04  Klee Dienes  <kdienes@apple.com>

	* c-exp.y: Minor stylistic fixes (periods and capitals in
	comments, etc.).
	(yyerror): Remove test for lexptr being non-empty
	(the upstream code now gives the string a correct value even at
	end-of-file).

2002-10-04  Klee Dienes  <kdienes@apple.com>

	* infcmd.c (default_print_registers_info): Print vectors and
	floats in 'natural' form, followed by the raw contents of the
	register.  Print other types in hex, followed by their natural
	form.

2002-10-03  Jason Molenda  (jmolenda@apple.com)

	* blockframe.c (flush_cached_frames): Drop Apple local change which
	trips up annotate test cases - looks like someone was being overly
	ambitious and trying to avoid unnecessary "frames-invalid" markers
	for annotate consumers.  Innovation in annotate is not a good idea.

2002-09-27  Jason Molenda  (jmolenda@apple.com)

        * symtab.c (make_symbol_overload_list): Fix thinko that was truncating
        overload-candidate func name.

2002-09-26  Klee Dienes  <kdienes@apple.com>

	* varobj.c (varobj_create): Use warning to report a warning, not
	fprintf_unfiltered.

2002-09-24  Klee Dienes  <kdienes@apple.com>

	The basic goal of this patch is to fix some inconsistencies in how
	GDB handles shared libraries.  Previously, the OSX "dyld" shared
	library table was built up using the primary symbol file as a
	base, and section tables were updated using the list of active
	objfiles.  This was not only "intuitively" wrong, it also led to
	errors when the exec file wasn't the same as the symbol file
	(i.e., didn't match it at all, for example because we were loading
	in saved data from a file created using the 'dump' command).  In
	cases like that, the section table would as often as not end up
	pointing to the section from the sybol file, not the file of
	dumped data.  Also, using just 'exec-file' and not 'symbol-file'
	would cause GDB to get into a bad state, and unable to run the
	program.  This patch fixes both problems.  It also has the happy
	side-effect of removing a huge chunk of diffs from objfiles.c
	
	* objfiles.c (update_section_tables): Remove.
	* objfiles.c (open_mapped_objfile, open_existing_mapped_file,
	add_to_objfile_sections, build_objfile_section_table,
	allocate_objfile): Revert from Cygnus objfiles.c.  Most of these
	functions are not used, but reverting to the Cygnus versions will
	make merges less painful.
        * exec.c (solib_add_stub): Add.
        * exec.c (exec_file_attach): Call
        solib_add_stub after changing the exec file, so the sharedlibrary
        code can update other libraries the new executable might pull in.
        * symfile.c (symbol_file_add_bfd): No longer call update_section_tables ().
	* symfile.c (symbol_file_add_main_1): Add exec_bfd parameter to
	macosx_init_dyld_symfile.
	* objfiles.h (update_section_tables): Remove prototype.

2002-09-24  Klee Dienes  <kdienes@apple.com>

	* valops.c: Remove obsolete STACK_ALLOC definitions.

2002-09-24  Klee Dienes  <kdienes@apple.com>

	* Makefile.in: Don't create
	$(FRAMEWORK).framework/Versions/Current/Headers/cli twice; it causes
	an error.

2002-09-24  Klee Dienes  <kdienes@apple.com>

	* config/nm-macosx.h: Re-indent.  Pass parameters to
	macosx_add_shared_symbol_files().  Re-define SOLIB_ADD from
	macosx_try_start_dyld to macosx_solib_add; pass all parameters.
	* config/{i386,powerpc}/macosx.{mh,mt}: 
	Convert spaces to tabs in MACOSX_FILES and CFM_FILES.
	* config/powerpc/macosx.mh: Remove definition of NS_TARGET_MAJOR.
	* config/{i386,powerpc}/macosx.mh: Add -Wall -Wimplicit -Wno-long-double to CFLAGS.
	
2002-09-23  Jim Ingham  (jingham@apple.com)

        * blockframe.c (refine_prologue_limit): moved here from rs6000-tdep.c so
	I could use it in ppc-macosx-tdep.c.  Also pass 
	max_skip_non_prologue_insns as a parameter.
	* frame.h: declare refine_prologue_limit.
	* rs6000-tdep.c: remove refine_prologue_limit, change calls to it to pass
	the max_skip_non_prologue_insns.

2002-09-21  Jason Molenda  (jmolenda@apple.com)

	* linespec.c (decode_line_1a): Pop over finishing apostrophy character,
	don't let do_captured_breakpoint get confused by it.  Fixes this -
(gdb) break 'inheritance2'
        from gdb.c++/classes.exp.

2002-09-20  Jason Molenda  (jmolenda@apple.com)

	* rs6000-tdep.c: Make rs6000_pop_frame() externally visible.
	* ppc-tdep.h: Provide prototype for rs6000_pop_frame().

2002-09-19  Klee Dienes  <kdienes@apple.com>

	* valops.c (hand_function_call): Remove errant second call of
	find_function_addr().

2002-09-18  Jason Molenda  (jmolenda@apple.com)

	* maint.c (_initialize_maint_cmds): Remove mention of 'chill' from
	'help maint' and 'maint demangle'.

2002-09-17  Jim Ingham (jingham@apple.com)

	* infcmd.c (break_command): Don't disable stdin BEFORE asking
	a question!

2002-09-16  Jason Molenda  (jmolenda@apple.com)

	* top.c (init_main): Remove errant space char in help text.

2002-09-13  Jason Molenda  (jmolenda@apple.com)

	* symtab.c (make_file_symbol_completion_list): Remove two errant
	exits from function that prevent returning a completion list of
	all symbols. Fixes this failure:

FAIL: gdb.base/completion.exp: (timeout) complete (2) 'p no_var_named_this-'


2002-09-09  Jason Molenda  (jmolenda@apple.com)

	* breakpoint.c (print_one_breakpoint, breakpoint_1): Revert these
	to the FSF versions--drop additional table columns which worked
	around a now-fixed UI bug.

2002-08-27  Klee Dienes  <kdienes@apple.com>

	* linespec.c (decode_line_2): Prototype.
	(decode_line_1): Rename to decode_line_1a; move has_if support to
	a wrapper function and move out to decode_line_1.

	* rs6000-tdep.c: Hack to allow use as part of the Mac OS X target.
	Define TEXT_SEGMENT_BASE if not already defined; rename
	_initialize_rs6000_tdep to x_initialize_rs6000_tdep so it is not
	called automaticallly (it conflicts with the ppc-macosx-tdep to
	attempt to register and arch handler for powerpc).
	
	* valops.c (hand_function_call): Revert to Cygnus sources.  Re-add
	the cached value and expected-type support.

	* gdb/config/powerpc/macosx.mt: Add rs6000-tdep.o and ppc-sysv-tdep.o.

2002-08-14  Jason Molenda  (jmolenda@apple.com)
 
 	* breakpoint.c (breakpoint_re_set_one): Save recomputed expression
 	in watchpoint.

2002-08-06  Klee Dienes  <kdienes@bluegill.localnet>

	* breakpoint.c (watchpoint_equal): New function.  Like
	value_equal, but arrays only count as "equal" if they have the
	same contents.
	(watchpoint_check): Update to use watchpoint_equal.
	(breakpoint_re_set_one): Remove watchpoints if there is an error
	in setting them.
	(config/nm-macosx.h): Rename
	TARGET_RANGE_PROFITABLE_FOR_HW_WATCHPOINT to
	TARGET_RANGE_OK_FOR_HW_WATCHPOINT.
	
2002-08-09  Jason Molenda  (jmolenda@apple.com)

	* breakpoint.c (breakpoint_re_set_one): Rewrite last patch by Klee
        to remove unnecessary code from hardware watchpoint resetting.  
	(write_one_breakpoint): Write out watchpoints correctly.
	* wrapper.h: Include varobj.h for its juicy type decls.

2002-07-12  Jim Ingham   <jingham@apple.com>

	* i386-tdep.c (i386_get_frame_setup): In two places a variable
	(pos) is used to hold an address, but declared int rather than
	CORE_ADDR.  Fixed this.

2002-07-10  Jim Ingham   <jingham@apple.com>

	* dbxread.c (process_one_symbol): Use last_function_start rather
	than function_start_offset to find the real beginning of the
	current function.  The latter is just the text section offset on
	some systems, the latter is always the real function start...

2002-07-09  Jim Ingham   <jingham@apple.com>

        * objfiles.h: declare objfile_demangle_symbols since we use
	in in more than one file...

	* symfile.c: Fix the usage message for add-symbol-file.
	
2002-07-02  Jim Ingham   <jingham@apple.com>

	* varobj.c (create_child): Move the test for child->value AFTER you
	have created it, dope...

2002-06-12  Klee Dienes  <kdienes@law.apple.com>

	* config/i386/xm-i386-macosx.h: Remove the definitions for
	HOST_FLOAT_FORMAT, HOST_DOUBLE_FORMAT, and HOST_LONG_DOUBLE_FORMAT
	(they are in xm-i386.h).

2002-06-12  Klee Dienes  <kdienes@law.apple.com>

	* i386-tdep.c (i386_skip_prologue): This should take a CORE_ADDR,
	not an int.
	* config/i386/tm-i386.h (i386_skip_prologue): Update prototype.

2002-06-10  Jim Ingham  <jingham@apple.com>

	* breakpoint.c (breakpoint_stop_status): If we threw away the 
        previous expression for the breakpoint condition, rebuild it here. 
        (breakpoint_re_set_one): Discard & null out the parsed expression,
        but don't try to reparse it here, or we will recurse infinitely
        trying to reset the breakpoint if we need to call into the 
        inferior to parse the expression.
        
        * minsyms.c (install_minimal_symbols): when we demangle symbols
        for an objfile, set the minimal_symbols_demangled flag so we
        don't do it all over again in objfile_demangle_msymbols.
        FIXME: in the long run, we should see whether we really need to
        do objfile_demangle_msymbols, since the net version doesn't need
        to...
        
2002-06-07  Jim Ingham  <jingham@apple.com>

	* breakpoint.c (bpstat_do_actions): Notice whether we have run
	any commands, and if so, emit a ui_out "notify" message when
	we are done running them.
	(print_it_typical): add a uiout field to the breakpoint hit
	stopped message saying whether there are any commands associated
	with this stop.
	* ui-out.h: Add notify_begin & notify_end function slots to the
	ui_out_impl structure.  Also declare ui_out_notify_begin & 
	ui_out_notify_end.
	* ui-out.c: Add the default_notify_begin & _end functions to the 
        default impl, and implement the ui_out & uo_out versions.
	Also added a make_cleanup_ui_out_notify_begin_end function,
	for use if you are going to do any work between starting & 
	ending the notify session.
	* cli-out.c: Add NULL's for the cli version of the notify functions.
	
2002-05-31  Jim Ingham  <jingham@apple.com>

	* config/powerpc/xm-ppc-macosx.h: Add defines for HOST_*_FORMAT
	for floats, doubles & long doubles.  This will sidestep trying to 
	convert floats from ppc native format to ppc native format, an 
	amusing but pointless exercise...
	* config/i386/xm-i386-macosx.h: ditto.

2002-05-30  Rab Hagy <rhagy@apple.com>

      * varobj.c, varobj.h: added "unsigned" format specification
      * stack.c: added frame pointer to output of a stack frame (for MI only)

2002-05-21  Jim Ingham  <jingham@apple.com>

	* varobj.c (create_child): Don't do strncmp to set fake_child, or
	you will get false positives...
	(cplus_make_name_of_child): The logic for doing index -> {"public",
	"private", "protected"} was faulty.

2002-05-16  Klee Dienes  <kdienes@bluegill.localnet>

	* Makefile.in: no longer define free to xfree; all instances of
	free in the sources should now be converted.

	* xm-macosx.h: ditto.

	* Makefile.in: add cached-symfile.{c,o}

	* breakpoint.c: convert instances of free to xfree.
	* expprint.c: convert instances of free to xfree.
	* interpreter.c: convert instances of free to xfree.
	* linespec.c:  convert instances of free to xfree.
	* objc-lang.c: convert instances of free to xfree.
	* core-macho.c: convert instances of free to xfree.
	* macosx-nat-dyld-info.c: convert instances of free to xfree.
	* macosx-nat-dyld-info.c: convert instances of asprintf to xasprintf.
	* macosx-nat-dyld-io.c: convert instances of asprintf to xasprintf.
	* macosx-nat-dyld-path.c: define strsave as xstrdup, not savestring.
	* macosx-nat-dyld-path.c: convert instances of free to xfree.
	* macosx-nat-dyld-process.c: convert instances of free to xfree.
	* macosx-nat-dyld.c: define strsave as xstrdup, not savestring.
	* macosx-nat-info.c: convert instances of free to xfree.
	* macosx-nat-info.c: convert instances of malloc to xmalloc.
	
	* utils.c (xvasprintf): use xstrdup to malloc the resulting string
	instead of the system malloc, so it can be passed to xfree without
	incident.

	* mi-main.c: add mi_interpreter_exec; add to the interpreter struct
	(so that interpreter-exec can also run MI commands).

	* dbxread.c: disable mapping string tables (mmap_strtabflag) by
	default.

	* defs.h: init_malloc now returns a mmalloc pool, possibly
	different from the one passed in (to support returning a
	mmalloc_check pool based on the pool passed in).

	* doublest.c: define NaN to be 0.0 regardless if it is defined by
	the system, to work around __nan issues on WWDC build.

	* objfiles.c: remove allocate_objfile and all related functions;
	replace with new functions in cached-symfile.c

	* objfiles.c: add new variables	'generate-persistent-symbol-tables'
	and 'use-persistent-symbol-tables'.

	* symfile.c: no longer force HAVE_MMAP to 0.  remove test for
	bfd_supports_mmmap (bfd can simply return error from
	bfd_mmap_file).  add "mapaddr" agrument to add-symbol-file.
	re-enable zeroing of msymbol table hash when creating objfile.
	
	* thread.c: properly cleanup the ui_out when there is an error
	generating the thread list.

	* utils.c (init_mmalloc_default_pool): create a mmalloc pool that
	defaults to system malloc, using mmalloc_malloc_create.
	(init_malloc): create a mmalloc_checked_malloc zone based on the
	mmalloc zone passed in, rather than modifying it in place using th
	mmcheckf interface.

	
2002-05-14  Jim Ingham   <jingham@apple.com>

	* linespec.c (decode_line_1): don't use gdb_completer_word_break_characters 
	when allow_objc_selectors_flag is false.  This only happens when we are
	resetting breakpoints after shared library loads, so it just causes future-break
	to fail on ObjC symbols.
	
2002-05-03  Jim Ingham   <jingham@apple.com>

	* objc-lang.c (_initialize_objc_lang): New function, set the 
	lookup_objc_class_p.
	* (should_lookup_objc_class): New function, should we look up 
	objc classes as an ordinary part of symbol lookup?
	* c-exp.y: Use should_lookup_objc_class.

2002-05-01  Klee Dienes  <kdienes@apple.com>

	* infcmd.c (do_registers_info): Print only things with type INT
	as both int and hex.

	* infcmd.c (do_registers_info): Don't check AltiVec types;
	instead treat all non-INT registers as "info all-regs" only.

2002-04-24  James Ingham <jingham@apple.com>

      * varobj.c (varobj_in_scope_p): New function, tell whether a variable is
      in scope.
      (c_type_of_child): A pointer type might point to a typedef, so you have
      to also call check_typedef on the target before creating its children.
      * varobj.h: declare varobj_in_scope_p.

2002-04-24  Klee Dienes  <kdienes@bluegill.localnet>

        * linespec.c (decode_line_1): Ignore most word separators when
        scanning for breakpoint expression, to allow for better Obj-C
        method parsing.

2002-04-23  Klee Dienes  <kdienes@apple.com>

	* infcmd.c (do_registers_info): Check for AltiVec types when deciding 
	whether to print a register as float or int.

2002-04-19  James Ingham <jingham@apple.com>

	* varobj.c (type_changeable): Another place where we want to protect
	against accessing a NULL type structure in the varobj.

2002-04-18  James Ingham <jingham@apple.com>

	* varobj.c (varobj_create): Add a real block parameter to varobj_create.
	I was overloading the frame for this case, which is fragile, and broke
	in the latest merge.
	* (c_type_of_child): Call check_typedef on parent->type before using it
	to get the type of the child.
	* varobj.h: mutatis mutandi for varobj_create change.

2002-04-18  James Ingham <jingham@apple.com>

	(This is from Jason Merrill  <jason@redhat.com>):

	* gnu-v3-abi.c (gnuv3_rtti_type): If we get confused, just warn
	and return NULL.

2002-04-15  James Ingham <jingham@apple.com>

	* varobj.c (varobj_create): Make it possible to create a
	USE_SELECTED_FRAME varobj when the variable is not currently
	defined, and defer defining it till it shows up.
	(varobj_get_num_children): if we couldn't parse the expression
	yet, return -1 for number of children.
	(free_variable): Don't free the current expression if it is NULL.
	(variable_language): Punt (say it is C) for variables we couldn't
	find yet.
	(value_of_root): varobj_create can now return a non-null varobj,
	with a NULL exp struct.
	
2002-04-08  James Ingham <jingham@apple.com>

	* target.h: Add to_bind_function entry to target_ops.
	* target.c: initialize to_bind_function appropriately.
	* valops.c (create_cached_function): Initialize "bound" flag.
	(lookup_cached_function): bind the function before calling.
	* values.h: Add bound field to the cached_value struct.
	
2002-04-05  James Ingham <jingham@apple.com>

	* ui_out.c (ui_out_is_mi_like_p): Check for the uiout being NULL.

2002-04-04  James Ingham <jingham@apple.com>

	* valarith.c (find_size_for_pointer_math): New function, return
	the size of a pointer's target, or 1 for void *, or error with
	an appropriate message for incomplete types.
	(value_sub, value_add): use find_size_for_pointer_math.

2002-04-04  James Ingham <jingham@apple.com>

	* varobj.c (cplus_make_name_of_child, cplus_make_path_expr_of_child):
	Don't skip over the vptr entry, that is already taken care of in
	cplus_real_type_index_for_fake_child_index.

2002-04-03  James Ingham <jingham@apple.com>

	* infrun.c (restore_selected_frame): The code here was misusing
	fr->level, which is an absolute frame (coming from selected_frame_level) 
	and not a relative frame level.
	* varobj.c (c_value_of_root): Restore both the selected_frame and
	the selected_frame_level.

2002-04-02  James Ingham <jingham@apple.com>

	* symtab.c (make_symbol_completion_list): Don't try to get the
	length of sym_text till after you've made sure it is not NULL.
	(make_symbol_file_completion_list): ditto.

2002-04-01  James Ingham <jingham@apple.com>

	* linespec.c (decode_line_1): When handling file:line specs,
	if funfirstline is 1, actually move the breakpoint past the
	prologue.  This is done for functions, and the same rationale
	holds for source line specifications.
	* symtab.c (find_pc_line): fix silly bug - NB, this is already
	fixed on the FSF head, but that code relies on some other changes.

	* varobj.c (varobj_update): If selected_frame is NULL, then
	just don't bother with trying to restore it.

2002-03-29  James Ingham <jingham@apple.com>

	* valarith.c (value_sub): If you are doing pointer - integer,
	and TYPE_LENGTH of the pointer's target comes back 0, set it 
	to 1.  This is what value_add does, and we should be consistent.

2002-03-28  James Ingham <jingham@apple.com>

	* varobj.c (child_exists): New function.  This is a fast way to
	get the child corresponding to a given index.
	(get_type_deref): Pass out whether the original was a pointer or not.
	(path_expr_of_variable): New function.  This returns the full path
	expression to a variable.  The intent here is that you could use
	this to make a new root varobj corresponding to the child varobj
	whose path expression you are getting.
	(varobj_get_path_expr): New function.  External wrapper for 
	path_expr_of_variable.
	(c_path_expr_of_child, cplus_path_expr_of_child, java_path_expr_of_child):
	New functions, return the path expr of a child in its parent.  Also caches
	the expr for later use.
	(make_name_of_child, c_make_name_of_child,
	cplus_make_name_of_child, java_make_name_of_child):
	"name_of_variable" used to serve both the create name and the
	return name functions.  This was inefficient; since you only need
	to compute the name when you make the variable, you ended up doing a whole
	bunch of work just to do simple lookups.  So I split the two functions, and
	made separate calls for them.  These are the make name calls.
	(name_of_variable): This now just returns the name, it doesn't recompute it.
	(is_root_p): New convenience function, returns whether a variable is a root.
	Then I changed all the uses of var->name to use name_of_variable, and the test
	for is this a root were changed to use is_root_p.

	(varobj_set_value): Remove the baseclass offsetting, since value_cast now
	handles this properly (Keith took this out of the FSF version too).

	* varobj.h: Added def'n of varobj_get_path_expr.
	
2002-03-27  James Ingham <jingham@apple.com>

	* config/i386/tm-i386-next.h: Define HAVE_I387_REGS properly so gdb doesn't
	think ALL registers are floating point registers.

2002-03-19  James Ingham  <jingham@inghji.apple.com>

	* defs.h: Add test for gcc 3 to test of whether to use __PRETTY_FUNCTION__.

2002-03-15  James Ingham <jingham@apple.com>

	*c-exp.y: If you have found a variable that is a field of this, don't ALWAYS
	make it hang off "self" check the language first!

2002-03-12  James Ingham <jingham@apple.com>

	* cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd,): New functions, 
	allow you to set & show cplus abi's in case gdb gets it wrong.
	(set_cp_abi_as_auto_default): New function, set the "auto" abi
	to be this abi.
	(is_cp_abi_auto_p): New function, say whether the current abi
	is the default or not.
	(_initialize_cp_abi): Define the cp-abi switching commands.
	* cp-abi.h: declare the new functions.
	* minsyms.c (install_minimal_symbols): don't switch the cp_abi
	unless the current abi is auto.
	* gnu-v2-abi.c (_initialize_gnu_v2_abi): don't switch to gnu-v2,
	but set it as the auto_default instead.	

2002-03-05  James Ingham <jingham@apple.com>
	
	* stack.c (print_frame): restore the (local) print_frame_more_info_hook that
	got dropped in one of the merges.

2002-03-05  James Ingham <jingham@apple.com>

	* target.h: add print_section_info_objfile, it is used in next code.

	* utils.c (error_stream): Don't dump error info to the console for mi-like
	interpreters - it is already added to the command return.

	* valops.c (set_unwind_on_signal): New function, allow C-code to
	set the unwind_on_signal flag.
	* value.h: declare set_unwind_on_signal.

	* mi-cmd-var.c (mi_cmd_var_evaluate_expression): Add -u flag to unwind on
	signal for inferior function execution.
	
2002-02-21  James Ingham <jingham@inghji.apple.com>

	* valops.c (find_overload_match): remove some useless code that was removed
	from the FSF version but somehow didn't get expunged in the merge.

	* symtab.c (make_file_symbol_completion_list): remembet to set sym_text
	to the place in the input string where we think the symbol begins.

2002-02-20  James Ingham  <jingham@inghji.apple.com>
	* event-top.c (gdb_setup_readline): Don't turn on readline event
	handling if instream is NULL (usually when reading script commands)
	since there is no input to wait on anyway...

2002-02-06  Klee Dienes  <klee@apple.com>

	* fork-inferior.c (fork_inferior): Add '!' to the list of
	characters that need to be quoted when building a string for the
	shell.  Quote '!' specifically with a backslash, since CSH chokes
	when trying to evaluate "str!str".

2002-01-29  James Ingham  <jingham@inghji.apple.com>
	* interpreter.c (gdb_interpreter_ui_out): Add accessor function.
	* interpreter.h: declare it.

2002-01-28  James Ingham  <jingham@inghji.apple.com>
	* stabsread.c (read_type): Handle the case where there is a type
	def'n WITHIN the argument list for a class method.  Need to step
	over the ";" that terminates the def'n or read_args will lose it.
	* (read_args): If for some reason you find NO types, return an
	error rather than crashing.

2002-01-25  James Ingham  <jingham@inghji.apple.com>
	Generalize the gdb_event, and allow clients outside of event-loop.c
	to create & queue gdb events.  Also, make sure that the client_data
	that gets passed into fetch_inferior_event makes it down to 
	target_wait, which very well might need it.

	* defs.h: add client_data to target_wait_hook.
	* event-loop.c: export event_handler_func type.
	  generalize the "fd" field of the gdb_event structure - make it
 	  a void *.
	* (gdb_create_event): New internal function, implements the generic
	parts of creating a new event structure.
	* (gdb_queue_event): New function, how clients will create & queue
	a new event.
	* various places - mutatis mutandi for the type changes in the 
	gdb_event structure.
	* event-loop.h: declare gdb_client_data, the event_handler_func
	and gdb_queue_event.
	* infrun.c: Pass NULL (in the non-async case) or the client_data 
	(in the async case) to target wait where appropriate.
	* inftarg.c: add gdb_client_data to child_wait.
	* target.c: add gdb_client_data to debug_to_wait.
	* target.h: fix declaration of to_wait element of the target vector.
	* thread-db.c: add gdb_client_data to thread_db_wait.
	* top.c: fix another call to target_wait_hook.
	* config/nm-nextstep.h: Fix declaration of child_wait.

	* dbxread.c (_initialize_dbxread): Add a flag: read_type_psyms
	to control whether we construct psyms for types.
	* (read_dbx_symtab): Check the flag.

2002-01-15  James Ingham  <jingham@inghji.apple.com>

	* objc-lang.c: Have to include regcache.h or FETCH_ARGUMENT will
	not convert the return value from read_register correctly, and
	will mangle the value.

	* infcmd.c (attach_command): Guard use of SOLIB_ADD with #ifdef.

2002-01-15  James Ingham  <jingham@inghji.apple.com>

	* ui-out.c (ui_out_end): Remove some bits of my patch to the list 
	elements in a table bug that were superceded by Andrew's subsequent
	patch, and caused a crash if left in place.

2002-01-15  James Ingham <jingham@inghji.apple.com>
	stabsread.c (read_one_struct_field): gcc 3.1 inserts type def'ns into the
	class stab, and terminates the embedded type def'n with a ";", which gdb is
	not expecting.  Strip it off if it does that.

2001-12-11  James Ingham <jingham@inghji.apple.com>
	utils.c (gdb_check_fatal): mutatis mutandi for changes to
	internal error.

2001-12-11  James Ingham <jingham@inghji.apple.com>

	These changes are a start at making varobj more robust when
	you get an error generating a type for a varobj you can't
	ignore.  This arises, for instance, if you have an error
	in generating the varobj for a child variable.

	* varobj.c: Add fake_child element to the varobj structure.
	This is better than relying on type == NULL, value == NULL,
	since you can't tell the difference between a fake child and
	an error.
	(varobj_get_type): If we can't get the variable's type, don't 
	continue as you will only crash...
	(create_child): set fake_child appropriately.
	(cplus_number_of_children): If you can't get the type, you can
	count the number of children.  Just return 0.
	(cplus_value_of_child): If gdb_value_struct_elt returned an error,
	don't go on to try c_value_of_child.  It won't work either...
	(cplus_type_of_child): skip over fake child to its parent when
	getting the type.

2001-12-03  James Ingham <jingham@inghji.apple.com>

	* breakpoint.c (bpstat_do_actions): Allow an async target
	to run breakpoint commands in an asynchronous fashion.  The 
	code before this was forcing the target to look synchronous
	to get the breakpoint commands to work right.
	(async_breakpoint_command_continuation): New function, the
	continuation for commands that run the inferior in a breakpoint
	command.
	* inf-loop.c (inferior_event_handler): reorder the 
	complete_execution and the continuations to handle breakpoint
	commands that continue the target.
	* cli/cli-script.c (execute_control_command): If we are in 
	the mi, then breakpoint commands should get run under the
	"interpreter execute" command to get the output right.
	
	* breakpoint.c, breakpoint.h (find_finish_breakpoint): Need
	access to the finish breakpoint so we can make the finish - 
	hit solib breakpoint - continue sequence look like finish.
	* infrun.c (handle_inferior_event): store away the current 
	finish breakpoint if we actually stop for a solib event while
	a finish is queued up.
	(normal_stop): print the function-finished result if we have
	hit the ersatz finish breakpoint.

	* symtab.c (find_line_pc_range): Don't error out if you can't 
	find the source file.  It is not needed to get the linetable 
	mapping.
	
2001-12-03  James Ingham <jingham@inghji.apple.com>
	Import from Neutrino tools branch:

	* utils.c (make_my_cleanup): Add a guard for a null cleanup
	function.  I have one bug report that this had happened, but I
	can't get it to repeat.  This will hopefully help catch the bug...
 
       * ui-file.c (fputs_unfiltered): Don't pass null buffers to the
       lower layers of the ui_file code.

       * varobj.c (varobj_create): Remember to release the "type" value
       from the value chain if we make a varobj that we can't resolve
       immediately.  Otherwise we will get a double free.

       * symtab.c (in_prologue): The check for metrowerks_stepping and NO
       metrowerks function range caused unnecessary stops.  Remove it.
 
       * breakpoint.c (print_one_breakpoint): Print the address string of
       an unset future breakpoint.  This was coming up empty before the
       change.
 
       * infrun.c (handle_inferior_event): Handle nexti when in a
       function prologue by ONLY continuing if we are at the beginning
       the prologue.
	
	* gdb/infrun.c, gdb/symtab.c, gdb-next/macosx-metrowerks.c: Add
	support for metrowerks step_func_start & step_func_end
	so we can more easily run under MW with no symbols.
	
2001-11-28  James Ingham  <jingham@inghji.apple.com>

	* inferior.h: restore STARTUP_WITH_SHELL, and add the
        start_with_shell_flag variable to here.
	* infcmd.c: define start_with_shell_flag here, and prime it
	with STARTUP_WITH_SHELL.
	* fork-child.c: remove def'n of start_with_shell_flag from here
	but this is where you can dynamically change it still...

	* ui-out.c (verify_field_alignment): Don't verify the field
	alignment if you are building a table, but not at the table level
	(which is currently fixed at 1.).
	(ui_out_end): If you are building a table, and return to the table
	level you have just finished the current table column, and should
	begin the next.
	
2001-11-01  Klee Dienes  (kdienes@apple.com)

	* Makefile.in: Remove objc-exp.y 
	* c-exp.y: Pull Objective-C changes from objc-exp.y.
	* symfile.c (init_filename_language_table): Change ".M" and
	".mm" to language_objcplus.
	* c-typeprint.c: Add test for language_objcplus to test for
	language_objc.
	* utils.c: Ditto.
	* symtab.h: Ditto.
	* symtab.c: Ditto.
	* stabsread.c: Ditto.
	* printcmd.c: Ditto.
	* language.c: Ditto.
	* maint.c: Ditto.
	* c-typeprint.c: Ditto.
	* partial-stab.h: Ditto.
	* language.h: Ditto.
	* objc-lang.h: Remove prototypes for objc-parse.y; reformat.
	* objc-lang.c: Add objcplus_language_defn; change parser for
	objc_language_defn to c_parse.
	* eval.c (evaluage_subexp): Remove objc_msgsend_typed; pass
	appropriate values to call_function_by_hand_expecting type
	instead.

2001-10-31 Jason Molenda (jmolenda@apple.com)

	* symtab.c (gdb_mangle_name): Merge didn't pull in FSF changes to
	this function.
	(lookup_partial_symbol): Fix language conditional.
	(make_symbol_overload_list):  Move symbol check from here.
	(make_symbol_completion_list): To here, where it was pre-merge.

	* varobj.c: Comment typo.

2001-10-15  Jason Molenda  (jmolenda@apple.com)

        * symtab.c (lookup_block_symbol): Remove this wrapper function.
        (lookup_block_symbol_helper):  Rename to lookup_block_symbol() as
        it was originally; remove special handling for ObjC which assumes
        that lookup_block_symbol doesn't work correctly for unmangled
        identifiers (i.e. identifiers with spaces in them).

2001-10-12  Jim Ingham  <jingham@w098.z064220144.sjc-ca.dsl.cnc.net>

       * valarith.c (value_sub): Don't pass a raw type to
       value_from_pointer, it has to go through check_typedef first.

2001-10-09  James Ingham  <jingham@inghji.apple.com>

       * dbxread.c (process_one_symbol): Use complain, not warn, so
       we don't spam users too much.

2001-10-08  Jason Molenda  (jmolenda@apple.com)

       * symtab.h (symtab_and_line):  Revert kdienes' patch of 2000-05-22
       and make sal.line a (signed int) again.

2001-10-05  James Ingham  <jingham@inghji.apple.com>

       * dbxread.c (process_one_symbol): Ignore function end stabs when
       we are not currently in a function.  Some linkers neglect to clean
       up properly when coalescing functions.

2001-09-07  Jason Molenda  (jmolenda@apple.com)

        * symtab.c (lookup_block_symbol):  Break out of linear search
        if we're past the range of possible matches.

2001-08-31  Jason Molenda  (jmolenda@apple.com)

	* c-valprint.c (c_val_print):  Second call to check_typedef ()
	is no longer necessary.

2001-08-06  James Ingham  <jingham@inghji.apple.com>

	* symtab.c (in_prologue): If the function start address doesn't
	look like a prologue start, try also scanning from the pc.  This
	helps us in some cases where we have bad debug info so the
	function address is off in never-never land.  I have seen this
	happen in PEF binaries where there are some functions with
	traceback tables inlined, but not all.

2001-08-02  James Ingham  <jingham@inghji.apple.com>

	* varobj.c (cplus_real_type_index_for_fake_child_index): New
	function, return the index in the class type for the n'th child of
	one of the varobj fake children.
	(cplus_name_of_child): Use this function rather than just assume 
	the class writer had ordered her variables in a particular order.

	(c_value_of_variable): Make sure you count the number of children
	before reporting it in an Array's value string.

2001-08-01  James Ingham  <jingham@inghji.apple.com>

	* command.c (_initialize_command): The file name completer is more
	appropriate for "shell" than the default completer...

2001-07-09  James Ingham  <jingham@inghji.apple.com>

	* valops.c (value_rtti_type): Check for minsym == NULL BEFORE using it.

2001-07-06  James Ingham  <jingham@inghji.apple.com>

	* wrapper.c (gdb_varobj_get_value): provide a save
	varobj_get_value.
        * wrapper.h: declare it.
	* cli-out.c: wrapper.h now requires varobj.h.
	* gdbtypes.c: ditto
	* values.c: ditto
	* varobj.h: ditto
	
2001-06-21  James Ingham  <jingham@inghji.apple.com>

	* varobj.c (cplus_value_of_child): Just cosmetic - I find the
	added brackets more readable.

2001-06-20  Ira L. Ruben  <ira@apple.com>
	* breakpoint.c (parse_breakpoint_sals): Handle case where address
	is NULL and default_breakpoint_valid to set addr_string to "*pc"
	(sal.pc) to avoid warning from breakpoint_re_set_one().

2001-06-15  Ira L. Ruben  <ira@apple.com>

	* Makefile.in: Update dependencies for breakpoint.o
	
	* breakpoint.c (set_raw_breakpoint): init new original_type field.
	(create_breakpoints): Handle new original_type argument.
	(break_command_1): Ditto. 
	(do_captured_breakpoint): Pass new original type to create_breakpoints.
	(break_at_finish_at_depth_command_1): pass original type to
	break_command_1.
	(break_at_finish_command_1): Ditto.
	(break_command): Ditto.
	(future_break_command_1): Ditto.
	(tbreak_command): Ditto.
	(hbreak_command): Ditto.
	(thbreak_command): Ditto.
	(stopin_command): Ditto.
	(stopat_command): Ditto.
	(watch_command_1): Handle new original_type argument.
	(watch_command): Pass new original type to watch_command_1.
	(rwatch_command_wrapper): Ditto.
	(awatch_command): Ditto.
	(ignore_command): Suppress newline if from_tty is false.
	(write_one_breakpoint): new routine for save_breakpoints_command.
	(save_breakpoints_command): Add save-breakpoints command.
	(_initialize_breakpoint): Define save-breakpoints and its aliases.
	
	* breakpoint.h (enum bptype): Add new breakpoint types.
	(struct breakpoint): Add field to recore original breakpoint type.
	
	* main.c (captured_main): Initialize $input_radix and $output_radix.
	These are referenced by a save-breakpoints file to preserve radix
	across the breakpoint restoration.
	
	* tracepoint.c (tracepoint_save_command): Fix fopen error reporting to
	show errno information just like save-breakpoints command.
	
	* valprint.c (set_input_radix_1): Set $input_radix.
	(set_output_radix_1): Set $output_radix.

2001-06-15  James Ingham  <jingham@inghji.apple.com>

	* infcmd.c (_initialize_infcmd): If the "run" completer is the
	file completer, then the "set args" should be as well.  Make it
	so...

2001-06-13  Jim Ingham  <jingham@inghji.apple.com>

	* infcmd.c: Make the completer for run be the file completer.  It
	is very common for file names to be the arguments to programs,
	nothing else really makes sense...

	* valops.c (value_cast): When you are consing up the pointer type
	for a superclass, set the enclosing type as well or all the
	superclass fields will be incorrect.

2001-06-08  James Ingham  <jingham@inghji.apple.com>

	* breakpoint.c (_initialize_breakpoint): Add "break ... if <cond>
	to the documentation for the breakpoint command.

2001-04-17  James Ingham  <jingham@inghji.apple.com>

	* blockframe.c (create_new_frame): move the INIT_EXTRA_FRAME_INFO
	call to BEFORE the find_pc_partial_function.  This ensures that we
	will never get a frame without an extra_info because of an error
	in find_pc_partial_function.

2001-04-09  James Ingham  <jingham@inghji.apple.com>

	* symtab.c (find_line_pc_range): Check that linetable is not null
	before you dereference it.

	* varobj.c (cplus_value_of_child): check that gdb_value_ind does
	not return null.  In the C++ case, gdb_value_ind tries to look up
	the superclass, and sometimes fails miserable.  Protect against
	that.

2001-03-12  James Ingham  <jingham@inghji.apple.com>

	* valops.c (value_rtti_type): Remove the attempt to offset to 
	the full type, since that never worked for the hard cases were
	it might be useful, and failed for the easy cases...  NB. This
	code is pretty useless for GCC right now.  But at least this
	renders it harmless.

2001-02-13  James Ingham  <jingham@inghji.apple.com>

	* event-top.c (display_gdb_prompt): Call target_terminal_ours
	before we reinsert the readline callback handler.  This is
	necessary if the inferior dies unexpectedly, and the code doesn't
	clean up.

2001-02-12  James Ingham  <jingham@inghji.apple.com>

	* infrun.c (proceed): set target_executing to 0.  normal_stop
	doesn't do this, and in the non-asynchronous case,
	complete_execution doesn't get called either.

2001-02-05  James Ingham  <jingham@inghji.apple.com>

	* objc-lang.c: If syms is NULL, don't try to dereference it!

2001-01-25  James Ingham  <jingham@inghji.apple.com>

	* infrun.c: Initialize sync_execution to 1 - this is the default
	mode for running gdb...

	* event-top.c (async_enable_stdin): Don't mess with sync_execution
	in this function.  You should not lie about the mode of execution
	just to get the terminal multiplexing to work.  It adds a lot of
	fragility to the code.
        (async_disable_stdin): ditto.
	
	FIXME: These changes reverse some hacks to get the remote target
	to work with async.  The remote hacks are evil & bad, but these
	changes will have to be revised before we can submit the code
	to the FSF.
	
	* cli-out.c (cli_interpreter_resume): Initialize the sync_execution to 1 
	when you resume the cli interpreter.  This is the correct value for the
	cli interpreter.

2001-01-24  James Ingham  <jingham@inghji.apple.com>

	* inflow.c (terminal_ours_1): When you are attaching, don't try to
	get the inferior_process_group from the controlling terminal.
	This is almost never right, and will cause ^C not to work.

2001-01-17  James Ingham  <jingham@inghji.apple.com>

	* varobj.c: Add in_scope field to the root structure.
	(new_root_variable): Initialize in_scope.
	(varobj_update): Better track variables going into &
	out of scope.
	(varobj_create): For non-use_selected_frame variables, always
	check whether the variable is in scope.  Evaluation will often
	return true even when the variable is not in scope, but it is
	bogus...

2001-01-10  James Ingham  <jingham@inghji.apple.com>

	* stack.c (print_frame): Add a call to print_frame_more_info_hook
	so other interpreters than the CLI can add info to the stack
	printing without affecting the CLI output.
	* defs.h: Added def'n of print_frame_more_info_hook.
	* top.c: Added declaration of print_frame_more_info_hook.

2001-01-09  James Ingham  <jingham@inghji.apple.com>

	* symtab.c (lookup_symbol_aux): Call lookup_symbol_aux to lookup a
	mangled symbol rather than recursing into lookup_symbol, since this
	will just re-unmangle the name & call lookup_symbol_aux - leading to 
	an infinite recursion.

2000-12-18  James Ingham  <jingham@inghji.apple.com>

	* breakpoint.c (bpstat_do_actions): Force the execution of breakpoint
	commands to be synchronous.  This is a hack to work around the fact
	that asynchronous execution of breakpoint commands doesn't work for
	truely synchronous commands.  The correct fix is for synchronous 
	versions of commands (like "continue" as opposed to "continue&")
	not to return till they have finished execution.  Stay tuned.

	* gdbtypes.c (check_typedef): Make sure check_typedef never creates
	a type structure where the type & the target_type point to the same
	memory.  This was happening when you had a typedef for an incomplete
	type.  This is not the complete fix, since such types should not get
	get created in the first place, but this keeps the error from hanging
	gdb.

2000-12-15  James Ingham  <jingham@inghji.apple.com>

	* varobj.c (varobj_create): Added USE_BLOCK_IN_FRAME which treats
	the "frame" variable as the address of a block structure.  The
	varobj will be bound to that block.  FIXME - need to come up with
	a type-safe interface to this.
	(varobj_get_valid_block): New function, returns the startaddr &
	endaddr for the valid block for a varobj.
	(value_of_root): Check that we are in the local block in which the
	varobj is defined (as opposed to the frame in which it is defined).
	(varobj_pc_in_valid_block_p): New function, returns whether the pc
	in the frame for this varobj is in the block in which this varobj 
	is valid.
	

2000-12-12  James Ingham  <jingham@inghji.apple.com>

	* breakpoint.c (do_captured_breakpoint): Move test for sals.nelts -
	i.e. "Did we find a breakpoint" AFTER test for "is this a future
	break..."

2000-12-04  James Ingham  <jingham@inghji.apple.com>

	* main.c (captured_main): The coreargs variable has been quoted,
	so it is no longer a number, and fails the "could be a PID" test.  
	Strip the quotes before the test...

	* top.c (execute_user_command): Set the target to synchronous
	during the execution of user defined commands.  Otherwise the 
	command execution will get out of order.

	* target.c (gdb_set_async_override): New function, overrides the 
	target's can_async method when we really need to ensure that a
	command gets run synchronously...

2000-11-22  James Ingham  <jingham@inghji.apple.com>

	* varobj.c (varobj_get_type_struct): New function, return the
	type structure (as opposed to a printed string) for the varobj.

	* event-top.c (_initialize_event_loop): Don't use the
	cli_command_hook if you are not using the event loop.
	(gdb_setup_readline): Don't muck with gdb_stdout & friends if 
	you are not using the event loop.  These ui_out's don't work
	right in that case.  NB The non-event loop version of gdb should
	fade away at some point...
	(gdb_disable_readline): remove the gdb_stdout & gdb_stderr ui_outs
	when you disable readline.

2000-11-09  James Ingham  <jingham@inghji.apple.com>

	* breakpoint.c (captured_parse_breakpoint_sals): New function, need
	to catch this call in gdb_breakpoint so I can implement future
	break in the mi.
	(do_captured_breakpoint): Add a futureflag, and if it is yes, then
	catch the error, and set a future breakpoint instead.
	* defs.h: Change definition of gdb_breakpoint to match.

2000-11-08  James Ingham  <jingham@inghji.apple.com>

	* interpreter.c: Add an exec_proc to the interpreter structure, so
	you can instruct an interpreter to execute a text string -
	bypassing the UI.
	* cli-out.c (cli_interpreter_exec): New function, implements
	exec'ing a command in a safe way.

	* wrapper.c (safe_execute_command): New function - a catch_errors
	wrapper for execute_command.
	(wrap_execute_command): The wrapped function implementing
	safe_execute_command.
	* interpreter.c: Add the ability to set an interpreter into
	"quiet" mode where it doesn't print a startup notice, and
	supresses prompt printing.
	(gdb_interpreter_set_quiet): Sets the quiet flag
	(gdb_interpreter_is_quiet): Returns whether the interp is quiet or
	not.
	(gdb_set_interpreter): Don't print interpreter switch banner if we
	are quiet.  
	* cli-out.c (cli_interpreter_display_prompt): Use the quiet flag
	in prompt display.

2000-11-07  James Ingham  <jingham@inghji.apple.com>

	* infrun.c (handle_inferior_event): Add a separate test to handle the case where you
	are nexti'ing in code with NO symbols.  In this case the old code assumed you were 
	always in a function prologue, test if you are not, and stepi correctly...

2000-11-01  James Ingham  <jingham@inghji.apple.com>

	* interpreter.c: New file, implements switchable interpreters
	for gdb.
	* interpreter.h: Ditto.
	* cli-out.c, cli-out.h: Add the interpreter functions.
	* event-loop.c (start_event_loop): Poll the interpreter's event loop
	as well as gdb...
	* event-top.c (gdb_setup_readline, gdb_disable_readline): New functions,
	used by console & mi to grab & relinquish control of the readline input.
	* main.c (captured_main): strsave the interpreter name, since we will
	eventually use it as a set variable.
	* top.c (gdb_init): Use the interpreter mechanism to startup the stdin 
	handling.
	* mi/mi-cmds.c, mi/mi-cmds.h: Add mi command -interpreter-set.
	* (captured_mi_execute_command): actually return the MI result
	code out of this function.
	* (mi_execute_command): Don't print the prompt if the command return
	is MI_CMD_QUIET.
	* mi/mi-main.c: Add the interpreter functions.
	* mi/mi-main.c (mi_set_interpreter): implements -interpreter-set.
	* mi/mi-main.c (_initialize_mi): This now just registers the mi interpreter.
	
2000-10-19  James Ingham  <jingham@inghji.apple.com>

	* partial-stab.h (switch): Add the N_BNSYM & N_ENSYM stabs to the stabs list.
	* dbxread.c (process_one_symbol): ditto.

2000-09-22  James Ingham  <jingham@inghji.apple.com>

	* infrun.c (handle_inferior_event): Errors in the call to
	breakpoint_re_set will cause async_enable_stdin to get called from
	the exec_error_cleanup.  So we need to disable stdin again before
	proceeding.

2000-09-06  Jim Ingham  <jingham@localhost>

	* exec.c (init_exec_ops): make function not static.  We use it in
	the next nat code.
	* inftarg.c (init_child_ops): ditto

	* config/powerpc/macosx-mh: Move nextstep-nat-cfmthread.o to the
	to the CFM_FILES.
	
2000-08-09  James Ingham  <jingham@inghji.apple.com>

	* values.c (value_change_enclosing_type): New function.
	* value.h: New function value_change_enclosing_type.
	* valops.c (value_cast): use the value_change_enclosing_type
	function rather than directly setting VALUE_ENCLOSING_TYPE.
	(value_assign): ditto.
	(value_assign): ditto.
	(value_addr): ditto.
	(value_ind): ditto.
	(value_ind): ditto.

	* buildsym.c (finish_block): Add the addresses to the Inner block
	outside outer block complaint even when we know the function name.
	No reason not to provide the info in this case, and it might be
	useful...
