Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'd like to debug proftpd on AIX and according to the documentation, addr2line is a usefull binary to identify what is not working.

Extract of proftpd debugging documentation:

 The key here for tracking down the location of the segfault is that [0] 
 frame, and the memory address: 0x809b1e1. 
 Using that address and a very handy command called addr2line, you can determine the location of that address in the source code:
  addrline -e ./proftpd 0x809b1e1
In this example, I saw:    
  golem/tj>addr2line -e ./proftpd 0x809b1e1
  /home/tj/proftpd/cvs/proftpd/modules/mod_auth.c:1723
which is the location of test code added to trigger the segfault. 

But I can't find it on AIX, does an equivalent exist ?
and if yes what it is ?

Edit 1
I find dbx which is the AIX debugger, the man says this:

dbx [-a ProcessID] [-c CommandFile] [-d NestingDepth] [-I Directory]
[-p [OldPath=NewPath:... | File]] [-v] [-k] [-u] [-x] [-F] [-L] [-r]
[-C CoreFile | ObjectFile [CoreFile]]

    -a ProcessID        Attach to specified process
    -c CommandFile      Run dbx subcommands in specified file first
    -d NestingDepth     Set limit for nesting of program blocks
    -I Directory        Include Directory in list of directories
                        searched for source files
    -p OldPath=NewPath  Substitute library path for core examination
       File             Read library path substitutions for core
                        examination from File
    -C CoreFile         Allow to analyze core dump without ObjectFile
    -v                  Relax core file validity checking
    -k                  Map memory addresses
    -u                  Prepend file name symbols with an '@'
    -x                  Strip postfix '_' from FORTRAN symbols
    -F                  Read all symbols at start-up time
    -L                  Keep linkage symbols
    -r                  Run object file immediately

Does this program can help me ?
and how (I'm very not comfortable with C compilation and debugging without an IDE )

share|improve this question
    
In gdb proftpd, you should be able to do list *0x809b1e1. gdb is available for a number of operating systems, but so are the GNU binutils (where addr2line comes from). Have you tried installing the GNU binutils on AIX? –  Stéphane Chazelas Feb 3 at 12:14
    
I'm not admin and I can't request additional software. what's gdb ? –  Kiwy Feb 3 at 12:48
    
gdb is the GNU debugger. You don't need super-user privilege to install software in your home directory (or any directory you have write access to). If you can't use gdb, you may be able to do the same with whatever AIX provides as a debugger. –  Stéphane Chazelas Feb 3 at 13:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.