Allow easy installation of -dbgsym packages

Bug #65283 reported by Paul Sladen
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
Fix Released
Wishlist
Unassigned
pkg-create-dbgsym (Ubuntu)
Won't Fix
Wishlist
Unassigned

Bug Description

If I'm trying to debug package 'foo', by fetching the '-dbgsym' for that application, it would be handy if dbgsymbols for all of the libraries dependencies of that application could also be installed.

Using 'Suggests:' or the new 'Recommends:' setup would allow these packages (which are fairly small) to be pulled in. They would also automatically be removed when the application-level debug symbols are removed and would not break a the setup if removed directly.

Tags: pet-bug
Paul Sladen (sladen)
Changed in apport:
importance: Undecided → Wishlist
Martin Pitt (pitti)
Changed in apport:
status: Unconfirmed → Confirmed
Changed in pkg-create-dbgsym:
assignee: nobody → pitti
Revision history for this message
Karl Hegbloom (karl.hegbloom) wrote :

I like that idea. I would also like the application package itself to Suggest it's own -dbgsym, perhaps...

There at least ought to be an easy way to quickly install an application's -dbgsym along with all library -dbgsym packages, transitively. Given the 'Suggests:' headers for the -dbgsym packages themselves, is there already an 'apt-get' command line that could do it? Hmmm... I see no command line option for having 'apt-get' install the 'Suggests:', and find no documentation for a configuration option to do so. 'aptitude' has the "--with(out)-recommends" option, but none for 'Suggests:'. It probably has a configuration option.

Given that, I'd say a new tool needs to be written, if nothing but a wrapper around 'apt-get' or 'aptitude'. 'apport' is great, but afaik, has no command line tool I can use to get the dbgsym packages I need to attempt a debug myself should I choose to do so.

Also pertinent to this... where is the HOWTO that explains how I should arrange my source code directory where I use either 'apt-get source' or (perhaps better and better integrated or someday rolled into 'apt-get' itself)... , 'apt-src' --- to get the matching source package, and then how to configure 'gdb' so that it finds those sources?

I think that the source location is embedded in the debug information already, and that gdb has a way to substitute parts of a path with another or something... if it could blat off an unknown-in-advance length of path from the front and paste on the prefix I give it, that would be great. I'd maybe also like to not have to put all of the source packages I have into the same subdirectory, preferring to organize them according to ... whatever, like maybe "Video", "ProgLang", or somebody else's favorite layout, one or more levels deep, probably all starting at the same tree though, right? "~/src/".

So, supplying a nice .gdbinit for that would be useful, if SOMEBODY will write one down really quick.

Revision history for this message
Karl Hegbloom (karl.hegbloom) wrote :

Hey, what if the application 'Suggests:' it's own "-dbgsym", and then the "-dbgsym" 'Recommends:' the dependent library "-dbgsym" packages? Library packages should also then 'Suggests:' their own "-dbgsym". Also, it makes sense that the "-dev" package ought to 'Recommends:', rather than 'Suggests:' the related "-dbgsym", right?

I think it can all be done by adding entries to the "substvars" file... or something. Hmmm... another excursion. L8r.

Revision history for this message
Tristan Schmelcher (tschmelcher) wrote :

+1

This would be extremely useful for debugging. I don't think there's any need for a new tool though, the dbgsym packages can just Recommend: all the other ones, or even require them. Or alternatively we could leave them alone and have new meta-packages that require the transitive dbgsyms, e.g. "gnome-foo-dbgsym-all".

Revision history for this message
goto (gotolaunchpad) wrote :

+1

Would be a really really cool feature!
Then Apport only had to suggest to install them automatically after the first crash. But that's bug 304129.
Thanks.

Martin Pitt (pitti)
Changed in pkg-create-dbgsym (Ubuntu):
status: Confirmed → Triaged
Martin Pitt (pitti)
Changed in pkg-create-dbgsym (Ubuntu):
assignee: Martin Pitt (pitti) → nobody
Revision history for this message
Loïc Minier (lool) wrote :

apport/backends/packaging-apt-dpkg.py has logic to install -dbgsym packages, I think this is for retracing.

Perhaps just splitting this functionality in a separate tool would be enough to resolve this bug?

(I personally don't like using package dependencies here because they quickly get overloaded with differing purposes.)

summary: - Make application -dbgsym packages Recommend: depended libraries
+ Allow easy installation of -dbgsym packages
Loïc Minier (lool)
Changed in apport (Ubuntu):
status: New → Triaged
importance: Undecided → Wishlist
Revision history for this message
Paul Sladen (sladen) wrote :

Loic: IIRC, this bug was about ensuring that apt-get installing a -dbgsym would bring (by default via Recommends:) all of the other -dbgsyms that you would like want in a typical case.

...and once removed, the autoremove stuff would allow getting rid of that unused tree of packages too.

You /could/ simply that to "make stuff easy", but it's kind of missing the point!

Revision history for this message
Tristan Schmelcher (tschmelcher) wrote :

Personally I think this is a totally valid use of Recommends:, I wouldn't call it an "overloading" at all. Though a special tool to install the dbgsym packages of the dependencies would be basically equivalent, IMHO.

Revision history for this message
Martin Pitt (pitti) wrote :

apport-retrace with the --sandbox option does that job quite nicely these days. If you install the package, you get an "Examine locally.." button in crash dialogs that will throw you into either a gdb session or give you a full stack trace without having to do anything manually. That's about as far as we'll get this I think, and thus I close the bug now.

Changed in pkg-create-dbgsym (Ubuntu):
status: Triaged → Won't Fix
Changed in apport (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.