Commit Graph

12064 Commits

Author SHA1 Message Date
gdbadmin 280cf94f94 *** empty log message *** 2002-07-12 00:00:02 +00:00
Grace Sainsbury 444199e7c0 * monitor.c (monitor_fetch_register): Make name a constant.
(monitor_store_register): Same.
2002-07-11 21:00:39 +00:00
Daniel Jacobowitz 261397f84f 2002-07-11 Daniel Jacobowitz <drow@mvista.com>
Based on patch from Daniel Berlin <dberlin@dberlin.org>.
	* buildsym.c: Include "demangle.h" for SYMBOL_INIT_DEMANGLED_NAME.
	(finish_block) For non-function blocks, hash the symbol table.  For
	function blocks, mark the symbol table as unhashed.
	* minsyms.c (msymbol_hash): Return hash value without taking modulus.
	(msymbol_hash_iw): Likewise.
	(add_minsym_to_hash_table): Take modulus of msymbol_hash's return
	value.
	(add_minsym_to_demangled_hash_table): Likewise for msymbol_hash_iw.
	(lookup_minimal_symbol): Likewise for both.
	* symtab.h (struct block): Add `hashtable' flag.  Comment the
	hashtable.
	(BLOCK_HASHTABLE, BLOCK_BUCKETS, BLOCK_BUCKET): New macro.
	(ALL_BLOCK_SYMBOLS): Update.
	(BLOCK_SHOULD_SORT): Do not sort hashed blocks.
	(struct symbol): Add `hash_next' pointer.
	* symtab.c (lookup_block_symbol): Search using the hash table when
	possible.
	(find_pc_sect_symtab): Use ALL_BLOCK_SYMBOLS.
	(search_symbols, find_addr_symbol): Likewise.

	* dstread.c (process_dst_block): Clear hashtable bit for new block.
	(read_dst_symtab): Likewise.
	* jv-lang.c (get_java_class_symtab): Likewise.
	* mdebugread.c: Include "gdb_assert.h".
	(shrink_block): Assert that the block being modified is not hashed.
	* coffread.c (patch_opaque_types): Use ALL_BLOCK_SYMBOLS.
	* symmisc.c (free_symtab_block): Walk the hash table when freeing
	symbols.
	(dump_symtab): Recognize hashed blocks.
	* printcmd.c (print_frame_args):  Assert that function blocks do not
	have hashed symbol tables.
	* ada-lang.c (symtab_for_sym): Use ALL_BLOCK_SYMBOLS.
	(fill_in_ada_prototype, debug_print_block): Likewise.
	(ada_add_block_symbols): Use ALL_BLOCK_SYMBOLS.  Handle hash tables.
2002-07-11 20:46:19 +00:00
Corinna Vinschen 6f0eaa018a * stack.c (print_frame): Use result of frame_address_in_block()
instead of fi->pc when evaluating symbols.
	(backtrace_command_1): Ditto.
2002-07-11 19:29:08 +00:00
Andrew Cagney a208b0cb2b * cris-tdep.c (cris_saved_pc_after_call): Fix parameter type.
Make static.
* arm-tdep.c (arm_register_name): Make return type constant.
2002-07-11 19:25:13 +00:00
Andrew Cagney 5ae5f59288 Fix some K&R isms. 2002-07-11 13:50:50 +00:00
Joel Brobecker 52d309e45f * gdb.base/attach.exp: Add patterns to match output from /proc-based
systems.
       Move comments in expect statements to inside the actions, so that they
       don't get matched against.
2002-07-11 00:51:37 +00:00
gdbadmin 96aea4f7e4 *** empty log message *** 2002-07-11 00:00:02 +00:00
Mark Kettenis ff683d9ee1 * gdb.base/interrupt.exp: Setup xfail for all i386 BSD's on "call
function when asleep" test.
2002-07-10 23:00:57 +00:00
Andrew Cagney a6b6b089bd * wince.c (_initialize_wince): Rename _initialize_inftarg.
* win32-nat.c (_initialize_win32_nat): Rename _initialize_inftarg.
2002-07-10 22:38:05 +00:00
Andrew Cagney b535675370 * gdb.base/page.exp: Rewrite to handle problems with very long
`info set' output.  Update copyright.
2002-07-10 21:57:56 +00:00
Grace Sainsbury a1789893d3 * NEWS: Mention m68k, mcore multi-arching.
* MAINTAINERS: Change status of m68k, mcore to reflect
multi-arching.
2002-07-10 17:34:02 +00:00
Daniel Jacobowitz 02f0d45d87 2002-07-10 Daniel Jacobowitz <drow@mvista.com>
* valops.c (find_overload_match): Free oload_syms.
2002-07-10 17:18:16 +00:00
Joel Brobecker 4a2b4636a2 * gdb.texinfo (Create a release candiate): Add the location
where the proper version of autoconf can be retrieved.
2002-07-10 16:07:19 +00:00
gdbadmin 7b210f262f *** empty log message *** 2002-07-10 00:00:33 +00:00
Joel Brobecker f15f768ee5 Define HAVE_SYS_PROC_H if sys/proc.h exists
* configure.in: Add check for sys/proc.h
        * config.in: Regenerate.
        * configure: Regenerate.
2002-07-09 22:59:36 +00:00
Grace Sainsbury 902a713992 2002-07-09 Grace Sainsbury <graces@redhat.com>
* config/m68k/tm-m68k.h: Remove macros wrapped in
	#if !GDB_MULTI_ARCH.
2002-07-09 19:48:40 +00:00
David O'Brien 82e0fd9831 2002-07-09 David O'Brien <obrien@FreeBSD.org>
* gdbserver/gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
	(perror_with_name, remote_close, remote_open, expect, play): Static.
2002-07-09 17:38:58 +00:00
Don Howard a71ec26521 2002-07-09 Don Howard <dhoward@redhat.com>
* gdb.texinfo (Command Files): Further describe the behavior of
        sourced command files.
2002-07-09 15:59:18 +00:00
Andrew Cagney a534e424ef * config.in, configure: Regenerate. 2002-07-09 14:17:39 +00:00
gdbadmin f2f8f9957e *** empty log message *** 2002-07-09 00:00:08 +00:00
Mark Kettenis 9b94f7bfd5 * dwarf2cfi.c: Include "gcore.h".
(execute_stack_op): Fix implementation of the
DW_OP_deref and DW_OP_deref_size operators by letting do their
lookup in the target.
2002-07-08 20:53:45 +00:00
gdbadmin f6c966b6c0 *** empty log message *** 2002-07-08 00:00:05 +00:00
Mark Kettenis 1d34db4151 From Peter Schauer <Peter.Schauer@regent.e-technik.tu-muenchen.de>:
* i386-sol2-tdep.c (i386_sol2_init_abi): Correct value for
tdep->sc_sp_offset.
2002-07-07 21:31:06 +00:00
gdbadmin d8462f1281 *** empty log message *** 2002-07-07 00:00:07 +00:00
gdbadmin 31ba7b97bb *** empty log message *** 2002-07-06 00:00:03 +00:00
Daniel Jacobowitz 79d5b63a45 2002-07-05 Daniel Jacobowitz <drow@mvista.com>
Fix PR gdb/595, gdb/602
        * gnu-v3-abi.c (gnuv3_baseclass_offset): Remove unused variables.
        Don't call value_cast, just read the vtable pointer; update comments
        to match.
2002-07-05 16:23:13 +00:00
Grace Sainsbury 3bb912e83b * config/mcore/tm-mcore.h: Remove file.
* config/mcore/mcore.mt: Remove definition of TM_FILE
	* configure.tgt: Set gdb_multi_arch to yes for the mcore target.
2002-07-05 15:09:49 +00:00
gdbadmin 08273c8ad1 *** empty log message *** 2002-07-05 00:00:03 +00:00
Mark Kettenis ca39387d67 * i386bsd-tdep.c: Include "gdb_string.h". 2002-07-04 22:59:01 +00:00
Grace Sainsbury efdc1108e7 * config/mcore/tm-mcore.h (GDB_MULTI_ARCH): Set to 2.
(PR_REGNUM, FIRST_ARGREG, LAST_ARGREG,RETVAL_REGNUM): Move to
	mcore-tdep.
	(REG_STRUCT_HAS_ADDR, USE_STRUCT_CONVENTION, GET_SAVED_REGISTER)
	(TARGET_VIRTUAL_FRAME_POINTER, BELIEVE_PCC_PROMOTION): Remove.
	* mcore-tdep.c (PR_REGNUM, FIRST_ARGREG, LAST_ARGREG)
	(RETVAL_REGNUM): Move macros from tm-mcore.h
	(mcore_reg_struct_has_addr): New function.
	(mcore_gdbarch_init): Added initializations for the macros removed
	from tm-mcore.h.
2002-07-04 16:45:53 +00:00
Mark Kettenis bb21884d54 * osabi.c (generic_elf_osabi_sniffer): Add check for FreeBSD 3.x's
traditonal string branding within the ELF header.
2002-07-04 15:36:51 +00:00
Daniel Jacobowitz 228c6d410e 2002-07-04 Daniel Jacobowitz <drow@mvista.com>
* symtab.c (remove_params): New function.
        (make_symbol_overload_list): Use it instead of cplus_demangle.
        (overload_list_add_symbol): Likewise.  Reorder.  Fix memory leak.
2002-07-04 15:22:42 +00:00
Mark Kettenis e5e4acad5b * i386obsd-nat.c (_initialize_i386obsd_nat): Fix typo in prototype. 2002-07-04 15:17:43 +00:00
Mark Kettenis baadce09a6 * i386bsd-tdep.c (i386nbsd_sigtramp_start, i386nbsd_sigtramp_end):
New variables.
(i386nbsd_init_abi): Use these to initialize tdep->sigtramp_start
and tdep->sigtramp_end.
* i386obsd-nat.c: New file.
* config/i386/obsd.mh (NATDEPFILES): Add i386obsd-nat.o.
2002-07-04 15:13:28 +00:00
Mark Kettenis 2404952e63 * dwarf2cfi.c (cfi_pop_frame): Use alloca() for regbuf.
Don't call get_current_frame().
2002-07-04 14:43:51 +00:00
Pierre Muller 9b4f1ba7ed 2002-07-04 Pierre Muller <muller@ics.u-strasbg.fr>
* i386-nat.c (child_post_startup_inferior): New function
	calling i386_cleanup_dregs if
	I386_USE_GENERIC_WATCHPOINTS is defined.
	* config/i386/nm-i386.h: define CHILD_POST_STARTUP_INFERIOR
	conditional to acknowledge that i386-nat.c has its
	own child_post_startup_inferior function.
2002-07-04 12:32:29 +00:00
Mark Kettenis 00f8375edd * i386-tdep.h (I386_MAX_REGISTER_SIZE): New define.
* i386-tdep.c (i386_do_pop_frame): Use I386_MAX_REGISTER_SIZE
instead of MAX_REGISTER_RAW_SIZE.
(i386_extract_return_value, i386_extract_struct_value_address):
Convert to use regcache.
(i386_gdbarch_init): Set max_register_raw_size and
max_register_virtual_size to I386_MAX_REGISTER_SIZE.
Set extract_return_value and extract_struct_value_address instead
of their deprecated variants.
2002-07-04 08:18:20 +00:00
Mark Kettenis c0d1d88354 Convert i386 target to generic dummy frames.
* i386-tdep.c: Include "symfile.h".
(i386_frameless_signal_p): Consider a function to be frameless if
the pc points at the first instruction of the function.
(i386_frame_chain): Handle (generic) call dummies.
(i386_frame_saved_pc): Likewise.
(i386_frame_init_saved_regs): Remove code dealing with call
dummies on the stack.
(i386_push_dummy_frame): Removed.
(i386_call_dummy_words): Removed.
(i386_fix_call_dummy): Removed.
(i386_push_return_address): New function.
(i386_do_pop_frame): Renamed from i386_pop_frame.  Add FRAME
parameter, and don't call get_current_frame.
(i386_pop_frame): New function.
(i386_gdbarch_init): Set use_generic_dummy_frames to 1, set
call_dummy_location to AT_ENTRY_POINT, set call_dummy_address to
entry_point_address, set call_dummy_breakpoint_offset to 0, set
call_dummy_length to 0, set call_dummy_words to NULL, set
sizeof_call_dummy_words to 0, set fix_call_dummy to
generic_fix_call_dummy, set pc_in_call_dummy to
pc_in_call_dummy_at_entry_point, set push_dummy_frame to
generic_push_dummy_frame, set push_return_address to
i386_push_return_address and set frame_chain_valid to
generic_file_frame_chain_valid.
2002-07-04 07:22:11 +00:00
Michal Ludvig 638c158084 2002-07-04 Michal Ludvig <mludvig@suse.cz>
* gdbserver/linux-x86-64-low.c (x86_64_regmap): Make it an array of
	byte offsets instead of an array of indexes.
	(x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
2002-07-04 06:00:49 +00:00
gdbadmin e2af7aea91 *** empty log message *** 2002-07-04 00:00:33 +00:00
Andrew Cagney 049ee0e44d * gdbarch.sh (struct regcache): Add opaque declaration.
(EXTRACT_RETURN_VALUE): New architecture method.
(EXTRACT_STRUCT_VALUE_ADDRESS): Ditto.
* gdbarch.h, gdbarch.c: Regenerate.
* arch-utils.c (legacy_extract_return_value): New function.
* arch-utils.h (legacy_extract_return_value): Declare.
* values.c (value_being_returned): Re-enable code handling
EXTRACT_STRUCT_VALUE_ADDRESS.  Move
deprecated_grub_regcache_for_registers call to block handling
DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS.
(EXTRACT_RETURN_VALUE): Do not define.
2002-07-03 21:27:55 +00:00
Grace Sainsbury 4e0d9804fe * config/mcore/tm-mcore.h (REGISTER_BYTES, NUM_REGS, PC_REGNUM)
(SP_REGNUM, FP_REGNUM, FUNCTION_START_OFFSET, DECR_PC_AFTER_BREAK)
	(BREAKPOINT_FROM_PC, INNER_THAN, SAVED_PC_AFTER_CALL)
	(INIT_EXTRA_FRAME_INFO, FRAME_INIT_SAVED_REGS, INIT_FRAME_PC)
	(FRAME_CHAIN, FRAME_CHAIN_VALID, FRAME_SAVED_PC)
	(STORE_RETURN_VALUE, DEPRECATED_EXTRACT_RETURN_VALUE)
	(STORE_STRUCT_RETURN, DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS)
	(SKIP_PROLOGUE, FRAME_ARGS_SKIP, FRAME_ARGS_ADDRESS)
	(FRAME_LOCALS_ADDRESS, FRAME_NUM_ARGS, POP_FRAME)
	(PUSH_RETURN_ADDRESS, PUSH_DUMMY_FRAME, PUSH_ARGUMENTS): Remove.
	* mcore-tdep.c (mcore_init_extra_frame_info): Add fromleaf
	argument so the function fits the prototype in the architecture
	vector.
	(mcore_pop_frame): Remove argument so the function fits the
	prototype. Use get_current_frame instead of the argument.
	(mcore_push_arguments): Change type of struct_return so the
	function can be used in the architecture vector.
	(mcore_store_struct_return): Add.
	(mcore_frame_init_saved_regs): Add.
	(mcore_gdbarch_init): Add function calls to replace the macros
	removed from tm-mcore.h
2002-07-03 21:23:02 +00:00
Andrew Cagney 36160dc4b2 * infcmd.c (print_return_value): Remove compatibility code calling
deprecated_grub_regcache_for_registers.

* values.c: Include "regcache.h".
(value_being_returned): Update.  Use
deprecated_grub_regcache_for_registers to extract the register
buffer address.
* value.h (value_being_returned): Change ``retbuf'' parameter to a
``struct regcache''.
* Makefile.in (values.o): Add dependency on $(regcache_h).

* inferior.h (run_stack_dummy): Change type of second parameter to
a ``struct regcache''.
* valops.c (hand_function_call): Change type of retbuf to ``struct
regcache''.  Allocate using regcache_xmalloc, clean using
make_cleanup_regcache_xfree.
* infcmd.c (run_stack_dummy): Update.  Use
regcache_cpu_no_passthrough instead of memcpy to copy the buffer.

* regcache.c (do_regcache_xfree): New function.
(make_cleanup_regcache_xfree): New function.
* regcache.h (make_cleanup_regcache_xfree): Declare.
2002-07-03 20:36:54 +00:00
Martin Hunt 4dd79c29b4 2002-07-03 Martin M. Hunt <hunt@redhat.com>
* event-top.c (command_line_handler): Don't read past
        beginning of buffer.
2002-07-03 20:27:12 +00:00
Martin Hunt e64d9b3dea 2002-07-03 Martin M. Hunt <hunt@redhat.com>
* varobj.c (struct varobj_root): Change frame from CORE_ADDR to
        struct frame_id.
        (varobj_create): Store frame_id for root.
        (varobj_gen_name): Use xasprintf.
        (varobj_update): Save and restore frame using get_frame_id() and
        frame_find_by_id().
        (create_child): Use xasprintf.
        (new_root_variable): Initialize frame_id.
        (c_name_of_child): Use xasprintf. Call find_frame_by_id().
        (c_value_of_variable): Use xasprintf. Move mem_fileopen call
        to prevent memory leak.
2002-07-03 20:23:04 +00:00
Andrew Cagney 26e6c56a66 * valops.c (hand_function_call): Move declaration of retbuf to
start of function, allocate using malloc, add a cleanup but before
the inf_status cleanup, cleanup the buffer.  Rename local variable
old_chain to inf_status_cleanup.
2002-07-03 18:31:29 +00:00
Martin Hunt f436dd25ca 2002-07-03 Martin M. Hunt <hunt@redhat.com>
* top.c (execute_command): Use cmd_func() and cmd_func_p().

	* cli/cli-decode.c (cmd_func_p): New function.
	(cmd_func): New function.

	* command.h: Add cmd_func() and cmd_func_p().
2002-07-03 17:35:21 +00:00
Grace Sainsbury 4cfe20842d * config/mcore/tm-mcore.h (GDB_MULTI_ARCH): Add macro. Set to 0.
(REGISTER_SIZE): Remove.
	(MAX_REGISTER_RAW_SIZE): Remove.
	(REGISTER_VIRTUAL_TYPE): Remove.
	(MAX_REGISTER_VIRTUAL_SIZE): Remove.
	(REGISTER_NAME): Remove.
	(USE_GENERIC_DUMMY_FRAMES): Remove.
	(CALL_DUMMY): Remove.
	(CALL_DUMMY_START_OFFSET): Remove.
	(CALL_DUMMY_BREAKPOINT_OFFSET): Remove.
	(CALL_DUMMY_LOCATION): Remove.
	(FIX_CALL_DUMMY): Remove.
	(CALL_DUMMY_ADDRESS): Remove.
	(SIZEOF_CALL_DUMMY_WORDS): Remove.
	(SAVE_DUMMY_FRAME_TOS): Remove.
	* mcore-tdep.c (MCORE_REG_SIZE, MCORE_NUM_REGS): Add macros.
	(mcore_register_virtual_type): New function.
	(mcore_register_byte): New function.
	(mcore_register_size): New function.
	(mcore_register_name): New function.
	(mcore_gdbarch_init): New function. Add set_gdbarch calls for
	macros removed from tm-mcore.h.
	(mcore_dump_tdep): Add.
	(_initialize_mcore_tdep): Add gdbarch_register call.
2002-07-03 17:17:06 +00:00
Mark Kettenis 4fd667e983 * i386-tdep.c (i386_frameless_signal_p): Provide an argument in to
frameless_look_for_prologue, such that we actually call this
function.
2002-07-03 09:39:47 +00:00