[nemiver] Don't loose track when following a child process
- From: Dodji Seketeli <dodji src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nemiver] Don't loose track when following a child process
- Date: Sat, 17 Jul 2010 21:34:48 +0000 (UTC)
commit e6a06a1fdd3119ad77283230e454b9ed701e0c6b
Author: Dodji Seketeli <dodji redhat com>
Date: Sat Jul 17 16:55:21 2010 +0200
Don't loose track when following a child process
* src/dbgengine/nmv-gdb-engine.cc (GDBEngine::load_program): Do
not stop on SIGHUP not pass it to target. This is useful to avoid
loosing track when following the child process during a fork/exec
combination.
src/dbgengine/nmv-gdb-engine.cc | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/dbgengine/nmv-gdb-engine.cc b/src/dbgengine/nmv-gdb-engine.cc
index d899de2..16a01d7 100644
--- a/src/dbgengine/nmv-gdb-engine.cc
+++ b/src/dbgengine/nmv-gdb-engine.cc
@@ -2625,6 +2625,14 @@ GDBEngine::load_program (const UString &a_prog,
// tell gdb not to pass the SIGINT signal to the target.
queue_command (Command ("handle SIGINT stop print nopass"));
+ // Tell gdb not to pass the SIGHUP signal to the target. This
+ // is useful when the debugger follows a child during a
+ // fork. In that case, a SIGHUP is sent to the debugger if it
+ // has some controlling term attached to the target.. Make
+ // sure the signal is not not passed to the target and the
+ // debugger doesn't stop upon that signal.
+ queue_command (Command ("handle SIGHUP nostop print nopass"));
+
// tell the linker to do all relocations at program load
// time so that some "step into" don't take for ever.
// On GDB, it seems that stepping into a function that is
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]