Debugging problems

From: Andreev Nikita (nik_at_kemsu.ru)
Date: Wed Sep 09 2009 - 00:46:48 PDT

  • Next message: Paul H. Hargrove: "Re: Debugging problems"
    Hello, guys
    
    I've ran into a problem while debugging UPC application with GASP
    support.
    
    I've read an article concerning debugging UPC applications with GDB at
    http://upc.lbl.gov/docs/user/upc-debugging.html. I tried to compile
    gasp_test.upc program (from distrib) by issuing
    "/opt/bupc-runtime-gasp-2.8.0/bin/upcc -network=udp -g gasp_test.upc"
    and run by "UPC_NODES=127.0.0.1
    /opt/bupc-runtime-gasp-2.8.0/bin/upcrun -freeze=0 -n 1 a.out". Then I
    attached GDB and all worked fine.
    
    When I tried to compile with gasp tracing tool:
    "/opt/bupc-runtime-gasp-2.8.0/bin/upcc -g -network=udp
    -inst-toolname=trace-mod -L/root/trace-mod/lib -ltracer --inst-func
    /root/trace-mod/src/aux.c gasp_test.c"
    
    compiler said "upcc: Error: -inst: this copy of Berkeley UPC was not
    built with GASP instrumentation support - reconfigure with
    --enable-inst" event though UPC runtime WAS compiled with GASP
    support (if I compile without "-g" GASP tracing works fine). Because
    of this error I had to change upcc path to
    "/opt/bupc-runtime-gasp-2.8.0/opt_inst/bin/upcc" (I don't really know
    what I've done) and "-g" seems started working. But not really. When I
    attach GDB to the proccess and try debug something it always says
    "Single stepping until exit from function gaspu_dump_shared, which has
    no line number information." and I can't find out what was the cause
    of program crash. Here is the log:
    
    # gdb a.out 13618
    GNU gdb Fedora (6.8-27.el5)
    Copyright (C) 2008 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 "x86_64-redhat-linux-gnu"...
    Attaching to program: /root/trace-mod/upc/a.out, process 13618
    Reading symbols from /usr/lib64/libstdc++.so.6...done.
    Loaded symbols for /usr/lib64/libstdc++.so.6
    Reading symbols from /lib64/libm.so.6...done.
    Loaded symbols for /lib64/libm.so.6
    Reading symbols from /lib64/libgcc_s.so.1...done.
    Loaded symbols for /lib64/libgcc_s.so.1
    Reading symbols from /lib64/libc.so.6...done.
    Loaded symbols for /lib64/libc.so.6
    Reading symbols from /lib64/ld-linux-x86-64.so.2...done.
    Loaded symbols for /lib64/ld-linux-x86-64.so.2
    Reading symbols from /lib64/libnss_files.so.2...done.
    Loaded symbols for /lib64/libnss_files.so.2
    0x00000030208b9d47 in sched_yield () from /lib64/libc.so.6
    (gdb) b gaspu_dump_shared
    Breakpoint 1 at 0x403190
    (gdb) set bupc_frozen=0
    (gdb) c
    Continuing.
    
    Breakpoint 1, 0x0000000000403190 in gaspu_dump_shared ()
    (gdb) s
    Single stepping until exit from function gaspu_dump_shared, 
    which has no line number information.
    fill_MEMPUT (c_rec=0x111a5a10, varargs=0x7fff3952bbf0) at ./src/tracer.c:404
    ...
    
    I tried to add "-save-temps" but it doesn't change anything. Maybe I
    don't quite grasp something but upcc don't want to add debugging
    information to UPC application when I compile with GASP tracing tool
    (--inst and other flags).
    
    Give me a clue.
    
    Thank you,
    Nikita.
    

  • Next message: Paul H. Hargrove: "Re: Debugging problems"