[oi-dev] GDB in hipster
ken mays
maybird1776 at yahoo.com
Thu Oct 2 03:26:10 UTC 2014
Aurelien,
Can you use 'pstack' and 'pflags' ? They are included.
~K
On Monday, September 29, 2014 10:47 PM, Alexander Pyhalov <alp at rsu.ru> wrote:
On 09/30/2014 03:24, Aurélien Larcher wrote:
> Hi Alexander,
> thank you for your reply.
> The only specific thing is that the code I develop uses MPI.
> I just checked if just calling a simple MPI_Init causes issues but I do not
> have much time right now so I just quickly copied a code snippet.
> I will get back to you later this week possibly.
>
> ------------------------------------------
> alarcher at phainos> cat mpi_init.c
> #include <mpi.h>
>
> int main(int argc, char* argv[])
> {
> int initialized;
> MPI_Initialized(&initialized);
>
> if(!initialized)
> {
> MPI_Init(&argc, &argv);
> }
> return 0;
> }
> alarcher at phainos> gcc -ggdb mpi_init.c `pkg-config --libs mpich`
> alarcher at phainos> gdb ./a.out
> GNU gdb (GDB) 7.6.2
> Copyright (C) 2013 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html
>>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law. Type "show copying"
> and "show warranty" for details.
> This GDB was configured as "i386-pc-solaris2.11".
> For bug reporting instructions, please see:
> <http://www.gnu.org/software/gdb/bugs/>...
> Reading symbols from /home/alarcher/hipster/gdb/a.out...done.
> (gdb) run
> Starting program: /home/alarcher/hipster/gdb/./a.out
> procfs:3974 -- process not stopped.
> procfs: ...giving up...
> (gdb) q
> A debugging session is active.
>
> Inferior 1 [process 3696] will be killed.
>
> Quit anyway? (y or n)
Still no luck.
$ gdb ./a.out
(gdb) break MPI_Init
(gdb) run
Starting program: /export/home/alp/srcs/tests/./a.out
[Thread debugging using libthread_db enabled]
[New Thread 1 (LWP 1)]
[Switching to Thread 1 (LWP 1)]
Breakpoint 1, 0xfecb4b06 in PMPI_Init () from
/usr/lib/mpich/gcc/lib/libmpi.so.12
(gdb) bt
#0 0xfecb4b06 in PMPI_Init () from /usr/lib/mpich/gcc/lib/libmpi.so.12
#1 0x08051f2f in main (argc=1, argv=0x8047da4) at mpi-init.c:10
(gdb) kill
or just
(gdb) run
Starting program: /export/home/alp/srcs/tests/./a.out
[Thread debugging using libthread_db enabled]
[Inferior 1 (process 13897 ) exited normally]
(gdb)
It seems, more complex example is required.
--
Best regards,
Alexander Pyhalov,
system administrator of Southern Federal University IT department
_______________________________________________
oi-dev mailing list
oi-dev at openindiana.org
http://openindiana.org/mailman/listinfo/oi-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openindiana.org/pipermail/oi-dev/attachments/20141001/d09f1746/attachment.html>
More information about the oi-dev
mailing list