Commit Graph

29117 Commits

Author SHA1 Message Date
Marek Polacek 6aee0d90b5 lib/gdb.exp: Fix a typo 2011-09-29 14:36:47 +00:00
Marek Polacek e9101ff5a7 gdb.base/foll-fork.exp: fix up race 2011-09-29 14:13:00 +00:00
Yao Qi 24bdad53a9 gdb/doc/
* gdb.texinfo (Files): Update options for `add-symbol-file'.
	Add one space after option `-s'.  Remove @r{} markup.
2011-09-29 02:25:49 +00:00
Yao Qi 412946b6ba gdb/
* symfile.c (add_symbol_file_command): Update message on usage.
2011-09-29 02:04:25 +00:00
gdbadmin d8250e5afa *** empty log message *** 2011-09-29 00:00:32 +00:00
Paul Koning 7a81bdbf67 * gdb.python/py-type.c (enum E): New.
* gdb.python/py-type.exp (test_fields): Add tests for Python
mapping access to fields.
(test_enums): New test for field access on enums.
2011-09-28 20:06:01 +00:00
Paul Koning a73bb89264 * python/py-type.c (make_fielditem, typy_field_names, typy_items)
(typy_length, typy_get, typy_has_key, typy_make_iter)
(typy_iterkeys, typy_iteritems, typy_itervalues, typy_iter)
(typy_iterator_iter, typy_iterator_iternext)
(typy_iterator_dealloc): New functions to implement standard
Python mapping methods on gdb.Type object.
(gdb.TypeIterator): New Python type.
* python/python-internal.h (gdbpy_iter_kind): New enum.
* doc/gdb.texinfo (gdb.Type): Document field access by dictionary
key syntax.
2011-09-28 20:04:52 +00:00
David S. Miller fe10a582b6 Fix complex floats on sparc.
* sparc-tdep.h (SPARC_F2_REGNUM, SPARC_F3_REGNUM, SPARC_F4_REGNUM,
	SPARC_F5_REGNUM, SPARC_F6_REGNUM, SPARC_F7_REGNUM): New enums.
	* sparc-tdep.c (sparc_complex_floating_p): New function.
	(sparc32_store_arguments): Handle complex floats.
	(sparc32_extract_return_value): Likewise.
	(sparc32_store_return_value): Likewise.
	(sparc32_stabs_argument_has_addr): Likewise.
	* sparc64-tdep.c (sparc64_complex_floating_p): New function.
	(sparc64_store_floating_fields): Handle complex floats.
	(sparc64_store_arguments): Likewise.
	(sparc64_store_return_value): Likewise.
2011-09-28 17:59:42 +00:00
Eli Zaretskii c93dbcba16 Support "set environment" and "unset environment" in MinGW builds.
* windows-nat.c (env_sort) [!__CYGWIN__]: Function restored from
	before the change on 2006-12-09.
	(windows_create_inferior) [!__CYGWIN__]: Restore code that
	generates the environment block for CreateProcessA, modulo the
	Cygwin-specific parts that are not needed here.
2011-09-28 09:07:54 +00:00
gdbadmin 27ebf5b696 *** empty log message *** 2011-09-28 00:00:32 +00:00
Tristan Gingold f00c55f832 2011-09-27 Tristan Gingold <gingold@adacore.com>
* target.h (enum target_object): Add TARGET_OBJECT_DARWIN_DYLD_INFO.
	* solib-darwin.c (DYLD_VERSION_MAX): Update number.
	(darwin_solib_get_all_image_info_addr_at_init): New function.
	(darwin_solib_read_all_image_info_addr): Likewise.
	(darwin_solib_create_inferior_hook): Use the above two functions.
	* darwin-nat.c (darwin_execvp): Renames retval to res.
	(darwin_read_write_inferior): Update comment.
	(darwin_read_dyld_info): New function.
	(darwin_xfer_partial): Handle DYLD_INFO.
2011-09-27 15:30:18 +00:00
Stan Shebs 6710bf39b7 Add return address collection for tracepoints.
* tracepoint.c (encode_actions_1): Add case for $_ret.
	(validate_actionline): Check for $_ret.
	(trace_dump_actions): Ditto.
	* ax-gdb.h (gen_trace_for_return_address): Declare.
	* ax-gdb.c: Include arch-utils.h.
	(gen_trace_for_return_address): New function.
	(agent_command): Add return address special case.
	* amd64-tdep.c: Include ax.h and ax-gdb.h.
	(amd64_gen_return_address): New function.
	(amd64_init_abi): Call it.
	* i386-tdep.c: Include ax.h and ax-gdb.h.
	(i386_gen_return_address): New function.
	(i386_init_abi): Call it.
	* arch-utils.h (default_gen_return_address): Declare.
	* arch-utils.c (default_gen_return_address): New function.
	* gdbarch.sh (gen_return_address): New method.
	* gdbarch.h, gdbarch.c: Regenerate.

	* gdb.texinfo (Tracepoint Action Lists): Document $_ret.

	* gdb.trace/collection.exp: Test collection of $_ret.
2011-09-27 13:09:37 +00:00
gdbadmin efc7c64ad1 *** empty log message *** 2011-09-27 00:00:02 +00:00
gdbadmin 1781ecd0cb *** empty log message *** 2011-09-26 00:00:33 +00:00
gdbadmin 5b2148d58f *** empty log message *** 2011-09-25 00:00:02 +00:00
gdbadmin 8f4b00933a *** empty log message *** 2011-09-24 00:00:03 +00:00
Joseph Myers e04e5beb2e PR gdb/13079
* i386-tdep.c (i386_frame_align): New.
	(i386_gdbarch_init): Use i386_frame_align.
2011-09-23 14:50:30 +00:00
Yao Qi f3d6df6d3a gdb/
* i386-linux-nat.c (i386_linux_resume): Use read_memory_unsigned_integer
	to get address.
2011-09-23 07:27:19 +00:00
gdbadmin 1cd16a81ad *** empty log message *** 2011-09-23 00:00:02 +00:00
Tristan Gingold e69860f1b6 2011-09-22 Tristan Gingold <gingold@adacore.com>
* fork-child.c (fork_inferior): Add exec_fun parameter.
	Call exec_fun or execvp.
	* inferior.h: Adjust prototype.
	* gnu-nat.c (gnu_create_inferior): Adjust fork_inferior call.
	* inf-ttrace.c (inf_ttrace_create_inferior): Ditto.
	* inf-ptrace.c (inf_ptrace_create_inferior): Ditto.
	* procfs.c (procfs_create_inferior): Ditto.
	* darwin-nat.c (darwin_execvp): New function.
	(darwin_create_inferior): Use it.
2011-09-22 10:22:28 +00:00
Andreas Tobler b2a6bdebec 2011-09-22 Andreas Tobler <andreast@fgznet.ch>
* lib/gdb.exp (gdb_compile): Set rpath and remove -ldl from the
	list of compilation switches for <*-*-freebsd*>.
2011-09-22 04:58:22 +00:00
Yao Qi 4b51d87b48 gdb/
* infrun.c (context_switch): Print debug message when switching to
	a different thread.
2011-09-22 02:58:31 +00:00
gdbadmin e506952ffc *** empty log message *** 2011-09-22 00:00:03 +00:00
Ulrich Weigand 56b9d9ac05 * s390-tdep.c (s390_function_arg_pass_by_reference): Handle
complex and vector types.
	(s390_return_value_convention): Likewise.

	(s390_value_from_register): Call check_typedef.
	(extend_simple_arg): Likewise.
	(alignment_of): Likewise.
	(s390_push_dummy_call): Likewise.
	(s390_return_value): Likewise.
2011-09-21 17:00:31 +00:00
Ulrich Weigand 55329a5ca8 Fix ChangeLog dates. 2011-09-21 16:49:14 +00:00
Ulrich Weigand 71487fd776 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
(arm_linux_hwbp_cap): New static variable.
	(arm_linux_get_hwbp_cap): Replace by ...
	(arm_linux_init_hwbp_cap): ... this new function.
	(arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
	(arm_linux_get_hw_watchpoint_count): Likewise.
	(arm_linux_get_hw_watchpoint_max_length): Likewise.
	(arm_arch_setup): Call arm_linux_init_hwbp_cap.
	(arm_prepare_to_resume): Use perror_with_name instead of error.
2011-09-21 16:15:27 +00:00
Joseph Myers b2cd6b2948 * event-top.c (async_disconnect): If an exception is thrown from
quit_cover, call pop_all_targets.  Use TRY_CATCH instead of
	catch_errors.
	* top.c (quit_cover): Return void and take no arguments.
	* top.h (quit_cover): Update prototype.
2011-09-21 15:21:28 +00:00
Ulrich Weigand 09b4ad9fcb * linux-arm-low.c: Include <signal.h>.
(PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
	(struct arm_linux_hwbp_cap): New data type.
	(arm_hwbp_type, arm_hwbp_control_t): New typedefs.
	(struct arm_linux_hw_breakpoint): New data type.
	(MAX_BPTS, MAX_WPTS): Define.
	(struct arch_process_info, struct arch_lwp_info): New data types.
	(arm_linux_get_hwbp_cap): New function.
	(arm_linux_get_hw_breakpoint_count): Likewise.
	(arm_linux_get_hw_watchpoint_count): Likewise.
	(arm_linux_get_hw_watchpoint_max_length): Likewise.
	(arm_hwbp_control_initialize): Likewise.
	(arm_hwbp_control_is_enabled): Likewise.
	(arm_hwbp_control_is_initialized): Likewise.
	(arm_hwbp_control_disable): Likewise.
	(arm_linux_hw_breakpoint_equal): Likewise.
	(arm_linux_hw_point_initialize): Likewise.
	(struct update_registers_data): New data structure.
	(update_registers_callback: New function.
	(arm_insert_point): Likewise.
	(arm_remove_point): Likewise.
	(arm_stopped_by_watchpoint): Likewise.
	(arm_stopped_data_address): Likewise.
	(arm_new_process): Likewise.
	(arm_new_thread): Likewise.
	(arm_prepare_to_resume): Likewise.
	(the_low_target): Register arm_insert_point, arm_remove_point,
	arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
	arm_new_thread, and arm_prepare_to_resume.
2011-09-21 12:39:50 +00:00
gdbadmin fc436fd907 *** empty log message *** 2011-09-21 00:00:33 +00:00
Joseph Myers 67ba4e42a0 * mi/mi-main.c (mi_load_progress): Restore saved_uiout value to
current_uiout, not uiout.
2011-09-20 15:19:28 +00:00
gdbadmin 34082fcaca *** empty log message *** 2011-09-20 00:00:03 +00:00
Doug Evans 562f943bcc * python/py-auto-load.c (source_section_scripts): Fix file
descriptor leak.
	* python/python.c (source_python_script_for_objfile): Tweak comments.
2011-09-19 19:01:40 +00:00
Stan Shebs 3c9057f381 * gdb.trace/tspeed.exp: New file.
* gdb.trace/tspeed.c: New file.
2011-09-19 16:55:26 +00:00
Kevin Pouget 0672bf414a [OBV] fix typos in ChangeLog 2011-09-19 10:50:53 +00:00
gdbadmin d061e45b9a *** empty log message *** 2011-09-19 00:00:32 +00:00
Yao Qi 3451853062 Support displaced stepping for Thumb 16-bit insns.
gdb/
	* arm-tdep.c (THUMB_NOP) Define.
	(thumb_copy_unmodified_16bit): New.
	(thumb_copy_b, thumb_copy_bx_blx_reg): New.
	(thumb_copy_alu_reg): New.
	(arm_copy_svc): Move some common code to ...
	(install_svc): ... here.  New.
	(thumb_copy_svc): New.
	(install_pc_relative): New.
	(thumb_copy_pc_relative_16bit): New.
	(thumb_decode_pc_relative_16bit): New.
	(thumb_copy_16bit_ldr_literal): New.
	(thumb_copy_cbnz_cbz): New.
	(cleanup_pop_pc_16bit_all): New.
	(thumb_copy_pop_pc_16bit): New.
	(thumb_process_displaced_16bit_insn): New.
	(thumb_process_displaced_32bit_insn): New.
	(thumb_process_displaced_insn): process thumb instruction.

	Support displaced stepping for Thumb 32-bit insns.
	gdb/
	* arm-tdep.c (thumb_copy_unmodified_32bit): New.
	(thumb2_copy_preload): New.
	(thumb2_copy_copro_load_store): New.
	(thumb2_copy_b_bl_blx): New.
	(thumb2_copy_alu_imm): New.
	(thumb2_copy_load_reg_imm): New.
	(thumb2_copy_load_literal): New
	(thumb2_copy_block_xfer): New.
	(thumb_32bit_copy_undef): New.
	(thumb_32bit_copy_unpred): New.
	(thumb2_decode_ext_reg_ld_st): New.
	(thumb2_decode_svc_copro): New.
	(decode_thumb_32bit_store_single_data_item): New.
	(thumb_copy_pc_relative_32bit): New.
	(thumb_decode_pc_relative_32bit): New.
	(decode_thumb_32bit_ld_mem_hints): New.
	(thumb2_copy_table_branch): New
	(thumb_process_displaced_32bit_insn): Process Thumb 32-bit
	instructions.

	gdb/testsuite/
	* gdb.arch/arm-disp-step.S (test_ldr_literal): Test for Thumb
	instructions.
	(test_adr_32bit, test_pop_pc): Likewise.
	(test_ldr_literal_16, test_cbz_cbnz, test_adr): New test for
	Thumb instructions.
	* gdb.arch/arm-disp-step.exp (test_ldm_stm_pc): Match $gdb_prompt
	in gdb_test_multiple.
	(test_ldr_literal_16, test_cbz_cbnz, test_adr): New.
2011-09-18 14:34:55 +00:00
Yao Qi 2b16b2e33b gdb/
* arm-tdep.c (install_copro_load_store): PC is set 4-byte aligned.
	(install_b_bl_blx): Likewise.
2011-09-18 14:18:07 +00:00
Yao Qi ab254057b8 gdb/testsuite/
* lib/gdb.exp (can_single_step_to_signal_handler): New.
	* gdb.base/kill-after-signal.exp: Call it.  Skip if target doesn't
	support single step to signal handler.
2011-09-18 02:36:27 +00:00
gdbadmin f5b1e24db0 *** empty log message *** 2011-09-18 00:00:32 +00:00
Yao Qi 0f6f04bad9 gdb/
* arm-tdep.c (install_ldr_str_ldrb_strb): Renamed to ...
        (install_load_store): ... this.  New.
        Change parameter BYTE to SIZE.
        (arm_copy_ldr_str_ldrb_strb): Update caller.
        (arm_decode_ld_st_word_ubyte): Update caller.
2011-09-17 14:37:59 +00:00
Yao Qi 9c317b7184 gdb/testsuite/
* gdb.base/disp-step-fork.c: New.
	* gdb.base/disp-step-syscall.exp: New.
	* gdb.base/disp-step-vfork.c: New.
2011-09-17 13:34:01 +00:00
Yao Qi e2d966398c gdb/
* infrun.c (displaced_step_fixup): Move some code ...
	(displaced_step_restore): ... here.  New function.
	(handle_inferior_event): Cleanup displaced stepping state for both
	child and parent when get forked or vforked event.
	* regcache.c (get_thread_arch_aspace_regcache): New function.
	get_thread_arch_regcache (): Call it.
2011-09-17 13:29:32 +00:00
gdbadmin f8c9c016f7 *** empty log message *** 2011-09-17 00:00:03 +00:00
Joel Brobecker a812315168 [Ada] Re-implement `info tasks' command using ui-out
This is in preparation for providing a GDB/MI equivalent of
the `info tasks' command.  The previous implementation was using
various printf commands to generate the command output, which
does not work at all if we want to use that same code to generate
the result for that new GDB/MI command.

This patch thus re-implements the `info tasks' command (with no
arguments) in a way that makes it GDB/MI friendly.

There is an additional hicup, which is the fact that the `info tasks'
command displays a completely different type of output when a task
ID is given. For instance:

    (gdb) info task 2
    Ada Task: 0x644d20
    Name: my_callee
    Thread: 0
    LWP: 0x5809
    Parent: 1 (main_task)
    Base Priority: 48
    State: Blocked in accept or select with terminate

The above output is better when in CLI mode, but really not
what we want when in GDB/MI mode. In GDB/MI mode, we want to
follow what the `-thread-info' command does when a task-id
is given as an argument, which is to produce the same table,
but with only one element/task in it.

For compatibility as well as practical reasons, we do not want
to change the output of the `info task TASKNO' command when in
CLI mode.  But it's easy to preserve this behavior while providing
the desirable output when in GDB/MI mode.  For this, the function
used to generated the `info tasks' output has been enhanced to take
an argument interpreted as a string. The CLI command knows to never
provide that argument, while the GDB/MI command will pass one if
provided by the user.

gdb/ChangeLog:

        * ada-tasks.c (print_ada_task_info): New function, merging
        short_task_info and info_tasks together.  Reimplement using
        ui-out instead of printing to stdout directly.  Move the code
        building and checking the task list here, instead of leaving it
        in info_tasks_command.
        (info_task): Move the code building and checking the task
        list here, instead of leaving it in info_tasks_command.
        (info_tasks_command): Delete code building and checking
        the task list - moved elsewhere.  Update calls to info_tasks
        and info_task.

One of the minor changes the switch caused is the introduction
of a space between the "current" column, and the task "ID"
column, which wasn't there before.  This matches what we do
in the "info threads" command, so I kept that change.  This
required an adjustment in the testsuite, however...

gdb/testsuite/ChangeLog:

        * gdb.ada/tasks.exp: Make the expected output for
        the `info tasks' tests more resilient to spacing
        changes.
2011-09-16 19:09:57 +00:00
Joel Brobecker fbf0682413 [Ada] Remove `from_tty' parameter from ada-tasks.c:info_task
This parameter is unused, and probably will never be useful.

gdb/ChangeLog:

        * ada-tasks.c (info_task): Delete parameter `from_tty'.
2011-09-16 19:09:43 +00:00
Joel Brobecker 34a0bc90f4 [Ada] Remove `from_tty' parameter from ada-tasks.c:info_tasks
This parameter is unused, and probably will never be useful.

gdb/ChangeLog:

        * ada-tasks.c (info_tasks): Delete parameter `from_tty'.
2011-09-16 19:09:34 +00:00
Joel Brobecker 79779fa90b [Ada] Adjust ada-tasks.c:ada_build_task_list
Originally, this function had a parameter called `warn_if_null'
which would trigger a message to be printed on stdout if the
program was found to not use Ada tasking.  It used one of the printf_
functions for that, which is wrong when considering the context of
GDB/MI interpreters.

So, this patch changes this function to stop printing the message,
and leaves that part to the callers instead.  It also changes the
semantics slightly to return the number of tasks found, rather than
a yes/no answer.  Not strictly needed, but simple enough to do, and
potentially useful later.

gdb/ChangeLog:

        * ada-lang.h (ada_build_task_list): Remove parameter
        `warn_if_null'.
        * ada-tasks.c (ada_build_task_list): Remove parameter
        `warn_if_null'.  Adjust implementation and documentation.
        (valid_task_id, ada_get_environment_task)
        iterate_over_live_ada_tasks): Adjust call to ada_build_task_list.
        (info_tasks_command): Adjust implementation.
        (task_command): Likewise.
        * ravenscar-thread.c (ravenscar_find_new_threads): Fix call
        to ada_build_task_list.
2011-09-16 19:09:26 +00:00
Joel Brobecker e225eb91c1 [Ada] Store the Ada task list in per-inferior data
Instead of storing "the" Ada task list using a static global
in ada-tasks, this patch stores that information inside
per-inferior data.

We also add in the per-inferior data the location and type of
data used in the runtime to store that task list.  Previously,
this information was saved as a static variable in one of the
functions, but this approach has the major flaw that it does
not handle multi-inferior debugging.

gdb/ChangeLog:

        * ada-tasks.c (ada_tasks_check_symbol_table, task_list): Delete.
        (enum ada_known_tasks_kind, struct ada_tasks_inferior_data): New.
        (ada_tasks_inferior_data_handle): New static global.
        (get_ada_tasks_inferior_data): New function.
        (ada_get_task_number, get_task_number_from_id, valid_task_id)
        (ada_get_environment_task, iterate_over_live_ada_tasks)
        (add_ada_task, read_known_tasks_array, read_known_tasks_list):
        Adjust.
        (ada_set_current_inferior_known_tasks_addr): New function.
        (read_known_tasks, ada_build_task_list, short_task_info)
        (info_tasks, info_task, info_tasks_command, task_command_1)
        (task_command, ada_task_list_changed): Adjust.
        (ada_tasks_invalidate_inferior_data): New function.
        (ada_normal_stop_observer, ada_new_objfile_observer): Adjust.
        (_initialize_tasks): Set ada_tasks_inferior_data_handle.
        * ada-lang.h (struct inferior): Add declaration.
        (ada_task_list_changed): Update profile.
        * remote-wtx-pd.c: #include "inferior.h".
        (switch_to_pd_internal): Update call to ada_task_list_changed.
2011-09-16 19:09:17 +00:00
Joel Brobecker 6da9ca05ac [Ada] Make the ATCB type info program-space-specific
This module caches the type description of various elements of
the Ada Task Control Block (ATCB). This cache was implemented
as static globals, which is wrong in the case where we have
multiple inferiors. This change cleans things up a bit by moving
some of these static globals to a per-program-space area.

gdb/ChangeLog:

        * ada-tasks.c: #include "progspace.h" and "objfiles.h".
        (atcb_type, atcb_common_type, atcb_ll_type, atcb_call_type)
        (atcb_fieldno): Delete these static globals.
        (struct ada_tasks_pspace_data): New struct.
        (ada_tasks_pspace_data_handle): New static global.
        (get_ada_tasks_pspace_data): New function.
        (ada_tasks_invalidate_pspace_data): New function.
        (get_tcb_types_info, ptid_from_atcb_common, read_atcb)
        (read_known_tasks_list, ada_new_objfile_observer): Adjust.
        (_initialize_tasks): Create this module's per-progspace
        data handle.
2011-09-16 19:09:07 +00:00
Joel Brobecker dccd3cbdab [Ada] Rename struct tcb_fieldnos into atcb_fieldnos.
`atcb' is clearer than `tcb', as it stands for Ada Task Control
Block. This is also consistent with the rest of the code, which
uses atcb...

gdb/ChangeLog:

        * ada-tasks.c (struct atcb_fieldnos): Renames struct tcb_fieldnos.
2011-09-16 19:08:50 +00:00
Tristan Gingold f877b031e8 2011-09-16 Tristan Gingold <gingold@adacore.com>
* fork-child.c (fork_inferior): Update comment.  Use alloca
	instead of xmalloc for argv.  Move len and shell_command
	declarations in the block where they are used.
	Only call execvp.  Factorize failure code.
2011-09-16 15:41:09 +00:00
Jan Kratochvil ae0c443d84 gdb/
Code cleanup.
	* parse.c (write_exp_elt): Change argument to pass a pointer of union
	`exp_element' instead of an element of the same and make the function
	static.
	(write_exp_elt_opcode, write_exp_elt_sym, write_exp_elt_block)
	(write_exp_elt_objfile, write_exp_elt_longcst, write_exp_elt_dblcst)
	(write_exp_elt_decfloatcst, write_exp_elt_type, write_exp_elt_intern):
	Change argument of `write_exp_elt' function call.
	Remove extra spaces from comments.
	* parser-defs.h (write_exp_elt): Remove prototype.
2011-09-16 14:36:55 +00:00
Hui Zhu d99f7e4842 2011-09-16 Hui Zhu <teawater@gmail.com>
* gdb.texinfo (Tracepoint Restrictions): Change *$esp@300
	to *(unsigned char *)$esp@300.
2011-09-16 09:07:01 +00:00
Jan Kratochvil 63a9aad80e gdb/testsuite/
* gdb.python/py-evthreads.exp (Run to breakpoint 1)
	(reached breakpoint 2, reached breakpoint 3): Update expected output.
2011-09-16 07:34:27 +00:00
gdbadmin d0bc107f79 *** empty log message *** 2011-09-16 00:00:33 +00:00
Stan Shebs 6b9801d456 * server.h (struct emit_ops): Add compare-goto fields.
* tracepoint.c (gdb_agent_op_sizes): New table.
	(emit_eq_goto): New function.
	(emit_ne_goto): New function.
	(emit_lt_goto): New function.
	(emit_le_goto): New function.
	(emit_gt_goto): New function.
	(emit_ge_goto): New function.
	(is_goto_target): New function.
	(compile_bytecodes): Recognize special cases of compare-goto
	combinations and call specialized emitters for them.
	* linux-x86-low.c (amd64_emit_eq_goto): New function.
	(amd64_emit_ne_goto): New function.
	(amd64_emit_lt_goto): New function.
	(amd64_emit_le_goto): New function.
	(amd64_emit_gt_goto): New function.
	(amd64_emit_ge_goto): New function.
	(amd64_emit_ops): Add the new functions.
	(i386_emit_eq_goto): New function.
	(i386_emit_ne_goto): New function.
	(i386_emit_lt_goto): New function.
	(i386_emit_le_goto): New function.
	(i386_emit_gt_goto): New function.
	(i386_emit_ge_goto): New function.
	(i386_emit_ops): Add the new functions.
2011-09-15 22:54:13 +00:00
Paul Koning 5af65ec072 * python/py-cmd.c (gdbpy_string_to_argv): Decrement reference
count of item appended to list.
* python/py-type.c (typy_fields): Likewise.
2011-09-15 18:33:15 +00:00
Paul Koning 883640a804 Fix ChangeLog typo 2011-09-15 17:20:56 +00:00
Paul Koning d812018b48 * gdb.texinfo: Make style of Python functions and methods match
the syntax of Python.  Also put class and module names explicitly
on function, member, and variable names, matching Python
documentation conventions.
2011-09-15 16:09:42 +00:00
Joel Brobecker d93db82c58 Add period at end of sentence in top entry. 2011-09-15 15:49:53 +00:00
Paul Koning 72be8ccc5e MAINTAINERS (Right After Approval): Add myself to the list 2011-09-15 15:40:22 +00:00
Kevin Pouget 92f6badcc0 2011-09-15 Kevin Pouget <kevin.pouget@st.com>
PR threads/12628
	* linux-fork.c (checkpoint_command): Disallow checkpointing of
	processes with multiple threads.
	(inf_has_multiple_thread_cb): New function.
	(inf_has_multiple_threads): New function.
2011-09-15 12:47:07 +00:00
Kevin Pouget 2aa483373c 2011-09-15 Kevin Pouget <kevin.pouget@st.com>
PR Python/12692 Add gdb.selected_inferior() to Python interface.
	* python/py-inferior.c (GdbMethods): New Python method definition.

doc:
	PR Python/12692 Add gdb.selected_inferior() to Python interface.
	* gdb.texinfo (Inferiors In Python): Describe new
	gdb.selected_inferior() function.

testsuite:
	PR Python/12692 Add gdb.selected_inferior() to Python interface.
	* gdb.python/py-inferior.exp: Add testcase for gdb.selected_inferior().
2011-09-15 12:42:30 +00:00
Kevin Pouget 6839b47f2b 2011-09-15 Kevin Pouget <kevin.pouget@st.com>
Handle multiple breakpoint hits in Python interface:
	* python/py-bpevent.c (create_breakpoint_event_object): Rename C/Python
	variable to breakpoints.
	* python/py-stopevent.c (emit_stop_event): Return a Python tuple of
	bps instead of single breakpoint. Fix some space typos.
	* python/py-stopevent.c (create_breakpoint_event_object): Rename
	variable to breakpoints.

testsuite:
	* gdb.python/py-events.exp: Set a duplicate breakpoint and check its
	presence.
	* gdb.python/py-events.py (breakpoint_stop_handler): Browse all the
	breakpoint hits.

doc:
	* gdb.texinfo (Events In Python): New function documentation:
	gdb.BreakpointEvent.breakpoints. Indicate that
	gdb.BreakpointEvent.breakpoint is now deprecated.
2011-09-15 12:27:20 +00:00
Kevin Pouget 672f9b6009 2011-09-15 Kevin Pouget <kevin.pouget@st.com>
* breakpoint.c (describe_other_breakpoints): Do not write 'duplicate'
	note if the breakpoint is internal.
2011-09-15 12:18:29 +00:00
Kevin Pouget 43675ae423 2011-09-15 Kevin Pouget <kevin.pouget@st.com>
* MAINTAINERS (Right After Approval): Add myself to the list
2011-09-15 11:53:03 +00:00
gdbadmin 2613efea9b *** empty log message *** 2011-09-15 00:00:02 +00:00
Pedro Alves 15148d6a1d 2011-09-14 Pedro Alves <pedro@codesourcery.com>
* infrun.c (prepare_for_detach, wait_for_inferior)
	(fetch_inferior_event): Don't flush the register cache.
	* remote.c (struct stop_reply) <regcache>: Add comment.
2011-09-14 12:26:29 +00:00
gdbadmin bc99db5140 *** empty log message *** 2011-09-14 00:00:33 +00:00
Jan Kratochvil d83e736b11 gdb/
Remove excessive DWARF expressions memory duplication.
	* dwarf2loc.c (per_cu_dwarf_call): Remove variable back_to and its use
	for block.data.
	(indirect_pieced_value): Remove variable result.  Remove variable
	back_to and its use for baton.data.
	(dwarf2_compile_expr_to_ax): Remove variable back_to and its use for
	block.data.
	* dwarf2read.c (dwarf2_fetch_die_location_block): Remove xmemdup.
	Update the function comment.
2011-09-13 21:44:27 +00:00
Jan Kratochvil 0935723e5e gdb/testsuite/
* gdb.python/py-events.exp: Remove pretty printing comment.
	* gdb.python/py-evsignal.exp: New file.
	* gdb.python/py-evthreads.c: Include signal.h.
	(thread3): Remove variable count3.  Remove variable bad and use raise
	instead.
	(thread2): Remove variable count2.  Move thread3 pthread_create here,
	merge pthread_join to a single line.
	(main): Remove variable count1.  Merge pthread_join with pthread_create
	to a single line.
	* gdb.python/py-evthreads.exp: Remove pretty printing comment.  New
	KFAIL python/12966 for gdbserver.  Test return value of
	gdb_compile_pthreads.  Use gdb_run_cmd.  Replace send_gdb and
	gdb_expect by gdb_test and gdb_test_multiple.
	(thread 2, thread 3): New tests.
2011-09-13 21:39:59 +00:00
Pedro Alves c65b3e0d43 2011-09-13 Pedro Alves <pedro@codesourcery.com>
* inferior.h (ALL_INFERIORS): New.
	* linux-thread-db.c (thread_db_find_new_threads_2): Remove check
	for a stopped thread.
	(thread_db_find_new_threads): Look for threads in all inferiors.
2011-09-13 19:27:01 +00:00
Pedro Alves a1398e0c56 2011-09-13 Pedro Alves <pedro@codesourcery.com>
* breakpoint.c (update_watchpoint): Handle the case of the
	watchpoint to update not being in the breakpoint list yet.
	(hw_watchpoint_use_count): New, factored out from
	hw_watchpoint_used_count.
	(hw_watchpoint_used_count): Rename to ...
	(hw_watchpoint_used_count_others): ... this.  Add `except'
	parameter.  Don't count resources of `except'.  Use
	hw_watchpoint_use_count.
2011-09-13 16:37:13 +00:00
Pedro Alves 305962315a 2011-09-13 Pedro Alves <pedro@codesourcery.com>
* gdbthread.h (enum thread_state): Moved here.
	(struct thread_info): Rename `executing_' field to `executing' and
	`state_' to `state'.
	* thread.c (enum thread_state): Moved to gdbthread.h.
	(new_thread, add_thread_silent, delete_thread_1)
	(any_live_thread_of_process, thread_alive, set_running)
	(set_running, is_thread_state, any_running, is_executing)
	(set_executing, finish_thread_state, print_thread_info)
	(do_captured_thread_select): Adjust.
2011-09-13 14:48:55 +00:00
Jan Kratochvil bede5f5f81 gdb/
Fix compatibility with gcc < 4.3 and non-gcc compilers.
	* amd64-tdep.c (amd64_skip_xmm_prologue): Convert 0b constants.
2011-09-13 08:26:11 +00:00
gdbadmin 43e4b79620 *** empty log message *** 2011-09-13 00:00:02 +00:00
Pedro Alves 4801a9a356 gdb/
2011-09-12  Pedro Alves  <pedro@codesourcery.com>
	    Matt Rice  <ratmice@gmail.com>

	PR gdb/13175

	* interps.c (struct interp) <interpreter_out>: Delete field.
	(interp_new): Remove the data and uiout parameters and adjust.
	(interp_set): Only set the current_uiout from the interpreter's
	uiout after initializing the interpreter.  Adjust call to
	init_proc.
	(interp_ui_out): Adjust to call procs->ui_out_proc.
	(interp_data, interp_name): New.
	* interps.h (interp_init_ftype): Add `self' parameter.
	(interp_ui_out_ftype): New typedef.
	(struct interp_procs) <ui_out_proc>: New method pointer.
	(interp_new): Remove the data and uiout parameters.
	(interp_data, interp_name): Declare.
	* tui/tui-interp.c (tui_init): Adjust prototype.
	(tui_ui_out): New.
	(_initialize_tui_interp): Install tui_ui_out.  Don't instanciate
	tui_out here.  Adjust call to interp_new.
	* tui/tui-io.c (tui_initialize_io): Don't set current_uiout here.
	* cli/cli-interp.c (cli_interpreter_init): Adjust prototype.
	(cli_ui_out): New.
	(_initialize_cli_interp): Install it.  Adjust call to interp_new.
	* mi/mi-common.h (struct mi_interp) <uiout>: New field.
	* mi/mi-interp.c (mi_interpreter_init): Adjust prototype.
	Initialize mi->uiout depending on the mi_version as extracted from
	the interpreter's name.
	(mi_ui_out): New.
	(_initialize_mi_interp): Install mi_ui_out.  Adjust calls to
	interp_new.  Don't allocate the ui_out's of the interpreters here.

gdb/testsuite/
2011-09-12  Matt Rice  <ratmice@gmail.com>
	    Pedro Alves  <pedro@codesourcery.com>

	PR gdb/13175

	* gdb.base/interp.exp: New tests.
	* gdb.base/interp.c: New file.
2011-09-12 21:25:22 +00:00
Aleksandar Ristovski d0afda0369 * ChangeLog: Fix comment and date. 2011-09-12 19:02:01 +00:00
Aleksandar Ristovski 59145f8cfb * solib.c (solib_used): New function.
(update_solib_list, reload_shared_libraries_1): Check if objfile is used
    by another so_list object before freeing it.
2011-09-12 19:00:22 +00:00
Doug Evans 24ece742a0 * gdb.dwarf2/clztest.exp: Fix initialization of tests array.
* gdb.dwarf2/typeddwarf.exp: Ditto.
2011-09-12 18:07:22 +00:00
gdbadmin caa900384a *** empty log message *** 2011-09-12 00:00:33 +00:00
Jan Kratochvil bdaf8d4acd gdb/
Code cleanup.
	* mi/mi-cmd-stack.c (list_args_or_locals): Use enum for the parameter
	values.
2011-09-11 09:54:18 +00:00
gdbadmin d9ff937efe *** empty log message *** 2011-09-11 00:00:05 +00:00
gdbadmin 8f00849d11 *** empty log message *** 2011-09-10 00:00:03 +00:00
Jan Kratochvil df15bd07df gdb/
Code cleanup.
	* amd64-tdep.c (amd64_skip_prologue): Move the XMM code to ...
	(amd64_skip_xmm_prologue): ... this new function.  Describe its
	parameters.  No longer use amd64_prologue_line_bug.
	* defs.h (producer_is_gcc_ge_4): New declaration.
	* dwarf2read.c (producer_is_gcc_ge_4): Move to utils.c.
	(process_full_comp_unit): Update its caller.  Remove
	amd64_prologue_line_bug initialization.
	* symtab.h (struct symtab): Remove field amd64_prologue_line_bug.
	* utils.c (producer_is_gcc_ge_4): Moved here from dwarf2read.c.
2011-09-09 19:41:14 +00:00
Pedro Alves ddf17726b2 Fixup last entry.
2011-09-09  Pedro Alves  <pedro@codesourcery.com>

	* linux-nat.h (enum resume_kind): New.
	(struct lwp_info) <last_resume_kind>: New field.
	* linux-nat.c (linux_child_follow_fork): Set last_resume_kind to
	resume_stop on the new lwp.
	(add_lwp): Set last_resume_kind as resume_continue by default.
	(lin_lwp_attach_lwp): Set last_resume_kind as resume_stop.
	(resume_lwp): New, factored out from resume_callback.  Also check
	for pending status in lp->waitstatus.
	(resume_callback): Reimplement.
	(resume_clear_callback): Set last_resume_kind as resume_stop.
	(resume_set_callback): Set last_resume_kind as resume_continue.
	(linux_nat_resume, linux_handle_extended_wait): Set
	last_resume_kind.
	(running_callback): Also check lp->waitstatus for pending events.
	(select_singlestep_lwp_callback): Check that lp->last_resume_kind
	is resume_step.
	(stop_and_resume_callback): Don't re-resume if the core wanted the
	lwp stopped.  Use resume_lwp instead of resume_callback.  Avoid
	using an invalidated pointer.
	(linux_nat_filter_event): Don't discard SIGSTOPs as delayed
	SIGSTOPs if the core wanted the LWP to stop.
	(linux_nat_wait_1) Don't consume a pending SIGSTOP if the core
	wanted the lwp to stop.  If the core wanted the lwp to stop, and
	the lwp stopped with a SIGSTOP, report a TARGET_SIGNAL_0 instead
	of TARGET_SIGNAL_STOP.
	(linux_nat_stop_lwp): Don't synchronously wait for the lwp to stop
	here.  Instead, signal the lwp, and set the last_resume_kind to
	resume_stop.
2011-09-09 19:29:51 +00:00
Pedro Alves 25289eb274 2011-09-09 Pedro Alves <pedro@codesourcery.com>
* linux-nat.h (enum resume_kind): New.
	(struct lwp_info) <last_resume_kind>: New field.
	(linux_child_follow_fork): Set last_resume_kind to resume_stop on
	the new lwp.
	(add_lwp): Set last_resume_kind as resume_continue by default.
	(lin_lwp_attach_lwp): Set last_resume_kind as resume_stop.
	(resume_lwp): New, factored out from resume_callback.  Also check
	for pending status in lp->waitstatus.
	(resume_callback): Reimplement.
	(resume_clear_callback): Set last_resume_kind as resume_stop.
	(resume_set_callback): Set last_resume_kind as resume_continue.
	(linux_nat_resume, linux_handle_extended_wait): Set
	last_resume_kind.
	(running_callback): Also check lp->waitstatus for pending events.
	(select_singlestep_lwp_callback): Check that lp->last_resume_kind
	is resume_step.
	(stop_and_resume_callback): Don't re-resume if the core wanted the
	lwp stopped.  Use resume_lwp instead of resume_callback.  Avoid
	using an invalidated pointer.
	(linux_nat_filter_event): Don't discard SIGSTOPs as delayed
	SIGSTOPs if the core wanted the LWP to stop.
	(linux_nat_wait_1) Don't consume a pending SIGSTOP if the core
	wanted the lwp to stop.  If the core wanted the lwp to stop, and
	the lwp stopped with a SIGSTOP, report a TARGET_SIGNAL_0 instead
	of TARGET_SIGNAL_STOP.
	(linux_nat_stop_lwp): Don't synchronously wait for the lwp to stop
	here.  Instead, signal the lwp, and set the last_resume_kind to
	resume_stop.
2011-09-09 19:27:50 +00:00
Pedro Alves f687d03564 2011-09-09 Pedro Alves <pedro@codesourcery.com>
* linux-nat.c (lin_lwp_attach_lwp): Return 1 (ignore) instead of
	-1 (error), if the lwp exits right after attaching.
2011-09-09 19:20:24 +00:00
gdbadmin 5f246d3146 *** empty log message *** 2011-09-09 00:00:02 +00:00
Stan Shebs bf15cbda54 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
(i386_emit_epilogue): Restore %ebx.
2011-09-08 22:38:29 +00:00
Doug Evans 63d97a2024 * py-cmd.c: Some minor formatting fixes.
(gdbpy_parse_command_name): Rename text arg to name, make const.
	All callers updated.
	* python-internal.h (gdbpy_parse_command_name): Update.
2011-09-08 19:51:27 +00:00
Jan Kratochvil 7f06221767 gdb/testsuite/
Fix compatibility with x32 arch.
	* testsuite/gdb.dwarf2/typeddwarf.exp: Check also is_lp64_target.
	* testsuite/gdb.trace/backtrace.exp: Use is_amd64_regs_target and
	is_x86_like_target.
	* testsuite/gdb.trace/collection.exp: Likewise.
	* testsuite/gdb.trace/report.exp: Likewise.
	* testsuite/gdb.trace/unavailable.exp: Likewise.
	* testsuite/gdb.trace/while-dyn.exp: Likewise.
	* testsuite/lib/gdb.exp (is_amd64_regs_target): New function.
	(is_x86_like_target): Check also is_amd64_regs_target.
2011-09-08 17:40:54 +00:00
Doug Evans bc587a6bd2 * cli/cli-decode.c (add_cmd): Add comment. 2011-09-08 17:20:43 +00:00
Jan Kratochvil 08711b9a36 gdb/
PR breakpoints/12435
	* amd64-tdep.c (amd64_skip_prologue): New variables start_pc_sal,
	next_sal, buf, offset and xmmreg.  Advance PC if it sees the PR.
	* dwarf2read.c (process_full_comp_unit): Initialize
	amd64_prologue_line_bug.
	* symtab.h (struct symtab): New field amd64_prologue_line_bug.

gdb/testsuite/
	PR breakpoints/12435
	* gdb.arch/amd64-prologue-xmm.c: New file.
	* gdb.arch/amd64-prologue-xmm.exp: New file.
	* gdb.arch/amd64-prologue-xmm.s: New file.
2011-09-08 15:38:16 +00:00
Jan Kratochvil b2e7f004c7 gdb/
Fix TUI screen corruption.
	* utils.c (fputs_maybe_filtered): Replace !input_from_terminal_p by
	batch_flag.
2011-09-08 15:27:46 +00:00
Jan Kratochvil 8afd712c6f gdb/
* findvar.c (read_var_value): Never return NULL, throw an error
	instead.  Update the function comment.  State symbol name in the error
	messages.
	* python/py-frame.c (frapy_read_var): Remove handling of NULL from
	read_var_value.
	* stack.c (print_frame_args): Likewise.
	* valops.c (value_of_variable): Likewise.
2011-09-08 15:26:08 +00:00
Jan Kratochvil b99b5f66e1 gdb/
* stack.c (print_frame_args): New variable except.  Wrap
	read_var_value and common_val_print into TRY_CATCH.

gdb/testsuite/
	* gdb.dwarf2/dw2-param-error-main.c: New file.
	* gdb.dwarf2/dw2-param-error.S: New file.
	* gdb.dwarf2/dw2-param-error.exp: New file.
2011-09-08 15:24:25 +00:00
Pedro Alves a391a2f6df 2011-09-08 Pedro Alves <pedro@codesourcery.com>
* gdb.base/annota1.exp, gdb.base/annota3.exp: Extract the
	inferior's pid and look for a core dump named core.$pid.  Use
	`remote_file' commands on the host instead of hand coding shell
	commands on the build.
	* gdb.base/valgrind-db-attach.exp: Kill the program before
	finishing the test.
2011-09-08 14:56:34 +00:00
Jan Kratochvil 85bc8cb785 gdb/
* eval.c (evaluate_subexp_standard) <OP_THIS>: Update the value_of_this
	caller to value_of_this.
	* p-exp.y: Update the value_of_this caller to value_of_this_silent.
	Twice.
	* valops.c (value_of_this): Remove parameter complain and variable ret.
	Update function comment.  Never return NULL by this code.
	(value_of_this_silent): New function.
	* value.h (value_of_this): Remove parameter complain.
	(value_of_this_silent): New declaration.
2011-09-08 14:54:20 +00:00
gdbadmin f6c802f429 *** empty log message *** 2011-09-08 00:00:33 +00:00
Yao Qi ede1849f92 gdb/
* gdbthread.h (struct thread_info): Remove fields
	`stepping_through_solib_after_catch' and
	`stepping_through_solib_catchpoints'.
	* infrun.c (init_thread_stepping_state): Update.
	(process_event_stop_test, currently_stepping): Update.
	(currently_stepping_or_nexting_callback): Update.
2011-09-07 14:24:48 +00:00
Yao Qi 6aa27652a7 gdb/
* gdbthread.h (struct thread_info): Comment on field
	`step_after_step_resume_breakpoint'.
2011-09-07 13:36:47 +00:00
Pedro Alves 00db5b9440 2011-09-07 Abhijit Halder <abhijit.k.halder@gmail.com>
* remote.c (remote_console_output): Reindent.
2011-09-07 10:34:15 +00:00
Luis Machado 861152be0e 2011-09-06 Luis Machado <lgustavo@codesourcery.com>
* frame.c (has_stack_frames): Check for currently selected
	traceframe.
2011-09-07 02:33:58 +00:00
gdbadmin 78f6c05846 *** empty log message *** 2011-09-07 00:00:03 +00:00
Pedro Alves ab821bc647 2011-09-06 Pedro Alves <pedro@codesourcery.com>
* event-top.h (MAXPROMPTS, struct prompts): Delete.
	(set_async_annotation_level, set_async_prompt, pop_prompt)
	(push_prompt, new_async_prompt): Delete declarations.
	* top.h (get_prompt, set_prompt): Change prototype.
	(get_prefix, set_prefix, get_suffix, set_suffix): Delete
	declarations.
	* top.c (command_loop):
	(top_prompt): New global.
	(get_prefix, set_prefix, get_suffix, ): Delete.
	(get_prompt, set_prompt): Rewrite.
	(show_new_async_prompt): Rename to ...
	(show_prompt): ... this.
	(init_main): Adjust.  Don't handle --annotate=2 here.
	* event-top.c (new_async_prompt): Delete.
	(the_prompts): Delete.
	(more_to_come): Make static.
	(display_gdb_prompt): Use top_level_prompt() to compute the top
	level prompt, and don't notify the before_prompt observers
	directly here.  Always trick readline into not trying to display
	the prompt if sync_execution and displaying the primary prompt.
	If displaying a local/secondary prompt, always show it, even if
	sync_execution is set.
	(change_annotation_level): Delete.
	(top_level_prompt): New, based on change_annotation_level.
	(push_prompt, pop_prompt): Delete.
	(async_disable_stdin): No longer pushes prompt.
	(command_line_handler): No longer pushes or pops prompt.  If more
	input is expected, call display_gdb_prompt with an explicit empty
	prompt.
	(async_stop_sig): Adjust.
	(set_async_annotation_level, set_async_prompt): Delete.
	* python/python.c (before_prompt_hook): Adjust.
2011-09-06 14:49:00 +00:00
gdbadmin 79610daafd *** empty log message *** 2011-09-06 00:00:32 +00:00
Pedro Alves f1d90504dc 2011-09-05 Pedro Alves <pedro@codesourcery.com>
PR cli/13110

	* infrun.c (fetch_inferior_event): Check if there's a selected
	thread before checking if the selected thread is executing.
2011-09-05 15:46:34 +00:00
Pedro Alves 0f641c0119 2011-09-05 Pedro Alves <pedro@codesourcery.com>
* inf-loop.c (execute_command): Don't check if the current thread
	if running before synchronously waiting for command completion.
	* infrun.c (fetch_inferior_event): Handle "set exec-done-display"
	here.
	(normal_stop): Call async_enable_stdin here.
	* inf-loop.c (inferior_event_handler): Don't call
	async_enable_stdin, nor handle "set exec-done-display" here.
2011-09-05 14:53:13 +00:00
gdbadmin b1d6090346 *** empty log message *** 2011-09-05 00:00:02 +00:00
gdbadmin 30368258e9 GDB 7.3.1 released. 2011-09-04 19:10:40 +00:00
Joel Brobecker 3191627805 NEWS: Change `7.3' into `7.3.1' in `Changes since GDB 7.3'.
gdb/ChangeLog:

        * NEWS: Change `7.3' into `7.3.1' in `Changes since GDB 7.3'.
2011-09-04 17:48:51 +00:00
Joel Brobecker e8d56f1846 NEWS: Add entry for OpenBSD/NetBSD build failure
gdb/ChangeLog:

        * NEWS: Add entry for OpenBSD/NetBSD build failure
2011-09-04 17:41:40 +00:00
Joel Brobecker 26829f2bab GDB Manual edition number and ISBN updates
This is in preparation for a re-print by the FSF of the GDB manual.

gdb/doc/ChangeLog:

        * gdb.texinfo: Set EDITION to "Tenth" and change ISBN.
2011-09-04 17:08:56 +00:00
gdbadmin da89270c44 *** empty log message *** 2011-09-04 00:01:03 +00:00
gdbadmin 366fa8a499 *** empty log message *** 2011-09-03 00:00:02 +00:00
Jan Kratochvil 5dd05d8c5e gdb/
* config/s390/s390.mh (NATDEPFILES): Add linux-procfs.o dependency.
2011-09-02 21:40:30 +00:00
matt rice 7d8e6458d5 PR gdb/10720
* event-top.c (cli_command_loop): Replace readline setup with
direct call to display_gdb_prompt.
(display_gdb_prompt): Do not call observer mechanism during
synchronous execution.

testsuite:
* lib/prompt.exp: New file for testing the first prompt.
* gdb.python/py-prompt.exp: Ditto.
* gdb.python/py-prompt.c: Ditto (copy of ext-attach.c).
2011-09-02 21:16:54 +00:00
Pedro Alves 84636d2874 2011-09-02 Pedro Alves <pedro@codesourcery.com>
* linux-nat.c (in_pid_list_p): New.
	(linux_record_stopped_pid): Delete.
	(lin_lwp_attach_lwp): Check if PTRACE_ATTACH failed because we're
	already attached to the LWP.  Return an indication if so.
	(linux_nat_filter_event): Adjust.
	* linux-thread-db.c (attach_thread): Handle lin_lwp_attach_lwp
	returning an indication to ignore this thread.
2011-09-02 21:03:06 +00:00
Pedro Alves 68e77c9e30 2011-09-02 Pedro Alves <pedro@codesourcery.com>
gdb/testsuite/
	* gdb.threads/gcore-thread.exp: Set the global core_supported to
	0, before testing gcore.
2011-09-02 19:21:02 +00:00
Pedro Alves b4a14fd09b 2011-09-02 Pedro Alves <pedro@codesourcery.com>
* top.c: Include interps.h.
	(execute_command): If the target can async, but the interpreter is
	in sync mode, synchronously wait for the command to finish before
	returning.
	(execute_command_to_string): Force the interpreter to sync mode.
	* infrun.c: Include interps.h.
	(fetch_inferior_event): Don't restore the prompt yet if the
	interpreter is in sync mode.
	* interps.c (interpreter_async): New global.
	* interps.h (interpreter_async): Declare.
	* inf-loop.c: Include interps.h.
	(inferior_event_handler): Don't print the language change or run
	breakpoint commands yet if the interpreter in is sync mode.
	* main.c (captured_command_loop): Flip the interpreter to async
	mode.
	* cli/cli-script.c: Include interps.h.
	(execute_user_command, while_command, if_command): Force the
	interpreter to sync mode.
	* python/python.c: Include interps.h.
	(python_command, execute_gdb_command): Force the interpreter to
	sync mode.
2011-09-02 16:56:30 +00:00
Pedro Alves c709acd150 2011-09-02 Pedro Alves <pedro@codesourcery.com>
gdb/
	* value.c (show_convenience): Catch errors thrown while printing
	each internal variable.
	* infrun.c (validate_siginfo_access): New function.
	(siginfo_value_read, siginfo_value_write): Call it.
2011-09-02 12:18:27 +00:00
gdbadmin 86362dfd53 *** empty log message *** 2011-09-02 00:00:33 +00:00
Jan Kratochvil df6dc84da9 gdb/testsuite/
* dw2-ifort-parameter-debug.S: Update copyright year.
	* dw2-ifort-parameter.c: Update copyright year.
	* dw2-ifort-parameter.exp: Update copyright year.

	* dw2-ifort-parameter-debug.S: New file.
	* dw2-ifort-parameter.c: New file.
	* dw2-ifort-parameter.exp: New file.
2011-09-01 07:19:40 +00:00
Jan Kratochvil 9655e94382 gdb/
Revert:
	2010-05-21  Pierre Muller  <muller@ics.u-strasbg.fr>
	* dwarf2read.c (new_symbol): Handle DW_AT_variable_parameter
	attribute.

gdb/testsuite/
	* dw2-ifort-parameter-debug.S: New file.
	* dw2-ifort-parameter.c: New file.
	* dw2-ifort-parameter.exp: New file.
2011-09-01 07:17:46 +00:00
Jie Zhang 943ca1dd02 * server.c (step_thread): Remove definition.
(process_serial_event): Don't handle Hs.
	* server.h (step_thread): Remove declaration.
	* target.c (set_desired_inferior): Remove use of step_thread.
2011-09-01 03:14:10 +00:00
gdbadmin 02715440a5 *** empty log message *** 2011-09-01 00:00:03 +00:00
gdbadmin 859bc7c199 *** empty log message *** 2011-08-31 00:00:03 +00:00
Yao Qi cb457ae284 gdb/
* solib-dsbt.c (bfd_lookup_symbol): Removed.
	(cmp_name): New.
	(enable_break2): Update caller.
	* solib-frv.c (bfd_lookup_symbol): Removed.
	(cmp_name): New.
	(enable_break2): Update caller.
	* solib-pa64.c (bfd_lookup_symbol): Removed.
	(cmp_name): New.
	* solib-svr4.c (bfd_lookup_symbol): Removed.
	(cmp_name_and_sec_flags): New.
	(enable_break): Update caller.
	* solib.c (gdb_bfd_lookup_symbol_from_symtab): New.
	(gdb_bfd_lookup_symbol_from_dyn_symtab): New.
	(gdb_bfd_lookup_symbol): New.
	* solib.h: Functions declarations.
2011-08-30 02:48:05 +00:00
Yao Qi 83d1a36ae4 gdb/
* Makefile.in (ALL_TARGET_OBS): Add tic6x-tdep.o tic6x-linux-tdep.o
	and solib-dsbt.o.
2011-08-30 02:09:05 +00:00
gdbadmin 0f1e5c9c08 *** empty log message *** 2011-08-30 00:00:32 +00:00
Jan Kratochvil c04b3e8fc5 gdb/
Fix TUI stepi on code without symbols.
	* tui/tui-stack.c (tui_show_frame_info): Remove error, set LOW for
	current PC instead.
2011-08-29 16:55:16 +00:00
gdbadmin b2a1944f3c *** empty log message *** 2011-08-29 00:00:03 +00:00
Jan Kratochvil cb0fd152d6 gdb/
Code cleanup.
	* mi/mi-cmd-stack.c (list_args_or_locals): Remove stb initialization
	and the static keyword.
	* mi/mi-cmd-target.c (mi_cmd_target_file_get, mi_cmd_target_file_put):
	Make prefix an array.
	* mi/mi-cmd-target.c (mi_cmd_target_file_delete): Likewise.
	* mi/mi-main.c (get_register): Remove stb initialization and the static
	keyword.
2011-08-28 20:43:43 +00:00
Jan Kratochvil 9117472339 gdb/
Code cleanup - make mi_opt const.
	* mi/mi-cmd-break.c (mi_cmd_break_insert, mi_cmd_break_watch): Make
	opts const.
	* mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
	* mi/mi-cmd-env.c (mi_cmd_env_path): Likewise.
	(mi_cmd_env_dir): Likewise.
	* mi/mi-cmd-target.c (mi_cmd_target_file_get): Likewise.
	(mi_cmd_target_file_put): Likewise.
	* mi/mi-cmd-target.c (mi_cmd_target_file_delete): Likewise.
	* mi/mi-cmd-var.c (mi_cmd_var_evaluate_expression): Likewise.
	* mi/mi-getopt.c (mi_getopt): Make opts and opt const.
	(mi_valid_noargs): Make opts const.
	* mi/mi-getopt.h (mi_getopt): Make opts and opt const.
	* mi/mi-main.c (mi_cmd_list_thread_groups): Make opts const.
	(mi_cmd_data_read_memory): Likewise.
	(mi_cmd_data_read_memory_bytes): Likewise.
	(mi_cmd_data_write_memory): Likewise.
2011-08-28 20:39:29 +00:00
gdbadmin 0271838660 *** empty log message *** 2011-08-28 00:00:02 +00:00
matt rice 5068b8e88d * solib-sunos.c (allocate_rt_common_objfile): Add missing arguments to
bcache_xmalloc,  replace bcache_xmalloc with call to
psymbol_bcache_init for psymbol_cache.
* symfile.c (reread_symbols): Remove extra calls to bcache_xmalloc.
2011-08-27 10:28:31 +00:00
gdbadmin 8623249e89 *** empty log message *** 2011-08-27 00:00:02 +00:00
Jan Kratochvil a4f2ce052b gdb/
* inf-loop.c (inferior_event_handler): Add exception_print in
	INF_EXEC_COMPLETE.
2011-08-26 21:47:21 +00:00
Jan Kratochvil 353d1d731a gdb/
* breakpoint.c (bpstat_do_actions): New variable cleanup_if_error, call
	make_bpstat_clear_actions_cleanup and discard_cleanups for it.
	* defs.h (make_bpstat_clear_actions_cleanup): New declaration.
	* exceptions.c (throw_exception): Remove the bpstat_clear_actions call.
	* inf-loop.c (inferior_event_handler): New variable cleanup_if_error,
	call make_bpstat_clear_actions_cleanup and discard_cleanups for it.
	Call bpstat_clear_actions for failed fetch_inferior_event_wrapper.
	* infrun.c (fetch_inferior_event): Call
	make_bpstat_clear_actions_cleanup.
	* top.c (execute_command): New variable cleanup_if_error, call
	make_bpstat_clear_actions_cleanup and discard_cleanups for it.
	* utils.c (do_bpstat_clear_actions_cleanup)
	(make_bpstat_clear_actions_cleanup): New functions.

gdb/testsuite/
	* gdb.base/commands.exp (error_clears_commands_left): New function.
	(): Call it.
2011-08-26 21:45:24 +00:00
Jan Kratochvil 5c07461a74 gdb/testsuite/
* gdb.mi/mi-inheritance-syntax-error.cc (A): Make `a' public.
	(C): Initialize `a'.
	* gdb.mi/mi-inheritance-syntax-error.exp
	(-data-evaluate-expression $path):  Expect `a' as 5.
2011-08-26 21:11:08 +00:00
Pedro Alves 3ced3da4a5 2011-08-26 Pedro Alves <pedro@codesourcery.com>
* linux-nat.c (linux_child_follow_fork): Don't set lp->resumed on
	either the parent or the child forks.  Rename a couple locals.
2011-08-26 19:55:00 +00:00
Pedro Alves a9f4bb2123 2011-08-26 Pedro Alves <pedro@codesourcery.com>
gdb/
	* linux-nat.c (wait_lwp): Avoid assuming errno is preserved by a
	library call.  Avoid reading the `status' local if all waitpid
	calls failed.
2011-08-26 19:26:40 +00:00
Pedro Alves e5798bef38 2011-08-26 Pedro Alves <pedro@codesourcery.com>
gdb/
	* common/linux-osdata.c (get_cores_used_by_process): Don't assume
	opening /proc/PID/task always succeeds.
2011-08-26 18:58:04 +00:00
Aleksandar Ristovski edb2aadf8b * linespec.c (symtab_from_filename): Check for the end of string. 2011-08-26 17:58:57 +00:00
Marc Khouzam 0d932b2f8e 2011-08-26 Marc Khouzam <marc.khouzam@ericsson.com>
PR mi/11912
	* varobj.c (cplus_describe_child): Add the keyword
	'class' to the output of the method when dealing
	with a cast to a base class.

2011-08-26  Marc Khouzam  <marc.khouzam@ericsson.com>

	PR mi/11912
	* gdb.mi/mi-inheritance-syntax-error.cc: New file.
	* gdb.mi/mi-inheritance-syntax-error.exp: New file.
	* gdb.mi/mi-var-cp.cc: Updated for new 'class'
	keyword in output of -var-info-path-expression.
2011-08-26 12:32:59 +00:00
Jan Kratochvil e93ca0199f gdb/
No functionality change.
	* breakpoint.c (bpstat_clear_actions): Remove the BS parameter, make
	function comment a reference, new variables tp and bs, move here code
	from throw_exception.
	* breakpoint.h (bpstat_clear_actions): Remove the BS parameter,
	describe it in the comment.
	* exceptions.c (throw_exception): Remove variable tp, move the code for
	bpstat_clear_actions to bpstat_clear_actions.
2011-08-26 09:28:27 +00:00
Jan Kratochvil bdb5404946 gdb/testsuite/
* gdb.trace/backtrace.exp: Use is_lp64_target to check 64bit target.
	* gdb.trace/collection.exp: Likewise.
	* gdb.trace/report.exp: Likewise.
	* gdb.trace/unavailable.exp: Likewise.
	* gdb.trace/while-dyn.exp: Likewise.
2011-08-26 09:20:44 +00:00
gdbadmin e2d6800e0f *** empty log message *** 2011-08-26 00:00:02 +00:00
Tom Tromey a9f54f60b5 2011-08-25 Andrew Oakley <andrew@ado.is-a-geek.net>
* gdb.texinfo (Types In Python): Document 'bitpos' for enums.
2011-08-25 17:59:49 +00:00