This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
HPUX function address.
- From: Daniel Grunblatt <daniel at grunblatt dot com dot ar>
- To: gcc at gcc dot gnu dot org
- Date: Tue, 14 Oct 2003 18:05:05 -0300
- Subject: HPUX function address.
- Organization: ORB
Hi,
I've found the following problem:
spe170> cc -v
Reading specs from /usr/lib/gcc-lib/hppa-linux/3.0.4/specs
Configured with: ../src/configure -v --enable-languages=c,c++,f77,proto,objc
--prefix=/usr --infodir=/share/info --mandir=/share/man --enable-shared
--with-gnu-as --with-gnu-ld --with-system-zlib --enable-long-long
--enable-nls --without-included-gettext --disable-checking
--enable-threads=posix --with-cpp-install-dir=bin hppa-linux
Thread model: posix
gcc version 3.0.4
spe170> cc -g -o func func.c
spe170> gdb func
GNU gdb 2002-04-01-cvs
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "hppa-linux"...
(gdb) l
3 int
4 func()
5 {
6 return;
7 }
8
9 int
10 main()
11 {
12 printf("0x%x\n", (long)func);
(gdb)
13 }
(gdb) b 12
Breakpoint 1 at 0x10524: file func.c, line 12.
(gdb) r
Starting program: /house/grunblat/hp-ux/c/func
Breakpoint 1, main () at func.c:12
12 printf("0x%x\n", (long)func);
(gdb) p func
$1 = {int ()} 0x104fc <func>
(gdb) n
0x207ee
Program exited with code 010.
(gdb)
I think it should print 0x104fc, right?
Is there a compiler switch I'm missing?
Should I just try another compiler version?
Thanks in advance.
Daniel Grunblatt.