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.
I want to run a file off the Internet with GNU Debugger. So I download the tar.gz file off the Internet, and I extract it and compile it. Then in the directory of the compiled source, I type: gdb -q ./whatever.c
where "whatever.c" is the name of the file I want to run
However, when I do this gdb doesn't have access to the source code, so I cant do much with it. So is there any way I can make it have access to the source code? Please be specific, I'm not very good with this kind of thing.
There were no variables named CFLAGS, so I added the line "CFLAGS=-g" to the makefile. It compiled without any errors. But when I ran it with GDB it still didn't let me look at the source code. So basically adding "CFLAGS=-g" didn't change anything. I even tried it on many different files off the Internet, and this didn't work with any of them.
The line "CFLAGS=-g" itself doesn't do anything, the makefile has to be setup for it. Since your makefile didn't include that variable, adding the line will do nothing. Without the CFLAGS variable, you might as well just find the line where the makefile is calling gcc and add in "-g" yourself.
Can you post the makefile (use CODE tags), or at least tell us what program you are trying to compile?
A question for perort: the tar.gz file that you compiled; does the compile begin with the ./configure step? If yes, then you can edit the makefile in the prefered method, by setting the appropriate options to ./configure.
Try "./configure --with-gdb" (sans quotes), then make and install.