S/390: Don't replace R_390_TLS_LE32/64 with R_390_TLS_TPOFF for PIE.
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
bffc0964
JB
12014-09-16 Joel Brobecker <brobecker@adacore.com>
2
3 * Makefile.in (CPPFLAGS): Define.
4 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6
0bfdf32f
GB
72014-09-16 Gary Benson <gbenson@redhat.com>
8
9 * inferiors.h (current_inferior): Renamed as...
10 (current_thread): New variable. All uses updated.
11 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
12 (maybe_move_out_of_jump_pad): Likewise.
13 (cancel_breakpoint): Likewise.
14 (linux_low_filter_event): Likewise.
15 (wait_for_sigstop): Likewise.
16 (linux_resume_one_lwp): Likewise.
17 (need_step_over_p): Likewise.
18 (start_step_over): Likewise.
19 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
20 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
21 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
22 and save_inferior as saved_thread.
23 * regcache.c (get_thread_regcache): Renamed saved_inferior as
24 saved_thread.
25 (regcache_invalidate_thread): Likewise.
26 * remote-utils.c (prepare_resume_reply): Likewise.
27 * thread-db.c (thread_db_get_tls_address): Likewise.
28 (disable_thread_event_reporting): Likewise.
29 (remove_thread_event_breakpoints): Likewise.
30 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
31 as saved_thread.
32 * target.h (set_desired_inferior): Renamed as...
33 (set_desired_thread): New declaration. All uses updated.
34 * server.c (myresume): Updated comment to reference thread instead
35 of inferior.
36 (handle_serial_event): Likewise.
37 (handle_target_event): Likewise.
38
361c8ade
GB
392014-09-12 Tom Tromey <tromey@redhat.com>
40 Gary Benson <gbenson@redhat.com>
41
42 * regcache.h: Include common-regcache.h.
43 (regcache_read_pc): Don't declare.
44 * regcache.c (get_thread_regcache_for_ptid): New function.
45
bd9269f7
GB
462014-09-11 Tom Tromey <tromey@redhat.com>
47 Gary Benson <gbenson@redhat.com>
48
49 * symbol.c: New file.
50 * Makefile.in (SFILES): Add symbol.c.
51 (OBS): Add symbol.o.
52
f8c1d06b
GB
532014-09-11 Gary Benson <gbenson@redhat.com>
54
55 * target.c (target_stop_ptid, target_continue_ptid): New
56 functions.
57
721ec300
GB
582014-09-11 Tom Tromey <tromey@redhat.com>
59 Gary Benson <gbenson@redhat.com>
60
61 * target.h: Include target/target.h.
62 * target.c (target_read_memory, target_read_uint32)
63 (target_write_memory): New functions.
64
c5e92cca
GB
652014-09-11 Gary Benson <gbenson@redhat.com>
66
67 * server.h (debug_hw_points): Don't declare.
68 * server.c (debug_hw_points): Don't define. Replace all uses
69 with show_debug_regs.
70 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
71 all uses with show_debug_regs.
72
2e4bb98a
EBM
732014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
74
75 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
76 endianness into account.
77 (ppc_supply_ptrace_register): Likewise.
78
ac740bc7
JH
792014-09-03 James Hogan <james.hogan@imgtec.com>
80
81 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
82 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
83
97ea6506
GB
842014-09-03 Gary Benson <gbenson@redhat.com>
85
86 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
87 ALL_DEBUG_ADDRESS_REGISTERS.
88
df7e5265
GB
892014-09-02 Gary Benson <gbenson@redhat.com>
90
91 * i386-low.h: Renamed as...
92 * x86-low.h: New file. All type, function and variable name
93 prefixes changed from "i386_" to "x86_". All references updated.
94 * i386-low.c: Renamed as...
95 * x86-low.c: New file. All type, function and variable name
96 prefixes changed from "i386_" to "x86_". All references updated.
97
ed859da7
GB
982014-09-02 Gary Benson <gbenson@redhat.com>
99
100 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
101 (x86_linux_new_thread): Likewise.
102
860789c7
GB
1032014-08-29 Gary Benson <gbenson@redhat.com>
104
105 * server.h (setjmp.h): Do not include.
106 (toplevel): Do not declare.
107 (common-exceptions.h): Include.
108 (cleanups.h): Likewise.
109 * server.c (toplevel): Do not define.
110 (exit_code): New static global.
111 (detach_or_kill_for_exit_cleanup): New function.
112 (main): New function. Original main renamed to...
113 (captured_main): New function.
114 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
115
ff55e1b5
GB
1162014-08-29 Gary Benson <gbenson@redhat.com>
117
118 * Makefile.in (SFILES): Add common/common-exceptions.c.
119 (OBS): Add common-exceptions.o.
120 (common-exceptions.o): New rule.
121 * utils.c (prepare_to_throw_exception): New function.
122
e9bcb658
GB
1232014-08-29 Gary Benson <gbenson@redhat.com>
124
125 * config.in: Regenerate.
126 * configure: Likewise.
127
e3180625
GB
1282014-08-29 Gary Benson <gbenson@redhat.com>
129
130 * Makefile.in (SFILES): Add common/cleanups.c.
131 (OBS): cleanups.o.
132 (cleanups.o): New rule.
133
e3d6ba5d
GB
1342014-08-29 Gary Benson <gbenson@redhat.com>
135
136 * utils.c (internal_vwarning): New function.
137
7096e886
GB
1382014-08-28 Gary Benson <gbenson@redhat.com>
139
140 * utils.h (fatal): Remove declaration.
141 * utils.c (fatal): Remove function.
142
14ce3192
GB
1432014-08-28 Gary Benson <gbenson@redhat.com>
144
145 * tracepoint.c (gdb_agent_init): Replace fatal with
146 perror_with_name.
147 (initialize_tracepoint): Likewise.
148
50278d59
GB
1492014-08-28 Gary Benson <gbenson@redhat.com>
150
151 * remote-utils.c (remote_prepare): Replace fatal with error.
152
aa96c426
GB
1532014-08-28 Gary Benson <gbenson@redhat.com>
154
155 * linux-low.c (linux_async): Replace fatal with warning.
156 Tidy up and return.
157 (linux_start_non_stop): Return -1 if linux_async failed.
158
f7160e97
GB
1592014-08-28 Gary Benson <gbenson@redhat.com>
160
161 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
162 gdb_assert.
163 (i386_dr_low_get_addr): Remove vague comment.
164 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
165 gdb_assert.
166
38e08fca
GB
1672014-08-28 Gary Benson <gbenson@redhat.com>
168
169 * inferiors.c (get_thread_process): Replace check with gdb_assert.
170 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
171 internal_error.
172 (linux_resume_one_lwp): Likewise.
173 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
174 gdb_assert.
175 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
176 with internal_error.
177 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
178 (init_register_cache): Replace fatal with gdb_assert_not_reached.
179 (find_register_by_name): Replace fatal with internal_error.
180 (find_regno): Likewise.
181 * tdesc.c (init_target_desc): Replace check with gdb_assert.
182 * thread-db.c (thread_db_create_event): Likewise.
183 (thread_db_load_search): Likewise.
184 (try_thread_db_load_1): Likewise.
185 * tracepoint.c (get_jump_space_head): Replace fatal with
186 internal_error.
187 (claim_trampoline_space): Likewise.
188 (have_fast_tracepoint_trampoline_buffer): Likewise.
189 (cmd_qtstart): Likewise.
190 (stop_tracing): Likewise.
191 (fast_tracepoint_collecting): Likewise.
192 (target_malloc): Likewise.
193 (download_tracepoint): Likewise.
194 (download_trace_state_variables): Replace check with gdb_assert.
195 (upload_fast_traceframes): Replace fatal with internal_error.
196
34abf635
GB
1972014-08-19 Tom Tromey <tromey@redhat.com>
198 Gary Benson <gbenson@redhat.com>
199
200 * Makefile.in (SFILES): Add common/common-debug.c.
201 (OBS): Add common-debug.o.
202 (common-debug.o): New rule.
203 * debug.h (debug_printf): Don't declare.
204 * debug.c (debug_printf): Renamed and rewritten as...
205 (debug_vprintf): New function.
206
f6e94d78
GB
2072014-08-19 Gary Benson <gbenson@redhat.com>
208
209 * utils.h: Do not include print-utils.h.
210
9239eeab
GB
2112014-08-19 Tom Tromey <tromey@redhat.com>
212 Gary Benson <gbenson@redhat.com>
213
214 * server.h: Add static assertion.
215 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
216
ef87c8bb
GB
2172014-08-19 Tom Tromey <tromey@redhat.com>
218 Gary Benson <gbenson@redhat.com>
219
220 * Makefile.in (SFILES): Add common/errors.c.
221 (OBS): Add errors.o.
222 (IPA_OBS): Add errors-ipa.o.
223 (errors.o): New rule.
224 (errors-ipa.o): Likewise.
225 * utils.h (perror_with_name, error, warning): Don't declare.
226 * utils.c (warning): Renamed and rewritten as...
227 (vwarning): New function.
228 (error): Renamed and rewritten as...
229 (verror): New function.
230 (internal_error): Renamed and rewritten as...
231 (internal_verror): New function.
232
bb974a24
GB
2332014-08-07 Gary Benson <gbenson@redhat.com>
234
235 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
236 * configure: Regenerate.
237 * config.in: Likewise.
238 * server.h: Do not include errno.h.
239 * event-loop.c: Likewise.
240 * hostio-errno.c: Likewise.
241 * linux-low.c: Likewise.
242 * remote-utils.c: Likewise.
243 * spu-low.c: Likewise.
244 * utils.c: Likewise.
245 * gdbreplay.c: Unconditionally include errno.h.
246
6d3d12eb
GB
2472014-08-07 Gary Benson <gbenson@redhat.com>
248
249 * server.h: Do not include string.h.
250 * event-loop.c: Likewise.
251 * linux-low.c: Likewise.
252 * regcache.c: Likewise.
253 * remote-utils.c: Likewise.
254 * spu-low.c: Likewise.
255 * utils.c: Likewise.
256
dccbb609
GB
2572014-08-07 Gary Benson <gbenson@redhat.com>
258
259 * server.h: Do not include gdb_assert.h.
260
e76df0d0
GB
2612014-08-07 Gary Benson <gbenson@redhat.com>
262
263 * server.h: Do not include common-utils.h.
264
4cb9c816
GB
2652014-08-07 Gary Benson <gbenson@redhat.com>
266
267 * server.h: Do not include ptid.h.
268 * notif.h: Likewise.
269
3995eeee
GB
2702014-08-07 Gary Benson <gbenson@redhat.com>
271
272 * server.h: Do not include gdb_locale.h.
273
cb9f1a9b
GB
2742014-08-07 Gary Benson <gbenson@redhat.com>
275
276 * server.h: Do not include gdb/signals.h.
277 * win32-low.c: Likewise.
278
a5fceff8
GB
2792014-08-07 Gary Benson <gbenson@redhat.com>
280
281 * server.h: Do not include pathmax.h.
282
b9391142
GB
2832014-08-07 Gary Benson <gbenson@redhat.com>
284
285 * server.h: Do not include libiberty.h.
286 * linux-bfin-low.c: Likewise.
287
0e443c87
GB
2882014-08-07 Gary Benson <gbenson@redhat.com>
289
290 * server.h: Do not include ansidecl.h.
291
8ebb3f56
GB
2922014-08-07 Gary Benson <gbenson@redhat.com>
293
294 * linux-x86-low.c: Do not include stddef.h.
295 * lynx-ppc-low.c: Likewise.
296 * tracepoint.c: Likewise.
297
8980bdf6
GB
2982014-08-07 Gary Benson <gbenson@redhat.com>
299
300 * server.h: Do not include stdarg.h.
301 * nto-low.c: Likewise.
302
d7096f71
GB
3032014-08-07 Gary Benson <gbenson@redhat.com>
304
305 * server.h: Do not include stdlib.h.
306 * inferiors.c: Likewise.
307 * linux-low.c: Likewise.
308 * regcache.c: Likewise.
309 * spu-low.c: Likewise.
310 * tracepoint.c: Likewise.
311 * utils.c: Likewise.
312
d02f550d
GB
3132014-08-07 Gary Benson <gbenson@redhat.com>
314
315 * server.h: Do not include stdio.h.
316 * linux-low.c: Likewise.
317 * remote-utils.c: Likewise.
318 * spu-low.c: Likewise.
319 * utils.c: Likewise.
320 * wincecompat.c: Likewise.
321
87f6c4e3
GB
3222014-08-06 Gary Benson <gbenson@redhat.com>
323
324 * regcache.c (init_register_cache): Move conditionals inside if.
325
7089dca4
GB
3262014-08-06 Gary Benson <gbenson@redhat.com>
327
328 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
329
462f517e
GB
3302014-07-31 Gary Benson <gbenson@redhat.com>
331
332 * ax.h: Do not include server.h.
333 * gdbthread.h: Likewise.
334 * lynx-low.h: Likewise.
335 * notif.h: Likewise.
336
976411d6
GB
3372014-07-30 Gary Benson <gbenson@redhat.com>
338
339 * server.h: Include common-defs.h.
340 Do not include config.h or build-gnulib-gdbserver/config.h.
341
d41f6d8e
GB
3422014-07-30 Gary Benson <gbenson@redhat.com>
343
344 * hostio-errno.c: Move server.h to top of includes list.
345 * inferiors.c: Likewise.
346 * linux-x86-low.c: Likewise.
347 * notif.c: Include server.h.
348
314c6a35
TT
3492014-07-24 Tom Tromey <tromey@redhat.com>
350 Gary Benson <gbenson@redhat.com>
351
352 * server.h (CORE_ADDR): Now unsigned.
353
69ff6be5
PA
3542014-07-16 Pedro Alves <palves@redhat.com>
355
356 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
357
ce9e3fe7
PA
3582014-07-15 Pedro Alves <palves@redhat.com>
359
360 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
361 copy.
362
e76126e8
PA
3632014-07-11 Pedro Alves <palves@redhat.com>
364
365 * linux-low.c (kill_wait_lwp): New function, based on
366 kill_one_lwp_callback, but use my_waitpid directly.
367 (kill_one_lwp_callback, linux_kill): Use it.
368
8e9db26e
PA
3692014-06-23 Pedro Alves <palves@redhat.com>
370
371 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
372 before setting DR0..DR3.
373
698b3e08
GB
3742014-06-20 Gary Benson <gbenson@redhat.com>
375
376 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
377 * configure: Regenerated.
378 * config.in: Likewise.
379
125f8a3d
GB
3802014-06-20 Gary Benson <gbenson@redhat.com>
381
382 * Makefile.in (SFILES): Update locations for files moved
383 from common to nat.
384 (object file files): Reordered.
385
42995dbd
GB
3862014-06-20 Gary Benson <gbenson@redhat.com>
387
388 * i386-low.h (i386_dr_low_can_set_addr): Removed.
389 (i386_dr_low_set_addr): Likewise.
390 (i386_dr_low_get_addr): Likewise.
391 (i386_dr_low_can_set_control): Likewise.
392 (i386_dr_low_set_control): Likewise.
393 (i386_dr_low_get_control): Likewise.
394 (i386_dr_low_get_status): Likewise.
395 (i386_get_debug_register_length): Likewise.
396 * linux-x86-low.c (i386_dr_low_set_addr):
397 Changed signature. Made static.
398 (i386_dr_low_get_addr): Likewise.
399 (i386_dr_low_set_control): Likewise.
400 (i386_dr_low_get_control): Likewise.
401 (i386_dr_low_get_status): Likewise.
402 (i386_dr_low): New global variable.
403 * win32-i386-low.c (i386_dr_low_set_addr):
404 Changed signature. Made static.
405 (i386_dr_low_get_addr): Likewise.
406 (i386_dr_low_set_control): Likewise.
407 (i386_dr_low_get_control): Likewise.
408 (i386_dr_low_get_status): Likewise.
409 (i386_dr_low): New global variable.
410
e1d2394b
MS
4112014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
412
413 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
414 * Makefile.in (AR, AR_FLAGS): Define.
415 * configure: Regenerate.
416
3a8ee006
GB
4172014-06-19 Gary Benson <gbenson@redhat.com>
418
419 * Makefile.in (i386-dregs.o): New rule.
420 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
421 * i386-low.c (target.h): Remove include.
422 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
423 (DR_CONTROL_SHIFT): Likewise.
424 (DR_CONTROL_SIZE): Likewise.
425 (DR_RW_EXECUTE): Likewise.
426 (DR_RW_WRITE): Likewise.
427 (DR_RW_READ): Likewise.
428 (DR_RW_IORW): Likewise.
429 (DR_LEN_1): Likewise.
430 (DR_LEN_2): Likewise.
431 (DR_LEN_4): Likewise.
432 (DR_LEN_8): Likewise.
433 (DR_LOCAL_ENABLE_SHIFT): Likewise.
434 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
435 (DR_ENABLE_SIZE): Likewise.
436 (DR_LOCAL_SLOWDOWN): Likewise.
437 (DR_GLOBAL_SLOWDOWN): Likewise.
438 (DR_CONTROL_RESERVED): Likewise.
439 (I386_DR_CONTROL_MASK): Likewise.
440 (I386_DR_VACANT): Likewise.
441 (I386_DR_LOCAL_ENABLE): Likewise.
442 (I386_DR_GLOBAL_ENABLE): Likewise.
443 (I386_DR_DISABLE): Likewise.
444 (I386_DR_SET_RW_LEN): Likewise.
445 (I386_DR_GET_RW_LEN): Likewise.
446 (I386_DR_WATCH_HIT): Likewise.
447 (i386_wp_op_t): Likewise.
448 (i386_show_dr): Likewise.
449 (i386_length_and_rw_bits): Likewise.
450 (i386_insert_aligned_watchpoint): Likewise.
451 (i386_remove_aligned_watchpoint): Likewise.
452 (i386_handle_nonaligned_watchpoint): Likewise.
453 i386_update_inferior_debug_regs(): Likewise.
454 (i386_dr_insert_watchpoint): Likewise.
455 (i386_dr_remove_watchpoint): Likewise.
456 (i386_dr_region_ok_for_watchpoint): Likewise.
457 (i386_dr_stopped_data_address): Likewise.
458 (i386_dr_stopped_by_watchpoint): Likewise.
459
8f26655c
GB
4602014-06-19 Gary Benson <gbenson@redhat.com>
461
462 * i386-low.c (i386_dr_show): Renamed to
463 i386_show_dr and made static. All uses updated.
464 (i386_dr_length_and_rw_bits): Renamed to
465 i386_length_and_rw_bits and made static.
466 All uses updated.
467 (i386_dr_insert_aligned_watchpoint): Renamed to
468 i386_insert_aligned_watchpoint and made static.
469 All uses updated.
470 (i386_dr_remove_aligned_watchpoint): Renamed to
471 i386_remove_aligned_watchpoint and made static.
472 All uses updated.
473 (i386_dr_update_inferior_debug_regs): Renamed to
474 i386_update_inferior_debug_regs and made static.
475 All uses updated.
476
b9228891
GB
4772014-06-18 Gary Benson <gbenson@redhat.com>
478
5171def3
GB
479 * i386-low.h (i386_dr_low_can_set_addr): New macro.
480 (i386_dr_low_can_set_control): Likewise.
481 (i386_get_debug_register_length): Likewise.
482 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
483 (i386_dr_low_can_set_control): Likewise.
484 (i386_get_debug_register_length): Likewise.
485
4862014-06-17 Gary Benson <gbenson@redhat.com>
487
b9228891
GB
488 * i386-low.h (i386-dregs.h): New include.
489 (DR_FIRSTADDR): Now in i386-dregs.h.
490 (DR_LASTADDR): Likewise.
491 (DR_NADDR): Likewise.
492 (DR_STATUS): Likewise.
493 (DR_CONTROL): Likewise.
494 (i386_debug_reg_state): Likewise.
495 (i386_dr_insert_watchpoint): Likewise.
496 (i386_dr_remove_watchpoint): Likewise.
497 (i386_dr_region_ok_for_watchpoint): Likewise.
498 (i386_dr_stopped_data_address): Likewise.
499 (i386_dr_stopped_by_watchpoint): Likewise.
500 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
501
4be83cc2
GB
5022014-06-18 Gary Benson <gbenson@redhat.com>
503
504 * i386-low.h (i386_low_insert_watchpoint): Renamed to
505 i386_dr_insert_watchpoint.
506 (i386_low_remove_watchpoint): Renamed to
507 i386_dr_remove_watchpoint.
508 (i386_low_region_ok_for_watchpoint): Renamed to
509 i386_dr_region_ok_for_watchpoint.
510 (i386_low_stopped_data_address): Renamed to
511 i386_dr_stopped_data_address.
512 (i386_low_stopped_by_watchpoint): Renamed to
513 i386_dr_stopped_by_watchpoint.
514 * i386-low.c (i386_show_dr): Renamed to
515 i386_dr_show and made nonstatic. All uses updated.
516 (i386_length_and_rw_bits): Renamed to
517 i386_dr_length_and_rw_bits and made nonstatic.
518 All uses updated.
519 (i386_insert_aligned_watchpoint): Renamed to
520 i386_dr_insert_aligned_watchpoint and made nonstatic.
521 All uses updated.
522 (i386_remove_aligned_watchpoint): Renamed to
523 i386_dr_remove_aligned_watchpoint and made nonstatic.
524 All uses updated.
525 (i386_update_inferior_debug_regs): Renamed to
526 i386_dr_update_inferior_debug_regs and made nonstatic.
527 All uses updated.
528 (i386_low_insert_watchpoint): Renamed to
529 i386_dr_insert_watchpoint. All uses updated.
530 (i386_low_remove_watchpoint): Renamed to
531 i386_dr_remove_watchpoint. All uses updated.
532 (i386_low_region_ok_for_watchpoint): Renamed to
533 i386_dr_region_ok_for_watchpoint. All uses updated.
534 (i386_low_stopped_data_address): Renamed to
535 i386_dr_stopped_data_address. All uses updated.
536 (i386_low_stopped_by_watchpoint): Renamed to
537 i386_dr_stopped_by_watchpoint. All uses updated.
538
131aa0d4
GB
5392014-06-18 Gary Benson <gbenson@redhat.com>
540
541 * i386-low.c (i386_dr_low_can_set_addr): New macro.
542 (i386_dr_low_can_set_control): Likewise.
543 (i386_insert_aligned_watchpoint): New check.
544
d9305f7f
GB
5452014-06-18 Gary Benson <gbenson@redhat.com>
546
547 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
548 Renamed to state.
549
e927c9fc
GB
5502014-06-18 Gary Benson <gbenson@redhat.com>
551
552 * i386-low.c (i386_length_and_rw_bits): Use internal_error
553 instead of fatal and error.
554 (i386_handle_nonaligned_watchpoint): Likewise.
555
1b6d4134
GB
5562014-06-18 Gary Benson <gbenson@redhat.com>
557
558 * i386-low.c (i386_get_debug_register_length): New macro.
559 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
560 (i386_show_dr): Use debug_printf instead of fprintf. Use
561 phex to format values.
562
6e62758f
GB
5632014-06-18 Gary Benson <gbenson@redhat.com>
564
565 * i386-low.h: Comment changes.
566 * i386-low.c: Likewise.
567
fc6e2f03
GB
5682014-06-18 Gary Benson <gbenson@redhat.com>
569
570 * i386-low.c: Whitespace changes.
571
f9d1eeed
TT
5722014-06-12 Tom Tromey <tromey@redhat.com>
573
574 * utils.c (freeargv): Remove.
575
0b04e523
TT
5762014-06-12 Tom Tromey <tromey@redhat.com>
577
578 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
579 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
580 (parse_debug_format_options): Likewise.
581 (gdbserver_usage): Likewise.
582 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
583 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
584 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
585 against libiberty.
586 ($(LIBGNU)): Depend on libiberty.
587 (all-lib): Recurse into all subdirs.
588 (install-only): Invoke "install" target in subdirs.
589 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
590 targets.
591 * configure: Rebuild.
592 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
593 for vasprintf, vsnprintf, or gettimeofday.
594 * configure.srv: Don't add safe-ctype.o or lbasename.o to
595 srv_tgtobj.
596
270c9937
JB
5972014-06-05 Joel Brobecker <brobecker@adacore.com>
598
599 * development.sh: Delete.
600 * Makefile.in (config.status): Adjust dependency on development.sh.
601 * configure.ac: Adjust development.sh source call.
602 * configure: Regenerate.
603
0a261ed8
PA
6042014-06-02 Pedro Alves <palves@redhat.com>
605
606 * ax.c (gdb_free_agent_expr): New function.
607 * ax.h (gdb_free_agent_expr): New declaration.
608 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
609 list.
610 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
611 static.
612 (clear_breakpoint_conditions_and_commands): New function.
613 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
614 (clear_breakpoint_conditions_and_commands): New declaration.
615
e9dae05e
RR
6162014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
617
618 * linux-aarch64-low.c (asm/ptrace.h): Include.
619
5876f503
JK
6202014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
621
622 Fix TLS access for -static -pthread.
623 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
624 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
625 (thread_db_load_search, try_thread_db_load_1): Initialize it.
626
802e8e6d
PA
6272014-05-20 Pedro Alves <palves@redhat.com>
628
629 * linux-aarch64-low.c (aarch64_insert_point)
630 (aarch64_remove_point): No longer check whether the type is
631 supported here. Adjust to new interface.
632 (the_low_target): Install aarch64_supports_z_point_type as
633 supports_z_point_type method.
634 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
635 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
636 instead of a Z packet char. Adjust.
637 (arm_supports_z_point_type): New function.
638 (arm_insert_point, arm_remove_point): Adjust to new interface.
639 (the_low_target): Install arm_supports_z_point_type.
640 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
641 (cris_insert_point, cris_remove_point): Adjust to new interface.
642 Don't check whether the type is supported here.
643 (the_low_target): Install cris_supports_z_point_type.
644 * linux-low.c (linux_supports_z_point_type): New function.
645 (linux_insert_point, linux_remove_point): Adjust to new interface.
646 * linux-low.h (struct linux_target_ops) <insert_point,
647 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
648 raw_breakpoint pointer parameter.
649 <supports_z_point_type>: New method.
650 * linux-mips-low.c (mips_supports_z_point_type): New function.
651 (mips_insert_point, mips_remove_point): Adjust to new interface.
652 Use mips_supports_z_point_type.
653 (the_low_target): Install mips_supports_z_point_type.
654 * linux-ppc-low.c (the_low_target): Install NULL as
655 supports_z_point_type method.
656 * linux-s390-low.c (the_low_target): Install NULL as
657 supports_z_point_type method.
658 * linux-sparc-low.c (the_low_target): Install NULL as
659 supports_z_point_type method.
660 * linux-x86-low.c (x86_supports_z_point_type): New function.
661 (x86_insert_point): Adjust to new insert_point interface. Use
662 insert_memory_breakpoint. Adjust to new
663 i386_low_insert_watchpoint interface.
664 (x86_remove_point): Adjust to remove_point interface. Use
665 remove_memory_breakpoint. Adjust to new
666 i386_low_remove_watchpoint interface.
667 (the_low_target): Install x86_supports_z_point_type.
668 * lynx-low.c (lynx_target_ops): Install NULL as
669 supports_z_point_type callback.
670 * nto-low.c (nto_supports_z_point_type): New.
671 (nto_insert_point, nto_remove_point): Adjust to new interface.
672 (nto_target_ops): Install nto_supports_z_point_type.
673 * mem-break.c: Adjust intro comment.
674 (struct raw_breakpoint) <raw_type, size>: New fields.
675 <inserted>: Update comment.
676 <shlib_disabled>: Delete field.
677 (enum bkpt_type) <gdb_breakpoint>: Delete value.
678 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
679 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
680 (raw_bkpt_type_to_target_hw_bp_type): New function.
681 (find_enabled_raw_code_breakpoint_at): New function.
682 (find_raw_breakpoint_at): New type and size parameters. Use them.
683 (insert_memory_breakpoint): New function, based off
684 set_raw_breakpoint_at.
685 (remove_memory_breakpoint): New function.
686 (set_raw_breakpoint_at): Reimplement.
687 (set_breakpoint): New, based on set_breakpoint_at.
688 (set_breakpoint_at): Reimplement.
689 (delete_raw_breakpoint): Go through the_target->remove_point
690 instead of assuming memory breakpoints.
691 (find_gdb_breakpoint_at): Delete.
692 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
693 (find_gdb_breakpoint): New function.
694 (set_gdb_breakpoint_at): Delete.
695 (z_type_supported): New function.
696 (set_gdb_breakpoint_1): New function, loosely based off
697 set_gdb_breakpoint_at.
698 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
699 (delete_gdb_breakpoint_at): Delete.
700 (delete_gdb_breakpoint_1): New function, loosely based off
701 delete_gdb_breakpoint_at.
702 (delete_gdb_breakpoint): New function.
703 (clear_gdb_breakpoint_conditions): Rename to ...
704 (clear_breakpoint_conditions): ... this. Don't handle a NULL
705 breakpoint.
706 (add_condition_to_breakpoint): Make static.
707 (add_breakpoint_condition): Take a struct breakpoint pointer
708 instead of an address. Adjust.
709 (gdb_condition_true_at_breakpoint): Rename to ...
710 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
711 z_type parameter.
712 (gdb_condition_true_at_breakpoint): Reimplement.
713 (add_breakpoint_commands): Take a struct breakpoint pointer
714 instead of an address. Adjust.
715 (gdb_no_commands_at_breakpoint): Rename to ...
716 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
717 parameter. Return true if no breakpoint was found. Change debug
718 output.
719 (gdb_no_commands_at_breakpoint): Reimplement.
720 (run_breakpoint_commands): Rename to ...
721 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
722 and change return type to boolean.
723 (run_breakpoint_commands): New function.
724 (gdb_breakpoint_here): Also check for Z1 breakpoints.
725 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
726 breakpoint. Go through the_target->remove_point instead of
727 assuming memory breakpoint.
728 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
729 software and hardware breakpoints.
730 (reinsert_raw_breakpoint): Go through the_target->insert_point
731 instead of assuming memory breakpoint.
732 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
733 software and hardware breakpoints.
734 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
735 Check both software and hardware breakpoints.
736 (validate_inserted_breakpoint): Assert the breakpoint is a
737 software breakpoint. Set the inserted flag to -1 instead of
738 setting shlib_disabled.
739 (delete_disabled_breakpoints): Adjust.
740 (validate_breakpoints): Only validate software breakpoints.
741 Adjust to inserted flag change.
742 (check_mem_read, check_mem_write): Skip breakpoint types other
743 than software breakpoints. Adjust to inserted flag change.
744 * mem-break.h (enum raw_bkpt_type): New enum.
745 (raw_breakpoint, struct process_info): Forward declare.
746 (Z_packet_to_target_hw_bp_type): Delete declaration.
747 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
748 (set_gdb_breakpoint, delete_gdb_breakpoint)
749 (clear_breakpoint_conditions): New declarations.
750 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
751 (breakpoint_inserted_here): Update comment.
752 (add_breakpoint_condition, add_breakpoint_commands): Replace
753 address parameter with a breakpoint pointer parameter.
754 (gdb_breakpoint_here): Update comment.
755 (delete_gdb_breakpoint_at): Delete.
756 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
757 * server.c (process_point_options): Take a struct breakpoint
758 pointer instead of an address. Adjust.
759 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
760 delete_gdb_breakpoint.
761 * spu-low.c (spu_target_ops): Install NULL as
762 supports_z_point_type method.
763 * target.h: Include mem-break.h.
764 (struct target_ops) <prepare_to_access_memory>: Update comment.
765 <supports_z_point_type>: New field.
766 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
767 instead of a char. Also take a raw breakpoint pointer.
768 * win32-arm-low.c (the_low_target): Install NULL as
769 supports_z_point_type.
770 * win32-i386-low.c (i386_supports_z_point_type): New function.
771 (i386_insert_point, i386_remove_point): Adjust to new interface.
772 (the_low_target): Install i386_supports_z_point_type.
773 * win32-low.c (win32_supports_z_point_type): New function.
774 (win32_insert_point, win32_remove_point): Adjust to new interface.
775 (win32_target_ops): Install win32_supports_z_point_type.
776 * win32-low.h (struct win32_target_ops):
777 <supports_z_point_type>: New method.
778 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
779 instead of a char. Also take a raw breakpoint pointer.
780
932539e3
PA
7812014-05-20 Pedro Alves <palves@redhat.com>
782
783 * mem-break.h: Include break-common.h.
784 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
785 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
786 (Z_packet_to_target_hw_bp_type): New declaration.
787 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
788 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
789 (Z_PACKET_ACCESS_WP): Delete macros.
790 (Z_packet_to_hw_type): Delete function.
791 * i386-low.h: Don't include break-common.h here.
792 (Z_packet_to_hw_type): Delete declaration.
793 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
794 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
795 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
796 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
797 * linux-aarch64-low.c: Don't include break-common.h here.
798 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
799 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
800 (Z_packet_to_target_hw_bp_type): Delete function.
801 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
802 function.
803 (mips_insert_point, mips_remove_point): Use
804 Z_packet_to_target_hw_bp_type.
805
4ff0d3d8
PA
8062014-05-20 Pedro Alves <palves@redhat.com>
807
808 * linux-aarch64-low.c: Include break-common.h.
809 (enum target_point_type): Delete.
810 (Z_packet_to_point_type): Rename to ...
811 (Z_packet_to_target_hw_bp_type): ... this, and return a
812 target_hw_bp_type instead.
813 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
814 instead of an enum target_point_type.
815 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
816 breakpoint type.
817 (aarch64_dr_state_insert_one_point)
818 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
819 (aarch64_handle_aligned_watchpoint)
820 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
821 Take an enum target_hw_bp_type instead of an enum
822 target_point_type.
823 (aarch64_supports_z_point_type): New function.
824 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
825 use Z_packet_to_target_hw_bp_type.
826
786dc519
JB
8272014-05-20 Joel Brobecker <brobecker@adacore.com>
828
829 * configure.ac: Only use -Werror by default when DEVELOPMENT
830 is true.
831 * configure: Regenerate.
832
9e0aa64f
JK
8332014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
834
835 Fix gdbserver qGetTLSAddr for x86_64 -m32.
836 * linux-x86-low.c (X86_64_USER_REGS): New.
837 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
838
2b577b92
YQ
8392014-04-28 Yao Qi <yao@codesourcery.com>
840
841 * Makefile.in (i386-avx512.c): Fix the typo of generated file
842 name.
843
94611da2
PA
8442014-04-25 Pedro Alves <palves@redhat.com>
845
846 PR server/16255
847 * linux-low.c (linux_attach_fail_reason_string): New function.
848 (linux_attach_lwp): Delete.
849 (linux_attach_lwp_1): Rename to ...
850 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
851 argument. Remove "initial" parameter. Return int instead of
852 void. Don't error or warn here.
853 (linux_attach): Adjust to call linux_attach_lwp. Call error on
854 failure to attach to the tgid. Call warning when failing to
855 attach to an lwp.
856 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
857 argument. Remove "initial" parameter. Return int instead of
858 void. Don't error or warn here.
859 (linux_attach_fail_reason_string): New declaration.
860 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
861 interface change. Use linux_attach_fail_reason_string.
862
01f9f808
MS
8632014-04-24 Michael Sturm <michael.sturm@mintel.com>
864 Walfred Tedeschi <walfred.tedeschi@intel.com>
865
866 * Makefile.in: Added rules to handle new files
867 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
868 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
869 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
870 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
871 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
872 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
873 x32-avx512-linux.o.
874 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
875 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
876 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
877 i386/x32-avx512.xml.
878 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
879 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
880 i386/x32-avx512-linux.xml.
881 * i387-fp.c (num_avx512_k_registers): New constant for number
882 of K registers.
883 (num_avx512_zmmh_low_registers): New constant for number of
884 lower ZMM registers (0-15).
885 (num_avx512_zmmh_high_registers): New constant for number of
886 higher ZMM registers (16-31).
887 (num_avx512_ymmh_registers): New contant for number of higher
888 YMM registers (ymm16-31 added by avx521 on x86_64).
889 (num_avx512_xmm_registers): New constant for number of higher
890 XMM registers (xmm16-31 added by AVX512 on x86_64).
891 (struct i387_xsave): Add space for AVX512 registers.
892 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
893 Add code to handle AVX512 registers.
894 (i387_xsave_to_cache): Add code to handle AVX512 registers.
895 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
896 prototypei from generated file.
897 (tdesc_amd64_avx512_linux): Likewise.
898 (init_registers_x32_avx512_linux): Likewise.
899 (tdesc_x32_avx512_linux): Likewise.
900 (init_registers_i386_avx512_linux): Likewise.
901 (tdesc_i386_avx512_linux): Likewise.
902 (x86_64_regmap): Add AVX512 registers.
903 (x86_linux_read_description): Add code to handle AVX512 XSTATE
904 mask.
905 (initialize_low_arch): Add code to initialize AVX512 registers.
906
51aa91f9
PA
9072014-04-23 Pedro Alves <palves@redhat.com>
908
909 * mem-break.c (find_gdb_breakpoint_at): Make static.
910 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
911
a4165e94
PA
9122014-04-23 Pedro Alves <palves@redhat.com>
913
914 * i386-low.c: Don't include break-common.h here.
915 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
916 prototype to take target_hw_bp_type as argument instead of a Z
917 packet char.
918 * i386-low.h: Include break-common.h here.
919 (Z_packet_to_hw_type): Declare.
920 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
921 prototypes.
922 * linux-x86-low.c (x86_insert_point): Convert the packet number to
923 a target_hw_bp_type before calling i386_low_insert_watchpoint.
924 (x86_remove_point): Convert the packet number to a
925 target_hw_bp_type before calling i386_low_remove_watchpoint.
926 * win32-i386-low.c (i386_insert_point): Convert the packet number
927 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
928 (i386_remove_point): Convert the packet number to a
929 target_hw_bp_type before calling i386_low_remove_watchpoint.
930
b8acf843
PA
9312014-04-23 Pedro Alves <palves@redhat.com>
932
933 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
934
d708bcd1
PA
9352014-04-10 Pedro Alves <palves@redhat.com>
936
937 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
938 Check if the condition or command is NULL before checking if the
939 breakpoint is known. On success, return true.
940 * mem-break.h (add_breakpoint_condition): Document return.
941 (add_breakpoint_commands): Add describing comment.
942 * server.c (skip_to_semicolon): New function.
943 (process_point_options): Use it.
944
2eec7d5b
PA
9452014-04-09 Pedro Alves <palves@redhat.com>
946
947 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
948 to lwpid_of.
949
fa96cb38
PA
9502014-02-27 Pedro Alves <palves@redhat.com>
951
952 PR 12702
953 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
954 macros.
955 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
956 output.
957 (last_thread_of_process_p): Take a PID argument instead of a
958 thread pointer.
959 (linux_wait_for_lwp): Delete.
960 (num_lwps, check_zombie_leaders, not_stopped_callback): New
961 functions.
962 (linux_low_filter_event): New function, party factored out from
963 linux_wait_for_event.
964 (linux_wait_for_event): Rename to ...
965 (linux_wait_for_event_filtered): ... this. Add new filter ptid
966 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
967 sigsuspend. Check for zombie leaders.
968 (linux_wait_for_event): Reimplement as wrapper around
969 linux_wait_for_event_filtered.
970 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
971 a normal or signal exit is seen, it's the whole process exiting.
972 (wait_for_sigstop): No longer a for_each_inferior callback.
973 Rewrite on top of linux_wait_for_event_filtered.
974 (stop_all_lwps): Call wait_for_sigstop directly.
975 * server.c (resume, handle_target_event): Handle
976 TARGET_WAITKIND_NO_RESUMED.
977
d763de10
JB
9782014-02-26 Joel Brobecker <brobecker@adacore.com>
979
980 * win32-low.c (psapi_get_dll_name,
981 * win32_CreateToolhelp32Snapshot): Delete.
982 (win32_CreateToolhelp32Snapshot, win32_Module32First)
983 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
984 Delete.
985 (handle_load_dll): Add function description.
986 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
987
850a0f76
JB
9882014-02-26 Joel Brobecker <brobecker@adacore.com>
989
990 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
991 Add comment.
992 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
993 base address when calling win32_add_one_solib.
994 (handle_load_dll): Delete local variable load_addr.
995 Remove 0x1000 offset applied to DLL base address when calling
996 win32_add_one_solib.
997 (handle_unload_dll): Add comment.
998
f25b3fc3
JB
9992014-02-26 Joel Brobecker <brobecker@adacore.com>
1000
1001 * win32-low.c (win32_add_all_dlls): Renames
1002 win32_ensure_ntdll_loaded. Rewrite function documentation.
1003 Adjust implementation to always load all DLLs.
1004 Add 0x1000 offset to DLL base address when calling
1005 win32_add_one_solib.
1006 (child_initialization_done): New static global.
1007 (do_initial_child_stuff): Set child_initialization_done to
1008 zero during child initialization, and 1 after. Replace call
1009 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
1010 Add comment.
1011 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
1012 (handle_unload_dll): Add function documentation.
1013 (get_child_debug_event): Ignore load and unload DLL events
1014 during child initialization.
1015
d86d4aaf
DE
10162014-02-20 Doug Evans <dje@google.com>
1017
3bc32da3 1018 Remove global all_lwps.
d86d4aaf
DE
1019 * inferiors.h (ptid_of): Move here from linux-low.h.
1020 (pid_of, lwpid_of): Ditto.
1021 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
1022 parameter is a struct thread_info * now.
1023 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
1024 directly. Pass &all_threads to find_inferior instead of &all_lwps.
1025 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
1026 directly.
1027 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
1028 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
1029 * linux-arm-low.c (update_registers_callback): Update, "entry"
1030 parameter is a struct thread_info * now.
1031 Fetch lwpid from current_inferior directly.
1032 (arm_insert_point): Pass &all_threads to find_inferior instead of
1033 &all_lwps.
1034 (arm_remove_point): Ditto.
1035 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
1036 (arm_prepare_to_resume): Fetch pid from thread.
1037 (arm_read_description): Fetch lwpid from current_inferior directly.
1038 * linux-low.c (all_lwps): Delete.
1039 (delete_lwp): Delete call to remove_inferior.
1040 (handle_extended_wait): Fetch lwpid from thread.
1041 (add_lwp): Don't set lwp->entry.id. Remove call to
1042 add_inferior_to_list.
1043 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
1044 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
1045 (kill_one_lwp_callback): Ditto.
1046 (linux_kill): Don't dereference NULL pointer.
1047 Fetch ptid,lwpid from thread.
1048 (get_detach_signal): Fetch ptid from thread.
1049 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
1050 Simplify call to regcache_invalidate_thread.
1051 (delete_lwp_callback): Update, "entry" parameter is a
1052 struct thread_info * now. Fetch pid from thread.
1053 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
1054 (status_pending_p_callback): Update, "entry" parameter is a
1055 struct thread_info * now. Fetch ptid from thread.
1056 (find_lwp_pid): Update, "entry" parameter is a
1057 struct thread_info * now.
1058 (linux_wait_for_lwp): Fetch pid from thread.
1059 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
1060 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
1061 (enqueue_one_deferred_signal): Fetch lwpid from thread.
1062 (dequeue_one_deferred_signal): Ditto.
1063 (cancel_breakpoint): Fetch ptid from current_inferior.
1064 (linux_wait_for_event): Pass &all_threads to find_inferior,
1065 not &all_lwps. Fetch ptid, lwpid from thread.
1066 (count_events_callback): Update, "entry" parameter is a
1067 struct thread_info * now.
1068 (select_singlestep_lwp_callback): Ditto.
1069 (select_event_lwp_callback): Ditto.
1070 (cancel_breakpoints_callback): Ditto.
1071 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
1072 not &all_lwps.
1073 (select_event_lwp): Ditto. Fetch ptid from event_thread.
1074 (unsuspend_one_lwp): Update, "entry" parameter is a
1075 struct thread_info * now.
1076 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
1077 not &all_lwps.
1078 (linux_stabilize_threads): Ditto. And for for_each_inferior.
1079 Fetch lwpid from thread, not lwp.
1080 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
1081 Pass &all_threads to find_inferior, not &all_lwps.
1082 (send_sigstop): Fetch lwpid from thread, not lwp.
1083 (send_sigstop_callback): Update, "entry" parameter is a
1084 struct thread_info * now.
1085 (suspend_and_send_sigstop_callback): Ditto.
1086 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
1087 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
1088 struct thread_info * now.
1089 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
1090 from thread, lwp.
1091 (lwp_running): Update, "entry" parameter is a
1092 struct thread_info * now.
1093 (stop_all_lwps): Fetch ptid from thread.
1094 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
1095 (linux_resume_one_lwp): Fetch lwpid from thread.
1096 (linux_set_resume_request): Update, "entry" parameter is a
1097 struct thread_info * now. Fetch pid, lwpid from thread.
1098 (resume_status_pending_p): Update, "entry" parameter is a
1099 struct thread_info * now.
1100 (need_step_over_p): Ditto. Fetch lwpid from thread.
1101 (start_step_over): Fetch lwpid from thread.
1102 (linux_resume_one_thread): Update, "entry" parameter is a
1103 struct thread_info * now. Fetch lwpid from thread.
1104 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
1105 (proceed_one_lwp): Update, "entry" parameter is a
1106 struct thread_info * now. Fetch lwpid from thread.
1107 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
1108 struct thread_info * now.
1109 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
1110 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
1111 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
1112 directly.
1113 (regsets_store_inferior_registers): Ditto.
1114 (fetch_register, store_register): Ditto.
1115 (linux_read_memory, linux_write_memory): Ditto.
1116 (linux_request_interrupt): Ditto.
1117 (linux_read_auxv): Ditto.
1118 (linux_xfer_siginfo): Ditto.
1119 (linux_qxfer_spu): Ditto.
1120 (linux_qxfer_libraries_svr4): Ditto.
1121 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
1122 moved to inferiors.h.
1123 (get_lwp): Delete.
1124 (get_thread_lwp): Update.
1125 (struct lwp_info): Delete member "entry". Simplify comment for
1126 member "thread".
1127 (all_lwps): Delete.
1128 * linux-mips-low.c (mips_read_description): Fetch lwpid from
1129 current_inferior directly.
1130 (update_watch_registers_callback): Update, "entry" parameter is a
1131 struct thread_info * now. Fetch pid from thread.
1132 (mips_linux_prepare_to_resume): Fetch ptid from thread.
1133 (mips_insert_point): Fetch lwpid from current_inferior.
1134 Pass &all_threads to find_inferior, not &all_lwps.
1135 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
1136 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
1137 directly.
1138 (mips_stopped_data_address): Ditto.
1139 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
1140 directly.
1141 * linux-tile-low.c (tile_arch_setup): Ditto.
1142 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
1143 (update_debug_registers_callback): Update, "entry" parameter is a
1144 struct thread_info * now. Fetch pid from thread.
1145 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
1146 Pass &all_threads to find_inferior, not &all_lwps.
1147 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
1148 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
1149 Pass &all_threads to find_inferior, not &all_lwps.
1150 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
1151 (i386_dr_low_get_status): Ditto.
1152 (x86_linux_prepare_to_resume): Fetch ptid from thread.
1153 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
1154 (x86_linux_read_description): Ditto.
1155 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
1156
3b8361aa
DE
11572014-02-20 Doug Evans <dje@google.com>
1158
1159 * inferiors.c (get_first_inferior): Fix buglet.
1160
f7667f0d
DE
11612014-02-19 Doug Evans <dje@google.com>
1162
1163 * gdbthread.h (add_thread): Change result type to struct thread_info *.
1164 * inferiors.c (add_thread): Change result type to struct thread_info *.
1165 All callers updated.
1166 (add_lwp): Call add_thread here instead of in callers.
1167 All callers updated.
1168 * linux-low.h (get_lwp_thread): Rewrite.
1169 (struct lwp_info): New member "thread".
1170
b3312d80
DE
11712014-02-19 Doug Evans <dje@google.com>
1172
1173 * linux-low.c (add_lwp): Change result to struct lwp_info *.
1174 All callers updated.
1175
ecc6f45c
DE
11762014-02-19 Doug Evans <dje@google.com>
1177
1178 * inferiors.c (add_thread): Fix whitespace.
1179
649ebbca
DE
11802014-02-19 Doug Evans <dje@google.com>
1181
1182 * dll.c (clear_dlls): Replace accessing list implemention details
1183 with API function.
1184 * gdbthread.h (get_first_thread): Declare.
1185 * inferiors.c (for_each_inferior_with_data): New function.
1186 (get_first_thread): New function.
1187 (find_thread_ptid): Simplify.
1188 (get_first_inferior): New function.
1189 (clear_list): Delete.
1190 (one_inferior_p): New function.
1191 (clear_inferior_list): New function.
1192 (clear_inferiors): Update.
1193 * inferiors.h (for_each_inferior_with_data): Declare.
1194 (clear_inferior_list): Declare.
1195 (one_inferior_p): Declare.
1196 (get_first_inferior): Declare.
1197 * linux-low.c (linux_wait_for_event): Replace accessing list
1198 implemention details with API function.
1199 * server.c (target_running): Ditto.
1200 (accumulate_file_name_length): New function.
1201 (emit_dll_description): New function.
1202 (handle_qxfer_libraries): Replace accessing list implemention
1203 details with API function.
1204 (handle_qxfer_threads_worker): New function.
1205 (handle_qxfer_threads_proper): Replace accessing list implemention
1206 details with API function.
1207 (handle_query): Ditto.
1208 (visit_actioned_threads_callback_ftype): New typedef.
1209 (visit_actioned_threads_data): New struct.
1210 (visit_actioned_threads): Rewrite to be find_inferior callback.
1211 (resume): Call find_inferior.
1212 (handle_status): Replace accessing list implemention
1213 details with API function.
1214 (process_serial_event): Replace accessing list implemention details
1215 with API function.
1216 * target.c (set_desired_inferior): Replace accessing list implemention
1217 details with API function.
1218 * tracepoint.c (same_process_p): New function.
1219 (gdb_agent_about_to_close): Replace accessing list implemention
1220 details with API function.
1221 * win32-low.c (child_delete_thread): Replace accessing list
1222 implemention details with API function.
1223 (match_dll_by_basename): New function.
1224 (dll_is_loaded_by_basename): New function.
1225 (win32_ensure_ntdll_loaded): Replace accessing list implemention
1226 details call to dll_is_loaded_by_basename.
1227
80894984
DE
12282014-02-19 Doug Evans <dje@google.com>
1229
1230 * dll.h (struct dll_info): Add comment.
1231 * gdbthread.h (struct thread_info): Add comment.
1232 (current_ptid): Simplify.
1233 * inferiors.c (add_process): Update.
1234 (remove_process): Update.
1235 * inferiors.h (struct process_info): Rename member "head" to "entry".
1236 * linux-low.c (delete_lwp): Update.
1237 (add_lwp): Update.
1238 (last_thread_of_process_p): Update.
1239 (kill_one_lwp_callback, linux_kill): Update.
1240 (status_pending_p_callback): Update.
1241 (wait_for_sigstop): Update. Simplify read of ptid.
1242 (start_step_over): Update.
1243 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
1244 (get_lwp_thread): Update.
1245 (struct lwp_info): Rename member "head" to "entry".
1246 * regcache.h (inferior_list_entry): Delete.
1247 * server.c (kill_inferior_callback): Update.
1248 (detach_or_kill_inferior_callback): Update.
1249 (print_started_pid): Update.
1250 (print_attached_pid): Update.
1251 (process_serial_event): Simplify read of ptid.
1252 * thread-db.c (thread_db_create_event): Update.
1253 (thread_db_get_tls_address): Update.
1254 * win32-low.c (current_inferior_ptid): Simplify.
1255
46917d26
TT
12562014-02-19 Tom Tromey <tromey@redhat.com>
1257
1258 * target.h (struct target_ops) <supports_btrace>: Add target_ops
1259 argument.
1260 (target_supports_btrace): Update.
1261
0759a81e
YQ
12622014-02-14 Yao Qi <yao@codesourcery.com>
1263
1264 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
1265 (rsp-low-ipa.o): New target.
1266
a7191e8b
TT
12672014-02-12 Tom Tromey <tromey@redhat.com>
1268
1269 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
1270 convert_ascii_to_int.
1271 * regcache.c (registers_to_string): Likewise.
1272 * remote-utils.c (decode_M_packet): Likewise.
1273 * server.c (process_serial_event): Likewise.
1274
ff0e980e
TT
12752014-02-12 Tom Tromey <tromey@redhat.com>
1276
1277 * server.c (handle_query, handle_v_run): Use hex2bin, not
1278 unhexify.
1279 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
1280
e9371aff
TT
12812014-02-12 Tom Tromey <tromey@redhat.com>
1282
1283 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
1284 convert_int_to_ascii.
1285 * regcache.c (registers_to_string, collect_register_as_string):
1286 Likewise.
1287 * remote-utils.c (look_up_one_symbol, relocate_instruction):
1288 Likewise.
1289 * server.c (process_serial_event): Likewise.
1290 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
1291 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
1292
971dc0b8
TT
12932014-02-12 Tom Tromey <tromey@redhat.com>
1294
1295 * remote-utils.c (look_up_one_symbol, monitor_output): Use
1296 bin2hex, not hexify.
1297 * tracepoint.c (cmd_qtstatus): Likewise.
1298
0a822afb
TT
12992014-02-12 Tom Tromey <tromey@redhat.com>
1300
1301 * remote-utils.c (monitor_output): Pass explicit length to
1302 hexify.
1303
9c3d6531
TT
13042014-02-12 Tom Tromey <tromey@redhat.com>
1305
1306 * tracepoint.c: Include rsp-low.h.
1307 * server.c: Include rsp-low.h.
1308 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
1309 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
1310 declare.
1311 * remote-utils.c: Include rsp-low.h.
1312 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
1313 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
1314 (convert_int_to_ascii, convert_ascii_to_int): Move to
1315 common/rsp-low.c.
1316 * regcache.c: Include rsp-low.h.
1317 * ax.c: Include rsp-low.h.
1318 * Makefile.in (SFILES): Add common/rsp-low.c.
1319 (OBS): Add rsp-low.o.
1320 (rsp-low.o): New target.
1321
01fd3ea5
TT
13222014-02-12 Tom Tromey <tromey@redhat.com>
1323
1324 * utils.h (pulongest, plongest, phex_nz): Don't declare.
1325 Include print-utils.h.
1326 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
1327 (plongest, thirty_two, phex_nz): Remove.
1328 * Makefile.in (SFILES): Add common/print-utils.c.
1329 (OBS): Add print-utils.o.
1330 (print-utils-ipa.o): New target.
1331 (print-utils.o): New target.
1332 (IPA_OBJS): Add print-utils-ipa.o.
1333
e99dc820
TT
13342014-02-06 Tom Tromey <tromey@redhat.com>
1335
1336 * Makefile.in (SFILES): Fix indentation.
1337
ee1e2d4f
DE
13382014-02-05 Doug Evans <dje@google.com>
1339
1340 * linux-low.c (linux_wait_for_event): Improve comment.
1341 (linux_wait_1): Keep current_inferior in sync with event_child.
1342
f5a02773
DE
13432014-01-22 Doug Evans <dje@google.com>
1344
1345 * gdbthread.h (gdb_id_to_thread): Delete, unused.
1346
87ce2a04
DE
13472014-01-22 Doug Evans <dje@google.com>
1348
1349 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
1350 * configure: Regenerate.
1351 * config.in: Regenerate.
1352 * Makefile.in (SFILES): Add debug.c.
1353 (OBS): Add debug.o.
1354 * debug.c: New file.
1355 * debug.h: New file.
1356 * linux-aarch64-low.c (*): Update all debugging printfs to use
1357 debug_printf instead of fprintf.
1358 * linux-arm-low.c (*): Ditto.
1359 * linux-cris-low.c (*): Ditto.
1360 * linux-crisv32-low.c (*): Ditto.
1361 * linux-m32r-low.c (*): Ditto.
1362 * linux-sparc-low.c (*): Ditto.
1363 * linux-x86.c (*): Ditto.
1364 * linux-low.c (*): Ditto.
1365 (linux_wait_1): Add calls to debug_enter, debug_exit.
1366 (linux_wait): Remove redundant debugging printf.
1367 (stop_all_lwps): Add calls to debug_enter, debug_exit.
1368 (linux_resume, unstop_all_lwps): Ditto.
1369 * mem-break.c (*): Update all debugging printfs to use
1370 debug_printf instead of fprintf.
1371 * remote-utils.c (*): Ditto.
1372 * thread-db.c (*): Ditto.
1373 * server.c #include <ctype.h>, "gdb_vecs.h".
1374 (debug_threads): Moved to debug.c.
1375 (*): Update all debugging printfs to use debug_printf instead of
1376 fprintf.
1377 (start_inferior): Replace call to fflush with call to debug_flush.
1378 (monitor_show_help): Mention set debug-format.
1379 (parse_debug_format_options): New function.
1380 (handle_monitor_command): Handle "monitor set debug-format".
1381 (gdbserver_usage): Mention --debug-format.
1382 (main): Parse --debug-format.
1383 * server.h (debug_threads): Declaration moved to debug.h.
1384 #include "debug.h".
1385 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
1386 trace_debug_1 that uses debug_printf.
1387 (tracepoint_look_up_symbols): Update all debugging printfs to use
1388 debug_printf instead of fprintf.
1389
e671835b
BS
13902014-01-20 Baruch Siach <baruch@tkos.co.il>
1391
1392 * linux-xtensa-low.c: Include asm/ptrace.h instead of
1393 sys/ptrace.h.
1394
b5737fa9
PA
13952014-01-17 Pedro Alves <palves@redhat.com>
1396
ea38d2a9 1397 PR build/16445
c7faa97a
PA
1398 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
1399 defined after including gdb_proc_service.h.
b5737fa9 1400
40ed484e
DE
14012014-01-16 Doug Evans <dje@google.com>
1402
1403 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
1404 (match_dll): Use it.
1405
969c39fb
MM
14062014-01-16 Markus Metzger <markus.t.metzger@intel.com>
1407
1408 * target.h (target_ops) <read_btrace>: Change parameters and
1409 return type to allow error reporting.
1410 * server.c (handle_qxfer_btrace): Support delta reads. Pass
1411 trace reading errors on.
1412 * linux-low.c (linux_low_read_btrace): Pass trace reading
1413 errors on.
1414 (linux_low_disable_btrace): New.
1415
ab7f45ba
DE
14162014-01-15 Doug Evans <dje@google.com>
1417
1418 * inferiors.c (thread_id_to_gdb_id): Delete.
1419 * inferiors.h (thread_id_to_gdb_id): Delete.
1420
66af0f44
EZ
14212014-01-13 Eli Zaretskii <eliz@gnu.org>
1422
1423 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
1424 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
1425 versions.
1426
9939e131
PA
14272014-01-08 Pedro Alves <palves@redhat.com>
1428
1429 * server.c (handle_status): Don't discard previous queued stop
1430 replies or thread's pending status here.
1431 (main) <disconnection>: Do it here instead.
1432
b7ea362b
PA
14332014-01-08 Pedro Alves <palves@redhat.com>
1434
1435 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
1436 * server.c (visit_actioned_threads, handle_pending_status): New
1437 function.
1438 (handle_v_cont): Factor out parts to ...
1439 (resume): ... this new function. If in all-stop, and a thread
1440 being resumed has a pending status, report it without actually
1441 resuming.
1442 (myresume): Adjust to use the new 'resume' function.
1443 (clear_pending_status_callback, set_pending_status_callback)
1444 (find_status_pending_thread_callback): New functions.
1445 (handle_status): Handle the case of multiple threads having
1446 interesting statuses to report. Report threads' real last signal
1447 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
1448 with an interesting thread to report the status for, instead of
1449 always reporting the status of the first thread.
1450
28498c42
JB
14512014-01-01 Joel Brobecker <brobecker@adacore.com>
1452
1453 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
1454 * gdbreplay.c (gdbreplay_version): Likewise.
1455
f45c82da
YZ
14562013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
1457
1458 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
1459 iov.iov_len with the real length in use.
1460
379a5e2d
JB
14612013-12-13 Joel Brobecker <brobecker@adacore.com>
1462
1463 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
1464 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
1465 for all targets that use win32-low.c.
1466 * win32-low.c (win32_ensure_ntdll_loaded): New function.
1467 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
1468
4210d83e
PA
14692013-12-13 Pedro Alves <palves@redhat.com>
1470
1471 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
1472 if equal to TARGET_WAITKIND_LOADED.
1473 * win32-low.c (cached_status): New static global.
1474 (win32_wait): Add declaration.
1475 (do_initial_child_stuff): Flush all initial pending debug events
1476 up to the initial breakpoint.
1477 (win32_wait): If CACHED_STATUS was set, return that instead
1478 of doing a real wait. Remove the code resuming the execution
1479 of the inferior after receiving a TARGET_WAITKIND_LOADED event
1480 during the initial phase. Also remove the code changing
1481 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
1482 TARGET_WAITKIND_STOPPED.
1483
e7f0d979
YQ
14842013-12-11 Yao Qi <yao@codesourcery.com>
1485
1486 * notif.c (handle_notif_ack): Return 0 if no notification
1487 matches.
1488
ebcf782c
DE
14892013-11-20 Doug Evans <dje@google.com>
1490
1491 * linux-low.c (linux_set_resume_request): Fix comment.
1492
20ad9378
DE
14932013-11-20 Doug Evans <dje@google.com>
1494
1495 * linux-low.c (resume_status_pending_p): Tweak comment.
1496
a196ebeb
WT
14972013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
1498
1499 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
1500 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
1501 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
1502 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
1503 (srv_amd64_regobj): Add amd64-mpx.o.
1504 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
1505 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
1506 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
1507 * i387-fp.c (num_pl_bnd_register) Added constant.
1508 (num_pl_bnd_cfg_registers) Added constant.
1509 (struct i387_xsave) Added reserved area and MPX fields.
1510 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
1511 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
1512 function.
1513 (tdesc_i386_mpx_linux): Add MPX amd64 target.
1514 (init_registers_amd64_mpx_linux): Declare new function.
1515 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
1516 (x86_64_regmap): Add MPX registers.
1517 (x86_linux_read_description): Add MPX case.
1518 (initialize_low_arch): Initialize MPX targets.
1519
0080a2f6
TT
15202013-11-18 Tom Tromey <tromey@redhat.com>
1521
1522 * configure: Rebuild.
1523 * configure.ac: Don't check for stdlib.h.
1524 * gdbreplay.c: Unconditionally include stdlib.h.
1525
2978b111
TT
15262013-11-18 Tom Tromey <tromey@redhat.com>
1527
1528 * config.in: Rebuild.
1529 * configure: Rebuild.
1530 * configure.ac: Don't use AC_HEADER_DIRENT.
1531
a3d08894
TT
15322013-11-18 Tom Tromey <tromey@redhat.com>
1533
1534 * server.h: Don't check HAVE_STRING_H.
1535 * gdbreplay.c: Don't check HAVE_STRING_H.
1536 * configure: Rebuild.
1537
0a5dd17d
TT
15382013-11-18 Tom Tromey <tromey@redhat.com>
1539
1540 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
1541 LIBGNU.
1542
1bd2f0ba
TT
15432013-11-08 Tom Tromey <tromey@redhat.com>
1544
1545 * configure, config.in: Rebuild.
1546 * configure.ac: Remove unused configury.
1547
3266f10b
TT
15482013-11-08 Tom Tromey <tromey@redhat.com>
1549
1550 * acinclude.m4: Include common.m4, codeset.m4.
1551 * configure, config.in: Rebuild.
1552 * configure.ac: Use GDB_AC_COMMON.
1553
6682d959
AA
15542013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
1555
1556 * linux-s390-low.c (HWCAP_S390_TE): New define.
1557 (s390_arch_setup): Consider the TE field in the HWCAP for
1558 determining 'have_regset_tdb'.
1559
fd0a4d76
SDJ
15602013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
1561
1562 PR gdb/16014
1563 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
1564 call to sizeof.
1565
1a3d890b
PA
15662013-10-02 Pedro Alves <palves@redhat.com>
1567
1568 * server.c (process_serial_event): Don't output "GDBserver
1569 exiting" if GDB is connected through stdio.
1570 * target.c (mywait): Likewise, be silent if GDB is connected
1571 through stdio.
1572
97ad4581
JB
15732013-10-01 Joel Brobecker <brobecker@adacore.com>
1574
1575 * lynx-low.c (lynx_add_threads_after_attach): New function.
1576 (lynx_attach): Remove call to add_thread. Add call to
1577 lynx_add_threads_after_attach instead.
1578
5b4e221c
MF
15792013-09-28 Mike Frysinger <vapier@gentoo.org>
1580
1581 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
1582 * config.in, configure: Regenerated.
1583
ee47b2f8
YQ
15842013-09-18 Yao Qi <yao@codesourcery.com>
1585
1586 PR server/15959
1587 * server.c (start_inferior): Clear 'resume_info'.
1588
d6707650 15892013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 1590
d6707650
JW
1591 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
1592 for each register.
1593
9243dd0e 15942013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 1595
9243dd0e
JW
1596 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
1597 linux-tile-low.o to srv_tgtobj.
1598
c623a6ef
WN
15992013-09-16 Will Newton <will.newton@linaro.org>
1600
1601 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
1602 out regs.
1603
fb71d39e
PA
16042013-09-06 Pedro Alves <palves@redhat.com>
1605
1606 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
1607 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
1608 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
1609 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
1610 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
1611 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
1612
8e7e9910
PA
16132013-09-06 Pedro Alves <palves@redhat.com>
1614
1615 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
1616 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
1617
7c3a12ca
PA
16182013-09-06 Pedro Alves <palves@redhat.com>
1619
1620 * linux-amd64-ipa.c: Include tracepoint.h.
1621 * linux-i386-ipa.c: Include tracepoint.h.
1622
8eb3d7b6
RW
16232013-09-06 Ricard Wanderlof <ricardw@axis.com>
1624
1625 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
1626 (ps_get_thread_area): New function.
1627
eddddb9d
RW
16282013-09-06 Ricard Wanderlof <ricardw@axis.com>
1629
1630 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
1631 (initialize_low_arch): Call init_registers_crisv32 rather than
1632 init_register_crisv32.
1633
533b0600
PA
16342013-09-05 Pedro Alves <palves@redhat.com>
1635
1636 * server.h (handle_vFile, hostio_last_error_from_errno): Move
1637 to ...
1638 * hostio.h: ... this new file.
1639 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
1640 win32-low.c: Include hostio.h.
1641
0ce3d3b5
PA
16422013-09-05 Pedro Alves <palves@redhat.com>
1643
1644 * server.h (gdb_client_data, handler_func, callback_handler_func)
1645 (delete_file_handler, add_file_handler, append_callback_event)
1646 (delete_callback_event, start_event_loop, initialize_event_loop):
1647 Move to event-loop.h and include it.
1648 * event-loop.h: New file.
1649
799cdc37
PA
16502013-09-05 Pedro Alves <palves@redhat.com>
1651
1652 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
1653 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
1654 (loaded_dll, unloaded_dll): Move to ...
1655 * dll.h: ... this new file.
1656 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
1657
6a6bbd9d
PA
16582013-09-05 Pedro Alves <palves@redhat.com>
1659
1660 * server.h (current_process, get_thread_process, all_processes)
1661 (add_inferior_to_list, for_each_inferior, current_inferior)
1662 (remove_inferior, add_process, remove_process, find_process_pid)
1663 (have_started_inferiors_p, have_attached_inferiors_p)
1664 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
1665 (clear_inferiors, find_inferior, find_inferior_id)
1666 (inferior_target_data, set_inferior_target_data)
1667 (inferior_regcache_data, set_inferior_regcache_data): Move to
1668 inferiors.h, and include it.
1669 * inferiors.h: New file.
1670
f699aaba
PA
16712013-09-05 Pedro Alves <palves@redhat.com>
1672
1673 * server.h (struct emit_ops, current_insn_ptr, emit_error):
1674 Move ...
1675 * ax.h: ... here.
1676
c144c7a0
PA
16772013-09-05 Pedro Alves <palves@redhat.com>
1678
1679 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
1680 tracepoint.h.
1681 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
1682 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
1683 (handle_tracepoint_general_set, handle_tracepoint_query)
1684 (tracepoint_finished_step, tracepoint_was_hit)
1685 (release_while_stepping_state_list, current_traceframe)
1686 (in_readonly_region, traceframe_read_mem)
1687 (fetch_traceframe_registers, traceframe_read_sdata)
1688 (traceframe_read_info, struct fast_tpoint_collect_status)
1689 (fast_tracepoint_collecting, force_unlock_trace_buffer)
1690 (handle_tracepoit_bkpts, initialize_low_tracepoint)
1691 (supply_fast_tracepoint_registers)
1692 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
1693 (ipa_tdesc, claim_trampoline_space)
1694 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
1695 (agent_mem_read, agent_get_trace_state_variable_value)
1696 (agent_set_trace_state_variable_value, agent_tsv_read)
1697 (agent_mem_read_string, get_raw_reg_func_addr)
1698 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
1699 * tracepoint.h: ... this new file.
1700
ff42e6ab
PA
17012013-09-05 Pedro Alves <palves@redhat.com>
1702
1703 * server.h (perror_with_name, error, fatal, warning, paddress)
1704 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
1705 include it.
1706 * utils.h: New file.
1707
541af0f4
PA
17082013-09-05 Pedro Alves <palves@redhat.com>
1709
1710 * server.h (remote_debug, noack_mode, transport_is_reliable)
1711 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
1712 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
1713 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
1714 (write_enn, initialize_async_io, enable_async_io)
1715 (disable_async_io, check_remote_input_interrupt_request)
1716 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
1717 (dead_thread_notify, prepare_resume_reply)
1718 (decode_address_to_semicolon, decode_address, decode_m_packet)
1719 (decode_M_packet, decode_X_packet, decode_xfer_write)
1720 (decode_search_memory_packet, unhexify, hexify)
1721 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
1722 (look_up_one_symbol, relocate_instruction)
1723 (monitor_output): Move to remote-utils.h, and include it.
1724 * remote-utils.h: New file.
1725
eebdf26b
PA
17262013-09-05 Pedro Alves <palves@redhat.com>
1727
1728 * server.h (_): Delete.
1729
3aafd2ff
PA
17302013-09-02 Pedro Alves <palves@redhat.com>
1731
1732 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
1733 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
1734 allocated.
1735 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
1736
cee83bcb
PM
17372013-09-02 Pierre Muller <muller@sourceware.org>
1738
1739 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
1740 or WriteProcessMemory complete successfully and handle
1741 ERROR_PARTIAL_COPY error.
1742
9a13b2fa
PA
17432013-09-02 Pedro Alves <palves@redhat.com>
1744
1745 * server.c (gdb_read_memory): Return -1 on traceframe memory read
1746 error instead of EIO.
1747
602e3198
JK
17482013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1749
1750 PR server/15604
1751 * linux-low.c: Include filestuff.h.
1752 (linux_create_inferior) <pid == 0>: Call close_most_fds.
1753 * lynx-low.c: Include filestuff.h.
1754 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
1755 * server.c: Include filestuff.h.
1756 (main): Call notice_open_fds.
1757 * spu-low.c: Include filestuff.h.
1758 (spu_create_inferior) <pid == 0>: Call close_most_fds.
1759
96d7229d
LM
17602013-08-22 Luis Machado <lgustavo@codesourcery.com>
1761
1762 * Makefile.in: Explain why ../target and ../nat are not
1763 listed as include file search paths.
1764 (linux-waitpid.o): New object file rule.
1765 * configure.srv (srv_native_linux_obj): New variable.
1766 Replace all occurrences of linux native object files with
1767 $srv_native_linux_obj.
1768 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
1769 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
1770 (linux_enable_event_reporting): Remove declaration.
1771 (my_waitpid): Moved to common/linux-waitpid.c.
1772 (linux_wait_for_event): Pass ptid when calling
1773 linux_enable_event_reporting.
1774 (linux_supports_tracefork_flag): Remove.
1775 (linux_enable_event_reporting): Likewise.
1776 (linux_tracefork_grandchild): Remove.
1777 (STACK_SIZE): Moved to common/linux-ptrace.c.
1778 (linux_tracefork_child): Remove.
1779 (linux_test_for_tracefork): Remove.
1780 (linux_look_up_symbols): Call linux_supports_traceclone.
1781 (initialize_low): Remove call to linux_test_for_tracefork.
1782 * linux-low.h (PTRACE_TYPE_ARG3): Move to
1783 common/linux-ptrace.h.
1784 (PTRACE_TYPE_ARG4): Likewise.
1785 Include linux-ptrace.h.
1786
32940073
PA
17872013-08-21 Pedro Alves <palves@redhat.com>
1788
1789 * config.in: Renegerate.
1790
33b60d58 17912013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 1792
33b60d58
LM
1793 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
1794 (SFILES): Remove $(srcdir)/common/target-common.c and
1795 add $(srcdir)/target/waitstatus.c.
1796 (OBS): Remove target-common.o and add waitstatus.o.
1797 (server_h): Remove $(srcdir)/../common/target-common.h and
1798 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
1799 and $(srcdir)/../target/waitstatus.h.
1800 (target-common.o): Remove.
1801 (waitstatus.o): New target object file.
1802 * target.h: Do not include target-common.h and
1803 include target/resume.h, target/wait.h and
1804 target/waitstatus.h.
1805
b8e1b30e
LM
18062013-08-13 Luis Machado <lgustavo@codesourcery.com>
1807
1808 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
1809 to PTRACE_TYPE_ARG3.
1810 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
1811 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
1812 PTRACE_TYPE_ARG4.
1813 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
1814 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
1815
7a60ad40
YQ
18162013-07-27 Jie Zhang <jie@codesourcery.com>
1817 Daniel Jacobowitz <dan@codesourcery.com>
1818 Yao Qi <yao@codesourcery.com>
1819
1820 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
1821 (mips-linux-watch.o): New rule.
1822 (mips_linux_watch_h): New variable.
1823 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
1824 srv_tgtobj.
1825 * linux-mips-low.c: Include mips-linux-watch.h.
1826 (struct arch_process_info, struct arch_lwp_info): New.
1827 (update_watch_registers_callback): New function.
1828 (mips_linux_new_process, mips_linux_new_thread) New functions.
1829 (mips_linux_prepare_to_resume, mips_insert_point): New
1830 functions.
1831 (mips_remove_point, mips_stopped_by_watchpoint): New
1832 functions.
1833 (rsp_bp_type_to_target_hw_bp_type): New function.
1834 (mips_stopped_data_address): New function.
1835 (the_low_target): Add watchpoint support functions.
1836
de6f69ad
YQ
18372013-07-27 Yao Qi <yao@codesourcery.com>
1838
1839 * i386-low.c: Include break-common.h.
1840 (enum target_hw_bp_type): Remove.
1841
3360c0bf
LM
18422013-07-24 Luis Machado <lgustavo@codesourcery.com>
1843
1844 * Makefile.in (SFILES): /common/target-common.c.
1845 (OBS): Add target-common.o.
1846 (server_h): Add $(srcdir)/../common/target-common.h.
1847 (target-common.o): New target.
1848 * server.c (queue_stop_reply_callback): Free
1849 status string after use.
1850 * target.c (target_waitstatus_to_string): Remove.
1851 * target.h: Include target-common.h.
1852 (resume_kind): Likewise.
1853 (target_waitkind): Likewise.
1854 (target_waitstatus): Likewise.
1855 (TARGET_WNOHANG): Likewise.
1856
bd885420
YQ
18572013-07-04 Yao Qi <yao@codesourcery.com>
1858
1859 * Makefile.in (host_alias): Use @host_noncanonical@.
1860 (target_alias): Use @target_noncanonical@.
1861 * configure.ac: Use ACX_NONCANONICAL_TARGET and
1862 ACX_NONCANONICAL_HOST.
1863 * configure: Regenerated.
1864
1865 Revert:
1866 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
1867
1868 * configure.ac (version_host, version_target): Set and AC_SUBST them.
1869 * configure: Rebuild.
1870 * Makefile.in (version_host, version_target): Get from configure.
1871 (version.c): Use $(version_host) and $(version_target).
1872
17ef446e
PA
18732013-07-03 Pedro Alves <palves@redhat.com>
1874
1875 * Makefile.in (config.status): Depend on development.sh.
1876 * acinclude.m4: Include libmcheck.m4.
1877 * configure: Regenerate.
1878
7a9a7487
MG
18792013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
1880
1881 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
1882 attribute inside the parentheses.
1883 (winapi_DebugSetProcessKillOnExit): Ditto.
1884 (winapi_DebugBreakProcess): Ditto.
1885 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 1886
49b64de6
MG
18872013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
1888
1889 * notif.h (notif_event): Add a dummy member to avoid compiler
1890 errors.
1891
d5749ee7
PA
18922013-07-01 Pedro Alves <palves@redhat.com>
1893
1894 * hostio.c (HOSTIO_PATH_MAX): Define.
1895 (require_filename, handle_open, handle_unlink, handle_readlink):
1896 Use it.
1897
d8d2a3ee
PA
18982013-07-01 Pedro Alves <palves@redhat.com>
1899
1900 * server.h: Include "pathmax.h".
1901 * linux-low.c: Don't include sys/param.h.
1902 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
1903 MAXPATHLEN.
1904 * win32-low.c: Don't include sys/param.h.
1905 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
1906
bc7dea8d
PA
19072013-07-01 Pedro Alves <palves@redhat.com>
1908
1909 * event-loop.c: Don't check HAVE_UNISTD_H before including
1910 <unistd.h>.
1911 * gdbreplay.c: Likewise.
1912 * remote-utils.c: Likewise.
1913 * server.c: Likewise.
1914 * configure.ac: Don't check for unistd.h.
1915 * configure: Regenerate.
1916
d6c2da54
TT
19172013-06-28 Tom Tromey <tromey@redhat.com>
1918
1919 * Makefile.in (version.c): Use version.in, not
1920 common/version.in.
1921
257b6bec
MG
19222013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
1923
1924 * configure.ac (version_host, version_target): Set and AC_SUBST them.
1925 * configure: Rebuild.
1926 * Makefile.in (version_host, version_target): Get from configure.
1927 (version.c): Use $(version_host) and $(version_target).
1928
86ebe149
DK
19292013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
1930
1931 Fix trace-status to output user name without trailing colon.
1932 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
1933
f30aa5af
DK
19342013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
1935
1936 Fix trace-status to output proper start-time and stop-time.
1937 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
1938 output start time and stop time in hex as gdb expects.
1939
28a93511
YQ
19402013-06-26 Pedro Alves <pedro@codesourcery.com>
1941
1942 * tracepoint.c (build_traceframe_info_xml): Output trace state
1943 variables present in the trace buffer.
1944
01208463
TT
19452013-06-24 Tom Tromey <tromey@redhat.com>
1946
1947 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
1948 create-version.sh.
1949 (version.o): Remove.
1950 * gdbreplay.c: Include version.h.
1951 (version, host_name): Don't declare.
1952 * server.h: Include version.h.
1953 (version, host_name): Don't declare.
1954
760256f9
PA
19552013-06-12 Pedro Alves <palves@redhat.com>
1956
1957 * linux-x86-low.c (linux_is_elf64): Delete global.
1958 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
1959 with local linux_pid_exe_is_elf_64_file use.
1960
030031ee
PA
19612013-06-11 Pedro Alves <palves@redhat.com>
1962
1963 * linux-low.c (regset_disabled, disable_regset): New functions.
1964 (regsets_fetch_inferior_registers)
1965 (regsets_store_inferior_registers): Use them.
1966 (initialize_regsets_info); Don't allocate the disabled_regsets
1967 array here.
1968 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
1969 comment.
1970
5da6eb0a
PA
19712013-06-11 Pedro Alves <palves@redhat.com>
1972
1973 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
1974 xmalloc.
1975
7e5aaa09
PA
19762013-06-11 Pedro Alves <palves@redhat.com>
1977
1978 * linux-x86-low.c (initialize_low_arch): Call
1979 init_registers_x32_avx_linux.
1980
d878444c
JK
19812013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
1982
1983 Fix compatibility with Android Bionic.
1984 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
1985 it is not empty.
1986
3aee8918
PA
19872013-06-07 Pedro Alves <palves@redhat.com>
1988
5f2b57b5 1989 PR server/14823
3aee8918
PA
1990 * Makefile.in (OBS): Add tdesc.o.
1991 (IPA_OBJS): Add tdesc-ipa.o.
1992 (tdesc-ipa.o): New rule.
1993 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
1994 interface.
1995 * linux-low.c (new_inferior): Delete.
1996 (disabled_regsets, num_regsets): Delete.
1997 (linux_add_process): Adjust to set the new per-process
1998 new_inferior flag.
1999 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
2000 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
2001 was a stop. When calling arch_setup, switch the current inferior
2002 to the thread that got an event.
2003 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
2004 (regsets_fetch_inferior_registers)
2005 (regsets_store_inferior_registers): New regsets_info parameter.
2006 Adjust to use it.
2007 (linux_register_in_regsets): New regs_info parameter. Adjust to
2008 use it.
2009 (register_addr, fetch_register, store_register): New usrregs_info
2010 parameter. Adjust to use it.
2011 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
2012 parameter regs_info. Adjust to use it.
2013 (linux_fetch_registers): Get the current inferior's regs_info, and
2014 adjust to use it.
2015 (linux_store_registers): Ditto.
2016 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
2017 (initialize_low): Don't initialize the target_regsets here. Call
2018 initialize_low_arch.
2019 * linux-low.h (target_regsets): Delete declaration.
2020 (struct regsets_info): New.
2021 (struct usrregs_info): New.
2022 (struct regs_info): New.
2023 (struct process_info_private) <new_inferior>: New field.
2024 (struct linux_target_ops): Delete the num_regs, regmap, and
2025 regset_bitmap fields. New field regs_info.
2026 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
2027 * i387-fp.c (num_xmm_registers): Delete.
2028 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
2029 calls to new interface.
2030 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
2031 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
2032 Infer the number of xmm registers from the regcache's target
2033 description.
2034 * i387-fp.h (num_xmm_registers): Delete.
2035 * inferiors.c (add_thread): Don't install the thread's regcache
2036 here.
2037 * proc-service.c (gregset_info): Fetch the current inferior's
2038 regs_info. Adjust to use it.
2039 * regcache.c: Include tdesc.h.
2040 (register_bytes, reg_defs, num_registers)
2041 (gdbserver_expedite_regs): Delete.
2042 (get_thread_regcache): If the thread doesn't have a regcache yet,
2043 create one, instead of aborting gdbserver.
2044 (regcache_invalidate_one): Rename to ...
2045 (regcache_invalidate_thread): ... this.
2046 (regcache_invalidate_one): New.
2047 (regcache_invalidate): Only invalidate registers of the current
2048 process.
2049 (init_register_cache): Add target_desc parameter, and use it.
2050 (new_register_cache): Ditto. Assert the target description has a
2051 non zero registers_size.
2052 (regcache_cpy): Add assertions. Adjust.
2053 (realloc_register_cache, set_register_cache): Delete.
2054 (registers_to_string, registers_from_string): Adjust.
2055 (find_register_by_name, find_regno, find_register_by_number)
2056 (register_cache_size): Add target_desc parameter, and use it.
2057 (free_register_cache_thread, free_register_cache_thread_one)
2058 (regcache_release, register_cache_size): New.
2059 (register_size): Add target_desc parameter, and use it.
2060 (register_data, supply_register, supply_register_zeroed)
2061 (supply_regblock, supply_register_by_name, collect_register)
2062 (collect_register_as_string, collect_register_by_name): Adjust.
2063 * regcache.h (struct target_desc): Forward declare.
2064 (struct regcache) <tdesc>: New field.
2065 (init_register_cache, new_register_cache): Add target_desc
2066 parameter.
2067 (regcache_invalidate_thread): Declare.
2068 (regcache_invalidate_one): Delete declaration.
2069 (regcache_release): Declare.
2070 (find_register_by_number, register_cache_size, register_size)
2071 (find_regno): Add target_desc parameter.
2072 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
2073 declarations.
2074 * remote-utils.c: Include tdesc.h.
2075 (outreg, prepare_resume_reply): Adjust.
2076 * server.c: Include tdesc.h.
2077 (gdbserver_xmltarget): Delete declaration.
2078 (get_features_xml, process_serial_event): Adjust.
2079 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
2080 declare.
2081 (struct process_info) <tdesc>: New field.
2082 (ipa_tdesc): Declare.
2083 * tdesc.c: New file.
2084 * tdesc.h: New file.
2085 * tracepoint.c: Include tdesc.h.
2086 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
2087 (get_context_regcache): Adjust to pass ipa_tdesc down.
2088 (do_action_at_tracepoint): Adjust to get the register cache size
2089 from the context regcache's description.
2090 (traceframe_walk_blocks): Adjust to get the register cache size
2091 from the current trace frame's description.
2092 (traceframe_get_pc): Adjust to get current trace frame's
2093 description and pass it down.
2094 (gdb_collect): Adjust to get the register cache size from the
2095 IPA's description.
2096 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
2097 (gdbserver_xmltarget): Delete.
2098 (initialize_low_tracepoint): Set the ipa's target description.
2099 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
2100 (initialize_low_tracepoint): Set the ipa's target description.
2101 * linux-x86-low.c: Include tdesc.h.
2102 [__x86_64__] (is_64bit_tdesc): New.
2103 (ps_get_thread_area, x86_get_thread_area): Use it.
2104 (i386_cannot_store_register): Rename to ...
2105 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
2106 (i386_cannot_fetch_register): Rename to ...
2107 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
2108 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
2109 to new interface.
2110 (target_regsets): Rename to ...
2111 (x86_regsets): ... this.
2112 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
2113 interface.
2114 (x86_siginfo_fixup): Use is_64bit_tdesc.
2115 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
2116 (tdesc_x32_avx_linux, tdesc_x32_linux)
2117 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
2118 Declare.
2119 (x86_linux_update_xmltarget): Delete.
2120 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
2121 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
2122 (AMD64_LINUX_USER64_CS): New.
2123 (x86_linux_read_description): New, based on
2124 x86_linux_update_xmltarget.
2125 (same_process_callback): New.
2126 (x86_arch_setup_process_callback): New.
2127 (x86_linux_update_xmltarget): New.
2128 (x86_regsets_info): New.
2129 (amd64_linux_regs_info): New.
2130 (i386_linux_usrregs_info): New.
2131 (i386_linux_regs_info): New.
2132 (x86_linux_regs_info): New.
2133 (x86_arch_setup): Reimplement.
2134 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
2135 (x86_emit_ops): Ditto.
2136 (the_low_target): Adjust. Install x86_linux_regs_info,
2137 x86_cannot_fetch_register, and x86_cannot_store_register.
2138 (initialize_low_arch): New.
2139 * linux-ia64-low.c (tdesc_ia64): Declare.
2140 (ia64_fetch_register): Adjust.
2141 (ia64_usrregs_info, regs_info): New globals.
2142 (ia64_regs_info): New function.
2143 (the_low_target): Adjust.
2144 (initialize_low_arch): New function.
2145 * linux-sparc-low.c (tdesc_sparc64): Declare.
2146 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
2147 Adjust.
2148 (sparc_arch_setup): New function.
2149 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
2150 (the_low_target): Adjust.
2151 (initialize_low_arch): New function.
2152 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
2153 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
2154 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
2155 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
2156 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
2157 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
2158 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
2159 (tdesc_powerpc_isa205_vsx64l): Declare.
2160 (ppc_cannot_store_register, ppc_collect_ptrace_register)
2161 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
2162 (ppc_set_pc, ppc_get_hwcap): Adjust.
2163 (ppc_usrregs_info): Forward declare.
2164 (!__powerpc64__) ppc_regmap_adjusted: New global.
2165 (ppc_arch_setup): Adjust to the current process'es target
2166 description.
2167 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
2168 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
2169 (ppc_store_evrregset): Adjust.
2170 (target_regsets): Rename to ...
2171 (ppc_regsets): ... this, and make static.
2172 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
2173 (ppc_regs_info): New function.
2174 (the_low_target): Adjust.
2175 (initialize_low_arch): New function.
2176 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
2177 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
2178 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
2179 (tdesc_s390x_linux64v2): Declare.
2180 (s390_collect_ptrace_register, s390_supply_ptrace_register)
2181 (s390_fill_gregset, s390_store_last_break): Adjust.
2182 (target_regsets): Rename to ...
2183 (s390_regsets): ... this, and make static.
2184 (s390_get_pc, s390_set_pc): Adjust.
2185 (s390_get_hwcap): New target_desc parameter, and use it.
2186 [__s390x__] (have_hwcap_s390_high_gprs): New global.
2187 (s390_arch_setup): Adjust to set the current process'es target
2188 description. Don't adjust the regmap.
2189 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
2190 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
2191 (regs_info_3264): New globals.
2192 (s390_regs_info): New function.
2193 (the_low_target): Adjust.
2194 (initialize_low_arch): New function.
2195 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
2196 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
2197 [__mips64] (init_registers_mips_linux)
2198 (init_registers_mips_dsp_linux): Delete defines.
2199 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
2200 (have_dsp): New global.
2201 (mips_read_description): New, based on mips_arch_setup.
2202 (mips_arch_setup): Reimplement.
2203 (get_usrregs_info): New function.
2204 (mips_cannot_fetch_register, mips_cannot_store_register)
2205 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
2206 (mips_fill_fpregset, mips_store_fpregset): Adjust.
2207 (target_regsets): Rename to ...
2208 (mips_regsets): ... this, and make static.
2209 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
2210 (dsp_regs_info, regs_info): New globals.
2211 (mips_regs_info): New function.
2212 (the_low_target): Adjust.
2213 (initialize_low_arch): New function.
2214 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
2215 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
2216 Declare.
2217 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
2218 (arm_read_description): New, with bits factored from
2219 arm_arch_setup.
2220 (arm_arch_setup): Reimplement.
2221 (target_regsets): Rename to ...
2222 (arm_regsets): ... this, and make static.
2223 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
2224 (arm_regs_info): New function.
2225 (the_low_target): Adjust.
2226 (initialize_low_arch): New function.
2227 * linux-m68k-low.c (tdesc_m68k): Declare.
2228 (target_regsets): Rename to ...
2229 (m68k_regsets): ... this, and make static.
2230 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
2231 (m68k_regs_info): New function.
2232 (m68k_arch_setup): New function.
2233 (the_low_target): Adjust.
2234 (initialize_low_arch): New function.
2235 * linux-sh-low.c (tdesc_sharch): Declare.
2236 (target_regsets): Rename to ...
2237 (sh_regsets): ... this, and make static.
2238 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
2239 (sh_regs_info, sh_arch_setup): New functions.
2240 (the_low_target): Adjust.
2241 (initialize_low_arch): New function.
2242 * linux-bfin-low.c (tdesc_bfin): Declare.
2243 (bfin_arch_setup): New function.
2244 (bfin_usrregs_info, regs_info): New globals.
2245 (bfin_regs_info): New function.
2246 (the_low_target): Adjust.
2247 (initialize_low_arch): New function.
2248 * linux-cris-low.c (tdesc_cris): Declare.
2249 (cris_arch_setup): New function.
2250 (cris_usrregs_info, regs_info): New globals.
2251 (cris_regs_info): New function.
2252 (the_low_target): Adjust.
2253 (initialize_low_arch): New function.
2254 * linux-cris-low.c (tdesc_crisv32): Declare.
2255 (cris_arch_setup): New function.
2256 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
2257 (cris_regs_info): New function.
2258 (the_low_target): Adjust.
2259 (initialize_low_arch): New function.
2260 * linux-m32r-low.c (tdesc_m32r): Declare.
2261 (m32r_arch_setup): New function.
2262 (m32r_usrregs_info, regs_info): New globals.
2263 (m32r_regs_info): Adjust.
2264 (initialize_low_arch): New function.
2265 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
2266 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
2267 (tic6x_usrregs_info): Forward declare.
2268 (tic6x_read_description): New function, based on ...
2269 (tic6x_arch_setup): ... this. Reimplement.
2270 (target_regsets): Rename to ...
2271 (tic6x_regsets): ... this, and make static.
2272 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
2273 (tic6x_regs_info): New function.
2274 (the_low_target): Adjust.
2275 (initialize_low_arch): New function.
2276 * linux-xtensa-low.c (tdesc_xtensa): Declare.
2277 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
2278 (target_regsets): Rename to ...
2279 (xtensa_regsets): ... this, and make static.
2280 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
2281 globals.
2282 (xtensa_arch_setup, xtensa_regs_info): New functions.
2283 (the_low_target): Adjust.
2284 (initialize_low_arch): New function.
2285 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
2286 (nios2_arch_setup): Set the current process'es tdesc.
2287 (target_regsets): Rename to ...
2288 (nios2_regsets): ... this.
2289 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
2290 (nios2_regs_info): New function.
2291 (the_low_target): Adjust.
2292 (initialize_low_arch): New function.
a261b8f5
PA
2293 * linux-aarch64-low.c (tdesc_aarch64): Declare.
2294 (aarch64_arch_setup): Set the current process'es tdesc.
2295 (target_regsets): Rename to ...
2296 (aarch64_regsets): ... this.
2297 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
2298 (aarch64_regs_info): New function.
2299 (the_low_target): Adjust.
2300 (initialize_low_arch): New function.
3aee8918
PA
2301 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
2302 globals.
2303 (target_regsets): Rename to ...
2304 (tile_regsets): ... this.
2305 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
2306 (tile_regs_info): New function.
2307 (tile_arch_setup): Set the current process'es tdesc.
2308 (the_low_target): Adjust.
2309 (initialize_low_arch): New function.
2310 * spu-low.c (tdesc_spu): Declare.
2311 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
2312 * win32-arm-low.c (tdesc_arm): Declare.
2313 (arm_arch_setup): New function.
2314 (the_low_target): Install arm_arch_setup instead of
2315 init_registers_arm.
2316 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
2317 (init_windows_x86): Rename to ...
2318 (i386_arch_setup): ... this. Set `win32_tdesc'.
2319 (the_low_target): Adjust.
2320 * win32-low.c (win32_tdesc): New global.
2321 (child_add_thread): Don't create the thread cache here.
2322 (do_initial_child_stuff): Set the new process'es tdesc.
2323 * win32-low.h (struct target_desc): Forward declare.
2324 (win32_tdesc): Declare.
2325 * lynx-i386-low.c (tdesc_i386): Declare global.
2326 (lynx_i386_arch_setup): Set `lynx_tdesc'.
2327 * lynx-low.c (lynx_tdesc): New global.
2328 (lynx_add_process): Set the new process'es tdesc.
2329 * lynx-low.h (struct target_desc): Forward declare.
2330 (lynx_tdesc): Declare global.
2331 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
2332 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
2333 * nto-low.c (nto_tdesc): New global.
2334 (do_attach): Set the new process'es tdesc.
2335 * nto-low.h (struct target_desc): Forward declare.
2336 (nto_tdesc): Declare.
2337 * nto-x86-low.c (tdesc_i386): Declare.
2338 (nto_x86_arch_setup): Set `nto_tdesc'.
2339
b1fbec62
GB
23402013-06-04 Gary Benson <gbenson@redhat.com>
2341
2342 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
2343 to qSupported response when appropriate.
2344 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
2345 with nonzero-length annex.
2346 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
2347 arguments supplied in annex.
2348
d1ec4ce7
DE
23492013-05-31 Doug Evans <dje@google.com>
2350
ac44adcb 2351 PR server/15594
d1ec4ce7
DE
2352 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
2353 64 bits in 64-cross-32 environment.
2354
9b25f2d3
PA
23552013-05-28 Pedro Alves <palves@redhat.com>
2356
2357 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
2358 (aarch64-without-fpu.c): Delete rule.
2359 * configure.srv (aarch64*-*-linux*): Remove references to
2360 aarch64-without-fpu.o and aarch64-without-fpu.xml.
2361 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
2362 declaration.
2363
6740dc9c
PA
23642013-05-24 Pedro Alves <palves@redhat.com>
2365
2366 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
2367 instead of strchr/decode_address. Error if the range isn't split
2368 with a ','. Don't assume there's be a ':' in the action.
2369
c2d6af84
PA
23702013-05-23 Yao Qi <yao@codesourcery.com>
2371 Pedro Alves <palves@redhat.com>
2372
2373 * linux-low.c (lwp_in_step_range): New function.
2374 (linux_wait_1): If the thread was range stepping and stopped
2375 outside the stepping range, report the stop to GDB. Otherwise,
2376 continue stepping. Add range stepping debug output.
2377 (linux_set_resume_request): Copy the step range from the resume
2378 request to the lwp.
2379 (linux_supports_range_stepping): New.
2380 (linux_target_ops) <supports_range_stepping>: Set to
2381 linux_supports_range_stepping.
2382 * linux-low.h (struct linux_target_ops)
2383 <supports_range_stepping>: New field.
2384 (struct lwp_info) <step_range_start, step_range_end>: New fields.
2385 * linux-x86-low.c (x86_supports_range_stepping): New.
2386 (the_low_target) <supports_range_stepping>: Set to
2387 x86_supports_range_stepping.
2388 * server.c (handle_v_cont): Handle 'r' action.
2389 (handle_v_requests): Append ";r" if the target supports range
2390 stepping.
2391 * target.h (struct thread_resume) <step_range_start,
2392 step_range_end>: New fields.
2393 (struct target_ops) <supports_range_stepping>:
2394 New field.
2395 (target_supports_range_stepping): New macro.
2396
58794e1a
JB
23972013-05-17 Joel Brobecker <brobecker@adacore.com>
2398
2399 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
2400 confusion in comment.
2401
d631c5a7
JB
24022013-05-17 Joel Brobecker <brobecker@adacore.com>
2403
2404 * lynx-low.c (struct process_info_private): New type.
2405 (lynx_add_process): New function.
2406 (lynx_create_inferior, lynx_attach): Replace calls to
2407 add_process by calls to lynx_add_process.
2408 (lynx_resume): If PTID is null, then try using
2409 current_process()->private->last_wait_event_ptid.
2410 Add comments.
2411 (lynx_clear_inferiors): Delete. The contents of that function
2412 has been inlined in lynx_mourn;
2413 (lynx_wait_1): Save the ptid in the process's private data.
2414 (lynx_mourn): Free the process' private data. Replace call
2415 to lynx_clear_inferiors by call to clear_inferiors.
2416
96f7a20f
YQ
24172013-05-17 Yao Qi <yao@codesourcery.com>
2418
2419 * i386-low.c (i386_length_and_rw_bits): Move the comment to
2420 the right place.
2421
db0dfaa0
LM
24222013-05-16 Luis Machado <lgustavo@codesourcery.com>
2423
2424 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
2425 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
2426 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
2427 PT_TEXT_END_ADDR guards. Update comments.
2428 (linux_target_op) <read_offsets>: Conditionally define to
2429 linux_read_offsets if the target is UCLIBC and if it defines
2430 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
2431
68f5f838
SL
24322013-05-06 Sandra Loosemore <sandra@codesourcery.com>
2433 Andrew Jenner <andrew@codesourcery.com>
2434
2435 * Makefile.in (SFILES): Add linux-nios2-low.c.
2436 (clean): Add action to delete nios2-linux.c.
2437 (nios2-linux.c): New rule.
2438 * configure.srv: Add nios2*-*-linux*.
2439 * linux-nios2-low.c: New.
2440
1ebff1fd
HAQ
24412013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
2442
2443 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
2444
f6150862
HZ
24452013-04-25 Hui Zhu <hui@codesourcery.com>
2446
2447 PR gdb/15186
f6150862
HZ
2448 * ax.c (ax_printf): Add fflush.
2449
614c279d
TT
24502013-04-22 Tom Tromey <tromey@redhat.com>
2451
2452 * Makefile.in (SFILES): Add filestuff.c.
2453 (OBS): Add filestuff.o.
2454 (filestuff.o): New target.
2455 * config.in, configure: Rebuild.
2456 * configure.ac: Check for fdwalk, pipe2.
2457
7d4e5717
PA
24582013-04-17 Pedro Alves <palves@redhat.com>
2459
2460 * configure.ac (USE_THREAD_DB): Delete variable.
2461 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
2462 Don't AC_SUBST USE_THREAD_DB.
2463 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
2464 * config.in, configure: Regenerate.
2465
d5c93e41
PA
24662013-04-16 Pedro Alves <palves@redhat.com>
2467
2468 * linux-low.h (struct lwp_info) <thread_known>: Move under
2469 the USE_THREAD_DB #ifdef.
2470
04f5fe89
PA
24712013-04-16 Pedro Alves <palves@redhat.com>
2472
2473 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
2474 (linux-low.o): Delete rule.
2475 * linux-low.h: Always include "gdb_thread_db.h" instead of
2476 conditionally including thread_db.h.
2477 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
2478 HAVE_THREAD_DB_H.
2479
480b27bf
JK
24802013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2481
2482 * Makefile.in (install-only): Fix make install regression.
2483
43662968
JK
24842013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
2485
2486 Convert man pages to texinfo, new gdbinit.5 texinfo page.
2487 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
2488 installation.
2489 * gdbserver.1: Remove.
2490
3e74e146
PA
24912013-03-22 Pedro Alves <palves@redhat.com>
2492
2493 * linux-low.c (handle_extended_wait): Don't call
2494 linux_enable_event_reporting.
2495
a8347a2a
TT
24962013-03-15 Tony Theodore <tonyt@logyst.com>
2497
2498 PR build/9098:
2499 * Makefile.in (SHELL): Use @SHELL@.
2500
eeb56fa7
SDJ
25012013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
2502
2503 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
2504 compiler warning.
2505
4fa7e2ff
JB
25062013-03-13 Joel Brobecker <brobecker@adacore.com>
2507
2508 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
2509 Remove extraneous NULL element.
2510
8ddb1965
YQ
25112013-03-13 Yao Qi <yao@codesourcery.com>
2512
2513 * tracepoint.c (traceframe_read_tsv): Look for the last matched
2514 'V' block in trace frame.
2515
9accd112
MM
25162013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2517
2518 * target.h (struct target_ops): Add btrace ops.
2519 (target_supports_btrace): New macro.
2520 (target_enable_btrace): New macro.
2521 (target_disable_btrace): New macro.
2522 (target_read_btrace): New macro.
2523 * gdbthread.h (struct thread_info): Add btrace field.
2524 * server.c: Include btrace-common.h.
2525 (handle_btrace_general_set): New function.
2526 (handle_btrace_enable): New function.
2527 (handle_btrace_disable): New function.
2528 (handle_general_set): Call handle_btrace_general_set.
2529 (handle_qxfer_btrace): New function.
2530 (struct qxfer qxfer_packets[]): Add btrace entry.
2531 * inferiors.c (remove_thread): Disable btrace.
2532 * linux-low: Include linux-btrace.h.
2533 (linux_low_enable_btrace): New function.
2534 (linux_low_read_btrace): New function.
2535 (linux_target_ops): Add btrace ops.
2536 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
2537 Add srv_linux_btrace=yes.
2538 (x86_64-*-linux*): Add linux-btrace.o.
2539 Add srv_linux_btrace=yes.
2540 * configure.ac: Define HAVE_LINUX_BTRACE.
2541 * config.in: Regenerated.
2542 * configure: Regenerated.
2543
5cc22e4c
MM
25442013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2545
2546 * server.c (handle_qxfer): Preserve error message if -3 is
2547 returned.
2548 (qxfer): Document the -3 return value.
2549
7c97f91e
MM
25502013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2551
2552 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
2553 (linux_btrace_h): New variable.
2554 (linux-btrace.o): New rule.
2555
be9a119c 25562013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
2557 Hafiz Abid Qadeer <abidh@codesourcery.com>
2558
2559 * tracepoint.c (trace_buffer_size): New global.
2560 (DEFAULT_TRACE_BUFFER_SIZE): New define.
2561 (init_trace_buffer): Change to one-argument function. Allocate
2562 trace buffer memory.
2563 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
2564 handle QTBuffer:size packet.
2565 (cmd_bigqtbuffer_size): New function.
2566 (initialize_tracepoint): Call init_trace_buffer with
2567 DEFAULT_TRACE_BUFFER_SIZE.
2568 * server.c (handle_query): Add QTBuffer:size in the
2569 supported packets.
2570
e64f7499
YQ
25712013-03-07 Yao Qi <yao@codesourcery.com>
2572
2573 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
2574 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
2575 of -1.
2576 (cmd_qtsp): Adjust condition. Do post increment.
2577 Set cur_action and cur_step_action back to 0.
2578
f0ae6fc3
PA
25792013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
2580
2581 PR server/15236
2582 * linux-low.c (linux_write_memory): Return early success if LEN is
2583 zero.
2584
b5b0b0af
CV
25852013-03-05 Corinna Vinschen <vinschen@redhat.de>
2586
334ad4a8 2587 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 2588
589bc927
TT
25892013-02-28 Tom Tromey <tromey@redhat.com>
2590
2591 * configure.ac: Invoke AC_SYS_LARGEFILE.
2592 * configure, config.in: Rebuild.
2593
dfe07582
CV
25942013-02-28 Corinna Vinschen <vinschen@redhat.com>
2595
2596 * win32-low.c: Throughout, fix format strings and casts of
2597 printf-like functions to avoid type related warnings on all
2598 platforms.
2599 (get_child_debug_event): Print dwDebugEventCode as hex since
2600 that's how it's usually documented.
2601
736cd585
YQ
26022013-02-28 Yao Qi <yao@codesourcery.com>
2603
2604 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
2605 pulongest.
2606
e1f58301
JW
26072013-02-27 Jiong Wang <jiwang@tilera.com>
2608
2609 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
2610 (reg-tilegx32.c): New rule.
2611 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
2612 * linux-tile-low.c (tile_arch_setup): New function. Invoke
2613 different register info initializer according to elf class.
2614 (init_registers_tilgx32): New function. The tilegx32 register info
2615 initializer.
2616 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
2617 (tile_store_gregset): Likewise.
2618
d171ca78
YQ
26192013-02-27 Yao Qi <yao@codesourcery.com>
2620
2621 * server.c (process_point_options): Print debug message when
2622 debug_threads is true.
2623
282bbdf3
YQ
26242013-02-26 Yao Qi <yao@codesourcery.com>
2625
2626 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
2627
aca22551
PA
26282013-02-19 Pedro Alves <palves@redhat.com>
2629 Kai Tietz <ktietz@redhat.com>
2630
2631 PR gdb/15161
2632
2633 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
2634 instead of strtoul to extract address from packet.
2635 (process_serial_event) <'z'>: Likewise.
2636
4f3cee1c
YQ
26372013-02-18 Yao Qi <yao@codesourcery.com>
2638
2639 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
2640
8e1d55a3
PA
26412013-02-14 Pedro Alves <palves@redhat.com>
2642
2643 Plug memory leak.
2644
2645 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
2646 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
2647
458820da
PA
26482013-02-14 Pedro Alves <palves@redhat.com>
2649
2650 * tracepoint.c (cmd_qtdpsrc): Use savestring.
2651
baea0dae
PA
26522013-02-14 Pedro Alves <palves@redhat.com>
2653
2654 * tracepoint.c (save_string): Delete.
2655 (add_tracepoint_action): Use savestring instead of save_string.
2656
0b1afbb3
PA
26572013-02-12 Pedro Alves <palves@redhat.com>
2658
2659 * linux-xtensa-low.c: Ditto.
2660 * xtensa-xtregs.c: Ditto.
2661
8a4ac37e
PA
26622013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
2663
2664 * thread-db.c (thread_db_get_tls_address): NULL pointer check
2665 thread_db.
2666
148de6bb
MS
26672013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
2668
2669 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
2670 aarch64_num_wp_regs and aarch64_num_bp_regs to
2671 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
2672
55fac6e0
MS
26732013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
2674
2675 * linux-aarch64-low.c (ps_get_thread_area): Replace
2676 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
2677
176eb98c
MS
26782013-02-04 Jim MacArthur <jim.macarthur@arm.com>
2679 Marcus Shawcroft <marcus.shawcroft@arm.com>
2680 Nigel Stephens <nigel.stephens@arm.com>
2681 Yufeng Zhang <yufeng.zhang@arm.com>
2682
2683 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
2684 (aarch64.c, aarch64-without-fpu.c): New targets.
2685 * configure.srv (aarch64*-*-linux*): New.
2686 * linux-aarch64-low.c: New file.
2687
56f7af9c
MS
26882013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
2689
43aaf8b6 2690 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
2691 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
2692 (dequeue_one_deferred_signal, linux_resume_one_thread)
2693 (fetch_register, linux_write_memory, linux_enable_event_reporting)
2694 (linux_tracefork_grandchild, linux_test_for_tracefork)
2695 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
2696 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
2697 where the argument is 0.
2698
60f662b0
YQ
26992013-01-25 Yao Qi <yao@codesourcery.com>
2700
2701 * event-loop.c: Include "queue.h".
2702 (gdb_event_p): New typedef.
2703 (struct gdb_event) <next_event>: Remove.
2704 (event_queue): Change to QUEUE(gdb_event_p).
2705 (async_queue_event): Remove.
2706 (gdb_event_xfree): New.
2707 (initialize_event_loop): New.
2708 (process_event): Use API from QUEUE.
2709 (wait_for_event): Likewise.
2710 * server.c (main): Call initialize_event_loop.
2711 * server.h (initialize_event_loop): Declare.
2712
5ae4861a
YQ
27132013-01-18 Yao Qi <yao@codesourcery.com>
2714
2715 * ax.h (struct eval_agent_expr_context): New.
2716 (gdb_eval_agent_expr): Update declaration.
2717 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
2718 TFRAME. Add new argument CTX.
2719 * server.h (struct eval_agent_expr_context): Declare.
2720 (agent_mem_read, agent_tsv_read): Update declaration.
2721 (agent_mem_read_string): Likewise.
2722 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
2723 (add_traceframe_block): Add new argument TPOINT.
2724 Increase TPOINT->traceframe_usage.
2725 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
2726 eval_tracepoint_agent_expr.
2727 (condition_true_at_tracepoint): Likewise.
2728 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
2729 (agent_mem_read_string, agent_tsv_read): Likewise.
2730
85e00e85
YQ
27312013-01-16 Yao Qi <yao@codesourcery.com>
2732
2733 * linux-low.c (linux_resume_one_lwp): Don't check
2734 'lwp->bp_reinsert != 0'.
2735
4039cf45
JB
27362013-01-07 Joel Brobecker <brobecker@adacore.com>
2737 Pedro Alves <palves@redhat.com>
2738
2739 * lynx-low.c (ptrace_request_to_str): Define a temporary
2740 macro and use it to simplify this function's implementation.
2741
9044dee2
JB
27422013-01-07 Joel Brobecker <brobecker@adacore.com>
2743
2744 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
2745 sets errno.
2746
e6352c8f
JB
27472013-01-07 Joel Brobecker <brobecker@adacore.com>
2748
2749 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
2750
50681a27
JB
27512013-01-07 Joel Brobecker <brobecker@adacore.com>
2752
2753 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
2754
3f6e77ef
JB
27552013-01-07 Joel Brobecker <brobecker@adacore.com>
2756
2757 * lynx-low.c (lynx_resume): Use the resume_info parameter
2758 to determine the ptid for the lynx_ptrace call, unless
2759 it is equal to minus_one_ptid, in which case we use the
2760 ptid of the current_inferior.
2761 (lynx_wait_1): After having received a thread create/exit
2762 event, resume the inferior's execution using the signaling
2763 thread's ptid, rather than the old ptid.
2764
7fda33ae
JB
27652013-01-07 Joel Brobecker <brobecker@adacore.com>
2766
2767 * lynx-low.c (lynx_resume): Delete variable ret.
2768
b9786c74
JB
27692013-01-01 Joel Brobecker <brobecker@adacore.com>
2770
2771 * gdbreplay.c (gdbreplay_version): Update copyright year.
2772 * server.c (gdbserver_version): Likewise.
2773
8b93d60f
JB
27742012-12-17 Joel Brobecker <brobecker@adacore.com>
2775
2776 * lynx-low.c (lynx_wait_1): Add debug trace before adding
2777 new thread.
2778
037335a7
JB
27792012-12-17 Joel Brobecker <brobecker@adacore.com>
2780
2781 * lynx-low.c (ptrace_request_to_str): Add handling for
2782 PTRACE_GETTRACESIG.
2783
52d4cbd8
JB
27842012-12-17 Joel Brobecker <brobecker@adacore.com>
2785
2786 * lynx-low.c (lynx_attach): Delete variable new_process.
2787
ab8f6ca9
JB
27882012-12-17 Joel Brobecker <brobecker@adacore.com>
2789
2790 * lynx-low.c (lynx_create_inferior): Delete variable
2791 new_process.
2792
78cbc024
JB
27932012-12-17 Joel Brobecker <brobecker@adacore.com>
2794
2795 * lynx-low.c (ptrace_request_to_str): Do not handle
2796 PTRACE_GETTHREADLIST if this macro does not exist.
2797
14a00470
YQ
27982012-12-15 Yao Qi <yao@codesourcery.com>
2799
2800 * Makefile.in (OBS): Add notif.o.
2801 * notif.c, notif.h: New.
2802 * server.c: Include "notif.h".
2803 (struct vstop_notif) <next>: Remove.
2804 <base>: New field.
2805 (queue_stop_reply): Update.
2806 (push_event, send_next_stop_reply): Remove.
2807 (discard_queued_stop_replies): Update.
2808 (notif_stop): New variable.
2809 (handle_v_stopped): Remove.
2810 (handle_v_requests): Don't call handle_v_stopped. Call
2811 handle_ack_notif instead.
2812 (queue_stop_reply_callback): Call notif_event_enque instead
2813 of queue_stop_reply.
2814 (handle_status): Don't call send_next_stop_reply, call
2815 notif_write_event instead.
2816 (kill_inferior_callback): Likewise.
2817 (detach_or_kill_inferior_callback): Likewise.
2818 (main): Call initialize_notif.
2819 (process_serial_event): Call QUEUE_is_empty.
2820 (handle_target_event): Call notif_push instead of push event.
2821 * server.h (push_event): Remove declaration.
2822
61c125b9
TT
28232012-12-10 Tom Tromey <tromey@redhat.com>
2824
2825 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
2826 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
2827 macros.
2828 (.c.o): Rewrite.
2829 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
2830 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
2831 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
2832 (amd64-linux-ipa.o, ax.o): Rewrite.
2833 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
2834 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
2835 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
2836 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
2837 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
2838 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
2839 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
2840 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
2841 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
2842 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
2843 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
2844 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
2845 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
2846 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
2847 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
2848 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
2849 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
2850 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
2851 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
2852 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
2853 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
2854 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
2855 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
2856 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
2857 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
2858 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
2859 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
2860 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
2861 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
2862 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
2863 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
2864 (reg-tilegx.o): Remove.
2865 (all_object_files): New macro.
2866 Include .deps files.
2867 * aclocal.m4, configure: Rebuild.
2868 * acinclude.m4: Include depstand.m4, lead-dot.m4.
2869 * configure.ac: Invoke ZW_CREATE_DEPDIR,
2870 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
2871
e90e9ad9
TT
28722012-12-05 Tom Tromey <tromey@redhat.com>
2873
2874 PR gdb/14917:
2875 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
2876
02d403bf 28772012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
2878
2879 * configure.ac: Check for linux/perf_event.h.
2880 * config.in: Regenerated.
2881 * configure: Regenerated.
2882
0270a750
PA
28832012-11-26 Maxime Villard <rustyBSD@gmx.fr>
2884
2885 * hostio.c (handle_readlink): Decrease buffer size
2886 parameter passed to readlink by one byte.
2887
8c29b58e
YQ
28882012-11-26 Yao Qi <yao@codesourcery.com>
2889
2890 * configure.ac (build_warnings): Append '-Wempty-body'.
2891 * configure: Regenerated.
2892 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
2893 body.
2894
8bdce1ff
PM
28952012-11-15 Pierre Muller <muller@sourceware.org>
2896
2897 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
2898 * config.in: Regenerate.
2899 * configure: Regenerate.
2900 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
2901 Use "gdb_wait.h" header instead of <sys/wait.h> header.
2902 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
2903 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
2904 header.
2905 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
2906 instead of <sys/wait.h> header.
2907 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
2908
02d403bf 29092012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
2910
2911 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
2912 (various make rules): Remove -DGDBSERVER
2913
fbd5db48
YQ
29142012-11-09 Yao Qi <yao@codesourcery.com>
2915
2916 * spu-low.c (current_ptid): Move it to ..
2917 * gdbthread.h: ... here. New.
2918 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
2919 * server.c (myresume, process_serial_event): Likewise.
2920 * thread-db.c (thread_db_find_new_threads): Likewise.
2921 * tracepoint.c (run_inferior_command): Likewise.
2922
b3dc46ff
AB
29232012-10-01 Andrew Burgess <aburgess@broadcom.com>
2924
2925 * server.c (handle_search_memory_1): Include access length in
2926 warning message.
2927
07c04788
HPN
29282012-09-05 Michael Brandt <michael.brandt@axis.com>
2929
2930 * linux-crisv32-low.c: Fix compile errors.
2931
918d227b
YQ
29322012-09-04 Yao Qi <yao@codesourcery.com>
2933
2934 * tracepoint.c (cmd_qtsv): Adjust debug message.
2935 Don't check CUR_TPOINT.
2936
18c1b81a
YQ
29372012-08-28 Yao Qi <yao@codesourcery.com>
2938
2939 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
2940 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
2941 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
2942 Remove declarations of xmalloc, xreallloc, xstrdup and
2943 freeargv.
2944 * Makefile.in (libiberty_h): New.
2945 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
2946 (linux-bfin-low.o): Append dependency 'libiberty.h'.
2947
dc82f37b
YQ
29482012-08-23 Yao Qi <yao@codesourcery.com>
2949
2950 * server.h: Remove declaration of 'xsnprintf'.
2951
406b1477
KS
29522012-08-22 Keith Seitz <keiths@redhat.com>
2953
2954 * server.h: Include build-gnulib-gbserver/config.h.
2955 * gdbreplay.c: Likewise.
2956
e6712ff1
DE
29572012-08-08 Doug Evans <dje@google.com>
2958
2959 * Makefile.in (SFILES): Add gdb_vecs.c.
2960 (OBS): Add gdb_vecs.o.
2961 (gdb_vecs_h, host_defs_h): New variables.
2962 (thread-db.o): Add $(gdb_vecs_h) dependency.
2963 (gdb_vecs.o): New rule.
2964 * thread-db.c: #include "gdb_vecs.h".
2965 (thread_db_load_search): Use a vector to iterate over path elements.
2966 Handle text appearing after "$pdir".
2967
2968 * configure.ac: Add check for strstr.
2969 * config.in: Regenerate.
2970 * configure: Regenerate.
2971
7c3270ae
UW
29722012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
2973
2974 * hostio.c (handle_pread): If pread fails, fall back to attempting
2975 lseek/read.
2976 (handle_pwrite): Likewise for pwrite.
2977
b62e2b27
UW
29782012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
2979
2980 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
2981 between unsupported TYPE and unimplementable ADDR/LEN combination.
2982 (arm_insert_point): Act on new return value.
2983
78a99e91
PA
29842012-07-31 Pedro Alves <palves@redhat.com>
2985
2986 * server.c (process_point_options): Only skip tokens if we find
2987 one that is unrecognized. Don't treat 'X' specially while
2988 skipping unrecognized tokens.
2989
fcf303ab
UW
29902012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
2991
2992 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
2993 to 4-byte-align HW breakpoint addresses for Thumb.
2994
7255706c
YQ
29952012-07-27 Yao Qi <yao@codesourcery.com>
2996
2997 PR remote/14161.
2998
2999 * server.h: Declare gdb_agent_about_to_close.
3000 * target.c (kill_inferior): Include "agent.h".
3001 New. Send command 'kill'.
3002 * target.h (kill_inferior): Removed macro.
3003 * tracepoint.c (gdb_agent_about_to_close): New.
3004 (gdb_agent_helper_thread): Handle command 'close'.
3005 Wait endlessly until the inferior stops.
3006 Install gdb_agent_remove_socket to atexit hook.
3007 (agent_socket_name): New static variable.
3008 (gdb_agent_socket_init): Replace local variable 'name' with
3009 'agent_socket_name'.
3010 (gdb_agent_remove_socket): New.
3011
5a3f286f
YQ
30122012-07-27 Yao Qi <yao@codesourcery.com>
3013
3014 * server.c (process_point_options): Stop at 'X' when parsing.
3015
961bd387
ME
30162012-07-19 Michael Eager <eager@eagercon.com>
3017
a261b8f5 3018 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
3019 to hw_execute.
3020 * linux-x86-low.c (x86_insert_point, x86_remove_point):
3021 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
3022 hardware breakpoint.
3023
aa7c7447
JK
30242012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3025
3026 * gdbserver/linux-low.c (initialize_low): Call
3027 linux_ptrace_init_warnings.
3028
7f216e7c
DE
30292012-07-02 Doug Evans <dje@google.com>
3030
3031 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
3032 pointer to int.
3033
d3ce09f5
SS
30342012-07-02 Stan Shebs <stan@codesourcery.com>
3035
3036 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
3037 (ax.o): Add it to build rule.
3038 (ax-ipa.o): Ditto.
3039 (OBS): Add format.o.
3040 (IPA_OBS): Add format.o.
3041 * server.c (handle_query): Claim support for breakpoint commands.
3042 (process_point_options): Add command case.
3043 (process_serial_event): Leave running if there are printfs in
3044 effect.
3045 * mem-break.h (any_persistent_commands): Declare.
3046 (add_breakpoint_commands): Declare.
3047 (gdb_no_commands_at_breakpoint): Declare.
3048 (run_breakpoint_commands): Declare.
3049 * mem-break.c (struct point_command_list): New struct.
3050 (struct breakpoint): New field command_list.
3051 (any_persistent_commands): New function.
3052 (add_commands_to_breakpoint): New function.
3053 (add_breakpoint_commands): New function.
3054 (gdb_no_commands_at_breakpoint): New function.
3055 (run_breakpoint_commands): New function.
3056 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
3057 locally.
3058 * ax.c: Include format.h.
3059 (ax_printf): New function.
3060 (gdb_eval_agent_expr): Add printf opcode.
3061
2f8f6aed
YQ
30622012-06-13 Yao Qi <yao@codesourcery.com>
3063
3064 * server.c (start_inferior): Remove duplicated writes to fields
3065 'last_resume_kind' and 'last_status' of 'current_inferior'.
3066
0c9070b3
YQ
30672012-06-12 Yao Qi <yao@codesourcery.com>
3068 Pedro Alves <palves@redhat.com>
3069
3070 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
3071 comment.
3072 * server.c (handle_v_cont): Extend comment.
3073
c52daf70
YQ
30742012-06-11 Yao Qi <yao@codesourcery.com>
3075
3076 * linux-low.c (linux_attach): Add 'static'.
3077
d38bbb0a
YQ
30782012-06-06 Yao Qi <yao@codesourcery.com>
3079
3080 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
3081
89dc0afd
JK
30822012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
3083
3084 Fix gcc -flto compilation warning.
3085 * server.c (main): Make variable multi_mode and attach volatile.
3086
75f62ce7
TJB
30872012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3088
3089 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
3090 if the platform doesn't know about it.
3091
65f479b6
PA
30922012-05-30 Jeff Kenton <jkenton@tilera.com>
3093
3094 * Makefile.in (SFILES): Add linux-tile-low.c.
3095 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
3096 * configure.srv: Handle tilegx-*-linux*.
3097 * linux-tile-low.c: New file.
3098
0c5bf5a9
JK
30992012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3100
3101 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
3102
a493e3e2
PA
31032012-05-24 Pedro Alves <palves@redhat.com>
3104
3105 PR gdb/7205
3106
43aaf8b6 3107 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 3108
2ea28649
PA
31092012-05-24 Pedro Alves <palves@redhat.com>
3110
3111 PR gdb/7205
3112
3113 Replace target_signal with gdb_signal throughout.
3114
8d409d16
MR
31152012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
3116
3117 * linux-low.c (linux_store_registers): Avoid the copying sequence
3118 when no data has been retrieved by ptrace.
3119
23512c01
MGD
31202012-05-22 Will Deacon <will.deacon@arm.com>
3121
3122 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
3123 Include asm/ptrace.h.
3124 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
3125 already defined.
3126
4934b29e
MR
31272012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
3128
3129 * linux-low.c (linux_store_registers): Don't re-retrieve data
3130 with ptrace that has already been obtained from /proc. Always
3131 copy any data retrieved with ptrace to the buffer supplied.
3132
bde24c0a
PA
31332012-05-11 Yao Qi <yao@codesourcery.com>
3134 Pedro Alves <palves@redhat.com>
3135
3136 * linux-low.c (enum stopping_threads_kind): New.
3137 (stopping_threads): Change type to `enum stopping_threads_kind'.
3138 (handle_extended_wait): If stopping and suspending threads, leave
3139 the new_lwp suspended too.
3140 (linux_wait_for_event): Adjust.
3141 (stop_all_lwps): Set `stopping_threads' to
3142 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
3143 whether we're suspending threads or just stopping them. Assert no
3144 recursion happens.
3145
623b6bdf
YQ
31462012-04-29 Yao Qi <yao@codesourcery.com>
3147
3148 * server.h: Move some code to ...
3149 * gdbthread.h: ... here. New.
3150 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
3151 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
3152 (nto-low.o, win32-low.o): Likewise.
3153 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
3154 * regcache.c, remote-utils.c, server.c: Likewise.
3155 * target.c, tracepoint.c, win32-low.c: Likewise.
3156
f15f9948
TJB
31572012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3158
3159 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
3160 (PTRACE_ARG4_TYPE): Likewise.
3161 (PTRACE_XFER_TYPE): Likewise.
3162 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
3163 ptrace to PTRACE_ARG3_TYPE.
3164 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
3165 (PTRACE_ARG4_TYPE): Likewise.
3166 (PTRACE_XFER_TYPE): Likewise.
3167 (linux_detach_one_lwp): Cast fourth argument of
3168 ptrace to long then PTRACE_ARG4_TYPE.
3169 (regsets_fetch_inferior_registers): Cast third argument of
3170 ptrace to long then PTRACE_ARG3_TYPE.
3171 (regsets_store_inferior_registers): Likewise.
3172
38ea300a
PA
31732012-04-20 Pedro Alves <palves@redhat.com>
3174
3175 * configure: Regenerate.
3176
c971b7fa
PA
31772012-04-19 Pedro Alves <palves@redhat.com>
3178
43aaf8b6 3179 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 3180 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
3181 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
3182 (all, install-only, uninstall, clean-info, all-lib, clean): No
3183 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
3184 (maintainer-clean realclean distclean): Use subdir_do.
3185 (subdir_do): New.
3186 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 3187 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
3188 * acinclude.m4: Include acx_configure_dir.m4.
3189 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
3190 calls. Call AC_PROG_RANLIB. Configure gnulib using
3191 ACX_CONFIGURE_DIR.
3192 (GNULIB): New.
3193 (GNULIB_STDINT_H): Adjust.
3194 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
3195 * gdbreplay.c: Include build-gnulib/config.h.
3196 * server.h: Likewise.
3197 * aclocal.m4: Regenerate.
3198 * config.in: Regenerate.
3199 * configure: Regenerate.
c971b7fa 3200
809277f8
PA
32012012-04-19 Pedro Alves <palves@redhat.com>
3202
3203 * Makefile.in (LIBGNU, INCGNU): Adjust.
3204 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
3205 (all, install-only, uninstall, clean-info, all-lib, clean)
3206 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
3207 * configure.ac: Adjust AC_OUTPUT output.
3208 * aclocal.m4: Regenerate.
3209 * configure: Regenerate.
3210
fd9bb8b8
PA
32112012-04-19 Pedro Alves <palves@redhat.com>
3212
3213 * Makefile.in (generated_files): New.
3214 (server_h): Remove the explicit dependency on config.h, and depend
3215 on $generated_files.
3216
1c298c66
PA
32172012-04-19 Pedro Alves <palves@redhat.com>
3218
3219 * Makefile.in (INCGNU): Add -Ignulib.
3220
57c4b50b
PA
32212012-04-19 Pedro Alves <palves@redhat.com>
3222
3223 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
3224 (INCGNU): ... this, and spell out -I here.
3225 (GNULIB_LIB): Rename to ...
3226 (LIBGNU): ... this.
3227 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
3228
1030e047
PA
32292012-04-19 Pedro Alves <palves@redhat.com>
3230
3231 * config.in: Regenerate.
3232
447d4319
PA
32332012-04-19 Pedro Alves <palves@redhat.com>
3234
3235 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
3236 * server.h (memmem): Remove declaration.
3237 * config.in: Regenerate.
3238 * configure: Regenerate.
3239
aad9eab9
YQ
32402012-04-19 Yao Qi <yao@codesourcery.com>
3241
3242 * Makefile.in (SFILES): Add common/vec.c.
3243 (OBS): Add vec.o.
3244 (vec.o): New rule.
3245
3e10640f
YQ
32462012-04-19 Yao Qi <yao@codesourcery.com>
3247
3248 * remote-utils.c (prepare_resume_reply): Replace with macro
3249 target_core_of_thread.
3250 * server.c (handle_qxfer_threads_proper): Likewise.
3251 * target.h (traget_core_of_thread): New macro.
3252
71622373
PA
32532012-04-18 Pedro Alves <palves@redhat.com>
3254
3255 * aclocal.m4: Regenerate.
3256 * configure: Regenerate.
3257
80d26939
YQ
32582012-04-16 Yao Qi <yao@codesourcery.com>
3259
3260 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
3261 duplicated on address.
3262
42476b70
YQ
32632012-04-16 Yao Qi <yao@codesourcery.com>
3264
3265 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
3266 (struct tracepoint_action_ops) <send>: New field.
3267 (m_tracepoint_action_send, r_tracepoint_action_send): New.
3268 (agent_expr_send, x_tracepoint_action_send): New.
3269 (l_tracepoint_action_send): New.
3270 (cmd_qtdp): Download and install tracepoint
3271 according to `use_agent'.
3272 (run_inferior_command): Add one more parameter `len'.
3273 Update callers.
3274 (tracepoint_send_agent): New.
3275 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
3276
7bc83639
YQ
32772012-04-16 Yao Qi <yao@codesourcery.com>
3278
3279 * tracepoint.c (download_tracepoints): Moved to ...
3280 (cmd_qtstart): ... here.
3281
5f18041e
YQ
32822012-04-14 Yao Qi <yao@codesourcery.com>
3283
3284 * tracepoint.c: Include inttypes.h.
3285 (struct collect_memory_action): Use sized types.
3286 (struct tracepoint): Likewise.
3287 (cmd_qtdp, stop_tracing): Update print specifiers.
3288 (cmd_qtp, response_tracepoint): Likewise.
3289 (collect_data_at_tracepoint): Likewise.
3290 (collect_data_at_step): Likewise.
3291
55a8c076
YQ
32922012-04-14 Yao Qi <yao@codesourcery.com>
3293
3294 Import gnulib module inttypes.
3295 * aclocal.m4, config.in, configure: Regenerated.
3296
dc750257
YQ
32972012-04-14 Yao Qi <yao@codesourcery.com>
3298
3299 * Makefile.in (maintainer-clean, realclean, distclean): Remove
3300 Makefile and config.status at last.
3301
0ab5faf9
YQ
33022012-04-13 Yao Qi <yao@codesourcery.com>
3303
3304 * tracepoint.c: Include stdint.h unconditionally.
3305
18f5fd81
TJB
33062012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3307
3308 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
3309 on BFD_HAVE_SYS_PROCFS_TYPE.
3310 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
3311 * configure: Regenerate.
3312 * config.in: Likewise.
3313
4d47af5c
L
33142012-04-13 H.J. Lu <hongjiu.lu@intel.com>
3315
3316 * Makefile.in (clean): Also remove x32.c x32-linux.c
3317 x32-avx.c x32-avx-linux.c.
3318 (x32.o): New target.
3319 (x32.c): Likewise.
3320 (x32-linux.o): Likewise.
3321 (x32-linux.c): Likewise.
3322 (x32-avx.o): Likewise.
3323 (x32-avx.c): Likewise.
3324 (x32-avx-linux.o): Likewise.
3325 (x32-avx-linux.c): Likewise.
3326
3327 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
3328 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
3329 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
3330 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
3331 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
3332 i386/x32-avx-linux.xml.
3333
3334 * linux-x86-low.c (init_registers_x32_linux): New prototype.
3335 (init_registers_x32_avx_linux): Likwise.
3336 (x86_linux_update_xmltarget): Call init_registers_x32_linux
3337 or init_registers_x32_avx_linux if linux_is_elf64 is false.
3338
ecedbe58
PA
33392012-04-13 Pedro Alves <palves@redhat.com>
3340
3341 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
3342 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
3343 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
3344 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
3345 the sub-make.
3346
c92b5177
L
33472012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3348
3349 * linux-x86-low.c (compat_x32_clock_t): New.
3350 (compat_x32_siginfo_t): Likewise.
3351 (compat_x32_siginfo_from_siginfo): Likewise.
3352 (siginfo_from_compat_x32_siginfo): Likewise.
3353 (linux_is_elf64): Likewise.
3354 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
3355 and siginfo_from_compat_x32_siginfo for x32.
3356 (x86_arch_setup): Set linux_is_elf64.
3357
214d508e
L
33582012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3359
3360 PR gdb/13969
3361 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
3362 e_machine field.
3363 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
3364 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
3365 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
3366 compatible with process.
3367
c9a1864a
YQ
33682012-04-12 Yao Qi <yao@codesourcery.com>
3369
3370 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
3371 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
3372 (install-only, install-info, clean): Handle sub dir gnulib.
3373 (all-lib, am--refresh): New targets.
3374 (memmem.o): Remove target.
3375 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
3376 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
3377 (AC_REPLACE_FUNCS): Remove memmem.
3378 Invoke gl_INIT and AM_INIT_AUTOMAKE.
3379 (AC_OUTPUT): Generate Makefile in gnulib/.
3380 * aclocal.m4, config.in, configure: Regenerated.
3381
367ba2c2
MR
33822012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
3383
3384 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
3385
9d236627
PA
33862012-04-05 Pedro Alves <palves@redhat.com>
3387
3388 -Werror=strict-aliasing
3389
3390 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
3391 pointer.
3392
111217b3
PA
33932012-04-04 Pedro Alves <palves@redhat.com>
3394
3395 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
3396 (sparc_store_gregset_from_stack, sparc_store_gregset)
3397 (sparc_breakpoint_at): Fix formatting.
3398
8365dcf5
TJB
33992012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3400
3401 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
3402 are available.
3403 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
3404 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
3405 * config.in: Regenerate.
3406 * configure: Likewise.
3407
689cc2ae
PA
34082012-03-29 Pedro Alves <palves@redhat.com>
3409
3410 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
3411 Correct ptrace arguments.
3412
c14dfd32
PA
34132012-03-28 Pedro Alves <palves@redhat.com>
3414
3415 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
3416 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
3417 (IA64_FR1_REGNUM): New defines.
3418 (ia64_fetch_register): New.
3419 (the_low_target): Install it.
3420 * linux-low.h (struct linux_target_ops) <fetch_register>: New
3421 field.
3422 * linux-low.c (linux_fetch_registers): Try the
3423 the_low_target.fetch_register hook first.
3424
3425 * linux-arm-low.c (the_low_target): Adjust.
3426 * linux-bfin-low.c (the_low_target): Adjust.
3427 * linux-cris-low.c (the_low_target): Adjust.
3428 * linux-crisv32-low.c (the_low_target): Adjust.
3429 * linux-m32r-low.c (the_low_target): Adjust.
3430 * linux-m68k-low.c (the_low_target): Adjust.
3431 * linux-mips-low.c (the_low_target): Adjust.
3432 * linux-ppc-low.c (the_low_target): Adjust.
3433 * linux-s390-low.c (the_low_target): Adjust.
3434 * linux-sh-low.c (the_low_target): Adjust.
3435 * linux-sparc-low.c (the_low_target): Adjust.
3436 * linux-tic6x-low.c (the_low_target): Adjust.
3437 * linux-x86-low.c (the_low_target): Adjust.
3438 * linux-xtensa-low.c (the_low_target): Adjust.
3439
63c88e13
PA
34402012-03-26 Pedro Alves <palves@redhat.com>
3441
3442 * server.c (handle_qxfer_libraries): Don't bail early if
3443 the_target->qxfer_libraries_svr4 is not NULL.
3444
fb723180
PA
34452012-03-26 Pedro Alves <palves@redhat.com>
3446
3447 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
3448
0afae3cf
PA
34492012-03-23 Pedro Alves <palves@redhat.com>
3450
3451 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
3452 "library-list-svr4" element's start tag when the the DSO list is
3453 empty.
3454
485f1ee4
PA
34552012-03-23 Pedro Alves <palves@redhat.com>
3456
3457 * linux-low.c (read_one_ptr): Read the inferior's pointer through
3458 a variable whose type size is the same as the inferior's pointer
3459 size.
3460
a5362b9a
TS
34612012-03-21 Thomas Schwinge <thomas@codesourcery.com>
3462
3463 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
3464 struct siginfo.
3465 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
3466 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3467 * linux-low.h: Include <signal.h>.
3468 (struct siginfo): Remove forward declaration.
3469 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
3470 struct siginfo.
3471
d226c142
MF
34722012-03-21 Mike Frysinger <vapier@gentoo.org>
3473
3474 * .gitignore: Ignore more files.
3475
122f36ef
PA
34762012-03-19 Pedro Alves <palves@redhat.com>
3477 Jan Kratochvil <jan.kratochvil@redhat.com>
3478
3479 * server.c (cont_thread, general_thread): Add describing comments.
3480 (start_inferior): Clear `cont_thread'.
3481 (handle_v_cont): Don't set `cont_thread' if resuming all threads
3482 of a process.
3483
fc3e5175
YQ
34842012-03-15 Yao Qi <yao@codesourcery.com>
3485
3486 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
3487 handling to ...
3488 (cmd_qtdp): ... here.
3489
8d0d92cd
YQ
34902012-03-15 Yao Qi <yao@codesourcery.com>
3491
3492 * tracepoint.c (struct tracepoint_action_ops): New.
3493 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
3494 (m_tracepoint_action_download): New.
3495 (r_tracepoint_action_download): New.
3496 (x_tracepoint_action_download): New.
3497 (l_tracepoint_action_download): New.
3498 (add_tracepoint_action): Install `action->ops' according type.
3499 (download_tracepoint_1): Move code `download' function pointer
3500 of various tracepoint_action_ops.
3501
87b0bb13
JK
35022012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
3503
3504 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
3505 linux_ptrace_attach_warnings.
3506
5f572dec
JK
35072012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
3508
3509 * Makefile.in (linux-ptrace.o): New.
3510 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
3511 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
3512 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
3513 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
3514 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
3515 of these targets.
3516 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
3517
f4647387
YQ
35182012-03-08 Yao Qi <yao@codesourcery.com>
3519 Pedro Alves <palves@redhat.com>
3520
3521 Fix PR server/13392.
3522 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
3523 offset of JMP insn.
3524 * tracepoint.c (remove_tracepoint): New.
3525 (cmd_qtdp): Call remove_tracepoint when failed to install.
3526
9b224c5e
PA
35272012-03-07 Pedro Alves <palves@redhat.com>
3528
3529 * linux-low.c (get_detach_signal): New.
3530 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
3531 Pass on pending signals to PTRACE_DETACH. Check the result of the
3532 ptrace call.
3533 * server.c (program_signals, program_signals_p): New.
3534 (handle_general_set): Handle QProgramSignals.
3535 * server.h (program_signals, program_signals_p): Declare.
3536
e237a7e2
JK
35372012-03-05 Pedro Alves <palves@redhat.com>
3538 Jan Kratochvil <jan.kratochvil@redhat.com>
3539
3540 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
3541 New comment why.
3542
5808517f
YQ
35432012-03-03 Yao Qi <yao@codesourcery.com>
3544
3545 * tracepoint.c (tracepoint_look_up_symbols): Update call to
3546 agent_look_up_symbols.
3547
58b4daa5
YQ
35482012-03-03 Yao Qi <yao@codesourcery.com>
3549
3550 * Makefile.in (linux-low.o): Keep dependence on agent.h.
3551 (linux-x86-low.o): Likewise.
3552 * server.h: Remove in_process_agent_loaded.
3553 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
3554 common/agent.c.
3555 Update callers.
3556
8ffcbaaf
YQ
35572012-03-03 Yao Qi <yao@codesourcery.com>
3558
3559 * tracepoint.c (gdb_agent_capability): New global.
3560 (in_process_agent_loaded_ust): Renamed to
3561 `in_process_agent_supports_ust'.
3562 Update callers.
3563 (in_process_agent_supports_ust): Call agent_capability_check.
3564 (clear_installed_tracepoints): Assert that agent supports
3565 agent.
3566
d1feda86
YQ
35672012-03-03 Yao Qi <yao@codesourcery.com>
3568
3569 * linux-low.c (linux_supports_agent): New.
3570 (linux_target_ops): Initialize field `supports_agent' with
3571 linux_supports_agent.
3572 * target.h (struct target_ops) <supports_agent>: New.
3573 (target_supports_agent): New macro.
3574 * server.c (handle_general_set): Handle packet 'QAgent'.
3575 (handle_query): Send `QAgent+'.
3576 * Makefile.in (server.o): Depends on agent.h.
3577
2fa291ac
YQ
35782012-03-03 Yao Qi <yao@codesourcery.com>
3579
3580 * Makefile.in (OBS): Add agent.o.
3581 Add new rule for agent.o.
3582 Track dependence of tracepoint.c on agent.h.
3583 * tracepoint.c (run_inferior_command_1):
3584 (run_inferior_command): Call agent_run_command.
3585 (gdb_ust_connect_sync_socket): Deleted. Move it to
3586 common/agent.c.
3587 (resume_thread, stop_thread): Likewise.
3588 (gdb_ust_socket_init): Renamed to ...
3589 (gdb_agent_socket_init): ... New.
3590 (gdb_ust_thread): Renamed to ...
3591 (gdb_agent_helper_thread): ... New.
3592 (gdb_ust_init): Move some code to ...
3593 (gdb_agent_init): ... here. New.
3594 [HAVE_UST]: Call gdb_ust_init.
3595 (initialize_tracepoint_ftlib): Call gdb_agent_init.
3596 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
3597 * config.in, configure: Regenerated.
3598
05044653
PA
35992012-03-02 Pedro Alves <palves@redhat.com>
3600
3601 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
3602 * linux-low.c (struct simple_pid_list): New.
3603 (stopped_pids): New a struct simple_pid_list pointer.
3604 (add_to_pid_list, pull_pid_from_list): New.
3605 (handle_extended_wait): Don't assume the first signal new children
3606 report is SIGSTOP. Adjust call to pull_pid_from_list.
3607 (linux_wait_for_lwp): Adjust.
3608
8d00225b
YQ
36092012-03-02 Yao Qi <yao@codesourcery.com>
3610
3611 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
3612 debug log.
3613
19560ba5
YQ
36142012-03-02 Yao Qi <yao@codesourcery.com>
3615
3616 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
3617 `stop_pc' and `tpoint'. Update caller.
3618
1faeff08
MR
36192012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
3620
3621 * linux-low.h (linux_target_ops): Add regset_bitmap member.
3622 * linux-low.c (use_linux_regsets): New macro.
3623 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
3624 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
3625 (linux_register_in_regsets): New function.
3626 (usr_fetch_inferior_registers): Skip registers covered by
3627 regsets.
3628 (usr_store_inferior_registers): Likewise.
3629 (usr_fetch_inferior_registers): New macro.
3630 (usr_store_inferior_registers): Likewise.
3631 (linux_fetch_registers): Handle mixed regset/non-regset targets.
3632 (linux_store_registers): Likewise.
3633 * linux-mips-low.c (init_registers_mips_dsp_linux): New
3634 prototype.
3635 (init_registers_mips64_dsp_linux): Likewise.
3636 (init_registers_mips_linux): New macro.
3637 (init_registers_mips_dsp_linux): Likewise.
3638 (mips_dsp_num_regs): Likewise.
3639 (DSP_BASE, DSP_CONTROL): New fallback macros.
3640 (mips_base_regs): New macro.
3641 (mips_regmap): Use it. Fix the size.
3642 (mips_dsp_regmap): New variable.
3643 (mips_dsp_regset_bitmap): Likewise.
3644 (mips_arch_setup): New function.
3645 (mips_cannot_fetch_register): Use the_low_target.regmap rather
3646 than mips_regmap.
3647 (mips_cannot_store_register): Likewise.
3648 (the_low_target): Update .arch_setup, .num_regs and .regmap
3649 initializers. Add .regset_bitmap initializer.
3650 * linux-arm-low.c (the_low_target): Add .regset_bitmap
3651 initializer.
3652 * linux-bfin-low.c (the_low_target): Likewise.
3653 * linux-cris-low.c (the_low_target): Likewise.
3654 * linux-crisv32-low.c (the_low_target): Likewise.
3655 * linux-ia64-low.c (the_low_target): Likewise.
3656 * linux-m32r-low.c (the_low_target): Likewise.
3657 * linux-m68k-low.c (the_low_target): Likewise.
3658 * linux-ppc-low.c (the_low_target): Likewise.
3659 * linux-s390-low.c (the_low_target): Likewise.
3660 * linux-sh-low.c (the_low_target): Likewise.
3661 * linux-sparc-low.c (the_low_target): Likewise.
3662 * linux-tic6x-low.c (the_low_target): Likewise.
3663 * linux-x86-low.c (the_low_target): Likewise.
3664 * linux-xtensa-low.c (the_low_target): Likewise.
3665 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
3666 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
3667 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
3668 srv_xmlfiles.
3669 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
3670 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
3671
c03e6ccc
YQ
36722012-02-29 Yao Qi <yao@codesourcery.com>
3673 Pedro Alves <palves@redhat.com>
3674
3675 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
3676 `step_over_finished' is true.
3677
644cebc9
PA
36782012-02-27 Pedro Alves <palves@redhat.com>
3679
3680 * linux-low.c (pid_is_stopped): Delete, moved to common/.
3681 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
3682
c14d7ab2
PA
36832012-02-27 Pedro Alves <palves@redhat.com>
3684
3685 PR server/9684
3686 * linux-low.c (pid_is_stopped): New.
3687 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
3688
412c89dd
LM
36892012-02-25 Luis Machado <lgustavo@codesourcery.com>
3690
3691 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
3692 of conditions.
3693
b745defe
MR
36942012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
3695
3696 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
3697
9f3a5c85
LM
36982012-02-24 Luis Machado <lgustavo@codesourcery>
3699
3700 * server.c (handle_query): Advertise support for target-side
3701 breakpoint condition evaluation.
3702 (process_point_options): New function.
3703 (process_serial_event): When inserting a breakpoint, check for
3704 a target-side condition that should be evaluated.
3705
3706 * mem-break.c: Include regcache.h and ax.h.
3707 (point_cond_list_t): New data structure.
3708 (breakpoint) <cond_list>: New field.
3709 (find_gdb_breakpoint_at): Make non-static.
3710 (delete_gdb_breakpoint_at): Clear any target-side
3711 conditions.
3712 (clear_gdb_breakpoint_conditions): New function.
3713 (add_condition_to_breakpoint): Likewise.
3714 (add_breakpoint_condition): Likewise.
3715 (gdb_condition_true_at_breakpoint): Likewise.
3716 (gdb_breakpoint_here): Return result directly instead
3717 of going through a local variable.
3718
3719 * mem-break.h (find_gdb_breakpoint_at): New prototype.
3720 (clear_gdb_breakpoint_conditions): Likewise.
3721 (add_breakpoint_condition): Likewise.
3722 (gdb_condition_true_at_breakpoint): Likewise.
3723
3724 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
3725 (need_step_over_p): Take target-side breakpoint condition into
3726 consideration.
3727
5e1dc496
LM
37282012-02-24 Luis Machado <lgustavo@codesourcery>
3729
3730 * server.h: Include tracepoint.h.
3731 (agent_mem_read, agent_get_trace_state_variable_value,
3732 agent_set_trace_state_variable_value,
3733 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
3734 get_set_tsv_func_addr): New prototypes.
3735
3736 * ax.h: New include file.
3737 * ax.c: New source file.
3738
3739 * tracepoint.c: Include ax.h.
3740 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
3741 agent_expr, eval_result_type): Move to ax.h.
3742 (parse_agent_expr): Rename to ...
3743 (gdb_parse_agent_expr): ... this, make it non-static and move
3744 to ax.h.
3745 (unparse_agent_expr) Rename to ...
3746 (gdb_unparse_agent_expr): ... this, make it non-static and move
3747 to ax.h.
3748 (eval_agent_expr): Rename to ...
3749 (eval_tracepoint_agent_expr): ... this.
3750 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
3751 forward declarations.
3752 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
3753 (agent_get_trace_state_variable_value): New function.
3754 (agent_set_trace_state_variable_value): New function.
3755 (cmd_qtdp): Call gdb_parse_agent_expr (...).
3756 (response_tracepoint): Call gdb_unparse_agent_expr (...).
3757 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
3758 (condition_true_at_tracepoint): Likewise.
3759 (parse_agent_expr): Rename to ...
3760 (gdb_parse_agent_expr): ... this and move to ax.c.
3761 (unparse_agent_expr): Rename to ...
3762 (gdb_unparse_agent_expr): ... this and move to ax.c.
3763 (gdb_agent_op_name): Move to ax.c.
3764 (eval_agent_expr): Rename to ...
3765 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
3766 and move to ax.c.
3767 (eval_tracepoint_agent_expr): New function.
3768 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 3769 non-static.
5e1dc496
LM
3770 (current_insn_ptr, emit_error, struct bytecode_address): Move to
3771 ax.c.
3772 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
3773 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
3774 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
3775 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
3776 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
3777 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
3778 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
3779 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
3780 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
3781 (compile_bytecodes): Remove forward declaration.
3782 (is_goto_target): Move to ax.c.
3783 (compile_bytecodes): Move to ax.c and call
3784 agent_get_trace_state_variable_value (...) and
3785 agent_set_trace_state_variable_value (...).
3786
3787 * Makefile.in: Update ax.c and IPA dependencies.
3788
277e4e52
PA
37892012-02-24 Pedro Alves <palves@redhat.com>
3790
3791 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
3792 (cmd_bigqtbuffer_circular): ... this. Only handle
3793 'QTBuffer:circular:'.
3794 (handle_tracepoint_general_set): Adjust.
3795
bf4c19f7
YQ
37962012-02-16 Yao Qi <yao@codesourcery.com>
3797
3798 * inferiors.c: Move code to ...
3799 * dll.c: .... here. New.
3800 * server.h: Declare clear_dlls.
3801 * Makefile.in (SFILES): Add dll.c.
3802 (OBS): Add dll.o
3803 (dll.o): New rule.
3804
d73f2619
YQ
38052012-02-11 Yao Qi <yao@codesourcery.com>
3806
3807 * server.c: (handle_monitor_command): Add a new parameter
3808 `own_buf'.
3809 (handle_query): Update caller.
3810
f8255c2a
JB
38112012-02-09 Joel Brobecker <brobecker@adacore.com>
3812
3813 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
3814 * configure, config.in: Regenerate.
3815 * hostio.c: Provide an alternate implementation if HAVE_READLINK
3816 is not defined.
3817
da84f473
PA
38182012-02-02 Pedro Alves <palves@redhat.com>
3819
3820 Try SIGKILL first, then PTRACE_KILL.
3821 * linux-low.c (linux_kill_one_lwp): New.
3822 (linux_kill_one_lwp): Rename to ...
3823 (kill_one_lwp_callback): ... this. Use the new
3824 linux_kill_one_lwp.
3825
e886a173
PA
38262012-02-02 Pedro Alves <palves@redhat.com>
3827
3828 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
3829 inferior.
3830
be07f1a2
PA
38312012-01-27 Pedro Alves <palves@redhat.com>
3832
3833 * linux-low.c (linux_child_pid_to_exec_file): Delete.
3834 (elf_64_file_p): Make static.
3835 (linux_pid_exe_is_elf_64_file): New.
3836 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
3837 Delete declarations.
3838 (linux_pid_exe_is_elf_64_file): Declare.
3839 * linux-x86-low.c (x86_arch_setup): Use
3840 linux_pid_exe_is_elf_64_file.
3841
d8301ad1
JK
38422012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
3843
3844 * linux-low.c (linux_wait_for_event_1): Rename to ...
3845 (linux_wait_for_event): ... here and merge it with former
3846 linux_wait_for_event - new variable wait_ptid, use it.
3847 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
3848
01b17894
PA
38492012-01-23 Pedro Alves <palves@redhat.com>
3850
3851 * server.c (main): Avoid yet another case of infinite loop while
3852 detaching/killing after a longjmp.
3853
e825046f
JK
38542012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
3855
3856 Code cleanup.
3857 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
3858
b9e7b9c3
UW
38592012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
3860
3861 * hostio.c (handle_readlink): New function.
3862 (handle_vFile): Call it to handle "vFile:readlink" packets.
3863
901f9912
UW
38642012-01-20 Pedro Alves <palves@redhat.com>
3865 Ulrich Weigand <ulrich.weigand@linaro.org>
3866
3867 * server.c (handle_v_requests): Only support vAttach and vRun to
3868 start multiple processes when in extended protocol mode.
3869
fc1ab1a0
PA
38702012-01-17 Pedro Alves <palves@redhat.com>
3871
3872 * tracepoint.c (initialize_tracepoint): Use mmap instead of
3873 memalign plus mprotect to allocate the scratch buffer.
3874
7d5d4e98
PA
38752012-01-13 Pedro Alves <palves@redhat.com>
3876
3877 * server.c (attach_inferior): Clear `cont_thread'.
3878
f128d5e9
PA
38792012-01-13 Pedro Alves <palves@redhat.com>
3880
3881 * server.c (main): Avoid infinite loop while detaching/killing
3882 after a longjmp.
3883
06db92f0
DE
38842012-01-09 Doug Evans <dje@google.com>
3885
3886 * server.c (start_inferior): Set last_ptid in --wrapper case.
3887
32d92999
YQ
38882012-01-06 Yao Qi <yao@codesourcery.com>
3889
3890 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
3891 defined.
3892 [IN_PROCESS_AGENT] (debug_agent): New global variable.
3893
5e0a92a9
YQ
38942012-01-04 Yao Qi <yao@codesourcery.com>
3895
3896 * tracepoint.c (cmd_qtdp): Print debug message
3897 for static tracepoint.
3898
ae639e8c
YQ
38992012-01-04 Yao Qi <yao@codesourcery.com>
3900
3901 * tracepoint.c (trace_vdebug): Differentiate debug message
3902 between gdbserver and IPA.
3903
f72429c5
YQ
39042012-01-03 Yao Qi <yao@codesourcery.com>
3905
3906 * tracepoint.c (tracepoint_was_hit): Don't collect for
3907 static tracepoint.
3908
12c3e59c
JB
39092012-01-02 Joel Brobecker <brobecker@adacore.com>
3910
3911 * terminal.h: Reformat copyright header.
3912
67827812
JB
39132012-01-02 Joel Brobecker <brobecker@adacore.com>
3914
3915 * server.c (gdbserver_version): Update copyright year.
3916 * gdbreplay.c (gdbreplay_version): Likewise.
3917
3e52c33d
JK
39182011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
3919
3920 * linux-low.c (linux_create_inferior): Put empty if clause for write.
3921
3922 Revert:
3923 2011-12-18 Hui Zhu <teawater@gmail.com>
3924 * linux-low.c (linux_create_inferior): Save return value to ret.
3925
66f1260e
HZ
39262011-12-18 Hui Zhu <teawater@gmail.com>
3927
3928 * linux-low.c (linux_create_inferior): Save return value to ret.
3929
e77616d7
DE
39302011-12-16 Doug Evans <dje@google.com>
3931
e7b06c57
DE
3932 * linux-low.c (linux_create_inferior): If stdio connection,
3933 redirect stdin from /dev/null, stdout to stderr.
3934 * remote-utils.c (remote_is_stdio): New static global.
3935 (remote_connection_is_stdio): New function.
3936 (remote_prepare): Handle stdio connection.
3937 (remote_open): Ditto.
3938 (remote_close): Don't close stdin for stdio connections.
3939 (read_prim,write_prim): New functions. Replace all calls to
3940 read/write to these.
3941 * server.c (main): Watch for "-" argument. Move call to
3942 remote_prepare before start_inferior.
3943 * server.h (STDIO_CONNECTION_NAME): New macro.
3944 (remote_connection_is_stdio): Declare.
3945
e77616d7
DE
3946 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
3947 in debugging output.
3948
82067193
YQ
39492011-12-15 Yao Qi <yao@codesourcery.com>
3950
3951 * tracepoint.c: Include sys/syscall.h.
3952 (gdb_ust_thread): Remove preprocessor conditional.
3953
82bfbe7e
PA
39542011-12-14 Pedro Alves <pedro@codesourcery.com>
3955
3956 * linux-low.c (linux_detach_one_lwp): Call
3957 the_low_target.prepare_to_resume before detaching.
3958
712c6575
YQ
39592011-12-14 Yao Qi <yao@codesourcery.com>
3960
3961 * tracepoint.c (gdb_ust_thread): Don't ignore return value
3962 of write.
3963
d54d1edf
YQ
39642011-12-14 Yao Qi <yao@codesourcery.com>
3965
3966 * i386-low.c (i386_low_stopped_data_address): Initialize local
3967 variable `control'.
3968
6210a125
PA
39692011-12-13 Pedro Alves <pedro@codesourcery.com>
3970
3971 PR remote/13492
3972
3973 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
3974 DR_CONTROL unless necessary. Extend comments.
3975 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
3976 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
3977
2ece8244
YQ
39782011-12-13 Yao Qi <yao@codesourcery.com>
3979
3980 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
3981 macros.
3982 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
3983
784867a5
JK
39842011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
3985
3986 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
3987 Print new debug message for such case.
3988
6bf36717
JK
39892011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
3990
3991 Fix overlapping memcpy.
3992 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
3993 the read_inferior_memory transfer.
3994 (delete_fast_tracepoint_jump): New variable buf. Use it for the
3995 write_inferior_memory transfer.
3996 (set_fast_tracepoint_jump): New variable buf. Use it for the
3997 read_inferior_memory and write_inferior_memory transfers.
3998 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
3999 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
4000 Use it for the write_inferior_memory transfer.
4001 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
4002 buffers.
4003
50275556
MR
40042011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4005
4006 * linux-low.c (fetch_register, store_register): Make code
4007 consistent, fix formatting.
4008
7325beb4
MR
40092011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4010
4011 * linux-low.c (usr_store_inferior_registers): Factor out code
4012 to handle individual registers into...
4013 (store_register): ... this new function.
4014
c642a434
UW
40152011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
4016
4017 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
4018 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
4019 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
4020 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
4021 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
4022 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
4023 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
4024 (srv_xmlfiles): Add new XML files.
4025
4026 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
4027 and <sys/uio.h>.
4028 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
4029 (init_registers_s390_linux32v1): Add prototype.
4030 (init_registers_s390_linux32v2): Likewise.
4031 (init_registers_s390_linux64v1): Likewise.
4032 (init_registers_s390_linux64v2): Likewise.
4033 (init_registers_s390x_linux64v1): Likewise.
4034 (init_registers_s390x_linux64v2): Likewise.
4035 (s390_num_regs): Increment to 52.
4036 (s390_regmap): Add orig_r2 register.
4037 (s390_num_regs_3264): Increment to 68.
4038 (s390_regmap_3264): Add orig_r2 register.
4039 (s390_collect_ptrace_register): Handle orig_r2 register.
4040 (s390_supply_ptrace_register): Likewise.
4041 (s390_fill_last_break): New function.
4042 (s390_store_last_break): Likewise.
4043 (s390_fill_system_call): New function.
4044 (s390_store_system_call): Likewise.
4045 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
4046 register sets.
4047 (s390_check_regset): New function.
4048 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
4049 NT_S390_SYSTEM_CALL regsets and use appropriate description.
4050 Update target_regsets for available register sets.
4051
2268b414
JK
40522011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
4053 Jan Kratochvil <jan.kratochvil@redhat.com>
4054
4055 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
4056 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
4057 New.
4058 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
4059 * linux-low.h (struct process_info_private): New member r_debug.
4060 * server.c (handle_qxfer_libraries): Call
4061 the_target->qxfer_libraries_svr4.
4062 (handle_qxfer_libraries_svr4): New function.
4063 (qxfer_packets): New entry "libraries-svr4".
4064 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
4065 * target.h (struct target_ops): New member qxfer_libraries_svr4.
4066 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
4067 PACKET_qXfer_libraries_svr4.
4068
d6db1fab
UW
40692011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
4070
4071 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
4072 PSW address/mask between 8-byte and 16-byte formats.
4073 (s390_supply_ptrace_register): Likewise.
4074 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
4075 basic addressing mode bit.
4076
242f5f1c
SS
40772011-11-24 Stan Shebs <stan@codesourcery.com>
4078
4079 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
4080
f196051f
SS
40812011-11-17 Stan Shebs <stan@codesourcery.com>
4082
4083 * tracepoint.c (struct tracepoint): New field traceframe_usage.
4084 (tracing_start_time): New global.
4085 (tracing_stop_time): New global.
4086 (tracing_user_name): New global.
4087 (tracing_notes): New global.
4088 (tracing_stop_note): New global.
4089 (cmd_qtstart): Set traceframe_usage, start_time.
4090 (stop_tracing): Set stop_time.
4091 (cmd_qtstatus): Report additional status.
4092 (cmd_qtp): New function.
4093 (handle_tracepoint_query): Call it.
4094 (cmd_qtnotes): New function.
4095 (handle_tracepoint_general_set): Call it.
4096 (get_timestamp): Rename from tsv_get_timestamp.
4097
405f8e94
SS
40982011-11-14 Stan Shebs <stan@codesourcery.com>
4099 Kwok Cheung Yeung <kcy@codesourcery.com>
4100
4101 * linux-x86-low.c (small_jump_insn): New.
4102 (i386_install_fast_tracepoint_jump_pad): Add arguments for
4103 trampoline and error message, build a trampoline and issue a small
4104 jump instruction to it.
4105 (x86_install_fast_tracepoint_jump_pad): Add arguments for
4106 trampoline and error message.
4107 (x86_get_min_fast_tracepoint_insn_len): New.
4108 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
4109 * linux-low.h (struct linux_target_ops): Add arguments to
4110 install_fast_tracepoint_jump_pad operation, add new operation.
4111 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
4112 arguments.
4113 (linux_get_min_fast_tracepoint_insn_len): New function.
4114 (linux_target_op): Add new operation.
4115 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
4116 (gdb_trampoline_buffer_end): Ditto.
4117 (gdb_trampoline_buffer_error): Ditto.
4118 (struct ipa_sym_addresses): Add fields for new IPA variables.
4119 (symbol_list): Add entries for new IPA variables.
4120 (struct tracepoint): Add fields to hold the address range of the
4121 trampoline used by the tracepoint.
4122 (trampoline_buffer_head): New static variable.
4123 (trampoline_buffer_tail): Ditto.
4124 (claim_trampoline_space): New function.
4125 (have_fast_tracepoint_trampoline_buffer): New function.
4126 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
4127 structure.
4128 (install_fast_tracepoint): Ditto, also add error buffer argument.
4129 (cmd_qtminftpilen): New function.
4130 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
4131 (fast_tracepoint_from_trampoline_address): New function.
4132 (fast_tracepoint_collecting): Handle trampoline as part of jump
4133 pad space.
4134 (set_trampoline_buffer_space): New function.
4135 (initialize_tracepoint): Initialize new IPA variables.
4136 * target.h (struct target_ops): Add arguments to
4137 install_fast_tracepoint_jump_pad operation, add new
4138 get_min_fast_tracepoint_insn_len operation.
4139 (target_get_min_fast_tracepoint_insn_len): New.
4140 (install_fast_tracepoint_jump_pad): Add arguments.
4141 * server.h (IPA_BUFSIZ): Define.
4142 * linux-i386-ipa.c: Include extra header files.
4143 (initialize_fast_tracepoint_trampoline_buffer): New function.
4144 (initialize_low_tracepoint): Call it.
4145 * server.h (set_trampoline_buffer_space): Declare.
4146 (claim_trampoline_space): Ditto.
4147 (have_fast_tracepoint_trampoline_buffer): Ditto.
4148
1e4d1764
YQ
41492011-11-14 Yao Qi <yao@codesourcery.com>
4150
4151 * server.c (handle_query): Handle InstallInTrace for qSupported.
4152 * tracepoint.c (add_tracepoint): Sort list.
4153 (install_tracepoint, download_tracepoint): New.
4154 (cmd_qtdp): Call them to install and download tracepoints.
4155 (sort_tracepoints): Removed.
4156 (cmd_qtstart): Update.
4157
5c73ff4e
YQ
41582011-11-14 Yao Qi <yao@codesourcery.com>
4159
4160 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
4161 * mem-break.h: Declare.
4162 * tracepoint.c (cmd_qtstart): Move some code to ...
4163 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
4164 New.
4165 (download_tracepoints): Move some code to ...
4166 (download_tracepoint_1): ... here. New.
4167
86a30030
YQ
41682011-11-08 Yao Qi <yao@codesourcery.com>
4169
4170 * remote-utils.c (relocate_instruction): A comment fix.
4171
8d26e50c
JB
41722011-11-07 Joel Brobecker <brobecker@adacore.com>
4173
4174 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
4175 (i386_dr_low_get_control, i386_dr_low_get_status): Use
4176 dr_status_mirror and dr_control_mirror from debug_reg_state.
4177 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
4178 (i386_initial_stuff): Remove use of deleted globals.
4179 (i386_get_thread_context, i386_set_thread_context,
4180 i386_thread_added): Use dr_status_mirror and dr_control_mirror
4181 from debug_reg_state.
4182
a59306a3
YQ
41832011-11-05 Yao Qi <yao@codesourcery.com>
4184
4185 * tracepoint.c (gdb_collect): Loop over tracepoints of same
4186 address as TPOINT's.
4187
3065dfb6
SS
41882011-11-02 Stan Shebs <stan@codesourcery.com>
4189
4190 * tracepoint.c (agent_mem_read_string): New function.
4191 (eval_agent_expr): Call it for tracenz.
4192 * server.c (handle_query): Report support for tracenz.
4193
fd0d8c7c
YQ
41942011-11-02 Yao Qi <yao@codesourcery.com>
4195
4196 * tracepoint.c (cmd_qtstart): Remove unused local variables.
4197
609086b1
YQ
41982011-11-02 Yao Qi <yao@codesourcery.com>
4199
4200 * target.h: Fix a typo in comment.
4201
b9fd1791
PA
42022011-10-31 Pedro Alves <pedro@codesourcery.com>
4203
4204 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
4205 clobber the breakpoints' shadows with fast tracepoint jumps.
4206 * mem-break.h (check_mem_write): Add `myaddr' parameter.
4207 * target.c (write_inferior_memory): Also pass MYADDR down to
4208 check_mem_write.
4209
03583c20
UW
42102011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
4211
4212 * configure.ac: Check support for personality routine.
4213 * configure: Regenerate.
4214 * config.in: Likewise.
4215 * linux-low.c: Include <sys/personality.h>.
4216 Define ADDR_NO_RANDOMIZE if necessary.
4217 (linux_create_inferior): Disable address space randomization when
4218 forking inferior, if requested.
4219 (linux_supports_disable_randomization): New function.
4220 (linux_target_ops): Install it.
4221 * server.h (disable_randomization): Declare.
4222 * server.c (disable_randomization): New global variable.
4223 (handle_general_set): Handle QDisableRandomization.
4224 (handle_query): Likewise for qSupported.
4225 (main): Support --disable-randomization and --no-disable-randomization
4226 command line arguments.
4227 * target.h (struct target_ops): Add supports_disable_randomization.
4228 (target_supports_disable_randomization): New macro.
4229
723b724b
MF
42302011-09-29 Mike Frysinger <vapier@gentoo.org>
4231
4232 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
4233 ifdef check.
4234 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
4235 [!PT_GETDSBT] (target_loadmap): New definition.
4236 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
4237 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
4238 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
4239 and PT_GETDSBT to LINUX_LOADMAP.
4240 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
4241 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
4242
55329a5c 42432011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
4244
4245 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
4246 (arm_linux_hwbp_cap): New static variable.
4247 (arm_linux_get_hwbp_cap): Replace by ...
4248 (arm_linux_init_hwbp_cap): ... this new function.
4249 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
4250 (arm_linux_get_hw_watchpoint_count): Likewise.
4251 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4252 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
4253 (arm_prepare_to_resume): Use perror_with_name instead of error.
4254
55329a5c 42552011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
4256
4257 * linux-arm-low.c: Include <signal.h>.
4258 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
4259 (struct arm_linux_hwbp_cap): New data type.
4260 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
4261 (struct arm_linux_hw_breakpoint): New data type.
4262 (MAX_BPTS, MAX_WPTS): Define.
4263 (struct arch_process_info, struct arch_lwp_info): New data types.
4264 (arm_linux_get_hwbp_cap): New function.
4265 (arm_linux_get_hw_breakpoint_count): Likewise.
4266 (arm_linux_get_hw_watchpoint_count): Likewise.
4267 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4268 (arm_hwbp_control_initialize): Likewise.
4269 (arm_hwbp_control_is_enabled): Likewise.
4270 (arm_hwbp_control_is_initialized): Likewise.
4271 (arm_hwbp_control_disable): Likewise.
4272 (arm_linux_hw_breakpoint_equal): Likewise.
4273 (arm_linux_hw_point_initialize): Likewise.
4274 (struct update_registers_data): New data structure.
4275 (update_registers_callback: New function.
4276 (arm_insert_point): Likewise.
4277 (arm_remove_point): Likewise.
4278 (arm_stopped_by_watchpoint): Likewise.
4279 (arm_stopped_data_address): Likewise.
4280 (arm_new_process): Likewise.
4281 (arm_new_thread): Likewise.
4282 (arm_prepare_to_resume): Likewise.
4283 (the_low_target): Register arm_insert_point, arm_remove_point,
4284 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
4285 arm_new_thread, and arm_prepare_to_resume.
4286
6b9801d4
SS
42872011-09-15 Stan Shebs <stan@codesourcery.com>
4288
4289 * server.h (struct emit_ops): Add compare-goto fields.
4290 * tracepoint.c (gdb_agent_op_sizes): New table.
4291 (emit_eq_goto): New function.
4292 (emit_ne_goto): New function.
4293 (emit_lt_goto): New function.
4294 (emit_le_goto): New function.
4295 (emit_gt_goto): New function.
4296 (emit_ge_goto): New function.
4297 (is_goto_target): New function.
4298 (compile_bytecodes): Recognize special cases of compare-goto
4299 combinations and call specialized emitters for them.
4300 * linux-x86-low.c (amd64_emit_eq_goto): New function.
4301 (amd64_emit_ne_goto): New function.
4302 (amd64_emit_lt_goto): New function.
4303 (amd64_emit_le_goto): New function.
4304 (amd64_emit_gt_goto): New function.
4305 (amd64_emit_ge_goto): New function.
4306 (amd64_emit_ops): Add the new functions.
4307 (i386_emit_eq_goto): New function.
4308 (i386_emit_ne_goto): New function.
4309 (i386_emit_lt_goto): New function.
4310 (i386_emit_le_goto): New function.
4311 (i386_emit_gt_goto): New function.
4312 (i386_emit_ge_goto): New function.
4313 (i386_emit_ops): Add the new functions.
4314
bf15cbda
SS
43152011-09-08 Stan Shebs <stan@codesourcery.com>
4316
4317 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
4318 (i386_emit_epilogue): Restore %ebx.
4319
943ca1dd
JZ
43202011-08-31 Jie Zhang <jzhang918@gmail.com>
4321
4322 * server.c (step_thread): Remove definition.
4323 (process_serial_event): Don't handle Hs.
4324 * server.h (step_thread): Remove declaration.
4325 * target.c (set_desired_inferior): Remove use of step_thread.
4326
e3deef73
LM
43272011-08-24 Luis Machado <lgustavo@codesourcery.com>
4328
4329 * linux-low.c: Include linux-procfs.h.
4330 (linux_attach_lwp_1): Update comments.
4331 (linux_attach): Scan for existing threads when attaching to a
4332 process that is the tgid.
4333 * Makefile.in: Update dependencies.
4334
13da1c97
LM
43352011-08-24 Luis Machado <lgustavo@codesourcery.com>
4336
4337 * configure.srv: Add linux-procfs.o dependencies.
4338
881127c9
YQ
43392011-08-14 Yao Qi <yao@codesourcery.com>
4340
4341 * target.h (struct target_ops): Fix indent.
4342 * win32-low.c (win32_target_ops): Fix comment.
4343
58dbd541
YQ
43442011-08-14 Andrew Jenner <andrew@codesourcery.com>
4345 Yao Qi <yao@codesourcery.com>
4346
4347 * Makefile.in (clean): Remove tic6x-*.c files.
4348 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
4349 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
4350 (tic6x-c64xp-linux.c): Likewise.
4351 * configure.srv: Add support for tic6x-*-uclinux.
4352 * linux-tic6x-low.c: New.
4353 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
4354
78d85199
YQ
43552011-08-14 Andrew Stubbs <ams@codesourcery.com>
4356 Yao Qi <yao@codesourcery.com>
4357
4358 * target.h (struct target_ops): Add read_loadmap.
4359 * linux-low.c (struct target_loadseg): New type.
4360 (struct target_loadmap): New type.
4361 (linux_read_loadmap): New function.
4362 (linux_target_ops): Add linux_read_loadmap.
4363 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
4364 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
4365 to NULL.
78d85199 4366
a959a88d
EZ
43672011-08-05 Eli Zaretskii <eliz@gnu.org>
4368
4369 * win32-low.c: Include <stdint.h>.
4370
1ced966e
PA
43712011-07-22 Pedro Alves <pedro@codesourcery.com>
4372
4373 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
4374 to the inferior here.
4375 (i386_remove_aligned_watchpoint): Ditto.
4376 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
4377 fit part of the watchpoint in the debug registers.
4378 (i386_update_inferior_debug_regs): New.
4379 (i386_low_insert_watchpoint): Work on a local mirror of the debug
4380 registers, and only update the inferior on success.
4381 (i386_low_remove_watchpoint): Ditto.
4382
d26e3629
KY
43832011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
4384
4385 * linux-low.c (compare_ints, unique, list_threads, show_process,
4386 linux_core_of_thread): Delete.
4387 (linux_target_ops): Change linux_core_of_thread to
4388 linux_common_core_of_thread.
4389 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
4390 * utils.c (malloc_failure): Change type of argument.
4391 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
4392 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
4393 common/linux-osdata.c, common/ptid.c and common/buffer.c.
4394 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
4395 (IPA_OBJS): Add common-utils-ipa.o.
4396 (ptid_h, linux_osdata_h): New macros.
4397 (server_h): Add common/common-utils.h, common/xml-utils.h,
4398 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
4399 common/ptid.h.
4400 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
4401 ptid.o, buffer.o): New rules.
4402 (linux-low.o): Add common/linux-osdata.h as a dependency.
4403 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
4404 * configure.ac: Add AC_HEADER_DIRENT check.
4405 * config.in: Regenerate.
4406 * configure: Regenerate.
4407 * remote-utils.c (xml_escape_text): Delete.
4408 (buffer_grow, buffer_free, buffer_init, buffer_finish,
4409 buffer_xml_printf): Move to common/buffer.c.
4410 * server.c (main): Remove call to initialize_inferiors.
4411 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
4412 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
4413 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
4414 internal_error, gdb_assert, gdb_assert_fail): Delete.
4415 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
4416 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
4417 common/buffer.h.
4418 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
4419 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
4420 initialize_inferiors): Delete.
4421
2275a1a7
PA
44222011-07-20 Pedro Alves <pedro@codesourcery.com>
4423
4424 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
4425 symbol error.
4426
0a5b1e09
PA
44272011-05-31 Pedro Alves <pedro@codesourcery.com>
4428
4429 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
4430 assertion.
4431 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
4432
6938fd34
YQ
44332011-05-26 Yao Qi <yao@codesourcery.com>
4434
4435 * Makefile.in (thread-db.o): Track dependence to
4436 common/gdb_thread_db.h.
4437 * thread-db.c: include gdb_thread_db.h from right place.
4438
b481f9e0
TT
44392011-05-16 Adrian Cornish <gnu@bluedreamer.com>
4440
4441 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
4442 __FILE__ and __LINE__ to internal_error.
4443
98a5dd13
DE
44442011-05-13 Doug Evans <dje@google.com>
4445
4446 * thread-db.c (try_thread_db_load_from_sdir): New function.
4447 (try_thread_db_load_from_dir): New function.
4448 (thread_db_load_search): Handle $sdir, ignore $pdir.
4449 Remove trying of system directories if search of
4450 libthread-db-search-path fails, that is now done via $sdir.
4451
d248b706
KY
44522011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
4453
4454 * server.c (handle_query): Add EnableDisableTracepoints to the list
4455 of supported features.
43aaf8b6 4456 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 4457 tracepoints.
43aaf8b6
PA
4458 (cmd_qtenable_disable): New.
4459 (cmd_qtstart): Install tracepoints even if disabled.
4460 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
4461 receiving a QTEnable or QTDisable packet.
4462 (gdb_collect): Skip data collection if fast tracepoint is disabled.
4463 (ust_marker_to_static_tracepoint): Do not ignore disabled static
4464 tracepoints.
4465 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 4466
84e578fb
DE
44672011-05-10 Doug Evans <dje@google.com>
4468
4469 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
4470
71f55dd8
DE
44712011-05-04 Doug Evans <dje@google.com>
4472
4473 * linux-low.c (linux_join): Skip process lookup.
4474 * spu-low.c (spu_join): Ditto.
4475 * server.c (join_inferiors_callback): Delete.
4476 (process_serial_event): For 'D' packet (detach) call join_inferior
4477 directly.
4478
4d393d60
JM
44792011-05-04 Joseph Myers <joseph@codesourcery.com>
4480
4481 * README: Don't mention xscale*-*-linux*.
4482 * configure.srv (xscale*-*-linux*): Don't handle target.
4483
b00ad6ff
NF
44842011-04-27 Nathan Froyd <froydnj@codesourcery.com>
4485
4486 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
4487 casting pointers.
4488 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
4489 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
4490 (i386_emit_void_call_2): Likewise.
4491
af96c192
YQ
44922011-04-26 Yao Qi <yao@codesourcery.com>
4493
43aaf8b6
PA
4494 * linux-low.c: Move common macros to linux-ptrace.h.
4495 Include linux-ptrace.h.
af96c192
YQ
4496 * Makefile.in (linux_ptrace_h): New.
4497 (linux-low.o): Depends on linux-ptrace.h.
4498
03f2bd59
JK
44992011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
4500
4501 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
4502 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
4503 (remote_prepare): New function with most of the TCP code from ...
4504 (remote_open): ... here. Detect PORT here unconditionally. Move also
4505 setting transport_is_reliable.
4506 * server.c (run_once): New variable.
4507 (gdbserver_usage): Document it.
4508 (main): Set run_once for `--once'. Call remote_prepare. Exit after
4509 the first run if RUN_ONCE.
4510 * server.h (run_once, remote_prepare): New declarations.
4511
7a9dd1b2
TT
45122011-04-19 Tom Tromey <tromey@redhat.com>
4513
4514 * win32-low.c (handle_load_dll): Remove duplicate "the".
4515
81239425
PM
45162011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
4517
4518 Remove support for old Cygwin 1.5 versions.
4519 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
4520 function to avoid warning.
4521 (win32_add_one_solib): Use cygwin_conv_path function to avoid
4522 warning.
4523
9e0627f1
PM
45242011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
4525
4526 * gdbserver/server.h (Macro _): Define it if not available.
4527
588eebee
MS
45282011-03-14 Michael Snyder <msnyder@vmware.com>
4529
348af9f7 4530 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 4531
43f70d4c
JB
45322011-03-10 Joel Brobecker <brobecker@adacore.com>
4533
4534 * Makefile.in (maintainer-clean realclean distclean): Remove
4535 "make ... subdir_do" command.
4536
348af9f7
MS
45372011-03-10 Michael Snyder <msnyder@vmware.com>
4538
4539 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
4540
4541 * server.c (handle_v_run): Free alloced buffer on early return.
4542
e637a4f5
YQ
45432011-03-09 Yao Qi <yao@codesourcery.com>
4544
4545 Revert:
4546 2011-03-04 Yao Qi <yao@codesourcery.com>
4547
4548 * Makefile.in: Remove GNU make feature --directory.
4549
4550 2011-03-05 Yao Qi <yao@codesourcery.com>
4551
4552 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
4553 (subdir_do): New make target. Copied from gdb/Makefile.
4554 (maintainer-clean, realclean, distclean, clean): Call corresponding
4555 make targets in common/Makefile.
4556
4557 2011-02-11 Yao Qi <yao@codesourcery.com>
4558
4559 * configure.ac: Call AC_PROG_RANLIB.
4560 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
4561 * configure: Regenerate.
4562
e6edda56
JK
45632011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4564
4565 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
4566
e5141119
JB
45672011-03-06 Yao Qi <yao@codesourcery.com>
4568
4569 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
4570
64794aa4
JB
45712011-03-05 Yao Qi <yao@codesourcery.com>
4572
4573 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
4574 (subdir_do): New make target. Copied from gdb/Makefile.
4575 (maintainer-clean, realclean, distclean, clean): Call corresponding
4576 make targets in common/Makefile.
4577
7a762829
YQ
45782011-03-04 Yao Qi <yao@codesourcery.com>
4579
4580 * Makefile.in: Remove GNU make feature --directory.
4581
348af9f7
MS
45822011-03-04 Michael Snyder <msnyder@vmware.com>
4583
4584 * server.c (queue_stop_reply): Call xmalloc not malloc.
4585
45862011-03-02 Michael Snyder <msnyder@vmware.com>
4587
4588 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
4589
9f72fee2
MS
45902011-02-28 Michael Snyder <msnyder@vmware.com>
4591
588eebee
MS
4592 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
4593 (cmd_qtframe): Ditto.
4594 (cmd_qtbuffer): Ditto.
4595 (cmd_bigqtbuffer): Ditto.
4596
9f72fee2
MS
4597 * utils.c (decimal2str): Initialize 'width' to nine, then
4598 don't mess with it.
4599
8040bd49
UW
46002011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
4601
4602 * hostio.c (require_data): Free *data, not data.
4603
7e52cbd0
JK
46042011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4605
4606 * hostio.c (require_data): Use free, not xfree.
4607
9130f83e
MS
46082011-02-27 Michael Snyder <msnyder@vmware.com>
4609
4b812f4e
MS
4610 * server.c (handle_query): Discard unused value.
4611
9130f83e
MS
4612 * hostio.c (require_data): Free malloc memory before returning
4613 error.
4614
69d37113
MS
46152011-02-26 Michael Snyder <msnyder@vmware.com>
4616
4617 * linux-low.c (list_threads): Call closedir for dirent.
4618
35f5825a
MS
46192011-02-27 Michael Snyder <msnyder@vmware.com>
4620
2a589cef
MS
4621 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
4622 a case statement falls through.
4623
0adea5f7
MS
4624 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
4625
35f5825a
MS
4626 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
4627 in comparison.
4628
238f1c74
MS
46292011-02-26 Michael Snyder <msnyder@vmware.com>
4630
4631 * utils.c (decimal2str): Eliminate dead code and dead param.
4632 (pulongest): Drop dead param from call to decimal2str.
4633 (plongest): Ditto.
4634
633ff500
JB
46352011-02-24 Joel Brobecker <brobecker@adacore.com>
4636
4637 Revert the following patch (not approved yet):
4638 2011-02-21 Hui Zhu <teawater@gmail.com>
4639 * tracepoint.c (tp_printf): New function.
4640 (eval_agent_expr): Handle gdb_agent_op_printf.
4641
f9c6ff72
HZ
46422011-02-21 Hui Zhu <teawater@gmail.com>
4643
4644 * tracepoint.c (tp_printf): New function.
4645 (eval_agent_expr): Handle gdb_agent_op_printf.
4646
94d5e490
TT
46472011-02-18 Tom Tromey <tromey@redhat.com>
4648
4649 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
4650 (tracepoint.o): Likewise.
4651 * tracepoint.c (enum gdb_agent_op): Use ax.def.
4652 (gdb_agent_op_names): Likewise.
4653
c7f96d2b
TT
46542011-02-18 Tom Tromey <tromey@redhat.com>
4655
4656 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
4657 gdb_agent_op_rot>: New constants.
4658 (gdb_agent_op_names): Add pick and roll.
4659 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
4660 cases.
4661
0feedb2c
JK
46622011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4663
4664 * aclocal.m4: Regenerated with aclocal-1.11.1.
4665
b3b9301e
PA
46662011-02-14 Pedro Alves <pedro@codesourcery.com>
4667
4668 * server.c (handle_qxfer_traceframe_info): New.
4669 (qxfer_packets): Register "traceframe-info".
4670 (handle_query): Report support for qXfer:traceframe-info:read+.
4671 * tracepoint.c (match_blocktype): New.
4672 (traceframe_find_block_type): Rename to ...
4673 (traceframe_walk_blocks): ... this. Add callback filter argument,
4674 and use it.
4675 (traceframe_find_block_type): New, reimplemented on top of
4676 traceframe_walk_blocks.
4677 (build_traceframe_info_xml): New.
4678 (traceframe_read_info): New.
4679 * server.h (traceframe_read_info): Declare.
4680
4f3e6fb7
YQ
46812011-02-11 Yao Qi <yao@codesourcery.com>
4682
4683 * configure.ac: Call AC_PROG_RANLIB.
4684 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
4685 * configure: Regenerate.
4686
764880b7
PA
46872011-02-07 Pedro Alves <pedro@codesourcery.com>
4688
4689 * server.c (gdb_read_memory): Change return semantics to allow
4690 partial transfers.
4691 (handle_search_memory_1): Adjust.
4692 (process_serial_event) <'m' packet>: Handle partial transfers.
4693 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
4694
1c79eb8a
PA
46952011-01-28 Pedro Alves <pedro@codesourcery.com>
4696
4697 * regcache.c (init_register_cache): Initialize
4698 regcache->register_status.
4699 (free_register_cache): Release regcache->register_status.
4700 (regcache_cpy): Copy register_status.
4701 (registers_to_string): Print 'x's for unavailable registers.
4702 (supply_register): Mark the register's status valid or
4703 unavailable, depending on whether a buffer was passed in or not.
4704 (supply_register_zeroed): New.
4705 (supply_regblock): Mark the registers' status valid or
4706 unavailable, depending on whether a buffer was passed in or not.
4707 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
4708 (struct regcache): New `register_status' field.
4709 (supply_register_zeroed): Declare.
4710 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
4711 supply_register_zeroed, rather than passing a NULL buffer to
4712 supply_register.
4713 * tracepoint.c (fetch_traceframe_registers): Update comment.
4714
85724a0e
PA
47152011-01-28 Pedro Alves <pedro@codesourcery.com>
4716
4717 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
4718 buffer explicit.
4719
d08aafef
PA
47202011-01-25 Pedro Alves <pedro@codesourcery.com>
4721
4722 * server.h (decode_xfer_write): Change prototype.
4723 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
4724 and don't extract the annex here.
4725 * server.c (decode_xfer_read): Remove `annex' parameter,
4726 and don't extract the annex here.
4727 (decode_xfer): New.
4728 (struct qxfer): New.
4729 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
4730 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
4731 (handle_qxfer_statictrace): New functions, abstracted out from
4732 handle_query, and made to use the struct qxfer interface.
4733 (handle_threads_qxfer_proper): Rename to ...
4734 (handle_qxfer_threads_proper): ... this.
4735 (handle_threads_qxfer): Rename to ...
4736 (handle_qxfer_threads): ... this. Adjust.
4737 (qxfer_packets): New array.
4738 (handle_qxfer): New function.
4739 (handle_query): Use handle_qxfer.
4740
493e2a69
MS
47412011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
4742
4743 * gdbreplay.c: Shorten lines of >= 80 columns.
4744 * linux-low.c: Ditto.
4745 * linux-ppc-low.c: Ditto.
4746 * linux-s390-low.c: Ditto.
4747 * linux-sparc-low.c: Ditto.
4748 * linux-x86-low.c: Ditto.
4749 * linux-xtensa-low.c: Ditto.
4750 * mem-break.c: Ditto.
4751 * nto-low.c: Ditto.
4752 * regcache.h: Ditto.
4753 * remote-utils.c: Ditto.
4754 * server.c: Ditto.
4755 * server.h: Ditto.
4756 * thread-db.c: Ditto.
4757 * tracepoint.c: Ditto.
4758 * utils.c: Ditto.
4759 * win32-low.h: Ditto.
4760
44944448
JB
47612011-01-05 Joel Brobecker <brobecker@adacore.com>
4762
4763 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
4764 update.
4765
71ce852c
JB
47662011-01-01 Joel Brobecker <brobecker@adacore.com>
4767
4768 * server.c (gdbserver_version): Update copyright year in version
4769 output.
4770 * gdbreplay.c (gdbreplay_version): Ditto.
4771
eb826dc6
MF
47722010-12-29 Jie Zhang <jie.zhang@analog.com>
4773
4774 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
4775 * linux-bfin-low.c: New file.
4776 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
4777 PT_DATA_ADDR for BFIN targets.
4778 * Makefile.in (SFILES): Add linux-bfin-low.c.
4779 (clean): Remove reg-bfin.c.
4780 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
4781 * README: Mention supported Blackfin targets.
4782
39ab222a
MF
47832010-12-23 Mike Frysinger <vapier@gentoo.org>
4784
4785 * .gitignore: New file.
4786
a1f2ce7d
MF
47872010-11-16 Mike Frysinger <vapier@gentoo.org>
4788
4789 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
4790
f474844c
JZ
47912010-10-22 Jie Zhang <jie@codesourcery.com>
4792
4793 * Makefile.in: Add FLAGS_TO_PASS variable.
4794 (install): Remove dependency of install-only and recursively
4795 invoke make for install-only.
4796
f1048712
DE
47972010-10-04 Doug Evans <dje@google.com>
4798
4799 * Makefile.in (uninstall): Use $(DESTDIR).
4800
b53a1623
PA
48012010-09-24 Pedro Alves <pedro@codesourcery.com>
4802
e6ee044d
PA
4803 PR gdb/11842
4804
b53a1623
PA
4805 * linux-x86-low.c (compat_siginfo_from_siginfo)
4806 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
4807 si_code is < 0. Check for si_code == SI_TIMER before checking for
4808 si_code < 0.
4809
fa1bd1e4
JB
48102010-09-13 Joel Brobecker <brobecker@adacore.com>
4811
4812 * lynx-i386-low.c: New file.
4813 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
4814
47fac8f8
JB
48152010-09-13 Joel Brobecker <brobecker@adacore.com>
4816
4817 * lynx-low.c (ptrace_request_to_str): Remove handling for
4818 request values that have been removed in LynxOS 5.x.
4819
1adfc54d
JB
48202010-09-13 Joel Brobecker <brobecker@adacore.com>
4821
4822 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
4823 <ptrace.h>
4824
c2a66c29
NS
48252010-09-09 Nathan Sidwell <nathan@codesourcery.com>
4826
4827 * configure.ac: Add --enable-inprocess-agent option.
4828 * configure: Rebuilt.
4829
32fcada3
YQ
48302010-09-06 Yao Qi <yao@codesourcery.com>
4831
4832 * linux-low.c (linux_kill): Remove unused variable.
4833 (linux_stabilize_threads): Likewise.
4834 * server.c (start_inferior): Likewise.
4835 (queue_stop_reply_callback): Likewise.
4836 * tracepoint.c (do_action_at_tracepoint): Likewise.
4837
0cccb683
YQ
48382010-09-06 Yao Qi <yao@codesourcery.com>
4839
4840 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
4841 on return.
4842
423ec54c
JK
48432010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4844
4845 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
4846
12ac6819
PA
48472010-09-06 Pedro Alves <pedro@codesourcery.com>
4848
4849 * Makefile.in (install-only): Replace $IPA_DEPFILES with
4850 "$(IPA_DEPFILES)".
4851
8ed54b31
JB
48522010-09-01 Joel Brobecker <brobecker@adacore.com>
4853
4854 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
4855 gdbserver/lynx-ppc-low.c: New files.
4856 * Makefile.in (lynx_low_h): New variable.
4857 (lynx-low.o, lynx-ppc-low.o): New rules.
4858 * configure.ac: On LynxOS, link with -lnetinet.
4859 * configure.srv: Add handling of powerpc-*-lynxos* targets.
4860 * configure: regenerate.
4861
bb0116a4
JB
48622010-09-01 Joel Brobecker <brobecker@adacore.com>
4863
4864 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
4865 * configure.ac: Add check for vasprintf and vsnprintf.
4866 * configure, config.in: Regenerate.
4867 * server.h (vasprintf, vsnprintf): Add conditional declarations.
4868
a778ab81 48692010-09-01 Joel Brobecker <brobecker@adacore.com>
4870
4871 * gdbreplay.c: Move include of alloca.h up, next to include of
4872 malloc.h.
4873 * server.h: Add include of malloc.h.
4874 * mem-break.c: Remove include of malloc.h.
4875 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
4876
8b034a19 48772010-09-01 Joel Brobecker <brobecker@adacore.com>
4878
4879 * Makefile.in (memmem.o): Build with -Wno-error.
4880
48812010-09-01 Joel Brobecker <brobecker@adacore.com>
4882
4883 * utils.c (xsnprintf): Make non-static.
4884 * server.h: Add xsnprintf declaration.
4885 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
4886 replace calls to snprintf by calls to xsnprintf throughout.
4887
48882010-09-01 Joel Brobecker <brobecker@adacore.com>
4889
4890 * configure.ac: Add configure check for alloca.
4891 * configure, config.in: Regenerate.
4892 * server.h: Include alloca.h if it exists.
4893 * gdbreplay.c: Include alloca.h if it exists.
4894
1a981360
PA
48952010-08-28 Pedro Alves <pedro@codesourcery.com>
4896
4897 * linux-low.c (__SIGRTMIN): Define if not already defined.
4898 (linux_create_inferior): Check for __ANDROID__ rather than
4899 __SIGRTMIN.
4900 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
4901 are already deferred.
4902 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
4903 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
4904 stopped and already has a pending signal to report.
4905 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
4906 a pending signal to report or is moving out of a jump pad.
4907 (linux_init_signals): Check for __ANDROID__ rather than
4908 __SIGRTMIN.
4909
b4d51a55
PA
49102010-08-28 Pedro Alves <pedro@codesourcery.com>
4911
4912 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
4913 debug_threads check. Avoid a linear search when not doing debug
4914 output.
4915
ec48365d
PA
49162010-08-27 Pedro Alves <pedro@codesourcery.com>
4917
4918 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
4919 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
4920 (struct file_handler) <fd>: Change type to gdb_fildes_t.
4921 (process_event): Change local fd's type to gdb_fildes_t.
4922 (create_file_handler): Adjust prototype.
4923 (delete_file_handler): Adjust prototype.
4924 (handle_file_event): Adjust prototype. Use pfildes.
4925 (create_file_event): Adjsut prototype.
4926 * remote-utils.c (remote_desc, listen_desc): Change type to
4927 gdb_fildes_t.
4928 * server.h: New gdb_fildes_t typedef.
4929 [USE_WIN32API]: Include winsock2.h.
4930 (delete_file_handler, add_file_handler): Adjust prototypes.
4931 (pfildes): Declare.
4932 * utils.c (pfildes): New.
4933
854d88f0
PA
49342010-08-27 Pedro Alves <pedro@codesourcery.com>
4935
4936 * configure.ac (build_warnings): Add -Wno-char-subscripts.
4937 * configure: Regenerate.
4938
0146f85b
PA
49392010-08-27 Pedro Alves <pedro@codesourcery.com>
4940
4941 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
4942 (linux_done_accessing_memory): ... this.
4943 (linux_target_ops): Adjust.
4944 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
4945 * nto-low.c (nto_target_ops): Adjust comment.
4946 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
4947 * spu-low.c (spu_target_ops): Adjust comment.
4948 * target.h (target_ops): Rename unprepare_to_access_memory field
4949 to done_accessing_memory.
4950 (unprepare_to_access_memory): Rename to ...
4951 (done_accessing_memory): ... this.
4952
90d74c30
PA
49532010-08-26 Pedro Alves <pedro@codesourcery.com>
4954
4955 * linux-low.c (linux_prepare_to_access_memory): New.
4956 (linux_unprepare_to_access_memory): New.
4957 (linux_target_ops): Install them.
4958 * server.c (read_memory): Rename to ...
4959 (gdb_read_memory): ... this. Use
4960 prepare_to_access_memory/prepare_to_access_memory.
4961 (write_memory): Rename to ...
4962 (gdb_write_memory): ... this. Use
4963 prepare_to_access_memory/prepare_to_access_memory.
4964 (handle_search_memory_1): Adjust.
4965 (process_serial_event): Adjust.
4966 * target.h (struct target_ops): New fields
4967 prepare_to_access_memory and unprepare_to_access_memory.
4968 (prepare_to_access_memory, unprepare_to_access_memory): New.
4969 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
4970 prepare_to_access_memory/prepare_to_access_memory.
4971 * nto-low.c (nto_target_ops): Adjust.
4972 * spu-low.c (spu_target_ops): Adjust.
4973 * win32-low.c (win32_target_ops): Adjust.
4974
fd467969
PA
49752010-08-26 Pedro Alves <pedro@codesourcery.com>
4976
4977 * Makefile.in (WARN_CFLAGS): Get it from configure.
4978 (WERROR_CFLAGS): New.
4979 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
4980 * configure.ac: Introduce --enable-werror, which adds -Werror to
4981 the compiler command line. Enabled by default. Disable with
4982 --disable-werror. Add -Wdeclaration-after-statement
4983 Wpointer-arith and -Wformat-nonliteral to warning flags.
4984 * configure: Regenerate.
4985
331e2f5f
PA
49862010-08-26 Pedro Alves <pedro@codesourcery.com>
4987
4988 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
4989
e581f2b4
PA
49902010-08-26 Pedro Alves <pedro@codesourcery.com>
4991
4992 * gdbreplay.c (remote_error): New.
4993 (gdbchar): New.
4994 (expect): Use gdbchar. Check for error reading from GDB.
4995 Clarify sync error output.
4996 (play): Check for errors writing to GDB.
4997 * linux-low.c (sigchld_handler): Really ignore `write' errors.
4998 * remote-utils.c (getpkt): Check for errors writing to the remote
4999 descriptor.
5000
3c11dd79
PA
50012010-08-25 Pedro Alves <pedro@codesourcery.com>
5002
5003 * linux-low.c (linux_wait_1): Move non-debugging code out of
5004 `debug_threads' control.
5005
d20a8ad9
PA
50062010-08-25 Pedro Alves <pedro@codesourcery.com>
5007
5008 * linux-low.c (linux_wait_1): Don't set last_status here.
5009 * server.c (push_event, queue_stop_reply_callback): Assert we're
5010 not pushing a TARGET_WAITKIND_IGNORE event.
5011 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
5012 (myresume, handle_target_event): Set the thread's last_resume_kind
5013 and last_status from the target returned status.
5014
964e4306
PA
50152010-08-25 Pedro Alves <pedro@codesourcery.com>
5016
5017 PR threads/10729
5018
5019 * linux-x86-low.c (update_debug_registers_callback): New.
5020 (i386_dr_low_set_addr): Use it.
5021 (i386_dr_low_get_addr): New.
5022 (i386_dr_low_set_control): Use update_debug_registers_callback.
5023 (i386_dr_low_get_control): New.
5024 (i386_dr_low_get_status): Adjust.
5025 * linux-low.c (linux_stop_lwp): New.
5026 * linux-low.h (linux_stop_lwp): Declare.
5027
5028 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
5029 argument instead of a i386_debug_reg_state.
5030 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
5031 a i386_debug_reg_state.
5032 (i386_insert_aligned_watchpoint): Adjust.
5033 (i386_remove_aligned_watchpoint): Adjust.
5034 (i386_low_stopped_data_address): Read the debug registers from the
5035 inferior instead of from the mirrors.
5036 * i386-low.h (struct i386_debug_reg_state): Extend comment.
5037 (i386_dr_low_get_addr): Declare.
5038 (i386_dr_low_get_control): Declare.
5039 (i386_dr_low_get_status): Change prototype.
5040
5041 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
5042 (i386_dr_low_get_addr): New.
5043 (i386_dr_low_get_control): New.
5044 (i386_dr_low_get_status): Adjust prototype. Return
5045 dr_status_mirror.
5046 (i386_initial_stuff): Clear dr_status_mirror and
5047 dr_control_mirror.
5048 (i386_get_thread_context): Adjust.
5049 (i386_set_thread_context): Adjust.
5050 (i386_thread_added): Adjust.
5051
5f21a75b
PA
50522010-08-24 Pedro Alves <pedro@codesourcery.com>
5053
5054 * linux-low.h (linux_thread_area): Delete declaration.
5055
3e4c1235
TS
50562010-08-11 Thomas Schwinge <thomas@codesourcery.com>
5057
5058 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
5059 after its termination.
5060
1971b033
PA
50612010-08-09 Pedro Alves <pedro@codesourcery.com>
5062
5063 * linux-low.c (gdb_wants_lwp_stopped): Delete.
5064 (gdb_wants_all_stopped): Delete.
5065 (linux_wait_1): Don't call them.
5066 * server.c (handle_v_cont): Tag all threads as want-stopped.
5067 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
5068 stopped as "client-wants-stopped".
5069
310444ac
PA
50702010-07-31 Pedro Alves <pedro@codesourcery.com>
5071
5072 * Makefile.in (signals_h): New.
5073 (server_h): Depend on it.
5074 (server.o): Don't depend on $(signals_def).
5075 (signals.o): Depend on $(signals_def).
5076
a19cae16
JK
50772010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
5078
5079 * Makefile.in (signals_def): New.
5080 (server_h): Append include/gdb/signals.h and signals_def.
5081 (server.o): Append signals_def.
5082
30d50328
JK
50832010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5084
5085 * server.c (handle_target_event): Use target_signal_to_host for
5086 resume_info.sig initialization.
5087 * target.h (struct thread_resume) <sig>: New comment.
5088
5c3216e2
OS
50892010-07-20 Ozkan Sezer <sezeroz@gmail.com>
5090
c6f46ca0
OS
5091 * server.c (handle_query): strcpy() the returned string from paddress()
5092 instead of sprintf().
5c3216e2
OS
5093 * utils.c (paddress): Return phex_nz().
5094
6bd31874
JB
50952010-07-07 Joel Brobecker <brobecker@adacore.com>
5096
5097 * server.c (handle_v_cont): Call mourn_inferior if process
5098 just exited.
5099 (myresume): Likewise.
5100
0fb4aa4b
PA
51012010-07-01 Pedro Alves <pedro@codesourcery.com>
5102
5103 Static tracepoints, and integration with UST.
5104
5105 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
5106 * mem-break.c (uninsert_all_breakpoints)
5107 (reinsert_all_breakpoints): New.
5108 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
5109 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
5110 (gdb_agent_ust_loaded, helper_thread_id)
5111 (gdb_agent_helper_thread_id): New macros.
5112 (struct ipa_sym_addresses): Add addr_ust_loaded,
5113 addr_helper_thread_id, addr_cmd_buf.
5114 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
5115 (in_process_agent_loaded_ust): New.
5116 (write_e_ust_not_loaded): New.
5117 (maybe_write_ipa_ust_not_loaded): New.
5118 (struct collect_static_trace_data_action): New.
5119 (enum tracepoint_type) <static_tracepoint>: New.
5120 (struct tracepoint) <handle>: Mention static tracepoints.
5121 (struct static_tracepoint_ctx): New.
5122 (CMD_BUF_SIZE): New.
5123 (add_tracepoint_action): Handle static tracepoint actions.
5124 (unprobe_marker_at): New.
5125 (clear_installed_tracepoints): Handle static tracepoints.
5126 (cmd_qtdp): Handle static tracepoints.
5127 (probe_marker_at): New.
5128 (cmd_qtstart): Handle static tracepoints.
5129 (response_tracepoint): Handle static tracepoints.
5130 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
5131 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
5132 (get_context_regcache): Handle static tracepoints.
5133 (do_action_at_tracepoint): Handle static tracepoint actions.
5134 (traceframe_find_block_type): Handle static trace data blocks.
5135 (traceframe_read_sdata): New.
5136 (download_tracepoints): Download static tracepoint actions.
5137 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
5138 (GDB_PROBE_NAME): New.
5139 (ust_ops): New.
5140 (GET_UST_SYM): New.
5141 (USTF): New.
5142 (dlsym_ust): New.
5143 (ust_marker_to_static_tracepoint): New.
5144 (gdb_probe): New.
5145 (collect_ust_data_at_tracepoint): New.
5146 (gdb_ust_probe): New.
5147 (UNIX_PATH_MAX, SOCK_DIR): New.
5148 (gdb_ust_connect_sync_socket): New.
5149 (resume_thread, stop_thread): New.
5150 (run_inferior_command): New.
5151 (init_named_socket): New.
5152 (gdb_ust_socket_init): New.
5153 (cstr_to_hexstr): New.
5154 (next_st): New.
5155 (first_marker, next_marker): New.
5156 (response_ust_marker): New.
5157 (cmd_qtfstm, cmd_qtsstm): New.
5158 (unprobe_marker_at, probe_marker_at): New.
5159 (cmd_qtstmat, gdb_ust_thread): New.
5160 (gdb_ust_init): New.
5161 (initialize_tracepoint_ftlib): Call gdb_ust_init.
5162 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
5163 (ST_REGENTRY): New.
5164 (x86_64_st_collect_regmap): New.
5165 (X86_64_NUM_ST_COLLECT_GREGS): New.
5166 (AMD64_RIP_REGNUM): New.
5167 (supply_static_tracepoint_registers): New.
5168 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
5169 (ST_REGENTRY): New.
5170 (i386_st_collect_regmap): New.
5171 (i386_NUM_ST_COLLECT_GREGS): New.
5172 (supply_static_tracepoint_registers): New.
5173 * server.c (handle_query): Handle qXfer:statictrace:read.
5174 <qSupported>: Report support for StaticTracepoints, and
5175 qXfer:statictrace:read features.
5176 * server.h (traceframe_read_sdata)
5177 (supply_static_tracepoint_registers): Declare.
5178 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
5179 (unpack_varlen_hex): Include in IPA build.
5180 * Makefile.in (ustlibs, ustinc): New.
5181 (IPA_OBJS): Add remote-utils-ipa.o.
5182 ($(IPA_LIB)): Link -ldl and -lpthread.
5183 (UST_CFLAGS): New.
5184 (IPAGENT_CFLAGS): Add UST_CFLAGS.
5185 * config.in, configure: Regenerate.
5186
9e4344e5
PA
51872010-06-20 Ian Lance Taylor <iant@google.com>
5188 Pedro Alves <pedro@codesourcery.com>
5189
5190 * linux-x86-low.c (always_true): Delete.
5191 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
5192 trying to fool the compiler with always_true.
5193
c6beb2cb
PA
51942010-06-20 Pedro Alves <pedro@codesourcery.com>
5195
5196 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
5197 conditions in gdbserver.
5198
d2ed6730
UW
51992010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
5200
5201 * spu-low.c (spu_read_memory): Wrap around local store limit.
5202 (spu_write_memory): Likewise.
5203
4e29fb54
PA
52042010-06-15 Pedro Alves <pedro@codesourcery.com>
5205
5206 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
5207 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
5208 LONGEST uses.
5209 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
5210 uses.
5211 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
5212 uses with LONGEST uses.
5213
6a271cae
PA
52142010-06-14 Stan Shebs <stan@codesourcery.com>
5215 Pedro Alves <pedro@codesourcery.com>
5216
5217 Bytecode compiler.
5218
5219 * linux-x86-low.c: Include limits.h.
5220 (add_insns): New.
5221 (always_true): New.
5222 (EMIT_ASM): New.
5223 (EMIT_ASM32): New.
5224 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
5225 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
5226 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
5227 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
5228 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
5229 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
5230 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
5231 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
5232 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
5233 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
5234 (amd64_emit_void_call_2): New.
5235 (amd64_emit_ops): New.
5236 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
5237 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
5238 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
5239 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
5240 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
5241 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
5242 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
5243 (i386_emit_call, i386_emit_reg, i386_emit_pop)
5244 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
5245 (i386_emit_stack_adjust, i386_emit_int_call_1)
5246 (i386_emit_void_call_2): New.
5247 (i386_emit_ops): New.
5248 (x86_emit_ops): New.
5249 (the_low_target): Install x86_emit_ops.
5250 * server.h (struct emit_ops): New.
5251 (get_raw_reg_func_addr): Declare.
5252 (current_insn_ptr, emit_error): Declare.
5253 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
5254 (set_trace_state_variable_value): New defines.
5255 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
5256 addr_get_trace_state_variable_value and
5257 addr_set_trace_state_variable_value.
5258 (symbol_list): New fields for get_raw_reg,
5259 get_trace_state_variable_value and set_trace_state_variable_value.
5260 (condfn): New typedef.
5261 (struct tracepoint): New field `compiled_cond'.
5262 (do_action_at_tracepoint): Clear compiled_cond.
5263 (get_trace_state_variable_value, set_trace_state_variable_value):
5264 Export in the IPA.
5265 (condition_true_at_tracepoint): If there's a compiled condition,
5266 run that.
5267 (current_insn_ptr, emit_error): New globals.
5268 (struct bytecode_address): New.
5269 (get_raw_reg_func_addr): New.
5270 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
5271 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
5272 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
5273 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
5274 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
5275 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
5276 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
5277 (compile_tracepoint_condition, compile_bytecodes): New.
5278 * target.h (emit_ops): Forward declare.
5279 (struct target_ops): New field emit_ops.
5280 (target_emit_ops): New.
5281 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
5282 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
5283 * linux-low.c (linux_emit_ops): New.
5284 (linux_target_ops): Install it.
5285 * linux-low.h (struct linux_target_ops): New field emit_ops.
5286
92b72907
UW
52872010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
5288
5289 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
5290 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
5291
fa593d66
PA
52922010-06-01 Pedro Alves <pedro@codesourcery.com>
5293 Stan Shebs <stan@codesourcery.com>
5294
5295 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
5296 (all): Depend on $(extra_libraries).
5297 (install-only): Install the IPA.
5298 (IPA_OBJS, IPA_LIB): New.
5299 (clean): Remove the IPA lib.
5300 (IPAGENT_CFLAGS): New.
5301 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
5302 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
5303 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
5304 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
5305 * configure.ac: Check for atomic builtins support in the compiler.
5306 (IPA_DEPFILES, extra_libraries): Define.
5307 * configure.srv (ipa_obj): Add description.
5308 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
5309 (i[34567]86-*-linux*): Set ipa_obj.
5310 (x86_64-*-linux*): Set ipa_obj.
5311 * linux-low.c (stabilizing_threads): New.
5312 (supports_fast_tracepoints): New.
5313 (linux_detach): Stabilize threads before detaching.
5314 (handle_tracepoints): Handle internal tracing breakpoints. Assert
5315 the lwp is either not stabilizing, or is moving out of a jump pad.
5316 (linux_fast_tracepoint_collecting): New.
5317 (maybe_move_out_of_jump_pad): New.
5318 (enqueue_one_deferred_signal): New.
5319 (dequeue_one_deferred_signal): New.
5320 (linux_wait_for_event_1): If moving out of a jump pad, defer
5321 pending signals to later.
5322 (linux_stabilize_threads): New.
5323 (linux_wait_1): Check if threads need moving out of jump pads, and
5324 do it if so.
5325 (stuck_in_jump_pad_callback): New.
5326 (move_out_of_jump_pad_callback): New.
5327 (lwp_running): New.
5328 (linux_resume_one_lwp): Handle moving out of jump pads.
5329 (linux_set_resume_request): Dequeue deferred signals.
5330 (need_step_over_p): Also step over fast tracepoint jumps.
5331 (start_step_over): Also uninsert fast tracepoint jumps.
5332 (finish_step_over): Also reinsert fast tracepoint jumps.
5333 (linux_install_fast_tracepoint_jump): New.
5334 (linux_target_ops): Install linux_stabilize_threads and
5335 linux_install_fast_tracepoint_jump_pad.
5336 * linux-low.h (linux_target_ops) <get_thread_area,
5337 install_fast_tracepoint_jump_pad>: New fields.
5338 (struct lwp_info) <collecting_fast_tracepoint,
5339 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
5340 (linux_get_thread_area): Declare.
5341 * linux-x86-low.c (jump_insn): New.
5342 (x86_get_thread_area): New.
5343 (append_insns): New.
5344 (push_opcode): New.
5345 (amd64_install_fast_tracepoint_jump_pad): New.
5346 (i386_install_fast_tracepoint_jump_pad): New.
5347 (x86_install_fast_tracepoint_jump_pad): New.
5348 (the_low_target): Install x86_get_thread_area and
5349 x86_install_fast_tracepoint_jump_pad.
5350 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
5351 (struct fast_tracepoint_jump): New.
5352 (fast_tracepoint_jump_insn): New.
5353 (fast_tracepoint_jump_shadow): New.
5354 (find_fast_tracepoint_jump_at): New.
5355 (fast_tracepoint_jump_here): New.
5356 (delete_fast_tracepoint_jump): New.
5357 (set_fast_tracepoint_jump): New.
5358 (uninsert_fast_tracepoint_jumps_at): New.
5359 (reinsert_fast_tracepoint_jumps_at): New.
5360 (set_breakpoint_at): Use write_inferior_memory.
5361 (uninsert_raw_breakpoint): Use write_inferior_memory.
5362 (check_mem_read): Mask out fast tracepoint jumps.
5363 (check_mem_write): Mask out fast tracepoint jumps.
5364 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
5365 (set_fast_tracepoint_jump): Declare.
5366 (delete_fast_tracepoint_jump)
5367 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
5368 (reinsert_fast_tracepoint_jumps_at): Declare.
5369 * regcache.c: Don't compile many functions when building the
5370 in-process agent library.
5371 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
5372 the register buffer in the heap.
5373 (free_register_cache): If the register buffer isn't owned by the
5374 regcache, don't free it.
5375 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
5376 pre-existing register caches.
5377 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
5378 type.
5379 (convert_ascii_to_int): : Constify `from' parameter type.
5380 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
5381 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
5382 the needed buffer in-place.
5383 (relocate_instruction): New.
5384 * server.c (handle_query) <qSymbols>: If the target supports
5385 tracepoints, give it a chance of looking up symbols. Report
5386 support for fast tracepoints.
5387 (handle_status): Stabilize threads.
5388 (process_serial_event): Adjust.
5389 * server.h (struct fast_tracepoint_jump): Forward declare.
5390 (struct process_info) <fast_tracepoint_jumps>: New field.
5391 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
5392 (decode_X_packet, decode_M_packet): Adjust.
5393 (relocate_instruction): Declare.
5394 (in_process_agent_loaded): Declare.
5395 (tracepoint_look_up_symbols): Declare.
5396 (struct fast_tpoint_collect_status): Declare.
5397 (fast_tracepoint_collecting): Declare.
5398 (force_unlock_trace_buffer): Declare.
5399 (handle_tracepoint_bkpts): Declare.
5400 (initialize_low_tracepoint)
5401 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
5402 * target.h (struct target_ops) <stabilize_threads,
5403 install_fast_tracepoint_jump_pad>: New fields.
5404 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
5405 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
5406 [HAVE_STDINT_H]: Include stdint.h.
5407 (trace_debug_1): Rename to ...
5408 (trace_vdebug): ... this.
5409 (trace_debug): Rename to ...
5410 (trace_debug_1): ... this. Add `level' parameter.
5411 (trace_debug): New.
5412 (ATTR_USED, ATTR_NOINLINE): New.
5413 (IP_AGENT_EXPORT): New.
5414 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5415 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
5416 (about_to_request_buffer_space, trace_buffer_is_full)
5417 (stopping_tracepoint, expr_eval_result, error_tracepoint)
5418 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
5419 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
5420 (traceframe_write_count, traceframes_created)
5421 (trace_state_variables)
5422 New renaming defines.
5423 (struct ipa_sym_addresses): New.
5424 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
5425 (symbol_list): New.
5426 (ipa_sym_addrs): New.
5427 (all_tracepoint_symbols_looked_up): New.
5428 (in_process_agent_loaded): New.
5429 (write_e_ipa_not_loaded): New.
5430 (maybe_write_ipa_not_loaded): New.
5431 (tracepoint_look_up_symbols): New.
5432 (debug_threads) [IN_PROCESS_AGENT]: New.
5433 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
5434 (UNKNOWN_SIDE_EFFECTS): New.
5435 (stop_tracing): New.
5436 (flush_trace_buffer): New.
5437 (stop_tracing_bkpt): New.
5438 (flush_trace_buffer_bkpt): New.
5439 (read_inferior_integer): New.
5440 (read_inferior_uinteger): New.
5441 (read_inferior_data_pointer): New.
5442 (write_inferior_data_pointer): New.
5443 (write_inferior_integer): New.
5444 (write_inferior_uinteger): New.
5445 (struct collect_static_trace_data_action): Delete.
5446 (enum tracepoint_type): New.
5447 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
5448 <actions_str, step_actions, step_actions_str>: Only include in
5449 GDBserver.
fa593d66
PA
5450 <orig_size, obj_addr_on_target, adjusted_insn_addr>
5451 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
5452 (tracepoints): Use IP_AGENT_EXPORT.
5453 (last_tracepoint): Don't include in the IPA.
5454 (stopping_tracepoint): Use IP_AGENT_EXPORT.
5455 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
5456 (alloced_trace_state_variables): New.
5457 (trace_state_variables): Use IP_AGENT_EXPORT.
5458 (traceframe_t): Delete unused variable.
5459 (circular_trace_buffer): Don't include in the IPA.
5460 (trace_buffer_start): Delete.
5461 (struct trace_buffer_control): New.
5462 (trace_buffer_free): Delete.
5463 (struct ipa_trace_buffer_control): New.
5464 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
5465 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
5466 New.
5467 (trace_buffer_ctrl): New.
5468 (TRACE_BUFFER_CTRL_CURR): New.
5469 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
5470 Reimplement as macros.
5471 (trace_buffer_wrap): Delete.
5472 (traceframe_write_count, traceframe_read_count)
5473 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
5474 (struct tracepoint_hit_ctx) <type>: New field.
5475 (struct fast_tracepoint_ctx): New.
5476 (memory_barrier): New.
5477 (cmpxchg): New.
5478 (record_tracepoint_error): Update atomically in the IPA.
5479 (clear_inferior_trace_buffer): New.
5480 (about_to_request_buffer_space): New.
5481 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
5482 updating the same buffer.
5483 (add_tracepoint): Default the tracepoint's type to trap
5484 tracepoint, and orig_size to -1.
5485 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
5486 internal variables.
5487 (create_trace_state_variable): New parameter `gdb'. Handle it.
5488 (clear_installed_tracepoints): Clear fast tracepoint jumps.
5489 (cmd_qtdp): Handle fast tracepoints.
5490 (cmd_qtdv): Adjust.
5491 (max_jump_pad_size): New.
5492 (gdb_jump_pad_head): New.
5493 (get_jump_space_head): New.
5494 (claim_jump_space): New.
5495 (sort_tracepoints): New.
5496 (MAX_JUMP_SIZE): New.
5497 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
5498 IPA.
5499 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
5500 support. Upload fast traceframes, and delete internal IPA
5501 breakpoints.
5502 (stop_tracing_handler): New.
5503 (flush_trace_buffer_handler): New.
5504 (cmd_qtstop): Upload fast tracepoints.
5505 (response_tracepoint): Handle fast tracepoints.
5506 (tracepoint_finished_step): Upload fast traceframes. Set the
5507 tracepoint hit context's tracepoint type.
5508 (handle_tracepoint_bkpts): New.
5509 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
5510 type. Add comment about fast tracepoints.
5511 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
5512 non-existing action_str field.
5513 (get_context_regcache): Handle fast tracepoints.
5514 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
5515 to the regcache.
5516 (fast_tracepoint_from_jump_pad_address): New.
5517 (fast_tracepoint_from_ipa_tpoint_address): New.
5518 (collecting_t): New.
5519 (force_unlock_trace_buffer): New.
5520 (fast_tracepoint_collecting): New.
5521 (collecting): New.
5522 (gdb_collect): New.
5523 (write_inferior_data_ptr): New.
5524 (target_tp_heap): New.
5525 (target_malloc): New.
5526 (download_agent_expr): New.
5527 (UALIGN): New.
5528 (download_tracepoints): New.
5529 (download_trace_state_variables): New.
5530 (upload_fast_traceframes): New.
5531 (IPA_FIRST_TRACEFRAME): New.
5532 (IPA_NEXT_TRACEFRAME_1): New.
5533 (IPA_NEXT_TRACEFRAME): New.
5534 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
5535 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
5536 (gdb_jump_pad_buffer_end): New.
5537 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
5538 (initialize_tracepoint): Adjust.
5539 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
5540 buffer. Initialize the low module.
5541 * utils.c (PREFIX, TOOLNAME): New.
5542 (malloc_failure): Use PREFIX.
5543 (error): In the IPA, an error causes an exit.
5544 (fatal, warning): Use PREFIX.
5545 (internal_error): Use TOOLNAME.
5546 (NUMCELLS): Increase to 10.
5547 * configure, config.in: Regenerate.
5548
d149dd1d
PA
55492010-06-01 Pedro Alves <pedro@codesourcery.com>
5550
5551 * server.c (handle_query) <qSupported>: Do two passes over the
5552 qSupported string to avoid nesting strtok.
5553
f6528abd
JK
55542010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5555
5556 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
5557 (CDEPS): New.
5558 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
5559 -Wl,--dynamic-list.
5560 * configure: Regenerate.
5561 * proc-service.list: New.
5562
ca2a87a0
JK
55632010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5564
5565 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
5566 New comment.
5567
363a6e9f
OS
55682010-05-26 Ozkan Sezer <sezeroz@gmail.com>
5569
5570 * gdbreplay.c (remote_open): Check error return from socket() call by
5571 its equality to -1 not by it being negative.
5572 * remote-utils.c (remote_open): Likewise.
5573
d23b6cb1
PA
55742010-05-23 Pedro Alves <pedro@codesourcery.com>
5575
5576 * config.h: Regenerate.
5577
28d3cf85
MK
55782010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
5579
5580 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
5581 doesn't provide PTRACE_GET_THREAD_AREA.
5582
fea36a59
MK
55832010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
5584
5585 * linux-m68k-low.c: Include <asm/ptrace.h>
5586 (ps_get_thread_area): Implement.
5587
24b066ba
DE
55882010-05-03 Doug Evans <dje@google.com>
5589
5590 * event-loop.c (struct callback_event): New struct.
5591 (callback_list): New global.
5592 (append_callback_event, delete_callback_event): New functions.
5593 (process_callback): New function.
5594 (start_event_loop): Call it.
5595 * remote-utils.c (NOT_SCHEDULED): Define.
5596 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
5597 moved out of readchar.
5598 (readchar): Rewrite. Call reschedule before returning.
5599 (reset_readchar): New function.
5600 (remote_close): Call it.
5601 (process_remaining, reschedule): New functions.
5602 * server.h (callback_handler_func): New typedef.
5603 (append_callback_event, delete_callback_event): Declare.
5604
9836d6ea
PA
56052010-05-03 Pedro Alves <pedro@codesourcery.com>
5606
5607 * proc-service.c (ps_pglobal_lookup): Use
5608 thread_db_look_up_one_symbol.
5609 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
5610 parameter. Use it instead of all_symbols_looked_up.
5611 * server.h (struct process_info) <all_symbols_looked_up>: Delete
5612 field.
5613 (all_symbols_looked_up): Don't declare.
5614 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
5615 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
5616 field.
5617 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
5618 Set all_symbols_looked_up here.
5619 (thread_db_look_up_one_symbol): New.
5620 (thread_db_get_tls_address): Adjust.
5621 (thread_db_load_search, try_thread_db_load_1): Always allocate the
5622 thread_db object on the heap, and tentatively set it in the
5623 process structure.
5624 (thread_db_init): Don't set all_symbols_looked_up here.
5625 * linux-low.h (thread_db_look_up_one_symbol): Declare.
5626
7984d532
PA
56272010-05-03 Pedro Alves <pedro@codesourcery.com>
5628
5629 * linux-low.c (linux_kill, linux_detach): Adjust.
5630 (status_pending_p_callback): Remove redundant statement. Check
5631 for !TARGET_WAITIKIND_IGNORE, instead of
5632 TARGET_WAITKIND_STOPPED.
5633 (handle_tracepoints): Make sure LWP is locked. Adjust.
5634 (linux_wait_for_event_1): Adjust.
5635 (linux_cancel_breakpoints): New.
5636 (unsuspend_one_lwp): New.
5637 (unsuspend_all_lwps): New.
5638 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
5639 (send_sigstop_callback): Change return type to int, add new
5640 `except' parameter and handle it.
5641 (suspend_and_send_sigstop_callback): New.
5642 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
5643 pass them down. If SUSPEND, also increment the lwp's suspend
5644 count.
5645 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
5646 (need_step_over_p): Don't consider suspended LWPs.
5647 (start_step_over): Adjust.
5648 (proceed_one_lwp): Change return type to int, add new `except'
5649 parameter and handle it.
5650 (unsuspend_and_proceed_one_lwp): New.
5651 (proceed_all_lwps): Use find_inferior instead of
5652 for_each_inferior.
5653 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
5654 also decrement the suspend count of LWPs. Pass `except' down,
5655 instead of hacking its suspend count.
5656 (linux_pause_all): Add `freeze' parameter. Adjust.
5657 (linux_unpause_all): New.
5658 (linux_target_ops): Install linux_unpause_all.
5659 * server.c (handle_status): Adjust.
5660 * target.h (struct target_ops): New fields `unpause_all' and
5661 `cancel_breakpoints'. Add new parameter to `pause_all'.
5662 (pause_all): Add new `freeze' parameter.
5663 (unpause_all): New.
5664 (cancel_breakpoints): New.
5665 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
5666 cancel breakpoints.
5667 (cmd_qtstart): Pause threads.
5668 (stop_tracing): Pause threads, and cancel breakpoints.
5669 * win32-low.c (win32_target_ops): Adjust.
5670
e471f25b
PA
56712010-05-03 Pedro Alves <pedro@codesourcery.com>
5672
5673 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
5674 the inferior right away from here...
5675 (linux_wait_1): ... to here, and adjust to check the thread's
5676 last_resume_kind instead of the lwp's step or stop_expected flags.
5677
1915ef4f
PA
56782010-05-02 Pedro Alves <pedro@codesourcery.com>
5679
5680 * README: Use consistent `GDB' and `GDBserver' spellings.
5681
f9e39928
PA
56822010-05-02 Pedro Alves <pedro@codesourcery.com>
5683
5684 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
5685 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
5686 (linux_detach_one_lwp): Assume the lwp is stopped.
5687 (any_thread_of): Delete.
5688 (linux_detach): Stop all lwps here. Don't blindly delete all
5689 breakpoints.
5690 (delete_lwp_callback): New.
5691 (linux_mourn): Delete all lwps of the process that is gone.
5692 (linux_wait_1): Don't delete the last lwp of the process here.
5693 * mem-break.h (mark_breakpoints_out): Declare.
5694 * mem-break.c (mark_breakpoints_out): New.
5695 (free_all_breakpoints): Use it.
5696 * server.c (handle_target_event): If the process is gone, mark
5697 breakpoints out.
5698 * thread-db.c (struct thread_db) <create_bp>: New field.
5699 (thread_db_enable_reporting): Fix prototype. Store a thread event
5700 breakpoint reference in the thread_db struct.
5701 (thread_db_load_search): Clear the thread_db object.
5702 (try_thread_db_load_1): Ditto.
5703 (switch_to_process): New.
5704 (disable_thread_event_reporting): Use it.
5705 (remove_thread_event_breakpoints): New.
5706 (thread_db_detach, thread_db_mourn): Use it.
5707
1e7fc18c
PA
57082010-05-01 Pedro Alves <pedro@codesourcery.com>
5709
5710 * linux-low.c (linux_enable_event_reporting): New.
5711 (linux_wait_for_event_1, handle_extended_wait): Use it.
5712
02fc4de7
PA
57132010-04-30 Pedro Alves <pedro@codesourcery.com>
5714
5715 * linux-low.c (linux_kill_one_lwp, linux_kill)
5716 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
5717 (send_sigstop): Take an lwp_info as parameter instead. Queue a
5718 SIGSTOP even if the LWP is stopped.
5719 (send_sigstop_callback): New.
5720 (stop_all_lwps): Use send_sigstop_callback instead.
5721 (linux_resume_one_thread): Adjust.
5722 (proceed_one_lwp): Still proceed an LWP that the client has
5723 requested to stop, if we haven't reported it as stopped yet. Make
5724 sure that LWPs the client want stopped, have a pending SIGSTOP.
5725
bc3b5632
DE
57262010-04-26 Doug Evans <dje@google.com>
5727
ae1ada35
DE
5728 * server.c (handle_general_set): Make static.
5729
bc3b5632
DE
5730 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
5731 Print received char after testing for error/eof instead of before.
5732 (input_interrupt): Tweak comment.
5733
65730243
DE
57342010-04-23 Doug Evans <dje@google.com>
5735
5736 * server.c (start_inferior): Print inferior argv if --debug.
5737
a8ae7dc0
AR
57382010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
5739
5740 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
5741 * nto-x86-low.c: Include server.h
5742
1c07cc19
PM
57432010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
5744
5745 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
5746 be consistent with other sources of this directory.
5747 (init_registers_amd64): Correct name of source file of this function
5748 in the comment.
5749
e0a61e09
PM
57502010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
5751
5752 * configure.srv (x86_64-*-mingw*): New configuration for Windows
5753 64-bit executables.
5754
54709339
PM
57552010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
5756
5757 * win32-i386-low.c: Add 64-bit support.
5758 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
5759 (init_registers_amd64): Declare.
5760 (mappings): Add 64-bit version of array.
5761 (init_windows_x86): New function.
5762 (the_low_target): Change init_arch field to init_windows_x86.
5763
e8f0053d
PM
57642010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
5765
5766 * win32-low.c: Adapt to support also 64-bit architecture.
5767 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
5768 (get_image_name): Use SIZE_T type for local variable `done'.
5769 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
5770 (toolhelp_get_dll_name): Idem.
5771 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
5772 Use uintptr_t typecast to avoid warning.
5773 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
5774 (handle_exception): Use phex_nz to avoid warning.
5775 (win32_wait): Remove unused local variable `process'.
5776
c481e77e
PM
57772010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
5778
5779 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
5780 `amd64-avx.o'.
5781
12ea4b69
PM
57822010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
5783
5784 * configure.ac: Use `ws2_32' library for srv_mingw.
5785 * configure: Regenerate.
5786 * gdbreplay.c: Include winsock2.h instead of winsock.h.
5787 * remote-utils.c: Likewise.
5788
f6d1620c
L
57892010-04-17 H.J. Lu <hongjiu.lu@intel.com>
5790
5791 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
5792 if __x86_64__ is defined.
5793
8e642873
PM
57942010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
5795
5796 * configure: Regenerate.
5797
711e434b
PM
57982010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
5799
5800 * server.c (handle_query): Handle 'qGetTIBAddr' query.
5801 * target.h (target_ops): New get_tib_address field.
5802 * win32-low.h (win32_thread_info): Add thread_local_base field.
5803 * win32-low.c (child_add_thread): Add tlb argument.
5804 Set thread_local_base field to TLB.
5805 (get_child_debug_event): Adapt to child_add_thread change.
5806 (win32_get_tib_address): New function.
5807 (win32_target_ops): Set get_tib_address field to
5808 win32_get_tib_address.
5809 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
5810
505106cd
PA
58112010-04-12 Pedro Alves <pedro@codesourcery.com>
5812
505106cd
PA
5813 * linux-low.c (linux_mourn): Also remove the process.
5814 * server.c (handle_target_event): Don't remove the process here.
5815 * nto-low.c (nto_mourn): New.
5816 (nto_target_ops): Install it.
5817 * spu-low.c (spu_mourn): New.
5818 (spu_target_ops): Install it.
5819 * win32-low.c (win32_mourn): New.
5820 (win32_target_ops): Install it.
5821
e8470a06
PA
58222010-04-12 Pedro Alves <pedro@codesourcery.com>
5823
5824 * server.h (buffer_xml_printf): Remove redundant `;'.
5825
45ba0d02
PA
58262010-04-12 Pedro Alves <pedro@codesourcery.com>
5827
5828 * regcache.c (set_register_cache): Invalidate regcaches before
5829 changing the register cache layout.
5830 (regcache_invalidate_one): Allow a NULL regcache.
5831 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
5832 regcaches before changing the register cache layout or the target
5833 regsets.
5834
59e04013
L
58352010-04-12 H.J. Lu <hongjiu.lu@intel.com>
5836
5837 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
5838 variable warning on Linux/x86-64.
5839
8336d594
PA
58402010-04-11 Pedro Alves <pedro@codesourcery.com>
5841
5842 GDBserver disconnected tracing support.
5843
5844 * linux-low.c (linux_remove_process): Delete.
5845 (add_lwp): Don't set last_resume_kind here.
5846 (linux_kill): Use `mourn'.
5847 (linux_detach): Use `thread_db_detach', and `mourn'.
5848 (linux_mourn): New.
5849 (linux_attach_lwp_1): Adjust comment.
5850 (linux_attach): last_resume_kind moved the thread_info; adjust.
5851 (status_pending_p_callback): Adjust.
5852 (linux_wait_for_event_1): Adjust.
5853 (count_events_callback, select_singlestep_lwp_callback)
5854 (select_event_lwp_callback, cancel_breakpoints_callback)
5855 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
5856 (proceed_one_lwp): Adjust.
5857 (linux_async): Add debug output.
5858 (linux_thread_stopped): New.
5859 (linux_pause_all): New.
5860 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
5861 linux_pause_all.
5862 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
5863 (thread_db_free): Delete declaration.
5864 (thread_db_detach, thread_db_mourn): Declare.
5865 * thread-db.c (thread_db_init): Use thread_db_mourn.
5866 (thread_db_free): Delete, split in two.
5867 (disable_thread_event_reporting): New.
5868 (thread_db_detach): New.
5869 (thread_db_mourn): New.
5870
5871 * server.h (struct thread_info) <last_resume_kind>: New field.
5872 <attached>: Add comment.
5873 <gdb_detached>: New field.
5874 (handler_func): Change return type to int.
5875 (handle_serial_event, handle_target_event): Ditto.
5876 (gdb_connected): Declare.
5877 (tracing): Delete.
5878 (disconnected_tracing): Declare.
5879 (stop_tracing): Declare.
5880
5881 * server.c (handle_query) <qSupported>: Report support for
5882 disconnected tracing.
5883 (queue_stop_reply_callback): Account for running threads.
5884 (gdb_wants_thread_stopped): New.
5885 (gdb_wants_all_threads_stopped): New.
5886 (gdb_reattached_process): New.
5887 (handle_status): Clear the `gdb_detached' flag of all processes.
5888 In all-stop, stop all threads.
5889 (main): Be sure to leave tfind mode. Handle disconnected tracing.
5890 (process_serial_event): If the remote connection breaks, or if an
5891 exit was forced with "monitor exit", force an event loop exit.
5892 Handle disconnected tracing on detach.
5893 (handle_serial_event): Adjust.
5894 (handle_target_event): If GDB isn't connected, forward events back
5895 to the inferior, unless the last process exited, in which case,
5896 exit gdbserver. Adjust interface.
5897
5898 * remote-utils.c (remote_open): Don't block in accept. Instead
5899 register an event loop source on the listen socket file
5900 descriptor. Refactor bits into ...
5901 (listen_desc): ... this new global.
5902 (gdb_connected): ... this new function.
5903 (enable_async_notification): ... this new function.
5904 (handle_accept_event): ... this new function.
5905 (remote_close): Clear remote_desc.
5906
5907 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
5908
5909 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
5910 New fields.
5911 (mourn_inferior): Define.
5912 (target_process_qsupported): Avoid the dangling else problem.
5913 (thread_stopped): Define.
5914 (pause_all): Define.
5915 (target_waitstatus_to_string): Declare.
5916 * target.c (target_waitstatus_to_string): New.
5917
5918 * tracepoint.c (tracing): Make extern.
5919 (disconnected_tracing): New.
5920 (stop_tracing): Make extern. Handle tracing stops due to GDB
5921 disconnecting.
5922 (cmd_qtdisconnected): New.
5923 (cmd_qtstatus): Report disconnected tracing status in trace reply.
5924 (handle_tracepoint_general_set): Handle QTDisconnected.
5925
5926 * event-loop.c (event_handler_func): Change return type to int.
5927 (process_event): Bail out if the event handler wants the event
5928 loop to stop.
5929 (handle_file_event): Ditto.
5930 (start_event_loop): Bail out if the event handler wants the event
5931 loop to stop.
5932
5933 * nto-low.c (nto_target_ops): Adjust.
5934 * spu-low.c (spu_wait): Don't remove the process here.
5935 (spu_target_ops): Adjust.
5936 * win32-low.c (win32_wait): Don't remove the process here.
5937 (win32_target_ops): Adjust.
5938
5d267c4c
PA
59392010-04-11 Pedro Alves <pedro@codesourcery.com>
5940
5941 * regcache.c (realloc_register_cache): Invalidate inferior's
5942 regcache before recreating it.
5943
623ccd72
PA
59442010-04-09 Pedro Alves <pedro@codesourcery.com>
5945
5946 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
5947
219f2f23
PA
59482010-04-09 Stan Shebs <stan@codesourcery.com>
5949 Pedro Alves <pedro@codesourcery.com>
5950
5951 * server.h (LONGEST): New.
5952 (struct thread_info) <while_stepping>: New field.
5953 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
5954 Declare.
5955 (initialize_tracepoint, handle_tracepoint_general_set)
5956 (handle_tracepoint_query, tracepoint_finished_step)
5957 (tracepoint_was_hit, release_while_stepping_state_list):
5958 (current_traceframe): Declare.
5959 * server.c (handle_general_set): Handle tracepoint packets.
5960 (read_memory): New.
5961 (write_memory): New.
5962 (handle_search_memory_1): Use read_memory.
5963 (handle_query): Report support for conditional tracepoints, trace
5964 state variables, and tracepoint sources. Handle tracepoint
5965 queries.
5966 (main): Initialize the tracepoints module.
5967 (process_serial_event): Handle traceframe reads/writes.
5968
5969 * linux-low.c (handle_tracepoints): New.
5970 (linux_wait_1): Call it.
5971 (linux_resume_one_lwp): Handle while-stepping.
5972 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
5973 (linux_target_ops): Install them.
5974 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
5975 New field.
5976 * linux-x86-low.c (x86_supports_tracepoints): New.
5977 (the_low_target). Install it.
5978
5979 * mem-break.h (delete_breakpoint): Declare.
5980 * mem-break.c (delete_breakpoint): Make external.
5981
5982 * target.h (struct target_ops): Add `supports_tracepoints',
5983 `read_pc', and `write_pc' fields.
5984 (target_supports_tracepoints): Define.
5985 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
5986 (phex_nz): New.
5987
5988 * regcache.h (struct regcache) <registers_owned>: New field.
5989 (init_register_cache, regcache_cpy): Declare.
5990 (regcache_read_pc, regcache_write_pc): Declare.
5991 (register_cache_size): Declare.
5992 (supply_regblock): Declare.
5993 * regcache.c (init_register_cache): New.
5994 (new_register_cache): Use it.
5995 (regcache_cpy): New.
5996 (register_cache_size): New.
5997 (supply_regblock): New.
5998 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 5999
219f2f23
PA
6000 * tracepoint.c: New.
6001
6002 * Makefile.in (OBS): Add tracepoint.o.
6003 (tracepoint.o): New rule.
6004
3a13a53b
L
60052010-04-08 H.J. Lu <hongjiu.lu@intel.com>
6006
6007 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
6008 (i386-mmx.o): New.
6009 (i386-mmx.c): Likewise.
6010 (i386-mmx-linux.o): Likewise.
6011 (i386-mmx-linux.c): Likewise.
6012
6013 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
6014 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
6015 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
6016 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
6017
6018 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
6019 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
6020 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
6021
1570b33e
L
60222010-04-07 H.J. Lu <hongjiu.lu@intel.com>
6023
6024 * Makefile.in (clean): Updated.
6025 (i386-avx.o): New.
6026 (i386-avx.c): Likewise.
6027 (i386-avx-linux.o): Likewise.
6028 (i386-avx-linux.c): Likewise.
6029 (amd64-avx.o): Likewise.
6030 (amd64-avx.c): Likewise.
6031 (amd64-avx-linux.o): Likewise.
6032 (amd64-avx-linux.c): Likewise.
6033
6034 * configure.srv (srv_i386_regobj): Add i386-avx.o.
6035 (srv_i386_linux_regobj): Add i386-avx-linux.o.
6036 (srv_amd64_regobj): Add amd64-avx.o.
6037 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
6038 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
6039 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
6040 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
6041 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
6042 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
6043 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
6044
6045 * i387-fp.c: Include "i386-xstate.h".
6046 (i387_xsave): New.
6047 (i387_cache_to_xsave): Likewise.
6048 (i387_xsave_to_cache): Likewise.
6049 (x86_xcr0): Likewise.
6050
6051 * i387-fp.h (i387_cache_to_xsave): Likewise.
6052 (i387_xsave_to_cache): Likewise.
6053 (x86_xcr0): Likewise.
6054
6055 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
6056 * linux-crisv32-low.c (target_regsets): Likewise.
6057 * linux-m68k-low.c (target_regsets): Likewise.
6058 * linux-mips-low.c (target_regsets): Likewise.
6059 * linux-ppc-low.c (target_regsets): Likewise.
6060 * linux-s390-low.c (target_regsets): Likewise.
6061 * linux-sh-low.c (target_regsets): Likewise.
6062 * linux-sparc-low.c (target_regsets): Likewise.
6063 * linux-xtensa-low.c (target_regsets): Likewise.
6064
6065 * linux-low.c: Include <sys/uio.h>.
6066 (regsets_fetch_inferior_registers): Support nt_type.
6067 (regsets_store_inferior_registers): Likewise.
6068 (linux_process_qsupported): New.
6069 (linux_target_ops): Add linux_process_qsupported.
6070
6071 * linux-low.h (regset_info): Add nt_type.
6072 (linux_target_ops): Add process_qsupported.
6073
6074 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
6075 and <sys/uio.h>.
6076 (init_registers_i386_avx_linux): New.
6077 (init_registers_amd64_avx_linux): Likewise.
6078 (xmltarget_i386_linux_no_xml): Likewise.
6079 (xmltarget_amd64_linux_no_xml): Likewise.
6080 (PTRACE_GETREGSET): Likewise.
6081 (PTRACE_SETREGSET): Likewise.
6082 (x86_fill_xstateregset): Likewise.
6083 (x86_store_xstateregset): Likewise.
6084 (use_xml): Likewise.
6085 (x86_linux_update_xmltarget): Likewise.
6086 (x86_linux_process_qsupported): Likewise.
6087 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
6088 (x86_arch_setup): Don't call init_registers_amd64_linux nor
6089 init_registers_i386_linux here. Call
6090 x86_linux_update_xmltarget.
6091 (the_low_target): Add x86_linux_process_qsupported.
6092
6093 * server.c (handle_query): Call target_process_qsupported.
6094
6095 * target.h (target_ops): Add process_qsupported.
6096 (target_process_qsupported): New.
6097
fc7238bb
PA
60982010-04-03 Pedro Alves <pedro@codesourcery.com>
6099
6100 * inferiors.c (add_thread): Set last_status kind to
6101 TARGET_WAITKIND_IGNORE.
6102 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
6103 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
6104 (linux_wait_1): Move `thread' local definition to block that uses
6105 it. Don't NULL initialize `event_child'.
6106 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
6107 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
6108 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
6109
bdabb078
PA
61102010-04-01 Pedro Alves <pedro@codesourcery.com>
6111
6112 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
6113 an extended waitstatus, or by a watchpoint.
6114 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
6115 thread was stepping or has been stopped by a watchpoint.
6116
d3bbe7a0
PA
61172010-04-01 Pedro Alves <pedro@codesourcery.com>
6118
6119 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
6120 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
6121 of another, then delete the previous, and validate all
6122 breakpoints.
6123 (validate_inserted_breakpoint): New.
6124 (delete_disabled_breakpoints): New.
6125 (validate_breakpoints): New.
6126 (check_mem_read): Validate breakpoints before trusting their
6127 shadow. Delete disabled breakpoints.
6128 (check_mem_write): Validate breakpoints before trusting they
6129 should be inserted. Delete disabled breakpoints.
6130 * mem-break.h (validate_breakpoints):
6131 * server.c (handle_query): Validate breakpoints when we see a
6132 qSymbol query.
6133
8b07ae33
PA
61342010-04-01 Pedro Alves <pedro@codesourcery.com>
6135
6136 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
6137 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
6138 if we could tell there's a GDB breakpoint at stop_pc.
6139 (need_step_over_p): Don't do a step over if we find a GDB
6140 breakpoint at the resume PC.
6141
6142 * mem-break.c (struct raw_breakpoint): New.
6143 (enum bkpt_type): New type `gdb_breakpoint'.
6144 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
6145 fields. New field `raw'.
6146 (find_raw_breakpoint_at): New.
6147 (set_raw_breakpoint_at): Handle refcounting. Create a raw
6148 breakpoint instead.
6149 (set_breakpoint_at): Adjust.
6150 (delete_raw_breakpoint): New.
6151 (release_breakpoint): New.
6152 (delete_breakpoint): Rename to...
6153 (delete_breakpoint_1): ... this. Add proc parameter. Use
6154 release_breakpoint. Return ENOENT.
6155 (delete_breakpoint): Reimplement.
6156 (find_breakpoint_at): Delete.
6157 (find_gdb_breakpoint_at): New.
6158 (delete_breakpoint_at): Delete.
6159 (set_gdb_breakpoint_at): New.
6160 (delete_gdb_breakpoint_at): New.
6161 (gdb_breakpoint_here): New.
6162 (set_reinsert_breakpoint): Use release_breakpoint.
6163 (uninsert_breakpoint): Rename to ...
6164 (uninsert_raw_breakpoint): ... this.
6165 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
6166 (reinsert_raw_breakpoint): Change parameter type to
6167 raw_breakpoint.
6168 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
6169 instead.
6170 (check_breakpoints): Adjust. Use release_breakpoint.
6171 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
6172 (breakpoint_inserted_here): Ditto.
6173 (check_mem_read): Adjust to iterate over raw breakpoints instead.
6174 Don't trust the breakpoint's shadow if it is not inserted.
6175 (check_mem_write): Adjust to iterate over raw breakpoints instead.
6176 (delete_all_breakpoints): Adjust.
6177 (free_all_breakpoints): Mark all breakpoints as uninserted, and
6178 use delete_breakpoint_1.
6179
6180 * mem-break.h (breakpoints_supported): Delete declaration.
6181 (set_gdb_breakpoint_at): Declare.
6182 (gdb_breakpoint_here): Declare.
6183 (delete_breakpoint_at): Delete.
6184 (delete_gdb_breakpoint_at): Declare.
6185
6186 * server.h (struct raw_breakpoint): Forward declare.
6187 (struct process_info): New field `raw_breakpoints'.
6188
6189 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
6190 breakpoints.
6191
6bf5e0ba
PA
61922010-03-24 Pedro Alves <pedro@codesourcery.com>
6193
6194 * linux-low.c (status_pending_p_callback): Fix comment.
6195 (linux_wait_for_event_1): Move most of the internal breakpoint
6196 handling from here...
6197 (linux_wait_1): ... to here.
6198 (count_events_callback): New.
6199 (select_singlestep_lwp_callback): New.
6200 (select_event_lwp_callback): New.
6201 (cancel_breakpoints_callback): New.
6202 (select_event_lwp): New.
6203 (linux_wait_1): Simplify internal breakpoint handling. Give equal
6204 priority to all LWPs that have had events that should be reported
6205 to the client. Cancel breakpoints when about to reporting the
6206 event to the client, not while stopping lwps. No longer cancel
6207 finished single-steps here.
6208 (cancel_finished_single_step): Delete.
6209 (cancel_finished_single_steps): Delete.
6210
414a389f
PA
62112010-03-24 Pedro Alves <pedro@codesourcery.com>
6212
6213 * mem-break.c (enum bkpt_type): New.
6214 (struct breakpoint): New field `type'.
6215 (set_breakpoint_at): Change return type to struct breakpoint
6216 pointer. Set type to `other_breakpoint' by default.
6217 (delete_breakpoint): Rewrite, supporting more than one breakpoint
6218 in the breakpoint list.
6219 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
6220 (reinsert_breakpoint): Rename to ...
6221 (reinsert_raw_breakpoint): ... this.
6222 (reinsert_breakpoints_at): Adjust.
6223 * mem-break.h (struct breakpoint): Declare.
6224 (set_breakpoint_at): Change return type to struct breakpoint
6225 pointer.
6226
2280c721
PA
62272010-03-24 Pedro Alves <pedro@codesourcery.com>
6228
6229 * server.c (handle_query): Assign, not compare.
6230
d50171e4
PA
62312010-03-24 Pedro Alves <pedro@codesourcery.com>
6232
6233 Teach linux gdbserver to step-over-breakpoints.
6234
6235 * linux-low.c (can_hardware_single_step): New.
6236 (supports_breakpoints): New.
6237 (handle_extended_wait): If stopping threads, read the stop pc of
6238 the new cloned LWP.
6239 (get_pc): New.
6240 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
6241 low target doesn't support retrieving the PC.
6242 (add_lwp): Set last_resume_kind to resume_continue.
6243 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
6244 (linux_attach): Don't clear stop_expected. Set the lwp's
6245 last_resume_kind to resume_stop.
6246 (linux_detach_one_lwp): Don't check for removed breakpoints.
6247 (check_removed_breakpoint): Delete.
6248 (status_pending_p): Rename to ...
6249 (status_pending_p_callback): ... this. Don't check for removed
6250 breakpoints. Don't consider threads that are stopped from GDB's
6251 perspective.
6252 (linux_wait_for_lwp): Always read the stop_pc here.
6253 (cancel_breakpoint): New.
6254 (step_over_bkpt): New global.
6255 (linux_wait_for_event_1): Implement stepping over breakpoints.
6256 (gdb_wants_lwp_stopped): New.
6257 (gdb_wants_all_stopped): New.
6258 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
6259 single-step traps here. Store the thread's last reported target
6260 wait status.
6261 (send_sigstop): Don't clear stop_expected. Always set it,
6262 instead.
6263 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
6264 (cancel_finished_single_step): New.
6265 (cancel_finished_single_steps): New.
6266 (wait_for_sigstop): Don't cancel finished single-step traps here.
6267 (linux_resume_one_lwp): Don't check for removed breakpoints.
6268 Don't set `step' on non-hardware step archs.
6269 (linux_set_resume_request): Ignore resume_stop requests if already
6270 stopping or stopped. Set the lwp's last_resume_kind.
6271 (resume_status_pending_p): Don't check for removed breakpoints.
6272 (need_step_over_p): New.
6273 (start_step_over): New.
6274 (finish_step_over): New.
6275 (linux_resume_one_thread): Always queue a sigstop for resume_stop
6276 requests. Clear the thread's last reported target waitstatus.
6277 Don't use the `suspended' flag. Don't consider pending breakpoints.
6278 (linux_resume): Start a step-over if necessary.
6279 (proceed_one_lwp): New.
6280 (proceed_all_lwps): New.
6281 (unstop_all_lwps): New.
6282 * linux-low.h (struct lwp_info): Rewrite comment for the
6283 `suspended' flag. Add the `stop_pc' field. Delete the
6284 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
6285 Add `'last_resume_kind' and `need_step_over' fields.
6286 * inferiors.c (struct thread_info): Delete, moved elsewhere.
6287 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
6288 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
6289 (set_raw_breakpoint_at): New.
6290 (set_breakpoint_at): Rewrite to use it.
6291 (reinsert_breakpoint_handler): Delete.
6292 (set_reinsert_breakpoint): New.
6293 (reinsert_breakpoint_by_bp): Delete.
6294 (delete_reinsert_breakpoints): New.
6295 (uninsert_breakpoint): Rewrite.
6296 (uninsert_breakpoints_at): New.
6297 (reinsert_breakpoint): Rewrite.
6298 (reinsert_breakpoints_at): New.
6299 (check_breakpoints): Rewrite.
6300 (breakpoint_here): New.
6301 (breakpoint_inserted_here): New.
6302 (check_mem_read): Adjust.
6303 * mem-break.h (breakpoints_supported, breakpoint_here)
6304 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
6305 (reinsert_breakpoint_by_bp): Delete declaration.
6306 (delete_reinsert_breakpoints): Declare.
6307 (reinsert_breakpoint): Delete declaration.
6308 (reinsert_breakpoints_at): Declare.
6309 (uninsert_breakpoint): Delete declaration.
6310 (uninsert_breakpoints_at): Declare.
6311 (check_breakpoints): Adjust prototype.
6312 * server.h: Adjust include order.
6313 (struct thread_info): Declare here. Add a `last_status' field.
6314
30ba68cb
MS
63152010-03-23 Michael Snyder <msnyder@vmware.com>
6316
6317 * server.c (crc32): New function.
6318 (handle_query): Add handling for 'qCRC:' request.
6319
b9a881c2
PA
63202010-03-23 Pedro Alves <pedro@codesourcery.com>
6321
6322 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
6323 lwp had been stopped by a watchpoint.
6324
e92d13d5
PA
63252010-03-16 Pedro Alves <pedro@codesourcery.com>
6326
6327 * server.h (internal_error): Declare.
6328 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
6329 * utils.c (internal_error): New function.
6330
64daa791
AS
63312010-03-15 Andreas Schwab <schwab@redhat.com>
6332
6333 * configure.srv: Fix typo setting srv_regobj.
6334
f52cd8cd
PA
63352010-03-15 Pedro Alves <pedro@codesourcery.com>
6336
6337 * linux-low.c (fetch_register): Avoid passing a non string literal
6338 format to `error'.
6339 (usr_store_inferior_registers): Ditto.
6340
93ae6fdc
PA
63412010-03-14 Pedro Alves <pedro@codesourcery.com>
6342
6343 * linux-low.c (linux_write_memory): Bail out early if peeking
6344 memory failed.
6345
c3adc08c
PA
63462010-03-14 Pedro Alves <pedro@codesourcery.com>
6347
6348 * linux-low.h (struct lwp_info): New fields
6349 `stopped_by_watchpoint' and `stopped_data_address'.
6350 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
6351 here, and cache them in the lwp object.
6352 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
6353 directly.
6354 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
6355 field.
6356 (linux_stopped_by_watchpoint): Rewrite.
6357 (linux_stopped_data_address): Rewrite.
6358
bce522a2
PA
63592010-03-06 Simo Melenius <simo.melenius@iki.fi>
6360
6361 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
6362 switching the current inferior, not before.
6363
90884b2b
L
63642010-03-01 H.J. Lu <hongjiu.lu@intel.com>
6365
6366 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
6367 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
6368 i386-linux.c and amd64-linux.c.
6369 (reg-i386.o): Removed.
6370 (reg-i386.c): Likewise.
6371 (reg-i386-linux.o): Likewise.
6372 (reg-i386-linux.c): Likewise.
6373 (reg-x86-64.o): Likewise.
6374 (reg-x86-64.c): Likewise.
6375 (reg-x86-64-linux.o): Likewise.
6376 (reg-x86-64-linux.c): Likewise.
6377 (i386.o): New.
6378 (i386.c): Likewise.
6379 (i386-linux.o): Likewise.
6380 (i386-linux.c): Likewise.
6381 (amd64.o): Likewise.
6382 (amd64.c): Likewise.
6383 (amd64-linux.o): Likewise.
6384 (amd64-linux.c): Likewise.
6385
6386 * configure.srv (srv_i386_regobj): New.
6387 (srv_i386_linux_regobj): Likewise.
6388 (srv_amd64_regobj): Likewise.
6389 (srv_amd64_linux_regobj): Likewise.
6390 (srv_i386_32bit_xmlfiles): Likewise.
6391 (srv_i386_64bit_xmlfiles): Likewise.
6392 (srv_i386_xmlfiles): Likewise.
6393 (srv_amd64_xmlfiles): Likewise.
6394 (srv_i386_linux_xmlfiles): Likewise.
6395 (srv_amd64_linux_xmlfiles): Likewise.
6396 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
6397 srv_xmlfiles to $srv_i386_xmlfiles.
6398 (i[34567]86-*-mingw32ce*): Likewise.
6399 (i[34567]86-*-mingw*): Likewise.
6400 (i[34567]86-*-nto*): Likewise.
6401 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
6402 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
6403 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
6404 (x86_64-*-linux*): Likewise.
6405
6406 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
6407 (init_registers_amd64_linux): New.
6408 (x86_arch_setup): Replace init_registers_x86_64_linux with
6409 init_registers_amd64_linux.
6410
193f13e6
MK
64112010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
6412
6413 * configure.ac: Check for libdl. If it is not available link against
6414 static libthread_db.
6415 * configure: Regenerate.
6416
85d721b8
PA
64172010-02-22 Pedro Alves <pedro@codesourcery.com>
6418
6419 PR9605
6420
6421 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
6422 handing a read watchpoint.
6423 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
6424
6076632b
DE
64252010-02-12 Doug Evans <dje@google.com>
6426
6427 * linux-low.c (linux_supports_tracefork_flag): Document.
6428 (linux_look_up_symbols): Add comment.
6429
3327ccf7
L
64302010-02-03 H.J. Lu <hongjiu.lu@intel.com>
6431
6432 * regcache.c (supply_register): Clear regcache if buf is NULL.
6433
0718675c 64342010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 6435 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
6436
6437 * inferiors.c (find_inferior): Add function documentation.
6438 (unloaded_dll): Handle the case where the unloaded dll has not
6439 been previously registered in the dll list.
6440
177321bd
DJ
64412010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
6442
6443 * linux-arm-low.c (thumb_breakpoint_len): Delete.
6444 (thumb2_breakpoint): New.
6445 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
6446
2b009048
DJ
64472010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
6448
6449 * linux-low.c (get_stop_pc): Check for SIGTRAP.
6450 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
6451 breakpoints.
6452
3be029c7
PA
64532010-01-21 Pedro Alves <pedro@codesourcery.com>
6454
6455 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
6456
18f5de3b
JK
64572010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6458
6459 * linux-s390-low.c (s390_collect_ptrace_register)
6460 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
6461
3743bb4f
DE
64622010-01-21 Doug Evans <dje@google.com>
6463
14ce3065
DE
6464 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
6465 (PTRACE_ARG4_TYPE): New macro.
6466 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
6467 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
6468 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
6469 (usr_store_inferior_registers): Ditto.
6470 (linux_read_memory, linux_write_memory): Ditto.
6471 (linux_test_for_tracefork): Ditto.
6472
3743bb4f
DE
6473 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
6474 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
6475
8b315be5
PA
64762010-01-21 Pedro Alves <pedro@codesourcery.com>
6477
6478 * proc-service.c (ps_lgetregs): Don't refetch registers from the
6479 target.
6480
85492558
PA
64812010-01-21 Pedro Alves <pedro@codesourcery.com>
6482
6483 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
6484 prototype to take a regcache. Adjust.
6485
442ea881
PA
64862010-01-20 Pedro Alves <pedro@codesourcery.com>
6487
6488 * regcache.h (struct thread_info): Forward declare.
6489 (struct regcache): New.
6490 (new_register_cache): Adjust prototype.
6491 (get_thread_regcache): Declare.
6492 (free_register_cache): Adjust prototype.
6493 (registers_to_string, registers_from_string): Ditto.
6494 (supply_register, supply_register_by_name, collect_register)
6495 (collect_register_as_string, collect_register_by_name): Ditto.
6496 * regcache.c (struct inferior_regcache_data): Delete.
6497 (get_regcache): Rename to ...
6498 (get_thread_regcache): ... this. Adjust. Switch inferior before
6499 fetching registers.
6500 (regcache_invalidate_one): Adjust.
6501 (regcache_invalidate): Fix prototype.
6502 (new_register_cache): Return the new register cache.
6503 (free_register_cache): Change prototype.
6504 (realloc_register_cache): Adjust.
6505 (registers_to_string): Change prototype to take a regcache. Adjust.
6506 (registers_from_string): Ditto.
6507 (register_data): Ditto.
6508 (supply_register): Ditto.
6509 (supply_register_by_name): Ditto.
6510 (collect_register): Ditto.
6511 (collect_register_as_string): Ditto.
6512 (collect_register_by_name): Ditto.
6513 * server.c (process_serial_event): Adjust.
6514 * linux-low.h (regset_fill_func, regset_store_func): Change
6515 prototype.
6516 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
6517 Change prototype.
6518 * linux-low.c (get_stop_pc): Adjust.
6519 (check_removed_breakpoint): Adjust.
6520 (linux_wait_for_event): Adjust.
6521 (linux_resume_one_lwp): Adjust.
6522 (fetch_register): Add regcache parameter. Adjust.
6523 (usr_store_inferior_registers): Ditto.
6524 (regsets_fetch_inferior_registers): Ditto.
6525 (regsets_store_inferior_registers): Ditto.
6526 (linux_fetch_registers, linux_store_registers): Ditto.
6527 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
6528 regcache. Adjust.
43aaf8b6
PA
6529 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
6530 Ditto.
442ea881
PA
6531 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
6532 prototype to take a regcache.
6533 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
6534 * remote-utils.c (convert_ascii_to_int, outreg)
6535 (prepare_resume_reply): Change prototype to take a regcache.
6536 Adjust.
6537 * target.h (struct target_ops) <fetch_registers, store_registers>:
6538 Change prototype to take a regcache.
6539 (fetch_inferior_registers, store_inferior_registers): Change
6540 prototype to take a regcache. Adjust.
6541 * proc-service.c (ps_lgetregs): Adjust.
6542 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
6543 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
6544 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
6545 take a regcache. Adjust.
6546 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
6547 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
6548 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
6549 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
6550 * linux-cris-low.c (cris_get_pc, cris_set_pc)
6551 (cris_cannot_fetch_register):
6552 (cris_breakpoint_at): Change prototype to take a regcache.
6553 Adjust.
6554 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
6555 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
6556 to take a regcache. Adjust.
6557 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
6558 Adjust.
6559 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
6560 take a regcache. Adjust.
6561 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
6562 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
6563 (m68k_set_pc): Change prototype to take a regcache. Adjust.
6564 * linux-mips-low.c (mips_get_pc):
6565 (mips_set_pc): Change prototype to take a regcache. Adjust.
6566 (mips_reinsert_addr): Adjust.
6567 (mips_collect_register): Change prototype to take a regcache.
6568 Adjust.
6569 (mips_supply_register):
6570 (mips_collect_register_32bit, mips_supply_register_32bit)
6571 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
6572 (mips_store_fpregset): Ditto.
43aaf8b6
PA
6573 * linux-ppc-low.c (ppc_supply_ptrace_register)
6574 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
6575 (parse_spufs_run): Adjust.
6576 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
6577 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
6578 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
6579 take a regcache. Adjust.
6580 * linux-s390-low.c (s390_collect_ptrace_register)
6581 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
6582 (s390_set_pc): Change prototype to take a regcache. Adjust.
6583 (s390_arch_setup): Adjust.
6584 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
6585 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
6586 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6587 (sparc_fill_gregset, sparc_store_gregset_from_stack)
6588 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
6589 regcache. Adjust.
6590 (sparc_breakpoint_at): Adjust.
6591 * linux-xtensa-low.c (xtensa_fill_gregset):
6592 (xtensa_store_gregset):
6593 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
6594 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
6595 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
6596 prototype to take a regcache. Adjust.
6597 * win32-arm-low.c (arm_fetch_inferior_register)
6598 (arm_store_inferior_register): Change prototype to take a
6599 regcache. Adjust.
6600 * win32-i386-low.c (i386_fetch_inferior_register)
6601 (i386_store_inferior_register): Change prototype to take a
6602 regcache. Adjust.
6603 * win32-low.c (child_fetch_inferior_registers)
6604 (child_store_inferior_registers): Change prototype to take a
6605 regcache. Adjust.
6606 (win32_wait): Adjust.
6607 (win32_fetch_inferior_registers): Change prototype to take a
6608 regcache. Adjust.
6609 (win32_store_inferior_registers): Adjust.
6610 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
6611 store_inferior_register>: Change prototype to take a regcache.
6612
60c3d7b0
DE
66132010-01-20 Doug Evans <dje@google.com>
6614
6615 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
6616 #ifdef.
6617 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 6618 (W_STOPCODE): Provide definition if missing.
60c3d7b0 6619
dc146f7c
VP
66202010-01-13 Vladimir Prus <vladimir@codesourcery.com>
6621
6622 * linux-low.c (linux_core_of_thread): New.
6623 (compare_ints, show_process, list_threads): New.
6624 (linux_qxfer_osdata): Report threads and cores.
6625 (linux_target_op): Register linux_core_of_thread.
6626 * remote-utils.c (prepare_resume_reply): Report the core.
6627 (buffer_xml_printf): Support %d specifier.
6628 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
6629 New.
6630 (handle_query): Handle qXfer:threads. Announce availability
6631 thereof.
6632 * target.h (struct target_ops): New field core_of_thread.
6633
7803799a
UW
66342010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
6635
6636 * Makefile.in (clean): Remove new generated files.
6637 (reg-s390.o, reg-s390.c): Remove rules.
6638 (reg-s390x.o, reg-s390x.c): Likewise.
6639 (s390-linux32.o, s390-linux32.c): Add rules.
6640 (s390-linux64.o, s390-linux64.c): Likewise.
6641 (s390x-linux64.o, s390x-linux64.c): Likewise.
6642 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
6643 * linux-s390-low.c: Include <elf.h>.
6644 (HWCAP_S390_HIGH_GPRS): Define if undefined.
6645 (init_registers_s390): Remove prototype.
6646 (init_registers_s390x): Likewise.
6647 (init_registers_s390_linux32): Add prototype.
6648 (init_registers_s390_linux64): Likewise.
6649 (init_registers_s390x_linux64): Likewise.
6650 (s390_num_regs_3264): New define.
6651 (s390_regmap_3264): New global variable.
6652 (s390_cannot_fetch_register): Remove obsolete check.
6653 (s390_cannot_store_register): Likewise.
6654 (s390_collect_ptrace_register): Handle upper/lower register halves.
6655 (s390_supply_ptrace_register): Likewise.
6656 (s390_fill_gregset): Update to register number changes.
6657 (s390_get_hwcap): New routine.
6658 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
6659 Install appropriate regmap and register set.
6660
6e7ffa39
JB
66612010-01-01 Joel Brobecker <brobecker@adacore.com>
6662
6663 * server.c (gdbserver_version): Update copyright year to 2010.
6664 * gdbreplay.c (gdbreplay_version): Likewise.
6665
957f3f49
DE
66662009-12-28 Doug Evans <dje@google.com>
6667
6668 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
6669 elf/external.h. Include <elf.h> instead but only if necessary.
6670
ca5c370d
PA
66712009-12-28 Pedro Alves <pedro@codesourcery.com>
6672
6673 * linux-low.c (linux_remove_process): Remove `detaching'
6674 parameter. Don't release/detach from thread_db here.
6675 (linux_kill): Release/detach from thread_db here, ...
6676 (linux_detach): ... and here, before actually detaching.
6677 (linux_wait_1): ... and here, when a process exits.
6678 * thread-db.c (any_thread_of): New.
6679 (thread_db_free): Switch the current inferior to a thread of the
6680 passed in process.
6681
4ee62156
DE
66822009-12-21 Doug Evans <dje@google.com>
6683
d90e6a88
DE
6684 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
6685
c5f62d5f
DE
6686 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
6687 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
6688 warning ifndef __NR_tkill. Move setting of errno there too.
6689 Delete unnecessary resetting of errno after syscall.
6690 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
6691
10e86dd7
DE
6692 * configure.ac: Check for dladdr.
6693 * config.in: Regenerate.
6694 * configure: Regenerate.
6695 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
6696 (try_thread_db_load): Update.
6697
4ee62156
DE
6698 * linux-low.c (my_waitpid): Delete unnecessary prototype.
6699
00f515da
DE
67002009-12-18 Doug Evans <dje@google.com>
6701
e9464885
DE
6702 * event-loop.c: Include unistd.h if it exists.
6703
07d4f67e
DE
6704 * linux-low.c (my_waitpid): Move definition away from being in
6705 between linux_tracefork_child/linux_test_for_tracefork.
6706
00f515da
DE
6707 * gdb_proc_service.h (psaddr_t): Fix type.
6708 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
6709 signature to match glibc.
6710
1de1badb
DE
67112009-12-16 Doug Evans <dje@google.com>
6712
6713 * linux-low.c (linux_read_memory): Fix argument to read.
6714
aeeb81d1
PA
67152009-11-26 Pedro Alves <pedro@codesourcery.com>
6716
6717 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
6718 events, don't leave current_inferior pointing at null.
6719
10357975
PA
67202009-11-26 Pedro Alves <pedro@codesourcery.com>
6721
6722 * win32-low.c (LOG): Delete.
6723 (OUTMSG): Output to stderr.
6724 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
6725 on compile time LOG macro.
6726 (win32_wait): Fix debug output.
6727
cf6e3471
PA
67282009-11-26 Pedro Alves <pedro@codesourcery.com>
6729
6730 * win32-low.c (win32_add_one_solib): If the dll name is
6731 "ntdll.dll", prepend the system directory to the dll path.
6732
0c85e18e
MK
67332009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
6734
6735 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
6736
9ac544ce 67372009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 6738 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
6739
6740 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
6741 * configure.ac: Check for __mcoldfire__ and set
6742 gdb_cv_m68k_is_coldfire.
6743 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
6744 reg-cf.o and reg-m68k.o.
6745 * configure: Regenerated.
6746
fd7dd3e6
PA
67472009-11-16 Pedro Alves <pedro@codesourcery.com>
6748
6749 * linux-low.c (linux_remove_process): Add `detaching' parameter.
6750 Pass it to thread_db_free.
6751 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
6752 proper `detaching' argument to linux_remove_process.
6753 * linux-low.h (thread_db_free): Add `detaching' parameter.
6754 * thread-db.c (thread_db_init): Pass false as `detaching' argument
6755 to thread_db_free.
6756 (thread_db_free): Add `detaching' parameter. Only
6757 call td_ta_clear_event if detaching from process.
6758
75aa492e
MK
67592009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
6760
6761 * thread-db.c (thread_db_free): Fix typo.
6762
21e1bee4
PP
67632009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
6764
6765 PR gdb/10838
6766 * thread-db.c (thread_db_free): Call td_ta_clear_event.
6767
8838b45e
NS
67682009-11-03 Nathan Sidwell <nathan@codesourcery.com>
6769
6770 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
6771 with an i686 compiler.
6772 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
6773 needed.
6774 * configure: Rebuilt.
6775
8a35fb51
SL
67762009-10-29 Sandra Loosemore <sandra@codesourcery.com>
6777
6778 PR gdb/10783
6779
6780 * server.c (handle_search_memory_1): Correct read_addr initialization
6781 in loop for searching subsequent chunks.
6782
96f15937
PP
67832009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
6784
6785 * configure.ac: New --with-libthread-db option.
6786 * thread-db.c: Allow direct dependence on libthread_db.
6787 (thread_db_free): Adjust.
6788 * config.in: Regenerate.
6789 * configure: Likewise.
889bf7c5 6790
5f7d1694
PP
67912009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
6792
6793 PR gdb/10757
6794 * thread-db.c (attach_thread): New function.
6795 (maybe_attach_thread): Return success/failure.
6796 (find_new_threads_callback): Adjust.
889bf7c5
PA
6797 (thread_db_find_new_threads): Loop until no new threads.
6798
88e3b899
PA
67992009-10-13 Pedro Alves <pedro@codesourcery.com>
6800
6801 * proc-service.c (ps_lgetregs): Formatting.
6802
cdbfd419
PP
68032009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
6804
6805 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
6806 * configure.ac: Adjust.
6807 * linux-low.h (struct process_info_private): Move members to struct
6808 thread_db.
6809 (thread_db_free, thread_db_handle_monitor_command): New prototype.
6810 * linux-low.c (linux_remove_process): Adjust.
6811 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
6812 * server.c (handle_query): Move code ...
6813 (handle_monitor_command): ... here. New function.
6814 * target.h (struct target_ops): New member.
6815 * thread-db.c (struct thread_db): New.
6816 (libthread_db_search_path): New variable.
6817 (thread_db_create_event, thread_db_enable_reporting)
6818 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
6819 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
6820 (try_thread_db_load_1, dladdr_to_soname): New functions.
6821 (try_thread_db_load, thread_db_load_search): New functions.
6822 (thread_db_init): Search for libthread_db.
6823 (thread_db_free): New function.
6824 (thread_db_handle_monitor_command): Likewise.
6825 * config.in: Regenerate.
6826 * configure: Regenerate.
889bf7c5 6827
4168d2d6
UW
68282009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
6829
6830 * spu-low.c (spu_kill): Wait for inferior to terminate.
6831 Call clear_inferiors.
6832 (spu_detach): Call clear_inferiors.
6833
81ecdfbb
RW
68342009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6835
6836 * aclocal.m4: Regenerate.
6837 * config.in: Likewise.
6838 * configure: Likewise.
6839
0b9ff2c0
UW
68402009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
6841
6842 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
6843 (parse_spufs_run): New function.
6844 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
6845 (ppc_breakpoint_at): Handle SPU breakpoints.
6846
efcbbd14
UW
68472009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
6848
6849 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
6850 (SPUFS_MAGIC): Define.
6851 (spu_enumerate_spu_ids): New function.
6852 (linux_qxfer_spu): New function.
6853 (linux_target_ops): Install linux_qxfer_spu.
6854
f4d9bade
UW
68552009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
6856
6857 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
6858 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
6859 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
6860 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
6861 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
6862 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
6863 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
6864 (init_registers_powerpc_cell32l): Add prototype.
6865 (init_registers_powerpc_cell64l): Likewise.
6866 (ppc_arch_setup): Detect Cell/B.E. architecture.
6867
96e946ca
RW
68682009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6869
6870 * Makefile.in (datarootdir): New variable.
6871
58d6951d
DJ
68722009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
6873
6874 * linux-low.c (linux_write_memory): Update debugging output.
6875 * Makefile.in (clean): Add new descriptions.
6876 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
6877 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
6878 * configure.srv: Add new files for arm*-*-linux*.
6879 * linux-arm-low.c: Add new declarations.
6880 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
6881 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
6882 (HWCAP_VFPv3D16): New.
6883 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
6884 instead of __IWMMXT__.
6885 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
6886 (arm_arch_setup): New.
6887 (target_regsets): Remove #ifdef. Add VFP regset.
6888 (the_low_target): Use arm_arch_setup.
6889
12b42a12
DJ
68902009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
6891
6892 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
6893 the main thread again.
6894
ac8c974e
AR
68952009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
6896
6897 Adding Neutrino gdbserver.
6898 * configure: Regenerated.
6899 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
6900 * configure.srv (i[34567]86-*-nto*): New target.
6901 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
6902 * remote-utils.c [__QNX__]: Include sys/iomgr.h
6903 (nto_comctrl) [__QNX__]: New function.
6904 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
6905
4424e0c3 69062009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
6907
6908 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
6909 srv_tgtobj.
6910
912cf4ba
PA
69112009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
6912 Pedro Alves <pedro@codesourcery.com>
6913
6914 * win32-i386-low.c (i386_get_thread_context): Handle systems that
6915 don't support CONTEXT_EXTENDED_REGISTERS.
6916 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
6917 (the_low_target): Install them.
6918 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
6919 failing with ERROR_PIPE_NOT_CONNECTED.
6920
aa5ca48f
DE
69212009-06-30 Doug Evans <dje@google.com>
6922 Pierre Muller <muller@ics.u-strasbg.fr>
6923
6924 Add h/w watchpoint support to x86-linux, win32-i386.
6925 * Makefile.in (SFILES): Add i386-low.c
6926 (i386_low_h): Define.
6927 (i386-low.o): Add dependencies.
6928 (linux-x86-low.o): Add i386-low.h dependency.
6929 (win32-i386-low.o): Ditto.
6930 * i386-low.c: New file.
6931 * i386-low.h: New file.
6932 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
6933 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
6934 * linux-low.c (linux_add_process): Initialize arch_private.
6935 (linux_remove_process): Free arch_private.
6936 (add_lwp): Initialize arch_private.
6937 (delete_lwp): Free arch_private.
6938 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
6939 provided.
6940 * linux-low.h (process_info_private): New member arch_private.
6941 (lwp_info): New member arch_private.
6942 (linux_target_ops): New members new_process, new_thread,
6943 prepare_to_resume.
6944 (ptid_of): New macro.
6945 * linux-x86-low.c: Include stddef.h, i386-low.h.
6946 (arch_process_info): New struct.
6947 (arch_lwp_info): New struct.
6948 (x86_linux_dr_get, x86_linux_dr_set): New functions.
6949 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
6950 (i386_dr_low_get_status): New function.
6951 (x86_insert_point, x86_remove_point): New functions.
6952 (x86_stopped_by_watchpoint): New function.
6953 (x86_stopped_data_address): New function.
6954 (x86_linux_new_process, x86_linux_new_thread): New functions.
6955 (x86_linux_prepare_to_resume): New function.
6956 (the_low_target): Add entries for insert_point, remove_point,
6957 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
6958 prepare_to_resume.
6959 * server.c (debug_hw_points): New global.
6960 (monitor_show_help): Document set debug-hw-points.
6961 (handle_query): Process "set debug-hw-points".
6962 * server.h (debug_hw_points): Declare.
6963 (paddress): Declare.
6964 * utils.c (NUMCELLS, CELLSIZE): New macros.
6965 (get_sell, xsnprintf, paddress): New functions.
6966 * win32-arm-low.c (the_low_target): Add entries for insert_point,
6967 remove_point, stopped_by_watchpoint, stopped_data_address.
6968 * win32-i386-low.c: Include i386-low.h.
6969 (debug_reg_state): Replaces dr.
6970 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
6971 (i386_dr_low_get_status): New function.
6972 (i386_insert_point, i386_remove_point): New functions.
6973 (i386_stopped_by_watchpoint): New function.
6974 (i386_stopped_data_address): New function.
6975 (i386_initial_stuff): Update.
6976 (get_thread_context,set_thread_context,i386_thread_added): Update.
6977 (the_low_target): Add entries for insert_point,
6978 remove_point, stopped_by_watchpoint, stopped_data_address.
6979 * win32-low.c (win32_insert_watchpoint): New function.
6980 (win32_remove_watchpoint): New function.
6981 (win32_stopped_by_watchpoint): New function.
6982 (win32_stopped_data_address): New function.
6983 (win32_target_ops): Add entries for insert_watchpoint,
6984 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
6985 * win32-low.h (win32_target_ops): New members insert_point,
6986 remove_point, stopped_by_watchpoint, stopped_data_address.
6987
d993e290
PA
69882009-06-25 Pedro Alves <pedro@codesourcery.com>
6989
6990 * server.c (process_serial_event): Re-return unsupported, not
6991 error, if the type isn't recognized. Re-allow supporting only
6992 insert or remove packets. Also call require_running for
6993 breakpoints. Add missing break statement to default case. Tidy.
6994 * target.h (struct target_ops): Rename insert_watchpoint to
6995 insert_point, and remove_watchpoint to remove_point.
6996
6997 * linux-low.h (struct linux_target_ops): Likewise.
6998 * linux-low.c (linux_insert_watchpoint): Rename to ...
6999 (linux_insert_point): ... this. Adjust.
7000 (linux_remove_watchpoint): Rename to ...
7001 (linux_remove_point): ... this. Adjust.
7002 (linux_target_ops): Adjust.
7003 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
7004 (cris_insert_point): ... this.
7005 (cris_remove_watchpoint): Rename to ...
7006 (cris_remove_point): ... this.
7007 (the_low_target): Adjust.
7008
0f54c268
PM
70092009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
7010
7011 * server.c (handle_v_kill): Pass signal_pid to
7012 kill_inferior if multi_process is zero.
7013
c6314022
AR
70142009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
7015
7016 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
7017 * target.h (target_ops): Comment for *_watchpoint to make it clear
7018 the functions can get types '0' and '1'.
7019
4463ce24
AR
70202009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
7021
7022 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
7023 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
7024 * regcache.c (get_regcache): Likewise.
7025 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
7026 * win32-low.c (child_fetch_inferior_registers): Remove check for
7027 regno 0.
7028
cf8fd78b
PA
70292009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
7030 Pedro Alves <pedro@codesourcery.com>
7031
7032 * target.h (struct target_ops) <supports_multi_process>: New
7033 callback.
7034 (target_supports_multi_process): New.
7035 * server.c (handle_query): Even if GDB reports support, only
7036 enable multi-process if the target also supports it. Report
7037 multi-process support only if the target backend supports it.
7038 * linux-low.c (linux_supports_multi_process): New function.
7039 (linux_target_ops): Install it as target_supports_multi_process
7040 callback.
7041
47c0c975
DE
70422009-05-24 Doug Evans <dje@google.com>
7043
e09875d4
DE
7044 Global renaming of find_thread_pid to find_thread_ptid.
7045 * server.h (find_thread_ptid): Renamed from find_thread_pid.
7046 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
7047 All callers updated.
7048
e27d73f6
DE
7049 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
7050 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
7051 directly.
7052
47c0c975
DE
7053 * linux-low.c (get_stop_pc): Print pc if debug_threads.
7054 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
7055 (linux_resume_one_lwp): Ditto.
7056
2acc282a
DE
70572009-05-23 Doug Evans <dje@google.com>
7058
7059 * linux-low.c (linux_resume_one_lwp): Change type of first arg
7060 from struct inferior_list_entry * to struct lwp_info *.
7061 All callers updated.
7062
9f1036c1
DE
70632009-05-13 Doug Evans <dje@google.com>
7064
7065 * linux-x86-low.c: Don't include assert.h.
7066 (x86_siginfo_fixup): Use fatal, not assert.
7067 (x86_arch_setup): Fix comment.
7068
d0722149
DE
70692009-05-12 Doug Evans <dje@google.com>
7070
7071 Biarch support for i386/amd64 gdbserver.
7072 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
7073 Add linux-x86-low.c.
7074 (linux-i386-low.o, linux-x86-64-low.o): Delete.
7075 (linux-x86-low.o): Add.
7076 * linux-x86-64-low.c: Delete.
7077 * linux-i386-low.c: Delete.
7078 * linux-x86-low.c: New file.
7079 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
7080 linux-x86-low.o.
7081 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
7082 linux-x86-low.o.
7083 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
7084 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
7085 (linux_child_pid_to_exec_file): New function.
7086 (elf_64_header_p, elf_64_file_p): New functions.
7087 (siginfo_fixup): New function.
7088 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
7089 give target a chance to convert layout.
7090 * linux-low.h (linux_target_ops): New member siginfo_fixup.
7091 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
7092
fdeb2a12
DE
70932009-05-07 Doug Evans <dje@google.com>
7094
7095 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
7096 (regsets_store_inferior_registers): Ditto.
7097
a6dbe5df
PA
70982009-05-06 Pedro Alves <pedro@codesourcery.com>
7099
7100 PR server/10048
7101
7102 * linux-low.c (must_set_ptrace_flags): Delete.
7103 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
7104 of the global.
7105 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
7106 `lwp->must_set_ptrace_flags' instead.
ba42693b 7107 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
7108 (linux_wait_1): ... not here.
7109
5091eb23
DE
71102009-04-30 Doug Evans <dje@google.com>
7111
9f767825
DE
7112 * inferiors.c (started_inferior_callback): New function.
7113 (attached_inferior_callback): New function.
7114 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
7115 * server.c (print_started_pid, print_attached_pid): New functions.
7116 (detach_or_kill_for_exit): New function.
7117 (main): Call it instead of for_each_inferior (kill_inferior_callback).
7118 * server.h (have_started_inferiors_p): Declare.
7119 (have_attached_inferiors_p): Declare.
7120
5091eb23
DE
7121 * inferiors.c (remove_process): Fix memory leak, free process.
7122 * linux-low.c (linux_remove_process): New function.
7123 (linux_kill): Call it instead of remove_process.
7124 (linux_detach, linux_wait_1): Ditto.
7125
155c8968
PA
71262009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
7127
7128 * configure.srv: Add x86 Windows CE target.
7129
7fe519cb
UW
71302009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7131
7132 * inferiors.c (get_thread_process): Make global.
7133 * server.h (get_thread_process): Add prototype.
7134 * thread-db.c (find_one_thread): Use get_thread_process
7135 instead of current_process.
7136 (thread_db_get_tls_address): Do not crash if called when
7137 thread layer is not yet initialized.
7138
5472f405
UW
71392009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7140
7141 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
7142 * spu-low.c (current_tid): Rename to ...
7143 (current_ptid): ... this.
7144 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
7145 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
7146 ptid_get_lwp (current_ptid) instead of current_tid.
7147 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
7148 instead of current_tid. Use find_process_pid to verify pid
7149 argument is valid. Pass proper argument to remove_process.
7150 (spu_thread_alive): Compare current_ptid instead of current_tid.
7151 (spu_resume): Likewise.
7152
55ac2b99
PA
71532009-04-02 Pedro Alves <pedro@codesourcery.com>
7154
7155 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
7156 variable.
7157
95954743
PA
71582009-04-01 Pedro Alves <pedro@codesourcery.com>
7159
7160 Implement the multiprocess extensions, and add linux multiprocess
7161 support.
7162
7163 * server.h (ULONGEST): Declare.
7164 (struct ptid, ptid_t): New.
7165 (minus_one_ptid, null_ptid): Declare.
7166 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7167 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
7168 (struct inferior_list_entry): Change `id' type from unsigned from
7169 to ptid_t.
7170 (struct sym_cache, struct breakpoint, struct
7171 process_info_private): Forward declare.
7172 (struct process_info): Declare.
7173 (current_process): Declare.
7174 (all_processes): Declare.
7175 (initialize_inferiors): Declare.
7176 (add_thread): Adjust to use ptid_t.
7177 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
7178 (add_process, remove_process, find_thread_pid): Declare.
7179 (find_inferior_id): Adjust to use ptid_t.
7180 (cont_thread, general_thread, step_thread): Change type to ptid_t.
7181 (multi_process): Declare.
7182 (push_event): Adjust to use ptid_t.
7183 (read_ptid, write_ptid): Declare.
7184 (prepare_resume_reply): Adjust to use ptid_t.
7185 (clear_symbol_cache): Declare.
7186 * inferiors.c (all_processes): New.
7187 (null_ptid, minus_one_ptid): New.
7188 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7189 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
7190 (add_thread): Change unsigned long to ptid. Remove gdb_id
7191 parameter. Adjust.
7192 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
7193 (gdb_id_to_thread): Rename to ...
7194 (find_thread_pid): ... this. Change unsigned long to ptid.
7195 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
7196 (loaded_dll, pull_pid_from_list): Adjust.
7197 (add_process, remove_process, find_process_pid)
7198 (get_thread_process, current_process, initialize_inferiors): New.
7199 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
7200 (struct target_waitstatus) <related_pid>: Ditto.
7201 (struct target_ops) <kill, detach>: Add `pid' argument. Change
7202 return type to int.
7203 (struct target_ops) <join>: Add `pid' argument.
7204 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
7205 (struct target_ops) <wait>: Add `ptid' field. Change return type
7206 to ptid.
7207 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
7208 (mywait): Add `ptid' argument. Change return type to ptid_t.
7209 (target_pid_to_str): Declare.
7210 * target.c (set_desired_inferior): Adjust to use ptids.
7211 (mywait): Add new `ptid' argument. Adjust.
7212 (target_pid_to_str): New.
7213 * mem-break.h (free_all_breakpoints): Declare.
7214 * mem-break.c (breakpoints): Delelete.
7215 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
7216 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
7217 to use per-process breakpoint list.
7218 (free_all_breakpoints): New.
7219 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
7220 (symbol_cache, all_symbols_looked_up): Delete.
7221 (hexchars): New.
7222 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
7223 read_ptid): New.
7224 (prepare_resume_reply): Change ptid argument's type from unsigned
7225 long to ptid_t. Adjust. Implement W;process and X;process.
7226 (free_sym_cache, clear_symbol_cache): New.
7227 (look_up_one_symbol): Adjust to per-process symbol cache. *
7228 * server.c (cont_thread, general_thread, step_thread): Change type
7229 to ptid_t.
7230 (attached): Delete.
7231 (multi_process): New.
7232 (last_ptid): Change type to ptid_t.
7233 (struct vstop_notif) <ptid>: Change type to ptid_t.
7234 (queue_stop_reply, push_event): Change `ptid' argument's type to
7235 ptid_t.
7236 (discard_queued_stop_replies): Add `pid' argument.
7237 (start_inferior): Adjust to use ptids. Adjust to mywait interface
7238 changes. Don't reference the `attached' global.
7239 (attach_inferior): Adjust to mywait interface changes.
7240 (handle_query): Adjust to use ptids. Parse GDB's qSupported
7241 features. Handle and report "multiprocess+". Handle
7242 "qAttached:PID".
7243 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
7244 changes.
7245 (handle_v_kill): New.
7246 (handle_v_stopped): Adjust to use target_pid_to_str.
7247 (handle_v_requests): Allow multiple attaches and runs when
7248 multiprocess extensions are in effect. Handle "vKill".
7249 (myresume): Adjust to use ptids.
7250 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
7251 (handle_status): Adjust to discard_queued_stop_replies interface
7252 change.
7253 (first_thread_of, kill_inferior_callback)
7254 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
7255 (main): Call initialize_inferiors. Adjust to use ptids, killing
7256 and detaching from all inferiors. Handle multiprocess packet
7257 variants.
7258 * linux-low.h: Include gdb_proc_service.h.
7259 (struct process_info_private): New.
7260 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
7261 <lwpid_of>: Use ptid_get_lwp.
7262 (get_lwp_thread): Adjust.
7263 (struct lwp_info): Add `dead' member.
7264 (find_lwp_pid): Declare.
7265 * linux-low.c (thread_db_active): Delete.
7266 (new_inferior): Adjust comment.
7267 (inferior_pid): Delete.
7268 (linux_add_process): New.
7269 (handle_extended_wait): Adjust.
7270 (add_lwp): Change unsigned long to ptid.
7271 (linux_create_inferior): Add process to processes table. Adjust
7272 to use ptids. Don't set new_inferior here.
7273 (linux_attach_lwp): Rename to ...
7274 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
7275 it. Adjust to use ptids.
7276 (linux_attach_lwp): New.
7277 (linux_attach): Add process to processes table. Don't set
7278 new_inferior here.
7279 (struct counter): New.
7280 (second_thread_of_pid_p, last_thread_of_process_p): New.
7281 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
7282 multiple processes.
7283 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
7284 processes. Remove process from process table.
7285 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
7286 to multiple processes.
7287 (any_thread_of): New.
7288 (linux_detach): Add `pid' argument, and handle it. Remove process
7289 from processes table.
7290 (linux_join): Add `pid' argument. Handle it.
7291 (linux_thread_alive): Change unsighed long argument to ptid_t.
7292 Consider dead lwps as not being alive.
7293 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
7294 threads we're not interested in.
7295 (same_lwp, find_lwp_pid): New.
7296 (linux_wait_for_lwp): Change `pid' argument's type from int to
7297 ptid_t. Adjust.
7298 (linux_wait_for_event): Rename to ...
7299 (linux_wait_for_event_1): ... this. Change `pid' argument's type
7300 from int to ptid_t. Adjust.
7301 (linux_wait_for_event): New.
7302 (linux_wait_1): Add `ptid' argument. Change return type to
7303 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
7304 that exit from the process table.
7305 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
7306 Adjust.
7307 (mark_lwp_dead): New.
7308 (wait_for_sigstop): Adjust to use ptids. If a process exits while
7309 stopping all threads, mark its main lwp as dead.
7310 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
7311 ptids.
7312 (fetch_register, usr_store_inferior_registers)
7313 (regsets_fetch_inferior_registers)
7314 (regsets_store_inferior_registers, linux_read_memory)
7315 (linux_write_memory): Inline `inferior_pid'.
7316 (linux_look_up_symbols): Adjust to use per-process
7317 `thread_db_active'.
7318 (linux_request_interrupt): Adjust to use ptids.
7319 (linux_read_auxv): Inline `inferior_pid'.
7320 (initialize_low): Don't reference thread_db_active.
7321 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
7322 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
7323 (ps_getpid): Return the pid of the current inferior.
7324 * thread-db.c (proc_handle, thread_agent): Delete.
7325 (thread_db_create_event, thread_db_enable_reporting): Adjust to
7326 per-process data.
7327 (find_one_thread): Change argument type to ptid_t. Adjust to
7328 per-process data.
7329 (maybe_attach_thread): Adjust to per-process data and ptids.
7330 (thread_db_find_new_threads): Ditto.
7331 (thread_db_init): Ditto.
7332 * spu-low.c (spu_create_inferior, spu_attach): Add process to
7333 processes table. Adjust to use ptids.
7334 (spu_kill, spu_detach): Adjust interface. Remove process from
7335 processes table.
7336 (spu_join, spu_thread_alive): Adjust interface.
7337 (spu_wait): Adjust interface. Remove process from processes
7338 table. Adjust to use ptids.
7339 * win32-low.c (current_inferior_tid): Delete.
7340 (current_inferior_ptid): New.
7341 (debug_event_ptid): New.
7342 (thread_rec): Take a ptid. Adjust.
7343 (child_add_thread): Add `pid' argument. Adjust to use ptids.
7344 (child_delete_thread): Ditto.
7345 (do_initial_child_stuff): Add `attached' argument. Add process to
7346 processes table.
7347 (child_fetch_inferior_registers, child_store_inferior_registers):
7348 Adjust.
7349 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
7350 (win32_attach): Pass 1 to do_initial_child_stuff.
7351 (win32_kill): Adjust interface. Remove process from processes
7352 table.
7353 (win32_detach): Ditto.
7354 (win32_join): Adjust interface.
7355 (win32_thread_alive): Take a ptid.
7356 (win32_resume): Adjust to use ptids.
7357 (get_child_debug_event): Ditto.
7358 (win32_wait): Adjust interface. Remove exiting process from
7359 processes table.
7360
bd99dc85
PA
73612009-04-01 Pedro Alves <pedro@codesourcery.com>
7362
7363 Non-stop mode support.
7364
7365 * server.h (non_stop): Declare.
7366 (gdb_client_data, handler_func): Declare.
7367 (delete_file_handler, add_file_handler, start_event_loop):
7368 Declare.
7369 (handle_serial_event, handle_target_event, push_event)
7370 (putpkt_notif): Declare.
7371 * target.h (enum resume_kind): New.
7372 (struct thread_resume): Replace `step' field by `kind' field.
7373 (TARGET_WNOHANG): Define.
7374 (struct target_ops) <wait>: Add `options' argument.
7375 <supports_non_stop, async, start_non_stop>: New fields.
7376 (target_supports_non_stop, target_async): New.
7377 (start_non_stop): Declare.
7378 (mywait): Add `options' argument.
7379 * target.c (mywait): Add `options' argument. Print child exit
7380 notifications here.
7381 (start_non_stop): New.
7382 * server.c (non_stop, own_buf, mem_buf): New globals.
7383 (struct vstop_notif): New.
7384 (notif_queue): New global.
7385 (queue_stop_reply, push_event, discard_queued_stop_replies)
7386 (send_next_stop_reply): New.
7387 (start_inferior): Adjust to use resume_kind. Adjust to mywait
7388 interface changes.
7389 (attach_inferior): In non-stop mode, don't wait for the target
7390 here.
7391 (handle_general_set): Handle QNonStop.
7392 (handle_query): When handling qC, return the current general
7393 thread, instead of the first thread of the list.
7394 (handle_query): If the backend supports non-stop mode, include
7395 QNonStop+ in the qSupported query response.
7396 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
7397 and non-stop mode.
7398 (handle_v_attach, handle_v_run): Handle non-stop mode.
7399 (handle_v_stopped): New.
7400 (handle_v_requests): Report support for vCont;t. Handle vStopped.
7401 (myresume): Adjust to use resume_kind. Handle non-stop.
7402 (queue_stop_reply_callback): New.
7403 (handle_status): Handle non-stop mode.
7404 (main): Clear non_stop flag on reconnection. Use the event-loop.
7405 Refactor serial protocol handling from here ...
7406 (process_serial_event): ... to this new function. When GDB
7407 selects any thread, select one here. In non-stop mode, wait until
7408 GDB acks all pending events before exiting.
7409 (handle_serial_event, handle_target_event): New.
7410 * remote-utils.c (remote_open): Install remote_desc in the event
7411 loop.
7412 (remote_close): Remove remote_desc from the event loop.
7413 (putpkt_binary): Rename to...
7414 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
7415 (putpkt_binary): New as wrapper around putpkt_binary_1.
7416 (putpkt_notif): New.
7417 (prepare_resume_reply): In non-stop mode, don't change the
7418 general_thread.
7419 * event-loop.c: New.
7420 * Makefile.in (OBJ): Add event-loop.o.
7421 (event-loop.o): New rule.
7422
7423 * linux-low.h (pid_of): Moved here.
7424 (lwpid_of): New.
7425 (get_lwp_thread): Use lwpid_of.
7426 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
7427 * linux-low.c (pid_of): Delete.
7428 (inferior_pid): Use lwpid_of.
7429 (linux_event_pipe): New.
7430 (target_is_async_p): New.
7431 (delete_lwp): New.
7432 (handle_extended_wait): Use lwpid_of.
7433 (add_lwp): Don't set lwpid field.
7434 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
7435 (linux_kill_one_lwp): If killing a running lwp, stop it first.
7436 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
7437 (linux_detach_one_lwp): If detaching from a running lwp, stop it
7438 first. Adjust to linux_wait_for_event interface changes. Use
7439 lwpid_of.
7440 (linux_detach): Don't delete the main lwp here.
7441 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
7442 (status_pending_p): Don't consider explicitly suspended lwps.
7443 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
7444 pointer. Add OPTIONS argument. Change return type to int. Use
7445 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
7446 (linux_wait_for_event): Take an integer pid instead of a lwp_info
7447 pointer. Add status pointer argument. Return a pid instead of a
7448 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
7449 changes. In non-stop mode, don't switch to a random thread.
7450 (linux_wait): Rename to...
7451 (linux_wait_1): ... this. Add target_options argument, and handle
7452 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
7453 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
7454 clean exit and signal exit code. Don't stop all threads in
7455 non-stop mode. In all-stop mode, only stop all threads when
7456 reporting a stop to GDB. Handle explicit thread stop requests.
7457 (async_file_flush, async_file_mark): New.
7458 (linux_wait): New.
7459 (send_sigstop): Use lwpid_of.
7460 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
7461 interface changes. In non-stop mode, don't switch to a random
7462 thread.
7463 (linux_resume_one_lwp): Use lwpid_of.
7464 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
7465 (linux_resume_one_thread): ... this. Handle resume_stop. In
7466 non-stop mode, don't look for pending flag in all threads.
7467 (resume_status_pending_p): Don't consider explicitly suspended
7468 threads.
7469 (my_waitpid): Reimplement. Emulate __WALL.
7470 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
7471 Use lwpid_of.
7472 (sigchld_handler, linux_supports_non_stop, linux_async)
7473 (linux_start_non_stop): New.
7474 (linux_target_ops): Register linux_supports_non_stop, linux_async
7475 and linux_start_non_stop.
7476 (initialize_low): Install SIGCHLD handler.
7477 * thread-db.c (thread_db_create_event, find_one_thread)
7478 (thread_db_get_tls_address): Use lwpid_of.
7479 * win32-low.c (win32_detach): Adjust to use resume_kind.
7480 (win32_wait): Add `options' argument.
7481 * spu-low.c (spu_resume): Adjust to use resume_kind.
7482 (spu_wait): Add `options' argument.
7483
5b1c542e
PA
74842009-04-01 Pedro Alves <pedro@codesourcery.com>
7485
7486 Decouple target code from remote protocol.
7487
7488 * target.h (enum target_waitkind): New.
7489 (struct target_waitstatus): New.
7490 (struct target_ops) <wait>: Return an unsigned long. Take a
7491 target_waitstatus pointer instead of a char pointer.
7492 (mywait): Likewise.
7493 * target.c (mywait): Change prototype to return an unsigned long.
7494 Take a target_waitstatus pointer instead of a char pointer. Adjust.
7495 * server.h (thread_from_wait, old_thread_from_wait): Delete
7496 declarations.
7497 (prepare_resume_reply): Change prototype to take a
7498 target_waitstatus.
7499 * server.c (thread_from_wait, old_thread_from_wait): Delete.
7500 (last_status, last_ptid): New.
7501 (start_inferior): Remove "statusptr" argument. Adjust. Return a
7502 pid instead of a signal.
7503 (attach_inferior): Remove "status" and "signal" parameters.
7504 Adjust.
7505 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
7506 not as an address.
7507 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
7508 (handle_v_requests, myresume): Remove "status" and "signal"
7509 parameters. Adjust.
7510 (handle_status): New.
7511 (main): Delete local `status'. Adjust.
7512 * remote-utils.c: Include target.h.
7513 (prepare_resume_reply): Change prototype to take a
7514 target_waitstatus. Adjust.
7515
7516 * linux-low.c (linux_wait): Adjust to new target_ops->wait
7517 interface.
7518 * spu-low.c (spu_wait): Adjust.
7519 * win32-low.c (enum target_waitkind, struct target_waitstatus):
7520 Delete.
7521 (win32_wait): Adjust.
7522
2bd7c093
PA
75232009-04-01 Pedro Alves <pedro@codesourcery.com>
7524
7525 * target.h (struct thread_resume): Delete leave_stopped member.
7526 (struct target_ops): Add a `n' argument to the `resume' callback.
7527 * server.c (start_inferior): Adjust.
7528 (handle_v_cont, myresume): Adjust.
7529 * linux-low.c (check_removed_breakpoint): Adjust to resume
7530 interface change, and to removed leave_stopped field.
7531 (resume_ptr): Delete.
7532 (struct thread_resume_array): New.
7533 (linux_set_resume_request): Add new `arg' parameter. Adjust to
7534 resume interface change.
7535 (linux_continue_one_thread, linux_queue_one_thread)
7536 (resume_status_pending_p): Check if the resume field is NULL
7537 instead of checking the leave_stopped member.
7538 (linux_resume): Adjust to the target resume interface change.
7539 * spu-low.c (spu_resume): Adjust to the target resume interface
7540 change.
7541 * win32-low.c (win32_detach, win32_resume): Ditto.
7542
c35fafde
PA
75432009-04-01 Pedro Alves <pedro@codesourcery.com>
7544
7545 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
7546 flag.
7547 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
7548 pending.
7549 (linux_continue_one_thread): Only preserve the stepping flag if
7550 there's a pending breakpoint.
7551
0a59d50b
PA
75522009-03-31 Pedro Alves <pedro@codesourcery.com>
7553
7554 * server.c (main): After the inferior having exited, call
7555 remote_close before exiting gdbserver.
7556
f04c6d38
TJB
75572009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
7558
7559 Fix size of FPSCR in Power 7 processors.
7560 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
7561 (PPC_FEATURE_HAS_DFP): New #define.
7562 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
7563 size of the FPSCR.
7564
78e5cee6
PA
75652009-03-23 Pedro Alves <pedro@codesourcery.com>
7566
7567 * server.c (handle_query) Whitespace and formatting.
7568
1b3f6016
PA
75692009-03-22 Pedro Alves <pedro@codesourcery.com>
7570
7571 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
7572 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
7573 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
7574 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
7575 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
7576 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
7577 Makefile.in, configure.ac: Fix whitespace throughout.
7578 * configure: Regenerate.
7579
a07b2135
PA
75802009-03-22 Pedro Alves <pedro@codesourcery.com>
7581
7582 * inferiors.c (find_inferior): Make it safe for the callback
7583 function to delete the currently iterated inferior.
7584
67cc2626
PA
75852009-03-22 Pedro Alves <pedro@codesourcery.com>
7586
7587 * Makefile.in (linuw_low_h): Move higher.
7588 (thread-db.o): Depend on $(linux_low_h).
7589
54a0b537
PA
75902009-03-17 Pedro Alves <pedro@codesourcery.com>
7591
7592 Rename "process" to "lwp" throughout.
7593
7594 * linux-low.c (all_processes): Rename to...
7595 (all_lwps): ... this.
7596 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
7597 (add_process): Rename to ...
7598 (add_lwp): ... this. Adjust.
7599 (linux_create_inferior): Adjust.
7600 (linux_attach_lwp): Adjust.
7601 (linux_attach): Adjust.
7602 (linux_kill_one_process): Rename to ...
7603 (linux_kill_one_lwp): ... this. Adjust.
7604 (linux_kill): Adjust.
7605 (linux_detach_one_process): Rename to ...
7606 (linux_detach_one_lwp): ... this. Adjust.
7607 (linux_detach): Adjust.
7608 (check_removed_breakpoint): Adjust.
7609 (status_pending_p): Adjust.
7610 (linux_wait_for_process): Rename to ...
7611 (linux_wait_for_lwp): ... this. Adjust.
7612 (linux_wait_for_event): Adjust.
7613 (send_sigstop): Adjust.
7614 (wait_for_sigstop): Adjust.
7615 (stop_all_processes): Rename to ...
7616 (stop_all_lwps): ... this.
7617 (linux_resume_one_process): Rename to ...
7618 (linux_resume_one_lwp): ... this. Adjust.
7619 (linux_set_resume_request, linux_continue_one_thread)
7620 (linux_queue_one_thread, resume_status_pending_p)
7621 (usr_store_inferior_registers, regsets_store_inferior_registers)
7622 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
7623 Adjust.
7624 * linux-low.h (get_process): Rename to ...
7625 (get_lwp): ... this. Adjust.
7626 (get_thread_process): Rename to ...
7627 (get_thread_lwp): ... this. Adjust.
7628 (get_process_thread): Rename to ...
7629 (get_lwp_thread): ... this. Adjust.
7630 (struct process_info): Rename to ...
7631 (struct lwp_info): ... this.
7632 (all_processes): Rename to ...
7633 (all_lwps): ... this.
7634 * proc-service.c (ps_lgetregs): Adjust.
7635 * thread-db.c (thread_db_create_event, find_one_thread)
7636 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
7637
0b16c5cf
PA
76382009-03-14 Pedro Alves <pedro@codesourcery.com>
7639
7640 * server.c (handle_query): Handle "qAttached".
7641
32de4b9d
NS
76422009-03-13 Nathan Sidwell <nathan@codesourcery.com>
7643
7644 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
7645 GPLv3, update license URL.
7646
2aecd87f
DE
76472009-03-01 Doug Evans <dje@google.com>
7648
93efd302 7649 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
7650 (server_h): Add gdb_signals.h.
7651 (signals.o): Update.
7652 * server.h (target_signal_from_host,target_signal_to_host_p)
7653 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
7654
86b1f9c5
PM
76552009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
7656
7657 * remote-utils.c (getpkt): Also generate remote-debug
7658 information if noack_mode is set.
7659
4aa995e1
PA
76602009-02-06 Pedro Alves <pedro@codesourcery.com>
7661
7662 * server.c (handle_query): Report qXfer:siginfo:read and
7663 qXfer:siginfo:write as supported and handle them.
7664 * target.h (struct target_ops) <qxfer_siginfo>: New field.
7665 * linux-low.c (linux_xfer_siginfo): New.
7666 (linux_target_ops): Set it.
7667
62709adf
PA
76682009-01-26 Pedro Alves <pedro@codesourcery.com>
7669
7670 * server.c (gdbserver_usage): Mention --remote-debug.
7671 (main): Accept '--remote-debug' switch.
7672
aef93bd7
DE
76732009-01-18 Doug Evans <dje@google.com>
7674
7675 * regcache.c (new_register_cache): No need to check result of xcalloc.
7676 * server.c (handle_search_memory): Back out calls to xmalloc,
7677 result is checked and error is returned to user upon failure.
7678 (handle_query): Ditto. Add more checks for result of malloc.
7679 (handle_v_cont): Check result of malloc, report error back to
7680 user upon failure.
7681 (handle_v_run): Ditto. Call freeargv.
7682 * server.h (freeargv): Declare.
7683 * utils.c (freeargv): New fn.
7684
54363045
DE
76852009-01-15 Doug Evans <dje@google.com>
7686
f626972c
DE
7687 * gdbreplay.c (perror_with_name): Make arg const char *.
7688 * server.h (target_signal_to_name): Make return type const char *.
0842e787 7689 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 7690 * utils.c (perror_with_name): Make arg const char *.
54363045 7691
18aae699
PA
76922009-01-14 Pedro Alves <pedro@codesourcery.com>
7693
7694 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
7695 when handling a EXIT_PROCESS_DEBUG_EVENT.
7696
ff703abe
JB
76972009-01-06 Joel Brobecker <brobecker@adacore.com>
7698
7699 * gdbreplay.c (gdbreplay_version): Update copyright year.
7700 * server.c (gdbserver_version): Likewise.
7701
f21cc1a2 77022009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
7703
7704 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 7705 (handle_extended_wait): Improve comment.
0e21c1ec 7706
bca929d3
DE
77072008-12-13 Doug Evans <dje@google.com>
7708
7709 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
7710 * server.h (ATTR_MALLOC): New macro.
7711 (xmalloc,xcalloc,xstrdup): Declare.
7712 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
7713 * inferiors.c: Ditto.
7714 * linux-low.c: Ditto.
7715 * mem-break.c: Ditto.
7716 * regcache.c: Ditto.
7717 * remote-utils.c: Ditto.
7718 * server.c: Ditto.
7719 * target.c: Ditto.
7720 * win32-low.c: Ditto.
7721
97438e3f
DE
77222008-12-12 Doug Evans <dje@google.com>
7723
896c7fbb
DE
7724 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
7725 in debugging printf.
7726
97438e3f
DE
7727 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
7728
e3b886f8
DE
77292008-12-09 Doug Evans <dje@google.com>
7730
7731 * linux-low.h (struct process_info): Delete member tid, unused.
7732 * thread-db.c (find_one_thread): Update.
7733 (maybe_attach_thread): Update.
7734
07e059b5
VP
77352008-12-02 Pedro Alves <pedro@codesourcery.com>
7736
889bf7c5
PA
7737 * target.h (struct target_ops): Add qxfer_osdata member.
7738 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
7739 and dirent.h.
7740 (linux_qxfer_osdata): New functions.
7741 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
7742 callback.
7743 * server.c (handle_query): Handle "qXfer:osdata:read:".
7744 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
7745 (buffer_xml_printf): New functions.
7746 * server.h (struct buffer): New.
7747 (buffer_grow_str, buffer_grow_str0): New macros.
7748 (buffer_grow, buffer_free, buffer_init, buffer_finish)
7749 (buffer_xml_printf): Declare.
07e059b5 7750
4cab47ab
DE
77512008-11-24 Doug Evans <dje@google.com>
7752
7753 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
7754
f142445f
DJ
77552008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
7756
7757 * server.c (handle_v_run): Always use the supplied argument list.
7758
d0107bb6 77592008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 7760
d0107bb6
BW
7761 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
7762 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 7763
2c4ad781
TJB
77642008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
7765
7766 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
7767 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
7768 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
7769 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
7770 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
7771 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
7772 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
7773 XML target descriptions.
7774 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
7775 when inferior is running on an ISA 2.05 or later processor. Add
7776 special case to return offset for full 64-bit slot of FPSCR when
7777 in 32-bits.
7778
dfb64f85
DJ
77792008-11-14 Daniel Gutson <dgutson@codesourcery.com>
7780
7781 * Makefile.in (SFILES, clean): Added sparc64 files.
7782 (reg-sparc64.o, reg-sparc64.c): New.
7783 * configure.srv (sparc*-*-linux*): New configuration.
7784 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
7785 syscall arguments for SPARC.
7786 (regsets_store_inferior_registers): Likewise.
7787 * linux-sparc-low.c: New file.
7788
66b6e1dd
DE
77892008-10-21 Doug Evans <dje@google.com>
7790
7791 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
7792 (READLINE_DIR,READLINE_DEP): Delete.
7793 (INTERNAL_CFLAGS): Update.
7794 (LINTFLAGS): Update.
7795
9b710a42
PA
77962008-10-10 Pedro Alves <pedro@codesourcery.com>
7797
7798 * server.c (handle_v_run): If GDB didn't specify an argv, use the
7799 whole argv from the last run, not just argv[0].
7800
5822d809
PA
78012008-09-08 Pedro Alves <pedro@codesourcery.com>
7802
7803 * regcache.c (new_register_cache): Return NULL if the register
7804 cache size isn't known yet.
7805 (free_register_cache): Avoid dereferencing a NULL regcache.
7806
74aac56f
DJ
78072008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
7808
7809 * configure.srv: Merge MIPS and MIPS64.
7810
400b20f5
MR
78112008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
7812
7813 * Makefile.in (uninstall): Apply $(EXEEXT) too.
7814
677c5bb1
LM
78152008-08-18 Luis Machado <luisgpm@br.ibm.com>
7816
7817 * Makefile.in: Add required vsx dependencies.
7818
7819 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
7820 Declare init_registers_powerpc_vsx32l.
7821 Declare init_registers_powerpc_vsx64l.
7822 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
7823 (ppc_arch_setup): Check for VSX in hwcap.
7824 (ppc_fill_vsxregset): New function.
7825 (ppc_store_vsxregset): New function.
7826 Add new VSX entry in regset_info target_regsets.
7827
7828 * configure.srv: Add new VSX dependencies.
7829
a6f3e723
SL
78302008-08-12 Pedro Alves <pedro@codesourcery.com>
7831
7832 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
7833 (remote_open): Set or clear transport_is_reliable.
7834 (putpkt_binary): Don't expect acks in noack mode.
7835 (getpkt): Don't send ack/nac in noack mode.
7836 * server.c (handle_general_set): Handle QStartNoAckMode.
7837 (handle_query): If connected by tcp pass QStartNoAckMode+ in
7838 qSupported.
7839 (main): Reset noack_mode on every connection.
7840 * server.h (noack_mode): Declare.
7841
a417dc56
RW
78422008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7843
7844 * Makefile.in (GDBREPLAY_OBS): New variable.
7845 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
7846
3221518c
UW
78472008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
7848 Daniel Jacobowitz <dan@codesourcery.com>
7849
7850 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
7851 (usr_store_inferior_registers): Likewise.
7852 (regsets_store_inferior_registers): Likewise.
7853
ec56be1b
PA
78542008-07-31 Rolf Jansen <rj@surtec.com>
7855 Pedro Alves <pedro@codesourcery.com>
7856
7857 * configure.ac: Check for memmem declaration.
7858 * server.c [HAVE_MALLOC_H]: Include malloc.h.
7859 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
7860 (disable_packet_qfThreadInfo): Unconditionally compile.
7861 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
7862 * configure, config.in: Regenerate.
7863
2fe5e3ff
DE
78642008-07-28 Doug Kwan <dougkwan@google.com>
7865
7866 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
7867 (linux_write_memory): Remove declaration of errno.
7868
836acd6d
UW
78692008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
7870
7871 * linux-low.c (handle_extended_wait): Do not use "status"
7872 variable uninitialized.
7873
aeba519e
PA
78742008-07-07 Pedro Alves <pedro@codesourcery.com>
7875
7876 * server.c (handle_v_attach): Inhibit reporting dll changes.
7877
db42f210
PA
78782008-06-27 Pedro Alves <pedro@codesourcery.com>
7879
7880 * remote-utils.c (prepare_resume_reply): If requested, don't
7881 output "thread:TID" in the T stop reply.
7882
7883 * server.c (disable_packet_vCont, disable_packet_Tthread)
7884 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
7885 (handle_query): If requested, disable support for qC, qfThreadInfo
7886 and qsThreadInfo.
7887 (handle_v_requests): If requested, disable support for vCont.
7888 (gdbserver_show_disableable): New.
7889 (main): Handle --disable-packet and --disable-packet=LIST.
7890
7891 * server.h (disable_packet_vCont, disable_packet_Tthread)
7892 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
7893
8e4c5421
CD
78942008-06-20 Carlos O'Donell <carlos@codesourcery.com>
7895
7896 * server.c (gdbserver_usage): Mention --version.
7897
6e23a804
DJ
78982008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
7899
7900 * Makefile.in (gdbreplay.o): New rule.
7901
90aa6a40
JM
79022008-06-06 Joseph Myers <joseph@codesourcery.com>
7903
7904 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
7905 message, not gdbserver.
7906
c16158bc 79072008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
7908 Nathan Sidwell <nathan@codesourcery.com>
7909 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
7910
7911 * acinclude.m4: Include ../../config/acx.m4.
7912 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
7913 * configure, config.in: Regenerate.
7914 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
7915 * server.c (gdbserver_version): Print PKGVERSION.
7916 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
7917 (main): Adjust gdbserver_usage calls.
7918 * gdbreplay.c (version, host_name): Add declarations.
7919 (gdbreplay_version, gdbreplay_usage): New.
7920 (main): Accept --version and --help options.
7921
aeb75bf5
DJ
79222008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
7923
7924 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
7925 (arm_breakpoint_at): Handle Thumb.
7926 (the_low_target): Add comment.
7927
76b233dd
UW
79282008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
7929
7930 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
7931
08388c79
DE
79322008-05-09 Doug Evans <dje@google.com>
7933
a3c83fae
DE
7934 * server.h (decode_search_memory_packet): Declare.
7935 * remote-utils.c (decode_search_memory_packet): New fn.
7936 * server.c (handle_search_memory_1): New fn.
08388c79
DE
7937 (handle_search_memory): New fn.
7938 (handle_query): Process qSearch:memory packets.
7939
bb9c3d36
UW
79402008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
7941
7942 * regcache.c (registers_length): Remove.
7943 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
7944 full register packet.
7945 * regcache.h (registers_length): Remove prototype.
7946 * server.h (PBUFSIZ): Define to 16384.
7947
7284e1be
UW
79482008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
7949
7950 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
7951 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
7952 powerpc-64l.o, and powerpc-altivec64l.o.
7953 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
7954 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
7955 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
7956 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
7957 rs6000/power-linux.xml, and rs6000/power64-linux.xml
7958 to srv_xmlfiles.
7959
7960 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
7961 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
7962 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
7963 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
7964 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
7965 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
7966 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
7967 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
7968 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
7969 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
7970 (clean): Update.
7971
7972 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
7973 (init_registers_powerpc_32l): ... this new prototype.
7974 (init_registers_powerpc_32): Remove, replace by ...
7975 (init_registers_powerpc_altivec32l): ... this new prototype.
7976 (init_registers_powerpc_e500): Remove, replace by ...
7977 (init_registers_powerpc_e500l): ... this new prototype.
7978 (init_registers_ppc64): Remove, replace by ...
7979 (init_registers_powerpc_64l): ... this new prototype.
7980 (init_registers_powerpc_64): Remove, replace by ...
7981 (init_registers_powerpc_altivec64l): ... this new prototype.
7982 (ppc_num_regs): Set to 73.
7983 (PT_ORIG_R3, PT_TRAP): Define if necessary.
7984 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
7985 (ppc_cannot_store_register): Handle orig_r3 and trap.
7986 (ppc_arch_setup): Update init_registers_... calls.
7987 (ppc_fill_gregset): Handle orig_r3 and trap.
7988
7989 * inferiors.c (clear_inferiors): Reset current_inferior.
7990
fdc59709
PB
79912008-04-23 Paolo Bonzini <bonzini@gnu.org>
7992
889bf7c5
PA
7993 * acinclude.m4: Add override.m4.
7994 * configure: Regenerate.
fdc59709 7995
c9b2f845
UW
79962008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
7997
7998 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
7999 initial call to init_register_ppc64.
8000
550512b8
UW
80012008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8002
43aaf8b6
PA
8003 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
8004 single powerpc*-*-linux* case.
550512b8
UW
8005 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
8006
b6430ec3
UW
80072008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
8008
8009 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 8010 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
8011 from reg_xmlfiles.
8012 * linux-ppc-low.c: Include <elf.h>.
8013 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
8014 (ppc_hwcap): New global variable.
8015 (ppc_regmap): Remove __SPE__ #ifdef sections.
8016 (ppc_regmap_e500): New global variable.
8017 (ppc_cannot_store_register): Update __SPE__ special case.
8018 (ppc_get_hwcap): New function.
8019 (ppc_arch_setup): Use it to determine whether inferior supports
8020 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
8021 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
8022 Do not access registers if target does not support AltiVec.
8023 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
8024 Do not access registers if target does not support SPE.
8025 (target_regsets): Unconditionally include AltiVec and SPE regsets.
8026
52fa2412
UW
80272008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
8028
8029 * linux-low.c (disabled_regsets, num_regsets): New.
8030 (use_regsets_p): Delete.
8031 (linux_wait_for_process): Clear disabled_regsets.
8032 (regsets_fetch_inferior_registers): Check and set it.
8033 (regsets_store_inferior_registers): Likewise.
8034 (linux_fetch_registers, linux_store_registers): Do not use
8035 use_regsets_p.
8036 (initialize_low): Allocate disabled_regsets.
8037
e28b3332
DJ
80382008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
8039
8040 * Makefile.in (LIBOBJS): New.
8041 (OBS): Use LIBOBJS.
8042 (memmem.o): New rule.
8043 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
8044 * configure: Regenerated.
8045
4536995d
UW
80462008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
8047
8048 * server.c (handle_query): Never return "unsupported" for
8049 qXfer:features:read queries.
8050
221c031f
UW
80512008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
8052
8053 * server.c (get_features_xml): Fix inverted condition.
8054 (handle_query): Always support qXfer:feature:read.
8055
ccd213ac
DJ
80562008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
8057
8058 * server.c (wrapper_argv): New.
8059 (start_inferior): Handle wrapper_argv. If set, expect an extra
8060 trap.
8061 (gdbserver_usage): Document --wrapper.
8062 (main): Parse --wrapper.
8063
6fe305f7
UW
80642008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8065
8066 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
8067 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
8068 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
8069 (ppc_set_pc): Likewise.
8070 (ppc_arch_setup): New function.
8071 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
8072 of collect_register.
889bf7c5 8073 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 8074
5b0a002e
UW
80752008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8076
8077 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
8078 instead of linux-ppc64-low.o.
8079 * linux-ppc64-low.c: Remove file.
8080 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
8081 (linux-ppc64-low.o): Remove rule.
8082
8083 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
8084 (init_registers_powerpc_64): Likewise.
8085 (ppc_regmap): Conditionally define depending on __powerpc64__.
8086 (ppc_cannot_store_register): Do not special-case "fpscr" when
8087 compiled on __powerpc64__.
8088 (ppc_collect_ptrace_register): New function.
8089 (ppc_supply_ptrace_register): New function.
8090 (ppc_breakpoint): Change type to "unsigned int".
8091 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
8092 (the_low_target): Conditionally provide initializers for the
889bf7c5 8093 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
8094 collect_ptrace_register and supply_ptrace_register members.
8095
9b4b61c8
UW
80962008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8097
8098 * regcache.h (gdbserver_xmltarget): Add extern declaration.
8099 * server.c (gdbserver_xmltarget): Define.
8100 (get_features_xml): Use it to replace "target.xml" and arch_string.
8101
8102 * configure.srv: Remove srv_xmltarget. Add XML files that were
8103 mentioned there to srv_xmlfiles instead. Remove conditional tests
8104 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
8105 srv_xmlfiles and srv_regobj to include all possible choices.
8106 * configure.ac (srv_xmltarget): Remove.
8107 (srv_xmlfiles): Do not add "target.xml".
8108 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
8109 checks for supplementary target information.
8110 * configure: Regenerate.
8111 * Makefile.in (XML_TARGET): Remove.
8112 (target.xml): Remove rule.
8113 (clean): Do not clean up target.xml.
8114 (.PRECIOUS): Do not mention target.xml.
8115
8116 * target.h (struct target_ops): Remove arch_string member.
8117 * linux-low.c (linux_arch_string): Remove.
8118 (linux_target_ops): Remove arch_string initializer.
8119 * linux-low.h (struct linux_target_ops): Remove arch_string member.
8120 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
8121 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
8122 * spu-low.c (spu_arch_string): Remove.
8123 (spu_target_ops): Remove arch_string initializer.
8124 * win32-low.c (win32_arch_string): Remove.
8125 (win32_target_ops): Remove arch_string initializer.
8126 * win32-low.h (struct win32_target_ops): Remove arch_string member.
8127 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
8128 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
8129
ee1a7ae4
UW
81302008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8131
8132 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
8133 by collect_ptrace_register and supply_ptrace_register hooks.
8134 * linux-low.c (fetch_register): Use supply_ptrace_register callback
8135 instead of checking for the_low_target.left_pad_xfer.
8136 (usr_store_inferior_registers): Use collect_ptrace_register callback
8137 instead of checking for the_low_target.left_pad_xfer.
8138
8139 * linux-s390-low.c (s390_collect_ptrace_register): New function.
8140 (s390_supply_ptrace_register): Likewise.
8141 (s390_fill_gregset): Call s390_collect_ptrace_register.
8142 (the_low_target): Update.
8143
8144 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
8145 (ppc_supply_ptrace_register): Likewise.
8146 (the_low_target): Update.
8147
8148 * linux-i386-low.c (the_low_target): Update.
8149 * linux-x86-64-low.c (the_low_target): Update.
8150
d61ddec4
UW
81512008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8152
8153 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
8154 reg-s390.o and reg-s390x.o.
8155
8156 * linux-low.c (new_inferior): New global variable.
8157 (linux_create_inferior, linux_attach): Set it.
8158 (linux_wait_for_process): Call the_low_target.arch_setup after the
8159 target has stopped for the first time.
8160 (initialize_low): Do not call the_low_target.arch_setup.
8161
8162 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
8163 (s390_set_pc): Likewise.
8164 (s390_arch_setup): New function.
8165 (the_low_target): Use s390_arch_setup as arch_setup routine.
8166
8167 * regcache.c (realloc_register_cache): New function.
8168 (set_register_cache): Call it for each existing regcache.
8169
d05b4ac3
UW
81702008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8171
8172 * server.h (init_registers): Remove prototype.
8173
8174 * linux-low.h (struct linux_target_ops): Add arch_setup field.
8175 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
8176 instead of init_registers ().
8177 * linux-arm-low.c (init_registers_arm): Add prototype.
8178 (init_registers_arm_with_iwmmxt): Likewise.
8179 (the_low_target): Add initializer for arch_setup field.
8180 * linux-cris-low.c (init_registers_cris): Add prototype.
8181 (the_low_target): Add initializer for arch_setup field.
8182 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
8183 (the_low_target): Add initializer for arch_setup field.
8184 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
8185 (the_low_target): Add initializer for arch_setup field.
8186 * linux-ia64-low.c (init_registers_ia64): Add prototype.
8187 (the_low_target): Add initializer for arch_setup field.
8188 * linux-m32r-low.c (init_registers_m32r): Add prototype.
8189 (the_low_target): Add initializer for arch_setup field.
8190 * linux-m68k-low.c (init_registers_m68k): Add prototype.
8191 (the_low_target): Add initializer for arch_setup field.
8192 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
8193 (init_registers_mips64_linux): Likewise.
8194 (the_low_target): Add initializer for arch_setup field.
8195 * linux-ppc-low.c (init_registers_ppc): Add prototype.
8196 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
8197 (the_low_target): Add initializer for arch_setup field.
8198 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
8199 (init_registers_powerpc_64): Likewise.
8200 (the_low_target): Add initializer for arch_setup field.
8201 * linux-s390-low.c (init_registers_s390): Add prototype.
8202 (init_registers_s390x): Likewise.
8203 (the_low_target): Add initializer for arch_setup field.
8204 * linux-sh-low.c (init_registers_sh): Add prototype.
8205 (the_low_target): Add initializer for arch_setup field.
8206 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
8207 (the_low_target): Add initializer for arch_setup field.
8208 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
8209 (the_low_target): Add initializer for arch_setup field.
8210
8211 * win32-low.h (struct win32_target_ops): Add arch_setup field.
8212 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
8213 instead of init_registers ().
8214 * win32-arm-low.c (init_registers_arm): Add prototype.
8215 (the_low_target): Add initializer for arch_setup field.
8216 * win32-i386-low.c (init_registers_i386): Add prototype.
8217 (the_low_target): Add initializer for arch_setup field.
8218
8219 * spu-low.c (init_registers_spu): Add prototype.
8220 (initialize_low): Call initialie_registers_spu () instead of
8221 initialize_registers ().
8222
fd96d250
PA
82232008-02-19 Pedro Alves <pedro@codesourcery.com>
8224
8225 * server.c (handle_v_requests): When handling the vRun and vAttach
8226 packets, if already debugging a process, don't kill it. Return an
8227 error instead.
8228
d41b6bb4
DJ
82292008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
8230
8231 * server.c (handle_query): Correct length check.
8232
5ac588cf
PA
82332008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
8234
8235 * win32-low.c (do_initial_child_stuff): Add process handle
8236 parameter. Set current_process_handle and current_process_id from the
8237 parameters. Clear globals.
8238 (win32_create_inferior): Don't set current_process_handle and
8239 current_process_id here. Instead pass them on the call to
8240 do_initial_child_stuff.
8241 (win32_attach): Likewise.
8242 (win32_clear_inferiors): New.
8243 (win32_kill): Don't close the current process handle or the
8244 current thread handle here. Instead call win32_clear_inferiors.
8245 (win32_detach): Don't open a new handle to the process. Call
8246 win32_clear_inferiors.
8247 (win32_join): Don't rely on current_process_handle; open a new
8248 handle using the process id.
8249 (win32_wait): Call win32_clear_inferiors when the inferior process
8250 has exited.
8251
ecd7ecbc
DJ
82522008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
8253
8254 * server.c (monitor_show_help): Add "exit".
8255
1525d545
MG
82562008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
8257
ecd7ecbc 8258 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
8259 (clean): Add reg-xtensa.c.
8260 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
8261 * configure.srv (xtensa*-*-linux*) New target.
8262 * linux-xtensa-low.c: New.
8263 * xtensa-xtregs.c: New.
1525d545 8264
59a016f0
PA
82652008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
8266
8267 * hostio.c: Don't include errno.h.
8268 (errno_to_fileio_errno): Move to hostio-errno.
8269 * hostio.c: (hostio_error): Remove the error parameter. Defer the
8270 error number outputting to the target->hostio_last_error callback.
8271 (hostio_packet_error): Use FILEIO_EINVAL directly.
8272 (handle_open, handle_pread, hostio_error, handle_unlink): Update
8273 calls to hostio_error.
8274 * hostio-errno.c: New.
8275 * server.h (hostio_last_error_from_errno): Declare.
8276 * target.h (target_ops): Add hostio_last_error member.
8277 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
8278 as hostio_last_error handler.
889bf7c5 8279 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
8280 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
8281 (wince_hostio_last_error): New functions.
8282 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
8283 as hostio_last_error handler.
8284 (win32_target_ops) [!_WIN32_WCE]: Register
8285 hostio_last_error_from_errno as hostio_last_error handler.
8286 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
8287 (hostio-errno.o): New rule.
8288 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
8289 * configure.srv (srv_hostio_err_objs): New variable. Default to
8290 hostio-errno.o.
8291 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
8292 * configure: Regenerate.
8293
2d717e4f
DJ
82942008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8295
8296 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
8297 (linux_kill, linux_detach): Clean up the process list.
8298 * remote-utils.c (remote_open): Improve port number parsing.
8299 (putpkt_binary, input_interrupt): Only send interrupts if the target
8300 is running.
8301 * server.c (extended_protocol): Make static.
8302 (attached): Define earlier.
8303 (exit_requested, response_needed, program_argv): New variables.
8304 (target_running): New.
8305 (start_inferior): Clear attached here.
8306 (attach_inferior): Set attached here.
8307 (require_running): Define.
8308 (handle_query): Use require_running and target_running. Implement
8309 "monitor exit".
8310 (handle_v_attach, handle_v_run): New.
8311 (handle_v_requests): Use require_running. Handle vAttach and vRun.
8312 (gdbserver_usage): Update.
8313 (main): Redo argument parsing. Handle --debug and --multi. Handle
8314 --attach along with other options or after the port. Save
8315 program_argv. Support no initial program. Resynchronize
8316 communication with GDB after an error. Handle "monitor exit".
8317 Use require_running and target_running. Always allow the extended
8318 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
8319 restart in extended mode.
8320 * README: Refer to the GDB manual. Update --attach usage.
8321
7407e2de
AS
83222007-12-20 Andreas Schwab <schwab@suse.de>
8323
8324 * linux-low.c (STACK_SIZE): Define.
8325 (linux_tracefork_child): Use it. Use __clone2 on ia64.
8326 (linux_test_for_tracefork): Likewise.
8327
b65d95c5
DJ
83282007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
8329
8330 * linux-low.c (linux_wait_for_event): Update messages. Do not
8331 reinsert auto-delete breakpoints.
8332 * mem-break.c (struct breakpoint): Change return type of handler to
8333 int.
8334 (set_breakpoint_at): Update handler type.
8335 (reinsert_breakpoint_handler): Return 1 instead of calling
8336 delete_breakpoint.
8337 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
8338 setting a new one.
8339 (check_breakpoints): Delete auto-delete breakpoints and return 2.
8340 * mem-break.h (set_breakpoint_at): Update handler type.
8341 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
8342 * win32-low.c (auto_delete_breakpoint): New.
8343 (get_child_debug_event): Use it.
8344
4e799345
DJ
83452007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
8346
8347 * configure.ac: Check for pread and pwrite.
8348 * hostio.c (handle_pread): Fall back to lseek and read.
8349 (handle_pwrite): Fall back to lseek and write.
8350 * config.in, configure: Regenerated.
8351
27524b67
DJ
83522007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
8353
8354 * server.c (myresume): Add own_buf argument.
8355 (main): Update calls.
8356
a20d5e98
DJ
83572007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
8358
8359 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
8360 * remote-utils.c (remote_open): Do not call disable_async_io.
8361 (block_async_io): Delete.
8362 (unblock_async_io): Make static.
8363 (initialize_async_io): New.
8364 * server.c (handle_v_cont): Handle async I/O here.
8365 (myresume): Likewise. Move other common resume tasks here...
8366 (main): ... from here. Call initialize_async_io. Disable async
8367 I/O before the main loop.
8368 * server.h (initialize_async_io): Declare.
8369 (block_async_io, unblock_async_io): Delete prototypes.
8370 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
8371
b79d787e
DJ
83722007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
8373
8374 * remote-utils.c (readchar): Allow binary data in received messages.
8375
d97903b2
PA
83762007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8377
8378 * win32-low.c (attaching): New global.
8379 (win32_create_inferior): Clear the `attaching' global.
8380 (win32_attach): Set the `attaching' global.
8381 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
8382 attaching. Only set a breakpoint at the entry point if not
8383 attaching.
8384
311de423
PA
83852007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8386
8387 * server.c (main): Don't report dll events on the initial
8388 connection on attaches.
8389
6c2d16d2
PA
83902007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8391
8392 * server.c (main): Relax numerical bases supported for the pid of
8393 the --attach command line argument.
8394
5ca906e6
PA
83952007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8396
8397 * win32-low.c (win32_attach): Call OpenProcess before
8398 DebugActiveProcess, not after. Add last error output to error
8399 call.
8400
9c6c8194
PA
84012007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8402
8403 * win32-low.c (win32_get_thread_context)
8404 (win32_set_thread_context): New functions.
8405 (thread_rec): Use win32_get_thread_context.
8406 (continue_one_thread, win32_resume): Use win32_set_thread_context.
8407 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
8408 field.
8409
4d5d1aaa
PA
84102007-12-03 Leo Zayas
8411 Pedro Alves <pedro_alves@portugalmail.pt>
8412
8413 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
8414 global variables.
8415 (child_add_thread): Minor cleanup.
8416 (child_continue): Resume artificially suspended threads before
8417 calling ContinueDebugEvent.
8418 (suspend_one_thread): New.
8419 (fake_breakpoint_event): New.
8420 (get_child_debug_event): Change return type to int. Check here if
8421 gdb sent an interrupt request. If a soft interrupt was requested,
8422 fake a breakpoint event. Return 0 if there is no event to handle,
8423 and 1 otherwise.
8424 (win32_wait): Don't check here if gdb sent an interrupt request.
8425 Ensure there is a valid event to handle.
8426 (win32_request_interrupt): Add soft interruption method as last
8427 resort.
8428
c436e841
PA
84292007-12-03 Leo Zayas
8430 Pedro Alves <pedro_alves@portugalmail.pt>
8431
8432 * win32-low.h (win32_thread_info): Add descriptions to the
8433 structure members. Replace `suspend_count' counter by a
8434 `suspended' flag.
8435 * win32-low.c (thread_rec): Update condition of when to get the
8436 context from the inferior. Rely on ContextFlags being set if it
8437 has already been retrieved. Only suspend the inferior thread if
8438 we haven't already. Warn if that fails.
8439 (continue_one_thread): s/suspend_count/suspended/. Only call
8440 ResumeThread once. Warn if that fails.
8441
e7b5fa67
PA
84422007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
8443
8444 * win32-low.c (win32_wait): Don't read from the inferior when it
8445 has already exited.
8446
a385171d
PA
84472007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
8448
8449 * Makefile.in (win32_low_h): New variable.
8450 (win32-low.o): Add dependency on $(win32_low_h).
8451 (win32-arm-low.o, win32-i386-low.o): New rules.
8452
f80c84b3
DJ
84532007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
8454
8455 * hostio.c: Correct copyright year.
8456
a6b151f1
DJ
84572007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
8458
8459 * Makefile.in (OBS): Add hostio.o.
8460 (hostio.o): New rule.
8461 * server.h (handle_vFile): Declare.
8462 * hostio.c: New file.
8463 * server.c (handle_v_requests): Take packet_len and new_packet_len
8464 for binary packets. Call handle_vFile.
8465 (main): Update call to handle_v_requests.
8466
f9387fc3
DJ
84672007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
8468
8469 * linux-low.c: Include <sched.h>.
8470
51c2684e
DJ
84712007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
8472
8473 * linux-low.c (linux_tracefork_grandchild): New.
8474 (linux_tracefork_child): Use clone.
8475 (linux_test_for_tracefork): Use clone; allocate and free a stack.
8476
75f83163
JB
84772007-10-31 Joel Brobecker <brobecker@adacore.com>
8478
8479 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
8480
da5898ce
DJ
84812007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
8482
8483 * linux-low.c (handle_extended_wait): Handle unexpected signals.
8484
24a09b5f
DJ
84852007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
8486
8487 * inferiors.c (change_inferior_id): Delete.
8488 (add_pid_to_list, pull_pid_from_list): New.
8489 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
8490 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
8491 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
8492 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
8493 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
8494 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
8495 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
8496 (using_threads): Always set to 1.
8497 (handle_extended_wait): New.
8498 (add_process): Do not set TID.
8499 (linux_create_inferior): Set must_set_ptrace_flags.
8500 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
8501 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
8502 (linux_thread_alive): Rename TID argument to LWPID.
8503 (linux_wait_for_process): Handle unknown processes. Do not use TID.
8504 (linux_wait_for_event): Do not use TID or check using_threads. Update
8505 call to dead_thread_notify. Call handle_extended_wait.
8506 (linux_create_inferior): Use PTRACE_SETOPTIONS.
8507 (send_sigstop): Delete sigstop_sent.
8508 (wait_for_sigstop): Avoid TID.
8509 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
8510 (linux_test_for_tracefork): New.
8511 (linux_lookup_signals): Use thread_db_active and
8512 linux_supports_tracefork_flag.
8513 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
8514 * linux-low.h (get_process_thread): Avoid TID.
8515 (struct process_ifo): Move thread_known and tid to the end. Remove
8516 sigstop_sent.
8517 (linux_attach_lwp, thread_db_init): Update prototypes.
8518 * server.h (change_inferior_id): Delete prototype.
8519 (add_pid_to_list, pull_pid_from_list): New prototypes.
8520 * thread-db.c (thread_db_use_events): New.
8521 (find_first_thread): Rename to...
8522 (find_one_thread): ...this. Update callers and messages. Do not
8523 call fatal. Check thread_db_use_events. Do not call
8524 change_inferior_id or new_thread_notify.
8525 (maybe_attach_thread): Update. Do not call new_thread_notify.
8526 (thread_db_init): Set thread_db_use_events. Check use_events.
8527 * utils.c (fatal, warning): Correct message prefix.
8528
30ed0a8f
DJ
85292007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
8530
8531 * Makefile.in (clean): Remove new files.
8532 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
8533 (powerpc-64.o, powerpc-64.c): New rules.
8534 * configure.srv: Use alternate register sets for powerpc64-*-linux*
8535 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
8536 with SPE.
8537 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
8538 SPE targets.
8539 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
8540 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
8541 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
8542 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
8543 (target_regsets): Add AltiVec and SPE register sets.
8544 * configure.ac: Check for AltiVec and SPE.
8545 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
8546 (ppc_fill_vrregset, ppc_store_vrregset): New.
8547 (target_regsets): Add AltiVec register set.
8548 * configure: Regenerated.
8549
fd462a61
DJ
85502007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
8551
8552 * linux-low.c (O_LARGEFILE): Define.
8553 (linux_read_memory): Use /proc/PID/mem.
8554 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
8555 * configure, config.in: Regenerated.
8556
69f223ed
DJ
85572007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8558
8559 * linux-low.c (linux_wait_for_event): Do not pass signals while
8560 single-stepping.
8561
aec18585
PA
85622007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
8563
8564 * win32-low.c (create_process): New.
8565 (win32_create_inferior): Use create_process instead of
8566 CreateProcess. If create_process failed retry appending an ".exe"
8567 suffix. Store the GetLastError result immediatelly after
8568 create_process calls and use it on the call to error.
8569
34d86ddd
PA
85702007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
8571
8572 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
8573
5a0e3bd0
JB
85742007-08-23 Joel Brobecker <brobecker@adacore.com>
8575
8576 * configure.ac: Switch license to GPLv3.
8577
f88c79e6
MS
85782007-08-01 Michael Snyder <msnyder@access-company.com>
8579
8580 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
8581
6b3d9b83
PA
85822007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
8583
8584 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
8585 typedef.
8586 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
8587 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
8588 CloseToolhelp32Snapshot.
8589 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
8590 CloseToolhelp32Snapshot.
8591
c588c53c
MS
85922007-07-27 Michael Snyder <michael.snyder@access-company.com>
8593
8594 * server.c (main): Check for inferior exit before main loop.
8595
aa0403d9
PA
85962007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
8597
8598 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
8599 instead of on tmp_desc.
8600
255e7678
DJ
86012007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
8602 Daniel Jacobowitz <dan@codesourcery.com>
8603
8604 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
8605 (add_thread): Minor cleanups.
8606 (clear_inferiors): Move lower in the file. Clear the DLL
8607 list.
8608 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
8609 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
8610 (xml_escape_text): New.
8611 * server.c (handle_query): Handle qXfer:libraries:read. Report it
8612 for qSupported.
8613 (handle_v_cont): Report errors.
8614 (gdbserver_version): Update.
8615 (main): Correct size of own_buf. Do not report initial DLL events.
8616 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
8617 (unloaded_dll, xml_escape_text): New.
8618 * win32-low.c (enum target_waitkind): Update comments.
8619 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
8620 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
8621 (win32_EnumProcessModules, win32_GetModuleInformation)
8622 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
8623 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
8624 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
8625 (win32_Module32First, win32_Module32Next, load_toolhelp)
8626 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
8627 (get_child_debug_event): Handle DLL events.
8628 (win32_wait): Likewise.
8629
0d37add9
DJ
86302007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
8631
8632 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
8633 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
8634
45e2715e
PA
86352007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
8636
8637 * win32-low.c (handle_output_debug_string): Ignore event if not
8638 waiting.
8639
c5674cf1
PA
86402007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
8641
8642 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
8643
2bbe3cc1
DJ
86442007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
8645
8646 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
8647
ae13219e
DJ
86482007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
8649
8650 * inferiors.c (change_inferior_id): Add comment.
8651 * linux-low.c (check_removed_breakpoint): Add an early
8652 prototype. Improve debug output.
8653 (linux_attach): Doc update.
8654 (linux_detach_one_process, linux_detach): Clean up before releasing
8655 each process.
8656 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
8657 * linux-low.h (struct process_info): Doc improvement.
8658 * mem-break.c (delete_all_breakpoints): New.
8659 * mem-break.h (delete_all_breakpoints): New prototype.
8660 * thread-db.c (find_first_thread): New.
8661 (thread_db_create_event): Call it instead of
8662 thread_db_find_new_threads. Clean up unused variables.
8663 (maybe_attach_thread): Remove first thread handling.
8664 (thread_db_find_new_threads): Use find_first_thread.
8665 (thread_db_get_tls_address): Likewise.
8666
4105de34
DJ
86672007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
8668
8669 * thread-db.c (thread_db_find_new_threads): Add prototype.
8670 (thread_db_create_event): Check for the main thread before adding
8671 a new thread.
8672 (maybe_attach_thread): Only enable event reporting if TID == 0.
8673 (thread_db_get_tls_address): Check for new threads.
8674
2b876972
DJ
86752007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
8676
8677 * linux-low.c (linux_create_inferior): Try execv before execvp.
8678 * spu-low.c (spu_create_inferior): Likewise.
8679
7a245884
DJ
86802007-06-13 Mike Frysinger <vapier@gentoo.org>
8681
8682 * linux-low.c (linux_create_inferior): Change execv to execvp.
8683 * spu-low.c (spu_create_inferior): Likewies.
8684
117ce543
DJ
86852007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
8686
8687 * Makefile.in (clean): Clean new files instead of deleted ones.
8688 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
8689 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
8690 rules.
8691 * configure.srv: Specify XML files and new regformats for MIPS and
8692 MIPS64 GNU/Linux.
8693 * linux-mips-low.c (mips_num_regs): Set to only used registers.
8694 (mips_regmap): Do not fetch $0. Remove unused registers. Add
8695 an entry for the restart register.
8696 (mips_cannot_fetch_register, mips_cannot_store_register)
8697 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
8698 register names to match the XML descriptions.
8699 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
8700 restart register instead of $0.
8701
0e7f50da
UW
87022007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
8703 Markus Deuling <deuling@de.ibm.com>
8704
8705 * remote-utils.c (decode_xfer_write): New function.
8706 * server.h (decode_xfer_write): Add prototype.
8707 * server.c (handle_query): Add PACKET_LEN argument. Support
8708 qXfer:spu:read and qXfer:spu:write packets.
8709 (main): Pass packet_len to handle_query.
8710 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
8711 * target.h (target_ops): Add qxfer_spu.
8712
374c1d38
UW
87132007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
8714
8715 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
8716 accessing non-seekable spufs files.
8717
bb63802a
UW
87182007-05-16 Markus Deuling <deuling@de.ibm.com>
8719
889bf7c5 8720 * server.c (handle_query): Add reply for qC packet.
bb63802a 8721
7390519e
PA
87222007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8723 Leo Zayas <lerele@champenstudios@com>
8724
8725 * server.h (check_remote_input_interrupt_request): New function.
8726 * remote_utils.c (INVALID_DESCRIPTOR): New define.
8727 (remote_desc): Initialize with INVALID_DESCRIPTOR.
8728 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
8729 (check_remote_input_interrupt_request): New function.
8730 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 8731 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
8732 winapi_GenerateConsoleCtrlEvent): New typedefs.
8733 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
8734 to 250 ms.
8735 (win32_wait): Check for remote interrupt request
8736 with check_remote_input_interrupt_request.
8737 (win32_request_interrupt): New function.
8738 (win32_target_op): Set request_interrupt to win32_request_interrupt.
8739
34b34921
PA
87402007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8741
8742 * win32-low.c (debug_registers_changed,
8743 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
8744 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
8745 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
8746 (thread_rec): Get context using the low target.
8747 (child_add_thread): Call thread_added on the low target,
8748 which does the same thing.
8749 (regptr): Delete.
8750 (do_initial_child_stuff): Remove debug registers references.
8751 Set context using the low target. Resume threads after
8752 setting the contexts.
8753 (child_continue): Remove dead variable. Remove debug
8754 registers references.
8755 (child_fetch_inferior_registers): Go through the low target.
8756 (do_child_store_inferior_registers): Remove.
8757 (child_store_inferior_registers): Go through the low target.
8758 (win32_resume): Remove debug registers references.
8759 Set context using the low target.
8760 (handle_exception): Change return type to void. Don't record
8761 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
8762 first chance exception.
889bf7c5 8763 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
8764 goto loop. Always return after waiting for debug event.
8765 (win32_wait): Convert to switch statement. Handle spurious
8766 events.
8767
8768 * win32-i386-low.c (debug_registers_changed,
8769 debug_registers_used): New.
8770 (initial_stuff): Rename to ...
8771 (i386_initial_stuff): ... this. Clear debug registers
8772 state variables.
8773 (store_debug_registers): Delete.
8774 (i386_get_thread_context): New.
8775 (load_debug_registers): Delete.
8776 (i386_set_thread_context): New.
8777 (i386_thread_added): New.
8778 (single_step): Rename to ...
8779 (i386_single_step): ... this.
8780 (do_fetch_inferior_registers): Rename to ...
8781 (i386_fetch_inferior_register): ... this.
8782 (i386_store_inferior_register): New.
8783 (the_low_target): Adapt to new interface.
8784
8785 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
8786 (arm_get_thread_context): New.
8787 (arm_set_thread_context): New.
8788 (regptr): New.
8789 (do_fetch_inferior_registers): Rename to ...
8790 (arm_fetch_inferior_register): ... this.
8791 (arm_store_inferior_register): New.
8792 (arm_wince_breakpoint): Reimplement as unsigned long.
8793 (arm_wince_breakpoint_len): Define.
8794 (the_low_target): Adapt to new interface.
8795
8796 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
8797 load_debug_registers. Add get_thread_context, set_thread_context,
8798 thread_added and store_inferior_register. Rename
8799 fetch_inferior_registers to fetch_inferior_register.
8800 (regptr): Remove declaration.
8801
dd6953e1
PA
88022007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8803
8804 * linux-low.c (linux_detach): Change return type to int. Return 0.
8805 * spu-low.c (spu_detach): Likewise.
8806
444d6139
PA
88072007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8808
8809 * target.h (target_ops): Change return type of detach to int.
8810 Add join.
8811 (join_inferior): New.
8812 * server.c (main): Don't skip detach support on mingw32.
8813 If the inferior doesn't support detaching return error.
8814 Call join_inferior instead of using waitpid.
8815 * linux-low.c (linux_join): New.
8816 (linux_target_op): Add linux_join.
8817 * spu-low.c (spu_join): New.
8818 (spu_target_ops): Add spu_join.
8819 * win32-low.c (win32_detach): Adapt to new interface.
8820 Reopen current_process_handle before detaching. Issue a child
8821 resume before detaching.
8822 (win32_join): New.
8823 (win32_target_op): Add win32_join.
8824
1d5315fe
PA
88252007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8826
8827 * win32-low.c (win32-attach): Fix return value.
8828 * target.h (target_ops): Describe ATTACH return values.
8829
bf914831
PA
88302007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8831
8832 * win32-low.c (GETPROCADDRESS): Define.
8833 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
8834 (winapi_DebugSetProcessKillOnExit): Likewise.
8835 (win32_create_inferior): Force usage of ansi CreateProcessA.
8836 (win32_attach): Use GETPROCADDRESS.
8837 (win32_detach): Likewise.
8838
f72f3e60
PA
88392007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8840
8841 * win32-low.c (win32_wait): Don't use WSTOPSIG.
8842
ed50f18f
PA
88432007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
8844
8845 * win32-low.c: Commit leftover changes from 2007-03-29.
8846
0c2ead7e
DJ
88472007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
8848
8849 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
8850 fields short instead of int. Add explicit padding.
8851 (i387_cache_to_fsave): Remove unnecessary casts.
8852 (i387_fsave_to_cache): Doc fix.
8853 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
8854
73725ff3
DJ
88552007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
8856
8857 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
8858 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
8859
d99f33d8
PA
88602007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
8861
8862 * configure.srv (arm*-*-mingw32ce*): Move near the other
8863 arm targets.
8864
68070c10
PA
88652007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
8866
2482afc6 8867 * configure.ac: Add errno checking.
68070c10
PA
8868 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
8869 sys/file.h and malloc.h.
8870 (AC_CHECK_DECLS): Add perror.
8871 (srv_mingwce): Handle.
2482afc6 8872 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
8873 win32-i386-low.o to srv_tgtobj.
8874 (i[34567]86-*-mingw*): Likewise.
8875 (arm*-*-mingw32ce*): Add case.
8876 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
8877 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
8878 [__MINGW32CE__] (strerror): New function.
8879 [__MINGW32CE__] (errno): Define to GetLastError.
8880 [__MINGW32CE__] (COUNTOF): New macro.
8881 (remote_open): Remove extra close call.
8882 * mem-break.c (delete_breakpoint_at): New function.
8883 * mem-break.h (delete_breakpoint_at): Declare.
8884 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
8885 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
8886 [USE_WIN32API] (read, write): Add char* casts.
8887 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
8888 * server.h: Include wincecompat.h on Windows CE.
8889 [HAVE_ERRNO_H]: Check.
8890 (perror): Declare if not declared.
8891 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
8892 (perror_with_name): Remove errno declaration.
8893 * wincecompat.h: New.
8894 * wincecompat.c: New.
8895 * win32-low.h: New.
8896 * win32-arm-low.c: New.
8897 * win32-i386-low.c: New.
8898 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
8899 (OUTMSG2): Make it safe.
8900 (_T): New macro.
8901 (COUNTOF): New macro.
8902 (NUM_REGS): Get it from the low target.
8903 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
8904 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
8905 (thread_rec): Let low target handle debug registers.
8906 (child_add_thread): Likewise.
8907 (child_init_thread_list): Likewise.
8908 (continue_one_thread): Likewise.
8909 (regptr): New.
8910 (do_child_fetch_inferior_registers): Move to ...
8911 * win32-i386-low.c: ... here, and rename to ...
8912 (do_fetch_inferior_registers): ... this.
889bf7c5 8913 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
8914 Go through the low target.
8915 (do_child_store_inferior_registers): Use regptr.
8916 (strwinerror): New function.
8917 (win32_create_inferior): Handle Windows CE.
8918 Use strwinerror instead of strerror on Windows error
8919 codes. Add program to the error output.
8920 Don't close the main thread handle on Windows CE.
8921 (win32_attach): Use coredll.dll on Windows CE.
8922 (win32_kill): Close current process and current
8923 thread handles.
8924 (win32_detach): Use coredll.dll on Windows CE.
8925 (win32_resume): Let low target handle debug registers, and
8926 step request.
8927 (handle_exception): Add/Remove initial breakpoint. Avoid
8928 non-existant WSTOPSIG on Windows CE.
8929 (win32_read_inferior_memory): Cast to remove warning.
8930 (win32_arch_string): Go through the low target.
8931 (initialize_low): Call set_breakpoint_data with the low
8932 target's breakpoint.
8933 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
8934 FOP_REGNUM, mappings): Move to ...
8935 * win32-i386-low.c: ... here.
8936 * win32-low.c (win32_thread_info): Move to ...
8937 * win32-low.h: ... here.
8938 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
8939 win32-arm-low.c and wincecompat.c.
8940 (all:): Add $EXEEXT.
8941 (install-only:): Likewise.
8942 (gdbserver:): Likewise.
8943 (gdbreplay:): Likewise.
8944 * config.in: Regenerate.
8945 * configure: Regenerate.
8946
41093d81
PA
89472007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
8948
8949 * win32-low.c: Rename typedef thread_info to
8950 win32_thread_info throughout.
8951
544afa54
PA
89522007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
8953
8954 * win32-i386-low.c: Rename to ...
8955 * win32-low.c: ... this.
8956 * configure.srv: Replace win32-i386-low.o with win32-low.o.
8957 * Makefile.in: Likewise.
8958
bce7165d
PA
89592007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
8960
8961 * remote-utils.c (monitor_output): Constify msg parameter.
8962 * server.h (monitor_output): Likewise.
8963 * win32-i386-low.c (handle_output_debug_string): New.
8964 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
8965 handle_output_debug_string.
8966 (get_child_debug_event): Likewise.
8967
506c7aa0
DJ
89682007-03-27 Mat Hostetter <mat@lcs.mit.edu>
8969
8970 * server.c (main): Correct strtoul check.
8971
42c81e2a
DJ
89722007-03-27 Jon Ringle <jon@ringle.org>
8973
8974 * linux-low.c: Check __ARCH_HAS_MMU__ also.
8975
9453113a
DJ
89762007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
8977
8978 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
8979
64a69107
DJ
89802007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
8981
8982 * terminal.h: Check HAVE_SGTTY_H.
8983
89842007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
8985
8986 * remote-utils.c (remote_open): Print out the assigned port number.
8987
c74d0ad8
DJ
89882007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
8989
8990 * remote-utils.c (monitor_output): New function.
8991 * server.c (debug_threads): Define here.
8992 (monitor_show_help): New function.
8993 (handle_query): Handle qRcmd.
8994 (main): Do not handle 'd' packet.
8995 * server.h (debug_threads, remote_debug, monitor_output): Declare.
8996 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
8997 of debug_threads.
8998
de7c3b4a
PA
89992007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9000
9001 * Makefile.in (EXEEXT): New.
9002 (clean): Use $(EXEEXT).
9003
ef57601b
PA
90042007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9005
9006 * target.h (target_ops): Rename send_signal to request_interrupt,
9007 and remove enum target_signal parameter.
9008 * linux-low.c (linux_request_interrupt): Rename from
9009 linux_send_signal, and always send SIGINT.
9010 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
9011 and always send SIGINT.
9012 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
9013 of send_signal.
9014 (input_interrupt): Likewise.
9015
820f2bda
PA
90162007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9017
9018 * server.c (get_features_xml): Check if target implemented
9019 arch_string.
9020 * win32-i386-low.c (win32_arch_string): New.
9021 (win32_target_ops): Add win32_arch_string as arch_string member.
9022
ab39bf24
UW
90232007-02-22 Markus Deuling <deuling@de.ibm.com>
9024
9025 * spu-low.c (spu_arch_string): New.
9026 (spu_target_ops): Add spu_arch_string.
9027
61ff6e04
DJ
90282007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
9029
9030 * remote-utils.c: Remove HAVE_TERMINAL_H check.
9031 * configure.ac: Do not check for terminal.h.
9032 * configure, config.in: Regenerated.
9033
fb1e4ffc
DJ
90342007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9035
9036 * Makefile.in (OBS): Add $(XML_BUILTIN).
9037 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
9038 (clean): Update.
9039 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
9040 (arm-with-iwmmxt.c): New.
9041 * config.in, configure: Regenerate.
9042 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
9043 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
9044 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
9045 (arm*-*-linux*): Add iWMMXt and regset support.
9046 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
9047 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
9048 (arm_store_wmmxregset, target_regsets): New.
9049 * server.c (get_features_xml): Take annex argument. Check builtin
9050 XML documents.
9051 (handle_query): Handle multiple annexes.
9052
0f48aa01
DJ
90532007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9054
9055 * remote-utils.c [USE_WIN32API] (read, write): Define.
9056 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
9057 write.
9058
23181151
DJ
90592007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
9060
9061 * linux-i386-low.c (the_low_target): Set arch_string.
9062 * linux-x86-64-low.c (the_low_target): Likewise.
9063 * linux-low.c (linux_arch_string): New.
9064 (linux_target_ops): Add it.
9065 * linux-low.h (struct linux_target_ops): Add arch_string.
9066 * server.c (write_qxfer_response): Use const void * for DATA.
9067 (get_features_xml): New.
9068 (handle_query): Handle qXfer:features:read. Report it for qSupported.
9069 * target.h (struct target_ops): Add arch_string method.
9070
9d606399
DJ
90712007-01-03 Denis Pilat <denis.pilat@st.com>
9072 Daniel Jacobowitz <dan@codesourcery.com>
9073
9074 * linux-low.c (linux_kill): Handle being called with no threads.
9075 * win32-i386-low.c (win32_kill): Likewise.
9076 (get_child_debug_event): Clear current_process_handle.
9077
90782006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
9079 Daniel Jacobowitz <dan@codesourcery.com>
9080
9081 * remote-utils.c (remote_open): Check the type of specified
9082 serial port devices before opening them.
9083 * server.c (main): Kill the inferior if an error occurs during
9084 the first remote_open.
9085
a5e13d24
DJ
90862006-12-05 Markus Deuling <deuling@de.ibm.com>
9087
9088 * README: Update supported targets.
9089
186947f7
DJ
90902006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
9091
9092 * Makefile.in (clean): Remove reg-mips64.c.
9093 (reg-mips64.c, reg-mips64.o): New rules.
9094 * configure.srv: Handle mips64. Include regset support for mips.
9095 * linux-mips-low.c (union mips_register): New.
9096 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
9097 (mips_breakpoint, mips_breakpoint_at): Use int.
9098 (mips_collect_register, mips_supply_register)
9099 (mips_collect_register_32bit, mips_supply_register_32bit)
9100 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9101 (mips_store_fpregset, target_regsets): New.
9102 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
9103
a13e2c95
UW
91042006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
9105
9106 * configure.srv: Add target "spu*-*-*".
9107 * Makefile.in (clean): Remove reg-spu.c.
9108 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
9109 * spu-low.c: New file.
9110
cb7283db
DJ
91112006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9112
9113 * configure.ac: Correct td_thr_tls_get_addr test.
9114 * configure: Regenerated.
9115
89be2091
DJ
91162006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9117
9118 * linux-low.c (linux_wait_for_event): Reformat. Use the
9119 pass_signals array.
9120 * remote-utils.c (decode_address_to_semicolon): New.
9121 * server.c (pass_signals, handle_general_set): New.
9122 (handle_query): Mention QPassSignals for qSupported.
9123 (main): Call handle_general_set.
9124 * server.h (pass_signals, decode_address_to_semicolon): New.
9125
000ef4f0
DJ
91262006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
9127
9128 * server.c (handle_query): Correct error handling for read_auxv.
9129
b7149293
UW
91302005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
9131
9132 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
9133 and srv_linux_thread_db to yes.
9134 * linux-s390-low.c (s390_fill_gregset): New function.
9135 (target_regsets): Define data structure.
9136
dae5f5cf
DJ
91372006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
9138
9139 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
9140 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
9141 * config.in, configure: Regenerated.
9142 * inferiors.c (gdb_id_to_thread): New function.
9143 (gdb_id_to_thread_id): Use it.
9144 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
9145 * linux-low.h (struct process_info): Add th member.
9146 (thread_db_get_tls_address): New prototype.
9147 * remote-utils.c (decode_address): Make non-static.
9148 * server.c (handle_query): Handle qGetTLSAddr.
9149 * server.h (gdb_id_to_thread, decode_address): New prototypes.
9150 * target.h (struct target_ops): Add get_tls_address.
9151 * thread-db.c (maybe_attach_thread): Save the thread handle.
9152 (thread_db_get_tls_address): New.
9153
32ca6d61
DJ
91542006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
9155
9156 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
9157 (linux_resume_one_process): Take a siginfo_t *. Update all
9158 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
9159 (struct pending_signals): Add a siginfo_t.
9160 (linux_wait_for_process): Always set last_status.
9161 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
9162 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
9163 * linux-low.h (struct process_info): Add last_status.
9164
5ffff7c1
DJ
91652006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
9166
9167 * remote-utils.c (try_rle): New function.
9168 (putpkt_binary): Use it.
9169
8695c747
DJ
91702006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
9171
9172 * Makefile.in (clean): Clean reg-x86-64-linux.c.
9173 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
9174 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
9175 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
9176 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
9177 point registers.
9178
290fadea
RS
91792006-08-08 Richard Sandiford <richard@codesourcery.com>
9180
9181 * server.c (terminal_fd): New variable.
9182 (old_foreground_pgrp): Likewise.
9183 (restore_old_foreground_pgrp): New function.
9184 (start_inferior): Record the terminal file descriptor in terminal_fd
9185 and its original foreground group in old_foreground_pgrp. Register
9186 restore_old_foreground_pgrp with atexit().
9187
9f2e1e63
DJ
91882006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
9189
9190 * server.c (handle_query): Correct qPart to qXfer.
9191
b80864fb
DJ
91922006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
9193
9194 * configure.ac: Check for more headers which are missing on
9195 Windows. Automatically supply -lwsock32 and USE_WIN32API.
9196 * configure.srv: Add Cygwin and mingw32.
9197 * remote-utils.c: Don't include headers unconditionally which
9198 are missing on mingw32. Include <winsock.h> for mingw32.
9199 (remote_open): Adjust for mingw32 support. Flush
9200 standard error after writing to it.
9201 (remote_close, putpkt_binary, input_interrupt, block_async_io)
9202 (unblock_async_io, enable_async_io, disable_async_io)
9203 (readchar, getpkt): Update for Winsock support.
9204 (prepare_resume_reply): Expect a protocol signal number.
9205 * server.c: Disable <sys/wait.h> on mingw32.
9206 (start_inferior): Adjust for mingw32 support. Flush
9207 standard error after writing to it.
9208 (attach_inferior): Likewise. Use protocol signal
9209 numbers.
9210 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
9211 and names.
9212 * win32-i386-low.c: New file.
9213 * Makefile.in (XM_CLIBS): Set.
9214 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
9215 (win32-i386-low.o): New dependency rule.
9216 * linux-low.c (linux_wait): Use target signal numbers.
9217 * target.h (struct target_ops): Doc fix.
9218 * server.h (target_signal_to_name): New prototype.
9219 * gdbreplay.c: Don't include headers unconditionally which
9220 are missing on mingw32. Include <winsock.h> for mingw32.
9221 (remote_close, remote_open): Adjust for Winsock support.
9222 * configure, config.in: Regenerated.
9223
0876f84a
DJ
92242006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9225
9226 * server.c (decode_xfer_read, write_qxfer_response): New.
9227 (handle_query): Take a packet length argument. Handle
9228 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
9229 the qSupported response.
9230 (main): Update call to handle_query.
9231
01f9e8fa
DJ
92322006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
9233
9234 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
9235 (putpkt_binary): Renamed from putpkt and adjusted for binary
9236 data.
9237 (putpkt): New wrapper for putpkt_binary.
9238 (readchar): Don't mask off the high bit.
9239 (decode_X_packet): New function.
9240 * server.c (main): Call putpkt_binary if a handler sets the packet
9241 length. Save the length of the incoming packet. Handle 'X'.
9242 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
9243
be2a5f71
DJ
92442006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
9245
9246 * server.c (handle_query): Handle qSupported.
9247
ea025f5f
DJ
92482006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9249
9250 * remote-utils.c (all_symbols_looked_up): New variable.
9251 (look_up_one_symbol): Check it.
9252 * server.h (look_up_one_symbol): New declaration.
9253 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
9254
9308fc88
DJ
92552006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9256
9257 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 9258 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
9259 (PTRACE_GET_THREAD_AREA): Define.
9260 (ps_get_thread_area): New function.
9261
52fb6437
NS
92622006-05-09 Nathan Sidwell <nathan@codesourcery.com>
9263
9264 * configure.srv (m68k*-*-uclinux*): New target.
9265 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
9266 (linux_resume_one_process): Remove extraneous cast.
9267 (linux_read_offsets): New.
9268 (linux_target_op): Add linux_read_offsets on mmuless systems.
9269 * server.c (handle_query): Add qOffsets logic.
9270 * target.h (struct target_ops): Add read_offsets.
9271
21b0f40c
DJ
92722006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9273
9274 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
9275 (PTRACE_GET_THREAD_AREA): Define.
9276 (ps_get_thread_area): New function.
9277 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
9278 (linux-x86-64-low.o): Update.
9279
0050a760
DJ
92802006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9281
9282 * configure.ac: Remove checks for prfpregset_t.
9283 * gdb_proc_service.h: New file.
9284 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
9285 new "gdb_proc_service.h".
9286 * proc-service.c: Likewise.
9287 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
9288 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
9289 * Makefile.in (gdb_proc_service_h): Updated.
9290 * configure, config.in: Regenerated.
9291
b92a518e
DJ
92922006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
9293
9294 * remote-utils.c (prepare_resume_reply): Move declaration
9295 of gdb_id_from_wait to the top of the block.
9296
545587ee
DJ
92972006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
9298
9299 * linux-low.c (regsets_store_inferior_registers): Read the regset
9300 from the target before filling it.
9301
9db87ebd
DJ
93022006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9303
9304 * server.c (attach_inferior): Return SIGTRAP for a successful
9305 attach.
9306
dd24457d
DJ
93072006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9308
9309 * Makefile.in (OBS): Add version.o.
9310 (STAGESTUFF): Delete.
9311 (version.o): Add dependencies.
9312 (version.c): Replace rule.
9313 (clean): Remove version.c.
9314 * server.c (gdbserver_version): New.
9315 (gdbserver_usage): Use printf.
9316 (main): Handle --version and --help.
9317 * server.h (version, host_name): Add declarations.
9318
6f0f660e
EZ
93192005-12-23 Eli Zaretskii <eliz@gnu.org>
9320
889bf7c5
PA
9321 * linux-arm-low.c:
9322 * linux-arm-low.c:
9323 * inferiors.c:
9324 * i387-fp.h:
9325 * i387-fp.c:
9326 * gdbreplay.c:
9327 * regcache.c:
9328 * proc-service.c:
9329 * mem-break.h:
9330 * mem-break.c:
9331 * linux-x86-64-low.c:
9332 * linux-sh-low.c:
9333 * linux-s390-low.c:
9334 * linux-ppc64-low.c:
9335 * linux-ppc-low.c:
9336 * linux-mips-low.c:
9337 * linux-m68k-low.c:
9338 * linux-m32r-low.c:
9339 * linux-low.h:
9340 * linux-low.c:
9341 * linux-ia64-low.c:
9342 * linux-i386-low.c:
9343 * linux-crisv32-low.c:
9344 * thread-db.c:
9345 * terminal.h:
9346 * target.h:
9347 * target.c:
9348 * server.h:
9349 * server.c:
9350 * remote-utils.c:
9351 * regcache.h:
9352 * utils.c:
9353 * Makefile.in:
9354 * configure.ac:
6f0f660e
EZ
9355 * gdbserver.1: Add (C) after Copyright. Update the FSF
9356 address.
9357
9d1fb177
DJ
93582005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
9359
9360 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
9361 (arm_breakpoint_at): Recognize both breakpoints.
9362 (the_low_target): Use the correct breakpoint instruction.
9363
011a70c2
DJ
93642005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
9365
9366 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
9367 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
9368 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
9369 (the_low_target): Update.
9370
7fb85e41
AS
93712005-10-25 Andreas Schwab <schwab@suse.de>
9372
9373 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
9374
9375 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
9376 (ia64_num_regs): Reduce to 462.
9377
3db0444b
DJ
93782005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
9379
9380 * acinclude.m4: Correct quoting.
9381 * aclocal.m4: Regenerated.
9382
9383 Suggested by SZOKOVACS Robert <szo@ies.hu>:
9384 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
9385 (thread_db_init): Call thread_db_err_str.
9386 * configure.ac: Check for TD_VERSION.
9387 * config.in, configure: Regenerated.
9388
bee0189a
DJ
93892005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9390
9391 * server.h (error, fatal, warning): Add ATTR_FORMAT.
9392
e9d25b98
DJ
93932005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9394
9395 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
9396 is not available. Define HAVE_PTRACE_GETREGS if it is.
9397 * config.in, configure: Regenerated.
9398 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
9399 * linux-i386-low.c, linux-m68k-low.c: Update to use
9400 HAVE_PTRACE_GETREGS.
9401 * linux-low.c (regsets_fetch_inferior_registers)
9402 (regsets_store_inferior_registers): Only return 0 if we processed
9403 GENERAL_REGS.
9404 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
9405 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
9406
a06660f7
DJ
94072005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9408
9409 * inferiors.c (struct thread_info): Add gdb_id.
9410 (add_thread): Add gdb_id argument.
9411 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
9412 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
9413 calls to add_thread.
9414 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
9415 * server.c (handle_query): Use thread_to_gdb_id.
9416 (handle_v_cont, main): Use gdb_id_to_thread_id.
9417 * server.h (add_thread): Update prototype.
9418 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
9419 prototypes.
9420
5a1f5858
DJ
94212005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9422
9423 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
9424 left-padded registers.
9425 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
9426 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
9427
e122f1f5
SE
94282005-07-01 Steve Ellcey <sje@cup.hp.com>
9429
9430 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
9431 * configure: Regenerate.
9432 * config.in: Regenerate.
9433 * server.h (NEED_DECLARATION_STRERROR):
9434 Replace with !HAVE_DECL_STRERROR.
9435
d592fa2f
DJ
94362005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
9437
9438 * linux-low.c (linux_wait, linux_send_signal): Don't test
9439 an unsigned long variable for > 0 if it could be MAX_ULONG.
9440 * server.c (myresume): Likewise.
9441 * target.c (set_desired_inferior): Likewise.
9442
ccbd4912
MK
94432005-06-13 Mark Kettenis <kettenis@gnu.org>
9444
9445 * configure.ac: Simplify and improve check for socklen_t.
9446 * configure, config.in: Regenerate.
9447
f450004a
DJ
94482005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
9449
9450 * acconfig.h: Remove.
9451 * configure.ac: Add a test for socklen_t. Use three-argument
9452 AC_DEFINE throughout.
9453 * config.in: Regenerated using autoheader 2.59.
9454 * configure: Regenerated.
9455
9456 * gdbreplay.c (socklen_t): Provide a default.
9457 (remote_open): Use socklen_t.
9458 * remote-utils.c (socklen_t): Provide a default.
9459 (remote_open): Use socklen_t.
9460 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
9461 unsigned char.
9462
9463 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
9464 char for buffers.
9465 * linux-low.c (linux_read_memory, linux_write_memory)
9466 (linux_read_auxv): Likewise.
9467 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
9468 (check_mem_write): Likewise.
9469 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
9470 Likewise.
9471 * regcache.c (struct inferior_rgcache_data, registers_to_string)
9472 (registers_from_string, register_data): Likewise.
9473 * server.c (handle_query, main): Likewise.
9474 * server.h (convert_ascii_to_int, convert_int_to_ascii)
9475 (decode_M_packet): Likewise.
9476 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
9477 * target.h (struct target_ops): Update read_memory, write_memory,
9478 and read_auxv.
9479 (read_inferior_memory, write_inferior_memory): Update.
9480 * linux-low.h (struct linux_target_ops): Change type of breakpoint
9481 to unsigned char *.
9482 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
9483 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
9484 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
9485 linux-s390-low.c, linux-sh-low.c: Update for changes in
9486 read_inferior_memory and the_low_target->breakpoint.
9487
eee84df1
DJ
94882005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
9489
9490 * Makefile.in (SFILES): Add linux-ppc64-low.c.
9491 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
9492 * configure.srv: Add powerpc64-*-linux*.
9493 * linux-ppc64-low.c: New file.
9494
45b134e5
OF
94952005-05-23 Orjan Friberg <orjanf@axis.com>
9496
9497 * linux-cris-low.c: New file with support for CRIS.
9498 * linux-crisv32-low.c: Ditto for CRISv32.
9499 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
9500 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 9501 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
9502 reg-crisv32.o, and reg-crisv32.c to make rules.
9503 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
9504 recognized targets.
9505
48d93c75
UW
95062005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
9507
9508 * linux-low.c (fetch_register): Ensure buffer size is a multiple
9509 of sizeof (PTRACE_XFER_TYPE).
9510 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
9511
e013ee27
OF
95122005-05-12 Orjan Friberg <orjanf@axis.com>
9513
889bf7c5 9514 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
9515 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
9516 pointers for hardware watchpoint support.
9517 * linux-low.h (struct linux_target_ops): Ditto.
9518 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
9519 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
9520 to linux_target_ops.
9521 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
9522 reply packet.
9523 * server.c (main): Recognize 'Z' and 'z' packets.
9524
b0ded00b
UW
95252005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
9526
9527 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
9528 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
9529 (the_low_target): Add new members.
9530
8643e2ad
DJ
95312005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
9532
9533 * proc-service.c (ps_lgetregs): Search all_processes instead of
9534 all_threads.
9535
fc620387
DJ
95362005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
9537
9538 * server.c (start_inferior): Change return type to int.
9539 (attach_inferior): Change sigptr to int *.
9540 (handle_v_cont, handle_v_requests): Change signal to int *.
9541 (main): Change signal to int.
9542
95432005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
9544
9545 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
9546 * configure.srv: Add m32r*-*-linux*.
9547 * linux-m32r-low.c: New file.
9548
e0e76420
DJ
95492005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
9550
9551 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
9552
a1928bad
DJ
95532005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
9554
9555 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
9556 Take unsigned long arguments for PIDs.
9557 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
9558 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
9559 (wait_for_sigstop, linux_resume_one_process)
9560 (regsets_fetch_inferior_registers, linux_send_signal)
9561 (linux_read_auxv): Likewise. Update the types of variables holding
9562 PIDs. Update format string specifiers.
9563 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
9564 * remote-utils.c (prepare_resume_reply): Likewise.
9565 * server.c (cont_thread, general_thread, step_thread)
9566 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
9567 unsigned long.
9568 (handle_query): Update format specifiers.
9569 (handle_v_cont, main): Use strtoul for thread IDs.
9570 * server.h (struct inferior_list_entry): Use unsigned long for ID.
9571 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
9572 (general_thread, step_thread, thread_from_wait)
9573 (old_thread_from_wait): Update.
9574 * target.h (struct thread_resume): Use unsigned long for THREAD.
9575 (struct target_ops): Use unsigned long for arguments to attach and
9576 thread_alive.
9577
dcdb98d2
DJ
95782005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
9579
9580 * acinclude.m4: Include bfd/bfd.m4 directly.
9581 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
9582 <agriffis@toolchain.org>.
9583 * aclocal.m4, configure: Regenerated.
9584
bec39cab
AC
95852005-01-07 Andrew Cagney <cagney@gnu.org>
9586
9587 * configure.ac: Rename configure.in, require autoconf 2.59.
9588 * configure: Re-generate.
9589
434c4c77
DJ
95902004-12-08 Daniel Jacobowitz <dan@debian.org>
9591
9592 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
9593 LIBS when finished.
9594 * aclocal.m4: Regenerated.
9595 * configure: Regenerated.
9596
db1d3e1b
AS
95972004-11-21 Andreas Schwab <schwab@suse.de>
9598
9599 * linux-m68k-low.c (m68k_num_gregs): Define.
9600 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
9601 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
9602 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
9603 (m68k_breakpoint_at): New. Add to the_low_target.
9604
9605 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
9606 srv_linux_thread_db to yes.
9607
43360365
JB
96082004-10-20 Joel Brobecker <brobecker@gnat.com>
9609
9610 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
9611 (ARCH_SET_FS): Likewise.
9612 (ARCH_GET_FS): Likewise.
9613 (ARCH_GET_GS): Likewise.
9614
fd500816
DJ
96152004-10-16 Daniel Jacobowitz <dan@debian.org>
9616
9617 * linux-i386-low.c (ps_get_thread_area): New.
9618 * linux-x86-64-low.c (ps_get_thread_area): New.
9619 * linux-low.c: Include <sys/syscall.h>.
9620 (linux_kill_one_process): Don't kill the first thread here.
9621 (linux_kill): Kill the first thread here.
9622 (kill_lwp): New function.
9623 (send_sigstop, linux_send_signal): Use it.
9624 * proc-service.c: Clean up #ifdefs.
9625 (fpregset_info): Delete.
9626 (ps_lgetregs): Update and enable implementation.
9627 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
9628 implementations.
9629 * remote-utils.c (struct sym_cache, symbol_cache): New.
9630 (input_interrupt): Print a clearer message.
9631 (async_io_enabled): New variable.
9632 (enable_async_io, disable_async_io): Use it. Update comments.
9633 (look_up_one_symbol): Use the symbol cache.
9634 * thread-db.c (thread_db_look_up_symbols): New function.
9635 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
9636
f6de3c42
DJ
96372004-10-16 Daniel Jacobowitz <dan@debian.org>
9638
9639 * configure.in: Test for -rdynamic.
9640 * configure: Regenerated.
9641 * Makefile (INTERNAL_LDFLAGS): New.
9642 (gdbserver, gdbreplay): Use it.
9643
2c0fc042
AC
96442004-09-02 Andrew Cagney <cagney@gnu.org>
9645
9646 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
9647
075b3282
DJ
96482004-03-23 Daniel Jacobowitz <drow@mvista.com>
9649
9650 * linux-low.c (linux_wait): Clear all_processes list also.
9651
fa6a77dc
DJ
96522004-03-12 Daniel Jacobowitz <drow@mvista.com>
9653
9654 * linux-low.c: Include <errno.h>. Remove extern declaration of
9655 errno.
9656
6d782a97
DJ
96572004-03-12 Daniel Jacobowitz <drow@mvista.com>
9658
9659 * gdbreplay.c, server.h, utils.c: Update copyright years.
9660
3a7fb99b
DJ
96612004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
9662
9663 * server.c (main): Print child status or termination signal from
9664 variable 'signal', not 'sig'.
9665
c3e735a6
DJ
96662004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
9667
9668 * linux-low.c (linux_read_memory): Change return type to
9669 int. Check for and return error from ptrace().
9670 * target.c (read_inferior_memory): Change return type to int. Pass
9671 back return status from the_target->read_memory().
9672 * target.h (struct target_ops): Adapt *read_memory() prototype.
9673 Update comment.
9674 (read_inferior_memory): Adapt prototype.
9675 * server.c (main): Return an error packet if
9676 read_inferior_memory() returns an error.
9677
a59d1c82
DJ
96782004-03-04 Daniel Jacobowitz <drow@mvista.com>
9679
9680 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
9681 Unify with other clean targets.
9682
dc3f8883
DJ
96832004-02-29 Daniel Jacobowitz <drow@mvista.com>
9684
9685 * server.c (handle_v_cont): Call set_desired_inferior.
9686
89a208da
DJ
96872004-02-29 Daniel Jacobowitz <drow@mvista.com>
9688
9689 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
9690
62ea82f5
DJ
96912004-02-29 Daniel Jacobowitz <drow@mvista.com>
9692
9693 * linux-low.c (linux_wait): Unblock async I/O.
9694 (linux_resume): Block and enable async I/O.
9695 * remote-utils.c (block_async_io, unblock_async_io): New functions.
9696 * server.h (block_async_io, unblock_async_io): Add prototypes.
9697
6910d122
DJ
96982004-02-29 Daniel Jacobowitz <drow@mvista.com>
9699
9700 * remote-utils.c (remote_open): Print a status notice after
9701 opening a TCP port.
9702 * server.c (attach_inferior): Print a status notice after
9703 attaching.
9704
97052004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
9706
9707 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
9708
c89dc5d4
DJ
97092004-02-26 Daniel Jacobowitz <drow@mvista.com>
9710
9711 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
9712 error packet.
9713 * server.c, target.h: Update copyright years.
9714
4b8dad4a
RM
97152004-02-25 Roland McGrath <roland@redhat.com>
9716
9717 * target.h (struct target_ops): New member `read_auxv'.
9718 * server.c (handle_query): Handle qPart:auxv:read: query using that.
9719 * linux-low.c (linux_read_auxv): New function.
9720 (linux_target_ops): Initialize `read_auxv' member to that.
9721
d7446758
JB
97222004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
9723
9724 Committed by Jim Blandy <jimb@redhat.com>.
9725
9726 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 9727 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
9728 instead of GPR_SIZE to distiguish s390 and s390x targets.
9729
5544ad89
DJ
97302004-01-31 Daniel Jacobowitz <drow@mvista.com>
9731
9732 * linux-low.c: Update copyright year.
9733 (check_removed_breakpoint): Clear pending_is_breakpoint.
9734 (linux_set_resume_request, linux_queue_one_thread)
9735 (resume_status_pending_p): New functions.
9736 (linux_continue_one_thread): Use process->resume.
9737 (linux_resume): Only resume threads if there are no pending events.
9738 * linux-low.h (struct process_info): Add resume request
9739 pointer.
9740
2a68b70e
DJ
97412004-01-30 Daniel Jacobowitz <drow@mvista.com>
9742
9743 * regcache.c (new_register_cache): Clear the allocated register
9744 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
9745
64386c31
DJ
97462003-10-13 Daniel Jacobowitz <drow@mvista.com>
9747
9748 * linux-low.c (linux_resume): Take a struct thread_resume *
9749 argument.
9750 (linux_wait): Update call.
9751 (resume_ptr): New static variable.
9752 (linux_continue_one_thread): Renamed from
9753 linux_continue_one_process. Use resume_ptr.
9754 (linux_resume): Use linux_continue_one_thread.
9755 * server.c (handle_v_cont, handle_v_requests): New functions.
9756 (myresume): New function.
9757 (main): Handle 'v' case.
9758 * target.h (struct thread_resume): New type.
9759 (struct target_ops): Change argument of "resume" to struct
9760 thread_resume *.
9761 (myresume): Delete macro.
9762
c938e9b0
L
97632003-08-08 H.J. Lu <hongjiu.lu@intel.com>
9764
9765 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
9766 (uninstall): Support DESTDIR.
9767
7f313d07
BC
9768Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
9769
9770 * configure.srv: Add xscale*linux copy of arm*linux entry.
9771
3b2fc2ea
DJ
97722003-07-24 Daniel Jacobowitz <drow@mvista.com>
9773
9774 * linux-arm-low.c (arm_reinsert_addr): New function.
9775 (the_low_target): Add arm_reinsert_addr.
9776
1c0a559e
MK
97772003-07-08 Mark Kettenis <kettenis@gnu.org>
9778
9779 * mem-break.c: Remove whitespace at end of file.
9780
43d5792c
DJ
97812003-06-28 Daniel Jacobowitz <drow@mvista.com>
9782
9783 * configure.in: Check whether we need to prototype strerror.
9784 * server.h: Optionally prototype strerror.
9785 * gdbreplay.c (perror_with_name): Use strerror.
9786 * linux-low.c (linux_attach_lwp): Use strerror.
9787 * utils.c (perror_with_name): Use strerror.
9788 * config.in, configure: Regenerated.
9789
c8a86edf
DJ
97902003-06-28 Daniel Jacobowitz <drow@mvista.com>
9791
9792 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
9793 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
9794
73d37363
DJ
97952003-06-20 Daniel Jacobowitz <drow@mvista.com>
9796
9797 * Makefile.in (SFILES): Update.
9798 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
9799 low-sun3.c: Remove files.
9800
6ad8ae5c
DJ
98012003-06-17 Daniel Jacobowitz <drow@mvista.com>
9802
9803 * linux-low.c: Move comment to linux_thread_alive where it belonged.
9804 (linux_detach_one_process, linux_detach): New functions.
9805 (linux_target_ops): Add linux_detach.
9806 * server.c (main): Handle 'D' packet.
9807 * target.h (struct target_ops): Add "detach" member.
9808 (detach_inferior): Define.
9809
1581182a
MK
98102003-06-13 Mark Kettenis <kettenis@gnu.org>
9811
9812 From Kelley Cook <kelleycook@wideopenwest.com>:
9813 * configure.srv: Accept i[34567]86 variants.
9814
e5379b03
DJ
98152003-06-05 Daniel Jacobowitz <drow@mvista.com>
9816
9817 * linux-low.c (linux_wait_for_event): Correct comment typos.
9818 (linux_resume_one_process): Call check_removed_breakpoint.
9819 (linux_send_signal): New function.
9820 (linux_target_ops): Add linux_send_signal.
9821 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
9822 of kill.
9823 * target.h (struct target_ops): Add send_signal.
9824
2ff29de4
JB
98252003-05-29 Jim Blandy <jimb@redhat.com>
9826
9827 * linux-low.c (usr_store_inferior_registers): Transfer buf in
9828 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
9829 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
9830 away part of the register's value.
9831
254787d4
DJ
98322003-03-26 Daniel Jacobowitz <drow@mvista.com>
9833
9834 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
9835 (linux_wait_for_event, linux_init_signals): Likewise.
9836
94e10508
DJ
98372003-03-17 Daniel Jacobowitz <drow@mvista.com>
9838
9839 * configure.in: Check for stdlib.h.
9840 * configure: Regenerated.
9841 * config.in: Regenerated.
9842
4c0711e0
DJ
98432003-01-04 Andreas Schwab <schwab@suse.de>
9844
9845 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
9846
ef66e766
AC
98472003-01-02 Andrew Cagney <ac131313@redhat.com>
9848
9849 * Makefile.in: Remove obsolete code.
9850
a1358604
DJ
98512002-11-20 Daniel Jacobowitz <drow@mvista.com>
9852
9853 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
9854 defined(PT_FPR0_HI).
9855
23ce3b1c
DJ
98562002-11-17 Stuart Hughes <seh@zee2.com>
9857
9858 * linux-arm-low.c (arm_num_regs): Increase.
9859 (arm_regmap): Include status register.
9860
98612002-11-17 Daniel Jacobowitz <drow@mvista.com>
9862
9863 * linux-low.c (register_addr): Remove incorrect -1 check.
9864
a9fa9f7d
DJ
98652002-08-29 Daniel Jacobowitz <drow@mvista.com>
9866
9867 * linux-low.c (linux_create_inferior): Call setpgid. Return
9868 the new PID.
9869 (unstopped_p, linux_signal_pid): Remove.
9870 (linux_target_ops): Remove linux_signal_pid.
9871 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
9872 global instead of target method.
9873 * target.h (struct target_ops): Remove signal_pid. Update comment
9874 for create_inferior.
9875 * server.c (signal_pid): New variable.
9876 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 9877 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
9878 (attach_inferior): Set signal_pid.
9879
17574093
DJ
98802002-08-23 Daniel Jacobowitz <drow@mvista.com>
9881
9882 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
9883
98842002-08-20 Jim Blandy <jimb@redhat.com>
9885
9886 * Makefile.in (LDFLAGS): Allow the configure script to establish a
9887 default for this.
9888
98892002-08-01 Andrew Cagney <cagney@redhat.com>
9890
9891 * Makefile.in: Make chill references obsolete.
9892
98932002-07-24 Kevin Buettner <kevinb@redhat.com>
9894
9895 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
9896 * configure: Regenerate.
9897 * config.in: Regenerate.
9898
98992002-07-09 David O'Brien <obrien@FreeBSD.org>
9900
9901 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
9902 (perror_with_name, remote_close, remote_open, expect, play): Static.
9903
99042002-07-04 Michal Ludvig <mludvig@suse.cz>
9905
4b8dad4a 9906 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
9907 byte offsets instead of an array of indexes.
9908 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
9909
99102002-06-13 Daniel Jacobowitz <drow@mvista.com>
9911
9912 * regcache.c: Add comment.
9913
99142002-06-11 Daniel Jacobowitz <drow@mvista.com>
9915
9916 * thread-db.c: New file.
9917 * proc-service.c: New file.
9918 * acinclude.m4: New file.
9919 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
9920 proc-service.o, and thread-db.o.
9921 (linux-low.o): Add USE_THREAD_DB.
9922 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
9923 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
9924 * aclocal.m4: Regenerated.
9925 * config.in: Regenerated.
9926 * configure: Regenerated.
9927 * configure.in: Check for proc_service.h, sys/procfs.h,
9928 thread_db.h, and linux/elf.h headrs.
9929 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
9930 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
9931 Check for -lthread_db and thread support.
9932 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
9933 PowerPC, and SuperH.
9934 * i387-fp.c: Constify arguments.
9935 * i387-fp.h: Likewise.
9936 * inferiors.c: (struct thread_info): Renamed from
9937 `struct inferior_info'. Remove PID member. Use generic inferior
9938 list header. All uses updated.
9939 (inferiors, signal_pid): Removed.
9940 (all_threads): New variable.
9941 (get_thread): Define.
9942 (add_inferior_to_list): New function.
9943 (for_each_inferior): New function.
9944 (change_inferior_id): New function.
9945 (add_inferior): Removed.
9946 (remove_inferior): New function.
9947 (add_thread): New function.
9948 (free_one_thread): New function.
9949 (remove_thread): New function.
9950 (clear_inferiors): Use for_each_inferior and free_one_thread.
9951 (find_inferior): New function.
9952 (find_inferior_id): New function.
9953 (inferior_target_data): Update argument type.
9954 (set_inferior_target_data): Likewise.
9955 (inferior_regcache_data): Likewise.
9956 (set_inferior_regcache_data): Likewise.
9957 * linux-low.c (linux_bp_reinsert): Remove.
9958 (all_processes, stopping_threads, using_thrads)
9959 (struct pending_signals, debug_threads, pid_of): New.
9960 (inferior_pid): Replace with macro.
9961 (struct inferior_linux_data): Remove.
9962 (get_stop_pc, add_process): New functions.
9963 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
9964 Use add_process and add_thread.
9965 (linux_attach_lwp): New function, based on old linux_attach. Use
9966 add_process and add_thread. Set stop_expected for new threads.
9967 (linux_attach): New function.
9968 (linux_kill_one_process): New function.
9969 (linux_kill): Kill all LWPs.
9970 (linux_thread_alive): Use find_inferior_id.
9971 (check_removed_breakpoints, status_pending_p): New functions.
9972 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
9973 Update. Use WNOHANG. Wait for cloned processes also. Update process
9974 struct for the found process.
9975 (linux_wait_for_event): New function.
9976 (linux_wait): Use it. Support LWPs.
9977 (send_sigstop, wait_for_sigstop, stop_all_processes)
9978 (linux_resume_one_process, linux_continue_one_process): New functions.
9979 (linux_resume): Support LWPs.
9980 (REGISTER_RAW_SIZE): Remove.
9981 (fetch_register): Use register_size instead. Call supply_register.
9982 (usr_store_inferior_registers): Likewise. Call collect_register.
9983 Fix recursive case.
9984 (regsets_fetch_inferior_registers): Improve error message.
9985 (regsets_store_inferior_registers): Add debugging.
9986 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
9987 (unstopped_p, linux_signal_pid): New functions.
9988 (linux_target_ops): Add linux_signal_pid.
9989 (linux_init_signals): New function.
9990 (initialize_low): Call it. Initialize using_threads.
9991 * regcache.c (inferior_regcache_data): Add valid
9992 flag.
9993 (get_regcache): Fetch registers lazily. Add fetch argument
9994 and update all callers.
9995 (regcache_invalidate_one, regcache_invalidate): New
9996 functions.
9997 (new_register_cache): Renamed from create_register_cache.
9998 Return the new regcache.
9999 (free_register_cache): Change argument to a void *.
10000 (registers_to_string, registers_from_string): Call get_regcache
10001 with fetch flag set.
10002 (register_data): Make static. Pass fetch flag to get_regcache.
10003 (supply_register): Call get_regcache with fetch flag clear.
10004 (collect_register): Call get_regcache with fetch flag set.
10005 (collect_register_as_string): New function.
10006 * regcache.h: Update.
10007 * remote-utils.c (putpkt): Flush after debug output and use
10008 stderr.
10009 Handle input interrupts while waiting for an ACK.
10010 (input_interrupt): Use signal_pid method.
10011 (getpkt): Flush after debug output and use stderr.
10012 (outreg): Use collect_register_as_string.
10013 (new_thread_notify, dead_thread_notify): New functions.
10014 (prepare_resume_reply): Check using_threads. Set thread_from_wait
10015 and general_thread.
10016 (look_up_one_symbol): Flush after debug output.
10017 * server.c (step_thread, server_waiting): New variables.
10018 (start_inferior): Don't use signal_pid. Update call to mywait.
10019 (attach_inferior): Update call to mywait.
10020 (handle_query): Handle qfThreadInfo and qsThreadInfo.
10021 (main): Don't fetch/store registers explicitly. Use
10022 set_desired_inferior. Support proposed ``Hs'' packet. Update
10023 calls to mywait.
10024 * server.h: Update.
10025 (struct inferior_list, struct_inferior_list_entry): New.
10026 * target.c (set_desired_inferior): New.
10027 (write_inferior_memory): Constify.
10028 (mywait): New function.
10029 * target.h: Update.
10030 (struct target_ops): New signal_pid method.
10031 (mywait): Removed macro, added prototype.
10032
10033 * linux-low.h (regset_func): Removed.
10034 (regset_fill_func, regset_store_func): New.
10035 (enum regset_type): New.
10036 (struct regset_info): Add type field. Use new operation types.
10037 (struct linux_target_ops): stop_pc renamed to get_pc.
10038 Add decr_pc_after_break and breakpoint_at.
10039 (get_process, get_thread_proess, get_process_thread)
10040 (strut process_info, all_processes, linux_attach_lwp)
10041 (thread_db_init): New.
10042
10043 * linux-arm-low.c (arm_get_pc, arm_set_pc,
10044 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
10045 (the_low_target): Add new members.
10046 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
10047 (i386_store_fpxregset): Constify.
10048 (target_regsets): Add new kind identifier.
10049 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
10050 (i386_set_pc): Add debugging.
10051 (i386_breakpoint_at): New function.
10052 (the_low_target): Add new members.
10053 * linux-mips-low.c (mips_get_pc, mips_set_pc)
10054 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
10055 (mips_breakpoint_at): New.
10056 (the_low_target): Add new members.
10057 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
10058 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
10059 (the_low_target): Add new members.
10060 * linux-sh-low.c (sh_get_pc, sh_set_pc)
10061 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
10062 (the_low_target): Add new members.
10063 * linux-x86-64-low.c (target_regsets): Add new kind
10064 identifier.
10065
100662002-05-15 Daniel Jacobowitz <drow@mvista.com>
10067
10068 From Martin Pool <mbp@samba.org>:
10069 * server.c (gdbserver_usage): New function.
10070 (main): Call it.
10071
100722002-05-14 Daniel Jacobowitz <drow@mvista.com>
10073
10074 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
10075 stop_at -> stop_pc.
10076
100772002-05-04 Andrew Cagney <ac131313@redhat.com>
10078
10079 * Makefile.in: Remove obsolete code.
10080
100812002-04-24 Michal Ludvig <mludvig@suse.cz>
10082
10083 * linux-low.c (regsets_fetch_inferior_registers),
10084 (regsets_store_inferior_registers): Removed cast to int from
10085 ptrace() calls.
10086 * regcache.h: Added declaration of struct inferior_info.
10087
100882002-04-20 Daniel Jacobowitz <drow@mvista.com>
10089
10090 * inferiors.c (struct inferior_info): Add regcache_data.
10091 (add_inferior): Call create_register_cache.
10092 (clear_inferiors): Call free_register_cache.
10093 (inferior_regcache_data, set_inferior_regcache_data): New functions.
10094 * regcache.c (struct inferior_regcache_data): New.
10095 (registers): Remove.
10096 (get_regcache): New function.
10097 (create_register_cache, free_register_cache): New functions.
10098 (set_register_cache): Don't initialize the register cache here.
10099 (registers_to_string, registers_from_string, register_data): Call
10100 get_regcache.
10101 * regcache.h: Add prototypes.
10102 * server.h: Likewise.
10103
101042002-04-20 Daniel Jacobowitz <drow@mvista.com>
10105
10106 * mem-break.c: New file.
10107 * mem-break.h: New file.
10108 * Makefile.in: Add mem-break.o rule; update server.h
10109 dependencies.
10110 * inferiors.c (struct inferior_info): Add target_data
10111 member.
10112 (clear_inferiors): Free target_data member if set.
10113 (inferior_target_data, set_inferior_target_data): New functions.
10114 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
10115 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
10116 * linux-low.c (linux_bp_reinsert): New variable.
10117 (struct inferior_linux_data): New.
10118 (linux_create_inferior): Use set_inferior_target_data.
10119 (linux_attach): Likewise. Call add_inferior.
10120 (linux_wait_for_one_inferior): New function.
10121 (linux_wait): Call it.
10122 (linux_write_memory): Add const.
10123 (initialize_low): Call set_breakpoint_data.
10124 * linux-low.h (struct linux_target_ops): Add breakpoint
10125 handling members.
10126 * server.c (attach_inferior): Remove extra add_inferior
10127 call.
10128 * server.h: Include mem-break.h. Update inferior.c
10129 prototypes.
10130 * target.c (read_inferior_memory)
10131 (write_inferior_memory): New functions.
10132 * target.h (read_inferior_memory)
10133 (write_inferior_memory): Change macros to prototypes.
10134 (struct target_ops): Update comments. Add const to write_memory
10135 definition.
10136
101372002-04-11 Daniel Jacobowitz <drow@mvista.com>
10138
10139 * linux-low.c (usr_store_inferior_registers): Support
10140 registers which are allowed to fail to store.
10141 * linux-low.h (linux_target_ops): Likewise.
10142 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
10143 (ppc_cannot_store_register): FPSCR may not be storable.
10144
101452002-04-09 Daniel Jacobowitz <drow@mvista.com>
10146
10147 * server.h: Include <string.h> if HAVE_STRING_H.
10148 * ChangeLog: Correct paths in last ChangeLog entry.
10149
101502002-04-09 Daniel Jacobowitz <drow@mvista.com>
10151
10152 * linux-low.h: Remove obsolete prototypes.
10153 (struct linux_target_ops): New.
10154 (extern the_low_target): New.
10155 * linux-low.c (num_regs, regmap): Remove declarations.
10156 (register_addr): Use the_low_target explicitly.
10157 (fetch_register): Likewise.
10158 (usr_fetch_inferior_registers): Likewise.
10159 (usr_store_inferior_registers): Likewise.
10160 * linux-arm-low.c (num_regs): Remove.
10161 (arm_num_regs): Define.
10162 (arm_regmap): Renamed from regmap, made static.
10163 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
10164 made static.
10165 (arm_cannot_store_register): Renamed from cannot_store_register,
10166 made static.
10167 (the_low_target): New.
10168 * linux-i386-low.c (num_regs): Remove.
10169 (i386_num_regs): Define.
10170 (i386_regmap): Renamed from regmap, made static.
10171 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
10172 made static.
10173 (i386_cannot_store_register): Renamed from cannot_store_register,
10174 made static.
10175 (the_low_target): New.
10176 * linux-ia64-low.c (num_regs): Remove.
10177 (ia64_num_regs): Define.
10178 (ia64_regmap): Renamed from regmap, made static.
10179 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
10180 made static.
10181 (ia64_cannot_store_register): Renamed from cannot_store_register,
10182 made static.
10183 (the_low_target): New.
10184 * linux-m68k-low.c (num_regs): Remove.
10185 (m68k_num_regs): Define.
10186 (m68k_regmap): Renamed from regmap, made static.
10187 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
10188 made static.
10189 (m68k_cannot_store_register): Renamed from cannot_store_register,
10190 made static.
10191 (the_low_target): New.
10192 * linux-mips-low.c (num_regs): Remove.
10193 (mips_num_regs): Define.
10194 (mips_regmap): Renamed from regmap, made static.
10195 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
10196 made static.
10197 (mips_cannot_store_register): Renamed from cannot_store_register,
10198 made static.
10199 (the_low_target): New.
10200 * linux-ppc-low.c (num_regs): Remove.
10201 (ppc_num_regs): Define.
10202 (ppc_regmap): Renamed from regmap, made static.
10203 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
10204 made static.
10205 (ppc_cannot_store_register): Renamed from cannot_store_register,
10206 made static.
10207 (the_low_target): New.
10208 * linux-s390-low.c (num_regs): Remove.
10209 (s390_num_regs): Define.
10210 (s390_regmap): Renamed from regmap, made static.
10211 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
10212 made static.
10213 (s390_cannot_store_register): Renamed from cannot_store_register,
10214 made static.
10215 (the_low_target): New.
10216 * linux-sh-low.c (num_regs): Remove.
10217 (sh_num_regs): Define.
10218 (sh_regmap): Renamed from regmap, made static.
10219 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
10220 made static.
10221 (sh_cannot_store_register): Renamed from cannot_store_register,
10222 made static.
10223 (the_low_target): New.
10224 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
10225 (the_low_target): New.
10226
102272002-04-09 Daniel Jacobowitz <drow@mvista.com>
10228
10229 * Makefile.in: Add stamp-h target.
10230 * configure.in: Create stamp-h.
10231 * configure: Regenerated.
10232
102332002-04-09 Daniel Jacobowitz <drow@mvista.com>
10234
10235 * inferiors.c: New file.
10236 * target.c: New file.
10237 * target.h: New file.
10238 * Makefile.in: Add target.o and inferiors.o. Update
10239 dependencies.
10240 * linux-low.c (inferior_pid): New static variable,
10241 moved from server.c.
10242 (linux_create_inferior): Renamed from create_inferior.
10243 Call add_inferior. Return 0 on success instead of a PID.
10244 (linux_attach): Renamed from myattach.
10245 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
10246 (linux_thread_alive): Renamed from mythread_alive.
10247 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
10248 child dies.
10249 (linux_resume): Renamed from myresume. Add missing ``return 0''.
10250 (regsets_store_inferior_registers): Correct error message.
10251 Add missing ``return 0''.
10252 (linux_fetch_registers): Renamed from fetch_inferior_registers.
10253 (linux_store_registers): Renamed from store_inferior_registers.
10254 (linux_read_memory): Renamed from read_inferior_memory.
10255 (linux_write_memory): Renamed from write_inferior_memory.
10256 (linux_target_ops): New structure.
10257 (initialize_low): Call set_target_ops ().
10258 * remote-utils.c (unhexify): New function.
10259 (hexify): New function.
10260 (input_interrupt): Send signals to ``signal_pid''.
10261 * server.c (inferior_pid): Remove.
10262 (start_inferior): Update create_inferior call.
10263 (attach_inferior): Call add_inferior.
10264 (handle_query): New function.
10265 (main): Call handle_query for `q' packets.
10266 * server.h: Include "target.h". Remove obsolete prototypes.
10267 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
10268
102692002-04-09 Daniel Jacobowitz <drow@mvista.com>
10270
10271 * Makefile.in: Add WARN_CFLAGS. Update configury
10272 dependencies.
10273 * configure.in: Check for <string.h>
10274 * configure: Regenerate.
10275 * config.in: Regenerate.
10276 * gdbreplay.c: Include needed system headers.
10277 (remote_open): Remove strchr prototype.
10278 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
10279 * regcache.c (supply_register): Change buf argument to const void *.
10280 (supply_register_by_name): Likewise.
10281 (collect_register): Change buf argument to void *.
10282 (collect_register_by_name): Likewise.
10283 * regcache.h: Add missing prototypes.
10284 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
10285 * server.c (handle_query): New function.
10286 (attached): New static variable, moved out of main.
10287 (main): Quiet longjmp clobber warnings.
10288 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
10289 * utils.c (error): Remove NORETURN.
10290 (fatal): Likewise.
This page took 1.347258 seconds and 4 git commands to generate.