Commit graph

22987 commits

Author SHA1 Message Date
Chris Demetriou
a366c65aeb 2008-07-20 Sergei Poselenov <sposelenov@emcraft.com>
Chris Demetriou  <cgd@google.com>

        * elfread.c (elf_symfile_segments): Fix the check that each loadable
        section fits within an ELF segment to handle ELF segments that hit
        the end of the address space.
2008-07-21 05:05:23 +00:00
gdbadmin
6142f8a3fe *** empty log message *** 2008-07-21 00:00:02 +00:00
Chris Demetriou
073d253fa2 2008-07-20 Chris Demetriou <cgd@google.com>
* MAINTAINERS (Write After Approval): Add self.
2008-07-20 21:56:49 +00:00
gdbadmin
5e096c66e2 *** empty log message *** 2008-07-20 00:00:03 +00:00
gdbadmin
cd12999609 *** empty log message *** 2008-07-19 00:00:33 +00:00
Tom Tromey
d7d9f01ea1 gdb
PR gdb/855:
	* NEWS: Add entry for macro commands.
	* Makefile.in (macrocmd.o): Add gdb_string.h.
	* macroscope.h (user_macro_scope): Declare.
	(default_macro_scope): Update documentation.
	(macro_user_macros): Declare.
	* c-lang.c (c_preprocess_and_parse): Always attempt macro lookup.
	Use user_macro_scope.
	(null_macro_lookup): Remove.
	* macrotab.h (macro_callback_fn): Declare.
	(macro_for_each): Likewise.
	(macro_allow_redefinitions): Likewise.
	* macrotab.c (foreach_macro): New function
	(macro_for_each): Likewise.
	(struct macro_table) <redef_ok>: New field.
	(macro_allow_redefinitions): New function.
	(new_macro_table): Update.
	(macro_define_function): Likewise.
	(macro_define_object): Likewise.
	* macroscope.c (user_macro_scope): New function.
	(default_macro_scope): Use it.
	(macro_user_macros): New global.
	(standard_macro_lookup): Look in macro_user_macros.
	(_initialize_macroscope): New function.
	* macroexp.h (macro_is_whitespace, macro_is_digit,
	macro_is_identifier_nondigit): Declare.
	* macroexp.c (macro_is_whitespace): Rename.  No longer static.
	(macro_is_digit): Likewise.
	(macro_is_identifier_nondigit): Likewise.
	(get_identifier): Update.
	(get_pp_number): Likewise.
	(get_token): Likewise.
	* macrocmd.c (skip_ws): New function.
	(extract_identifier): Likewise.
	(free_macro_definition_ptr): Likewise.
	(user_macros): Remove.
	(macro_define_command): Implement.
	(_initialize_macrocmd): Update.
	(macro_undef_command): Implement.
	(print_one_macro): New function.
	(macro_list_command): Implement.
gdb/doc
	* gdb.texinfo (Macros): Update.  Use @code rather than @command.
gdb/testsuite
	* gdb.base/macscp.exp: Add macro tests.
2008-07-18 20:55:33 +00:00
Joseph Myers
0f72fb1c9b * configure.ac: Put old value of $LIBS after -lbfd -liberty $intl
in BFD ELF check.
	* configure: Regenerate.
2008-07-18 13:38:14 +00:00
gdbadmin
8b07fad044 *** empty log message *** 2008-07-18 00:00:03 +00:00
Paul Pluzhnikov
9bf07184c9 Fix for Linux/VDSO failure. 2008-07-17 20:57:26 +00:00
Paul Pluzhnikov
7c6467a4fb Fix for failing gdb.base/auxv.exp on Linux 2008-07-17 20:56:11 +00:00
Paul Pluzhnikov
becf64774c Fix for gdb.base/corefile.exp failure on Linux 2008-07-17 19:01:44 +00:00
gdbadmin
2e51ac64ef *** empty log message *** 2008-07-17 00:00:03 +00:00
gdbadmin
7767d1c1f5 *** empty log message *** 2008-07-16 00:00:03 +00:00
Daniel Jacobowitz
eb2f4a08ce Revert frame_unwind_caller_pc / frame_unwind_caller_id. 2008-07-15 23:29:24 +00:00
Andreas Schwab
680b56ce65 * valops.c (value_cast_pointers): Follow typedefs when checking
result of coercion.
2008-07-15 22:13:42 +00:00
Paul Pluzhnikov
0709f7d3ac Fix for 'FAIL: gdb.cp/class2.exp: p acp->c2' on spu-elf 2008-07-15 19:15:28 +00:00
Daniel Jacobowitz
7f0df27888 * block.c (block_function): Renamed to ...
(block_linkage_function): ... this.  All callers changed.
	* block.h (block_function): Renamed to ...
	(block_linkage_function): ... this.
2008-07-15 19:11:34 +00:00
Daniel Jacobowitz
54af988d1e * frame.c (frame_unwind_id): Renamed to ...
(frame_unwind_caller_id): ... this.  All callers updated.
	(frame_pc_unwind): Renamed to ...
	(frame_unwind_caller_pc): ... this.  All callers updated.
	* frame.h: Document frame_unwind_caller_WHAT functions.
	(frame_unwind_id): Renamed to ...
	(frame_unwind_caller_id): ... this.
	(frame_pc_unwind): Renamed to ...
	(frame_unwind_caller_pc): ... this.
	* hppa-tdep.c (hppa_find_unwind_entry_in_block): Correct comment.
	* stack.c (parse_frame_specification_1): Do not rely on
	frame_unwind_id.
2008-07-15 18:58:32 +00:00
Daniel Jacobowitz
ba2c6aec01 * mn10300-tdep.c (set_reg_offsets): Use get_frame_register_unsigned. 2008-07-15 18:52:17 +00:00
Daniel Jacobowitz
d56907c103 * frame.c (frame_sp_unwind): Delete.
(get_frame_sp): Do not use it.
	* frame.h (frame_sp_unwind): Delete prototype.
2008-07-15 18:50:15 +00:00
Daniel Jacobowitz
f92aeb88df * ia64-tdep.c (ia64_dummy_id): Use get_frame_pc. 2008-07-15 18:45:42 +00:00
Daniel Jacobowitz
ad1193e7ad * dwarf2-frame.c (dwarf2_frame_cache): Update comment.
* frame.c (frame_unwind_address_in_block): Delete.
(get_frame_address_in_block): Do not use it.  Check the type
of the next frame first.
(frame_cleanup_after_sniffer): Update comment.
* frame.h (frame_unwind_address_in_block): Delete prototype.
* hppa-tdep.c (hppa_find_unwind_entry_in_block): Update comment.
2008-07-15 18:40:03 +00:00
Daniel Jacobowitz
ef02daa9e6 * frame.c (frame_func_unwind): Delete.
(get_frame_func): Do not use it.
* frame.h (frame_func_unwind): Delete prototype.
* hppa-tdep.c (hppa_frame_cache): Update comment.
* rs6000-tdep.c (rs6000_frame_cache): Update comment.
2008-07-15 18:32:06 +00:00
Stan Shebs
96e32df874 * remote-sim.c (init_gdbsim_ops): Remove
TARGET_REDEFINE_DEFAULT_OPS.
2008-07-15 18:08:27 +00:00
Daniel Jacobowitz
ab8650a327 * findvar.c (read_var_value): Remove unused variable. 2008-07-15 17:53:11 +00:00
Luis Machado
8c90c1370d * infrun.c (handle_inferior_event): Tag threads as stopped
before inserting breakpoints.
2008-07-15 17:25:21 +00:00
Hui Zhu
4098af0f82 * MAINTAINERS: Added myself to section Write After Approval. 2008-07-15 09:46:49 +00:00
gdbadmin
078649af63 *** empty log message *** 2008-07-15 00:00:34 +00:00
Paul Pluzhnikov
7093c834d7 Fix for PR gdb/2477 2008-07-14 18:28:57 +00:00
Pedro Alves
5651477109 * i386-dicos-tdep.c (i386_dicos_frame_align): Delete.
(i386_dicos_push_dummy_code): New.
	(i386_dicos_init_abi): Don't register i386_dicos_frame_align.
	Register i386_dicos_push_dummy_code.
2008-07-14 18:06:58 +00:00
Markus Deuling
74ed0bb414 * mips-tdep.c (fp_register_arg_p): Add gdbarch as paramter.
(mips_n32n64_push_dummy_call, mips_o64_return_value)
	(mips_eabi_push_dummy_call): Update call to fp_register_arg_p.

	(MIPS_FPU_TYPE): Add gdbarch as parameter and replace current_gdbarch.
	(fp_register_arg_p, mips_dump_tdep, show_mipsfpu_command)
	(mips_n32n64_fp_arg_chunk_p): Update caller.

	(mips_n32n64_fp_arg_chunk_p): Add gdbarch as paramter.
	(mips_n32n64_push_dummy_call): Update caller.

	(MIPS_LAST_ARG_REGNUM): Add gdbarch as parameter and replace
	current_gdbarch.
	(mips_eabi_push_dummy_call, mips_n32n64_push_dummy_call)
	(mips_o32_push_dummy_call, mips_o64_push_dummy_call): Update caller.


	(MIPS_LAST_FP_ARG_REGNUM): Add gdbarch as parameter and replace
	current_gdbarch.
	(mips_eabi_push_dummy_call, mips_o32_push_dummy_call)
	(mips_o64_push_dummy_call): Update caller.

	(MIPS_EABI): Add gdbarch as parameter and replace current_gdbarch.
	(fp_register_arg_p, mips_dump_tdep): Update caller.

	(set_reg_offset): Add gdbarch as parameter and replace current_gdbarch.
	(mips16_scan_prologue, mips32_scan_prologue): Update caller.

	(reset_saved_regs): Make static.  Add gdbarch as parameter.  Replace
	current_gdbarch.
	(mips32_scan_prologue): Update caller.

	(heuristic_proc_start): Add gdbarch as parameter. Replace
	current_gdbarch.
	(mips_insn16_frame_cache, mips_insn32_frame_cache): Update caller.

	* mipsnbsd-nat.c (mipsnbsd_fetch_inferior_registers)
	(mipsnbsd_store_inferior_registers): Use get_regcache_arch to get at
	the current architecture. Update call to getregs_supplies.
	(getregs_supplies): Add gdbarch as parameter and replace
	current_gdbarch.

	* mipsnbsd-tdep.c (mipsnbsd_get_longjmp_target): Use get_frame_arch to
	get at the current architecture. Update call to NBSD_MIPS_JB_OFFSET and
	NBSD_MIPS_JB_ELEMENT_SIZE.
	(NBSD_MIPS_JB_ELEMENT_SIZE, NBSD_MIPS_JB_OFFSET): Add gdbarch and
	replace current_gdbarch.

	* remote-mips.c (mips_map_regno): Add gdbarch as parameter and replace
	current_gdbarch.
	(mips_fetch_registers, mips_store_registers): Update call
	to mips_map_regno.
	(mips_load): Use get_regcache_arch to get at the current_architecture
	and replace current_gdbarch.
2008-07-14 11:25:12 +00:00
gdbadmin
ac3d490a1a *** empty log message *** 2008-07-14 00:00:33 +00:00
Pedro Alves
0c50153633 * thread.c (restore_selected_frame): On fail to restore, select
the innermost frame, and don't crash when warning the user.
2008-07-13 19:25:58 +00:00
Joel Brobecker
db009c8a0a * symtab.c (expand_line_sal): Fix a memory leak. 2008-07-13 16:58:20 +00:00
Jan Kratochvil
b432ffe3e2 * gdb.base/randomize.exp: Catch non-Linux targets as untested. 2008-07-13 14:56:02 +00:00
Pedro Alves
0ffe501282 * utils.c (struct continuation): Define as inheriting struct
cleanup.
	(add_continuation, do_all_continuations)
	(discard_all_continuations, add_intermediate_continuation)
	(do_all_intermediate_continuations)
	(discard_all_intermediate_continuations): Adjust.
2008-07-13 11:28:31 +00:00
Vladimir Prus
dbba82516a Skip varobj in running threads.
* mi/mi-cmd-var.c (mi_cmd_var_update): If varobj's
        thread is not stopped, skip the varobj.
        * Makefile.in: Update dependencies.
2008-07-13 05:31:44 +00:00
Vladimir Prus
e3d6cd5f43 Enable all MI commands while inferiour is running
* mi/mi-main.c (mi_cmd_execute): Don't check if
        inferiour is executing.
2008-07-13 04:13:50 +00:00
Vladimir Prus
b10a37b10a Allow all CLI command even if target is executing.
* gdb/top.c (execute_command_1): Don't check if the inferiour
        is running.
2008-07-13 04:09:47 +00:00
Vladimir Prus
ea06926780 * mi/mi-main.c (mi_cmd_execute): Remove unused variable.
Fix printing of frame, when frame is wrong.
2008-07-13 03:59:28 +00:00
gdbadmin
bbabb60fd8 *** empty log message *** 2008-07-13 00:00:33 +00:00
Ulrich Weigand
cdc9523a4d * spu-tdep.c (spu_frame_unwind_cache): Do not error if
backchain is unreadable.
2008-07-12 22:42:52 +00:00
Ulrich Weigand
836acd6d9a * linux-low.c (handle_extended_wait): Do not use "status"
variable uninitialized.
2008-07-12 22:22:42 +00:00
Ulrich Weigand
d5b254911b * spu-linux-nat.c: Include "gdbthread.h".
(spu_child_post_startup_inferior): Register main thread.
	(spu_child_post_attach): Likewise.
	* Makefile.in (spu-linux-nat.o): Update dependencies.
2008-07-12 22:16:34 +00:00
Pedro Alves
604ead4a92 2008-07-12 Pedro Alves <pedro@codesourcery.com>
Rewrite continuations internals on top of cleanups and plug
	continuation arguments leaks.

	* defs.h (struct continuation): Make it opaque.
	(add_continuation, add_intermediate_continuation): Drop the int
	argument of the continuation hook argument.  Add
	continuation_free_args argument.
	(do_all_continuations, do_all_intermediate_continuations): Drop
	the error_p argument.

	* utils.c (add_continuation): Drop the int argument of the
	continuation hook argument.  Add continuation_free_args argument.
	Reimplement on top of cleanups.
	(do_all_continuations): Drop error argument.  Reimplement on top
	of cleanups.
	(discard_all_continuations): Reimplement on top of cleanups.
	(add_intermediate_continuation): Drop the int argument of the
	continuation hook argument.  Add continuation_free_args argument.
	Reimplement on top of cleanups.
	(do_all_intermediate_continuations): Drop error argument.
	Reimplement on top of cleanups.
	(discard_all_intermediate_continuations): Reimplement on top of
	cleanups.

	* breakpoint.c (until_break_command_continuation): Drop error
	argument.  Add xfree as continuation argument deleter.

	* inf-loop.c (inferior_event_handler): On error, discard all
	continuations.  Adjust to new do_all_intermediate_continuations
	and do_all_continuations interfaces.

	* infcmd.c (step_1_continuation): Drop error_p argument.  Adjust.
	Pass xfree as continuation argument deleter.
	(finish_command_continuation): Drop error_p argument.  Adjust.
	(finish_command_continuation_free_arg): New.
	(finish_command): Pass finish_command_continuation_free_arg as
	continuation argument deleter.  Adjust to new do_all_continuations
	interfaces.
	(attach_command_continuation): Drop error_p argument.
	(attach_command_continuation_free_args): New.
	(attach_command): Pass attach_command_continuation_free_args as
	continuation argument deleter.

	* interps.c (interp_set): Adjust to new do_all_continuations
	interfaces.

	* event-top.c (stdin_event_handler): In error, also discard the
	intermediate continuations.
2008-07-12 19:25:42 +00:00
Pedro Alves
bfec99b27c Replace struct continuation_args by void* and per command structs.
* top.c (execute_command): Remove unused arg1 and arg2 locals.

	* breakpoint.c (struct until_break_command_continuation_args):
	New.
	(until_break_command_continuation): Take a void* instead of a
	continuations_arg.  Adjust.
	(until_break_command): Adjust to use struct
	until_break_command_continuation_args instead of struct
	continuation_arg.

	* infcmd.c (struct step_1_continuation_args): New.
	(step_1_continuation): Take a void* instead of a
	continuations_arg.  Adjust to use struct step_1_continuation_args.
	(step_once): Adjust to use struct step_1_continuation_args.

	(struct finish_command_continuation_args): New.
	(finish_command_continuation): Take a void* instead of a
	continuations_arg.  Adjust to use struct
	finish_command_continuation_args.
	(finish_command): Adjust to use struct
	finish_command_continuation_args.
	(struct attach_command_continuation_args): New.
	(attach_command_continuation): Take a void* instead of a
	continuations_arg.  Adjust to use struct
	attach_command_continuation_args.
	(attach_command): Adjust to use struct
	attach_command_continuation_args.

	* defs.h (struct continuation_arg): Delete.
	(struct continuation): Replace the struct continuation_arg*
	parameter of continuation_hook by a void*.  Replace "arg_list"
	member by a new "args" member with void* type.
	(add_continuation, add_intermediate_continuation): Replace struct
	continuation_arg type usages by void* usages.

	* utils.c (add_continuation, do_all_continuations)
	(add_intermediate_continuation)
	(do_all_intermediate_continuations): Replace struct
	continuation_arg type usages by void* usages.  Pass "args" instead
	of "arg_list".
2008-07-12 19:07:38 +00:00
Pedro Alves
2afb61aa0b 2008-07-12 Pedro Alves <pedro@codesourcery.com>
* infrun.c (struct thread_stepping_state): Delete sal member.
	(init_thread_stepping_state): Add local sal.  Use it instead of
	tss->sal.
	(handle_inferior_event): New local stop_pc_sal.  Use it instead of
	tss->sal.
	(step_into_function): Add local stop_func_sal.  Use it instead of
	tss->sal.
2008-07-12 18:39:10 +00:00
Vladimir Prus
77ebaa5ad3 Implement -exec-continue/-exec-interrupt --all.
* infcmd.c (continue_1): New, extracted from
        (continue_command): ...here.
        (interrupt_target_1): New, extracted from
        (interrupt_target_command): ...here.
        * inferior.h (continue_1, interrupt_target_1): New.
        * mi/mi-main.c (mi_cmd_exec_continue)
        (mi_cmd_exec_interrupt): Handle --all.
2008-07-12 17:10:59 +00:00
Vladimir Prus
1e92afda99 Implement --thread and --frame.
* gdbthread.h (find_thread_id): Declare.
        * thread.c (find_thread_id): Make non-static.
        * mi/mi-main.c (mi_cmd_execute): Switch to the right
        thread and frame, if necessary.
        * mi/mi-parse.c (mi_parse): Handle --thread and --frame.
        * mi/mi-parse.h (strcut mi_parse): New fields thread and frame.
2008-07-12 16:37:57 +00:00
Vladimir Prus
d56b7306e3 * infrun.c (resume): Discard cleanups on early exit path. 2008-07-12 13:42:54 +00:00