Print a CYG_ADDRESS type value in GDB

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
gapry
Posts: 10
Joined: Sat Aug 25, 2012 7:42 pm

Print a CYG_ADDRESS type value in GDB

Post by gapry »

Hi,

I use gdb to trace the booting process of eCos. Now, I want to print a value call base, which is CYG_ADDRESS data type, in /opt/ecos/ecos/packages/hal/cortexm/arch/current/src/hal_misc.c, line 278. Although I add the -00 flag. GDB is stilll show the message $1 = <optimized out> to me.
Could anybody tell me what the correct way is?

Thanks.
Nable
Member
Member
Posts: 453
Joined: Tue Nov 08, 2011 11:35 am

Re: Print a CYG_ADDRESS type value in GDB

Post by Nable »

-O<level> just disables/enables some optimizations and doesn't add interesting debug information.
To get such additional information, you should learn about flags such as -g[level], -ggdb[level].
You can find more details in gcc's man page.
Post Reply