author | goetz |
Mon, 26 Oct 2015 16:21:37 +0100 | |
changeset 33794 | 41ef3dc95179 |
parent 30281 | b1608535e50f |
permissions | -rw-r--r-- |
1 | 1 |
/* |
15734 | 2 |
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. |
1 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
7 |
* published by the Free Software Foundation. |
|
8 |
* |
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
13 |
* accompanied this code). |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License version |
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
18 |
* |
|
5547
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
5045
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
5045
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
5045
diff
changeset
|
21 |
* questions. |
1 | 22 |
* |
23 |
*/ |
|
24 |
#include <stdarg.h> |
|
25 |
#include <stdio.h> |
|
26 |
#include <stdlib.h> |
|
27 |
#include <string.h> |
|
28 |
#include <fcntl.h> |
|
29 |
#include <thread_db.h> |
|
30 |
#include "libproc_impl.h" |
|
31 |
||
32 |
#define SA_ALTROOT "SA_ALTROOT" |
|
33 |
||
34 |
int pathmap_open(const char* name) { |
|
22789
34433eb78a66
7127191: SA JSDB does not display native symbols correctly for transported Linux cores
dsamersoff
parents:
15734
diff
changeset
|
35 |
static const char *alt_root = NULL; |
34433eb78a66
7127191: SA JSDB does not display native symbols correctly for transported Linux cores
dsamersoff
parents:
15734
diff
changeset
|
36 |
static int alt_root_initialized = 0; |
1 | 37 |
|
22789
34433eb78a66
7127191: SA JSDB does not display native symbols correctly for transported Linux cores
dsamersoff
parents:
15734
diff
changeset
|
38 |
int fd; |
34433eb78a66
7127191: SA JSDB does not display native symbols correctly for transported Linux cores
dsamersoff
parents:
15734
diff
changeset
|
39 |
char alt_path[PATH_MAX + 1], *alt_path_end; |
34433eb78a66
7127191: SA JSDB does not display native symbols correctly for transported Linux cores
dsamersoff
parents:
15734
diff
changeset
|
40 |
const char *s; |
33794 | 41 |
int free_space; |
1 | 42 |
|
22789
34433eb78a66
7127191: SA JSDB does not display native symbols correctly for transported Linux cores
dsamersoff
parents:
15734
diff
changeset
|
43 |
if (!alt_root_initialized) { |
34433eb78a66
7127191: SA JSDB does not display native symbols correctly for transported Linux cores
dsamersoff
parents:
15734
diff
changeset
|
44 |
alt_root_initialized = -1; |
34433eb78a66
7127191: SA JSDB does not display native symbols correctly for transported Linux cores
dsamersoff
parents:
15734
diff
changeset
|
45 |
alt_root = getenv(SA_ALTROOT); |
34433eb78a66
7127191: SA JSDB does not display native symbols correctly for transported Linux cores
dsamersoff
parents:
15734
diff
changeset
|
46 |
} |
34433eb78a66
7127191: SA JSDB does not display native symbols correctly for transported Linux cores
dsamersoff
parents:
15734
diff
changeset
|
47 |
|
34433eb78a66
7127191: SA JSDB does not display native symbols correctly for transported Linux cores
dsamersoff
parents:
15734
diff
changeset
|
48 |
if (alt_root == NULL) { |
34433eb78a66
7127191: SA JSDB does not display native symbols correctly for transported Linux cores
dsamersoff
parents:
15734
diff
changeset
|
49 |
return open(name, O_RDONLY); |
34433eb78a66
7127191: SA JSDB does not display native symbols correctly for transported Linux cores
dsamersoff
parents:
15734
diff
changeset
|
50 |
} |
34433eb78a66
7127191: SA JSDB does not display native symbols correctly for transported Linux cores
dsamersoff
parents:
15734
diff
changeset
|
51 |
|
33794 | 52 |
|
53 |
if (strlen(alt_root) + strlen(name) < PATH_MAX) { |
|
54 |
// Buffer too small. |
|
55 |
return -1; |
|
56 |
} |
|
57 |
||
58 |
strncpy(alt_path, alt_root, PATH_MAX); |
|
59 |
alt_path[PATH_MAX] = '\0'; |
|
22789
34433eb78a66
7127191: SA JSDB does not display native symbols correctly for transported Linux cores
dsamersoff
parents:
15734
diff
changeset
|
60 |
alt_path_end = alt_path + strlen(alt_path); |
33794 | 61 |
free_space = PATH_MAX + 1 - (alt_path_end-alt_path); |
1 | 62 |
|
33794 | 63 |
// Strip path items one by one and try to open file with alt_root prepended. |
22789
34433eb78a66
7127191: SA JSDB does not display native symbols correctly for transported Linux cores
dsamersoff
parents:
15734
diff
changeset
|
64 |
s = name; |
34433eb78a66
7127191: SA JSDB does not display native symbols correctly for transported Linux cores
dsamersoff
parents:
15734
diff
changeset
|
65 |
while (1) { |
33794 | 66 |
strncat(alt_path, s, free_space); |
67 |
s += 1; // Skip /. |
|
22789
34433eb78a66
7127191: SA JSDB does not display native symbols correctly for transported Linux cores
dsamersoff
parents:
15734
diff
changeset
|
68 |
|
34433eb78a66
7127191: SA JSDB does not display native symbols correctly for transported Linux cores
dsamersoff
parents:
15734
diff
changeset
|
69 |
fd = open(alt_path, O_RDONLY); |
34433eb78a66
7127191: SA JSDB does not display native symbols correctly for transported Linux cores
dsamersoff
parents:
15734
diff
changeset
|
70 |
if (fd >= 0) { |
34433eb78a66
7127191: SA JSDB does not display native symbols correctly for transported Linux cores
dsamersoff
parents:
15734
diff
changeset
|
71 |
print_debug("path %s substituted for %s\n", alt_path, name); |
34433eb78a66
7127191: SA JSDB does not display native symbols correctly for transported Linux cores
dsamersoff
parents:
15734
diff
changeset
|
72 |
return fd; |
34433eb78a66
7127191: SA JSDB does not display native symbols correctly for transported Linux cores
dsamersoff
parents:
15734
diff
changeset
|
73 |
} |
1 | 74 |
|
22789
34433eb78a66
7127191: SA JSDB does not display native symbols correctly for transported Linux cores
dsamersoff
parents:
15734
diff
changeset
|
75 |
// Linker always put full path to solib to process, so we can rely |
34433eb78a66
7127191: SA JSDB does not display native symbols correctly for transported Linux cores
dsamersoff
parents:
15734
diff
changeset
|
76 |
// on presence of /. If slash is not present, it means, that SOlib doesn't |
34433eb78a66
7127191: SA JSDB does not display native symbols correctly for transported Linux cores
dsamersoff
parents:
15734
diff
changeset
|
77 |
// physically exist (e.g. linux-gate.so) and we fail opening it anyway |
34433eb78a66
7127191: SA JSDB does not display native symbols correctly for transported Linux cores
dsamersoff
parents:
15734
diff
changeset
|
78 |
if ((s = strchr(s, '/')) == NULL) { |
34433eb78a66
7127191: SA JSDB does not display native symbols correctly for transported Linux cores
dsamersoff
parents:
15734
diff
changeset
|
79 |
break; |
34433eb78a66
7127191: SA JSDB does not display native symbols correctly for transported Linux cores
dsamersoff
parents:
15734
diff
changeset
|
80 |
} |
34433eb78a66
7127191: SA JSDB does not display native symbols correctly for transported Linux cores
dsamersoff
parents:
15734
diff
changeset
|
81 |
|
33794 | 82 |
// Cut off what we appended above. |
83 |
*alt_path_end = '\0'; |
|
22789
34433eb78a66
7127191: SA JSDB does not display native symbols correctly for transported Linux cores
dsamersoff
parents:
15734
diff
changeset
|
84 |
} |
34433eb78a66
7127191: SA JSDB does not display native symbols correctly for transported Linux cores
dsamersoff
parents:
15734
diff
changeset
|
85 |
|
34433eb78a66
7127191: SA JSDB does not display native symbols correctly for transported Linux cores
dsamersoff
parents:
15734
diff
changeset
|
86 |
return -1; |
1 | 87 |
} |
88 |
||
89 |
static bool _libsaproc_debug; |
|
90 |
||
91 |
void print_debug(const char* format,...) { |
|
92 |
if (_libsaproc_debug) { |
|
93 |
va_list alist; |
|
94 |
||
95 |
va_start(alist, format); |
|
96 |
fputs("libsaproc DEBUG: ", stderr); |
|
97 |
vfprintf(stderr, format, alist); |
|
98 |
va_end(alist); |
|
99 |
} |
|
100 |
} |
|
101 |
||
15734 | 102 |
void print_error(const char* format,...) { |
103 |
va_list alist; |
|
104 |
va_start(alist, format); |
|
105 |
fputs("ERROR: ", stderr); |
|
106 |
vfprintf(stderr, format, alist); |
|
107 |
va_end(alist); |
|
108 |
} |
|
109 |
||
1 | 110 |
bool is_debug() { |
111 |
return _libsaproc_debug; |
|
112 |
} |
|
113 |
||
114 |
// initialize libproc |
|
115 |
bool init_libproc(bool debug) { |
|
116 |
// init debug mode |
|
117 |
_libsaproc_debug = debug; |
|
118 |
||
119 |
// initialize the thread_db library |
|
120 |
if (td_init() != TD_OK) { |
|
121 |
print_debug("libthread_db's td_init failed\n"); |
|
122 |
return false; |
|
123 |
} |
|
124 |
||
125 |
return true; |
|
126 |
} |
|
127 |
||
128 |
static void destroy_lib_info(struct ps_prochandle* ph) { |
|
129 |
lib_info* lib = ph->libs; |
|
130 |
while (lib) { |
|
131 |
lib_info *next = lib->next; |
|
132 |
if (lib->symtab) { |
|
133 |
destroy_symtab(lib->symtab); |
|
134 |
} |
|
135 |
free(lib); |
|
136 |
lib = next; |
|
137 |
} |
|
138 |
} |
|
139 |
||
140 |
static void destroy_thread_info(struct ps_prochandle* ph) { |
|
141 |
thread_info* thr = ph->threads; |
|
142 |
while (thr) { |
|
143 |
thread_info *next = thr->next; |
|
144 |
free(thr); |
|
145 |
thr = next; |
|
146 |
} |
|
147 |
} |
|
148 |
||
149 |
// ps_prochandle cleanup |
|
150 |
||
151 |
// ps_prochandle cleanup |
|
152 |
void Prelease(struct ps_prochandle* ph) { |
|
153 |
// do the "derived class" clean-up first |
|
154 |
ph->ops->release(ph); |
|
155 |
destroy_lib_info(ph); |
|
156 |
destroy_thread_info(ph); |
|
157 |
free(ph); |
|
158 |
} |
|
159 |
||
160 |
lib_info* add_lib_info(struct ps_prochandle* ph, const char* libname, uintptr_t base) { |
|
161 |
return add_lib_info_fd(ph, libname, -1, base); |
|
162 |
} |
|
163 |
||
164 |
lib_info* add_lib_info_fd(struct ps_prochandle* ph, const char* libname, int fd, uintptr_t base) { |
|
165 |
lib_info* newlib; |
|
166 |
||
167 |
if ( (newlib = (lib_info*) calloc(1, sizeof(struct lib_info))) == NULL) { |
|
168 |
print_debug("can't allocate memory for lib_info\n"); |
|
169 |
return NULL; |
|
170 |
} |
|
171 |
||
30281 | 172 |
if (strlen(libname) >= sizeof(newlib->name)) { |
173 |
print_debug("libname %s too long\n", libname); |
|
174 |
return NULL; |
|
175 |
} |
|
176 |
strcpy(newlib->name, libname); |
|
177 |
||
1 | 178 |
newlib->base = base; |
179 |
||
180 |
if (fd == -1) { |
|
181 |
if ( (newlib->fd = pathmap_open(newlib->name)) < 0) { |
|
182 |
print_debug("can't open shared object %s\n", newlib->name); |
|
183 |
free(newlib); |
|
184 |
return NULL; |
|
185 |
} |
|
186 |
} else { |
|
187 |
newlib->fd = fd; |
|
188 |
} |
|
189 |
||
190 |
// check whether we have got an ELF file. /proc/<pid>/map |
|
191 |
// gives out all file mappings and not just shared objects |
|
192 |
if (is_elf_file(newlib->fd) == false) { |
|
193 |
close(newlib->fd); |
|
194 |
free(newlib); |
|
195 |
return NULL; |
|
196 |
} |
|
197 |
||
5045
59dd2a304f1d
6932270: Allow Java's ELF symtab reader to use separate debuginfo files
never
parents:
1
diff
changeset
|
198 |
newlib->symtab = build_symtab(newlib->fd, libname); |
1 | 199 |
if (newlib->symtab == NULL) { |
200 |
print_debug("symbol table build failed for %s\n", newlib->name); |
|
201 |
} |
|
202 |
||
203 |
// even if symbol table building fails, we add the lib_info. |
|
204 |
// This is because we may need to read from the ELF file for core file |
|
205 |
// address read functionality. lookup_symbol checks for NULL symtab. |
|
206 |
if (ph->libs) { |
|
207 |
ph->lib_tail->next = newlib; |
|
208 |
ph->lib_tail = newlib; |
|
209 |
} else { |
|
210 |
ph->libs = ph->lib_tail = newlib; |
|
211 |
} |
|
212 |
ph->num_libs++; |
|
213 |
||
214 |
return newlib; |
|
215 |
} |
|
216 |
||
217 |
// lookup for a specific symbol |
|
218 |
uintptr_t lookup_symbol(struct ps_prochandle* ph, const char* object_name, |
|
219 |
const char* sym_name) { |
|
220 |
// ignore object_name. search in all libraries |
|
221 |
// FIXME: what should we do with object_name?? The library names are obtained |
|
222 |
// by parsing /proc/<pid>/maps, which may not be the same as object_name. |
|
223 |
// What we need is a utility to map object_name to real file name, something |
|
224 |
// dlopen() does by looking at LD_LIBRARY_PATH and /etc/ld.so.cache. For |
|
225 |
// now, we just ignore object_name and do a global search for the symbol. |
|
226 |
||
227 |
lib_info* lib = ph->libs; |
|
228 |
while (lib) { |
|
229 |
if (lib->symtab) { |
|
230 |
uintptr_t res = search_symbol(lib->symtab, lib->base, sym_name, NULL); |
|
231 |
if (res) return res; |
|
232 |
} |
|
233 |
lib = lib->next; |
|
234 |
} |
|
235 |
||
236 |
print_debug("lookup failed for symbol '%s' in obj '%s'\n", |
|
237 |
sym_name, object_name); |
|
238 |
return (uintptr_t) NULL; |
|
239 |
} |
|
240 |
||
241 |
||
242 |
const char* symbol_for_pc(struct ps_prochandle* ph, uintptr_t addr, uintptr_t* poffset) { |
|
243 |
const char* res = NULL; |
|
244 |
lib_info* lib = ph->libs; |
|
245 |
while (lib) { |
|
246 |
if (lib->symtab && addr >= lib->base) { |
|
247 |
res = nearest_symbol(lib->symtab, addr - lib->base, poffset); |
|
248 |
if (res) return res; |
|
249 |
} |
|
250 |
lib = lib->next; |
|
251 |
} |
|
252 |
return NULL; |
|
253 |
} |
|
254 |
||
255 |
// add a thread to ps_prochandle |
|
256 |
thread_info* add_thread_info(struct ps_prochandle* ph, pthread_t pthread_id, lwpid_t lwp_id) { |
|
257 |
thread_info* newthr; |
|
258 |
if ( (newthr = (thread_info*) calloc(1, sizeof(thread_info))) == NULL) { |
|
259 |
print_debug("can't allocate memory for thread_info\n"); |
|
260 |
return NULL; |
|
261 |
} |
|
262 |
||
263 |
// initialize thread info |
|
264 |
newthr->pthread_id = pthread_id; |
|
265 |
newthr->lwp_id = lwp_id; |
|
266 |
||
267 |
// add new thread to the list |
|
268 |
newthr->next = ph->threads; |
|
269 |
ph->threads = newthr; |
|
270 |
ph->num_threads++; |
|
271 |
return newthr; |
|
272 |
} |
|
273 |
||
274 |
||
275 |
// struct used for client data from thread_db callback |
|
276 |
struct thread_db_client_data { |
|
277 |
struct ps_prochandle* ph; |
|
278 |
thread_info_callback callback; |
|
279 |
}; |
|
280 |
||
281 |
// callback function for libthread_db |
|
282 |
static int thread_db_callback(const td_thrhandle_t *th_p, void *data) { |
|
283 |
struct thread_db_client_data* ptr = (struct thread_db_client_data*) data; |
|
284 |
td_thrinfo_t ti; |
|
285 |
td_err_e err; |
|
286 |
||
287 |
memset(&ti, 0, sizeof(ti)); |
|
288 |
err = td_thr_get_info(th_p, &ti); |
|
289 |
if (err != TD_OK) { |
|
290 |
print_debug("libthread_db : td_thr_get_info failed, can't get thread info\n"); |
|
291 |
return err; |
|
292 |
} |
|
293 |
||
294 |
print_debug("thread_db : pthread %d (lwp %d)\n", ti.ti_tid, ti.ti_lid); |
|
295 |
||
296 |
if (ptr->callback(ptr->ph, ti.ti_tid, ti.ti_lid) != true) |
|
297 |
return TD_ERR; |
|
298 |
||
299 |
return TD_OK; |
|
300 |
} |
|
301 |
||
302 |
// read thread_info using libthread_db |
|
303 |
bool read_thread_info(struct ps_prochandle* ph, thread_info_callback cb) { |
|
304 |
struct thread_db_client_data mydata; |
|
305 |
td_thragent_t* thread_agent = NULL; |
|
306 |
if (td_ta_new(ph, &thread_agent) != TD_OK) { |
|
307 |
print_debug("can't create libthread_db agent\n"); |
|
308 |
return false; |
|
309 |
} |
|
310 |
||
311 |
mydata.ph = ph; |
|
312 |
mydata.callback = cb; |
|
313 |
||
314 |
// we use libthread_db iterator to iterate thru list of threads. |
|
315 |
if (td_ta_thr_iter(thread_agent, thread_db_callback, &mydata, |
|
316 |
TD_THR_ANY_STATE, TD_THR_LOWEST_PRIORITY, |
|
317 |
TD_SIGNO_MASK, TD_THR_ANY_USER_FLAGS) != TD_OK) { |
|
318 |
td_ta_delete(thread_agent); |
|
319 |
return false; |
|
320 |
} |
|
321 |
||
322 |
// delete thread agent |
|
323 |
td_ta_delete(thread_agent); |
|
324 |
return true; |
|
325 |
} |
|
326 |
||
327 |
||
328 |
// get number of threads |
|
329 |
int get_num_threads(struct ps_prochandle* ph) { |
|
330 |
return ph->num_threads; |
|
331 |
} |
|
332 |
||
333 |
// get lwp_id of n'th thread |
|
334 |
lwpid_t get_lwp_id(struct ps_prochandle* ph, int index) { |
|
335 |
int count = 0; |
|
336 |
thread_info* thr = ph->threads; |
|
337 |
while (thr) { |
|
338 |
if (count == index) { |
|
339 |
return thr->lwp_id; |
|
340 |
} |
|
341 |
count++; |
|
342 |
thr = thr->next; |
|
343 |
} |
|
344 |
return -1; |
|
345 |
} |
|
346 |
||
347 |
// get regs for a given lwp |
|
348 |
bool get_lwp_regs(struct ps_prochandle* ph, lwpid_t lwp_id, struct user_regs_struct* regs) { |
|
349 |
return ph->ops->get_lwp_regs(ph, lwp_id, regs); |
|
350 |
} |
|
351 |
||
352 |
// get number of shared objects |
|
353 |
int get_num_libs(struct ps_prochandle* ph) { |
|
354 |
return ph->num_libs; |
|
355 |
} |
|
356 |
||
357 |
// get name of n'th solib |
|
358 |
const char* get_lib_name(struct ps_prochandle* ph, int index) { |
|
359 |
int count = 0; |
|
360 |
lib_info* lib = ph->libs; |
|
361 |
while (lib) { |
|
362 |
if (count == index) { |
|
363 |
return lib->name; |
|
364 |
} |
|
365 |
count++; |
|
366 |
lib = lib->next; |
|
367 |
} |
|
368 |
return NULL; |
|
369 |
} |
|
370 |
||
371 |
// get base address of a lib |
|
372 |
uintptr_t get_lib_base(struct ps_prochandle* ph, int index) { |
|
373 |
int count = 0; |
|
374 |
lib_info* lib = ph->libs; |
|
375 |
while (lib) { |
|
376 |
if (count == index) { |
|
377 |
return lib->base; |
|
378 |
} |
|
379 |
count++; |
|
380 |
lib = lib->next; |
|
381 |
} |
|
382 |
return (uintptr_t)NULL; |
|
383 |
} |
|
384 |
||
385 |
bool find_lib(struct ps_prochandle* ph, const char *lib_name) { |
|
386 |
lib_info *p = ph->libs; |
|
387 |
while (p) { |
|
388 |
if (strcmp(p->name, lib_name) == 0) { |
|
389 |
return true; |
|
390 |
} |
|
391 |
p = p->next; |
|
392 |
} |
|
393 |
return false; |
|
394 |
} |
|
395 |
||
396 |
//-------------------------------------------------------------------------- |
|
397 |
// proc service functions |
|
398 |
||
399 |
// get process id |
|
400 |
pid_t ps_getpid(struct ps_prochandle *ph) { |
|
401 |
return ph->pid; |
|
402 |
} |
|
403 |
||
404 |
// ps_pglobal_lookup() looks up the symbol sym_name in the symbol table |
|
405 |
// of the load object object_name in the target process identified by ph. |
|
406 |
// It returns the symbol's value as an address in the target process in |
|
407 |
// *sym_addr. |
|
408 |
||
409 |
ps_err_e ps_pglobal_lookup(struct ps_prochandle *ph, const char *object_name, |
|
410 |
const char *sym_name, psaddr_t *sym_addr) { |
|
411 |
*sym_addr = (psaddr_t) lookup_symbol(ph, object_name, sym_name); |
|
412 |
return (*sym_addr ? PS_OK : PS_NOSYM); |
|
413 |
} |
|
414 |
||
415 |
// read "size" bytes info "buf" from address "addr" |
|
416 |
ps_err_e ps_pdread(struct ps_prochandle *ph, psaddr_t addr, |
|
417 |
void *buf, size_t size) { |
|
418 |
return ph->ops->p_pread(ph, (uintptr_t) addr, buf, size)? PS_OK: PS_ERR; |
|
419 |
} |
|
420 |
||
421 |
// write "size" bytes of data to debuggee at address "addr" |
|
422 |
ps_err_e ps_pdwrite(struct ps_prochandle *ph, psaddr_t addr, |
|
423 |
const void *buf, size_t size) { |
|
424 |
return ph->ops->p_pwrite(ph, (uintptr_t)addr, buf, size)? PS_OK: PS_ERR; |
|
425 |
} |
|
426 |
||
427 |
// ------------------------------------------------------------------------ |
|
428 |
// Functions below this point are not yet implemented. They are here only |
|
429 |
// to make the linker happy. |
|
430 |
||
431 |
ps_err_e ps_lsetfpregs(struct ps_prochandle *ph, lwpid_t lid, const prfpregset_t *fpregs) { |
|
432 |
print_debug("ps_lsetfpregs not implemented\n"); |
|
433 |
return PS_OK; |
|
434 |
} |
|
435 |
||
436 |
ps_err_e ps_lsetregs(struct ps_prochandle *ph, lwpid_t lid, const prgregset_t gregset) { |
|
437 |
print_debug("ps_lsetregs not implemented\n"); |
|
438 |
return PS_OK; |
|
439 |
} |
|
440 |
||
441 |
ps_err_e ps_lgetfpregs(struct ps_prochandle *ph, lwpid_t lid, prfpregset_t *fpregs) { |
|
442 |
print_debug("ps_lgetfpregs not implemented\n"); |
|
443 |
return PS_OK; |
|
444 |
} |
|
445 |
||
446 |
ps_err_e ps_lgetregs(struct ps_prochandle *ph, lwpid_t lid, prgregset_t gregset) { |
|
447 |
print_debug("ps_lgetfpregs not implemented\n"); |
|
448 |
return PS_OK; |
|
449 |
} |
|
450 |
||
451 |
// new libthread_db of NPTL seem to require this symbol |
|
452 |
ps_err_e ps_get_thread_area() { |
|
453 |
print_debug("ps_get_thread_area not implemented\n"); |
|
454 |
return PS_OK; |
|
455 |
} |