diff options
author | Doug Evans <xdje42@gmail.com> | 2015-04-06 08:45:06 -0700 |
---|---|---|
committer | Doug Evans <xdje42@gmail.com> | 2015-04-06 08:45:06 -0700 |
commit | 01b622d4c7536f20622bc0e23ff78b7fe37bc1e3 (patch) | |
tree | 3b2af2285554b281802a4ae3974cc7d70185811a /gdb | |
parent | 2c26b84f4520591762dfb7f740fb85c15c21a2ea (diff) | |
download | gdb-01b622d4c7536f20622bc0e23ff78b7fe37bc1e3.zip gdb-01b622d4c7536f20622bc0e23ff78b7fe37bc1e3.tar.gz gdb-01b622d4c7536f20622bc0e23ff78b7fe37bc1e3.tar.bz2 |
* lib/pascal.exp (gpc_compile): Rename dest arg to destfile.
The "dest" parameter to fpc_compile/gpc_compile is the name of
compilation destination file, not a board name.
This patch fixes this by using names consistent with
lib/future.exp:gdb_default_target_compile.
gdb/testsuite/ChangeLog:
* lib/pascal.exp (gpc_compile): Rename dest arg to destfile.
Fix dest parameter to board_info.
(fpc_compile): Ditto.
(gdb_compile_pascal): Rename dest arg to destfile.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/testsuite/ChangeLog | 7 | ||||
-rw-r--r-- | gdb/testsuite/lib/pascal.exp | 20 |
2 files changed, 19 insertions, 8 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 50afab5..8c179f9 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2015-04-06 Doug Evans <xdje42@gmail.com> + + * lib/pascal.exp (gpc_compile): Rename dest arg to destfile. + Fix dest parameter to board_info. + (fpc_compile): Ditto. + (gdb_compile_pascal): Rename dest arg to destfile. + 2015-04-03 Pierre-Marie de Rodat <derodat@adacore.com> * gdb.ada/funcall_ref.exp: New file. diff --git a/gdb/testsuite/lib/pascal.exp b/gdb/testsuite/lib/pascal.exp index 994e3da..da724f3 100644 --- a/gdb/testsuite/lib/pascal.exp +++ b/gdb/testsuite/lib/pascal.exp @@ -68,9 +68,11 @@ proc pascal_init {} { set pascal_init_done 1 } -proc gpc_compile {source dest type options} { +proc gpc_compile {source destfile type options} { global gpc_compiler set add_flags "" + set dest [target_info name] + if {$type == "object"} { append add_flags " -c" } @@ -93,13 +95,15 @@ proc gpc_compile {source dest type options} { } } - set result [remote_exec host $gpc_compiler "-o $dest --automake $add_flags $source"] + set result [remote_exec host $gpc_compiler "-o $destfile --automake $add_flags $source"] return $result } -proc fpc_compile {source dest type options} { +proc fpc_compile {source destfile type options} { global fpc_compiler set add_flags "" + set dest [target_info name] + if {$type == "object"} { append add_flags " -Cn" } @@ -122,11 +126,11 @@ proc fpc_compile {source dest type options} { } } - set result [remote_exec host $fpc_compiler "-o$dest $add_flags $source"] + set result [remote_exec host $fpc_compiler "-o$destfile $add_flags $source"] return $result } -proc gdb_compile_pascal {source dest type options} { +proc gdb_compile_pascal {source destfile type options} { global pascal_init_done global pascal_compiler_is_gpc global pascal_compiler_is_fpc @@ -136,15 +140,15 @@ proc gdb_compile_pascal {source dest type options} { } if { $pascal_compiler_is_fpc == 1 } { - set result [fpc_compile $source $dest $type $options] + set result [fpc_compile $source $destfile $type $options] } elseif { $pascal_compiler_is_gpc == 1 } { - set result [gpc_compile $source $dest $type $options] + set result [gpc_compile $source $destfile $type $options] } else { unsupported "No pascal compiler found" return "No pascal compiler. Compilation failed." } - if ![file exists $dest] { + if ![file exists $destfile] { unsupported "Pascal compilation failed: $result" return "Pascal compilation failed." } |