Share your best practices
Share use cases, tips & ideas with other customers
- 7 Topics
- 8 Replies
A lot of people use the good old DDD as a graphical user interface to GDB and they would like to continue using it with UDB as well. The good news is that up to version 6.3 it “just worked”, you could launch DDD with$ ddd --debugger udb <args>and you would find yourself in the familiar environment you are so used to. The “bad” news is that from version 6.4 Undo introduced a nice feature (if you use UDB directly) that disrupted DDD: the smart prompt. This made DDD unable to show the source code of the program being debugged: DDD not showing the source code because of the new prompt DDD relies on the prompt being something it knows in order to work with UDB so having something that changes constantly is not exactly good. Thankfully the answer is surprisingly simple: you can set the prompt back to `(gdb) ` (beware of the space after the closing bracket!!) with the following line in your `.udbinit`: set prompt (gdb) I now have a working DDD again: DDD showing the source code thanks t
In this thread https://community.undo.io/ideas/script-to-automatically-load-symbols-in-recordings-102I 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.pystart 1> load-all-symbols /path/to/dir/with/symbolsLoading separate debug info for libwatchdog.so from /path/to/dir/with/symbols/lib/libwatchdog.so.debugLoading 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 sym
Every time I load a recording I get loads of lines with messages about loading symbols. I’m not interested, I want them off. How do I disable them? The simplest way to do that is to add the following line to your `.udbinit`: set print symbol-loading offthis will disable the output entirely. If you want a shorter version of the messages but still want to see something the following are the options you have:not running> help set print symbol-loadingSet printing of symbol loading messages.off == turn all messages offbrief == print messages for the executable, and brief messages for shared librariesfull == print messages for the executable, and messages for each shared library.
This conversation derives from one which started from a related idea.@Bruce wrote:@david_griffiths Your “signature” idea is similar to one that’s been floating around for a while (pre-dating this community otherwise I’d share a link) around byte-counting.The concept, as I’ve always understood it, is that we would match up corresponding file descriptors in two processes, and set a point in each recording where the exchange of data is in sync. From that point we can inspect reads and writes and by counting bytes exactly correlate the flow of bytes between those recordings. There’s a little more work to set the initial “in-sync” point when the fds aren’t opened within the recording, but if you get that alignment then no fuzziness would be required.This approach might actually be best for you if you want to fully-automate your navigation in twin recordings, but it feels like the improvement to recording wallclock resolution could be very useful in manual navigation relatively cheaply. @d
In Recording without debugging symbols there are lots of descriptions of actual commands but there is no workflow description.I found out that one of our customers does the following to load the symbols in their recordings: set sysroot /set debug-file-directory /standard/path/to/debug/buildset solib-search-path /standard/path/to/debug/build/libuload <your recording>file /standard/path/to/debug/build/<executable> How do you load the symbols in your recordings?
How to use a recording that has no debugging symbols For various reasons you might find yourself recording a program that has been stripped of its symbols or you might want to keep the size of the recording to a minimum and not saving the symbol files is an easy win.BUT.A recording is not like a live process and adding symbols to it in UDB can be somewhat confusing.In this article I’ll explain how to add symbols to a recording in UDB in order to render it usable.This is a quick overview of the most common commands you might wan to use when you need to add symbols to your recording.What’s in your toolboxUDB (and GDB) have several commands that allow you to control all aspects of symbol loading. Let’s take a look.Commands to modify the path where to look for symbolsA running program is composed by (mainly) 2 components: the binary file that constitutes the main application and a number of shared libraries linked into it at runtime.You might therefore face a recording that is lacking symb
Sometimes you want to stop recording a process before it has finished, leave it running and save what’s been recorded so far.for example you might want to reproduce a problem that doesn’t end up in a crash on a production system.Thankfully it is rather easy to stop recording and monitoring when the recording file is stable / complete. There are several processes involved when recording software. Two are relevant for this scenario:live-record nannyI will not explain what these actually do normally. Let’s just say that live-record is the front-end and nanny the back-end.By signalling your intention to the front-end the back-end will do what you want. Signalling the intention to stop recordingThis is achieved by sending a signal to live-record: $ kill -USR1 <pid of live-record> live-record will then tell nanny to stop recording, detach and save the recording to disk. Monitor the recording creation Nanny will start straight away but it might take some time to completely write the rec
Already have an account? Login
Login to the community
No account yet? Create an account
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.