Re: Debugging problems

From: Paul H. Hargrove (PHHargrove_at_lbl_dot_gov)
Date: Wed Sep 09 2009 - 22:14:10 PDT

  • Next message: Andreev Nikita: "Re[2]: Debugging problems"
    Andreev Nikita wrote:
    [big "snip"]
    > You can see that line numbering is out of range.
    >   
    
    I can see that, but cannot account for it.  That should not be happening.
    
    > Correct me if I'm wrong. During compilation UPC translator substitute
    > UPC code with some C instructions and then feeds transformed code to
    > the GCC.
    
    Yes, and in doing so inserts #line directives into the C passed to GCC.  
    That *should* result in GDB showing line numbers that correspond the the 
    original source files.
    
    > So basically we would like to see transformed code in GDB.
    > But I do not. I'm knowledgable about -save-temps flag and foo.trans.c
    > files. But it doesn't work from a box. 
    
    If you pass -nolines to upcc then the #line directive are omitted and 
    GDB will see line numbers and filenames corresponding to the foo.trans.c 
    files.  Together with -save-temps to prevent removal of the .trans.s 
    file, the -nolines option to upcc should be the only magic required to 
    have GDB to look at the transformed file.
    
    > Do I need to substitute my
    > foo.c code by contents of foo.trans.c code or invoke some kind of GDB
    > command to load proper line numbering information? Because if I do
    > nothing then as you can see GDB shows my initial UPC code.
    >
    > Nikita
    >   
    
    Again, let us know if you still need assistance.
    
    -Paul
    
    -- 
    Paul H. Hargrove                          PHHargrove_at_lbl_dot_gov
    Future Technologies Group                 Tel: +1-510-495-2352
    HPC Research Department                   Fax: +1-510-486-6900
    Lawrence Berkeley National Laboratory     
    

  • Next message: Andreev Nikita: "Re[2]: Debugging problems"