DWARF-2 expression error

This is a discussion on DWARF-2 expression error within the C++ Programming forums, part of the General Programming Boards category; Hi All, I'm getting a segmentation fault that I simply cannot understand. I run gdb and get the following message: ...

  1. #1
    Registered User
    Join Date
    Jul 2010
    Posts
    3

    DWARF-2 expression error

    Hi All,

    I'm getting a segmentation fault that I simply cannot understand. I run gdb and get the following message:


    Program received signal SIGSEGV, Segmentation fault.
    0x00000000004a91a5 in BDD::BandB (this=0x7ffffffe4e60, fixedVars=DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece.
    ) at BDD.cpp:550
    550 void BDD::BandB(set<int > fixedVars , bool valuesOfFixedVars[numberOfVariables] , int COSTS[numberOfVariables], int LB, int* UB, int Width){

    I cannot understand what this means or how to go about fixing it. I'd appreciate any help at all.

    THANKS!

  2. #2
    Just a pushpin. bernt's Avatar
    Join Date
    May 2009
    Posts
    426
    While you're in gdb, try typing 'backtrace' to get a... well, a backtrace. Note that this will do the most good if you type it after gdb stops your program and reports the SIGSEGV.
    That will show you the chain of functions leading up to this segfault, and therefore which line in your program should be fixed (well not necessarily, the problem may lie in one of the arguments of the function which could be initialized somewhere else, but it is a good starting point).
    Consider this post signed

  3. #3
    Registered User
    Join Date
    Jul 2010
    Posts
    3
    So I did and it is still giving me the same exact error message. What does DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece mean?

    (gdb) bt
    #0 0x00000000004a9155 in BDD::BandB (this=0x7ffffffe4e60, fixedVars=DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece.
    ) at BDD.cpp:555
    #1 0x00000000004aa9f8 in BDD::BandB (this=<value optimized out>, fixedVars=DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece.
    ) at BDD.cpp:749
    #2 0x00000000004aaa96 in BDD::BandB (this=<value optimized out>, fixedVars=DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece.
    ) at BDD.cpp:764
    #3 0x00000000004aaa96 in BDD::BandB (this=<value optimized out>, fixedVars=DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece.
    ) at BDD.cpp:764
    #4 0x00000000004aaa96 in BDD::BandB (this=<value optimized out>, fixedVars=DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece.
    ) at BDD.cpp:764
    #5 0x00000000004aaa96 in BDD::BandB (this=<value optimized out>, fixedVars=DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece.
    ) at BDD.cpp:764
    #6 0x00000000004aaa96 in BDD::BandB (this=<value optimized out>, fixedVars=DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece.
    ) at BDD.cpp:764
    #7 0x00000000004aaa96 in BDD::BandB (this=<value optimized out>, fixedVars=DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece.
    ) at BDD.cpp:764
    #8 0x00000000004aaa96 in BDD::BandB (this=<value optimized out>, fixedVars=DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece.
    ) at BDD.cpp:764
    #9 0x00000000004aaa96 in BDD::BandB (this=<value optimized out>, fixedVars=DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece.
    ) at BDD.cpp:764
    #10 0x00000000004aaa96 in BDD::BandB (this=<value optimized out>, fixedVars=DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece.
    ) at BDD.cpp:764
    #11 0x00000000004aaa96 in BDD::BandB (this=<value optimized out>, fixedVars=DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece.
    ) at BDD.cpp:764
    #12 0x00000000004aaa96 in BDD::BandB (this=<value optimized out>, fixedVars=DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece.
    ) at BDD.cpp:764
    #13 0x00000000004aaa96 in BDD::BandB (this=<value optimized out>, fixedVars=DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece.
    ) at BDD.cpp:764
    #14 0x00000000004aaa96 in BDD::BandB (this=<value optimized out>, fixedVars=DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece.
    ) at BDD.cpp:764
    #15 0x00000000004aaa96 in BDD::BandB (this=<value optimized out>, fixedVars=DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece.
    ) at BDD.cpp:764
    #16 0x00000000004aaa96 in BDD::BandB (this=<value optimized out>, fixedVars=DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece.
    ) at BDD.cpp:764
    #17 0x00000000004aaa96 in BDD::BandB (this=<value optimized out>, fixedVars=DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece.
    ) at BDD.cpp:764
    #18 0x00000000004aaa96 in BDD::BandB (this=<value optimized out>, fixedVars=DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece.
    ) at BDD.cpp:764
    #19 0x00000000004aaa96 in BDD::BandB (this=<value optimized out>, fixedVars=DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece.
    ) at BDD.cpp:764
    #20 0x00000000004aaa96 in BDD::BandB (this=<value optimized out>, fixedVars=DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece.
    ) at BDD.cpp:764
    #21 0x00000000004aaa96 in BDD::BandB (this=<value optimized out>, fixedVars=DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece.
    ) at BDD.cpp:764
    #22 0x00000000004aa9f8 in BDD::BandB (this=<value optimized out>, fixedVars=DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece.
    ) at BDD.cpp:749
    #23 0x00000000004ab975 in main () at BDD.cpp:2775

  4. #4
    Just a pushpin. bernt's Avatar
    Join Date
    May 2009
    Posts
    426
    What does DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece mean?
    Well, to be honest, I have no clue what DWARF-2 is. However a quick bout of research showed that DW_OP_reg represents the value of a register at a given time. DW_OP_piece represents part of a variable, in the case of large variables (ones that would fit in multiple registers).
    It seems as though the expression error always shows up after fixedVars, which would make sense because fixedVars is a std::set and gdb probably doesn't know how to display that data type.
    So DWARF-2 isn't the problem, it's just a distraction.

    With that said, there's really no way for us to tell where the error lies without looking at the source code. Probably something [an array being referenced out of bounds?] somewhere around 555 since that's where the error is occurring.
    Consider this post signed

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Compiling sample DarkGDK Program
    By Phyxashun in forum Game Programming
    Replies: 6
    Last Post: 01-27-2009, 02:07 AM
  2. Errors including <windows.h>
    By jw232 in forum Windows Programming
    Replies: 4
    Last Post: 07-29-2008, 01:29 PM
  3. We Got _DEBUG Errors
    By Tonto in forum Windows Programming
    Replies: 5
    Last Post: 12-22-2006, 04:45 PM
  4. Post...
    By maxorator in forum C++ Programming
    Replies: 12
    Last Post: 10-11-2005, 08:39 AM
  5. ras.h errors
    By Trent_Easton in forum Windows Programming
    Replies: 8
    Last Post: 07-15-2005, 10:52 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21