Subversion Repositories HelenOS

Rev

Rev 3448 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3448 Rev 3674
Line 145... Line 145...
145
    /** Task is not being debugged */
145
    /** Task is not being debugged */
146
    UDEBUG_TS_INACTIVE,
146
    UDEBUG_TS_INACTIVE,
147
    /** BEGIN operation in progress (waiting for threads to stop) */
147
    /** BEGIN operation in progress (waiting for threads to stop) */
148
    UDEBUG_TS_BEGINNING,
148
    UDEBUG_TS_BEGINNING,
149
    /** Debugger fully connected */
149
    /** Debugger fully connected */
150
    UDEBUG_TS_ACTIVE,
150
    UDEBUG_TS_ACTIVE
151
    /** Task is shutting down, no more debug activities allowed */
-
 
152
    UDEBUG_TS_SHUTDOWN
-
 
153
} udebug_task_state_t;
151
} udebug_task_state_t;
154
 
152
 
155
/** Debugging part of task_t structure.
153
/** Debugging part of task_t structure.
156
 */
154
 */
157
typedef struct {
155
typedef struct {
Line 167... Line 165...
167
} udebug_task_t;
165
} udebug_task_t;
168
 
166
 
169
/** Debugging part of thread_t structure.
167
/** Debugging part of thread_t structure.
170
 */
168
 */
171
typedef struct {
169
typedef struct {
172
    /**
-
 
173
     * Prevent deadlock with udebug_before_thread_runs() in interrupt
-
 
174
     * handler, without actually disabling interrupts.
-
 
175
     * ==0 means "unlocked", >0 means "locked"
-
 
176
     */
-
 
177
    atomic_t int_lock;
-
 
178
 
-
 
179
    /** Synchronize debug ops on this thread / access to this structure */
170
    /** Synchronize debug ops on this thread / access to this structure. */
180
    mutex_t lock;
171
    mutex_t lock;
181
 
172
 
182
    waitq_t go_wq;
173
    waitq_t go_wq;
183
    call_t *go_call;
174
    call_t *go_call;
184
    unative_t syscall_args[6];
175
    unative_t syscall_args[6];
-
 
176
    istate_t *uspace_state;
185
 
177
 
186
    /** What type of event are we stopped in or 0 if none */
178
    /** What type of event are we stopped in or 0 if none. */
187
    udebug_event_t cur_event;  
179
    udebug_event_t cur_event;
188
    bool stop;
180
    bool go;       /**< thread is GO */
189
    bool stoppable;
181
    bool stoppable;    /**< thread is stoppable */
190
    bool debug_active; /**< In a debugging session */
182
    bool debug_active; /**< thread is in a debugging session */
191
} udebug_thread_t;
183
} udebug_thread_t;
192
 
184
 
193
struct task;
185
struct task;
194
struct thread;
186
struct thread;
195
 
187
 
Line 198... Line 190...
198
 
190
 
199
void udebug_syscall_event(unative_t a1, unative_t a2, unative_t a3,
191
void udebug_syscall_event(unative_t a1, unative_t a2, unative_t a3,
200
    unative_t a4, unative_t a5, unative_t a6, unative_t id, unative_t rc,
192
    unative_t a4, unative_t a5, unative_t a6, unative_t id, unative_t rc,
201
    bool end_variant);
193
    bool end_variant);
202
 
194
 
203
void udebug_thread_b_event(struct thread *t);
195
void udebug_thread_b_event_attach(struct thread *t, struct task *ta);
204
void udebug_thread_e_event(void);
196
void udebug_thread_e_event(void);
205
 
197
 
206
void udebug_stoppable_begin(void);
198
void udebug_stoppable_begin(void);
207
void udebug_stoppable_end(void);
199
void udebug_stoppable_end(void);
208
 
200