lttng: Do not throw exception if callsite binary is missing
authorAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Sat, 24 Oct 2015 18:46:05 +0000 (14:46 -0400)
committerAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Fri, 30 Oct 2015 00:25:09 +0000 (20:25 -0400)
If a trace with debug information is opened on a different machine
than the one where it was taken, it's very possible for the referred
binary files to not be present. In such a case it should not throw
an exception, but simply return that no source callsite information
is available.

The (upcoming) "binary callsite" information should still be available
in such cases though.

Change-Id: I5c3c77d9086b1445b8a1b11e8bb312929321d7f3
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Reviewed-on: https://git.eclipse.org/r/58883
Reviewed-by: Hudson CI
Reviewed-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Tested-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
lttng/org.eclipse.tracecompass.lttng2.ust.core/src/org/eclipse/tracecompass/internal/lttng2/ust/core/analysis/debuginfo/FileOffsetMapper.java

index 724bf56af868a92907dcf5fa50d4d201cc2f8090..fb91b4a6a26295e29d2aab67a67c2fab3a6ddc19 100644 (file)
@@ -52,7 +52,7 @@ public final class FileOffsetMapper {
      */
     public static @Nullable Iterable<TmfCallsite> getCallsiteFromOffset(File file, long offset) {
         if (!Files.exists((file.toPath()))) {
      */
     public static @Nullable Iterable<TmfCallsite> getCallsiteFromOffset(File file, long offset) {
         if (!Files.exists((file.toPath()))) {
-            throw new IllegalArgumentException();
+            return null;
         }
         return getCallsiteFromOffsetWithAddr2line(file, offset);
     }
         }
         return getCallsiteFromOffsetWithAddr2line(file, offset);
     }
This page took 0.041011 seconds and 5 git commands to generate.