# HG changeset patch # User Kim F. Storm # Date 1149065882 0 # Node ID 8e0e27268c7461c47e106bb6905b5569c56279f5 # Parent b44a459ae79e8bd71957ba2c1c501dd1fe5e05e5 (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 -r b44a459ae79e -r 8e0e27268c74 src/process.c --- a/src/process.c Wed May 31 08:56:54 2006 +0000 +++ b/src/process.c Wed May 31 08:58:02 2006 +0000 @@ -4135,6 +4135,25 @@ { } +/* 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.