Symbol loading - a new script to simplify your life

  • 8 July 2021
  • 0 replies
  • 36 views

Badge +1

In this thread https://community.undo.io/ideas/script-to-automatically-load-symbols-in-recordings-102

I discussed how to load symbols and it involved a few UDB commands and a somewhat awkward workflow.

 

I then spent some time trying to figure out a better way to go around this and finally came up with a script that is rather terse.

 

You can find it here

 

The beauty of this script is that it will allow for a much simpler workflow:

 

$ udb <recording>
...
...
start 1> source /path/to/automatic_symbol_loading.py
start 1> load-all-symbols /path/to/dir/with/symbols
Loading separate debug info for libwatchdog.so from /path/to/dir/with/symbols/lib/libwatchdog.so.debug
Loading separate debug info for libunwind.so from /path/to/dir/with/symbols/lib/libunwind.so.debug
...
start 1>

If you want you can also add the sourcing to your `.udbinit` in order to have the command loaded every time you invoke UDB.

 

The only thing you will need to be aware of is the fact that the script will load all the symbols for the objects that are loaded at this point in time in UDB, it will not load symbols for objects loaded later on.

 

A trick to avoid the problem is to first go to the end of the recording and then invoke `load-all-symbols`.

 

Let me know how it works for you :)


0 replies

Be the first to reply!

Reply