Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Debugger Tab - Shared Libraries Auto button doesn't work: (9 Items)
   
Debugger Tab - Shared Libraries Auto button doesn't work  
Hello,

Can someone tell me what the "Auto" button in the shared libraries tab of the debugger launch config searches to find 
what shared libraries are used in the project.

I have some projects that the auto button works just fine and others that it doesn't work at all for.
I don't see anything different in the common.mk files.  The include extra libraries section is the same.

I have this problem in both 6.4.0 and 6.4.1

Thanks,
- Mike

Re: Debugger Tab - Shared Libraries Auto button doesn't work  
Hi, Mike,

Sorry for the delayed reply ... I had some investigation to do to find
an answer.

The "Auto" button searches for all of the libraries named in your
project's build settings in all of the directories on the project's
library path.  For any libraries that it finds, it adds the directory
containing it to the launch configuration's library search path.

Thus, one reasons why it may not work for a project is that at the time
you pressed the Auto button, some libraries weren't built yet.  Also,
this button only works for executables built by QNX C/C++ projects, and
it may be unreliable for projects that do not have a debug variant
configured.

HTH,

Christian


On Fri, 2009-09-04 at 11:41 -0400, Michael Cranston wrote:

> Hello,
> 
> Can someone tell me what the "Auto" button in the shared libraries tab of the debugger launch config searches to find 
what shared libraries are used in the project.
> 
> I have some projects that the auto button works just fine and others that it doesn't work at all for.
> I don't see anything different in the common.mk files.  The include extra libraries section is the same.
> 
> I have this problem in both 6.4.0 and 6.4.1
> 
> Thanks,
> - Mike
> 


Re: Debugger Tab - Shared Libraries Auto button doesn't work  
Hi Christian,

Thanks for the response.  Everything you mentioned is true for my projects, so I am still at a loss for why it does not 
work.

I did a little more digging, and have a question.

My projects have extra variants, named Unittest and rUnittest, which link to debug and release libraries respectively.

My makefiles for these unit test project have libraries specified as 
LIBS_Unittest+= lib1_g  lib2_g
LIBS_rUnittest+= lib1  lib2

We turn off 'use proper variant' in the project settings.

I noticed that if I replace the LIBS declaration with the following  line, the project doesn't build, but the debugger 
can find all the libs.
LIBS +=  ^lib1  ^lib2

If I include the LIBS line before or after the LIB_Unitest declaration, the debugger still cannot find all the lib 
entries.   

I am not sure I understand why.

Thanks for the help.
- Mike

Re: Debugger Tab - Shared Libraries Auto button doesn't work  
I have a few more details.

It appears that the LIBs for my Unittest variant are not the issue.

After some additional digging, it appears that when the project includes both the math lib (libm) and the sockets lib 
(libsocket), then the debugger can't resolve the library paths.

If the project only includes one (m OR socket), then it works fine.  Include both and the shared libraries  cannot 
automatically be added.

Is this a bug?

- Mike
Re: Debugger Tab - Shared Libraries Auto button doesn't work  
Hi, Michael,

Sorry to be so slow to reply again ... your diagnostic help is much
appreciated by one still new to this area.

Yes, this definitely sounds like a bug.  Also, as you mentioned in your
previous message, the custom variants that you define may contribute to
the problem, as they could possibly disrupt the IDE's discovery
algorithm.

I should have enough information from you to reproduce the problem and
raise a bug in our internal system.  If not, I may need to ask for a
small example that illustrates the problem.  I shall reply again one way
or the other.

Thanks!

Christian

On Fri, 2009-09-11 at 08:10 -0400, Michael Cranston wrote:

> I have a few more details.
> 
> It appears that the LIBs for my Unittest variant are not the issue.
> 
> After some additional digging, it appears that when the project includes both the math lib (libm) and the sockets lib 
(libsocket), then the debugger can't resolve the library paths.
> 
> If the project only includes one (m OR socket), then it works fine.  Include both and the shared libraries  cannot 
automatically be added.
> 
> Is this a bug?
> 
> - Mike
> 
> 
> 
> 
> _______________________________________________
> 
> General
> http://community.qnx.com/sf/go/post37798
> 


________________________________________________________________________

Christian W. Damus
Software Developer, IDE Team
QNX Software Systems
Re: Debugger Tab - Shared Libraries Auto button doesn't work  
Hello, Michael,

I am having trouble reproducing this problem with IDE 4.6 (SDP 6.4.1).
The "auto" button for both so discovery and upload are both working well
for me in the following situation:

  - project "exec" is an executable having
    - library dependencies:
      - libm
      - libsocket
      - libmy*
    - variant "Debug" linking to
      - libmy_g.so
    - variant "Instr" linking to
      - libmy-instr_g.so
  - project "my" is an so project
  - project "my-instr" is a similar so project with (let's pretend)
instrumentation

A debug launch config on exec_g correctly discovers the library paths
for libm, libsocket, and libmy_g and auto-loads them in the debug
session.  I can step though the code in my library.

A debug launch config on exec_Instr correctly discovers the same library
paths for libm and libsocket, and the libmy-instr_g library.  The debug
session auto-loads these libs and I see that the code is my
"instrumented" variant when I step through it.

Are you, perchance, targeting a different SDP installation with your IDE
than what your qconfig environment variables are selecting?  I mean,
using the "QNX" preference page in the IDE ...

If you can supply a small test case (zipfile of projects) that
reproduces the problem, that would be great.

Cheers,

Christian


On Fri, 2009-09-11 at 08:10 -0400, Michael Cranston wrote:

> I have a few more details.
> 
> It appears that the LIBs for my Unittest variant are not the issue.
> 
> After some additional digging, it appears that when the project includes both the math lib (libm) and the sockets lib 
(libsocket), then the debugger can't resolve the library paths.
> 
> If the project only includes one (m OR socket), then it works fine.  Include both and the shared libraries  cannot 
automatically be added.
> 
> Is this a bug?
> 
> - Mike
> 
> 
> 
> 
> _______________________________________________
> 
> General
> http://community.qnx.com/sf/go/post37798
> 


________________________________________________________________________

Christian W. Damus
Software Developer, IDE Team
QNX Software Systems
Re: Debugger Tab - Shared Libraries Auto button doesn't work  
Can you send me your sample projects to look at?

I have to remove some dependencies from my project, but that's not a big deal.  I should have time to do that on Monday.
  Can you provide me an email address to send them to?  I don't want to post them on the forum.

Thanks,
- Mike
Re: Debugger Tab - Shared Libraries Auto button doesn't work  
Hi, Mike,

Find, attached, a ZIP of the exec, my, and my-instr projects as I
described previously.  Let's see how this differs from your
configuration; there must be *something* causing your problem.

Anything that you want to send to me in confidence can be e-mailed to
cdamus at qnx dot com.

Cheers,

Christian


On Fri, 2009-09-11 at 14:07 -0400, Michael Cranston wrote:

> Can you send me your sample projects to look at?
> 
> I have to remove some dependencies from my project, but that's not a big deal.  I should have time to do that on 
Monday.  Can you provide me an email address to send them to?  I don't want to post them on the forum.
> 
> Thanks,
> - Mike
> 
> 
> 
> 
> _______________________________________________
> 
> General
> http://community.qnx.com/sf/go/post37825
> 


________________________________________________________________________

Christian W. Damus
Software Developer, IDE Team
QNX Software Systems
Attachment: Compressed file lib-auto.zip 11.58 KB
Re: Debugger Tab - Shared Libraries Auto button doesn't work  
Hello, Mike,

I have investigated with your projects and replied off-line, and repeat
the conclusion here for everyone's benefit.

I have raised a bug in our system to track this.  It is a simple bug in
the "Auto" button code, which fails when the project links more
libraries (-l options) than there are directories on the library search
path (-L options).

Thanks!

Christian


On Fri, 2009-09-11 at 14:07 -0400, Michael Cranston wrote:

> Can you send me your sample projects to look at?
> 
> I have to remove some dependencies from my project, but that's not a big deal.  I should have time to do that on 
Monday.  Can you provide me an email address to send them to?  I don't want to post them on the forum.
> 
> Thanks,
> - Mike
> 
> 
> 
> 
> _______________________________________________
> 
> General
> http://community.qnx.com/sf/go/post37825
> 


________________________________________________________________________

Christian W. Damus
Software Developer, IDE Team
QNX Software Systems