Project

General

Profile

Bug #6701

gdb can't see source code for packages due to moving the build

Added by Christopher Backhouse over 5 years ago. Updated about 3 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Category:
-
Start date:
07/28/2014
Due date:
% Done:

0%

Estimated time:
Duration:

Description

At Caltech, gdb traces into packages' source code, but at Fermilab, if the package isn't in your test release you just get something like

/build/nova/novasoft/releases/development/Calibrator/art/Calibrator_service.cc: No such file or directory.

This is because the build is done in one place on the build machine, where the paths are baked in, and then copied to its final destination. At Caltech the builds are in-place.

I'm not sure what to suggest as a solution. Options include: in-place builds, mimicking the /grid/fermiapp/ directory structure on the build machine, finding some magic switch to gcc that allows you to specify a different path, or WONTFIX-ing this.

Similar comments apply to all our externals.

History

#1 Updated by Kanika Sachdev over 5 years ago

Which version of gdb are you using? I don't have very many packages in my test release, and I don't see a problem like this.

#2 Updated by Christopher Backhouse over 5 years ago

It says v7_7_current_20140611

I mean, it still works, but it's less useful than it could be. You should be able to inspect the values of local variables and so on in each stack frame.

#4 Updated by Christopher Backhouse over 5 years ago

I improved things by putting this in my ~/.gdbinit

set substitute-path /build/nova/externals/ /nusoft/app/externals/
set substitute-path /data/build/slf5/art-1.09.00/ /nusoft/app/externals/
set substitute-path /data/build/slf5/art-1.10.00/ /nusoft/app/externals/
set substitute-path /build/nova/novasoft/ /grid/fermiapp/nova/novaart/novasvn/

The different versions is because of art externals that didn't get rebuilt from one release to the next. This is actually pretty cool, it lets you see inside the C library implementation (STL etc) and ROOT and geant and so on, as well as novasoft.

This doesn't work for the ART externals, because apparently they're built in a src/ directory while we have a source/ directory in $EXTERNALS. And something else, I forgot what (nutools), was built in a cet/ directory we don't have. You could add lines specifically for those, but they'd have to be version specific, because the divergence is at too deep a directory.

It's a shame that to get this you need to edit a dot file (I don't think gdb checks any environment variable). Do we have somewhere where we tell people how to get a sensible .bashrc, .rootrc, .emacs, etc?

#5 Updated by Christopher Backhouse over 5 years ago

s/the ART externals/ART itself/

#6 Updated by Alexander Himmel about 3 years ago

  • Status changed from New to Rejected


Also available in: Atom PDF