I’m absolutely new to reading firefox codebase and I have been trying to debug it with gdb for a few days.
The desktop OS is Ubuntu 18.04 and I cloned mozilla-central code repository by mercurial. the revision is 460243:7fba2ab9df84.
I found the program entry point (the ‘main’ function) in browser/app/nsBrowserApp.cpp.
Then I encountered a warning in the gdb session:
warning: Missing auto-load script at offset 0 in section .debug_gdb_scripts
of file /home/mozillahack/usr/local/share/mozilla/firefox/obj-x86_64-pc-linux-gnu/dist/bin/libxul.so.
Use `info auto-load python-scripts [REGEXP]' to list them.
This was displayed at line 282 in nsBrowserApp.cpp.
The code is:
nsresult rv = InitXPCOMGlue();
I typed info auto-load python-scripts .*
and the result was:
(gdb) info auto-load python-scripts .*
Loaded Script
Yes /home/mozillahack/usr/local/share/mozilla/firefox/obj-x86_64-pc-linux-gnu/toolkit/library/libxul.so-gdb.py
Yes /usr/share/gdb/auto-load/lib/x86_64-linux-gnu/libpthread-2.27.so-gdb.py
Yes /usr/share/gdb/auto-load/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.5600.3-gdb.py
Yes /usr/share/gdb/auto-load/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.25-gdb.py
No gdb_load_rust_pretty_printers.py
However I don’t have any knowledge to understand and solve this.
Please help.
My $HOME/.gdbinit is :
$ cat ~/.gdbinit
add-auto-load-safe-path /home/mozillahack/usr/local/share/mozilla/firefox/.gdbinit
add-auto-load-safe-path /home/mozillahack/usr/local/share/mozilla/firefox/obj-x86_64-pc-linux-gnu/toolkit/library/libxul.so-gdb.py
P.S English is not my native language; please excuse typing, grammar or/and word selecting errors.