This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
target.h (target_find_new_threads): Fix definition
- From: "Maciej W. Rozycki" <macro at mips dot com>
- To: gdb-patches at sourceware dot org
- Cc: "Maciej W. Rozycki" <macro at linux-mips dot org>
- Date: Tue, 4 Dec 2007 13:54:52 +0000 (GMT)
- Subject: target.h (target_find_new_threads): Fix definition
Hello,
The definition of the target_find_new_threads() macro contains a trailing
semicolon which may lead to effects surprising to the reader if used as a
part of a control-flow statement and possibly elsewhere. This is not
currently the case, but it may be so in the future and it is not an excuse
either way.
Tested using the mipsisa32-sde-elf target, with the mips-sim-sde32/-EB
and mips-sim-sde32/-EL boards with no regressions.
2007-12-04 Maciej W. Rozycki <macro@mips.com>
* target.h (target_find_new_threads): Fix definition.
OK to apply?
Maciej
13327-0.diff
Index: binutils-quilt/src/gdb/target.h
===================================================================
--- binutils-quilt.orig/src/gdb/target.h 2007-12-03 14:20:57.000000000 +0000
+++ binutils-quilt/src/gdb/target.h 2007-12-03 14:28:21.000000000 +0000
@@ -886,7 +886,7 @@
/* Query for new threads and add them to the thread list. */
#define target_find_new_threads() \
- (*current_target.to_find_new_threads) (); \
+ (*current_target.to_find_new_threads) ()
/* Make target stop in a continuable fashion. (For instance, under
Unix, this should act like SIGSTOP). This function is normally