Hi,
It seems that GPASM ignores the path specified by the -o option without notification.
It outputs the .o file in the same directory as the input file.
Example:
The current directory is c:\test
In this directory there is a source test.asm
There is a sub-directory c:\test\obj
GPASM -c -o"c:\test\obj\test.o" "test.asm"
outputs test.o in c:\test instead of c:\test\obj
Best regards,
Philippe.
Anonymous
I hope that at the end of the week, will be have time to look at.
Károly
This commands works for me:
The following files are created:
gpasm -v
Please the result of the your "gpasm -v" command.
Károly
Hi,
I found the bug: Sorry I didn’t give you the exact command line that was used; the problem comes with the –I”” that makes GPASM to override the output path..
Without –I”” or with a –I with a non-empty directory the files are generated in the expected obj sub-directory.
The problem is that the command line is part of my toolchain, sometimes it is empty sometimes there is a path.
-I should only define an include directory.
Here is a screen copy of my test:
Best regards,
Philippe Paternotte
PMP Team Leader
http://www.pmpcomp.fr http://www.pmpcomp.fr/
De : "Molnár Károly" [mailto:molnarkaroly@users.sf.net]
Envoyé : samedi 17 janvier 2015 11:15
À : [gputils:bugs]
Objet : [gputils:bugs] #277 GPASM outputs in the wrong directory
This commands works for me:
cd c:\temp
gpasm -c -o"c:\temp\obj\test.o" test.asm
The following files are created:
c:\temp\obj\test.o
c:\temp\obj\test.lst
gpasm -v
gpasm-1.4.0 #1106 (Oct 6 2014)
Please the result of the your "gpasm -v" command.
Károly
[bugs:#277] http://sourceforge.net/p/gputils/bugs/277 GPASM outputs in the wrong directory
Status: open
Group: None
Created: Thu Jan 15, 2015 03:23 PM UTC by Philippe Paternotte
Last Updated: Thu Jan 15, 2015 06:58 PM UTC
Owner: Molnár Károly
Hi,
It seems that GPASM ignores the path specified by the -o option without notification.
It outputs the .o file in the same directory as the input file.
Example:
The current directory is c:\test
In this directory there is a source test.asm
There is a sub-directory c:\test\obj
GPASM -c -o"c:\test\obj\test.o" "test.asm"
outputs test.o in c:\test instead of c:\test\obj
Best regards,
Philippe.
Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/gputils/bugs/277/ https://sourceforge.net/p/gputils/bugs/277
To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/ https://sourceforge.net/auth/subscriptions
Related
Bugs:
#277In other words, may to say that this is not the fault of the gpasm?
Károly
Hi again Károly,
No it is its fault because the –I option should not arbitrary change the output path, in any case.
For now my workaround is to not add the –I option when there is no include path.
Best regards,
Philippe Paternotte
PMP Team Leader
http://www.pmpcomp.fr http://www.pmpcomp.fr/
De : "Molnár Károly" [mailto:molnarkaroly@users.sf.net]
Envoyé : samedi 17 janvier 2015 16:58
À : [gputils:bugs]
Objet : [gputils:bugs] #277 GPASM outputs in the wrong directory
In other words, may to say that this is not the fault of the gpasm?
Károly
[bugs:#277] http://sourceforge.net/p/gputils/bugs/277 GPASM outputs in the wrong directory
Status: open
Group: None
Created: Thu Jan 15, 2015 03:23 PM UTC by Philippe Paternotte
Last Updated: Sat Jan 17, 2015 10:15 AM UTC
Owner: Molnár Károly
Hi,
It seems that GPASM ignores the path specified by the -o option without notification.
It outputs the .o file in the same directory as the input file.
Example:
The current directory is c:\test
In this directory there is a source test.asm
There is a sub-directory c:\test\obj
GPASM -c -o"c:\test\obj\test.o" "test.asm"
outputs test.o in c:\test instead of c:\test\obj
Best regards,
Philippe.
Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/gputils/bugs/277/ https://sourceforge.net/p/gputils/bugs/277
To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/ https://sourceforge.net/auth/subscriptions
Related
Bugs:
#277No space:
a.) -I""
There is space:
b.) -I ""
The 'a' variant is not equivalent to the 'b' variant!
After the '-I' must specify the parameter. The shell is just it detects in the 'a' version: -I
This shall forward for the gpasm. The gpasm is therefore the '-I' after the next parameter thinks, that is the path.
From this:
-I"" -c test.asm -o obj/test.o
This get the invoked program (gpasm):
-I -c test.asm -o obj/test.o
In case of the 'b' variant, not possible this misunderstanding.
Károly
Hi Karoly,
Sorry I do not understand all your explanations, please reformulate.
Are you saying that you need always spaces between option headers and parameters? I’m confused now.
I never used the “b” variant.
If a syntax is wrong, gpasm should output an error message instead of ignoring wrong parameters.
Anyway : Again the –I should have nothing to do with the output path; gpasm have to use the given –o path.
I cannot understand why without –I the output is in the expected path even if there is no space between –o and the double-quoted path that follows.
Best regards,
Philippe Paternotte
PMP Team Leader
http://www.pmpcomp.fr http://www.pmpcomp.fr/
De : "Molnár Károly" [mailto:molnarkaroly@users.sf.net]
Envoyé : dimanche 18 janvier 2015 11:06
À : [gputils:bugs]
Objet : [gputils:bugs] #277 GPASM outputs in the wrong directory
No space:
a.) -I""
There is space:
b.) -I ""
The 'a' variant is not equivalent to the 'b' variant!
After the '-I' must specify the parameter. The shell is just it detects in the 'a' version: -I
This shall forward for the gpasm. The gpasm is therefore the '-I' after the next parameter thinks, that is the path.
From this:
-I"" -c test.asm -o obj/test.o
This get the invoked program (gpasm):
-I -c test.asm -o obj/test.o
In case of the 'b' variant, not possible this misunderstanding.
Károly
[bugs:#277] http://sourceforge.net/p/gputils/bugs/277 GPASM outputs in the wrong directory
Status: open
Group: None
Created: Thu Jan 15, 2015 03:23 PM UTC by Philippe Paternotte
Last Updated: Sat Jan 17, 2015 03:58 PM UTC
Owner: Molnár Károly
Hi,
It seems that GPASM ignores the path specified by the -o option without notification.
It outputs the .o file in the same directory as the input file.
Example:
The current directory is c:\test
In this directory there is a source test.asm
There is a sub-directory c:\test\obj
GPASM -c -o"c:\test\obj\test.o" "test.asm"
outputs test.o in c:\test instead of c:\test\obj
Best regards,
Philippe.
Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/gputils/bugs/277/ https://sourceforge.net/p/gputils/bugs/277
To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/ https://sourceforge.net/auth/subscriptions
Related
Bugs:
#277Hi. Let me try to explain this.
It is not related to gpasm. It is common to all programs through the way shells and C language works.
A C language program starts with an array of strings. The declaration of main function is usually
The argc tells the length of array of strings in argv.
The command line however is a single string. To transform the command line to an array of strings, it is split on spaces. Quotes are used to allow you to include a space in a string in argv. Quotes do not go to the argv unless escaped.
Thus parameters
give two strings in the argv "-I" and "-c". The empty quoted string just disappears as it is part of "-I".
The parameters
however gives three strings in argv: "-I", "" and "-c".
Since -I takes a value, in the first example the "-c" will be used as value to -I. In the second the empty string is the parameter to -I and -c is next option.
You can have the value appended to an option, or give it in the next string in argv. However if the value is an empty string, it is impossible to see it is appended to the option as "-I" without the value appended is exactly the same string as "-I" with the empty value appended...
Hi,
OK, I understand now this point on the parameters.
But there is still to explain the path change: why the –o is ignored without an error message when –c is eaten by the –I and so why there is no error message because –c is not a valid path for –I….
Best regards,
Philippe Paternotte
PMP Team Leader
http://www.pmpcomp.fr http://www.pmpcomp.fr/
De : Marko Kohtala [mailto:kohtala@users.sf.net]
Envoyé : lundi 19 janvier 2015 16:49
À : [gputils:bugs]
Objet : [gputils:bugs] Re: #277 GPASM outputs in the wrong directory
Hi. Let me try to explain this.
It is not related to gpasm. It is common to all programs through the way shells and C language works.
A C language program starts with an array of strings. The declaration of main function is usually
int main(int argc, char *argv[]);
The argc tells the length of array of strings in argv.
The command line however is a single string. To transform the command line to an array of strings, it is split on spaces. Quotes are used to allow you to include a space in a string in argv. Quotes do not go to the argv unless escaped.
Thus parameters
-I"" -c
give two strings in the argv "-I" and "-c". The empty quoted string just disappears as it is part of "-I".
The parameters
-I "" -c
however gives three strings in argv: "-I", "" and "-c".
Since -I takes a value, in the first example the "-c" will be used as value to -I. In the second the empty string is the parameter to -I and -c is next option.
You can have the value appended to an option, or give it in the next string in argv. However if the value is an empty string, it is impossible to see it is appended to the option as "-I" without the value appended is exactly the same string as "-I" with the empty value appended...
[bugs:#277] http://sourceforge.net/p/gputils/bugs/277 GPASM outputs in the wrong directory
Status: open
Group: None
Created: Thu Jan 15, 2015 03:23 PM UTC by Philippe Paternotte
Last Updated: Sun Jan 18, 2015 10:06 AM UTC
Owner: Molnár Károly
Hi,
It seems that GPASM ignores the path specified by the -o option without notification.
It outputs the .o file in the same directory as the input file.
Example:
The current directory is c:\test
In this directory there is a source test.asm
There is a sub-directory c:\test\obj
GPASM -c -o"c:\test\obj\test.o" "test.asm"
outputs test.o in c:\test instead of c:\test\obj
Best regards,
Philippe.
Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/gputils/bugs/277/ https://sourceforge.net/p/gputils/bugs/277
To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/ https://sourceforge.net/auth/subscriptions
Related
Bugs:
#277That's what I wanted to explain. In other words, it is a general behavior for many other programs case of also. To summarize: This is actually not a bug.
Károly
I know it is exactly the same. I just enjoyed I had a chance to go and reformulate as Philippe asked. Small enough thing that I could try and help with gputils. :-)
And I agree this does not seem like a bug in gpasm.
Thank you for your support on gputils.
It seems that this problem is solved.
Károly
Hi Karoly,
I do not agree. There is still a bug or a very lack of control on the command line, as I explained.
The passed path after the –o is overridden or ignored without notification.
This is not a legal action in any case for a professional software.
You may think differently, that a program may alter or ignore badly passed arguments without notification.
I do not.
But you are the master of the keys here.
Best regards,
Philippe Paternotte
PMP Team Leader
http://www.pmpcomp.fr http://www.pmpcomp.fr/
De : "Molnár Károly" [mailto:molnarkaroly@users.sf.net]
Envoyé : jeudi 29 janvier 2015 20:38
À : [gputils:bugs]
Objet : [gputils:bugs] #277 GPASM outputs in the wrong directory
It seems that this problem is solved.
Károly
[bugs:#277] http://sourceforge.net/p/gputils/bugs/277 GPASM outputs in the wrong directory
Status: closed
Group: None
Created: Thu Jan 15, 2015 03:23 PM UTC by Philippe Paternotte
Last Updated: Mon Jan 19, 2015 07:48 PM UTC
Owner: Molnár Károly
Hi,
It seems that GPASM ignores the path specified by the -o option without notification.
It outputs the .o file in the same directory as the input file.
Example:
The current directory is c:\test
In this directory there is a source test.asm
There is a sub-directory c:\test\obj
GPASM -c -o"c:\test\obj\test.o" "test.asm"
outputs test.o in c:\test instead of c:\test\obj
Best regards,
Philippe.
Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/gputils/bugs/277/ https://sourceforge.net/p/gputils/bugs/277
To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/ https://sourceforge.net/auth/subscriptions
Related
Bugs:
#277Hi Philippe!
The following was the my problem: If I put filtration into the program, somebody else will protest then because, I prevents that he be able to use any directory name. Finally became the solution that this switch allows filtering: --strict-options
Please try it.
Fixed the bug in the svn #1128 version.
Unfortunately, yet not seems the links of the updated snapshots, the sourceforge.net is very slow. Until this changes, only from the svn repository can download the new code.
Károly
The newest snapshots:
svn [r1128]
gputils-src-20150201-1128.tar.gz
gputils-20150201-1128-setup.exe
Related
Commit: [r1128]
Last edit: Molnár Károly 2016-02-15
The previous time, you did not respond for more than through a week. So now I ask, corresponds to the solution?
Károly
Hi Károly,
Sorry I was a bit busy, so I didn’t had time to check the modification.
About your comment that someone may complain for filtering or not: who can say he agrees that a software modifies the given command line arguments by default without notification?
For me this is like if you’re saying: Here are my command line parameters which are what I want to do, but feel free to change them to do something else as you want and please don’t advise me of what you changed…
Best regards,
Philippe
The gpasm does not modify anything. Just processes it to what get from the user. Many millions of program works the same way. The programs are not able to guess the user's intentions, only commands able to execute. (The most difficult to defend the user from his own mistakes.)
Károly
Hi Karoly,
Sorry I’m just back.
Well how you call a given command line parameter that asks the program to output somewhere but the software decides to output elsewhere?
This is an arbitrary action and can’t be named a « normal » behaviour.
Millions of programs respect the command line and execute what is requested or say why they can’t.
Period.
Best regards,
Philippe Paternotte
PMP Team Leader
http://www.pmpcomp.fr http://www.pmpcomp.fr/
De : "Molnár Károly" [mailto:molnarkaroly@users.sf.net]
Envoyé : lundi 9 février 2015 19:25
À : [gputils:bugs]
Objet : [gputils:bugs] #277 GPASM outputs in the wrong directory
About your comment that someone may complain for filtering or not: who can say he agrees that a software modifies the given command line arguments by default without notification?
The gpasm does not modify anything. Just processes it to what get from the user. Many millions of program works the same way. The programs are not able to guess the user's intentions, only commands able to execute. (The most difficult to defend the user from his own mistakes.)
Károly
[bugs:#277] http://sourceforge.net/p/gputils/bugs/277 GPASM outputs in the wrong directory
Status: open
Group: None
Created: Thu Jan 15, 2015 03:23 PM UTC by Philippe Paternotte
Last Updated: Sun Feb 08, 2015 03:05 PM UTC
Owner: Molnár Károly
Hi,
It seems that GPASM ignores the path specified by the -o option without notification.
It outputs the .o file in the same directory as the input file.
Example:
The current directory is c:\test
In this directory there is a source test.asm
There is a sub-directory c:\test\obj
GPASM -c -o"c:\test\obj\test.o" "test.asm"
outputs test.o in c:\test instead of c:\test\obj
Best regards,
Philippe.
Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/gputils/bugs/277/ https://sourceforge.net/p/gputils/bugs/277
To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/ https://sourceforge.net/auth/subscriptions
Related
Bugs:
#277I like to know whether it meets the solution for you?
Károly
Hi Karoly,
Definitively we have not the same point of view…
Nevertheless you have addressed the problem with a way that is useable.
About parameter passing: argv gives one string for one parameter. GPASM may take several ones for one parameter. The problem is the space between parameter header and its value. Many software have the value in the same string, with an equal sign or not, so each argv gets all what is needed.
MPASM processes correctly parameters without spaces between header and value.
Different ways.
Anyway, I stay on my point that ignoring “bad” parameter passing by default is not a great behaviour.
Let’s close the case.
BTW : The doc may be improved with more examples.
Best regards,
Philippe Paternotte
PMP Team Leader
http://www.pmpcomp.fr http://www.pmpcomp.fr/
De : "Molnár Károly" [mailto:molnarkaroly@users.sf.net]
Envoyé : samedi 21 février 2015 09:56
À : [gputils:bugs]
Objet : [gputils:bugs] #277 GPASM outputs in the wrong directory
I like to know whether it meets the solution for you?
Hi again :
BTW: The manual has typos for the GPASM command line formats: there is not always a space between the parameter header and <file> e.g.: --output.
Best regards,
Philippe Paternotte
PMP Team Leader
http://www.pmpcomp.fr http://www.pmpcomp.fr/