kanade
May 30 2008, 09:48 AM
To run the C/C++ file use$ gcc –g –o test sample.cpp To debug the code use following command $ gdb test --- you will get following messages GNU gdb Red Hat Linux (6.3.0.0-1.122rh) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-redhat-linux-gnu"...Using host libthread_db library "/lib/libthread_db.so.1". (gdb) b 4 -- Set the break point for your code, here I have set for 4th line of the codeBreakpoint 1 at 0x8048384: file test2.c, line 4. (gdb) r -- once the break point is set use “r “ to run the codeStarting program: /home/tests/test Reading symbols from shared object read from target memory...done. Loaded system supplied DSO at 0x8b5000 Breakpoint 1, main () at test2.c:5 5 { (gdb) n -----press “n” to go to next line main () at test2.c:7 7 max=MAX(5,4,3); (gdb) n -----press “n” to go to next line 8 printf("\n%d",max); (gdb) print max -----use “print” command to print any variables$1 = 5 (gdb) will add some more command to this at later stage.......
Reply
Similar Topics
Keywords : c, c, gdb, linux, debug, tool, simple, gdb, tutorial
- Moving To Fedora 9
Tutorial on how a newbie can move to using this fantastic OS Fedora 9, (1)
Why Linux?
(23) i have always wonder, what is so special about linux? why do people have linux? rather than windows
or mac? is it recommended that noobs like me /laugh.gif" style="vertical-align:middle"
emoid=":lol:" border="0" alt="laugh.gif" /> have an linux os? /rolleyes.gif"
style="vertical-align:middle" emoid=":rolleyes:" border="0" alt="rolleyes.gif" />....
Any Mobile That Run On Linux Os?
(3) Is there any Mobile that run on Linux OS? , where i can add my own application and excute them. I
did lot of survey on this, there are number of mobiles that run on Linux but all has one of the
following issues. 1. In most of them You can't run your applications 2. Most of the
mobiles are very costly eventhough they are using free OS(cost in optimising them). If you are
aware of such mobiles please let us know. My main requirment is i should be able to copy my
application to them and run them.....
Gimp Userbar Tutorial
Very Easy... (3) Hello, I will tell you how to create a nice userbar in the open-source software called GIMP. You
should GIMP 2.4.6 installed on computer, and if you don't, go to The GIMP Website. Make sure
to view a few beginner tutorials to have a basic understanding of GIMP. This is what the finished
userbar will look like: It is very simple, and I learned it easy. I will guide you through all
the steps of making a userbar. ~ Now we will go through all the steps. 1. Open GIMP and click
New(Ctrl + N) and make the size for your new image 350 by 19. Your screen should look....
Linux For Beginners- Easy To Install
(10) Which Linux distru is for beginners and Easy to install?....
How To Copy File & Folders From Linux To Windows?.
(12) Many face problem while transfering file from Linux to windows and Vise versa. My solution for
this is "winscp405". Winscp is a windows freeware tool used to copy file from & to Linux machine.
To get this tool just google for " winscp405" tool and download this small package and install.
Enjoy working with Linux and windows /tongue.gif" style="vertical-align:middle" emoid=":P"
border="0" alt="tongue.gif" />....
How To Play Music And Movie In Linux? Which Is The Good One?.
(3) How to play Movie and music on linux. I am using fedora and i dont think so any player is specific
to any one flavour of linux. I have used "MP3 blaster" player, but this you need to play from
command line. Any other user friendly player pls let me know /rolleyes.gif"
style="vertical-align:middle" emoid=":rolleyes:" border="0" alt="rolleyes.gif" /> ......
How To Install Linux Suse
(1) QUOTE Installing Suse Linux 10.1 This article is a "walk-through" of how I've installed
and configured Suse Linux 10.1 on 5 machines. This will be updated as I find things that may be of
interest. Please do not contact me with tech support questions. You'll find people far more
qualified to answer any questions at the 2 forums listed below. At some time or another I've
found most of what I know of Suse there. I hope that you will find this information helpful in your
dealings with Suse 10.1. Suse Linux Community Suse Forums (Use the search functio....
My Review And Experiance Of Ubuntu Linux
(4) I have been using Ubuntu 7.10 for about a month now. My experiance began when I sent a request for a
free CD to be mailed to me. Several weeks later, it arrived, however I was reluctant at first to
install it, as there was much hassle when I attempted to install my BCM43xx wireless network drivers
for another distro, Suse. Although I had ran a server on Linux for a while previously, it was easy
to do as Linux automatically detected the wireless network card I was using. This was on an older
computer that I ran the server. On my current pc, a Dell Inspiron 1300 Laptop, a ....
Diablo 2 In Linux?
possible or not? (10) Hey! Sorry if this should be in the game forum, but it is about a game in Linux. And I need
help with it /tongue.gif" style="vertical-align:middle" emoid=":P" border="0" alt="tongue.gif" />
so I thougt that it belongs to here. So.. Is it possible to install Diablo 2 on Linux using some
sort of patch, or any special software? Not just diablo. But other games too, that only works on
Windows. Thanks //Feelay....
Photographing Fireworks
Tutorial for shooting fireworks (7) Photographing fireworks presents some technical challenges, it needs quite a different approach to
most other subjects but follow these few steps carefully and you will be successful. What are we
photographing? Basically we are photographing streaks of light that develop over a period of time
against a black background. The great thing about a black background is that it makes no impression
on the film, or sensor in the case of a digital camera. So we can leave the shutter open as long as
we like, the black will still be black. So, in short, the way to photography firew....
Safety
Anyone who knows a tutorial (9) Hey! Anyone who know a tutorial where they teach you how to protect your scripts from danger
(hacks and stuff)? I think I need to start to think about theese stuff now.....
How To Make An Test-based Rpg Game!
This is a step by step tutorial of how to make a RPG test-based game (4) Welcome Hello this is Convictlife and i have made an RPG game and for you noobs out
there i will be explaining Here is a breif structure of this post: 1. Getting your codes. 2.
Getting your host. 3. Uploading your codes. 4. Configuring your codes. 5. MySQL 6. phpMyAdmin 7.
CronJobs 8. Editing 9. Finalizing Getting Your Codes! First of all you need codes that
will power your website. If you are a master coder (like Dabomstew) then you can code these codes
yourself, but if you are "so-so" then you will need to get codes from somewhere. I got....
A Simple Register Script
This Is a Very Simple Register-Script (3) Some time ago, i made a login-script. But how do you use a login-script, if you can't register.
So this morning, I decided to make a register-script.. What you should already know: The php
basics and a little more. How to use php and mysql together. The HTML basics (to make the forms).
The first thing we should do, is creating the database tables. Here is the code: CODE CREATE
TABLE `user` ( `id` int(4) unsigned NOT NULL auto_increment,
`username` varchar(32) NOT NULL, `password` varchar(32)....
Looking For Linux
2 choices that I will choose - make it easy to install and MAINTAIN (34) Ok I have tried Linux before, it was ok, until something with the kernel screwed up and it left me
with a command line interface that I didn't know what to do. I am looking for 2 different
distributions of Linux here, my first one is for: (Currently running Windows XP SP2) A computer
with 512 MB RAM Pentium 4 processor Internet Access GNOME or KDE desktop, doesn't matter Minimal
command line work!!! Absolutely no command line work when installing. I have tried
Ubuntu, it was easy enough. Anything easier than Ubuntu and I'll give it a try. M....
Freeware Dvd Authoring Tool
(2) I'm looking for a freeware program that can create DVDs which I can play on my standalone dvd
player. Nothing to complex, creating simple menus, converting to the right format (I do care about
quality, so being able to change some encoding settings is always welcome /smile.gif"
style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> ) and burning the disc is
more than enough.....
Could Linux Become The Dominant Os?
(12) According to the author's opinion, the answer is yes (he's a lawyer, from what I can tell).
http://www.theregister.co.uk/2007/08/17/triumph_of_linux/ The article also contains some
interesting facts about the devious ways in which Microsoft is trying to derail Linux, most recently
through vague legal threats to enforce patents against Linux distributors that it does not partner
with. Personally I think Linux could become the dominant OS, but many, many years from now.....
Psybnc - Howto
How to make a psyBNC on Linux (4) Installation First, fetch the latest source code from http://www.psybnc.at QUOTE cd wget
http://www.psybnc.at/download/beta/psyBNC-2.3.2-7.tar.gz tar -zxvf psyBNC-2.3.2-7.tar.gz cd psybnc
Configuration QUOTE make menuconfig Now go in `Bouncer Config', next set Listening
Port and Ip. Next select `User' Here you will be able to create a user for your bouncer.
You must set Ident, Realname and Password, and vhost too. So return to main menu, and choose exit.
When prompted for saving select Yes. Launching psyBNC QUOTE make ./p....
Installing Glut To Dev C++
A tutorial to install GLUT on Dev C++ (3) This is a tutorial that someone submitted to my programming site when it was up because I didn't
know how to install glut on any other compiler than my own. I though it would be helpful to post
this up for everyone here so they can use GLUT as well without having to google for hours. I'm
not sure if I'm allowed, but I have quoted it and have given credit where credit is due, so if
this post is allowed I hope this helps those people who couldn't program in GLUT yet. QUOTE
Installing G.L.U.T. to Dev C++ By James Duran (email: vrok137@yahoo.com) ....
[tutorial] Pc-pc Home Networking.
How to connect 2 computers at home via a LAN wire. (9) Hello Folks, Its been long since i've posted so thought i'd keep myself alive by posting
up a useful tutorial. I know how hard it can be to not know about something, and ask around with no
clue of whats goin on. So i've made sure that every word in this tutorial is understandable by
any new user with the least knowledge of a PC and Networking.
PC-PC Home Networking Tutorial First and foremost make sure
you have the right cable. A Right cable would be a Cross-Over LAN wire (PC-PC). ....
[tutorial] Basics Of C Programming - Part 1
(11) Well, I was going through a few posts on C / C++ on asta .. and found a very less C related
subjects. I went through the entire tutorial of mastercomputers >>HERE .. It was a nice
tutorial for guys who have a little knowledge of programming basics and want to go into hardcore
programming. Since there was no Basic overview of what C was, i thought of writing one /smile.gif"
style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />. I wil make shure that what i
write will be 100% accurate, but its human to error so please correct me if i am wrong. Let....
Pre Loader Tutorial For Flash
Made by: Jordain (6) Simple pre loader tutorial with play button by: Jordain Joyce First of all open up flash then
Create 4 Layers and in order name them: Actions
Loader outline
Loader Bar Content Then create 3
frames for each layer. Lets start in the actions layer, for the first frame make it blank and the
second frame make it blank also. Press F9 to open the actions panel (make sure you ....
Using The Php Mail() Function For Images Or Attachments
Can't find a decent tutorial! (3) I read the one mail() tutorial that was posted in the tutorial section and to my horror found that
he had quoted almost verbatim from the PHP Manual off php.net, and made a comment about it, and also
found that if you were new to PHP or the Manual that it was informative but not indepth enough for
my tastes. This is not a tutorial although with the code that will be posted it might look like
one, that is not its intent or purpose. I have searched and found many so called tutorials about
MIME mail and boundries and all that but basically it either told me to use PHPMai....
What Made You Switch To Linux?
(60) I first tried Linux a few years ago, not because I was completely against Windows or anything like
that, but just because I had some free time on my hands. I started off with Mandrake 9.0 which was
very user friendly and Windows-like. After reading through a bunch of message boards and learning
which distros are good for what, I soon realized my current distro was great for Linux noobs. So
then I decided to try something a little more advanced like Slackware which I knew had a steep
learning curve. Since then I've been using Slackware as my main OS and couldn'....
Prove To Me That Linux Is Better (For Gaming)
For Gaming... :) (21) Ok here is a challenge to all the hardcore linux folks out there. I will greatly accept the switch
if it can be proven that Games will run as good under linux as they do under windows. Im a windows
guy at heart, but I do work on unix systems at work. Im a gamer, and that will never change. I had
switched over to linux about 4 years ago, and I couldnt play crap on linux without dual booting to
windows. (I think it was Wine emulation they were running under) Now have there been some
improvements in being able to play windows games smoothly on linux? If so, please let me....
PHP Tutorial: Form Verification And Simple Validation
A One Page script for PHP form verification. (12) Having used various means of verifying HTML forms I believe that this method of verifying a form
to be the best mostly because it does everything on one page. It presents the form on one page and
then when the submit button is pressed, if all the required fields are not filled out then it will
present the form again with all the fields intact and in red lettering will point out the fields
that are required to be filled out in red. It is not possible to click submit using this method even
if the user has turned JavaScript off. While it is possible to use javascript to ....
Alt Txt Tooltip Popups Over Text Links, How To Do?
searching for a simple way... (11) How can I insert an alt txt caption for a text link, so that when they hover over the text it pops
up with more info about the link before the person clicks on it? Do I have to use an image map over
the text for that, or is there a simple function that does the trick?....
Yahoo! Messenger Protocol Tutorial - Part 2
(2) Part 2 - History The need for humans to communicate faster and more efficiently has been one of the
driving forces behind the Internet. Not since the invention of the telephone has communications
between humans been more readily available. The communication power of the Internet began to take
shape in its infancy with one of the first Internet applications, email. While the Internet was
still ARPANET and with only four links, the first email message was sent by Ray Tomlinson in 1971.
The first message consisted of the text “Testing 1-2-3” and did not contain any of th....
Photoshop Tutorial: Full Grunge Signature
Using Photoshop 8.0 CS (16) Side Notes: I hope you enjoy it. I made this awhile ago, but didn't posted it before. I
though it was time to be shared, so here it is. ....
How To Remove Bad Sectors Or Bad Clusters From HDD
a tutorial for you all (15) hi friends, there is small tutorial to remove Bad Sectors from hdd to remove bad sectors you need a
program named SeaMap now we start Start the SeaMap.exe software Set the option by typing SD and
then press enter Press 1 then 0 or 1 to select drive Then press 2 and there will be a option (Y/N)
press n for No Press Esc button one to go back to command line Type FD Type y for yes the Hdd will
format the whole disk and removes bad sectors and partitions Now the computer has to be restarted,
Restart your computer Partition your Hdd using fdisk and then format all partitio....
Looking for c, c, gdb, linux, debug, tool, simple, gdb, tutorial
|
|
Searching Video's for c, c, gdb, linux, debug, tool, simple, gdb, tutorial
|
advertisement
|
|