FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Development

 
 
LinkBack Thread Tools
 
Old 02-01-2010, 05:18 AM
Chuck Anderson
 
Default even with gcc -g -O0

I'm trying to debug an issue for the upstream author of ocp and am
running into an issue where gdb is showing "<value optimized out>" for
variables even though I've compiled the program with gcc -g -O0. Are
there any gcc/gdb gurus who can help?

Compiler excerpts:

gcc -g -O0 -fPIC -Wall -I.././ -I.././gnulib kickload.c -o kickload.o -c
gcc -g -O0 -fPIC -Wall -I.././ -I.././gnulib compdate.c -o compdate.o -c
...
gcc -g -O0 -fPIC -Wall -I./ -I./gnulib -o ocp boot/kickload.o -pthread -ldl goodies/helpc/ocphhc doc/opencp.dox ocp.hlp

gdb output:

Program received signal SIGSEGV, Segmentation fault.
playmonoi16 (dst=0x76ddc0, len=<value optimized out>,
ch=<value optimized out>) at mixasm.c:1746
1746 *(dst++)+=voltabs[0]
(gdb) p dst
$1 = (int32_t *) 0x76ddc0
(gdb) p len
$2 = <value optimized out>
(gdb) p ch
$3 = <value optimized out>
(gdb) p *ch
Cannot access memory at address 0x0
(gdb) up
#1 0x00007ffff5948257 in mixPlayChannel (dst=<value optimized out>,
len=<value optimized out>, ch=0x779df0, stereo=<value optimized
out>)
at mixasm.c:2022
2022 playrout(dst, mylen, ch);
(gdb) p stereo
$4 = <value optimized out>


Thanks!
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 

Thread Tools




All times are GMT. The time now is 10:56 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org