Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Burgess <aburgess@redhat.com>
To: Markus Metzger <markus.t.metzger@intel.com>, gdb-patches@sourceware.org
Cc: pedro@palves.net
Subject: Re: [PATCH v5 0/4] PR gdb/31353
Date: Mon, 21 Oct 2024 10:13:46 +0100	[thread overview]
Message-ID: <87ldyhyg1h.fsf@redhat.com> (raw)
In-Reply-To: <20240410074613.54520-1-markus.t.metzger@intel.com>

Markus Metzger <markus.t.metzger@intel.com> writes:

> Reviving an old patch series that was first submitted in Jan'21.
>
> It fixes issues with breakpoints at the end of the execution history,
> including PR gdb/31353, which was submitted in the meantime.
>
> Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31353
>
> Guinevere Larsen reviewed most of the series and reported an issue with
> applying the last patch.  I'm resending the series, rebased on current
> master, to hopefully fix that issue.
>
> The only change to v4 is that a redundant forward declaration was removed.
>
> The changes are mostly in infrun and require global maintainer approval.
>
> Markus Metzger (4):
>   gdb, infrun, btrace: fix reverse/replay stepping at end of execution
>     history
>   gdb, infrun, record: fix hang when step-over fails with no-history
>   gdb, infrun, record: move no-history notification into normal_stop
>   gdb, infrun: fix multi-threaded reverse stepping
>
>  gdb/gdbthread.h                               | 13 +++
>  gdb/infrun.c                                  | 86 +++++++++++++-----
>  gdb/infrun.h                                  |  7 --
>  gdb/record-btrace.c                           | 19 ++--
>  gdb/testsuite/gdb.btrace/cont-hang.exp        | 43 +++++++++
>  .../gdb.btrace/implicit-stop-replaying.exp    | 90 +++++++++++++++++++
>  .../gdb.btrace/multi-thread-break-hang.exp    | 84 +++++++++++++++++
>  gdb/testsuite/gdb.btrace/step-hang.exp        | 42 +++++++++
>  gdb/testsuite/gdb.btrace/stepn.exp            | 50 +++++++++++

I built this series off current master, ran these tests and saw 6
unexpected failures:

  FAIL: gdb.btrace/stepn.exp: stepi: stepi 5
  FAIL: gdb.btrace/stepn.exp: step: step 5
  FAIL: gdb.btrace/stepn.exp: next: next 5
  FAIL: gdb.btrace/multi-thread-break-hang.exp: stepi.1
  FAIL: gdb.btrace/multi-thread-break-hang.exp: stepi.2
  FAIL: gdb.btrace/multi-thread-break-hang.exp: stepi.3

The full gdb.log is included below.  I'll hold off reviewing this series
and take a look at the other (for PR gdb/19340) for now.  If there's any
additional information you need to help debug the failures, please just
ask.

Thanks,
Andrew

---

Test run by andrew on Mon Oct 21 10:08:53 2024
Native configuration is x86_64-pc-linux-gnu

		=== gdb tests ===

Schedule of variations:
    unix

Running target unix
Using /home/andrew/.software/packages/dejagnu/1.6.3/share/dejagnu/baseboards/unix.exp as board description file for target.
Using /home/andrew/.software/packages/dejagnu/1.6.3/share/dejagnu/config/unix.exp as generic interface file for target.
Using /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/../../../src.dev-d/gdb/testsuite/config/unix.exp as tool-and-target-specific interface file.
Running /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/../../../src.dev-d/gdb/testsuite/gdb.btrace/stepn.exp ...
Executing on build: rm -rf /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/outputs/gdb.btrace/stepn    (timeout = 300)
builtin_spawn -ignore SIGHUP rm -rf /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/outputs/gdb.btrace/stepn
gdb_do_cache: allow_btrace_tests (  )
gdb_do_cache: universal_compile_options_c (  )
Executing on host: gcc    -fdiagnostics-color=never -c -o /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/temp/2224305/ccopts.o /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/temp/2224305/ccopts.c    (timeout = 300)
builtin_spawn -ignore SIGHUP gcc -fdiagnostics-color=never -c -o /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/temp/2224305/ccopts.o /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/temp/2224305/ccopts.c
get_compiler_info: gcc-9-3-1
Executing on host: gcc  -fno-stack-protector /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/temp/2224305/allow_btrace_tests.c  -fdiagnostics-color=never -w -g  -lm   -o /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/temp/2224305/allow_btrace_tests.x    (timeout = 300)
builtin_spawn -ignore SIGHUP gcc -fno-stack-protector /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/temp/2224305/allow_btrace_tests.c -fdiagnostics-color=never -w -g -lm -o /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/temp/2224305/allow_btrace_tests.x
builtin_spawn /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/../../gdb/gdb -nw -nx -q -iex set height 0 -iex set width 0 -data-directory /home/andrew/projects/binutils-gdb/build.dev-d/gdb/data-directory
(gdb) set height 0
(gdb) set width 0
(gdb) dir
Reinitialize source path to empty? (y or n) y
Source directories searched: $cdir:$cwd
(gdb) dir /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/../../../src.dev-d/gdb/testsuite/gdb.btrace
Source directories searched: /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/../../../src.dev-d/gdb/testsuite/gdb.btrace:$cdir:$cwd
(gdb) kill
The program is not being run.
(gdb) file /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/temp/2224305/allow_btrace_tests.x
Reading symbols from /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/temp/2224305/allow_btrace_tests.x...
(gdb) delete breakpoints
(gdb) info breakpoints
No breakpoints, watchpoints, tracepoints, or catchpoints.
(gdb) break -qualified main
Breakpoint 1 at 0x40110a: file /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/temp/2224305/allow_btrace_tests.c, line 1.
(gdb) run 
Starting program: /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/temp/2224305/allow_btrace_tests.x 

Breakpoint 1, main () at /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/temp/2224305/allow_btrace_tests.c:1
warning: 1	/home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/temp/2224305/allow_btrace_tests.c: No such file or directory
(gdb) record btrace
(gdb) gdb_caching_proc allow_btrace_tests caused gdb_exit to be called
  gdb_caching_proc allow_btrace_tests marked as called
  gdb_caching_proc universal_compile_options_c marked as called
gdb_do_cache: universal_compile_options_c (  )
Executing on host: gcc  -fno-stack-protector  -fdiagnostics-color=never -c -g  -o /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/outputs/gdb.btrace/stepn/stepn0.o /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/../../../src.dev-d/gdb/testsuite/gdb.btrace/record_goto.c    (timeout = 300)
builtin_spawn -ignore SIGHUP gcc -fno-stack-protector -fdiagnostics-color=never -c -g -o /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/outputs/gdb.btrace/stepn/stepn0.o /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/../../../src.dev-d/gdb/testsuite/gdb.btrace/record_goto.c
gdb_do_cache: universal_compile_options_c (  )
Executing on host: gcc  -fno-stack-protector /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/outputs/gdb.btrace/stepn/stepn0.o  -fdiagnostics-color=never -g  -lm   -o /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/outputs/gdb.btrace/stepn/stepn    (timeout = 300)
builtin_spawn -ignore SIGHUP gcc -fno-stack-protector /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/outputs/gdb.btrace/stepn/stepn0.o -fdiagnostics-color=never -g -lm -o /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/outputs/gdb.btrace/stepn/stepn
builtin_spawn /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/../../gdb/gdb -nw -nx -q -iex set height 0 -iex set width 0 -data-directory /home/andrew/projects/binutils-gdb/build.dev-d/gdb/data-directory
(gdb) set height 0
(gdb) set width 0
(gdb) dir
Reinitialize source path to empty? (y or n) y
Source directories searched: $cdir:$cwd
(gdb) dir /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/../../../src.dev-d/gdb/testsuite/gdb.btrace
Source directories searched: /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/../../../src.dev-d/gdb/testsuite/gdb.btrace:$cdir:$cwd
(gdb) kill
The program is not being run.
(gdb) file /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/outputs/gdb.btrace/stepn/stepn
Reading symbols from /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/outputs/gdb.btrace/stepn/stepn...
(gdb) delete breakpoints
(gdb) info breakpoints
No breakpoints, watchpoints, tracepoints, or catchpoints.
(gdb) break -qualified main
Breakpoint 1 at 0x401144: file /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/../../../src.dev-d/gdb/testsuite/gdb.btrace/record_goto.c, line 49.
(gdb) run 
Starting program: /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/outputs/gdb.btrace/stepn/stepn 

Breakpoint 1, main () at /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/../../../src.dev-d/gdb/testsuite/gdb.btrace/record_goto.c:49
49	  fun4 ();	/* main.2 */
(gdb) record btrace
(gdb) PASS: gdb.btrace/stepn.exp: record btrace
next
50	  return 0;	/* main.3 */
(gdb) PASS: gdb.btrace/stepn.exp: next
reverse-stepi
0x000000000040113f in fun4 () at /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/../../../src.dev-d/gdb/testsuite/gdb.btrace/record_goto.c:44
44	}		/* fun4.5 */
(gdb) PASS: gdb.btrace/stepn.exp: stepi: reverse-stepi
stepi 5

Reached end of recorded history; stopping.
Following forward execution will be added to history.
50	  return 0;	/* main.3 */
(gdb) FAIL: gdb.btrace/stepn.exp: stepi: stepi 5
reverse-step
fun4 () at /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/../../../src.dev-d/gdb/testsuite/gdb.btrace/record_goto.c:44
44	}		/* fun4.5 */
(gdb) PASS: gdb.btrace/stepn.exp: step: reverse-step
step 5

Reached end of recorded history; stopping.
Following forward execution will be added to history.
50	  return 0;	/* main.3 */
(gdb) FAIL: gdb.btrace/stepn.exp: step: step 5
reverse-next

Breakpoint 1, main () at /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/../../../src.dev-d/gdb/testsuite/gdb.btrace/record_goto.c:49
49	  fun4 ();	/* main.2 */
(gdb) PASS: gdb.btrace/stepn.exp: next: reverse-next
next 5

Reached end of recorded history; stopping.
Following forward execution will be added to history.
main () at /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/../../../src.dev-d/gdb/testsuite/gdb.btrace/record_goto.c:50
50	  return 0;	/* main.3 */
(gdb) FAIL: gdb.btrace/stepn.exp: next: next 5
testcase /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/../../../src.dev-d/gdb/testsuite/gdb.btrace/stepn.exp completed in 1 seconds
Running /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/../../../src.dev-d/gdb/testsuite/gdb.btrace/implicit-stop-replaying.exp ...
Executing on build: rm -rf /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/outputs/gdb.btrace/implicit-stop-replaying    (timeout = 300)
builtin_spawn -ignore SIGHUP rm -rf /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/outputs/gdb.btrace/implicit-stop-replaying
gdb_do_cache: allow_btrace_tests (  )
gdb_caching_proc allow_btrace_tests caused gdb_exit to be called
  gdb_caching_proc allow_btrace_tests marked as called
  gdb_caching_proc universal_compile_options_c marked as called
gdb_do_cache: universal_compile_options_c (  )
Executing on host: gcc  -fno-stack-protector  -fdiagnostics-color=never -c -g  -o /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/outputs/gdb.btrace/implicit-stop-replaying/implicit-stop-replaying0.o /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/../../../src.dev-d/gdb/testsuite/gdb.btrace/multi-thread-step.c    (timeout = 300)
builtin_spawn -ignore SIGHUP gcc -fno-stack-protector -fdiagnostics-color=never -c -g -o /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/outputs/gdb.btrace/implicit-stop-replaying/implicit-stop-replaying0.o /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/../../../src.dev-d/gdb/testsuite/gdb.btrace/multi-thread-step.c
gdb_do_cache: universal_compile_options_c (  )
Executing on host: gcc  -fno-stack-protector /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/outputs/gdb.btrace/implicit-stop-replaying/implicit-stop-replaying0.o  -fdiagnostics-color=never -g  -lpthreads -lm   -o /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/outputs/gdb.btrace/implicit-stop-replaying/implicit-stop-replaying    (timeout = 300)
builtin_spawn -ignore SIGHUP gcc -fno-stack-protector /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/outputs/gdb.btrace/implicit-stop-replaying/implicit-stop-replaying0.o -fdiagnostics-color=never -g -lpthreads -lm -o /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/outputs/gdb.btrace/implicit-stop-replaying/implicit-stop-replaying
/usr/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
compiler exited with status 1
output is:
/usr/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status

gdb_do_cache: universal_compile_options_c (  )
Executing on host: gcc  -fno-stack-protector /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/outputs/gdb.btrace/implicit-stop-replaying/implicit-stop-replaying0.o  -fdiagnostics-color=never -g  -lpthread -lm   -o /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/outputs/gdb.btrace/implicit-stop-replaying/implicit-stop-replaying    (timeout = 300)
builtin_spawn -ignore SIGHUP gcc -fno-stack-protector /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/outputs/gdb.btrace/implicit-stop-replaying/implicit-stop-replaying0.o -fdiagnostics-color=never -g -lpthread -lm -o /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/outputs/gdb.btrace/implicit-stop-replaying/implicit-stop-replaying
PASS: gdb.btrace/implicit-stop-replaying.exp: successfully compiled posix threads test case
builtin_spawn /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/../../gdb/gdb -nw -nx -q -iex set height 0 -iex set width 0 -data-directory /home/andrew/projects/binutils-gdb/build.dev-d/gdb/data-directory
(gdb) set height 0
(gdb) set width 0
(gdb) dir
Reinitialize source path to empty? (y or n) y
Source directories searched: $cdir:$cwd
(gdb) dir /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/../../../src.dev-d/gdb/testsuite/gdb.btrace
Source directories searched: /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/../../../src.dev-d/gdb/testsuite/gdb.btrace:$cdir:$cwd
(gdb) kill
The program is not being run.
(gdb) file /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/outputs/gdb.btrace/implicit-stop-replaying/implicit-stop-replaying
Reading symbols from /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/outputs/gdb.btrace/implicit-stop-replaying/implicit-stop-replaying...
(gdb) delete breakpoints
(gdb) info breakpoints
No breakpoints, watchpoints, tracepoints, or catchpoints.
(gdb) break -qualified main
Breakpoint 1 at 0x4011a8: file /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/../../../src.dev-d/gdb/testsuite/gdb.btrace/multi-thread-step.c, line 44.
(gdb) run 
Starting program: /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/outputs/gdb.btrace/implicit-stop-replaying/implicit-stop-replaying 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Breakpoint 1, main () at /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/../../../src.dev-d/gdb/testsuite/gdb.btrace/multi-thread-step.c:44
44	  pthread_barrier_init (&barrier, NULL, 2);
(gdb) break multi-thread-step.c:30
Breakpoint 2 at 0x40117c: file /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/../../../src.dev-d/gdb/testsuite/gdb.btrace/multi-thread-step.c, line 30.
(gdb) continue
Continuing.
[New Thread 0x7ffff7c5c700 (LWP 2224488)]
[Switching to Thread 0x7ffff7c5c700 (LWP 2224488)]

Thread 2 "implicit-stop-r" hit Breakpoint 2, test (arg=0x0) at /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/../../../src.dev-d/gdb/testsuite/gdb.btrace/multi-thread-step.c:30
30	  global = 42; /* bp.1 */
(gdb) PASS: gdb.btrace/implicit-stop-replaying.exp: continue to breakpoint: continue to bp.1
info threads
  Id   Target Id                                             Frame 
  1    Thread 0x7ffff7c5e100 (LWP 2224484) "implicit-stop-r" test (arg=0x0) at /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/../../../src.dev-d/gdb/testsuite/gdb.btrace/multi-thread-step.c:30
* 2    Thread 0x7ffff7c5c700 (LWP 2224488) "implicit-stop-r" test (arg=0x0) at /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/../../../src.dev-d/gdb/testsuite/gdb.btrace/multi-thread-step.c:30
(gdb) PASS: gdb.btrace/implicit-stop-replaying.exp: info threads
record btrace
(gdb) PASS: gdb.btrace/implicit-stop-replaying.exp: record btrace
delete breakpoints
Delete all breakpoints, watchpoints, tracepoints, and catchpoints? (y or n) y
(gdb) info breakpoints
No breakpoints, watchpoints, tracepoints, or catchpoints.
(gdb) break multi-thread-step.c:34
Breakpoint 3 at 0x401190: file /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/../../../src.dev-d/gdb/testsuite/gdb.btrace/multi-thread-step.c, line 34.
(gdb) continue
Continuing.

Thread 2 "implicit-stop-r" hit Breakpoint 3, test (arg=0x0) at /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/../../../src.dev-d/gdb/testsuite/gdb.btrace/multi-thread-step.c:34
34	  global = 42; /* bp.2 */
(gdb) PASS: gdb.btrace/implicit-stop-replaying.exp: continue to breakpoint: continue to bp.2
thread
[Current thread is 2 (Thread 0x7ffff7c5c700 (LWP 2224488))]
(gdb) set scheduler-locking replay
(gdb) PASS: gdb.btrace/implicit-stop-replaying.exp: set scheduler-locking replay
delete breakpoints
Delete all breakpoints, watchpoints, tracepoints, and catchpoints? (y or n) y
(gdb) info breakpoints
No breakpoints, watchpoints, tracepoints, or catchpoints.
(gdb) thread apply 1 reverse-stepi

Thread 1 (Thread 0x7ffff7c5e100 (LWP 2224484) "implicit-stop-r"):
0x00007ffff7f7f135 in pthread_barrier_wait () from /lib64/libpthread.so.0
(gdb) PASS: gdb.btrace/implicit-stop-replaying.exp: thread apply 1 reverse-stepi
thread apply 1 info record

Thread 1 (Thread 0x7ffff7c5e100 (LWP 2224484) "implicit-stop-r"):
Active record target: record-btrace
Recording format: Intel Processor Trace.
Buffer size: 16kB.
Recorded 70 instructions in 3 functions (0 gaps) for thread 1 (Thread 0x7ffff7c5e100 (LWP 2224484)).
Replay in progress.  At instruction 70.
(gdb) PASS: gdb.btrace/implicit-stop-replaying.exp: other thread is replaying
next
36	  return arg;
(gdb) PASS: gdb.btrace/implicit-stop-replaying.exp: next
thread apply 1 info record

Thread 1 (Thread 0x7ffff7c5e100 (LWP 2224484) "implicit-stop-r"):
Active record target: record-btrace
Recording format: Intel Processor Trace.
Buffer size: 16kB.
Recorded 825 instructions in 26 functions (0 gaps) for thread 1 (Thread 0x7ffff7c5e100 (LWP 2224484)).
(gdb) PASS: gdb.btrace/implicit-stop-replaying.exp: other thread stopped replaying
testcase /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/../../../src.dev-d/gdb/testsuite/gdb.btrace/implicit-stop-replaying.exp completed in 0 seconds
Running /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/../../../src.dev-d/gdb/testsuite/gdb.btrace/step-hang.exp ...
Executing on build: rm -rf /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/outputs/gdb.btrace/step-hang    (timeout = 300)
builtin_spawn -ignore SIGHUP rm -rf /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/outputs/gdb.btrace/step-hang
gdb_do_cache: allow_btrace_tests (  )
gdb_caching_proc allow_btrace_tests caused gdb_exit to be called
  gdb_caching_proc allow_btrace_tests marked as called
  gdb_caching_proc universal_compile_options_c marked as called
gdb_do_cache: universal_compile_options_c (  )
Executing on host: gcc  -fno-stack-protector  -fdiagnostics-color=never -c -g  -o /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/outputs/gdb.btrace/step-hang/step-hang0.o /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/../../../src.dev-d/gdb/testsuite/gdb.btrace/record_goto.c    (timeout = 300)
builtin_spawn -ignore SIGHUP gcc -fno-stack-protector -fdiagnostics-color=never -c -g -o /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/outputs/gdb.btrace/step-hang/step-hang0.o /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/../../../src.dev-d/gdb/testsuite/gdb.btrace/record_goto.c
gdb_do_cache: universal_compile_options_c (  )
Executing on host: gcc  -fno-stack-protector /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/outputs/gdb.btrace/step-hang/step-hang0.o  -fdiagnostics-color=never -g  -lm   -o /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/outputs/gdb.btrace/step-hang/step-hang    (timeout = 300)
builtin_spawn -ignore SIGHUP gcc -fno-stack-protector /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/outputs/gdb.btrace/step-hang/step-hang0.o -fdiagnostics-color=never -g -lm -o /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/outputs/gdb.btrace/step-hang/step-hang
builtin_spawn /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/../../gdb/gdb -nw -nx -q -iex set height 0 -iex set width 0 -data-directory /home/andrew/projects/binutils-gdb/build.dev-d/gdb/data-directory
(gdb) set height 0
(gdb) set width 0
(gdb) dir
Reinitialize source path to empty? (y or n) y
Source directories searched: $cdir:$cwd
(gdb) dir /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/../../../src.dev-d/gdb/testsuite/gdb.btrace
Source directories searched: /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/../../../src.dev-d/gdb/testsuite/gdb.btrace:$cdir:$cwd
(gdb) kill
The program is not being run.
(gdb) file /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/outputs/gdb.btrace/step-hang/step-hang
Reading symbols from /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/outputs/gdb.btrace/step-hang/step-hang...
(gdb) delete breakpoints
(gdb) info breakpoints
No breakpoints, watchpoints, tracepoints, or catchpoints.
(gdb) break -qualified main
Breakpoint 1 at 0x401144: file /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/../../../src.dev-d/gdb/testsuite/gdb.btrace/record_goto.c, line 49.
(gdb) run 
Starting program: /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/outputs/gdb.btrace/step-hang/step-hang 

Breakpoint 1, main () at /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/../../../src.dev-d/gdb/testsuite/gdb.btrace/record_goto.c:49
49	  fun4 ();	/* main.2 */
(gdb) record btrace
(gdb) PASS: gdb.btrace/step-hang.exp: record btrace
next
50	  return 0;	/* main.3 */
(gdb) PASS: gdb.btrace/step-hang.exp: next
reverse-stepi
0x000000000040113f in fun4 () at /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/../../../src.dev-d/gdb/testsuite/gdb.btrace/record_goto.c:44
44	}		/* fun4.5 */
(gdb) PASS: gdb.btrace/step-hang.exp: reverse-stepi
break
Breakpoint 2 at 0x40113f: file /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/../../../src.dev-d/gdb/testsuite/gdb.btrace/record_goto.c, line 44.
(gdb) PASS: gdb.btrace/step-hang.exp: break
step
main () at /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/../../../src.dev-d/gdb/testsuite/gdb.btrace/record_goto.c:50
50	  return 0;	/* main.3 */
(gdb) PASS: gdb.btrace/step-hang.exp: step
continue
Continuing.
[Inferior 1 (process 2224541) exited normally]
(gdb) PASS: gdb.btrace/step-hang.exp: continue until exit
testcase /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/../../../src.dev-d/gdb/testsuite/gdb.btrace/step-hang.exp completed in 1 seconds
Running /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/../../../src.dev-d/gdb/testsuite/gdb.btrace/multi-thread-break-hang.exp ...
Executing on build: rm -rf /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/outputs/gdb.btrace/multi-thread-break-hang    (timeout = 300)
builtin_spawn -ignore SIGHUP rm -rf /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/outputs/gdb.btrace/multi-thread-break-hang
gdb_do_cache: allow_btrace_tests (  )
gdb_caching_proc allow_btrace_tests caused gdb_exit to be called
  gdb_caching_proc allow_btrace_tests marked as called
  gdb_caching_proc universal_compile_options_c marked as called
gdb_do_cache: universal_compile_options_c (  )
Executing on host: gcc  -fno-stack-protector  -fdiagnostics-color=never -c -g  -o /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/outputs/gdb.btrace/multi-thread-break-hang/multi-thread-break-hang0.o /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/../../../src.dev-d/gdb/testsuite/gdb.btrace/multi-thread-step.c    (timeout = 300)
builtin_spawn -ignore SIGHUP gcc -fno-stack-protector -fdiagnostics-color=never -c -g -o /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/outputs/gdb.btrace/multi-thread-break-hang/multi-thread-break-hang0.o /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/../../../src.dev-d/gdb/testsuite/gdb.btrace/multi-thread-step.c
gdb_do_cache: universal_compile_options_c (  )
Executing on host: gcc  -fno-stack-protector /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/outputs/gdb.btrace/multi-thread-break-hang/multi-thread-break-hang0.o  -fdiagnostics-color=never -g  -lpthreads -lm   -o /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/outputs/gdb.btrace/multi-thread-break-hang/multi-thread-break-hang    (timeout = 300)
builtin_spawn -ignore SIGHUP gcc -fno-stack-protector /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/outputs/gdb.btrace/multi-thread-break-hang/multi-thread-break-hang0.o -fdiagnostics-color=never -g -lpthreads -lm -o /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/outputs/gdb.btrace/multi-thread-break-hang/multi-thread-break-hang
/usr/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
compiler exited with status 1
output is:
/usr/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status

gdb_do_cache: universal_compile_options_c (  )
Executing on host: gcc  -fno-stack-protector /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/outputs/gdb.btrace/multi-thread-break-hang/multi-thread-break-hang0.o  -fdiagnostics-color=never -g  -lpthread -lm   -o /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/outputs/gdb.btrace/multi-thread-break-hang/multi-thread-break-hang    (timeout = 300)
builtin_spawn -ignore SIGHUP gcc -fno-stack-protector /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/outputs/gdb.btrace/multi-thread-break-hang/multi-thread-break-hang0.o -fdiagnostics-color=never -g -lpthread -lm -o /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/outputs/gdb.btrace/multi-thread-break-hang/multi-thread-break-hang
PASS: gdb.btrace/multi-thread-break-hang.exp: successfully compiled posix threads test case
builtin_spawn /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/../../gdb/gdb -nw -nx -q -iex set height 0 -iex set width 0 -data-directory /home/andrew/projects/binutils-gdb/build.dev-d/gdb/data-directory
(gdb) set height 0
(gdb) set width 0
(gdb) dir
Reinitialize source path to empty? (y or n) y
Source directories searched: $cdir:$cwd
(gdb) dir /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/../../../src.dev-d/gdb/testsuite/gdb.btrace
Source directories searched: /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/../../../src.dev-d/gdb/testsuite/gdb.btrace:$cdir:$cwd
(gdb) kill
The program is not being run.
(gdb) file /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/outputs/gdb.btrace/multi-thread-break-hang/multi-thread-break-hang
Reading symbols from /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/outputs/gdb.btrace/multi-thread-break-hang/multi-thread-break-hang...
(gdb) delete breakpoints
(gdb) info breakpoints
No breakpoints, watchpoints, tracepoints, or catchpoints.
(gdb) break -qualified main
Breakpoint 1 at 0x4011a8: file /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/../../../src.dev-d/gdb/testsuite/gdb.btrace/multi-thread-step.c, line 44.
(gdb) run 
Starting program: /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/outputs/gdb.btrace/multi-thread-break-hang/multi-thread-break-hang 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Breakpoint 1, main () at /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/../../../src.dev-d/gdb/testsuite/gdb.btrace/multi-thread-step.c:44
44	  pthread_barrier_init (&barrier, NULL, 2);
(gdb) break multi-thread-step.c:30
Breakpoint 2 at 0x40117c: file /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/../../../src.dev-d/gdb/testsuite/gdb.btrace/multi-thread-step.c, line 30.
(gdb) continue
Continuing.
[New Thread 0x7ffff7c5c700 (LWP 2224606)]
[Switching to Thread 0x7ffff7c5c700 (LWP 2224606)]

Thread 2 "multi-thread-br" hit Breakpoint 2, test (arg=0x0) at /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/../../../src.dev-d/gdb/testsuite/gdb.btrace/multi-thread-step.c:30
30	  global = 42; /* bp.1 */
(gdb) PASS: gdb.btrace/multi-thread-break-hang.exp: continue to breakpoint: continue to bp.1
record btrace
(gdb) PASS: gdb.btrace/multi-thread-break-hang.exp: record btrace
delete breakpoints
Delete all breakpoints, watchpoints, tracepoints, and catchpoints? (y or n) y
(gdb) info breakpoints
No breakpoints, watchpoints, tracepoints, or catchpoints.
(gdb) break multi-thread-step.c:34
Breakpoint 3 at 0x401190: file /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/../../../src.dev-d/gdb/testsuite/gdb.btrace/multi-thread-step.c, line 34.
(gdb) continue
Continuing.

Thread 2 "multi-thread-br" hit Breakpoint 3, test (arg=0x0) at /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/../../../src.dev-d/gdb/testsuite/gdb.btrace/multi-thread-step.c:34
34	  global = 42; /* bp.2 */
(gdb) PASS: gdb.btrace/multi-thread-break-hang.exp: continue to breakpoint: continue to bp.2
print /d $_thread
$1 = 2
(gdb) PASS: gdb.btrace/multi-thread-break-hang.exp: get integer valueof "$_thread"
set scheduler-locking step
(gdb) PASS: gdb.btrace/multi-thread-break-hang.exp: set scheduler-locking step
thread apply 1 record goto begin

Thread 1 (Thread 0x7ffff7c5e100 (LWP 2224603) "multi-thread-br"):
#0  test (arg=<unavailable>) at /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/../../../src.dev-d/gdb/testsuite/gdb.btrace/multi-thread-step.c:30
30	  global = 42; /* bp.1 */
(gdb) PASS: gdb.btrace/multi-thread-break-hang.exp: thread apply 1 record goto begin
thread apply 1 info record

Thread 1 (Thread 0x7ffff7c5e100 (LWP 2224603) "multi-thread-br"):
Active record target: record-btrace
Recording format: Intel Processor Trace.
Buffer size: 16kB.
Recorded 70 instructions in 3 functions (0 gaps) for thread 1 (Thread 0x7ffff7c5e100 (LWP 2224603)).
Replay in progress.  At instruction 1.
(gdb) PASS: gdb.btrace/multi-thread-break-hang.exp: thread apply 1 info record
stepi

Reached end of recorded history; stopping.
Following forward execution will be added to history.
test (arg=0x0) at /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/../../../src.dev-d/gdb/testsuite/gdb.btrace/multi-thread-step.c:34
34	  global = 42; /* bp.2 */
(gdb) FAIL: gdb.btrace/multi-thread-break-hang.exp: stepi.1
stepi

Reached end of recorded history; stopping.
Following forward execution will be added to history.
test (arg=0x0) at /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/../../../src.dev-d/gdb/testsuite/gdb.btrace/multi-thread-step.c:34
34	  global = 42; /* bp.2 */
(gdb) FAIL: gdb.btrace/multi-thread-break-hang.exp: stepi.2
stepi

Reached end of recorded history; stopping.
Following forward execution will be added to history.
test (arg=0x0) at /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/../../../src.dev-d/gdb/testsuite/gdb.btrace/multi-thread-step.c:34
34	  global = 42; /* bp.2 */
(gdb) FAIL: gdb.btrace/multi-thread-break-hang.exp: stepi.3
testcase /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/../../../src.dev-d/gdb/testsuite/gdb.btrace/multi-thread-break-hang.exp completed in 1 seconds

		=== gdb Summary ===

# of expected passes		29
# of unexpected failures	6
Executing on host: /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/../../gdb/gdb -nw -nx -q -iex "set height 0" -iex "set width 0" -data-directory /home/andrew/projects/binutils-gdb/build.dev-d/gdb/data-directory --version    (timeout = 300)
builtin_spawn -ignore SIGHUP /home/andrew/projects/binutils-gdb/build.dev-d/gdb/testsuite/../../gdb/gdb -nw -nx -q -iex set height 0 -iex set width 0 -data-directory /home/andrew/projects/binutils-gdb/build.dev-d/gdb/data-directory --version
GNU gdb (GDB) 16.0.50.20241020-git
Copyright (C) 2024 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
/home/andrew/projects/binutils-gdb/build.dev-d/gdb/gdb version  16.0.50.20241020-git -nw -nx -q -iex "set height 0" -iex "set width 0" -data-directory /home/andrew/projects/binutils-gdb/build.dev-d/gdb/data-directory 

runtest completed at Mon Oct 21 10:08:56 2024


  parent reply	other threads:[~2024-10-21  9:14 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-10  7:46 Markus Metzger
2024-04-10  7:46 ` [PATCH v5 1/4] gdb, infrun, btrace: fix reverse/replay stepping at end of execution history Markus Metzger
2024-04-10  7:46 ` [PATCH v5 2/4] gdb, infrun, record: fix hang when step-over fails with no-history Markus Metzger
2024-04-10  7:46 ` [PATCH v5 3/4] gdb, infrun, record: move no-history notification into normal_stop Markus Metzger
2024-04-10  7:46 ` [PATCH v5 4/4] gdb, infrun: fix multi-threaded reverse stepping Markus Metzger
2024-04-12 19:50   ` Guinevere Larsen
2024-04-15  9:03     ` Metzger, Markus T
2024-04-15 12:44       ` Guinevere Larsen
2024-05-03  5:26 ` [PING] [PATCH v5 0/4] PR gdb/31353 Metzger, Markus T
2024-06-07  5:06   ` [PING v2] " Metzger, Markus T
2024-06-27 19:12     ` Guinevere Larsen
2024-09-13 10:43       ` [PING v3] " Metzger, Markus T
2024-10-09 14:10         ` [PING v4] " Metzger, Markus T
2024-10-21  8:45 ` Andrew Burgess
2024-10-21  9:13 ` Andrew Burgess [this message]
2024-10-21  9:46   ` Metzger, Markus T

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ldyhyg1h.fsf@redhat.com \
    --to=aburgess@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=markus.t.metzger@intel.com \
    --cc=pedro@palves.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox