disassembling and reading C code from executable
I'm quite new in programming, wrote a few programs.... But i want to get some ideas of the experts....
So I thought that linux was free and that we were able to read all the source codes. But all the executables are binary files. I tried lxr (that doesn't seem to work) I tried ht that is unreadable for me... I tried dissy just the same unreadble stuff.... I tried a program disassembler (where I first had to include a few headers in some files.... and still the output stays unreadable) Please take me out of my misery and can someone tell me how I can open a binary executable (modified or not!) in emacs.... Thanks |
You just need to download the source files.
|
Quote:
1) You need to know the package name for the program whose sources you want to see. 2) You need to have the right deb-src repository in sources.list 3) Use the command apt-get source package I expect most Ubuntu users do package management in Synaptic, so doing things directly with apt may be new. For item (1) you often can get that info by doing a search in Synaptic. If that doesn't tell you the package you want, there is an apt-file search command you could install and learn to use, but it is easier to use the online search at: http://packages.ubuntu.com/ Scroll down to where it says Search the contents of packages For item (2), you could use the settings/Repositories menu choice in Synaptic or you could more easily directly edit /etc/apt/sources.list (as root). You will see lines that begin with deb and for each of those you will want another line that is identical except that it begins with deb-src |
Quote:
I never needed them untill now... But now I know... Thanks... PS: Now I can start writing some code in a certain standard. My last program was quite messy after 1400 lines... |
Quote:
|
All times are GMT -5. The time now is 07:54 PM. |