Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
About a week and a half ago I found out about gdb. I had always used printf to debug but I was getting segmentation faults and I asked on linux questions how to read a dump and they suggested gdb. Now I have found out about ddd but I do not know how to specify arguments. I can do it with command line version gdb by saying gdb --args apsbasic pt01.bas for argv being the routine called and argv being the basic program to interpret which is pt01.bas . Any ideas as to how to specify arguments with ddd? Thanks. Alvin...
I've used gdb for the most part (actually like you, I like printf), but used gdb to look at stack traces.
Since ddd (from http://www.gnu.org/software/ddd/manu..._mono/ddd.html) is a front end to gdb, I expect it to be pretty much the same- there appears to be a menu entry to start the program running, which is supposed to put up a window for entering parameters. (look for "Program => Run", so Run should be a menu entry on the "Program" menu.
Googling ddd leads to their website where you can get a 230+ page manual with pictures - some of the pictures are destroyed but I have copied it to dvd and plan to get it printed out (using both sides of the paper) tomorrow. Kinkos will do spiral binding which will lay flat when opened. doing gdb in command line and then help all leads to an almost infinite list of commands. had to apt-get the ddd package as it did not come with ubuntu. It also does java which I hope to write the PC side ide in. I have never written a java program (wrote a small print to screen routine but that is it. ) Using java so it will work on WIN UNX and MAC. Wrote an abstract machine using the context sensitive STAGE II macro processor in 1985 so I am pro java for the portability aspect.
So how is it going? You are a better programmer than I from what progress I see you are making. I am still trying to get my first command working as I wrote all the code before testing. Just made some debugging routines last night to display function name and line number with the errors generated by the program for user entered code. I am a believer in God and Jesus as he has always given me just the right things in my life to aid me in doing my job - like my meeting you and all the great help you have given me. Recently I have been living on $806 a month of SS and a small annuity plus meager savings and running over my budget each month. Stupidly I turned to the lottery to see if that would work. About 4 weeks ago I quit thinking that I was not pleasing God with it. Then a week and a half after I quit I found out that I had almost $14,000.00 of dividends built up in a $10,000.00 insurance policy (53 years worth). God provided for me again! I hope you are doing well in all of this. Your stack machine sounds like the right approach to portability of User code to many different types of machines. Do you plan to use a specific micro processor to implement it on?
This should make using it in a tutorial mode much easier to follow.
As a side note, this is how I first learned assembly - a PDP-10 FORTRAN compiler would output the generated assembly code following the line of Fortran in the listing. It made it easy to extend my understanding of FORTRAN expressions into how the machine could interpret what the formula was for.
Granted, the code is NOT optimal (no constant folding, no replacing POP/PUSH pair using the same variable reference with a "STORE...", there is no recursion elimination, or algebraic simplification - though with this simple test there wouldn't be any).
NOTE: this is not a valid program even now (it will cause a stack underflow when the "main" function terminates, as well as not being a valid program anyway). This is just for illustration/testing of the translator. The "missing" source lines (like the ENDIF...) are things
that don't generate any code (the parse tree just has a NULL reference), so they aren't present. I may be able to get them included - probably by using the line number to output any preceding lines not yet output and just copy them into the generated assembly. That way any comments would also get included.
Documentation is slow going though (as are the validation tests... I've got one, but it needs a lot more).
That looks great! Would like to try your system on my 32 bit hardware when I get it going - or you could have one of my boards. I plan to have some sort of IDE to load programs into the computer and the PIC32 will have a built in boot loader to load from the IDE through USB to the PIC32.
Finally making some progress debugging with gdb. Tried to find a book on gdb at the va tech librery but it was too simplistic. I asked a question on linuxquestions and a guy immediately shot me a url of the documentation. 727 pages. I unpacked it and put it on dvd but when I went to the printer he was closed due to the snow. At 0.07 a page it will cost $50.89 to print it out duplex. FEDEX here does spiral binding so it will lay flat. I like to read paper manuals. Now I can at least set breakpoints and display variables as well as step through the source code. So things should speed up from now on. What progress are you making?
The glibc Reference Manual in .pdf form can be found at: http://www.gnu.org/software/libc/manual/pdf/libc.pdf if you are interested. I may print that out and spiral bind that too. Some of our communications are general and may be more appropriate if sent by email. We have each others email; what do you think