473,473 Members | 1,745 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

a debugging question

I have compiled a program with -g option with gcc, but I am almost
unable to debug it. For most variables, it does not allow me to print
their values while debugging. Could someone tell me what compile
options I have to use or how I should call gdb (if any special flags I
have to use). I have used gdb a lot a few years ago, and I never had
this problem.
It is a small program so today I used the time tested method of
debugging - add lots of print statements - but I hope someone will
suggest a better way.
Thanks.
Sep 30 '08 #1
3 1000
a_linux_user wrote:
I have compiled a program with -g option with gcc, but I am almost
unable to debug it. For most variables, it does not allow me to print
their values while debugging. Could someone tell me what compile
options I have to use or how I should call gdb (if any special flags I
have to use). I have used gdb a lot a few years ago, and I never had
this problem.
Not here, but the people in gnu.g++.help should be able to.
Sep 30 '08 #2
a_linux_user wrote:
I have compiled a program with -g option with gcc, but I am almost
unable to debug it. For most variables, it does not allow me to print
their values while debugging. Could someone tell me what compile
options I have to use or how I should call gdb (if any special flags I
have to use). I have used gdb a lot a few years ago, and I never had
this problem.
Yes, somebody in the newsgroup 'gnu.gcc.help' could.
It is a small program so today I used the time tested method of
debugging - add lots of print statements - but I hope someone will
suggest a better way.
Somebody in the compiler newsgroup probably will, if you ask.

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Sep 30 '08 #3
Sorry about posting it here.

On Sep 30, 8:36*pm, Victor Bazarov <v.Abaza...@comAcast.netwrote:
a_linux_user wrote:
I have compiled a program with -g option with gcc, but I am almost
unable to debug it. For most variables, it does not allow me to print
their values while debugging. Could someone tell me what compile
options I have to use or how I should call gdb (if any special flags I
have to use). I have used gdb a lot a few years ago, and I never had
this problem.

Yes, somebody in the newsgroup 'gnu.gcc.help' could.
It is a small program so today I used the time tested method of
debugging - add lots of print statements - but I hope someone will
suggest a better way.

Somebody in the compiler newsgroup probably will, if you ask.

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Sep 30 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Steve Anderson | last post by:
Please excuse my ignorance as I'm fairly new to ASP. We have IIS running on Win2000 and serving out an ASP application. I installed the script debugger tonight. IE6 on the machine has Disable...
5
by: Bob Bamberg | last post by:
Hello All, I have been trying without luck to get some information on debugging the Runtime Error R6025 - Pure Virtual Function Call. I am working in C++ and have only one class that is derived...
0
by: ZMan | last post by:
Scenario: This is about debugging server side scripts that make calls to middle-tier business DLLs. The server side scripts are legacy ASP 3.0 pages, and the DLLs are managed DLLs...
7
by: Frank | last post by:
I'm running a mixed ASP / ASP.NET environment. I can use the debugger in for the ASP.NET code, no problems. But when I turn on ASP Debugging for the project, I get the error message: "Error...
2
by: Alex Clark | last post by:
Hi All, My system: WinXP Pro, VS.NET 2003, SQL Server Personal Edition. I'm having problems with my old favourite demon, SQL Debugging from within VS.NET. I have to say I've found this...
5
by: Velvet | last post by:
Can someone tell me to what process I need to attach to be able to step through my classic ASP code in VS.net 2003. I'm working on an XP box with IIS installed. I also have VS.net 2005 (The...
0
by: Günter Prossliner | last post by:
Hi everybody! The same question I have asked about one week ago in the german asp.net newsgroup, but no one was able to answer the question. Maybe someone is able to in this group! I...
8
by: razael1 | last post by:
I am putting debugging messages into my program by putting blocks that look like this: #ifdef DEBUG errlog << "Here is some information"; #endif All these #ifdef blocks make the code bulky and...
5
by: phnimx | last post by:
Hi , We have developed a number of plug-in .NET Library Components that we typically deploy with our various applications by installing them into the GAC. Each of the applications contains an...
0
by: Peted | last post by:
I suspect there is a better forum for this question, but i couldnt find it. If someone could point me in the right direction or help me with this question it would be muchly appreciated I have...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.