Symbol can't be found unless type 'tab'

Yao Qi yao@codesourcery.com
Wed Sep 12 13:37:00 GMT 2012


On 09/12/2012 08:32 PM, Jan Kratochvil wrote:
> On Wed, 12 Sep 2012 13:33:34 +0200, Yao Qi wrote:
>> On 09/12/2012 04:06 PM, Jan Kratochvil wrote:
>>> Why didn't use just normal DWARF block, instead of the location list?
>>> This part does not matter for your testcase and it will work with GDB.
>>
>> No special reason really.  Are you suggesting create dwarf like this?
>>
>>   <1><33>: Abbrev Number: 3 (DW_TAG_variable)
>>      <34>   DW_AT_name        : i
>>      <36>   DW_AT_type        : <0x2a>
>>      <3a>   DW_AT_external    : 1
>>      <3b>   DW_AT_location    : 6 byte block: 52 93 4 53 93 4
>> (DW_OP_reg2 (edx); DW_OP_piece: 4; DW_OP_reg3 (ebx); DW_OP_piece: 4)
>
> Oops, you are right, this also cannot work.
>

I am not sure what do you mean by "this also cannot work", but it works 
for me, at least for my test purpose.

(gdb) b middle_middle
Breakpoint 1 at 0x80483ca
(gdb) run
Starting program: 
/home/yao/Source/gnu/gdb/build-git/x86/gdb/testsuite/gdb.mi/mi-reg-changed

Breakpoint 1, 0x080483ca in middle_middle ()
(gdb) p/x i
$2 = 0x45396ff4bfffefe4
(gdb) p/x $ebx
$3 = 0x45396ff4
(gdb) p/x $edx
$4 = 0xbfffefe4

-- 
Yao



More information about the Gdb mailing list