LOGIN   :::   RECOVER PASS   :::   GET ACCOUNT    
Browse
  • Projects
  • Code (CVS)
  • Forums
  • News
  • Articles
  • Polls
  •  
    OpenCores
  • FAQ
  • CVS HowTo
  • Mission
  • Media
  • Tools
  • Sponsors
  • Mirrors
  • Logos
  • Contact us
  •  
    Tools
  • Search
      
  • Download Cores (CVSGet)
  •  
    More
  • Wishbone
  • Perlilog
  • EDA tools
  • OpenTech CD
  •  
    Overview :: News :: Architecture :: OpenRISC 1200 :: VMware image :: NEW GNU Toolchain Port :: Architectural Simulator :: U-Boot :: Linux :: uClinux :: RTEMS :: ATS :: ORP :: ORPmon :: ORPsoc :: Survey :: Forum :: Silicon :: Downloads :: Tracker    

    OpenRISC 1000: Tracker : Bug in gdb disassemble (or32-dis.c) on 64-bit platform

    Monitor this item

    You will be notified via email when status of this item is changed or if somebody adds a comment.

    Your email

      Bug in gdb disassemble (or32-dis.c) on 64-bit platform

    Type BUG
    Status OPENED
    Top
    I found that disassemble doesn't work properly for me using the host Linux 64 bit platform.

    The problem is that function or32_extract() returns a signed-extended mask, which doesn't match the opcode of the instruction (in or32_opcode_match), which remains non-extended.
    IMO, the fix is to prevent sign extension by using '1L' rather than '1' in the following way:

    diff -u gdb-5.3-old/opcodes/or32-dis.c gdb-5.3/opcodes/or32-dis.c
    --- gdb-5.3-old/opcodes/or32-dis.c 2007-01-23 13:29:26.000000000 +0200
    +++ gdb-5.3/opcodes/or32-dis.c 2007-01-23 13:23:21.000000000 +0200
    @@ -99,7 +99,7 @@
    else if ((*enc == '0') || (*enc == '1')) {
    opc_pos--;
    if (param_ch == *enc)

    • ret |= 1 << opc_pos;
    • ret |= 1L << opc_pos;
    enc++; }
    else if (*enc == param_ch) {
    ...

    Regards,
    Vitaly

     
    Stats

    1 people are monitoring this item

    Progress
     
    Submited date 23-Jan-2007
    Submited by vitaly@c...
     
    Assigned date
    Assigned to
     
    Closed date
    Closed by

    Top

    Comments

    by vitaly@c... on 23-Jan-2007
    Found one more bug that breaks gdb on 64 bit. In or1k-dep.c in function in function or1k_frame_chain there are hard-coded shift operands. For example: int code = insn >> 26; This doesn't work properly if insn (long) is 64 bit long. I decided to re-compile my gdb with -m32 flag. The problem disappeared but I cannot rely the end-users will always do so.
     

    Add your comment

    Your email:

    Retype key:
    Top

     
    Copyright (c) 1999 OPENCORES.ORG. All rights reserved.