LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 12-06-2005, 02:58 AM   #1
naihe2010
Member
 
Registered: Oct 2005
Location: China
Distribution: ArchLinux
Posts: 103

Rep: Reputation: 15
about `make` and debug source code


I always write source code and use
gcc -g somefile.c
to creat program which can debug by gdb.

And now, I am reading a little bigger program's source code.
I made some change and want to debug it.
I only can
./configure&&make&&make install
to run it and see the result.
I want to kown, how to debug it with gdb on this condition?

I don't konw a lot about configure and make, if there is some books to explain thes ?

Last edited by naihe2010; 12-06-2005 at 04:19 AM.
 
Old 12-06-2005, 03:21 AM   #2
exvor
Senior Member
 
Registered: Jul 2004
Location: Phoenix, Arizona
Distribution: LFS-Version SVN-20091202, Arch 2009.08
Posts: 1,496

Rep: Reputation: 68
if you just run ./configure and then make you will get the
binaries where ever the programer configured make to put them.
of course you could ask the program maintainers how to debug it
the GNU c programming tutorial has notes on using make
 
Old 12-06-2005, 04:29 AM   #3
TruongAn
Member
 
Registered: Dec 2004
Location: Vietnam (Việt Nam)
Distribution: Gentoo (desktop), Arch linux (laptop)
Posts: 728

Rep: Reputation: 33
Why do people programing in that way?
There is many IDE these day
KDevelop, Eclipse and so on.
Why don't you try them.
If you use one of them, you won't get such problem.
 
Old 12-06-2005, 05:01 AM   #4
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
Quote:
Originally Posted by TruongAn
Why do people programing in that way?
There is many IDE these day
KDevelop, Eclipse and so on.
Why don't you try them.
If you use one of them, you won't get such problem.
You might inherit it one day from someone.
And what if you don't have a graphical environment.
 
Old 12-07-2005, 07:32 AM   #5
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: FreeBSD, Debian, Mint, Puppy
Posts: 3,298

Rep: Reputation: 175Reputation: 175
Try ./configure --help you can probably add make FLAGS.

IDEs are nowhere near as powerful as a fully learned up
vi/make user.
Knowledge is power.
 
Old 12-07-2005, 10:36 AM   #6
TruongAn
Member
 
Registered: Dec 2004
Location: Vietnam (Việt Nam)
Distribution: Gentoo (desktop), Arch linux (laptop)
Posts: 728

Rep: Reputation: 33
Knowledge is power, but no one can know everything.
Some hints improve the work and harm nothing.
 
Old 12-07-2005, 11:14 AM   #7
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: FreeBSD, Debian, Mint, Puppy
Posts: 3,298

Rep: Reputation: 175Reputation: 175
True true.
Good point.

But if you are in a professional environment (i.e. a job) it's best to keep it simple.
A combination of vi and make will be on virtually every system. As you become
skilled you build up tricks, scripts templates etc. and it becomes a lot more
efficient to work in this way.

If it wasn't true vi and make would have died years ago!
 
Old 12-13-2005, 05:59 AM   #8
wimnat
Member
 
Registered: Dec 2004
Location: Sydney, AU
Distribution: CentOS 5.x, Backtrack
Posts: 72

Rep: Reputation: 16
Is rpmbuild similar to make? I used rpmbuild -bb on a spec file and it created two files. packagename.rpm and packagename.debuginfo.rpm. What is the debuginfo file? What will happen if i install it?
 
Old 12-13-2005, 06:01 AM   #9
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: FreeBSD, Debian, Mint, Puppy
Posts: 3,298

Rep: Reputation: 175Reputation: 175
have you tried the man page?
 
Old 12-13-2005, 06:03 AM   #10
wimnat
Member
 
Registered: Dec 2004
Location: Sydney, AU
Distribution: CentOS 5.x, Backtrack
Posts: 72

Rep: Reputation: 16
Yes! It tells me all about the options and which options do what but nothing about creating a debug rpm
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
package compiling from source, make & make install concepts shujja Linux - Newbie 2 09-20-2005 01:18 AM
How to convert Assembly code to "C" source code ssg14j Programming 2 08-01-2005 01:48 PM
How to debug Linux FAT filesystem code? ashishkumbhare Programming 2 04-14-2004 03:16 PM
Source code hey_joe Linux - Newbie 1 03-14-2004 02:06 PM
debug problem w/ c++ code nub47 Programming 2 12-17-2003 01:31 AM


All times are GMT -5. The time now is 04:29 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration