|
-
Nov 15th, 2006, 08:28 AM
#1
Thread Starter
PowerPoster
Source Code and Machine Code
Hi all,
Using a compiler we can translate source code in to machine code. As an example in Java we can translate source code in to machine code using compiler called javac.
Is there any way to translate machine code into source code?
“victory breeds hatred, the defeated live in pain; happily the peaceful live giving up victory and defeat” - Gautama Buddha
-
Nov 15th, 2006, 10:57 AM
#2
Re: Source Code and Machine Code
It depends on the language and the compiler. For VB6 it is not possible, and for others it is dubious at best.
See the article about it in our Classic VB FAQ (link in my signature) for a fuller explanation.
-
Nov 15th, 2006, 09:40 PM
#3
Thread Starter
PowerPoster
Re: Source Code and Machine Code
Thanks si_the_geek.
Do you know any such compiler for Java.
“victory breeds hatred, the defeated live in pain; happily the peaceful live giving up victory and defeat” - Gautama Buddha
-
Nov 16th, 2006, 04:47 AM
#4
Re: Source Code and Machine Code
They're called decompilers. Since during compilation, quite a bit of information is lost, and since source->bytecode is not a 1:1 mapping, they can only ever guess at what the original code was.
With this information, you could Google for it.
Why didn't you post this in the Java forum, when it's apparently about Java?
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Nov 19th, 2006, 10:22 PM
#5
Thread Starter
PowerPoster
Re: Source Code and Machine Code
 Originally Posted by CornedBee
They're called decompilers. Since during compilation, quite a bit of information is lost, and since source->bytecode is not a 1:1 mapping, they can only ever guess at what the original code was.
With this information, you could Google for it.
Why didn't you post this in the Java forum, when it's apparently about Java?
Ya, it's true. This should post in Java forum. I used that javac compiler here just as an example.
Anyway thanks for your advice.
“victory breeds hatred, the defeated live in pain; happily the peaceful live giving up victory and defeat” - Gautama Buddha
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|