Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Step-by-Step debugging: (12 Items)
   
Step-by-Step debugging  
Hello all,

I am wondering how can one do step by step debugging (without any breakpoints) as can be done in TurboC? I eventually 
want to debug one multi-threaded application I made.

I know it has to be something simple but I am unable to find the option to do that in the "Debug" Perspective in the IDE
.

I am using IDE 4.6 in QNX SDP 6.4.1.

Thanks!
Shashank
RE: Step-by-Step debugging  
You can set the "Stop at main" option in your debug launch configuration.


-----Original Message-----
From: Shashank Todwal [mailto:community-noreply@qnx.com]
Sent: Tue 13/07/2010 5:47 AM
To: general-ide
Subject: Step-by-Step debugging
 
Hello all,

I am wondering how can one do step by step debugging (without any breakpoints) as can be done in TurboC? I eventually 
want to debug one multi-threaded application I made.

I know it has to be something simple but I am unable to find the option to do that in the "Debug" Perspective in the IDE
.

I am using IDE 4.6 in QNX SDP 6.4.1.

Thanks!
Shashank



_______________________________________________

General
http://community.qnx.com/sf/go/post59267


Attachment: Text winmail.dat 2.62 KB
Re: RE: Step-by-Step debugging  
Hey Andy,

Thanks for your quick reply. Now I am able to debug in more steps. BUT: 

The problem now is that the line which is currently being executed is not highlighted as is done in standard debuggers.

Also instead a new window besides my code.c window "2ldd() 0xb00342bd6", comes in the "Debug" Perspective saying "No 
source available for "ldd() " " and with a button "View Disassembly....". The problem is even if I switch to my code.c 
file in the "Debug" perspective, it again and again switches to this new window whenever I try to "Step Into" and its 
really irritating for me. The debugger is basically making no sense to me.

Any help on this would be really great!

Thanks!
Shashank
Re: RE: Step-by-Step debugging  
Forgot to mention that the same problem was coming even when there were very few interrupts (before enabling the "Stop 
on shared library events" in the Debug Configuration). Also my code is very little in main(). Its mainly in the two 
functions which I call in my main().

Regards,
Shashank
Re: RE: Step-by-Step debugging  
Stopping at "main()" gives you the starting point to step into the
functions. As long as you have access to the functions' source and their
memory space you should be able to step into them.

You can use the "Source" tag in the debug configuration to define
alternative source location for your functions.

-----Original Message-----
From: Shashank Todwal <community-noreply@qnx.com>
Reply-to: post59273@community.qnx.com
To: general-ide <post59273@community.qnx.com>
Subject: Re: RE: Step-by-Step debugging
Date: Tue, 13 Jul 2010 08:58:57 -0400 (EDT)

Forgot to mention that the same problem was coming even when there were very few interrupts (before enabling the "Stop 
on shared library events" in the Debug Configuration). Also my code is very little in main(). Its mainly in the two 
functions which I call in my main().

Regards,
Shashank



_______________________________________________

General
http://community.qnx.com/sf/go/post59273

Re: RE: Step-by-Step debugging  
Did you try to "Step Into" "ldd()"? You won't be able to because first
you don't have the source and second you don't have access to its memory
space.


-----Original Message-----
From: Shashank Todwal <community-noreply@qnx.com>
Reply-to: post59272@community.qnx.com
To: general-ide <post59272@community.qnx.com>
Subject: Re: RE: Step-by-Step debugging
Date: Tue, 13 Jul 2010 08:56:44 -0400 (EDT)

Hey Andy,

Thanks for your quick reply. Now I am able to debug in more steps. BUT: 

The problem now is that the line which is currently being executed is not highlighted as is done in standard debuggers.

Also instead a new window besides my code.c window "2ldd() 0xb00342bd6", comes in the "Debug" Perspective saying "No 
source available for "ldd() " " and with a button "View Disassembly....". The problem is even if I switch to my code.c 
file in the "Debug" perspective, it again and again switches to this new window whenever I try to "Step Into" and its 
really irritating for me. The debugger is basically making no sense to me.

Any help on this would be really great!

Thanks!
Shashank



_______________________________________________

General
http://community.qnx.com/sf/go/post59272

Re: RE: Step-by-Step debugging  
Hi Andy,

How can we see which line is currently being executed in debugging mode? QNX IDE is not highlighting the line currently 
executed. 

Also its constantly giving me the previously mentioned error. I checked all sources and everything seems fine. The 
Program runs fine, the problem is only during debugging.

Looking forward to your kind help.

Thanks!
Shashank
Re: RE: Step-by-Step debugging  
Also what does ldd() do?

I have never used that function anywhere.
RE: RE: Step-by-Step debugging  
http://www.qnx.com/developers/docs/6.4.1/neutrino/utilities/l/ldd.html

Can you export your project and attach here? I also want to know why you step into ldd().


-----Original Message-----
From: Shashank Todwal [mailto:community-noreply@qnx.com]
Sent: Wed 14/07/2010 8:20 AM
To: general-ide
Subject: Re: RE: Step-by-Step debugging
 
Also what does ldd() do?

I have never used that function anywhere.



_______________________________________________

General
http://community.qnx.com/sf/go/post59385


Attachment: Text winmail.dat 2.51 KB
RE: RE: Step-by-Step debugging  
Hi, Shashank,

You might be interested in reading this online documentation about how to setup and debug your program using Momentics 
IDE. It may answer some of your questions in details with screenshots.

http://www.qnx.com/developers/docs/6.4.1/ide_en/user_guide/debug.html


-----Original Message-----
From: Shashank Todwal [mailto:community-noreply@qnx.com]
Sent: Wed 14/07/2010 8:19 AM
To: general-ide
Subject: Re: RE: Step-by-Step debugging
 
Hi Andy,

How can we see which line is currently being executed in debugging mode? QNX IDE is not highlighting the line currently 
executed. 

Also its constantly giving me the previously mentioned error. I checked all sources and everything seems fine. The 
Program runs fine, the problem is only during debugging.

Looking forward to your kind help.

Thanks!
Shashank


Attachment: Text winmail.dat 2.78 KB
RE: RE: Step-by-Step debugging  
Did you compile your source file with -g option?

-----Original Message-----
From: Shashank Todwal [mailto:community-noreply@qnx.com]
Sent: Wed 7/14/2010 8:19 AM
To: general-ide
Subject: Re: RE: Step-by-Step debugging
 
Hi Andy,

How can we see which line is currently being executed in debugging mode? QNX IDE is not highlighting the line currently 
executed. 

Also its constantly giving me the previously mentioned error. I checked all sources and everything seems fine. The 
Program runs fine, the problem is only during debugging.

Looking forward to your kind help.

Thanks!
Shashank



_______________________________________________

General
http://community.qnx.com/sf/go/post59384


Attachment: Text winmail.dat 2.67 KB
Re: RE: Step-by-Step debugging  
Hey Andy and Elena,

Apologies for the delay. I am currently traveling and therefore have limited
access to email.

@ Andy: I will export the project soon and pass it to you. I also read the
online documentation. Its amazing. I wonder how I didn't find it through
google. Thanks for the resource. It was very much needed.

@Elena: Sorry, I didn't compile by -g option. I just used the build option
provided in the IDE, and then I run the program.

Thanks for your time and help.

Regards,
Shashank

On Thu, Jul 15, 2010 at 1:22 AM, Elena Laskavaia
<community-noreply@qnx.com>wrote:

>
> Did you compile your source file with -g option?
>
> -----Original Message-----
> From: Shashank Todwal [mailto:community-noreply@qnx.com]
> Sent: Wed 7/14/2010 8:19 AM
> To: general-ide
> Subject: Re: RE: Step-by-Step debugging
>
> Hi Andy,
>
> How can we see which line is currently being executed in debugging mode?
> QNX IDE is not highlighting the line currently executed.
>
> Also its constantly giving me the previously mentioned error. I checked all
> sources and everything seems fine. The Program runs fine, the problem is
> only during debugging.
>
> Looking forward to your kind help.
>
> Thanks!
> Shashank
>
>
>
> _______________________________________________
>
> General
> http://community.qnx.com/sf/go/post59384
>
>
>
>
>
>
> _______________________________________________
>
> General
> http://community.qnx.com/sf/go/post59469
>



-- 
Thanks and regards,

Shashank Todwal
4th Year |  M.Sc. (Hons.) Physics + B.E. (Hons.) Computer Science
BITS, Pilani - K. K. Birla Goa Campus

+91 9881472930  |  f2007497@bits-goa.ac.in