Commit Graph

30212 Commits

Author SHA1 Message Date
Joel Brobecker 649c7061d4 amd64bsd-nat.c: Move "amd64bsd-nat.h" include...
... after include of "amd64-nat.h".

gdb/ChangeLog:

        * amd64bsd-nat.c: Move #include of "amd64bsd-nat.h" after
        include of "amd64-nat.h".
2012-03-12 15:21:19 +00:00
Tom Tromey 0b49e518cd * buildsym.c (record_pending_block): Now static.
* buildsym.h: (record_pending_block): Remove.
2012-03-12 14:15:22 +00:00
Andreas Tobler fd24fa9434 2012-03-12 Andreas Tobler <andreast@fgznet.ch>
* amd64bsd-nat.c: Include amd64bsd-nat.h.
2012-03-12 05:27:21 +00:00
gdbadmin d4e7cf4522 *** empty log message *** 2012-03-12 00:00:33 +00:00
gdbadmin 25037ec96d *** empty log message *** 2012-03-11 00:00:32 +00:00
gdbadmin 40048c48ff *** empty log message *** 2012-03-10 00:00:33 +00:00
Tom Tromey ba919b5861 * dwarf2read.c (struct dwarf2_cu) <checked_producer,
producer_is_gxx_lt_4_6>: New fields.
	(producer_is_gxx_lt_4_6): Use and update producer cache fields.
2012-03-09 20:17:32 +00:00
Tom Tromey a48e046c37 * dwarf2read.c (dwarf2_attr): Avoid tail-recursive call. 2012-03-09 20:06:18 +00:00
Joel Brobecker 05b8a7895a Fix a couple of ChangeLog entries. 2012-03-09 13:44:51 +00:00
Keith Seitz 0d7941a9be * lib/gdb.exp (gdb_get_line_number): Throw an
error instead of returning -1.
	* gdb.base/break.exp: Remove unused variable
	bp_location5.
	* gdb.base/hbreak2.exp: Likewise.
	* gdb.base/sepdebug.exp: Likewise.
2012-03-09 04:38:53 +00:00
Yao Qi f4647387fe 2012-03-08 Yao Qi <yao@codesourcery.com>
Pedro Alves  <palves@redhat.com>

	Fix PR server/13392.
	* linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
	offset of JMP insn.
	* tracepoint.c (remove_tracepoint): New.
	(cmd_qtdp): Call remove_tracepoint when failed to install.

2012-03-08  Yao Qi  <yao@codesourcery.com>
	    Pedro Alves  <palves@redhat.com>

	Fix PR server/13392.
	* gdb.trace/change-loc.exp (tracepoint_change_loc_1): Remove kfail.
	(tracepoint_change_loc_2): Remove kfail.  Return if failed to
	download tracepoints.
	* gdb.trace/pending.exp (pending_tracepoint_works): Likewise.
	(pending_tracepoint_resolved_during_trace): Likewise.
	(pending_tracepoint_installed_during_trace): Likewise.
	(pending_tracepoint_with_action_resolved): Likewise.
2012-03-09 03:47:15 +00:00
Joel Brobecker 6f5e936221 Add missing _initialize_ravenscar_sparc prototype.
This is required now that we compile GDB with -Wmissing-prototype.

gdb/ChangeLog:

        * ravenscar-sparc-thread.c (_initialize_ravenscar_sparc): Add
        prototype.
2012-03-09 00:31:15 +00:00
Joel Brobecker 8d037db936 Add missing _initialize_ravenscar prototype.
gdb/ChangeLog:

        * ravenscar-thread.c (_initialize_ravenscar): Add prototype.
2012-03-09 00:31:07 +00:00
gdbadmin 987c5a110d *** empty log message *** 2012-03-09 00:00:02 +00:00
Jan Kratochvil 4e841acf4e gdb/
Fix -Wmissing-prototypes build.
	* arm-linux-nat.c (get_thread_id): Make it static.
	* xtensa-linux-nat.c (get_thread_id): Likewise.
2012-03-08 22:54:30 +00:00
Joel Brobecker c6030312dc Make breakpoint condition detection trace conditional on remote_debug.
gdb/gdbserver/ChangeLog:

        * server.c (process_point_options): If a conditional expression
        is found, only print a message if remote_debug is nonzero.
2012-03-08 22:19:56 +00:00
Keith Seitz 83c532cb59 * gdb.ada/array_bounds.exp: Get breakpoint for line
with "START", not "STOP".
	* gdb.python/py-infthread.exp: Do not continue to
	line marked "Break here.", which is undefined.
2012-03-08 22:19:48 +00:00
Joel Brobecker 735be1a2c1 Revert "ax-gdb: Do not treat enums and bools as integers."
This patch was checked hasn't been reviewed and has been checked in
by mistake (wrong patch applied).
2012-03-08 22:19:09 +00:00
Luis Machado d6b6bbb744 2012-03-08 Luis Machado <lgustavo@codesourcery.com>
Revert:

	2012-03-03  Jan Kratochvil  <jan.kratochvil@redhat.com>

	Implement testsuite workaround for PR breakpoints/13781.
	* gdb.cp/mb-templates.exp: New loop with variable $workaround.
	(set breakpoint condition-evaluation host): New conditional command.
2012-03-08 21:09:17 +00:00
Luis Machado 52323be946 2012-03-08 Luis Machado <lgustavo@codesourcery.com>
* ax-gdb.c (gen_fetch): Fail gracefully and use error instead
	of internal error for unknown/unsupported types.
2012-03-08 21:07:25 +00:00
Joel Brobecker 4bb99ac688 ax-gdb: Do not treat enums and bools as integers.
This patch fixes a problem when using gdb + gdbserver, and trying
to break on a function when one of the (enum) parameters is equal
to a certain value, and the size of that enum is 1 byte.

    (gdb) break mixed.adb:15 if light = green
    Breakpoint 2 at 0x402d5a: file mixed.adb, line 15.
    (gdb) cont
    Continuing.
    [Inferior 1 (process 9742) exited normally]

The debugger should have stopped once when our function was call
with light set to green.

Here is what happens: Because we're using a recent GDBserver,
GDB hands off the evaluation of the condition to GDBserver, by
providing it in the Z0 packet. This is what GDB sends:

    $Z0,402d5a,1;X13,26000622100223ff1c16100219162022011327#cf

I decoded the condition as follow:

    260006    reg 6 -> push
    2210      const8 0x10 -> push
    02        add (stack now has 1 element equal to reg6 + 16)
    23ff1c    const16 0xff1c
    1610      ext 16 (sign extend 16 bits)
    02        add (stack now has 1 element equal to reg6 + 16 - 228)
    19        ref32: Pop as addr, push 32bit value at addr.
    1620      ext 32 (sign extend 32 bits)
    2201      const8 0x01
    13        equal
    27        end

The beginning of the agent expression can be explained by the address
of symbol "light":

    (gdb) info addr light
    Symbol "light" is a variable at frame base reg $rbp offset 16+-228.

However, the mistake is the "ext 32" operation (extend 32 bits),
because our variable is *not* 32bits, only 8:

    (gdb) print light'size
    $5 = 8

But the reason why GDB decides to use a 32bit extension is because
it overrides the symbol's type with a plain integer type in
ax-gdb.c:gen_usual_unary...

      /* If the value is an enum or a bool, call it an integer.  */
    case TYPE_CODE_ENUM:
    case TYPE_CODE_BOOL:
      value->type = builtin_type (exp->gdbarch)->builtin_int;
      break;

... before calling require_rvalue. And of course, that causes the
generator to generate a sizeof(int) extension of the result.

One way to fix this would be to use an integer type of the correct
size, but I do not understand why this is necessary. The two routines
that use that information to generate the opcode down the line are
gen_fetch (for a memory value), or gen_extend (for a register value).
And they both have handling of enums and bools.

So the fix we elected to implement was simply to remove that code.

gdb/ChangeLog:

        * ax-gdb.c (gen_usual_unary): Remove special handling of
        enum and bool types.
2012-03-08 20:54:36 +00:00
Jan Kratochvil 7fe25d9bd2 gdb/
Fix CU relative vs. absolute DIE offsets.
	* dwarf2loc.h (dwarf2_fetch_die_location_block): Rename parameter
	offset to offset_in_cu.
	* dwarf2read.c (process_enumeration_scope): Add CU offset to
	TYPE_OFFSET.
	(dwarf2_fetch_die_location_block): Rename parameter offset to
	offset_in_cu.  New variable offset, add CU offset to OFFSET_IN_CU.

gdb/testsuite/
	Fix CU relative vs. absolute DIE offsets.
	* gdb.dwarf2/dw2-op-call.S: New compilation unit preceding the existing
	one.
2012-03-08 19:37:08 +00:00
Jan Kratochvil 05e7c24434 gdb/
* libunwind-frame.c: Rename to ...
	* ia64-libunwind-tdep.c: ... here.
	* libunwind-frame.h: Rename to ...
	* ia64-libunwind-tdep.h: ... here.
	* Makefile.in (HFILES_NO_SRCDIR): Rename libunwind-frame.h to
	ia64-libunwind-tdep.h.
	(ALLDEPFILES): Rename libunwind-frame.c to ia64-libunwind-tdep.c.
	* README (--with-libunwind): Rename to ...
	(--with-libunwind-ia64): ... here, note it is ia64 specific now.
	* config.in: Regenerate.
	* configure: Regenerate.
	* configure.ac: New option --with-libunwind-ia64, make the
	AS_HELP_STRING ia64 specific.  Deprecate option --with-libunwind.
	Remove AC_DEFINE for HAVE_LIBUNWIND.
	* ia64-libunwind-tdep.c: Make the file top comment ia64 specific.
	Rename libunwind-frame.h #include to ia64-libunwind-tdep.h.
	Rename libunwind-frame in the general comment.
	* ia64-libunwind-tdep.h: Make the file top comment ia64 specific.
	Rename symbol LIBUNWIND_FRAME_H to IA64_TDEP_LIBUNWIND_FRAME_H.
	Move forward declarations inside #ifndef.  Rename libunwind-frame in
	the general comment.
	* ia64-tdep.c: Rename libunwind-frame.h #include to
	ia64-libunwind-tdep.h.
	(ia64_gdb2uw_regnum, ia64_uw2gdb_regnum, ia64_is_fpreg)
	(ia64_libunwind_descr): Rename libunwind-frame to
	ia64-libunwind-tdep in these function comments.
	* ia64-tdep.h: Rename libunwind-frame.h #include to
	ia64-libunwind-tdep.h.
	* ia64-vms-tdep.c (ia64_vms_libunwind_descr): Rename libunwind-frame to
	ia64-libunwind-tdep in that data comment.
2012-03-08 19:08:11 +00:00
Jan Kratochvil 3755cbfddc gdb/
* libunwind-frame.h (struct frame_unwind): New declaration.
2012-03-08 18:13:37 +00:00
Joel Brobecker d1cda5d939 Fix thinko in help of "set breakpoint condition-evaluation".
The 3 valid values for this setting are "auto", "host" and "target".
The help was advertising one of them to be "gdb" instead of "host".

gdb/ChangeLog:

        * breakpoint.c (_initialize_breakpoint): Fix error in help of
        "set breakpoint condition-evaluation" command.
2012-03-08 16:50:21 +00:00
Tristan Gingold a0ba0aa22f gdb/
2012-03-08  Tristan Gingold  <gingold@adacore.com>

	* sparc-stub.c: Move to stubs/
	* sh-stub.c: Likewise.
	* m68k-stub.c: Likewise.
	* m32r-stub.c: Likewise.
	* i386-stub.c: Likewise.

gdb/stubs/
2012-03-08  Tristan Gingold  <gingold@adacore.com>

	* sparc-stub.c: Move from ..
	* sh-stub.c: Likewise.
	* m68k-stub.c: Likewise.
	* m32r-stub.c: Likewise.
	* i386-stub.c: Likewise.
2012-03-08 14:43:24 +00:00
Andreas Schwab 007cafee35 * m68klinux-tdep.c (m68k_linux_init_abi): Register
linux_get_siginfo_type.
2012-03-08 13:37:26 +00:00
Andreas Schwab 7b8b6d6d0d * m68klinux-nat.c: Include "gdb_proc_service.h".
(PTRACE_GET_THREAD_AREA): Define.
(ps_get_thread_area): New function.
2012-03-08 13:35:41 +00:00
Yao Qi bba74b36f0 gdb/
* remote.c (remote_get_noisy_reply): Replace `sprintf' with
	`xsnprintf'.
	(remote_query_attached): Likewise.
	(remote_static_tracepoint_marker_at): Likewise.
	(remote_set_permissions): Likewise.
	(remote_detach_1, extended_remote_attach_1): Likewise.
	(send_g_packet, remote_vkill): Likewise.
	(extended_remote_disable_randomization): Likewise.
	(remote_add_target_side_condition): Likewise.
	(remote_insert_breakpoint): Likewise.
	(remote_remove_breakpoint): Likewise.
	(remote_insert_watchpoint): Likewise.
	(remote_remove_watchpoint): Likewise.
	(remote_insert_hw_breakpoint): Likewise.
	(remote_insert_hw_breakpoint): Likewise.
	(remote_remove_hw_breakpoint): Likewise.
	(remote_download_command_source): Likewise.
	(remote_download_tracepoint): Likewise.
	(remote_download_trace_state_variable): Likewise.
	(remote_disable_tracepoint): Likewise.
	(remote_trace_set_readonly_regions): Likewise.
	(remote_get_tracepoint_status): Likewise.
	(remote_trace_find): Likewise.
	(remote_get_trace_state_variable_value): Likewise.
	(remote_set_disconnected_tracing): Likewise.
	(remote_set_circular_trace_buffer): Likewise.
	(remote_get_min_fast_tracepoint_insn_len): Likewise.
	(remote_use_agent): Likewise.
	(remote_add_target_side_condition): Add one parameter BUF_SIZE.
	Update callers.
2012-03-08 12:49:15 +00:00
Jan Kratochvil 51898c1516 gdb/testsuite/
Fix false FAIL on distros with relro linkage as default.
	* gdb.reverse/solib-precsave.exp: Try to compile the test using
	-Wl,-z,norelro first.
2012-03-08 07:42:51 +00:00
gdbadmin af112affbd *** empty log message *** 2012-03-08 00:00:03 +00:00
Pedro Alves 9b224c5e1a 2012-03-07 Pedro Alves <palves@redhat.com>
gdb/doc/
	* gdb.texinfo (General Query Packets): Document new
	QProgramSignals packet.
	* gdb.texinfo (Remote configuration): Mention
	"program-signals-packet".

	gdb/gdbserver/
	* linux-low.c (get_detach_signal): New.
	(linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
	Pass on pending signals to PTRACE_DETACH.  Check the result of the
	ptrace call.
	* server.c (program_signals, program_signals_p): New.
	(handle_general_set): Handle QProgramSignals.
	* server.h (program_signals, program_signals_p): Declare.

	gdb/
	* NEWS: Mention QProgramSignals.
	* inferior.h (update_signals_program_target): Declare.
	* infrun.c: (update_signals_program_target): New.
	(handle_command): Update the target of the new program signals
	array changes.
	* remote.c (PACKET_QProgramSignals): New enum.
	(last_program_signals_packet): New global.
	(remote_program_signals): New.
	(remote_start_remote): Update the target with the program signals
	list.
	(remote_protocol_features): Add entry for QPassSignals.
	(remote_open_1): Free anc clear last_program_signals_packet.
	(init_remote_ops): Install remote_program_signals.
	* target.c (update_current_target): Adjust.
	(target_program_signals): New.
	* target.h (struct target_ops) <to_program_signals>: New field.
	(target_program_signals): Declare.
2012-03-07 19:25:39 +00:00
Pedro Alves 74c48cbbff 2012-03-07 Pedro Alves <palves@redhat.com>
* NEWS: Add subtitle for new z0/z1 conditional breakpoint
	extensions.
2012-03-07 19:17:36 +00:00
Andreas Schwab 0c13fc49f4 * m68klinux-nat.c (getregs_supplies): Make static.
(getfpregs_supplies): Likewise.
(have_ptrace_getregs): Likewise.
2012-03-07 16:34:39 +00:00
gdbadmin 519429e1d6 *** empty log message *** 2012-03-07 00:00:03 +00:00
Joel Brobecker 1281d2a30a Pass absolute die offset in call to get_die_type_at_offset
gdb/ChangeLog:

        * dwarf2read.c (dwarf2_get_die_type): Pass absolute offset
        in call to get_die_type_at_offset.
2012-03-06 23:41:50 +00:00
Stan Shebs 2b03b41d6a * mi/mi-cmd-break.c: Enforce coding standards, fix comments.
* mi/mi-cmd-disas.c: Ditto.
	* mi/mi-cmd-env.c: Ditto.
	* mi/mi-cmd-file.c: Ditto.
	* mi/mi-cmd-stack.c: Ditto.
	* mi/mi-cmd-target.c: Ditto.
	* mi/mi-cmd-var.c: Ditto.
	* mi/mi-cmds.c: Ditto.
	* mi/mi-cmds.h: Ditto.
	* mi/mi-console.c: Ditto.
	* mi/mi-getopt.c: Ditto.
	* mi/mi-getopt.h: Ditto.
	* mi/mi-interp.c: Ditto.
	* mi/mi-main.c: Ditto.
	* mi/mi-out.c: Ditto.
	* mi/mi-parse.c: Ditto.
	* mi/mi-parse.h: Ditto.
	* mi/mi-symbol-cmds.c: Ditto.

	* mi/mi-getopt.h: Move mi_opt struct up.
	* mi/mi-main.c (captured_mi_execute_command): Remove redundant
	return.
	* mi/mi-out.c (_initialize_mi_out): Remove empty initialize.
2012-03-06 22:48:53 +00:00
Tom Tromey c988ad8730 * proc-service.c (ps_pglobal_lookup): Set the current program
space.
2012-03-06 19:51:10 +00:00
Joel Brobecker 8131799e80 New Ada testcase (bp_on_var.exp).
gdb/testsuite/ChangeLog:

	* gdb.ada/bp_on_var: New testcase.
2012-03-06 17:33:32 +00:00
Pedro Alves 1b7c1b10aa 2012-03-06 Pedro Alves <palves@redhat.com>
* gregset.h [HAVE_SYS_PROCFS_H]: Include <sys/procfs.h>.
2012-03-06 17:17:16 +00:00
Joel Brobecker ba2419699a New Ada testcase (bp_enum_homonym).
gdb/testsuite/ChangeLog:

        * gdb.ada/bp_enum_homonym: New testcase.
2012-03-06 17:04:59 +00:00
Yao Qi abe49676e9 gdb/testsuite/
* gdb.trace/ftrace.exp (test_fast_tracepoints): Run test on target
	x86_64-*-* and i?86-*-*.
	Set up KFAIL for gdb/13808.
2012-03-06 01:30:18 +00:00
gdbadmin 39aaa5247b *** empty log message *** 2012-03-06 00:00:02 +00:00
Joel Brobecker 3c1820694f Add Maciej W. Rozycki as mips maintainer.
gdb/ChangeLog:

        * MAINTAINERS: List Maciej W. Rozycki as the mips maintainer.
2012-03-05 23:21:36 +00:00
Tom Tromey d8df103b50 * gdb.ada/operator_bp.exp: Clear debug-file-directory.
* gdb.ada/mi_task_arg.exp: Clear debug-file-directory.
2012-03-05 21:21:13 +00:00
Jan Kratochvil 2e7941949d gdb/
Code cleanup.
	* common/linux-osdata.c (linux_common_core_of_thread): New function
	comment.
	* linux-nat.c (linux_nat_wait_1): Replace linux_nat_core_of_thread_1
	call by linux_common_core_of_thread.
	(linux_nat_core_of_thread_1): Remove.
	* linux-nat.h (linux_nat_core_of_thread_1): Remove declaration.
	* linux-thread-db.c: Include linux-osdata.h.
	(update_thread_core): Replace linux_nat_core_of_thread_1 call by
	linux_common_core_of_thread.
2012-03-05 21:07:46 +00:00
Tom Tromey 9f9f1f31e7 * value.c (value_primitive_field): Don't fetch contents for
non-virtual bases.
2012-03-05 20:53:15 +00:00
Tom Tromey b7b189f3cf * jv-valprint.c (java_value_print): Correctly compute 'obj_addr'.
gdb/testsuite
	* gdb.java/jprint.java (jprint.main): Keep 'x' live.
2012-03-05 19:38:17 +00:00
Joel Brobecker 5538f557d1 Include "gregset.h" in s390-nat.c (-Wmissing-prototypes).
gdb/ChangeLog:

        * s390-nat.c: Include "gregset.h".
2012-03-05 19:05:09 +00:00
Jan Kratochvil 75528772a7 gdb/
* libunwind-frame.c (LIBUNWIND_SO): Change .7 to .8.
	[!LIBUNWIND_SO] (LIBUNWIND_SO_7): New #define.
	(libunwind_load): New variable so_error, use it for dlerror.  Try to
	load also LIBUNWIND_SO_7.
2012-03-05 17:11:48 +00:00
Jan Kratochvil e237a7e2c5 gdb/gdbserver/
* linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
	New comment why.
2012-03-05 17:09:37 +00:00
Pedro Alves 275418ae46 2012-03-05 Pedro Alves <palves@redhat.com>
* i387-tdep.c (i387_supply_xsave): Assert the xsave section buffer
	is not NULL, and remove resulting dead code.
2012-03-05 16:17:52 +00:00
Thomas Schwinge 5cbb98123c * sh-tdep.c (sh_skip_prologue): Provide an upper limit on the function
prologue to sh_analyze_prologue.
	(sh_analyze_prologue): Make better use of such an upper limit, and
	generally be more cautious about accessing memory.
2012-03-05 15:16:39 +00:00
Tom Tromey 541515ad26 * ia64-vms-tdep.c (_initialize_ia64_vms_tdep): Rename from
_initialize_ia64_hpux_tdep.
2012-03-05 14:53:56 +00:00
Pedro Alves 24490249f8 Mention PR gdb/13766 2012-03-05 14:24:03 +00:00
Pedro Alves b4d36fb80a 2012-03-05 Pedro Alves <palves@redhat.com>
* i387-tdep.c (i387_supply_xsave): If we have an xsave buffer, and
	the register state is clear, supply explicit zero, instead of
	marking the register unavailable.
2012-03-05 14:21:46 +00:00
Tristan Gingold 60c9a3c0e3 2012-03-05 Tristan Gingold <gingold@adacore.com>
* NEWS: Mention OpenVMS ia64 new target.
2012-03-05 11:46:35 +00:00
Tristan Gingold 5ab2f44149 2012-03-05 Tristan Gingold <gingold@adacore.com>
* buildvms.com: New file.
	* ia64vms-stub.c: New file.
2012-03-05 11:44:19 +00:00
Tristan Gingold 696759ad10 2012-03-05 Tristan Gingold <gingold@adacore.com>
* ia64-tdep.h: Include libunwind-frame.h and libunwind-ia64.h.
	(ia64_unw_accessors, ia64_unw_rse_accessors)
	(ia64_libunwind_descr): Declare.
	* ia64-vms-tdep.c: New file.
	* ia64-tdep.c (ia64_unw_accessors, ia64_unw_rse_accessors)
	(ia64_libunwind_descr): Make them public.
	* configure.tgt: Add ia64-*-*vms*.
	* Makefile.in (ALL_64_TARGET_OBS): Add ia64-vms-tdep.o
	(ALLDEPFILES): Add ia64-vms-tdep.c
2012-03-05 11:41:51 +00:00
Tristan Gingold 169081d053 2012-03-05 Tristan Gingold <gingold@adacore.com>
* target.h (target_object): Add TARGET_OBJECT_OPENVMS_UIB.
	* remote.c (PACKET_qXfer_uib): New enum value.
	(remote_protocol_features): Add entry for PACKET_qXfer_uib.
	(remote_xfer_partial): Handle TARGET_OBJECT_OPENVMS_UIB.
	(_initialize_remote): Call add_packet_config_cmd for
	xfer:uib packet.

doc/
2012-03-05  Tristan Gingold  <gingold@adacore.com>

	* gdb.texinfo (General Query Packets): Document xfer:uib:read.
2012-03-05 11:37:33 +00:00
Tristan Gingold 34864976a8 2012-03-05 Tristan Gingold <gingold@adacore.com>
* osabi.c (gdb_osabi_names): Add OpenVMS.
        (generic_elf_osabi_sniffer): Likewise.
        * defs.h (gdb_osabi): Add GDB_OSABI_OPENVMS.
2012-03-05 11:33:36 +00:00
gdbadmin 5fb95a7f61 *** empty log message *** 2012-03-05 00:00:32 +00:00
Jan Kratochvil 6597b100b5 gdb/
Removed unused code.
	* libunwind-frame.c (libunwind_frame_unwind)
	(libunwind_frame_base_address): Remove.
	* libunwind-frame.h (libunwind_frame_base_address): Remove declaration.
2012-03-04 19:22:47 +00:00
Yao Qi 87399aa1a1 gdb/
* common/agent.c (gdb_connect_sync_socket): Add _ markup and
	remove trailing new line.
	(agent_run_command, agent_run_command): Add _ markup.
	(agent_capability_check): Likewise.
2012-03-04 03:31:09 +00:00
Yao Qi 89b7509a3f Fix indent of changelog entries. 2012-03-04 03:11:03 +00:00
Yao Qi 69dc1c4dd3 gdb/testsuite/
* gdb.base/disp-step-syscall.exp (disp_step_cross_syscall): Catch error
	messages for KFAIL.
2012-03-04 02:36:38 +00:00
gdbadmin 09ddfdd717 *** empty log message *** 2012-03-04 00:00:03 +00:00
Jan Kratochvil 3f20c47f9e gdb/testsuite/
* gdb.ada/arrayidx.exp: Call get_compiler_info.  New variable old_gcc.
	(print one_two_three, indexes off, print few_reps, indexes off)
	(print many_reps, indexes off, print empty, indexes off)
	(print one_two_three, print few_reps, print many_reps, print empty):
	Call setup_xfail if $gcc_old.
2012-03-03 18:03:31 +00:00
Jan Kratochvil abf1152ad7 gdb/
* breakpoint.c (set_condition_evaluation_mode): Set
	CONDITION_EVALUATION_MODE unconditionally.

gdb/testsuite/
	Implement testsuite workaround for PR breakpoints/13781.
	* gdb.cp/mb-templates.exp: New loop with variable $workaround.
	(set breakpoint condition-evaluation host): New conditional command.
2012-03-03 14:21:04 +00:00
Jan Kratochvil a06715f8dd gdb/testsuite/
Code cleanup.
	* gdb.cp/mb-templates.exp: New variables executable.  Use it for
	binfile.  use clean_restart.  Replace gdb_expect by gdb_test_multiple.
	Replace GDB restart by kill and delete_breakpoints.  Replace breakpoint
	number 1 by $bpnum.  Four times.
2012-03-03 14:19:19 +00:00
Yao Qi 5808517f9a gdb:
* common/agent.c (agent_look_up_symbols): Add one parameter 'arg'.
	* common/agent.h: Update declaration.
	* inf-child.c (inf_child_use_agent): New.
	(inf_child_can_use_agent): New.
	(inf_child_target): Initialize fields `to_use_agent'
	and `to_can_use_agent'.
	* agent.c (agent_new_objfile): New.
        (_initialize_agent): Add agent_new_objfile to new_objfile
	observer.

	* linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
	New.
        (linux_target_install_ops): Initialize field
	`to_static_tracepoint_markers_by_strid'.
	* remote.c (free_current_marker): Move it to ...
	* tracepoint.c (free_current_marker): ... here.  New.
	(cleanup_target_stop): New.
	* tracepoint.h: Declare free_current_marker.
	* NEWS: Add one entry about `info static-tracepoint-marker'.

gdb/gdbserver:
	* tracepoint.c (tracepoint_look_up_symbols): Update call to
	agent_look_up_symbols.

gdb/testsuite:
	* gdb.trace/strace.exp: run strace_info_marker in linux native gdb.
2012-03-03 09:51:29 +00:00
Jan Kratochvil dfe2ac1496 gdb/testsuite/
Setup KFAIL for PR server/13796.
	* gdb.base/disp-step-syscall.exp (single step over vfork): Setup KFAIL.
2012-03-03 06:58:16 +00:00
Yao Qi 58b4daa56a gdb:
* common/agent.c (agent_loaded_p): New.
        (agent_look_up_symbols): New global.
        * common/agent.h: Declare agent_loaded_p.

gdb/gdbserver:

        * Makefile.in (linux-low.o): Keep dependence on agent.h.
        (linux-x86-low.o): Likewise.
        * server.h: Remove in_process_agent_loaded.
        * tracepoint.c (in_process_agent_loaded): Removed.  Moved it
        common/agent.c.
        Update callers.
2012-03-03 04:34:52 +00:00
Yao Qi 8ffcbaaf40 gdb:
* common/agent.c (struct ipa_sym_addresses) <addr_capability>: New.
	(agent_capability_check, agent_capability_invalidate): New.
	(symbol_list): New array element.
	* common/agent.h (enum agent_capa): New.
	* target.c (target_pre_inferior): Call agent_capability_invalidate.

gdb/gdbserver:
	* tracepoint.c (gdb_agent_capability): New global.
	(in_process_agent_loaded_ust): Renamed to
	`in_process_agent_supports_ust'.
	Update callers.
	(in_process_agent_supports_ust): Call agent_capability_check.
	(clear_installed_tracepoints): Assert that agent supports
	agent.
2012-03-03 04:04:35 +00:00
Yao Qi d1feda864e gdb:
* target.h (struct target_ops) <to_use_agent>: New field.
	(struct target_ops) <to_can_use_agent>: New field.
	(target_use_agent, target_can_use_agent): New macro.
	* target.c (update_current_target): Update.
	* remote.c: New enum `PACKET_QAgent'.
	(remote_protocol_features): Add a new element.
	(remote_use_agent, remote_can_use_agent): New.
	(init_remote_ops): Initialize field `can_use_agent' with
	remote_can_use_agent.  Intiailize field `use_agent' with
	remote_use_agent.
	* common/agent.c (use_agent): New global.
	* common/agent.h: Declare it.
	* tracepoint.c (info_static_tracepoint_markers_command): Add
	comment.
	* Makefile.in (SFILES): Add common/agent.c and agent.c.
	(COMMON_OBS): Add common/agent.o and agent.o
	(common-agent.o): New rule.
	* agent.c: New.

gdb/doc:
	* gdb.texinfo (In-Process Agent): New node.
	Document new commands.
	(General Query Packets): Add packet `QAgent'.

gdb/gdbserver:
	* linux-low.c (linux_supports_agent): New.
	(linux_target_ops): Initialize field `supports_agent' with
	linux_supports_agent.
	* target.h (struct target_ops) <supports_agent>: New.
	(target_supports_agent): New macro.
	* server.c (handle_general_set): Handle packet 'QAgent'.
	(handle_query): Send `QAgent+'.
	* Makefile.in (server.o): Depends on agent.h.
2012-03-03 03:32:46 +00:00
Yao Qi 2fa291aca4 gdb:
* common/agent.c: New.
	* common/agent.h: New.
	* configure.ac: Add `sys/socket.h' and `sys/un.h' to
	AC_CHECK_HEADERS.
	* configure, configh.in: Regenerated.

gdb/gdbserver:

	* Makefile.in (OBS): Add agent.o.
	Add new rule for agent.o.
	Track dependence of tracepoint.c on agent.h.
	* tracepoint.c (run_inferior_command_1):
	(run_inferior_command): Call agent_run_command.
	(gdb_ust_connect_sync_socket): Deleted.  Move it to
	common/agent.c.
	(resume_thread, stop_thread): Likewise.
	(gdb_ust_socket_init): Renamed to ...
	(gdb_agent_socket_init): ... New.
	(gdb_ust_thread): Renamed to ...
	(gdb_agent_helper_thread): ... New.
	(gdb_ust_init): Move some code to ...
	(gdb_agent_init): ... here.  New.
	[HAVE_UST]: Call gdb_ust_init.
	(initialize_tracepoint_ftlib):  Call gdb_agent_init.
	* configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
	* config.in, configure: Regenerated.
2012-03-03 03:08:36 +00:00
Kevin Buettner 9fc0568578 * sh-tdep.c (sh_frame_cache): Don't fetch the FPSCR register
unless it exists for this architecture.
2012-03-03 01:27:47 +00:00
gdbadmin 636b802b4e *** empty log message *** 2012-03-03 00:00:33 +00:00
Joel Brobecker 8bbc467ad4 New Ada testcase for breakpoints on operators.
gdb/testsuite/ChangeLog:

        * gdb.ada/operator_bp: New testcase.
2012-03-02 20:36:41 +00:00
Joel Brobecker c0eac87f84 Testcase: "info locals" with Ada renamings.
gdb/testsuite/ChangeLog:

        * gdb.ada/info_locals_renaming: New testcase.
2012-03-02 19:31:53 +00:00
Tom Tromey 4f42c881de * gdb.base/nextoverexit.c: New file.
* gdb.base/nextoverexit.exp: New file.
2012-03-02 19:29:57 +00:00
Joel Brobecker a5ee536be2 language-specific read_var_value for Ada renamings
The purpose of this patch is to better support renamings in the
"info locals" command. Consider ...

    procedure Foo is
       GV : Integer renames Pck.Global_Variable;
    begin
       Increment (GV); -- STOP
    end Foo;

... Pck.Global_Variable is just an integer. After having stopped at
the "STOP" line, "info locals" yields:

    (gdb) info locals
    gv = <error reading variable gv (Cannot access memory at address 0xffffffffffffffff)>

In reality, two things are happening:

   (1) Variable "GV" does not exist, which is normal, since there is
       "GV" the renaming of another variable;

   (2) But to allow the user access to that renaming the same way
       the code has, the compiler produces an artificial variable
       whose name encodes the renaming:

        gv___XR_pck__global_variable___XE

       For practical reasons, the artificial variable itself is given
       irrelevant types and addresses.

But the "info locals" command does not act as if it was a short-cut
of "foreach VAR in locals, print VAR". Instead it gets the value of
each VAR directly, which does not work in this case, since the variable
is artificial and needs to be decoded first.

This patch makes the "read_var_value" routine language-specific.
The old implementation of "read_var_value" gets renamed to
"default_read_var_value" and all languages now use it (unchanged
behavior), except for Ada. In Ada, the new function ada_read_var_value
checks if we have a renaming, and if so, evaluates its value, or else
defers to default_read_var_value.

gdb/ChangeLog:

        * language.h (struct language_defn): New "method" la_read_var_value.
        * findvar.c: #include "language.h".
        (default_read_var_value): Renames read_var_value.  Rewrite
        function description.
        (read_var_value): New function.
        * value.h (default_read_var_value): Add prototype.
        * ada-lang.c (ada_read_renaming_var_value, ada_read_var_value):
        New functions.
        (ada_language_defn): Add entry for la_read_var_value.
        * c-lang.c, d-lang.c, f-lang.c, jv-lang.c, language.c,
        * m2-lang.c, objc-lang.c, opencl-lang.c, p-lang.c: Update
        language_defn structures to add entry for new la_read_var_value
        field.
2012-03-02 19:29:01 +00:00
Pedro Alves f59f708a4b 2012-03-02 Tom Tromey <tromey@redhat.com>
Pedro Alves  <palves@redhat.com>

	PR breakpoints/13776:
	* breakpoint.c (breakpoint_init_inferior): Delete step-resume
	breakpoints.
	(delete_longjmp_breakpoint_at_next_stop): New.
	* breakpoint.h (delete_longjmp_breakpoint_at_next_stop): Declare.
	* target.c (generic_mourn_inferior): Call mark_breakpoints_out
	before deleting the inferior.  Add comments.
	* thread.c (clear_thread_inferior_resources): Don't delete lonjmp
	breakpoints immediately, but only on next stop.  Move that code
	next to where we mark other breakpoints for deletion.
2012-03-02 19:26:10 +00:00
Joel Brobecker 44099a67be Fix ARI violations in mips-linux-nat.c and mips-tdep.c
gdb/ChangeLog:

        * mips-linux-nat.c (mips_linux_read_description): Add missing i18n
        marker.
        * mips-tdep.c (mips_linux_reg_names): Improve comment to avoid ARI
        violation.
2012-03-02 19:14:30 +00:00
Edjunior Barbosa Machado 7380c0c93f gdb/testsuite/
2012-03-02  Edjunior Machado  <emachado@linux.vnet.ibm.com>

	* gdb.arch/altivec-abi.exp (altivec_abi_tests): Remove obsolete
	parameter.
2012-03-02 18:43:46 +00:00
Pedro Alves 2a2ef594da 2012-03-02 Pedro Alves <palves@redhat.com>
* linux-thread-db.c (attach_thread): Avoid in_thread_list call.
2012-03-02 16:54:59 +00:00
Pedro Alves 0504465367 2012-03-02 Pedro Alves <palves@redhat.com>
* inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
	* linux-low.c (struct simple_pid_list): New.
	(stopped_pids): New a struct simple_pid_list pointer.
	(add_to_pid_list, pull_pid_from_list): New.
	(handle_extended_wait): Don't assume the first signal new children
	report is SIGSTOP.  Adjust call to pull_pid_from_list.
	(linux_wait_for_lwp): Adjust.
2012-03-02 16:23:42 +00:00
Ulrich Weigand b261e0c536 Fix -Wmissing-prototypes build.
* ppc-linux-nat.c (ppc_linux_get_hwcap): Make static.
	* remote-sim.c (gdbsim_has_all_memory): Likewise.
	(gdbsim_has_memory): Likewise.
2012-03-02 13:38:39 +00:00
Yao Qi a95babbf38 gdb/
Fix -Wmissing-prototypes build.
	* charset.c (phony_iconv_open): Make static.
	(phony_iconv_close, phony_iconv): Likewise.
	* i386-linux-nat.c (_initialize_i386_linux_nat): New prototype.
	* i386-windows-nat.c (_initialize_i386_windows_nat): New
	prototype.
	* mingw-hdep.c (_initialize_mingw_hdep): New prototype.
	* ser-mingw.c (create_select_thread): Make static.
	* windows-termcap.c (tgetent): New prototype.
	(tgetnum, tgetflag, tgetstr, tputs, tgoto): Likewise.
2012-03-02 12:56:50 +00:00
Jan Kratochvil d603d4b3da gdb/
Fix -Wmissing-prototypes build.
	* windows-nat.c (dll_symbol_command, ctrl_c_handler): Make them static.
	(_initialize_windows_nat, _initialize_check_for_gdb_ini)
	(_initialize_loadable): New prototypes.
2012-03-02 05:38:51 +00:00
Doug Evans 7fb3ad1f9f * dwarf2read.c (load_full_comp_unit): Remove unnecessary reading of
abbrev table, read_comp_unit will do it.
2012-03-02 01:55:15 +00:00
Yao Qi 8d00225bba gdb/gdbserver:
* tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
	debug log.
2012-03-02 00:18:51 +00:00
Yao Qi 19560ba53e gdb/gdbserver:
* tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
	`stop_pc' and `tpoint'.  Update caller.
2012-03-02 00:12:47 +00:00
Jan Kratochvil 693be288fc gdb/
Fix -Wmissing-prototypes build.
	* alpha-tdep.c (alpha_deal_with_atomic_sequence): Make it static.
	* amd64-darwin-tdep.c (_initialize_amd64_darwin_tdep): New prototype.
	* amd64-windows-tdep.c (_initialize_amd64_windows_tdep): Likewise.
	* arm-symbian-tdep.c (arm_symbian_skip_trampoline_code): Make it static.
	(_initialize_arm_symbian_tdep): New prototype.
	* arm-wince-tdep.c (arm_wince_skip_main_prologue): Make it static.
	* i386-darwin-tdep.c (_initialize_i386_darwin_tdep): New prototype.
	* i386-linux-tdep.c (i386_linux_displaced_step_copy_insn): Make it
	static.
	* lm32-tdep.c (_initialize_lm32_tdep): New prototype.
	* microblaze-linux-tdep.c (_initialize_microblaze_linux_tdep): New
	prototype.
	* microblaze-tdep.c (microblaze_debug, microblaze_fetch_instruction)
	(microblaze_skip_prologue, microblaze_frame_cache): Make them static.
	* mips-linux-tdep.c (mips_linux_regset_from_core_section): Make it
	static.
	* moxie-tdep.c (moxie_process_record): Likewise.
	* remote-mips.c (mips_can_use_watchpoint, mips_insert_watchpoint)
	(mips_remove_watchpoint, mips_stopped_by_watchpoint): Make them static.
	* rl78-tdep.c (rl78_breakpoint_from_pc): Make it static.
	(_initialize_rl78_tdep): New prototype.
	* rx-tdep.c (rx_breakpoint_from_pc): Make it static.
	(_initialize_rx_tdep): New prototype.
	* solib-darwin.c (darwin_in_dynsym_resolve_code): Make it static.
	(_initialize_darwin_solib): New prototype.
	* solib-spu.c: Include solib-spu.h.
	(_initialize_spu_solib): New prototype.
	* spu-multiarch.c (_initialize_spu_multiarch): New prototype.
	* tic6x-tdep.c (tic6x_analyze_prologue, tic6x_skip_prologue)
	(tic6x_breakpoint_from_pc, tic6x_frame_unwind_cache)
	(tic6x_software_single_step): Make it static.
	(_initialize_tic6x_tdep): New prototype.
2012-03-02 00:06:13 +00:00
Jan Kratochvil 638234e578 gdb/
Fix -Wmissing-prototypes build.
	* cris-tdep.c (cris_can_use_hardware_watchpoint)
	(cris_region_ok_for_watchpoint, cris_stopped_data_address): Remove.
2012-03-02 00:01:24 +00:00
gdbadmin ff87ee0b35 *** empty log message *** 2012-03-02 00:00:32 +00:00
Jan Kratochvil f4a6f16df0 gdb/
Fix -Wmissing-prototypes build.
	* frv-tdep.c (frv_check_watch_resources, frv_stopped_data_address)
	(frv_have_stopped_data_address): Remove.
2012-03-01 23:58:48 +00:00
Jan Kratochvil 04dcf5fa36 gdb/
Fix -Wmissing-prototypes build.
	* Makefile.in (HFILES_NO_SRCDIR): Add sh64-tdep.h.
	* sh-tdep.c: Include sh64-tdep.h.
	* sh-tdep.h (sh64_gdbarch_init, sh64_show_regs): Remove declarations.
	* sh64-tdep.c: Include sh64-tdep.h.
	* sh64-tdep.h: New file.
2012-03-01 23:55:40 +00:00
Maciej W. Rozycki 1908093124 * mips-tdep.c (mips32_scan_prologue): Correct indentation. 2012-03-01 23:35:46 +00:00
Maciej W. Rozycki 9aac7884c5 * mips-tdep.c (mips_gdbarch_init): Only set pc_regnum and
sp_regnum once the gdbarch_init_osabi hook has been called.
2012-03-01 22:52:03 +00:00
Joel Brobecker 263689d88a Fix typo in frame.h:read_frame_register_unsigned function description.
gdb/ChangeLog:

	* frame.h (read_frame_register_unsigned): Fix typo in function
	description.
2012-03-01 22:47:46 +00:00
Maciej W. Rozycki a385295e2c * mips-tdep.c (mips32_bc1_pc): New function.
(mips32_next_pc): Handle BC1ANY2F, BC1ANY2T, BC1ANY4F, BC1ANY4T,
	BPOSGE32 and BPOSGE64 instructions.
	(deal_with_atomic_sequence): Likewise.
	(mips32_instruction_has_delay_slot): Likewise.
2012-03-01 22:37:51 +00:00
Maciej W. Rozycki 1faeff088b gdb/
* features/mips-dsp.xml: New file.
	* features/mips64-dsp.xml: New file.
	* features/mips-dsp-linux.xml: New file.
	* features/mips64-dsp-linux.xml: New file.
	* features/Makefile (WHICH): Add mips-dsp-linux and
	mips64-dsp-linux.
	(mips-dsp-expedite, mips64-dsp-expedite): New variables.
	* features/mips-dsp-linux.c: New file.
	* features/mips64-dsp-linux.c: New file.
	* regformats/mips-dsp-linux.dat: New file.
	* regformats/mips64-dsp-linux.dat: New file.
	* mips-linux-nat.c (mips_linux_register_addr): Handle DSP
	registers.
	(mips64_linux_register_addr): Likewise.
	(mips64_linux_regsets_fetch_registers): Likewise.
	(mips64_linux_regsets_store_registers): Likewise.
	(mips64_linux_fetch_registers): Update call to
	mips64_linux_regsets_fetch_registers.
	(mips64_linux_store_registers): Update call to
	mips64_linux_regsets_store_registers.
	(mips_linux_read_description): Probe for DSP registers.
	(_initialize_mips_linux_nat): Call initialize_tdesc_mips_dsp_linux
	and initialize_tdesc_mips64_dsp_linux.
	* mips-linux-tdep.c (supply_gregset, mips64_supply_gregset):
	Remove padding of no longer used embedded register slots.
	* mips-linux-tdep.h (DSP_BASE, DSP_CONTROL): New macros.
	(MIPS_RESTART_REGNUM): Redefine enum value.
	* mips-tdep.c (mips_generic_reg_names): Remove trailing null
	strings.
	(mips_tx39_reg_names): Likewise.
	(mips_linux_reg_names): New array of register names for Linux
	targets.
	(mips_register_name): Check for a null pointer in
	mips_processor_reg_names and return an empty string.
	(mips_register_type): Exclude embedded registers for the IRIX
	and Linux ABIs.
	(mips_pseudo_register_type): Likewise.  Use dynamic numbers to
	refer to FP registers, LO, HI, BadVAddr, Cause and PC.  Handle
	DSP registers.
	(mips_stab_reg_to_regnum): Handle DSP accumulators.
	(mips_dwarf_dwarf2_ecoff_reg_to_regnum): Likewise.
	(mips_gdbarch_init): Likewise.  Initialize internal register
	indices for the Linux ABI.  Use dynamic numbers to refer to
	registers, as applicable, while parsing the target description.
	* mips-tdep.h (struct mips_regnum): Add dspacc/dspctl offsets.

	gdb/doc/
	* gdb.texinfo (MIPS Features): Add org.gnu.gdb.mips.dsp.

	gdb/gdbserver/
	* linux-low.h (linux_target_ops): Add regset_bitmap member.
	* linux-low.c (use_linux_regsets): New macro.
	[!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
	[!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
	(linux_register_in_regsets): New function.
	(usr_fetch_inferior_registers): Skip registers covered by
	regsets.
	(usr_store_inferior_registers): Likewise.
	(usr_fetch_inferior_registers): New macro.
	(usr_store_inferior_registers): Likewise.
	(linux_fetch_registers): Handle mixed regset/non-regset targets.
	(linux_store_registers): Likewise.
	* linux-mips-low.c (init_registers_mips_dsp_linux): New
	prototype.
	(init_registers_mips64_dsp_linux): Likewise.
	(init_registers_mips_linux): New macro.
	(init_registers_mips_dsp_linux): Likewise.
	(mips_dsp_num_regs): Likewise.
	(DSP_BASE, DSP_CONTROL): New fallback macros.
	(mips_base_regs): New macro.
	(mips_regmap): Use it.  Fix the size.
	(mips_dsp_regmap): New variable.
	(mips_dsp_regset_bitmap): Likewise.
	(mips_arch_setup): New function.
	(mips_cannot_fetch_register): Use the_low_target.regmap rather
	than mips_regmap.
	(mips_cannot_store_register): Likewise.
	(the_low_target): Update .arch_setup, .num_regs and .regmap
	initializers.  Add .regset_bitmap initializer.
	* linux-arm-low.c (the_low_target): Add .regset_bitmap
	initializer.
	* linux-bfin-low.c (the_low_target): Likewise.
	* linux-cris-low.c (the_low_target): Likewise.
	* linux-crisv32-low.c (the_low_target): Likewise.
	* linux-ia64-low.c (the_low_target): Likewise.
	* linux-m32r-low.c (the_low_target): Likewise.
	* linux-m68k-low.c (the_low_target): Likewise.
	* linux-ppc-low.c (the_low_target): Likewise.
	* linux-s390-low.c (the_low_target): Likewise.
	* linux-sh-low.c (the_low_target): Likewise.
	* linux-sparc-low.c (the_low_target): Likewise.
	* linux-tic6x-low.c (the_low_target): Likewise.
	* linux-x86-low.c (the_low_target): Likewise.
	* linux-xtensa-low.c (the_low_target): Likewise.
	* configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
	mips64-dsp-linux.o to srv_regobj.  Add mips-dsp-linux.xml,
	mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
	srv_xmlfiles.
	* Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
	(mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.

	gdb/testsuite/
	* gdb.xml/tdesc-regs.exp: Add "mips-dsp.xml" to the list of MIPS
	core registers.
2012-03-01 22:19:48 +00:00
Pedro Alves f3b4f45c33 2012-03-01 Pedro Alves <palves@redhat.com>
* jit-reader.in [!__cplusplus]
	(GDB_DECLARE_GPL_COMPATIBLE_READER): Add missing backslash.
2012-03-01 21:26:48 +00:00
Pedro Alves b03a20112f 2012-03-01 Pedro Alves <palves@redhat.com>
* configure.ac (build_warnings): Add -Wmissing-prototypes.
	* configure: Regenerate.
2012-03-01 21:14:53 +00:00
Pedro Alves 70221824e3 2012-03-01 Pedro Alves <palves@redhat.com>
* amd64-linux-tdep.c (amd64_linux_record_signal): Make static.
	* breakpoint.c (create_exception_master_breakpoint, trace_command)
	(ftrace_command, strace_command): Make static.
	* d-lang.c (_initialize_d_language): Declare.
	* dwarf2expr.c (_initialize_dwarf2expr): Declare.
	* dwarf2loc.c (_initialize_dwarf2loc):
	* dwarf2read.c (process_psymtab_comp_unit): Make static.
	* exec.c (exec_get_section_table): Make static.
	* i386-linux-tdep.c (i386_linux_record_signal): Make static.
	* infcmd.c (ensure_valid_thread, ensure_not_tfind_mode): Make static.
	* inferior.c (remove_inferior_command, add_inferior_command)
	(clone_inferior_command): Make static.
	* linux-nat.c (linux_nat_thread_address_space)
	(linux_nat_core_of_thread): Make static.
	* linux-tdep.c (_initialize_linux_tdep): Declare.
	* objc-lang.c (_initialize_objc_lang): Declare.
	* opencl-lang.c (builtin_opencl_type, opencl_language_arch_info):
	Make static.
	(_initialize_opencl_language): Declare.
	* record.c (_initialize_record): Declare.
	* remote.c (demand_private_info, remote_get_tib_address)
	(remote_supports_cond_tracepoints)
	(remote_supports_fast_tracepoints, remote_get_tracepoint_status):
	Make static.
	* skip.c (_initialize_step_skip): Declare.
	* symtab.c (skip_prologue_using_lineinfo): Make static.
	* tracepoint.c (delete_trace_state_variable)
	(trace_variable_command, delete_trace_variable_command)
	(get_uploaded_tsv, find_matching_tracepoint_location)
	(find_matching_tsv, create_tsv_from_upload, get_traceframe_info):
	Make static.
	* value.c (pack_unsigned_long): Make static.
	* varobj.c (varobj_ensure_python_env): Make static.
	* windows-tdep.c (_initialize_windows_tdep): Declare.
	* xml-syscall.c (make_cleanup_free_syscalls_info): Make static.
2012-03-01 21:14:00 +00:00
Pedro Alves 33fbcbee30 2012-03-01 Pedro Alves <palves@redhat.com>
* linux-tdep.c (linux_has_shared_address_space): Make static.  Add
	gdbarch parameter.
	(linux_init_abi): Install it as has_shared_address_space gdbarch
	callback.
2012-03-01 21:12:47 +00:00
Pedro Alves 44d0cd3be3 2012-03-01 Pedro Alves <palves@redhat.com>
* observer.c (observer_test_first_notification_function)
	(observer_test_second_notification_function)
	(observer_test_third_notification_function): Add declarations.
2012-03-01 21:12:05 +00:00
Pedro Alves ed01b82c02 2012-03-01 Pedro Alves <palves@redhat.com>
* common/signals.c (default_target_signal_to_host)
	(default_target_signal_from_host): Move ...
	* arch-utils.c: ... here.
	* arch-utils.h (default_target_signal_to_host)
	(default_target_signal_from_host): Declare.

	* common/signals.c (target_signal_from_command): Move ...
	* infrun.c: ... here.
	* inferior.h (target_signal_from_command): Declare.
	* target.h (target_signal_from_command)
	(default_target_signal_from_host, default_target_signal_to_host):
	Delete declarations.

	* common/signals.c (_initialize_signals): Delete.
2012-03-01 21:11:23 +00:00
Pedro Alves c9b873354a 2012-03-01 Pedro Alves <palves@redhat.com>
* jit-reader.in (plugin_is_GPL_compatible): Add declarations for
	both __cplusplus and !__cplusplus.
2012-03-01 21:09:55 +00:00
Pedro Alves 9340a6c0be 2012-03-01 Pedro Alves <palves@redhat.com>
* psymtab.c (find_and_open_source): Delete declaration.
	* source.c (find_and_open_source): Move comment ...
	* source.h (find_and_open_source): ... to this new declaration.
2012-03-01 21:09:16 +00:00
Pedro Alves e451c4a12f 2012-03-01 Pedro Alves <palves@redhat.com>
* inline-frame.c: Include inline-frame.h.
2012-03-01 21:08:37 +00:00
Pedro Alves 983fb1048b 2012-03-01 Pedro Alves <palves@redhat.com>
* tui/tui-data.c (set_gen_win_origin): Delete.
	* tui/tui-data.h (tui_set_gen_win_origin): Delete declaration.
	* tui/tui-regs.c (tui_last_reg_element_no_in_line): Delete.
2012-03-01 21:08:07 +00:00
Pedro Alves 5fbce5dfb1 2012-03-01 Pedro Alves <palves@redhat.com>
* remote.c (encode_actions): Delete declaration.
	* tracepoint.c (encode_actions): Make extern.
	* tracepoint.h (encode_actions): Declare.
2012-03-01 21:07:31 +00:00
Pedro Alves 49a8461db8 2012-03-01 Pedro Alves <palves@redhat.com>
* python/py-breakpoint.c: Include python.h.
	* python/py-continueevent.c (create_continue_event_object): Make
	static.
	* python/py-lazy-string.c (stpy_get_type): Make static.
	* python/py-newobjfileevent.c (create_new_objfile_event_object):
	Make static.
	* python/py-utils.c (unicode_to_target_python_string): Make
	static.
	* python/py-value.c: Include python.h.
2012-03-01 21:06:54 +00:00
Pedro Alves 9079102fe5 2012-03-01 Pedro Alves <palves@redhat.com>
* inferior.c (delete_threads_of_inferior): Delete.
2012-03-01 21:06:14 +00:00
Pedro Alves a298c5e812 2012-03-01 Pedro Alves <palves@redhat.com>
Import fallback definitions from glibc.

	* gdb_proc_service.h [!HAVE_PROC_SERVICE_H] (struct
	ps_prochandle): Forward declare.
	(ps_err_e): Use glibc's comments.
	[!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
	(ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
	(ps_lsetfpregs, ps_getpid, ps_get_thread_area, ps_pglobal_lookup)
	(ps_pstop, ps_pcontinue, ps_lstop, ps_lcontinue, ps_lgetxregsize)
	(ps_lgetxregs, ps_lsetxregs, ps_plog): Declare.
	(struct ps_prochandle): Adjust comment.
2012-03-01 21:05:31 +00:00
Pedro Alves e308454991 2012-03-01 Pedro Alves <palves@redhat.com>
* ada-lang.c (ada_modulus_from_name): Delete.
	* ada-lex.l (lexer_init): Make static.
2012-03-01 21:03:15 +00:00
Maciej W. Rozycki 320b6f49d3 * gdb.base/hbreak2.exp: New test for "hbreak" and "thbreak". 2012-03-01 21:01:11 +00:00
Pedro Alves ad5f7d6ef7 2012-03-01 Pedro Alves <palves@redhat.com>
PR gdb/13767

	gdb/
	* frame.c (read_frame_register_unsigned): New.
	* frame.h (read_frame_register_unsigned): Declare.
	* i387-tdep.c (print_i387_status_word): New parameter `status_p'.
	Handle it.
	(print_i387_control_word): New parameter `control_p'.  Handle it.
	(i387_print_float_info): Handle unavailable float registers.

	gdb/testsuite/
	* gdb.trace/unavailable.exp (gdb_unavailable_floats): New.
	(gdb_collect_globals_test): Call it.
2012-03-01 20:49:02 +00:00
Keith Seitz d3dc44a619 * gdb.cp/method2.exp: Output of overload menu is now
alphabetized.  Update tests for "break A::method".
	* gdb.cp/ovldbreak.exp: Use gdb_get_line_number instead
	of hard-coding them.
	Overload menu is alphabetized: rewrite to accommodate.
	Unset variables LINE and TYPES which are used in other tests.
	Compute the output of "info break".
	Update the breakpoint table after all breakpoints are deleted.
	(continue_to_bp_overloaded): Rename ACTUALS to ARGUMENT and
	compute ACTUALS and the method body based on parameters.
	Update expected output accordingly.
	* gdb.cp/ovldbreak.cc (foo::overload1arg): Reformat and add
	unique comments to allow the use of gdb_get_line_number.

	* gdb.cp/method2.exp: Use prepare_for_testing and cleanup
	some Tcl syntax.
	* gdb.cp/ovldbreak.exp: Likewise.
2012-03-01 20:34:13 +00:00
Keith Seitz e0a4d1083e * linespec.c (decode_line_2): Sort the list of methods
alphabetically before presenting the user with a selection
	menu.
2012-03-01 20:33:09 +00:00
Keith Seitz 7949c2a0b4 * gdb.base/help.exp (help show user): Update expected result
for new doc string changes (add "non-python").
2012-03-01 20:25:50 +00:00
Doug Evans 122d194084 * dwarf2read.c (dwarf2_cu): Remove unused members has_form_ref_addr,
has_namespace_info.
	(dwarf2_read_abbrevs): Remove corresponding initialization.
2012-03-01 19:55:35 +00:00
Doug Evans 7d74f2446c * NEWS: Mention new python command class gdb.COMMAND_USER.
* cli/cli-cmds.c (show_user): Print error when used on a python
	command.
	(init_cli_cmds): Update documentation strings for "show user" and
	"set/show max-user-call-depth" to clarify that it does not apply to
	python commands.
	* python/py-cmd.c (cmdpy_init): Treat class_user as a valid class in
	error check.
	(gdbpy_initialize_commands): Add COMMAND_USER as a constant in
	gdb python api.
	* top.c (execute_command): Only execute a user-defined command as a
	legacy macro if c->user_commands is set.

	doc/
	* gdb.texinfo (Commands In Python): Put example python macro in
	COMMAND_USER category rather than COMMAND_OBSCURE.
	Document gdb.COMMAND_USER.
	(User-defined Commands): Update documentation to clarify
	"set/show max-user-call-depth" and "show user" don't apply to python
	commands.  Update documentation to clarify "help user-defined" may
	also include python commands defined as COMMAND_USER.

	testsuite/
	* gdb.python/py-cmd.exp: Add test to verify that python commands can
	be put in the user-defined category and that the commands appear in
	"help user-defined".
2012-03-01 19:30:25 +00:00
Tom Tromey e88acd9618 * valprint.h (struct generic_val_print_decorations): New.
(generic_val_print): Declare.
	* valprint.c (generic_val_print): New function.
	* p-valprint.c (p_decorations): New global.
	(pascal_val_print) <TYPE_CODE_REF, TYPE_CODE_ENUM,
	TYPE_CODE_FLAGS, TYPE_CODE_FUNC, TYPE_CODE_RANGE, TYPE_CODE_INT,
	TYPE_CODE_FLT, TYPE_CODE_VOID, TYPE_CODE_ERROR, TYPE_CODE_UNDEF,
	TYPE_CODE_BOOL, TYPE_CODE_CHAR>: Call generic_val_print.
	* m2-valprint.c (m2_decorations): New global.
	(m2_val_print) <TYPE_CODE_REF, TYPE_CODE_ENUM, TYPE_CODE_FUNC,
	TYPE_CODE_BOOL, TYPE_CODE_RANGE, TYPE_CODE_INT, TYPE_CODE_CHAR,
	TYPE_CODE_FLT, TYPE_CODE_METHOD, TYPE_CODE_VOID, TYPE_CODE_UNDEF,
	TYPE_CODE_ERROR>: Call generic_val_print.
	* f-valprint.c (f_decorations): New global.
	(f_val_print): Use print_function_pointer_address.
	<TYPE_CODE_REF, TYPE_CODE_FUNC, TYPE_CODE_CHAR, TYPE_CODE_FLAGS,
	TYPE_CODE_FLT, TYPE_CODE_VOID, TYPE_CODE_ENUM, TYPE_CODE_RANGE,
	TYPE_CODE_BOOL, TYPE_CODE_COMPLEX, TYPE_CODE_UNDEF>: Call
	generic_val_print.
	* c-valprint.c (c_decorations): New global.
	(c_val_print) <TYPE_CODE_MEMBERPTR, TYPE_CODE_REF, TYPE_CODE_ENUM,
	TYPE_CODE_FLAGS, TYPE_CODE_FUNC, TYPE_CODE_METHOD, TYPE_CODE_BOOL,
	TYPE_CODE_RANGE, TYPE_CODE_CHAR, TYPE_CODE_FLT,
	TYPE_CODE_DECFLOAT, TYPE_CODE_VOID, TYPE_CODE_ERROR,
	TYPE_CODE_UNDEF, TYPE_CODE_COMPLEX>: Call generic_val_print.
	* ada-valprint.c (ada_val_print_1) <TYPE_CODE_FLAGS>: Remove
	case.
2012-03-01 19:27:18 +00:00
Tom Tromey d3eab38a48 * valprint.c (val_print): Update.
* p-valprint (pascal_val_print): Return void.
	* p-lang.h (pascal_val_print): Return void.
	* m2-valprint.c (m2_val_print): Return void.
	* m2-lang.h (m2_val_print): Return void.
	* language.h (struct language_defn) <la_val_print>: Return void.
	* language.c (unk_lang_val_print): Return void.
	* jv-valprint.c (java_val_print): Return void.
	* jv-lang.h (java_val_print): Return void.
	* f-valprint.c (f_val_print): Return void.
	* f-lang.h (f_val_print): Return void.
	* d-valprint.c (d_val_print): Return void.
	(dynamic_array_type): Update.
	* d-lang.h (d_val_print): Return void.
	* c-valprint.c (c_val_print): Return void.
	* c-lang.h (c_val_print): Return void.
	* ada-valprint.c (ada_vada_val_print, ada_val_print_1): Return
	void.
	* ada-lang.h (ada_val_print): Return void.
2012-03-01 19:26:13 +00:00
Tom Tromey 35c0084bfc * value.h (val_print): Return void.
* valprint.c (val_print): Return void.
2012-03-01 19:24:57 +00:00
Tom Tromey a1f5dd1b0d * value.h (common_val_print): Return void.
* valprint.c (common_val_print): Return void.
2012-03-01 19:23:36 +00:00
Tom Tromey 8e069a981c * value.h (value_print): Return void.
* valprint.c (value_print): Return void.
	* p-valprint.c (pascal_value_print): Return void.
	* p-lang.h (pascal_value_print): Return void.
	* language.h (struct language_defn) <la_value_print>: Return
	void.
	* language.c (unk_lang_value_print): Return void.
	* jv-valprint.c (java_value_print): Return void.
	* jv-lang.h (java_value_print): Return void.
	* f-valprint.c (c_value_print): Don't declare.
	Include c-lang.h.
	* c-valprint.c (c_value_print): Return void.
	* c-lang.h (c_value_print): Return void.
	* ada-valprint.c (ada_value_print): Return void.
	* ada-lang.h (ada_value_print): Return void.
2012-03-01 19:22:22 +00:00
Tom Tromey be3359361a * value.c (value_primitive_field): Handle virtual base classes. 2012-03-01 18:28:16 +00:00
Tom Tromey b0db66a7b3 * gdbtypes.h (struct vbase): Remove. 2012-03-01 18:26:13 +00:00
Tom Tromey 132c57b477 * c-valprint.c (print_function_pointer_address): Move...
* valprint.c: ... here.  Make non-static.
	* m2-valprint.c (print_function_pointer_address): Remove.
	* valprint.h (print_function_pointer_address): Declare.
2012-03-01 18:25:19 +00:00
Joel Brobecker e41eec6613 [NEWS] Document condition at end of catch exception/assert commands
gdb/ChangeLog:

        * NEWS: Document the fact that one can provide a condition when
        creating an Ada exception catchpoint.
2012-03-01 18:12:43 +00:00
Tom Tromey 19c37f2447 * valprint.c (val_print_type_code_flags): Fix placement of
trailing brace.
2012-03-01 15:50:16 +00:00
Joel Brobecker f0fed3a3b6 Do not set MULTILINE_COMMENT_PREFIXES before calling update-copyright
This was a local hack to work around a limitation in update-copyright.
But the limitation is now OBE, because the copyright statements should
now always fit on a single line, thanks to the new policy of using
one single year range in the copyright notice.

gdb/ChangeLog:

        * copyright.py (MULTILINE_COMMENT_PREFIXES): Delete.
        (update_files): Do not set MULTILINE_COMMENT_PREFIXES
        environment variable before calling update-copyright.
2012-03-01 02:41:14 +00:00
Joel Brobecker 8ba85d8526 Import gnulib's latest update-copyright script...
... and update our copyright.py script to set environment variable
UPDATE_COPYRIGHT_USE_INTERVALS to '2' instead of '1'.  This tells
the script to collapse all years into one single interval.

gdb/ChangeLog:

        * gnulib/extra/update-copyright: Update to the latest from
        gnulib's git repository.
        * copyright.py: Set UPDATE_COPYRIGHT_USE_INTERVALS environment
        variable to 2 instead of 1.
2012-03-01 02:41:04 +00:00
Joel Brobecker 8219b1e8f0 remove dead code in varobj.c:c_value_of_variable
gdb/ChangeLog:

        * varobj.c (c_value_of_variable): Remove dead code.
2012-03-01 01:59:22 +00:00
gdbadmin de8e3c0085 *** empty log message *** 2012-03-01 00:00:03 +00:00
Joel Brobecker 718cb7da5d [Ada] processId: Do not modify already encoded IDs
The processID function is supposed to take a symbol name, and process it
in a way that allows us to look that symbol up.  This patch is adding
a guard to make sure that we do not apply any transformation if we detect
that we are given an already-encoded symbol name.  For instance:

    gv___XR_pck__global_variable___XE

This happens in the case where we are trying to print the value of
a renaming. To do this, we simply parse and evaluate the XR symbol
name as an expression. Without this change, the expression parser
transforms gv___XR_pck__global_variable___XE into somethink like
gv___xr_pck__global_variable___xe, which then screws up the rest
of the renaming evaluation.

gdb/ChangeLog:

        * ada-lex.p (processId): Do not modify already encoded IDs.
        Update function documentation.
2012-02-29 19:53:16 +00:00
Joel Brobecker 739593e0ec ada-lang.c:ada_find_renaming_symbol minor improvement.
This is a minor improvement in ada_find_renaming_symbol: What we were
doing was going from a symbol, get its name, and then search for
renamings.  But if the original symbol was already itself a renaming,
then we'd look the symbol up again to return it.  Since we had the
symbol in the first place, we shouldn't need to look it up again.

This is what this patch does: Modify ada_find_renaming_symbol to
take a symbol instead of the symbol's (linkage) name, and then updates
the one caller.

gdb/ChangeLog:

        * ada-lang.h (ada_find_renaming_symbol): Replace parameter
        "name" with "struct symbol *name_sym".
        * ada-exp.y (write_var_or_type): Update call to
        ada_find_renaming_symbol.
        * ada-lang.c (ada_find_renaming_symbol): Replace parameter
        "name" with "struct symbol *name_sym". Adjust Implementation
        accordingly.  Adjust the function documentation.
2012-02-29 19:51:49 +00:00
Joel Brobecker 852dff6c67 Minor cleanup to a couple of functions in ada-lang.c.
gdb/ChangeLog:

        * ada-lang.h (ada_find_any_symbol, ada_find_any_type): Delete.
        * ada-lang.c (ada_find_any_type): Add advance declaration.
        Make static.  Replace ada_find_any_symbol by
        ada_find_any_type_symbol.
        (ada_find_any_type_symbol): Renames ada_find_any_symbol.
        Improve function description.  Make static.
        (ada_find_renaming_symbol, find_old_style_renaming_symbol):
        Replace ada_find_any_symbol by ada_find_any_type_symbol.
2012-02-29 19:50:22 +00:00
Joel Brobecker 1b61134393 [Ada] avoid error message pollution with uninitialized tagged variable
Consider the following function...

  3 procedure Foo is
  4    I : Integer := Ident (10);
  5    Obj : Base;
  6 begin
  7    Obj.X := I;
  8    Do_Nothing (Obj.X'Address);
  9 end Foo;

... where type "Base" is defined as a plain tagged record. If the user
stops execution before "Obj" gets initialized (for example, by inserting
a breakpoint "on" the function - or in other words, by inserting a
breakpoint using the function name as the location), one might get
the following of output if you try printing the value of obj:

    (gdb) p obj
    object size is larger than varsize-limit
    object size is larger than varsize-limit
    object size is larger than varsize-limit
    $1 = object size is larger than varsize-limit
    (x => 4204154)

Same thing with "info locals":

   (gdb) info locals
    i = 0
    obj = object size is larger than varsize-limit
    (x => 4204154)

We have also seen different error messages such as "Cannot read
memory at 0x...".

The error happens because we are trying to read the dispatch table
of a tagged type variable before it gets initialized.  So the errors
might legitimately occur, and are supposed to be be contained.
However, the way things are written in ada-lang.c:ada_tag_name,
although the exception is in fact contained, the error message still
gets to be printed out.

This patch prevents this from happening by eliminating the use of
catch_errors, and using a TRY_CATCH block instead.  Doing this removed
the need to use functions specifically fitted for catch_errors, and
thus some other simplifications could me made.  In the end, the code
got reorganized a bit to better show the logic behind it, as well as
the common patterns.

gdb/ChangeLog:

        * ada-lang.c (struct tag_args): Delete.
        (ada_get_tsd_type): Function body moved up in source file.
        (ada_tag_name_1, ada_tag_name_2): Delete.
        (ada_get_tsd_from_tag): New function.
        (ada_tag_name_from_tsd): New function.
        (ada_tag_name): Use a TRY_CATCH block instead of catch_errors
        to determine the tag name.

gdb/testsuite/ChangeLog:

        * gdb.ada/tagged_not_init: New testcase.
2012-02-29 19:46:48 +00:00
Joel Brobecker 41246937ec [Ada] New functions to decode Ada types and values
This patch introduces two new functions that will be used to support
the implementation of the ada-varobj effort.  The function descriptions
should say it all...

gdb/ChangeLog:

        * ada-lang.h (ada_get_decoded_value, ada_get_decoded_type): Add
        declaration.
        * ada-lang.c (ada_get_decoded_value, ada_get_decoded_type): New
        function.
2012-02-29 19:44:12 +00:00
Joel Brobecker ffde82bff0 [Ada] Fix comment in ada-lang.c:ada_is_ignored_field
Fix a comment that completly mistunderstood the code...

gdb/ChangeLog:

        * ada-lang.c (ada_is_ignored_field): Rewrite wrong comment.
2012-02-29 19:37:07 +00:00
Joel Brobecker 2ad01556c7 [Ada] Do not cache lookup result if not full_search
The ada_lookup_symbol_list function has recently been changed to accept
a "full_search" parameter. When null, this parameter instructs the
function to perform a partial search (global and static symbols are not
searched). When doing a partial search, the result should not be saved
into the lookup cache, as the result might be incomplete.

This manifested itself when trying to perform a function call on AVR
after having inserted a breakpoint inside that function:

    (gdb) b same
    Breakpoint 2 at 0x78: file r.adb, line 5.
    (gdb) call same(42)

    Breakpoint 2, r.same (i=42) at r.adb:5
    5             return I;
    The program being debugged stopped while in a function called from GDB.
    Evaluation of the expression containing the function
    (at 0x0x800068) will be abandoned.
    ^^^^^^^^^^^^^^^
    When the function is done executing, GDB will silently stop.

The expected output for the underlined portion is "(r.same)".

What happens is that the breakpoint command triggers 3 lookups of the
name "same":
  1. full search in LABEL_DOMAIN -> no match, cached;
  2. full search in VAR_DOMAIN -> 1 match, cached;
  3. partial search in VAR_DOMAIN -> no match, cached.

The third lookup therefore causes the results of the partial search
to be cached, thus overriding the result of the full search lookup.

During the following command, the reference to "same" triggers a lookup
of that symbol again. And since GDB CAN find the result of that lookup
in the cache, it returns just that, which is: No match. (wrong!)

As a result, we fallback on the symbol table to resolve the lookup.
And instead of pushing an OP_VAR_VALUE subexpression for symbol "same",
the parser ends up pushing an UNOP_MEMVAL subexpression using the value
of the minimal symbol. This is where being on AVR becomes important:
addresses on AVR are modular types, and if GDB thinks an address is
a data address, it converts it.

This is where one notices the fact that the breakpoint was inserted
at 0x78, and yet GDB says that the function we stopped at is at
0x0x800068...

This patch fixes the problem by making sure we only cache the result
of full searches.

gdb/ChangeLog:

        * ada-lang.c (ada_lookup_symbol_list): Only cache the result of
        full searches.
2012-02-29 19:35:37 +00:00
Joel Brobecker 99b1c762c9 [Ada] print packed arrays indexed by enumerated type
Consider the following declarations (a packed array indexed by an
enumerated type):

    type Color is (Black, Red, Green, Blue, White);
    type Full_Table is array (Color) of Boolean;
    pragma Pack (Full_Table);
    Full : Full_Table := (False, True, False, True, False);

GDB is unable to print the index values correctly. It prints the
enumeration's underlying value instead of the enumeration name:

    (gdb) p full
    $1 = (0 => false, true, false, true, false)
    (gdb) p full'first
    $2 = 0

And yet, it is capable of printing the correct type description:

    (gdb) ptype full
    type = array (black .. white) of boolean <packed: 1-bit elements>

To get to the real index type, one has to follow the parallel XA type.
We already do this for normal arrays. We can do it for this packed
array as well.

gdb/ChangeLog:

        * ada-lang.c (constrained_packed_array_type): If there is a
        parallel XA type, use it to determine the array index type.

gdb/testsuite/ChangeLog:

        * gdb.ada/arrayidx.exp: Adjust expected output for p_one_two_three.
        * gdb.ada/enum_idx_packed: New testcase.
2012-02-29 19:34:40 +00:00
Joel Brobecker 2d4a02ee95 [Ada] Handle reference to array descriptors
This patch is to help handle aliased array variables, such as:

   type Bounded is array (Integer range <>) of Integer;
   function New_Bounded (Low, High : Integer) return Bounded;
   BT : aliased Bounded := New_Bounded (Low => 1, High => 3);

In that case, the compiler describes variable "BT" as a reference
to a thin pointer, and GDB is unable to print its value:

    (gdb) p bt
    $1 =

The problems starts when ada_value_print deconstructs the struct
value into contents and address in order to call val_print. It
turns out in this case that "bt" is not an lval. In the debug
information, this variable's location is described as:

        .uleb128 0xd    # (DIE (0xe0) DW_TAG_variable)
        .ascii "bt\0"   # DW_AT_name
        [...]
        .byte   0x6     # DW_AT_location
        .byte   0x91    # DW_OP_fbreg
        .sleb128 -56
        .byte   0x6     # DW_OP_deref
        .byte   0x23    # DW_OP_plus_uconst
        .uleb128 0x8
        .byte   0x9f    # DW_OP_stack_value

So, when ada_value_print passes the bt's (value) address, it passes
in effect a meaningless address. The problem continues shortly after
when ada_val_print_1 re-creates the value from the contents and address.
The value has become an lval_memory, with a null address.

As a result, we trigger a memory error later on, while trying to
read the array bounds in order to transform our value into a simple
array.

To avoid the problem entirely, the fix is to coerce references before
transforming array descriptors into simple arrays.

gdb/ChangeLog:

        * ada-valprint.c (ada_val_print_1): If our value is a reference
        to an array descriptor, dereference it before converting it
        to a simple array.

gdb/testsuite/ChangeLog:

        * gdb.ada/aliased_array: New testcase.
2012-02-29 19:33:02 +00:00
Joel Brobecker c48db5caef Ada: ada_to_fixed_value should also unwrap_value
We should always unwrap a value before trying to "fix" it. It is
therefore logical that ada_to_fixed_value would call unwrap_value
before creating the fixed value.

This simplifies the code in ada-lang.c a bit.

gdb/ChangeLog:

        * ada-lang.c (ada_to_fixed_value): Call unwrap_value before
        creating fixed value.
        (ada_value_ind, ada_coerce_ref, assign_component)
        (ada_evaluate_subexp): Remove call to unwrap_value before
        call to ada_to_fixed_value.
2012-02-29 19:30:53 +00:00
Joel Brobecker 2e6fda7d06 [Ada] whatis not printing array type name for value from history
Consider the following declaration:

   type Full_Table is array (Color) of Integer;
   Full : Full_Table := (144, 233, 377, 610, 987);

The debugger correctly prints the type name of variable "full":

        (gdb) whatis full
        type = pck.full_table

But is unable to do so when using the value history:

        (gdb) print full
        $1 = (144, 233, 377, 610, 987)
        (gdb) whatis $
 !!! -> type = array (black .. white) of integer

This is because the evaluation creates a "fixed" version of
the array type, and that "fixed" version is missing a type name.
As a result, whatis falls back to describing the type (a la ptype)
instead of printing the type name.

gdb/ChangeLog:

        * ada-lang.c (to_fixed_array_type): Set result's type name.

gdb/testsuite/ChangeLog:

        * gdb.ada/whatis_array_val: New testcase.
2012-02-29 19:29:12 +00:00
Joel Brobecker 5845583db6 Add support for condition in Ada exception catchpoint commands
Previously, conditions could be associated to Ada exception catchpoints,
but not while creating the exception catchpoint:

    (gdb) catch exception first_exception if except_counter = 5
    Junk at end of expression

This patch improves the parsing of the command arguments to allow
an "if CONDITION" at the end.  All Ada exception catchpoint commands
have been enhanced to support this.

gdb/ChangeLog:

        * ada-lang.c (catch_ada_exception_command_split): Add new
        argument cond_string.  Add support for condition at end of
        "catch exception" commands.
        (ada_decode_exception_location): Add new argument cond_string.
        Update call to catch_ada_exception_command_split.
        (create_ada_exception_catchpoint): Add new argument cond_string.
        Set the breakpoint condition if needed.
        (catch_ada_exception_command): Update call to
        ada_decode_exception_location.
        (ada_decode_assert_location): Add function documentation.
        Add support for condition at end of "catch assert" command.
        (catch_assert_command): Update calls to ada_decode_assert_location
        and create_ada_exception_catchpoint.
2012-02-29 19:09:47 +00:00
Jan Kratochvil 9a7f938f93 gdb/
Fix disp-step-syscall.exp: fork: single step over fork.
	* i386-linux-tdep.c (-i386_linux_get_syscall_number): Rename to ...
	(i386_linux_get_syscall_number_from_regcache): ... here, new function
	comment, change parameters gdbarch and ptid to regcache.  Remove
	parameter regcache, initialize gdbarch from regcache here.
	(i386_linux_get_syscall_number, i386_linux_displaced_step_copy_insn):
	New functions.
	(i386_linux_init_abi): Install i386_linux_displaced_step_copy_insn
	instead.
	* i386-tdep.c (i386_syscall_p): Check also for 'sysenter' and
	'syscall'.  Make the 'int' check more strict.

gdb/testsuite/
	Fix disp-step-syscall.exp: fork: single step over fork.
	* gdb.base/disp-step-syscall.exp (syscall_insn): Anchor it by
	whitespaces.
	(single step over $syscall): Remove its check.
	(single step over $syscall final pc): New check.
2012-02-29 14:59:41 +00:00
Jan Kratochvil ffdf6de517 gdb/
Fix reverse mode for syscall on AMD CPUs in 32-bit mode.
	* i386-linux-tdep.c (i386_linux_intx80_sysenter_record): Rename to ...
	(i386_linux_intx80_sysenter_syscall_record): ... here.
	(i386_linux_init_abi): Initialize also I386_SYSCALL_RECORD.
	Use the renamed function name.
2012-02-29 14:56:55 +00:00
Jan Kratochvil 8703a944b0 gdb/testsuite/
Support processors without SSSE3.
	* gdb.reverse/i386-sse-reverse.c (sse_test): Move pabsb, pabsw and
	pabsd into ...
	(ssse3_test): ... a new function.
	(main): Call ssse3_test.
	* gdb.reverse/i386-sse-reverse.exp: New variable end_ssse3_test.
	Update expected values everywhere.
	(reverse-step to pabsd, verify xmm0 after reverse pabsd)
	(verify xmm1 after reverse pabsd, verify xmm2 after reverse pabsd)
	(reverse-step to pabsw, verify xmm0 after reverse pabsw)
	(verify xmm1 after reverse pabsw, verify xmm2 after reverse pabsw)
	(reverse-step to pabsb, verify xmm0 after reverse pabsb)
	(verify xmm1 after reverse pabsb, verify xmm2 after reverse pabsb):
	Move these tests lower.
	(set breakpoint at end of ssse3_test, continue to end of ssse3_test)
	(verify xmm0 at end of ssse3_test, verify xmm1 at end of ssse3_test)
	(verify xmm2 at end of ssse3_test, continue to end of ssse3_test #2):
	New tests.
2012-02-29 14:55:46 +00:00
Jan Kratochvil c70a6932bb gdb/
* arm-linux-tdep.c (arm_linux_copy_svc): Reset stale FRAME.
	* breakpoint.c (until_break_command): Likewise.
	* elfread.c (elf_gnu_ifunc_resolver_stop): Likewise.
	* infcall.c (call_function_by_hand): Likewise.
	* infcmd.c (finish_forward): Likewise.
	* infrun.c (insert_exception_resume_breakpoint): Likewise.
2012-02-29 14:52:44 +00:00
Yao Qi c03e6ccce2 gdb/gdbserver:
2012-02-29  Yao Qi  <yao@codesourcery.com>
	    Pedro Alves  <palves@redhat.com>

	* linux-low.c (linux_wait_1): Call unsuspend_all_lwps when
	`step_over_finished' is true.

gdb/testsuite:

2012-02-29  Yao Qi  <yao@codesourcery.com>
	    Pedro Alves  <palves@redhat.com>

	* gdb.trace/trace-mt.c: New
	* gdb.trace/trace-mt.exp: New.
2012-02-29 13:59:41 +00:00
gdbadmin 319fe796b5 *** empty log message *** 2012-02-29 00:00:33 +00:00
Thomas Schwinge 2c8910ba4a gdb/testsuite/
* gdb.base/annota1.exp: Use gdb_get_line_number for retrieving line
	numbers instead of hardcoding them.
	* gdb.base/annota1.c: Provide suitable markers.
	* gdb.base/annota3.exp: Use gdb_get_line_number for retrieving line
	numbers instead of hardcoding them.
	* gdb.base/annota3.c: Provide suitable markers.
2012-02-28 22:40:48 +00:00
Joel Brobecker d4cd3da9f3 Fix ARI violation in ada_tasks_inferior_data_sniffer.
This patch removes some variable assignments inside condition
expressions.

gdb/ChangeLog:

        * ada-tasks.c (ada_tasks_inferior_data_sniffer): Rework code to
        avoid variable assignments inside condition.
2012-02-28 16:30:42 +00:00
Thomas Schwinge 7964b62a37 gdb/testsuite/
* gdb.base/annota1.c [__sh__]: Remove any special-casing.
        * gdb.base/annota3.c: Likewise.
        * gdb.base/sigall.c: Likewise.
        * gdb.base/signals.c: Likewise.
        * gdb.reverse/sigall-reverse.c: Likewise.
2012-02-28 10:24:15 +00:00
Jan Kratochvil 6425366c4b gdb/
Fix static analysis issue found by cppcheck.
	* microblaze-tdep.c (microblaze_extract_return_value): Fix
	uninitialized BUF for size 2.
2012-02-28 08:14:11 +00:00
gdbadmin b36101a8c9 *** empty log message *** 2012-02-28 00:00:32 +00:00
Maciej W. Rozycki c8cef75f3f * mips-tdep.c (mips32_instruction_has_delay_slot): New function.
(mips16_instruction_has_delay_slot): Likewise.
	(mips_segment_boundary): Likewise.
	(mips_adjust_breakpoint_address): Likewise.
	(mips_gdbarch_init): Use mips_adjust_breakpoint_address.
2012-02-27 23:05:40 +00:00
Maciej W. Rozycki 473347adb3 * infrun.c (handle_inferior_event): Don't proceed through
shared library trampolines if stepping at the machine
	instruction level.
2012-02-27 21:36:47 +00:00
Maciej W. Rozycki cf23330326 * mips-linux-tdep.c (mips_linux_init_abi): Set num_pseudo_regs
too.
2012-02-27 21:27:46 +00:00
Maciej W. Rozycki 5a41c0b791 * gdb.cp/breakpoint.exp (test_breakpoint): Fix the runto_main
failure return path.
2012-02-27 20:48:25 +00:00
Thomas Schwinge cb2cf4ce19 * sh-tdep.c (sh_make_stub_cache, sh_stub_this_id)
(sh_stub_unwind_sniffer): New functions.
	(sh_stub_unwind): New variable.
	(sh_gdbarch_init): Wire everything.
2012-02-27 16:40:48 +00:00
Pedro Alves 644cebc98c 2012-02-27 Pedro Alves <palves@redhat.com>
gdb/gdbserver/
	* linux-low.c (pid_is_stopped): Delete, moved to common/.
	(linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.

	gdb/
	* linux-nat.c (pid_is_stopped): Delete, moved to common/.
	(linux_nat_post_attach_wait): Adjust to use
	linux_proc_pid_is_stopped.

	* common/linux-procfs.h (linux_proc_pid_is_stopped): Declare.
	* common/linux-procfs.c (linux_proc_pid_is_stopped): New function,
	based on pid_is_stopped from both linux-nat.c and
	gdbserver/linux-low.c, and renamed.
2012-02-27 16:22:16 +00:00
Pedro Alves c14d7ab2b6 2012-02-27 Pedro Alves <palves@redhat.com>
PR server/9684
	* linux-low.c (pid_is_stopped): New.
	(linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
2012-02-27 16:19:19 +00:00
Luis Machado ebbbe5c5ed 2012-02-27 Luis Machado <lgustavo@codesourcery.com>
* gdb.base/save-bp.exp: Account for new condition evaluator output.
2012-02-27 13:22:59 +00:00
gdbadmin 0d8abe3096 *** empty log message *** 2012-02-27 00:00:33 +00:00
gdbadmin e369cdd48a *** empty log message *** 2012-02-26 00:00:32 +00:00
Luis Machado 412c89dd53 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
* mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
	of conditions.
2012-02-25 19:54:50 +00:00
Jan Kratochvil 6fe37d2340 gdb/doc/
* gdb.texinfo (Startup): Add option -ex description to the option -x
	description.
2012-02-25 13:54:25 +00:00
gdbadmin f9529f4b86 *** empty log message *** 2012-02-25 00:00:02 +00:00
Maciej W. Rozycki 283002cf5e * remote.c (remote_watchpoint_addr_within_range): New function.
(init_remote_ops): Use it.
2012-02-24 23:48:37 +00:00
Maciej W. Rozycki 9b3e86b1b6 * target.h (target_watchpoint_addr_within_range): Document macro. 2012-02-24 23:46:48 +00:00
Pedro Alves e36930bb63 2012-02-24 Pedro Alves <palves@redhat.com>
* stack.c (set_last_displayed_sal): Issue internal_error instead
	of warning, and issue it after clearing the last displayed sal.
2012-02-24 16:47:56 +00:00
Pedro Alves 883bc8d1cb 2012-02-24 Jan Kratochvil <jan.kratochvil@redhat.com>
Pedro Alves  <palves@redhat.com>

	* breakpoint.c (until_break_command): Install breakpoints after
	all frame manipulations.
2012-02-24 16:26:36 +00:00
Maciej W. Rozycki b745defe51 * linux-mips-low.c (mips_regmap): Correct the index of $f9. 2012-02-24 16:16:02 +00:00
Luis Machado 8d126d8a7a 2012-02-24 Luis Machado <lgustavo@codesourcery.com>
* gdb.base/cond-eval-mode.exp: New file.
2012-02-24 15:17:41 +00:00
Luis Machado 9f3a5c850e 2012-02-24 Luis Machado <lgustavo@codesourcery>
* server.c (handle_query): Advertise support for target-side
	breakpoint condition evaluation.
	(process_point_options): New function.
	(process_serial_event): When inserting a breakpoint, check for
	a target-side condition that should be evaluated.

	* mem-break.c: Include regcache.h and ax.h.
	(point_cond_list_t): New data structure.
	(breakpoint) <cond_list>: New field.
	(find_gdb_breakpoint_at): Make non-static.
	(delete_gdb_breakpoint_at): Clear any target-side
	conditions.
	(clear_gdb_breakpoint_conditions): New function.
	(add_condition_to_breakpoint): Likewise.
	(add_breakpoint_condition): Likewise.
	(gdb_condition_true_at_breakpoint): Likewise.
	(gdb_breakpoint_here): Return result directly instead
	of going through a local variable.

	* mem-break.h (find_gdb_breakpoint_at): New prototype.
	(clear_gdb_breakpoint_conditions): Likewise.
	(add_breakpoint_condition): Likewise.
	(gdb_condition_true_at_breakpoint): Likewise.

	* linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
	(need_step_over_p): Take target-side breakpoint condition into
	consideration.
2012-02-24 15:15:56 +00:00
Luis Machado 9f14eebc6a Add missing files from previous commit. 2012-02-24 15:14:47 +00:00
Luis Machado 5e1dc49674 2012-02-24 Luis Machado <lgustavo@codesourcery>
* server.h: Include tracepoint.h.
	(agent_mem_read, agent_get_trace_state_variable_value,
	agent_set_trace_state_variable_value,
	agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
	get_set_tsv_func_addr): New prototypes.

	* ax.h: New include file.
	* ax.c: New source file.

	* tracepoint.c: Include ax.h.
	(gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
	agent_expr, eval_result_type): Move to ax.h.
	(parse_agent_expr): Rename to ...
	(gdb_parse_agent_expr): ... this, make it non-static and move
	to ax.h.
	(unparse_agent_expr) Rename to ...
	(gdb_unparse_agent_expr): ... this, make it non-static and move
	to ax.h.
	(eval_agent_expr): Rename to ...
	(eval_tracepoint_agent_expr): ... this.
	(agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
	forward declarations.
	(add_tracepoint_action): Call gdb_parse_agent_expr (...).
	(agent_get_trace_state_variable_value): New function.
	(agent_set_trace_state_variable_value): New function.
	(cmd_qtdp): Call gdb_parse_agent_expr (...).
	(response_tracepoint): Call gdb_unparse_agent_expr (...).
	(do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
	(condition_true_at_tracepoint): Likewise.
	(parse_agent_expr): Rename to ...
	(gdb_parse_agent_expr): ... this and move to ax.c.
	(unparse_agent_expr): Rename to ...
	(gdb_unparse_agent_expr): ... this and move to ax.c.
	(gdb_agent_op_name): Move to ax.c.
	(eval_agent_expr): Rename to ...
	(gdb_eval_agent_expr): ... this, use regcache passed as parameter
	and move to ax.c.
	(eval_tracepoint_agent_expr): New function.
	(agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
	non-static.
	(current_insn_ptr, emit_error, struct bytecode_address): Move to
	ax.c.
	(emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
	emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
	emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
	emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
	emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
	emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
	emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
	emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
	(get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
	(compile_bytecodes): Remove forward declaration.
	(is_goto_target): Move to ax.c.
	(compile_bytecodes): Move to ax.c and call
	agent_get_trace_state_variable_value (...) and
	agent_set_trace_state_variable_value (...).

	* Makefile.in: Update ax.c and IPA dependencies.
2012-02-24 15:13:37 +00:00
Luis Machado b775012e84 2012-02-24 Luis Machado <lgustavo@codesourcery.com>
* remote.c (remote_supports_cond_breakpoints): New forward
	declaration.
	(remote_add_target_side_condition): New function.
	(remote_insert_breakpoint): Add target-side breakpoint
	conditional if supported.
	(remote_insert_hw_breakpoint): Likewise.
	(init_remote_ops): Set to_supports_evaluation_of_breakpoint_conditions
	hook.

	* target.c (update_current_target): Inherit
	to_supports_evaluation_of_breakpoint_conditions.
	Default to_supports_evaluation_of_breakpoint_conditions to return_zero.

	* target.h (struct target_ops)
	<to_supports_evaluation_of_breakpoint_conditions>: New field.
	(target_supports_evaluation_of_breakpoint_conditions): New #define.

	* breakpoint.c (get_first_locp_gte_addr): New forward declaration.
	(condition_evaluation_both, condition_evaluation_auto,
	condition_evaluation_host, condition_evaluation_target,
	condition_evaluation_enums, condition_evaluation_mode_1,
	condition_evaluation_mode): New	static globals.
	(translate_condition_evaluation_mode): New function.
	(breakpoint_condition_evaluation_mode): New function.
	(gdb_evaluates_breakpoint_condition_p): New function.
	(ALL_BP_LOCATIONS_AT_ADDR): New helper macro.
	(mark_breakpoint_modified): New function.
	(mark_breakpoint_location_modified): New function.
	(set_condition_evaluation_mode): New function.
	(show_condition_evaluation_mode): New function.
	(bp_location_compare_addrs): New function.
	(get_first_location_gte_addr): New helper function.
	(set_breakpoint_condition): Free condition bytecode if locations
	has become unconditional.  Call mark_breakpoint_modified (...).
	(condition_command): Call update_global_location_list (1) for
	breakpoints.
	(breakpoint_xfer_memory): Use is_breakpoint (...).
	(is_breakpoint): New function.
	(parse_cond_to_aexpr): New function.
	(build_target_condition_list): New function.
	(insert_bp_location): Handle target-side conditional
	breakpoints and call build_target_condition_list (...).
	(update_inserted_breakpoint_locations): New function.
	(insert_breakpoint_locations): Handle target-side conditional
	breakpoints.
	(bpstat_check_breakpoint_conditions): Add comment.
	(bp_condition_evaluator): New function.
	(bp_location_condition_evaluator): New function.
	(print_breakpoint_location): Print information on where the condition
	will be evaluated.
	(print_one_breakpoint_location): Likewise.
	(init_bp_location): Call mark_breakpoint_location_modified (...) for
	breakpoint location.
	(force_breakpoint_reinsertion): New functions.
	(update_global_location_list): Handle target-side breakpoint
	conditions.
	Reinsert locations that are already inserted if conditions have
	changed.
	(bp_location_dtor): Free agent expression bytecode.
	(disable_breakpoint): Call mark_breakpoint_modified (...).
	Call update_global_location_list (...) with parameter 1 for breakpoints.
	(disable_command): Call mark_breakpoint_location_modified (...).
	Call update_global_location_list (...) with parameter 1 for breakpoints.
	(enable_breakpoint_disp): Call mark_breakpoint_modified (...).
	(enable_command): mark_breakpoint_location_modified (...).
	(_initialize_breakpoint): Update documentation and add
	condition-evaluation breakpoint subcommand.

	* breakpoint.h: Include ax.h.
	(condition_list): New data structure.
	(condition_status): New enum.
	(bp_target_info) <cond_list>: New field.
	(bp_location) <condition_changed, cond_bytecode>: New fields.
	(is_breakpoint): New prototype.
2012-02-24 15:10:59 +00:00
Luis Machado 3788aec75a 2012-02-24 Luis Machado <lgustavo@codesourcery.com>
* remote.c (remote_state) <cond_breakpoints>: New field.
	(PACKET_ConditionalBreakpoints): New enum.
	(remote_cond_breakpoint_feature): New function.
	(remote_protocol_features): Add new ConditionalBreakpoints entry.
	(remote_supports_cond_breakpoints): New function.
	(_initialize_remote): Add new packet configuration for
	target-side conditional breakpoints.
2012-02-24 15:09:41 +00:00
Luis Machado 83364271df 2012-02-24 Luis Machado <lgustavo@codesourcery.com>
* gdb.texinfo (Setting Breakpoints): Mention and explain the
	condition-evaluation breakpoint parameter.
	Mention condition-evaluation mode being shown in "info break".
	(Break Conditions): Add description for target-side
	conditional breakpoints.
	(Remote Configuration): Mention conditional-breakpoints-packet.
	(Packets): Add cond-expr parameter to Z0/Z1 packets and explain
	cond-expr.
	(General Query Packets): Mention new ConditionalBreakpoint feature.
2012-02-24 15:08:18 +00:00
Luis Machado 72895ff684 2012-02-24 Luis Machado <lgustavo@codesourcery.com>
* NEWS: Mention target-side conditional breakpoint support,
	new condition-evaluation breakpoint subcommand and remote
	packet extensions.
2012-02-24 15:04:58 +00:00
Luis Machado dea2aa5f56 2012-02-24 Luis Machado <lgustavo@codesourcery.com>
* breakpoint.c (bp_location_compare): Sort by pspace before sorting by
	number.
2012-02-24 14:59:35 +00:00
Pedro Alves 277e4e5235 2012-02-24 Pedro Alves <palves@redhat.com>
* tracepoint.c (cmd_bigqtbuffer): Rename as ...
	(cmd_bigqtbuffer_circular): ... this.  Only handle
	'QTBuffer:circular:'.
	(handle_tracepoint_general_set): Adjust.
2012-02-24 14:46:48 +00:00
Pedro Alves 11337c2fed 2012-02-24 Pedro Alves <palves@redhat.com>
* gdb.base/break-interp.exp (test_ld): Use with_test_prefix.
	(top level): Use with_test_prefix.
2012-02-24 14:09:08 +00:00
Pedro Alves 13fc3e3cf9 2012-02-24 Pedro Alves <palves@redhat.com>
* gdb.threads/attach-into-signal.exp (corefunc): Use
	with_test_prefix.
2012-02-24 14:06:29 +00:00
Thomas Schwinge 8a8bc27fb3 * sh-tdep.c (sh_skip_prologue): Use skip_prologue_using_sal.
(after_prologue): Remove.
2012-02-24 11:00:07 +00:00
Jan Kratochvil 07c1b62689 gdb/testsuite/
Fix false FAILs on old CPUs without SSE.
	* gdb.reverse/i386-sse-reverse.exp (continue to end of sse_test):
	Return untested for Illegal instruction.
2012-02-24 00:40:01 +00:00
Jan Kratochvil 596ba13831 gdb/testsuite/
Fix false FAILs with glibc debug infos installed.
	* gdb.reverse/solib-precsave.exp (set debug-file-directory): New test.
	* gdb.reverse/solib-reverse.exp (set debug-file-directory): New test.
2012-02-24 00:05:56 +00:00
gdbadmin c1aed0593f *** empty log message *** 2012-02-24 00:00:02 +00:00
Tom Tromey 6b446fdfb3 * jv-valprint.c (java_val_print): Remove dead code. 2012-02-23 20:55:47 +00:00
Tristan Gingold ef59abfb0f 2012-02-23 Tristan Gingold <gingold@adacore.com>
* ada-tasks.c (struct ada_tasks_inferior_data): Add
        known_tasks_element and known_tasks_length fields.
        (read_known_tasks_array): Change argument type.  Use pointer type
        and number of elements from DATA.  Adjust.
        (read_known_tasks_list): Likewise.
        (get_known_tasks_addr): Remove.
        (ada_set_current_inferior_known_tasks_addr): Renamed to ...
        (ada_tasks_inferior_data_sniffer): ... this.  Use symtab for element
        type and array length.  Merge former get_known_tasks_addr code.
2012-02-23 11:15:06 +00:00
Jan Kratochvil def166f668 gdb/
PR backtrace/13716
	* infcmd.c (finish_forward): New variable frame_id, initialize it, use
	it after set_momentary_breakpoint.
2012-02-23 08:15:04 +00:00
gdbadmin 4f5c1eb4ba *** empty log message *** 2012-02-23 00:00:33 +00:00