• R/O
  • HTTP
  • SSH
  • HTTPS

Listed des commits

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GNU Binutils with patches for OS216


users/mmetzger/record-goto-mi
RSS
Révision l'heure Auteur
31d025c users/mmetzger/record-goto-mi 2016-07-06 15:31:22 Markus Metzger

btrace: record stop moves to the end of the trace

With the btrace record target the "record stop" command implicitly moves all
traced threads to the end of their respective history. Unlike record full,
record btrace does not trace data and is therefore not able to resume debugging
at the current replay position.

We forgot to actually change the replay position before disabling tracing. This
resulted in STOP_PC remaining at its old position if the current thread had been
replaying, which, in turn, resulted in GDB commands such as list or backtrace
using the wrong context.

Fix it by moving the selected thread to the end of its recorded history.
Together with the preceding patches, this will result in a front-end
notification for the selected thread if it had been replaying. Stop replaying
other threads silently, i.e. without a front-end notification.

If the selected thread isn't replaying, notify front-ends without printing the
(unchanged) frame. This results in a *stopped MI notification without any
thread information.

In non-stop mode, move all replaying threads to the end of their respective
histories. This will result in a front-end notification and in the updated
location to be printed for each replaying thread. We prefix the output with
the thread number like this:

(gdb) record stop
Thread 1 (Thread 0x7ffff7fcc740 (LWP 66711)) stopped replaying.
test (arg=0x0) at gdb.btrace/multi-thread-step.c:34
34 global = 42; /* bp.2 */
Thread 2 (Thread 0x7ffff74fb700 (LWP 66716)) stopped replaying.
test (arg=0x0) at gdb.btrace/multi-thread-step.c:34
34 global = 42; /* bp.2 */
Process record is stopped and all execution logs are deleted.

Thanks to Marc Khouzam <marc.khouzam@ericsson.com> for reporting this.

Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>

gdb/
* record-btrace.c (record_btrace_set_replay)
(record_btrace_stop_replaying): New declaration.
(record_btrace_stop_recording): Call record_btrace_set_replay,
record_btrace_stop_replaying, and observer_notify_normal_stop.

testsuite/
* gdb.btrace/non-stop.exp: Test "record stop".
* gdb.btrace/non-stop.c (test): Add statement to break at.
* gdb.btrace/stop.exp: New.

Change-Id: I10565a8e4f8bc3c63f79c3ef6595e9f84e3d8100

8c62f01 2016-07-06 15:31:22 Markus Metzger

btrace-btrace: signal record-goto stop

When changing a thread's replay position, call record_signal_goto_stop instead
of printing the source location directly. This will signal the stop to
front-ends and have them print the source location.

We update the STOP_PC if the change affects the selected thread.

Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>

gdb/
* record-btrace.c (record_btrace_set_replay): Check ptid before updating
STOP_PC. Call record_signal_goto_stop.

Change-Id: If2cb2b9572396a2e5475d6611c7e9f79547c6f61

8e1542c 2016-07-06 15:31:22 Markus Metzger

record-full: signal record-goto stop

When changing the replay position call record_signal_goto_stop instead of
printing the new source location directly. This will signal the stop to
front-ends and have them print the source location.

Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>

gdb/
* record-full.c (record_full_goto_entry): Call record_signal_goto_stop.

testsuite/
* gdb.mi/mi-reverse.exp: Test record goto begin/end.

Change-Id: Ibae2736eb0cd3c70ba7d99d18836575eb0d23f33

8cca3e1 2016-07-06 15:31:21 Markus Metzger

mi, testsuite: add another EXTRA option to mi_expect_stop

Allow the EXTRA argument of mi_expect_stop to contain a third pattern that must
occur directly before the GDB prompt at the end of the output.

Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>

testsuite/
* lib/mi-support.exp (mi_expect_stop): Add third EXTRA field.

Change-Id: I7b492b72619265ea81200935adf22d94bb086806

41af4a2 2016-07-06 15:31:21 Markus Metzger

record: signal a record goto stop to front-ends

The "record goto" command does not indicate the stop to front-ends. Instead,
it prints the new location directly.

Add a function to signal a normal stop to observers and have them print the new
location. This function temporarily switches to the stopped thread.

We use the TARGET_WAITKIND_NO_RESUMED wait status for this purpose. This should
result in a stop notification without giving a stop reason. We could also
invent a new wait status but this doesn't seem necessary at this point.

Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>

gdb/
* record.h (record_signal_goto_stop): New.
* record.c (record_signal_goto_stop): New.

Change-Id: I0b196be68779f9e81abca78df5bc39e917023581

037ca1a 2016-07-06 15:31:21 Markus Metzger

infrun: export clear_proceed_status_thread

Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>

gdb/
* infrun.h (clear_proceed_status_thread): New.
* infrun.c (clear_proceed_status_thread): Export.

Change-Id: I23e762997359b9769856450e89626707bad1365e

b323ffa 2016-07-06 15:31:20 Markus Metzger

record: do not allow record goto on a running thread

We can't start replaying if the selected thread is currently running. Throw an
error in this case.

Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>

gdb/
* record.c: Include gdbthread.h
(require_not_running): New.
(record_goto, cmd_record_goto_begin, cmd_record_goto_end): Call
require_not_running.

Change-Id: I15888d668b6011217337cf3a63d3618fb044c023

e0139aa 2016-07-06 15:31:20 Markus Metzger

btrace: check if we're replaying when setting the replay position to the end

When setting the replay position to the end there is nothing to do if we are
not replaying. Check that and return immediately.

This avoids printing the current location if we're already at the end.

Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>

gdb/
* record-btrace.c (record_btrace_set_replay): Check if replaying.

testsuite/
* gdb.btrace/record_goto.exp: Test "record goto end" twice.

Change-Id: I4878892408bab293261bbea40d6af28440ff3ec5

42d9401 2016-07-06 14:26:21 Manish Goregaokar

Allow subscripting raw pointers

This will be useful for dealing with vectors; regardless of our final solution
for the Index trait.

2016-07-06 Manish Goregaokar <manish@mozilla.com>

gdb/ChangeLog:
* rust-lang.c (rust_subscript): Allow subscripting pointers

gdb/testsuite/ChangeLog:
* simple.rs: Add test for raw pointer subscripting
* simple.exp: Add test expectations

6949d8a 2016-07-06 09:00:20 GDB Administrator

Automatic date update in version.in

29d7478 2016-07-05 23:35:52 H.J. Lu

Add -flto to PR ld/20321 test

Before GCC 4.9, -flto is required for final LTO link. Add -flto to PR
ld/20321 test to support older versions of GCC.

* testsuite/ld-plugin/lto.exp: Add -flto to PR ld/20321 test.

647c264 2016-07-05 22:48:07 Yao Qi

Fix fail in gdb.mi/mi-reverse.exp

Commit 38b022b4452f996fb5a8598f80d850b594621bcf adds "method" and
"format" fields in =record-started, but doesn't update test case
gdb.mi/mi-reverse.exp, so it causes the fail like this,

PASS: gdb.mi/mi-reverse.exp: mi runto main
Expecting: ^(-interpreter-exec console record[^M
]+)?(=record-started,thread-group="i1"^M
\^done[^M
]+[(]gdb[)] ^M
[ ]*)
-interpreter-exec console record^M
=record-started,thread-group="i1",method="full"^M
^done^M
(gdb) ^M
FAIL: gdb.mi/mi-reverse.exp: Turn on process record

and regression was found by buildbot too
https://sourceware.org/ml/gdb-testers/2016-q2/msg04492.html

gdb/testsuite:

2016-07-05 Yao Qi <yao.qi@linaro.org>

* gdb.mi/mi-reverse.exp: Match =record-started output.

d5a67c0 2016-07-05 19:39:06 Andre Vieria

[ARM] Purecode compatible long branch veneer for M-profile targets with MOVW.

2016-07-05 Andre Vieria <andre.simoesdiasvieira@arm.com>

* elf32-arm.c (THUMB32_MOVT): New veneer macro.
(THUMB32_MOVW): Likewise.
(elf32_arm_stub_long_branch_thumb2_only_pure): New.
(DEF_STUBS): Define long_branch_thumb2_only_pure.
(arm_stub_is_thumb): Add new veneer stub.
(arm_type_of_stub): Use new veneer.
(arm_stub_required_alignment): Add new veneer.

2016-07-05 Andre Vieria <andre.simoesdiasvieira@arm.com>

* testsuite/ld-arm/farcall-thumb2-purecode.d: New test result.
* testsuite/ld-arm/farcall-thumb2-purecode.s: New test.
* testsuite/ld-arm/arm-elf.exp: Run it.

f0728ee 2016-07-05 19:28:46 Andre Vieria

[ARM] Change noread to purecode.

bfd/ChangeLog
2016-07-05 Andre Vieria <andre.simoesdiasvieira@arm.com>

* bfd-in2.h (SEC_ELF_NOREAD): Rename to ...
(SEC_ELF_PURECODE): ... this.
* elf32-arm.c (elf32_arm_post_process_headers): Rename SEC_ELF_NOREAD
to SEC_ELF_NOREAD.
(elf32_arm_fake_sections): Likewise.
(elf_32_arm_section_flags): Likewise.
(elf_32_arm_lookup_section_flags): Likewise.
* section.c (SEC_ELF_NOREAD): Rename to ...
(SEC_ELF_PURECODE): ... this.

binutils/ChangeLog
2016-07-05 Andre Vieria <andre.simoesdiasvieira@arm.com>

* objdump.c (dump_section_header): Rename SEC_ELF_NOREAD
to SEC_ELF_NOREAD.
* readelf.c (get_elf_section_flags): Rename ARM_NOREAD to
ARM_PURECODE and SHF_ARM_NOREAD to SHF_ARM_PURECODE.
(process_section_headers): Rename noread to purecode.

* section.c (SEC_ELF_NOREAD): Rename to ...
(SEC_ELF_PURECODE): ... this.

include/ChangeLog
2016-07-05 Andre Vieria <andre.simoesdiasvieira@arm.com>

* elf/arm.h (SHF_ARM_NOREAD): Rename to ...
(SHF_ARM_PURECODE): ... this.

ld/ChangeLog
2016-07-05 Andre Vieria <andre.simoesdiasvieira@arm.com>

* testsuite/ld-arm/arm_noread.ld: Renamed to ...
testsuite/ld-arm/arm_purecode.ld: ... this, and replaced
all noread's by purecode.

1753ed6 2016-07-05 18:36:08 Jan Beulich

ld: track linker-definedness of symbols

Keep "lineno" as zero while not processing any script, and use it being
zero to set the "linker_def" field to true.

33d0ab9 2016-07-05 18:14:51 Jan Beulich

x86: fix register check in check_qword_reg()

A missing 'r' (or wrong 'e') register prefix needs to be complained
about if the template allows for a 64-bit register, not a 32-bit one.
I assume this was a copy-and-paste type of mistake
(from check_long_reg()).

13cdc2a 2016-07-05 17:48:25 Jan Kratochvil

babeltrace compilation regression

Since:
commit 2d681be471cf8aff8f296cb7713c39e9aa4fc2bb
Author: Andreas Arnez <arnez@linux.vnet.ibm.com>
Date: Wed Apr 27 15:52:16 2016 +0200
Avoid non-C++-enabled babeltrace versions
tested with:
libbabeltrace-devel-1.2.4-4.fc24.x86_64
libbabeltrace-devel-1.4.0-2.fc25.x86_64
it can no longer build due to:
configure:16435: gcc -o conftest -m64 -g3 -pipe -Wall -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -fno-diagno
stics-show-caret -Werror -static-libstdc++ -static-libgcc conftest.c -ldl -ldl -lncurses -lm -ldl -lbabeltrace -lbabeltrace-ctf >&5
conftest.c: In function 'main':
conftest.c:208:7: error: 'pos' is a pointer; did you mean to use '->'?

gdb/ChangeLog
2016-07-05 Jan Kratochvil <jan.kratochvil@redhat.com>

* configure: Regenerate.
* configure.ac (HAVE_LIBBABELTRACE): Fix pos variable dereference.

0a2f0f5 2016-07-05 09:00:21 GDB Administrator

Automatic date update in version.in

c3e1c28 2016-07-05 00:55:20 H.J. Lu

Warn and return for duplicated plugin

If a plugin has been loaded already, we should warn and return, instead
of adding it on the plugin list.

PR ld/20321
* plugin.c (plugin_opt_plugin): Warn and return if plugin has
been loaded already.
* testsuite/ld-plugin/lto.exp: Run PR ld/20321 test.
* testsuite/ld-plugin/pr20321.c: New file.

1dc8bf1 2016-07-04 23:44:10 Nick Clifton

Allow the flash and ram memory region sizes to be specified in the default FT32 linker script.

* scripttempl/ft32.sc (__PMSIZE_): If not defined, set to 256K.
(__RAMSIZE): If not defined, set to 64K.
(MEMORY): Set the flash region size to __PMSIZE and the ram region
size to __RAMSIZE.

bb44634 2016-07-04 09:00:15 GDB Administrator

Automatic date update in version.in

1ceb374 2016-07-03 09:00:21 GDB Administrator

Automatic date update in version.in

fcedb9f 2016-07-03 07:41:31 Maciej W. Rozycki

MIPS/GAS/testsuite: Remove remnants of a.out/ECOFF support

Complement:

commit 16e5e222b6eae6f110ea72bf627585c095a453a8
Author: Richard Sandiford <rdsandiford@googlemail.com>
Date: Sat Jun 22 16:57:42 2013 +0000

<https://sourceware.org/ml/binutils/2013-06/msg00195.html>, ("Make
gas/mips/mips.exp ELF-only"), and remove the remaining stale ECOFF test
dumps and pieces of a.out/ECOFF support in relocation match patterns.

gas/
* testsuite/gas/mips/ecoff@ld.d: Remove test.
* testsuite/gas/mips/ecoff@ld-forward.d: Remove test.
* testsuite/gas/mips/ecoff@ld-zero-3.d: Remove test.
* testsuite/gas/mips/ecoff@sd.d: Remove test.
* testsuite/gas/mips/ecoff@sd-forward.d: Remove test.
* testsuite/gas/mips/beq.d: Remove a.out and ECOFF support from
reloc patterns.
* testsuite/gas/mips/mipsr6@beq.d: Likewise.
* testsuite/gas/mips/bge.d: Likewise.
* testsuite/gas/mips/mipsr6@bge.d: Likewise.
* testsuite/gas/mips/bgeu.d: Likewise.
* testsuite/gas/mips/mipsr6@bgeu.d: Likewise.
* testsuite/gas/mips/blt.d: Likewise.
* testsuite/gas/mips/mipsr6@blt.d: Likewise.
* testsuite/gas/mips/bltu.d: Likewise.
* testsuite/gas/mips/mipsr6@bltu.d: Likewise.
* testsuite/gas/mips/branch-likely.d: Likewise.
* testsuite/gas/mips/la.d: Likewise.
* testsuite/gas/mips/lb.d: Likewise.
* testsuite/gas/mips/lifloat.d: Likewise.
* testsuite/gas/mips/sb.d: Likewise.
* testsuite/gas/mips/uld.d: Likewise.
* testsuite/gas/mips/ulh.d: Likewise.
* testsuite/gas/mips/ulw.d: Likewise.
* testsuite/gas/mips/usd.d: Likewise.
* testsuite/gas/mips/ush.d: Likewise.
* testsuite/gas/mips/usw.d: Likewise.

6f50d61 2016-07-03 07:16:41 Maciej W. Rozycki

MIPS/LD/testsuite: Resurrect `branch-misc-2' test

Revert:

commit c9c1e416d7dd1a35bd7c1a96d034dca1d5071cd1
Author: Alexandre Oliva <aoliva@redhat.com>
Date: Thu Dec 12 04:39:44 2002 +0000

<https://sourceware.org/ml/binutils/2002-11/msg00657.html>, ("mips:
branches to external labels are broken"), complementing:

commit bad36eacdad37042c4efb1c5fbf48476b47de82b
Author: Daniel Jacobowitz <drow@false.org>
Date: Wed Nov 23 14:04:18 2005 +0000

<https://sourceware.org/ml/binutils/2005-11/msg00324.html>,
("R_MIPS_PC16, again").

ld/
* testsuite/ld-mips-elf/branch-misc-2.d: New test.
* testsuite/ld-mips-elf/mips-elf.exp: Run it.

00437d3 2016-07-03 07:10:10 Maciej W. Rozycki

MIPS/GAS/testsuite: Split `branch-misc-2' tests into two

Move `branch-misc-2' tests for non locally-defined-global symbols into
separate files. These tests have been introduced with:

commit 6f171daac941741e5fa904f6e462adb75a595495
Author: Alexandre Oliva <aoliva@redhat.com>
Date: Thu Dec 12 04:40:22 2002 +0000

<https://sourceware.org/ml/binutils/2002-11/msg00631.html>, ("mips:
branches to external labels are broken"), and:

commit d17b874b6c14caa2f2ed1b5544a48de9f39a1a65
Author: Alexandre Oliva <aoliva@redhat.com>
Date: Wed Mar 12 23:07:22 2003 +0000

<https://sourceware.org/ml/binutils/2003-03/msg00136.html>, ("On
resolving the MIPS gas branch reloc issue"), while the test case served
a different purpose. With the original intent of the test case brought
back with:

commit bad36eacdad37042c4efb1c5fbf48476b47de82b
Author: Daniel Jacobowitz <drow@false.org>
Date: Wed Nov 23 14:04:18 2005 +0000

<https://sourceware.org/ml/binutils/2005-11/msg00324.html>,
("R_MIPS_PC16, again"), these stand in the way for linker testing.

gas/
* testsuite/gas/mips/branch-misc-2.s: Move non
locally-defined-global symbol tests...
* testsuite/gas/mips/branch-misc-5.s: ... to this new test.
* testsuite/gas/mips/branch-misc-2.d: Update accordingly.
* testsuite/gas/mips/branch-misc-2-64.d: Likewise.
* testsuite/gas/mips/branch-misc-2pic.d: Likewise.
* testsuite/gas/mips/branch-misc-2pic-64.d: Likewise.
* testsuite/gas/mips/mipsr6@branch-misc-2-64.d: Likewise.
* testsuite/gas/mips/mipsr6@branch-misc-2pic-64.d: Likewise.
* testsuite/gas/mips/micromips@branch-misc-2.d: Likewise.
* testsuite/gas/mips/micromips@branch-misc-2-64.d: Likewise.
* testsuite/gas/mips/micromips@branch-misc-2pic.d: Likewise.
* testsuite/gas/mips/micromips@branch-misc-2pic-64.d: Likewise.
* testsuite/gas/mips/branch-misc-5.d: New test.
* testsuite/gas/mips/branch-misc-5pic.d: New test.
* testsuite/gas/mips/branch-misc-5-64.d: New test.
* testsuite/gas/mips/branch-misc-5pic-64.d: New test.
* testsuite/gas/mips/mipsr6@branch-misc-5-64.d: New test.
* testsuite/gas/mips/mipsr6@branch-misc-5pic-64.d: New test.
* testsuite/gas/mips/micromips@branch-misc-5.d: New test.
* testsuite/gas/mips/micromips@branch-misc-5pic.d: New test.
* testsuite/gas/mips/micromips@branch-misc-5-64.d: New test.
* testsuite/gas/mips/micromips@branch-misc-5pic-64.d: New test.
* testsuite/gas/mips/mips.exp: Run the new tests.

f26c9c2 2016-07-03 06:38:06 Maciej W. Rozycki

MIPS/GAS/testsuite: Reenable disabled external BEQ tests

Complement:

commit bad36eacdad37042c4efb1c5fbf48476b47de82b
Author: Daniel Jacobowitz <drow@false.org>
Date: Wed Nov 23 14:04:18 2005 +0000

<https://sourceware.org/ml/binutils/2005-11/msg00324.html>,
("R_MIPS_PC16, again"), and reenable external BEQ tests, the remaining
subset missed from the set of branch tests previously disabled with:

commit 6f171daac941741e5fa904f6e462adb75a595495
Author: Alexandre Oliva <aoliva@redhat.com>
Date: Thu Dec 12 04:40:22 2002 +0000

<https://sourceware.org/ml/binutils/2002-11/msg00631.html>, ("mips:
branches to external labels are broken").

gas/
* testsuite/gas/mips/beq.s: Uncomment branches to undefined
symbols.
* testsuite/gas/mips/beq.d: Update accordingly.
* testsuite/gas/mips/mipsr6@beq.d: Likewise.
* testsuite/gas/mips/micromips@beq.d: Likewise.

d7f20d6 2016-07-03 06:15:43 Maciej W. Rozycki

MIPS/GAS/testsuite: Restrict 64-bit `branch-mips' tests to NewABI targets

... removing numerous `mips-sgi-irix5' failures.

gas/
* testsuite/gas/mips/mips.exp: Restrict 64-bit `branch-mips'
tests to NewABI targets.

e51af15 2016-07-03 06:11:36 Maciej W. Rozycki

MIPS/GAS/testsuite: Group `branch-misc' tests together

gas/
* testsuite/gas/mips/mips.exp: Group `branch-misc' tests
together.

9361a47 2016-07-02 09:00:22 GDB Administrator

Automatic date update in version.in

09c98b4 2016-07-02 03:13:48 Don Breazeal

Optimize memory_xfer_partial for remote

Some analysis we did here showed that increasing the cap on the
transfer size in target.c:memory_xfer_partial could give 20% or more
improvement in remote load across JTAG. Transfer sizes were capped
to 4K bytes because of performance problems encountered with the
restore command, documented here:

https://sourceware.org/ml/gdb-patches/2013-07/msg00611.html

and in commit 67c059c29e1f ("Improve performance of large restore
commands").

The 4K cap was introduced because in a case where the restore command
requested a 100MB transfer, memory_xfer_partial would repeatedy
allocate and copy an entire 100MB buffer in order to properly handle
breakpoint shadow instructions, even though memory_xfer_partial would
actually only write a small portion of the buffer contents.

A couple of alternative solutions were suggested:
* change the algorithm for handling the breakpoint shadow instructions
* throttle the transfer size up or down based on the previous actual
transfer size

I tried implementing the throttling approach, and my implementation
reduced the performance in some cases.

This patch implements a new target function that returns that target's
limit on memory transfer size. It defaults to ULONGEST_MAX bytes,
because for native targets there is no marshaling and thus no limit is
needed. For remote targets it uses get_memory_write_packet_size.

gdb/ChangeLog:

* remote.c (remote_get_memory_xfer_limit): New function.
* target-delegates.c: Regenerate.
* target.c (memory_xfer_partial): Call
target_ops.to_get_memory_xfer_limit.
* target.h (struct target_ops)
<to_get_memory_xfer_limit>: New member.