I fixed the filename being searched for via the following.
@@ -178,7 +185,8 @@ for frame in report['Stacktrace'].splitlines(): m = src_frame.match(frame) if m: - result += frame + '\n' + get_code(srcdir, m.group(1), int(m.group(2))) + filename = m.group(1).split("/")[-1] + result += frame + '\n' + get_code(srcdir, cache, filename, int(m.group(2)))
Then a StacktraceSource looked like this:
#3 0x00007ffff776889d in XtAppMainLoop (app=0x6090e0) at ../../src/Event.c:1554 [Error: Event.c was not found in source tree] #4 0x000000000040198f in main (argc=1, argv=<optimized out>) at ../xeyes/xeyes.c:137 132: 133: (void) XtCreateManagedWidget ("eyes", eyesWidgetClass, toplevel, NULL, 0); 134: XtRealizeWidget (toplevel); 135: (void) XSetWMProtocols (XtDisplay(toplevel), XtWindow(toplevel), 136: &wm_delete_window, 1); 137: XtAppMainLoop(app_context); 138: 139: return 0; 140: }
I fixed the filename being searched for via the following.
@@ -178,7 +185,8 @@ 'Stacktrace' ].splitlines( ): match(frame) 1).split( "/")[-1]
for frame in report[
m = src_frame.
if m:
- result += frame + '\n' + get_code(srcdir, m.group(1), int(m.group(2)))
+ filename = m.group(
+ result += frame + '\n' + get_code(srcdir, cache, filename, int(m.group(2)))
Then a StacktraceSource looked like this:
#3 0x00007ffff776889d in XtAppMainLoop (app=0x6090e0) at ../../src/ Event.c: 1554 xeyes.c: 137 Widget ("eyes", eyesWidgetClass, toplevel, NULL, 0); toplevel) , XtWindow(toplevel), app_context) ;
[Error: Event.c was not found in source tree]
#4 0x000000000040198f in main (argc=1, argv=<optimized out>) at ../xeyes/
132:
133: (void) XtCreateManaged
134: XtRealizeWidget (toplevel);
135: (void) XSetWMProtocols (XtDisplay(
136: &wm_delete_window, 1);
137: XtAppMainLoop(
138:
139: return 0;
140: }