Bug 161562 - gdb failing to recognize types at first
gdb failing to recognize types at first
Status: CLOSED INSUFFICIENT_DATA
Product: Fedora
Classification: Fedora
Component: gdb (Show other bugs)
4
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jan Kratochvil
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-06-24 09:56 EDT by Joe Orton
Modified: 2008-02-16 23:10 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-02-16 23:10:53 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Joe Orton 2005-06-24 09:56:34 EDT
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
"PHPSESSID",
... rest of structure, as expected.
Comment 1 Joe Orton 2005-06-24 10:49:00 EDT
This is reproducible with the core dump from
https://bugzilla.redhat.com/bugzilla/attachment.cgi?id=115920 in bug 160480
(gzipped)

an up to date FC4 install:

gdb-6.3.0.0-1.21
php-5.0.4-10
php-debuginfo-5.0.4-10

[root@trash ~]# gdb /usr/sbin/httpd core.4350
...
Loaded symbols for /usr/lib/php/modules/mysqli.so
#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;
...
etc

and from then on, it's OK.

Comment 2 Christian Iseli 2007-01-19 19:34:24 EST
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 ?

Thanks.
Comment 3 petrosyan 2008-02-16 23:10:53 EST
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.