unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Manuel Giraud <manuel@ledu-giraud.fr>
Cc: luangruo@yahoo.com, 59351@debbugs.gnu.org, manuel@ledu-giraud.fr
Subject: bug#59351: 29.0.50; [PATCH] Fix mouse click position to menu bar entry
Date: Mon, 21 Nov 2022 20:12:40 +0200	[thread overview]
Message-ID: <834jus2n3b.fsf@gnu.org> (raw)
In-Reply-To: <875yf85pr8.fsf@elite.giraud> (message from Manuel Giraud on Mon,  21 Nov 2022 15:46:51 +0100)

> From: Manuel Giraud <manuel@ledu-giraud.fr>
> Cc: Manuel Giraud <manuel@ledu-giraud.fr>,  luangruo@yahoo.com,
>   59351@debbugs.gnu.org
> Date: Mon, 21 Nov 2022 15:46:51 +0100
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> >> From: Manuel Giraud <manuel@ledu-giraud.fr>
> >> Cc: Manuel Giraud <manuel@ledu-giraud.fr>,  luangruo@yahoo.com,
> >>   59351@debbugs.gnu.org
> >> Date: Mon, 21 Nov 2022 14:40:16 +0100
> >> 
> >> I'm trying to debug this from "M-x gdb".  I've put a breakpoint at
> >> display_menu_bar but whenever I'm doing a 'next' at the init_iterator
> >> call I get the following message:
> >> 
> >> --8<---------------cut here---------------start------------->8---
> >> Thread 1 received signal SIGTRAP, Trace/breakpoint trap.
> >> _thread_sys_poll () at /tmp/-:3
> >> 3	/tmp/-: No such file or directory.
> >> --8<---------------cut here---------------end--------------->8---
> >
> > What does "bt" show in this case?
> 
> Here it is:
> --8<---------------cut here---------------start------------->8---
> #0  _thread_sys_poll () at /tmp/-:3
> #1  0x00000a4800b10c4e in _libc_poll_cancel (fds=0x7f7ffffc52a8, nfds=1, timeout=-1) at /usr/src/lib/libc/sys/w_poll.c:27
> #2  0x00000a4798da5532 in _xcb_conn_wait (c=0xa47977e9000, cond=<optimized out>, vector=0x0, count=0x0) at /usr/xenocara/lib/libxcb/libxcb/../../../dist/libxcb/src/xcb_conn.c:508
> #3  0x00000a4798db7ad4 in wait_for_reply (c=0xa47977e9000, request=815, e=0x7f7ffffc53b8) at /usr/xenocara/lib/libxcb/libxcb/../../../dist/libxcb/src/xcb_in.c:522

Hmm... that's strange.  Po Lu, any idea why we get SIGTRAP there?

Anyway, instead of stepping with "next", try this, after the breakpoint in
display_menu_bar breaks:

 (gdb) tbreak 26300
 (gdb) continue

If this works, and Emacs is stopped at line 26300, I'd suggest stepping
directly into compute_line_metrics, which is called at the end of
display_menu_bar:

 (gdb) tbreak compute_line_metrics
 (gdb) continue

This should stop inside compute_line_metrics, and then step through it and
take note of the various metrics of the glyph row that it uses to compute
the height.  You should see the metrics that correspond to the new font.





  reply	other threads:[~2022-11-21 18:12 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-18  8:37 bug#59351: 29.0.50; [PATCH] Fix mouse click position to menu bar entry Manuel Giraud
2022-11-18 10:43 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-18 11:01   ` Manuel Giraud
2022-11-18 11:42     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-18 12:10       ` Manuel Giraud
2022-11-18 13:19         ` Eli Zaretskii
2022-11-18 13:24         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-18 11:58     ` Eli Zaretskii
2022-11-18 12:15       ` Manuel Giraud
2022-11-18 12:29         ` Eli Zaretskii
2022-11-18 12:41           ` Manuel Giraud
2022-11-18 12:51             ` Eli Zaretskii
2022-11-18 13:12               ` Manuel Giraud
2022-11-18 13:23               ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-18 13:40                 ` Manuel Giraud
2022-11-18 14:08                 ` Manuel Giraud
2022-11-18 14:14                   ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-18 14:31                 ` Eli Zaretskii
2022-11-18 13:20           ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-18 13:20       ` Manuel Giraud
2022-11-18 14:30         ` Eli Zaretskii
2022-11-18 15:20           ` Manuel Giraud
2022-11-18 15:26             ` Eli Zaretskii
2022-11-18 17:23               ` Manuel Giraud
2022-11-18 18:45                 ` Eli Zaretskii
2022-11-21 13:40                   ` Manuel Giraud
2022-11-21 14:23                     ` Eli Zaretskii
2022-11-21 14:46                       ` Manuel Giraud
2022-11-21 18:12                         ` Eli Zaretskii [this message]
2022-11-22  0:34                           ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-23 16:43                   ` Manuel Giraud
2022-11-23 17:31                     ` Eli Zaretskii
2022-11-24 13:49                       ` Manuel Giraud
2022-11-25 14:55                       ` Manuel Giraud
2022-11-25 15:00                         ` Manuel Giraud
2022-11-26 12:49                           ` Eli Zaretskii
2022-11-26 17:26                             ` Manuel Giraud
2022-11-26 17:38                               ` Eli Zaretskii
2022-11-27  0:51                                 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-27  6:40                                   ` Eli Zaretskii
2022-11-28 17:07                                     ` Manuel Giraud
2022-11-29  0:47                                       ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-29  8:00                                         ` Manuel Giraud
2022-11-29  9:37                                           ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-01 10:30                                             ` Manuel Giraud
2022-11-29 12:14                                         ` Eli Zaretskii
2022-11-29 12:19                                           ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-01 12:31                                       ` Eli Zaretskii
2022-12-01 16:23                                         ` Manuel Giraud
2022-12-01 16:50                                           ` Eli Zaretskii
2022-11-19  0:22                 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-19  9:19                   ` Manuel Giraud
2022-11-18 11:42 ` Eli Zaretskii
2022-11-18 12:12   ` Manuel Giraud
2022-11-18 12:26     ` Eli Zaretskii
2022-11-18 13:16       ` Manuel Giraud
2022-11-18 14:16         ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=834jus2n3b.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=59351@debbugs.gnu.org \
    --cc=luangruo@yahoo.com \
    --cc=manuel@ledu-giraud.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).