mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2024-11-26 05:20:30 +00:00
2002-12-20 Chris Demetriou <cgd@broadcom.com>
* lib/gas-defs.exp (run_dump_test): Add a new optional argument, "extra_options".
This commit is contained in:
parent
63222ec9df
commit
e8119602a5
@ -1,8 +1,7 @@
|
|||||||
2002-12-20 DJ Delorie <dj@redhat.com>
|
2002-12-20 Chris Demetriou <cgd@broadcom.com>
|
||||||
|
|
||||||
* gas/xstormy16/allinsn.sh: Add tests for 12-bit reloc.
|
* lib/gas-defs.exp (run_dump_test): Add a new optional argument,
|
||||||
* gas/xstormy16/allinsn.s: Likewise.
|
"extra_options".
|
||||||
* gas/xstormy16/allinsn.d: Likewise.
|
|
||||||
|
|
||||||
2002-12-18 Chris Demetriou <cgd@broadcom.com>
|
2002-12-18 Chris Demetriou <cgd@broadcom.com>
|
||||||
|
|
||||||
|
@ -183,7 +183,7 @@ proc gas_init { args } {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# run_dump_test FILE
|
# run_dump_test FILE (optional:) EXTRA_OPTIONS
|
||||||
#
|
#
|
||||||
# Assemble a .s file, then run some utility on it and check the output.
|
# Assemble a .s file, then run some utility on it and check the output.
|
||||||
#
|
#
|
||||||
@ -207,6 +207,12 @@ proc gas_init { args } {
|
|||||||
# list ends with the first line that doesn't match the above syntax
|
# list ends with the first line that doesn't match the above syntax
|
||||||
# (hmm, not great for error detection).
|
# (hmm, not great for error detection).
|
||||||
#
|
#
|
||||||
|
# The optional EXTRA_OPTIONS argument to `run_dump_test' is a list of
|
||||||
|
# two-element lists. The first element of each is an option name, and
|
||||||
|
# the second additional arguments to be added on to the end of the
|
||||||
|
# option list as given in FILE.d. (If omitted, no additional options
|
||||||
|
# are added.)
|
||||||
|
#
|
||||||
# The interesting options are:
|
# The interesting options are:
|
||||||
#
|
#
|
||||||
# name: TEST-NAME
|
# name: TEST-NAME
|
||||||
@ -247,7 +253,7 @@ proc gas_init { args } {
|
|||||||
# regexps in FILE.d. `regexp_diff' is defined later in this file; see
|
# regexps in FILE.d. `regexp_diff' is defined later in this file; see
|
||||||
# further comments there.
|
# further comments there.
|
||||||
|
|
||||||
proc run_dump_test { name } {
|
proc run_dump_test { name {extra_options {}} } {
|
||||||
global subdir srcdir
|
global subdir srcdir
|
||||||
global OBJDUMP NM AS OBJCOPY READELF
|
global OBJDUMP NM AS OBJCOPY READELF
|
||||||
global OBJDUMPFLAGS NMFLAGS ASFLAGS OBJCOPYFLAGS READELFFLAGS
|
global OBJDUMPFLAGS NMFLAGS ASFLAGS OBJCOPYFLAGS READELFFLAGS
|
||||||
@ -293,6 +299,22 @@ proc run_dump_test { name } {
|
|||||||
set opts($opt_name) $opt_val
|
set opts($opt_name) $opt_val
|
||||||
}
|
}
|
||||||
|
|
||||||
|
foreach i $extra_options {
|
||||||
|
set opt_name [lindex $i 0]
|
||||||
|
set opt_val [lindex $i 1]
|
||||||
|
if ![info exists opts($opt_name)] {
|
||||||
|
perror "unknown option $opt_name given in extra_opts"
|
||||||
|
unresolved $subdir/$name
|
||||||
|
return
|
||||||
|
}
|
||||||
|
# add extra option to end of existing option, adding space
|
||||||
|
# if necessary.
|
||||||
|
if [string length $opts($opt_name)] {
|
||||||
|
append opts($opt_name) " "
|
||||||
|
}
|
||||||
|
append opts($opt_name) $opt_val
|
||||||
|
}
|
||||||
|
|
||||||
if {$opts(PROG) != ""} {
|
if {$opts(PROG) != ""} {
|
||||||
switch -- $opts(PROG) {
|
switch -- $opts(PROG) {
|
||||||
objdump
|
objdump
|
||||||
|
Loading…
Reference in New Issue
Block a user