Commit Graph

112693 Commits

Author SHA1 Message Date
GDB Administrator
e47557f55c Automatic date update in version.in 2023-07-25 00:00:50 +00:00
GDB Administrator
956379bd5d Automatic date update in version.in 2023-07-24 00:00:35 +00:00
GDB Administrator
cdf40f6d79 Automatic date update in version.in 2023-07-23 00:00:36 +00:00
GDB Administrator
59860121f3 Automatic date update in version.in 2023-07-22 00:00:45 +00:00
GDB Administrator
e1a7373f7e Automatic date update in version.in 2023-07-21 00:00:52 +00:00
GDB Administrator
3d060cfef2 Automatic date update in version.in 2023-07-20 00:01:23 +00:00
GDB Administrator
f6cfc86921 Automatic date update in version.in 2023-07-19 00:00:46 +00:00
GDB Administrator
012e279a71 Automatic date update in version.in 2023-07-18 00:00:51 +00:00
GDB Administrator
0c3ca1c932 Automatic date update in version.in 2023-07-17 00:00:42 +00:00
GDB Administrator
e64c9efec2 Automatic date update in version.in 2023-07-16 00:00:23 +00:00
GDB Administrator
44f7a89790 Automatic date update in version.in 2023-07-15 00:00:42 +00:00
GDB Administrator
ed9b279b6d Automatic date update in version.in 2023-07-14 00:01:02 +00:00
GDB Administrator
43088c5bc7 Automatic date update in version.in 2023-07-13 00:00:45 +00:00
GDB Administrator
5fe5f0dd90 Automatic date update in version.in 2023-07-12 00:00:49 +00:00
GDB Administrator
59aeaa40d5 Automatic date update in version.in 2023-07-11 00:00:33 +00:00
GDB Administrator
8cf7d4dbec Automatic date update in version.in 2023-07-10 00:00:27 +00:00
GDB Administrator
a9fc7c4837 Automatic date update in version.in 2023-07-09 00:00:32 +00:00
GDB Administrator
f069be5512 Automatic date update in version.in 2023-07-08 00:00:36 +00:00
GDB Administrator
854f46b637 Automatic date update in version.in 2023-07-07 00:00:53 +00:00
Pedro Alves
dfe07f10de Fix Solaris regression (PR tdep/30252)
PR tdep/30252 reports that using GDB on Solaris fails an assertion in
target_resume:

 target.c:2648: internal-error: target_resume: Assertion `inferior_ptid != null_ptid' failed.
 A problem internal to GDB has been detected,
 further debugging may prove unreliable.
 Quit this debugging session? (y or n)

The backtrace, after running it through c++filt, looks like:

 ----- Backtrace -----
 0xa18914 gdb_internal_backtrace_1
	 /root/binutils-gdb/gdb/bt-utils.c:122
 0xa18914 gdb_internal_backtrace()
	 /root/binutils-gdb/gdb/bt-utils.c:168
 0xdec834 internal_vproblem
	 /root/binutils-gdb/gdb/utils.c:401
 0xdecad8 internal_verror(char const*, int, char const*, __va_list_tag*)
	 /root/binutils-gdb/gdb/utils.c:481
 0xf3638c internal_error_loc(char const*, int, char const*, ...)
	 /root/binutils-gdb/gdbsupport/errors.cc:58
 0xd70580 target_resume(ptid_t, int, gdb_signal)
	 /root/binutils-gdb/gdb/target.c:2648
 0xc59e85 procfs_target::wait(ptid_t, target_waitstatus*, enum_flags<target_wait_flag>)
	 /root/binutils-gdb/gdb/procfs.c:2187
 0xcf6da7 sol_thread_target::wait(ptid_t, target_waitstatus*, enum_flags<target_wait_flag>)
	 /root/binutils-gdb/gdb/sol-thread.c:442
 0xd73711 target_wait(ptid_t, target_waitstatus*, enum_flags<target_wait_flag>)
	 /root/binutils-gdb/gdb/target.c:2586
 ...

The problem is that the procfs backend, while inside target_wait,
called target_resume without switching to the leader thread of that
resumption.

The target_resume interface is:

 /* Resume execution (or prepare for execution) of the current thread
    (INFERIOR_PTID), while optionally letting other threads of the
    current process or all processes run free.
    ...

Thus calling target_resume with inferior_ptid == null_ptid is bogus.

target_wait (which leads to procfs_target::wait on Solaris) is called
with inferior_ptid == null_ptid on entry exactly to help catch such
bogus uses.

From the backtrace, it seems that the relevant line in question is
procfs.c:2187:

2186  /* How to keep going without returning to wfi: */
2187  target_continue_no_signal (ptid);
2188  goto wait_again;

target_continue_no_signal is a small wrapper around target_resume,
which would make sense.

The fix is to not call target_resume or go via the target stack at
all.  Instead, factor out a new proc_resume function out of
procfs_target::resume, and call that.  The new function does not rely
on inferior_ptid.

I've not been able to test it myself, but Petr confirmed it fixes the
assertion failure with his test case, and Marcel Telka also confirmed
it solves the problem.

Tested-By: Petr Šumbera <petr.sumbera@oracle.com>
Tested-By: Marcel Telka <marcel@telka.sk>
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30252
Change-Id: I6213c59b081d400a22e799ee621c2eff6dcafbf3
2023-07-06 15:11:46 +01:00
GDB Administrator
3ee1593a53 Automatic date update in version.in 2023-07-06 00:00:51 +00:00
GDB Administrator
b8ddd75f2d Automatic date update in version.in 2023-07-05 00:00:26 +00:00
GDB Administrator
8c6429ed44 Automatic date update in version.in 2023-07-04 00:00:39 +00:00
GDB Administrator
9d9965cdf7 Automatic date update in version.in 2023-07-03 00:00:34 +00:00
GDB Administrator
6f7bb43739 Automatic date update in version.in 2023-07-02 00:00:27 +00:00
GDB Administrator
f71d37da72 Automatic date update in version.in 2023-07-01 00:00:40 +00:00
GDB Administrator
0737540fe4 Automatic date update in version.in 2023-06-30 00:00:26 +00:00
GDB Administrator
c865a29b65 Automatic date update in version.in 2023-06-29 00:00:43 +00:00
GDB Administrator
e08b775dfb Automatic date update in version.in 2023-06-28 00:01:06 +00:00
GDB Administrator
65ba4a63fa Automatic date update in version.in 2023-06-27 00:00:38 +00:00
GDB Administrator
6f8c86b005 Automatic date update in version.in 2023-06-26 00:00:25 +00:00
GDB Administrator
228250e325 Automatic date update in version.in 2023-06-25 00:00:34 +00:00
GDB Administrator
45fe7c5b32 Automatic date update in version.in 2023-06-24 00:00:35 +00:00
GDB Administrator
f41b8af5c5 Automatic date update in version.in 2023-06-23 00:00:23 +00:00
GDB Administrator
30af4b5b54 Automatic date update in version.in 2023-06-22 00:00:37 +00:00
GDB Administrator
1f71605129 Automatic date update in version.in 2023-06-21 00:00:35 +00:00
GDB Administrator
9576466d5e Automatic date update in version.in 2023-06-20 00:00:27 +00:00
GDB Administrator
5bd4c857ab Automatic date update in version.in 2023-06-19 00:00:31 +00:00
GDB Administrator
46db8415d1 Automatic date update in version.in 2023-06-18 00:00:34 +00:00
GDB Administrator
d9cebfc669 Automatic date update in version.in 2023-06-17 00:00:39 +00:00
GDB Administrator
399ea9f9b4 Automatic date update in version.in 2023-06-16 00:00:37 +00:00
GDB Administrator
107d63c4bc Automatic date update in version.in 2023-06-15 00:00:46 +00:00
GDB Administrator
016c472eb9 Automatic date update in version.in 2023-06-14 00:00:37 +00:00
GDB Administrator
94b75f8626 Automatic date update in version.in 2023-06-13 00:00:30 +00:00
GDB Administrator
1b7aa2cd11 Automatic date update in version.in 2023-06-12 00:00:30 +00:00
GDB Administrator
4b5f2953ff Automatic date update in version.in 2023-06-11 00:00:34 +00:00
GDB Administrator
079fdcb421 Automatic date update in version.in 2023-06-10 00:00:27 +00:00
GDB Administrator
f8170d1345 Automatic date update in version.in 2023-06-09 00:01:20 +00:00
GDB Administrator
686ccf6d84 Automatic date update in version.in 2023-06-08 00:01:02 +00:00
GDB Administrator
8ac7928bb5 Automatic date update in version.in 2023-06-07 00:01:29 +00:00