- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: VMS C decompiler
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-19-2005 09:17 PM
тАО09-19-2005 09:17 PM
A manager ask me if I can help :
- we have a C based binary that works nice
- we don't have the source code for that version, but an older one that is no satisfactory.
Is there a chance to get even ugly or non working C looking source code from the binary ?
Thanks all for your help,
Nicolas
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-19-2005 09:43 PM
тАО09-19-2005 09:43 PM
Solutionwhat is the problem you're trying to solve ?
In general, you can't decode machine instructions back into C code.
Depending on the operating system and architecture (are you talking about OpenVMS VAX, OpenVMS Alpha or OpenVMS IA64 ?), you could decode the binary instruction stream using SDA (or PATCH) and get back machine code. On VAX, you can get some idea, what the machine code is doing (especially if you have the machine code listing from an older version of the same module), but on Alpha or Itanium, it's much harder or near impossible.
If you just want to run your existing 'nicely working' C binary on another OpenVMS architecture, there are binary translators available for OpenVMS VAX to Alpha and Alpha to Itanium, which will take your existing binary and produce a new binary to be run on the target platform.
Volker.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-19-2005 09:44 PM
тАО09-19-2005 09:44 PM
Re: VMS C decompiler
Why do you wish to have the source code for this application?
Purely Personal Opinion
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-19-2005 10:19 PM
тАО09-19-2005 10:19 PM
Re: VMS C decompiler
The migration is from VMS on alpha to Solaris on Sparc : is there a way to get a working binary on Sun from the one on VMS ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-19-2005 10:24 PM
тАО09-19-2005 10:24 PM
Re: VMS C decompiler
no way from OpenVMS to Solaris ;-(
Everything is different, operating system interfaces and machine architecture. You could expect binary translators to only work on the same operating system, if that is available on machines with different architectures, as is OpenVMS from VAX to Alpha to Itanium.
Volker.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-19-2005 10:44 PM
тАО09-19-2005 10:44 PM
Re: VMS C decompiler
This will be one of many costs associated with this migration.
Purely Personal Opinion
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-19-2005 11:01 PM
тАО09-19-2005 11:01 PM
Re: VMS C decompiler
Depending on how different the previous version you had, was from the version you are working with, you might be able to compile a version of the older and compare that with an SDA wander through the newer version, but you would be a braver person than most here to take on something like that.
Also, the move to solaris - there are plenty of "war stories" around that, that can come from here... I for one find that the Solaris C compiler has a propensity for memory leaks.
q
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-20-2005 04:05 AM
тАО09-20-2005 04:05 AM
Re: VMS C decompiler
are you competing for
"Understatement of the year"?
Proost.
Have one on me.
jpe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-20-2005 06:53 AM
тАО09-20-2005 06:53 AM
Re: VMS C decompiler
1. You can't translate binary to C. You can only translate binary to machine language or assembler if you have a translator. A VAX assembly language program would not work on a different type of hardware even an Alpha without a translator or emulation on the Alpha. The assembly language program would not be maintainable since no one would understand it. Even documented assembly language programs are easy to break and difficult to maintain.
2. You can't normally translate a binary from one vendor to another. Sometimes a vendor will provide translators from one hardware type to another another hardware type (like VAX to Alpha, VAX to Itanium, Alpha to Itanium.
3. If you don't have the C source, you either have to run as is or rewrite the application. It shows why Software Configuration Management and Software Quality Assurance are needed functions.
Lawrence
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-20-2005 07:00 AM
тАО09-20-2005 07:00 AM
Re: VMS C decompiler
Lawrence
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-20-2005 07:46 AM
тАО09-20-2005 07:46 AM
Re: VMS C decompiler
Or you just tell your management that they can't migrate to Sun, since the source for a critical part of the system can't be found...
Ken
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-20-2005 08:33 AM
тАО09-20-2005 08:33 AM
Re: VMS C decompiler
q
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-20-2005 01:35 PM
тАО09-20-2005 01:35 PM
Re: VMS C decompiler
In reality it would be MUCH easier to rewrite the application from scratch, based on the specs than attempt to take this path. (and in future, take better care of your source code?)
As for migrating from OpenVMS to Solaris... well, about the best I can offer is to wish you good luck. You'll need it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-20-2005 01:37 PM
тАО09-20-2005 01:37 PM
Re: VMS C decompiler
>If the source was compiled "/debug"
>and you still have the objects, you
>might be able to recover the soure
>from there.
Sorry, that won't help. /DEBUG doesn't embed the source code into object module or executable image, it just inserts pointers back to the source files.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-21-2005 02:11 AM
тАО09-21-2005 02:11 AM
Re: VMS C decompiler
http://www.stanq.com/charon-vax.html
SRI test-compiled CHARON-VAX a few years ago on Solaris. But there wasn't any market for it.
[And yes, this is a Shameless Plug (tm) from a CHARON-VAX reseller.]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-21-2005 05:11 AM
тАО09-21-2005 05:11 AM
Re: VMS C decompiler
1. Ok, if you write a translater, you can translate assembler instructions to C instructions. It's outside my skill set. There is no incentive for HP to write such a translator which would help move customers off their hardware. It would cost some amount of manhours to write such a translator, document it and test it.
2. The hardware specific parts of C would probably not run correctly on on other hardware if it ran at all. It is hard to know whether the original programmers separated hardware dependencies into separte routines or where in the generated C those depenencies would be.
3. The output from a translator to C would be just a bunch of C instructions. Without a frame of reference as to what function the instructions are performing or what interconnections there are, it would be extremely difficult for most C programmers to attempt to maintain the resulting C. Without documentation, I would tell management that it would be a waste of manhours to try and maintain it. It would be easy to break something. The C names would not give meaningful information about the context of what is being done or the intent.
Lawrence
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-21-2005 11:09 AM
тАО09-21-2005 11:09 AM
Re: VMS C decompiler
SMOMs on the other hand. How deep are your bosses pockets (and how big/complex is the application.)
q
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-21-2005 04:55 PM
тАО09-21-2005 04:55 PM
Re: VMS C decompiler
Yes, we're in "violent agreement" here. It would be fairly pointless to actually do it, but nevertheless, it is possible. A deterministic programm running on a Vonneumann type machine, expressed in any form of programming language can (in theory) be translated into any other programming language.
Whether the resulting program would be readable, efficient or at all useful is a different question.
Apart from the computer science theory, there is also the business case. Obviously it's not in HP's interests to create such a processor, if the objective is to move applications from HP hardware to Sun hardware.
Maybe Nicolas should be asking these questions in a Sun forum?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-21-2005 05:09 PM
тАО09-21-2005 05:09 PM
Re: VMS C decompiler
Also, if one digs back through the Decus/Encommpass archives, for an app called dism32, as I recall, it was a VAX disassembler - one could learn from it (Although alphas are less amenable to reverse engineering code, due to the Optimization that exists within some of the Alpha compilers (definitely in things like Bliss, don't know about C)
q
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-23-2005 12:43 AM
тАО09-23-2005 12:43 AM
Re: VMS C decompiler
Cheers
Nicolas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-23-2005 12:43 AM
тАО09-23-2005 12:43 AM
Re: VMS C decompiler
Cheers
Nicolas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-23-2005 12:45 AM
тАО09-23-2005 12:45 AM