public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/52857] New: [x32] DW_OP_GNU_regval_type doesn't handle ARG_POINTER_REGNUM properly with -maddress-mode=long
@ 2012-04-03 23:15 hjl.tools at gmail dot com
  2012-04-03 23:29 ` [Bug debug/52857] " hjl.tools at gmail dot com
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: hjl.tools at gmail dot com @ 2012-04-03 23:15 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52857

             Bug #: 52857
           Summary: [x32] DW_OP_GNU_regval_type doesn't handle
                    ARG_POINTER_REGNUM properly with -maddress-mode=long
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: hjl.tools@gmail.com
                CC: ubizjak@gmail.com


Created attachment 27081
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27081
A testcase

On Linux/x86-64, for the testcase, I got

# /xgcc -B./  -O -g /tmp/x.i -c -mx32 -maddress-mode=long
# readelf -w x.o
...
   <37a3>   DW_AT_GNU_call_site_value: 21 byte block: f5 ff ff ff ff f 25 f4 25
8 80 ff ff ff ff ff ff ff 22 f7 2c     (DW_OP_GNU_regval_type: 4294967295 (r-1)
<0x25>; DW_OP_GNU_const_type: <0x25>  8 byte block: 80 ff ff ff ff ff ff ff ;
DW_OP_plus; DW_OP_GNU_convert <0x2c>)

The problem is

         mem_loc_result = new_loc_descr (DW_OP_GNU_regval_type,
                                          dbx_reg_number (rtl), 0);

with

(gdb) call debug_rtx (rtl)
(reg/f:DI 16 argp)
(gdb) f 3
#3  0x0000000000709ec0 in mem_loc_descriptor (rtl=0x7ffff0e12978, mode=SImode, 
    mem_mode=VOIDmode, initialized=VAR_INIT_STATUS_INITIALIZED)
    at /export/gnu/import/git/gcc-addr32/gcc/dwarf2out.c:11631
11631          mem_loc_result = mem_loc_descriptor (SUBREG_REG (rtl),
(gdb) call debug_rtx (rtl)
(subreg:SI (plus:DI (reg/f:DI 16 argp)
        (const_int -128 [0xffffffffffffff80])) 0)
(gdb)


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2012-12-07 22:11 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-03 23:15 [Bug debug/52857] New: [x32] DW_OP_GNU_regval_type doesn't handle ARG_POINTER_REGNUM properly with -maddress-mode=long hjl.tools at gmail dot com
2012-04-03 23:29 ` [Bug debug/52857] " hjl.tools at gmail dot com
2012-04-06  0:51 ` [Bug debug/52857] DW_OP_GNU_regval_type is generated with INVALID_REGNUM hjl.tools at gmail dot com
2012-04-06 13:06 ` hjl.tools at gmail dot com
2012-04-06 14:52 ` hjl.tools at gmail dot com
2012-04-06 17:42 ` hjl.tools at gmail dot com
2012-04-25 19:09 ` hjl at gcc dot gnu.org
2012-06-24 14:24 ` hjl.tools at gmail dot com
2012-08-24 13:22 ` hjl at gcc dot gnu.org
2012-12-07 22:11 ` hjl.tools at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).