4.104.115
Last change
on this file since 5a6d25fc was
5a6d25fc,
checked in by Till Straumann <strauman@…>, on 09/11/09 at 22:42:00
|
2009-09-11 Till Straumann <Till.Straumann@…>
- psim-top.in, psim-bottom: Added support for options
-d (print device tree and exit), -h (usage info) and
-n (enable NIC support).
- psim-gdb-bottom: Added support for options -s (force sysv IPC),
-h (usage info) and -n (enable NIC support).
Allow user to override GDB variable from environment.
- psim-shared: cat NIC properties into device file if the
user had specified '-n'.
- runtest-top.in: removed unsupported options -o, -d from
usage info.
|
-
Property mode set to
100755
|
File size:
1.2 KB
|
Line | |
---|
1 | progname=${0##*/} # fast basename hack for ksh, bash |
---|
2 | |
---|
3 | USAGE=\ |
---|
4 | "usage: $progname [ -opts ] [prog] |
---|
5 | -s -- force System V IPC support on (default=auto) |
---|
6 | -n -- enable NIC support ***REQUIRES PATCHED GDB/PSIM*** |
---|
7 | -h -- this message |
---|
8 | " |
---|
9 | |
---|
10 | # Recognize special argument to force System V IPC support on |
---|
11 | use_sysv_ipc="auto" |
---|
12 | enable_if_sim="" |
---|
13 | |
---|
14 | ## TODO: may want command line ability to turn on some psim tracing |
---|
15 | while getopts snh OPT |
---|
16 | do |
---|
17 | case "$OPT" in |
---|
18 | s) use_sysv_ipc="yes";; |
---|
19 | n) enable_if_sim="yes";; |
---|
20 | h) echo "$USAGE"; exit 0;; |
---|
21 | *) echo "unknown option"; echo "$USAGE"; exit 0;; |
---|
22 | esac |
---|
23 | done |
---|
24 | shiftcount=`expr $OPTIND - 1` |
---|
25 | shift $shiftcount |
---|
26 | |
---|
27 | args=$* |
---|
28 | |
---|
29 | if [ X${1} = "X-psim_sysv" ] ; then |
---|
30 | use_sysv_ipc="yes" |
---|
31 | shift |
---|
32 | fi |
---|
33 | |
---|
34 | ## Generate the GDB Command Script |
---|
35 | gen_gdb_script() |
---|
36 | { |
---|
37 | echo "tar sim -f ${TREE_FILE}" |
---|
38 | echo "load" |
---|
39 | echo "b _Internal_error_Occurred" |
---|
40 | echo "b rtems_fatal_error_occurred" |
---|
41 | echo "b __assert_func" |
---|
42 | echo "b C_exception_handler" |
---|
43 | echo "printf \"Use run to start the RTEMS application\\n\"" |
---|
44 | } |
---|
45 | |
---|
46 | if [ X${GDB} = X ] ; then |
---|
47 | GDB=${rtemsTarget}-gdb |
---|
48 | fi |
---|
49 | |
---|
50 | gen_device_tree ${1} >${TREE_FILE} |
---|
51 | gen_gdb_script >${GDB_FILE} |
---|
52 | |
---|
53 | ${GDB} -x ${GDB_FILE} $* |
---|
54 | |
---|
55 | rm -f ${GDB_FILE} ${TREEFILE} |
---|
56 | exit $? |
---|
57 | |
---|
Note: See
TracBrowser
for help on using the repository browser.