diff options
| author | Kim F. Storm | 2006-05-31 08:58:02 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2006-05-31 08:58:02 +0000 |
| commit | e1e541bdf1fa6ebe4b8b3b866a8773b9339800be (patch) | |
| tree | 57f108b76e7a5863694f65a8d11967e0a2f6a70f /src/process.c | |
| parent | 360feccaf4ba7e9aa9731b25b5bdd9053067d269 (diff) | |
| download | emacs-e1e541bdf1fa6ebe4b8b3b866a8773b9339800be.tar.gz emacs-e1e541bdf1fa6ebe4b8b3b866a8773b9339800be.zip | |
(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.
Diffstat (limited to 'src/process.c')
| -rw-r--r-- | src/process.c | 19 |
1 files changed, 19 insertions, 0 deletions
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 () | |||
| 4135 | { | 4135 | { |
| 4136 | } | 4136 | } |
| 4137 | 4137 | ||
| 4138 | /* Use a wrapper around select to work around a bug in gdb 5.3. | ||
| 4139 | Normally, the wrapper is optimzed away by inlining. | ||
| 4140 | |||
| 4141 | If emacs is stopped inside select, the gdb backtrace doesn't | ||
| 4142 | show the function which called select, so it is practically | ||
| 4143 | impossible to step through wait_reading_process_output. */ | ||
| 4144 | |||
| 4145 | #ifndef select | ||
| 4146 | static INLINE int | ||
| 4147 | select_wrapper (n, rfd, wfd, xfd, tmo) | ||
| 4148 | int n; | ||
| 4149 | SELECT_TYPE *rfd, *wfd, *xfd; | ||
| 4150 | EMACS_TIME *tmo; | ||
| 4151 | { | ||
| 4152 | return select (n, rfd, wfd, xfd, tmo); | ||
| 4153 | } | ||
| 4154 | #define select select_wrapper | ||
| 4155 | #endif | ||
| 4156 | |||
| 4138 | /* Read and dispose of subprocess output while waiting for timeout to | 4157 | /* Read and dispose of subprocess output while waiting for timeout to |
| 4139 | elapse and/or keyboard input to be available. | 4158 | elapse and/or keyboard input to be available. |
| 4140 | 4159 | ||