Go to file
Patrick Monnerat bac814af17 gdbsupport/event-loop: add a timeout parameter to gdb_do_one_event
Since commit b2d8657, having a per-interpreter event/command loop is not
possible anymore.

As Insight uses a GUI that has its own event loop, gdb and GUI event
loops have then to be "merged" (i.e.: work together). But this is
problematic as gdb_do_one_event is not aware of this alternate event
loop and thus may wait forever.

A solution is to delegate GUI events handling to the gdb events handler.
Insight uses Tck/Tk as GUI and the latter offers a "notifier" feature to
implement such a delegation. The Tcl notifier spec requires the event wait
function to support a timeout parameter. Unfortunately gdb_do_one_event
does not feature such a parameter.
This timeout cannot be implemented externally with a gdb timer, because
it would become an event by itself and thus can cause a legitimate event to
be missed if the timeout is 0.
Tcl implements "idle events" that are (internally) triggered only when no
other event is pending. For this reason, it can call the event wait function
with a 0 timeout quite often.

This patch implements a wait timeout to gdb_do_one_event. The initial
pending events monitoring is performed as before without the possibility
to enter a wait state. If no pending event has been found during this
phase, a timer is then created for the given timeout in order to re-use
the implemented timeout logic and the event wait is then performed.
This "internal" timer only limits the wait time and should never be triggered.
It is deleted upon gdb_do_one_event exit.

The new parameter defaults to "no timeout" (-1): as it is used by Insight
only, there is no need to update calls from the gdb source tree.
2022-08-18 11:56:38 +02:00
bfd Automatic date update in version.in 2022-08-18 00:00:07 +00:00
binutils PR29362, some binutils memory leaks 2022-08-16 00:25:10 +09:30
config Add markers for 2.39 branch 2022-07-08 10:41:07 +01:00
contrib
cpu Add markers for 2.39 branch 2022-07-08 10:41:07 +01:00
elfcpp Add gold support for --package-metadata option. 2022-08-04 17:37:32 -07:00
etc
gas x86: move / quiesce pre-386 non-16-bit warning 2022-08-18 09:20:05 +02:00
gdb gdb: add Patrick Monnerat to gdb/MAINTAINERS 2022-08-18 11:30:13 +02:00
gdbserver Use strwinerror in gdb/windows-nat.c 2022-08-16 08:04:37 -06:00
gdbsupport gdbsupport/event-loop: add a timeout parameter to gdb_do_one_event 2022-08-18 11:56:38 +02:00
gnulib gnulib: update to bd11400942d6 2022-05-02 10:54:19 -04:00
gold PR29462, internal error in relocate, at powerpc.cc:10796 2022-08-10 15:31:35 +09:30
gprof Don't use BFD_VMA_FMT in binutils 2022-08-04 12:22:39 +09:30
gprofng gprofng: fix bug 29410 - Argument " 0." isn't numeric in numeric gt (>) 2022-08-03 10:10:35 -07:00
include ppc/svp64: introduce non-zero operand flag 2022-08-11 18:38:29 +09:30
intl
ld readelf: print 0x0 as 0, and remove trailing spaces 2022-08-13 14:11:27 +09:30
libbacktrace
libctf libctf: Avoid use of uninitialised variables 2022-08-01 09:30:33 +09:30
libdecnumber Merge config/ changes from GCC, to enable DFP on AArch64 2022-05-24 10:47:29 +01:00
libiberty Add markers for 2.39 branch 2022-07-08 10:41:07 +01:00
opcodes i386: Add MAX_OPERAND_BUFFER_SIZE 2022-08-16 09:36:58 -07:00
readline gdb/readline: fix extra 'quit' message problem 2022-05-07 10:49:27 +01:00
sim Don't use BFD_VMA_FMT in gdb and sim 2022-08-06 08:03:16 +09:30
texinfo
zlib Regenerate with automake-1.15.1 2022-07-09 20:10:47 +09:30
.cvsignore
.editorconfig
.gitattributes binutils-gdb/git: highlight whitespace errors in source files 2022-07-25 14:35:41 +01:00
.gitignore
ar-lib
ChangeLog Add markers for 2.39 branch 2022-07-08 10:41:07 +01:00
compile
config-ml.in
config.guess
config.rpath
config.sub
configure Disable year 2038 support on 32-bit hosts by default 2022-08-10 11:17:53 +01:00
configure.ac Disable year 2038 support on 32-bit hosts by default 2022-08-10 11:17:53 +01:00
COPYING
COPYING3
COPYING3.LIB
COPYING.LIB
COPYING.LIBGLOSS
COPYING.NEWLIB
depcomp
djunpack.bat
install-sh
libtool.m4
lt~obsolete.m4
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
MAINTAINERS
Makefile.def
Makefile.in Pass PKG_CONFIG_PATH down from top-level Makefile 2022-04-08 10:56:41 -04:00
Makefile.tpl Pass PKG_CONFIG_PATH down from top-level Makefile 2022-04-08 10:56:41 -04:00
makefile.vms
missing
mkdep
mkinstalldirs
move-if-change
multilib.am
README
README-maintainer-mode
setup.com
src-release.sh
symlink-tree
test-driver
ylwrap

		   README for GNU development tools

This directory contains various GNU compilers, assemblers, linkers, 
debuggers, etc., plus their support routines, definitions, and documentation.

If you are receiving this as part of a GDB release, see the file gdb/README.
If with a binutils release, see binutils/README;  if with a libg++ release,
see libg++/README, etc.  That'll give you info about this
package -- supported targets, how to use it, how to report bugs, etc.

It is now possible to automatically configure and build a variety of
tools with one command.  To build all of the tools contained herein,
run the ``configure'' script here, e.g.:

	./configure 
	make

To install them (by default in /usr/local/bin, /usr/local/lib, etc),
then do:
	make install

(If the configure script can't determine your type of computer, give it
the name as an argument, for instance ``./configure sun4''.  You can
use the script ``config.sub'' to test whether a name is recognized; if
it is, config.sub translates it to a triplet specifying CPU, vendor,
and OS.)

If you have more than one compiler on your system, it is often best to
explicitly set CC in the environment before running configure, and to
also set CC when running make.  For example (assuming sh/bash/ksh):

	CC=gcc ./configure
	make

A similar example using csh:

	setenv CC gcc
	./configure
	make

Much of the code and documentation enclosed is copyright by
the Free Software Foundation, Inc.  See the file COPYING or
COPYING.LIB in the various directories, for a description of the
GNU General Public License terms under which you can copy the files.

REPORTING BUGS: Again, see gdb/README, binutils/README, etc., for info
on where and how to report problems.