Others on this list might have specific knowledge of the objects you
listed, but I am going to present a general solution that hopefully will
let you find the answers you seek.
If you have libmpi.a build from sources configured with --enable-debug,
then the source file information is stored in the object files. You can
use gdb to extract this information.
I don't have an openmpi-1.6.x build on hand, but here is an example with
the current trunk.
None of the files you listed are present in this build, so I've picked one
of the profiling objects as an example. You should replace "[libdir]" with
your actual openmpi installations lib directory.
-bash-4.2$ ar x [libdir]/libmpi.a pcart_create.o
-bash-4.2$ gdb -q pcart_create.o
Reading symbols from
1 pcart_create.c: No such file or directory.
(gdb) info source
Current source file is pcart_create.c
Compilation directory is
Source language is c.
Compiled with DWARF 2 debugging format.
Does not include preprocessor macro info.
Notice I used 2 commands in gdb: "list" and "info source".
The "list" appears to fail because the source directory has been deleted.
However, the "list" step is required to make gdb read the source info from
the object (or "info source" will fail).
The output from the second command, "info source", is the important part:
+ The first is the name (without directory) of the source file.
+ The second is the directory in which the .o file was created.
That directory (for files generated at build time) or its "twin" in the
source tree (for normal source files) are the likely places to find the
I hope that helps,
If others have shorter sequences to get the same debug info from an object,
I am curious to hear them.
On Wed, Jan 22, 2014 at 8:57 PM, Irvanda Kurniadi <irvanda.k_at_[hidden]>wrote:
> I'm trying to port openmpi-1.6.5 in l4/fiasco. I checked the libmpi.a. I
> did the " ar t libmpi.a " in my terminal. I can't find the source file (.c)
> of some object files created in libmpi.a, such as:
> dt_add.o dt_args.o .. dt_sndrcv.o (15 files)
> Can you tell me where is the source of those object files? Because I have
> to compile every single .c file in openmpi which is needed to be compiled.
> devel mailing list
Paul H. Hargrove PHHargrove_at_[hidden]
Future Technologies Group
Computer and Data Sciences Department Tel: +1-510-495-2352
Lawrence Berkeley National Laboratory Fax: +1-510-486-6900