[oi-dev] GDB in hipster

Aurélien Larcher aurelien.larcher at gmail.com
Sat Nov 29 15:41:50 UTC 2014


Hi,
sorry for taking so long to respond.
This is actually quite embarrassing... turns out that I was using 32bit gdb
to debug a 64bit binary.
The error message was not explicit to me.
Somehow I do not remember specifying /usr/bin/amd64/gdb explicitly before
then.
Best regards,

Aurelien

On Thu, Oct 2, 2014 at 5:26 AM, ken mays <maybird1776 at yahoo.com> wrote:

> 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
>
>
>


-- 
-------------------------------------------------------------------------------
LARCHER Aurélien          | KTH, School of Computer Science and
Communication
Work: +46 (0) 8 790 71 42 | Lindstedtsvägen 5, Plan 4, 100 44 Stockholm,
SWEDEN
-------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openindiana.org/pipermail/oi-dev/attachments/20141129/d6c00c50/attachment-0004.html>


More information about the oi-dev mailing list