This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Pretty-printers auto-loading and static libraries


John,

On 01/14/2015 03:21 AM, John Gilmore wrote:
People who want to debug Ada programs with this pretty-printer can
create a .gdbinit in their working directory, or in their home
directory, that loads any pretty-printer that they want.

Yes, I am aware that automatic scripts loading features have security implications and I don't intend to introduce security breaches into GDB. The point is that GDB already has such auto loading facilities and ways to restrict them[1]. As far as I could see, these are even enabled by default on most distributions.

What I would like to do is to leverage this so that pretty-printers for Ada work out of the box, otherwise nobody will remember to use them (or will bother configuring things).

Besides, if I understand correctly, auto-loading pretty-printers, type printers and so on *only when useful* is important for performance reasons. If one has to configure GDB to load scripts for all the runtime/libraries he/she uses, this is going to make GDB's initialization longer and will likely make regular work longer because of lookups.

I also guess doing this would pollute the output for "info pretty-print", making it harder to enable/disable specific pretty-printers. I don't want to have Ada pretty-printers listed when I'm debugging some C++ only application. ;-)

[1] https://sourceware.org/gdb/onlinedocs/gdb/Auto_002dloading-safe-path.html#Auto_002dloading-safe-path

--
Pierre-Marie de Rodat


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]