Suppose the gecko folder is /home/cm/Work/gecko-dev
Add the following lins to your /home/cm/Work/gecko-dev/.gdbinit
add-auto-load-safe-path /home/cm/Work/gecko-dev/build/.gdbinit
add-auto-load-safe-path /home/cm/Work/gecko-dev/toolkit/library/libxul.so-gdb.py
The above settings will ignore the SIGSYS comming constantly. See more here
Add the following lins to your $HOME/.gdbinit
set auto-load local-gdbinit on
add-auto-load-safe-path /home/cm/Work/gecko-dev/.gdbinit
If you need to do something constantly (e.g., add breakpoints), it's best to make it as a script so it could be performed automatically
For example, you can create a gecko-dev/gdb.script with the following commands:
show auto-load
break dom/media/ChannelMediaResource.cpp:519
break dom/media/MediaCache.cpp:2696
info break
Now, everytime when gdb
is run,
/home/cm/Work/gecko-dev/.gdbinit
would be loaded,
and then /home/cm/Work/Work/gecko-dev/build/.gdbinit
and its friends would be loaded.
If you have a gdb script named gdb.script
and you want to attach to process 8529
,
you can do
gdb --pid=8529 --command=gdb.script