Forum Topic - dlopen and GDB:
   
dlopen and GDB  
I'm having some difficulty with GDB (ver 6.8 update 5).  I'm remote debugging on my target via Eclipse.

I am debugging a shared library that does a dlopen().  Unfortunately, GDB is not detecting this and the shared library 
that was loaded does not show up in GDB's list (info shared)

It shows up using pidin mem, but I can't get GDB to register that it is loaded.

Any ideas?

Thanks
Kevin
Re: dlopen and GDB  
For kicks, I had the shared library loaded in main().  It doesn't show up, nor does GDB admit it is loaded.

-Kevin
Re: dlopen and GDB  
This typically happens when there is a mismatch between libc on the
target and the one gdb uses on the host side.

To make sure you have matching libc-s, please double-check gdb log in
your IDE and search for "warning:" coming from gdb. If there is a
warning mentioning mismatch, then that would explain the problem.

Could you check that?

Thanks,

Aleksandar


On Mon, 2010-12-06 at 22:43 -0500, Kevin Stallard wrote:
> I'm having some difficulty with GDB (ver 6.8 update 5).  I'm remote
> debugging on my target via Eclipse.
> 
> I am debugging a shared library that does a dlopen().  Unfortunately,
> GDB is not detecting this and the shared library that was loaded does
> not show up in GDB's list (info shared)
> 
> It shows up using pidin mem, but I can't get GDB to register that it
> is loaded.
> 
> Any ideas?
> 
> Thanks
> Kevin
> 
> 
> 
> 
> _______________________________________________
> 
> General
> http://community.qnx.com/sf/go/post77537
> 
> 
> 

Re: dlopen and GDB  
Thank you Aleksandar,

I don't see a warning, expect that it can't find 'xpt.c'.  Here is the GDB log:

MsgNak received - resending
Remote target is big-endian
attach 245785
[New pid 245785 tid 1]
0xfe33ea48 in ?? ()
No source file named xpt.c.
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
Stopped due to shared library event
Stopped due to shared library event
Stopped due to shared library event


> This typically happens when there is a mismatch between libc on the
> target and the one gdb uses on the host side.
> 
> To make sure you have matching libc-s, please double-check gdb log in
> your IDE and search for "warning:" coming from gdb. If there is a
> warning mentioning mismatch, then that would explain the problem.
> 
> Could you check that?
> 
> Thanks,
> 
> Aleksandar
> 
> 
> On Mon, 2010-12-06 at 22:43 -0500, Kevin Stallard wrote:
> > I'm having some difficulty with GDB (ver 6.8 update 5).  I'm remote
> > debugging on my target via Eclipse.
> > 
> > I am debugging a shared library that does a dlopen().  Unfortunately,
> > GDB is not detecting this and the shared library that was loaded does
> > not show up in GDB's list (info shared)
> > 
> > It shows up using pidin mem, but I can't get GDB to register that it
> > is loaded.
> > 
> > Any ideas?
> > 
> > Thanks
> > Kevin
> > 
> > 
> > 
> > 
> > _______________________________________________
> > 
> > General
> > http://community.qnx.com/sf/go/post77537
> > 
> > 
> > 
> 


Re: dlopen and GDB  
Check this FAQ
http://community.qnx.com/sf/wiki/do/viewPage/projects.ide/wiki/DebuggerFAQ

(it about IDE but it is applicable for command line too with some minor 
changes)'

On 06/12/2010 10:59 PM, Kevin Stallard wrote:
> Thank you Aleksandar,
>
> I don't see a warning, expect that it can't find 'xpt.c'.  Here is the GDB log:
>
> MsgNak received - resending
> Remote target is big-endian
> attach 245785
> [New pid 245785 tid 1]
> 0xfe33ea48 in ?? ()
> No source file named xpt.c.
> 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
> Stopped due to shared library event
> Stopped due to shared library event
> Stopped due to shared library event
>
>
>> This typically happens when there is a mismatch between libc on the
>> target and the one gdb uses on the host side.
>>
>> To make sure you have matching libc-s, please double-check gdb log in
>> your IDE and search for "warning:" coming from gdb. If there is a
>> warning mentioning mismatch, then that would explain the problem.
>>
>> Could you check that?
>>
>> Thanks,
>>
>> Aleksandar
>>
>>
>> On Mon, 2010-12-06 at 22:43 -0500, Kevin Stallard wrote:
>>> I'm having some difficulty with GDB (ver 6.8 update 5).  I'm remote
>>> debugging on my target via Eclipse.
>>>
>>> I am debugging a shared library that does a dlopen().  Unfortunately,
>>> GDB is not detecting this and the shared library that was loaded does
>>> not show up in GDB's list (info shared)
>>>
>>> It shows up using pidin mem, but I can't get GDB to register that it
>>> is loaded.
>>>
>>> Any ideas?
>>>
>>> Thanks
>>> Kevin
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>>
>>> General
>>> http://community.qnx.com/sf/go/post77537
>>>
>>>
>>>
>
>
>
>
>
> _______________________________________________
>
> General
> http://community.qnx.com/sf/go/post77541
>
Re: dlopen and GDB  
Thanks Elena,

I hope you are doing well.

I'm not having trouble getting symbols to load, it that the shared library won't even show up in the list.

Unless there was something else in the FAQ that I missed that you were wanting me to see....

Thanks
Kevin
Re: dlopen and GDB  
Do you check return code of dlopen? Did it actually succeed?

On 06/12/2010 11:10 PM, Kevin Stallard wrote:
> Thanks Elena,
>
> I hope you are doing well.
>
> I'm not having trouble getting symbols to load, it that the shared library won't even show up in the list.
>
> Unless there was something else in the FAQ that I missed that you were wanting me to see....
>
> Thanks
> Kevin
>
>
>
>
> _______________________________________________
>
> General
> http://community.qnx.com/sf/go/post77546
>
Re: dlopen and GDB  
Yeah...it's succeeds.  pidin mem shows it there and associated with the process being debugged....
Re: dlopen and GDB  
What is the QNX version you are running?


On Mon, 2010-12-06 at 23:17 -0500, Kevin Stallard wrote:
> Yeah...it's succeeds.  pidin mem shows it there and associated with
> the process being debugged....
> 
> 
> 
> _______________________________________________
> 
> General
> http://community.qnx.com/sf/go/post77549
> 
> 
> 

Re: dlopen and GDB  
6.3.2

One other item of interest.  As I sit here muttering to myself, I realized that earlier today, it was showing up just 
fine.  I'm trying to figure out what I may have changed since then.  But it was working at one point.

Kevin


Re: dlopen and GDB  
What flags do you pass to dlopen?

Actually, maybe it's better if you could attach your test-case.

Thanks,

Aleksandar


On Mon, 2010-12-06 at 23:32 -0500, Kevin Stallard wrote:
> 6.3.2
> 
> One other item of interest.  As I sit here muttering to myself, I
> realized that earlier today, it was showing up just fine.  I'm trying
> to figure out what I may have changed since then.  But it was working
> at one point.
> 
> Kevin
> 
> 
> 
> 
> 
> 
> _______________________________________________
> 
> General
> http://community.qnx.com/sf/go/post77552
> 
> 
> 

Re: dlopen and GDB  
Here's main.


int main(int argc, char *argv[])
{
	ThreadCtl( _NTO_TCTL_IO, 0 );
	void *dll = dlopen( "io-blk_g.so", RTLD_NOW );
	TAILQ_INIT(&sd_ctrl.m_hlist);
	sd_ctrl.m_nhba = 0;

	return cam_configure(&sim_module, 1, argc, argv);
}

I moved the dlopen to main so I could eliminate the possibility that the problem stems from dlopen being called from 
another dll.

As for attaching a test case, the io-blk and cam code I have is now protected, so I probably shouldn't post it all in 
public....

Kevin
Re: dlopen and GDB  
I've also renamed io-blk_g.so to io-blk.so, re-built my image, and changed main() to dlopen io-blk.so (as opposed to io-
blk_g.so).

Kevin
Re: dlopen and GDB  
What is the version you are running on the target?

If you do

(gdb) info sharedlibrary

in gdb window, after dlopen, what does it output?

On Mon, 2010-12-06 at 22:59 -0500, Kevin Stallard wrote:
> Thank you Aleksandar,
> 
> I don't see a warning, expect that it can't find 'xpt.c'.  Here is the
> GDB log:
> 
> MsgNak received - resending
> Remote target is big-endian
> attach 245785
> [New pid 245785 tid 1]
> 0xfe33ea48 in ?? ()
> No source file named xpt.c.
> 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
> Stopped due to shared library event
> Stopped due to shared library event
> Stopped due to shared library event
> 
> 
> > This typically happens when there is a mismatch between libc on the
> > target and the one gdb uses on the host side.
> >
> > To make sure you have matching libc-s, please double-check gdb log
> in
> > your IDE and search for "warning:" coming from gdb. If there is a
> > warning mentioning mismatch, then that would explain the problem.
> >
> > Could you check that?
> >
> > Thanks,
> >
> > Aleksandar
> >
> >
> > On Mon, 2010-12-06 at 22:43 -0500, Kevin Stallard wrote:
> > > I'm having some difficulty with GDB (ver 6.8 update 5).  I'm
> remote
> > > debugging on my target via Eclipse.
> > >
> > > I am debugging a shared library that does a dlopen().
> Unfortunately,
> > > GDB is not detecting this and the shared library that was loaded
> does
> > > not show up in GDB's list (info shared)
> > >
> > > It shows up using pidin mem, but I can't get GDB to register that
> it
> > > is loaded.
> > >
> > > Any ideas?
> > >
> > > Thanks
> > > Kevin
> > >
> > >
> > >
> > >
> > > _______________________________________________
> > >
> > > General
> > > http://community.qnx.com/sf/go/post77537
> > >
> > >
> > >
> >
> 
> 
> 
> 
> 
> 
> _______________________________________________
> 
> General
> http://community.qnx.com/sf/go/post77541
> 
> 
> 

Re: dlopen and GDB  
info shared
From        To          Syms Read   Shared Object Library
0xfe378000  0xfe3a4480  Yes         C:\home\Kevin\Projects\IDDAerospace\IDDAerospace\Code\changes\cam\cam\ppc\so.be.g/
libcam_g.so.2
0xfe3a5000  0xfe3c78a0  Yes         C:/QNX632/target/qnx6/ppcbe/lib/libm.so.2
0xfe300000  0xfe377eac  Yes         C:/QNX632/target/qnx6/ppcbe/lib/libc.so.2

Thanks
-Kevin
Re: dlopen and GDB  
io-blk is the missing shared library.
Re: dlopen and GDB  
In thinking about this, I guess the question to ask is
1.  Is the dynamic linker notifying GDB?  Does it do this through pdebug, or directly through qconn?

2.  Is there something I could look at to determine if the load event is being sent?  Do you think I could use wireshark
 to see if the event is being sent?

3.  If the event is getting to GDB, why is it ignoring it?

Comments?
Re: dlopen and GDB  
1) Yes, indirectly. It goes through pdebug.

2) I can say for sure GDB is receiving shared library events (as per the
log you posted). It also sees the loaded shared object, as per your
'info sharedlibrary'.

3) I don't know. Is io-blk something you built? If so, I would examine
carefully if all is as expected with it, e.g., you could post output
from
ntoppc-readelf -d io-blk.so
                  ^^^^^^^^^ 
               the one you built.



On Mon, 2010-12-06 at 23:50 -0500, Kevin Stallard wrote:
> In thinking about this, I guess the question to ask is
> 1.  Is the dynamic linker notifying GDB?  Does it do this through
> pdebug, or directly through qconn?
> 
> 2.  Is there something I could look at to determine if the load event
> is being sent?  Do you think I could use wireshark to see if the event
> is being sent?
> 
> 3.  If the event is getting to GDB, why is it ignoring it?
> 
> Comments?
> 
> 
> 
> _______________________________________________
> 
> General
> http://community.qnx.com/sf/go/post77558
> 
> 
> 

Re: dlopen and GDB  
> 2) I can say for sure GDB is receiving shared library events (as per the
> log you posted). It also sees the loaded shared object, as per your
> 'info sharedlibrary'.

Actually, the shared object I'm loading doesn't show up in the list.  cam is there, but not io-blk.  Since it wasn't 
showing up, I was wondering if perhaps the load library event for that dlopen() call was getting missed somehow.

Below is the output and yes, it is a custom io-blk build.

Dynamic segment at offset 0x2a998 contains 18 entries:
  Tag        Type                         Name/Value
 0x00000001 (NEEDED)                     Shared library: [libc.so.2]
 0x0000000e (SONAME)                     Library soname: [io-blk_g.so]
 0x00000010 (SYMBOLIC)                   0x0
 0x0000000c (INIT)                       0x28ff0
 0x0000000d (FINI)                       0x29010
 0x00000004 (HASH)                       0xb4
 0x00000005 (STRTAB)                     0x2774
 0x00000006 (SYMTAB)                     0xbc4
 0x0000000a (STRSZ)                      5686 (bytes)
 0x0000000b (SYMENT)                     16 (bytes)
 0x00000003 (PLTGOT)                     0x2bea8
 0x00000002 (PLTRELSZ)                   1596 (bytes)
 0x00000014 (PLTREL)                     RELA
 0x00000017 (JMPREL)                     0x54b0
 0x00000007 (RELA)                       0x3dac
 0x00000008 (RELASZ)                     7536 (bytes)
 0x00000009 (RELAENT)                    12 (bytes)
 0x00000000 (NULL)                       0x0


> 1) Yes, indirectly. It goes through pdebug.
> 
> 2) I can say for sure GDB is receiving shared library events (as per the
> log you posted). It also sees the loaded shared object, as per your
> 'info sharedlibrary'.
> 
> 3) I don't know. Is io-blk something you built? If so, I would examine
> carefully if all is as expected with it, e.g., you could post output
> from
> ntoppc-readelf -d io-blk.so
>                   ^^^^^^^^^ 
>                the one you built.
> 
> 
> 
> On Mon, 2010-12-06 at 23:50 -0500, Kevin Stallard wrote:
> > In thinking about this, I guess the question to ask is
> > 1.  Is the dynamic linker notifying GDB?  Does it do this through
> > pdebug, or directly through qconn?
> > 
> > 2.  Is there something I could look at to determine if the load event
> > is being sent?  Do you think I could use wireshark to see if the event
> > is being sent?
> > 
> > 3.  If the event is getting to GDB, why is it ignoring it?
> > 
> > Comments?
> > 
> > 
> > 
> > _______________________________________________
> > 
> > General
> > http://community.qnx.com/sf/go/post77558
> > 
> > 
> > 
> 


Re: dlopen and GDB  
It looks like profiling may have been the problem.

I realized I had it turned on, I turned it off and rebuilt the application, now io-blk shows up.  Something to do with 
the profiling library perhaps? 

I really appreciate all your help tonight.  If this is a known issue and there is a work around, I'd be grateful to know
. 

Thanks
Kevin
Re: dlopen and GDB  
On Tue, 2010-12-07 at 00:32 -0500, Kevin Stallard wrote:
> It looks like profiling may have been the problem.

> I realized I had it turned on, I turned it off and rebuilt the
> application, now io-blk shows up.  Something to do with the profiling
> library perhaps?

> 
> I really appreciate all your help tonight.  If this is a known issue
> and there is a work around, I'd be grateful to know.


Could you try a debug session from command line? (and with the
problematic combination of profiled binaries)?

Thanks,

Aleksandar

Post Deleted
Re: dlopen and GDB  
Same...here's the output...io-blk was loaded, but did not show up in the symbol table.

>ntoppc-gdb ppc/o.be.g/devb-sd_g

GNU gdb 6.8 qnx-nto update 5 (rev. 398)
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>;
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=i386-mingw32msvc --target=powerpc-unknown-nto-qnx6.3.0"...
(gdb) target qnx 192.168.200.10:8000
Remote debugging using 192.168.200.10:8000
MsgNak received - resending
Remote target is big-endian
(gdb) attach 335896
Attaching to pid 335896 tid 0
[New pid 335896 tid 1]
0xfe33ea48 in ?? ()
(gdb) b main
Breakpoint 1 at 0x4804d594: file C:/home/Kevin/Projects/IDDAerospace/IDDAerospace/Code/changes/devb-sd/devb-sd.c, line 
63.
(gdb) c
Continuing.
Error while mapping shared library sections:
libcam_g.so.2: No such file or directory.

Breakpoint 1, main (argc=1, argv=0x4803feb4) at C:/home/Kevin/Projects/IDDAerospace/IDDAerospace/Code/changes/devb-sd/
devb-sd.c:63
63              ThreadCtl( _NTO_TCTL_IO, 0 );
(gdb) s
64              void *dll = dlopen( "/proc/boot/io-blk_g.so", RTLD_NOW );
(gdb) s
65              TAILQ_INIT(&sd_ctrl.m_hlist);
(gdb) info shared
From        To          Syms Read   Shared Object Library
                        No          libcam_g.so.2
0xfe3a5000  0xfe3c78a0  Yes         C:/QNX632/target/qnx6/ppcbe/lib/libm.so.2
0xfe300000  0xfe377eac  Yes         C:/QNX632/target/qnx6/ppcbe/lib/libc.so.2
(gdb) print dll
$1 = (void *) 0x48079060
(gdb)
Re: dlopen and GDB  
Hmm. Any directories with spaces on the host involved in this?

On 07/12/10 01:34 PM, Kevin Stallard wrote:
> Same...here's the output...io-blk was loaded, but did not show up in the symbol table.
Re: dlopen and GDB  
I've been careful to avoid spaces.  I don't think this is the case...

Thanks
Kevin
Re: dlopen and GDB  
No, it has nothing to do with host side, it has to do with gdb not
retrieving the link map completely. As if this particular shared object
was not added to the linkmap (a bug in ldd? some strange bug in
profiling code in libc?). 

It's in 6.3.2 and that was quite some time ago.

We need to reproduce it internally. I think we have enough pointers to
do that, but I can not commit to doing it quickly - if you need it
urgently, please go through regular support channels.

Thanks,

Aleksandar

On Tue, 2010-12-07 at 13:47 -0500, Kevin Stallard wrote:
> I've been careful to avoid spaces.  I don't think this is the case...
> 
> Thanks
> Kevin
> 
> 
> 
> 
> _______________________________________________
> 
> General
> http://community.qnx.com/sf/go/post77655
> 
> 
> 

Re: dlopen and GDB  
Hey Aleksandar,

Thanks for helping out with this.  I would say don't worry about it.  I need to either come up with a solution to our 
throughput problem quickly or we just live with it.  There is a lot of pressure to fix it, but even the support channels
 may take too long.  I was just hoping there was a quick fix. 

I have other avenues to follow, so let's drop it for now.  If you happen to have some insights or ideas, do share, but I
 wouldn't spend any time on it.

Thanks for all the time you spent with me yesterday evening, I appreciate it very much.

Sincerely,
Kevin
Re: dlopen and GDB  
So try to put library not in shmem - do you have flash or mounted drive you can use? 

On 07/12/10 03:17 PM, Kevin Stallard wrote:
> Hey Aleksandar,
> 
> Thanks for helping out with this.  I would say don't worry about it.  I need to either come up with a solution to our 
throughput problem quickly or we just live with it.  There is a lot of pressure to fix it, but even the support channels
 may take too long.  I was just hoping there was a quick fix. 
> 
> I have other avenues to follow, so let's drop it for now.  If you happen to have some insights or ideas, do share, but
 I wouldn't spend any time on it.
> 
> Thanks for all the time you spent with me yesterday evening, I appreciate it very much.
> 
> Sincerely,
> Kevin
> 
> 
> 
> 
> _______________________________________________
> 
> General
> http://community.qnx.com/sf/go/post77677
> 
Re: dlopen and GDB  
Elena,

Thank you, but io-blk is already a part of the image.  It is located in /proc/boot.  I also start up devb-ram when I 
want to copy stuff to the file system.  So dev/shmem isn't a part of the whole thing.

Thanks
Kevin
Re: dlopen and GDB  
Kevin, include sys/link.h, and then add a global variable,

extern struct r_debug r_debug;

to your main program

Then examine the linked list of Link_map structures, r_debug.r_map

This is maintained by the dynamic linker, and it's what gdb should be 
consulting for it's list of shared objects.

Colin

On 10-12-07 7:38 PM, Kevin Stallard wrote:
>
> Elena,
>
> Thank you, but io-blk is already a part of the image.  It is located 
> in /proc/boot.  I also start up devb-ram when I want to copy stuff to 
> the file system.  So dev/shmem isn't a part of the whole thing.
>
> Thanks
> Kevin
>
>
>
>
> _______________________________________________
>
> General
> http://community.qnx.com/sf/go/post77723
>

-- 
cburgess@qnx.com

Re: dlopen and GDB  
Sorry about the delay.  I'll do this...thank you for taking the time to  looking at this
Re: dlopen and GDB  
Collin,

extern struct r_debug r_debug;

This is coming up as an undefined reference when linking.  Is there a lib I need to include?

Thanks
Kevin
Re: dlopen and GDB  
it should be

extern struct r_debug _r_debug; // see underscore.

On Wed, 2010-12-08 at 12:54 -0500, Kevin Stallard wrote:
> Collin,
> 
> extern struct r_debug r_debug;
> 
> This is coming up as an undefined reference when linking.  Is there a
> lib I need to include?
> 
> Thanks
> Kevin
> 
> 
> 
> 
> _______________________________________________
> 
> General
> http://community.qnx.com/sf/go/post77860
> 
> 
> 

Re: dlopen and GDB  
that's _r_debug, not r_debug

On 10-12-08 12:54 PM, Kevin Stallard wrote:
>
> Collin,
>
> extern struct r_debug r_debug;
>
> This is coming up as an undefined reference when linking.  Is there a 
> lib I need to include?
>
> Thanks
> Kevin
>
>
>
>
> _______________________________________________
>
> General
> http://community.qnx.com/sf/go/post77860
>

-- 
cburgess@qnx.com

Re: dlopen and GDB  
Hey Colin,

r_map is null before and after I load io-blk.  Here are all the members of r_debug (after dlopen() is called).


rdbg	0x48063c40	
	r_version	2	
	r_map	0x00000000	
	r_brk	4264800944	
	r_state	RT_CONSISTENT	
	r_ldbase	0	
	r_ldsomap	0x00000000	
	r_rdevent	RD_NONE	
	r_flags	RD_FL_NONE	


Thanks
Kevin
Re: dlopen and GDB  
Was this viewed via gdb, or your own printfs?

On 10-12-08 1:20 PM, Kevin Stallard wrote:
> Hey Colin,
>
> r_map is null before and after I load io-blk.  Here are all the members of r_debug (after dlopen() is called).
>
>
> rdbg	0x48063c40	
> 	r_version	2	
> 	r_map	0x00000000	
> 	r_brk	4264800944	
> 	r_state	RT_CONSISTENT	
> 	r_ldbase	0	
> 	r_ldsomap	0x00000000	
> 	r_rdevent	RD_NONE	
> 	r_flags	RD_FL_NONE	
>
>
> Thanks
> Kevin
>
>
>
>
> _______________________________________________
>
> General
> http://community.qnx.com/sf/go/post77882
>

-- 
cburgess@qnx.com
Re: dlopen and GDB  
Via gdb

Re: dlopen and GDB  
The REALLY sounds like your libc.so doesn't match the version that's on 
the target.

On 10-12-08 1:42 PM, Kevin Stallard wrote:
>
> Via gdb
>
>
>
>
>
> _______________________________________________
>
> General
> http://community.qnx.com/sf/go/post77902
>

-- 
cburgess@qnx.com

Re: dlopen and GDB  
 Is it that gdb is using a different version of libc than my target?  It's not clear to me where the mismatch would be.
Re: dlopen and GDB  
gdb figures out symbol addresses etc from the local symbols.  So they 
must be the same version
as what is running on the target.

That means that if your target is running a PSP then you must have the 
PSP version of the libc
copied to $QNX_TARGET/ppcbe/lib/libc.so.3 on your host too, or else use 
the gdb command
set solib-search-path <path>
to find the appropriate lib

On 10-12-08 2:01 PM, Kevin Stallard wrote:
>
>  Is it that gdb is using a different version of libc than my target?  
> It's not clear to me where the mismatch would be.
>
>
>
> _______________________________________________
>
> General
> http://community.qnx.com/sf/go/post77907
>

-- 
cburgess@qnx.com

Re: dlopen and GDB  
Or link libc statically - that usually solves my mismatch problems.

On 08/12/10 02:14 PM, Colin Burgess wrote:
> gdb figures out symbol addresses etc from the local symbols.  So they 
> must be the same version
> as what is running on the target.
> 
> That means that if your target is running a PSP then you must have the 
> PSP version of the libc
> copied to $QNX_TARGET/ppcbe/lib/libc.so.3 on your host too, or else use 
> the gdb command
> set solib-search-path <path>
> to find the appropriate lib
> 
> On 10-12-08 2:01 PM, Kevin Stallard wrote:
>>
>>  Is it that gdb is using a different version of libc than my target?  
>> It's not clear to me where the mismatch would be.
>>
>>
>>
>> _______________________________________________
>>
>> General
>> http://community.qnx.com/sf/go/post77907
>>
> 
Re: dlopen and GDB  
On Wed, 2010-12-08 at 14:37 -0500, Elena Laskavaia wrote:
> Or link libc statically - that usually solves my mismatch problems.

dlopen wouldn't work for statically linked libc.
Re: dlopen and GDB  
I'll add that for windows you also need to copy ldqnx.so.2.

However, I don't think this is the case here since it appears that gdb
is finding _r_debug (as per output from info shared, it does pick up
some shared objects). It also stops on shared library events. All this
suggests that libc does match.

Could you do the combinations of with/without profiling, before/after
dlopen and:

(gdb) print _r_debug

and post here what it says (or use Colin's code to traverse the link map
in your code).


On Wed, 2010-12-08 at 14:14 -0500, Colin Burgess wrote:
> gdb figures out symbol addresses etc from the local symbols.  So they
> must be the same version
> as what is running on the target.
> 
> That means that if your target is running a PSP then you must have the
> PSP version of the libc
> copied to $QNX_TARGET/ppcbe/lib/libc.so.3 on your host too, or else
> use
> the gdb command
> set solib-search-path <path>
> to find the appropriate lib
> 
> On 10-12-08 2:01 PM, Kevin Stallard wrote:
> >
> >  Is it that gdb is using a different version of libc than my
> target? 
> > It's not clear to me where the mismatch would be.
> >
> >
> >
> > _______________________________________________
> >
> > General
> > http://community.qnx.com/sf/go/post77907
> >
> 
> --
> cburgess@qnx.com
> 
> 
> 
> 
> 
> _______________________________________________
> 
> General
> http://community.qnx.com/sf/go/post77911
> 
> 
> 

Re: dlopen and GDB  
For what ever reason, turning profiling on and off doesn't make a difference any more.  io-blk never shows up under any 
circumstances now.  

I'll keep fiddling.

Also, pidin mem shows libc.so.2, and the symbols loaded appear to be corresponding to libc.so.2 as well.  So symbols 
appear to match what is running.
Re: dlopen and GDB  
but is it the exact same libc.so.2 as is in /proc/boot/libc.so.2 in the 
target?

On 10-12-08 2:49 PM, Kevin Stallard wrote:
>
> For what ever reason, turning profiling on and off doesn't make a 
> difference any more.  io-blk never shows up under any circumstances now.
>
> I'll keep fiddling.
>
> Also, pidin mem shows libc.so.2, and the symbols loaded appear to be 
> corresponding to libc.so.2 as well.  So symbols appear to match what 
> is running.
>
>
>
> _______________________________________________
>
> General
> http://community.qnx.com/sf/go/post77922
>

-- 
cburgess@qnx.com

Re: dlopen and GDB  
Hey Colin, 

Yeah, I double checked it.  I copied the libc.so.2 from the image and compared it to the one in QNX_TARGET/ppcbe/lib

They match (I built an image wherein the symbols were not stripped).

Re: dlopen and GDB  
So, when I removed the reference to _r_debug, io-blk starts showing up again.

When I add it back in, it won't appear.

If I leave out _r_debug and turn on profiling, it won't appear.


Also, I tried using the add-symbol-file but the profiler won't pick up the function names and I can't seem to find 
functions that io-blk contains...
Re: dlopen and GDB  
I built a simple test app that is just a one liner.

#include <stdlib.h>
#include <stdio.h>
#include <dlfcn.h>
#include <sys/link.h>

int main(int argc, char *argv[])
{
	void *h = dlopen( "io-blk.so", RTLD_NOW);
	return EXIT_SUCCESS;
}

It exhibits the same behavior as my sd driver.

If I build for profiling, it would show up, if I don't it does.

Guys, I am gratified and impressed with how long you've stuck with me on this.  Thank you.  If you have more ideas, I 
would be grateful, if not, then well, it is what it is.

Best,
Kevin
Re: dlopen and GDB  
Thank you for doing all the tests for us. We will definitely have to
reproduce it internally, and now we have even more pointers to do that.

On the practical side: did add-symbol-file work for you? It could get
you going for now.


On Wed, 2010-12-08 at 18:51 -0500, Kevin Stallard wrote:
> I built a simple test app that is just a one liner.
> 
> #include <stdlib.h>
> #include <stdio.h>
> #include <dlfcn.h>
> #include <sys/link.h>
> 
> int main(int argc, char *argv[])
> {
>         void *h = dlopen( "io-blk.so", RTLD_NOW);
>         return EXIT_SUCCESS;
> }
> 
> It exhibits the same behavior as my sd driver.
> 
> If I build for profiling, it would show up, if I don't it does.
> 
> Guys, I am gratified and impressed with how long you've stuck with me
> on this.  Thank you.  If you have more ideas, I would be grateful, if
> not, then well, it is what it is.
> 
> Best,
> Kevin
> 
> 
> 
> 
> _______________________________________________
> 
> General
> http://community.qnx.com/sf/go/post77970
> 
> 
> 

Re: dlopen and GDB  
I didn't appear to work.  The profiler was not able to resolve some methods that are taking up a lot of time.  Also, 
when I try to search for the symbol in io-blk after I loaded them, GDB was unable to find it.  

So for some reason, this thing is being awful stubborn.

I opened a ticket on this, and I included our custom io-blk code.  I figured that was a private channel and could upload
 it.

Thanks again for your help.

Kevin
Re: dlopen and GDB  
#include <stdio.h>
#include <sys/link.h>

extern struct r_debug _r_debug;

int main(void)
{
     Link_map *l;

     for( l = _r_debug.r_map; l != NULL; l = l->l_next ) {
         printf("l_addr:     %#x\n", l->l_addr );
         printf("l_name:     %s\n", l->l_name?:"(NULL)" );
         printf("l_ld:       %p\n", l->l_ld );
         printf("l_next:     %p\n", l->l_next );
         printf("l_prev:     %p\n", l->l_prev );
         printf("l_prev:     %p\n", l->l_prev );
         printf("l_loaded:   %#x\n", l->l_loaded );
         printf("l_path:     %s\n", l->l_path );
         printf("\n");
     }

     return 0;
}

# qcc -Vgcc_ntoarmv7le -o ldd ldd.c -lsocket -lm -lz

...

# /Users/cburgess/ldd
ldd
l_addr:        0x100000
l_name:        (NULL)
l_ld:          1019f8
l_next:        202400
l_prev:        0
l_prev:        0
l_loaded:    0x4cffcc04
l_path:        /Users/cburgess/ldd

l_addr:        0x78110000
l_name:        libsocket.so.3
l_ld:          7813b734
l_next:        202800
l_prev:        202000
l_prev:        202000
l_loaded:    0x4cffcc04
l_path:        /base/lib/libsocket.so.3

l_addr:        0x780e0000
l_name:        libm.so.2
l_ld:          78106010
l_next:        202c00
l_prev:        202400
l_prev:        202400
l_loaded:    0x4cffcc04
l_path:        /base/lib/libm.so.2

l_addr:        0x78150000
l_name:        libz.so.2
l_ld:          78164afc
l_next:        203000
l_prev:        202800
l_prev:        202800
l_loaded:    0x4cffcc04
l_path:        /base/usr/lib/libz.so.2

l_addr:        0x10f0000
l_name:        libc.so.3
l_ld:          116a6d8
l_next:        0
l_prev:        202c00
l_prev:        202c00
l_loaded:    0x4cffcc04
l_path:        /usr/lib/ldqnx.so.2


On 10-12-08 1:20 PM, Kevin Stallard wrote:
> Hey Colin,
>
> r_map is null before and after I load io-blk.  Here are all the members of r_debug (after dlopen() is called).
>
>
> rdbg	0x48063c40	
> 	r_version	2	
> 	r_map	0x00000000	
> 	r_brk	4264800944	
> 	r_state	RT_CONSISTENT	
> 	r_ldbase	0	
> 	r_ldsomap	0x00000000	
> 	r_rdevent	RD_NONE	
> 	r_flags	RD_FL_NONE	
>
>
> Thanks
> Kevin
>
>
>
>
> _______________________________________________
>
> General
> http://community.qnx.com/sf/go/post77882
>

-- 
cburgess@qnx.com
Re: dlopen and GDB  
Please print this before and after dlopen and specify if it is with or
without profiling. Could you, actually, do that for both profiled and
non-profiling case?

I have a feeling there is a bug in 6.3.2 ldd triggered by profiling
harness.




On Wed, 2010-12-08 at 13:20 -0500, Kevin Stallard wrote:
> Hey Colin,
> 
> r_map is null before and after I load io-blk.  Here are all the
> members of r_debug (after dlopen() is called).
> 
> 
> rdbg    0x48063c40     
>         r_version       2      
>         r_map   0x00000000     
>         r_brk   4264800944     
>         r_state RT_CONSISTENT  
>         r_ldbase        0      
>         r_ldsomap       0x00000000     
>         r_rdevent       RD_NONE
>         r_flags RD_FL_NONE     
> 
> 
> Thanks
> Kevin
> 
> 
> 
> 
> _______________________________________________
> 
> General
> http://community.qnx.com/sf/go/post77882
> 
> 
> 

Re: dlopen and GDB  
This gets stranger...now the non-profiled version doesn't show io-blk...I'll load symbols like you suggested.  
Re: dlopen and GDB  
Yeah looks like it was not related. I don't have any more ideas...

On 07/12/2010 7:38 PM, Kevin Stallard wrote:
> Elena,
>
> Thank you, but io-blk is already a part of the image.  It is located in /proc/boot.  I also start up devb-ram when I 
want to copy stuff to the file system.  So dev/shmem isn't a part of the whole thing.
>
> Thanks
> Kevin
>
>
>
>
> _______________________________________________
>
> General
> http://community.qnx.com/sf/go/post77723
>
Re: dlopen and GDB  
I don't think it is related in this case - gdb gets its shared object
list from ldd runtime link map.

I would like to rule out gdb as the culprit. Could you do the following
test and post the result?

----------------- 8< ----------------

#include <sys/link.h>
#include <stdio.h>
#include <dlfcn.h>

int ldd_handler(Ldd_Eh_Data_t *ehd, void *eh_d_handle, unsigned flags)
{
        printf("soname: %s\n", ehd->l_map->l_name ? ehd->l_map->l_name :
"executable");
}

void list_dlls(void)
{
        void *const eh = __ldd_register_eh(ldd_handler, NULL,
LDD_EH_DLL_REPLAY | LDD_EH_DLL_LOAD);

        __ldd_deregister_eh(eh);
}

int main(int argc, char *argv[]) {
        void *h = dlopen("io-blk.so", RTLD_NOW);

        /* Put a breakpoint on the next line: */
        if (h == NULL) {
        /* While at the breakpoint, do from gdb:
           (gdb) print list_dlls()
           */
                printf("Failed\n");
        } else {
                printf("Succeeded\n");
        }
        return 0;
}

----------------- >8 ----------------

On Tue, 2010-12-07 at 15:52 -0500, Elena Laskavaia wrote:
> So try to put library not in shmem - do you have flash or mounted
> drive you can use?
> 
> On 07/12/10 03:17 PM, Kevin Stallard wrote:
> > Hey Aleksandar,
> >
> > Thanks for helping out with this.  I would say don't worry about it.
> I need to either come up with a solution to our throughput problem
> quickly or we just live with it.  There is a lot of pressure to fix
> it, but even the support channels may take too long.  I was just
> hoping there was a quick fix.
> >
> > I have other avenues to follow, so let's drop it for now.  If you
> happen to have some insights or ideas, do share, but I wouldn't spend
> any time on it.
> >
> > Thanks for all the time you spent with me yesterday evening, I
> appreciate it very much.
> >
> > Sincerely,
> > Kevin
> >
> >
> >
> >
> > _______________________________________________
> >
> > General
> > http://community.qnx.com/sf/go/post77677
> >
> 
> 
> 
> _______________________________________________
> 
> General
> http://community.qnx.com/sf/go/post77682
> 
> 
> 


Re: dlopen and GDB  
ldd_handler was not in ldd back in 6.3.2 was it?

On 10-12-07 9:58 PM, Aleksandar Ristovski wrote:
>
> I don't think it is related in this case - gdb gets its shared object
> list from ldd runtime link map.
>
> I would like to rule out gdb as the culprit. Could you do the following
> test and post the result?
>
> ----------------- 8< ----------------
>
> #include <sys/link.h>
> #include <stdio.h>
> #include <dlfcn.h>
>
> int ldd_handler(Ldd_Eh_Data_t *ehd, void *eh_d_handle, unsigned flags)
> {
>         printf("soname: %s\n", ehd->l_map->l_name ? ehd->l_map->l_name :
> "executable");
> }
>
> void list_dlls(void)
> {
>         void *const eh = __ldd_register_eh(ldd_handler, NULL,
> LDD_EH_DLL_REPLAY | LDD_EH_DLL_LOAD);
>
>         __ldd_deregister_eh(eh);
> }
>
> int main(int argc, char *argv[]) {
>         void *h = dlopen("io-blk.so", RTLD_NOW);
>
>         /* Put a breakpoint on the next line: */
>         if (h == NULL) {
>         /* While at the breakpoint, do from gdb:
>            (gdb) print list_dlls()
>            */
>                 printf("Failed\n");
>         } else {
>                 printf("Succeeded\n");
>         }
>         return 0;
> }
>
> ----------------- >8 ----------------
>
> On Tue, 2010-12-07 at 15:52 -0500, Elena Laskavaia wrote:
> > So try to put library not in shmem - do you have flash or mounted
> > drive you can use?
> >
> > On 07/12/10 03:17 PM, Kevin Stallard wrote:
> > > Hey Aleksandar,
> > >
> > > Thanks for helping out with this.  I would say don't worry about it.
> > I need to either come up with a solution to our throughput problem
> > quickly or we just live with it.  There is a lot of pressure to fix
> > it, but even the support channels may take too long.  I was just
> > hoping there was a quick fix.
> > >
> > > I have other avenues to follow, so let's drop it for now.  If you
> > happen to have some insights or ideas, do share, but I wouldn't spend
> > any time on it.
> > >
> > > Thanks for all the time you spent with me yesterday evening, I
> > appreciate it very much.
> > >
> > > Sincerely,
> > > Kevin
> > >
> > >
> > >
> > >
> > > _______________________________________________
> > >
> > > General
> > > http://community.qnx.com/sf/go/post77677
> > >
> >
> >
> >
> > _______________________________________________
> >
> > General
> > http://community.qnx.com/sf/go/post77682
> >
> >
> >
>
>
>
>
>
>
> _______________________________________________
>
> General
> http://community.qnx.com/sf/go/post77738
>

-- 
cburgess@qnx.com

Re: dlopen and GDB  
I looked at link.h from my 6.3.2 installation. Unless I messed up my
installation.

On Tue, 2010-12-07 at 22:06 -0500, Colin Burgess wrote:
> ldd_handler was not in ldd back in 6.3.2 was it?
> 
> On 10-12-07 9:58 PM, Aleksandar Ristovski wrote:
> >
> > I don't think it is related in this case - gdb gets its shared
> object
> > list from ldd runtime link map.
> >
> > I would like to rule out gdb as the culprit. Could you do the
> following
> > test and post the result?
> >
> > ----------------- 8< ----------------
> >
> > #include <sys/link.h>
> > #include <stdio.h>
> > #include <dlfcn.h>
> >
> > int ldd_handler(Ldd_Eh_Data_t *ehd, void *eh_d_handle, unsigned
> flags)
> > {
> >         printf("soname: %s\n", ehd->l_map->l_name ?
> ehd->l_map->l_name :
> > "executable");
> > }
> >
> > void list_dlls(void)
> > {
> >         void *const eh = __ldd_register_eh(ldd_handler, NULL,
> > LDD_EH_DLL_REPLAY | LDD_EH_DLL_LOAD);
> >
> >         __ldd_deregister_eh(eh);
> > }
> >
> > int main(int argc, char *argv[]) {
> >         void *h = dlopen("io-blk.so", RTLD_NOW);
> >
> >         /* Put a breakpoint on the next line: */
> >         if (h == NULL) {
> >         /* While at the breakpoint, do from gdb:
> >            (gdb) print list_dlls()
> >            */
> >                 printf("Failed\n");
> >         } else {
> >                 printf("Succeeded\n");
> >         }
> >         return 0;
> > }
> >
> > ----------------- >8 ----------------
> >
> > On Tue, 2010-12-07 at 15:52 -0500, Elena Laskavaia wrote:
> > > So try to put library not in shmem - do you have flash or mounted
> > > drive you can use?
> > >
> > > On 07/12/10 03:17 PM, Kevin Stallard wrote:
> > > > Hey Aleksandar,
> > > >
> > > > Thanks for helping out with this.  I would say don't worry about
> it.
> > > I need to either come up with a solution to our throughput problem
> > > quickly or we just live with it.  There is a lot of pressure to
> fix
> > > it, but even the support channels may take too long.  I was just
> > > hoping there was a quick fix.
> > > >
> > > > I have other avenues to follow, so let's drop it for now.  If
> you
> > > happen to have some insights or ideas, do share, but I wouldn't
> spend
> > > any time on it.
> > > >
> > > > Thanks for all the time you spent with me yesterday evening, I
> > > appreciate it very much.
> > > >
> > > > Sincerely,
> > > > Kevin
> > > >
> > > >
> > > >
> > > >
> > > > _______________________________________________
> > > >
> > > > General
> > > > http://community.qnx.com/sf/go/post77677
> > > >
> > >
> > >
> > >
> > > _______________________________________________
> > >
> > > General
> > > http://community.qnx.com/sf/go/post77682
> > >
> > >
> > >
> >
> >
> >
> >
> >
> >
> > _______________________________________________
> >
> > General
> > http://community.qnx.com/sf/go/post77738
> >
> 
> --
> cburgess@qnx.com
> 
> 
> 
> 
> 
> _______________________________________________
> 
> General
> http://community.qnx.com/sf/go/post77739
> 
> 
> 

Re: dlopen and GDB  
Wow, maybe you're right... :-)

On 10-12-07 10:28 PM, Aleksandar Ristovski wrote:
>
> I looked at link.h from my 6.3.2 installation. Unless I messed up my
> installation.
>
> On Tue, 2010-12-07 at 22:06 -0500, Colin Burgess wrote:
> > ldd_handler was not in ldd back in 6.3.2 was it?
> >
> > On 10-12-07 9:58 PM, Aleksandar Ristovski wrote:
> > >
> > > I don't think it is related in this case - gdb gets its shared
> > object
> > > list from ldd runtime link map.
> > >
> > > I would like to rule out gdb as the culprit. Could you do the
> > following
> > > test and post the result?
> > >
> > > ----------------- 8< ----------------
> > >
> > > #include <sys/link.h>
> > > #include <stdio.h>
> > > #include <dlfcn.h>
> > >
> > > int ldd_handler(Ldd_Eh_Data_t *ehd, void *eh_d_handle, unsigned
> > flags)
> > > {
> > >         printf("soname: %s\n", ehd->l_map->l_name ?
> > ehd->l_map->l_name :
> > > "executable");
> > > }
> > >
> > > void list_dlls(void)
> > > {
> > >         void *const eh = __ldd_register_eh(ldd_handler, NULL,
> > > LDD_EH_DLL_REPLAY | LDD_EH_DLL_LOAD);
> > >
> > >         __ldd_deregister_eh(eh);
> > > }
> > >
> > > int main(int argc, char *argv[]) {
> > >         void *h = dlopen("io-blk.so", RTLD_NOW);
> > >
> > >         /* Put a breakpoint on the next line: */
> > >         if (h == NULL) {
> > >         /* While at the breakpoint, do from gdb:
> > >            (gdb) print list_dlls()
> > >            */
> > >                 printf("Failed\n");
> > >         } else {
> > >                 printf("Succeeded\n");
> > >         }
> > >         return 0;
> > > }
> > >
> > > ----------------- >8 ----------------
> > >
> > > On Tue, 2010-12-07 at 15:52 -0500, Elena Laskavaia wrote:
> > > > So try to put library not in shmem - do you have flash or mounted
> > > > drive you can use?
> > > >
> > > > On 07/12/10 03:17 PM, Kevin Stallard wrote:
> > > > > Hey Aleksandar,
> > > > >
> > > > > Thanks for helping out with this.  I would say don't worry about
> > it.
> > > > I need to either come up with a solution to our throughput problem
> > > > quickly or we just live with it.  There is a lot of pressure to
> > fix
> > > > it, but even the support channels may take too long.  I was just
> > > > hoping there was a quick fix.
> > > > >
> > > > > I have other avenues to follow, so let's drop it for now.  If
> > you
> > > > happen to have some insights or ideas, do share, but I wouldn't
> > spend
> > > > any time on it.
> > > > >
> > > > > Thanks for all the time you spent with me yesterday evening, I
> > > > appreciate it very much.
> > > > >
> > > > > Sincerely,
> > > > > Kevin
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > _______________________________________________
> > > > >
> > > > > General
> > > > > http://community.qnx.com/sf/go/post77677
> > > > >
> > > >
> > > >
> > > >
> > > > _______________________________________________
> > >...
Re: dlopen and GDB  
Aleksandar, 

Are you sure the instructions you gave me are correct?

This is the result:

(gdb) 
print list_dlls()
1623-interpreter-exec console "print list_dlls()"
~"$1 = void"
$1 = void~"\n"

(gdb)

Should I run list_dlls() before I load the dll?

Thanks
Kevin
Re: dlopen and GDB  
You can run it when stopped at main, and then after dlopen. Let's see what it says.
Re: dlopen and GDB  
oh, and one more thing: the output will actually be printed in your program console.
Re: dlopen and GDB  
Ahh...there it is...okay, so it works fine.  And io-blk shows up in the list, just not via GDB.

The main reason this is a problem is because I can't get access to io-blk's symbols while debugging...
Re: dlopen and GDB  
Aleks?  This is getting weird...

On 10-12-08 1:14 PM, Kevin Stallard wrote:
> Ahh...there it is...okay, so it works fine.  And io-blk shows up in the list, just not via GDB.
>
> The main reason this is a problem is because I can't get access to io-blk's symbols while debugging...
>
>
>
>
> _______________________________________________
>
> General
> http://community.qnx.com/sf/go/post77877
>

-- 
cburgess@qnx.com
Re: dlopen and GDB  
hmm.... I do not recall... have you tried

(gdb) sharedlibrary

(without info) after dlopen?

On Wed, 2010-12-08 at 13:14 -0500, Kevin Stallard wrote:
> Ahh...there it is...okay, so it works fine.  And io-blk shows up in
> the list, just not via GDB.
> 
> The main reason this is a problem is because I can't get access to
> io-blk's symbols while debugging...
> 
> 
> 
> 
> _______________________________________________
> 
> General
> http://community.qnx.com/sf/go/post77877
> 
> 
> 

Re: dlopen and GDB  


On Wed, 2010-12-08 at 13:14 -0500, Kevin Stallard wrote:
> The main reason this is a problem is because I can't get access to
> io-blk's symbols while debugging...


You can use

(gdb) add-symbol-file /foo/bar/baz.so 0xb03152b0

where 0xb03152b0 is address of .text in memory. You obtain this by
figuring out load base (with, e.g. pidin since gdb so list doesn't
work), in this example 0xb0300000 and then doing add-symbol-file on that
base + offset that you get by using readelf -l io-blk.so (in this
example 0x000152b0)






Re: dlopen and GDB  
soname: executable
soname: libcam.so.2
soname: libm.so.2
soname: libc.so.2
soname: io-blk_g.so

This is with profiling enabled.  It still doesn't show up in 'info shared'

Kevin
Re: dlopen and GDB  
I put list_dlls() in main itself.  print list_dlls() produced strange results....
Re: dlopen and GDB  
I remember now something about 6.3.2 cannot show names on shared library it shows like null of /dev/shmem.
If you open IDE in Memory View and it show /dev/shmem instead of library - that is the bug.


On 07/12/10 01:54 PM, Aleksandar Ristovski wrote:
> No, it has nothing to do with host side, it has to do with gdb not
> retrieving the link map completely. As if this particular shared object
> was not added to the linkmap (a bug in ldd? some strange bug in
> profiling code in libc?). 
> 
> It's in 6.3.2 and that was quite some time ago.
> 
> We need to reproduce it internally. I think we have enough pointers to
> do that, but I can not commit to doing it quickly - if you need it
> urgently, please go through regular support channels.
> 
> Thanks,
> 
> Aleksandar
> 
> On Tue, 2010-12-07 at 13:47 -0500, Kevin Stallard wrote:
>> I've been careful to avoid spaces.  I don't think this is the case...
>>
>> Thanks
>> Kevin
>>
>>
>>
>>
>> _______________________________________________
>>
>> General
>> http://community.qnx.com/sf/go/post77655
>>
>>
>>
> 
> 
> 
> 
> 
> _______________________________________________
> 
> General
> http://community.qnx.com/sf/go/post77656
>