From: Kim F. Storm Date: Wed, 31 May 2006 08:58:02 +0000 (+0000) Subject: (select_wrapper): Add wrapper around select to work around X-Git-Tag: emacs-pretest-22.0.90~2165 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e1e541bdf1fa6ebe4b8b3b866a8773b9339800be;p=emacs.git (select_wrapper): Add wrapper around select to work around "incomplete backtrace" bug in gdb 5.3, when emacs is stopped inside select called from wait_reading_process_output. --- diff --git a/src/process.c b/src/process.c index cfc39235c9a..3366a3f1006 100644 --- a/src/process.c +++ b/src/process.c @@ -4135,6 +4135,25 @@ wait_reading_process_output_1 () { } +/* Use a wrapper around select to work around a bug in gdb 5.3. + Normally, the wrapper is optimzed away by inlining. + + If emacs is stopped inside select, the gdb backtrace doesn't + show the function which called select, so it is practically + impossible to step through wait_reading_process_output. */ + +#ifndef select +static INLINE int +select_wrapper (n, rfd, wfd, xfd, tmo) + int n; + SELECT_TYPE *rfd, *wfd, *xfd; + EMACS_TIME *tmo; +{ + return select (n, rfd, wfd, xfd, tmo); +} +#define select select_wrapper +#endif + /* Read and dispose of subprocess output while waiting for timeout to elapse and/or keyboard input to be available.