This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GDB AIX build broken


On Mon, Oct 24, 2016 at 6:46 PM, Pedro Alves <palves@redhat.com> wrote:
> [fixed Tom's address]
>
> On 10/24/2016 11:40 PM, David Edelsohn wrote:
>> GDB build on AIX is broken due to a recent commit.
>>
>
> Which commit?  Maybe the gnulib update?  Is this a clean
> build from scratch?

I have no idea which commit.  It probably was a bad idea to completely
disrupt the GDB Buildbots while disruptively converting GDB to C++.

>
>> /home/dje/src/binutils-gdb/gdb/common/buffer.c
>> /home/dje/src/binutils-gdb/gdb/common/buffer.c: In function 'void
>> buffer_xml_printf(buffer*, const char*, ...)':
>> /home/dje/src/binutils-gdb/gdb/common/buffer.c:133:27: error: expected
>> ')' before 'PRId64'
>>          sprintf (str, "%" PRId64,
>>                            ^~~~~~
>
>> Errors with PRIxxx macros normally mean a problem with header file
>> inclusion.  for example, gdb/btrace.c, which also uses PRIxxx macros,
>> builds without error.
>
> Sounds like what you'd get if PRId64 is not defined in that
> compilation unit, somehow.

First, strangely, gdb/common/buffer.c uses

#include "inttypes.h"

with quotes, not brackets.  I can't find a local definition of that header file.

It seems to be much happier with <inttypes.h> included first

diff --git a/gdb/common/buffer.c b/gdb/common/buffer.c
index e9eee09..a989024 100644
--- a/gdb/common/buffer.c
+++ b/gdb/common/buffer.c
@@ -17,10 +17,10 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */

+#include <inttypes.h>
 #include "common-defs.h"
 #include "xml-utils.h"
 #include "buffer.h"
-#include "inttypes.h"

Thanks, David


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]