Solved

how to debug in linux ?

Posted on 2001-08-31
4
259 Views
Last Modified: 2010-04-21
I wrote a programmer with c++ under linux, it has a  Segmentation fault, how can i debug it with gdb? I compile them with g++ -p -g -c a.c;
when i run the programmer, it corrupt, and generate a file "core", I use gdb -c core, and type "where", but it just show some address, how can i let it show somthing I can understand??


thanks a lot
0
Comment
Question by:sandy_wu
  • 2
4 Comments
 
LVL 51

Accepted Solution

by:
ahoffmann earned 100 total points
Comment Utility
gdb a.out
gdb -c core a.out
0
 
LVL 5

Expert Comment

by:moonbeam012200
Comment Utility
0
 
LVL 5

Expert Comment

by:moonbeam012200
Comment Utility
For a difinitive reverence see ...
http://www.gnu.org/manual/gdb-4.17/html_mono/gdb.html
0
 

Author Comment

by:sandy_wu
Comment Utility
Thank U guys!
Thank U moonbeam for the URL! it is useful, but i can only give the score to one guy!
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Linux daemon 11 347
Debian 3.16.7 3 123
usage of %{name} in rpm spec file 4 49
Embeded Linux on Router 9 92
Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now