diff mbox

PR 64256

Message ID CAGWvnymmcQJ_QzRJy1nG1HayakpPuHA6ASNgc+akt1kgPPE_0w@mail.gmail.com
State New
Headers show

Commit Message

David Edelsohn Feb. 7, 2015, 2:32 a.m. UTC
After a lot of investigation, I believe that I have learned why stabs
debugging on AIX disabled use of continuations.  GDB, IBM DBX and IBM
XLDB are able to work with stab string continuations produced by GCC.

I am enabling it using definitions that match the behavior of IBM XL
compilers to avoid any unexpected behavior and hopefully be able to
reproduce any future errors with native tools to expedite fixes.
XCOFF32 uses an unsigned short for the stabstring length for a maximum
length of 64K, but XLC limits the size to 16K.  XLC also uses '?' as a
continuation character instead of '\\'.  GDB accepts '?' as an
alternate continuation character.

Bootstrapped on powerpc-ibm-aix7.1.0.0.

Committed.

Thanks, David

        PR debug/2714
        PR bootstrap/64256
        * xcoffout.h (DBX_CONTIN_LENGTH): Define as 16384.
        (DBX_CONTIN_CHAR): Define.

Comments

Jeff Law Feb. 7, 2015, 6:50 a.m. UTC | #1
On 02/06/15 19:32, David Edelsohn wrote:
> After a lot of investigation, I believe that I have learned why stabs
> debugging on AIX disabled use of continuations.  GDB, IBM DBX and IBM
> XLDB are able to work with stab string continuations produced by GCC.
>
> I am enabling it using definitions that match the behavior of IBM XL
> compilers to avoid any unexpected behavior and hopefully be able to
> reproduce any future errors with native tools to expedite fixes.
> XCOFF32 uses an unsigned short for the stabstring length for a maximum
> length of 64K, but XLC limits the size to 16K.  XLC also uses '?' as a
> continuation character instead of '\\'.  GDB accepts '?' as an
> alternate continuation character.
>
> Bootstrapped on powerpc-ibm-aix7.1.0.0.
>
> Committed.
>
> Thanks, David
>
>          PR debug/2714
>          PR bootstrap/64256
>          * xcoffout.h (DBX_CONTIN_LENGTH): Define as 16384.
>          (DBX_CONTIN_CHAR): Define.
Well, I thought I was going to have the oldest BZ fixed for this 
release, but you beat me by a mile.

Glad to see this resolved.

jeff
Richard Biener Feb. 7, 2015, 10:32 a.m. UTC | #2
On February 7, 2015 7:50:38 AM CET, Jeff Law <law@redhat.com> wrote:
>On 02/06/15 19:32, David Edelsohn wrote:
>> After a lot of investigation, I believe that I have learned why stabs
>> debugging on AIX disabled use of continuations.  GDB, IBM DBX and IBM
>> XLDB are able to work with stab string continuations produced by GCC.
>>
>> I am enabling it using definitions that match the behavior of IBM XL
>> compilers to avoid any unexpected behavior and hopefully be able to
>> reproduce any future errors with native tools to expedite fixes.
>> XCOFF32 uses an unsigned short for the stabstring length for a
>maximum
>> length of 64K, but XLC limits the size to 16K.  XLC also uses '?' as
>a
>> continuation character instead of '\\'.  GDB accepts '?' as an
>> alternate continuation character.
>>
>> Bootstrapped on powerpc-ibm-aix7.1.0.0.
>>
>> Committed.
>>
>> Thanks, David
>>
>>          PR debug/2714
>>          PR bootstrap/64256
>>          * xcoffout.h (DBX_CONTIN_LENGTH): Define as 16384.
>>          (DBX_CONTIN_CHAR): Define.
>Well, I thought I was going to have the oldest BZ fixed for this 
>release, but you beat me by a mile.
>
>Glad to see this resolved.

Indeed.  Please also consider back porting this to release branches.

Thanks,
Richard.

>jeff
diff mbox

Patch

Index: xcoffout.h
===================================================================
--- xcoffout.h  (revision 220500)
+++ xcoffout.h  (working copy)
@@ -161,9 +161,12 @@ 
 /* Do not emit any marker for XCOFF until assembler allows XFT_CV.  */
 #define NO_DBX_GCC_MARKER

-/* Do not break .stabs pseudos into continuations.  */
-#define DBX_CONTIN_LENGTH 0
+/* XCOFF32 maximum length is 64K; XLC limits to 16K.  */
+#define DBX_CONTIN_LENGTH 16384

+/* XLC uses '?' as continuation character.  */
+#define DBX_CONTIN_CHAR '?'
+
 /* Don't try to use the `x' type-cross-reference character in DBX data.