Subject: bug#59351: 29.0.50; [PATCH] Fix mouse click position to menu bar entry

From: Eli Zaretskii <[email-masked]>
Date: Mon, 21 Nov 2022 16:23:01 +0200

> From: Manuel Giraud <[email-masked]>
> Cc: Manuel Giraud <[email-masked]>,  [email-masked],
>   [email-masked]
> 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?

> I guess that this is an issue with thread but maybe there is some tricks
> to debug a threaded emacs.  I cannot find hindsights in "etc/DEBUG".  I
> also tried to compile "--without-threads" but it seems to be for elisp
> support.

This has nothing to do with --without-threads, so no need to rebuild Emacs.
The only thing you need to make sure is that Emacs is build without
optimizations (-O0 compiler switch) and with -g3 (to include detailed debug
info including macros).