libunwind-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libunwind] building libunwind on x86_64


From: George Lowe
Subject: Re: [libunwind] building libunwind on x86_64
Date: Thu, 12 Jan 2006 00:34:02 +0000 (GMT)

--- Arun Sharma <address@hidden> wrote:

> George Lowe wrote:
> > Hello,
> > 
> > Does anyone have any advice about the following?
> > 
> > I am trying to use libunwind on x86_64 to allow
> > a running process to get its own stack backtrace
> > during
> > execution.  I would like to build separate
> versions
> > for 32-bit and 64-bit modes.  The problem I've
> > run up against is trying to build libunwind for
> > 32-bit mode on a linux x86_64 box.
> > 
> > What options should be given to configure so that
> > a 32-bit version is built?
> 
> Have you tried CFLAGS=-m32?

I have tried that, unsuccessfully.
The compilation fails with undefined symbols:

In file included from
../../../libunwind/src/x86_64/Linit.c:4:
../../../libunwind/src/x86_64/Ginit.c: In function
`uc_addr':
../../../libunwind/src/x86_64/Ginit.c:51: error:
`REG_R8' undeclared (first use 
in this function)
../../../libunwind/src/x86_64/Ginit.c:51: error: (Each
undeclared identifier is 
reported only once
../../../libunwind/src/x86_64/Ginit.c:51: error: for
each function it appears in
.)
../../../libunwind/src/x86_64/Ginit.c:52: error:
`REG_R9' undeclared (first use 
in this function)
../../../libunwind/src/x86_64/Ginit.c:53: error:
`REG_R10' undeclared (first use
 in this function)
../../../libunwind/src/x86_64/Ginit.c:54: error:
`REG_R11' undeclared (first use
 in this function)
../../../libunwind/src/x86_64/Ginit.c:55: error:
`REG_R12' undeclared (first use
 in this function)
../../../libunwind/src/x86_64/Ginit.c:56: error:
`REG_R13' undeclared (first use
 in this function)
../../../libunwind/src/x86_64/Ginit.c:57: error:
`REG_R14' undeclared (first use
 in this function)
../../../libunwind/src/x86_64/Ginit.c:58: error:
`REG_R15' undeclared (first use
 in this function)
../../../libunwind/src/x86_64/Ginit.c:59: error:
`REG_RDI' undeclared (first use
 in this function)
../../../libunwind/src/x86_64/Ginit.c:60: error:
`REG_RSI' undeclared (first use
 in this function)
../../../libunwind/src/x86_64/Ginit.c:61: error:
`REG_RBP' undeclared (first use
 in this function)
../../../libunwind/src/x86_64/Ginit.c:62: error:
`REG_RBX' undeclared (first use
 in this function)
../../../libunwind/src/x86_64/Ginit.c:63: error:
`REG_RDX' undeclared (first use
 in this function)
../../../libunwind/src/x86_64/Ginit.c:64: error:
`REG_RAX' undeclared (first use
 in this function)
../../../libunwind/src/x86_64/Ginit.c:65: error:
`REG_RCX' undeclared (first use
 in this function)
../../../libunwind/src/x86_64/Ginit.c:66: error:
`REG_RSP' undeclared (first use
 in this function)
../../../libunwind/src/x86_64/Ginit.c:67: error:
`REG_RIP' undeclared (first use
 in this function)
../../../libunwind/src/x86_64/Ginit.c: In function
`access_mem':
../../../libunwind/src/x86_64/Ginit.c:113: warning:
cast to pointer from integer
 of different size
../../../libunwind/src/x86_64/Ginit.c:117: warning:
cast to pointer from integer
 of different size
gmake[2]: *** [x86_64/Linit.lo] Error 1

There are a whole set of warnings that look like this:

In file included from
../../../libunwind/src/x86_64/unwind_i.h:37,
                 from
../../../libunwind/src/x86_64/Gglobal.c:28,
                 from
../../../libunwind/src/x86_64/Lglobal.c:4:
../include/tdep.h: In function `dwarf_getfp':
../include/tdep.h:81: warning: cast to pointer from
integer of different size
../include/tdep.h: In function `dwarf_putfp':
../include/tdep.h:90: warning: cast to pointer from
integer of different size
../include/tdep.h: In function `dwarf_get':
../include/tdep.h:99: warning: cast to pointer from
integer of different size
../include/tdep.h: In function `dwarf_put':
../include/tdep.h:108: warning: cast to pointer from
integer of different size
In file included from
../../../libunwind/src/x86_64/Gglobal.c:29,
                 from
../../../libunwind/src/x86_64/Lglobal.c:4:
../../../libunwind/include/dwarf_i.h: In function
`dwarf_reads8':
../../../libunwind/include/dwarf_i.h:48: warning: cast
to pointer from integer o
f different size
../../../libunwind/include/dwarf_i.h: In function
`dwarf_reads16':
../../../libunwind/include/dwarf_i.h:59: warning: cast
to pointer from integer o
f different size
../../../libunwind/include/dwarf_i.h: In function
`dwarf_reads32':
../../../libunwind/include/dwarf_i.h:70: warning: cast
to pointer from integer o
f different size
../../../libunwind/include/dwarf_i.h: In function
`dwarf_reads64':
../../../libunwind/include/dwarf_i.h:81: warning: cast
to pointer from integer o
f different size
../../../libunwind/include/dwarf_i.h: In function
`dwarf_readu8':
../../../libunwind/include/dwarf_i.h:92: warning: cast
to pointer from integer o
f different size
../../../libunwind/include/dwarf_i.h: In function
`dwarf_readu16':
../../../libunwind/include/dwarf_i.h:103: warning:
cast to pointer from integer 
of different size
../../../libunwind/include/dwarf_i.h: In function
`dwarf_readu32':
../../../libunwind/include/dwarf_i.h:114: warning:
cast to pointer from integer 
of different size
../../../libunwind/include/dwarf_i.h: In function
`dwarf_readu64':
../../../libunwind/include/dwarf_i.h:125: warning:
cast to pointer from integer 
of different size
../../../libunwind/include/dwarf_i.h: In function
`dwarf_readw':
../../../libunwind/include/dwarf_i.h:136: warning:
cast to pointer from integer 
of different size


I suspect that the configure script detects the
platform
as being x86-64 and sets things up for the 64-bit
case.
Adding -m32 to CFLAGS only results in the compiler
running
in 32-bit mode; everything else, though, is set up for
the
64-bit case.  Does that make sense?

G.



                
___________________________________________________________ 
To help you stay safe and secure online, we've developed the all new Yahoo! 
Security Centre. http://uk.security.yahoo.com

reply via email to

[Prev in Thread] Current Thread [Next in Thread]