public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/47292] New: Violation of DWARF-3 spec for DW_FORM_strp
@ 2011-01-14 15:04 pett at ca dot ibm.com
  2011-01-14 15:42 ` [Bug debug/47292] " rguenth at gcc dot gnu.org
  2024-04-14 22:44 ` pinskia at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: pett at ca dot ibm.com @ 2011-01-14 15:04 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: Violation of DWARF-3 spec for DW_FORM_strp
           Product: gcc
           Version: 4.4.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: pett@ca.ibm.com


This version of the compiler marks its debug information as dwarf-3.  This
causes problems with a dwarf-3 compliant debugger when debugging 64 bit code.

In section "7.4 32-Bit and 64-Bit DWARF Formats", the dwarf-3 spec says with
regard to DW_FORM_strp:
"Within the body of the .debug_info section, certain forms of attribute value
depend on the choice of DWARF format as follows. For the 32-bit DWARF format,
the value is a 32-bit unsigned integer; for the 64-bit DWARF format, the value
is a 64-bit unsigned integer."

This version of the compiler is generating 32 bit integers for both 32 and 64
bit formats.  This causes a compliant debugger to generate an incorrect pointer
into the debug information.

gcc -v reports:
Using built-in specs.
Target: ppc64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla
--enable-bootstrap --enable-shared --enable-threads=posix
--enable-checking=release --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-gnu-unique-object
--enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk
--disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre
--enable-libgcj-multifile --enable-java-maintainer-mode
--with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib
--with-ppl --with-cloog --enable-secureplt --with-long-double-128
--with-cpu-32=power4 --with-tune-32=power6 --with-cpu-64=power4
--with-tune-64=power6 --build=ppc64-redhat-linux
Thread model: posix
gcc version 4.4.4 20100726 (Red Hat 4.4.4-13) (GCC)


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

* [Bug debug/47292] Violation of DWARF-3 spec for DW_FORM_strp
  2011-01-14 15:04 [Bug debug/47292] New: Violation of DWARF-3 spec for DW_FORM_strp pett at ca dot ibm.com
@ 2011-01-14 15:42 ` rguenth at gcc dot gnu.org
  2024-04-14 22:44 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-01-14 15:42 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-01-14 15:19:29 UTC ---
I think RedHat 4.4.4 is nowhere close to FSF GCC 4.4.x what debug info
is concerned.  Thus I would suggest to report this bug to RedHat
and/or try to reproduce the issue with a stock FSF GCC.


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

* [Bug debug/47292] Violation of DWARF-3 spec for DW_FORM_strp
  2011-01-14 15:04 [Bug debug/47292] New: Violation of DWARF-3 spec for DW_FORM_strp pett at ca dot ibm.com
  2011-01-14 15:42 ` [Bug debug/47292] " rguenth at gcc dot gnu.org
@ 2024-04-14 22:44 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-04-14 22:44 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47292

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
        case dw_val_class_str:
          form = AT_string_form (a);
          if (form == DW_FORM_strp || form == DW_FORM_line_strp)
            size += dwarf_offset_size;


          if (a->dw_attr_val.v.val_str->form == DW_FORM_strp)
            dw2_asm_output_offset (dwarf_offset_size,
                                   a->dw_attr_val.v.val_str->label,
                                   debug_str_section,
                                   "%s: \"%s\"", name, AT_string (a));


      if (node->form == DW_FORM_strp)
        dw2_asm_output_offset (dwarf_offset_size, node->label,
                               debug_str_section, "The macro: \"%s\"",
                               ref->info);


>This version of the compiler marks its debug information as dwarf-3
>This version of the compiler is generating 32 bit integers for both 32 and 64 bit formats. 

Actually it outputs dwarf3 32bit by default. So this is a misunderstanding
here.

Even if gcc is outting for 64bit, GCC defaults to outputting 32bit dwarf[2-5]. 

GCC 11 (r11-5742-g65312dfc647444) adds an option to change to outputting 64bit
dwarf[2-5] though. (note only powerpc-aix defaults to 64bit dwarf output; all
other targets use 32bit dwarf).

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

end of thread, other threads:[~2024-04-14 22:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-14 15:04 [Bug debug/47292] New: Violation of DWARF-3 spec for DW_FORM_strp pett at ca dot ibm.com
2011-01-14 15:42 ` [Bug debug/47292] " rguenth at gcc dot gnu.org
2024-04-14 22:44 ` pinskia at gcc dot gnu.org

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).