How do I disable all the symbol loading messages at the beginning of the session?

  • 30 June 2021
  • 7 replies
  • 30 views

Badge +1

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 off

this 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-loading
Set printing of symbol loading messages.
off == turn all messages off
brief == print messages for the executable,
and brief messages for shared libraries
full == print messages for the executable,
and messages for each shared library.

 


7 replies

Badge

This works for LiveRecorder recordings, but not for normal programs as the program to debug is loaded before the init file is loaded.

I’m currently looking at this bug, so this is likely to work in the first minor release after 6.4.

Badge

I’m not sure about subsequent libraries, but you will be happy to know that the order initialisation files and options are dealt with will be documented on docs.undo.io once I’m done fixing it.

Badge +1

@etesta When loading a recording do we display messages for all libraries used at any time in the recording, or is it for those mapped at the start of the recording?  And if the latter I assume we would display them during replay when they get loaded - what if a user wants those incremental messages but not the start-of-recording long list...would the best thing to do here to add -x set print symbol-loading full in a udb alias, or does that get executed too early and nullify any setting in .udbinit?

@mbarisione The issue with live debug sessions is only a problem when attaching to a running process, right?  On attach you potentially get lots of output for libraries the application already loaded, and there’s no way currently to avoid that.  The setting in .udbinit would take effect before you run the program though, so if you’re starting up within udb you can suppress as described.

Badge +1

I’ve created a product idea related to this. Not sure if it’s useful to many users - upvote if you want to see it!

Badge +1

@etesta When loading a recording do we display messages for all libraries used at any time in the recording, or is it for those mapped at the start of the recording?

By reading the documentation it feels like it should be for all symbol loading related messages

  And if the latter I assume we would display them during replay when they get loaded - what if a user wants those incremental messages but not the start-of-recording long list...would the best thing to do here to add -x set print symbol-loading full in a udb alias, or does that get executed too early and nullify any setting in .udbinit?

You make it too hard @Bruce :) After loading the recording you end up in a UDB prompt from where you can comfortably type:

start 1> set print symbol-loading full

I tried setting symbol-loading using the -x but it didn’t work

 

Badge

The correct order for loading files and executing commands (as done by GDB and, hopefully, the next version of UDB) is:

  1. Initialisation files are loaded.
  2. Commands specified with -iex and files specified with -ix are executed (in the order they are specified on the command line).
  3. The program to debug and its symbols are loaded.
  4. Commands specified with -ex and files specified with -x are executed (in the order they are specified on the command line).

This doesn’t match the behaviour of UDB up to version 6.4:

  1. Commands specified with -iex and files specified with -ix are executed (in the order they are specified on the command line).
  2. The program to debug and its symbols are loaded.
  3. Initialisation files are loaded.
  4. Commands specified with -ex and files specified with -x are executed (in the order they are specified on the command line).
Badge +1

Thanks @mbarisione. I couldn’t readily find that info, `man gdb` wasn’t terribly helpful, not like you! :wink:

So to summarise, with udb at present if people want to disable the messages when attaching to a process, they can use -iex or -ix.  At the moment using an init file won’t work in this case, but will in the near future.  Either works when loading a recording.

In theory, they could use -ex or -x to re-enable symbol-loading messages from that point onwards in the session. I say, “in theory” because in my experimentation those messages don’t appear when subsequent libraries are loaded by the inferior and their symbols are read (either in udb or gdb).  Is there a distinct setting for that?

Reply