Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Nemiver intro
05-23-2010, 01:46 PM
Post: #1
Nemiver intro
P9 Tutorial - Debugging

Application

For this I will be using the debugger nemiver
to get this
Code:
sudo apt-get install nemiver

Code To Debug

Just a simple C program Compiled in gcc

Code:
#include <stdio.h>

    int func_1(int i,int b);
    int main()
        {
            int TOO_BIG;
            printf("For debugging purposes..\nEnter in a number LARGER than an int");
            scanf("%d",&TOO_BIG);
            printf("%d",func_1(23,TOO_BIG));
            return 0;
        }
        
        int func_1(int i, int b)
        {
            i += i*b*b;
            
            
        }

Open up your debugger after the code is compiled ,and run it.

Debugging
Once you're in Nemiver Do:

File-> Load Executable

Then on the menu , choose your executable.

Once it's loaded hit the button that looks like two gears.
It will continue the program.

On the bottom there will be a window called 'Target Terminal'
This is where you can actually run your program . I entered in a number larger than int and got a value of 23 then a message box that told me that the program has exited. On the bottom, you will also see tabs such as:
Call stack
Variable
Breakpoints etc
these will also be very useful while debugging an advanced application.

You can also choose your source file and executable by :
File-> load core file
You can also choose your exec. In that menu

Well, thats all of this intro to Nemiver. Start messing around with the options and you'll pick this up fast Smile

"Character is determined more by the lack of certain experiences than by those one has had."
Friedrich Nietzsche
Visit this user's website Find all posts by this user
Quote this message in a reply
05-23-2010, 05:33 PM
Post: #2
RE: Nemiver intro
Very good tut i can say. THX for sharing this debugging skills with us !

There's a fine line between genius and insanity. I have erased this line.
Oscar Levant
There's a fine line between an administrator and black hat hacker. I have erased this line.
Dr DEBCOL
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


 Quick Theme: