Hello Paul,
I followed the steps but as soon as I try to edit the file when using gdb, the emacs windows freezes and I cannot do anything (I tried to open a local file, not on the network, with no encryption).
Here is what I did :
pwd
/home/bertrand/Emacs/emacs-24.4/src
gdb ./emacs
GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <
http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<
http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<
http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./emacs...done.
warning: File "/home/bertrand/Emacs/emacs-24.4/src/.gdbinit" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
To enable execution of this file add
add-auto-load-safe-path /home/bertrand/Emacs/emacs-24.4/src/.gdbinit
line to your configuration file "/home/bertrand/.gdbinit".
To completely disable this security protection add
set auto-load safe-path /
line to your configuration file "/home/bertrand/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual. E.g., run from the shell:
info "(gdb)Auto-loading safe path"
(gdb) source .gdbinit
SIGINT is used by the debugger.
Are you sure you want to change it? (y or n) [answered Y; input not from terminal]
DISPLAY = localhost:10.0
TERM = xterm
Breakpoint 1 at 0x5432ba: file emacs.c, line 351.
Temporary breakpoint 2 at 0x56507f: file sysdep.c, line 850.
(gdb) b fileio.c:5338
Breakpoint 3 at 0x58e027: file fileio.c, line 5338.
(gdb) r
Starting program: /home/bertrand/Emacs/emacs-24.4/src/emacs
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffea11c700 (LWP 2263)]
** (emacs:2259): WARNING **: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-eho0AgRKqo: Connection refused
[New Thread 0x7fffe928d700 (LWP 2265)]
[New Thread 0x7fffe8a8c700 (LWP 2267)]
[New Thread 0x7fffd80a7700 (LWP 2268)]
[New Thread 0x7fffd78a6700 (LWP 2269)]
[Thread 0x7fffd78a6700 (LWP 2269) exited]
[New Thread 0x7fffd78a6700 (LWP 2270)]
[Thread 0x7fffd80a7700 (LWP 2268) exited]
[New Thread 0x7fffd80a7700 (LWP 2272)]
[Thread 0x7fffd78a6700 (LWP 2270) exited]
Breakpoint 3, Fverify_visited_file_modtime (buf=29001941) at fileio.c:5338
5338 if (timespec_cmp (mtime, b->modtime) == 0
(gdb)
(gdb) quit
A debugging session is active.
Inferior 1 [process 2259] will be killed.
Quit anyway? (y or n) y
I had to quit the gdb session as the emacs windows froze (repeated the procedure 3 times and it froze each time).