LOGIN   :::   RECOVER PASS   :::   GET ACCOUNT    
Browse
  • Projects
  • Code (CVS)
  • Forums
  • News
  • Articles
  • Polls
  •  
    OpenCores
  • FAQ
  • CVS HowTo
  • Mission
  • Media
  • Tools
  • Advertise
  • Mirrors
  • Logos
  • Contact us
  • Find Resources
  • Job Opportunity
  •  
    Tools
  • Search
      
  • Download Cores (CVSGet)
  •  
    More
  • Wishbone
  • Perlilog
  • EDA tools
  • OpenTech CD
  •  
    Navigation: All forums > Openrisc > Message List > Message Post

    Message

    Reply | Reply all
    Date Prev | Date Next | Thread Prev | Thread Next Date Index | Thread Index

    From: Aitor Garay-Romero<terminaaitor@g...>
    Date: Fri May 20 17:34:10 CEST 2005
    Subject: [openrisc] bugs & patches for GDB-5-3 and OR1KSIM
    Top
    Hi there!,

    I downloaded the following versions from the CVS server:

    or1k/binutils
    or1k/gcc-3.4.2
    or1k/gdb-5.3
    or1k/newlib-1.10.0
    or1k/or1ksim

    and found some problems with gdb-5.3 and or1ksim.

    In gdb-5.3 there is a compilation error in the file
    'gdb-5.3/gdb/or1k-tdep.c'. Regarding or1ksim, the 'fcntl( F_GETFL)'
    function call returns the flags, it does not store then in the given
    third argument ( files 'or1ksim/debug/gdbcomm.c' and
    'or1ksim/vapi/vapi.c'). The relevant patches are below.

    Hope it helps,

    /AITOR

    -------- diff -Naur or1k-tdep.c.original or1k-tdep.c
    -----------------------------------------------
    --- or1k-tdep.c.original 2005-05-20 16:56:52.062002096 +0200
    +++ or1k-tdep.c 2005-05-20 16:58:39.070734296 +0200
    @@ -2393,7 +2393,7 @@
    td = (struct htrace_data_struct *) malloc (TRACE_DATA_SIZE * length);
    length = fread (td, TRACE_DATA_SIZE, length, f);
    for (i = 0; i < length; i++)
    - print_data_struct (from + i, td[i]);
    print_data_struct (from + i, &( td[i]));
    fclose (f);
    }
    ----------------------------------------------------------------------------------------------------

    -------------------------- diff -Naur gdbcomm.c.original gdbcomm.c
    -----------------------------------
    --- gdbcomm.c.original 2005-05-20 17:06:38.210893920 +0200
    +++ gdbcomm.c 2005-05-20 17:06:28.956300832 +0200
    @@ -103,7 +103,7 @@
    }

    /* The server should also be non blocking. Get the current flags. */
    - if(fcntl(sockfd,F_GETFL,&flags) < 0)
    + if((flags=fcntl(sockfd,F_GETFL,&flags)) < 0)
    {
    sprintf(sTemp,"Unable to get flags for socket %d",sockfd);
    perror(sTemp);
    @@ -292,7 +292,7 @@
    return;
    }

    - if(fcntl(fd,F_GETFL,&flags) < 0)
    + if( ( flags = fcntl(fd,F_GETFL,&flags)) < 0)
    {
    sprintf(sTemp,"Unable to get flags for gdb socket %d",fd);
    perror(sTemp);
    ----------------------------------------------------------------------------------------------------


    ---------------------- diff -Naur vapi.c.original vapi.c
    -------------------------------------------
    --- vapi.c.original 2005-05-20 17:12:06.135041872 +0200
    +++ vapi.c 2005-05-20 17:11:35.763659024 +0200
    @@ -253,7 +253,7 @@
    }

    /* The server should also be non blocking. Get the current flags. */
    - if(fcntl(sockfd,F_GETFL,&flags) < 0) {
    + if((flags=fcntl(sockfd,F_GETFL,&flags)) < 0) {
    sprintf(sTemp,"Unable to get flags for socket %d",sockfd);
    perror(sTemp);
    close(sockfd);
    @@ -332,7 +332,7 @@
    return;
    }

    - if(fcntl(fd,F_GETFL,&flags) < 0) {
    + if((flags=fcntl(fd,F_GETFL,&flags)) < 0) {
    sprintf(sTemp,"Unable to get flags for vapi socket %d",fd);
    perror(sTemp);
    close(fd);
    ----------------------------------------------------------------------------------------------------

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