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: [PATCH] Add test for following fork on position-independent executables


On 2018-04-11 14:24, Pedro Alves wrote:
On 04/11/2018 04:28 PM, Simon Marchi wrote:

+static void
+break_here ()

This is C, so "(void)" is better here.

Fixed.

+{
+   int i;
+   for (i = 0; i < 30; i++)
+     sleep (1);
+}
+
+int
+main ()
+{
+  fork ();
+  break_here();

Missing space before parens.

Fixed.

+if [use_gdb_stub] {
+    return
+}
+
I guess this is why you were asking about following forks and
"target remote".  AFAICT, this should just work in that case
too.  Did you find out it doesn't?

No it works actually, and I was suprised :).  I'll remove that "if".

Otherwise looks fine.  Thanks for adding this.

Thanks, I'll push with those things fixed.

Simon


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