emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Need help debugging Emacs: emacsclient will not draw its contents so


From: Jon Dufresne
Subject: Re: Need help debugging Emacs: emacsclient will not draw its contents sometimes
Date: Wed, 9 Sep 2015 15:29:18 -0700

On Tue, Sep 8, 2015 at 12:16 PM, Eli Zaretskii <address@hidden> wrote:
> So now the question is why you don't see the display.  Please step
> through command_loop_1 until it calls read_key_sequence, step into
> that, then step until it calls read_char, and step through read_char
> until it calls redisplay_internal.  Once you are inside
> redisplay_internal, step through it and show which lines are being
> executed.

Thanks. I'm no expert on gdb, but I believe I have followed your
suggestion. Below is the output from gdb by stepping through
redisplay_internal from beginning to end. Let me know what you think.
Any insight as to why the contents are not drawn?

(gdb) n
redisplay_internal () at ../../src/xdisp.c:13482
13482    {
(gdb) n
13507      if (FRAME_INITIAL_P (SELECTED_FRAME ())
(gdb) n
2430      if (! VECTORLIKEP (a))
(gdb) n
704    LISP_MACRO_DEFUN (XUNTAG, void *, (Lisp_Object a, int type), (a, type))
(gdb) n
13507      if (FRAME_INITIAL_P (SELECTED_FRAME ())
(gdb) n
13508          || !NILP (Vinhibit_redisplay))
(gdb) n
13483      struct window *w = XWINDOW (selected_window);
(gdb) n
13517      if (!fr->glyphs_initialized_p)
(gdb) n
13521      if (popup_activated ())
(gdb) n
13526      if (redisplaying_p)
(gdb) n
2894      return specpdl_ptr - specpdl;
(gdb) n
13532      record_unwind_protect_void (unwind_redisplay);
(gdb) n
2894      return specpdl_ptr - specpdl;
(gdb) n
13532      record_unwind_protect_void (unwind_redisplay);
(gdb) n
13534      specbind (Qinhibit_free_realized_faces, Qnil);
(gdb) n
13533      redisplaying_p = 1;
(gdb) n
13534      specbind (Qinhibit_free_realized_faces, Qnil);
(gdb) n
13537      record_in_backtrace (Qredisplay_internal, &Qnil, 0);
(gdb) n
13539      FOR_EACH_FRAME (tail, frame)
(gdb) n
13540        XFRAME (frame)->already_hscrolled_p = 0;
(gdb) n
13539      FOR_EACH_FRAME (tail, frame)
(gdb) n
13540        XFRAME (frame)->already_hscrolled_p = 0;
(gdb) n
13539      FOR_EACH_FRAME (tail, frame)
(gdb) n
13540        XFRAME (frame)->already_hscrolled_p = 0;
(gdb) n
13539      FOR_EACH_FRAME (tail, frame)
(gdb) n
11650          init_iterator (&it, XWINDOW (f->selected_window), -1, -1,
(gdb) n
14044          STOP_POLLING;
(gdb) n
11650          init_iterator (&it, XWINDOW (f->selected_window), -1, -1,
(gdb) n
13555      if (face_change_count)
(gdb) n
13547      last_escape_glyph_frame = NULL;
(gdb) n
13548      last_escape_glyph_face_id = (1 << FACE_ID_BITS);
(gdb) n
13549      last_glyphless_glyph_frame = NULL;
(gdb) n
13550      last_glyphless_glyph_face_id = (1 << FACE_ID_BITS);
(gdb) n
13555      if (face_change_count)
(gdb) n
13558      if ((FRAME_TERMCAP_P (sf) || FRAME_MSDOS_P (sf))
(gdb) n
13576      FOR_EACH_FRAME (tail, frame)
(gdb) n
704    LISP_MACRO_DEFUN (XUNTAG, void *, (Lisp_Object a, int type), (a, type))
(gdb) n
13580          if (FRAME_VISIBLE_P (f))
(gdb) n
13582          ++number_of_visible_frames;
(gdb) n
13584          if (f->fonts_changed)
(gdb) n
13591          if (f != sf && f->cursor_type_changed)
(gdb) n
13594          clear_desired_matrices (f);
(gdb) n
13576      FOR_EACH_FRAME (tail, frame)
(gdb) n
704    LISP_MACRO_DEFUN (XUNTAG, void *, (Lisp_Object a, int type), (a, type))
(gdb) n
13580          if (FRAME_VISIBLE_P (f))
(gdb) n
13582          ++number_of_visible_frames;
(gdb) n
13584          if (f->fonts_changed)
(gdb) n
13591          if (f != sf && f->cursor_type_changed)
(gdb) n
13594          clear_desired_matrices (f);
(gdb) n
13576      FOR_EACH_FRAME (tail, frame)
(gdb) n
704    LISP_MACRO_DEFUN (XUNTAG, void *, (Lisp_Object a, int type), (a, type))
(gdb) n
13580          if (FRAME_VISIBLE_P (f))
(gdb) n
13582          ++number_of_visible_frames;
(gdb) n
13584          if (f->fonts_changed)
(gdb) n
13591          if (f != sf && f->cursor_type_changed)
(gdb) n
13594          clear_desired_matrices (f);
(gdb) n
13576      FOR_EACH_FRAME (tail, frame)
(gdb) n
13598      do_pending_window_change (1);
(gdb) n
13602      if (WINDOWP (selected_window) && (w = XWINDOW
(selected_window)) != sw)
(gdb) n
2430      if (! VECTORLIKEP (a))
(gdb) n
13602      if (WINDOWP (selected_window) && (w = XWINDOW
(selected_window)) != sw)
(gdb) n
704    LISP_MACRO_DEFUN (XUNTAG, void *, (Lisp_Object a, int type), (a, type))
(gdb) n
11236      if (frame_garbaged)
(gdb) n
13609      if (NILP (Vmemory_full))
(gdb) n
11689      bool all_windows = windows_or_buffers_changed || update_mode_lines;
(gdb) n
11690      bool some_windows = REDISPLAY_SOME_P ();
(gdb) n
11695      tooltip_frame = tip_frame;
(gdb) n
11700      if (FUNCTIONP (Vpre_redisplay_function))
(gdb) n
11695      tooltip_frame = tip_frame;
(gdb) n
703    LISP_MACRO_DEFUN (XTYPE, enum Lisp_Type, (Lisp_Object a), (a))
(gdb) n
4569      if (SYMBOLP (object) && !NILP (Ffboundp (object)))
(gdb) n
2430      if (! VECTORLIKEP (a))
(gdb) n
2422      return ((a->size & (PSEUDOVECTOR_FLAG | PVEC_TYPE_MASK))
(gdb) n
4585      if (SUBRP (object))
(gdb) n
4587      else if (COMPILEDP (object))
(gdb) n
11702          Lisp_Object windows = all_windows ? Qt : Qnil;
(gdb) n
11718          safe__call1 (true, Vpre_redisplay_function, windows);
(gdb) n
11725      if (all_windows)
(gdb) n
11817          struct frame *sf = SELECTED_FRAME ();
(gdb) n
2430      if (! VECTORLIKEP (a))
(gdb) n
11817          struct frame *sf = SELECTED_FRAME ();
(gdb) n
704    LISP_MACRO_DEFUN (XUNTAG, void *, (Lisp_Object a, int type), (a, type))
(gdb) n
11817          struct frame *sf = SELECTED_FRAME ();
(gdb) n
11846      if (inhibit_menubar_update)
(gdb) n
11977      if (do_update)
(gdb) n
13612      reconsider_clip_changes (w);
(gdb) n
704    LISP_MACRO_DEFUN (XUNTAG, void *, (Lisp_Object a, int type), (a, type))
(gdb) n
13615      match_p = XBUFFER (w->contents) == current_buffer;
(gdb) n
704    LISP_MACRO_DEFUN (XUNTAG, void *, (Lisp_Object a, int type), (a, type))
(gdb) n
13615      match_p = XBUFFER (w->contents) == current_buffer;
(gdb) n
13616      if (match_p)
(gdb) n
13619          if ((SAVE_MODIFF < MODIFF) != w->last_had_star)
(gdb) n
13622          if (mode_line_update_needed (w))
(gdb) n
13628          if (current_buffer->clip_changed)
(gdb) n
13637      if ((!NILP (echo_area_buffer[0]) &&
!display_last_displayed_message_p)
(gdb) n
13645          int window_height_changed_p = echo_area_display (0);
(gdb) n
13648        update_miniwindow_p = true;
(gdb) n
13656          if (!display_last_displayed_message_p)
(gdb) n
13648        update_miniwindow_p = true;
(gdb) n
13656          if (!display_last_displayed_message_p)
(gdb) n
13657        message_cleared_p = 0;
(gdb) n
13659          if (window_height_changed_p)
(gdb) n
13650          must_finish = 1;
(gdb) n
13683      if (windows_or_buffers_changed && !update_mode_lines)
(gdb) n
13692      if (overlay_arrows_changed_p ())
(gdb) n
13697      consider_all_windows_p = (update_mode_lines
(gdb) n
13698                    || windows_or_buffers_changed);
(gdb) n
13704      AINC (Vredisplay__all_windows_cause, windows_or_buffers_changed);
(gdb) n
2394      return VECTORLIKEP (x) && ! (ASIZE (x) & PSEUDOVECTOR_FLAG);
(gdb) n
1368      return XVECTOR (array)->header.size;
(gdb) n
704    LISP_MACRO_DEFUN (XUNTAG, void *, (Lisp_Object a, int type), (a, type))
(gdb) n
2394      return VECTORLIKEP (x) && ! (ASIZE (x) & PSEUDOVECTOR_FLAG);
(gdb) n
13704      AINC (Vredisplay__all_windows_cause, windows_or_buffers_changed);
(gdb) n
13705      AINC (Vredisplay__mode_lines_cause, update_mode_lines);
(gdb) n
2394      return VECTORLIKEP (x) && ! (ASIZE (x) & PSEUDOVECTOR_FLAG);
(gdb) n
704    LISP_MACRO_DEFUN (XUNTAG, void *, (Lisp_Object a, int type), (a, type))
(gdb) n
1368      return XVECTOR (array)->header.size;
(gdb) n
13705      AINC (Vredisplay__mode_lines_cause, update_mode_lines);
(gdb) n
13711      tlbufpos = this_line_start_pos;
(gdb) n
13714          && CHARPOS (tlbufpos) > 0
(gdb) n
13715          && !w->update_mode_line
(gdb) n
13716          && !current_buffer->clip_changed
(gdb) n
13717          && !current_buffer->prevent_redisplay_optimizations_p
(gdb) n
13718          && FRAME_VISIBLE_P (XFRAME (w->frame))
(gdb) n
13719          && !FRAME_OBSCURED_P (XFRAME (w->frame))
(gdb) n
13720          && !XFRAME (w->frame)->cursor_type_changed
(gdb) n
13723          && match_p
(gdb) n
13724          && !w->force_start
(gdb) n
13725          && !w->optional_new_start
(gdb) n
13727          && PT >= CHARPOS (tlbufpos)
(gdb) n
13728          && PT <= Z - CHARPOS (tlendpos)
(gdb) n
13712      tlendpos = this_line_end_pos;
(gdb) n
13728          && PT <= Z - CHARPOS (tlendpos)
(gdb) n
13712      tlendpos = this_line_end_pos;
(gdb) n
13166      if (window_outdated (w))
(gdb) n
13711      tlbufpos = this_line_start_pos;
(gdb) n
13712      tlendpos = this_line_end_pos;
(gdb) n
13166      if (window_outdated (w))
(gdb) n
13734          if (CHARPOS (tlbufpos) > BEGV
(gdb) n
13735          && FETCH_BYTE (BYTEPOS (tlbufpos) - 1) != '\n'
(gdb) n
13740          else if (window_outdated (w) || MINI_WINDOW_P (w))
(gdb) n
13842          else if (/* Cursor position hasn't changed.  */
(gdb) n
13848               && 0 <= w->cursor.vpos
(gdb) n
13849               && w->cursor.vpos < WINDOW_TOTAL_LINES (w))
(gdb) n
13851          if (!must_finish)
(gdb) n
14036          if (sf->fonts_changed)
(gdb) n
14042          if (interrupt_input)
(gdb) n
14043        unrequest_sigio ();
(gdb) n
14044          STOP_POLLING;
(gdb) n
14046          if (FRAME_VISIBLE_P (sf) && !FRAME_OBSCURED_P (sf))
(gdb) n
14048          if (hscroll_windows (selected_window))
(gdb) n
13078      int hscrolled_p = hscroll_window_tree (window);
(gdb) n
13079      if (hscrolled_p)
(gdb) n
14051          XWINDOW (selected_window)->must_be_updated_p = true;
(gdb) n
14052          pending = update_frame (sf, 0, 0);
(gdb) n
14051          XWINDOW (selected_window)->must_be_updated_p = true;
(gdb) n
14052          pending = update_frame (sf, 0, 0);
(gdb) n
14061          mini_window = FRAME_MINIBUF_WINDOW (sf);
(gdb) n
14053          sf->cursor_type_changed = 0;
(gdb) n
14052          pending = update_frame (sf, 0, 0);
(gdb) n
704    LISP_MACRO_DEFUN (XUNTAG, void *, (Lisp_Object a, int type), (a, type))
(gdb) n
14064          if (mini_frame != sf && FRAME_WINDOW_P (mini_frame))
(gdb) n
14076      if (pending)
(gdb) n
14094          if (!consider_all_windows_p)
(gdb) n
704    LISP_MACRO_DEFUN (XUNTAG, void *, (Lisp_Object a, int type), (a, type))
(gdb) n
14098          if (XBUFFER (w->contents)->text->redisplay
(gdb) n
704    LISP_MACRO_DEFUN (XUNTAG, void *, (Lisp_Object a, int type), (a, type))
(gdb) n
14098          if (XBUFFER (w->contents)->text->redisplay
(gdb) n
14103          mark_window_display_accurate_1 (w, 1);
(gdb) n
14106          update_overlay_arrows (1);
(gdb) n
14108          if (FRAME_TERMINAL (sf)->frame_up_to_date_hook != 0)
(gdb) n
14109            FRAME_TERMINAL (sf)->frame_up_to_date_hook (sf);
(gdb) n
14112          update_mode_lines = 0;
(gdb) n
14113          windows_or_buffers_changed = 0;
(gdb) n
14120      if (interrupt_input)
(gdb) n
14121        request_sigio ();
(gdb) n
14122      RESUME_POLLING;
(gdb) n
14130      if (!pending)
(gdb) n
14134          FOR_EACH_FRAME (tail, frame)
(gdb) n
14136          if (XFRAME (frame)->visible)
(gdb) n
14134          FOR_EACH_FRAME (tail, frame)
(gdb) n
14136          if (XFRAME (frame)->visible)
(gdb) n
14137            new_count++;
(gdb) n
14134          FOR_EACH_FRAME (tail, frame)
(gdb) n
14137            new_count++;
(gdb) n
14134          FOR_EACH_FRAME (tail, frame)
(gdb) n
14136          if (XFRAME (frame)->visible)
(gdb) n
14134          FOR_EACH_FRAME (tail, frame)
(gdb) n
14136          if (XFRAME (frame)->visible)
(gdb) n
14137            new_count++;
(gdb) n
14134          FOR_EACH_FRAME (tail, frame)
(gdb) n
14137            new_count++;
(gdb) n
14134          FOR_EACH_FRAME (tail, frame)
(gdb) n
14136          if (XFRAME (frame)->visible)
(gdb) n
14134          FOR_EACH_FRAME (tail, frame)
(gdb) n
14136          if (XFRAME (frame)->visible)
(gdb) n
14137            new_count++;
(gdb) n
14134          FOR_EACH_FRAME (tail, frame)
(gdb) n
14137            new_count++;
(gdb) n
14134          FOR_EACH_FRAME (tail, frame)
(gdb) n
14140          if (new_count != number_of_visible_frames)
(gdb) n
14145      do_pending_window_change (1);
(gdb) n
14149      if ((windows_or_buffers_changed && !pending)
(gdb) n
14150          || (WINDOWP (selected_window) && (w = XWINDOW
(selected_window)) != sw))
(gdb) n
2430      if (! VECTORLIKEP (a))
(gdb) n
14150          || (WINDOWP (selected_window) && (w = XWINDOW
(selected_window)) != sw))
(gdb) n
704    LISP_MACRO_DEFUN (XUNTAG, void *, (Lisp_Object a, int type), (a, type))
(gdb) n
14150          || (WINDOWP (selected_window) && (w = XWINDOW
(selected_window)) != sw))
(gdb) n
14159      if (clear_face_cache_count > CLEAR_FACE_CACHE_COUNT)
(gdb) n
14166      if (clear_image_cache_count > CLEAR_IMAGE_CACHE_COUNT)
(gdb) n
14177      if (interrupt_input && interrupts_deferred)
(gdb) n
14180      unbind_to (count, Qnil);
(gdb) n
14182    }
(gdb) n
read_char (commandflag=1, address@hidden, prev_event=12327986,
address@hidden,
address@hidden) at ../../src/keyboard.c:2822
2822          if (!detect_input_pending_run_timers (0))
(gdb)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]