Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 161562 - gdb failing to recognize types at first
Summary: gdb failing to recognize types at first
Alias: None
Product: Fedora
Classification: Fedora
Component: gdb
Version: 4
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Jan Kratochvil
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2005-06-24 13:56 UTC by Joe Orton
Modified: 2008-02-17 04:10 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2008-02-17 04:10:53 UTC

Attachments (Terms of Use)

Description Joe Orton 2005-06-24 13:56:34 UTC
I keep seeing this when trying to debug PHP: there is a global structure,
ps_globals; when printing it the first time, gdb claims ignorance about its
type.  After printing it casted to the correct type, gdb will subsequently
recognize the type as expected.  Using debuginfo packages.

(gdb) print ps_globals
$2 = 160245824
(gdb) print (zend_ps_globals *)ps_globals
$3 = (php_ps_globals *) 0x98d2840
(gdb) print (zend_ps_globals *)ps_globals
$4 = (php_ps_globals *) 0x98d2840
(gdb) print ps_globals
$5 = {save_path = 0x98d2840 "/var/lib/php/session", session_name = 0x9929ac0
... rest of structure, as expected.

Comment 1 Joe Orton 2005-06-24 14:49:00 UTC
This is reproducible with the core dump from in bug 160480

an up to date FC4 install:


[root@trash ~]# gdb /usr/sbin/httpd core.4350
Loaded symbols for /usr/lib/php/modules/
#0  0x020f4efd in zend_hash_del_key_or_index (ht=0x8ff19bc, arKey=Variable
"arKey" is not available.

) at /usr/src/debug/php-5.0.4/Zend/zend_hash.c:462
462             p = ht->arBuckets[nIndex];
(gdb) ptype ps_globals
type = <data variable, no debug info>
(gdb) print ps_globals
$1 = 145746432
(gdb) print (char *)ps_globals
$2 = 0x8afea00 "/var/lib/php/session"
(gdb) ptype ps_globals
type = <data variable, no debug info>
(gdb) print ps_globals
$3 = 145746432
(gdb) print (zend_ps_globals *)ps_globals
$4 = (php_ps_globals *) 0x8afea00
(gdb) ptype ps_globals
type = struct _php_ps_globals {
    char *save_path;
    char *session_name;

and from then on, it's OK.

Comment 2 Christian Iseli 2007-01-20 00:34:24 UTC
This report targets the FC3 or FC4 products, which have now been EOL'd.

Could you please check that it still applies to a current Fedora release, and
either update the target product or close it ?


Comment 3 petrosyan 2008-02-17 04:10:53 UTC
Fedora Core 4 is no longer maintained.

Setting status to "INSUFFICIENT_DATA". If you can reproduce this bug in the
current Fedora release, please reopen this bug and assign it to the
corresponding Fedora version.

Note You need to log in before you can comment on or make changes to this bug.