On 17/11/11 14:56, Neil Williams wrote:
On Thu, 17 Nov 2011 13:11:08 +0000
Philip Ashmore<cont...@philipashmore.com>  wrote:

While useful, debug symbolsonlyhelp so much.
On some other distributions the debugging symbols package includes the source 
code
and kdbg integration so that kdbg can prompt you to download the dbg package 
while
you're debugging an app.

Even with this, optimization can make the instruction pointer appear to dart all
over the place when single stepping, and also optimizes out variables that you
would sometimes really like to know the value of.

Maybe a "noopt" package variant would help here, but that would nearly double 
the
number of package builds.

Wasn't there a gcc objective to tame this with release builds?

Looking at "Re: Could the multiarch wiki page be explicit about pkgconfig 
files?"
I've seen debugging symbols point to source files all over the place, depending
on who or how the package in question was built, none of which pointed to
/usr/lib/debug or similar.

Developers new to Debian can't fail to be surprised by this.
The path doesn't matter that much, as long as the debugger can find a
filename which at least matches the end of the path. i.e. work
backwards and use the best match. This isn't down to Debian, it is down
to how gcc and gdb work together and how developers need to use gdb or
other tools frontending gdb to set the path to the unpacked sources.
Some tools do it better than others, especially when considering how to
follow a call down through a couple of different libraries.

You mean as long as the user knows where the sources are supposed to be installed, such as
/usr/src/foo-1.2/src/foo-widget.cpp
, presuming they are even installed or the user downloaded (the matching version of) them.

The debugger will only find the file itself if the debugging information contains an absolute path.

The choice of root folder, for example /usr/src/foo-1.2 or /usr/src/{build-id}/foo-1.2
is Debian specific.

The tools which Debian supplies should also use it so that the sources get installed there.

Hopefully one day, the Debian build tools will alter the debugging information to point to this location regardless of where the sources really were when the package was built.

Could this be a build option?

Also, if source packages from deb-src could be "installed", populating /usr/src then that would
avoid having to package "source" binary packages, and be version-safe.

Philip


--
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/4ec56826.1070...@philipashmore.com

Reply via email to