[RTEMS Project] #2644: sis does not run on gdb 7.11 but does on gdb 7.9 (was: sis does not run on gdb 4.11 but does on gdb 4.9)

RTEMS trac trac at rtems.org
Tue Mar 15 22:24:32 UTC 2016


#2644: sis does not run on gdb 7.11 but does on gdb 7.9
---------------------------+-------------------
 Reporter:  joel.sherrill  |       Owner:
     Type:  defect         |      Status:  new
 Priority:  normal         |   Milestone:  4.12
Component:  RSB            |     Version:  4.12
 Severity:  normal         |  Resolution:
 Keywords:                 |
---------------------------+-------------------

Comment (by chrisj):

 There is 2 separate problems:

 1. the run command does not work any more
 1. on Linux and OS X the simulator does not work

 This patch https://sourceware.org/git/gitweb.cgi?p=binutils-
 gdb.git;a=commit;h=465fb143 changed the sim/erc32 from the
 sim/common/run.c to sis.o for the run command so in effect made the run
 command the same as the sis command.

 Our rtems-4.11 release uses gdb-7.9 with 23 patches (https://git.rtems.org
 /rtems-tools/tree/tools/4.11/gdb/sparc/7.9?h=4.11) so upgrading to
 gdb-7.11 was considered a better move than moving the rtems-4.11 patches
 to rtems-4.12. Of the 23 patches gdb-7.11 has patches 0001-0013 merged
 along with 0016 and the remaining patches are not merged. The 0014 patch
 is a gdb-7.9 version of my patch to clean up the output paths. Without
 that patch the erc32 does not support MI mode and can block on input
 locking up when run in the test framework. The remaining patches are LEON2
 and LEON3 support which I am not sure about and watchpoints.

 Running on FreeBSD works with the sparc/sis BSP. Running on Linux gives:

 {{{
 chris at titi:~/development/rtems/test/gdb/sparc-rtems4.12$
 /opt/rtems/4.12/bin/sparc-rtems4.12-gdb
 /home/chris/development/rtems/kernel/erc32-sis/sparc-
 rtems4.12/c/sis/testsuites/samples/hello/hello.exe
 GNU gdb (GDB) 7.11
 Copyright (C) 2016 Free Software Foundation, Inc.
 License GPLv3+: GNU GPL version 3 or later
 <http://gnu.org/licenses/gpl.html>
 This is free software: you are free to change and redistribute it.
 There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
 and "show warranty" for details.
 This GDB was configured as "--host=x86_64-linux-gnu --target=sparc-
 rtems4.12".
 Type "show configuration" for configuration details.
 For bug reporting instructions, please see:
 <http://www.gnu.org/software/gdb/bugs/>.
 Find the GDB manual and other documentation resources online at:
 <http://www.gnu.org/software/gdb/documentation/>.
 For help, type "help".
 Type "apropos word" to search for commands related to "word"...
 Reading symbols from /home/chris/development/rtems/kernel/erc32-sis/sparc-
 rtems4.12/c/sis/testsuites/samples/hello/hello.exe...done.
 (gdb) tar sim -v

  SIS - SPARC instruction simulator 2.7.5
  Bug-reports to Jiri Gaisler ESA/ESTEC (jgais at wd.estec.esa.nl)
 RAM start: 0x2000000, RAM size: 256 K, ROM size: 128 K
 Waitstates = RAM read: 3, RAM write: 3, ROM read: 15, ROM write: 15
 Watchdog started, scaler = 255, counter = 65535
 serial port A on stdin/stdout
 Connected to the simulator.
 (gdb) load
 loading /home/chris/development/rtems/kernel/erc32-sis/sparc-
 rtems4.12/c/sis/testsuites/samples/hello/hello.exe:
 section .text at 0x02000000 (0x19980 bytes)
 section .rtemsroset at 0x02019980 (0x40 bytes)
 section .data at 0x020199c0 (0x670 bytes)
 section .bss at 0x0201a040 (0x1920 bytes)(not loaded)
 (gdb) run
 Starting program: /home/chris/development/rtems/kernel/erc32-sis/sparc-
 rtems4.12/c/sis/testsuites/samples/hello/hello.exe
 RAM start: 0x2000000, RAM size: 256 K, ROM size: 128 K
 Waitstates = RAM read: 3, RAM write: 3, ROM read: 15, ROM write: 15
 Watchdog started, scaler = 255, counter = 65535
 resuming at 2000000
 Waitstates = RAM read: 0, RAM write: 0, ROM read: 0, ROM write: 0
 Watchdog disabled
 Error manager halt - MEC hardware error
 RAM start: 0x2000000, RAM size: 4096 K, ROM size: 1024 K
 Error manager halt - IU in error mode
 Error manager halt - MEC hardware error
 [Inferior 1 (process 42000) exited normally]
 (gdb)
 }}}

 I am not sure what broken this.

 Back to the run command. The run command should be using sim/common/nrun.c
 and this moves the simulator to the common structure and that conflicts
 with the sim/erc32/inferf.c code. The erc32 sim_open is broken and needs
 to be fixed to return a real SIM_DESC and that needs to be filled in
 correct. An issue I am not sure about is now the inferior's memory access
 routines link up with the SIS view of memory. I suspect they would be
 separate pieces of memory.

 Also the sim/erc32 makes lots of printf calls and these needs to via GDB's
 filtered print calls. The direct printf calls break MI support.

--
Ticket URL: <http://devel.rtems.org/ticket/2644#comment:1>
RTEMS Project <http://www.rtems.org/>
RTEMS Project


More information about the bugs mailing list