blob: 02bd26ec8d61867b8406827cc45012de2982a279 (
plain) (
blame)
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
/*******************************************************************************
* Copyright (c) 2007, 2010 Wind River Systems, Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* and Eclipse Distribution License v1.0 which accompany this distribution.
* The Eclipse Public License is available at
* http://www.eclipse.org/legal/epl-v10.html
* and the Eclipse Distribution License is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
* You may elect to redistribute this code under either of these licenses.
*
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
/*
* TCF Processes - process control service.
* Processes service provides access to the target OS's process information,
* allows to start and terminate a process, and allows to attach and
* detach a process for debugging. Debug services, like Memory and Run Control,
* require a process to be attached before they can access it.
*/
#ifndef D_processes
#define D_processes
#include <tcf/framework/events.h>
#include <tcf/framework/protocol.h>
typedef struct ChildProcess ChildProcess;
typedef struct ProcessStartParams {
char ** envp;
const char * dir;
const char * exe;
char ** args;
int attach;
int attach_mode;
int use_terminal;
const char * service;
EventCallBack * exit_cb;
void * exit_args;
} ProcessStartParams;
extern int start_process(Channel * c, ProcessStartParams * params,
int * selfattach, ChildProcess ** prs);
extern const char * get_process_stream_id(ChildProcess * prs, int stream);
extern int get_process_tty(ChildProcess * prs);
extern int get_process_pid(ChildProcess * prs);
extern int get_process_out_state(ChildProcess * prs);
extern int get_process_exit_code(ChildProcess * prs);
/*
* Initialize process control service.
*/
extern void ini_processes_service(Protocol *);
#endif
|