This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

addr2line


I can't get addr2line to work. I think this is something that's changed
in recent Cygwin releases, because I was using it successfully with an
earlier version (but that was a while ago and I don't have the code I
was using then, so it's possible I was doing something different then
that's escaped my notice now).

Here's the short program I'm using to test it:

  /* demo.c */

  #include <stdio.h>

  void foo() {
    printf("%p\n", __builtin_return_address(0));
    printf("%p\n", __builtin_return_address(1));
    printf("%p\n", __builtin_return_address(2));
    printf("%p\n", __builtin_return_address(3));
  }

  void bar() {
    foo();
  }

  int main() {
    bar();
    return 0;
  }

Compiling and testing this with:

  gcc -g demo.c -o demo
  ./demo|addr2line -e demo.exe

just yields a series of unknowns:

  ??:0
  ??:0
  ??:0
  ??:0

The same test works on Linux, giving the file/line numbers I expect.

I did a full updatbefore testing to make sure I had the latest version
(and searched the list archives for "addr2line"). I'll attach my
cygcheck output in case it's relevant.

-- 
Ross Smith <ross.s@ihug.co.nz> The Internet Group, Auckland, New Zealand
========================================================================
        "Hungarian notation is the tactical nuclear weapon of
         source code obfuscation techniques." -- Roedy Green


Cygnus Win95/NT Configuration Diagnostics
Current System Time: Mon Apr 23 15:22:50 2001

WinNT Ver 4.0 build 1381 Service Pack 6

Path:	/usr/bin
	/usr/local/bin
	/g/mingw/bin
	/c/WINNT/system32
	/c/WINNT
	/c/Program Files/MTS
	/g/back_office/sql_server/BINN
	/g/software/tcl/bin
	/c/bin
	/g/software/emacs/bin
	/g/software/image_magick
	/g/software/microsoft_visual_studio/Common/Tools/WinNT
	/g/software/microsoft_visual_studio/Common/MSDev98/Bin
	/g/software/microsoft_visual_studio/Common/Tools
	/g/software/microsoft_visual_studio/VC98/bin
	/g/projects/tools/bin
	/g/software/borlandcplusplus/Bin
	/g/software/BMRT/bin

SysDir: C:\WINNT\System32
WinDir: C:\WINNT

PWD = `/c/cplusplus/debugging/address_test'
LD_LIBRARY_PATH =
`/c/cplusplus/class_library/lib;c:/cplusplus/include;c:/cplusplus/libraries;g:/projects/coyote/lib'
CYGWIN = `binmode ntsec strip_title title tty'
C_INCLUDE_PATH =
`c:\cplusplus\class_library;c:\cplusplus\include;g:\projects\coyote'
LIBRARY_PATH =
`c:\cplusplus\class_library\lib;c:\cplusplus\include;c:\cplusplus\libraries;g:\projects\coyote\lib'
MAKE_MODE = `UNIX'
HOME = `/c/WINNT/Profiles/ross.s/home'

NUMBER_OF_PROCESSORS = `1'
PROMPT = `$P$G'
LOGONSERVER = `\\ANIMAL'
OS2LIBPATH = `C:\WINNT\system32\os2\dll;'
COMSPEC = `C:\WINNT\system32\cmd.exe'
!C: = `C:\cplusplus\debugging\address_test'
SYSTEMDRIVE = `C:'
HOSTNAME = `ANIMAL'
INCLUDE =
`c:\cplusplus\class_library;c:\cplusplus\include;G:\software\microsoft_visual_studio\VC98\atl\include;G:\software\microsoft_visual_studio\VC98\mfc\include;G:\software\microsoft_visual_studio\VC98\include;g:\software\tcl\include'
PROCESSOR_REVISION = `0703'
MSDEVDIR = `G:\software\microsoft_visual_studio\Common\MSDev98'
SERVER_ROOT = `/g/server_root'
PATHEXT = `.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH'
COMPUTERNAME = `ANIMAL'
SHADERS = `G:\software\BMRT\shaders'
WINDIR = `C:\WINNT'
MSVCDIR = `G:\software\microsoft_visual_studio\VC98'
USERPROFILE = `C:\WINNT\Profiles\ross.s'
CC = `gcc'
BASEDIR = `g:\software\nt4_ddk'
PS1 = `\w$ '
LESS = `-Q'
BMRTHOME = `G:\software\BMRT\'
CPLUS_INCLUDE_PATH =
`c:\cplusplus\class_library;c:\cplusplus\include;c:\cplusplus\libraries\boost;g:\projects\coyote'
MACHTYPE = `i686-pc-cygwin'
PROCESSOR_IDENTIFIER = `x86 Family 6 Model 7 Stepping 3, GenuineIntel'
CGI_DIRECTORY = `/g/server_root/http/cgi-bin'
CXX = `g++'
OS = `Windows_NT'
PROCESSOR_ARCHITECTURE = `x86'
TEMP = `/c/TEMP'
PROCESSOR_LEVEL = `6'
SYSTEMROOT = `C:\WINNT'
DELEGATE_PATH = `g:\software\image_magick'
TMP = `/c/TEMP'
HOMEDRIVE = `C:'
LIB =
`c:\cplusplus\class_library\lib;c:\cplusplus\include;c:\cplusplus\libraries;G:\software\microsoft_visual_studio\VC98\mfc\lib;G:\software\microsoft_visual_studio\VC98\lib;g:\software\tcl\lib'
SHLVL = `1'
HOMEPATH = `\'
USERDOMAIN = `ANIMAL'
PRELOAD_WINSOCK = `1'
USERNAME = `ross.s'
SHELL = `/bin/bash'
HOSTTYPE = `i686'
OSTYPE = `cygwin'
TERM = `cygwin'
_ = `/usr/bin/cygcheck'
TZ = `NZST-12NZDT-13,M10.1.0/2,M3.3.0/2'

HKEY_CURRENT_USER\Software\Cygnus Solutions
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2
  (default) = `/cygdrive'
  cygdrive flags = 0x00000022
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\Program Options
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\00
  (default) = `\\.\tape1:'
  unix = `/dev/st1'
  fmixed = 0x00000000
  fbinary = 0x00000000
  fsilent = 0x00000001
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\01
  (default) = `\\.\tape0:'
  unix = `/dev/st0'
  fmixed = 0x00000000
  fbinary = 0x00000000
  fsilent = 0x00000001
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\02
  (default) = `\\.\b:'
  unix = `/dev/fd1'
  fmixed = 0x00000000
  fbinary = 0x00000000
  fsilent = 0x00000001
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\03
  (default) = `\\.\a:'
  unix = `/dev/fd0'
  fmixed = 0x00000000
  fbinary = 0x00000000
  fsilent = 0x00000001
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\04
  (default) = `c:'
  unix = `/'
  fmixed = 0x00000000
  fbinary = 0x00000000
  fsilent = 0x00000000
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\Installed Components
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\Installed
Components\C:/cygwin
  (default) = `20000627'
  bash = `0002.0004.0001'
  binutils = `20000625'
  bison = `0000'
  byacc = `0000'
  bzip = `0000'
  clear = `0001.0000'
  crypt = `0001.0000'
  cygwin = `0001.0001.0002'
  dejagnu = `0000'
  diff = `0000'
  expect = `0000'
  fileutils = `0000'
  findutils = `0000'
  flex = `0000'
  gawk = `0003.0000.0004'
  gcc = `0002.0095.0002.0002'
  gdb = `20000610'
  gperf = `0000'
  grep = `0000'
  groff = `0001.011a.0001'
  gzip = `0000'
  inetutils = `0001.0003.0002.0004'
  less = `0000'
  libpng = `0001.0000.0006.0001'
  login = `0001.0003'
  m = `0000'
  make = `0003.0079.0003'
  man = `0001.005g.0002'
  opengl = `0001.0002.0001.0001'
  patch = `0000'
  sed = `0003.0002.0001'
  shellutils = `0000'
  tar = `0000'
  tcltk = `20000610'
  termcap = `20000630'
  texinfo = `0000'
  textutils = `0002.0000.0001'
  time = `0000'
  zlib = `0001.0001.0003.0001'
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/
  (default) = `c:\cygwin'
  flags = 0x0000000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/a
  (default) = `A:\'
  flags = 0x0000000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/c
  (default) = `C:\'
  flags = 0x0000000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/cdrom
  (default) = `H:'
  flags = 0x0000000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/d
  (default) = `D:\'
  flags = 0x0000000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/e
  (default) = `E:\'
  flags = 0x0000000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/f
  (default) = `F:\'
  flags = 0x0000000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/g
  (default) = `G:\'
  flags = 0x0000000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/usr/bin
  (default) = `c:/cygwin/bin'
  flags = 0x0000000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/usr/lib
  (default) = `c:/cygwin/lib'
  flags = 0x0000000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\Program Options
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\00
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\01
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\02
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\03
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\04
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\05
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\06
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\07
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\08
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\09
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\0A
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\0B
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\0C
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\0D
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\0E
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\0F
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\10
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\11
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\12
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\13
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\14
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\15
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\16
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\17
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\18
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\19
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\1A
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\1B
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\1C
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\1D

a:  fd           N/A    N/A                    
c:  hd  NTFS    2000Mb  89% CP CS UN PA FC     NTFS1
d:  hd  NTFS     996Mb  16% CP CS UN PA FC     NTFS2
e:  hd  NTFS     517Mb  98% CP CS UN PA FC     NTFS3
f:  hd  FAT      603Mb   1% CP    UN           FAT1
g:  hd  NTFS   13021Mb  88% CP CS UN PA FC     NTFS4
h:  cd           N/A    N/A                    

c:\cygwin\bin  /usr/bin  system  binmode
c:\cygwin\lib  /usr/lib  system  binmode
c:\cygwin  /        system  binmode
A:    /a       system  binmode
C:    /c       system  binmode
D:    /d       system  binmode
E:    /e       system  binmode
F:    /f       system  binmode
G:    /g       system  binmode
H:    /cdrom   system  binmode

Found: c:\cygwin\bin\bash.exe
Found: c:\cygwin\bin\cat.exe
Found: c:\cygwin\bin\cpp.exe
Found: G:\mingw\bin\cpp.exe
Warning: c:\cygwin\bin\cpp.exe hides G:\mingw\bin\cpp.exe
Found: G:\software\BMRT\bin\cpp.exe
Warning: c:\cygwin\bin\cpp.exe hides G:\software\BMRT\bin\cpp.exe
Found: c:\cygwin\bin\find.exe
Found: c:\cygwin\bin\gcc.exe
Found: G:\mingw\bin\gcc.exe
Warning: c:\cygwin\bin\gcc.exe hides G:\mingw\bin\gcc.exe
Found: c:\cygwin\bin\gdb.exe
Found: c:\cygwin\bin\ld.exe
Found: G:\mingw\bin\ld.exe
Warning: c:\cygwin\bin\ld.exe hides G:\mingw\bin\ld.exe
Found: c:\cygwin\bin\ls.exe
Found: c:\cygwin\bin\make.exe
Found: G:\software\borlandcplusplus\Bin\make.exe
Warning: c:\cygwin\bin\make.exe hides
G:\software\borlandcplusplus\Bin\make.exe
Found: c:\cygwin\bin\sh.exe

   56k 2000/12/03 c:\cygwin\bin\cygbz21.0.dll - os=4.0 img=1.0 sys=4.0
                  "cygbz21.0.dll" v0.0 ts=2000/11/21 12:53
   82k 2001/01/21 c:\cygwin\bin\cygform5.dll - os=4.0 img=1.0 sys=4.0
                  "cygform5.dll" v0.0 ts=2001/1/22 9:39
   18k 2000/10/23 c:\cygwin\bin\cyggdbm.dll - os=4.0 img=1.0 sys=4.0
                  "cyggdbm.dll" v0.0 ts=2000/10/23 15:26
   17k 2001/01/07 c:\cygwin\bin\cyghistory4.dll - os=4.0 img=1.0 sys=4.0
                  "cyghistory4.dll" v0.0 ts=2001/1/7 17:34
   14k 2000/10/23 c:\cygwin\bin\cygintl.dll - os=4.0 img=1.0 sys=4.0
                  "cygintl.dll" v0.0 ts=2000/10/24 8:02
   81k 2000/12/05 c:\cygwin\bin\cygitcl30.dll - os=4.0 img=1.0 sys=4.0
                  "cygitcl30.dll" v0.0 ts=2000/11/26 14:43
   35k 2000/12/05 c:\cygwin\bin\cygitk30.dll - os=4.0 img=1.0 sys=4.0
                  "cygitk30.dll" v0.0 ts=2000/11/26 14:43
   45k 2000/10/22 c:\cygwin\bin\cygjbig1.dll - os=4.0 img=1.0 sys=4.0
                  "cygjbig1.dll" v0.0 ts=2000/10/23 12:06
  119k 2000/10/23 c:\cygwin\bin\cygjpeg6b.dll - os=4.0 img=1.0 sys=4.0
                  "cygjpeg6b.dll" v0.0 ts=2000/10/23 13:58
   53k 2001/01/21 c:\cygwin\bin\cygmenu5.dll - os=4.0 img=1.0 sys=4.0
                  "cygmenu5.dll" v0.0 ts=2001/1/22 9:39
  414k 2001/01/21 c:\cygwin\bin\cygncurses++5.dll - os=4.0 img=1.0
sys=4.0
                  "cygncurses++5.dll" v0.0 ts=2001/1/22 9:40
  299k 2001/01/21 c:\cygwin\bin\cygncurses5.dll - os=4.0 img=1.0 sys=4.0
                  "cygncurses5.dll" v0.0 ts=2001/1/22 9:38
   34k 2001/01/21 c:\cygwin\bin\cygpanel5.dll - os=4.0 img=1.0 sys=4.0
                  "cygpanel5.dll" v0.0 ts=2001/1/22 9:38
  163k 2001/02/03 c:\cygwin\bin\cygpng2.dll - os=4.0 img=1.0 sys=4.0
                  "cygpng2.dll" v0.0 ts=2001/2/4 10:21
  108k 2001/01/07 c:\cygwin\bin\cygreadline4.dll - os=4.0 img=1.0
sys=4.0
                  "cygreadline4.dll" v0.0 ts=2001/1/7 17:34
  390k 2001/01/18 c:\cygwin\bin\cygtcl80.dll - os=4.0 img=1.0 sys=4.0
                  "cygtcl80.dll" v0.0 ts=2001/1/18 17:44
    5k 2001/01/18 c:\cygwin\bin\cygtclpip80.dll - os=4.0 img=1.0 sys=4.0
   10k 2001/01/18 c:\cygwin\bin\cygtclreg80.dll - os=4.0 img=1.0 sys=4.0
                  "cygtclreg80.dll" v0.0 ts=2001/1/18 17:44
  243k 2000/10/23 c:\cygwin\bin\cygtiff3.dll - os=4.0 img=1.0 sys=4.0
                  "cygtiff3.dll" v0.0 ts=2000/10/23 14:14
  623k 2000/12/05 c:\cygwin\bin\cygtk80.dll - os=4.0 img=1.0 sys=4.0
                  "cygtk80.dll" v0.0 ts=2000/11/26 14:43
   41k 2000/11/20 c:\cygwin\bin\cygXpm-noX4.dll - os=4.0 img=1.0 sys=4.0
                  "cygXpm-noX4.dll" v0.0 ts=2000/11/20 15:41
   45k 2000/11/20 c:\cygwin\bin\cygXpm-X4.dll - os=4.0 img=1.0 sys=4.0
                  "cygXpm-X4.dll" v0.0 ts=2000/11/20 15:45
   49k 2001/02/03 c:\cygwin\bin\cygz.dll - os=4.0 img=1.0 sys=4.0
                  "cygz.dll" v0.0 ts=2001/2/4 9:35
  615k 2001/01/31 c:\cygwin\bin\cygwin1.dll - os=4.0 img=1.0 sys=4.0
                  "cygwin1.dll" v0.0 ts=2001/2/1 4:08
    Cygwin DLL version info:
        dll major: 1001
        dll minor: 8
        dll epoch: 19
        dll bad signal mask: 19005
        dll old termios: 5
        dll malloc env: 28
        api major: 0
        api minor: 34
        shared data: 3
        dll identifier: cygwin1
        mount registry: 2
        cygnus registry name: Cygnus Solutions
        cygwin registry name: Cygwin
        program options name: Program Options
        cygwin mount registry name: mounts v2
        cygdrive flags: cygdrive flags
        cygdrive prefix: cygdrive prefix
        cygdrive default prefix: 
        build date: Wed Jan 31 10:08:38 EST 2001
        shared id: cygwin1S3

Use -h to see help about each section

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]