Cannot run gdb on AIX 6.1


 
Thread Tools Search this Thread
Operating Systems AIX Cannot run gdb on AIX 6.1
# 1  
Old 08-13-2013
Cannot run gdb on AIX 6.1

Hello, I am experiencing a problem trying to use the GNU gdb debugger on my AIX 6.1 system, as follows:

Code:
$ gdb
exec(): 0509-036 Cannot load program powerpc64-ibm-aix6.1.2.0-gdb because of the following errors:
        0509-130 Symbol resolution failed for powerpc64-ibm-aix6.1.2.0-gdb because:
        0509-136   Symbol XML_StopParser (number 258) is not exported from
                   dependent module /opt/freeware/lib/libexpat.a[libexpat.so.0].
        0509-192 Examine .loader section symbols with the
                 'dump -Tv' command.
$

Taking the error message's advice, I see:

Code:
$ dump -Tv /opt/freeware/lib/libexpat.a | grep StopParser
[32]    0x20004420    .data      EXP     DS SECdef        [noIMid] XML_StopParser
$ 
$ dump -Tv -X64 `which gdb` | grep StopParser
[258]   0x00000000    undef      IMP     DS EXTref /opt/freeware/lib/libexpat.a(libexpat.so.0) XML_StopParser
$

I might understand this better if I had any significant experience developing C/C++ applications and libraries in a Unix environment, but it sure looks to me like 'XML_STopParser' is exported just fine from the .data segment of libexpat.a , and should satisfy the undef reference in the gdb executable. I don't understand what the problem is. The libexpat.a archive looks a little funny:

Code:
$ which ar
/opt/freeware/bin/ar
$ ar -tv libexpat.a 
BFD: BFD 2.14 20030612 assertion fail libbfd.c:561
rwxr-xr-x 0/0 211325 Oct 21 10:21 2008 libexpat.so.1
rwxr-xr-x 0/0 251775 Oct 21 10:20 2008 libexpat.so.1
rwxr-xr-x 0/0 520860 Oct 21 10:21 2008 libexpat.so.0
rwxr-xr-x 0/0 337060 Oct 21 10:21 2008 libexpat.so.0
$ /usr/bin/ar -X64 -tv libexpat.a
rwxr-xr-x     0/0     251775 Oct 21 10:20 2008 libexpat.so.1
rwxr-xr-x     0/0     337060 Oct 21 10:21 2008 libexpat.so.0
$

I'm guessing that the gnu version of 'ar' has some kind of problem since it's throwing an assert failure, but even the AIX one lists two versions of libexpat.so ('.0' and '.1' ). Is that normal? It looks verschnoggled to me.

When I google about for the " Symbol is not exported from dependent module " error in AIX I see alot of stuff about tuning/activating Asynchronous I/O and how it's changed from 5.3->6.1, but this seems to be related to the particular symbols not being exported and/or the particular library they are in.

I plan to try deleting one of the '.so.' files if I can ever get 'ar' to do it, but any advice/intelligence would be appreciated.

---------- Post updated at 04:53 PM ---------- Previous update was at 04:45 PM ----------

BTW, after gdb dies as above I have to run 'slibclean' to be able to access llibexpat.a.
# 2  
Old 08-14-2013
I notice the -X64 argument which looks like you are looking for the 64-bit (which is probably what you need) and I am guessing that the routine you are seeing is a 32-bit one.

I will have to play with dump -T to understand it better. What I am normally looking at is the output of dump -H.

I expect you also downloaded some extra rpm's to also install gcc - they may have libraries in a different location. The environment variable LIBPATH can be used to modify the defaults (what the application, in this case gdb, expects - use dump -H).

I am not sure, but I believe the AIX debugger (dbx) can be used as well/instead.
Install the fileset bos.adt.debug
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Run ps aux continuously in AIX

Requirement is to monitor cpu usage /process for a user given time and record the output. topas,topasout,topasrec,tprof not seems to be working for me. so what i am looking for is to run below command continously till the time limit given by the user who runs the script.since below command is a one... (6 Replies)
Discussion started by: NarayanaPrakash
6 Replies

2. UNIX for Dummies Questions & Answers

Unable to run Sed in AIX

Hi All, I've wrote a script to truncate newline characters in a text file. Could you please help me in figuring out the issue :confused: for file in $Filelist; do echo $file; FileName=`basename $file`; sed 's/^M//g' $file> "${file}"2; mv "${file}"2 "${file}"; sed '1d' "${file}"... (5 Replies)
Discussion started by: udayakumar
5 Replies

3. AIX

can aix 5.x run on a old powerpc model 250

have an old powerpc model 250, currently on aix 4.3.2...64 meg in size of memory.. Can any of the AIX 5L, 5.1, 5.2, or 5.3 run on it at all ?? (3 Replies)
Discussion started by: ppchu99
3 Replies

4. Shell Programming and Scripting

Command script to be run in both AIX and LINUX

Hi, Script : #!/usr/bin/ksh echo "\n\t\t\t\t Enter your Name : \c" read name ############################## I ran the script in LINUX Enter your Name : abcdefghijklmnopqrstuvwxyz I ran the script in AIX Enter your Name : opqrstuvwxyz < I'm not able to see the... (2 Replies)
Discussion started by: arjunprathap
2 Replies

5. Programming

Can someone compile and run a program on AIX 6.1 please?

Hi, I have a program which collects performance data from AIX. It works fine on older releases (< 5.3) but I fail to get data from /proc. I would really appreciate it if someone could compile (using ANSI compat C compiler), run the program (for 30-40 minutes) on AIX 6.1 and send me the... (2 Replies)
Discussion started by: StuBob
2 Replies

6. UNIX for Advanced & Expert Users

telnet to an aix box and run wsm

hi I am runnign suse linux and want to telnet to an aix box and run wsm GUI from my linux box. How can I do that.. can anyone help to confiure X11 or Xwindows setup on mu suse linux and or on aix box thanks Antony (3 Replies)
Discussion started by: antointoronto
3 Replies

7. Programming

How to run C#.NET in AIX

Hi Guys Am new in UNIX environment I was asked by my boss to write a program that transfer files from the AIX server to the Wintel Server. I have written the program in C# windows which does almost the same thing. So how to run the C# program in UNIX? (1 Reply)
Discussion started by: michmsk
1 Replies

8. Solaris

Why gdb can't run?

My OS is Solaris10,I download gdb-7.0.tar.gz,and install it,I use following commands: ./configure make Then I enter gdb,but I can't run it! $gdb -bash: gdb: command not found Where is wrong? How to do it? Thanks (1 Reply)
Discussion started by: konvalo
1 Replies

9. Programming

Debugging 64bit code with gdb and ddd in AIX

I'm trying to use the GDB debugger and DDD to debug 64bit code. It seems that the AIX toolkit gdb version 6.0 works with 64bit code. But the ddd tool when running gdb gives the following errors : Starting program: <my binary> <my params> warning: "": not in executable format: There is an input... (2 Replies)
Discussion started by: bean66
2 Replies

10. AIX

does AIX run on x86 or x64?

wondering if there are any opportunities to learning AIX on regular hardware :) thanks, manny (11 Replies)
Discussion started by: mr_manny
11 Replies
Login or Register to Ask a Question