Skip to content

Instantly share code, notes, and snippets.

@stffrdhrn
Last active April 26, 2016 14:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stffrdhrn/67e2ea46df6090ebbf9b3b6d36846aa5 to your computer and use it in GitHub Desktop.
Save stffrdhrn/67e2ea46df6090ebbf9b3b6d36846aa5 to your computer and use it in GitHub Desktop.
Running openrisc gdb test suite
# In one terminal start simulator, listening on debug port
or1k-elf-sim --srv=51000
~~~~~~~~~
# In another terminal run tests
# setup directory with boards (site.exp is empty)
# there is also a boards directory with remote-gdbserver.exp
export DEJAGNU=$HOME/openrisc/gdb-testsuite/site.exp
cd ~/openrisc/build-gdb
# Run the tests
make check RUNTESTFLAGS="--target_board=remote-gdbserver"
# gdbserver running remotely in or1ksim
# Found some good comments on
# https://chromium.googlesource.com/native_client/nacl-gdb/+/upstream/gdb/testsuite/config/gdbserver.exp
load_generic_config "gdbserver"
process_multilib_options ""
# The default compiler for this target.
#set_board_info compiler "[find_gcc]"
# If gdbserver runs in a cross-target arch, the testsuite should use a cross-compiler
set_board_info compiler "/opt/shorne/software/or1k/bin/or1k-elf-gcc"
set_board_info c++compiler "/opt/shorne/software/or1k/bin/or1k-elf-g++"
# We will be using the standard GDB remote protocol
set_board_info gdb_protocol "remote"
# Name of the computer whose socket will be used, if required.
#set_board_info sockethost "localhost:"
#set_board_info gdb_init_command "target remote localhost:51000"
# Port ID to use for socket connection
set_board_info gdb,socketport "51000"
set_board_info use_gdb_stub 1
# these variables are automatically generated by make ##
# Do not edit here. If you wish to override these values
# add them to the last section
set host_triplet x86_64-pc-linux-gnu
set target_alias or1k-elf
set target_triplet or1k-unknown-elf
set build_triplet x86_64-pc-linux-gnu
set srcdir /home/shorne/work/openrisc/build-gdb/gdb/testsuite/../../../binutils-gdb/gdb/testsuite
set tool gdb
source ${srcdir}/lib/append_gdb_boards_dir.exp
## All variables above are generated by configure. Do Not Edit ##
lappend boards_dir ~/openrisc/gdb-testsuite/boards
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment