From: "Pierre Muller" <pierre.muller@ics-cnrs.unistra.fr>
To: "'Doug Evans'" <xdje42@gmail.com>, <gdb-patches@sourceware.org>
Subject: RE: [PATCH] fix lib/pascal.exp dest snafu
Date: Wed, 11 Feb 2015 11:22:00 -0000 [thread overview]
Message-ID: <004801d045ec$eedb6b20$cc924160$@muller@ics-cnrs.unistra.fr> (raw)
In-Reply-To: <m3d25hj7jz.fsf@sspiff.org>
Hi Doug,
> -----Message d'origine-----
> De : gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] De la part de Doug Evans
> Envoyé : mercredi 11 février 2015 07:18
> À : gdb-patches@sourceware.org; pierre.muller@ics-cnrs.unistra.fr
> Objet : [PATCH] fix lib/pascal.exp dest snafu
>
> 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.
Thank you very much for finding out this
horrible mistake.
Patch approved,
Pierre Muller
as pascal language maintainer.
> 2015-02-10 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.
>
> diff --git a/gdb/testsuite/lib/pascal.exp
> b/gdb/testsuite/lib/pascal.exp
> index 994e3da..89b552d 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 +127,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 +141,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."
> }
next prev parent reply other threads:[~2015-02-11 11:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-11 6:18 Doug Evans
2015-02-11 11:22 ` Pierre Muller [this message]
[not found] ` <54db3bc4.a2ac440a.5576.1b7bSMTPIN_ADDED_BROKEN@mx.google.com>
2015-04-06 15:49 ` Doug Evans
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='004801d045ec$eedb6b20$cc924160$@muller@ics-cnrs.unistra.fr' \
--to=pierre.muller@ics-cnrs.unistra.fr \
--cc=gdb-patches@sourceware.org \
--cc=xdje42@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox