blob: ded819d8d99b3890510174b8d9d218393b924254 [file] [log] [blame]
Juan Cespedes5e01f651998-03-08 22:31:44 +01001#include "ltrace.h"
2#include "options.h"
3#include "output.h"
4
5void enable_all_breakpoints(struct process * proc)
6{
7 if (proc->breakpoints_enabled <= 0) {
8 struct library_symbol * tmp = proc->list_of_symbols;
9
10 if (opt_d>0) {
11 output_line(0, "Enabling breakpoints for pid %u...", proc->pid);
12 }
13 while(tmp) {
14 insert_breakpoint(proc->pid, &tmp->brk);
15 tmp = tmp->next;
16 }
17 }
18 proc->breakpoints_enabled = 1;
19}
20
21void disable_all_breakpoints(struct process * proc)
22{
23 if (proc->breakpoints_enabled) {
24 struct library_symbol * tmp = proc->list_of_symbols;
25
26 if (opt_d>0) {
27 output_line(0, "Disabling breakpoints for pid %u...", proc->pid);
28 }
29 while(tmp) {
30 delete_breakpoint(proc->pid, &tmp->brk);
31 tmp = tmp->next;
32 }
33 }
34 proc->breakpoints_enabled = 0;
35}