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: Simon Takita<qxubv3h02@s...>
    Date: Fri Feb 11 06:49:06 CET 2005
    Subject: [openrisc] gdb problem with const variable types
    Top
    I tried to use the gdb-5.3 in the cvs archive but had some problems. It compiled and ran okay, but certain operations just failed to work. I couldn't connect to my fpga or or1ksim. It seems abit broken right now. What sort of milage did you have with gdb-5.3?

    Simon

    Robert Cragie rcc-at-jennic.com |openrisc| wrote:

    >I seem to remember having a similar problem with GDB 5.0 - maybe give 5.3 a
    >go?
    >
    >Robert Cragie, Design Engineer
    >_______________________________________________________________
    >Jennic Ltd, Furnival Street, Sheffield, S1 4QT, UK
    >http://www.jennic.com Tel: +44 (0) 114 281 2655
    >_______________________________________________________________
    >
    >>-----Original Message-----
    >>From: openrisc-bounces@o...
    >>[mailto:openrisc-bounces@o...]On Behalf Of
    >>7p7hksm02@s...
    >>Sent: 10 February 2005 04:29
    >>To: openrisc@o...
    >>Subject: [openrisc] gdb problem with const variable types
    >>
    >>
    >>Hi,
    >> I'm getting a problem with gdb. If my code has two (or more)
    >>const declarations of the same type, then gdb can't understand
    >>the type of the second variable.
    >>
    >>Here's a simple example:
    >>
    >>int main()
    >>{
    >> const int a;
    >> const int b;
    >>
    >> while(1)
    >> ; // infinite loop to keep gdb in the main context
    >>
    >> return(0);
    >>}
    >>
    >>
    >>I then run the or1ksim, and attach to it using gdb:
    >>
    >>$ or32-uclinux-gdb
    >>GNU gdb 5.0
    >>Copyright 2000 Free Software Foundation, Inc.
    >>GDB is free software, covered by the GNU General Public License,
    >>and you are
    >>welcome to change it and/or distribute copies of it under certain
    >>conditions.
    >>Type "show copying" to see the conditions.
    >>There is absolutely no warranty for GDB. Type "show warranty"
    >>for details.
    >>This GDB was configured as "--host=i686-pc-linux-gnu
    >>--target=or32-uclinux".
    >>(gdb) file hello.stdsim.or32
    >>Reading symbols from hello.stdsim.or32...done.
    >>(gdb) target jtag jtag://localhost:9999
    >>Remote or1k debugging using jtag://localhost:9999
    >>0x104 in _reset ()
    >>(gdb) load
    >>Loading section .vectors, size 0x128 lma 0x0
    >>Loading section .text, size 0x24 lma 0xe00
    >>Start address 0xe00 , load size 332
    >>Transfer rate: 2656 bits in <1 sec, 166 bytes/write.
    >>(gdb) set $PC=_reset
    >>(gdb) break 7
    >>Breakpoint 1 at 0xe10: file hello.c, line 7.
    >>(gdb) c
    >>Continuing.
    >>
    >>Breakpoint 1, main () at hello.c:7
    >>7 while(1)
    >>(gdb) whatis a
    >>type = int
    >>(gdb) whatis b
    >>type = struct <unknown>
    >>(gdb)
    >>
    >>Is anyone able to help me here?
    >>
    >>Thanks,
    >> Tom
    >>
    >>
    >>_______________________________________________
    >>http://www.opencores.org/mailman/listinfo/openrisc
    >>
    >
    >_______________________________________________
    >http://www.opencores.org/mailman/listinfo/openrisc
    >

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