This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [rtlopt] Location list data
- From: Geoff Keating <geoffk at geoffk dot org>
- To: Daniel Jacobowitz <drow at mvista dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: 09 Mar 2003 21:03:43 -0800
- Subject: Re: [rtlopt] Location list data
- References: <20030310042047.GA27067@nevyn.them.org>
Daniel Jacobowitz <drow at mvista dot com> writes:
> We've got a global variable 'j'. On i386 with -O2, it gets loaded into a
> register. The location list looks like this:
>
> 00000013 00000021 00000027 (DW_OP_addr: 80493b8; )
> 00000013 00000027 0000002a (DW_OP_reg2; )
> 00000013 0000002a 00000032 (DW_OP_addr: 80493b8; )
This is not quite right. There are two uses for this data:
1. 'print j'. In that case, you could just claim that it's always in
the global address, and that would work fine.
2. 'j = 3'. For that, you have to explain that the variable is in
*both* places, because both will need to be updated. You certainly
wouldn't want to be just changing the register, since that'll go away.
I think you really want to say is (and have no idea if this is legal
DWARF2, or for that matter if GCC can do this):
00000013 00000000 ffffffff (DW_OP_addr: 80493b8; )
00000013 00000027 0000002a (DW_OP_reg2; )
00000013 00000032 0000003a (DW_OP_reg2; )
--
- Geoffrey Keating <geoffk at geoffk dot org>