On Jan 29, 4:24pm, Martin M. Hunt wrote:
I am trying to answer a question about debugging threaded applications
when auto-solib-add is off. You cannot debug pthreads programs without
first loading the symbols for libpthread.
Given that, does it make sense to modify solid_add to always read the
symbols for libpthread, if it is in the library list?
I'm not in favor of this.
Or is expected the user knows enough to always immediately do "shar
libpthread" after starting debugging a threaded program?
IMO, when the user disables auto-solib-add, then the user is
responsible for "hand" loading the shared libraries needed for
debugging the program.
Can you elaborate a bit on what it is about this you don't like? This
doesn't strike me as terribly intuitive behavior, since (unlike most
other shared libraries), not having the symbols loaded effects the
operation of things other than just the stack trace commands (at least
"info threads"). It's worth keeping in mind that with larger software
projects (eg Mozilla), developers may be turning auto-solib-add off
because, given performance constraints, there's no practical alternative
if you don't have a suitably beefy machine.