Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Debugger problem - Setting Dynamic-Linker Breakpoint: Page 1 of 3 (23 Items)
   
Debugger problem - Setting Dynamic-Linker Breakpoint  
When i started debugging my program in tau IDE, it got blocked at pthread_mutex_unlock(), everytime i ran program at 
full speed, it got blocked here and prompted the following error, appreciate your suggestions.

Setting Dynamic-Linker Breakpoint based on C:/QNX632/target/qnx6/x86/usr/lib/ldqnx.so.2
0xb0334792 in _start_ ()
Stopped due to shared library event
Stopped due to shared library event
Stopped due to shared library event
Stopped due to shared library event
Stopped due to shared library event
Stopped due to shared library event
Stopped due to shared library event
Stopped due to shared library event
[Switching to process 98321 (state = 0x03)]

Thanks,
Eric
Re: Debugger problem - Setting Dynamic-Linker Breakpoint  
There is no error in this log.
What do you mean "blocked"? If program stopps at mutext_lock means it 
cannot acquire the lock,,
check if you have a deadlock.

Eric Dong wrote:
> When i started debugging my program in tau IDE, it got blocked at pthread_mutex_unlock(), everytime i ran program at 
full speed, it got blocked here and prompted the following error, appreciate your suggestions.
>
> Setting Dynamic-Linker Breakpoint based on C:/QNX632/target/qnx6/x86/usr/lib/ldqnx.so.2
> 0xb0334792 in _start_ ()
> Stopped due to shared library event
> Stopped due to shared library event
> Stopped due to shared library event
> Stopped due to shared library event
> Stopped due to shared library event
> Stopped due to shared library event
> Stopped due to shared library event
> Stopped due to shared library event
> [Switching to process 98321 (state = 0x03)]
>
> Thanks,
> Eric
>
> _______________________________________________
> General
> http://community.qnx.com/sf/go/post23227
>
>   
Re: Debugger problem - Setting Dynamic-Linker Breakpoint  
The output suggests missing symbols from your ldqnx.so.2 on 
the host. I am not sure why would that happen. Have you 
changed ldqnx.so.2/libc.so.2 on your host?

What is the gdb version you are using?

Thanks,

Aleksandar

Eric Dong wrote:
> When i started debugging my program in tau IDE, it got blocked at pthread_mutex_unlock(), everytime i ran program at 
full speed, it got blocked here and prompted the following error, appreciate your suggestions.
> 
> Setting Dynamic-Linker Breakpoint based on C:/QNX632/target/qnx6/x86/usr/lib/ldqnx.so.2
> 0xb0334792 in _start_ ()
> Stopped due to shared library event
> Stopped due to shared library event
> Stopped due to shared library event
> Stopped due to shared library event
> Stopped due to shared library event
> Stopped due to shared library event
> Stopped due to shared library event
> Stopped due to shared library event
> [Switching to process 98321 (state = 0x03)]
> 
> Thanks,
> Eric
> 
> _______________________________________________
> General
> http://community.qnx.com/sf/go/post23227
> 

Re: Debugger problem - Setting Dynamic-Linker Breakpoint  
thx, actually it should be a breakpoint, since i still could use 'step over' to go thru the codes. Though i didnot set a
 breakpoint at the "pthread_mutex_lock()" code, it stopped every time when i resumed the program.

For the gdb version, i used the gdb-6.7-u10. I have rebuilt the image with the ldqnx.so.2 on my XP machine installed 
with the IDE4.0.1. But still the problem. 


Best,
Eric
Re: Debugger problem - Setting Dynamic-Linker Breakpoint  
You have no breakpoints and it stops anyways? Can you type info breakpoints in the gdb console to see what gdb thinks 
about breakpoints?

Eric Dong wrote:
> thx, actually it should be a breakpoint, since i still could use 'step over' to go thru the codes. Though i didnot set
 a breakpoint at the "pthread_mutex_lock()" code, it stopped every time when i resumed the program.
> 
> For the gdb version, i used the gdb-6.7-u10. I have rebuilt the image with the ldqnx.so.2 on my XP machine installed 
with the IDE4.0.1. But still the problem. 
> 
> 
> Best,
> Eric
> 
> _______________________________________________
> General
> http://community.qnx.com/sf/go/post23297
> 
Re: Debugger problem - Setting Dynamic-Linker Breakpoint  
Num Type           Disp Enb Address    What
1   breakpoint     keep n   0x080635c9 in clsCTL::A5(void) at ....
2   breakpoint     keep y   0x0806411a in clsCTL::A7(void) at .....
3   breakpoint     keep y   0x0805fd8c in clsCTL::GetCommand(COMMAND *) at ....
	breakpoint already hit 14 times
......

It showed that this breakpoint had already been hit 14 times, but this was the output when the program just got started.


Thanks,
Eric
Re: Debugger problem - Setting Dynamic-Linker Breakpoint  
Odd.

Could you also do

maint info b

that will list "hidden" breakpoints (shlib events).

Eric Dong wrote:
> Num Type           Disp Enb Address    What
> 1   breakpoint     keep n   0x080635c9 in clsCTL::A5(void) at ....
> 2   breakpoint     keep y   0x0806411a in clsCTL::A7(void) at .....
> 3   breakpoint     keep y   0x0805fd8c in clsCTL::GetCommand(COMMAND *) at ....
> 	breakpoint already hit 14 times
> ......
> 
> It showed that this breakpoint had already been hit 14 times, but this was the output when the program just got 
started.
> 
> Thanks,
> Eric
> 
> _______________________________________________
> General
> http://community.qnx.com/sf/go/post23321
> 

Re: Debugger problem - Setting Dynamic-Linker Breakpoint  
the console output:
-6  longjmp        keep n   0xb032256c <longjmp>
-7  longjmp        keep n   0xb0321d6e <_longjmp>
-8  longjmp        keep n   0xb03177f0 <siglongjmp>
-9  longjmp resume keep n   0x00000000 
-10 shlib events   keep y   0xb033184c <_dl_debug_state>
	breakpoint already hit 8 times

may have any clues from this? 


> Odd.
> 
> Could you also do
> 
> maint info b
> 
> that will list "hidden" breakpoints (shlib events).
> 
> Eric Dong wrote:
> > Num Type           Disp Enb Address    What
> > 1   breakpoint     keep n   0x080635c9 in clsCTL::A5(void) at ....
> > 2   breakpoint     keep y   0x0806411a in clsCTL::A7(void) at .....
> > 3   breakpoint     keep y   0x0805fd8c in clsCTL::GetCommand(COMMAND *) at .
> ...
> > 	breakpoint already hit 14 times
> > ......
> > 
> > It showed that this breakpoint had already been hit 14 times, but this was 
> the output when the program just got started.
> > 
> > Thanks,
> > Eric
> > 
> > _______________________________________________
> > General
> > http://community.qnx.com/sf/go/post23321
> > 
> 


Re: Debugger problem - Setting Dynamic-Linker Breakpoint  
Eric Dong wrote:
> the console output:
> -6  longjmp        keep n   0xb032256c <longjmp>
> -7  longjmp        keep n   0xb0321d6e <_longjmp>
> -8  longjmp        keep n   0xb03177f0 <siglongjmp>
> -9  longjmp resume keep n   0x00000000 
> -10 shlib events   keep y   0xb033184c <_dl_debug_state>
> 	breakpoint already hit 8 times

Oddly, this looks as it should. This is correct - 
_dl_debug_state is where gdb places shlib events breakpoint. 
The address is also correct. I will go through your session 
log again.

> 
> may have any clues from this? 
> 
> 
>> Odd.
>>
>> Could you also do
>>
>> maint info b
>>
>> that will list "hidden" breakpoints (shlib events).
>>
>> Eric Dong wrote:
>>> Num Type           Disp Enb Address    What
>>> 1   breakpoint     keep n   0x080635c9 in clsCTL::A5(void) at ....
>>> 2   breakpoint     keep y   0x0806411a in clsCTL::A7(void) at .....
>>> 3   breakpoint     keep y   0x0805fd8c in clsCTL::GetCommand(COMMAND *) at .
>> ...
>>> 	breakpoint already hit 14 times
>>> ......
>>>
>>> It showed that this breakpoint had already been hit 14 times, but this was 
>> the output when the program just got started.
>>> Thanks,
>>> Eric
>>>
>>> _______________________________________________
>>> General
>>> http://community.qnx.com/sf/go/post23321
>>>
> 
> 
> 
> 
> _______________________________________________
> General
> http://community.qnx.com/sf/go/post23328
> 

Re: Debugger problem - Setting Dynamic-Linker Breakpoint  
There isn't a session log. The messages "Stopped due to 
shared library event" are o.k., as Elena said IDE silently 
tells gdb to continue there.

Could you create a full gdb session log and attach it here?