Jailbroken iOS: line number of source for framwork/library in GDB-Collection of common programming errors

I statically compiled JavaScriptCore source in debug mode given at opensource.apple.com for iOS. Purpose is to examine an App that uses JavaScriptCore at runtime. I have no source for the App I’m examining on a jailbroken device.

As such I’m thinking of attaching LLDB/GDB to the app at runtime and load the line number and extensive symbol information from the JavascriptCore.a file we compiled.

I tried using

(gdb) add-symbol-file /path/to/libJavaScriptCore.a 

inside GDB but only to get warning: section LC_SEGMENT.__TEXT not found in /path/to/someIntermediateObjectFile.o

Any others ideas on how that can be achieved?