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: Marko Mlinar <markom@o...>
    Date: Thu, 11 Sep 2003 08:09:19 +0200
    Subject: Re: [openrisc] SIGBUS when using eCos diag_printf
    Top

    Robert,
    
    my guess would be that pointers for string decoding in libc are not set-up 
    correctly or get messed-up. Usually libc libraries detect whether your string 
    has something to replace e.g. % characters, also usually it has some last 
    used combination cached. If there is something to replace it allocates new 
    string or uses some static (more often) space, where it works. I am not 
    familiar with library you are using, so I unfortunately cannot be more 
    specific.
    
    hope it helps anyway,
    
    Marko
    
    On Wednesday 10 September 2003 19:19, Robert Cragie wrote:
    > This is a bit of a long shot posting here, but I was wondering if anyone
    > else has experienced this problem. I am getting a SIGBUS (bus error)
    > exception when trying to call the printf supplied with eCos. This is
    > generic code and works fine on all other eCos platforms, so the problem
    > must be something to do with the OpenRISC environment.
    >
    > If I do:
    >
    > diag_printf("Just a string\n");
    >
    > it seems to work OK.
    >
    > However, if I do:
    >
    > diag_printf("Print an integer %d\n", integer);
    >
    > it bombs out of GDB with something like this:
    >
    > Program received signal SIGBUS, Bus error.
    > 0x00007f9c in _cvt(unsigned long long, char*, long, char*) (val=1987,
    > buf=0xcc0c "", radix=10, digits=0x1116c "0123456789")
    >     at /home/rcc/ecos-sr/ecos/packages/infra/current/src/diag.cxx:273
    > 273                 *cp++ = digits[val % radix];
    > Current language:  auto; currently c++
    >
    > I am using GDB 5.3 and GCC 3.2.3 from the OpenCores CVS server.
    >
    > Anyone seen this, or any ideas what might be going on? My feeling is it's
    > something to do with the 'val % radix' expression - 'val' being unsigned
    > long long etc and the associated math library. I will continue to
    > investigate further and see if I can spot anything odd.
    >
    > Robert Cragie, Design Engineer
    > _______________________________________________________________
    > Jennic Ltd, Furnival Street, Sheffield, S1 4QT,  UK
    > http://www.jennic.com  Tel: +44 (0) 114 281 2655
    > _______________________________________________________________
    
    
    
    
    

    ReferenceAuthor
    [openrisc] SIGBUS when using eCos diag_printfRobert Cragie

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