This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
Re: gdb/1170: gdb-5.3 just doesn't work on aix5.1
- From: "Michael Veksler" <VEKSLER at il dot ibm dot com>
- To: nobody at sources dot redhat dot com
- Cc: gdb-prs at sources dot redhat dot com,
- Date: 2 Sep 2003 11:48:01 -0000
- Subject: Re: gdb/1170: gdb-5.3 just doesn't work on aix5.1
- Reply-to: "Michael Veksler" <VEKSLER at il dot ibm dot com>
The following reply was made to PR gdb/1170; it has been noted by GNATS.
From: "Michael Veksler" <VEKSLER@il.ibm.com>
To: gdb-gnats@sources.redhat.com
Cc:
Subject: Re: gdb/1170: gdb-5.3 just doesn't work on aix5.1
Date: Tue, 2 Sep 2003 14:47:25 +0300
Here is a reliable way to reproduce the problem with gcc-3.2.1:
// compile with g++ -g -fno-inline -fno-default-inline bug.cpp
#include <string>
#include <iostream>
int main() { }
Prohibiting inlines makes the appearance of this bug more predictable (it
would probably happen with other gcc versions).
After even more analysis, I discovered that AIX's assembler reorders debug
information. So, despite gcc correctness, the object files get incorrect
debug
format.
To fix the problem, I'll have to:
1. Figure out if newest AIX's /bin/as have the problem, and report the
bug.
Also make sure that /bin/as is not allowed to reorder the symbols.
2. Submit a work-around to gcc.
It will take me some time to follow the above 2 items. For now, here is a
short description of the work around:
- in gcc/dbxout.c, near line 1130 in function dbxout_type(....)
instead of unconditional return in TYPE_DEFINED case,
- break when the type is a typedef, and return otherwise.
- The condition you need to place there is the same condition that
precedes calls to build_type_variant(....).