Commit Graph

86586 Commits

Author SHA1 Message Date
GDB Administrator
92daecde7b Automatic date update in version.in 2016-06-18 00:00:42 +00:00
GDB Administrator
3d46859944 Automatic date update in version.in 2016-06-17 00:00:44 +00:00
GDB Administrator
cde9626de3 Automatic date update in version.in 2016-06-16 00:00:47 +00:00
GDB Administrator
c0dcd9b17d Automatic date update in version.in 2016-06-15 00:00:40 +00:00
GDB Administrator
9a6eed2b8a Automatic date update in version.in 2016-06-14 00:00:41 +00:00
GDB Administrator
53772f1187 Automatic date update in version.in 2016-06-13 00:00:43 +00:00
GDB Administrator
977b73d46b Automatic date update in version.in 2016-06-12 00:00:36 +00:00
GDB Administrator
1384e9fbca Automatic date update in version.in 2016-06-11 00:00:36 +00:00
GDB Administrator
88a50af29c Automatic date update in version.in 2016-06-10 00:00:41 +00:00
GDB Administrator
ac66deee69 Automatic date update in version.in 2016-06-09 00:00:37 +00:00
GDB Administrator
c6546914c8 Automatic date update in version.in 2016-06-08 00:00:39 +00:00
GDB Administrator
e5b1e1ad43 Automatic date update in version.in 2016-06-07 00:00:36 +00:00
GDB Administrator
8477a10c46 Automatic date update in version.in 2016-06-06 00:00:42 +00:00
GDB Administrator
8e6238ad28 Automatic date update in version.in 2016-06-05 00:00:48 +00:00
GDB Administrator
345aa62eb8 Automatic date update in version.in 2016-06-04 00:00:37 +00:00
GDB Administrator
4ae84c7de1 Automatic date update in version.in 2016-06-03 00:00:42 +00:00
GDB Administrator
bd343abed5 Automatic date update in version.in 2016-06-02 00:00:41 +00:00
Joel Brobecker
d03dfbf669 Bump GDB version number to 7.11.1.DATE-git.
gdb/ChangeLog:

	* version.in: Set GDB version number to 7.11.1.DATE-git.
2016-05-31 17:53:47 -07:00
Joel Brobecker
afc7295f99 Document the GDB 7.11.1 release in gdb/ChangeLog
gdb/ChangeLog:

	GDB 7.11.1 released.
2016-05-31 17:49:43 -07:00
Joel Brobecker
41d82368c3 Set GDB version number to 7.11.1.
gdb/ChangeLog:

	* version.in: Set GDB version number to 7.11.1.
gdb-7.11.1-release
2016-05-31 17:36:16 -07:00
GDB Administrator
a70e2b5231 Automatic date update in version.in 2016-06-01 00:00:44 +00:00
GDB Administrator
333cacb483 Automatic date update in version.in 2016-05-31 00:00:33 +00:00
GDB Administrator
00d6f16a18 Automatic date update in version.in 2016-05-30 00:00:33 +00:00
GDB Administrator
7cb67a322b Automatic date update in version.in 2016-05-29 00:00:41 +00:00
GDB Administrator
8ce0a6f81d Automatic date update in version.in 2016-05-28 00:00:36 +00:00
GDB Administrator
b450bfa82e Automatic date update in version.in 2016-05-27 00:00:39 +00:00
GDB Administrator
53b26facdd Automatic date update in version.in 2016-05-26 00:00:38 +00:00
Pedro Alves
136613ef0c Fix PR gdb/19828: gdb -p <process from a container>: internal error
When GDB attaches to a process, it looks at the /proc/PID/task/ dir
for all clone threads of that process, and attaches to each of them.

Usually, if there is more than one clone thread, it means the program
is multi threaded and linked with pthreads.  Thus when GDB soon after
attaching finds and loads a libthread_db matching the process, it'll
add a thread to the thread list for each of the initially found
lower-level LWPs.

If, however, GDB fails to find/load a matching libthread_db, nothing
is adding the LWPs to the thread list.  And because of that, "detach"
hits an internal error:

  (gdb) PASS: gdb.threads/clone-attach-detach.exp: fg attach 1: attach
  info threads
    Id   Target Id         Frame
  * 1    LWP 6891 "clone-attach-de" 0x00007f87e5fd0790 in __nanosleep_nocancel () at ../sysdeps/unix/syscall-template.S:84
  (gdb) FAIL: gdb.threads/clone-attach-detach.exp: fg attach 1: info threads shows two LWPs
  detach
  .../src/gdb/thread.c:1010: internal-error: is_executing: Assertion `tp' failed.
  A problem internal to GDB has been detected,
  further debugging may prove unreliable.
  Quit this debugging session? (y or n)
  FAIL: gdb.threads/clone-attach-detach.exp: fg attach 1: detach (GDB internal error)

From here:

  ...
  #8  0x00000000007ba7cc in internal_error (file=0x98ea68 ".../src/gdb/thread.c", line=1010, fmt=0x98ea30 "%s: Assertion `%s' failed.")
      at .../src/gdb/common/errors.c:55
  #9  0x000000000064bb83 in is_executing (ptid=...) at .../src/gdb/thread.c:1010
  #10 0x00000000004c23bb in get_pending_status (lp=0x12c5cc0, status=0x7fffffffdc0c) at .../src/gdb/linux-nat.c:1235
  #11 0x00000000004c2738 in detach_callback (lp=0x12c5cc0, data=0x0) at .../src/gdb/linux-nat.c:1317
  #12 0x00000000004c1a2a in iterate_over_lwps (filter=..., callback=0x4c2599 <detach_callback>, data=0x0) at .../src/gdb/linux-nat.c:899
  #13 0x00000000004c295c in linux_nat_detach (ops=0xe7bd30, args=0x0, from_tty=1) at .../src/gdb/linux-nat.c:1358
  #14 0x000000000068284d in delegate_detach (self=0xe7bd30, arg1=0x0, arg2=1) at .../src/gdb/target-delegates.c:34
  #15 0x0000000000694141 in target_detach (args=0x0, from_tty=1) at .../src/gdb/target.c:2241
  #16 0x0000000000630582 in detach_command (args=0x0, from_tty=1) at .../src/gdb/infcmd.c:2975
  ...

Tested on x86-64 Fedora 23.  Also confirmed the test passes against
gdbserver with "maint set target-non-stop".

Unfortunately, making GDB add LWPs to the thread list sooner exposes
inefficiencies that in turn result in
gdb.threads/attach-many-short-lived-threads.exp timing out frequently.
Since that testcase is really a contrived use case designed to stress
some aspects of attach/detach and thread listing, not really
representative of real programs, this commit disables the test.

gdb/ChangeLog:
2016-05-25  Pedro Alves  <palves@redhat.com>

	PR gdb/19828
	* linux-nat.c (attach_proc_task_lwp_callback): Mark the lwp
	resumed, and add the thread to GDB's thread list.

testsuite/ChangeLog:
2016-05-25  Pedro Alves  <palves@redhat.com>

	PR gdb/19828
	* gdb.threads/clone-attach-detach.c: New file.
	* gdb.threads/clone-attach-detach.exp: New file.
	* gdb.threads/attach-many-short-lived-threads.exp: Skip.
2016-05-25 18:35:09 +01:00
Pedro Alves
a0de87e7be Make gdb/linux-nat.c consider a waitstatus pending on the infrun side
Working on the fix for gdb/19828, I saw
gdb.threads/attach-many-short-lived-threads.exp fail once in an
unusual way.  Unfortunately I didn't keep debug logs, but it's an
issue similar to what's been fixed in remote.c a while ago --
linux-nat.c was not fetching the pending status from the right place.

gdb/ChangeLog:
2016-05-25  Pedro Alves  <palves@redhat.com>

	PR gdb/19828
	* linux-nat.c (get_pending_status): If the thread reported the
	event to the core and it's pending, use the pending status signal
	number.
2016-05-25 18:35:09 +01:00
GDB Administrator
92e1921256 Automatic date update in version.in 2016-05-25 00:00:37 +00:00
GDB Administrator
079f7d434d Automatic date update in version.in 2016-05-24 00:00:35 +00:00
GDB Administrator
8fb059f570 Automatic date update in version.in 2016-05-23 00:00:42 +00:00
GDB Administrator
fc21d77733 Automatic date update in version.in 2016-05-22 00:00:40 +00:00
GDB Administrator
2838ada635 Automatic date update in version.in 2016-05-21 00:00:49 +00:00
GDB Administrator
f4188a7879 Automatic date update in version.in 2016-05-20 00:00:35 +00:00
GDB Administrator
edf01670a6 Automatic date update in version.in 2016-05-19 00:00:34 +00:00
Simon Marchi
cf2cd51217 Add mi-threads-interrupt.exp test (PR 20039)
Add a new test for PR 20039.  The test spawns new threads, then tries to
interrupt, continue, and interrupt again.  This use case was fixed by
commit 5fe966540d in master, but gdb 7.11
is affected (so if you try it on the gdb-7.11-branch right now, the test
will fail).

New in v2, the test now handles mi-async on mode properly.  The failure
was specific to mi-async off, but I don't think it's bad to test the
same thing under async on mode.  I added a little hack when running in
async mode to work around bug 20045.

I also removed one continue/interrupt pair, as a single one was enough to
trigger the problem.

gdb/testsuite/ChangeLog:

	* gdb.mi/mi-threads-interrupt.c: New file.
	* gdb.mi/mi-threads-interrupt.exp: New file.
2016-05-18 10:19:10 -04:00
Simon Marchi
f0a8d0dc70 Fix double prompt output after run control MI commands with mi-async on (PR 20045)
When you use a run control command (-exec-run, -exec-continue,
-exec-next, ...) with mi-async on, an extra (gdb) prompt is displayed:

  -exec-continue
  ^running
  *running,thread-id="all"
  (gdb)
  (gdb)

It doesn't seem to be a big problem for front-ends, since this behavior
started in gdb 7.9 and we haven't heard anything about that.  However,
it caused me some trouble while writing a test for PR 20039 [1].

The problem comes from an extra (gdb) prompt that we write when running
in mi-async off mode to emulate a past buggy behavior.  When executing a
run control command synchronously, previous gdbs always printed a prompt
right away, even though they are not ready to accept new MI commands
until the target stops.  Only at this time should they display a prompt.
But to keep backwards compatibility apparently, we print it anyway.
Since commit 198297aaf, the condition that decides whether we should
print that "bogus" prompt or not has become true, even when running with
mi-async on.  Since we already print a prompt at the end of the
asynchronous command execution, it results in two prompts for one
command.

The proposed fix is to call target_can_async_p instead of
target_is_async_p, to make the condition:

  if (!target_can_async_p () || sync_execution)
    ... show prompt ...

That shows the prompt if we are emulating a synchronous command on top
of an asynchronous target (sync_execution) or if the target simply can't
run asynchronously (!target_can_async_p ()).

Note that this code is changed and this bug fixed by Pedro's separate
console series, but I think it would be nice to have it fixed in the
mean time.

I ran the gdb.mi directory of the testsuite with mi-async on and off, I
didn't see any regressions.

gdb/ChangeLog:

	* mi/mi-main.c (mi_on_resume): Call target_can_async_p instead
	of target_is_async_p.

[1] https://sourceware.org/ml/gdb-patches/2016-05/msg00075.html
2016-05-18 10:19:09 -04:00
GDB Administrator
2ef476ed0a Automatic date update in version.in 2016-05-18 00:00:40 +00:00
Simon Marchi
b5f0db46b3 Fix -exec-run not running asynchronously with mi-async on (PR gdb/18077)
When doing -exec-run on a freshly started GDB, the only target on the
target stack at the time the dummy one.  When mi_async_p is called to
know whether the run should be async, it queries whether the current
target (dummy) supports async, and the answer is no.  The fix is to make
the code query the target that will be used for the run, which is not
necessarily the current target.

No regressions in the gdb.mi directory using the unix, native-gdbserver
and native-extended-gdbserver boards.  The test doesn't pass when
forcing maint set target-async off, obviously, since it makes mi-async
have no effect.  It doesn't seem like other tests are checking for that
eventuality, so I didn't in the new test.

gdb/ChangeLog:

	* mi/mi-main.c (run_one_inferior): Use run target to determine
	whether to run async or not.
	(mi_cmd_exec_run): Likewise.

gdb/testsuite/ChangeLog:

	* gdb.mi/mi-async-run.exp: New file.
	* gdb.mi/mi-async-run.c: New file.
2016-05-17 16:58:19 -04:00
GDB Administrator
bffe67e8c0 Automatic date update in version.in 2016-05-17 00:00:35 +00:00
Pedro Alves
7f8e34d860 Use target_terminal_ours_for_output in MI
The MI code only does output, so leave raw/cooked mode alone, as well
as the SIGINT handler.  Restore terminal settings after output, while
at it.  Also, a couple events missed calling target_terminal_ours
before output, even.

[Backported to the 7.11 branch by Simon Marchi, as it fixes PR 20039.]

gdb/ChangeLog:
YYYY-MM-DD  Pedro Alves  <palves@redhat.com>

	* mi/mi-interp.c (mi_new_thread): Put
	target_terminal_ours_for_output in effect while outputting.
	(mi_thread_exit): Use target_terminal_ours_for_output instead of
	target_terminal_ours.
	(mi_record_changed, mi_inferior_added, mi_inferior_appeared)
	(mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
	(mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
	(mi_breakpoint_created, mi_breakpoint_deleted)
	(mi_breakpoint_modified, mi_solib_loaded, mi_solib_unloaded)
	(mi_command_param_changed, mi_memory_changed)
	(report_initial_inferior): Use target_terminal_ours_for_output
	instead of target_terminal_ours.  Restore terminal settings.
	* mi/mi-main.c (mi_execute_command): Use
	target_terminal_ours_for_output instead of target_terminal_ours.
	Restore terminal settings.
2016-05-16 17:02:35 -04:00
GDB Administrator
d38ce6a68f Automatic date update in version.in 2016-05-16 00:00:33 +00:00
GDB Administrator
919bc2384a Automatic date update in version.in 2016-05-15 00:00:35 +00:00
GDB Administrator
d85af00da6 Automatic date update in version.in 2016-05-14 00:00:33 +00:00
GDB Administrator
5f12f92452 Automatic date update in version.in 2016-05-13 00:00:30 +00:00
GDB Administrator
ca445d4820 Automatic date update in version.in 2016-05-12 00:00:37 +00:00
GDB Administrator
1a982b689c Automatic date update in version.in 2016-05-11 00:00:40 +00:00
GDB Administrator
74e2db3c52 Automatic date update in version.in 2016-05-10 00:00:46 +00:00
GDB Administrator
8bc1de549e Automatic date update in version.in 2016-05-09 00:00:41 +00:00