gcl-devel
[Top][All Lists]
Advanced

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

[Gcl-devel] hppa unexec and static variable initialization


From: Camm Maguire
Subject: [Gcl-devel] hppa unexec and static variable initialization
Date: Mon, 12 Apr 2010 14:39:08 -0400

Greetings!  

In some code reading

void* (*gcl_gmp_allocfun)(size_t) = alloc_relblock;

void *
alloc_relblock(size_t n) {

...

}

when compiled linked and the run under gdb, broken at main:

(sid)address@hidden:~/gcl7/unixport$ gdb raw_ansi_gcl
GNU gdb (GDB) 7.1-debian
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "hppa-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/camm/gcl7/unixport/raw_ansi_gcl...done.
(gdb) b main
Breakpoint 1 at 0x35964: file main.c, line 134.
(gdb) r
Starting program: /home/camm/gcl7/unixport/raw_ansi_gcl 

Breakpoint 1, main (argc=1, argv=0xfaf0102c, envp=0xfaf01034) at main.c:134
134             GET_FULL_PATH_SELF(kcl_self);
(gdb) p *gcl_gmp_allocfun == alloc_relblock
$1 = 0
(gdb) p gcl_gmp_allocfun == alloc_relblock
$2 = 0
(gdb) p gcl_gmp_allocfun
$3 = (void *(*)(size_t)) @0x746caa: 0x74760c
(gdb) p alloc_relblock
$4 = {void *(size_t)} 0xd538c <alloc_relblock>

Why is the static initialization failing?

Take care,
-- 
Camm Maguire                                        address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah




reply via email to

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