Bug 79479 - Show as hex does not work on members in structures
Summary: Show as hex does not work on members in structures
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: cdt-debug-inbox@eclipse.org CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-25 06:01 EST by Oyvind Harboe CLA
Modified: 2020-09-04 15:22 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Oyvind Harboe CLA 2004-11-25 06:01:58 EST
View as hex does not work for a member of type CYG_ADDRWORD.

When I cast the type to int, view as hex works.

[1,101,380,355,783] (gdb) 
[1,101,380,355,863] 5148-var-info-expression var7
[1,101,380,355,873] 5148^done,lang="C",exp="at91_chan"
[1,101,380,355,873] 5149-var-info-type var7.base
[1,101,380,355,873] (gdb) 
[1,101,380,355,873] 5149^done,type="CYG_ADDRWORD"
[1,101,380,355,873] 5150 ptype CYG_ADDRWORD
[1,101,380,355,873] (gdb) 
[1,101,380,355,873] &"ptype CYG_ADDRWORD\n"
[1,101,380,355,883] ~"type = CYG_ADDRWORD\n"
[1,101,380,355,883] 5150^done
[1,101,380,355,883] 5151 ptype (at91_chan)->base
[1,101,380,355,883] (gdb) 
[1,101,380,355,883] &"ptype (at91_chan)->base\n"
[1,101,380,355,883] ~"type = CYG_ADDRWORD\n"
[1,101,380,355,883] 5151^done
[1,101,380,355,883] (gdb) 
[1,101,380,355,883] 5152-var-info-type var7.int_num
[1,101,380,355,893] 5152^done,type="CYG_WORD"
[1,101,380,355,893] (gdb) 
[1,101,380,355,893] 5153-var-evaluate-expression var7.base
[1,101,380,355,893] 5153^done,value="4294770688"
[1,101,380,355,893] (gdb) 
[1,101,380,355,893] 5154 ptype CYG_WORD
[1,101,380,355,893] &"ptype CYG_WORD\n"
[1,101,380,355,893] ~"type = CYG_WORD\n"
[1,101,380,355,893] 5154^done
[1,101,380,355,893] 5155 ptype (at91_chan)->int_num
[1,101,380,355,893] (gdb) 
[1,101,380,355,903] &"ptype (at91_chan)->int_num\n"
[1,101,380,355,913] ~"type = CYG_WORD\n"
[1,101,380,355,913] 5155^done
[1,101,380,355,913] (gdb) 
[1,101,380,355,913] 5156-var-info-type var7.stat
[1,101,380,355,913] 5156^done,type="CYG_WORD"
[1,101,380,355,913] (gdb) 
[1,101,380,355,913] 5157-var-evaluate-expression var7.int_num
[1,101,380,355,913] 5157^done,value="2"
[1,101,380,355,913] (gdb) 
[1,101,380,355,913] 5158 ptype CYG_WORD
[1,101,380,355,923] &"ptype CYG_WORD\n"
[1,101,380,355,923] ~"type = CYG_WORD\n"
[1,101,380,355,923] 5158^done
[1,101,380,355,923] 5159 ptype (at91_chan)->stat
[1,101,380,355,923] (gdb) 
[1,101,380,355,923] &"ptype (at91_chan)->stat\n"
[1,101,380,355,923] ~"type = CYG_WORD\n"
[1,101,380,355,923] 5159^done
[1,101,380,355,923] (gdb) 
[1,101,380,355,923] 5160-var-info-type var7.transmit_size
[1,101,380,355,943] 5160^done,type="int"
[1,101,380,355,943] (gdb) 
[1,101,380,355,943] 5161-var-evaluate-expression var7.stat
[1,101,380,355,943] 5161^done,value="0"
[1,101,380,355,953] (gdb) 
[1,101,380,355,953] 5162-var-info-type var7.serial_interrupt
[1,101,380,355,953] 5162^done,type="struct cyg_interrupt"
[1,101,380,355,953] (gdb) 
[1,101,380,355,953] 5163-var-info-type var7.serial_interrupt_handle
[1,101,380,355,953] 5163^done,type="cyg_handle_t"
[1,101,380,355,953] (gdb) 
[1,101,380,355,963] 5164-var-evaluate-expression var7.serial_interrupt
[1,101,380,355,963] 5164^done,value="{...}"
[1,101,380,355,963] (gdb) 
[1,101,380,355,963] 5165 ptype cyg_handle_t
[1,101,380,355,963] &"ptype cyg_handle_t\n"
[1,101,380,355,963] ~"type = cyg_handle_t\n"
[1,101,380,355,963] 5165^done
[1,101,380,355,963] (gdb) 
[1,101,380,355,963] 5166-var-evaluate-expression var7.transmit_size
[1,101,380,355,973] 5166^done,value="1"
[1,101,380,355,973] (gdb) 
[1,101,380,355,973] 5167 ptype (at91_chan)->serial_interrupt_handle
[1,101,380,355,973] &"ptype (at91_chan)->serial_interrupt_handle\n"
[1,101,380,355,983] ~"type = cyg_handle_t\n"
[1,101,380,355,983] 5167^done
[1,101,380,355,983] (gdb) 
[1,101,380,355,983] 5168-var-info-type var7.rcv_buffer
[1,101,380,355,983] 5168^done,type="cyg_uint8 [8][32]"
[1,101,380,355,993] 5169-var-evaluate-expression var7.serial_interrupt_handle
[1,101,380,355,983] (gdb) 
[1,101,380,355,993] 5169^done,value="16900"
[1,101,380,355,993] (gdb) 
[1,101,380,355,993] 5170 ptype cyg_uint8 [8][32]
[1,101,380,355,993] &"ptype cyg_uint8 [8][32]\n"
[1,101,380,355,993] ~"type = cyg_uint8 [8][32]\n"
[1,101,380,355,993] 5170^done
[1,101,380,355,993] 5171 ptype (at91_chan)->rcv_buffer
[1,101,380,355,993] (gdb) 
[1,101,380,356,003] &"ptype (at91_chan)->rcv_buffer\n"
[1,101,380,356,003] ~"type = cyg_uint8 [8][32]\n"
[1,101,380,356,003] 5171^done
[1,101,380,356,003] (gdb) 
[1,101,380,356,013] 5172-var-info-type var7.rcv_chunk_size
[1,101,380,356,023] 5172^done,type="cyg_uint16"
[1,101,380,356,023] (gdb) 
[1,101,380,356,023] 5173-var-evaluate-expression var7.rcv_buffer
[1,101,380,356,023] 5173^done,value="[8]"
[1,101,380,356,023] (gdb) 
[1,101,380,356,023] 5174 ptype cyg_uint16
[1,101,380,356,023] &"ptype cyg_uint16\n"
[1,101,380,356,023] ~"type = cyg_uint16\n"
[1,101,380,356,023] 5174^done
[1,101,380,356,023] (gdb) 
[1,101,380,356,034] 5175 ptype (at91_chan)->rcv_chunk_size
[1,101,380,356,034] &"ptype (at91_chan)->rcv_chunk_size\n"
[1,101,380,356,044] ~"type = cyg_uint16\n"
[1,101,380,356,044] 5175^done
[1,101,380,356,044] (gdb) 
[1,101,380,356,054] 5176-var-info-type var7.curbufwrite
[1,101,380,356,054] 5176^done,type="cyg_int32"
[1,101,380,356,054] (gdb) 
[1,101,380,356,054] 5177-var-evaluate-expression var7.rcv_chunk_size
[1,101,380,356,054] 5177^done,value="16"
[1,101,380,356,054] (gdb) 
[1,101,380,356,054] 5178 ptype cyg_int32
[1,101,380,356,064] &"ptype cyg_int32\n"
[1,101,380,356,064] ~"type = cyg_int32\n"
[1,101,380,356,064] 5178^done
[1,101,380,356,064] 5179 ptype (at91_chan)->curbufwrite
[1,101,380,356,064] (gdb) 
[1,101,380,356,074] &"ptype (at91_chan)->curbufwrite\n"
[1,101,380,356,074] ~"type = cyg_int32\n"
[1,101,380,356,074] 5179^done
[1,101,380,356,084] (gdb) 
[1,101,380,356,084] 5180-var-info-type var7.curbufread
[1,101,380,356,084] 5180^done,type="cyg_int32"
[1,101,380,356,084] (gdb) 
[1,101,380,356,084] 5181-var-evaluate-expression var7.curbufwrite
[1,101,380,356,084] 5181^done,value="0"
[1,101,380,356,084] (gdb) 
[1,101,380,356,084] 5182 ptype cyg_int32
[1,101,380,356,094] &"ptype cyg_int32\n"
[1,101,380,356,094] ~"type = cyg_int32\n"
[1,101,380,356,094] 5182^done
[1,101,380,356,094] 5183 ptype (at91_chan)->curbufread
[1,101,380,356,094] (gdb) 
[1,101,380,356,094] &"ptype (at91_chan)->curbufread\n"
[1,101,380,356,104] ~"type = cyg_int32\n"
[1,101,380,356,104] 5183^done
[1,101,380,356,104] (gdb) 
[1,101,380,356,104] 5184-var-info-type var7.flags
[1,101,380,356,104] 5184^done,type="cyg_uint8"
[1,101,380,356,104] (gdb) 
[1,101,380,356,104] 5185-var-evaluate-expression var7.curbufread
[1,101,380,356,114] 5185^done,value="0"
[1,101,380,356,114] (gdb) 
[1,101,380,356,114] 5186 ptype cyg_uint8
[1,101,380,356,114] &"ptype cyg_uint8\n"
[1,101,380,356,114] ~"type = cyg_uint8\n"
[1,101,380,356,114] 5186^done
[1,101,380,356,114] 5187 ptype (at91_chan)->flags
[1,101,380,356,114] (gdb) 
[1,101,380,356,124] &"ptype (at91_chan)->flags\n"
[1,101,380,356,124] ~"type = cyg_uint8\n"
[1,101,380,356,124] 5187^done
[1,101,380,356,134] (gdb) 
[1,101,380,356,144] 5188-var-info-type var7.end
[1,101,380,356,144] 5188^done,type="cyg_uint8 *[8]"
[1,101,380,356,144] (gdb) 
[1,101,380,356,144] 5189-var-evaluate-expression var7.flags
[1,101,380,356,144] 5189^done,value="0 '\\0'"
[1,101,380,356,144] (gdb) 
[1,101,380,356,144] 5190 ptype cyg_uint8 *[8]
[1,101,380,356,144] &"ptype cyg_uint8 *[8]\n"
[1,101,380,356,154] ~"type = cyg_uint8 *[8]\n"
[1,101,380,356,154] 5190^done
[1,101,380,356,154] 5191 ptype (at91_chan)->end
[1,101,380,356,154] (gdb) 
[1,101,380,356,154] &"ptype (at91_chan)->end\n"
[1,101,380,356,154] ~"type = cyg_uint8 *[8]\n"
[1,101,380,356,154] 5191^done
[1,101,380,356,154] (gdb) 
[1,101,380,356,194] 5192-var-evaluate-expression var7.end
[1,101,380,356,364] 5192^done,value="[8]"
[1,101,380,356,374] (gdb) 
[1,101,380,357,305] 5193-data-evaluate-expression (at91_chan)->base
[1,101,380,357,305] 5193^done,value="4294770688"
[1,101,380,357,315] (gdb) 
[1,101,380,361,041] 5194-var-evaluate-expression var7.base
[1,101,380,361,041] 5194^done,value="4294770688"
[1,101,380,361,041] (gdb) 
[1,101,380,373,298] 5195 ptype int
[1,101,380,373,298] &"ptype int\n"
[1,101,380,373,298] ~"type = int\n"
[1,101,380,373,298] 5195^done
[1,101,380,373,308] 5196-var-create - * (int)(at91_chan)->base
[1,101,380,373,308] (gdb) 
[1,101,380,373,318] 5196^done,name="var11",numchild="0",type="int"
[1,101,380,373,318] 5197-var-info-type var11
[1,101,380,373,318] (gdb) 
[1,101,380,373,328] 5197^done,type="int"
[1,101,380,373,328] (gdb) 
[1,101,380,373,328] 5198 whatis (int)(at91_chan)->base
[1,101,380,373,338] &"whatis (int)(at91_chan)->base\n"
[1,101,380,373,338] ~"type = int\n"
[1,101,380,373,338] 5198^done
[1,101,380,373,338] 5199-data-evaluate-expression (int)(at91_chan)->base
[1,101,380,373,338] (gdb) 
[1,101,380,373,348] 5199^done,value="-196608"
[1,101,380,373,348] (gdb) 
[1,101,380,373,348] 5200-var-evaluate-expression var11
[1,101,380,373,368] 5200^done,value="-196608"
[1,101,380,373,368] (gdb)
Comment 1 Oyvind Harboe CLA 2004-11-25 06:03:55 EST
Hmmmm....

possible workaround for unknown types is to default to integer based upon size...

print sizeof(at91_chan->base)
$1 = 4
Comment 2 Oyvind Harboe CLA 2004-11-25 06:51:12 EST
ARM has floating point registers with following type:

print sizeof($f7)
$1 = 12


....


ptype $f0
type = builtin_type_arm_ext_littlebyte_bigword
whatis $r11
type = int32_t
ptype builtin_type_arm_ext_littlebyte_bigword
No symbol "builtin_type_arm_ext_littlebyte_bigword" in current context.
whatis $r10
type = int32_t
ptype $f1
type = builtin_type_arm_ext_littlebyte_bigword
ptype builtin_type_arm_ext_littlebyte_bigword
No symbol "builtin_type_arm_ext_littlebyte_bigword" in current context.
ptype $f2
type = builtin_type_arm_ext_littlebyte_bigword
whatis $f2
type = builtin_type_arm_ext_littlebyte_bigword
ptype builtin_type_arm_ext_littlebyte_bigword
No symbol "builtin_type_arm_ext_littlebyte_bigword" in current context.
type = builtin_type_arm_ext_littlebyte_bigword
ptype builtin_type_arm_ext_littlebyte_bigword
No symbol "builtin_type_arm_ext_littlebyte_bigword" in current context.
ptype $f2
ptype $f3
type = builtin_type_arm_ext_littlebyte_bigword
whatis $f1
type = builtin_type_arm_ext_littlebyte_bigword
Comment 3 Nobody - feel free to take it CLA 2005-07-21 14:00:12 EDT
Deferred.
Comment 4 Nobody - feel free to take it CLA 2005-09-09 15:23:19 EDT
Reassigning to the pool.
Comment 5 Doug Schaefer CLA 2007-08-21 11:05:08 EDT
Future means you commit to fix it in the Future. Inboxes can't make committments. Moving to '--'.