Hi Ubuntu Lovers,
I have upgraded from Ubuntu 11.04 to Ubuntu 11.10.
While upgrading I have faced an issue like "Network Configuration" at the time of booting.
Solution:
1. While booting, press Ctrl+Alt+F1. Then it will show you Single User mode.
2. Login with user existing credentials (Use Administrator privileged account)
3. $ sudo apt-get update
4. $ sudo dpkg --configure -a
5. It solved my problem and now I am successfully able to login to Ubuntu 11.10
I have see and explore Ubuntu 11.10 now ..
Showing posts with label Solved. Show all posts
Showing posts with label Solved. Show all posts
October 15, 2011
August 08, 2008
Linux C Code Debugging for Segmentation Fault with GDB
Hi Friends,
Whenever you are doing some programming, you will be getting lot of errors. Myself have been in the same situation while programming.
When I was tried to write a code in C language (though I'm not a good programmer of C language), For my friend's sake I have tried some code.
The most frustrating error came in to picture, called "Segmentation Fault". Took help of google and no clue why I was getting the error.
What I have understand about Segmentation fault is
"Segmentation fault appears as if it is not easy to understand;
when your trying to access the memory that is not allocated by you ...
then segmentation fault appears after executing a.out"
Let me explain you with an example
int a[5]; // Declare an array
printf("%d\n",a[6]); // Then try to print the last+n location of the array where n>0
You will get segmentation fault error.
How to over come this?
There are different debuggers to locate the memory area where the segmentation fault occurred.
Procedure:
You can rely on gdb about 70% and there are also other debuggers
for which you can refer to the book "Linux is a Nutshell"
For further queries/comments mail to psrdotcom@gmail.com
Whenever you are doing some programming, you will be getting lot of errors. Myself have been in the same situation while programming.
When I was tried to write a code in C language (though I'm not a good programmer of C language), For my friend's sake I have tried some code.
The most frustrating error came in to picture, called "Segmentation Fault". Took help of google and no clue why I was getting the error.
What I have understand about Segmentation fault is
"Segmentation fault appears as if it is not easy to understand;
when your trying to access the memory that is not allocated by you ...
then segmentation fault appears after executing a.out"
Let me explain you with an example
int a[5]; // Declare an array
printf("%d\n",a[6]); // Then try to print the last+n location of the array where n>0
You will get segmentation fault error.
How to over come this?
There are different debuggers to locate the memory area where the segmentation fault occurred.
Procedure:
- 1.c // Your file name
- gcc 1.c -g // Then compile it
- gdb a.out // Type at the command prompt/console
- Now you will get a prompt >>>
- Type 'r'
- Give the required input
- It will locate the memory area where your trying to access the memory
- u is not allocate by u (it will give the lines in the program 1.c here segmentation fault has occurred )
You can rely on gdb about 70% and there are also other debuggers
for which you can refer to the book "Linux is a Nutshell"
For further queries/comments mail to psrdotcom@gmail.com
Subscribe to:
Posts (Atom)
Featured Post
Java Introdcution
Please send your review and feedback to psrdotcom@gmail.com
-
Hi all, I spent 2 days on configuring this. I read lot of blogs and instrutction steps from various sites. I would like share my experienc...
-
For the academic purpose i had written a small program in Matlab. I have tried encoding and decoding the image by using Huffman coding. ...
-
Hi folks, Today we will see how we can get the folder path of the windows user specific app data for storing any program (app) based inform...