/docs/MyDocs

To get this branch, use:
bzr branch http://darksoft.org/webbzr/docs/MyDocs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Signals
=======
info signals/handle		- List all available signals

Configuring
===========
 handle <signal> <keywords>
    signal is #(number), name, #-#(range), all (all signals)
    keywords:
     stop/nostop	- Stop program when signal happens
     print/noprint	- Print message when signal happens
     pass/nopass	- Pass the signal to the debugging application or not
     ignore/noignore	- ignore is equivalent of nopass

    - When a signal stops your program, the signal is not visible to the 
    program until you continue. 
    - After GDB reports a signal, you can use the handle command with pass or 
    nopass to control whether your program sees that signal when you continue.

 signal <signal>
    Resume execution where your program stopped, but immediately give it the 
    specified signal.
 signal 0
    If program stopped due to a signal and would ordinary see the signal when 
    resumed with the continue command; `signal 0' causes it to resume without 
    a signal.

Stopping Applications
=====================
    - Normaly, it could be achieved by sending SIGINT to gdb (or just presing
    Ctrl+C). 'nopass' should be set for SIGINT (default behavior). 
	+ It is aslo possible to send SIGINT directly to app/thread pid.
        + The SIGINT should not be blocked in the thread of interest

    - Unfortunatelly, seems for multithreaded applications it would not prevent
    other threads from getting signal (at least in attach to process case).
	+ Therefore, the best is to ignore SIGINT (set a dummy signal handler, 
	not block) in all application threads during debug. The SIGTERM could 
	be used for exit.