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]

[commit] Reset tp->stop_signal before infcall ("cleanup")


Hi,

this is mostly a "code cleanup".  The infcall will use TARGET_SIGNAL_0 and not
TARGET_SIGNAL_DEFAULT.

I was thinking first it is intentional to duplicate the signal for the called
subroutine, this is not the case.  The signal is really temporarily hidden for
the time of the infcall as one can expect.

No regressions on {x86_64,x86_64-m32,i686}-fedora14-linux-gnu (with the
remaining cleanup patches, though).


Thanks,
Jan


http://sourceware.org/ml/gdb-cvs/2010-11/msg00147.html

--- src/gdb/ChangeLog	2010/11/26 00:33:56	1.12348
+++ src/gdb/ChangeLog	2010/11/26 03:39:09	1.12349
@@ -1,5 +1,11 @@
 2010-11-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
+	* infcall.c (struct inferior_thread_state) <siginfo_gdbarch>: Fix up
+	the comment.
+	(save_inferior_thread_state): Reset tp->stop_signal.
+
+2010-11-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
 	* infcall.c (call_function_by_hand): Remove variable
 	caller_state_cleanup.
 
--- src/gdb/infrun.c	2010/11/24 19:08:30	1.457
+++ src/gdb/infrun.c	2010/11/26 03:39:10	1.458
@@ -6047,7 +6047,7 @@
   CORE_ADDR stop_pc;
   struct regcache *registers;
 
-  /* Format of SIGINFO or NULL if it is not present.  */
+  /* Format of SIGINFO_DATA or NULL if it is not present.  */
   struct gdbarch *siginfo_gdbarch;
 
   /* The inferior format depends on SIGINFO_GDBARCH and it has a length of
@@ -6094,6 +6094,10 @@
     }
 
   inf_state->stop_signal = tp->stop_signal;
+  /* run_inferior_call will not use the signal due to its `proceed' call with
+     TARGET_SIGNAL_0 anyway.  */
+  tp->stop_signal = TARGET_SIGNAL_0;
+
   inf_state->stop_pc = stop_pc;
 
   inf_state->registers = regcache_dup (regcache);


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