Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Breakpoints half working: (14 Items)
   
Breakpoints half working  
I can hit many breakpoints which work fine but I can also set ones (perhaps just before an imminent crash) which only 
show as hit in the Debugger Console but don't open in the Editor view and don't offer the step icons.

I am struggling to effectively debug the crashes because of this issue.
RE: Breakpoints half working  
I would need more details than that. What does it means exactly? It does not stop at all - means continue running?
Or it stops but does not open editor? In this case you can go to Debug view, find the frame and click there.
Sometimes it can stop at place which would not have source attached (i.e. when breakpoint hit - all thread are stopped,
some may be in os code which have no source)

-----Original Message-----
From: Duncan Perrett <community-noreply@qnx.com> 
Sent: Thursday, May 7, 2020 12:34 PM
To: general-ide <general-ide@community.qnx.com>
Subject: Breakpoints half working

I can hit many breakpoints which work fine but I can also set ones (perhaps just before an imminent crash) which only 
show as hit in the Debugger Console but don't open in the Editor view and don't offer the step icons.

I am struggling to effectively debug the crashes because of this issue.



_______________________________________________

General
http://community.qnx.com/sf/go/post120594
To cancel your subscription to this discussion, please e-mail general-ide-unsubscribe@community.qnx.com
Re: RE: Breakpoints half working  
The program does stop and if I open the Debugger Console is tells me which breakpoint has been reached.
The Resume button is available but the step buttons are not.
There are no automatic changes in the editor.
I am in the Debug Perspective.
Even if I open the file manually in the editor, the line is not highlighted in green.

My versions are 
Mometics Version: 7.0.4.v201905030143
QNX 7
My host is Windows 10 64-bit
My target is QNX Neutrino VMWare image for X86_64 from the QNX Software Center
Re: RE: Breakpoints half working  
Do you have warnings on console about libc mismatch? Or any other errors?
Re: RE: Breakpoints half working  
MsgNak received - resending
Remote target is little-endian
Reading symbols from C:\Users\Duncan\qnx700\target\qnx7\x86_64\usr\lib\ldqnx-64.so.2...(no debugging symbols found)...
done.
0x000000010004f5d0 in _start_ () from C:\Users\Duncan\qnx700\target\qnx7\x86_64\usr\lib\ldqnx-64.so.2
Re: RE: Breakpoints half working  
Re: RE: Breakpoints half working  
I don't think it is related to shared libraries.
I have tried using Attach to Running Process instead and it seems to work correctly.
Why does my normal launch target not also work correctly (see attachment).


Attachment: Image NormalLaunchTarget.PNG 26.12 KB Image AttachToRunningProcessWorks.PNG 21.44 KB
Re: RE: Breakpoints half working  
You should probably contact QNX customer support as it this point we would have request more information and logs and 
not appropriate to exchange via public forum
Re: RE: Breakpoints half working  
Hello,
Thankyou for the replies.
I am trying to get me QNX license renewed.

In the meantime I am wondering whether my problem is related to the omission of fsevmgr from the VM target image.
Do semaphores rely on fsevmgr and inotify being present in neutrino on the target?

I guess I could write a test program but I thought it was worth quickly asking anyway.
RE: RE: Breakpoints half working  
If attach works fine it something to do with debugger setup, not related to target (except libc mismatch - but it seems 
like it not the case)

-----Original Message-----
From: Duncan Perrett <community-noreply@qnx.com> 
Sent: Tuesday, May 12, 2020 8:54 AM
To: general-ide <general-ide@community.qnx.com>
Subject: Re: RE: Breakpoints half working

Hello,
Thankyou for the replies.
I am trying to get me QNX license renewed.

In the meantime I am wondering whether my problem is related to the omission of fsevmgr from the VM target image.
Do semaphores rely on fsevmgr and inotify being present in neutrino on the target?

I guess I could write a test program but I thought it was worth quickly asking anyway.



_______________________________________________

General
http://community.qnx.com/sf/go/post120615
To cancel your subscription to this discussion, please e-mail general-ide-unsubscribe@community.qnx.com
Re: RE: RE: Breakpoints half working  
Here is a screen recording to demonstrate my breakpoint problem on youtube...
https://youtu.be/EzadTQZeVAo
Re: RE: RE: Breakpoints half working  
From the steps shown, a sem_wait call was made, which results in a call to the kernel call SyncSemWait().  Since this is
 a kernel call, you won't have access to the source code for that call.  It would appear that the semaphore's value is 
currently 0, resulting in this thread's state becoming SEM BLOCKED.  You can confirm this state in System Information 
perspective, looking at the thread state information.
The thread cannot be stepped while it is in a blocked state.  So until some thread does a sem_post to the semaphore that
 your thread is blocked on, you will remain in that current state.

I also highly suspect that if you are using the VMWare target image that was downloaded from the QNX Software Center and
 you have applied updates to your base SDP 7 installation, that you have a mismatch between libc.so on the target and 
the libc.so symbols that the IDE is referencing.  While this is not a direct contributor to the specific behaviour that 
you are inquired about, if you have a mismatch it will cause other odd behaviour during debugging.

Re: RE: RE: Breakpoints half working  
I attach a picture that hopefully shows me keeping the symbols in sync.
Attachment: Image libc.PNG 36.54 KB
Re: RE: RE: Breakpoints half working  
I've found a workaround detailed by me here
https://stackoverflow.com/questions/61819335/why-do-i-lose-my-debug-context-on-certain-breakpoints/61954414#61954414
and the screen recording here 
https://youtu.be/d7_kPlRtB2M

Is there a bug or a better workaround?