From: Joel Brobecker <brobecker@adacore.com>
To: Kai Tietz <Kai.Tietz@onevision.com>
Cc: gdb-patches@sourceware.org
Subject: Re: Fix build-failure of gdb in python.c
Date: Mon, 18 Jan 2010 10:55:00 -0000 [thread overview]
Message-ID: <20100118105435.GK17397@adacore.com> (raw)
In-Reply-To: <OF5F5EDF6E.95905E34-ONC12576AF.00393D07-C12576AF.0039A79F@onevision.de>
[-- Attachment #1: Type: text/plain, Size: 1269 bytes --]
> in file python/python.c is the method throw_error with constant
> UNSUPPORTED_ERROR used, but the header exceptions.h isn't included, so I
> get a build failure. I am not sure if this happens for other targets, too.
> The attached patch fixes this by adding the necessary include.
Outch, sorry. My mistake. I had seen that exceptions.h might be needed
if !HAVE_PYTHON, but was lazy and only did a visual check. I should
have attempted a build --without-python.
> 2010-01-18 Kai Tietz <kai.tietz@onevision.com>
>
> * python/python.c: Add include of exception.h header.
Unfortunately, this is not the right fix. 2 things:
- The needed include was conditionalized on HAVE_PYTHON, so the
right fix was simply to move the #include out of the conditionalized
section;
- the right include is "exceptions.h", not "../exceptions.h".
Sources in python/ are compiled from the gdb/ subdirectory.
I have applied the following patch to fix the problem.
2010-01-18 Joel Brobecker <brobecker@adacore.com>
Fix build failure when building without Python support.
* python/python.c: Always include exceptions.h, even when HAVE_PYTHON
is not defined.
Tested by rebuilding GDB --with-python and --without-python.
--
Joel
[-- Attachment #2: python.diff --]
[-- Type: text/x-diff, Size: 637 bytes --]
Index: python/python.c
===================================================================
RCS file: /cvs/src/src/gdb/python/python.c,v
retrieving revision 1.24
diff -u -p -r1.24 python.c
--- python/python.c 18 Jan 2010 06:25:22 -0000 1.24
+++ python/python.c 18 Jan 2010 10:50:11 -0000
@@ -27,6 +27,7 @@
#include "observer.h"
#include "value.h"
#include "language.h"
+#include "exceptions.h"
#include <ctype.h>
@@ -45,7 +46,6 @@ static int gdbpy_auto_load = 1;
#include "cli/cli-decode.h"
#include "charset.h"
#include "top.h"
-#include "exceptions.h"
#include "python-internal.h"
#include "version.h"
#include "target.h"
next prev parent reply other threads:[~2010-01-18 10:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-18 10:30 Kai Tietz
2010-01-18 10:55 ` Joel Brobecker [this message]
2010-01-18 11:02 ` Kai Tietz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100118105435.GK17397@adacore.com \
--to=brobecker@adacore.com \
--cc=Kai.Tietz@onevision.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox