Thanks.
I just tried to do that, but I don't see any line number.

I did this:
<pre>
setenv USER_CXXFLAGS "-O0 -g"
scram b -v -k
setenv PYTHONHOME /afs/cern.ch/cms/sw/ReleaseCandidates/vol1/slc5_amd64_gcc481/external/python/2.7.3-cms
gdb --args cmsRun test.py
</pre>
and this is what I get:
<pre>
#0  __cxxabiv1::__cxa_throw (obj=0x2aab0e134980, tinfo=0x2aaaab7b8140 <typeinfo for edm::Exception>, dest=0x2aaaab76b030 <edm::Exception::~Exception()>)
    at ../../../../libstdc++-v3/libsupc++/eh_throw.cc:71
#1  0x00002aaaab201e47 in edm::RefCore::productNotFoundException(std::type_info const&) const ()
   from /afs/cern.ch/cms/sw/ReleaseCandidates/vol1/slc5_amd64_gcc481/cms/cmssw/CMSSW_7_1_X_2014-03-27-0200/lib/slc5_amd64_gcc481/libDataFormatsCommon.so
#2  0x00002aaaab2020a3 in edm::RefCore::getProductPtr(std::type_info const&) const ()
   from /afs/cern.ch/cms/sw/ReleaseCandidates/vol1/slc5_amd64_gcc481/cms/cmssw/CMSSW_7_1_X_2014-03-27-0200/lib/slc5_amd64_gcc481/libDataFormatsCommon.so
#3  0x00002aaad92bfb0f in void RecoTrackAccumulator::accumulateEvent<PileUpEventPrincipal>(PileUpEventPrincipal const&, edm::EventSetup const&, edm::Handle<std::vector<reco::Track, std::allocator<reco::Track> > >, edm::Handle<std::vector<reco::TrackExtra, std::allocator<reco::TrackExtra> > >, edm::Handle<edm::OwnVector<TrackingRecHit, edm::ClonePolicy<TrackingRecHit> > >) ()
   from /afs/cern.ch/work/g/giamman/fastsim/mixing/CMSSW_7_1_X_2014-03-27-0200/lib/slc5_amd64_gcc481/pluginFastSimulationTrackingPlugins.so
#4  0x00002aaad92be71c in RecoTrackAccumulator::accumulate(PileUpEventPrincipal const&, edm::EventSetup const&, edm::StreamID const&) ()
   from /afs/cern.ch/work/g/giamman/fastsim/mixing/CMSSW_7_1_X_2014-03-27-0200/lib/slc5_amd64_gcc481/pluginFastSimulationTrackingPlugins.so
#5  0x00002aaada1a517e in edm::MixingModule::accumulateEvent(PileUpEventPrincipal const&, edm::EventSetup const&, edm::StreamID const&) ()
   from /afs/cern.ch/cms/sw/ReleaseCandidates/vol1/slc5_amd64_gcc481/cms/cmssw/CMSSW_7_1_X_2014-03-27-0200/lib/slc5_amd64_gcc481/pluginSimGeneralMixingModulePlugins.so
#6  0x00002aaada1a52c5 in edm::MixingModule::pileAllWorkers(edm::EventPrincipal const&, edm::ModuleCallingContext const*, int, int, int&, edm::EventSetup const&, edm::StreamID const&) ()
   from /afs/cern.ch/cms/sw/ReleaseCandidates/vol1/slc5_amd64_gcc481/cms/cmssw/CMSSW_7_1_X_2014-03-27-0200/lib/slc5_amd64_gcc481/pluginSimGeneralMixingModulePlugins.so

etc.
</pre>
What am I missing?