I am debugging in gdb a program that dynamically loads libodbcinst.so. I want to debug the code from libodbcinst - I can break in it, see the source and step through it, but whenever I try printing a variable, I get (e.g. for the variable ret):
In my program libodbcinst.so loads my own library (an odbc driver). This library I can debug fully, symbols and all.
Things I've verified:
- libodbcinst.so is compiled with debug information. I compiled it myself from UnixODBC sources, and made sure it was compiled with debug info.
- libodcinst.so is not stripped - I ran 'nm' on it, and got a symbol table.
- From gdb I ran 'info share' and saw that libodbcinst.so was in the list of loaded libraries. I also tried running 'sharedlibrary libodbcinst.so' but this made no difference.
- I tried running add-symbol-file for the library. I must admit I have a problem here. This command is supposed to receive an 'address' parameter. The manual says this should be the address where the library was loaded. How do I know that library? I tried putting different things there - for example the address of the text segment I got from 'maint info sections', but not only could I still not see the symbols, this also screwed up something with the rest of the debugging.
So, in addition to a solution to show the symbols, I would also be very grateful for an explanation of the address parameter for add-symbol-file.
I'm working on HP-UX 11.23 (Itanium). Using HP gdb (wdb) 5.7 .
I am trying to run a C++ program which uses a static library libprun.a. During compilation, I am loading this library file using a environment variable as below.
LIBDIR = ${CUSTOM_PATH}/lib
LOADLIBS = $(LIBDIR)/libgqlcomm.a \
$(LIBDIR)/libgsml.a \
... (7 Replies)
I'm trying to install libiconv to AIX 7.1 from an rpm off of the perzl site. The rpm appears to install but I get this error message.
add shr4.o shared members from /usr/lib/libiconv.a to /opt/freeware/lib/libiconv.a
add shr.o shared members from /usr/lib/libiconv.a to ... (5 Replies)
Hello.
I am new to this forum and I would like to ask for advice about low level POSIX programming.
I have to implement a POSIX compliant C shared library.
A file will have some variables and the shared library will have some functions which need those variables.
There is one special... (5 Replies)
Hi,
I have an application running on AIX. The app is deployed on Webspshere server. Due to some reason, i have to make use of a third party library (Sigar API's) from my application. This library requires an .so file as well.
Is there any location where i can put this *.so file and it will... (1 Reply)
Hi All
I have been given by someone else header file and a shared library to be used by my C++ application. Compilation is fine but when I try to executes the application I receive the following error.
./first: error while loading shared libraries: libMyLib.so.9: cannot open shared object file:... (2 Replies)
Hi:
I have a library that it only offers Makefile for building static library. It built libxxx.a file. How do I in any way build a shared library? (either changin the Makefile or direct script or command to build shared library)
Thanks. (1 Reply)
Hi All,
I have RHEL 5 installed in my system. Something must has happened because when i reboot the server, it came with many error..
/usr/bin/rhgb-client -- error while loading shared libraries: libpopt.so.0. Can't open shared object files. No such file/directory
It finnaly ends with the... (0 Replies)
I am writing a shared library in Linux (but compatible with other UNIXes) and I want to allow multiple instances to share a piece of memory -- 1 byte is enough. What's the "best" way to do this? I want to optimize for speed and portability.
Obviously, I'll have to worry about mutual exclusion. (0 Replies)
I need to create a shared library to access an in memory DB. The DB is not huge, but big enough to make it cumbersome to carry around in every single process using the shared library. Luckily, it is pretty static information, so I don't need to worry much about synchronizing the data between... (12 Replies)
Can any one help me out????
I need to install GDB and GCC in an UNIX machine.
can any one point me to any lucid pointer to it.
The gNU help on this is proving to be little tangential for me. (2 Replies)