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]

[patch+7.8?] Fix --with-babeltrace with gcc-4.9.1


On Wed, 06 Aug 2014 03:00:04 +0200, Yao Qi wrote:
> This patch fixes https://sourceware.org/bugzilla/show_bug.cgi?id=17104
> Please mention it in ChangeLog entry.  I had a patch to this PR, but
> didn't follow it up.  Yours is fine.

I think the one of yours is better, posting it here for new approval.

IMO it could go also for 7.8.1.


My original reproducer is wrong, one also has to specify -Wall in CFLAGS:
	CFLAGS=-Wall ./configure --with-babeltrace; make


Thanks,
Jan
gdb/
2014-07-01  Yao Qi  <yao@codesourcery.com>

	PR build/17104
	* configure.ac: Use local variable 'pos'.
	* configure: Regenerated.

diff --git a/gdb/configure b/gdb/configure
index a4c0a8c..7956aa7 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -15234,6 +15234,7 @@ struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
 			struct bt_ctf_event *event = NULL;
 			const struct bt_definition *scope;
 
+			bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
 			scope = bt_ctf_get_top_level_scope (event,
 			      				   BT_STREAM_EVENT_HEADER);
 		        bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
diff --git a/gdb/configure.ac b/gdb/configure.ac
index a2ac15f..fc1d8bc 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -2417,6 +2417,7 @@ else
 			struct bt_ctf_event *event = NULL;
 			const struct bt_definition *scope;
 
+			bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
 			scope = bt_ctf_get_top_level_scope (event,
 			      				   BT_STREAM_EVENT_HEADER);
 		        bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));

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