Definitely looks like a bug, please file an issue on the tracker with that testcase.
- Alon On Thu, Oct 30, 2014 at 1:59 PM, Warren Seine <[email protected]> wrote: > I finally had the time to make a test case, and indeed, there's a bug in > the source mapper. Please download this archive > <https://www.dropbox.com/s/uologjerfce1q8e/source-map-test.tar.bz2?dl=0> > and run "make" on Linux / OS X. This example will build a library and a > program, all with -g4. > > Here's the output if you don't want to bother compiling: > > ▶ make > make -C libfoo > em++ -g4 -o foo.o -c src/foo.cpp > emar rcs libfoo.a foo.o > make -C bar > em++ -g4 -o bar.o -c src/bar.cpp -I../libfoo/src > emcc -g4 -o bar.bc bar.o -L../libfoo -lfoo > emcc -g4 -o bar.html bar.bc > sourcemapper: Unable to find original file for src/foo.cpp at > /Users/Warren/Downloads/source-map-test/bar/src/foo.cpp > > I have noticed that if I move the source files in their parent directory, > the source mapper doesn't produce this error. I suspect the source mapper > is confused by the fact that both the library and the program source files > are located in a "src" directory. > > Cheers, > Warren. > > On Tuesday, July 1, 2014 11:23:08 AM UTC+2, Warren Seine wrote: >> >> Hi, >> >> I can generate source maps for my main program, but when linking >> libraries generated from different paths, the source mapper can't find the >> source files for libraries. The source mapper doesn't allow to specify >> multiple look-up paths and even if it did, I'm sure it'd introduce new >> issues. >> >> Here are the questions: >> >> - What's the current status for the Emscripten source mapper? Are >> people really able to use it to debug large codebases including libraries? >> - Would it be possible to build each source map when building >> libraries, and somehow merge them when linking? >> - If not, what's the workaround? Using absolute paths when building? >> >> Thanks, >> > -- > You received this message because you are subscribed to the Google Groups > "emscripten-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
