Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Memory Analysis Tool Can't "see" Source Code: (10 Items)
   
Memory Analysis Tool Can't "see" Source Code  
I'm using the Memory Analysis tool and it shows me errors but no matter what I do I can't get the trace details to show 
me the function backtrace by function name.  It only shows me something like this:

0[0xb8207fb7]<no source code>

I've done everything I can think of to get it to show me where in the source code but with no luck.  The debugger can 
see the source code at the corresponding address but not the analysis tool.
Any help will be greatly appreciated.
Re: Memory Analysis Tool Can't "see" Source Code  
What is the code base c/c++?
What is compiler version?
What is the target architecture?
0xb8 looks like shared library code
is it only one backtrace element shown?
what version of IDE are you using?

Robert Davis wrote:
> I'm using the Memory Analysis tool and it shows me errors but no matter what I do I can't get the trace details to 
show me the function backtrace by function name.  It only shows me something like this:
>
> 0[0xb8207fb7]<no source code>
>
> I've done everything I can think of to get it to show me where in the source code but with no luck.  The debugger can 
see the source code at the corresponding address but not the analysis tool.
> Any help will be greatly appreciated.
>
>
> _______________________________________________
> QNX Momentics Community Support
> http://community.qnx.com/sf/go/post9667
>
>   
Re: Memory Analysis Tool Can't "see" Source Code  
 I'm not sure what you mean by code base.

The compiler is 2.95.3

Target architecture is x86

The 0xb8 was only for example purposes.  In the list of addresses in the traceback it eventually gets up into my code.  
I verified this by checking the addresses in the traceback to the addresses listed with function calls in the debugger.

IDE Version: 4.0.1

Thanks!
Bob
Re: Memory Analysis Tool Can't "see" Source Code  
Code base I mean C only or C++?
do you use shared libraries?
What project you are using QNX C or Managed C?
Are you actually getting traceback or size more than 1?

Basically IDE find source code based on addresses using the following 
things:
- code compiled with -g
- shared libraries path defined for launch config
- binary parser (which has to be enabled for you project if you using 
managed projects)

Robert Davis wrote:
>  I'm not sure what you mean by code base.
>
> The compiler is 2.95.3
>
> Target architecture is x86
>
> The 0xb8 was only for example purposes.  In the list of addresses in the traceback it eventually gets up into my code.
  I verified this by checking the addresses in the traceback to the addresses listed with function calls in the debugger
.
>
> IDE Version: 4.0.1
>
> Thanks!
> Bob
>
>
> _______________________________________________
> QNX Momentics Community Support
> http://community.qnx.com/sf/go/post9676
>
>   
Re: Memory Analysis Tool Can't "see" Source Code  
C++

No shared libraries.  Part of what I'm debgging is a static library.  The other half is a test program to test the port 
of this static library.

I'm using a Standard C++ project.

I'm getting tracebacks of upto 16 depending on which error I'm looking at.
Re: Memory Analysis Tool Can't "see" Source Code  
1) go to project properties, find Binary Parsers and enable QNX Binary 
parser if it not enabled
2) if you process runs less than 1 second it may not work, add 1 second 
sleep in the begging of main

Robert Davis wrote:
> C++
>
> No shared libraries.  Part of what I'm debgging is a static library.  The other half is a test program to test the 
port of this static library.
>
> I'm using a Standard C++ project.
>
> I'm getting tracebacks of upto 16 depending on which error I'm looking at.
>
> _______________________________________________
> QNX Momentics Community Support
> http://community.qnx.com/sf/go/post9679
>
>   
Re: Memory Analysis Tool Can't "see" Source Code  
Binary parser was already enabled.  I added a sleep but it made no difference.
Thanks
Re: Memory Analysis Tool Can't "see" Source Code  
Check your addr2line utility, if should be in the path and you run it 
with -e <your-binary> if should not fail


Robert Davis wrote:
> Binary parser was already enabled.  I added a sleep but it made no difference.
> Thanks
>
> _______________________________________________
> QNX Momentics Community Support
> http://community.qnx.com/sf/go/post9710
>
>   
Re: Memory Analysis Tool Can't "see" Source Code  
Elena,
Thanks for all your help.  I'm not quite clear about when/where/how to run addr2line.  Should I run it stand alone or 
does it run in conjunction with the memory analysis tool?  And where do I specify its path?  Does it go in the C/C++ 
Project Path in Project Properties?  If so, which tab?
Thanks,
Bob
Re: Memory Analysis Tool Can't "see" Source Code  
addr2line is command line tool, IDE uses it to resolve the address to 
line-number mapping. To perform the test you just run it from command 
line, not from IDE
run bash or cmd (on windows) and type command
addr2line -e <path-to-your-executable>

Btw does you application runs less than 1 second?

Robert Davis wrote:
> Elena,
> Thanks for all your help.  I'm not quite clear about when/where/how to run addr2line.  Should I run it stand alone or 
does it run in conjunction with the memory analysis tool?  And where do I specify its path?  Does it go in the C/C++ 
Project Path in Project Properties?  If so, which tab?
> Thanks,
> Bob
>
> _______________________________________________
> QNX Momentics Community Support
> http://community.qnx.com/sf/go/post9851
>
>