]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/gdbserver/ChangeLog
Fix for gdb.server/non-existing-program.exp test case
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2016-09-06 Carl Love <cel@us.ibm.com>
2
3 * server.c (start_inferior): Do not call
4 function target_post_create_inferior () if the
5 inferior process has already exited.
6
7 2016-09-05 Pedro Alves <palves@redhat.com>
8
9 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
10 (COMPILE.pre, CC_LD): Use CXX directly.
11 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
12 * acinclude.m4: Don't include build-with-cxx.m4.
13 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
14 * configure: Regenerate.
15
16 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
17
18 PR gdb/19495
19 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
20 call writing data to own_buf.
21
22 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
23
24 * target.c (mywait): Call target_wait instead of
25 the_target->wait.
26 (target_wait): New function.
27
28 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
29
30 * server.c (start_inferior): New variable 'ptid'. Replace calls
31 to the_target->resume by target_continue{,_no_signal}, depending
32 on the case.
33 * target.c (target_stop_and_wait): Call target_continue_no_signal
34 instead of the_target->resume.
35 (target_continue): New function.
36
37 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
38
39 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
40
41 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
42
43 PR server/20491
44 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
45 ps_prochandle.
46 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
47 * linux-arm-low.c (ps_get_thread_area): Likewise.
48 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
49 * linux-m68k-low.c (ps_get_thread_area): Likewise.
50 * linux-mips-low.c (ps_get_thread_area): Likewise.
51 * linux-nios2-low.c (ps_get_thread_area): Likewise.
52 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
53 * linux-x86-low.c (ps_get_thread_area): Likewise.
54 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
55
56 2016-08-19 Pedro Alves <palves@redhat.com>
57
58 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
59
60 2016-08-19 Pedro Alves <palves@redhat.com>
61
62 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
63 comment. Use memcpy instead of casting through unsigned long.
64
65 2016-08-19 Pedro Alves <palves@redhat.com>
66
67 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
68 allocating around 0x80000000.
69
70 2016-08-19 Pedro Alves <palves@redhat.com>
71
72 PR gdb/20415
73 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
74 (x32-avx512-linux-ipa.o): New rules.
75 * configure.ac (x86_64-*-linux*): New x32 check.
76 * configure.srv (ipa_x32_linux_regobj): New.
77 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
78 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
79 descriptions.
80 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
81 descriptions.
82 * configure: Regenerate.
83
84 2016-08-09 Pedro Alves <palves@redhat.com>
85
86 PR gdb/18653
87 * Makefile.in (OBS): Add signals-state-save-restore.o.
88 (signals-state-save-restore.o): New rule.
89 * config.in: Regenerate.
90 * configure: Regenerate.
91 * linux-low.c: Include "signals-state-save-restore.h".
92 (linux_create_inferior): Call
93 restore_original_signals_state.
94 * server.c: Include "dispositions-save-restore.h".
95 (captured_main): Call save_original_signals_state.
96
97 2016-08-05 Pedro Alves <palves@redhat.com>
98
99 * configure: Regenerate.
100
101 2016-08-04 Yao Qi <yao.qi@linaro.org>
102
103 * linux-low.c (regsets_fetch_inferior_registers): Check
104 errno is ESRCH or not.
105
106 2016-08-02 Yao Qi <yao.qi@linaro.org>
107
108 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
109 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
110 (thread_db_load_search): Update.
111 (try_thread_db_load_1): Don't look for td_ta_event_addr,
112 td_ta_set_event and td_ta_event_getmsg.
113
114 2016-07-26 Pedro Alves <palves@redhat.com>
115
116 PR server/20414
117 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
118 of unsigned long for 64-bit registers and use uint32_t instead of
119 unsigned int for 32-bit registers.
120
121 2016-07-26 Pedro Alves <palves@redhat.com>
122
123 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
124 to 'ptrace'.
125
126 2016-07-21 Tom Tromey <tom@tromey.com>
127
128 * configure: Rebuild.
129
130 2016-07-21 Yao Qi <yao.qi@linaro.org>
131
132 * mem-break.c (find_gdb_breakpoint): Cast bp to
133 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
134
135 2016-07-21 Yao Qi <yao.qi@linaro.org>
136
137 * server.c (handle_v_requests): Support s and S actions
138 if target_supports_software_single_step return true.
139
140 2016-07-21 Yao Qi <yao.qi@linaro.org>
141
142 * linux-low.c (resume_stopped_resumed_lwps): If resume request
143 is resume_step, call maybe_hw_step.
144 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
145 and unstop them.
146 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
147 breakpoints or not.
148 (proceed_one_lwp): If resume request is resume_step, install
149 reinsert breakpoints and call maybe_hw_step.
150
151 2016-07-21 Yao Qi <yao.qi@linaro.org>
152
153 * linux-low.c (proceed_one_lwp): Declare.
154 (linux_resume_one_thread): Remove local variable 'step'.
155 Lift code enqueue signal. Call proceed_one_lwp instead of
156 linux_resume_one_lwp.
157
158 2016-07-21 Yao Qi <yao.qi@linaro.org>
159
160 * linux-low.c (linux_resume_one_thread): Call
161 enqueue_pending_signal.
162
163 2016-07-21 Yao Qi <yao.qi@linaro.org>
164
165 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
166 * inferiors.c (do_restore_current_thread_cleanup): New function.
167 (make_cleanup_restore_current_thread): Likewise.
168 * linux-low.c (install_software_single_step_breakpoints): Call
169 make_cleanup_restore_current_thread. Switch current_thread to
170 thread.
171
172 2016-07-21 Yao Qi <yao.qi@linaro.org>
173
174 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
175 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
176 (clone_one_breakpoint): Likewise.
177 (delete_reinsert_breakpoints): Change parameter to thread.
178 Callers updated.
179 (has_reinsert_breakpoints): Likewise.
180 (uninsert_reinsert_breakpoints): Likewise.
181 (reinsert_reinsert_breakpoints): Likewise.
182 * mem-break.h (set_reinsert_breakpoint): Update declaration.
183 (delete_reinsert_breakpoints): Likewise.
184 (reinsert_reinsert_breakpoints): Likewise.
185 (uninsert_reinsert_breakpoints): Likewise.
186 (has_reinsert_breakpoints): Likewise.
187
188 2016-07-21 Yao Qi <yao.qi@linaro.org>
189
190 * inferiors.c (get_thread_process): Make parameter const.
191 * inferiors.h (get_thread_process): Update declaration.
192 * mem-break.c (clone_all_breakpoints): Remove all parameters.
193 Add new parameters child_thread and parent_thread. Callers
194 updated.
195 * mem-break.h (clone_all_breakpoints): Update declaration.
196
197 2016-07-21 Yao Qi <yao.qi@linaro.org>
198
199 * mem-break.c (struct breakpoint) <cond_list>: Remove.
200 <command_list, handler>: Remove.
201 (struct gdb_breakpoint): New.
202 (struct other_breakpoint): New.
203 (struct reinsert_breakpoint): New.
204 (is_gdb_breakpoint): New function.
205 (any_persistent_commands): Update command_list if
206 is_gdb_breakpoint returns true.
207 (set_breakpoint): Create breakpoints according to their types.
208 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
209 (set_gdb_breakpoint_1): Likewise.
210 (set_gdb_breakpoint): Likewise.
211 (clear_breakpoint_conditions): Change parameter type to
212 'struct gdb_breakpoint *'.
213 (clear_breakpoint_commands): Likewise.
214 (clear_breakpoint_conditions_and_commands): Likewise.
215 (add_condition_to_breakpoint): Likewise.
216 (add_breakpoint_condition): Likewise.
217 (add_commands_to_breakpoint): Likewise.
218 (check_breakpoints): Check other_breakpoint.
219 (clone_one_breakpoint): Clone breakpopint according to its type.
220 * mem-break.h (struct gdb_breakpoint): Declare.
221 (set_gdb_breakpoint): Update declaration.
222 (clear_breakpoint_conditions_and_commands): Likewise.
223 (add_breakpoint_condition): Likewise.
224 (add_breakpoint_commands): Likewise.
225 * server.c (process_point_options): Change parameter type to
226 'struct gdb_breakpoint *'.
227
228 2016-07-21 Yao Qi <yao.qi@linaro.org>
229
230 * mem-break.c (set_breakpoint_at): Rename it to ...
231 (set_breakpoint_type_at): ... it.
232 (set_breakpoint_at): Call set_breakpoint_type_at.
233 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
234 * mem-break.h (set_breakpoint_at): Update comments.
235
236 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
237
238 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
239 to buf parameter.
240 (nios2_store_gregset): Likewise.
241
242 2016-07-01 Pedro Alves <palves@redhat.com>
243 Antoine Tremblay <antoine.tremblay@ericsson.com>
244
245 * linux-low.c: Change interface to take the target lwp_info
246 pointer directly and return void. Handle detaching from a zombie
247 thread.
248 (linux_detach_lwp_callback): New function.
249 (linux_detach): Detach from the leader thread after detaching from
250 the clone threads.
251
252 2016-06-28 Yao Qi <yao.qi@linaro.org>
253
254 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
255 for variable new_offset.
256 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
257 (aarch64_ftrace_insn_reloc_cb): Likewise.
258 (aarch64_ftrace_insn_reloc_tb): Likewise.
259 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
260 PRIx64 instead of PRIx32.
261
262 2016-06-28 Yao Qi <yao.qi@linaro.org>
263
264 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
265 (the_low_target): Install arm_get_syscall_trapinfo.
266
267 2016-06-28 Yao Qi <yao.qi@linaro.org>
268
269 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
270 function.
271 (the_low_target): Install aarch64_get_syscall_trapinfo.
272
273 2016-06-28 Yao Qi <yao.qi@linaro.org>
274
275 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
276 Callers updated.
277 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
278 Remove parameter sysno.
279 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
280 sysret.
281
282 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
283
284 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
285 (s390_emit_ne_goto): Likewise.
286 (s390_emit_lt_goto): Likewise.
287 (s390_emit_le_goto): Likewise.
288 (s390_emit_gt_goto): Likewise.
289 (s390_emit_ge_goto): Likewise.
290 (s390x_emit_eq_goto): Likewise.
291 (s390x_emit_ne_goto): Likewise.
292 (s390x_emit_lt_goto): Likewise.
293 (s390x_emit_le_goto): Likewise.
294 (s390x_emit_gt_goto): Likewise.
295 (s390x_emit_ge_goto): Likewise.
296 (s390_emit_ops_impl): Mark variable static.
297 (s390x_emit_ops): Likewise.
298
299 2016-06-17 Yao Qi <yao.qi@linaro.org>
300
301 * linux-low.c (handle_extended_wait): Call
302 uninsert_reinsert_breakpoints for the parent process. Remove
303 reinsert breakpoints from the child process. Reinsert them to
304 the parent process when vfork is done.
305 * mem-break.c (uninsert_reinsert_breakpoints): New function.
306 (reinsert_reinsert_breakpoints): New function.
307 * mem-break.h (uninsert_reinsert_breakpoints): Declare
308 (reinsert_reinsert_breakpoints): Declare.
309
310 2016-06-17 Yao Qi <yao.qi@linaro.org>
311
312 * linux-low.c (handle_extended_wait): If the parent is doing
313 step-over, remove the reinsert breakpoints from the forked child.
314
315 2016-06-17 Yao Qi <yao.qi@linaro.org>
316
317 * linux-low.c (unsuspend_all_lwps): Declare.
318 (linux_low_filter_event): If thread exited, call finish_step_over.
319 If step-over is finished, unsuspend other threads.
320
321 2016-06-17 Yao Qi <yao.qi@linaro.org>
322
323 * linux-low.c (linux_resume_one_lwp_throw): Assert
324 has_reinsert_breakpoints returns false.
325 * mem-break.c (delete_disabled_breakpoints): Assert
326 bp type isn't reinsert_breakpoint.
327
328 2016-06-17 Yao Qi <yao.qi@linaro.org>
329
330 * linux-low.c (maybe_hw_step): New function.
331 (linux_resume_one_lwp_throw): Call maybe_hw_step.
332 (finish_step_over): Switch current_thread to lwp temporarily,
333 and assert has_reinsert_breakpoints returns true.
334 (proceed_one_lwp): Call maybe_hw_step.
335 * mem-break.c (has_reinsert_breakpoints): New function.
336 * mem-break.h (has_reinsert_breakpoints): Declare.
337
338 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
339
340 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
341
342 2016-05-17 Yao Qi <yao.qi@linaro.org>
343
344 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
345 instead of find_inferior.
346
347 2016-05-05 Yao Qi <yao.qi@linaro.org>
348
349 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
350 Initialize res to zero.
351
352 2016-05-05 Yao Qi <yao.qi@linaro.org>
353
354 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
355 to uint32_t.
356
357 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
358
359 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
360 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
361 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
362
363 2016-04-28 Par Olsson <par.olsson@windriver.com>
364 Simon Marchi <simon.marchi@ericsson.com>
365
366 * tracepoint.c (write_inferior_int8): New function.
367 (cmd_qtenable_disable): Write enable flag using
368 write_inferior_int8.
369
370 2016-04-25 Yao Qi <yao.qi@linaro.org>
371
372 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
373 (need_step_over_p): Return zero if the LWP has pending signals
374 can be delivered on software single step target.
375
376 2016-04-25 Yao Qi <yao.qi@linaro.org>
377
378 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
379 return instead of error.
380
381 2016-04-22 Yao Qi <yao.qi@linaro.org>
382
383 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
384 to 23.
385
386 2016-04-22 Yao Qi <yao.qi@linaro.org>
387
388 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
389 signal when stepping over breakpoint with software single
390 step.
391
392 2016-04-21 Pedro Alves <palves@redhat.com>
393
394 * linux-s390-low.c (s390_collect_ptrace_register)
395 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
396 add casts.
397 (s390_check_regset): Use void * instead of gdb_byte *.
398
399 2016-04-20 Pedro Alves <palves@redhat.com>
400
401 * configure: Renegerate.
402
403 2016-04-20 Yao Qi <yao.qi@linaro.org>
404
405 * linux-aarch32-low.c: Include "arch/arm-linux.h".
406 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
407 number 16.
408 (arm_store_gregset): Likewise.
409
410 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
411
412 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
413 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
414 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
415 (amd64-avx-mpx-linux.c): New rules.
416 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
417 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
418 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
419 (srv_amd64_regobj): Add amd64-avx-mpx.o.
420 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
421 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
422 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
423 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
424 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
425 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
426 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
427 * linux-x86-low.c (x86_linux_read_description): Add case for
428 X86_XSTATE_AVX_MPX_MASK.
429 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
430 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
431 init_registers_i386_avx_mpx_linux.
432 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
433 (initialize_low_tracepoint): Call
434 init_registers_i386_avx_mpx_linux.
435 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
436 (initialize_low_tracepoint): Call
437 init_registers_amd64_avx_mpx_linux.
438 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
439 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
440 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
441 declarations.
442
443 2016-04-18 Pedro Alves <palves@redhat.com>
444
445 * configure: Regenerate.
446
447 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
448
449 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
450 (aarch64_emit_sub): Likewise.
451
452 2016-04-12 Pedro Alves <palves@redhat.com>
453
454 * utils.c (prepare_to_throw_exception): Delete.
455
456 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
457
458 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
459
460 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
461
462 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
463
464 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
465
466 * linux-aarch64-ipa.c: Add <elf.h> include.
467 * linux-ppc-ipa.c: Add <elf.h> include.
468 * linux-s390-ipa.c: Add <elf.h> include.
469
470 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
471
472 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
473 (get_raw_reg_ptr): Likewise.
474 (get_trace_state_variable_value_ptr): Likewise.
475 (set_trace_state_variable_value_ptr): Likewise.
476 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
477 char *.
478
479 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
480 Marcin Kościelnicki <koriakin@0x04.net>
481
482 PR/17221
483 * linux-ppc-low.c (emit_insns): New function.
484 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
485 (ppc_emit_prologue): New function.
486 (ppc_emit_epilogue): New function.
487 (ppc_emit_add): New function.
488 (ppc_emit_sub): New function.
489 (ppc_emit_mul): New function.
490 (ppc_emit_lsh): New function.
491 (ppc_emit_rsh_signed): New function.
492 (ppc_emit_rsh_unsigned): New function.
493 (ppc_emit_ext): New function.
494 (ppc_emit_zero_ext): New function.
495 (ppc_emit_log_not): New function.
496 (ppc_emit_bit_and): New function.
497 (ppc_emit_bit_or): New function.
498 (ppc_emit_bit_xor): New function.
499 (ppc_emit_bit_not): New function.
500 (ppc_emit_equal): New function.
501 (ppc_emit_less_signed): New function.
502 (ppc_emit_less_unsigned): New function.
503 (ppc_emit_ref): New function.
504 (ppc_emit_const): New function.
505 (ppc_emit_reg): New function.
506 (ppc_emit_pop): New function.
507 (ppc_emit_stack_flush): New function.
508 (ppc_emit_swap): New function.
509 (ppc_emit_stack_adjust): New function.
510 (ppc_emit_call): New function.
511 (ppc_emit_int_call_1): New function.
512 (ppc_emit_void_call_2): New function.
513 (ppc_emit_if_goto): New function.
514 (ppc_emit_goto): New function.
515 (ppc_emit_eq_goto): New function.
516 (ppc_emit_ne_goto): New function.
517 (ppc_emit_lt_goto): New function.
518 (ppc_emit_le_goto): New function.
519 (ppc_emit_gt_goto): New function.
520 (ppc_emit_ge_goto): New function.
521 (ppc_write_goto_address): New function.
522 (ppc_emit_ops_impl): New static variable.
523 (ppc64v1_emit_prologue): New function.
524 (ppc64v2_emit_prologue): New function.
525 (ppc64_emit_epilogue): New function.
526 (ppc64_emit_add): New function.
527 (ppc64_emit_sub): New function.
528 (ppc64_emit_mul): New function.
529 (ppc64_emit_lsh): New function.
530 (ppc64_emit_rsh_signed): New function.
531 (ppc64_emit_rsh_unsigned): New function.
532 (ppc64_emit_ext): New function.
533 (ppc64_emit_zero_ext): New function.
534 (ppc64_emit_log_not): New function.
535 (ppc64_emit_bit_and): New function.
536 (ppc64_emit_bit_or): New function.
537 (ppc64_emit_bit_xor): New function.
538 (ppc64_emit_bit_not): New function.
539 (ppc64_emit_equal): New function.
540 (ppc64_emit_less_signed): New function.
541 (ppc64_emit_less_unsigned): New function.
542 (ppc64_emit_ref): New function.
543 (ppc64_emit_const): New function.
544 (ppc64v1_emit_reg): New function.
545 (ppc64v2_emit_reg): New function.
546 (ppc64_emit_pop): New function.
547 (ppc64_emit_stack_flush): New function.
548 (ppc64_emit_swap): New function.
549 (ppc64v1_emit_call): New function.
550 (ppc64v2_emit_call): New function.
551 (ppc64v1_emit_int_call_1): New function.
552 (ppc64v2_emit_int_call_1): New function.
553 (ppc64v1_emit_void_call_2): New function.
554 (ppc64v2_emit_void_call_2): New function.
555 (ppc64_emit_if_goto): New function.
556 (ppc64_emit_eq_goto): New function.
557 (ppc64_emit_ne_goto): New function.
558 (ppc64_emit_lt_goto): New function.
559 (ppc64_emit_le_goto): New function.
560 (ppc64_emit_gt_goto): New function.
561 (ppc64_emit_ge_goto): New function.
562 (ppc64v1_emit_ops_impl): New static variable.
563 (ppc64v2_emit_ops_impl): New static variable.
564 (ppc_emit_ops): New function.
565 (linux_low_target): Wire in ppc_emit_ops.
566
567 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
568 Marcin Kościelnicki <koriakin@0x04.net>
569
570 PR/17221
571 * Makefile.in: Add powerpc-*-ipa.o
572 * configure.srv: Add ipa_obj for powerpc*-linux.
573 * linux-ppc-ipa.c: New file.
574 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
575 includes.
576 (PPC_FIELD): New macro.
577 (PPC_SEXT): New macro.
578 (PPC_OP6): New macro.
579 (PPC_BO): New macro.
580 (PPC_LI): New macro.
581 (PPC_BD): New macro.
582 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
583 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
584 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
585 (ppc_get_thread_area): New function.
586 (is_elfv2_inferior): New function.
587 (gen_ds_form): New function.
588 (GEN_STD): New macro.
589 (GEN_STDU): New macro.
590 (GEN_LD): New macro.
591 (GEN_LDU): New macro.
592 (gen_d_form): New function.
593 (GEN_ADDI): New macro.
594 (GEN_ADDIS): New macro.
595 (GEN_LI): New macro.
596 (GEN_LIS): New macro.
597 (GEN_ORI): New macro.
598 (GEN_ORIS): New macro.
599 (GEN_LWZ): New macro.
600 (GEN_STW): New macro.
601 (GEN_STWU): New macro.
602 (gen_xfx_form): New function.
603 (GEN_MFSPR): New macro.
604 (GEN_MTSPR): New macro.
605 (GEN_MFCR): New macro.
606 (GEN_MTCR): New macro.
607 (GEN_SYNC): New macro.
608 (GEN_LWSYNC): New macro.
609 (gen_x_form): New function.
610 (GEN_OR): New macro.
611 (GEN_MR): New macro.
612 (GEN_LWARX): New macro.
613 (GEN_STWCX): New macro.
614 (GEN_CMPW): New macro.
615 (gen_md_form): New function.
616 (GEN_RLDICL): New macro.
617 (GEN_RLDICR): New macro.
618 (gen_i_form): New function.
619 (GEN_B): New macro.
620 (GEN_BL): New macro.
621 (gen_b_form): New function.
622 (GEN_BNE): New macro.
623 (GEN_LOAD): New macro.
624 (GEN_STORE): New macro.
625 (gen_limm): New function.
626 (gen_atomic_xchg): New function.
627 (gen_call): New function.
628 (ppc_relocate_instruction): New function.
629 (ppc_install_fast_tracepoint_jump_pad): New function.
630 (ppc_get_min_fast_tracepoint_insn_len): New function.
631 (ppc_get_ipa_tdesc_idx): New function.
632 (the_low_target): Wire in the new functions.
633 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
634 tdescs.
635 * linux-ppc-tdesc.h: New file.
636
637 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
638
639 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
640 (alloc_jump_pad_buffer): New function.
641 * linux-amd64-ipa.c: Add <sys/mman.h> include.
642 (alloc_jump_pad_buffer): New function.
643 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
644 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
645 (alloc_jump_pad_buffer): New function.
646 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
647 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
648 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
649 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
650
651 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
652
653 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
654 * linux-amd64-ipa.c: Likewise.
655 * linux-i386-ipa.c: Likewise.
656 * linux-s390-ipa.c: Likewise.
657 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
658 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
659 set_trace_state_variable_value_ptr.
660 (struct ipa_sym_addresses): Likewise.
661 (symbol_list): Likewise.
662 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
663 accessing gdb_collect directly.
664 (gdb_collect_ptr_type): New typedef.
665 (get_raw_reg_ptr_type): New typedef.
666 (get_trace_state_variable_value_ptr_type): New typedef.
667 (set_trace_state_variable_value_ptr_type): New typedef.
668 (gdb_collect_ptr): New global.
669 (get_raw_reg_ptr): New global.
670 (get_trace_state_variable_value_ptr): New global.
671 (set_trace_state_variable_value_ptr): New global.
672 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
673 accessing get_raw_reg directly.
674 (get_get_tsv_func_addr): Likewise for
675 get_trace_state_variable_value_ptr.
676 (get_set_tsv_func_addr): Likewise for
677 set_trace_state_variable_value_ptr.
678 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
679
680 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
681
682 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
683
684 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
685
686 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
687 packets.
688 (relocate_instruction): Remove own_buf.
689 * server.c (own_buf): Make global.
690 (handle_v_requests): Make global.
691 * server.h (own_buf): New declaration.
692 (handle_v_requests): New prototype.
693
694 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
695
696 PR 18377
697 * linux-s390-low.c (add_insns): New function.
698 (s390_emit_prologue): New function.
699 (s390_emit_epilogue): New function.
700 (s390_emit_add): New function.
701 (s390_emit_sub): New function.
702 (s390_emit_mul): New function.
703 (s390_emit_lsh): New function.
704 (s390_emit_rsh_signed): New function.
705 (s390_emit_rsh_unsigned): New function.
706 (s390_emit_ext): New function.
707 (s390_emit_log_not): New function.
708 (s390_emit_bit_and): New function.
709 (s390_emit_bit_or): New function.
710 (s390_emit_bit_xor): New function.
711 (s390_emit_bit_not): New function.
712 (s390_emit_equal): New function.
713 (s390_emit_less_signed): New function.
714 (s390_emit_less_unsigned): New function.
715 (s390_emit_ref): New function.
716 (s390_emit_if_goto): New function.
717 (s390_emit_goto): New function.
718 (s390_write_goto_address): New function.
719 (s390_emit_litpool): New function.
720 (s390_emit_const): New function.
721 (s390_emit_call): New function.
722 (s390_emit_reg): New function.
723 (s390_emit_pop): New function.
724 (s390_emit_stack_flush): New function.
725 (s390_emit_zero_ext): New function.
726 (s390_emit_swap): New function.
727 (s390_emit_stack_adjust): New function.
728 (s390_emit_set_r2): New function.
729 (s390_emit_int_call_1): New function.
730 (s390_emit_void_call_2): New function.
731 (s390_emit_eq_goto): New function.
732 (s390_emit_ne_goto): New function.
733 (s390_emit_lt_goto): New function.
734 (s390_emit_le_goto): New function.
735 (s390_emit_gt_goto): New function.
736 (s390_emit_ge_goto): New function.
737 (s390x_emit_prologue): New function.
738 (s390x_emit_epilogue): New function.
739 (s390x_emit_add): New function.
740 (s390x_emit_sub): New function.
741 (s390x_emit_mul): New function.
742 (s390x_emit_lsh): New function.
743 (s390x_emit_rsh_signed): New function.
744 (s390x_emit_rsh_unsigned): New function.
745 (s390x_emit_ext): New function.
746 (s390x_emit_log_not): New function.
747 (s390x_emit_bit_and): New function.
748 (s390x_emit_bit_or): New function.
749 (s390x_emit_bit_xor): New function.
750 (s390x_emit_bit_not): New function.
751 (s390x_emit_equal): New function.
752 (s390x_emit_less_signed): New function.
753 (s390x_emit_less_unsigned): New function.
754 (s390x_emit_ref): New function.
755 (s390x_emit_if_goto): New function.
756 (s390x_emit_const): New function.
757 (s390x_emit_call): New function.
758 (s390x_emit_reg): New function.
759 (s390x_emit_pop): New function.
760 (s390x_emit_stack_flush): New function.
761 (s390x_emit_zero_ext): New function.
762 (s390x_emit_swap): New function.
763 (s390x_emit_stack_adjust): New function.
764 (s390x_emit_int_call_1): New function.
765 (s390x_emit_void_call_2): New function.
766 (s390x_emit_eq_goto): New function.
767 (s390x_emit_ne_goto): New function.
768 (s390x_emit_lt_goto): New function.
769 (s390x_emit_le_goto): New function.
770 (s390x_emit_gt_goto): New function.
771 (s390x_emit_ge_goto): New function.
772 (s390_emit_ops): New function.
773 (struct linux_target_ops): Fill in emit_ops hook.
774
775 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
776
777 PR 18377
778 * Makefile.in: Add s390 IPA files.
779 * configure.srv: Build IPA for s390.
780 * linux-s390-ipa.c: New file.
781 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
782 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
783 (tdesc_s390_linux32): Likewise.
784 (init_registers_s390_linux32v1): Likewise.
785 (tdesc_s390_linux32v1): Likewise.
786 (init_registers_s390_linux32v2): Likewise.
787 (tdesc_s390_linux32v2): Likewise.
788 (init_registers_s390_linux64): Likewise.
789 (tdesc_s390_linux64): Likewise.
790 (init_registers_s390_linux64v1): Likewise.
791 (tdesc_s390_linux64v1): Likewise.
792 (init_registers_s390_linux64v2): Likewise.
793 (tdesc_s390_linux64v2): Likewise.
794 (init_registers_s390_te_linux64): Likewise.
795 (tdesc_s390_te_linux64): Likewise.
796 (init_registers_s390_vx_linux64): Likewise.
797 (tdesc_s390_vx_linux64): Likewise.
798 (init_registers_s390_tevx_linux64): Likewise.
799 (tdesc_s390_tevx_linux64): Likewise.
800 (init_registers_s390x_linux64): Likewise.
801 (tdesc_s390x_linux64): Likewise.
802 (init_registers_s390x_linux64v1): Likewise.
803 (tdesc_s390x_linux64v1): Likewise.
804 (init_registers_s390x_linux64v2): Likewise.
805 (tdesc_s390x_linux64v2): Likewise.
806 (init_registers_s390x_te_linux64): Likewise.
807 (tdesc_s390x_te_linux64): Likewise.
808 (init_registers_s390x_vx_linux64): Likewise.
809 (tdesc_s390x_vx_linux64): Likewise.
810 (init_registers_s390x_tevx_linux64): Likewise.
811 (tdesc_s390x_tevx_linux64): Likewise.
812 (have_hwcap_s390_vx): New static variable.
813 (s390_arch_setup): Fill have_hwcap_s390_vx.
814 (s390_get_thread_area): New function.
815 (s390_ft_entry_gpr_esa): New const.
816 (s390_ft_entry_gpr_zarch): New const.
817 (s390_ft_entry_misc): New const.
818 (s390_ft_entry_fr): New const.
819 (s390_ft_entry_vr): New const.
820 (s390_ft_main_31): New const.
821 (s390_ft_main_64): New const.
822 (s390_ft_exit_fr): New const.
823 (s390_ft_exit_vr): New const.
824 (s390_ft_exit_misc): New const.
825 (s390_ft_exit_gpr_esa): New const.
826 (s390_ft_exit_gpr_zarch): New const.
827 (append_insns): New function.
828 (s390_relocate_instruction): New function.
829 (s390_install_fast_tracepoint_jump_pad): New function.
830 (s390_get_min_fast_tracepoint_insn_len): New function.
831 (s390_get_ipa_tdesc_idx): New function.
832 (struct linux_target_ops): Wire in the above functions.
833 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
834 * linux-s390-tdesc.h: New file.
835
836 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
837
838 * linux-s390-low.c (s390_supports_tracepoints): New function.
839 (struct linux_target_ops): Fill supports_tracepoints hook.
840
841 2016-03-18 Yao Qi <yao.qi@linaro.org>
842
843 * linux-low.c (lwp_signal_can_be_delivered): New function.
844 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
845
846 2016-03-18 Yao Qi <yao.qi@linaro.org>
847
848 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
849 0 if signal is enqueued. Remove 'signal' from one debugging
850 message. Move one debugging message to some lines below.
851 Remove code setting 'signal' to 0.
852
853 2016-03-18 Yao Qi <yao.qi@linaro.org>
854
855 * linux-low.c (linux_low_filter_event): Remove redundant
856 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
857
858 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
859
860 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
861 (struct linux_target_ops): Wire in the above.
862
863 2016-03-03 Yao Qi <yao.qi@linaro.org>
864
865 * linux-low.c: Update comments to start_step_over.
866
867 2016-03-03 Yao Qi <yao.qi@linaro.org>
868
869 PR server/19736
870 * linux-low.c (handle_extended_wait): Set child suspended
871 if event_lwp->bp_reinsert isn't zero.
872
873 2016-03-02 Yao Qi <yao.qi@linaro.org>
874
875 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
876 enqueue_pending_signal.
877
878 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
879
880 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
881 is actually loaded.
882
883 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
884
885 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
886 (s390_regmap_3264) [!__s390x__]: New global.
887 (s390_collect_ptrace_register): Skip map entries containing -1.
888 (s390_supply_ptrace_register): Ditto.
889 (s390_fill_gprs_high): New function.
890 (s390_store_gprs_high): New function.
891 (s390_regsets): Add NT_S390_HIGH_GPRS.
892 (s390_get_hwcap): Enable on 31-bit.
893 (have_hwcap_s390_high_gprs): Enable on 31-bit.
894 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
895 Detect NT_S390_HIGH_GPRS.
896 (s390_usrregs_info_3264): Enable on 31-bit.
897 (s390_regs_info): Enable regs_info_3264 on 31-bit.
898 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
899
900 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
901
902 PR gdb/13808
903 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
904 * configure.srv: Ditto.
905 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
906 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
907 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
908 (init_registers_amd64_linux): Remove prototype.
909 (tdesc_amd64_linux): Remove declaration.
910 (get_ipa_tdesc): New function.
911 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
912 initialize remaining tdescs.
913 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
914 (init_registers_i386_linux): Remove prototype.
915 (tdesc_i386_linux): Remove declaration.
916 (get_ipa_tdesc): New function.
917 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
918 initialize remaining tdescs.
919 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
920 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
921 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
922 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
923 (x86_get_ipa_tdesc_idx): New function.
924 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
925 * linux-x86-tdesc.h: New file.
926 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
927 (target_get_ipa_tdesc_idx): New macro.
928 * tracepoint.c (ipa_tdesc_idx): New macro.
929 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
930 (symbol_list): Add ipa_tdesc_idx.
931 (cmd_qtstart): Write ipa_tdesc_idx in the target.
932 (ipa_tdesc): Remove.
933 (ipa_tdesc_idx): New variable.
934 (get_context_regcache): Use get_ipa_tdesc.
935 (gdb_collect): Ditto.
936 (gdb_probe): Ditto.
937 * tracepoint.h (get_ipa_tdesc): New prototype.
938 (ipa_tdesc): Remove.
939
940 2016-02-24 Pedro Alves <palves@redhat.com>
941
942 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
943 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
944 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
945 Factor out common code between the USE_SIGTRAP_SIGINFO and
946 !USE_SIGTRAP_SIGINFO blocks.
947 (linux_low_filter_event): Call save_stop_reason instead of
948 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
949 Update comments.
950 (linux_wait_1): Update comments.
951
952 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
953
954 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
955 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
956 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
957 ppc_insert_point, ppc_remove_point.
958
959 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
960
961 * linux-s390-low.c (s390_supports_z_point_type): New function.
962 (struct linux_target_ops): Wire s390_supports_z_point_type in.
963
964 2016-02-16 Yao Qi <yao.qi@linaro.org>
965
966 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
967 PC. Get pc from regcache_read_pc.
968
969 2016-02-12 Yao Qi <yao.qi@linaro.org>
970
971 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
972 or linux_get_pc_32bit.
973 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
974
975 2016-02-12 Yao Qi <yao.qi@linaro.org>
976
977 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
978 arm_linux_get_next_pcs_fixup.
979
980 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
981
982 * tracepoint.c (x_tracepoint_action_download): Change
983 write_inferior_data_ptr to write_inferior_data_pointer.
984 (cmd_qtstart): Likewise.
985 (write_inferior_data_ptr): Remove.
986 (download_agent_expr): Change write_inferior_data_ptr to
987 write_inferior_data_pointer.
988 (download_tracepoint_1): Likewise.
989 (download_tracepoint): Likewise.
990 (download_trace_state_variables): Likewise.
991
992 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
993 Marcin Kościelnicki <koriakin@0x04.net>
994
995 * tracepoint.c (struct tracepoint_action_ops): Remove.
996 (struct tracepoint_action): Remove ops.
997 (m_tracepoint_action_download, r_tracepoint_action_download)
998 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
999 size and offset accordingly.
1000 (m_tracepoint_action_ops, r_tracepoint_action_ops)
1001 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
1002 (tracepoint_action_send, tracepoint_action_download): New functions.
1003 Helpers for trace action handlers.
1004 (add_tracepoint_action): Remove setup actions ops.
1005 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
1006
1007 2016-02-10 Yao Qi <yao.qi@linaro.org>
1008
1009 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
1010
1011 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1012
1013 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
1014 to AC_OUTPUT.
1015 * configure: Regenerate.
1016
1017 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1018
1019 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
1020 void * to gdb_byte *.
1021 * linux-low.c (siginfo_fixup): Likewise.
1022 (linux_xfer_siginfo): Likewise.
1023 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
1024 Likewise.
1025 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1026
1027 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
1028
1029 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
1030 to srv_tgtobj.
1031 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
1032 to srv_tgtobj.
1033 * linux-x86-low.c [__x86_64__]: Include
1034 "nat/amd64-linux-siginfo.h".
1035 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
1036 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
1037 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
1038 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
1039 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
1040 (cpt_si_fd, si_timerid, si_overrun): Move from
1041 nat/amd64-linux-siginfo.c.
1042 * Makefile.in (amd64-linux-siginfo.o:): New rule.
1043
1044 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
1045
1046 * server.c (skip_to_semicolon): Remove.
1047 (process_point_options): Use strchrnul instead of
1048 skip_to_semicolon.
1049
1050 2016-01-26 Yao Qi <yao.qi@linaro.org>
1051
1052 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
1053 * linux-low.c (install_software_single_step_breakpoints): Don't
1054 call regcache_read_pc.
1055 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
1056 argument pc.
1057
1058 2016-01-26 Yao Qi <yao.qi@linaro.org>
1059
1060 * linux-low.c (install_software_single_step_breakpoints): Call
1061 regcache_read_pc instead of get_pc.
1062
1063 2016-01-26 Yao Qi <yao.qi@linaro.org>
1064
1065 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
1066 (unblock_async_io): Rename to ...
1067 (block_unblock_async_io): ... it. New function.
1068 (enable_async_io): Don't install SIGIO handler. Unblock it
1069 instead.
1070 (disable_async_io): Don't ignore SIGIO. Block it instead.
1071 (initialize_async_io): Install SIGIO handler. Don't call
1072 unblock_async_io.
1073
1074 2016-01-26 Yao Qi <yao.qi@linaro.org>
1075
1076 * remote-utils.c (getpkt): If the buffer isn't empty, and the
1077 first character is '\003', call *the_target->request_interrupt.
1078
1079 2016-01-25 Yao Qi <yao.qi@linaro.org>
1080
1081 * remote-utils.c (new_thread_notify): Remove.
1082 (dead_thread_notify): Likewise.
1083 * remote-utils.h (new_thread_notify): Remove declaration.
1084 (dead_thread_notify): Likewise.
1085
1086 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
1087
1088 * gdb.trace/pending.exp: Fix expected message on continue.
1089
1090 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
1091
1092 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
1093 it works properly on big-endian machines where sizeof (CORE_ADDR)
1094 != sizeof (void *).
1095
1096 2016-01-21 Pedro Alves <palves@redhat.com>
1097
1098 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
1099 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
1100 * configure: Regenerate.
1101
1102 2016-01-21 Yao Qi <yao.qi@linaro.org>
1103
1104 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
1105 is_thumb and set it according to CPSR saved on the stack.
1106 (get_next_pcs_syscall_next_pc): Pass is_thumb to
1107 arm_sigreturn_next_pc.
1108
1109 2016-01-18 Yao Qi <yao.qi@linaro.org>
1110
1111 * linux-low.c (linux_set_pc_64bit): New function.
1112 (linux_get_pc_64bit): New function.
1113 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
1114 Declare.
1115 * linux-sparc-low.c (debug_threads): Remove declaration.
1116 (sparc_get_pc): Remove.
1117 (the_low_target): Use linux_get_pc_64bit instead of
1118 sparc_get_pc.
1119 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
1120 (the_low_target): Use linux_get_pc_64bit and
1121 linux_set_pc_64bit.
1122
1123 2016-01-18 Yao Qi <yao.qi@linaro.org>
1124
1125 * linux-arm-low.c (debug_threads): Remove declaration.
1126 (arm_get_pc, arm_set_pc): Remove.
1127 (the_low_target): Use linux_get_pc_32bit and
1128 linux_set_pc_32bit.
1129 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
1130 (the_low_target): Use linux_get_pc_32bit and
1131 linux_set_pc_32bit.
1132 * linux-cris-low.c (debug_threads): Remove declaration.
1133 (cris_get_pc, cris_set_pc,): Remove.
1134 (the_low_target): Use linux_get_pc_32bit and
1135 linux_set_pc_32bit.
1136 * linux-crisv32-low.c (debug_threads): Remove declaration.
1137 (cris_get_pc, cris_set_pc): Remove.
1138 (the_low_target): Use linux_get_pc_32bit and
1139 linux_set_pc_32bit.
1140 * linux-low.c: Include inttypes.h.
1141 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
1142 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
1143 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
1144 (the_low_target): Use linux_get_pc_32bit and
1145 linux_set_pc_32bit.
1146 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
1147 (the_low_target): Use linux_get_pc_32bit and
1148 linux_set_pc_32bit.
1149 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
1150 (the_low_target): Use linux_get_pc_32bit and
1151 linux_set_pc_32bit.
1152 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
1153 (the_low_target): Use linux_get_pc_32bit and
1154 linux_set_pc_32bit.
1155 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
1156 (the_low_target): Use linux_get_pc_32bit and
1157 linux_set_pc_32bit.
1158
1159 2016-01-18 Gary Benson <gbenson@redhat.com>
1160
1161 * configure.ac (AC_FUNC_FORK): New check.
1162 * config.in: Regenerate.
1163 * configure: Likewise.
1164
1165 2016-01-14 Yao Qi <yao.qi@linaro.org>
1166
1167 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
1168 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
1169 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
1170 arm_get_next_pcs_ctor.
1171
1172 2016-01-12 Josh Stone <jistone@redhat.com>
1173 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1174
1175 * inferiors.h: Include "gdb_vecs.h".
1176 (struct process_info): Add syscalls_to_catch.
1177 * inferiors.c (remove_process): Free syscalls_to_catch.
1178 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
1179 syscall_return stops.
1180 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
1181 * server.c (handle_general_set): Handle QCatchSyscalls.
1182 (handle_query): Report support for QCatchSyscalls.
1183 * target.h (struct target_ops): Add supports_catch_syscall.
1184 (target_supports_catch_syscall): New macro.
1185 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
1186 (struct lwp_info): Add syscall_state.
1187 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
1188 Maintain syscall_state and syscalls_to_catch across exec.
1189 (get_syscall_trapinfo): New function, proxy to the_low_target.
1190 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
1191 (linux_low_filter_event): Toggle syscall_state entry/return for
1192 syscall traps, and set it ignored for all others.
1193 (gdb_catching_syscalls_p): New function.
1194 (gdb_catch_this_syscall_p): New function.
1195 (linux_wait_1): Handle SYSCALL_SIGTRAP.
1196 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
1197 (linux_supports_catch_syscall): New function.
1198 (linux_target_ops): Install it.
1199 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
1200 (the_low_target): Install it.
1201
1202 2016-01-12 Mike Frysinger <vapier@gentoo.org>
1203
1204 * acinclude.m4: Include new ../warning.m4 file.
1205 * configure: Regenerated.
1206 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
1207
1208 2016-01-12 Mike Frysinger <vapier@gentoo.org>
1209
1210 * ax.c (is_goto_target): Mark static.
1211 * linux-low.c (register_addr): Likewise.
1212 (linux_fetch_registers, linux_store_registers): Likewise.
1213 * mem-break.c (any_persistent_commands): Fix old prototype.
1214 (add_commands_to_breakpoint): Mark static.
1215 * regcache.c (find_register_by_name): Delete unused func.
1216 * remote-utils.c (hex_or_minus_one): Mark static.
1217 * server.c (monitor_show_help): Mark static.
1218 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
1219 handle_v_requests): Likewise.
1220
1221 2016-01-12 Pedro Alves <palves@redhat.com>
1222
1223 Remove use of the registered trademark symbol throughout.
1224
1225 2016-01-08 Yao Qi <yao.qi@linaro.org>
1226
1227 * remote-utils.c (getpkt): If c is '\003', call target hook
1228 request_interrupt.
1229
1230 2016-01-06 Yao Qi <yao.qi@linaro.org>
1231
1232 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
1233 linux-aarch32-low.c.
1234 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1235 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1236 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1237 (thumb2_breakpoint): Declare.
1238 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
1239 linux-aarch32-low.h.
1240 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1241 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1242 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1243
1244 2016-01-01 Joel Brobecker <brobecker@adacore.com>
1245
1246 * gdbreplay.c (gdbreplay_version): Change copyright year in
1247 version message.
1248 * server.c (gdbserver_version): Likewise.
1249
1250 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
1251
1252 * server.c (crc32_table): Delete.
1253 (crc32): Use libiberty's xcrc32 function.
1254
1255 2015-12-22 Joel Brobecker <brobecker@adacore.com>
1256
1257 * lynx-low.c (lynx_delete_thread_callback): New function.
1258 (lynx_mourn): Properly delete our process and all of its
1259 threads. Remove call to clear_inferiors.
1260
1261 2015-12-22 Joel Brobecker <brobecker@adacore.com>
1262
1263 * target.c (thread_search_callback): Add check that
1264 the thread_stopped target callback is not NULL before
1265 calling it.
1266
1267 2015-12-21 Yao Qi <yao.qi@linaro.org>
1268
1269 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
1270 arm breakpoint.
1271
1272 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1273
1274 * server.c (handle_query): Call target_supports_software_single_step.
1275
1276 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1277
1278 * linux-low.c (single_step): New function.
1279 (linux_resume_one_lwp_throw): Call single_step.
1280 (start_step_over): Likewise.
1281
1282 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1283
1284 * Makefile.in (SFILES): Append arch/arm-linux.c,
1285 arch/arm-get-next-pcs.c.
1286 (arm-linux.o): New rule.
1287 (arm-get-next-pcs.o): New rule.
1288 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
1289 arm-linux.o.
1290 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
1291 to linux-aarch32-low.c.
1292 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1293 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1294 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1295 (thumb2_breakpoint_len): Likewise.
1296 (arm_is_thumb_mode): Make non-static.
1297 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
1298 from linux-aarch32-low.c.
1299 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1300 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1301 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1302 (thumb2_breakpoint_len): Likewise.
1303 (arm_is_thumb_mode): New declaration.
1304 * linux-arm-low.c: Include arch/arm-linux.h
1305 aarch/arm-get-next-pcs.h, sys/syscall.h.
1306 (get_next_pcs_ops): New struct.
1307 (get_next_pcs_addr_bits_remove): New function.
1308 (get_next_pcs_is_thumb): New function.
1309 (get_next_pcs_read_memory_unsigned_integer): Likewise.
1310 (arm_sigreturn_next_pc): Likewise.
1311 (get_next_pcs_syscall_next_pc): Likewise.
1312 (arm_gdbserver_get_next_pcs): Likewise.
1313 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
1314 Initialize.
1315 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
1316 * server.h: Include gdb_vecs.h.
1317
1318 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1319
1320 * Makefile.in (SFILES): Append common/common-regcache.c.
1321 (OBS): Append common-regcache.o.
1322 (common-regcache.o): New rule.
1323 * regcache.c (init_register_cache): Initialize cache to
1324 REG_UNAVAILABLE.
1325 (regcache_raw_read_unsigned): New function.
1326 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
1327 register_status enum.
1328
1329 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1330
1331 * linux-aarch64-low.c (the_low_targets): Rename
1332 breakpoint_reinsert_addr to get_next_pcs.
1333 * linux-arm-low.c (the_low_targets): Likewise.
1334 * linux-bfin-low.c (the_low_targets): Likewise.
1335 * linux-cris-low.c (the_low_targets): Likewise.
1336 * linux-crisv32-low.c (the_low_targets): Likewise.
1337 * linux-low.c (can_software_single_step): Likewise.
1338 (install_software_single_step_breakpoints): New function.
1339 (start_step_over): Use install_software_single_step_breakpoints.
1340 * linux-low.h: New CORE_ADDR vector.
1341 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
1342 get_next_pcs.
1343 * linux-mips-low.c (the_low_targets): Likewise.
1344 * linux-nios2-low.c (the_low_targets): Likewise.
1345 * linux-sparc-low.c (the_low_targets): Likewise.
1346
1347 2015-12-17 Pedro Alves <palves@redhat.com>
1348
1349 * linux-low.c (linux_kill_one_lwp): Remove references to
1350 LinuxThreads.
1351 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
1352 to 'kill'.
1353 (linux_init_signals): Delete.
1354 (initialize_low): Adjust.
1355 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
1356
1357 2015-12-16 Pedro Alves <palves@redhat.com>
1358
1359 * configure.ac (compiler warning flags): When testing a
1360 -Wno-foo option, check whether -Wfoo works instead.
1361 * configure: Regenerate.
1362
1363 2015-12-11 Don Breazeal <donb@codesourcery.com>
1364
1365 * server.c (process_serial_event): Don't exit from gdbserver
1366 in remote mode if there are still active inferiors.
1367
1368 2015-12-11 Yao Qi <yao.qi@linaro.org>
1369
1370 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
1371 arm_breakpoint_at if the process is 32-bit.
1372
1373 2015-12-11 Yao Qi <yao.qi@linaro.org>
1374
1375 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
1376 arm breakpoint.
1377
1378 2015-12-07 Yao Qi <yao.qi@linaro.org>
1379
1380 * configure.srv: Append arm.o to srv_tgtobj for
1381 aarch64*-*-linux* target.
1382 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
1383 from linux-arm-low.c.
1384 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1385 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1386 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1387 (thumb2_breakpoint_len): Likewise.
1388 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
1389 (arm_breakpoint_kinds): Likewise.
1390 (arm_breakpoint_kind_from_pc): Likewise.
1391 (arm_sw_breakpoint_from_kind): Likewise.
1392 (arm_breakpoint_kind_from_current_state): Likewise.
1393 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
1394 (arm_sw_breakpoint_from_kind): Declare.
1395 (arm_breakpoint_kind_from_current_state): Declare.
1396 (arm_breakpoint_at): Declare.
1397 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
1398 arm_sw_breakpoint_from_kind if process is 32-bit.
1399 (aarch64_breakpoint_kind_from_pc): New function.
1400 (aarch64_breakpoint_kind_from_current_state): New function.
1401 (the_low_target): Initialize fields breakpoint_kind_from_pc
1402 and breakpoint_kind_from_current_state.
1403 * linux-arm-low.c (arm_breakpoint_kinds): Move to
1404 linux-aarch32-low.c.
1405 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
1406 (arm_breakpoint, arm_breakpoint_len): Likewise.
1407 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
1408 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1409 (arm_is_thumb_mode): Likewise.
1410 (arm_breakpoint_at): Likewise.
1411 (arm_breakpoint_kind_from_pc): Likewise.
1412 (arm_sw_breakpoint_from_kind): Likewise.
1413 (arm_breakpoint_kind_from_current_state): Likewise.
1414
1415 Revert:
1416 2015-08-04 Yao Qi <yao.qi@linaro.org>
1417
1418 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1419 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1420 * server.c (extended_protocol): Remove "static".
1421 * server.h (extended_protocol): Declare it.
1422
1423 2015-12-04 Josh Stone <jistone@redhat.com>
1424
1425 * target.h (struct target_ops) <arch_setup>: Rename to ...
1426 (struct target_ops) <post_create_inferior>: ... this.
1427 (target_arch_setup): Rename to ...
1428 (target_post_create_inferior): ... this, calling post_create_inferior.
1429 * server.c (start_inferior): Update target_arch_setup calls to
1430 target_post_create_inferior.
1431 * linux-low.c (linux_low_ptrace_options): Forward declare.
1432 (linux_arch_setup): Update its comment for general use.
1433 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
1434 (struct linux_target_ops): Use linux_post_create_inferior.
1435 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
1436 to post_create_inferior.
1437 * nto-low.c (struct nto_target_ops): Likewise.
1438 * spu-low.c (struct spu_target_ops): Likewise.
1439 * win32-low.c (struct win32_target_ops): Likewise.
1440
1441 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
1442
1443 * linux-arm-low.c: Remove duplicate arch/arm.h include.
1444
1445 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1446
1447 * linux-arm-low.c (arm_reinsert_addr): Remove function.
1448 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
1449 * linux-cris-low.c (cris_reinsert_addr> Remove function.
1450 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1451 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
1452 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1453 * linux-mips-low.c (mips_reinsert_addr): Remove function.
1454 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1455 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
1456 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1457 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
1458 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1459
1460 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1461
1462 * linux-low.c (linux_look_up_symbols): Don't call
1463 linux_supports_traceclone.
1464 * linux-low.h (thread_db_init): Remove use_events argument.
1465 * thread-db.c (thread_db_use_event): Remove global variable.
1466 (struct thread_db) <td_thr_event_enable_p>: Remove field.
1467 (struct thread_db) <td_create_bp>: Remove field.
1468 (thread_db_create_event): Remove function.
1469 (thread_db_enable_reporting): Likewise.
1470 (find_one_thread): Don't check for thread_db_use_events.
1471 (attach_thread): Likewise.
1472 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
1473 (try_thread_db_load_1): Don't check for thread_db_use_events.
1474 (thread_db_init): Remove use_events argument and thread events
1475 handling.
1476 (remove_thread_event_breakpoints): Remove function.
1477 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
1478
1479 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1480
1481 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
1482 New function.
1483 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1484 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
1485 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1486 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
1487 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
1488 Initialize.
1489 * linux-crisv32-low.c (cris_supports_hardware_single_step):
1490 New function.
1491 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1492 * linux-low.c (can_hardware_single_step): Use
1493 supports_hardware_single_step.
1494 (can_software_single_step): New function.
1495 (start_step_over): Call can_software_single_step.
1496 (linux_supports_hardware_single_step): New function.
1497 (struct target_ops) <supports_software_single_step>: Initialize.
1498 * linux-low.h (struct linux_target_ops)
1499 <supports_hardware_single_step>: Initialize.
1500 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
1501 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1502 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
1503 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
1504 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
1505 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1506 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
1507 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1508 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
1509 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
1510 Initialize.
1511 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
1512 (struct linux_target_ops) <tile_supports_hardware_single_step>:
1513 Initialize.
1514 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
1515 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1516 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
1517 New function.
1518 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1519 * target.h (struct target_ops): <supports_software_single_step>:
1520 New field.
1521 (target_supports_software_single_step): New macro.
1522
1523 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1524
1525 * linux-low.c (linux_wait_1): Fix pc advance condition.
1526 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
1527 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
1528
1529 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1530
1531 * linux-arm-low.c (arm_is_thumb_mode): New function.
1532 (arm_breakpoint_at): Use arm_is_thumb_mode.
1533 (arm_breakpoint_kind_from_current_state): New function.
1534 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
1535 Initialize.
1536 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
1537 (linux_breakpoint_kind_from_current_state): New function.
1538 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
1539 * linux-low.h (struct linux_target_ops)
1540 <breakpoint_kind_from_current_state>: New field.
1541 * target.h (struct target_ops): Likewise.
1542 (target_breakpoint_kind_from_current_state): New macro.
1543
1544 2015-11-30 Pedro Alves <palves@redhat.com>
1545
1546 * linux-low.c (linux_resume): Wake up the event loop before
1547 returning.
1548
1549 2015-11-30 Pedro Alves <palves@redhat.com>
1550
1551 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
1552 check.
1553 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
1554 to -1.
1555 * target.c (struct thread_search): New structure.
1556 (thread_search_callback): New function.
1557 (prev_general_thread): New global.
1558 (prepare_to_access_memory, done_accessing_memory): New functions.
1559 * target.h (prepare_to_access_memory, done_accessing_memory):
1560 Replace macros with function declarations.
1561
1562 2015-11-30 Pedro Alves <palves@redhat.com>
1563
1564 PR 14618
1565 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
1566 report TARGET_WAITKIND_NO_RESUMED.
1567 * remote-utils.c (prepare_resume_reply): Handle
1568 TARGET_WAITKIND_NO_RESUMED.
1569 * server.c (report_no_resumed): New global.
1570 (handle_query) <qSupported>: Handle "no-resumed+". Report
1571 "no-resumed+" support.
1572 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
1573 return error if the client doesn't support no-resumed events.
1574 (push_stop_notification): New function.
1575 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
1576 events if the client supports them.
1577
1578 2015-11-30 Pedro Alves <palves@redhat.com>
1579
1580 * linux-low.c (thread_still_has_status_pending_p): Don't check
1581 vCont;t here.
1582 (lwp_resumed): New function.
1583 (status_pending_p_callback): Return early if the LWP is not
1584 supposed to be resumed.
1585
1586 2015-11-30 Pedro Alves <palves@redhat.com>
1587
1588 * linux-low.c (handle_extended_wait): Assert that the LWP's
1589 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
1590 thread create events, leave the new child's status pending.
1591 (linux_low_filter_event): If GDB wants to hear about thread exit
1592 events, leave the LWP marked dead and don't delete it.
1593 (linux_wait_for_event_filtered): Don't check for thread exit.
1594 (filter_exit_event): New function.
1595 (linux_wait_1): Use it, when returning an exit event.
1596 (linux_resume_one_lwp_throw): Assert that the LWP's
1597 waitstatus is TARGET_WAITKIND_IGNORE.
1598 * remote-utils.c (prepare_resume_reply): Handle
1599 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
1600 * server.c (report_thread_events): New global.
1601 (handle_general_set): Handle QThreadEvents.
1602 (handle_query) <qSupported>: Handle and report QThreadEvents+;
1603 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
1604 TARGET_WAITKIND_THREAD_EXITED.
1605 * server.h (report_thread_events): Declare.
1606
1607 2015-11-30 Pedro Alves <palves@redhat.com>
1608
1609 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
1610 the thread's last_resume_kind was resume_stop.
1611
1612 2015-11-30 Pedro Alves <palves@redhat.com>
1613
1614 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
1615 before returning.
1616
1617 2015-11-30 Pedro Alves <palves@redhat.com>
1618
1619 * server.c (handle_v_requests): Handle vCtrlC.
1620
1621 2015-11-30 Pedro Alves <palves@redhat.com>
1622
1623 * gdbthread.h (find_any_thread_of_pid): Declare.
1624 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
1625 functions.
1626 * server.c (handle_query): If current_thread is NULL, look for
1627 another thread of the selected process.
1628
1629 2015-11-26 Daniel Colascione <dancol@dancol.org>
1630 Simon Marchi <simon.marchi@ericsson.com>
1631
1632 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
1633 * server.c (handle_qxfer_threads_worker): Refactor to include thread
1634 name in reply.
1635 * target.h (struct target_ops) <thread_name>: New field.
1636 (target_thread_name): New macro.
1637
1638 2015-11-23 Joel Brobecker <brobecker@adacore.com>
1639
1640 * regcache.h (regcache_invalidate_pid): Add declaration.
1641 * regcache.c (regcache_invalidate_pid): New function, extracted
1642 from regcache_invalidate.
1643 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
1644 Add trivial documentation comment.
1645 * lynx-low.c: Use regcache_invalidate_pid instead of
1646 regcache_invalidate.
1647
1648 2015-11-23 Joel Brobecker <brobecker@adacore.com>
1649
1650 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
1651 and Elf64_auxv_t if the target is Android.
1652
1653 2015-11-22 Doug Evans <xdje42@gmail.com>
1654
1655 * target.h: #include <sys/types.h>.
1656
1657 2015-11-19 Pedro Alves <palves@redhat.com>
1658
1659 * linux-low.c (linux_process_qsupported): Change prototype.
1660 Adjust.
1661 * linux-low.h (struct linux_target_ops) <process_qsupported>:
1662 Change prototype.
1663 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
1664 and adjust to loop over all features.
1665 * server.c (handle_query) <qSupported>: Adjust to call
1666 target_process_qsupported once, passing it a vector of unprocessed
1667 features.
1668 * target.h (struct target_ops) <process_qsupported>: Change
1669 prototype.
1670 (target_process_qsupported): Adjust.
1671
1672 2015-11-19 Pedro Alves <palves@redhat.com>
1673
1674 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
1675 mode.
1676 * configure: Regenerate.
1677
1678 2015-11-19 Pedro Alves <palves@redhat.com>
1679
1680 * configure: Regenerate.
1681
1682 2015-11-19 Yao Qi <yao.qi@linaro.org>
1683
1684 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
1685 type to uint32_t.
1686
1687 2015-11-19 Yao Qi <yao.qi@linaro.org>
1688
1689 * linux-aarch64-low.c (enum aarch64_operand_type): New.
1690 (struct aarch64_operand): Move enum out.
1691
1692 2015-11-19 Yao Qi <yao.qi@linaro.org>
1693
1694 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
1695 struct user_fpsimd_state *.
1696 (aarch64_store_fpregset): Likewise.
1697
1698 2015-11-19 Yao Qi <yao.qi@linaro.org>
1699
1700 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
1701 struct user_pt_regs *.
1702 (aarch64_store_gregset): Likewise.
1703
1704 2015-11-18 Pedro Alves <palves@redhat.com>
1705
1706 * Makefile.in (all_object_files): Add $IPA_OBJS.
1707
1708 2015-11-17 Pedro Alves <palves@redhat.com>
1709
1710 * win32-low.c (win32_resume): Use gdb_signal_from_host,
1711 GDB_SIGNAL_0 and gdb_signal_to_string.
1712
1713 2015-11-17 Pedro Alves <palves@redhat.com>
1714
1715 * win32-low.c (handle_output_debug_string): Remove parameter.
1716 (win32_kill): Remove our_status local and adjust call to
1717 handle_output_debug_string.
1718 (get_child_debug_event): Adjust call to
1719 handle_output_debug_string.
1720
1721 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1722
1723 * linux-mips-low.c (mips_fill_gregset): Add cast.
1724 (mips_store_gregset): Likewise.
1725 (mips_fill_fpregset): Likewise.
1726 (mips_store_fpregset): Likewise.
1727
1728 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1729
1730 * linux-mips-low.c (mips_add_watchpoint): Rename private to
1731 priv.
1732
1733 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1734
1735 * linux-mips-low.c (mips_linux_new_thread): Change type of
1736 watch_type to enum target_hw_bp_type.
1737
1738 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1739
1740 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
1741 Change return type to arm_hwbp_type.
1742
1743 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1744
1745 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
1746 (arm_store_gregset): Likewise.
1747 * linux-arm-low.c (arm_get_hwcap): Likewise.
1748 (arm_read_description): Likewise.
1749
1750 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1751
1752 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
1753
1754 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1755
1756 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
1757 (ppc_fill_vsxregset): Likewise.
1758 (ppc_store_vsxregset): Likewise.
1759 (ppc_fill_vrregset): Likewise.
1760 (ppc_store_vrregset): Likewise.
1761 (ppc_fill_evrregset): Likewise.
1762 (ppc_store_evrregset): Likewise.
1763
1764 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1765
1766 * linux-ppc-low.c (ppc_usrregs_info): Remove
1767 forward-declaration.
1768 (ppc_arch_setup): Move lower in file.
1769
1770 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
1771
1772 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
1773 (ps_pdwrite): Likewise.
1774
1775 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
1776
1777 * linux-arm-low.c (arm_new_thread): Move pointer dereference
1778 to after assert checks.
1779
1780 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
1781
1782 * proc-service.c (ps_pdread): Add/adjust casts.
1783 (ps_pdwrite): Add/adjust casts.
1784
1785 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1786
1787 * server.c (handle_search_memory_1): Cast return value of
1788 memmem.
1789
1790 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1791
1792 * server.c (write_qxfer_response): Change type of data to
1793 gdb_byte *.
1794
1795 2015-10-29 Pedro Alves <palves@redhat.com>
1796
1797 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
1798
1799 2015-10-29 Pedro Alves <palves@redhat.com>
1800
1801 * tracepoint.c (clear_installed_tracepoints): Add casts.
1802
1803 2015-10-29 Pedro Alves <palves@redhat.com>
1804
1805 * server.c (handle_v_cont, process_serial_event): Add enum
1806 gdb_signal casts to signal parsing code.
1807
1808 2015-10-29 Pedro Alves <palves@redhat.com>
1809
1810 * linux-low.h (NULL_REGSET): Define.
1811 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1812 * linux-arm-low.c (arm_regsets): Likewise.
1813 * linux-crisv32-low.c (cris_regsets): Likewise.
1814 * linux-m68k-low.c (m68k_regsets): Likewise.
1815 * linux-mips-low.c (mips_regsets): Likewise.
1816 * linux-nios2-low.c (nios2_regsets): Likewise.
1817 * linux-ppc-low.c (ppc_regsets): Likewise.
1818 * linux-s390-low.c (s390_regsets): Likewise.
1819 * linux-sh-low.c (sh_regsets): Likewise.
1820 * linux-sparc-low.c (sparc_regsets): Likewise.
1821 * linux-tic6x-low.c (tic6x_regsets): Likewise.
1822 * linux-tile-low.c (tile_regsets): Likewise.
1823 * linux-x86-low.c (x86_regsets): Likewise.
1824 * linux-xtensa-low.c (xtensa_regsets): Likewise.
1825
1826 2015-10-29 Pedro Alves <palves@redhat.com>
1827
1828 * linux-low.h (NULL_REGSET): Define.
1829 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1830 * linux-arm-low.c (arm_regsets): Likewise.
1831 * linux-crisv32-low.c (cris_regsets): Likewise.
1832 * linux-m68k-low.c (m68k_regsets): Likewise.
1833 * linux-mips-low.c (mips_regsets): Likewise.
1834 * linux-nios2-low.c (nios2_regsets): Likewise.
1835 * linux-ppc-low.c (ppc_regsets): Likewise.
1836 * linux-s390-low.c (s390_regsets): Likewise.
1837 * linux-sh-low.c (sh_regsets): Likewise.
1838 * linux-sparc-low.c (sparc_regsets): Likewise.
1839 * linux-tic6x-low.c (tic6x_regsets): Likewise.
1840 * linux-tile-low.c (tile_regsets): Likewise.
1841 * linux-x86-low.c (x86_regsets): Likewise.
1842 * linux-xtensa-low.c (xtensa_regsets): Likewise.
1843
1844 2015-10-26 Doug Evans <dje@google.com>
1845
1846 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
1847
1848 2015-10-26 Doug Evans <dje@google.com>
1849
1850 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
1851
1852 2015-10-26 Doug Evans <dje@google.com>
1853
1854 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
1855 for debug_printf.
1856 (attach_thread, find_new_threads_callback): Ditto.
1857
1858 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1859
1860 * mem-break.h (set_breakpoint_data): Remove.
1861
1862 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1863
1864 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
1865 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
1866 (initialize_low): Remove set_breakpoint_data call.
1867 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
1868 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
1869 (initialize_low): Remove set_breakpoint_data call.
1870 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
1871 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
1872 (initialize_low): Remove set_breakpoint_data call.
1873
1874 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1875
1876 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
1877 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
1878 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
1879 * target.h (target_breakpoint_kind_from_pc): New macro.
1880
1881 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
1882
1883 * linux-low.c (default_breakpoint_kind_from_pc): New function.
1884 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
1885 the default breakpoint kind.
1886
1887 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1888
1889 * linux-arm-low.c (arm_supports_z_point_type): Add software
1890 breakpoint support.
1891
1892 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1893
1894 * linux-arm-low.c: Refactor breakpoint definitions.
1895 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
1896 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
1897
1898 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1899
1900 * Makefile.in: Add arm.c/o.
1901 * configure.srv: Likewise.
1902 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
1903 (arm_breakpoint_kind_from_pc): New function.
1904 (arm_sw_breakpoint_from_kind): Return proper kind.
1905 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
1906
1907 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1908
1909 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
1910 removal.
1911 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
1912 (struct raw_breakpoint) <size>: Remove.
1913 (struct raw_breakpoint) <kind>: Add.
1914 (bp_size): New function.
1915 (bp_opcode): Likewise.
1916 (find_raw_breakpoint_at): Adjust for kind.
1917 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
1918 (remove_memory_breakpoint): Adjust for kind call bp_size.
1919 (set_raw_breakpoint_at): Adjust for kind.
1920 (set_breakpoint): Likewise.
1921 (set_breakpoint_at): Call breakpoint_kind_from_pc.
1922 (delete_raw_breakpoint): Adjust for kind.
1923 (delete_breakpoint): Likewise.
1924 (find_gdb_breakpoint): Likewise.
1925 (set_gdb_breakpoint_1): Likewise.
1926 (set_gdb_breakpoint): Likewise.
1927 (delete_gdb_breakpoint_1): Likewise.
1928 (delete_gdb_breakpoint): Likewise.
1929 (uninsert_raw_breakpoint): Likewise.
1930 (reinsert_raw_breakpoint): Likewise.
1931 (set_breakpoint_data): Remove.
1932 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
1933 (check_mem_read): Adjust for kind call bp_size.
1934 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
1935 (clone_one_breakpoint): Adjust for kind.
1936 * mem-break.h (set_gdb_breakpoint): Likewise.
1937 (delete_gdb_breakpoint): Likewise.
1938 * server.c (process_serial_event): Likewise.
1939
1940 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1941
1942 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
1943 (struct linux_target_ops) <breakpoint>: Remove.
1944 (struct linux_target_ops) <breakpoint_len>: Remove.
1945 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1946 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1947 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
1948 (arm_sw_breakpoint_from_kind): New function.
1949 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
1950 (struct linux_target_ops) <breakpoint>: Remove.
1951 (struct linux_target_ops) <breakpoint_len>: Remove.
1952 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1953 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1954 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
1955 (struct linux_target_ops) <breakpoint>: Remove.
1956 (struct linux_target_ops) <breakpoint_len>: Remove.
1957 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1958 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1959 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
1960 (struct linux_target_ops) <breakpoint>: Remove.
1961 (struct linux_target_ops) <breakpoint_len>: Remove.
1962 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1963 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1964 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
1965 and sw_breakpoint_from_kind to increment the pc.
1966 (linux_breakpoint_kind_from_pc): New function.
1967 (linux_sw_breakpoint_from_kind): New function.
1968 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
1969 (initialize_low): Call breakpoint_kind_from_pc and
1970 sw_breakpoint_from_kind to replace breakpoint_data/len.
1971 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
1972 New field.
1973 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
1974 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
1975 (struct linux_target_ops) <breakpoint>: Remove.
1976 (struct linux_target_ops) <breakpoint_len>: Remove.
1977 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1978 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1979 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
1980 (struct linux_target_ops) <breakpoint>: Remove.
1981 (struct linux_target_ops) <breakpoint_len>: Remove.
1982 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1983 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1984 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
1985 (struct linux_target_ops) <breakpoint>: Remove.
1986 (struct linux_target_ops) <breakpoint_len>: Remove.
1987 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1988 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1989 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
1990 (struct linux_target_ops) <breakpoint>: Remove.
1991 (struct linux_target_ops) <breakpoint_len>: Remove.
1992 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1993 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1994 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
1995 (struct linux_target_ops) <breakpoint>: Remove.
1996 (struct linux_target_ops) <breakpoint_len>: Remove.
1997 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1998 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1999 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
2000 (struct linux_target_ops) <breakpoint>: Remove.
2001 (struct linux_target_ops) <breakpoint_len>: Remove.
2002 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2003 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2004 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
2005 (struct linux_target_ops) <breakpoint>: Remove.
2006 (struct linux_target_ops) <breakpoint_len>: Remove.
2007 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2008 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2009 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
2010 (struct linux_target_ops) <breakpoint>: Remove.
2011 (struct linux_target_ops) <breakpoint_len>: Remove.
2012 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2013 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2014 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
2015 (struct linux_target_ops) <breakpoint>: Remove.
2016 (struct linux_target_ops) <breakpoint_len>: Remove.
2017 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2018 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2019 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
2020 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
2021 (struct linux_target_ops) <breakpoint>: Remove.
2022 (struct linux_target_ops) <breakpoint_len>: Remove.
2023 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2024 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2025 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
2026 (struct linux_target_ops) <breakpoint>: Remove.
2027 (struct linux_target_ops) <breakpoint_len>: Remove.
2028 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2029 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2030
2031 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2032
2033 * linux-cris-low.c (cris_get_pc): Remove void arg.
2034
2035 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2036
2037 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
2038 variable name.
2039
2040 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2041
2042 * inferiors.c (thread_pid_matches_callback): New function.
2043 (find_thread_process): New function.
2044 (remove_thread): Reset current_thread.
2045 (remove_process): Assert threads have been removed first.
2046
2047 2015-10-15 Yao Qi <yao.qi@linaro.org>
2048
2049 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
2050 if it is 3.
2051 (aarch64_remove_point): Likewise.
2052 * regcache.c (regcache_register_size): New function.
2053
2054 2015-10-12 Yao Qi <yao.qi@linaro.org>
2055
2056 * linux-aarch64-low.c: Update all callers as emit_load_store
2057 is renamed to aarch64_emit_load_store.
2058
2059 2015-10-12 Yao Qi <yao.qi@linaro.org>
2060
2061 * linux-aarch64-low.c: Update all callers of function renaming
2062 from emit_insn to aarch64_emit_insn.
2063
2064 2015-10-12 Yao Qi <yao.qi@linaro.org>
2065
2066 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
2067 arch/aarch64-insn.h.
2068 (struct aarch64_memory_operand): Likewise.
2069 (ENCODE): Likewise.
2070 (emit_insn): Move to arch/aarch64-insn.c.
2071 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
2072 (emit_load_store): Move to arch/aarch64-insn.c.
2073 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
2074 (can_encode_int32): Remove.
2075
2076 2015-10-12 Yao Qi <yao.qi@linaro.org>
2077
2078 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
2079 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
2080 (aarch64_relocate_instruction): Likewise.
2081 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
2082 (struct aarch64_insn_visitor): Likewise.
2083
2084 2015-10-12 Yao Qi <yao.qi@linaro.org>
2085
2086 * linux-aarch64-low.c (struct aarch64_insn_data): New.
2087 (struct aarch64_insn_visitor): New.
2088 (struct aarch64_insn_relocation_data): New.
2089 (aarch64_ftrace_insn_reloc_b): New function.
2090 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2091 (aarch64_ftrace_insn_reloc_cb): Likewise.
2092 (aarch64_ftrace_insn_reloc_tb): Likewise.
2093 (aarch64_ftrace_insn_reloc_adr): Likewise.
2094 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
2095 (aarch64_ftrace_insn_reloc_others): Likewise.
2096 (visitor): New.
2097 (aarch64_relocate_instruction): Use visitor.
2098
2099 2015-10-12 Yao Qi <yao.qi@linaro.org>
2100
2101 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
2102 int. Add argument buf.
2103 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
2104 aarch64_relocate_instruction.
2105
2106 2015-10-12 Yao Qi <yao.qi@linaro.org>
2107
2108 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
2109 argument insn. Remove local variable insn. Don't call
2110 target_read_uint32.
2111 (aarch64_install_fast_tracepoint_jump_pad): Call
2112 target_read_uint32.
2113
2114 2015-09-30 Yao Qi <yao.qi@linaro.org>
2115
2116 * linux-aarch64-low.c (emit_movk): Shorten a long line.
2117 (emit_load_store_pair): Likewise.
2118
2119 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2120
2121 * dll.c (match_dll): Add cast(s).
2122 (unloaded_dll): Likewise.
2123 * linux-low.c (second_thread_of_pid_p): Likewise.
2124 (delete_lwp_callback): Likewise.
2125 (count_events_callback): Likewise.
2126 (select_event_lwp_callback): Likewise.
2127 (linux_set_resume_request): Likewise.
2128 * server.c (accumulate_file_name_length): Likewise.
2129 (emit_dll_description): Likewise.
2130 (handle_qxfer_threads_worker): Likewise.
2131 (visit_actioned_threads): Likewise.
2132 * thread-db.c (any_thread_of): Likewise.
2133 * tracepoint.c (same_process_p): Likewise.
2134 (match_blocktype): Likewise.
2135 (build_traceframe_info_xml): Likewise.
2136
2137 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2138
2139 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
2140 assignment.
2141 (gdb_unparse_agent_expr): Likewise.
2142 * hostio.c (require_data): Likewise.
2143 (handle_pread): Likewise.
2144 * linux-low.c (disable_regset): Likewise.
2145 (fetch_register): Likewise.
2146 (store_register): Likewise.
2147 (get_dynamic): Likewise.
2148 (linux_qxfer_libraries_svr4): Likewise.
2149 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
2150 (set_fast_tracepoint_jump): Likewise.
2151 (uninsert_fast_tracepoint_jumps_at): Likewise.
2152 (reinsert_fast_tracepoint_jumps_at): Likewise.
2153 (validate_inserted_breakpoint): Likewise.
2154 (clone_agent_expr): Likewise.
2155 * regcache.c (init_register_cache): Likewise.
2156 * remote-utils.c (putpkt_binary_1): Likewise.
2157 (decode_M_packet): Likewise.
2158 (decode_X_packet): Likewise.
2159 (look_up_one_symbol): Likewise.
2160 (relocate_instruction): Likewise.
2161 (monitor_output): Likewise.
2162 * server.c (handle_search_memory): Likewise.
2163 (handle_qxfer_exec_file): Likewise.
2164 (handle_qxfer_libraries): Likewise.
2165 (handle_qxfer): Likewise.
2166 (handle_query): Likewise.
2167 (handle_v_cont): Likewise.
2168 (handle_v_run): Likewise.
2169 (captured_main): Likewise.
2170 * target.c (write_inferior_memory): Likewise.
2171 * thread-db.c (try_thread_db_load_from_dir): Likewise.
2172 * tracepoint.c (init_trace_buffer): Likewise.
2173 (add_tracepoint_action): Likewise.
2174 (add_traceframe): Likewise.
2175 (add_traceframe_block): Likewise.
2176 (cmd_qtdpsrc): Likewise.
2177 (cmd_qtdv): Likewise.
2178 (cmd_qtstatus): Likewise.
2179 (response_source): Likewise.
2180 (response_tsv): Likewise.
2181 (cmd_qtnotes): Likewise.
2182 (gdb_collect): Likewise.
2183 (initialize_tracepoint): Likewise.
2184
2185 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2186
2187 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
2188 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
2189 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
2190 <NOP>: New.
2191 (enum aarch64_condition_codes): New enum.
2192 (w0): New static global.
2193 (fp): Likewise.
2194 (lr): Likewise.
2195 (struct aarch64_memory_operand) <type>: New
2196 MEMORY_OPERAND_POSTINDEX type.
2197 (postindex_memory_operand): New helper function.
2198 (emit_ret): New function.
2199 (emit_load_store_pair): New function, factored out of emit_stp
2200 with support for MEMORY_OPERAND_POSTINDEX.
2201 (emit_stp): Rewrite using emit_load_store_pair.
2202 (emit_ldp): New function.
2203 (emit_load_store): Likewise.
2204 (emit_ldr): Mention post-index instruction in comment.
2205 (emit_ldrh): New function.
2206 (emit_ldrb): New function.
2207 (emit_ldrsw): Mention post-index instruction in comment.
2208 (emit_str): Likewise.
2209 (emit_subs): New function.
2210 (emit_cmp): Likewise.
2211 (emit_and): Likewise.
2212 (emit_orr): Likewise.
2213 (emit_orn): Likewise.
2214 (emit_eor): Likewise.
2215 (emit_mvn): Likewise.
2216 (emit_lslv): Likewise.
2217 (emit_lsrv): Likewise.
2218 (emit_asrv): Likewise.
2219 (emit_mul): Likewise.
2220 (emit_sbfm): Likewise.
2221 (emit_sbfx): Likewise.
2222 (emit_ubfm): Likewise.
2223 (emit_ubfx): Likewise.
2224 (emit_csinc): Likewise.
2225 (emit_cset): Likewise.
2226 (emit_nop): Likewise.
2227 (emit_ops_insns): New helper function.
2228 (emit_pop): Likewise.
2229 (emit_push): Likewise.
2230 (aarch64_emit_prologue): New function.
2231 (aarch64_emit_epilogue): Likewise.
2232 (aarch64_emit_add): Likewise.
2233 (aarch64_emit_sub): Likewise.
2234 (aarch64_emit_mul): Likewise.
2235 (aarch64_emit_lsh): Likewise.
2236 (aarch64_emit_rsh_signed): Likewise.
2237 (aarch64_emit_rsh_unsigned): Likewise.
2238 (aarch64_emit_ext): Likewise.
2239 (aarch64_emit_log_not): Likewise.
2240 (aarch64_emit_bit_and): Likewise.
2241 (aarch64_emit_bit_or): Likewise.
2242 (aarch64_emit_bit_xor): Likewise.
2243 (aarch64_emit_bit_not): Likewise.
2244 (aarch64_emit_equal): Likewise.
2245 (aarch64_emit_less_signed): Likewise.
2246 (aarch64_emit_less_unsigned): Likewise.
2247 (aarch64_emit_ref): Likewise.
2248 (aarch64_emit_if_goto): Likewise.
2249 (aarch64_emit_goto): Likewise.
2250 (aarch64_write_goto_address): Likewise.
2251 (aarch64_emit_const): Likewise.
2252 (aarch64_emit_call): Likewise.
2253 (aarch64_emit_reg): Likewise.
2254 (aarch64_emit_pop): Likewise.
2255 (aarch64_emit_stack_flush): Likewise.
2256 (aarch64_emit_zero_ext): Likewise.
2257 (aarch64_emit_swap): Likewise.
2258 (aarch64_emit_stack_adjust): Likewise.
2259 (aarch64_emit_int_call_1): Likewise.
2260 (aarch64_emit_void_call_2): Likewise.
2261 (aarch64_emit_eq_goto): Likewise.
2262 (aarch64_emit_ne_goto): Likewise.
2263 (aarch64_emit_lt_goto): Likewise.
2264 (aarch64_emit_le_goto): Likewise.
2265 (aarch64_emit_gt_goto): Likewise.
2266 (aarch64_emit_ge_got): Likewise.
2267 (aarch64_emit_ops_impl): New static global variable.
2268 (aarch64_emit_ops): New target function, return
2269 &aarch64_emit_ops_impl.
2270 (struct linux_target_ops): Install it.
2271
2272 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2273
2274 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
2275 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
2276 aarch64-ipa.o.
2277 * linux-aarch64-ipa.c: New file.
2278 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
2279 and endian.h.
2280 (aarch64_get_thread_area): New target method.
2281 (extract_signed_bitfield): New helper function.
2282 (aarch64_decode_ldr_literal): New function.
2283 (enum aarch64_opcodes): New enum.
2284 (struct aarch64_register): New struct.
2285 (struct aarch64_operand): New struct.
2286 (x0): New static global.
2287 (x1): Likewise.
2288 (x2): Likewise.
2289 (x3): Likewise.
2290 (x4): Likewise.
2291 (w2): Likewise.
2292 (ip0): Likewise.
2293 (sp): Likewise.
2294 (xzr): Likewise.
2295 (aarch64_register): New helper function.
2296 (register_operand): Likewise.
2297 (immediate_operand): Likewise.
2298 (struct aarch64_memory_operand): New struct.
2299 (offset_memory_operand): New helper function.
2300 (preindex_memory_operand): Likewise.
2301 (enum aarch64_system_control_registers): New enum.
2302 (ENCODE): New macro.
2303 (emit_insn): New helper function.
2304 (emit_b): New function.
2305 (emit_bcond): Likewise.
2306 (emit_cb): Likewise.
2307 (emit_tb): Likewise.
2308 (emit_blr): Likewise.
2309 (emit_stp): Likewise.
2310 (emit_ldp_q_offset): Likewise.
2311 (emit_stp_q_offset): Likewise.
2312 (emit_load_store): Likewise.
2313 (emit_ldr): Likewise.
2314 (emit_ldrsw): Likewise.
2315 (emit_str): Likewise.
2316 (emit_ldaxr): Likewise.
2317 (emit_stxr): Likewise.
2318 (emit_stlr): Likewise.
2319 (emit_data_processing_reg): Likewise.
2320 (emit_data_processing): Likewise.
2321 (emit_add): Likewise.
2322 (emit_sub): Likewise.
2323 (emit_mov): Likewise.
2324 (emit_movk): Likewise.
2325 (emit_mov_addr): Likewise.
2326 (emit_mrs): Likewise.
2327 (emit_msr): Likewise.
2328 (emit_sevl): Likewise.
2329 (emit_wfe): Likewise.
2330 (append_insns): Likewise.
2331 (can_encode_int32_in): New helper function.
2332 (aarch64_relocate_instruction): New function.
2333 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
2334 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
2335 (struct linux_target_ops): Install aarch64_get_thread_area,
2336 aarch64_install_fast_tracepoint_jump_pad and
2337 aarch64_get_min_fast_tracepoint_insn_len.
2338
2339 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2340
2341 * Makefile.in (aarch64-insn.o): New rule.
2342 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
2343
2344 2015-09-21 Yao Qi <yao.qi@linaro.org>
2345
2346 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
2347
2348 2015-09-21 Yao Qi <yao.qi@linaro.org>
2349
2350 * tracepoint.c (max_jump_pad_size): Remove.
2351
2352 2015-09-18 Yao Qi <yao.qi@linaro.org>
2353
2354 * linux-aarch64-low.c: Don't include sys/uio.h.
2355 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
2356
2357 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
2358
2359 * tracepoint.c (eval_result_type): Change prototype.
2360 (condition_true_at_tracepoint): Fix argument to compiled_cond.
2361
2362 2015-09-15 Pedro Alves <palves@redhat.com>
2363
2364 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
2365 Check whether to report exec events instead of checking whether
2366 multiprocess is enabled.
2367
2368 2015-09-15 Pedro Alves <palves@redhat.com>
2369
2370 PR remote/18965
2371 * remote-utils.c (prepare_resume_reply): Merge
2372 TARGET_WAITKIND_VFORK_DONE switch case with the
2373 TARGET_WAITKIND_FORKED case.
2374
2375 2015-09-15 Yao Qi <yao.qi@linaro.org>
2376
2377 * server.c (handle_query): Check string comparison using
2378 "else if" instead of "if".
2379
2380 2015-09-15 Yao Qi <yao.qi@linaro.org>
2381
2382 * server.c (vCont_supported): New global variable.
2383 (handle_query): Set vCont_supported to 1 if "vContSupported+"
2384 matches. Append ";vContSupported+" to own_buf.
2385 (handle_v_requests): Append ";s;S" to own_buf if target supports
2386 hardware single step or vCont_supported is false.
2387 (capture_main): Set vCont_supported to zero.
2388
2389 2015-09-15 Yao Qi <yao.qi@linaro.org>
2390
2391 * linux-low.c (linux_supports_conditional_breakpoints): Rename
2392 it to ...
2393 (linux_supports_hardware_single_step): ... New function.
2394 (linux_target_ops): Update.
2395 * lynx-low.c (lynx_target_ops): Set field
2396 supports_hardware_single_step to target_can_do_hardware_single_step.
2397 * nto-low.c (nto_target_ops): Likewise.
2398 * spu-low.c (spu_target_ops): Likewise.
2399 * win32-low.c (win32_target_ops): Likewise.
2400 * target.c (target_can_do_hardware_single_step): New function.
2401 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2402 Remove. <supports_hardware_single_step>: New field.
2403 (target_supports_conditional_breakpoints): Remove.
2404 (target_supports_hardware_single_step): New macro.
2405 (target_can_do_hardware_single_step): Declare.
2406 * server.c (handle_query): Use target_supports_hardware_single_step
2407 instead of target_supports_conditional_breakpoints.
2408
2409 2015-09-15 Yao Qi <yao.qi@linaro.org>
2410
2411 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
2412 function.
2413 (struct linux_target_ops the_low_target): Install
2414 aarch64_linux_siginfo_fixup.
2415
2416 2015-09-11 Don Breazeal <donb@codesourcery.com>
2417 Luis Machado <lgustavo@codesourcery.com>
2418
2419 * linux-low.c (linux_mourn): Static declaration.
2420 (linux_arch_setup): Move in front of
2421 handle_extended_wait.
2422 (linux_arch_setup_thread): New function.
2423 (handle_extended_wait): Handle exec events. Call
2424 linux_arch_setup_thread. Make event_lwp argument a
2425 pointer-to-a-pointer.
2426 (check_zombie_leaders): Do not check stopped threads.
2427 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
2428 (linux_low_filter_event): Add lwp and thread for exec'ing
2429 non-leader thread if leader thread has been deleted.
2430 Refactor code into linux_arch_setup_thread and call it.
2431 Pass child lwp pointer by reference to handle_extended_wait.
2432 (linux_wait_for_event_filtered): Update comment.
2433 (linux_wait_1): Prevent clobbering exec event status.
2434 (linux_supports_exec_events): New function.
2435 (linux_target_ops) <supports_exec_events>: Initialize new member.
2436 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
2437 new member.
2438 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
2439 * server.c (report_exec_events): New global variable.
2440 (handle_query): Handle qSupported query for exec-events feature.
2441 (captured_main): Initialize report_exec_events.
2442 * server.h (report_exec_events): Declare new global variable.
2443 * target.h (struct target_ops) <supports_exec_events>: New
2444 member.
2445 (target_supports_exec_events): New macro.
2446 * win32-low.c (win32_target_ops) <supports_exec_events>:
2447 Initialize new member.
2448
2449 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
2450
2451 * linux-low.c (linux_low_enable_btrace): Remove.
2452 (linux_target_ops): Replace linux_low_enable_btrace with
2453 linux_enable_btrace.
2454
2455 2015-09-03 Yao Qi <yao.qi@linaro.org>
2456
2457 * linux-aarch64-low.c (aarch64_insert_point): Call
2458 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
2459 returns true.
2460
2461 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2462
2463 * linux-low.c (check_stopped_by_breakpoint): Use
2464 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
2465
2466 2015-08-27 Pedro Alves <palves@redhat.com>
2467
2468 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
2469
2470 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
2471
2472 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
2473 the XNEW-family equivalent.
2474 (compile_bytecodes): Likewise.
2475 * dll.c (loaded_dll): Likewise.
2476 * event-loop.c (append_callback_event): Likewise.
2477 (create_file_handler): Likewise.
2478 (create_file_event): Likewise.
2479 * hostio.c (handle_open): Likewise.
2480 * inferiors.c (add_thread): Likewise.
2481 (add_process): Likewise.
2482 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
2483 * linux-arm-low.c (arm_new_process): Likewise.
2484 (arm_new_thread): Likewise.
2485 * linux-low.c (add_to_pid_list): Likewise.
2486 (linux_add_process): Likewise.
2487 (handle_extended_wait): Likewise.
2488 (add_lwp): Likewise.
2489 (enqueue_one_deferred_signal): Likewise.
2490 (enqueue_pending_signal): Likewise.
2491 (linux_resume_one_lwp_throw): Likewise.
2492 (linux_resume_one_thread): Likewise.
2493 (linux_read_memory): Likewise.
2494 (linux_write_memory): Likewise.
2495 * linux-mips-low.c (mips_linux_new_process): Likewise.
2496 (mips_linux_new_thread): Likewise.
2497 (mips_add_watchpoint): Likewise.
2498 * linux-x86-low.c (initialize_low_arch): Likewise.
2499 * lynx-low.c (lynx_add_process): Likewise.
2500 * mem-break.c (set_raw_breakpoint_at): Likewise.
2501 (set_breakpoint): Likewise.
2502 (add_condition_to_breakpoint): Likewise.
2503 (add_commands_to_breakpoint): Likewise.
2504 (clone_agent_expr): Likewise.
2505 (clone_one_breakpoint): Likewise.
2506 * regcache.c (new_register_cache): Likewise.
2507 * remote-utils.c (look_up_one_symbol): Likewise.
2508 * server.c (queue_stop_reply): Likewise.
2509 (start_inferior): Likewise.
2510 (queue_stop_reply_callback): Likewise.
2511 (handle_target_event): Likewise.
2512 * spu-low.c (fetch_ppc_memory): Likewise.
2513 (store_ppc_memory): Likewise.
2514 * target.c (set_target_ops): Likewise.
2515 * thread-db.c (thread_db_load_search): Likewise.
2516 (try_thread_db_load_1): Likewise.
2517 * tracepoint.c (add_tracepoint): Likewise.
2518 (add_tracepoint_action): Likewise.
2519 (create_trace_state_variable): Likewise.
2520 (cmd_qtdpsrc): Likewise.
2521 (cmd_qtro): Likewise.
2522 (add_while_stepping_state): Likewise.
2523 * win32-low.c (child_add_thread): Likewise.
2524 (get_image_name): Likewise.
2525
2526 2015-08-25 Yao Qi <yao.qi@linaro.org>
2527
2528 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
2529
2530 2015-08-25 Yao Qi <yao.qi@linaro.org>
2531
2532 * Makefile.in (aarch64-linux.o): New rule.
2533 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
2534 srv_tgtobj.
2535 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
2536 (aarch64_init_debug_reg_state): Make it extern.
2537 (aarch64_linux_prepare_to_resume): Remove.
2538
2539 2015-08-25 Yao Qi <yao.qi@linaro.org>
2540
2541 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
2542 lwp_arch_private_info and ptid_of_lwp.
2543
2544 2015-08-25 Yao Qi <yao.qi@linaro.org>
2545
2546 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
2547 Find proc_info by find_process_pid. All callers updated.
2548
2549 2015-08-25 Yao Qi <yao.qi@linaro.org>
2550
2551 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
2552 Remove.
2553 (debug_reg_change_callback): Remove.
2554 (aarch64_notify_debug_reg_change): Remove.
2555
2556 2015-08-25 Yao Qi <yao.qi@linaro.org>
2557
2558 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
2559 Call current_lwp_ptid.
2560
2561 2015-08-25 Yao Qi <yao.qi@linaro.org>
2562
2563 * linux-aarch64-low.c (debug_reg_change_callback): Use
2564 debug_printf.
2565
2566 2015-08-25 Yao Qi <yao.qi@linaro.org>
2567
2568 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
2569
2570 2015-08-25 Yao Qi <yao.qi@linaro.org>
2571
2572 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
2573
2574 2015-08-25 Yao Qi <yao.qi@linaro.org>
2575
2576 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
2577 the code.
2578
2579 2015-08-25 Yao Qi <yao.qi@linaro.org>
2580
2581 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
2582 Remove.
2583 (debug_reg_change_callback): Remove argument entry and add argument
2584 lwp. Remove local variable thread. Don't print thread id in the
2585 debugging output. Don't check whether pid of thread equals to pid.
2586 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
2587 iterate_over_lwps instead find_inferior.
2588
2589 2015-08-24 Pedro Alves <palves@redhat.com>
2590
2591 * inferiors.c (get_first_process): New function.
2592 * inferiors.h (get_first_process): New declaration.
2593 * remote-utils.c (read_ptid): Default to the first process in the
2594 list, instead of to the current thread's process.
2595
2596 2015-08-24 Pedro Alves <palves@redhat.com>
2597
2598 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
2599 * event-loop.c: Likewise.
2600 * remote-utils.c: Likewise.
2601 * tracepoint.c: Likewise.
2602
2603 2015-08-24 Pedro Alves <palves@redhat.com>
2604
2605 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
2606 ptid_get_lwp.
2607
2608 2015-08-21 Pedro Alves <palves@redhat.com>
2609
2610 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
2611 instead of literal 1.
2612
2613 2015-08-21 Pedro Alves <palves@redhat.com>
2614
2615 * tdesc.c (default_description): Explicitly zero-initialize.
2616
2617 2015-08-21 Pedro Alves <palves@redhat.com>
2618
2619 PR gdb/18749
2620 * inferiors.c (remove_thread): Discard any pending stop reply for
2621 this thread.
2622 * server.c (remove_all_on_match_pid): Rename to ...
2623 (remove_all_on_match_ptid): ... this. Work with a filter ptid
2624 instead of a pid.
2625 (discard_queued_stop_replies): Change parameter to a ptid. Now
2626 extern.
2627 (handle_v_kill, kill_inferior_callback, captured_main)
2628 (process_serial_event): Adjust.
2629 * server.h (discard_queued_stop_replies): Declare.
2630
2631 2015-08-21 Pedro Alves <palves@redhat.com>
2632
2633 * linux-low.c (wait_for_sigstop): Always switch to no thread
2634 selected if the previously current thread dies.
2635 * lynx-low.c (lynx_request_interrupt): Use the first thread's
2636 process instead of the current thread's.
2637 * remote-utils.c (input_interrupt): Don't check if there's no
2638 current thread.
2639 * server.c (gdb_read_memory, gdb_write_memory): If setting the
2640 current thread to the general thread fails, error out.
2641 (handle_qxfer_auxv, handle_qxfer_libraries)
2642 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
2643 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
2644 (handle_query): Check if there's a thread selected instead of
2645 checking whether there's any thread in the thread list.
2646 (handle_qxfer_threads, handle_qxfer_btrace)
2647 (handle_qxfer_btrace_conf): Don't error out early if there's no
2648 thread in the thread list.
2649 (handle_v_cont, myresume): Don't set the current thread to the
2650 continue thread.
2651 (process_serial_event) <Hg handling>: Also set thread_id if the
2652 previous general thread is still alive.
2653 (process_serial_event) <g/G handling>: If setting the current
2654 thread to the general thread fails, error out.
2655 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
2656 thread's lwp instead of the current thread's.
2657 * target.c (set_desired_thread): If the desired thread was not
2658 found, leave the current thread pointing to NULL. Return an int
2659 (boolean) indicating success.
2660 * target.h (set_desired_thread): Change return type to int.
2661
2662 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
2663
2664 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
2665 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
2666 #includes.
2667 (ps_get_thread_area): New function.
2668
2669 2015-08-19 Gary Benson <gbenson@redhat.com>
2670
2671 * hostio.c (handle_pread): Do not attempt to read more data
2672 than hostio_reply_with_data can fit in a packet.
2673
2674 2015-08-18 Joel Brobecker <brobecker@adacore.com>
2675
2676 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
2677
2678 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
2679
2680 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
2681
2682 2015-08-06 Pedro Alves <palves@redhat.com>
2683
2684 * tracepoint.c (expr_eval_result): Now an int.
2685
2686 2015-08-06 Pedro Alves <palves@redhat.com>
2687
2688 * gdbthread.h (struct regcache): Forward declare.
2689 (struct thread_info) <regcache_data>: Now a struct regcache
2690 pointer.
2691 * inferiors.c (inferior_regcache_data)
2692 (set_inferior_regcache_data): Now work with struct regcache
2693 pointers.
2694 * inferiors.h (struct regcache): Forward declare.
2695 (inferior_regcache_data, set_inferior_regcache_data): Now work
2696 with struct regcache pointers.
2697 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
2698 (free_register_cache_thread): Remove struct regcache pointer
2699 casts.
2700
2701 2015-08-06 Pedro Alves <palves@redhat.com>
2702
2703 * server.c (captured_main): On error, print the exception message
2704 to stderr, and if run_once is set, throw a quit.
2705
2706 2015-08-06 Pedro Alves <palves@redhat.com>
2707
2708 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
2709 the current thread.
2710
2711 2015-08-06 Pedro Alves <palves@redhat.com>
2712
2713 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
2714 reading beyond the passed in buffer length.
2715
2716 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
2717
2718 * tracepoint.c (symbol_list) <required>: Remove.
2719
2720 2015-08-06 Pedro Alves <palves@redhat.com>
2721
2722 * linux-low.c (handle_extended_wait): Set the fork child's suspend
2723 count if stopping and suspending threads.
2724 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
2725 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
2726 (linux_detach): Complete an ongoing step-over.
2727 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
2728 throughout.
2729 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
2730 (linux_wait_1): If passing a signal to the inferior after
2731 finishing a step-over, unsuspend and re-resume all lwps. If we
2732 see a single-step event but the thread should be continuing, don't
2733 pass the trap to gdb.
2734 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
2735 internal_error instead of gdb_assert.
2736 (enqueue_pending_signal): New function.
2737 (check_ptrace_stopped_lwp_gone): Add debug output.
2738 (start_step_over): Use internal_error instead of gdb_assert.
2739 (complete_ongoing_step_over): New function.
2740 (linux_resume_one_thread): Don't resume a suspended thread.
2741 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
2742 it stepping.
2743
2744 2015-08-06 Pedro Alves <palves@redhat.com>
2745
2746 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
2747 (linux_thread_alive): Use lwp_is_marked_dead.
2748 (extended_event_reported): Delete.
2749 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
2750 instead of extended_event_reported.
2751 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
2752 as well.
2753 (lwp_is_marked_dead): New function.
2754 (lwp_running): Use lwp_is_marked_dead.
2755 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
2756 comment.
2757
2758 2015-08-06 Pedro Alves <palves@redhat.com>
2759
2760 * linux-low.c (linux_wait_1): Move fork event output out of the
2761 !report_to_gdb check. Pass event_child->waitstatus to
2762 target_waitstatus_to_string instead of ourstatus.
2763
2764 2015-08-04 Yao Qi <yao.qi@linaro.org>
2765
2766 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
2767 if current_thread is 32 bit.
2768
2769 2015-08-04 Yao Qi <yao.qi@linaro.org>
2770
2771 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2772 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2773 * server.c (extended_protocol): Remove "static".
2774 * server.h (extended_protocol): Declare it.
2775
2776 2015-08-04 Yao Qi <yao.qi@linaro.org>
2777
2778 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
2779 both aarch64 and aarch32.
2780 (aarch64_set_pc): Likewise.
2781
2782 2015-08-04 Yao Qi <yao.qi@linaro.org>
2783
2784 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
2785 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
2786 arm-with-neon.xml to srv_xmlfiles.
2787 * linux-aarch64-low.c: Include linux-aarch32-low.h.
2788 (is_64bit_tdesc): New function.
2789 (aarch64_linux_read_description): New function.
2790 (aarch64_arch_setup): Call aarch64_linux_read_description.
2791 (regs_info): Rename to regs_info_aarch64.
2792 (aarch64_regs_info): Return right regs_info.
2793 (initialize_low_arch): Call initialize_low_arch_aarch32.
2794
2795 2015-08-04 Yao Qi <yao.qi@linaro.org>
2796
2797 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
2798 * linux-aarch32-low.c: New file.
2799 * linux-aarch32-low.h: New file.
2800 * linux-arm-low.c (arm_fill_gregset): Move it to
2801 linux-aarch32-low.c.
2802 (arm_store_gregset): Likewise.
2803 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
2804 (arm_store_vfpregset): Call arm_store_vfpregset_num.
2805 (arm_arch_setup): Check if PTRACE_GETREGSET works.
2806 (regs_info): Rename to regs_info_arm.
2807 (arm_regs_info): Return regs_info_aarch32 if
2808 have_ptrace_getregset is 1 and target description is
2809 arm_with_neon or arm_with_vfpv3.
2810 (initialize_low_arch): Don't call init_registers_arm_with_neon.
2811 Call initialize_low_arch_aarch32 instead.
2812
2813 2015-08-04 Yao Qi <yao.qi@linaro.org>
2814
2815 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
2816 * linux-low.c: ... here.
2817 * linux-low.h (have_ptrace_getregset): Declare it.
2818
2819 2015-08-04 Pedro Alves <palves@redhat.com>
2820
2821 * thread-db.c (struct thread_db): Use new typedefs.
2822 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
2823 CHK calls.
2824 (disable_thread_event_reporting): Cast result of dlsym to
2825 destination function pointer type.
2826 (thread_db_mourn): Use td_ta_delete_ftype.
2827
2828 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
2829
2830 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
2831 arch variant.
2832 (CDX_BREAKPOINT): Define for R2.
2833 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
2834 (the_low_target): Add comments.
2835
2836 2015-07-30 Yao Qi <yao.qi@linaro.org>
2837
2838 * linux-arm-low.c (arm_hwcap): Remove it.
2839 (arm_read_description): New local variable arm_hwcap. Don't
2840 set arm_hwcap to zero.
2841
2842 2015-07-30 Yao Qi <yao.qi@linaro.org>
2843
2844 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
2845 Use regcache->tdesc instead.
2846 (arm_store_wmmxregset): Likewise.
2847 (arm_fill_vfpregset): Likewise.
2848 (arm_store_vfpregset): Likewise.
2849
2850 2015-07-30 Yao Qi <yao.qi@linaro.org>
2851
2852 * linux-arm-low.c: Include arch/arm.h.
2853 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
2854 (arm_store_gregset): Likewise.
2855
2856 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
2857
2858 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
2859 ptrace's 4th parameter.
2860
2861 2015-07-27 Yao Qi <yao.qi@linaro.org>
2862
2863 * configure.srv (case aarch64*-*-linux*): Don't set
2864 srv_linux_usrregs.
2865
2866 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
2867
2868 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
2869 sys/ptrace.h.
2870 * linux-arm-low.c: Likewise.
2871 * linux-cris-low.c: Likewise.
2872 * linux-crisv32-low.c: Likewise.
2873 * linux-low.c: Likewise.
2874 * linux-m68k-low.c: Likewise.
2875 * linux-mips-low.c: Likewise.
2876 * linux-nios2-low.c: Likewise.
2877 * linux-s390-low.c: Likewise.
2878 * linux-sparc-low.c: Likewise.
2879 * linux-tic6x-low.c: Likewise.
2880 * linux-tile-low.c: Likewise.
2881 * linux-x86-low.c: Likewise.
2882
2883 2015-07-24 Pedro Alves <palves@redhat.com>
2884
2885 * config.in: Regenerate.
2886 * configure: Regenerate.
2887
2888 2015-07-24 Pedro Alves <palves@redhat.com>
2889
2890 * acinclude.m4: Include ../ptrace.m4.
2891 * configure.ac: Call GDB_AC_PTRACE.
2892 * config.in, configure: Regenerate.
2893
2894 2015-07-24 Yao Qi <yao.qi@linaro.org>
2895
2896 * linux-low.c (linux_create_inferior): Remove setting to
2897 proc->priv->new_inferior.
2898 (linux_attach): Likewise.
2899 (linux_low_filter_event): Likewise.
2900 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
2901
2902 2015-07-24 Yao Qi <yao.qi@linaro.org>
2903
2904 * linux-low.c (linux_arch_setup): New function.
2905 (linux_low_filter_event): If proc->tdesc is NULL and
2906 proc->attached is true, call the_low_target.arch_setup.
2907 Otherwise, keep status pending, and return.
2908 (linux_resume_one_lwp_throw): Don't call get_pc if
2909 thread->while_stepping isn't NULL. Don't call
2910 get_thread_regcache if proc->tdesc is NULL.
2911 (need_step_over_p): Return 0 if proc->tdesc is NULL.
2912 (linux_target_ops): Install arch_setup.
2913 * server.c (start_inferior): Call the_target->arch_setup.
2914 * target.h (struct target_ops) <arch_setup>: New field.
2915 (target_arch_setup): New marco.
2916 * lynx-low.c (lynx_target_ops): Update.
2917 * nto-low.c (nto_target_ops): Update.
2918 * spu-low.c (spu_target_ops): Update.
2919 * win32-low.c (win32_target_ops): Update.
2920
2921 2015-07-24 Yao Qi <yao.qi@linaro.org>
2922
2923 * linux-low.c (linux_add_process): Don't set
2924 proc->priv->new_inferior.
2925 (linux_create_inferior): Set proc->priv->new_inferior to 1.
2926 (linux_attach): Likewise.
2927
2928 2015-07-24 Yao Qi <yao.qi@linaro.org>
2929
2930 * server.c (start_inferior): Code refactor.
2931
2932 2015-07-24 Yao Qi <yao.qi@linaro.org>
2933
2934 * server.c (process_serial_event): Set general_thread.
2935
2936 2015-07-21 Yao Qi <yao.qi@linaro.org>
2937
2938 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
2939 aarch64_linux_get_debug_reg_capacity.
2940
2941 2015-07-17 Yao Qi <yao.qi@linaro.org>
2942
2943 * Makefile.in (aarch64-linux-hw-point.o): New rule.
2944 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
2945 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
2946 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
2947 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
2948 (AARCH64_HWP_ALIGNMENT): Likewise.
2949 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
2950 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
2951 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
2952 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
2953 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
2954 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
2955 (struct aarch64_debug_reg_state): Likewise.
2956 (struct arch_lwp_info): Likewise.
2957 (aarch64_align_watchpoint): Likewise.
2958 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
2959 (aarch64_watchpoint_length): Likewise.
2960 (aarch64_point_encode_ctrl_reg): Likewise
2961 (aarch64_point_is_aligned): Likewise.
2962 (aarch64_align_watchpoint): Likewise.
2963 (aarch64_linux_set_debug_regs):
2964 (aarch64_dr_state_insert_one_point): Likewise.
2965 (aarch64_dr_state_remove_one_point): Likewise.
2966 (aarch64_handle_breakpoint): Likewise.
2967 (aarch64_handle_aligned_watchpoint): Likewise.
2968 (aarch64_handle_unaligned_watchpoint): Likewise.
2969 (aarch64_handle_watchpoint): Likewise.
2970
2971 2015-07-17 Yao Qi <yao.qi@linaro.org>
2972
2973 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
2974 and don't aarch64_get_debug_reg_state. All callers update.
2975 (aarch64_handle_aligned_watchpoint): Likewise.
2976 (aarch64_handle_unaligned_watchpoint): Likewise.
2977 (aarch64_handle_watchpoint): Likewise.
2978 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
2979 (aarch64_remove_point): Likewise.
2980
2981 2015-07-17 Yao Qi <yao.qi@linaro.org>
2982
2983 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
2984 debug_printf.
2985 (aarch64_handle_unaligned_watchpoint): Likewise.
2986
2987 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2988
2989 Revert the previous 3 commits:
2990 Move gdb_regex* to common/
2991 Move linux_find_memory_regions_full & co.
2992 gdbserver build-id attribute generator
2993
2994 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2995 Jan Kratochvil <jan.kratochvil@redhat.com>
2996
2997 gdbserver build-id attribute generator.
2998 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
2999 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
3000 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
3001 (find_phdr): New.
3002 (get_dynamic): Use find_pdhr to traverse program headers.
3003 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
3004 (compare_mapping_entry_range, struct find_memory_region_callback_data)
3005 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
3006 (get_hex_build_id): New.
3007 (linux_qxfer_libraries_svr4): Add optional build-id attribute
3008 to reply XML document.
3009
3010 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3011 Jan Kratochvil <jan.kratochvil@redhat.com>
3012
3013 * target.c: Include target/target-utils.h and fcntl.h.
3014 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
3015 (target_fileio_read_stralloc): New functions.
3016
3017 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3018
3019 * Makefile.in (OBS): Add gdb_regex.o.
3020 (gdb_regex.o): New.
3021 * config.in: Rebuilt.
3022 * configure: Rebuilt.
3023
3024 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3025 Jan Kratochvil <jan.kratochvil@redhat.com>
3026
3027 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
3028 * Makefile.in (OBS): Add target-utils.o.
3029 (linux-maps.o, target-utils.o): New.
3030 * configure.srv (srv_linux_obj): Add linux-maps.o.
3031
3032 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
3033
3034 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
3035 function, return 1.
3036 (the_low_target): Install it.
3037
3038 2015-07-14 Pedro Alves <palves@redhat.com>
3039
3040 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
3041 Instead, ignore ECHILD, and throw an error for other errnos.
3042
3043 2015-07-10 Pedro Alves <palves@redhat.com>
3044
3045 * event-loop.c (struct callback_event) <data>: Change type to
3046 gdb_client_data instance instead of gdb_client_data pointer.
3047 (append_callback_event): Adjust.
3048
3049 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
3050
3051 * linux-aarch64-low.c: Add comments for each linux_target_ops
3052 method. Remove comments already covered in target_ops and
3053 linux_target_ops definitions.
3054 (the_low_target): Add comments for each unimplemented method.
3055
3056 2015-07-09 Yao Qi <yao.qi@linaro.org>
3057
3058 * linux-aarch64-low.c (aarch64_regmap): Remove.
3059 (aarch64_usrregs_info): Remove.
3060 (regs_info): Set field usrregs to NULL.
3061
3062 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
3063
3064 * linux-low.c: Include "rsp-low.h"
3065 (linux_low_encode_pt_config, linux_low_encode_raw): New.
3066 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
3067 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
3068 (handle_btrace_enable_pt): New.
3069 (handle_btrace_general_set): Support "pt".
3070 (handle_btrace_conf_general_set): Support "pt:size".
3071
3072 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3073
3074 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
3075 Z_PACKET_SW_BP.
3076
3077 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3078
3079 * linux-aarch64-low.c: Remove comment about endianness.
3080 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
3081 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
3082 memcmp.
3083
3084 2015-06-24 Gary Benson <gbenson@redhat.com>
3085
3086 * linux-i386-ipa.c (stdint.h): Do not include.
3087 * lynx-i386-low.c (stdint.h): Likewise.
3088 * lynx-ppc-low.c (stdint.h): Likewise.
3089 * mem-break.c (stdint.h): Likewise.
3090 * thread-db.c (stdint.h): Likewise.
3091 * tracepoint.c (stdint.h): Likewise.
3092 * win32-low.c (stdint.h): Likewise.
3093
3094 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
3095
3096 * server.c (write_qxfer_response): Update call to
3097 remote_escape_output.
3098
3099 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
3100 Jan Kratochvil <jan.kratochvil@redhat.com>
3101
3102 Merge multiple hex conversions.
3103 * gdbreplay.c (tohex): Rename to 'fromhex'.
3104 (logchar): Use fromhex.
3105
3106 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
3107
3108 * server.c (handle_qxfer_libraries): Set `version' attribute for
3109 <library-list>.
3110
3111 2015-06-10 Gary Benson <gbenson@redhat.com>
3112
3113 * target.h (struct target_ops) <multifs_open>: New field.
3114 <multifs_unlink>: Likewise.
3115 <multifs_readlink>: Likewise.
3116 * linux-low.c (nat/linux-namespaces.h): New include.
3117 (linux_target_ops): Initialize the_target->multifs_open,
3118 the_target->multifs_unlink and the_target->multifs_readlink.
3119 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
3120 * hostio.c (hostio_fs_pid): New static variable.
3121 (hostio_handle_new_gdb_connection): New function.
3122 (handle_setfs): Likewise.
3123 (handle_open): Use the_target->multifs_open as appropriate.
3124 (handle_unlink): Use the_target->multifs_unlink as appropriate.
3125 (handle_readlink): Use the_target->multifs_readlink as
3126 appropriate.
3127 (handle_vFile): Handle vFile:setfs packets.
3128 * server.c (handle_query): Call hostio_handle_new_gdb_connection
3129 after target_handle_new_gdb_connection.
3130
3131 2015-06-10 Gary Benson <gbenson@redhat.com>
3132
3133 * configure.ac (AC_CHECK_FUNCS): Add setns.
3134 * config.in: Regenerate.
3135 * configure: Likewise.
3136 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
3137 (linux-namespaces.o): New rule.
3138 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
3139
3140 2015-06-09 Gary Benson <gbenson@redhat.com>
3141
3142 * hostio.c (handle_open): Process mode argument with
3143 fileio_to_host_mode.
3144
3145 2015-06-01 Yao Qi <yao.qi@linaro.org>
3146
3147 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
3148 * linux-x86-low.c: Likewise.
3149
3150 2015-05-28 Don Breazeal <donb@codesourcery.com>
3151
3152 * linux-low.c (handle_extended_wait): Initialize
3153 thread_info.last_resume_kind for new fork children.
3154
3155 2015-05-15 Pedro Alves <palves@redhat.com>
3156
3157 * target.h (target_handle_new_gdb_connection): Rewrite using if
3158 wrapped in do/while.
3159
3160 2015-05-14 Joel Brobecker <brobecker@adacore.com>
3161
3162 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
3163 * configure, config.in: Regenerate.
3164 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
3165 Declare typedef.
3166
3167 2015-05-12 Don Breazeal <donb@codesourcery.com>
3168
3169 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
3170 PTRACE_EVENT_VFORK_DONE.
3171 (linux_low_ptrace_options, extended_event_reported): Add vfork
3172 events.
3173 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
3174 and "vforkdone" for RSP 'T' Stop Reply Packet.
3175 * server.h (report_vfork_events): Declare
3176 global variable.
3177
3178 2015-05-12 Don Breazeal <donb@codesourcery.com>
3179
3180 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
3181 (the_low_target) <new_fork>: Initialize new member.
3182 * linux-arm-low.c (arm_new_fork): New function.
3183 (the_low_target) <new_fork>: Initialize new member.
3184 * linux-low.c (handle_extended_wait): Call new target function
3185 new_fork.
3186 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
3187 * linux-mips-low.c (mips_add_watchpoint): New function
3188 extracted from mips_insert_point.
3189 (the_low_target) <new_fork>: Initialize new member.
3190 (mips_linux_new_fork): New function.
3191 (mips_insert_point): Call mips_add_watchpoint.
3192 * linux-x86-low.c (x86_linux_new_fork): New function.
3193 (the_low_target) <new_fork>: Initialize new member.
3194
3195 2015-05-12 Don Breazeal <donb@codesourcery.com>
3196
3197 * linux-low.c (handle_extended_wait): Implement return value,
3198 rename argument 'event_child' to 'event_lwp', handle
3199 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
3200 (linux_low_ptrace_options): New function.
3201 (linux_low_filter_event): Call linux_low_ptrace_options,
3202 use different argument fo linux_enable_event_reporting,
3203 use return value from handle_extended_wait.
3204 (extended_event_reported): New function.
3205 (linux_wait_1): Call extended_event_reported and set
3206 status to report fork events.
3207 (linux_write_memory): Add pid to debug message.
3208 (reset_lwp_ptrace_options_callback): New function.
3209 (linux_handle_new_gdb_connection): New function.
3210 (linux_target_ops): Initialize new structure member.
3211 * linux-low.h (struct lwp_info) <waitstatus>: New member.
3212 * lynx-low.c: Initialize new structure member.
3213 * remote-utils.c (prepare_resume_reply): Implement stop reason
3214 "fork" for "T" stop message.
3215 * server.c (handle_query): Call handle_new_gdb_connection.
3216 * server.h (report_fork_events): Declare global flag.
3217 * target.h (struct target_ops) <handle_new_gdb_connection>:
3218 New member.
3219 (target_handle_new_gdb_connection): New macro.
3220 * win32-low.c: Initialize new structure member.
3221
3222 2015-05-12 Don Breazeal <donb@codesourcery.com>
3223
3224 * mem-break.c (APPEND_TO_LIST): Define macro.
3225 (clone_agent_expr): New function.
3226 (clone_one_breakpoint): New function.
3227 (clone_all_breakpoints): New function.
3228 * mem-break.h: Declare new functions.
3229
3230 2015-05-12 Don Breazeal <donb@codesourcery.com>
3231
3232 * linux-low.c (linux_supports_fork_events): New function.
3233 (linux_supports_vfork_events): New function.
3234 (linux_target_ops): Initialize new structure members.
3235 (initialize_low): Call linux_check_ptrace_features.
3236 * lynx-low.c (lynx_target_ops): Initialize new structure
3237 members.
3238 * server.c (report_fork_events, report_vfork_events):
3239 New global flags.
3240 (handle_query): Add new features to qSupported packet and
3241 response.
3242 (captured_main): Initialize new global variables.
3243 * target.h (struct target_ops) <supports_fork_events>:
3244 New member.
3245 <supports_vfork_events>: New member.
3246 (target_supports_fork_events): New macro.
3247 (target_supports_vfork_events): New macro.
3248 * win32-low.c (win32_target_ops): Initialize new structure
3249 members.
3250
3251 2015-05-12 Gary Benson <gbenson@redhat.com>
3252
3253 * server.c (handle_qxfer_exec_file): Use current process
3254 if annex is empty.
3255
3256 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
3257
3258 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
3259 Remove HAVE_PTRACE_GETREGS conditionals.
3260 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
3261 instead of PTRACE_GETREGS and PTRACE_SETREGS.
3262
3263 2015-05-08 Yao Qi <yao.qi@linaro.org>
3264
3265 * linux-low.c (linux_supports_conditional_breakpoints): New
3266 function.
3267 (linux_target_ops): Install new target method.
3268 * lynx-low.c (lynx_target_ops): Install NULL hook for
3269 supports_conditional_breakpoints.
3270 * nto-low.c (nto_target_ops): Likewise.
3271 * spu-low.c (spu_target_ops): Likewise.
3272 * win32-low.c (win32_target_ops): Likewise.
3273 * server.c (handle_query): Check
3274 target_supports_conditional_breakpoints.
3275 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3276 New field.
3277 (target_supports_conditional_breakpoints): New macro.
3278
3279 2015-05-06 Pedro Alves <palves@redhat.com>
3280
3281 PR server/18081
3282 * server.c (start_inferior): If the process exits, mourn it.
3283
3284 2015-04-21 Gary Benson <gbenson@redhat.com>
3285
3286 * hostio.c (fileio_open_flags_to_host): Factored out to
3287 fileio_to_host_openflags in common/fileio.c. Single use
3288 updated.
3289
3290 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3291
3292 * linux-xtensa-low.c (xtensa_fill_gregset)
3293 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
3294 XCHAL_HAVE_LOOP.
3295
3296 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3297
3298 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
3299 (regs_info): Replace usrregs pointer with NULL.
3300
3301 2015-04-17 Gary Benson <gbenson@redhat.com>
3302
3303 * target.h (struct target_ops) <pid_to_exec_file>: New field.
3304 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
3305 * server.c (handle_qxfer_exec_file): New function.
3306 (qxfer_packets): Add exec-file entry.
3307 (handle_query): Report qXfer:exec-file:read as supported packet.
3308
3309 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
3310
3311 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
3312
3313 2015-04-09 Gary Benson <gbenson@redhat.com>
3314
3315 * hostio-errno.c (errno_to_fileio_error): Remove function.
3316 Update caller to use remote_fileio_to_fio_error.
3317
3318 2015-04-09 Yao Qi <yao.qi@linaro.org>
3319
3320 * linux-low.c (linux_insert_point): Call
3321 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
3322 (linux_remove_point): Call remove_memory_breakpoint if type is
3323 raw_bkpt_type_sw.
3324 * linux-x86-low.c (x86_insert_point): Don't call
3325 insert_memory_breakpoint.
3326 (x86_remove_point): Don't call remove_memory_breakpoint.
3327
3328 2015-04-01 Pedro Alves <palves@redhat.com>
3329 Cleber Rosa <crosa@redhat.com>
3330
3331 * server.c (gdbserver_usage): Reorganize and extend the usage
3332 message.
3333
3334 2015-03-24 Pedro Alves <palves@redhat.com>
3335
3336 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
3337 output. Also dump TRAP_TRACE.
3338 (linux_low_filter_event): In debug output, distinguish a
3339 resume_stop SIGSTOP from a delayed SIGSTOP.
3340
3341 2015-03-24 Gary Benson <gbenson@redhat.com>
3342
3343 * linux-x86-low.c (x86_linux_new_thread): Moved to
3344 nat/x86-linux.c.
3345 (x86_linux_prepare_to_resume): Likewise.
3346
3347 2015-03-24 Gary Benson <gbenson@redhat.com>
3348
3349 * Makefile.in (x86-linux-dregs.o): New rule.
3350 * configure.srv: Add x86-linux-dregs.o to relevant targets.
3351 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
3352 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
3353 (x86_linux_dr_get): Likewise.
3354 (x86_linux_dr_set): Likewise.
3355 (update_debug_registers_callback): Likewise.
3356 (x86_linux_dr_set_addr): Likewise.
3357 (x86_linux_dr_get_addr): Likewise.
3358 (x86_linux_dr_set_control): Likewise.
3359 (x86_linux_dr_get_control): Likewise.
3360 (x86_linux_dr_get_status): Likewise.
3361 (x86_linux_update_debug_registers): Likewise.
3362
3363 2015-03-24 Gary Benson <gbenson@redhat.com>
3364
3365 * linux-x86-low.c (x86_linux_update_debug_registers):
3366 New function, factored out from...
3367 (x86_linux_prepare_to_resume): ...this.
3368
3369 2015-03-24 Gary Benson <gbenson@redhat.com>
3370
3371 * linux-x86-low.c (x86_linux_dr_get): Update comments.
3372 (x86_linux_dr_set): Likewise.
3373 (update_debug_registers_callback): Likewise.
3374 (x86_linux_dr_set_addr): Likewise.
3375 (x86_linux_dr_get_addr): Likewise.
3376 (x86_linux_dr_set_control): Likewise.
3377 (x86_linux_dr_get_control): Likewise.
3378 (x86_linux_dr_get_status): Likewise.
3379 (x86_linux_prepare_to_resume): Likewise.
3380
3381 2015-03-24 Gary Benson <gbenson@redhat.com>
3382
3383 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
3384 Use perror_with_name. Pass string through gettext.
3385 (x86_linux_dr_set): Likewise.
3386
3387 2015-03-24 Gary Benson <gbenson@redhat.com>
3388
3389 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
3390 (x86_linux_dr_set_addr): ...this.
3391 (x86_dr_low_get_addr): Rename to...
3392 (x86_linux_dr_get_addr): ...this.
3393 (x86_dr_low_set_control): Rename to...
3394 (x86_linux_dr_set_control): ...this.
3395 (x86_dr_low_get_control): Rename to...
3396 (x86_linux_dr_get_control): ...this.
3397 (x86_dr_low_get_status): Rename to...
3398 (x86_linux_dr_get_status): ...this.
3399 (x86_dr_low): Update with new function names.
3400
3401 2015-03-24 Gary Benson <gbenson@redhat.com>
3402
3403 * Makefile.in (x86-linux.o): New rule.
3404 * configure.srv: Add x86-linux.o to relevant targets.
3405 * linux-low.c (lwp_set_arch_private_info): New function.
3406 (lwp_arch_private_info): Likewise.
3407 * linux-x86-low.c: Include nat/x86-linux.h.
3408 (arch_lwp_info): Removed structure.
3409 (update_debug_registers_callback):
3410 Use lwp_set_debug_registers_changed.
3411 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
3412 and lwp_set_debug_registers_changed.
3413 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
3414
3415 2015-03-24 Gary Benson <gbenson@redhat.com>
3416
3417 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
3418 * linux-arm-low.c (arm_new_thread): Likewise.
3419 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
3420 * linux-mips-low.c (mips_linux_new_thread): Likewise.
3421 * linux-x86-low.c (x86_linux_new_thread): Likewise.
3422 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
3423
3424 2015-03-24 Gary Benson <gbenson@redhat.com>
3425
3426 * linux-low.c (ptid_of_lwp): New function.
3427 (lwp_is_stopped): Likewise.
3428 (lwp_stop_reason): Likewise.
3429 * linux-x86-low.c (update_debug_registers_callback):
3430 Use lwp_is_stopped.
3431 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
3432 lwp_stop_reason.
3433
3434 2015-03-24 Gary Benson <gbenson@redhat.com>
3435
3436 * linux-low.h (linux_stop_lwp): Remove declaration.
3437
3438 2015-03-24 Gary Benson <gbenson@redhat.com>
3439
3440 * linux-low.h: Include nat/linux-nat.h.
3441 * linux-low.c (iterate_over_lwps_args): New structure.
3442 (iterate_over_lwps_filter): New function.
3443 (iterate_over_lwps): Likewise.
3444 * linux-x86-low.c (update_debug_registers_callback):
3445 Update signature to what iterate_over_lwps expects.
3446 Remove PID check that iterate_over_lwps now performs.
3447 (x86_dr_low_set_addr): Use iterate_over_lwps.
3448 (x86_dr_low_set_control): Likewise.
3449
3450 2015-03-24 Gary Benson <gbenson@redhat.com>
3451
3452 * linux-x86-low.c (x86_debug_reg_state): New function.
3453 (x86_linux_prepare_to_resume): Use the above.
3454
3455 2015-03-24 Gary Benson <gbenson@redhat.com>
3456
3457 * linux-low.c (current_lwp_ptid): New function.
3458 * linux-x86-low.c: Include nat/linux-nat.h.
3459 (x86_dr_low_get_addr): Use current_lwp_ptid.
3460 (x86_dr_low_get_control): Likewise.
3461 (x86_dr_low_get_status): Likewise.
3462
3463 2015-03-20 Pedro Alves <palves@redhat.com>
3464
3465 * tracepoint.c (cmd_qtstatus): Make "str" const.
3466
3467 2015-03-20 Pedro Alves <palves@redhat.com>
3468
3469 * server.c (handle_general_set): Make "req_str" const.
3470
3471 2015-03-19 Pedro Alves <palves@redhat.com>
3472
3473 * linux-low.c (linux_resume_one_lwp): Rename to ...
3474 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
3475 instead call perror_with_name.
3476 (check_ptrace_stopped_lwp_gone): New function.
3477 (linux_resume_one_lwp): Reimplement as wrapper around
3478 linux_resume_one_lwp_throw that swallows errors if the LWP is
3479 gone.
3480
3481 2015-03-19 Pedro Alves <palves@redhat.com>
3482
3483 * linux-low.c (count_events_callback, select_event_lwp_callback):
3484 No longer check whether the thread has resume_stop as last resume
3485 kind.
3486
3487 2015-03-19 Pedro Alves <palves@redhat.com>
3488
3489 * linux-low.c (count_events_callback, select_event_lwp_callback):
3490 Use the lwp's status_pending_p field, not the thread's.
3491
3492 2015-03-19 Pedro Alves <palves@redhat.com>
3493
3494 * linux-low.c (select_event_lwp_callback): Update comments to
3495 no longer mention SIGTRAP.
3496
3497 2015-03-18 Gary Benson <gbenson@redhat.com>
3498
3499 * server.c (handle_query): Do not report vFile:fstat as supported.
3500
3501 2015-03-11 Gary Benson <gbenson@redhat.com>
3502
3503 * hostio.c (sys/types.h): New include.
3504 (sys/stat.h): Likewise.
3505 (common-remote-fileio.h): Likewise.
3506 (handle_fstat): New function.
3507 (handle_vFile): Handle vFile:fstat packets.
3508
3509 2015-03-11 Gary Benson <gbenson@redhat.com>
3510
3511 * configure.ac (AC_CHECK_MEMBERS): Add checks for
3512 struct stat.st_blocks and struct stat.st_blksize.
3513 * configure: Regenerate.
3514 * config.in: Likewise.
3515 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
3516 (OBS): Add common-remote-fileio.o.
3517 (common-remote-fileio.o): New rule.
3518
3519 2015-03-09 Pedro Alves <palves@redhat.com>
3520
3521 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
3522 'struct sockaddr' pointer in 'accept' call.
3523
3524 2015-03-09 Pedro Alves <palves@redhat.com>
3525
3526 Revert:
3527 2015-03-07 Pedro Alves <palves@redhat.com>
3528 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3529 or <winsock2.h> here. Instead include "gdb_socket.h".
3530 (remote_open): Use union gdb_sockaddr_u.
3531 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3532 or <winsock2.h> here. Instead include "gdb_socket.h".
3533 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3534 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3535 or <sys/un.h>.
3536 (init_named_socket, gdb_agent_helper_thread): Use union
3537 gdb_sockaddr_u.
3538
3539 2015-03-07 Pedro Alves <palves@redhat.com>
3540
3541 * configure.ac (build_warnings): Move
3542 -Wdeclaration-after-statement to the C-specific set.
3543 * configure: Regenerate.
3544
3545 2015-03-07 Pedro Alves <palves@redhat.com>
3546
3547 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3548 or <winsock2.h> here. Instead include "gdb_socket.h".
3549 (remote_open): Use union gdb_sockaddr_u.
3550 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3551 or <winsock2.h> here. Instead include "gdb_socket.h".
3552 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3553 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3554 or <sys/un.h>.
3555 (init_named_socket, gdb_agent_helper_thread): Use union
3556 gdb_sockaddr_u.
3557
3558 2015-03-07 Pedro Alves <palves@redhat.com>
3559
3560 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
3561 instead.
3562
3563 2015-03-06 Yao Qi <yao.qi@linaro.org>
3564
3565 * linux-aarch64-low.c (aarch64_insert_point): Use
3566 show_debug_regs as a boolean.
3567 (aarch64_remove_point): Likewise.
3568
3569 2015-03-05 Pedro Alves <palves@redhat.com>
3570
3571 * lynx-low.c (lynx_target_ops): Install NULL hooks for
3572 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
3573 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
3574 * nto-low.c (nto_target_ops): Likewise.
3575 * spu-low.c (spu_target_ops): Likewise.
3576 * win32-low.c (win32_target_ops): Likewise.
3577
3578 2015-03-04 Pedro Alves <palves@redhat.com>
3579
3580 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3581 Decide whether a breakpoint triggered based on the SIGTRAP's
3582 siginfo.si_code.
3583 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
3584 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3585 (linux_low_filter_event): Check for breakpoints before checking
3586 watchpoints.
3587 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
3588 siginfo.si_code.
3589 (linux_stopped_by_sw_breakpoint)
3590 (linux_supports_stopped_by_sw_breakpoint)
3591 (linux_stopped_by_hw_breakpoint)
3592 (linux_supports_stopped_by_hw_breakpoint): New functions.
3593 (linux_target_ops): Install new target methods.
3594
3595 2015-03-04 Pedro Alves <palves@redhat.com>
3596
3597 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
3598 * server.c (swbreak_feature, hwbreak_feature): New globals.
3599 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
3600 (captured_main): Clear swbreak_feature and hwbreak_feature.
3601 * server.h (swbreak_feature, hwbreak_feature): Declare.
3602 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
3603 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
3604 supports_stopped_by_hw_breakpoint>: New fields.
3605 (target_supports_stopped_by_sw_breakpoint)
3606 (target_stopped_by_sw_breakpoint)
3607 (target_supports_stopped_by_hw_breakpoint)
3608 (target_stopped_by_hw_breakpoint): Declare.
3609
3610 2015-03-04 Pedro Alves <palves@redhat.com>
3611
3612 enum lwp_stop_reason -> enum target_stop_reason
3613 * linux-low.c (check_stopped_by_breakpoint): Adjust.
3614 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
3615 (linux_wait_1, stuck_in_jump_pad_callback)
3616 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
3617 (linux_stopped_by_watchpoint):
3618 * linux-low.h (enum lwp_stop_reason): Delete.
3619 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
3620 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3621
3622 2015-03-04 Yao Qi <yao.qi@linaro.org>
3623
3624 * Makefile.in (SFILES): Add linux-aarch64-low.c.
3625
3626 2015-03-03 Gary Benson <gbenson@redhat.com>
3627
3628 * hostio.c (handle_vFile): Fix prefix lengths.
3629
3630 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
3631
3632 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
3633 ptr_bits.
3634
3635 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
3636
3637 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
3638 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
3639 (clean): Add "rm -f" for above C files.
3640 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
3641 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
3642 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
3643 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
3644 * linux-s390-low.c (HWCAP_S390_VX): New macro.
3645 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
3646 (init_registers_s390x_vx_linux64)
3647 (init_registers_s390x_tevx_linux64)
3648 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
3649 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
3650 declarations.
3651 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
3652 (s390_store_vxrs_high): New functions.
3653 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
3654 NT_S390_VXRS_HIGH.
3655 (s390_arch_setup): Add logic for selecting one of the new target
3656 descriptions. Activate the new vector regsets if applicable.
3657 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
3658 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
3659 and init_registers_s390x_tevx_linux64.
3660
3661 2015-03-01 Pedro Alves <palves@redhat.com>
3662
3663 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
3664 parameter.
3665
3666 2015-02-27 Pedro Alves <palves@redhat.com>
3667
3668 * linux-x86-low.c (u_debugreg_offset): New function.
3669 (x86_linux_dr_get, x86_linux_dr_set): Use it.
3670
3671 2015-02-27 Pedro Alves <palves@redhat.com>
3672
3673 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
3674 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
3675 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
3676 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3677 (ps_lsetfpregs, ps_getpid)
3678 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
3679 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
3680 (ps_lsetxregs, ps_plog): Declare.
3681
3682 2015-02-27 Pedro Alves <palves@redhat.com>
3683
3684 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
3685 IP_AGENT_EXPORT_FUNC.
3686 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
3687 IP_AGENT_EXPORT_FUNC.
3688 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
3689 (IP_AGENT_EXPORT): Delete.
3690 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3691 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3692 (gdb_trampoline_buffer_error, collecting, gdb_collect)
3693 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
3694 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
3695 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
3696 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
3697 (traceframe_read_count, traceframe_write_count)
3698 (traceframes_created, trace_state_variables, get_raw_reg)
3699 (get_trace_state_variable_value, set_trace_state_variable_value)
3700 (ust_loaded, helper_thread_id, cmd_buf): Use
3701 IPA_SYM_EXPORTED_NAME.
3702 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
3703 (tracepoints) Use IP_AGENT_EXPORT_VAR.
3704 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
3705 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3706 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
3707 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
3708 EXTERN_C_PUSH/EXTERN_C_POP.
3709 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
3710 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
3711 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3712 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
3713 (traceframe_write_count, traceframe_read_count)
3714 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
3715 (about_to_request_buffer_space, get_trace_state_variable_value)
3716 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
3717 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
3718 EXTERN_C_PUSH/EXTERN_C_POP.
3719 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
3720 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
3721 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
3722 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3723 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3724 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3725 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
3726 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
3727 Define.
3728 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
3729 (IP_AGENT_EXPORT_VAR_DECL): Define.
3730 (tracing): Declare.
3731 (gdb_agent_get_raw_reg): Declare.
3732
3733 2015-02-27 Tom Tromey <tromey@redhat.com>
3734 Pedro Alves <palves@redhat.com>
3735
3736 Rename symbols whose names are reserved C++ keywords throughout.
3737
3738 2015-02-27 Pedro Alves <palves@redhat.com>
3739
3740 * Makefile.in (COMPILER): New, get it from autoconf.
3741 (CXX): Get from autoconf instead.
3742 (COMPILE.pre): Use COMPILER.
3743 (CC-LD): Rename to ...
3744 (CC_LD): ... this. Use COMPILER.
3745 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
3746 (CXX_FOR_TARGET): Default to g++ instead of gcc.
3747 * acinclude.m4: Include build-with-cxx.m4.
3748 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
3749 Disable -Werror by default if building in C++ mode.
3750 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
3751 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
3752 the C++ compiler. Save/restore CXXFLAGS too.
3753 * configure: Regenerate.
3754
3755 2015-02-27 Pedro Alves <palves@redhat.com>
3756
3757 * acinclude.m4: Include libiberty.m4.
3758 * configure.ac: Call libiberty_INIT.
3759 * config.in, configure: Regenerate.
3760
3761 2015-02-26 Pedro Alves <palves@redhat.com>
3762
3763 * linux-low.c (linux_wait_1): When incrementing the PC past a
3764 program breakpoint always use the_low_target.breakpoint_len as
3765 increment, rather than the maximum between that and
3766 the_low_target.decr_pc_after_break.
3767
3768 2015-02-23 Pedro Alves <palves@redhat.com>
3769
3770 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
3771 thread was doing a step-over; always adjust the PC if
3772 we stepped over a permanent breakpoint.
3773 (linux_wait_1): If we stepped over breakpoint that was on top of a
3774 permanent breakpoint, manually advance the PC past it.
3775
3776 2015-02-23 Pedro Alves <palves@redhat.com>
3777
3778 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
3779 modes.
3780 (x86_fill_gregset, x86_store_gregset): Use it when handling
3781 $orig_eax.
3782
3783 2015-02-20 Pedro Alves <palves@redhat.com>
3784
3785 * thread-db.c: Include "nat/linux-procfs.h".
3786 (thread_db_init): Skip listing new threads if the kernel supports
3787 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
3788
3789 2015-02-20 Pedro Alves <palves@redhat.com>
3790
3791 * linux-low.c (status_pending_p_callback): Use ptid_match.
3792
3793 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
3794
3795 PR breakpoints/16812
3796 * linux-low.c (wstatus_maybe_breakpoint): Remove.
3797 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
3798 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
3799
3800 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
3801
3802 PR breakpoints/15956
3803 * tracepoint.c (cmd_qtinit): Add check for current_thread.
3804
3805 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3806
3807 * linux-low.c (linux_low_btrace_conf): Print size.
3808 * server.c (handle_btrace_conf_general_set): New.
3809 (hanle_general_set): Call handle_btrace_conf_general_set.
3810 (handle_query): Report Qbtrace-conf:bts:size as supported.
3811
3812 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3813
3814 * linux-low.c (linux_low_enable_btrace): Update parameters.
3815 (linux_low_btrace_conf): New.
3816 (linux_target_ops)<to_btrace_conf>: Initialize.
3817 * server.c (current_btrace_conf): New.
3818 (handle_btrace_enable): Rename to ...
3819 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
3820 to target_enable_btrace. Update comment. Update users.
3821 (handle_qxfer_btrace_conf): New.
3822 (qxfer_packets): Add btrace-conf entry.
3823 (handle_query): Report qXfer:btrace-conf:read as supported packet.
3824 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
3825 (target_ops)<read_btrace_conf>: New.
3826 (target_enable_btrace): Update parameters.
3827 (target_read_btrace_conf): New.
3828
3829 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3830
3831 * server.c (handle_btrace_general_set): Remove call to
3832 target_supports_btrace.
3833 (supported_btrace_packets): New.
3834 (handle_query): Call supported_btrace_packets.
3835 * target.h: include btrace-common.h.
3836 (btrace_target_info): Removed.
3837 (supports_btrace, target_supports_btrace): Update parameters.
3838
3839 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3840
3841 * Makefile.in (SFILES): Add common/btrace-common.c.
3842 (OBS): Add common/btrace-common.o.
3843 (btrace-common.o): Add build rules.
3844 * linux-low: Include btrace-common.h.
3845 (linux_low_read_btrace): Use struct btrace_data. Call
3846 btrace_data_init and btrace_data_fini.
3847
3848 2015-02-06 Pedro Alves <palves@redhat.com>
3849
3850 * thread-db.c (find_new_threads_callback): Add debug output.
3851
3852 2015-02-04 Pedro Alves <palves@redhat.com>
3853
3854 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
3855 (resume_stopped_resumed_lwps): New function.
3856 (linux_wait_for_event_filtered): Use it.
3857
3858 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
3859
3860 * Makefile.in (SFILES): Add linux-personality.c.
3861 (linux-personality.o): New rule.
3862 * configure.srv (srv_linux_obj): Add linux-personality.o to the
3863 list of objects to be built.
3864 * linux-low.c: Include nat/linux-personality.h.
3865 (linux_create_inferior): Remove code to disable address space
3866 randomization (moved to ../nat/linux-personality.c). Create
3867 cleanup to disable address space randomization.
3868
3869 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
3870
3871 * Makefile.in (posix-strerror.o): New rule.
3872 (mingw-strerror.o): Likewise.
3873 * configure: Regenerated.
3874 * configure.ac: Source file ../common/common.host. Initialize new
3875 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
3876
3877 2015-01-14 Yao Qi <yao@codesourcery.com>
3878
3879 * Makefile.in (SFILES): Add nat/ppc-linux.c.
3880 (ppc-linux.o): New rule.
3881 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
3882 * configure.ac: AC_CHECK_FUNCS(getauxval).
3883 * config.in: Re-generated.
3884 * configure: Re-generated.
3885 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
3886 ppc64_64bit_inferior_p
3887
3888 2015-01-14 Yao Qi <yao@codesourcery.com>
3889
3890 * linux-ppc-low.c: Include "nat/ppc-linux.h".
3891 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
3892 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
3893 (PT_ORIG_R3, PT_TRAP): Likewise.
3894 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
3895 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
3896 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
3897
3898 2015-01-10 Joel Brobecker <brobecker@adacore.com>
3899
3900 * i387-fp.c (i387_cache_to_xsave): In look over
3901 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
3902 zmmh_low_space field by use of zmmh_high_space.
3903
3904 2015-01-09 Pedro Alves <palves@redhat.com>
3905
3906 * linux-low.c (step_over_bkpt): Move higher up in the file.
3907 (handle_extended_wait): Don't store the stop_pc here.
3908 (get_stop_pc): Adjust comments and rename to ...
3909 (check_stopped_by_breakpoint): ... this. Record whether the LWP
3910 stopped for a software breakpoint or hardware breakpoint.
3911 (thread_still_has_status_pending_p): New function.
3912 (status_pending_p_callback): Use
3913 thread_still_has_status_pending_p. If the event is no longer
3914 interesting, resume the LWP.
3915 (handle_tracepoints): Add assert.
3916 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
3917 (wstatus_maybe_breakpoint): New function.
3918 (cancel_breakpoint): Delete function.
3919 (check_stopped_by_watchpoint): New function, factored out from
3920 linux_low_filter_event.
3921 (lp_status_maybe_breakpoint): Delete function.
3922 (linux_low_filter_event): Remove filter_ptid argument.
3923 Leave thread group exits pending here. Store the LWP's stop PC.
3924 Always leave events pending.
3925 (linux_wait_for_event_filtered): Pull all events out of the
3926 kernel, and leave them all pending.
3927 (count_events_callback, select_event_lwp_callback): Consider all
3928 events.
3929 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
3930 (select_event_lwp): Only give preference to the stepping LWP in
3931 all-stop mode. Adjust comments.
3932 (ignore_event): New function.
3933 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
3934 references to cancel_breakpoints. Adjust to renames. Also give
3935 equal priority to all LWPs that have had events in non-stop mode.
3936 If reporting a software breakpoint event, unadjust the LWP's PC.
3937 (linux_wait): If linux_wait_1 returned an ignored event, retry.
3938 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
3939 Adjust.
3940 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
3941 (resume_status_pending_p): Use thread_still_has_status_pending_p.
3942 (linux_stopped_by_watchpoint): Adjust.
3943 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
3944 * linux-low.h (enum lwp_stop_reason): New.
3945 (struct lwp_info) <stop_pc>: Adjust comment.
3946 <stopped_by_watchpoint>: Delete field.
3947 <stop_reason>: New field.
3948 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3949 * mem-break.c (software_breakpoint_inserted_here)
3950 (hardware_breakpoint_inserted_here): New function.
3951 * mem-break.h (software_breakpoint_inserted_here)
3952 (hardware_breakpoint_inserted_here): Declare.
3953 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
3954 (cancel_breakpoints): Delete.
3955 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
3956 (upload_fast_traceframes): Remove references to
3957 cancel_breakpoints.
3958
3959 2015-01-09 Pedro Alves <palves@redhat.com>
3960
3961 * thread-db.c (find_new_threads_callback): Ignore thread if the
3962 kernel thread ID is -1.
3963
3964 2015-01-09 Pedro Alves <palves@redhat.com>
3965
3966 * linux-low.c (linux_attach_fail_reason_string): Move to
3967 nat/linux-ptrace.c, and rename.
3968 (linux_attach_lwp): Update comment.
3969 (attach_proc_task_lwp_callback): New function.
3970 (linux_attach): Adjust to rename and use
3971 linux_proc_attach_tgid_threads.
3972 (linux_attach_fail_reason_string): Delete declaration.
3973
3974 2015-01-01 Joel Brobecker <brobecker@adacore.com>
3975
3976 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
3977 * server.c (gdbserver_version): Likewise.
3978
3979 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
3980
3981 * remote-utils.c: Include ctype.h.
3982 (input_interrupt): Explicitly handle the case when the char
3983 received is the NUL byte. Improve the printing of non-ASCII
3984 characters.
3985
3986 2014-12-16 Joel Brobecker <brobecker@adacore.com>
3987
3988 * linux-low.c (linux_low_filter_event): Update call to
3989 linux_enable_event_reporting following the addition of
3990 a new parameter to that function.
3991
3992 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
3993
3994 PR server/17457
3995 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
3996 (AARCH64_FPCR_REGNO): Likewise.
3997 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
3998 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
3999 (aarch64_store_fpregset): Likewise.
4000
4001 2014-12-15 Joel Brobecker <brobecker@adacore.com>
4002
4003 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
4004 Remove FIXME comment about assumption about N.
4005
4006 2014-12-13 Joel Brobecker <brobecker@adacore.com>
4007
4008 * configure.ac: If large-file support is disabled in GDBserver,
4009 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
4010 * configure: Regenerate.
4011
4012 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4013
4014 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
4015 warning upon ENODATA from ptrace.
4016 * linux-s390-low.c (s390_store_tdb): New.
4017 (s390_regsets): Add regset for NT_S390_TDB.
4018
4019 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4020
4021 * linux-low.c (regsets_store_inferior_registers): Skip regsets
4022 without a fill_function.
4023 * linux-s390-low.c (s390_fill_last_break): Remove.
4024 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
4025 (s390_arch_setup): Use regset's size instead of fill_function for
4026 loop end condition.
4027
4028 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4029
4030 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
4031 the regset's store function when ptrace returned an error.
4032 * regcache.c (get_thread_regcache): Invalidate register cache
4033 before fetching inferior's registers.
4034
4035 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4036
4037 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
4038 while-loop as for-loop.
4039 (regsets_store_inferior_registers): Likewise.
4040
4041 2014-11-28 Yao Qi <yao@codesourcery.com>
4042
4043 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
4044 * config.in, configure: Re-generate.
4045 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
4046 is defined.
4047
4048 2014-11-21 Yao Qi <yao@codesourcery.com>
4049
4050 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
4051 (AC_CHECK_HEADERS): Remove malloc.h.
4052 * configure: Re-generated.
4053 * config.in: Re-generated.
4054 * server.h: Don't include alloca.h and malloc.h.
4055 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
4056 Don't include malloc.h.
4057
4058 2014-11-17 Joel Brobecker <brobecker@adacore.com>
4059
4060 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
4061 corresponding ERRNO check in same block.
4062
4063 2014-11-12 Pedro Alves <palves@redhat.com>
4064
4065 * server.c (cont_thread): Update comment.
4066 (start_inferior, attach_inferior): No longer clear cont_thread.
4067 (handle_v_cont): No longer set cont_thread.
4068 (captured_main): Clear cont_thread each time a GDB connects.
4069
4070 2014-11-12 Pedro Alves <palves@redhat.com>
4071
4072 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
4073 thread, and don't resume all threads if the Hc thread has exited.
4074
4075 2014-11-12 Pedro Alves <palves@redhat.com>
4076
4077 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
4078 the process group instead of to a specific LWP.
4079
4080 2014-10-15 Pedro Alves <palves@redhat.com>
4081
4082 PR server/17487
4083 * win32-arm-low.c (arm_set_thread_context): Remove current_event
4084 parameter.
4085 (arm_set_thread_context): Delete.
4086 (the_low_target): Adjust.
4087 * win32-i386-low.c (debug_registers_changed)
4088 (debug_registers_used): Delete.
4089 (update_debug_registers_callback): New function.
4090 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
4091 needing to update their debug registers.
4092 (win32_get_current_dr): New function.
4093 (x86_dr_low_get_addr, x86_dr_low_get_control)
4094 (x86_dr_low_get_status): Fetch the debug register from the thread
4095 record's context.
4096 (i386_initial_stuff): Adjust.
4097 (i386_get_thread_context): Remove current_event parameter. Don't
4098 clear debug_registers_changed nor copy DR values to
4099 debug_reg_state.
4100 (i386_set_thread_context): Delete.
4101 (i386_prepare_to_resume): New function.
4102 (i386_thread_added): Mark the thread as needing to update irs
4103 debug registers.
4104 (the_low_target): Remove i386_set_thread_context and install
4105 i386_prepare_to_resume.
4106 * win32-low.c (win32_get_thread_context): Adjust.
4107 (win32_set_thread_context): Use SetThreadContext
4108 directly.
4109 (win32_prepare_to_resume): New function.
4110 (win32_require_context): New function, factored out from ...
4111 (thread_rec): ... this.
4112 (continue_one_thread): Call win32_prepare_to_resume on each thread
4113 we're about to continue.
4114 (win32_resume): Call win32_prepare_to_resume on the event thread.
4115 * win32-low.h (struct win32_thread_info)
4116 <debug_registers_changed>: New field.
4117 (struct win32_target_ops): Change prototype of set_thread_context,
4118 delete set_thread_context and add prepare_to_resume.
4119 (win32_require_context): New declaration.
4120
4121 2014-10-08 Gary Benson <gbenson@redhat.com>
4122
4123 * server.h: Do not include common-exceptions.h.
4124
4125 2014-10-08 Gary Benson <gbenson@redhat.com>
4126
4127 * server.h: Do not include cleanups.h.
4128
4129 2014-09-30 James Hogan <james.hogan@imgtec.com>
4130
4131 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
4132 mips64-dsp-linux.c.
4133
4134 2014-09-23 Yao Qi <yao@codesourcery.com>
4135
4136 * linux-low.c (lp_status_maybe_breakpoint): New function.
4137 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
4138 (count_events_callback): Likewise.
4139 (select_event_lwp_callback): Likewise.
4140 (cancel_breakpoints_callback): Likewise.
4141
4142 2014-09-19 Don Breazeal <donb@codesourcery.com>
4143
4144 * linux-low.c (handle_extended_wait): Call
4145 linux_ptrace_get_extended_event.
4146 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
4147 linux_is_extended_waitstatus.
4148
4149 2014-09-16 Joel Brobecker <brobecker@adacore.com>
4150
4151 * Makefile.in (CPPFLAGS): Define.
4152 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
4153 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
4154
4155 2014-09-16 Gary Benson <gbenson@redhat.com>
4156
4157 * inferiors.h (current_inferior): Renamed as...
4158 (current_thread): New variable. All uses updated.
4159 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
4160 (maybe_move_out_of_jump_pad): Likewise.
4161 (cancel_breakpoint): Likewise.
4162 (linux_low_filter_event): Likewise.
4163 (wait_for_sigstop): Likewise.
4164 (linux_resume_one_lwp): Likewise.
4165 (need_step_over_p): Likewise.
4166 (start_step_over): Likewise.
4167 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
4168 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
4169 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
4170 and save_inferior as saved_thread.
4171 * regcache.c (get_thread_regcache): Renamed saved_inferior as
4172 saved_thread.
4173 (regcache_invalidate_thread): Likewise.
4174 * remote-utils.c (prepare_resume_reply): Likewise.
4175 * thread-db.c (thread_db_get_tls_address): Likewise.
4176 (disable_thread_event_reporting): Likewise.
4177 (remove_thread_event_breakpoints): Likewise.
4178 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
4179 as saved_thread.
4180 * target.h (set_desired_inferior): Renamed as...
4181 (set_desired_thread): New declaration. All uses updated.
4182 * server.c (myresume): Updated comment to reference thread instead
4183 of inferior.
4184 (handle_serial_event): Likewise.
4185 (handle_target_event): Likewise.
4186
4187 2014-09-12 Tom Tromey <tromey@redhat.com>
4188 Gary Benson <gbenson@redhat.com>
4189
4190 * regcache.h: Include common-regcache.h.
4191 (regcache_read_pc): Don't declare.
4192 * regcache.c (get_thread_regcache_for_ptid): New function.
4193
4194 2014-09-11 Tom Tromey <tromey@redhat.com>
4195 Gary Benson <gbenson@redhat.com>
4196
4197 * symbol.c: New file.
4198 * Makefile.in (SFILES): Add symbol.c.
4199 (OBS): Add symbol.o.
4200
4201 2014-09-11 Gary Benson <gbenson@redhat.com>
4202
4203 * target.c (target_stop_ptid, target_continue_ptid): New
4204 functions.
4205
4206 2014-09-11 Tom Tromey <tromey@redhat.com>
4207 Gary Benson <gbenson@redhat.com>
4208
4209 * target.h: Include target/target.h.
4210 * target.c (target_read_memory, target_read_uint32)
4211 (target_write_memory): New functions.
4212
4213 2014-09-11 Gary Benson <gbenson@redhat.com>
4214
4215 * server.h (debug_hw_points): Don't declare.
4216 * server.c (debug_hw_points): Don't define. Replace all uses
4217 with show_debug_regs.
4218 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
4219 all uses with show_debug_regs.
4220
4221 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
4222
4223 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
4224 endianness into account.
4225 (ppc_supply_ptrace_register): Likewise.
4226
4227 2014-09-03 James Hogan <james.hogan@imgtec.com>
4228
4229 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
4230 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
4231
4232 2014-09-03 Gary Benson <gbenson@redhat.com>
4233
4234 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
4235 ALL_DEBUG_ADDRESS_REGISTERS.
4236
4237 2014-09-02 Gary Benson <gbenson@redhat.com>
4238
4239 * i386-low.h: Renamed as...
4240 * x86-low.h: New file. All type, function and variable name
4241 prefixes changed from "i386_" to "x86_". All references updated.
4242 * i386-low.c: Renamed as...
4243 * x86-low.c: New file. All type, function and variable name
4244 prefixes changed from "i386_" to "x86_". All references updated.
4245
4246 2014-09-02 Gary Benson <gbenson@redhat.com>
4247
4248 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
4249 (x86_linux_new_thread): Likewise.
4250
4251 2014-08-29 Gary Benson <gbenson@redhat.com>
4252
4253 * server.h (setjmp.h): Do not include.
4254 (toplevel): Do not declare.
4255 (common-exceptions.h): Include.
4256 (cleanups.h): Likewise.
4257 * server.c (toplevel): Do not define.
4258 (exit_code): New static global.
4259 (detach_or_kill_for_exit_cleanup): New function.
4260 (main): New function. Original main renamed to...
4261 (captured_main): New function.
4262 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
4263
4264 2014-08-29 Gary Benson <gbenson@redhat.com>
4265
4266 * Makefile.in (SFILES): Add common/common-exceptions.c.
4267 (OBS): Add common-exceptions.o.
4268 (common-exceptions.o): New rule.
4269 * utils.c (prepare_to_throw_exception): New function.
4270
4271 2014-08-29 Gary Benson <gbenson@redhat.com>
4272
4273 * config.in: Regenerate.
4274 * configure: Likewise.
4275
4276 2014-08-29 Gary Benson <gbenson@redhat.com>
4277
4278 * Makefile.in (SFILES): Add common/cleanups.c.
4279 (OBS): cleanups.o.
4280 (cleanups.o): New rule.
4281
4282 2014-08-29 Gary Benson <gbenson@redhat.com>
4283
4284 * utils.c (internal_vwarning): New function.
4285
4286 2014-08-28 Gary Benson <gbenson@redhat.com>
4287
4288 * utils.h (fatal): Remove declaration.
4289 * utils.c (fatal): Remove function.
4290
4291 2014-08-28 Gary Benson <gbenson@redhat.com>
4292
4293 * tracepoint.c (gdb_agent_init): Replace fatal with
4294 perror_with_name.
4295 (initialize_tracepoint): Likewise.
4296
4297 2014-08-28 Gary Benson <gbenson@redhat.com>
4298
4299 * remote-utils.c (remote_prepare): Replace fatal with error.
4300
4301 2014-08-28 Gary Benson <gbenson@redhat.com>
4302
4303 * linux-low.c (linux_async): Replace fatal with warning.
4304 Tidy up and return.
4305 (linux_start_non_stop): Return -1 if linux_async failed.
4306
4307 2014-08-28 Gary Benson <gbenson@redhat.com>
4308
4309 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
4310 gdb_assert.
4311 (i386_dr_low_get_addr): Remove vague comment.
4312 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
4313 gdb_assert.
4314
4315 2014-08-28 Gary Benson <gbenson@redhat.com>
4316
4317 * inferiors.c (get_thread_process): Replace check with gdb_assert.
4318 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
4319 internal_error.
4320 (linux_resume_one_lwp): Likewise.
4321 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
4322 gdb_assert.
4323 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
4324 with internal_error.
4325 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
4326 (init_register_cache): Replace fatal with gdb_assert_not_reached.
4327 (find_register_by_name): Replace fatal with internal_error.
4328 (find_regno): Likewise.
4329 * tdesc.c (init_target_desc): Replace check with gdb_assert.
4330 * thread-db.c (thread_db_create_event): Likewise.
4331 (thread_db_load_search): Likewise.
4332 (try_thread_db_load_1): Likewise.
4333 * tracepoint.c (get_jump_space_head): Replace fatal with
4334 internal_error.
4335 (claim_trampoline_space): Likewise.
4336 (have_fast_tracepoint_trampoline_buffer): Likewise.
4337 (cmd_qtstart): Likewise.
4338 (stop_tracing): Likewise.
4339 (fast_tracepoint_collecting): Likewise.
4340 (target_malloc): Likewise.
4341 (download_tracepoint): Likewise.
4342 (download_trace_state_variables): Replace check with gdb_assert.
4343 (upload_fast_traceframes): Replace fatal with internal_error.
4344
4345 2014-08-19 Tom Tromey <tromey@redhat.com>
4346 Gary Benson <gbenson@redhat.com>
4347
4348 * Makefile.in (SFILES): Add common/common-debug.c.
4349 (OBS): Add common-debug.o.
4350 (common-debug.o): New rule.
4351 * debug.h (debug_printf): Don't declare.
4352 * debug.c (debug_printf): Renamed and rewritten as...
4353 (debug_vprintf): New function.
4354
4355 2014-08-19 Gary Benson <gbenson@redhat.com>
4356
4357 * utils.h: Do not include print-utils.h.
4358
4359 2014-08-19 Tom Tromey <tromey@redhat.com>
4360 Gary Benson <gbenson@redhat.com>
4361
4362 * server.h: Add static assertion.
4363 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
4364
4365 2014-08-19 Tom Tromey <tromey@redhat.com>
4366 Gary Benson <gbenson@redhat.com>
4367
4368 * Makefile.in (SFILES): Add common/errors.c.
4369 (OBS): Add errors.o.
4370 (IPA_OBS): Add errors-ipa.o.
4371 (errors.o): New rule.
4372 (errors-ipa.o): Likewise.
4373 * utils.h (perror_with_name, error, warning): Don't declare.
4374 * utils.c (warning): Renamed and rewritten as...
4375 (vwarning): New function.
4376 (error): Renamed and rewritten as...
4377 (verror): New function.
4378 (internal_error): Renamed and rewritten as...
4379 (internal_verror): New function.
4380
4381 2014-08-07 Gary Benson <gbenson@redhat.com>
4382
4383 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
4384 * configure: Regenerate.
4385 * config.in: Likewise.
4386 * server.h: Do not include errno.h.
4387 * event-loop.c: Likewise.
4388 * hostio-errno.c: Likewise.
4389 * linux-low.c: Likewise.
4390 * remote-utils.c: Likewise.
4391 * spu-low.c: Likewise.
4392 * utils.c: Likewise.
4393 * gdbreplay.c: Unconditionally include errno.h.
4394
4395 2014-08-07 Gary Benson <gbenson@redhat.com>
4396
4397 * server.h: Do not include string.h.
4398 * event-loop.c: Likewise.
4399 * linux-low.c: Likewise.
4400 * regcache.c: Likewise.
4401 * remote-utils.c: Likewise.
4402 * spu-low.c: Likewise.
4403 * utils.c: Likewise.
4404
4405 2014-08-07 Gary Benson <gbenson@redhat.com>
4406
4407 * server.h: Do not include gdb_assert.h.
4408
4409 2014-08-07 Gary Benson <gbenson@redhat.com>
4410
4411 * server.h: Do not include common-utils.h.
4412
4413 2014-08-07 Gary Benson <gbenson@redhat.com>
4414
4415 * server.h: Do not include ptid.h.
4416 * notif.h: Likewise.
4417
4418 2014-08-07 Gary Benson <gbenson@redhat.com>
4419
4420 * server.h: Do not include gdb_locale.h.
4421
4422 2014-08-07 Gary Benson <gbenson@redhat.com>
4423
4424 * server.h: Do not include gdb/signals.h.
4425 * win32-low.c: Likewise.
4426
4427 2014-08-07 Gary Benson <gbenson@redhat.com>
4428
4429 * server.h: Do not include pathmax.h.
4430
4431 2014-08-07 Gary Benson <gbenson@redhat.com>
4432
4433 * server.h: Do not include libiberty.h.
4434 * linux-bfin-low.c: Likewise.
4435
4436 2014-08-07 Gary Benson <gbenson@redhat.com>
4437
4438 * server.h: Do not include ansidecl.h.
4439
4440 2014-08-07 Gary Benson <gbenson@redhat.com>
4441
4442 * linux-x86-low.c: Do not include stddef.h.
4443 * lynx-ppc-low.c: Likewise.
4444 * tracepoint.c: Likewise.
4445
4446 2014-08-07 Gary Benson <gbenson@redhat.com>
4447
4448 * server.h: Do not include stdarg.h.
4449 * nto-low.c: Likewise.
4450
4451 2014-08-07 Gary Benson <gbenson@redhat.com>
4452
4453 * server.h: Do not include stdlib.h.
4454 * inferiors.c: Likewise.
4455 * linux-low.c: Likewise.
4456 * regcache.c: Likewise.
4457 * spu-low.c: Likewise.
4458 * tracepoint.c: Likewise.
4459 * utils.c: Likewise.
4460
4461 2014-08-07 Gary Benson <gbenson@redhat.com>
4462
4463 * server.h: Do not include stdio.h.
4464 * linux-low.c: Likewise.
4465 * remote-utils.c: Likewise.
4466 * spu-low.c: Likewise.
4467 * utils.c: Likewise.
4468 * wincecompat.c: Likewise.
4469
4470 2014-08-06 Gary Benson <gbenson@redhat.com>
4471
4472 * regcache.c (init_register_cache): Move conditionals inside if.
4473
4474 2014-08-06 Gary Benson <gbenson@redhat.com>
4475
4476 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
4477
4478 2014-07-31 Gary Benson <gbenson@redhat.com>
4479
4480 * ax.h: Do not include server.h.
4481 * gdbthread.h: Likewise.
4482 * lynx-low.h: Likewise.
4483 * notif.h: Likewise.
4484
4485 2014-07-30 Gary Benson <gbenson@redhat.com>
4486
4487 * server.h: Include common-defs.h.
4488 Do not include config.h or build-gnulib-gdbserver/config.h.
4489
4490 2014-07-30 Gary Benson <gbenson@redhat.com>
4491
4492 * hostio-errno.c: Move server.h to top of includes list.
4493 * inferiors.c: Likewise.
4494 * linux-x86-low.c: Likewise.
4495 * notif.c: Include server.h.
4496
4497 2014-07-24 Tom Tromey <tromey@redhat.com>
4498 Gary Benson <gbenson@redhat.com>
4499
4500 * server.h (CORE_ADDR): Now unsigned.
4501
4502 2014-07-16 Pedro Alves <palves@redhat.com>
4503
4504 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
4505
4506 2014-07-15 Pedro Alves <palves@redhat.com>
4507
4508 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
4509 copy.
4510
4511 2014-07-11 Pedro Alves <palves@redhat.com>
4512
4513 * linux-low.c (kill_wait_lwp): New function, based on
4514 kill_one_lwp_callback, but use my_waitpid directly.
4515 (kill_one_lwp_callback, linux_kill): Use it.
4516
4517 2014-06-23 Pedro Alves <palves@redhat.com>
4518
4519 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
4520 before setting DR0..DR3.
4521
4522 2014-06-20 Gary Benson <gbenson@redhat.com>
4523
4524 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
4525 * configure: Regenerated.
4526 * config.in: Likewise.
4527
4528 2014-06-20 Gary Benson <gbenson@redhat.com>
4529
4530 * Makefile.in (SFILES): Update locations for files moved
4531 from common to nat.
4532 (object file files): Reordered.
4533
4534 2014-06-20 Gary Benson <gbenson@redhat.com>
4535
4536 * i386-low.h (i386_dr_low_can_set_addr): Removed.
4537 (i386_dr_low_set_addr): Likewise.
4538 (i386_dr_low_get_addr): Likewise.
4539 (i386_dr_low_can_set_control): Likewise.
4540 (i386_dr_low_set_control): Likewise.
4541 (i386_dr_low_get_control): Likewise.
4542 (i386_dr_low_get_status): Likewise.
4543 (i386_get_debug_register_length): Likewise.
4544 * linux-x86-low.c (i386_dr_low_set_addr):
4545 Changed signature. Made static.
4546 (i386_dr_low_get_addr): Likewise.
4547 (i386_dr_low_set_control): Likewise.
4548 (i386_dr_low_get_control): Likewise.
4549 (i386_dr_low_get_status): Likewise.
4550 (i386_dr_low): New global variable.
4551 * win32-i386-low.c (i386_dr_low_set_addr):
4552 Changed signature. Made static.
4553 (i386_dr_low_get_addr): Likewise.
4554 (i386_dr_low_set_control): Likewise.
4555 (i386_dr_low_get_control): Likewise.
4556 (i386_dr_low_get_status): Likewise.
4557 (i386_dr_low): New global variable.
4558
4559 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
4560
4561 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
4562 * Makefile.in (AR, AR_FLAGS): Define.
4563 * configure: Regenerate.
4564
4565 2014-06-19 Gary Benson <gbenson@redhat.com>
4566
4567 * Makefile.in (i386-dregs.o): New rule.
4568 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
4569 * i386-low.c (target.h): Remove include.
4570 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
4571 (DR_CONTROL_SHIFT): Likewise.
4572 (DR_CONTROL_SIZE): Likewise.
4573 (DR_RW_EXECUTE): Likewise.
4574 (DR_RW_WRITE): Likewise.
4575 (DR_RW_READ): Likewise.
4576 (DR_RW_IORW): Likewise.
4577 (DR_LEN_1): Likewise.
4578 (DR_LEN_2): Likewise.
4579 (DR_LEN_4): Likewise.
4580 (DR_LEN_8): Likewise.
4581 (DR_LOCAL_ENABLE_SHIFT): Likewise.
4582 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
4583 (DR_ENABLE_SIZE): Likewise.
4584 (DR_LOCAL_SLOWDOWN): Likewise.
4585 (DR_GLOBAL_SLOWDOWN): Likewise.
4586 (DR_CONTROL_RESERVED): Likewise.
4587 (I386_DR_CONTROL_MASK): Likewise.
4588 (I386_DR_VACANT): Likewise.
4589 (I386_DR_LOCAL_ENABLE): Likewise.
4590 (I386_DR_GLOBAL_ENABLE): Likewise.
4591 (I386_DR_DISABLE): Likewise.
4592 (I386_DR_SET_RW_LEN): Likewise.
4593 (I386_DR_GET_RW_LEN): Likewise.
4594 (I386_DR_WATCH_HIT): Likewise.
4595 (i386_wp_op_t): Likewise.
4596 (i386_show_dr): Likewise.
4597 (i386_length_and_rw_bits): Likewise.
4598 (i386_insert_aligned_watchpoint): Likewise.
4599 (i386_remove_aligned_watchpoint): Likewise.
4600 (i386_handle_nonaligned_watchpoint): Likewise.
4601 i386_update_inferior_debug_regs(): Likewise.
4602 (i386_dr_insert_watchpoint): Likewise.
4603 (i386_dr_remove_watchpoint): Likewise.
4604 (i386_dr_region_ok_for_watchpoint): Likewise.
4605 (i386_dr_stopped_data_address): Likewise.
4606 (i386_dr_stopped_by_watchpoint): Likewise.
4607
4608 2014-06-19 Gary Benson <gbenson@redhat.com>
4609
4610 * i386-low.c (i386_dr_show): Renamed to
4611 i386_show_dr and made static. All uses updated.
4612 (i386_dr_length_and_rw_bits): Renamed to
4613 i386_length_and_rw_bits and made static.
4614 All uses updated.
4615 (i386_dr_insert_aligned_watchpoint): Renamed to
4616 i386_insert_aligned_watchpoint and made static.
4617 All uses updated.
4618 (i386_dr_remove_aligned_watchpoint): Renamed to
4619 i386_remove_aligned_watchpoint and made static.
4620 All uses updated.
4621 (i386_dr_update_inferior_debug_regs): Renamed to
4622 i386_update_inferior_debug_regs and made static.
4623 All uses updated.
4624
4625 2014-06-18 Gary Benson <gbenson@redhat.com>
4626
4627 * i386-low.h (i386_dr_low_can_set_addr): New macro.
4628 (i386_dr_low_can_set_control): Likewise.
4629 (i386_get_debug_register_length): Likewise.
4630 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
4631 (i386_dr_low_can_set_control): Likewise.
4632 (i386_get_debug_register_length): Likewise.
4633
4634 2014-06-17 Gary Benson <gbenson@redhat.com>
4635
4636 * i386-low.h (i386-dregs.h): New include.
4637 (DR_FIRSTADDR): Now in i386-dregs.h.
4638 (DR_LASTADDR): Likewise.
4639 (DR_NADDR): Likewise.
4640 (DR_STATUS): Likewise.
4641 (DR_CONTROL): Likewise.
4642 (i386_debug_reg_state): Likewise.
4643 (i386_dr_insert_watchpoint): Likewise.
4644 (i386_dr_remove_watchpoint): Likewise.
4645 (i386_dr_region_ok_for_watchpoint): Likewise.
4646 (i386_dr_stopped_data_address): Likewise.
4647 (i386_dr_stopped_by_watchpoint): Likewise.
4648 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
4649
4650 2014-06-18 Gary Benson <gbenson@redhat.com>
4651
4652 * i386-low.h (i386_low_insert_watchpoint): Renamed to
4653 i386_dr_insert_watchpoint.
4654 (i386_low_remove_watchpoint): Renamed to
4655 i386_dr_remove_watchpoint.
4656 (i386_low_region_ok_for_watchpoint): Renamed to
4657 i386_dr_region_ok_for_watchpoint.
4658 (i386_low_stopped_data_address): Renamed to
4659 i386_dr_stopped_data_address.
4660 (i386_low_stopped_by_watchpoint): Renamed to
4661 i386_dr_stopped_by_watchpoint.
4662 * i386-low.c (i386_show_dr): Renamed to
4663 i386_dr_show and made nonstatic. All uses updated.
4664 (i386_length_and_rw_bits): Renamed to
4665 i386_dr_length_and_rw_bits and made nonstatic.
4666 All uses updated.
4667 (i386_insert_aligned_watchpoint): Renamed to
4668 i386_dr_insert_aligned_watchpoint and made nonstatic.
4669 All uses updated.
4670 (i386_remove_aligned_watchpoint): Renamed to
4671 i386_dr_remove_aligned_watchpoint and made nonstatic.
4672 All uses updated.
4673 (i386_update_inferior_debug_regs): Renamed to
4674 i386_dr_update_inferior_debug_regs and made nonstatic.
4675 All uses updated.
4676 (i386_low_insert_watchpoint): Renamed to
4677 i386_dr_insert_watchpoint. All uses updated.
4678 (i386_low_remove_watchpoint): Renamed to
4679 i386_dr_remove_watchpoint. All uses updated.
4680 (i386_low_region_ok_for_watchpoint): Renamed to
4681 i386_dr_region_ok_for_watchpoint. All uses updated.
4682 (i386_low_stopped_data_address): Renamed to
4683 i386_dr_stopped_data_address. All uses updated.
4684 (i386_low_stopped_by_watchpoint): Renamed to
4685 i386_dr_stopped_by_watchpoint. All uses updated.
4686
4687 2014-06-18 Gary Benson <gbenson@redhat.com>
4688
4689 * i386-low.c (i386_dr_low_can_set_addr): New macro.
4690 (i386_dr_low_can_set_control): Likewise.
4691 (i386_insert_aligned_watchpoint): New check.
4692
4693 2014-06-18 Gary Benson <gbenson@redhat.com>
4694
4695 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
4696 Renamed to state.
4697
4698 2014-06-18 Gary Benson <gbenson@redhat.com>
4699
4700 * i386-low.c (i386_length_and_rw_bits): Use internal_error
4701 instead of fatal and error.
4702 (i386_handle_nonaligned_watchpoint): Likewise.
4703
4704 2014-06-18 Gary Benson <gbenson@redhat.com>
4705
4706 * i386-low.c (i386_get_debug_register_length): New macro.
4707 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
4708 (i386_show_dr): Use debug_printf instead of fprintf. Use
4709 phex to format values.
4710
4711 2014-06-18 Gary Benson <gbenson@redhat.com>
4712
4713 * i386-low.h: Comment changes.
4714 * i386-low.c: Likewise.
4715
4716 2014-06-18 Gary Benson <gbenson@redhat.com>
4717
4718 * i386-low.c: Whitespace changes.
4719
4720 2014-06-12 Tom Tromey <tromey@redhat.com>
4721
4722 * utils.c (freeargv): Remove.
4723
4724 2014-06-12 Tom Tromey <tromey@redhat.com>
4725
4726 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
4727 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
4728 (parse_debug_format_options): Likewise.
4729 (gdbserver_usage): Likewise.
4730 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
4731 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
4732 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
4733 against libiberty.
4734 ($(LIBGNU)): Depend on libiberty.
4735 (all-lib): Recurse into all subdirs.
4736 (install-only): Invoke "install" target in subdirs.
4737 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
4738 targets.
4739 * configure: Rebuild.
4740 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
4741 for vasprintf, vsnprintf, or gettimeofday.
4742 * configure.srv: Don't add safe-ctype.o or lbasename.o to
4743 srv_tgtobj.
4744
4745 2014-06-05 Joel Brobecker <brobecker@adacore.com>
4746
4747 * development.sh: Delete.
4748 * Makefile.in (config.status): Adjust dependency on development.sh.
4749 * configure.ac: Adjust development.sh source call.
4750 * configure: Regenerate.
4751
4752 2014-06-02 Pedro Alves <palves@redhat.com>
4753
4754 * ax.c (gdb_free_agent_expr): New function.
4755 * ax.h (gdb_free_agent_expr): New declaration.
4756 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
4757 list.
4758 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
4759 static.
4760 (clear_breakpoint_conditions_and_commands): New function.
4761 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
4762 (clear_breakpoint_conditions_and_commands): New declaration.
4763
4764 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
4765
4766 * linux-aarch64-low.c (asm/ptrace.h): Include.
4767
4768 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
4769
4770 Fix TLS access for -static -pthread.
4771 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
4772 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
4773 (thread_db_load_search, try_thread_db_load_1): Initialize it.
4774
4775 2014-05-20 Pedro Alves <palves@redhat.com>
4776
4777 * linux-aarch64-low.c (aarch64_insert_point)
4778 (aarch64_remove_point): No longer check whether the type is
4779 supported here. Adjust to new interface.
4780 (the_low_target): Install aarch64_supports_z_point_type as
4781 supports_z_point_type method.
4782 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
4783 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
4784 instead of a Z packet char. Adjust.
4785 (arm_supports_z_point_type): New function.
4786 (arm_insert_point, arm_remove_point): Adjust to new interface.
4787 (the_low_target): Install arm_supports_z_point_type.
4788 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
4789 (cris_insert_point, cris_remove_point): Adjust to new interface.
4790 Don't check whether the type is supported here.
4791 (the_low_target): Install cris_supports_z_point_type.
4792 * linux-low.c (linux_supports_z_point_type): New function.
4793 (linux_insert_point, linux_remove_point): Adjust to new interface.
4794 * linux-low.h (struct linux_target_ops) <insert_point,
4795 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
4796 raw_breakpoint pointer parameter.
4797 <supports_z_point_type>: New method.
4798 * linux-mips-low.c (mips_supports_z_point_type): New function.
4799 (mips_insert_point, mips_remove_point): Adjust to new interface.
4800 Use mips_supports_z_point_type.
4801 (the_low_target): Install mips_supports_z_point_type.
4802 * linux-ppc-low.c (the_low_target): Install NULL as
4803 supports_z_point_type method.
4804 * linux-s390-low.c (the_low_target): Install NULL as
4805 supports_z_point_type method.
4806 * linux-sparc-low.c (the_low_target): Install NULL as
4807 supports_z_point_type method.
4808 * linux-x86-low.c (x86_supports_z_point_type): New function.
4809 (x86_insert_point): Adjust to new insert_point interface. Use
4810 insert_memory_breakpoint. Adjust to new
4811 i386_low_insert_watchpoint interface.
4812 (x86_remove_point): Adjust to remove_point interface. Use
4813 remove_memory_breakpoint. Adjust to new
4814 i386_low_remove_watchpoint interface.
4815 (the_low_target): Install x86_supports_z_point_type.
4816 * lynx-low.c (lynx_target_ops): Install NULL as
4817 supports_z_point_type callback.
4818 * nto-low.c (nto_supports_z_point_type): New.
4819 (nto_insert_point, nto_remove_point): Adjust to new interface.
4820 (nto_target_ops): Install nto_supports_z_point_type.
4821 * mem-break.c: Adjust intro comment.
4822 (struct raw_breakpoint) <raw_type, size>: New fields.
4823 <inserted>: Update comment.
4824 <shlib_disabled>: Delete field.
4825 (enum bkpt_type) <gdb_breakpoint>: Delete value.
4826 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
4827 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
4828 (raw_bkpt_type_to_target_hw_bp_type): New function.
4829 (find_enabled_raw_code_breakpoint_at): New function.
4830 (find_raw_breakpoint_at): New type and size parameters. Use them.
4831 (insert_memory_breakpoint): New function, based off
4832 set_raw_breakpoint_at.
4833 (remove_memory_breakpoint): New function.
4834 (set_raw_breakpoint_at): Reimplement.
4835 (set_breakpoint): New, based on set_breakpoint_at.
4836 (set_breakpoint_at): Reimplement.
4837 (delete_raw_breakpoint): Go through the_target->remove_point
4838 instead of assuming memory breakpoints.
4839 (find_gdb_breakpoint_at): Delete.
4840 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
4841 (find_gdb_breakpoint): New function.
4842 (set_gdb_breakpoint_at): Delete.
4843 (z_type_supported): New function.
4844 (set_gdb_breakpoint_1): New function, loosely based off
4845 set_gdb_breakpoint_at.
4846 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
4847 (delete_gdb_breakpoint_at): Delete.
4848 (delete_gdb_breakpoint_1): New function, loosely based off
4849 delete_gdb_breakpoint_at.
4850 (delete_gdb_breakpoint): New function.
4851 (clear_gdb_breakpoint_conditions): Rename to ...
4852 (clear_breakpoint_conditions): ... this. Don't handle a NULL
4853 breakpoint.
4854 (add_condition_to_breakpoint): Make static.
4855 (add_breakpoint_condition): Take a struct breakpoint pointer
4856 instead of an address. Adjust.
4857 (gdb_condition_true_at_breakpoint): Rename to ...
4858 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
4859 z_type parameter.
4860 (gdb_condition_true_at_breakpoint): Reimplement.
4861 (add_breakpoint_commands): Take a struct breakpoint pointer
4862 instead of an address. Adjust.
4863 (gdb_no_commands_at_breakpoint): Rename to ...
4864 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
4865 parameter. Return true if no breakpoint was found. Change debug
4866 output.
4867 (gdb_no_commands_at_breakpoint): Reimplement.
4868 (run_breakpoint_commands): Rename to ...
4869 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
4870 and change return type to boolean.
4871 (run_breakpoint_commands): New function.
4872 (gdb_breakpoint_here): Also check for Z1 breakpoints.
4873 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
4874 breakpoint. Go through the_target->remove_point instead of
4875 assuming memory breakpoint.
4876 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
4877 software and hardware breakpoints.
4878 (reinsert_raw_breakpoint): Go through the_target->insert_point
4879 instead of assuming memory breakpoint.
4880 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
4881 software and hardware breakpoints.
4882 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
4883 Check both software and hardware breakpoints.
4884 (validate_inserted_breakpoint): Assert the breakpoint is a
4885 software breakpoint. Set the inserted flag to -1 instead of
4886 setting shlib_disabled.
4887 (delete_disabled_breakpoints): Adjust.
4888 (validate_breakpoints): Only validate software breakpoints.
4889 Adjust to inserted flag change.
4890 (check_mem_read, check_mem_write): Skip breakpoint types other
4891 than software breakpoints. Adjust to inserted flag change.
4892 * mem-break.h (enum raw_bkpt_type): New enum.
4893 (raw_breakpoint, struct process_info): Forward declare.
4894 (Z_packet_to_target_hw_bp_type): Delete declaration.
4895 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
4896 (set_gdb_breakpoint, delete_gdb_breakpoint)
4897 (clear_breakpoint_conditions): New declarations.
4898 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
4899 (breakpoint_inserted_here): Update comment.
4900 (add_breakpoint_condition, add_breakpoint_commands): Replace
4901 address parameter with a breakpoint pointer parameter.
4902 (gdb_breakpoint_here): Update comment.
4903 (delete_gdb_breakpoint_at): Delete.
4904 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
4905 * server.c (process_point_options): Take a struct breakpoint
4906 pointer instead of an address. Adjust.
4907 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
4908 delete_gdb_breakpoint.
4909 * spu-low.c (spu_target_ops): Install NULL as
4910 supports_z_point_type method.
4911 * target.h: Include mem-break.h.
4912 (struct target_ops) <prepare_to_access_memory>: Update comment.
4913 <supports_z_point_type>: New field.
4914 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
4915 instead of a char. Also take a raw breakpoint pointer.
4916 * win32-arm-low.c (the_low_target): Install NULL as
4917 supports_z_point_type.
4918 * win32-i386-low.c (i386_supports_z_point_type): New function.
4919 (i386_insert_point, i386_remove_point): Adjust to new interface.
4920 (the_low_target): Install i386_supports_z_point_type.
4921 * win32-low.c (win32_supports_z_point_type): New function.
4922 (win32_insert_point, win32_remove_point): Adjust to new interface.
4923 (win32_target_ops): Install win32_supports_z_point_type.
4924 * win32-low.h (struct win32_target_ops):
4925 <supports_z_point_type>: New method.
4926 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
4927 instead of a char. Also take a raw breakpoint pointer.
4928
4929 2014-05-20 Pedro Alves <palves@redhat.com>
4930
4931 * mem-break.h: Include break-common.h.
4932 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
4933 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
4934 (Z_packet_to_target_hw_bp_type): New declaration.
4935 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
4936 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
4937 (Z_PACKET_ACCESS_WP): Delete macros.
4938 (Z_packet_to_hw_type): Delete function.
4939 * i386-low.h: Don't include break-common.h here.
4940 (Z_packet_to_hw_type): Delete declaration.
4941 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
4942 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4943 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
4944 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4945 * linux-aarch64-low.c: Don't include break-common.h here.
4946 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
4947 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
4948 (Z_packet_to_target_hw_bp_type): Delete function.
4949 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
4950 function.
4951 (mips_insert_point, mips_remove_point): Use
4952 Z_packet_to_target_hw_bp_type.
4953
4954 2014-05-20 Pedro Alves <palves@redhat.com>
4955
4956 * linux-aarch64-low.c: Include break-common.h.
4957 (enum target_point_type): Delete.
4958 (Z_packet_to_point_type): Rename to ...
4959 (Z_packet_to_target_hw_bp_type): ... this, and return a
4960 target_hw_bp_type instead.
4961 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
4962 instead of an enum target_point_type.
4963 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
4964 breakpoint type.
4965 (aarch64_dr_state_insert_one_point)
4966 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
4967 (aarch64_handle_aligned_watchpoint)
4968 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
4969 Take an enum target_hw_bp_type instead of an enum
4970 target_point_type.
4971 (aarch64_supports_z_point_type): New function.
4972 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
4973 use Z_packet_to_target_hw_bp_type.
4974
4975 2014-05-20 Joel Brobecker <brobecker@adacore.com>
4976
4977 * configure.ac: Only use -Werror by default when DEVELOPMENT
4978 is true.
4979 * configure: Regenerate.
4980
4981 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
4982
4983 Fix gdbserver qGetTLSAddr for x86_64 -m32.
4984 * linux-x86-low.c (X86_64_USER_REGS): New.
4985 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
4986
4987 2014-04-28 Yao Qi <yao@codesourcery.com>
4988
4989 * Makefile.in (i386-avx512.c): Fix the typo of generated file
4990 name.
4991
4992 2014-04-25 Pedro Alves <palves@redhat.com>
4993
4994 PR server/16255
4995 * linux-low.c (linux_attach_fail_reason_string): New function.
4996 (linux_attach_lwp): Delete.
4997 (linux_attach_lwp_1): Rename to ...
4998 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
4999 argument. Remove "initial" parameter. Return int instead of
5000 void. Don't error or warn here.
5001 (linux_attach): Adjust to call linux_attach_lwp. Call error on
5002 failure to attach to the tgid. Call warning when failing to
5003 attach to an lwp.
5004 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
5005 argument. Remove "initial" parameter. Return int instead of
5006 void. Don't error or warn here.
5007 (linux_attach_fail_reason_string): New declaration.
5008 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
5009 interface change. Use linux_attach_fail_reason_string.
5010
5011 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
5012 Walfred Tedeschi <walfred.tedeschi@intel.com>
5013
5014 * Makefile.in: Added rules to handle new files
5015 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
5016 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
5017 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
5018 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
5019 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
5020 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
5021 x32-avx512-linux.o.
5022 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
5023 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
5024 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
5025 i386/x32-avx512.xml.
5026 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
5027 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
5028 i386/x32-avx512-linux.xml.
5029 * i387-fp.c (num_avx512_k_registers): New constant for number
5030 of K registers.
5031 (num_avx512_zmmh_low_registers): New constant for number of
5032 lower ZMM registers (0-15).
5033 (num_avx512_zmmh_high_registers): New constant for number of
5034 higher ZMM registers (16-31).
5035 (num_avx512_ymmh_registers): New contant for number of higher
5036 YMM registers (ymm16-31 added by avx521 on x86_64).
5037 (num_avx512_xmm_registers): New constant for number of higher
5038 XMM registers (xmm16-31 added by AVX512 on x86_64).
5039 (struct i387_xsave): Add space for AVX512 registers.
5040 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
5041 Add code to handle AVX512 registers.
5042 (i387_xsave_to_cache): Add code to handle AVX512 registers.
5043 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
5044 prototypei from generated file.
5045 (tdesc_amd64_avx512_linux): Likewise.
5046 (init_registers_x32_avx512_linux): Likewise.
5047 (tdesc_x32_avx512_linux): Likewise.
5048 (init_registers_i386_avx512_linux): Likewise.
5049 (tdesc_i386_avx512_linux): Likewise.
5050 (x86_64_regmap): Add AVX512 registers.
5051 (x86_linux_read_description): Add code to handle AVX512 XSTATE
5052 mask.
5053 (initialize_low_arch): Add code to initialize AVX512 registers.
5054
5055 2014-04-23 Pedro Alves <palves@redhat.com>
5056
5057 * mem-break.c (find_gdb_breakpoint_at): Make static.
5058 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
5059
5060 2014-04-23 Pedro Alves <palves@redhat.com>
5061
5062 * i386-low.c: Don't include break-common.h here.
5063 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5064 prototype to take target_hw_bp_type as argument instead of a Z
5065 packet char.
5066 * i386-low.h: Include break-common.h here.
5067 (Z_packet_to_hw_type): Declare.
5068 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5069 prototypes.
5070 * linux-x86-low.c (x86_insert_point): Convert the packet number to
5071 a target_hw_bp_type before calling i386_low_insert_watchpoint.
5072 (x86_remove_point): Convert the packet number to a
5073 target_hw_bp_type before calling i386_low_remove_watchpoint.
5074 * win32-i386-low.c (i386_insert_point): Convert the packet number
5075 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
5076 (i386_remove_point): Convert the packet number to a
5077 target_hw_bp_type before calling i386_low_remove_watchpoint.
5078
5079 2014-04-23 Pedro Alves <palves@redhat.com>
5080
5081 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
5082
5083 2014-04-10 Pedro Alves <palves@redhat.com>
5084
5085 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5086 Check if the condition or command is NULL before checking if the
5087 breakpoint is known. On success, return true.
5088 * mem-break.h (add_breakpoint_condition): Document return.
5089 (add_breakpoint_commands): Add describing comment.
5090 * server.c (skip_to_semicolon): New function.
5091 (process_point_options): Use it.
5092
5093 2014-04-09 Pedro Alves <palves@redhat.com>
5094
5095 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
5096 to lwpid_of.
5097
5098 2014-02-27 Pedro Alves <palves@redhat.com>
5099
5100 PR 12702
5101 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
5102 macros.
5103 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
5104 output.
5105 (last_thread_of_process_p): Take a PID argument instead of a
5106 thread pointer.
5107 (linux_wait_for_lwp): Delete.
5108 (num_lwps, check_zombie_leaders, not_stopped_callback): New
5109 functions.
5110 (linux_low_filter_event): New function, party factored out from
5111 linux_wait_for_event.
5112 (linux_wait_for_event): Rename to ...
5113 (linux_wait_for_event_filtered): ... this. Add new filter ptid
5114 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
5115 sigsuspend. Check for zombie leaders.
5116 (linux_wait_for_event): Reimplement as wrapper around
5117 linux_wait_for_event_filtered.
5118 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
5119 a normal or signal exit is seen, it's the whole process exiting.
5120 (wait_for_sigstop): No longer a for_each_inferior callback.
5121 Rewrite on top of linux_wait_for_event_filtered.
5122 (stop_all_lwps): Call wait_for_sigstop directly.
5123 * server.c (resume, handle_target_event): Handle
5124 TARGET_WAITKIND_NO_RESUMED.
5125
5126 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5127
5128 * win32-low.c (psapi_get_dll_name,
5129 * win32_CreateToolhelp32Snapshot): Delete.
5130 (win32_CreateToolhelp32Snapshot, win32_Module32First)
5131 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
5132 Delete.
5133 (handle_load_dll): Add function description.
5134 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
5135
5136 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5137
5138 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
5139 Add comment.
5140 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
5141 base address when calling win32_add_one_solib.
5142 (handle_load_dll): Delete local variable load_addr.
5143 Remove 0x1000 offset applied to DLL base address when calling
5144 win32_add_one_solib.
5145 (handle_unload_dll): Add comment.
5146
5147 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5148
5149 * win32-low.c (win32_add_all_dlls): Renames
5150 win32_ensure_ntdll_loaded. Rewrite function documentation.
5151 Adjust implementation to always load all DLLs.
5152 Add 0x1000 offset to DLL base address when calling
5153 win32_add_one_solib.
5154 (child_initialization_done): New static global.
5155 (do_initial_child_stuff): Set child_initialization_done to
5156 zero during child initialization, and 1 after. Replace call
5157 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
5158 Add comment.
5159 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
5160 (handle_unload_dll): Add function documentation.
5161 (get_child_debug_event): Ignore load and unload DLL events
5162 during child initialization.
5163
5164 2014-02-20 Doug Evans <dje@google.com>
5165
5166 Remove global all_lwps.
5167 * inferiors.h (ptid_of): Move here from linux-low.h.
5168 (pid_of, lwpid_of): Ditto.
5169 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
5170 parameter is a struct thread_info * now.
5171 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
5172 directly. Pass &all_threads to find_inferior instead of &all_lwps.
5173 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
5174 directly.
5175 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
5176 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
5177 * linux-arm-low.c (update_registers_callback): Update, "entry"
5178 parameter is a struct thread_info * now.
5179 Fetch lwpid from current_inferior directly.
5180 (arm_insert_point): Pass &all_threads to find_inferior instead of
5181 &all_lwps.
5182 (arm_remove_point): Ditto.
5183 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
5184 (arm_prepare_to_resume): Fetch pid from thread.
5185 (arm_read_description): Fetch lwpid from current_inferior directly.
5186 * linux-low.c (all_lwps): Delete.
5187 (delete_lwp): Delete call to remove_inferior.
5188 (handle_extended_wait): Fetch lwpid from thread.
5189 (add_lwp): Don't set lwp->entry.id. Remove call to
5190 add_inferior_to_list.
5191 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
5192 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
5193 (kill_one_lwp_callback): Ditto.
5194 (linux_kill): Don't dereference NULL pointer.
5195 Fetch ptid,lwpid from thread.
5196 (get_detach_signal): Fetch ptid from thread.
5197 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
5198 Simplify call to regcache_invalidate_thread.
5199 (delete_lwp_callback): Update, "entry" parameter is a
5200 struct thread_info * now. Fetch pid from thread.
5201 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
5202 (status_pending_p_callback): Update, "entry" parameter is a
5203 struct thread_info * now. Fetch ptid from thread.
5204 (find_lwp_pid): Update, "entry" parameter is a
5205 struct thread_info * now.
5206 (linux_wait_for_lwp): Fetch pid from thread.
5207 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
5208 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
5209 (enqueue_one_deferred_signal): Fetch lwpid from thread.
5210 (dequeue_one_deferred_signal): Ditto.
5211 (cancel_breakpoint): Fetch ptid from current_inferior.
5212 (linux_wait_for_event): Pass &all_threads to find_inferior,
5213 not &all_lwps. Fetch ptid, lwpid from thread.
5214 (count_events_callback): Update, "entry" parameter is a
5215 struct thread_info * now.
5216 (select_singlestep_lwp_callback): Ditto.
5217 (select_event_lwp_callback): Ditto.
5218 (cancel_breakpoints_callback): Ditto.
5219 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
5220 not &all_lwps.
5221 (select_event_lwp): Ditto. Fetch ptid from event_thread.
5222 (unsuspend_one_lwp): Update, "entry" parameter is a
5223 struct thread_info * now.
5224 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
5225 not &all_lwps.
5226 (linux_stabilize_threads): Ditto. And for for_each_inferior.
5227 Fetch lwpid from thread, not lwp.
5228 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
5229 Pass &all_threads to find_inferior, not &all_lwps.
5230 (send_sigstop): Fetch lwpid from thread, not lwp.
5231 (send_sigstop_callback): Update, "entry" parameter is a
5232 struct thread_info * now.
5233 (suspend_and_send_sigstop_callback): Ditto.
5234 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
5235 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
5236 struct thread_info * now.
5237 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
5238 from thread, lwp.
5239 (lwp_running): Update, "entry" parameter is a
5240 struct thread_info * now.
5241 (stop_all_lwps): Fetch ptid from thread.
5242 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
5243 (linux_resume_one_lwp): Fetch lwpid from thread.
5244 (linux_set_resume_request): Update, "entry" parameter is a
5245 struct thread_info * now. Fetch pid, lwpid from thread.
5246 (resume_status_pending_p): Update, "entry" parameter is a
5247 struct thread_info * now.
5248 (need_step_over_p): Ditto. Fetch lwpid from thread.
5249 (start_step_over): Fetch lwpid from thread.
5250 (linux_resume_one_thread): Update, "entry" parameter is a
5251 struct thread_info * now. Fetch lwpid from thread.
5252 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
5253 (proceed_one_lwp): Update, "entry" parameter is a
5254 struct thread_info * now. Fetch lwpid from thread.
5255 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
5256 struct thread_info * now.
5257 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
5258 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
5259 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
5260 directly.
5261 (regsets_store_inferior_registers): Ditto.
5262 (fetch_register, store_register): Ditto.
5263 (linux_read_memory, linux_write_memory): Ditto.
5264 (linux_request_interrupt): Ditto.
5265 (linux_read_auxv): Ditto.
5266 (linux_xfer_siginfo): Ditto.
5267 (linux_qxfer_spu): Ditto.
5268 (linux_qxfer_libraries_svr4): Ditto.
5269 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
5270 moved to inferiors.h.
5271 (get_lwp): Delete.
5272 (get_thread_lwp): Update.
5273 (struct lwp_info): Delete member "entry". Simplify comment for
5274 member "thread".
5275 (all_lwps): Delete.
5276 * linux-mips-low.c (mips_read_description): Fetch lwpid from
5277 current_inferior directly.
5278 (update_watch_registers_callback): Update, "entry" parameter is a
5279 struct thread_info * now. Fetch pid from thread.
5280 (mips_linux_prepare_to_resume): Fetch ptid from thread.
5281 (mips_insert_point): Fetch lwpid from current_inferior.
5282 Pass &all_threads to find_inferior, not &all_lwps.
5283 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
5284 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
5285 directly.
5286 (mips_stopped_data_address): Ditto.
5287 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
5288 directly.
5289 * linux-tile-low.c (tile_arch_setup): Ditto.
5290 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
5291 (update_debug_registers_callback): Update, "entry" parameter is a
5292 struct thread_info * now. Fetch pid from thread.
5293 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
5294 Pass &all_threads to find_inferior, not &all_lwps.
5295 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
5296 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
5297 Pass &all_threads to find_inferior, not &all_lwps.
5298 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
5299 (i386_dr_low_get_status): Ditto.
5300 (x86_linux_prepare_to_resume): Fetch ptid from thread.
5301 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
5302 (x86_linux_read_description): Ditto.
5303 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
5304
5305 2014-02-20 Doug Evans <dje@google.com>
5306
5307 * inferiors.c (get_first_inferior): Fix buglet.
5308
5309 2014-02-19 Doug Evans <dje@google.com>
5310
5311 * gdbthread.h (add_thread): Change result type to struct thread_info *.
5312 * inferiors.c (add_thread): Change result type to struct thread_info *.
5313 All callers updated.
5314 (add_lwp): Call add_thread here instead of in callers.
5315 All callers updated.
5316 * linux-low.h (get_lwp_thread): Rewrite.
5317 (struct lwp_info): New member "thread".
5318
5319 2014-02-19 Doug Evans <dje@google.com>
5320
5321 * linux-low.c (add_lwp): Change result to struct lwp_info *.
5322 All callers updated.
5323
5324 2014-02-19 Doug Evans <dje@google.com>
5325
5326 * inferiors.c (add_thread): Fix whitespace.
5327
5328 2014-02-19 Doug Evans <dje@google.com>
5329
5330 * dll.c (clear_dlls): Replace accessing list implemention details
5331 with API function.
5332 * gdbthread.h (get_first_thread): Declare.
5333 * inferiors.c (for_each_inferior_with_data): New function.
5334 (get_first_thread): New function.
5335 (find_thread_ptid): Simplify.
5336 (get_first_inferior): New function.
5337 (clear_list): Delete.
5338 (one_inferior_p): New function.
5339 (clear_inferior_list): New function.
5340 (clear_inferiors): Update.
5341 * inferiors.h (for_each_inferior_with_data): Declare.
5342 (clear_inferior_list): Declare.
5343 (one_inferior_p): Declare.
5344 (get_first_inferior): Declare.
5345 * linux-low.c (linux_wait_for_event): Replace accessing list
5346 implemention details with API function.
5347 * server.c (target_running): Ditto.
5348 (accumulate_file_name_length): New function.
5349 (emit_dll_description): New function.
5350 (handle_qxfer_libraries): Replace accessing list implemention
5351 details with API function.
5352 (handle_qxfer_threads_worker): New function.
5353 (handle_qxfer_threads_proper): Replace accessing list implemention
5354 details with API function.
5355 (handle_query): Ditto.
5356 (visit_actioned_threads_callback_ftype): New typedef.
5357 (visit_actioned_threads_data): New struct.
5358 (visit_actioned_threads): Rewrite to be find_inferior callback.
5359 (resume): Call find_inferior.
5360 (handle_status): Replace accessing list implemention
5361 details with API function.
5362 (process_serial_event): Replace accessing list implemention details
5363 with API function.
5364 * target.c (set_desired_inferior): Replace accessing list implemention
5365 details with API function.
5366 * tracepoint.c (same_process_p): New function.
5367 (gdb_agent_about_to_close): Replace accessing list implemention
5368 details with API function.
5369 * win32-low.c (child_delete_thread): Replace accessing list
5370 implemention details with API function.
5371 (match_dll_by_basename): New function.
5372 (dll_is_loaded_by_basename): New function.
5373 (win32_ensure_ntdll_loaded): Replace accessing list implemention
5374 details call to dll_is_loaded_by_basename.
5375
5376 2014-02-19 Doug Evans <dje@google.com>
5377
5378 * dll.h (struct dll_info): Add comment.
5379 * gdbthread.h (struct thread_info): Add comment.
5380 (current_ptid): Simplify.
5381 * inferiors.c (add_process): Update.
5382 (remove_process): Update.
5383 * inferiors.h (struct process_info): Rename member "head" to "entry".
5384 * linux-low.c (delete_lwp): Update.
5385 (add_lwp): Update.
5386 (last_thread_of_process_p): Update.
5387 (kill_one_lwp_callback, linux_kill): Update.
5388 (status_pending_p_callback): Update.
5389 (wait_for_sigstop): Update. Simplify read of ptid.
5390 (start_step_over): Update.
5391 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
5392 (get_lwp_thread): Update.
5393 (struct lwp_info): Rename member "head" to "entry".
5394 * regcache.h (inferior_list_entry): Delete.
5395 * server.c (kill_inferior_callback): Update.
5396 (detach_or_kill_inferior_callback): Update.
5397 (print_started_pid): Update.
5398 (print_attached_pid): Update.
5399 (process_serial_event): Simplify read of ptid.
5400 * thread-db.c (thread_db_create_event): Update.
5401 (thread_db_get_tls_address): Update.
5402 * win32-low.c (current_inferior_ptid): Simplify.
5403
5404 2014-02-19 Tom Tromey <tromey@redhat.com>
5405
5406 * target.h (struct target_ops) <supports_btrace>: Add target_ops
5407 argument.
5408 (target_supports_btrace): Update.
5409
5410 2014-02-14 Yao Qi <yao@codesourcery.com>
5411
5412 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
5413 (rsp-low-ipa.o): New target.
5414
5415 2014-02-12 Tom Tromey <tromey@redhat.com>
5416
5417 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
5418 convert_ascii_to_int.
5419 * regcache.c (registers_to_string): Likewise.
5420 * remote-utils.c (decode_M_packet): Likewise.
5421 * server.c (process_serial_event): Likewise.
5422
5423 2014-02-12 Tom Tromey <tromey@redhat.com>
5424
5425 * server.c (handle_query, handle_v_run): Use hex2bin, not
5426 unhexify.
5427 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
5428
5429 2014-02-12 Tom Tromey <tromey@redhat.com>
5430
5431 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
5432 convert_int_to_ascii.
5433 * regcache.c (registers_to_string, collect_register_as_string):
5434 Likewise.
5435 * remote-utils.c (look_up_one_symbol, relocate_instruction):
5436 Likewise.
5437 * server.c (process_serial_event): Likewise.
5438 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
5439 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
5440
5441 2014-02-12 Tom Tromey <tromey@redhat.com>
5442
5443 * remote-utils.c (look_up_one_symbol, monitor_output): Use
5444 bin2hex, not hexify.
5445 * tracepoint.c (cmd_qtstatus): Likewise.
5446
5447 2014-02-12 Tom Tromey <tromey@redhat.com>
5448
5449 * remote-utils.c (monitor_output): Pass explicit length to
5450 hexify.
5451
5452 2014-02-12 Tom Tromey <tromey@redhat.com>
5453
5454 * tracepoint.c: Include rsp-low.h.
5455 * server.c: Include rsp-low.h.
5456 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
5457 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
5458 declare.
5459 * remote-utils.c: Include rsp-low.h.
5460 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
5461 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
5462 (convert_int_to_ascii, convert_ascii_to_int): Move to
5463 common/rsp-low.c.
5464 * regcache.c: Include rsp-low.h.
5465 * ax.c: Include rsp-low.h.
5466 * Makefile.in (SFILES): Add common/rsp-low.c.
5467 (OBS): Add rsp-low.o.
5468 (rsp-low.o): New target.
5469
5470 2014-02-12 Tom Tromey <tromey@redhat.com>
5471
5472 * utils.h (pulongest, plongest, phex_nz): Don't declare.
5473 Include print-utils.h.
5474 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
5475 (plongest, thirty_two, phex_nz): Remove.
5476 * Makefile.in (SFILES): Add common/print-utils.c.
5477 (OBS): Add print-utils.o.
5478 (print-utils-ipa.o): New target.
5479 (print-utils.o): New target.
5480 (IPA_OBJS): Add print-utils-ipa.o.
5481
5482 2014-02-06 Tom Tromey <tromey@redhat.com>
5483
5484 * Makefile.in (SFILES): Fix indentation.
5485
5486 2014-02-05 Doug Evans <dje@google.com>
5487
5488 * linux-low.c (linux_wait_for_event): Improve comment.
5489 (linux_wait_1): Keep current_inferior in sync with event_child.
5490
5491 2014-01-22 Doug Evans <dje@google.com>
5492
5493 * gdbthread.h (gdb_id_to_thread): Delete, unused.
5494
5495 2014-01-22 Doug Evans <dje@google.com>
5496
5497 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
5498 * configure: Regenerate.
5499 * config.in: Regenerate.
5500 * Makefile.in (SFILES): Add debug.c.
5501 (OBS): Add debug.o.
5502 * debug.c: New file.
5503 * debug.h: New file.
5504 * linux-aarch64-low.c (*): Update all debugging printfs to use
5505 debug_printf instead of fprintf.
5506 * linux-arm-low.c (*): Ditto.
5507 * linux-cris-low.c (*): Ditto.
5508 * linux-crisv32-low.c (*): Ditto.
5509 * linux-m32r-low.c (*): Ditto.
5510 * linux-sparc-low.c (*): Ditto.
5511 * linux-x86.c (*): Ditto.
5512 * linux-low.c (*): Ditto.
5513 (linux_wait_1): Add calls to debug_enter, debug_exit.
5514 (linux_wait): Remove redundant debugging printf.
5515 (stop_all_lwps): Add calls to debug_enter, debug_exit.
5516 (linux_resume, unstop_all_lwps): Ditto.
5517 * mem-break.c (*): Update all debugging printfs to use
5518 debug_printf instead of fprintf.
5519 * remote-utils.c (*): Ditto.
5520 * thread-db.c (*): Ditto.
5521 * server.c #include <ctype.h>, "gdb_vecs.h".
5522 (debug_threads): Moved to debug.c.
5523 (*): Update all debugging printfs to use debug_printf instead of
5524 fprintf.
5525 (start_inferior): Replace call to fflush with call to debug_flush.
5526 (monitor_show_help): Mention set debug-format.
5527 (parse_debug_format_options): New function.
5528 (handle_monitor_command): Handle "monitor set debug-format".
5529 (gdbserver_usage): Mention --debug-format.
5530 (main): Parse --debug-format.
5531 * server.h (debug_threads): Declaration moved to debug.h.
5532 #include "debug.h".
5533 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
5534 trace_debug_1 that uses debug_printf.
5535 (tracepoint_look_up_symbols): Update all debugging printfs to use
5536 debug_printf instead of fprintf.
5537
5538 2014-01-20 Baruch Siach <baruch@tkos.co.il>
5539
5540 * linux-xtensa-low.c: Include asm/ptrace.h instead of
5541 sys/ptrace.h.
5542
5543 2014-01-17 Pedro Alves <palves@redhat.com>
5544
5545 PR build/16445
5546 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
5547 defined after including gdb_proc_service.h.
5548
5549 2014-01-16 Doug Evans <dje@google.com>
5550
5551 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
5552 (match_dll): Use it.
5553
5554 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
5555
5556 * target.h (target_ops) <read_btrace>: Change parameters and
5557 return type to allow error reporting.
5558 * server.c (handle_qxfer_btrace): Support delta reads. Pass
5559 trace reading errors on.
5560 * linux-low.c (linux_low_read_btrace): Pass trace reading
5561 errors on.
5562 (linux_low_disable_btrace): New.
5563
5564 2014-01-15 Doug Evans <dje@google.com>
5565
5566 * inferiors.c (thread_id_to_gdb_id): Delete.
5567 * inferiors.h (thread_id_to_gdb_id): Delete.
5568
5569 2014-01-13 Eli Zaretskii <eliz@gnu.org>
5570
5571 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
5572 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
5573 versions.
5574
5575 2014-01-08 Pedro Alves <palves@redhat.com>
5576
5577 * server.c (handle_status): Don't discard previous queued stop
5578 replies or thread's pending status here.
5579 (main) <disconnection>: Do it here instead.
5580
5581 2014-01-08 Pedro Alves <palves@redhat.com>
5582
5583 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
5584 * server.c (visit_actioned_threads, handle_pending_status): New
5585 function.
5586 (handle_v_cont): Factor out parts to ...
5587 (resume): ... this new function. If in all-stop, and a thread
5588 being resumed has a pending status, report it without actually
5589 resuming.
5590 (myresume): Adjust to use the new 'resume' function.
5591 (clear_pending_status_callback, set_pending_status_callback)
5592 (find_status_pending_thread_callback): New functions.
5593 (handle_status): Handle the case of multiple threads having
5594 interesting statuses to report. Report threads' real last signal
5595 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
5596 with an interesting thread to report the status for, instead of
5597 always reporting the status of the first thread.
5598
5599 2014-01-01 Joel Brobecker <brobecker@adacore.com>
5600
5601 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
5602 * gdbreplay.c (gdbreplay_version): Likewise.
5603
5604 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
5605
5606 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
5607 iov.iov_len with the real length in use.
5608
5609 2013-12-13 Joel Brobecker <brobecker@adacore.com>
5610
5611 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
5612 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
5613 for all targets that use win32-low.c.
5614 * win32-low.c (win32_ensure_ntdll_loaded): New function.
5615 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
5616
5617 2013-12-13 Pedro Alves <palves@redhat.com>
5618
5619 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
5620 if equal to TARGET_WAITKIND_LOADED.
5621 * win32-low.c (cached_status): New static global.
5622 (win32_wait): Add declaration.
5623 (do_initial_child_stuff): Flush all initial pending debug events
5624 up to the initial breakpoint.
5625 (win32_wait): If CACHED_STATUS was set, return that instead
5626 of doing a real wait. Remove the code resuming the execution
5627 of the inferior after receiving a TARGET_WAITKIND_LOADED event
5628 during the initial phase. Also remove the code changing
5629 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
5630 TARGET_WAITKIND_STOPPED.
5631
5632 2013-12-11 Yao Qi <yao@codesourcery.com>
5633
5634 * notif.c (handle_notif_ack): Return 0 if no notification
5635 matches.
5636
5637 2013-11-20 Doug Evans <dje@google.com>
5638
5639 * linux-low.c (linux_set_resume_request): Fix comment.
5640
5641 2013-11-20 Doug Evans <dje@google.com>
5642
5643 * linux-low.c (resume_status_pending_p): Tweak comment.
5644
5645 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5646
5647 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
5648 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
5649 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
5650 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
5651 (srv_amd64_regobj): Add amd64-mpx.o.
5652 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
5653 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
5654 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
5655 * i387-fp.c (num_pl_bnd_register) Added constant.
5656 (num_pl_bnd_cfg_registers) Added constant.
5657 (struct i387_xsave) Added reserved area and MPX fields.
5658 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
5659 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
5660 function.
5661 (tdesc_i386_mpx_linux): Add MPX amd64 target.
5662 (init_registers_amd64_mpx_linux): Declare new function.
5663 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
5664 (x86_64_regmap): Add MPX registers.
5665 (x86_linux_read_description): Add MPX case.
5666 (initialize_low_arch): Initialize MPX targets.
5667
5668 2013-11-18 Tom Tromey <tromey@redhat.com>
5669
5670 * configure: Rebuild.
5671 * configure.ac: Don't check for stdlib.h.
5672 * gdbreplay.c: Unconditionally include stdlib.h.
5673
5674 2013-11-18 Tom Tromey <tromey@redhat.com>
5675
5676 * config.in: Rebuild.
5677 * configure: Rebuild.
5678 * configure.ac: Don't use AC_HEADER_DIRENT.
5679
5680 2013-11-18 Tom Tromey <tromey@redhat.com>
5681
5682 * server.h: Don't check HAVE_STRING_H.
5683 * gdbreplay.c: Don't check HAVE_STRING_H.
5684 * configure: Rebuild.
5685
5686 2013-11-18 Tom Tromey <tromey@redhat.com>
5687
5688 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
5689 LIBGNU.
5690
5691 2013-11-08 Tom Tromey <tromey@redhat.com>
5692
5693 * configure, config.in: Rebuild.
5694 * configure.ac: Remove unused configury.
5695
5696 2013-11-08 Tom Tromey <tromey@redhat.com>
5697
5698 * acinclude.m4: Include common.m4, codeset.m4.
5699 * configure, config.in: Rebuild.
5700 * configure.ac: Use GDB_AC_COMMON.
5701
5702 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
5703
5704 * linux-s390-low.c (HWCAP_S390_TE): New define.
5705 (s390_arch_setup): Consider the TE field in the HWCAP for
5706 determining 'have_regset_tdb'.
5707
5708 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
5709
5710 PR gdb/16014
5711 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
5712 call to sizeof.
5713
5714 2013-10-02 Pedro Alves <palves@redhat.com>
5715
5716 * server.c (process_serial_event): Don't output "GDBserver
5717 exiting" if GDB is connected through stdio.
5718 * target.c (mywait): Likewise, be silent if GDB is connected
5719 through stdio.
5720
5721 2013-10-01 Joel Brobecker <brobecker@adacore.com>
5722
5723 * lynx-low.c (lynx_add_threads_after_attach): New function.
5724 (lynx_attach): Remove call to add_thread. Add call to
5725 lynx_add_threads_after_attach instead.
5726
5727 2013-09-28 Mike Frysinger <vapier@gentoo.org>
5728
5729 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
5730 * config.in, configure: Regenerated.
5731
5732 2013-09-18 Yao Qi <yao@codesourcery.com>
5733
5734 PR server/15959
5735 * server.c (start_inferior): Clear 'resume_info'.
5736
5737 2013-09-16 Jiong Wang <jiwang@tilera.com>
5738
5739 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
5740 for each register.
5741
5742 2013-09-16 Jiong Wang <jiwang@tilera.com>
5743
5744 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
5745 linux-tile-low.o to srv_tgtobj.
5746
5747 2013-09-16 Will Newton <will.newton@linaro.org>
5748
5749 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
5750 out regs.
5751
5752 2013-09-06 Pedro Alves <palves@redhat.com>
5753
5754 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
5755 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
5756 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
5757 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
5758 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
5759 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
5760
5761 2013-09-06 Pedro Alves <palves@redhat.com>
5762
5763 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
5764 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
5765
5766 2013-09-06 Pedro Alves <palves@redhat.com>
5767
5768 * linux-amd64-ipa.c: Include tracepoint.h.
5769 * linux-i386-ipa.c: Include tracepoint.h.
5770
5771 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
5772
5773 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
5774 (ps_get_thread_area): New function.
5775
5776 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
5777
5778 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
5779 (initialize_low_arch): Call init_registers_crisv32 rather than
5780 init_register_crisv32.
5781
5782 2013-09-05 Pedro Alves <palves@redhat.com>
5783
5784 * server.h (handle_vFile, hostio_last_error_from_errno): Move
5785 to ...
5786 * hostio.h: ... this new file.
5787 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
5788 win32-low.c: Include hostio.h.
5789
5790 2013-09-05 Pedro Alves <palves@redhat.com>
5791
5792 * server.h (gdb_client_data, handler_func, callback_handler_func)
5793 (delete_file_handler, add_file_handler, append_callback_event)
5794 (delete_callback_event, start_event_loop, initialize_event_loop):
5795 Move to event-loop.h and include it.
5796 * event-loop.h: New file.
5797
5798 2013-09-05 Pedro Alves <palves@redhat.com>
5799
5800 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
5801 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
5802 (loaded_dll, unloaded_dll): Move to ...
5803 * dll.h: ... this new file.
5804 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
5805
5806 2013-09-05 Pedro Alves <palves@redhat.com>
5807
5808 * server.h (current_process, get_thread_process, all_processes)
5809 (add_inferior_to_list, for_each_inferior, current_inferior)
5810 (remove_inferior, add_process, remove_process, find_process_pid)
5811 (have_started_inferiors_p, have_attached_inferiors_p)
5812 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
5813 (clear_inferiors, find_inferior, find_inferior_id)
5814 (inferior_target_data, set_inferior_target_data)
5815 (inferior_regcache_data, set_inferior_regcache_data): Move to
5816 inferiors.h, and include it.
5817 * inferiors.h: New file.
5818
5819 2013-09-05 Pedro Alves <palves@redhat.com>
5820
5821 * server.h (struct emit_ops, current_insn_ptr, emit_error):
5822 Move ...
5823 * ax.h: ... here.
5824
5825 2013-09-05 Pedro Alves <palves@redhat.com>
5826
5827 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
5828 tracepoint.h.
5829 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
5830 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
5831 (handle_tracepoint_general_set, handle_tracepoint_query)
5832 (tracepoint_finished_step, tracepoint_was_hit)
5833 (release_while_stepping_state_list, current_traceframe)
5834 (in_readonly_region, traceframe_read_mem)
5835 (fetch_traceframe_registers, traceframe_read_sdata)
5836 (traceframe_read_info, struct fast_tpoint_collect_status)
5837 (fast_tracepoint_collecting, force_unlock_trace_buffer)
5838 (handle_tracepoit_bkpts, initialize_low_tracepoint)
5839 (supply_fast_tracepoint_registers)
5840 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
5841 (ipa_tdesc, claim_trampoline_space)
5842 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
5843 (agent_mem_read, agent_get_trace_state_variable_value)
5844 (agent_set_trace_state_variable_value, agent_tsv_read)
5845 (agent_mem_read_string, get_raw_reg_func_addr)
5846 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
5847 * tracepoint.h: ... this new file.
5848
5849 2013-09-05 Pedro Alves <palves@redhat.com>
5850
5851 * server.h (perror_with_name, error, fatal, warning, paddress)
5852 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
5853 include it.
5854 * utils.h: New file.
5855
5856 2013-09-05 Pedro Alves <palves@redhat.com>
5857
5858 * server.h (remote_debug, noack_mode, transport_is_reliable)
5859 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
5860 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
5861 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
5862 (write_enn, initialize_async_io, enable_async_io)
5863 (disable_async_io, check_remote_input_interrupt_request)
5864 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
5865 (dead_thread_notify, prepare_resume_reply)
5866 (decode_address_to_semicolon, decode_address, decode_m_packet)
5867 (decode_M_packet, decode_X_packet, decode_xfer_write)
5868 (decode_search_memory_packet, unhexify, hexify)
5869 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
5870 (look_up_one_symbol, relocate_instruction)
5871 (monitor_output): Move to remote-utils.h, and include it.
5872 * remote-utils.h: New file.
5873
5874 2013-09-05 Pedro Alves <palves@redhat.com>
5875
5876 * server.h (_): Delete.
5877
5878 2013-09-02 Pedro Alves <palves@redhat.com>
5879
5880 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
5881 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
5882 allocated.
5883 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
5884
5885 2013-09-02 Pierre Muller <muller@sourceware.org>
5886
5887 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
5888 or WriteProcessMemory complete successfully and handle
5889 ERROR_PARTIAL_COPY error.
5890
5891 2013-09-02 Pedro Alves <palves@redhat.com>
5892
5893 * server.c (gdb_read_memory): Return -1 on traceframe memory read
5894 error instead of EIO.
5895
5896 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5897
5898 PR server/15604
5899 * linux-low.c: Include filestuff.h.
5900 (linux_create_inferior) <pid == 0>: Call close_most_fds.
5901 * lynx-low.c: Include filestuff.h.
5902 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
5903 * server.c: Include filestuff.h.
5904 (main): Call notice_open_fds.
5905 * spu-low.c: Include filestuff.h.
5906 (spu_create_inferior) <pid == 0>: Call close_most_fds.
5907
5908 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
5909
5910 * Makefile.in: Explain why ../target and ../nat are not
5911 listed as include file search paths.
5912 (linux-waitpid.o): New object file rule.
5913 * configure.srv (srv_native_linux_obj): New variable.
5914 Replace all occurrences of linux native object files with
5915 $srv_native_linux_obj.
5916 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
5917 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
5918 (linux_enable_event_reporting): Remove declaration.
5919 (my_waitpid): Moved to common/linux-waitpid.c.
5920 (linux_wait_for_event): Pass ptid when calling
5921 linux_enable_event_reporting.
5922 (linux_supports_tracefork_flag): Remove.
5923 (linux_enable_event_reporting): Likewise.
5924 (linux_tracefork_grandchild): Remove.
5925 (STACK_SIZE): Moved to common/linux-ptrace.c.
5926 (linux_tracefork_child): Remove.
5927 (linux_test_for_tracefork): Remove.
5928 (linux_look_up_symbols): Call linux_supports_traceclone.
5929 (initialize_low): Remove call to linux_test_for_tracefork.
5930 * linux-low.h (PTRACE_TYPE_ARG3): Move to
5931 common/linux-ptrace.h.
5932 (PTRACE_TYPE_ARG4): Likewise.
5933 Include linux-ptrace.h.
5934
5935 2013-08-21 Pedro Alves <palves@redhat.com>
5936
5937 * config.in: Renegerate.
5938
5939 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
5940
5941 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
5942 (SFILES): Remove $(srcdir)/common/target-common.c and
5943 add $(srcdir)/target/waitstatus.c.
5944 (OBS): Remove target-common.o and add waitstatus.o.
5945 (server_h): Remove $(srcdir)/../common/target-common.h and
5946 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
5947 and $(srcdir)/../target/waitstatus.h.
5948 (target-common.o): Remove.
5949 (waitstatus.o): New target object file.
5950 * target.h: Do not include target-common.h and
5951 include target/resume.h, target/wait.h and
5952 target/waitstatus.h.
5953
5954 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
5955
5956 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5957 to PTRACE_TYPE_ARG3.
5958 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5959 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
5960 PTRACE_TYPE_ARG4.
5961 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
5962 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
5963
5964 2013-07-27 Jie Zhang <jie@codesourcery.com>
5965 Daniel Jacobowitz <dan@codesourcery.com>
5966 Yao Qi <yao@codesourcery.com>
5967
5968 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
5969 (mips-linux-watch.o): New rule.
5970 (mips_linux_watch_h): New variable.
5971 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
5972 srv_tgtobj.
5973 * linux-mips-low.c: Include mips-linux-watch.h.
5974 (struct arch_process_info, struct arch_lwp_info): New.
5975 (update_watch_registers_callback): New function.
5976 (mips_linux_new_process, mips_linux_new_thread) New functions.
5977 (mips_linux_prepare_to_resume, mips_insert_point): New
5978 functions.
5979 (mips_remove_point, mips_stopped_by_watchpoint): New
5980 functions.
5981 (rsp_bp_type_to_target_hw_bp_type): New function.
5982 (mips_stopped_data_address): New function.
5983 (the_low_target): Add watchpoint support functions.
5984
5985 2013-07-27 Yao Qi <yao@codesourcery.com>
5986
5987 * i386-low.c: Include break-common.h.
5988 (enum target_hw_bp_type): Remove.
5989
5990 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
5991
5992 * Makefile.in (SFILES): /common/target-common.c.
5993 (OBS): Add target-common.o.
5994 (server_h): Add $(srcdir)/../common/target-common.h.
5995 (target-common.o): New target.
5996 * server.c (queue_stop_reply_callback): Free
5997 status string after use.
5998 * target.c (target_waitstatus_to_string): Remove.
5999 * target.h: Include target-common.h.
6000 (resume_kind): Likewise.
6001 (target_waitkind): Likewise.
6002 (target_waitstatus): Likewise.
6003 (TARGET_WNOHANG): Likewise.
6004
6005 2013-07-04 Yao Qi <yao@codesourcery.com>
6006
6007 * Makefile.in (host_alias): Use @host_noncanonical@.
6008 (target_alias): Use @target_noncanonical@.
6009 * configure.ac: Use ACX_NONCANONICAL_TARGET and
6010 ACX_NONCANONICAL_HOST.
6011 * configure: Regenerated.
6012
6013 Revert:
6014 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6015
6016 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6017 * configure: Rebuild.
6018 * Makefile.in (version_host, version_target): Get from configure.
6019 (version.c): Use $(version_host) and $(version_target).
6020
6021 2013-07-03 Pedro Alves <palves@redhat.com>
6022
6023 * Makefile.in (config.status): Depend on development.sh.
6024 * acinclude.m4: Include libmcheck.m4.
6025 * configure: Regenerate.
6026
6027 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6028
6029 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
6030 attribute inside the parentheses.
6031 (winapi_DebugSetProcessKillOnExit): Ditto.
6032 (winapi_DebugBreakProcess): Ditto.
6033 (winapi_GenerateConsoleCtrlEvent): Ditto.
6034
6035 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6036
6037 * notif.h (notif_event): Add a dummy member to avoid compiler
6038 errors.
6039
6040 2013-07-01 Pedro Alves <palves@redhat.com>
6041
6042 * hostio.c (HOSTIO_PATH_MAX): Define.
6043 (require_filename, handle_open, handle_unlink, handle_readlink):
6044 Use it.
6045
6046 2013-07-01 Pedro Alves <palves@redhat.com>
6047
6048 * server.h: Include "pathmax.h".
6049 * linux-low.c: Don't include sys/param.h.
6050 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
6051 MAXPATHLEN.
6052 * win32-low.c: Don't include sys/param.h.
6053 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
6054
6055 2013-07-01 Pedro Alves <palves@redhat.com>
6056
6057 * event-loop.c: Don't check HAVE_UNISTD_H before including
6058 <unistd.h>.
6059 * gdbreplay.c: Likewise.
6060 * remote-utils.c: Likewise.
6061 * server.c: Likewise.
6062 * configure.ac: Don't check for unistd.h.
6063 * configure: Regenerate.
6064
6065 2013-06-28 Tom Tromey <tromey@redhat.com>
6066
6067 * Makefile.in (version.c): Use version.in, not
6068 common/version.in.
6069
6070 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6071
6072 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6073 * configure: Rebuild.
6074 * Makefile.in (version_host, version_target): Get from configure.
6075 (version.c): Use $(version_host) and $(version_target).
6076
6077 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6078
6079 Fix trace-status to output user name without trailing colon.
6080 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
6081
6082 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6083
6084 Fix trace-status to output proper start-time and stop-time.
6085 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
6086 output start time and stop time in hex as gdb expects.
6087
6088 2013-06-26 Pedro Alves <pedro@codesourcery.com>
6089
6090 * tracepoint.c (build_traceframe_info_xml): Output trace state
6091 variables present in the trace buffer.
6092
6093 2013-06-24 Tom Tromey <tromey@redhat.com>
6094
6095 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
6096 create-version.sh.
6097 (version.o): Remove.
6098 * gdbreplay.c: Include version.h.
6099 (version, host_name): Don't declare.
6100 * server.h: Include version.h.
6101 (version, host_name): Don't declare.
6102
6103 2013-06-12 Pedro Alves <palves@redhat.com>
6104
6105 * linux-x86-low.c (linux_is_elf64): Delete global.
6106 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
6107 with local linux_pid_exe_is_elf_64_file use.
6108
6109 2013-06-11 Pedro Alves <palves@redhat.com>
6110
6111 * linux-low.c (regset_disabled, disable_regset): New functions.
6112 (regsets_fetch_inferior_registers)
6113 (regsets_store_inferior_registers): Use them.
6114 (initialize_regsets_info); Don't allocate the disabled_regsets
6115 array here.
6116 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
6117 comment.
6118
6119 2013-06-11 Pedro Alves <palves@redhat.com>
6120
6121 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
6122 xmalloc.
6123
6124 2013-06-11 Pedro Alves <palves@redhat.com>
6125
6126 * linux-x86-low.c (initialize_low_arch): Call
6127 init_registers_x32_avx_linux.
6128
6129 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
6130
6131 Fix compatibility with Android Bionic.
6132 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
6133 it is not empty.
6134
6135 2013-06-07 Pedro Alves <palves@redhat.com>
6136
6137 PR server/14823
6138 * Makefile.in (OBS): Add tdesc.o.
6139 (IPA_OBJS): Add tdesc-ipa.o.
6140 (tdesc-ipa.o): New rule.
6141 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
6142 interface.
6143 * linux-low.c (new_inferior): Delete.
6144 (disabled_regsets, num_regsets): Delete.
6145 (linux_add_process): Adjust to set the new per-process
6146 new_inferior flag.
6147 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
6148 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
6149 was a stop. When calling arch_setup, switch the current inferior
6150 to the thread that got an event.
6151 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
6152 (regsets_fetch_inferior_registers)
6153 (regsets_store_inferior_registers): New regsets_info parameter.
6154 Adjust to use it.
6155 (linux_register_in_regsets): New regs_info parameter. Adjust to
6156 use it.
6157 (register_addr, fetch_register, store_register): New usrregs_info
6158 parameter. Adjust to use it.
6159 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
6160 parameter regs_info. Adjust to use it.
6161 (linux_fetch_registers): Get the current inferior's regs_info, and
6162 adjust to use it.
6163 (linux_store_registers): Ditto.
6164 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
6165 (initialize_low): Don't initialize the target_regsets here. Call
6166 initialize_low_arch.
6167 * linux-low.h (target_regsets): Delete declaration.
6168 (struct regsets_info): New.
6169 (struct usrregs_info): New.
6170 (struct regs_info): New.
6171 (struct process_info_private) <new_inferior>: New field.
6172 (struct linux_target_ops): Delete the num_regs, regmap, and
6173 regset_bitmap fields. New field regs_info.
6174 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
6175 * i387-fp.c (num_xmm_registers): Delete.
6176 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
6177 calls to new interface.
6178 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
6179 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
6180 Infer the number of xmm registers from the regcache's target
6181 description.
6182 * i387-fp.h (num_xmm_registers): Delete.
6183 * inferiors.c (add_thread): Don't install the thread's regcache
6184 here.
6185 * proc-service.c (gregset_info): Fetch the current inferior's
6186 regs_info. Adjust to use it.
6187 * regcache.c: Include tdesc.h.
6188 (register_bytes, reg_defs, num_registers)
6189 (gdbserver_expedite_regs): Delete.
6190 (get_thread_regcache): If the thread doesn't have a regcache yet,
6191 create one, instead of aborting gdbserver.
6192 (regcache_invalidate_one): Rename to ...
6193 (regcache_invalidate_thread): ... this.
6194 (regcache_invalidate_one): New.
6195 (regcache_invalidate): Only invalidate registers of the current
6196 process.
6197 (init_register_cache): Add target_desc parameter, and use it.
6198 (new_register_cache): Ditto. Assert the target description has a
6199 non zero registers_size.
6200 (regcache_cpy): Add assertions. Adjust.
6201 (realloc_register_cache, set_register_cache): Delete.
6202 (registers_to_string, registers_from_string): Adjust.
6203 (find_register_by_name, find_regno, find_register_by_number)
6204 (register_cache_size): Add target_desc parameter, and use it.
6205 (free_register_cache_thread, free_register_cache_thread_one)
6206 (regcache_release, register_cache_size): New.
6207 (register_size): Add target_desc parameter, and use it.
6208 (register_data, supply_register, supply_register_zeroed)
6209 (supply_regblock, supply_register_by_name, collect_register)
6210 (collect_register_as_string, collect_register_by_name): Adjust.
6211 * regcache.h (struct target_desc): Forward declare.
6212 (struct regcache) <tdesc>: New field.
6213 (init_register_cache, new_register_cache): Add target_desc
6214 parameter.
6215 (regcache_invalidate_thread): Declare.
6216 (regcache_invalidate_one): Delete declaration.
6217 (regcache_release): Declare.
6218 (find_register_by_number, register_cache_size, register_size)
6219 (find_regno): Add target_desc parameter.
6220 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
6221 declarations.
6222 * remote-utils.c: Include tdesc.h.
6223 (outreg, prepare_resume_reply): Adjust.
6224 * server.c: Include tdesc.h.
6225 (gdbserver_xmltarget): Delete declaration.
6226 (get_features_xml, process_serial_event): Adjust.
6227 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
6228 declare.
6229 (struct process_info) <tdesc>: New field.
6230 (ipa_tdesc): Declare.
6231 * tdesc.c: New file.
6232 * tdesc.h: New file.
6233 * tracepoint.c: Include tdesc.h.
6234 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
6235 (get_context_regcache): Adjust to pass ipa_tdesc down.
6236 (do_action_at_tracepoint): Adjust to get the register cache size
6237 from the context regcache's description.
6238 (traceframe_walk_blocks): Adjust to get the register cache size
6239 from the current trace frame's description.
6240 (traceframe_get_pc): Adjust to get current trace frame's
6241 description and pass it down.
6242 (gdb_collect): Adjust to get the register cache size from the
6243 IPA's description.
6244 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
6245 (gdbserver_xmltarget): Delete.
6246 (initialize_low_tracepoint): Set the ipa's target description.
6247 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
6248 (initialize_low_tracepoint): Set the ipa's target description.
6249 * linux-x86-low.c: Include tdesc.h.
6250 [__x86_64__] (is_64bit_tdesc): New.
6251 (ps_get_thread_area, x86_get_thread_area): Use it.
6252 (i386_cannot_store_register): Rename to ...
6253 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
6254 (i386_cannot_fetch_register): Rename to ...
6255 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
6256 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
6257 to new interface.
6258 (target_regsets): Rename to ...
6259 (x86_regsets): ... this.
6260 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
6261 interface.
6262 (x86_siginfo_fixup): Use is_64bit_tdesc.
6263 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
6264 (tdesc_x32_avx_linux, tdesc_x32_linux)
6265 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
6266 Declare.
6267 (x86_linux_update_xmltarget): Delete.
6268 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
6269 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
6270 (AMD64_LINUX_USER64_CS): New.
6271 (x86_linux_read_description): New, based on
6272 x86_linux_update_xmltarget.
6273 (same_process_callback): New.
6274 (x86_arch_setup_process_callback): New.
6275 (x86_linux_update_xmltarget): New.
6276 (x86_regsets_info): New.
6277 (amd64_linux_regs_info): New.
6278 (i386_linux_usrregs_info): New.
6279 (i386_linux_regs_info): New.
6280 (x86_linux_regs_info): New.
6281 (x86_arch_setup): Reimplement.
6282 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
6283 (x86_emit_ops): Ditto.
6284 (the_low_target): Adjust. Install x86_linux_regs_info,
6285 x86_cannot_fetch_register, and x86_cannot_store_register.
6286 (initialize_low_arch): New.
6287 * linux-ia64-low.c (tdesc_ia64): Declare.
6288 (ia64_fetch_register): Adjust.
6289 (ia64_usrregs_info, regs_info): New globals.
6290 (ia64_regs_info): New function.
6291 (the_low_target): Adjust.
6292 (initialize_low_arch): New function.
6293 * linux-sparc-low.c (tdesc_sparc64): Declare.
6294 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
6295 Adjust.
6296 (sparc_arch_setup): New function.
6297 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
6298 (the_low_target): Adjust.
6299 (initialize_low_arch): New function.
6300 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
6301 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
6302 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
6303 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
6304 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
6305 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
6306 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
6307 (tdesc_powerpc_isa205_vsx64l): Declare.
6308 (ppc_cannot_store_register, ppc_collect_ptrace_register)
6309 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
6310 (ppc_set_pc, ppc_get_hwcap): Adjust.
6311 (ppc_usrregs_info): Forward declare.
6312 (!__powerpc64__) ppc_regmap_adjusted: New global.
6313 (ppc_arch_setup): Adjust to the current process'es target
6314 description.
6315 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
6316 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
6317 (ppc_store_evrregset): Adjust.
6318 (target_regsets): Rename to ...
6319 (ppc_regsets): ... this, and make static.
6320 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
6321 (ppc_regs_info): New function.
6322 (the_low_target): Adjust.
6323 (initialize_low_arch): New function.
6324 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
6325 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
6326 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
6327 (tdesc_s390x_linux64v2): Declare.
6328 (s390_collect_ptrace_register, s390_supply_ptrace_register)
6329 (s390_fill_gregset, s390_store_last_break): Adjust.
6330 (target_regsets): Rename to ...
6331 (s390_regsets): ... this, and make static.
6332 (s390_get_pc, s390_set_pc): Adjust.
6333 (s390_get_hwcap): New target_desc parameter, and use it.
6334 [__s390x__] (have_hwcap_s390_high_gprs): New global.
6335 (s390_arch_setup): Adjust to set the current process'es target
6336 description. Don't adjust the regmap.
6337 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
6338 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
6339 (regs_info_3264): New globals.
6340 (s390_regs_info): New function.
6341 (the_low_target): Adjust.
6342 (initialize_low_arch): New function.
6343 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
6344 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
6345 [__mips64] (init_registers_mips_linux)
6346 (init_registers_mips_dsp_linux): Delete defines.
6347 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
6348 (have_dsp): New global.
6349 (mips_read_description): New, based on mips_arch_setup.
6350 (mips_arch_setup): Reimplement.
6351 (get_usrregs_info): New function.
6352 (mips_cannot_fetch_register, mips_cannot_store_register)
6353 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
6354 (mips_fill_fpregset, mips_store_fpregset): Adjust.
6355 (target_regsets): Rename to ...
6356 (mips_regsets): ... this, and make static.
6357 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
6358 (dsp_regs_info, regs_info): New globals.
6359 (mips_regs_info): New function.
6360 (the_low_target): Adjust.
6361 (initialize_low_arch): New function.
6362 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
6363 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
6364 Declare.
6365 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
6366 (arm_read_description): New, with bits factored from
6367 arm_arch_setup.
6368 (arm_arch_setup): Reimplement.
6369 (target_regsets): Rename to ...
6370 (arm_regsets): ... this, and make static.
6371 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
6372 (arm_regs_info): New function.
6373 (the_low_target): Adjust.
6374 (initialize_low_arch): New function.
6375 * linux-m68k-low.c (tdesc_m68k): Declare.
6376 (target_regsets): Rename to ...
6377 (m68k_regsets): ... this, and make static.
6378 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
6379 (m68k_regs_info): New function.
6380 (m68k_arch_setup): New function.
6381 (the_low_target): Adjust.
6382 (initialize_low_arch): New function.
6383 * linux-sh-low.c (tdesc_sharch): Declare.
6384 (target_regsets): Rename to ...
6385 (sh_regsets): ... this, and make static.
6386 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
6387 (sh_regs_info, sh_arch_setup): New functions.
6388 (the_low_target): Adjust.
6389 (initialize_low_arch): New function.
6390 * linux-bfin-low.c (tdesc_bfin): Declare.
6391 (bfin_arch_setup): New function.
6392 (bfin_usrregs_info, regs_info): New globals.
6393 (bfin_regs_info): New function.
6394 (the_low_target): Adjust.
6395 (initialize_low_arch): New function.
6396 * linux-cris-low.c (tdesc_cris): Declare.
6397 (cris_arch_setup): New function.
6398 (cris_usrregs_info, regs_info): New globals.
6399 (cris_regs_info): New function.
6400 (the_low_target): Adjust.
6401 (initialize_low_arch): New function.
6402 * linux-cris-low.c (tdesc_crisv32): Declare.
6403 (cris_arch_setup): New function.
6404 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
6405 (cris_regs_info): New function.
6406 (the_low_target): Adjust.
6407 (initialize_low_arch): New function.
6408 * linux-m32r-low.c (tdesc_m32r): Declare.
6409 (m32r_arch_setup): New function.
6410 (m32r_usrregs_info, regs_info): New globals.
6411 (m32r_regs_info): Adjust.
6412 (initialize_low_arch): New function.
6413 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
6414 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
6415 (tic6x_usrregs_info): Forward declare.
6416 (tic6x_read_description): New function, based on ...
6417 (tic6x_arch_setup): ... this. Reimplement.
6418 (target_regsets): Rename to ...
6419 (tic6x_regsets): ... this, and make static.
6420 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
6421 (tic6x_regs_info): New function.
6422 (the_low_target): Adjust.
6423 (initialize_low_arch): New function.
6424 * linux-xtensa-low.c (tdesc_xtensa): Declare.
6425 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
6426 (target_regsets): Rename to ...
6427 (xtensa_regsets): ... this, and make static.
6428 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
6429 globals.
6430 (xtensa_arch_setup, xtensa_regs_info): New functions.
6431 (the_low_target): Adjust.
6432 (initialize_low_arch): New function.
6433 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
6434 (nios2_arch_setup): Set the current process'es tdesc.
6435 (target_regsets): Rename to ...
6436 (nios2_regsets): ... this.
6437 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
6438 (nios2_regs_info): New function.
6439 (the_low_target): Adjust.
6440 (initialize_low_arch): New function.
6441 * linux-aarch64-low.c (tdesc_aarch64): Declare.
6442 (aarch64_arch_setup): Set the current process'es tdesc.
6443 (target_regsets): Rename to ...
6444 (aarch64_regsets): ... this.
6445 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
6446 (aarch64_regs_info): New function.
6447 (the_low_target): Adjust.
6448 (initialize_low_arch): New function.
6449 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
6450 globals.
6451 (target_regsets): Rename to ...
6452 (tile_regsets): ... this.
6453 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
6454 (tile_regs_info): New function.
6455 (tile_arch_setup): Set the current process'es tdesc.
6456 (the_low_target): Adjust.
6457 (initialize_low_arch): New function.
6458 * spu-low.c (tdesc_spu): Declare.
6459 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
6460 * win32-arm-low.c (tdesc_arm): Declare.
6461 (arm_arch_setup): New function.
6462 (the_low_target): Install arm_arch_setup instead of
6463 init_registers_arm.
6464 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
6465 (init_windows_x86): Rename to ...
6466 (i386_arch_setup): ... this. Set `win32_tdesc'.
6467 (the_low_target): Adjust.
6468 * win32-low.c (win32_tdesc): New global.
6469 (child_add_thread): Don't create the thread cache here.
6470 (do_initial_child_stuff): Set the new process'es tdesc.
6471 * win32-low.h (struct target_desc): Forward declare.
6472 (win32_tdesc): Declare.
6473 * lynx-i386-low.c (tdesc_i386): Declare global.
6474 (lynx_i386_arch_setup): Set `lynx_tdesc'.
6475 * lynx-low.c (lynx_tdesc): New global.
6476 (lynx_add_process): Set the new process'es tdesc.
6477 * lynx-low.h (struct target_desc): Forward declare.
6478 (lynx_tdesc): Declare global.
6479 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
6480 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
6481 * nto-low.c (nto_tdesc): New global.
6482 (do_attach): Set the new process'es tdesc.
6483 * nto-low.h (struct target_desc): Forward declare.
6484 (nto_tdesc): Declare.
6485 * nto-x86-low.c (tdesc_i386): Declare.
6486 (nto_x86_arch_setup): Set `nto_tdesc'.
6487
6488 2013-06-04 Gary Benson <gbenson@redhat.com>
6489
6490 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
6491 to qSupported response when appropriate.
6492 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
6493 with nonzero-length annex.
6494 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
6495 arguments supplied in annex.
6496
6497 2013-05-31 Doug Evans <dje@google.com>
6498
6499 PR server/15594
6500 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
6501 64 bits in 64-cross-32 environment.
6502
6503 2013-05-28 Pedro Alves <palves@redhat.com>
6504
6505 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
6506 (aarch64-without-fpu.c): Delete rule.
6507 * configure.srv (aarch64*-*-linux*): Remove references to
6508 aarch64-without-fpu.o and aarch64-without-fpu.xml.
6509 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
6510 declaration.
6511
6512 2013-05-24 Pedro Alves <palves@redhat.com>
6513
6514 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
6515 instead of strchr/decode_address. Error if the range isn't split
6516 with a ','. Don't assume there's be a ':' in the action.
6517
6518 2013-05-23 Yao Qi <yao@codesourcery.com>
6519 Pedro Alves <palves@redhat.com>
6520
6521 * linux-low.c (lwp_in_step_range): New function.
6522 (linux_wait_1): If the thread was range stepping and stopped
6523 outside the stepping range, report the stop to GDB. Otherwise,
6524 continue stepping. Add range stepping debug output.
6525 (linux_set_resume_request): Copy the step range from the resume
6526 request to the lwp.
6527 (linux_supports_range_stepping): New.
6528 (linux_target_ops) <supports_range_stepping>: Set to
6529 linux_supports_range_stepping.
6530 * linux-low.h (struct linux_target_ops)
6531 <supports_range_stepping>: New field.
6532 (struct lwp_info) <step_range_start, step_range_end>: New fields.
6533 * linux-x86-low.c (x86_supports_range_stepping): New.
6534 (the_low_target) <supports_range_stepping>: Set to
6535 x86_supports_range_stepping.
6536 * server.c (handle_v_cont): Handle 'r' action.
6537 (handle_v_requests): Append ";r" if the target supports range
6538 stepping.
6539 * target.h (struct thread_resume) <step_range_start,
6540 step_range_end>: New fields.
6541 (struct target_ops) <supports_range_stepping>:
6542 New field.
6543 (target_supports_range_stepping): New macro.
6544
6545 2013-05-17 Joel Brobecker <brobecker@adacore.com>
6546
6547 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
6548 confusion in comment.
6549
6550 2013-05-17 Joel Brobecker <brobecker@adacore.com>
6551
6552 * lynx-low.c (struct process_info_private): New type.
6553 (lynx_add_process): New function.
6554 (lynx_create_inferior, lynx_attach): Replace calls to
6555 add_process by calls to lynx_add_process.
6556 (lynx_resume): If PTID is null, then try using
6557 current_process()->private->last_wait_event_ptid.
6558 Add comments.
6559 (lynx_clear_inferiors): Delete. The contents of that function
6560 has been inlined in lynx_mourn;
6561 (lynx_wait_1): Save the ptid in the process's private data.
6562 (lynx_mourn): Free the process' private data. Replace call
6563 to lynx_clear_inferiors by call to clear_inferiors.
6564
6565 2013-05-17 Yao Qi <yao@codesourcery.com>
6566
6567 * i386-low.c (i386_length_and_rw_bits): Move the comment to
6568 the right place.
6569
6570 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
6571
6572 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
6573 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
6574 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
6575 PT_TEXT_END_ADDR guards. Update comments.
6576 (linux_target_op) <read_offsets>: Conditionally define to
6577 linux_read_offsets if the target is UCLIBC and if it defines
6578 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
6579
6580 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
6581 Andrew Jenner <andrew@codesourcery.com>
6582
6583 * Makefile.in (SFILES): Add linux-nios2-low.c.
6584 (clean): Add action to delete nios2-linux.c.
6585 (nios2-linux.c): New rule.
6586 * configure.srv: Add nios2*-*-linux*.
6587 * linux-nios2-low.c: New.
6588
6589 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
6590
6591 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
6592
6593 2013-04-25 Hui Zhu <hui@codesourcery.com>
6594
6595 PR gdb/15186
6596 * ax.c (ax_printf): Add fflush.
6597
6598 2013-04-22 Tom Tromey <tromey@redhat.com>
6599
6600 * Makefile.in (SFILES): Add filestuff.c.
6601 (OBS): Add filestuff.o.
6602 (filestuff.o): New target.
6603 * config.in, configure: Rebuild.
6604 * configure.ac: Check for fdwalk, pipe2.
6605
6606 2013-04-17 Pedro Alves <palves@redhat.com>
6607
6608 * configure.ac (USE_THREAD_DB): Delete variable.
6609 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
6610 Don't AC_SUBST USE_THREAD_DB.
6611 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
6612 * config.in, configure: Regenerate.
6613
6614 2013-04-16 Pedro Alves <palves@redhat.com>
6615
6616 * linux-low.h (struct lwp_info) <thread_known>: Move under
6617 the USE_THREAD_DB #ifdef.
6618
6619 2013-04-16 Pedro Alves <palves@redhat.com>
6620
6621 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
6622 (linux-low.o): Delete rule.
6623 * linux-low.h: Always include "gdb_thread_db.h" instead of
6624 conditionally including thread_db.h.
6625 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
6626 HAVE_THREAD_DB_H.
6627
6628 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6629
6630 * Makefile.in (install-only): Fix make install regression.
6631
6632 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
6633
6634 Convert man pages to texinfo, new gdbinit.5 texinfo page.
6635 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
6636 installation.
6637 * gdbserver.1: Remove.
6638
6639 2013-03-22 Pedro Alves <palves@redhat.com>
6640
6641 * linux-low.c (handle_extended_wait): Don't call
6642 linux_enable_event_reporting.
6643
6644 2013-03-15 Tony Theodore <tonyt@logyst.com>
6645
6646 PR build/9098:
6647 * Makefile.in (SHELL): Use @SHELL@.
6648
6649 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
6650
6651 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
6652 compiler warning.
6653
6654 2013-03-13 Joel Brobecker <brobecker@adacore.com>
6655
6656 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
6657 Remove extraneous NULL element.
6658
6659 2013-03-13 Yao Qi <yao@codesourcery.com>
6660
6661 * tracepoint.c (traceframe_read_tsv): Look for the last matched
6662 'V' block in trace frame.
6663
6664 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6665
6666 * target.h (struct target_ops): Add btrace ops.
6667 (target_supports_btrace): New macro.
6668 (target_enable_btrace): New macro.
6669 (target_disable_btrace): New macro.
6670 (target_read_btrace): New macro.
6671 * gdbthread.h (struct thread_info): Add btrace field.
6672 * server.c: Include btrace-common.h.
6673 (handle_btrace_general_set): New function.
6674 (handle_btrace_enable): New function.
6675 (handle_btrace_disable): New function.
6676 (handle_general_set): Call handle_btrace_general_set.
6677 (handle_qxfer_btrace): New function.
6678 (struct qxfer qxfer_packets[]): Add btrace entry.
6679 * inferiors.c (remove_thread): Disable btrace.
6680 * linux-low: Include linux-btrace.h.
6681 (linux_low_enable_btrace): New function.
6682 (linux_low_read_btrace): New function.
6683 (linux_target_ops): Add btrace ops.
6684 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
6685 Add srv_linux_btrace=yes.
6686 (x86_64-*-linux*): Add linux-btrace.o.
6687 Add srv_linux_btrace=yes.
6688 * configure.ac: Define HAVE_LINUX_BTRACE.
6689 * config.in: Regenerated.
6690 * configure: Regenerated.
6691
6692 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6693
6694 * server.c (handle_qxfer): Preserve error message if -3 is
6695 returned.
6696 (qxfer): Document the -3 return value.
6697
6698 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6699
6700 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
6701 (linux_btrace_h): New variable.
6702 (linux-btrace.o): New rule.
6703
6704 2013-03-08 Stan Shebs <stan@codesourcery.com>
6705 Hafiz Abid Qadeer <abidh@codesourcery.com>
6706
6707 * tracepoint.c (trace_buffer_size): New global.
6708 (DEFAULT_TRACE_BUFFER_SIZE): New define.
6709 (init_trace_buffer): Change to one-argument function. Allocate
6710 trace buffer memory.
6711 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
6712 handle QTBuffer:size packet.
6713 (cmd_bigqtbuffer_size): New function.
6714 (initialize_tracepoint): Call init_trace_buffer with
6715 DEFAULT_TRACE_BUFFER_SIZE.
6716 * server.c (handle_query): Add QTBuffer:size in the
6717 supported packets.
6718
6719 2013-03-07 Yao Qi <yao@codesourcery.com>
6720
6721 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
6722 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
6723 of -1.
6724 (cmd_qtsp): Adjust condition. Do post increment.
6725 Set cur_action and cur_step_action back to 0.
6726
6727 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
6728
6729 PR server/15236
6730 * linux-low.c (linux_write_memory): Return early success if LEN is
6731 zero.
6732
6733 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
6734
6735 * configure.srv: Add x86_64-*-cygwin* as target.
6736
6737 2013-02-28 Tom Tromey <tromey@redhat.com>
6738
6739 * configure.ac: Invoke AC_SYS_LARGEFILE.
6740 * configure, config.in: Rebuild.
6741
6742 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
6743
6744 * win32-low.c: Throughout, fix format strings and casts of
6745 printf-like functions to avoid type related warnings on all
6746 platforms.
6747 (get_child_debug_event): Print dwDebugEventCode as hex since
6748 that's how it's usually documented.
6749
6750 2013-02-28 Yao Qi <yao@codesourcery.com>
6751
6752 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
6753 pulongest.
6754
6755 2013-02-27 Jiong Wang <jiwang@tilera.com>
6756
6757 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
6758 (reg-tilegx32.c): New rule.
6759 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
6760 * linux-tile-low.c (tile_arch_setup): New function. Invoke
6761 different register info initializer according to elf class.
6762 (init_registers_tilgx32): New function. The tilegx32 register info
6763 initializer.
6764 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
6765 (tile_store_gregset): Likewise.
6766
6767 2013-02-27 Yao Qi <yao@codesourcery.com>
6768
6769 * server.c (process_point_options): Print debug message when
6770 debug_threads is true.
6771
6772 2013-02-26 Yao Qi <yao@codesourcery.com>
6773
6774 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
6775
6776 2013-02-19 Pedro Alves <palves@redhat.com>
6777 Kai Tietz <ktietz@redhat.com>
6778
6779 PR gdb/15161
6780
6781 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
6782 instead of strtoul to extract address from packet.
6783 (process_serial_event) <'z'>: Likewise.
6784
6785 2013-02-18 Yao Qi <yao@codesourcery.com>
6786
6787 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
6788
6789 2013-02-14 Pedro Alves <palves@redhat.com>
6790
6791 Plug memory leak.
6792
6793 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
6794 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
6795
6796 2013-02-14 Pedro Alves <palves@redhat.com>
6797
6798 * tracepoint.c (cmd_qtdpsrc): Use savestring.
6799
6800 2013-02-14 Pedro Alves <palves@redhat.com>
6801
6802 * tracepoint.c (save_string): Delete.
6803 (add_tracepoint_action): Use savestring instead of save_string.
6804
6805 2013-02-12 Pedro Alves <palves@redhat.com>
6806
6807 * linux-xtensa-low.c: Ditto.
6808 * xtensa-xtregs.c: Ditto.
6809
6810 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
6811
6812 * thread-db.c (thread_db_get_tls_address): NULL pointer check
6813 thread_db.
6814
6815 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
6816
6817 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
6818 aarch64_num_wp_regs and aarch64_num_bp_regs to
6819 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
6820
6821 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
6822
6823 * linux-aarch64-low.c (ps_get_thread_area): Replace
6824 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
6825
6826 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
6827 Marcus Shawcroft <marcus.shawcroft@arm.com>
6828 Nigel Stephens <nigel.stephens@arm.com>
6829 Yufeng Zhang <yufeng.zhang@arm.com>
6830
6831 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
6832 (aarch64.c, aarch64-without-fpu.c): New targets.
6833 * configure.srv (aarch64*-*-linux*): New.
6834 * linux-aarch64-low.c: New file.
6835
6836 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
6837
6838 * linux-low.c (handle_extended_wait, linux_create_inferior)
6839 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
6840 (dequeue_one_deferred_signal, linux_resume_one_thread)
6841 (fetch_register, linux_write_memory, linux_enable_event_reporting)
6842 (linux_tracefork_grandchild, linux_test_for_tracefork)
6843 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
6844 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
6845 where the argument is 0.
6846
6847 2013-01-25 Yao Qi <yao@codesourcery.com>
6848
6849 * event-loop.c: Include "queue.h".
6850 (gdb_event_p): New typedef.
6851 (struct gdb_event) <next_event>: Remove.
6852 (event_queue): Change to QUEUE(gdb_event_p).
6853 (async_queue_event): Remove.
6854 (gdb_event_xfree): New.
6855 (initialize_event_loop): New.
6856 (process_event): Use API from QUEUE.
6857 (wait_for_event): Likewise.
6858 * server.c (main): Call initialize_event_loop.
6859 * server.h (initialize_event_loop): Declare.
6860
6861 2013-01-18 Yao Qi <yao@codesourcery.com>
6862
6863 * ax.h (struct eval_agent_expr_context): New.
6864 (gdb_eval_agent_expr): Update declaration.
6865 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
6866 TFRAME. Add new argument CTX.
6867 * server.h (struct eval_agent_expr_context): Declare.
6868 (agent_mem_read, agent_tsv_read): Update declaration.
6869 (agent_mem_read_string): Likewise.
6870 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
6871 (add_traceframe_block): Add new argument TPOINT.
6872 Increase TPOINT->traceframe_usage.
6873 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
6874 eval_tracepoint_agent_expr.
6875 (condition_true_at_tracepoint): Likewise.
6876 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
6877 (agent_mem_read_string, agent_tsv_read): Likewise.
6878
6879 2013-01-16 Yao Qi <yao@codesourcery.com>
6880
6881 * linux-low.c (linux_resume_one_lwp): Don't check
6882 'lwp->bp_reinsert != 0'.
6883
6884 2013-01-07 Joel Brobecker <brobecker@adacore.com>
6885 Pedro Alves <palves@redhat.com>
6886
6887 * lynx-low.c (ptrace_request_to_str): Define a temporary
6888 macro and use it to simplify this function's implementation.
6889
6890 2013-01-07 Joel Brobecker <brobecker@adacore.com>
6891
6892 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
6893 sets errno.
6894
6895 2013-01-07 Joel Brobecker <brobecker@adacore.com>
6896
6897 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
6898
6899 2013-01-07 Joel Brobecker <brobecker@adacore.com>
6900
6901 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
6902
6903 2013-01-07 Joel Brobecker <brobecker@adacore.com>
6904
6905 * lynx-low.c (lynx_resume): Use the resume_info parameter
6906 to determine the ptid for the lynx_ptrace call, unless
6907 it is equal to minus_one_ptid, in which case we use the
6908 ptid of the current_inferior.
6909 (lynx_wait_1): After having received a thread create/exit
6910 event, resume the inferior's execution using the signaling
6911 thread's ptid, rather than the old ptid.
6912
6913 2013-01-07 Joel Brobecker <brobecker@adacore.com>
6914
6915 * lynx-low.c (lynx_resume): Delete variable ret.
6916
6917 2013-01-01 Joel Brobecker <brobecker@adacore.com>
6918
6919 * gdbreplay.c (gdbreplay_version): Update copyright year.
6920 * server.c (gdbserver_version): Likewise.
6921
6922 2012-12-17 Joel Brobecker <brobecker@adacore.com>
6923
6924 * lynx-low.c (lynx_wait_1): Add debug trace before adding
6925 new thread.
6926
6927 2012-12-17 Joel Brobecker <brobecker@adacore.com>
6928
6929 * lynx-low.c (ptrace_request_to_str): Add handling for
6930 PTRACE_GETTRACESIG.
6931
6932 2012-12-17 Joel Brobecker <brobecker@adacore.com>
6933
6934 * lynx-low.c (lynx_attach): Delete variable new_process.
6935
6936 2012-12-17 Joel Brobecker <brobecker@adacore.com>
6937
6938 * lynx-low.c (lynx_create_inferior): Delete variable
6939 new_process.
6940
6941 2012-12-17 Joel Brobecker <brobecker@adacore.com>
6942
6943 * lynx-low.c (ptrace_request_to_str): Do not handle
6944 PTRACE_GETTHREADLIST if this macro does not exist.
6945
6946 2012-12-15 Yao Qi <yao@codesourcery.com>
6947
6948 * Makefile.in (OBS): Add notif.o.
6949 * notif.c, notif.h: New.
6950 * server.c: Include "notif.h".
6951 (struct vstop_notif) <next>: Remove.
6952 <base>: New field.
6953 (queue_stop_reply): Update.
6954 (push_event, send_next_stop_reply): Remove.
6955 (discard_queued_stop_replies): Update.
6956 (notif_stop): New variable.
6957 (handle_v_stopped): Remove.
6958 (handle_v_requests): Don't call handle_v_stopped. Call
6959 handle_ack_notif instead.
6960 (queue_stop_reply_callback): Call notif_event_enque instead
6961 of queue_stop_reply.
6962 (handle_status): Don't call send_next_stop_reply, call
6963 notif_write_event instead.
6964 (kill_inferior_callback): Likewise.
6965 (detach_or_kill_inferior_callback): Likewise.
6966 (main): Call initialize_notif.
6967 (process_serial_event): Call QUEUE_is_empty.
6968 (handle_target_event): Call notif_push instead of push event.
6969 * server.h (push_event): Remove declaration.
6970
6971 2012-12-10 Tom Tromey <tromey@redhat.com>
6972
6973 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
6974 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
6975 macros.
6976 (.c.o): Rewrite.
6977 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
6978 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
6979 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
6980 (amd64-linux-ipa.o, ax.o): Rewrite.
6981 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
6982 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
6983 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
6984 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
6985 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
6986 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
6987 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
6988 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
6989 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
6990 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
6991 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
6992 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
6993 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
6994 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
6995 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
6996 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
6997 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
6998 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
6999 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
7000 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
7001 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
7002 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
7003 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
7004 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
7005 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
7006 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
7007 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
7008 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
7009 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
7010 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
7011 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
7012 (reg-tilegx.o): Remove.
7013 (all_object_files): New macro.
7014 Include .deps files.
7015 * aclocal.m4, configure: Rebuild.
7016 * acinclude.m4: Include depstand.m4, lead-dot.m4.
7017 * configure.ac: Invoke ZW_CREATE_DEPDIR,
7018 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
7019
7020 2012-12-05 Tom Tromey <tromey@redhat.com>
7021
7022 PR gdb/14917:
7023 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
7024
7025 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
7026
7027 * configure.ac: Check for linux/perf_event.h.
7028 * config.in: Regenerated.
7029 * configure: Regenerated.
7030
7031 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
7032
7033 * hostio.c (handle_readlink): Decrease buffer size
7034 parameter passed to readlink by one byte.
7035
7036 2012-11-26 Yao Qi <yao@codesourcery.com>
7037
7038 * configure.ac (build_warnings): Append '-Wempty-body'.
7039 * configure: Regenerated.
7040 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
7041 body.
7042
7043 2012-11-15 Pierre Muller <muller@sourceware.org>
7044
7045 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
7046 * config.in: Regenerate.
7047 * configure: Regenerate.
7048 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
7049 Use "gdb_wait.h" header instead of <sys/wait.h> header.
7050 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7051 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
7052 header.
7053 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
7054 instead of <sys/wait.h> header.
7055 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7056
7057 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
7058
7059 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
7060 (various make rules): Remove -DGDBSERVER
7061
7062 2012-11-09 Yao Qi <yao@codesourcery.com>
7063
7064 * spu-low.c (current_ptid): Move it to ..
7065 * gdbthread.h: ... here. New.
7066 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
7067 * server.c (myresume, process_serial_event): Likewise.
7068 * thread-db.c (thread_db_find_new_threads): Likewise.
7069 * tracepoint.c (run_inferior_command): Likewise.
7070
7071 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
7072
7073 * server.c (handle_search_memory_1): Include access length in
7074 warning message.
7075
7076 2012-09-05 Michael Brandt <michael.brandt@axis.com>
7077
7078 * linux-crisv32-low.c: Fix compile errors.
7079
7080 2012-09-04 Yao Qi <yao@codesourcery.com>
7081
7082 * tracepoint.c (cmd_qtsv): Adjust debug message.
7083 Don't check CUR_TPOINT.
7084
7085 2012-08-28 Yao Qi <yao@codesourcery.com>
7086
7087 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
7088 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
7089 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
7090 Remove declarations of xmalloc, xreallloc, xstrdup and
7091 freeargv.
7092 * Makefile.in (libiberty_h): New.
7093 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
7094 (linux-bfin-low.o): Append dependency 'libiberty.h'.
7095
7096 2012-08-23 Yao Qi <yao@codesourcery.com>
7097
7098 * server.h: Remove declaration of 'xsnprintf'.
7099
7100 2012-08-22 Keith Seitz <keiths@redhat.com>
7101
7102 * server.h: Include build-gnulib-gbserver/config.h.
7103 * gdbreplay.c: Likewise.
7104
7105 2012-08-08 Doug Evans <dje@google.com>
7106
7107 * Makefile.in (SFILES): Add gdb_vecs.c.
7108 (OBS): Add gdb_vecs.o.
7109 (gdb_vecs_h, host_defs_h): New variables.
7110 (thread-db.o): Add $(gdb_vecs_h) dependency.
7111 (gdb_vecs.o): New rule.
7112 * thread-db.c: #include "gdb_vecs.h".
7113 (thread_db_load_search): Use a vector to iterate over path elements.
7114 Handle text appearing after "$pdir".
7115
7116 * configure.ac: Add check for strstr.
7117 * config.in: Regenerate.
7118 * configure: Regenerate.
7119
7120 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
7121
7122 * hostio.c (handle_pread): If pread fails, fall back to attempting
7123 lseek/read.
7124 (handle_pwrite): Likewise for pwrite.
7125
7126 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
7127
7128 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
7129 between unsupported TYPE and unimplementable ADDR/LEN combination.
7130 (arm_insert_point): Act on new return value.
7131
7132 2012-07-31 Pedro Alves <palves@redhat.com>
7133
7134 * server.c (process_point_options): Only skip tokens if we find
7135 one that is unrecognized. Don't treat 'X' specially while
7136 skipping unrecognized tokens.
7137
7138 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
7139
7140 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
7141 to 4-byte-align HW breakpoint addresses for Thumb.
7142
7143 2012-07-27 Yao Qi <yao@codesourcery.com>
7144
7145 PR remote/14161.
7146
7147 * server.h: Declare gdb_agent_about_to_close.
7148 * target.c (kill_inferior): Include "agent.h".
7149 New. Send command 'kill'.
7150 * target.h (kill_inferior): Removed macro.
7151 * tracepoint.c (gdb_agent_about_to_close): New.
7152 (gdb_agent_helper_thread): Handle command 'close'.
7153 Wait endlessly until the inferior stops.
7154 Install gdb_agent_remove_socket to atexit hook.
7155 (agent_socket_name): New static variable.
7156 (gdb_agent_socket_init): Replace local variable 'name' with
7157 'agent_socket_name'.
7158 (gdb_agent_remove_socket): New.
7159
7160 2012-07-27 Yao Qi <yao@codesourcery.com>
7161
7162 * server.c (process_point_options): Stop at 'X' when parsing.
7163
7164 2012-07-19 Michael Eager <eager@eagercon.com>
7165
7166 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
7167 to hw_execute.
7168 * linux-x86-low.c (x86_insert_point, x86_remove_point):
7169 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
7170 hardware breakpoint.
7171
7172 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7173
7174 * gdbserver/linux-low.c (initialize_low): Call
7175 linux_ptrace_init_warnings.
7176
7177 2012-07-02 Doug Evans <dje@google.com>
7178
7179 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
7180 pointer to int.
7181
7182 2012-07-02 Stan Shebs <stan@codesourcery.com>
7183
7184 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
7185 (ax.o): Add it to build rule.
7186 (ax-ipa.o): Ditto.
7187 (OBS): Add format.o.
7188 (IPA_OBS): Add format.o.
7189 * server.c (handle_query): Claim support for breakpoint commands.
7190 (process_point_options): Add command case.
7191 (process_serial_event): Leave running if there are printfs in
7192 effect.
7193 * mem-break.h (any_persistent_commands): Declare.
7194 (add_breakpoint_commands): Declare.
7195 (gdb_no_commands_at_breakpoint): Declare.
7196 (run_breakpoint_commands): Declare.
7197 * mem-break.c (struct point_command_list): New struct.
7198 (struct breakpoint): New field command_list.
7199 (any_persistent_commands): New function.
7200 (add_commands_to_breakpoint): New function.
7201 (add_breakpoint_commands): New function.
7202 (gdb_no_commands_at_breakpoint): New function.
7203 (run_breakpoint_commands): New function.
7204 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
7205 locally.
7206 * ax.c: Include format.h.
7207 (ax_printf): New function.
7208 (gdb_eval_agent_expr): Add printf opcode.
7209
7210 2012-06-13 Yao Qi <yao@codesourcery.com>
7211
7212 * server.c (start_inferior): Remove duplicated writes to fields
7213 'last_resume_kind' and 'last_status' of 'current_inferior'.
7214
7215 2012-06-12 Yao Qi <yao@codesourcery.com>
7216 Pedro Alves <palves@redhat.com>
7217
7218 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
7219 comment.
7220 * server.c (handle_v_cont): Extend comment.
7221
7222 2012-06-11 Yao Qi <yao@codesourcery.com>
7223
7224 * linux-low.c (linux_attach): Add 'static'.
7225
7226 2012-06-06 Yao Qi <yao@codesourcery.com>
7227
7228 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
7229
7230 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7231
7232 Fix gcc -flto compilation warning.
7233 * server.c (main): Make variable multi_mode and attach volatile.
7234
7235 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7236
7237 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
7238 if the platform doesn't know about it.
7239
7240 2012-05-30 Jeff Kenton <jkenton@tilera.com>
7241
7242 * Makefile.in (SFILES): Add linux-tile-low.c.
7243 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
7244 * configure.srv: Handle tilegx-*-linux*.
7245 * linux-tile-low.c: New file.
7246
7247 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7248
7249 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
7250
7251 2012-05-24 Pedro Alves <palves@redhat.com>
7252
7253 PR gdb/7205
7254
7255 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
7256
7257 2012-05-24 Pedro Alves <palves@redhat.com>
7258
7259 PR gdb/7205
7260
7261 Replace target_signal with gdb_signal throughout.
7262
7263 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
7264
7265 * linux-low.c (linux_store_registers): Avoid the copying sequence
7266 when no data has been retrieved by ptrace.
7267
7268 2012-05-22 Will Deacon <will.deacon@arm.com>
7269
7270 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
7271 Include asm/ptrace.h.
7272 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
7273 already defined.
7274
7275 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
7276
7277 * linux-low.c (linux_store_registers): Don't re-retrieve data
7278 with ptrace that has already been obtained from /proc. Always
7279 copy any data retrieved with ptrace to the buffer supplied.
7280
7281 2012-05-11 Yao Qi <yao@codesourcery.com>
7282 Pedro Alves <palves@redhat.com>
7283
7284 * linux-low.c (enum stopping_threads_kind): New.
7285 (stopping_threads): Change type to `enum stopping_threads_kind'.
7286 (handle_extended_wait): If stopping and suspending threads, leave
7287 the new_lwp suspended too.
7288 (linux_wait_for_event): Adjust.
7289 (stop_all_lwps): Set `stopping_threads' to
7290 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
7291 whether we're suspending threads or just stopping them. Assert no
7292 recursion happens.
7293
7294 2012-04-29 Yao Qi <yao@codesourcery.com>
7295
7296 * server.h: Move some code to ...
7297 * gdbthread.h: ... here. New.
7298 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
7299 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
7300 (nto-low.o, win32-low.o): Likewise.
7301 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
7302 * regcache.c, remote-utils.c, server.c: Likewise.
7303 * target.c, tracepoint.c, win32-low.c: Likewise.
7304
7305 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7306
7307 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
7308 (PTRACE_ARG4_TYPE): Likewise.
7309 (PTRACE_XFER_TYPE): Likewise.
7310 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
7311 ptrace to PTRACE_ARG3_TYPE.
7312 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
7313 (PTRACE_ARG4_TYPE): Likewise.
7314 (PTRACE_XFER_TYPE): Likewise.
7315 (linux_detach_one_lwp): Cast fourth argument of
7316 ptrace to long then PTRACE_ARG4_TYPE.
7317 (regsets_fetch_inferior_registers): Cast third argument of
7318 ptrace to long then PTRACE_ARG3_TYPE.
7319 (regsets_store_inferior_registers): Likewise.
7320
7321 2012-04-20 Pedro Alves <palves@redhat.com>
7322
7323 * configure: Regenerate.
7324
7325 2012-04-19 Pedro Alves <palves@redhat.com>
7326
7327 * Makefile.in (GNULIB_BUILDDIR): New.
7328 (LIBGNU, INCGNU, GNULIB_H): Adjust.
7329 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
7330 (all, install-only, uninstall, clean-info, all-lib, clean): No
7331 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
7332 (maintainer-clean realclean distclean): Use subdir_do.
7333 (subdir_do): New.
7334 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
7335 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
7336 * acinclude.m4: Include acx_configure_dir.m4.
7337 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
7338 calls. Call AC_PROG_RANLIB. Configure gnulib using
7339 ACX_CONFIGURE_DIR.
7340 (GNULIB): New.
7341 (GNULIB_STDINT_H): Adjust.
7342 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
7343 * gdbreplay.c: Include build-gnulib/config.h.
7344 * server.h: Likewise.
7345 * aclocal.m4: Regenerate.
7346 * config.in: Regenerate.
7347 * configure: Regenerate.
7348
7349 2012-04-19 Pedro Alves <palves@redhat.com>
7350
7351 * Makefile.in (LIBGNU, INCGNU): Adjust.
7352 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
7353 (all, install-only, uninstall, clean-info, all-lib, clean)
7354 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
7355 * configure.ac: Adjust AC_OUTPUT output.
7356 * aclocal.m4: Regenerate.
7357 * configure: Regenerate.
7358
7359 2012-04-19 Pedro Alves <palves@redhat.com>
7360
7361 * Makefile.in (generated_files): New.
7362 (server_h): Remove the explicit dependency on config.h, and depend
7363 on $generated_files.
7364
7365 2012-04-19 Pedro Alves <palves@redhat.com>
7366
7367 * Makefile.in (INCGNU): Add -Ignulib.
7368
7369 2012-04-19 Pedro Alves <palves@redhat.com>
7370
7371 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
7372 (INCGNU): ... this, and spell out -I here.
7373 (GNULIB_LIB): Rename to ...
7374 (LIBGNU): ... this.
7375 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
7376
7377 2012-04-19 Pedro Alves <palves@redhat.com>
7378
7379 * config.in: Regenerate.
7380
7381 2012-04-19 Pedro Alves <palves@redhat.com>
7382
7383 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
7384 * server.h (memmem): Remove declaration.
7385 * config.in: Regenerate.
7386 * configure: Regenerate.
7387
7388 2012-04-19 Yao Qi <yao@codesourcery.com>
7389
7390 * Makefile.in (SFILES): Add common/vec.c.
7391 (OBS): Add vec.o.
7392 (vec.o): New rule.
7393
7394 2012-04-19 Yao Qi <yao@codesourcery.com>
7395
7396 * remote-utils.c (prepare_resume_reply): Replace with macro
7397 target_core_of_thread.
7398 * server.c (handle_qxfer_threads_proper): Likewise.
7399 * target.h (traget_core_of_thread): New macro.
7400
7401 2012-04-18 Pedro Alves <palves@redhat.com>
7402
7403 * aclocal.m4: Regenerate.
7404 * configure: Regenerate.
7405
7406 2012-04-16 Yao Qi <yao@codesourcery.com>
7407
7408 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
7409 duplicated on address.
7410
7411 2012-04-16 Yao Qi <yao@codesourcery.com>
7412
7413 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
7414 (struct tracepoint_action_ops) <send>: New field.
7415 (m_tracepoint_action_send, r_tracepoint_action_send): New.
7416 (agent_expr_send, x_tracepoint_action_send): New.
7417 (l_tracepoint_action_send): New.
7418 (cmd_qtdp): Download and install tracepoint
7419 according to `use_agent'.
7420 (run_inferior_command): Add one more parameter `len'.
7421 Update callers.
7422 (tracepoint_send_agent): New.
7423 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
7424
7425 2012-04-16 Yao Qi <yao@codesourcery.com>
7426
7427 * tracepoint.c (download_tracepoints): Moved to ...
7428 (cmd_qtstart): ... here.
7429
7430 2012-04-14 Yao Qi <yao@codesourcery.com>
7431
7432 * tracepoint.c: Include inttypes.h.
7433 (struct collect_memory_action): Use sized types.
7434 (struct tracepoint): Likewise.
7435 (cmd_qtdp, stop_tracing): Update print specifiers.
7436 (cmd_qtp, response_tracepoint): Likewise.
7437 (collect_data_at_tracepoint): Likewise.
7438 (collect_data_at_step): Likewise.
7439
7440 2012-04-14 Yao Qi <yao@codesourcery.com>
7441
7442 Import gnulib module inttypes.
7443 * aclocal.m4, config.in, configure: Regenerated.
7444
7445 2012-04-14 Yao Qi <yao@codesourcery.com>
7446
7447 * Makefile.in (maintainer-clean, realclean, distclean): Remove
7448 Makefile and config.status at last.
7449
7450 2012-04-13 Yao Qi <yao@codesourcery.com>
7451
7452 * tracepoint.c: Include stdint.h unconditionally.
7453
7454 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7455
7456 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
7457 on BFD_HAVE_SYS_PROCFS_TYPE.
7458 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
7459 * configure: Regenerate.
7460 * config.in: Likewise.
7461
7462 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
7463
7464 * Makefile.in (clean): Also remove x32.c x32-linux.c
7465 x32-avx.c x32-avx-linux.c.
7466 (x32.o): New target.
7467 (x32.c): Likewise.
7468 (x32-linux.o): Likewise.
7469 (x32-linux.c): Likewise.
7470 (x32-avx.o): Likewise.
7471 (x32-avx.c): Likewise.
7472 (x32-avx-linux.o): Likewise.
7473 (x32-avx-linux.c): Likewise.
7474
7475 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
7476 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
7477 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
7478 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
7479 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
7480 i386/x32-avx-linux.xml.
7481
7482 * linux-x86-low.c (init_registers_x32_linux): New prototype.
7483 (init_registers_x32_avx_linux): Likwise.
7484 (x86_linux_update_xmltarget): Call init_registers_x32_linux
7485 or init_registers_x32_avx_linux if linux_is_elf64 is false.
7486
7487 2012-04-13 Pedro Alves <palves@redhat.com>
7488
7489 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
7490 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
7491 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
7492 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
7493 the sub-make.
7494
7495 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7496
7497 * linux-x86-low.c (compat_x32_clock_t): New.
7498 (compat_x32_siginfo_t): Likewise.
7499 (compat_x32_siginfo_from_siginfo): Likewise.
7500 (siginfo_from_compat_x32_siginfo): Likewise.
7501 (linux_is_elf64): Likewise.
7502 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
7503 and siginfo_from_compat_x32_siginfo for x32.
7504 (x86_arch_setup): Set linux_is_elf64.
7505
7506 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7507
7508 PR gdb/13969
7509 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
7510 e_machine field.
7511 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
7512 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
7513 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
7514 compatible with process.
7515
7516 2012-04-12 Yao Qi <yao@codesourcery.com>
7517
7518 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
7519 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
7520 (install-only, install-info, clean): Handle sub dir gnulib.
7521 (all-lib, am--refresh): New targets.
7522 (memmem.o): Remove target.
7523 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
7524 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
7525 (AC_REPLACE_FUNCS): Remove memmem.
7526 Invoke gl_INIT and AM_INIT_AUTOMAKE.
7527 (AC_OUTPUT): Generate Makefile in gnulib/.
7528 * aclocal.m4, config.in, configure: Regenerated.
7529
7530 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
7531
7532 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
7533
7534 2012-04-05 Pedro Alves <palves@redhat.com>
7535
7536 -Werror=strict-aliasing
7537
7538 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
7539 pointer.
7540
7541 2012-04-04 Pedro Alves <palves@redhat.com>
7542
7543 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7544 (sparc_store_gregset_from_stack, sparc_store_gregset)
7545 (sparc_breakpoint_at): Fix formatting.
7546
7547 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7548
7549 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
7550 are available.
7551 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
7552 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
7553 * config.in: Regenerate.
7554 * configure: Likewise.
7555
7556 2012-03-29 Pedro Alves <palves@redhat.com>
7557
7558 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
7559 Correct ptrace arguments.
7560
7561 2012-03-28 Pedro Alves <palves@redhat.com>
7562
7563 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
7564 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
7565 (IA64_FR1_REGNUM): New defines.
7566 (ia64_fetch_register): New.
7567 (the_low_target): Install it.
7568 * linux-low.h (struct linux_target_ops) <fetch_register>: New
7569 field.
7570 * linux-low.c (linux_fetch_registers): Try the
7571 the_low_target.fetch_register hook first.
7572
7573 * linux-arm-low.c (the_low_target): Adjust.
7574 * linux-bfin-low.c (the_low_target): Adjust.
7575 * linux-cris-low.c (the_low_target): Adjust.
7576 * linux-crisv32-low.c (the_low_target): Adjust.
7577 * linux-m32r-low.c (the_low_target): Adjust.
7578 * linux-m68k-low.c (the_low_target): Adjust.
7579 * linux-mips-low.c (the_low_target): Adjust.
7580 * linux-ppc-low.c (the_low_target): Adjust.
7581 * linux-s390-low.c (the_low_target): Adjust.
7582 * linux-sh-low.c (the_low_target): Adjust.
7583 * linux-sparc-low.c (the_low_target): Adjust.
7584 * linux-tic6x-low.c (the_low_target): Adjust.
7585 * linux-x86-low.c (the_low_target): Adjust.
7586 * linux-xtensa-low.c (the_low_target): Adjust.
7587
7588 2012-03-26 Pedro Alves <palves@redhat.com>
7589
7590 * server.c (handle_qxfer_libraries): Don't bail early if
7591 the_target->qxfer_libraries_svr4 is not NULL.
7592
7593 2012-03-26 Pedro Alves <palves@redhat.com>
7594
7595 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
7596
7597 2012-03-23 Pedro Alves <palves@redhat.com>
7598
7599 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
7600 "library-list-svr4" element's start tag when the the DSO list is
7601 empty.
7602
7603 2012-03-23 Pedro Alves <palves@redhat.com>
7604
7605 * linux-low.c (read_one_ptr): Read the inferior's pointer through
7606 a variable whose type size is the same as the inferior's pointer
7607 size.
7608
7609 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
7610
7611 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
7612 struct siginfo.
7613 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
7614 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
7615 * linux-low.h: Include <signal.h>.
7616 (struct siginfo): Remove forward declaration.
7617 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
7618 struct siginfo.
7619
7620 2012-03-21 Mike Frysinger <vapier@gentoo.org>
7621
7622 * .gitignore: Ignore more files.
7623
7624 2012-03-19 Pedro Alves <palves@redhat.com>
7625 Jan Kratochvil <jan.kratochvil@redhat.com>
7626
7627 * server.c (cont_thread, general_thread): Add describing comments.
7628 (start_inferior): Clear `cont_thread'.
7629 (handle_v_cont): Don't set `cont_thread' if resuming all threads
7630 of a process.
7631
7632 2012-03-15 Yao Qi <yao@codesourcery.com>
7633
7634 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
7635 handling to ...
7636 (cmd_qtdp): ... here.
7637
7638 2012-03-15 Yao Qi <yao@codesourcery.com>
7639
7640 * tracepoint.c (struct tracepoint_action_ops): New.
7641 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
7642 (m_tracepoint_action_download): New.
7643 (r_tracepoint_action_download): New.
7644 (x_tracepoint_action_download): New.
7645 (l_tracepoint_action_download): New.
7646 (add_tracepoint_action): Install `action->ops' according type.
7647 (download_tracepoint_1): Move code `download' function pointer
7648 of various tracepoint_action_ops.
7649
7650 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7651
7652 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
7653 linux_ptrace_attach_warnings.
7654
7655 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7656
7657 * Makefile.in (linux-ptrace.o): New.
7658 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
7659 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
7660 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
7661 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
7662 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
7663 of these targets.
7664 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
7665
7666 2012-03-08 Yao Qi <yao@codesourcery.com>
7667 Pedro Alves <palves@redhat.com>
7668
7669 Fix PR server/13392.
7670 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
7671 offset of JMP insn.
7672 * tracepoint.c (remove_tracepoint): New.
7673 (cmd_qtdp): Call remove_tracepoint when failed to install.
7674
7675 2012-03-07 Pedro Alves <palves@redhat.com>
7676
7677 * linux-low.c (get_detach_signal): New.
7678 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
7679 Pass on pending signals to PTRACE_DETACH. Check the result of the
7680 ptrace call.
7681 * server.c (program_signals, program_signals_p): New.
7682 (handle_general_set): Handle QProgramSignals.
7683 * server.h (program_signals, program_signals_p): Declare.
7684
7685 2012-03-05 Pedro Alves <palves@redhat.com>
7686 Jan Kratochvil <jan.kratochvil@redhat.com>
7687
7688 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
7689 New comment why.
7690
7691 2012-03-03 Yao Qi <yao@codesourcery.com>
7692
7693 * tracepoint.c (tracepoint_look_up_symbols): Update call to
7694 agent_look_up_symbols.
7695
7696 2012-03-03 Yao Qi <yao@codesourcery.com>
7697
7698 * Makefile.in (linux-low.o): Keep dependence on agent.h.
7699 (linux-x86-low.o): Likewise.
7700 * server.h: Remove in_process_agent_loaded.
7701 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
7702 common/agent.c.
7703 Update callers.
7704
7705 2012-03-03 Yao Qi <yao@codesourcery.com>
7706
7707 * tracepoint.c (gdb_agent_capability): New global.
7708 (in_process_agent_loaded_ust): Renamed to
7709 `in_process_agent_supports_ust'.
7710 Update callers.
7711 (in_process_agent_supports_ust): Call agent_capability_check.
7712 (clear_installed_tracepoints): Assert that agent supports
7713 agent.
7714
7715 2012-03-03 Yao Qi <yao@codesourcery.com>
7716
7717 * linux-low.c (linux_supports_agent): New.
7718 (linux_target_ops): Initialize field `supports_agent' with
7719 linux_supports_agent.
7720 * target.h (struct target_ops) <supports_agent>: New.
7721 (target_supports_agent): New macro.
7722 * server.c (handle_general_set): Handle packet 'QAgent'.
7723 (handle_query): Send `QAgent+'.
7724 * Makefile.in (server.o): Depends on agent.h.
7725
7726 2012-03-03 Yao Qi <yao@codesourcery.com>
7727
7728 * Makefile.in (OBS): Add agent.o.
7729 Add new rule for agent.o.
7730 Track dependence of tracepoint.c on agent.h.
7731 * tracepoint.c (run_inferior_command_1):
7732 (run_inferior_command): Call agent_run_command.
7733 (gdb_ust_connect_sync_socket): Deleted. Move it to
7734 common/agent.c.
7735 (resume_thread, stop_thread): Likewise.
7736 (gdb_ust_socket_init): Renamed to ...
7737 (gdb_agent_socket_init): ... New.
7738 (gdb_ust_thread): Renamed to ...
7739 (gdb_agent_helper_thread): ... New.
7740 (gdb_ust_init): Move some code to ...
7741 (gdb_agent_init): ... here. New.
7742 [HAVE_UST]: Call gdb_ust_init.
7743 (initialize_tracepoint_ftlib): Call gdb_agent_init.
7744 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
7745 * config.in, configure: Regenerated.
7746
7747 2012-03-02 Pedro Alves <palves@redhat.com>
7748
7749 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
7750 * linux-low.c (struct simple_pid_list): New.
7751 (stopped_pids): New a struct simple_pid_list pointer.
7752 (add_to_pid_list, pull_pid_from_list): New.
7753 (handle_extended_wait): Don't assume the first signal new children
7754 report is SIGSTOP. Adjust call to pull_pid_from_list.
7755 (linux_wait_for_lwp): Adjust.
7756
7757 2012-03-02 Yao Qi <yao@codesourcery.com>
7758
7759 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
7760 debug log.
7761
7762 2012-03-02 Yao Qi <yao@codesourcery.com>
7763
7764 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
7765 `stop_pc' and `tpoint'. Update caller.
7766
7767 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
7768
7769 * linux-low.h (linux_target_ops): Add regset_bitmap member.
7770 * linux-low.c (use_linux_regsets): New macro.
7771 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
7772 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
7773 (linux_register_in_regsets): New function.
7774 (usr_fetch_inferior_registers): Skip registers covered by
7775 regsets.
7776 (usr_store_inferior_registers): Likewise.
7777 (usr_fetch_inferior_registers): New macro.
7778 (usr_store_inferior_registers): Likewise.
7779 (linux_fetch_registers): Handle mixed regset/non-regset targets.
7780 (linux_store_registers): Likewise.
7781 * linux-mips-low.c (init_registers_mips_dsp_linux): New
7782 prototype.
7783 (init_registers_mips64_dsp_linux): Likewise.
7784 (init_registers_mips_linux): New macro.
7785 (init_registers_mips_dsp_linux): Likewise.
7786 (mips_dsp_num_regs): Likewise.
7787 (DSP_BASE, DSP_CONTROL): New fallback macros.
7788 (mips_base_regs): New macro.
7789 (mips_regmap): Use it. Fix the size.
7790 (mips_dsp_regmap): New variable.
7791 (mips_dsp_regset_bitmap): Likewise.
7792 (mips_arch_setup): New function.
7793 (mips_cannot_fetch_register): Use the_low_target.regmap rather
7794 than mips_regmap.
7795 (mips_cannot_store_register): Likewise.
7796 (the_low_target): Update .arch_setup, .num_regs and .regmap
7797 initializers. Add .regset_bitmap initializer.
7798 * linux-arm-low.c (the_low_target): Add .regset_bitmap
7799 initializer.
7800 * linux-bfin-low.c (the_low_target): Likewise.
7801 * linux-cris-low.c (the_low_target): Likewise.
7802 * linux-crisv32-low.c (the_low_target): Likewise.
7803 * linux-ia64-low.c (the_low_target): Likewise.
7804 * linux-m32r-low.c (the_low_target): Likewise.
7805 * linux-m68k-low.c (the_low_target): Likewise.
7806 * linux-ppc-low.c (the_low_target): Likewise.
7807 * linux-s390-low.c (the_low_target): Likewise.
7808 * linux-sh-low.c (the_low_target): Likewise.
7809 * linux-sparc-low.c (the_low_target): Likewise.
7810 * linux-tic6x-low.c (the_low_target): Likewise.
7811 * linux-x86-low.c (the_low_target): Likewise.
7812 * linux-xtensa-low.c (the_low_target): Likewise.
7813 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
7814 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
7815 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
7816 srv_xmlfiles.
7817 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
7818 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
7819
7820 2012-02-29 Yao Qi <yao@codesourcery.com>
7821 Pedro Alves <palves@redhat.com>
7822
7823 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
7824 `step_over_finished' is true.
7825
7826 2012-02-27 Pedro Alves <palves@redhat.com>
7827
7828 * linux-low.c (pid_is_stopped): Delete, moved to common/.
7829 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
7830
7831 2012-02-27 Pedro Alves <palves@redhat.com>
7832
7833 PR server/9684
7834 * linux-low.c (pid_is_stopped): New.
7835 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
7836
7837 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
7838
7839 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
7840 of conditions.
7841
7842 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
7843
7844 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
7845
7846 2012-02-24 Luis Machado <lgustavo@codesourcery>
7847
7848 * server.c (handle_query): Advertise support for target-side
7849 breakpoint condition evaluation.
7850 (process_point_options): New function.
7851 (process_serial_event): When inserting a breakpoint, check for
7852 a target-side condition that should be evaluated.
7853
7854 * mem-break.c: Include regcache.h and ax.h.
7855 (point_cond_list_t): New data structure.
7856 (breakpoint) <cond_list>: New field.
7857 (find_gdb_breakpoint_at): Make non-static.
7858 (delete_gdb_breakpoint_at): Clear any target-side
7859 conditions.
7860 (clear_gdb_breakpoint_conditions): New function.
7861 (add_condition_to_breakpoint): Likewise.
7862 (add_breakpoint_condition): Likewise.
7863 (gdb_condition_true_at_breakpoint): Likewise.
7864 (gdb_breakpoint_here): Return result directly instead
7865 of going through a local variable.
7866
7867 * mem-break.h (find_gdb_breakpoint_at): New prototype.
7868 (clear_gdb_breakpoint_conditions): Likewise.
7869 (add_breakpoint_condition): Likewise.
7870 (gdb_condition_true_at_breakpoint): Likewise.
7871
7872 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
7873 (need_step_over_p): Take target-side breakpoint condition into
7874 consideration.
7875
7876 2012-02-24 Luis Machado <lgustavo@codesourcery>
7877
7878 * server.h: Include tracepoint.h.
7879 (agent_mem_read, agent_get_trace_state_variable_value,
7880 agent_set_trace_state_variable_value,
7881 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
7882 get_set_tsv_func_addr): New prototypes.
7883
7884 * ax.h: New include file.
7885 * ax.c: New source file.
7886
7887 * tracepoint.c: Include ax.h.
7888 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
7889 agent_expr, eval_result_type): Move to ax.h.
7890 (parse_agent_expr): Rename to ...
7891 (gdb_parse_agent_expr): ... this, make it non-static and move
7892 to ax.h.
7893 (unparse_agent_expr) Rename to ...
7894 (gdb_unparse_agent_expr): ... this, make it non-static and move
7895 to ax.h.
7896 (eval_agent_expr): Rename to ...
7897 (eval_tracepoint_agent_expr): ... this.
7898 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
7899 forward declarations.
7900 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
7901 (agent_get_trace_state_variable_value): New function.
7902 (agent_set_trace_state_variable_value): New function.
7903 (cmd_qtdp): Call gdb_parse_agent_expr (...).
7904 (response_tracepoint): Call gdb_unparse_agent_expr (...).
7905 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
7906 (condition_true_at_tracepoint): Likewise.
7907 (parse_agent_expr): Rename to ...
7908 (gdb_parse_agent_expr): ... this and move to ax.c.
7909 (unparse_agent_expr): Rename to ...
7910 (gdb_unparse_agent_expr): ... this and move to ax.c.
7911 (gdb_agent_op_name): Move to ax.c.
7912 (eval_agent_expr): Rename to ...
7913 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
7914 and move to ax.c.
7915 (eval_tracepoint_agent_expr): New function.
7916 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
7917 non-static.
7918 (current_insn_ptr, emit_error, struct bytecode_address): Move to
7919 ax.c.
7920 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
7921 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
7922 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
7923 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
7924 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
7925 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
7926 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
7927 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
7928 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
7929 (compile_bytecodes): Remove forward declaration.
7930 (is_goto_target): Move to ax.c.
7931 (compile_bytecodes): Move to ax.c and call
7932 agent_get_trace_state_variable_value (...) and
7933 agent_set_trace_state_variable_value (...).
7934
7935 * Makefile.in: Update ax.c and IPA dependencies.
7936
7937 2012-02-24 Pedro Alves <palves@redhat.com>
7938
7939 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
7940 (cmd_bigqtbuffer_circular): ... this. Only handle
7941 'QTBuffer:circular:'.
7942 (handle_tracepoint_general_set): Adjust.
7943
7944 2012-02-16 Yao Qi <yao@codesourcery.com>
7945
7946 * inferiors.c: Move code to ...
7947 * dll.c: .... here. New.
7948 * server.h: Declare clear_dlls.
7949 * Makefile.in (SFILES): Add dll.c.
7950 (OBS): Add dll.o
7951 (dll.o): New rule.
7952
7953 2012-02-11 Yao Qi <yao@codesourcery.com>
7954
7955 * server.c: (handle_monitor_command): Add a new parameter
7956 `own_buf'.
7957 (handle_query): Update caller.
7958
7959 2012-02-09 Joel Brobecker <brobecker@adacore.com>
7960
7961 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
7962 * configure, config.in: Regenerate.
7963 * hostio.c: Provide an alternate implementation if HAVE_READLINK
7964 is not defined.
7965
7966 2012-02-02 Pedro Alves <palves@redhat.com>
7967
7968 Try SIGKILL first, then PTRACE_KILL.
7969 * linux-low.c (linux_kill_one_lwp): New.
7970 (linux_kill_one_lwp): Rename to ...
7971 (kill_one_lwp_callback): ... this. Use the new
7972 linux_kill_one_lwp.
7973
7974 2012-02-02 Pedro Alves <palves@redhat.com>
7975
7976 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
7977 inferior.
7978
7979 2012-01-27 Pedro Alves <palves@redhat.com>
7980
7981 * linux-low.c (linux_child_pid_to_exec_file): Delete.
7982 (elf_64_file_p): Make static.
7983 (linux_pid_exe_is_elf_64_file): New.
7984 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
7985 Delete declarations.
7986 (linux_pid_exe_is_elf_64_file): Declare.
7987 * linux-x86-low.c (x86_arch_setup): Use
7988 linux_pid_exe_is_elf_64_file.
7989
7990 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7991
7992 * linux-low.c (linux_wait_for_event_1): Rename to ...
7993 (linux_wait_for_event): ... here and merge it with former
7994 linux_wait_for_event - new variable wait_ptid, use it.
7995 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
7996
7997 2012-01-23 Pedro Alves <palves@redhat.com>
7998
7999 * server.c (main): Avoid yet another case of infinite loop while
8000 detaching/killing after a longjmp.
8001
8002 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8003
8004 Code cleanup.
8005 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
8006
8007 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
8008
8009 * hostio.c (handle_readlink): New function.
8010 (handle_vFile): Call it to handle "vFile:readlink" packets.
8011
8012 2012-01-20 Pedro Alves <palves@redhat.com>
8013 Ulrich Weigand <ulrich.weigand@linaro.org>
8014
8015 * server.c (handle_v_requests): Only support vAttach and vRun to
8016 start multiple processes when in extended protocol mode.
8017
8018 2012-01-17 Pedro Alves <palves@redhat.com>
8019
8020 * tracepoint.c (initialize_tracepoint): Use mmap instead of
8021 memalign plus mprotect to allocate the scratch buffer.
8022
8023 2012-01-13 Pedro Alves <palves@redhat.com>
8024
8025 * server.c (attach_inferior): Clear `cont_thread'.
8026
8027 2012-01-13 Pedro Alves <palves@redhat.com>
8028
8029 * server.c (main): Avoid infinite loop while detaching/killing
8030 after a longjmp.
8031
8032 2012-01-09 Doug Evans <dje@google.com>
8033
8034 * server.c (start_inferior): Set last_ptid in --wrapper case.
8035
8036 2012-01-06 Yao Qi <yao@codesourcery.com>
8037
8038 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
8039 defined.
8040 [IN_PROCESS_AGENT] (debug_agent): New global variable.
8041
8042 2012-01-04 Yao Qi <yao@codesourcery.com>
8043
8044 * tracepoint.c (cmd_qtdp): Print debug message
8045 for static tracepoint.
8046
8047 2012-01-04 Yao Qi <yao@codesourcery.com>
8048
8049 * tracepoint.c (trace_vdebug): Differentiate debug message
8050 between gdbserver and IPA.
8051
8052 2012-01-03 Yao Qi <yao@codesourcery.com>
8053
8054 * tracepoint.c (tracepoint_was_hit): Don't collect for
8055 static tracepoint.
8056
8057 2012-01-02 Joel Brobecker <brobecker@adacore.com>
8058
8059 * terminal.h: Reformat copyright header.
8060
8061 2012-01-02 Joel Brobecker <brobecker@adacore.com>
8062
8063 * server.c (gdbserver_version): Update copyright year.
8064 * gdbreplay.c (gdbreplay_version): Likewise.
8065
8066 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
8067
8068 * linux-low.c (linux_create_inferior): Put empty if clause for write.
8069
8070 Revert:
8071 2011-12-18 Hui Zhu <teawater@gmail.com>
8072 * linux-low.c (linux_create_inferior): Save return value to ret.
8073
8074 2011-12-18 Hui Zhu <teawater@gmail.com>
8075
8076 * linux-low.c (linux_create_inferior): Save return value to ret.
8077
8078 2011-12-16 Doug Evans <dje@google.com>
8079
8080 * linux-low.c (linux_create_inferior): If stdio connection,
8081 redirect stdin from /dev/null, stdout to stderr.
8082 * remote-utils.c (remote_is_stdio): New static global.
8083 (remote_connection_is_stdio): New function.
8084 (remote_prepare): Handle stdio connection.
8085 (remote_open): Ditto.
8086 (remote_close): Don't close stdin for stdio connections.
8087 (read_prim,write_prim): New functions. Replace all calls to
8088 read/write to these.
8089 * server.c (main): Watch for "-" argument. Move call to
8090 remote_prepare before start_inferior.
8091 * server.h (STDIO_CONNECTION_NAME): New macro.
8092 (remote_connection_is_stdio): Declare.
8093
8094 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
8095 in debugging output.
8096
8097 2011-12-15 Yao Qi <yao@codesourcery.com>
8098
8099 * tracepoint.c: Include sys/syscall.h.
8100 (gdb_ust_thread): Remove preprocessor conditional.
8101
8102 2011-12-14 Pedro Alves <pedro@codesourcery.com>
8103
8104 * linux-low.c (linux_detach_one_lwp): Call
8105 the_low_target.prepare_to_resume before detaching.
8106
8107 2011-12-14 Yao Qi <yao@codesourcery.com>
8108
8109 * tracepoint.c (gdb_ust_thread): Don't ignore return value
8110 of write.
8111
8112 2011-12-14 Yao Qi <yao@codesourcery.com>
8113
8114 * i386-low.c (i386_low_stopped_data_address): Initialize local
8115 variable `control'.
8116
8117 2011-12-13 Pedro Alves <pedro@codesourcery.com>
8118
8119 PR remote/13492
8120
8121 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
8122 DR_CONTROL unless necessary. Extend comments.
8123 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
8124 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
8125
8126 2011-12-13 Yao Qi <yao@codesourcery.com>
8127
8128 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
8129 macros.
8130 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
8131
8132 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
8133
8134 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
8135 Print new debug message for such case.
8136
8137 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8138
8139 Fix overlapping memcpy.
8140 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
8141 the read_inferior_memory transfer.
8142 (delete_fast_tracepoint_jump): New variable buf. Use it for the
8143 write_inferior_memory transfer.
8144 (set_fast_tracepoint_jump): New variable buf. Use it for the
8145 read_inferior_memory and write_inferior_memory transfers.
8146 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
8147 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
8148 Use it for the write_inferior_memory transfer.
8149 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
8150 buffers.
8151
8152 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8153
8154 * linux-low.c (fetch_register, store_register): Make code
8155 consistent, fix formatting.
8156
8157 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8158
8159 * linux-low.c (usr_store_inferior_registers): Factor out code
8160 to handle individual registers into...
8161 (store_register): ... this new function.
8162
8163 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
8164
8165 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
8166 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
8167 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
8168 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
8169 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
8170 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
8171 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
8172 (srv_xmlfiles): Add new XML files.
8173
8174 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
8175 and <sys/uio.h>.
8176 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
8177 (init_registers_s390_linux32v1): Add prototype.
8178 (init_registers_s390_linux32v2): Likewise.
8179 (init_registers_s390_linux64v1): Likewise.
8180 (init_registers_s390_linux64v2): Likewise.
8181 (init_registers_s390x_linux64v1): Likewise.
8182 (init_registers_s390x_linux64v2): Likewise.
8183 (s390_num_regs): Increment to 52.
8184 (s390_regmap): Add orig_r2 register.
8185 (s390_num_regs_3264): Increment to 68.
8186 (s390_regmap_3264): Add orig_r2 register.
8187 (s390_collect_ptrace_register): Handle orig_r2 register.
8188 (s390_supply_ptrace_register): Likewise.
8189 (s390_fill_last_break): New function.
8190 (s390_store_last_break): Likewise.
8191 (s390_fill_system_call): New function.
8192 (s390_store_system_call): Likewise.
8193 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
8194 register sets.
8195 (s390_check_regset): New function.
8196 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
8197 NT_S390_SYSTEM_CALL regsets and use appropriate description.
8198 Update target_regsets for available register sets.
8199
8200 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
8201 Jan Kratochvil <jan.kratochvil@redhat.com>
8202
8203 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
8204 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
8205 New.
8206 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
8207 * linux-low.h (struct process_info_private): New member r_debug.
8208 * server.c (handle_qxfer_libraries): Call
8209 the_target->qxfer_libraries_svr4.
8210 (handle_qxfer_libraries_svr4): New function.
8211 (qxfer_packets): New entry "libraries-svr4".
8212 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
8213 * target.h (struct target_ops): New member qxfer_libraries_svr4.
8214 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
8215 PACKET_qXfer_libraries_svr4.
8216
8217 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
8218
8219 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
8220 PSW address/mask between 8-byte and 16-byte formats.
8221 (s390_supply_ptrace_register): Likewise.
8222 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
8223 basic addressing mode bit.
8224
8225 2011-11-24 Stan Shebs <stan@codesourcery.com>
8226
8227 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
8228
8229 2011-11-17 Stan Shebs <stan@codesourcery.com>
8230
8231 * tracepoint.c (struct tracepoint): New field traceframe_usage.
8232 (tracing_start_time): New global.
8233 (tracing_stop_time): New global.
8234 (tracing_user_name): New global.
8235 (tracing_notes): New global.
8236 (tracing_stop_note): New global.
8237 (cmd_qtstart): Set traceframe_usage, start_time.
8238 (stop_tracing): Set stop_time.
8239 (cmd_qtstatus): Report additional status.
8240 (cmd_qtp): New function.
8241 (handle_tracepoint_query): Call it.
8242 (cmd_qtnotes): New function.
8243 (handle_tracepoint_general_set): Call it.
8244 (get_timestamp): Rename from tsv_get_timestamp.
8245
8246 2011-11-14 Stan Shebs <stan@codesourcery.com>
8247 Kwok Cheung Yeung <kcy@codesourcery.com>
8248
8249 * linux-x86-low.c (small_jump_insn): New.
8250 (i386_install_fast_tracepoint_jump_pad): Add arguments for
8251 trampoline and error message, build a trampoline and issue a small
8252 jump instruction to it.
8253 (x86_install_fast_tracepoint_jump_pad): Add arguments for
8254 trampoline and error message.
8255 (x86_get_min_fast_tracepoint_insn_len): New.
8256 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
8257 * linux-low.h (struct linux_target_ops): Add arguments to
8258 install_fast_tracepoint_jump_pad operation, add new operation.
8259 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
8260 arguments.
8261 (linux_get_min_fast_tracepoint_insn_len): New function.
8262 (linux_target_op): Add new operation.
8263 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
8264 (gdb_trampoline_buffer_end): Ditto.
8265 (gdb_trampoline_buffer_error): Ditto.
8266 (struct ipa_sym_addresses): Add fields for new IPA variables.
8267 (symbol_list): Add entries for new IPA variables.
8268 (struct tracepoint): Add fields to hold the address range of the
8269 trampoline used by the tracepoint.
8270 (trampoline_buffer_head): New static variable.
8271 (trampoline_buffer_tail): Ditto.
8272 (claim_trampoline_space): New function.
8273 (have_fast_tracepoint_trampoline_buffer): New function.
8274 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
8275 structure.
8276 (install_fast_tracepoint): Ditto, also add error buffer argument.
8277 (cmd_qtminftpilen): New function.
8278 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
8279 (fast_tracepoint_from_trampoline_address): New function.
8280 (fast_tracepoint_collecting): Handle trampoline as part of jump
8281 pad space.
8282 (set_trampoline_buffer_space): New function.
8283 (initialize_tracepoint): Initialize new IPA variables.
8284 * target.h (struct target_ops): Add arguments to
8285 install_fast_tracepoint_jump_pad operation, add new
8286 get_min_fast_tracepoint_insn_len operation.
8287 (target_get_min_fast_tracepoint_insn_len): New.
8288 (install_fast_tracepoint_jump_pad): Add arguments.
8289 * server.h (IPA_BUFSIZ): Define.
8290 * linux-i386-ipa.c: Include extra header files.
8291 (initialize_fast_tracepoint_trampoline_buffer): New function.
8292 (initialize_low_tracepoint): Call it.
8293 * server.h (set_trampoline_buffer_space): Declare.
8294 (claim_trampoline_space): Ditto.
8295 (have_fast_tracepoint_trampoline_buffer): Ditto.
8296
8297 2011-11-14 Yao Qi <yao@codesourcery.com>
8298
8299 * server.c (handle_query): Handle InstallInTrace for qSupported.
8300 * tracepoint.c (add_tracepoint): Sort list.
8301 (install_tracepoint, download_tracepoint): New.
8302 (cmd_qtdp): Call them to install and download tracepoints.
8303 (sort_tracepoints): Removed.
8304 (cmd_qtstart): Update.
8305
8306 2011-11-14 Yao Qi <yao@codesourcery.com>
8307
8308 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
8309 * mem-break.h: Declare.
8310 * tracepoint.c (cmd_qtstart): Move some code to ...
8311 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
8312 New.
8313 (download_tracepoints): Move some code to ...
8314 (download_tracepoint_1): ... here. New.
8315
8316 2011-11-08 Yao Qi <yao@codesourcery.com>
8317
8318 * remote-utils.c (relocate_instruction): A comment fix.
8319
8320 2011-11-07 Joel Brobecker <brobecker@adacore.com>
8321
8322 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
8323 (i386_dr_low_get_control, i386_dr_low_get_status): Use
8324 dr_status_mirror and dr_control_mirror from debug_reg_state.
8325 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
8326 (i386_initial_stuff): Remove use of deleted globals.
8327 (i386_get_thread_context, i386_set_thread_context,
8328 i386_thread_added): Use dr_status_mirror and dr_control_mirror
8329 from debug_reg_state.
8330
8331 2011-11-05 Yao Qi <yao@codesourcery.com>
8332
8333 * tracepoint.c (gdb_collect): Loop over tracepoints of same
8334 address as TPOINT's.
8335
8336 2011-11-02 Stan Shebs <stan@codesourcery.com>
8337
8338 * tracepoint.c (agent_mem_read_string): New function.
8339 (eval_agent_expr): Call it for tracenz.
8340 * server.c (handle_query): Report support for tracenz.
8341
8342 2011-11-02 Yao Qi <yao@codesourcery.com>
8343
8344 * tracepoint.c (cmd_qtstart): Remove unused local variables.
8345
8346 2011-11-02 Yao Qi <yao@codesourcery.com>
8347
8348 * target.h: Fix a typo in comment.
8349
8350 2011-10-31 Pedro Alves <pedro@codesourcery.com>
8351
8352 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
8353 clobber the breakpoints' shadows with fast tracepoint jumps.
8354 * mem-break.h (check_mem_write): Add `myaddr' parameter.
8355 * target.c (write_inferior_memory): Also pass MYADDR down to
8356 check_mem_write.
8357
8358 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
8359
8360 * configure.ac: Check support for personality routine.
8361 * configure: Regenerate.
8362 * config.in: Likewise.
8363 * linux-low.c: Include <sys/personality.h>.
8364 Define ADDR_NO_RANDOMIZE if necessary.
8365 (linux_create_inferior): Disable address space randomization when
8366 forking inferior, if requested.
8367 (linux_supports_disable_randomization): New function.
8368 (linux_target_ops): Install it.
8369 * server.h (disable_randomization): Declare.
8370 * server.c (disable_randomization): New global variable.
8371 (handle_general_set): Handle QDisableRandomization.
8372 (handle_query): Likewise for qSupported.
8373 (main): Support --disable-randomization and --no-disable-randomization
8374 command line arguments.
8375 * target.h (struct target_ops): Add supports_disable_randomization.
8376 (target_supports_disable_randomization): New macro.
8377
8378 2011-09-29 Mike Frysinger <vapier@gentoo.org>
8379
8380 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
8381 ifdef check.
8382 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
8383 [!PT_GETDSBT] (target_loadmap): New definition.
8384 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
8385 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
8386 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
8387 and PT_GETDSBT to LINUX_LOADMAP.
8388 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
8389 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
8390
8391 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
8392
8393 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
8394 (arm_linux_hwbp_cap): New static variable.
8395 (arm_linux_get_hwbp_cap): Replace by ...
8396 (arm_linux_init_hwbp_cap): ... this new function.
8397 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
8398 (arm_linux_get_hw_watchpoint_count): Likewise.
8399 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8400 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
8401 (arm_prepare_to_resume): Use perror_with_name instead of error.
8402
8403 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
8404
8405 * linux-arm-low.c: Include <signal.h>.
8406 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
8407 (struct arm_linux_hwbp_cap): New data type.
8408 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
8409 (struct arm_linux_hw_breakpoint): New data type.
8410 (MAX_BPTS, MAX_WPTS): Define.
8411 (struct arch_process_info, struct arch_lwp_info): New data types.
8412 (arm_linux_get_hwbp_cap): New function.
8413 (arm_linux_get_hw_breakpoint_count): Likewise.
8414 (arm_linux_get_hw_watchpoint_count): Likewise.
8415 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8416 (arm_hwbp_control_initialize): Likewise.
8417 (arm_hwbp_control_is_enabled): Likewise.
8418 (arm_hwbp_control_is_initialized): Likewise.
8419 (arm_hwbp_control_disable): Likewise.
8420 (arm_linux_hw_breakpoint_equal): Likewise.
8421 (arm_linux_hw_point_initialize): Likewise.
8422 (struct update_registers_data): New data structure.
8423 (update_registers_callback: New function.
8424 (arm_insert_point): Likewise.
8425 (arm_remove_point): Likewise.
8426 (arm_stopped_by_watchpoint): Likewise.
8427 (arm_stopped_data_address): Likewise.
8428 (arm_new_process): Likewise.
8429 (arm_new_thread): Likewise.
8430 (arm_prepare_to_resume): Likewise.
8431 (the_low_target): Register arm_insert_point, arm_remove_point,
8432 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
8433 arm_new_thread, and arm_prepare_to_resume.
8434
8435 2011-09-15 Stan Shebs <stan@codesourcery.com>
8436
8437 * server.h (struct emit_ops): Add compare-goto fields.
8438 * tracepoint.c (gdb_agent_op_sizes): New table.
8439 (emit_eq_goto): New function.
8440 (emit_ne_goto): New function.
8441 (emit_lt_goto): New function.
8442 (emit_le_goto): New function.
8443 (emit_gt_goto): New function.
8444 (emit_ge_goto): New function.
8445 (is_goto_target): New function.
8446 (compile_bytecodes): Recognize special cases of compare-goto
8447 combinations and call specialized emitters for them.
8448 * linux-x86-low.c (amd64_emit_eq_goto): New function.
8449 (amd64_emit_ne_goto): New function.
8450 (amd64_emit_lt_goto): New function.
8451 (amd64_emit_le_goto): New function.
8452 (amd64_emit_gt_goto): New function.
8453 (amd64_emit_ge_goto): New function.
8454 (amd64_emit_ops): Add the new functions.
8455 (i386_emit_eq_goto): New function.
8456 (i386_emit_ne_goto): New function.
8457 (i386_emit_lt_goto): New function.
8458 (i386_emit_le_goto): New function.
8459 (i386_emit_gt_goto): New function.
8460 (i386_emit_ge_goto): New function.
8461 (i386_emit_ops): Add the new functions.
8462
8463 2011-09-08 Stan Shebs <stan@codesourcery.com>
8464
8465 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
8466 (i386_emit_epilogue): Restore %ebx.
8467
8468 2011-08-31 Jie Zhang <jzhang918@gmail.com>
8469
8470 * server.c (step_thread): Remove definition.
8471 (process_serial_event): Don't handle Hs.
8472 * server.h (step_thread): Remove declaration.
8473 * target.c (set_desired_inferior): Remove use of step_thread.
8474
8475 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
8476
8477 * linux-low.c: Include linux-procfs.h.
8478 (linux_attach_lwp_1): Update comments.
8479 (linux_attach): Scan for existing threads when attaching to a
8480 process that is the tgid.
8481 * Makefile.in: Update dependencies.
8482
8483 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
8484
8485 * configure.srv: Add linux-procfs.o dependencies.
8486
8487 2011-08-14 Yao Qi <yao@codesourcery.com>
8488
8489 * target.h (struct target_ops): Fix indent.
8490 * win32-low.c (win32_target_ops): Fix comment.
8491
8492 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
8493 Yao Qi <yao@codesourcery.com>
8494
8495 * Makefile.in (clean): Remove tic6x-*.c files.
8496 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
8497 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
8498 (tic6x-c64xp-linux.c): Likewise.
8499 * configure.srv: Add support for tic6x-*-uclinux.
8500 * linux-tic6x-low.c: New.
8501 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
8502
8503 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
8504 Yao Qi <yao@codesourcery.com>
8505
8506 * target.h (struct target_ops): Add read_loadmap.
8507 * linux-low.c (struct target_loadseg): New type.
8508 (struct target_loadmap): New type.
8509 (linux_read_loadmap): New function.
8510 (linux_target_ops): Add linux_read_loadmap.
8511 * server.c (handle_query): Support qXfer:fdpic:read packet.
8512 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
8513 to NULL.
8514
8515 2011-08-05 Eli Zaretskii <eliz@gnu.org>
8516
8517 * win32-low.c: Include <stdint.h>.
8518
8519 2011-07-22 Pedro Alves <pedro@codesourcery.com>
8520
8521 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
8522 to the inferior here.
8523 (i386_remove_aligned_watchpoint): Ditto.
8524 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
8525 fit part of the watchpoint in the debug registers.
8526 (i386_update_inferior_debug_regs): New.
8527 (i386_low_insert_watchpoint): Work on a local mirror of the debug
8528 registers, and only update the inferior on success.
8529 (i386_low_remove_watchpoint): Ditto.
8530
8531 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
8532
8533 * linux-low.c (compare_ints, unique, list_threads, show_process,
8534 linux_core_of_thread): Delete.
8535 (linux_target_ops): Change linux_core_of_thread to
8536 linux_common_core_of_thread.
8537 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
8538 * utils.c (malloc_failure): Change type of argument.
8539 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
8540 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
8541 common/linux-osdata.c, common/ptid.c and common/buffer.c.
8542 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
8543 (IPA_OBJS): Add common-utils-ipa.o.
8544 (ptid_h, linux_osdata_h): New macros.
8545 (server_h): Add common/common-utils.h, common/xml-utils.h,
8546 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
8547 common/ptid.h.
8548 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
8549 ptid.o, buffer.o): New rules.
8550 (linux-low.o): Add common/linux-osdata.h as a dependency.
8551 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
8552 * configure.ac: Add AC_HEADER_DIRENT check.
8553 * config.in: Regenerate.
8554 * configure: Regenerate.
8555 * remote-utils.c (xml_escape_text): Delete.
8556 (buffer_grow, buffer_free, buffer_init, buffer_finish,
8557 buffer_xml_printf): Move to common/buffer.c.
8558 * server.c (main): Remove call to initialize_inferiors.
8559 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
8560 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
8561 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
8562 internal_error, gdb_assert, gdb_assert_fail): Delete.
8563 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
8564 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
8565 common/buffer.h.
8566 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
8567 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
8568 initialize_inferiors): Delete.
8569
8570 2011-07-20 Pedro Alves <pedro@codesourcery.com>
8571
8572 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
8573 symbol error.
8574
8575 2011-05-31 Pedro Alves <pedro@codesourcery.com>
8576
8577 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
8578 assertion.
8579 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
8580
8581 2011-05-26 Yao Qi <yao@codesourcery.com>
8582
8583 * Makefile.in (thread-db.o): Track dependence to
8584 common/gdb_thread_db.h.
8585 * thread-db.c: include gdb_thread_db.h from right place.
8586
8587 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
8588
8589 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
8590 __FILE__ and __LINE__ to internal_error.
8591
8592 2011-05-13 Doug Evans <dje@google.com>
8593
8594 * thread-db.c (try_thread_db_load_from_sdir): New function.
8595 (try_thread_db_load_from_dir): New function.
8596 (thread_db_load_search): Handle $sdir, ignore $pdir.
8597 Remove trying of system directories if search of
8598 libthread-db-search-path fails, that is now done via $sdir.
8599
8600 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
8601
8602 * server.c (handle_query): Add EnableDisableTracepoints to the list
8603 of supported features.
8604 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
8605 tracepoints.
8606 (cmd_qtenable_disable): New.
8607 (cmd_qtstart): Install tracepoints even if disabled.
8608 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
8609 receiving a QTEnable or QTDisable packet.
8610 (gdb_collect): Skip data collection if fast tracepoint is disabled.
8611 (ust_marker_to_static_tracepoint): Do not ignore disabled static
8612 tracepoints.
8613 (gdb_probe): Skip data collection if static tracepoint is disabled.
8614
8615 2011-05-10 Doug Evans <dje@google.com>
8616
8617 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
8618
8619 2011-05-04 Doug Evans <dje@google.com>
8620
8621 * linux-low.c (linux_join): Skip process lookup.
8622 * spu-low.c (spu_join): Ditto.
8623 * server.c (join_inferiors_callback): Delete.
8624 (process_serial_event): For 'D' packet (detach) call join_inferior
8625 directly.
8626
8627 2011-05-04 Joseph Myers <joseph@codesourcery.com>
8628
8629 * README: Don't mention xscale*-*-linux*.
8630 * configure.srv (xscale*-*-linux*): Don't handle target.
8631
8632 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
8633
8634 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
8635 casting pointers.
8636 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
8637 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
8638 (i386_emit_void_call_2): Likewise.
8639
8640 2011-04-26 Yao Qi <yao@codesourcery.com>
8641
8642 * linux-low.c: Move common macros to linux-ptrace.h.
8643 Include linux-ptrace.h.
8644 * Makefile.in (linux_ptrace_h): New.
8645 (linux-low.o): Depends on linux-ptrace.h.
8646
8647 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8648
8649 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
8650 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
8651 (remote_prepare): New function with most of the TCP code from ...
8652 (remote_open): ... here. Detect PORT here unconditionally. Move also
8653 setting transport_is_reliable.
8654 * server.c (run_once): New variable.
8655 (gdbserver_usage): Document it.
8656 (main): Set run_once for `--once'. Call remote_prepare. Exit after
8657 the first run if RUN_ONCE.
8658 * server.h (run_once, remote_prepare): New declarations.
8659
8660 2011-04-19 Tom Tromey <tromey@redhat.com>
8661
8662 * win32-low.c (handle_load_dll): Remove duplicate "the".
8663
8664 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
8665
8666 Remove support for old Cygwin 1.5 versions.
8667 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
8668 function to avoid warning.
8669 (win32_add_one_solib): Use cygwin_conv_path function to avoid
8670 warning.
8671
8672 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
8673
8674 * gdbserver/server.h (Macro _): Define it if not available.
8675
8676 2011-03-14 Michael Snyder <msnyder@vmware.com>
8677
8678 * hostio.c (handle_close): Remove unnecessary null test.
8679
8680 2011-03-10 Joel Brobecker <brobecker@adacore.com>
8681
8682 * Makefile.in (maintainer-clean realclean distclean): Remove
8683 "make ... subdir_do" command.
8684
8685 2011-03-10 Michael Snyder <msnyder@vmware.com>
8686
8687 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
8688
8689 * server.c (handle_v_run): Free alloced buffer on early return.
8690
8691 2011-03-09 Yao Qi <yao@codesourcery.com>
8692
8693 Revert:
8694 2011-03-04 Yao Qi <yao@codesourcery.com>
8695
8696 * Makefile.in: Remove GNU make feature --directory.
8697
8698 2011-03-05 Yao Qi <yao@codesourcery.com>
8699
8700 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8701 (subdir_do): New make target. Copied from gdb/Makefile.
8702 (maintainer-clean, realclean, distclean, clean): Call corresponding
8703 make targets in common/Makefile.
8704
8705 2011-02-11 Yao Qi <yao@codesourcery.com>
8706
8707 * configure.ac: Call AC_PROG_RANLIB.
8708 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
8709 * configure: Regenerate.
8710
8711 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8712
8713 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
8714
8715 2011-03-06 Yao Qi <yao@codesourcery.com>
8716
8717 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
8718
8719 2011-03-05 Yao Qi <yao@codesourcery.com>
8720
8721 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8722 (subdir_do): New make target. Copied from gdb/Makefile.
8723 (maintainer-clean, realclean, distclean, clean): Call corresponding
8724 make targets in common/Makefile.
8725
8726 2011-03-04 Yao Qi <yao@codesourcery.com>
8727
8728 * Makefile.in: Remove GNU make feature --directory.
8729
8730 2011-03-04 Michael Snyder <msnyder@vmware.com>
8731
8732 * server.c (queue_stop_reply): Call xmalloc not malloc.
8733
8734 2011-03-02 Michael Snyder <msnyder@vmware.com>
8735
8736 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
8737
8738 2011-02-28 Michael Snyder <msnyder@vmware.com>
8739
8740 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
8741 (cmd_qtframe): Ditto.
8742 (cmd_qtbuffer): Ditto.
8743 (cmd_bigqtbuffer): Ditto.
8744
8745 * utils.c (decimal2str): Initialize 'width' to nine, then
8746 don't mess with it.
8747
8748 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8749
8750 * hostio.c (require_data): Free *data, not data.
8751
8752 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8753
8754 * hostio.c (require_data): Use free, not xfree.
8755
8756 2011-02-27 Michael Snyder <msnyder@vmware.com>
8757
8758 * server.c (handle_query): Discard unused value.
8759
8760 * hostio.c (require_data): Free malloc memory before returning
8761 error.
8762
8763 2011-02-26 Michael Snyder <msnyder@vmware.com>
8764
8765 * linux-low.c (list_threads): Call closedir for dirent.
8766
8767 2011-02-27 Michael Snyder <msnyder@vmware.com>
8768
8769 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
8770 a case statement falls through.
8771
8772 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
8773
8774 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
8775 in comparison.
8776
8777 2011-02-26 Michael Snyder <msnyder@vmware.com>
8778
8779 * utils.c (decimal2str): Eliminate dead code and dead param.
8780 (pulongest): Drop dead param from call to decimal2str.
8781 (plongest): Ditto.
8782
8783 2011-02-24 Joel Brobecker <brobecker@adacore.com>
8784
8785 Revert the following patch (not approved yet):
8786 2011-02-21 Hui Zhu <teawater@gmail.com>
8787 * tracepoint.c (tp_printf): New function.
8788 (eval_agent_expr): Handle gdb_agent_op_printf.
8789
8790 2011-02-21 Hui Zhu <teawater@gmail.com>
8791
8792 * tracepoint.c (tp_printf): New function.
8793 (eval_agent_expr): Handle gdb_agent_op_printf.
8794
8795 2011-02-18 Tom Tromey <tromey@redhat.com>
8796
8797 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
8798 (tracepoint.o): Likewise.
8799 * tracepoint.c (enum gdb_agent_op): Use ax.def.
8800 (gdb_agent_op_names): Likewise.
8801
8802 2011-02-18 Tom Tromey <tromey@redhat.com>
8803
8804 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
8805 gdb_agent_op_rot>: New constants.
8806 (gdb_agent_op_names): Add pick and roll.
8807 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
8808 cases.
8809
8810 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
8811
8812 * aclocal.m4: Regenerated with aclocal-1.11.1.
8813
8814 2011-02-14 Pedro Alves <pedro@codesourcery.com>
8815
8816 * server.c (handle_qxfer_traceframe_info): New.
8817 (qxfer_packets): Register "traceframe-info".
8818 (handle_query): Report support for qXfer:traceframe-info:read+.
8819 * tracepoint.c (match_blocktype): New.
8820 (traceframe_find_block_type): Rename to ...
8821 (traceframe_walk_blocks): ... this. Add callback filter argument,
8822 and use it.
8823 (traceframe_find_block_type): New, reimplemented on top of
8824 traceframe_walk_blocks.
8825 (build_traceframe_info_xml): New.
8826 (traceframe_read_info): New.
8827 * server.h (traceframe_read_info): Declare.
8828
8829 2011-02-11 Yao Qi <yao@codesourcery.com>
8830
8831 * configure.ac: Call AC_PROG_RANLIB.
8832 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
8833 * configure: Regenerate.
8834
8835 2011-02-07 Pedro Alves <pedro@codesourcery.com>
8836
8837 * server.c (gdb_read_memory): Change return semantics to allow
8838 partial transfers.
8839 (handle_search_memory_1): Adjust.
8840 (process_serial_event) <'m' packet>: Handle partial transfers.
8841 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
8842
8843 2011-01-28 Pedro Alves <pedro@codesourcery.com>
8844
8845 * regcache.c (init_register_cache): Initialize
8846 regcache->register_status.
8847 (free_register_cache): Release regcache->register_status.
8848 (regcache_cpy): Copy register_status.
8849 (registers_to_string): Print 'x's for unavailable registers.
8850 (supply_register): Mark the register's status valid or
8851 unavailable, depending on whether a buffer was passed in or not.
8852 (supply_register_zeroed): New.
8853 (supply_regblock): Mark the registers' status valid or
8854 unavailable, depending on whether a buffer was passed in or not.
8855 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
8856 (struct regcache): New `register_status' field.
8857 (supply_register_zeroed): Declare.
8858 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
8859 supply_register_zeroed, rather than passing a NULL buffer to
8860 supply_register.
8861 * tracepoint.c (fetch_traceframe_registers): Update comment.
8862
8863 2011-01-28 Pedro Alves <pedro@codesourcery.com>
8864
8865 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
8866 buffer explicit.
8867
8868 2011-01-25 Pedro Alves <pedro@codesourcery.com>
8869
8870 * server.h (decode_xfer_write): Change prototype.
8871 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
8872 and don't extract the annex here.
8873 * server.c (decode_xfer_read): Remove `annex' parameter,
8874 and don't extract the annex here.
8875 (decode_xfer): New.
8876 (struct qxfer): New.
8877 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
8878 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
8879 (handle_qxfer_statictrace): New functions, abstracted out from
8880 handle_query, and made to use the struct qxfer interface.
8881 (handle_threads_qxfer_proper): Rename to ...
8882 (handle_qxfer_threads_proper): ... this.
8883 (handle_threads_qxfer): Rename to ...
8884 (handle_qxfer_threads): ... this. Adjust.
8885 (qxfer_packets): New array.
8886 (handle_qxfer): New function.
8887 (handle_query): Use handle_qxfer.
8888
8889 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
8890
8891 * gdbreplay.c: Shorten lines of >= 80 columns.
8892 * linux-low.c: Ditto.
8893 * linux-ppc-low.c: Ditto.
8894 * linux-s390-low.c: Ditto.
8895 * linux-sparc-low.c: Ditto.
8896 * linux-x86-low.c: Ditto.
8897 * linux-xtensa-low.c: Ditto.
8898 * mem-break.c: Ditto.
8899 * nto-low.c: Ditto.
8900 * regcache.h: Ditto.
8901 * remote-utils.c: Ditto.
8902 * server.c: Ditto.
8903 * server.h: Ditto.
8904 * thread-db.c: Ditto.
8905 * tracepoint.c: Ditto.
8906 * utils.c: Ditto.
8907 * win32-low.h: Ditto.
8908
8909 2011-01-05 Joel Brobecker <brobecker@adacore.com>
8910
8911 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
8912 update.
8913
8914 2011-01-01 Joel Brobecker <brobecker@adacore.com>
8915
8916 * server.c (gdbserver_version): Update copyright year in version
8917 output.
8918 * gdbreplay.c (gdbreplay_version): Ditto.
8919
8920 2010-12-29 Jie Zhang <jie.zhang@analog.com>
8921
8922 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
8923 * linux-bfin-low.c: New file.
8924 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
8925 PT_DATA_ADDR for BFIN targets.
8926 * Makefile.in (SFILES): Add linux-bfin-low.c.
8927 (clean): Remove reg-bfin.c.
8928 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
8929 * README: Mention supported Blackfin targets.
8930
8931 2010-12-23 Mike Frysinger <vapier@gentoo.org>
8932
8933 * .gitignore: New file.
8934
8935 2010-11-16 Mike Frysinger <vapier@gentoo.org>
8936
8937 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
8938
8939 2010-10-22 Jie Zhang <jie@codesourcery.com>
8940
8941 * Makefile.in: Add FLAGS_TO_PASS variable.
8942 (install): Remove dependency of install-only and recursively
8943 invoke make for install-only.
8944
8945 2010-10-04 Doug Evans <dje@google.com>
8946
8947 * Makefile.in (uninstall): Use $(DESTDIR).
8948
8949 2010-09-24 Pedro Alves <pedro@codesourcery.com>
8950
8951 PR gdb/11842
8952
8953 * linux-x86-low.c (compat_siginfo_from_siginfo)
8954 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
8955 si_code is < 0. Check for si_code == SI_TIMER before checking for
8956 si_code < 0.
8957
8958 2010-09-13 Joel Brobecker <brobecker@adacore.com>
8959
8960 * lynx-i386-low.c: New file.
8961 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
8962
8963 2010-09-13 Joel Brobecker <brobecker@adacore.com>
8964
8965 * lynx-low.c (ptrace_request_to_str): Remove handling for
8966 request values that have been removed in LynxOS 5.x.
8967
8968 2010-09-13 Joel Brobecker <brobecker@adacore.com>
8969
8970 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
8971 <ptrace.h>
8972
8973 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
8974
8975 * configure.ac: Add --enable-inprocess-agent option.
8976 * configure: Rebuilt.
8977
8978 2010-09-06 Yao Qi <yao@codesourcery.com>
8979
8980 * linux-low.c (linux_kill): Remove unused variable.
8981 (linux_stabilize_threads): Likewise.
8982 * server.c (start_inferior): Likewise.
8983 (queue_stop_reply_callback): Likewise.
8984 * tracepoint.c (do_action_at_tracepoint): Likewise.
8985
8986 2010-09-06 Yao Qi <yao@codesourcery.com>
8987
8988 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
8989 on return.
8990
8991 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8992
8993 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
8994
8995 2010-09-06 Pedro Alves <pedro@codesourcery.com>
8996
8997 * Makefile.in (install-only): Replace $IPA_DEPFILES with
8998 "$(IPA_DEPFILES)".
8999
9000 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9001
9002 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
9003 gdbserver/lynx-ppc-low.c: New files.
9004 * Makefile.in (lynx_low_h): New variable.
9005 (lynx-low.o, lynx-ppc-low.o): New rules.
9006 * configure.ac: On LynxOS, link with -lnetinet.
9007 * configure.srv: Add handling of powerpc-*-lynxos* targets.
9008 * configure: regenerate.
9009
9010 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9011
9012 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
9013 * configure.ac: Add check for vasprintf and vsnprintf.
9014 * configure, config.in: Regenerate.
9015 * server.h (vasprintf, vsnprintf): Add conditional declarations.
9016
9017 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9018
9019 * gdbreplay.c: Move include of alloca.h up, next to include of
9020 malloc.h.
9021 * server.h: Add include of malloc.h.
9022 * mem-break.c: Remove include of malloc.h.
9023 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
9024
9025 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9026
9027 * Makefile.in (memmem.o): Build with -Wno-error.
9028
9029 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9030
9031 * utils.c (xsnprintf): Make non-static.
9032 * server.h: Add xsnprintf declaration.
9033 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
9034 replace calls to snprintf by calls to xsnprintf throughout.
9035
9036 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9037
9038 * configure.ac: Add configure check for alloca.
9039 * configure, config.in: Regenerate.
9040 * server.h: Include alloca.h if it exists.
9041 * gdbreplay.c: Include alloca.h if it exists.
9042
9043 2010-08-28 Pedro Alves <pedro@codesourcery.com>
9044
9045 * linux-low.c (__SIGRTMIN): Define if not already defined.
9046 (linux_create_inferior): Check for __ANDROID__ rather than
9047 __SIGRTMIN.
9048 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
9049 are already deferred.
9050 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
9051 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
9052 stopped and already has a pending signal to report.
9053 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
9054 a pending signal to report or is moving out of a jump pad.
9055 (linux_init_signals): Check for __ANDROID__ rather than
9056 __SIGRTMIN.
9057
9058 2010-08-28 Pedro Alves <pedro@codesourcery.com>
9059
9060 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
9061 debug_threads check. Avoid a linear search when not doing debug
9062 output.
9063
9064 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9065
9066 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
9067 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
9068 (struct file_handler) <fd>: Change type to gdb_fildes_t.
9069 (process_event): Change local fd's type to gdb_fildes_t.
9070 (create_file_handler): Adjust prototype.
9071 (delete_file_handler): Adjust prototype.
9072 (handle_file_event): Adjust prototype. Use pfildes.
9073 (create_file_event): Adjsut prototype.
9074 * remote-utils.c (remote_desc, listen_desc): Change type to
9075 gdb_fildes_t.
9076 * server.h: New gdb_fildes_t typedef.
9077 [USE_WIN32API]: Include winsock2.h.
9078 (delete_file_handler, add_file_handler): Adjust prototypes.
9079 (pfildes): Declare.
9080 * utils.c (pfildes): New.
9081
9082 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9083
9084 * configure.ac (build_warnings): Add -Wno-char-subscripts.
9085 * configure: Regenerate.
9086
9087 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9088
9089 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
9090 (linux_done_accessing_memory): ... this.
9091 (linux_target_ops): Adjust.
9092 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
9093 * nto-low.c (nto_target_ops): Adjust comment.
9094 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
9095 * spu-low.c (spu_target_ops): Adjust comment.
9096 * target.h (target_ops): Rename unprepare_to_access_memory field
9097 to done_accessing_memory.
9098 (unprepare_to_access_memory): Rename to ...
9099 (done_accessing_memory): ... this.
9100
9101 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9102
9103 * linux-low.c (linux_prepare_to_access_memory): New.
9104 (linux_unprepare_to_access_memory): New.
9105 (linux_target_ops): Install them.
9106 * server.c (read_memory): Rename to ...
9107 (gdb_read_memory): ... this. Use
9108 prepare_to_access_memory/prepare_to_access_memory.
9109 (write_memory): Rename to ...
9110 (gdb_write_memory): ... this. Use
9111 prepare_to_access_memory/prepare_to_access_memory.
9112 (handle_search_memory_1): Adjust.
9113 (process_serial_event): Adjust.
9114 * target.h (struct target_ops): New fields
9115 prepare_to_access_memory and unprepare_to_access_memory.
9116 (prepare_to_access_memory, unprepare_to_access_memory): New.
9117 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
9118 prepare_to_access_memory/prepare_to_access_memory.
9119 * nto-low.c (nto_target_ops): Adjust.
9120 * spu-low.c (spu_target_ops): Adjust.
9121 * win32-low.c (win32_target_ops): Adjust.
9122
9123 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9124
9125 * Makefile.in (WARN_CFLAGS): Get it from configure.
9126 (WERROR_CFLAGS): New.
9127 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
9128 * configure.ac: Introduce --enable-werror, which adds -Werror to
9129 the compiler command line. Enabled by default. Disable with
9130 --disable-werror. Add -Wdeclaration-after-statement
9131 Wpointer-arith and -Wformat-nonliteral to warning flags.
9132 * configure: Regenerate.
9133
9134 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9135
9136 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
9137
9138 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9139
9140 * gdbreplay.c (remote_error): New.
9141 (gdbchar): New.
9142 (expect): Use gdbchar. Check for error reading from GDB.
9143 Clarify sync error output.
9144 (play): Check for errors writing to GDB.
9145 * linux-low.c (sigchld_handler): Really ignore `write' errors.
9146 * remote-utils.c (getpkt): Check for errors writing to the remote
9147 descriptor.
9148
9149 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9150
9151 * linux-low.c (linux_wait_1): Move non-debugging code out of
9152 `debug_threads' control.
9153
9154 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9155
9156 * linux-low.c (linux_wait_1): Don't set last_status here.
9157 * server.c (push_event, queue_stop_reply_callback): Assert we're
9158 not pushing a TARGET_WAITKIND_IGNORE event.
9159 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
9160 (myresume, handle_target_event): Set the thread's last_resume_kind
9161 and last_status from the target returned status.
9162
9163 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9164
9165 PR threads/10729
9166
9167 * linux-x86-low.c (update_debug_registers_callback): New.
9168 (i386_dr_low_set_addr): Use it.
9169 (i386_dr_low_get_addr): New.
9170 (i386_dr_low_set_control): Use update_debug_registers_callback.
9171 (i386_dr_low_get_control): New.
9172 (i386_dr_low_get_status): Adjust.
9173 * linux-low.c (linux_stop_lwp): New.
9174 * linux-low.h (linux_stop_lwp): Declare.
9175
9176 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
9177 argument instead of a i386_debug_reg_state.
9178 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
9179 a i386_debug_reg_state.
9180 (i386_insert_aligned_watchpoint): Adjust.
9181 (i386_remove_aligned_watchpoint): Adjust.
9182 (i386_low_stopped_data_address): Read the debug registers from the
9183 inferior instead of from the mirrors.
9184 * i386-low.h (struct i386_debug_reg_state): Extend comment.
9185 (i386_dr_low_get_addr): Declare.
9186 (i386_dr_low_get_control): Declare.
9187 (i386_dr_low_get_status): Change prototype.
9188
9189 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
9190 (i386_dr_low_get_addr): New.
9191 (i386_dr_low_get_control): New.
9192 (i386_dr_low_get_status): Adjust prototype. Return
9193 dr_status_mirror.
9194 (i386_initial_stuff): Clear dr_status_mirror and
9195 dr_control_mirror.
9196 (i386_get_thread_context): Adjust.
9197 (i386_set_thread_context): Adjust.
9198 (i386_thread_added): Adjust.
9199
9200 2010-08-24 Pedro Alves <pedro@codesourcery.com>
9201
9202 * linux-low.h (linux_thread_area): Delete declaration.
9203
9204 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
9205
9206 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
9207 after its termination.
9208
9209 2010-08-09 Pedro Alves <pedro@codesourcery.com>
9210
9211 * linux-low.c (gdb_wants_lwp_stopped): Delete.
9212 (gdb_wants_all_stopped): Delete.
9213 (linux_wait_1): Don't call them.
9214 * server.c (handle_v_cont): Tag all threads as want-stopped.
9215 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
9216 stopped as "client-wants-stopped".
9217
9218 2010-07-31 Pedro Alves <pedro@codesourcery.com>
9219
9220 * Makefile.in (signals_h): New.
9221 (server_h): Depend on it.
9222 (server.o): Don't depend on $(signals_def).
9223 (signals.o): Depend on $(signals_def).
9224
9225 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
9226
9227 * Makefile.in (signals_def): New.
9228 (server_h): Append include/gdb/signals.h and signals_def.
9229 (server.o): Append signals_def.
9230
9231 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9232
9233 * server.c (handle_target_event): Use target_signal_to_host for
9234 resume_info.sig initialization.
9235 * target.h (struct thread_resume) <sig>: New comment.
9236
9237 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
9238
9239 * server.c (handle_query): strcpy() the returned string from paddress()
9240 instead of sprintf().
9241 * utils.c (paddress): Return phex_nz().
9242
9243 2010-07-07 Joel Brobecker <brobecker@adacore.com>
9244
9245 * server.c (handle_v_cont): Call mourn_inferior if process
9246 just exited.
9247 (myresume): Likewise.
9248
9249 2010-07-01 Pedro Alves <pedro@codesourcery.com>
9250
9251 Static tracepoints, and integration with UST.
9252
9253 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
9254 * mem-break.c (uninsert_all_breakpoints)
9255 (reinsert_all_breakpoints): New.
9256 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
9257 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
9258 (gdb_agent_ust_loaded, helper_thread_id)
9259 (gdb_agent_helper_thread_id): New macros.
9260 (struct ipa_sym_addresses): Add addr_ust_loaded,
9261 addr_helper_thread_id, addr_cmd_buf.
9262 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
9263 (in_process_agent_loaded_ust): New.
9264 (write_e_ust_not_loaded): New.
9265 (maybe_write_ipa_ust_not_loaded): New.
9266 (struct collect_static_trace_data_action): New.
9267 (enum tracepoint_type) <static_tracepoint>: New.
9268 (struct tracepoint) <handle>: Mention static tracepoints.
9269 (struct static_tracepoint_ctx): New.
9270 (CMD_BUF_SIZE): New.
9271 (add_tracepoint_action): Handle static tracepoint actions.
9272 (unprobe_marker_at): New.
9273 (clear_installed_tracepoints): Handle static tracepoints.
9274 (cmd_qtdp): Handle static tracepoints.
9275 (probe_marker_at): New.
9276 (cmd_qtstart): Handle static tracepoints.
9277 (response_tracepoint): Handle static tracepoints.
9278 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
9279 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
9280 (get_context_regcache): Handle static tracepoints.
9281 (do_action_at_tracepoint): Handle static tracepoint actions.
9282 (traceframe_find_block_type): Handle static trace data blocks.
9283 (traceframe_read_sdata): New.
9284 (download_tracepoints): Download static tracepoint actions.
9285 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
9286 (GDB_PROBE_NAME): New.
9287 (ust_ops): New.
9288 (GET_UST_SYM): New.
9289 (USTF): New.
9290 (dlsym_ust): New.
9291 (ust_marker_to_static_tracepoint): New.
9292 (gdb_probe): New.
9293 (collect_ust_data_at_tracepoint): New.
9294 (gdb_ust_probe): New.
9295 (UNIX_PATH_MAX, SOCK_DIR): New.
9296 (gdb_ust_connect_sync_socket): New.
9297 (resume_thread, stop_thread): New.
9298 (run_inferior_command): New.
9299 (init_named_socket): New.
9300 (gdb_ust_socket_init): New.
9301 (cstr_to_hexstr): New.
9302 (next_st): New.
9303 (first_marker, next_marker): New.
9304 (response_ust_marker): New.
9305 (cmd_qtfstm, cmd_qtsstm): New.
9306 (unprobe_marker_at, probe_marker_at): New.
9307 (cmd_qtstmat, gdb_ust_thread): New.
9308 (gdb_ust_init): New.
9309 (initialize_tracepoint_ftlib): Call gdb_ust_init.
9310 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
9311 (ST_REGENTRY): New.
9312 (x86_64_st_collect_regmap): New.
9313 (X86_64_NUM_ST_COLLECT_GREGS): New.
9314 (AMD64_RIP_REGNUM): New.
9315 (supply_static_tracepoint_registers): New.
9316 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
9317 (ST_REGENTRY): New.
9318 (i386_st_collect_regmap): New.
9319 (i386_NUM_ST_COLLECT_GREGS): New.
9320 (supply_static_tracepoint_registers): New.
9321 * server.c (handle_query): Handle qXfer:statictrace:read.
9322 <qSupported>: Report support for StaticTracepoints, and
9323 qXfer:statictrace:read features.
9324 * server.h (traceframe_read_sdata)
9325 (supply_static_tracepoint_registers): Declare.
9326 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
9327 (unpack_varlen_hex): Include in IPA build.
9328 * Makefile.in (ustlibs, ustinc): New.
9329 (IPA_OBJS): Add remote-utils-ipa.o.
9330 ($(IPA_LIB)): Link -ldl and -lpthread.
9331 (UST_CFLAGS): New.
9332 (IPAGENT_CFLAGS): Add UST_CFLAGS.
9333 * config.in, configure: Regenerate.
9334
9335 2010-06-20 Ian Lance Taylor <iant@google.com>
9336 Pedro Alves <pedro@codesourcery.com>
9337
9338 * linux-x86-low.c (always_true): Delete.
9339 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
9340 trying to fool the compiler with always_true.
9341
9342 2010-06-20 Pedro Alves <pedro@codesourcery.com>
9343
9344 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
9345 conditions in gdbserver.
9346
9347 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
9348
9349 * spu-low.c (spu_read_memory): Wrap around local store limit.
9350 (spu_write_memory): Likewise.
9351
9352 2010-06-15 Pedro Alves <pedro@codesourcery.com>
9353
9354 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
9355 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
9356 LONGEST uses.
9357 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
9358 uses.
9359 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
9360 uses with LONGEST uses.
9361
9362 2010-06-14 Stan Shebs <stan@codesourcery.com>
9363 Pedro Alves <pedro@codesourcery.com>
9364
9365 Bytecode compiler.
9366
9367 * linux-x86-low.c: Include limits.h.
9368 (add_insns): New.
9369 (always_true): New.
9370 (EMIT_ASM): New.
9371 (EMIT_ASM32): New.
9372 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
9373 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
9374 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
9375 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
9376 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
9377 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
9378 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
9379 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
9380 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
9381 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
9382 (amd64_emit_void_call_2): New.
9383 (amd64_emit_ops): New.
9384 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
9385 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
9386 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
9387 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
9388 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
9389 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
9390 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
9391 (i386_emit_call, i386_emit_reg, i386_emit_pop)
9392 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
9393 (i386_emit_stack_adjust, i386_emit_int_call_1)
9394 (i386_emit_void_call_2): New.
9395 (i386_emit_ops): New.
9396 (x86_emit_ops): New.
9397 (the_low_target): Install x86_emit_ops.
9398 * server.h (struct emit_ops): New.
9399 (get_raw_reg_func_addr): Declare.
9400 (current_insn_ptr, emit_error): Declare.
9401 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
9402 (set_trace_state_variable_value): New defines.
9403 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
9404 addr_get_trace_state_variable_value and
9405 addr_set_trace_state_variable_value.
9406 (symbol_list): New fields for get_raw_reg,
9407 get_trace_state_variable_value and set_trace_state_variable_value.
9408 (condfn): New typedef.
9409 (struct tracepoint): New field `compiled_cond'.
9410 (do_action_at_tracepoint): Clear compiled_cond.
9411 (get_trace_state_variable_value, set_trace_state_variable_value):
9412 Export in the IPA.
9413 (condition_true_at_tracepoint): If there's a compiled condition,
9414 run that.
9415 (current_insn_ptr, emit_error): New globals.
9416 (struct bytecode_address): New.
9417 (get_raw_reg_func_addr): New.
9418 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
9419 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
9420 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
9421 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
9422 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
9423 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
9424 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
9425 (compile_tracepoint_condition, compile_bytecodes): New.
9426 * target.h (emit_ops): Forward declare.
9427 (struct target_ops): New field emit_ops.
9428 (target_emit_ops): New.
9429 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
9430 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
9431 * linux-low.c (linux_emit_ops): New.
9432 (linux_target_ops): Install it.
9433 * linux-low.h (struct linux_target_ops): New field emit_ops.
9434
9435 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
9436
9437 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
9438 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
9439
9440 2010-06-01 Pedro Alves <pedro@codesourcery.com>
9441 Stan Shebs <stan@codesourcery.com>
9442
9443 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
9444 (all): Depend on $(extra_libraries).
9445 (install-only): Install the IPA.
9446 (IPA_OBJS, IPA_LIB): New.
9447 (clean): Remove the IPA lib.
9448 (IPAGENT_CFLAGS): New.
9449 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
9450 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
9451 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
9452 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
9453 * configure.ac: Check for atomic builtins support in the compiler.
9454 (IPA_DEPFILES, extra_libraries): Define.
9455 * configure.srv (ipa_obj): Add description.
9456 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
9457 (i[34567]86-*-linux*): Set ipa_obj.
9458 (x86_64-*-linux*): Set ipa_obj.
9459 * linux-low.c (stabilizing_threads): New.
9460 (supports_fast_tracepoints): New.
9461 (linux_detach): Stabilize threads before detaching.
9462 (handle_tracepoints): Handle internal tracing breakpoints. Assert
9463 the lwp is either not stabilizing, or is moving out of a jump pad.
9464 (linux_fast_tracepoint_collecting): New.
9465 (maybe_move_out_of_jump_pad): New.
9466 (enqueue_one_deferred_signal): New.
9467 (dequeue_one_deferred_signal): New.
9468 (linux_wait_for_event_1): If moving out of a jump pad, defer
9469 pending signals to later.
9470 (linux_stabilize_threads): New.
9471 (linux_wait_1): Check if threads need moving out of jump pads, and
9472 do it if so.
9473 (stuck_in_jump_pad_callback): New.
9474 (move_out_of_jump_pad_callback): New.
9475 (lwp_running): New.
9476 (linux_resume_one_lwp): Handle moving out of jump pads.
9477 (linux_set_resume_request): Dequeue deferred signals.
9478 (need_step_over_p): Also step over fast tracepoint jumps.
9479 (start_step_over): Also uninsert fast tracepoint jumps.
9480 (finish_step_over): Also reinsert fast tracepoint jumps.
9481 (linux_install_fast_tracepoint_jump): New.
9482 (linux_target_ops): Install linux_stabilize_threads and
9483 linux_install_fast_tracepoint_jump_pad.
9484 * linux-low.h (linux_target_ops) <get_thread_area,
9485 install_fast_tracepoint_jump_pad>: New fields.
9486 (struct lwp_info) <collecting_fast_tracepoint,
9487 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
9488 (linux_get_thread_area): Declare.
9489 * linux-x86-low.c (jump_insn): New.
9490 (x86_get_thread_area): New.
9491 (append_insns): New.
9492 (push_opcode): New.
9493 (amd64_install_fast_tracepoint_jump_pad): New.
9494 (i386_install_fast_tracepoint_jump_pad): New.
9495 (x86_install_fast_tracepoint_jump_pad): New.
9496 (the_low_target): Install x86_get_thread_area and
9497 x86_install_fast_tracepoint_jump_pad.
9498 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
9499 (struct fast_tracepoint_jump): New.
9500 (fast_tracepoint_jump_insn): New.
9501 (fast_tracepoint_jump_shadow): New.
9502 (find_fast_tracepoint_jump_at): New.
9503 (fast_tracepoint_jump_here): New.
9504 (delete_fast_tracepoint_jump): New.
9505 (set_fast_tracepoint_jump): New.
9506 (uninsert_fast_tracepoint_jumps_at): New.
9507 (reinsert_fast_tracepoint_jumps_at): New.
9508 (set_breakpoint_at): Use write_inferior_memory.
9509 (uninsert_raw_breakpoint): Use write_inferior_memory.
9510 (check_mem_read): Mask out fast tracepoint jumps.
9511 (check_mem_write): Mask out fast tracepoint jumps.
9512 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
9513 (set_fast_tracepoint_jump): Declare.
9514 (delete_fast_tracepoint_jump)
9515 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
9516 (reinsert_fast_tracepoint_jumps_at): Declare.
9517 * regcache.c: Don't compile many functions when building the
9518 in-process agent library.
9519 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
9520 the register buffer in the heap.
9521 (free_register_cache): If the register buffer isn't owned by the
9522 regcache, don't free it.
9523 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
9524 pre-existing register caches.
9525 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
9526 type.
9527 (convert_ascii_to_int): : Constify `from' parameter type.
9528 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
9529 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
9530 the needed buffer in-place.
9531 (relocate_instruction): New.
9532 * server.c (handle_query) <qSymbols>: If the target supports
9533 tracepoints, give it a chance of looking up symbols. Report
9534 support for fast tracepoints.
9535 (handle_status): Stabilize threads.
9536 (process_serial_event): Adjust.
9537 * server.h (struct fast_tracepoint_jump): Forward declare.
9538 (struct process_info) <fast_tracepoint_jumps>: New field.
9539 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
9540 (decode_X_packet, decode_M_packet): Adjust.
9541 (relocate_instruction): Declare.
9542 (in_process_agent_loaded): Declare.
9543 (tracepoint_look_up_symbols): Declare.
9544 (struct fast_tpoint_collect_status): Declare.
9545 (fast_tracepoint_collecting): Declare.
9546 (force_unlock_trace_buffer): Declare.
9547 (handle_tracepoint_bkpts): Declare.
9548 (initialize_low_tracepoint)
9549 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
9550 * target.h (struct target_ops) <stabilize_threads,
9551 install_fast_tracepoint_jump_pad>: New fields.
9552 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
9553 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
9554 [HAVE_STDINT_H]: Include stdint.h.
9555 (trace_debug_1): Rename to ...
9556 (trace_vdebug): ... this.
9557 (trace_debug): Rename to ...
9558 (trace_debug_1): ... this. Add `level' parameter.
9559 (trace_debug): New.
9560 (ATTR_USED, ATTR_NOINLINE): New.
9561 (IP_AGENT_EXPORT): New.
9562 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
9563 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
9564 (about_to_request_buffer_space, trace_buffer_is_full)
9565 (stopping_tracepoint, expr_eval_result, error_tracepoint)
9566 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
9567 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
9568 (traceframe_write_count, traceframes_created)
9569 (trace_state_variables)
9570 New renaming defines.
9571 (struct ipa_sym_addresses): New.
9572 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
9573 (symbol_list): New.
9574 (ipa_sym_addrs): New.
9575 (all_tracepoint_symbols_looked_up): New.
9576 (in_process_agent_loaded): New.
9577 (write_e_ipa_not_loaded): New.
9578 (maybe_write_ipa_not_loaded): New.
9579 (tracepoint_look_up_symbols): New.
9580 (debug_threads) [IN_PROCESS_AGENT]: New.
9581 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
9582 (UNKNOWN_SIDE_EFFECTS): New.
9583 (stop_tracing): New.
9584 (flush_trace_buffer): New.
9585 (stop_tracing_bkpt): New.
9586 (flush_trace_buffer_bkpt): New.
9587 (read_inferior_integer): New.
9588 (read_inferior_uinteger): New.
9589 (read_inferior_data_pointer): New.
9590 (write_inferior_data_pointer): New.
9591 (write_inferior_integer): New.
9592 (write_inferior_uinteger): New.
9593 (struct collect_static_trace_data_action): Delete.
9594 (enum tracepoint_type): New.
9595 (struct tracepoint) <type>: New field `type'.
9596 <actions_str, step_actions, step_actions_str>: Only include in
9597 GDBserver.
9598 <orig_size, obj_addr_on_target, adjusted_insn_addr>
9599 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
9600 (tracepoints): Use IP_AGENT_EXPORT.
9601 (last_tracepoint): Don't include in the IPA.
9602 (stopping_tracepoint): Use IP_AGENT_EXPORT.
9603 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
9604 (alloced_trace_state_variables): New.
9605 (trace_state_variables): Use IP_AGENT_EXPORT.
9606 (traceframe_t): Delete unused variable.
9607 (circular_trace_buffer): Don't include in the IPA.
9608 (trace_buffer_start): Delete.
9609 (struct trace_buffer_control): New.
9610 (trace_buffer_free): Delete.
9611 (struct ipa_trace_buffer_control): New.
9612 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
9613 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
9614 New.
9615 (trace_buffer_ctrl): New.
9616 (TRACE_BUFFER_CTRL_CURR): New.
9617 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
9618 Reimplement as macros.
9619 (trace_buffer_wrap): Delete.
9620 (traceframe_write_count, traceframe_read_count)
9621 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
9622 (struct tracepoint_hit_ctx) <type>: New field.
9623 (struct fast_tracepoint_ctx): New.
9624 (memory_barrier): New.
9625 (cmpxchg): New.
9626 (record_tracepoint_error): Update atomically in the IPA.
9627 (clear_inferior_trace_buffer): New.
9628 (about_to_request_buffer_space): New.
9629 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
9630 updating the same buffer.
9631 (add_tracepoint): Default the tracepoint's type to trap
9632 tracepoint, and orig_size to -1.
9633 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
9634 internal variables.
9635 (create_trace_state_variable): New parameter `gdb'. Handle it.
9636 (clear_installed_tracepoints): Clear fast tracepoint jumps.
9637 (cmd_qtdp): Handle fast tracepoints.
9638 (cmd_qtdv): Adjust.
9639 (max_jump_pad_size): New.
9640 (gdb_jump_pad_head): New.
9641 (get_jump_space_head): New.
9642 (claim_jump_space): New.
9643 (sort_tracepoints): New.
9644 (MAX_JUMP_SIZE): New.
9645 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
9646 IPA.
9647 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
9648 support. Upload fast traceframes, and delete internal IPA
9649 breakpoints.
9650 (stop_tracing_handler): New.
9651 (flush_trace_buffer_handler): New.
9652 (cmd_qtstop): Upload fast tracepoints.
9653 (response_tracepoint): Handle fast tracepoints.
9654 (tracepoint_finished_step): Upload fast traceframes. Set the
9655 tracepoint hit context's tracepoint type.
9656 (handle_tracepoint_bkpts): New.
9657 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
9658 type. Add comment about fast tracepoints.
9659 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
9660 non-existing action_str field.
9661 (get_context_regcache): Handle fast tracepoints.
9662 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
9663 to the regcache.
9664 (fast_tracepoint_from_jump_pad_address): New.
9665 (fast_tracepoint_from_ipa_tpoint_address): New.
9666 (collecting_t): New.
9667 (force_unlock_trace_buffer): New.
9668 (fast_tracepoint_collecting): New.
9669 (collecting): New.
9670 (gdb_collect): New.
9671 (write_inferior_data_ptr): New.
9672 (target_tp_heap): New.
9673 (target_malloc): New.
9674 (download_agent_expr): New.
9675 (UALIGN): New.
9676 (download_tracepoints): New.
9677 (download_trace_state_variables): New.
9678 (upload_fast_traceframes): New.
9679 (IPA_FIRST_TRACEFRAME): New.
9680 (IPA_NEXT_TRACEFRAME_1): New.
9681 (IPA_NEXT_TRACEFRAME): New.
9682 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
9683 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
9684 (gdb_jump_pad_buffer_end): New.
9685 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
9686 (initialize_tracepoint): Adjust.
9687 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
9688 buffer. Initialize the low module.
9689 * utils.c (PREFIX, TOOLNAME): New.
9690 (malloc_failure): Use PREFIX.
9691 (error): In the IPA, an error causes an exit.
9692 (fatal, warning): Use PREFIX.
9693 (internal_error): Use TOOLNAME.
9694 (NUMCELLS): Increase to 10.
9695 * configure, config.in: Regenerate.
9696
9697 2010-06-01 Pedro Alves <pedro@codesourcery.com>
9698
9699 * server.c (handle_query) <qSupported>: Do two passes over the
9700 qSupported string to avoid nesting strtok.
9701
9702 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9703
9704 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
9705 (CDEPS): New.
9706 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
9707 -Wl,--dynamic-list.
9708 * configure: Regenerate.
9709 * proc-service.list: New.
9710
9711 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9712
9713 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
9714 New comment.
9715
9716 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
9717
9718 * gdbreplay.c (remote_open): Check error return from socket() call by
9719 its equality to -1 not by it being negative.
9720 * remote-utils.c (remote_open): Likewise.
9721
9722 2010-05-23 Pedro Alves <pedro@codesourcery.com>
9723
9724 * config.h: Regenerate.
9725
9726 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9727
9728 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
9729 doesn't provide PTRACE_GET_THREAD_AREA.
9730
9731 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9732
9733 * linux-m68k-low.c: Include <asm/ptrace.h>
9734 (ps_get_thread_area): Implement.
9735
9736 2010-05-03 Doug Evans <dje@google.com>
9737
9738 * event-loop.c (struct callback_event): New struct.
9739 (callback_list): New global.
9740 (append_callback_event, delete_callback_event): New functions.
9741 (process_callback): New function.
9742 (start_event_loop): Call it.
9743 * remote-utils.c (NOT_SCHEDULED): Define.
9744 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
9745 moved out of readchar.
9746 (readchar): Rewrite. Call reschedule before returning.
9747 (reset_readchar): New function.
9748 (remote_close): Call it.
9749 (process_remaining, reschedule): New functions.
9750 * server.h (callback_handler_func): New typedef.
9751 (append_callback_event, delete_callback_event): Declare.
9752
9753 2010-05-03 Pedro Alves <pedro@codesourcery.com>
9754
9755 * proc-service.c (ps_pglobal_lookup): Use
9756 thread_db_look_up_one_symbol.
9757 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
9758 parameter. Use it instead of all_symbols_looked_up.
9759 * server.h (struct process_info) <all_symbols_looked_up>: Delete
9760 field.
9761 (all_symbols_looked_up): Don't declare.
9762 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
9763 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
9764 field.
9765 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
9766 Set all_symbols_looked_up here.
9767 (thread_db_look_up_one_symbol): New.
9768 (thread_db_get_tls_address): Adjust.
9769 (thread_db_load_search, try_thread_db_load_1): Always allocate the
9770 thread_db object on the heap, and tentatively set it in the
9771 process structure.
9772 (thread_db_init): Don't set all_symbols_looked_up here.
9773 * linux-low.h (thread_db_look_up_one_symbol): Declare.
9774
9775 2010-05-03 Pedro Alves <pedro@codesourcery.com>
9776
9777 * linux-low.c (linux_kill, linux_detach): Adjust.
9778 (status_pending_p_callback): Remove redundant statement. Check
9779 for !TARGET_WAITIKIND_IGNORE, instead of
9780 TARGET_WAITKIND_STOPPED.
9781 (handle_tracepoints): Make sure LWP is locked. Adjust.
9782 (linux_wait_for_event_1): Adjust.
9783 (linux_cancel_breakpoints): New.
9784 (unsuspend_one_lwp): New.
9785 (unsuspend_all_lwps): New.
9786 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
9787 (send_sigstop_callback): Change return type to int, add new
9788 `except' parameter and handle it.
9789 (suspend_and_send_sigstop_callback): New.
9790 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
9791 pass them down. If SUSPEND, also increment the lwp's suspend
9792 count.
9793 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
9794 (need_step_over_p): Don't consider suspended LWPs.
9795 (start_step_over): Adjust.
9796 (proceed_one_lwp): Change return type to int, add new `except'
9797 parameter and handle it.
9798 (unsuspend_and_proceed_one_lwp): New.
9799 (proceed_all_lwps): Use find_inferior instead of
9800 for_each_inferior.
9801 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
9802 also decrement the suspend count of LWPs. Pass `except' down,
9803 instead of hacking its suspend count.
9804 (linux_pause_all): Add `freeze' parameter. Adjust.
9805 (linux_unpause_all): New.
9806 (linux_target_ops): Install linux_unpause_all.
9807 * server.c (handle_status): Adjust.
9808 * target.h (struct target_ops): New fields `unpause_all' and
9809 `cancel_breakpoints'. Add new parameter to `pause_all'.
9810 (pause_all): Add new `freeze' parameter.
9811 (unpause_all): New.
9812 (cancel_breakpoints): New.
9813 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
9814 cancel breakpoints.
9815 (cmd_qtstart): Pause threads.
9816 (stop_tracing): Pause threads, and cancel breakpoints.
9817 * win32-low.c (win32_target_ops): Adjust.
9818
9819 2010-05-03 Pedro Alves <pedro@codesourcery.com>
9820
9821 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
9822 the inferior right away from here...
9823 (linux_wait_1): ... to here, and adjust to check the thread's
9824 last_resume_kind instead of the lwp's step or stop_expected flags.
9825
9826 2010-05-02 Pedro Alves <pedro@codesourcery.com>
9827
9828 * README: Use consistent `GDB' and `GDBserver' spellings.
9829
9830 2010-05-02 Pedro Alves <pedro@codesourcery.com>
9831
9832 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
9833 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
9834 (linux_detach_one_lwp): Assume the lwp is stopped.
9835 (any_thread_of): Delete.
9836 (linux_detach): Stop all lwps here. Don't blindly delete all
9837 breakpoints.
9838 (delete_lwp_callback): New.
9839 (linux_mourn): Delete all lwps of the process that is gone.
9840 (linux_wait_1): Don't delete the last lwp of the process here.
9841 * mem-break.h (mark_breakpoints_out): Declare.
9842 * mem-break.c (mark_breakpoints_out): New.
9843 (free_all_breakpoints): Use it.
9844 * server.c (handle_target_event): If the process is gone, mark
9845 breakpoints out.
9846 * thread-db.c (struct thread_db) <create_bp>: New field.
9847 (thread_db_enable_reporting): Fix prototype. Store a thread event
9848 breakpoint reference in the thread_db struct.
9849 (thread_db_load_search): Clear the thread_db object.
9850 (try_thread_db_load_1): Ditto.
9851 (switch_to_process): New.
9852 (disable_thread_event_reporting): Use it.
9853 (remove_thread_event_breakpoints): New.
9854 (thread_db_detach, thread_db_mourn): Use it.
9855
9856 2010-05-01 Pedro Alves <pedro@codesourcery.com>
9857
9858 * linux-low.c (linux_enable_event_reporting): New.
9859 (linux_wait_for_event_1, handle_extended_wait): Use it.
9860
9861 2010-04-30 Pedro Alves <pedro@codesourcery.com>
9862
9863 * linux-low.c (linux_kill_one_lwp, linux_kill)
9864 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
9865 (send_sigstop): Take an lwp_info as parameter instead. Queue a
9866 SIGSTOP even if the LWP is stopped.
9867 (send_sigstop_callback): New.
9868 (stop_all_lwps): Use send_sigstop_callback instead.
9869 (linux_resume_one_thread): Adjust.
9870 (proceed_one_lwp): Still proceed an LWP that the client has
9871 requested to stop, if we haven't reported it as stopped yet. Make
9872 sure that LWPs the client want stopped, have a pending SIGSTOP.
9873
9874 2010-04-26 Doug Evans <dje@google.com>
9875
9876 * server.c (handle_general_set): Make static.
9877
9878 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
9879 Print received char after testing for error/eof instead of before.
9880 (input_interrupt): Tweak comment.
9881
9882 2010-04-23 Doug Evans <dje@google.com>
9883
9884 * server.c (start_inferior): Print inferior argv if --debug.
9885
9886 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
9887
9888 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
9889 * nto-x86-low.c: Include server.h
9890
9891 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
9892
9893 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
9894 be consistent with other sources of this directory.
9895 (init_registers_amd64): Correct name of source file of this function
9896 in the comment.
9897
9898 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9899
9900 * configure.srv (x86_64-*-mingw*): New configuration for Windows
9901 64-bit executables.
9902
9903 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9904
9905 * win32-i386-low.c: Add 64-bit support.
9906 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
9907 (init_registers_amd64): Declare.
9908 (mappings): Add 64-bit version of array.
9909 (init_windows_x86): New function.
9910 (the_low_target): Change init_arch field to init_windows_x86.
9911
9912 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9913
9914 * win32-low.c: Adapt to support also 64-bit architecture.
9915 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
9916 (get_image_name): Use SIZE_T type for local variable `done'.
9917 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
9918 (toolhelp_get_dll_name): Idem.
9919 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
9920 Use uintptr_t typecast to avoid warning.
9921 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
9922 (handle_exception): Use phex_nz to avoid warning.
9923 (win32_wait): Remove unused local variable `process'.
9924
9925 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9926
9927 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
9928 `amd64-avx.o'.
9929
9930 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
9931
9932 * configure.ac: Use `ws2_32' library for srv_mingw.
9933 * configure: Regenerate.
9934 * gdbreplay.c: Include winsock2.h instead of winsock.h.
9935 * remote-utils.c: Likewise.
9936
9937 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
9938
9939 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
9940 if __x86_64__ is defined.
9941
9942 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
9943
9944 * configure: Regenerate.
9945
9946 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
9947
9948 * server.c (handle_query): Handle 'qGetTIBAddr' query.
9949 * target.h (target_ops): New get_tib_address field.
9950 * win32-low.h (win32_thread_info): Add thread_local_base field.
9951 * win32-low.c (child_add_thread): Add tlb argument.
9952 Set thread_local_base field to TLB.
9953 (get_child_debug_event): Adapt to child_add_thread change.
9954 (win32_get_tib_address): New function.
9955 (win32_target_ops): Set get_tib_address field to
9956 win32_get_tib_address.
9957 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
9958
9959 2010-04-12 Pedro Alves <pedro@codesourcery.com>
9960
9961 * linux-low.c (linux_mourn): Also remove the process.
9962 * server.c (handle_target_event): Don't remove the process here.
9963 * nto-low.c (nto_mourn): New.
9964 (nto_target_ops): Install it.
9965 * spu-low.c (spu_mourn): New.
9966 (spu_target_ops): Install it.
9967 * win32-low.c (win32_mourn): New.
9968 (win32_target_ops): Install it.
9969
9970 2010-04-12 Pedro Alves <pedro@codesourcery.com>
9971
9972 * server.h (buffer_xml_printf): Remove redundant `;'.
9973
9974 2010-04-12 Pedro Alves <pedro@codesourcery.com>
9975
9976 * regcache.c (set_register_cache): Invalidate regcaches before
9977 changing the register cache layout.
9978 (regcache_invalidate_one): Allow a NULL regcache.
9979 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
9980 regcaches before changing the register cache layout or the target
9981 regsets.
9982
9983 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
9984
9985 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
9986 variable warning on Linux/x86-64.
9987
9988 2010-04-11 Pedro Alves <pedro@codesourcery.com>
9989
9990 GDBserver disconnected tracing support.
9991
9992 * linux-low.c (linux_remove_process): Delete.
9993 (add_lwp): Don't set last_resume_kind here.
9994 (linux_kill): Use `mourn'.
9995 (linux_detach): Use `thread_db_detach', and `mourn'.
9996 (linux_mourn): New.
9997 (linux_attach_lwp_1): Adjust comment.
9998 (linux_attach): last_resume_kind moved the thread_info; adjust.
9999 (status_pending_p_callback): Adjust.
10000 (linux_wait_for_event_1): Adjust.
10001 (count_events_callback, select_singlestep_lwp_callback)
10002 (select_event_lwp_callback, cancel_breakpoints_callback)
10003 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
10004 (proceed_one_lwp): Adjust.
10005 (linux_async): Add debug output.
10006 (linux_thread_stopped): New.
10007 (linux_pause_all): New.
10008 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
10009 linux_pause_all.
10010 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
10011 (thread_db_free): Delete declaration.
10012 (thread_db_detach, thread_db_mourn): Declare.
10013 * thread-db.c (thread_db_init): Use thread_db_mourn.
10014 (thread_db_free): Delete, split in two.
10015 (disable_thread_event_reporting): New.
10016 (thread_db_detach): New.
10017 (thread_db_mourn): New.
10018
10019 * server.h (struct thread_info) <last_resume_kind>: New field.
10020 <attached>: Add comment.
10021 <gdb_detached>: New field.
10022 (handler_func): Change return type to int.
10023 (handle_serial_event, handle_target_event): Ditto.
10024 (gdb_connected): Declare.
10025 (tracing): Delete.
10026 (disconnected_tracing): Declare.
10027 (stop_tracing): Declare.
10028
10029 * server.c (handle_query) <qSupported>: Report support for
10030 disconnected tracing.
10031 (queue_stop_reply_callback): Account for running threads.
10032 (gdb_wants_thread_stopped): New.
10033 (gdb_wants_all_threads_stopped): New.
10034 (gdb_reattached_process): New.
10035 (handle_status): Clear the `gdb_detached' flag of all processes.
10036 In all-stop, stop all threads.
10037 (main): Be sure to leave tfind mode. Handle disconnected tracing.
10038 (process_serial_event): If the remote connection breaks, or if an
10039 exit was forced with "monitor exit", force an event loop exit.
10040 Handle disconnected tracing on detach.
10041 (handle_serial_event): Adjust.
10042 (handle_target_event): If GDB isn't connected, forward events back
10043 to the inferior, unless the last process exited, in which case,
10044 exit gdbserver. Adjust interface.
10045
10046 * remote-utils.c (remote_open): Don't block in accept. Instead
10047 register an event loop source on the listen socket file
10048 descriptor. Refactor bits into ...
10049 (listen_desc): ... this new global.
10050 (gdb_connected): ... this new function.
10051 (enable_async_notification): ... this new function.
10052 (handle_accept_event): ... this new function.
10053 (remote_close): Clear remote_desc.
10054
10055 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
10056
10057 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
10058 New fields.
10059 (mourn_inferior): Define.
10060 (target_process_qsupported): Avoid the dangling else problem.
10061 (thread_stopped): Define.
10062 (pause_all): Define.
10063 (target_waitstatus_to_string): Declare.
10064 * target.c (target_waitstatus_to_string): New.
10065
10066 * tracepoint.c (tracing): Make extern.
10067 (disconnected_tracing): New.
10068 (stop_tracing): Make extern. Handle tracing stops due to GDB
10069 disconnecting.
10070 (cmd_qtdisconnected): New.
10071 (cmd_qtstatus): Report disconnected tracing status in trace reply.
10072 (handle_tracepoint_general_set): Handle QTDisconnected.
10073
10074 * event-loop.c (event_handler_func): Change return type to int.
10075 (process_event): Bail out if the event handler wants the event
10076 loop to stop.
10077 (handle_file_event): Ditto.
10078 (start_event_loop): Bail out if the event handler wants the event
10079 loop to stop.
10080
10081 * nto-low.c (nto_target_ops): Adjust.
10082 * spu-low.c (spu_wait): Don't remove the process here.
10083 (spu_target_ops): Adjust.
10084 * win32-low.c (win32_wait): Don't remove the process here.
10085 (win32_target_ops): Adjust.
10086
10087 2010-04-11 Pedro Alves <pedro@codesourcery.com>
10088
10089 * regcache.c (realloc_register_cache): Invalidate inferior's
10090 regcache before recreating it.
10091
10092 2010-04-09 Pedro Alves <pedro@codesourcery.com>
10093
10094 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
10095
10096 2010-04-09 Stan Shebs <stan@codesourcery.com>
10097 Pedro Alves <pedro@codesourcery.com>
10098
10099 * server.h (LONGEST): New.
10100 (struct thread_info) <while_stepping>: New field.
10101 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
10102 Declare.
10103 (initialize_tracepoint, handle_tracepoint_general_set)
10104 (handle_tracepoint_query, tracepoint_finished_step)
10105 (tracepoint_was_hit, release_while_stepping_state_list):
10106 (current_traceframe): Declare.
10107 * server.c (handle_general_set): Handle tracepoint packets.
10108 (read_memory): New.
10109 (write_memory): New.
10110 (handle_search_memory_1): Use read_memory.
10111 (handle_query): Report support for conditional tracepoints, trace
10112 state variables, and tracepoint sources. Handle tracepoint
10113 queries.
10114 (main): Initialize the tracepoints module.
10115 (process_serial_event): Handle traceframe reads/writes.
10116
10117 * linux-low.c (handle_tracepoints): New.
10118 (linux_wait_1): Call it.
10119 (linux_resume_one_lwp): Handle while-stepping.
10120 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
10121 (linux_target_ops): Install them.
10122 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
10123 New field.
10124 * linux-x86-low.c (x86_supports_tracepoints): New.
10125 (the_low_target). Install it.
10126
10127 * mem-break.h (delete_breakpoint): Declare.
10128 * mem-break.c (delete_breakpoint): Make external.
10129
10130 * target.h (struct target_ops): Add `supports_tracepoints',
10131 `read_pc', and `write_pc' fields.
10132 (target_supports_tracepoints): Define.
10133 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
10134 (phex_nz): New.
10135
10136 * regcache.h (struct regcache) <registers_owned>: New field.
10137 (init_register_cache, regcache_cpy): Declare.
10138 (regcache_read_pc, regcache_write_pc): Declare.
10139 (register_cache_size): Declare.
10140 (supply_regblock): Declare.
10141 * regcache.c (init_register_cache): New.
10142 (new_register_cache): Use it.
10143 (regcache_cpy): New.
10144 (register_cache_size): New.
10145 (supply_regblock): New.
10146 (regcache_read_pc, regcache_write_pc): New.
10147
10148 * tracepoint.c: New.
10149
10150 * Makefile.in (OBS): Add tracepoint.o.
10151 (tracepoint.o): New rule.
10152
10153 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
10154
10155 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
10156 (i386-mmx.o): New.
10157 (i386-mmx.c): Likewise.
10158 (i386-mmx-linux.o): Likewise.
10159 (i386-mmx-linux.c): Likewise.
10160
10161 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
10162 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
10163 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
10164 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
10165
10166 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
10167 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
10168 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
10169
10170 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
10171
10172 * Makefile.in (clean): Updated.
10173 (i386-avx.o): New.
10174 (i386-avx.c): Likewise.
10175 (i386-avx-linux.o): Likewise.
10176 (i386-avx-linux.c): Likewise.
10177 (amd64-avx.o): Likewise.
10178 (amd64-avx.c): Likewise.
10179 (amd64-avx-linux.o): Likewise.
10180 (amd64-avx-linux.c): Likewise.
10181
10182 * configure.srv (srv_i386_regobj): Add i386-avx.o.
10183 (srv_i386_linux_regobj): Add i386-avx-linux.o.
10184 (srv_amd64_regobj): Add amd64-avx.o.
10185 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
10186 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
10187 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
10188 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
10189 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
10190 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
10191 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
10192
10193 * i387-fp.c: Include "i386-xstate.h".
10194 (i387_xsave): New.
10195 (i387_cache_to_xsave): Likewise.
10196 (i387_xsave_to_cache): Likewise.
10197 (x86_xcr0): Likewise.
10198
10199 * i387-fp.h (i387_cache_to_xsave): Likewise.
10200 (i387_xsave_to_cache): Likewise.
10201 (x86_xcr0): Likewise.
10202
10203 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
10204 * linux-crisv32-low.c (target_regsets): Likewise.
10205 * linux-m68k-low.c (target_regsets): Likewise.
10206 * linux-mips-low.c (target_regsets): Likewise.
10207 * linux-ppc-low.c (target_regsets): Likewise.
10208 * linux-s390-low.c (target_regsets): Likewise.
10209 * linux-sh-low.c (target_regsets): Likewise.
10210 * linux-sparc-low.c (target_regsets): Likewise.
10211 * linux-xtensa-low.c (target_regsets): Likewise.
10212
10213 * linux-low.c: Include <sys/uio.h>.
10214 (regsets_fetch_inferior_registers): Support nt_type.
10215 (regsets_store_inferior_registers): Likewise.
10216 (linux_process_qsupported): New.
10217 (linux_target_ops): Add linux_process_qsupported.
10218
10219 * linux-low.h (regset_info): Add nt_type.
10220 (linux_target_ops): Add process_qsupported.
10221
10222 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
10223 and <sys/uio.h>.
10224 (init_registers_i386_avx_linux): New.
10225 (init_registers_amd64_avx_linux): Likewise.
10226 (xmltarget_i386_linux_no_xml): Likewise.
10227 (xmltarget_amd64_linux_no_xml): Likewise.
10228 (PTRACE_GETREGSET): Likewise.
10229 (PTRACE_SETREGSET): Likewise.
10230 (x86_fill_xstateregset): Likewise.
10231 (x86_store_xstateregset): Likewise.
10232 (use_xml): Likewise.
10233 (x86_linux_update_xmltarget): Likewise.
10234 (x86_linux_process_qsupported): Likewise.
10235 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
10236 (x86_arch_setup): Don't call init_registers_amd64_linux nor
10237 init_registers_i386_linux here. Call
10238 x86_linux_update_xmltarget.
10239 (the_low_target): Add x86_linux_process_qsupported.
10240
10241 * server.c (handle_query): Call target_process_qsupported.
10242
10243 * target.h (target_ops): Add process_qsupported.
10244 (target_process_qsupported): New.
10245
10246 2010-04-03 Pedro Alves <pedro@codesourcery.com>
10247
10248 * inferiors.c (add_thread): Set last_status kind to
10249 TARGET_WAITKIND_IGNORE.
10250 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
10251 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
10252 (linux_wait_1): Move `thread' local definition to block that uses
10253 it. Don't NULL initialize `event_child'.
10254 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
10255 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
10256 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
10257
10258 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10259
10260 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
10261 an extended waitstatus, or by a watchpoint.
10262 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
10263 thread was stepping or has been stopped by a watchpoint.
10264
10265 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10266
10267 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
10268 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
10269 of another, then delete the previous, and validate all
10270 breakpoints.
10271 (validate_inserted_breakpoint): New.
10272 (delete_disabled_breakpoints): New.
10273 (validate_breakpoints): New.
10274 (check_mem_read): Validate breakpoints before trusting their
10275 shadow. Delete disabled breakpoints.
10276 (check_mem_write): Validate breakpoints before trusting they
10277 should be inserted. Delete disabled breakpoints.
10278 * mem-break.h (validate_breakpoints):
10279 * server.c (handle_query): Validate breakpoints when we see a
10280 qSymbol query.
10281
10282 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10283
10284 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
10285 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
10286 if we could tell there's a GDB breakpoint at stop_pc.
10287 (need_step_over_p): Don't do a step over if we find a GDB
10288 breakpoint at the resume PC.
10289
10290 * mem-break.c (struct raw_breakpoint): New.
10291 (enum bkpt_type): New type `gdb_breakpoint'.
10292 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
10293 fields. New field `raw'.
10294 (find_raw_breakpoint_at): New.
10295 (set_raw_breakpoint_at): Handle refcounting. Create a raw
10296 breakpoint instead.
10297 (set_breakpoint_at): Adjust.
10298 (delete_raw_breakpoint): New.
10299 (release_breakpoint): New.
10300 (delete_breakpoint): Rename to...
10301 (delete_breakpoint_1): ... this. Add proc parameter. Use
10302 release_breakpoint. Return ENOENT.
10303 (delete_breakpoint): Reimplement.
10304 (find_breakpoint_at): Delete.
10305 (find_gdb_breakpoint_at): New.
10306 (delete_breakpoint_at): Delete.
10307 (set_gdb_breakpoint_at): New.
10308 (delete_gdb_breakpoint_at): New.
10309 (gdb_breakpoint_here): New.
10310 (set_reinsert_breakpoint): Use release_breakpoint.
10311 (uninsert_breakpoint): Rename to ...
10312 (uninsert_raw_breakpoint): ... this.
10313 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
10314 (reinsert_raw_breakpoint): Change parameter type to
10315 raw_breakpoint.
10316 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
10317 instead.
10318 (check_breakpoints): Adjust. Use release_breakpoint.
10319 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
10320 (breakpoint_inserted_here): Ditto.
10321 (check_mem_read): Adjust to iterate over raw breakpoints instead.
10322 Don't trust the breakpoint's shadow if it is not inserted.
10323 (check_mem_write): Adjust to iterate over raw breakpoints instead.
10324 (delete_all_breakpoints): Adjust.
10325 (free_all_breakpoints): Mark all breakpoints as uninserted, and
10326 use delete_breakpoint_1.
10327
10328 * mem-break.h (breakpoints_supported): Delete declaration.
10329 (set_gdb_breakpoint_at): Declare.
10330 (gdb_breakpoint_here): Declare.
10331 (delete_breakpoint_at): Delete.
10332 (delete_gdb_breakpoint_at): Declare.
10333
10334 * server.h (struct raw_breakpoint): Forward declare.
10335 (struct process_info): New field `raw_breakpoints'.
10336
10337 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
10338 breakpoints.
10339
10340 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10341
10342 * linux-low.c (status_pending_p_callback): Fix comment.
10343 (linux_wait_for_event_1): Move most of the internal breakpoint
10344 handling from here...
10345 (linux_wait_1): ... to here.
10346 (count_events_callback): New.
10347 (select_singlestep_lwp_callback): New.
10348 (select_event_lwp_callback): New.
10349 (cancel_breakpoints_callback): New.
10350 (select_event_lwp): New.
10351 (linux_wait_1): Simplify internal breakpoint handling. Give equal
10352 priority to all LWPs that have had events that should be reported
10353 to the client. Cancel breakpoints when about to reporting the
10354 event to the client, not while stopping lwps. No longer cancel
10355 finished single-steps here.
10356 (cancel_finished_single_step): Delete.
10357 (cancel_finished_single_steps): Delete.
10358
10359 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10360
10361 * mem-break.c (enum bkpt_type): New.
10362 (struct breakpoint): New field `type'.
10363 (set_breakpoint_at): Change return type to struct breakpoint
10364 pointer. Set type to `other_breakpoint' by default.
10365 (delete_breakpoint): Rewrite, supporting more than one breakpoint
10366 in the breakpoint list.
10367 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
10368 (reinsert_breakpoint): Rename to ...
10369 (reinsert_raw_breakpoint): ... this.
10370 (reinsert_breakpoints_at): Adjust.
10371 * mem-break.h (struct breakpoint): Declare.
10372 (set_breakpoint_at): Change return type to struct breakpoint
10373 pointer.
10374
10375 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10376
10377 * server.c (handle_query): Assign, not compare.
10378
10379 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10380
10381 Teach linux gdbserver to step-over-breakpoints.
10382
10383 * linux-low.c (can_hardware_single_step): New.
10384 (supports_breakpoints): New.
10385 (handle_extended_wait): If stopping threads, read the stop pc of
10386 the new cloned LWP.
10387 (get_pc): New.
10388 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
10389 low target doesn't support retrieving the PC.
10390 (add_lwp): Set last_resume_kind to resume_continue.
10391 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
10392 (linux_attach): Don't clear stop_expected. Set the lwp's
10393 last_resume_kind to resume_stop.
10394 (linux_detach_one_lwp): Don't check for removed breakpoints.
10395 (check_removed_breakpoint): Delete.
10396 (status_pending_p): Rename to ...
10397 (status_pending_p_callback): ... this. Don't check for removed
10398 breakpoints. Don't consider threads that are stopped from GDB's
10399 perspective.
10400 (linux_wait_for_lwp): Always read the stop_pc here.
10401 (cancel_breakpoint): New.
10402 (step_over_bkpt): New global.
10403 (linux_wait_for_event_1): Implement stepping over breakpoints.
10404 (gdb_wants_lwp_stopped): New.
10405 (gdb_wants_all_stopped): New.
10406 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
10407 single-step traps here. Store the thread's last reported target
10408 wait status.
10409 (send_sigstop): Don't clear stop_expected. Always set it,
10410 instead.
10411 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
10412 (cancel_finished_single_step): New.
10413 (cancel_finished_single_steps): New.
10414 (wait_for_sigstop): Don't cancel finished single-step traps here.
10415 (linux_resume_one_lwp): Don't check for removed breakpoints.
10416 Don't set `step' on non-hardware step archs.
10417 (linux_set_resume_request): Ignore resume_stop requests if already
10418 stopping or stopped. Set the lwp's last_resume_kind.
10419 (resume_status_pending_p): Don't check for removed breakpoints.
10420 (need_step_over_p): New.
10421 (start_step_over): New.
10422 (finish_step_over): New.
10423 (linux_resume_one_thread): Always queue a sigstop for resume_stop
10424 requests. Clear the thread's last reported target waitstatus.
10425 Don't use the `suspended' flag. Don't consider pending breakpoints.
10426 (linux_resume): Start a step-over if necessary.
10427 (proceed_one_lwp): New.
10428 (proceed_all_lwps): New.
10429 (unstop_all_lwps): New.
10430 * linux-low.h (struct lwp_info): Rewrite comment for the
10431 `suspended' flag. Add the `stop_pc' field. Delete the
10432 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
10433 Add `'last_resume_kind' and `need_step_over' fields.
10434 * inferiors.c (struct thread_info): Delete, moved elsewhere.
10435 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
10436 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
10437 (set_raw_breakpoint_at): New.
10438 (set_breakpoint_at): Rewrite to use it.
10439 (reinsert_breakpoint_handler): Delete.
10440 (set_reinsert_breakpoint): New.
10441 (reinsert_breakpoint_by_bp): Delete.
10442 (delete_reinsert_breakpoints): New.
10443 (uninsert_breakpoint): Rewrite.
10444 (uninsert_breakpoints_at): New.
10445 (reinsert_breakpoint): Rewrite.
10446 (reinsert_breakpoints_at): New.
10447 (check_breakpoints): Rewrite.
10448 (breakpoint_here): New.
10449 (breakpoint_inserted_here): New.
10450 (check_mem_read): Adjust.
10451 * mem-break.h (breakpoints_supported, breakpoint_here)
10452 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
10453 (reinsert_breakpoint_by_bp): Delete declaration.
10454 (delete_reinsert_breakpoints): Declare.
10455 (reinsert_breakpoint): Delete declaration.
10456 (reinsert_breakpoints_at): Declare.
10457 (uninsert_breakpoint): Delete declaration.
10458 (uninsert_breakpoints_at): Declare.
10459 (check_breakpoints): Adjust prototype.
10460 * server.h: Adjust include order.
10461 (struct thread_info): Declare here. Add a `last_status' field.
10462
10463 2010-03-23 Michael Snyder <msnyder@vmware.com>
10464
10465 * server.c (crc32): New function.
10466 (handle_query): Add handling for 'qCRC:' request.
10467
10468 2010-03-23 Pedro Alves <pedro@codesourcery.com>
10469
10470 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
10471 lwp had been stopped by a watchpoint.
10472
10473 2010-03-16 Pedro Alves <pedro@codesourcery.com>
10474
10475 * server.h (internal_error): Declare.
10476 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
10477 * utils.c (internal_error): New function.
10478
10479 2010-03-15 Andreas Schwab <schwab@redhat.com>
10480
10481 * configure.srv: Fix typo setting srv_regobj.
10482
10483 2010-03-15 Pedro Alves <pedro@codesourcery.com>
10484
10485 * linux-low.c (fetch_register): Avoid passing a non string literal
10486 format to `error'.
10487 (usr_store_inferior_registers): Ditto.
10488
10489 2010-03-14 Pedro Alves <pedro@codesourcery.com>
10490
10491 * linux-low.c (linux_write_memory): Bail out early if peeking
10492 memory failed.
10493
10494 2010-03-14 Pedro Alves <pedro@codesourcery.com>
10495
10496 * linux-low.h (struct lwp_info): New fields
10497 `stopped_by_watchpoint' and `stopped_data_address'.
10498 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
10499 here, and cache them in the lwp object.
10500 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
10501 directly.
10502 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
10503 field.
10504 (linux_stopped_by_watchpoint): Rewrite.
10505 (linux_stopped_data_address): Rewrite.
10506
10507 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
10508
10509 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
10510 switching the current inferior, not before.
10511
10512 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
10513
10514 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
10515 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
10516 i386-linux.c and amd64-linux.c.
10517 (reg-i386.o): Removed.
10518 (reg-i386.c): Likewise.
10519 (reg-i386-linux.o): Likewise.
10520 (reg-i386-linux.c): Likewise.
10521 (reg-x86-64.o): Likewise.
10522 (reg-x86-64.c): Likewise.
10523 (reg-x86-64-linux.o): Likewise.
10524 (reg-x86-64-linux.c): Likewise.
10525 (i386.o): New.
10526 (i386.c): Likewise.
10527 (i386-linux.o): Likewise.
10528 (i386-linux.c): Likewise.
10529 (amd64.o): Likewise.
10530 (amd64.c): Likewise.
10531 (amd64-linux.o): Likewise.
10532 (amd64-linux.c): Likewise.
10533
10534 * configure.srv (srv_i386_regobj): New.
10535 (srv_i386_linux_regobj): Likewise.
10536 (srv_amd64_regobj): Likewise.
10537 (srv_amd64_linux_regobj): Likewise.
10538 (srv_i386_32bit_xmlfiles): Likewise.
10539 (srv_i386_64bit_xmlfiles): Likewise.
10540 (srv_i386_xmlfiles): Likewise.
10541 (srv_amd64_xmlfiles): Likewise.
10542 (srv_i386_linux_xmlfiles): Likewise.
10543 (srv_amd64_linux_xmlfiles): Likewise.
10544 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
10545 srv_xmlfiles to $srv_i386_xmlfiles.
10546 (i[34567]86-*-mingw32ce*): Likewise.
10547 (i[34567]86-*-mingw*): Likewise.
10548 (i[34567]86-*-nto*): Likewise.
10549 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
10550 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
10551 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
10552 (x86_64-*-linux*): Likewise.
10553
10554 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
10555 (init_registers_amd64_linux): New.
10556 (x86_arch_setup): Replace init_registers_x86_64_linux with
10557 init_registers_amd64_linux.
10558
10559 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
10560
10561 * configure.ac: Check for libdl. If it is not available link against
10562 static libthread_db.
10563 * configure: Regenerate.
10564
10565 2010-02-22 Pedro Alves <pedro@codesourcery.com>
10566
10567 PR9605
10568
10569 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
10570 handing a read watchpoint.
10571 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
10572
10573 2010-02-12 Doug Evans <dje@google.com>
10574
10575 * linux-low.c (linux_supports_tracefork_flag): Document.
10576 (linux_look_up_symbols): Add comment.
10577
10578 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
10579
10580 * regcache.c (supply_register): Clear regcache if buf is NULL.
10581
10582 2010-02-02 Nicolas Roche <roche@sourceware.org>
10583 Joel Brobecker <brobecker@adacore.com>
10584
10585 * inferiors.c (find_inferior): Add function documentation.
10586 (unloaded_dll): Handle the case where the unloaded dll has not
10587 been previously registered in the dll list.
10588
10589 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10590
10591 * linux-arm-low.c (thumb_breakpoint_len): Delete.
10592 (thumb2_breakpoint): New.
10593 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
10594
10595 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10596
10597 * linux-low.c (get_stop_pc): Check for SIGTRAP.
10598 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
10599 breakpoints.
10600
10601 2010-01-21 Pedro Alves <pedro@codesourcery.com>
10602
10603 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
10604
10605 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10606
10607 * linux-s390-low.c (s390_collect_ptrace_register)
10608 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
10609
10610 2010-01-21 Doug Evans <dje@google.com>
10611
10612 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
10613 (PTRACE_ARG4_TYPE): New macro.
10614 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
10615 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
10616 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
10617 (usr_store_inferior_registers): Ditto.
10618 (linux_read_memory, linux_write_memory): Ditto.
10619 (linux_test_for_tracefork): Ditto.
10620
10621 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
10622 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
10623
10624 2010-01-21 Pedro Alves <pedro@codesourcery.com>
10625
10626 * proc-service.c (ps_lgetregs): Don't refetch registers from the
10627 target.
10628
10629 2010-01-21 Pedro Alves <pedro@codesourcery.com>
10630
10631 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
10632 prototype to take a regcache. Adjust.
10633
10634 2010-01-20 Pedro Alves <pedro@codesourcery.com>
10635
10636 * regcache.h (struct thread_info): Forward declare.
10637 (struct regcache): New.
10638 (new_register_cache): Adjust prototype.
10639 (get_thread_regcache): Declare.
10640 (free_register_cache): Adjust prototype.
10641 (registers_to_string, registers_from_string): Ditto.
10642 (supply_register, supply_register_by_name, collect_register)
10643 (collect_register_as_string, collect_register_by_name): Ditto.
10644 * regcache.c (struct inferior_regcache_data): Delete.
10645 (get_regcache): Rename to ...
10646 (get_thread_regcache): ... this. Adjust. Switch inferior before
10647 fetching registers.
10648 (regcache_invalidate_one): Adjust.
10649 (regcache_invalidate): Fix prototype.
10650 (new_register_cache): Return the new register cache.
10651 (free_register_cache): Change prototype.
10652 (realloc_register_cache): Adjust.
10653 (registers_to_string): Change prototype to take a regcache. Adjust.
10654 (registers_from_string): Ditto.
10655 (register_data): Ditto.
10656 (supply_register): Ditto.
10657 (supply_register_by_name): Ditto.
10658 (collect_register): Ditto.
10659 (collect_register_as_string): Ditto.
10660 (collect_register_by_name): Ditto.
10661 * server.c (process_serial_event): Adjust.
10662 * linux-low.h (regset_fill_func, regset_store_func): Change
10663 prototype.
10664 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
10665 Change prototype.
10666 * linux-low.c (get_stop_pc): Adjust.
10667 (check_removed_breakpoint): Adjust.
10668 (linux_wait_for_event): Adjust.
10669 (linux_resume_one_lwp): Adjust.
10670 (fetch_register): Add regcache parameter. Adjust.
10671 (usr_store_inferior_registers): Ditto.
10672 (regsets_fetch_inferior_registers): Ditto.
10673 (regsets_store_inferior_registers): Ditto.
10674 (linux_fetch_registers, linux_store_registers): Ditto.
10675 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
10676 regcache. Adjust.
10677 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
10678 Ditto.
10679 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
10680 prototype to take a regcache.
10681 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
10682 * remote-utils.c (convert_ascii_to_int, outreg)
10683 (prepare_resume_reply): Change prototype to take a regcache.
10684 Adjust.
10685 * target.h (struct target_ops) <fetch_registers, store_registers>:
10686 Change prototype to take a regcache.
10687 (fetch_inferior_registers, store_inferior_registers): Change
10688 prototype to take a regcache. Adjust.
10689 * proc-service.c (ps_lgetregs): Adjust.
10690 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
10691 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
10692 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
10693 take a regcache. Adjust.
10694 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
10695 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
10696 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
10697 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
10698 * linux-cris-low.c (cris_get_pc, cris_set_pc)
10699 (cris_cannot_fetch_register):
10700 (cris_breakpoint_at): Change prototype to take a regcache.
10701 Adjust.
10702 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
10703 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
10704 to take a regcache. Adjust.
10705 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
10706 Adjust.
10707 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
10708 take a regcache. Adjust.
10709 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
10710 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
10711 (m68k_set_pc): Change prototype to take a regcache. Adjust.
10712 * linux-mips-low.c (mips_get_pc):
10713 (mips_set_pc): Change prototype to take a regcache. Adjust.
10714 (mips_reinsert_addr): Adjust.
10715 (mips_collect_register): Change prototype to take a regcache.
10716 Adjust.
10717 (mips_supply_register):
10718 (mips_collect_register_32bit, mips_supply_register_32bit)
10719 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10720 (mips_store_fpregset): Ditto.
10721 * linux-ppc-low.c (ppc_supply_ptrace_register)
10722 (ppc_supply_ptrace_register): Ditto.
10723 (parse_spufs_run): Adjust.
10724 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
10725 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
10726 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
10727 take a regcache. Adjust.
10728 * linux-s390-low.c (s390_collect_ptrace_register)
10729 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
10730 (s390_set_pc): Change prototype to take a regcache. Adjust.
10731 (s390_arch_setup): Adjust.
10732 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
10733 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
10734 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10735 (sparc_fill_gregset, sparc_store_gregset_from_stack)
10736 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
10737 regcache. Adjust.
10738 (sparc_breakpoint_at): Adjust.
10739 * linux-xtensa-low.c (xtensa_fill_gregset):
10740 (xtensa_store_gregset):
10741 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
10742 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
10743 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
10744 prototype to take a regcache. Adjust.
10745 * win32-arm-low.c (arm_fetch_inferior_register)
10746 (arm_store_inferior_register): Change prototype to take a
10747 regcache. Adjust.
10748 * win32-i386-low.c (i386_fetch_inferior_register)
10749 (i386_store_inferior_register): Change prototype to take a
10750 regcache. Adjust.
10751 * win32-low.c (child_fetch_inferior_registers)
10752 (child_store_inferior_registers): Change prototype to take a
10753 regcache. Adjust.
10754 (win32_wait): Adjust.
10755 (win32_fetch_inferior_registers): Change prototype to take a
10756 regcache. Adjust.
10757 (win32_store_inferior_registers): Adjust.
10758 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
10759 store_inferior_register>: Change prototype to take a regcache.
10760
10761 2010-01-20 Doug Evans <dje@google.com>
10762
10763 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
10764 #ifdef.
10765 (linux_wait_for_event1, linux_init_signals): Ditto.
10766 (W_STOPCODE): Provide definition if missing.
10767
10768 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
10769
10770 * linux-low.c (linux_core_of_thread): New.
10771 (compare_ints, show_process, list_threads): New.
10772 (linux_qxfer_osdata): Report threads and cores.
10773 (linux_target_op): Register linux_core_of_thread.
10774 * remote-utils.c (prepare_resume_reply): Report the core.
10775 (buffer_xml_printf): Support %d specifier.
10776 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
10777 New.
10778 (handle_query): Handle qXfer:threads. Announce availability
10779 thereof.
10780 * target.h (struct target_ops): New field core_of_thread.
10781
10782 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
10783
10784 * Makefile.in (clean): Remove new generated files.
10785 (reg-s390.o, reg-s390.c): Remove rules.
10786 (reg-s390x.o, reg-s390x.c): Likewise.
10787 (s390-linux32.o, s390-linux32.c): Add rules.
10788 (s390-linux64.o, s390-linux64.c): Likewise.
10789 (s390x-linux64.o, s390x-linux64.c): Likewise.
10790 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
10791 * linux-s390-low.c: Include <elf.h>.
10792 (HWCAP_S390_HIGH_GPRS): Define if undefined.
10793 (init_registers_s390): Remove prototype.
10794 (init_registers_s390x): Likewise.
10795 (init_registers_s390_linux32): Add prototype.
10796 (init_registers_s390_linux64): Likewise.
10797 (init_registers_s390x_linux64): Likewise.
10798 (s390_num_regs_3264): New define.
10799 (s390_regmap_3264): New global variable.
10800 (s390_cannot_fetch_register): Remove obsolete check.
10801 (s390_cannot_store_register): Likewise.
10802 (s390_collect_ptrace_register): Handle upper/lower register halves.
10803 (s390_supply_ptrace_register): Likewise.
10804 (s390_fill_gregset): Update to register number changes.
10805 (s390_get_hwcap): New routine.
10806 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
10807 Install appropriate regmap and register set.
10808
10809 2010-01-01 Joel Brobecker <brobecker@adacore.com>
10810
10811 * server.c (gdbserver_version): Update copyright year to 2010.
10812 * gdbreplay.c (gdbreplay_version): Likewise.
10813
10814 2009-12-28 Doug Evans <dje@google.com>
10815
10816 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
10817 elf/external.h. Include <elf.h> instead but only if necessary.
10818
10819 2009-12-28 Pedro Alves <pedro@codesourcery.com>
10820
10821 * linux-low.c (linux_remove_process): Remove `detaching'
10822 parameter. Don't release/detach from thread_db here.
10823 (linux_kill): Release/detach from thread_db here, ...
10824 (linux_detach): ... and here, before actually detaching.
10825 (linux_wait_1): ... and here, when a process exits.
10826 * thread-db.c (any_thread_of): New.
10827 (thread_db_free): Switch the current inferior to a thread of the
10828 passed in process.
10829
10830 2009-12-21 Doug Evans <dje@google.com>
10831
10832 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
10833
10834 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
10835 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
10836 warning ifndef __NR_tkill. Move setting of errno there too.
10837 Delete unnecessary resetting of errno after syscall.
10838 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
10839
10840 * configure.ac: Check for dladdr.
10841 * config.in: Regenerate.
10842 * configure: Regenerate.
10843 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
10844 (try_thread_db_load): Update.
10845
10846 * linux-low.c (my_waitpid): Delete unnecessary prototype.
10847
10848 2009-12-18 Doug Evans <dje@google.com>
10849
10850 * event-loop.c: Include unistd.h if it exists.
10851
10852 * linux-low.c (my_waitpid): Move definition away from being in
10853 between linux_tracefork_child/linux_test_for_tracefork.
10854
10855 * gdb_proc_service.h (psaddr_t): Fix type.
10856 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
10857 signature to match glibc.
10858
10859 2009-12-16 Doug Evans <dje@google.com>
10860
10861 * linux-low.c (linux_read_memory): Fix argument to read.
10862
10863 2009-11-26 Pedro Alves <pedro@codesourcery.com>
10864
10865 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
10866 events, don't leave current_inferior pointing at null.
10867
10868 2009-11-26 Pedro Alves <pedro@codesourcery.com>
10869
10870 * win32-low.c (LOG): Delete.
10871 (OUTMSG): Output to stderr.
10872 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
10873 on compile time LOG macro.
10874 (win32_wait): Fix debug output.
10875
10876 2009-11-26 Pedro Alves <pedro@codesourcery.com>
10877
10878 * win32-low.c (win32_add_one_solib): If the dll name is
10879 "ntdll.dll", prepend the system directory to the dll path.
10880
10881 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
10882
10883 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
10884
10885 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
10886 Vladimir Prus <vladimir@codesourcery.com>
10887
10888 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
10889 * configure.ac: Check for __mcoldfire__ and set
10890 gdb_cv_m68k_is_coldfire.
10891 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
10892 reg-cf.o and reg-m68k.o.
10893 * configure: Regenerated.
10894
10895 2009-11-16 Pedro Alves <pedro@codesourcery.com>
10896
10897 * linux-low.c (linux_remove_process): Add `detaching' parameter.
10898 Pass it to thread_db_free.
10899 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
10900 proper `detaching' argument to linux_remove_process.
10901 * linux-low.h (thread_db_free): Add `detaching' parameter.
10902 * thread-db.c (thread_db_init): Pass false as `detaching' argument
10903 to thread_db_free.
10904 (thread_db_free): Add `detaching' parameter. Only
10905 call td_ta_clear_event if detaching from process.
10906
10907 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
10908
10909 * thread-db.c (thread_db_free): Fix typo.
10910
10911 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
10912
10913 PR gdb/10838
10914 * thread-db.c (thread_db_free): Call td_ta_clear_event.
10915
10916 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
10917
10918 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
10919 with an i686 compiler.
10920 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
10921 needed.
10922 * configure: Rebuilt.
10923
10924 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
10925
10926 PR gdb/10783
10927
10928 * server.c (handle_search_memory_1): Correct read_addr initialization
10929 in loop for searching subsequent chunks.
10930
10931 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
10932
10933 * configure.ac: New --with-libthread-db option.
10934 * thread-db.c: Allow direct dependence on libthread_db.
10935 (thread_db_free): Adjust.
10936 * config.in: Regenerate.
10937 * configure: Likewise.
10938
10939 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
10940
10941 PR gdb/10757
10942 * thread-db.c (attach_thread): New function.
10943 (maybe_attach_thread): Return success/failure.
10944 (find_new_threads_callback): Adjust.
10945 (thread_db_find_new_threads): Loop until no new threads.
10946
10947 2009-10-13 Pedro Alves <pedro@codesourcery.com>
10948
10949 * proc-service.c (ps_lgetregs): Formatting.
10950
10951 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
10952
10953 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
10954 * configure.ac: Adjust.
10955 * linux-low.h (struct process_info_private): Move members to struct
10956 thread_db.
10957 (thread_db_free, thread_db_handle_monitor_command): New prototype.
10958 * linux-low.c (linux_remove_process): Adjust.
10959 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
10960 * server.c (handle_query): Move code ...
10961 (handle_monitor_command): ... here. New function.
10962 * target.h (struct target_ops): New member.
10963 * thread-db.c (struct thread_db): New.
10964 (libthread_db_search_path): New variable.
10965 (thread_db_create_event, thread_db_enable_reporting)
10966 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
10967 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
10968 (try_thread_db_load_1, dladdr_to_soname): New functions.
10969 (try_thread_db_load, thread_db_load_search): New functions.
10970 (thread_db_init): Search for libthread_db.
10971 (thread_db_free): New function.
10972 (thread_db_handle_monitor_command): Likewise.
10973 * config.in: Regenerate.
10974 * configure: Regenerate.
10975
10976 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
10977
10978 * spu-low.c (spu_kill): Wait for inferior to terminate.
10979 Call clear_inferiors.
10980 (spu_detach): Call clear_inferiors.
10981
10982 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10983
10984 * aclocal.m4: Regenerate.
10985 * config.in: Likewise.
10986 * configure: Likewise.
10987
10988 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10989
10990 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
10991 (parse_spufs_run): New function.
10992 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
10993 (ppc_breakpoint_at): Handle SPU breakpoints.
10994
10995 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10996
10997 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
10998 (SPUFS_MAGIC): Define.
10999 (spu_enumerate_spu_ids): New function.
11000 (linux_qxfer_spu): New function.
11001 (linux_target_ops): Install linux_qxfer_spu.
11002
11003 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11004
11005 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
11006 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
11007 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
11008 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
11009 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
11010 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
11011 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
11012 (init_registers_powerpc_cell32l): Add prototype.
11013 (init_registers_powerpc_cell64l): Likewise.
11014 (ppc_arch_setup): Detect Cell/B.E. architecture.
11015
11016 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11017
11018 * Makefile.in (datarootdir): New variable.
11019
11020 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11021
11022 * linux-low.c (linux_write_memory): Update debugging output.
11023 * Makefile.in (clean): Add new descriptions.
11024 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
11025 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
11026 * configure.srv: Add new files for arm*-*-linux*.
11027 * linux-arm-low.c: Add new declarations.
11028 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
11029 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
11030 (HWCAP_VFPv3D16): New.
11031 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
11032 instead of __IWMMXT__.
11033 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
11034 (arm_arch_setup): New.
11035 (target_regsets): Remove #ifdef. Add VFP regset.
11036 (the_low_target): Use arm_arch_setup.
11037
11038 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11039
11040 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
11041 the main thread again.
11042
11043 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
11044
11045 Adding Neutrino gdbserver.
11046 * configure: Regenerated.
11047 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
11048 * configure.srv (i[34567]86-*-nto*): New target.
11049 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
11050 * remote-utils.c [__QNX__]: Include sys/iomgr.h
11051 (nto_comctrl) [__QNX__]: New function.
11052 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
11053
11054 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
11055
11056 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
11057 srv_tgtobj.
11058
11059 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
11060 Pedro Alves <pedro@codesourcery.com>
11061
11062 * win32-i386-low.c (i386_get_thread_context): Handle systems that
11063 don't support CONTEXT_EXTENDED_REGISTERS.
11064 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
11065 (the_low_target): Install them.
11066 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
11067 failing with ERROR_PIPE_NOT_CONNECTED.
11068
11069 2009-06-30 Doug Evans <dje@google.com>
11070 Pierre Muller <muller@ics.u-strasbg.fr>
11071
11072 Add h/w watchpoint support to x86-linux, win32-i386.
11073 * Makefile.in (SFILES): Add i386-low.c
11074 (i386_low_h): Define.
11075 (i386-low.o): Add dependencies.
11076 (linux-x86-low.o): Add i386-low.h dependency.
11077 (win32-i386-low.o): Ditto.
11078 * i386-low.c: New file.
11079 * i386-low.h: New file.
11080 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
11081 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
11082 * linux-low.c (linux_add_process): Initialize arch_private.
11083 (linux_remove_process): Free arch_private.
11084 (add_lwp): Initialize arch_private.
11085 (delete_lwp): Free arch_private.
11086 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
11087 provided.
11088 * linux-low.h (process_info_private): New member arch_private.
11089 (lwp_info): New member arch_private.
11090 (linux_target_ops): New members new_process, new_thread,
11091 prepare_to_resume.
11092 (ptid_of): New macro.
11093 * linux-x86-low.c: Include stddef.h, i386-low.h.
11094 (arch_process_info): New struct.
11095 (arch_lwp_info): New struct.
11096 (x86_linux_dr_get, x86_linux_dr_set): New functions.
11097 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11098 (i386_dr_low_get_status): New function.
11099 (x86_insert_point, x86_remove_point): New functions.
11100 (x86_stopped_by_watchpoint): New function.
11101 (x86_stopped_data_address): New function.
11102 (x86_linux_new_process, x86_linux_new_thread): New functions.
11103 (x86_linux_prepare_to_resume): New function.
11104 (the_low_target): Add entries for insert_point, remove_point,
11105 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
11106 prepare_to_resume.
11107 * server.c (debug_hw_points): New global.
11108 (monitor_show_help): Document set debug-hw-points.
11109 (handle_query): Process "set debug-hw-points".
11110 * server.h (debug_hw_points): Declare.
11111 (paddress): Declare.
11112 * utils.c (NUMCELLS, CELLSIZE): New macros.
11113 (get_sell, xsnprintf, paddress): New functions.
11114 * win32-arm-low.c (the_low_target): Add entries for insert_point,
11115 remove_point, stopped_by_watchpoint, stopped_data_address.
11116 * win32-i386-low.c: Include i386-low.h.
11117 (debug_reg_state): Replaces dr.
11118 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11119 (i386_dr_low_get_status): New function.
11120 (i386_insert_point, i386_remove_point): New functions.
11121 (i386_stopped_by_watchpoint): New function.
11122 (i386_stopped_data_address): New function.
11123 (i386_initial_stuff): Update.
11124 (get_thread_context,set_thread_context,i386_thread_added): Update.
11125 (the_low_target): Add entries for insert_point,
11126 remove_point, stopped_by_watchpoint, stopped_data_address.
11127 * win32-low.c (win32_insert_watchpoint): New function.
11128 (win32_remove_watchpoint): New function.
11129 (win32_stopped_by_watchpoint): New function.
11130 (win32_stopped_data_address): New function.
11131 (win32_target_ops): Add entries for insert_watchpoint,
11132 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
11133 * win32-low.h (win32_target_ops): New members insert_point,
11134 remove_point, stopped_by_watchpoint, stopped_data_address.
11135
11136 2009-06-25 Pedro Alves <pedro@codesourcery.com>
11137
11138 * server.c (process_serial_event): Re-return unsupported, not
11139 error, if the type isn't recognized. Re-allow supporting only
11140 insert or remove packets. Also call require_running for
11141 breakpoints. Add missing break statement to default case. Tidy.
11142 * target.h (struct target_ops): Rename insert_watchpoint to
11143 insert_point, and remove_watchpoint to remove_point.
11144
11145 * linux-low.h (struct linux_target_ops): Likewise.
11146 * linux-low.c (linux_insert_watchpoint): Rename to ...
11147 (linux_insert_point): ... this. Adjust.
11148 (linux_remove_watchpoint): Rename to ...
11149 (linux_remove_point): ... this. Adjust.
11150 (linux_target_ops): Adjust.
11151 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
11152 (cris_insert_point): ... this.
11153 (cris_remove_watchpoint): Rename to ...
11154 (cris_remove_point): ... this.
11155 (the_low_target): Adjust.
11156
11157 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
11158
11159 * server.c (handle_v_kill): Pass signal_pid to
11160 kill_inferior if multi_process is zero.
11161
11162 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
11163
11164 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
11165 * target.h (target_ops): Comment for *_watchpoint to make it clear
11166 the functions can get types '0' and '1'.
11167
11168 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
11169
11170 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
11171 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
11172 * regcache.c (get_regcache): Likewise.
11173 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
11174 * win32-low.c (child_fetch_inferior_registers): Remove check for
11175 regno 0.
11176
11177 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
11178 Pedro Alves <pedro@codesourcery.com>
11179
11180 * target.h (struct target_ops) <supports_multi_process>: New
11181 callback.
11182 (target_supports_multi_process): New.
11183 * server.c (handle_query): Even if GDB reports support, only
11184 enable multi-process if the target also supports it. Report
11185 multi-process support only if the target backend supports it.
11186 * linux-low.c (linux_supports_multi_process): New function.
11187 (linux_target_ops): Install it as target_supports_multi_process
11188 callback.
11189
11190 2009-05-24 Doug Evans <dje@google.com>
11191
11192 Global renaming of find_thread_pid to find_thread_ptid.
11193 * server.h (find_thread_ptid): Renamed from find_thread_pid.
11194 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
11195 All callers updated.
11196
11197 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
11198 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
11199 directly.
11200
11201 * linux-low.c (get_stop_pc): Print pc if debug_threads.
11202 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
11203 (linux_resume_one_lwp): Ditto.
11204
11205 2009-05-23 Doug Evans <dje@google.com>
11206
11207 * linux-low.c (linux_resume_one_lwp): Change type of first arg
11208 from struct inferior_list_entry * to struct lwp_info *.
11209 All callers updated.
11210
11211 2009-05-13 Doug Evans <dje@google.com>
11212
11213 * linux-x86-low.c: Don't include assert.h.
11214 (x86_siginfo_fixup): Use fatal, not assert.
11215 (x86_arch_setup): Fix comment.
11216
11217 2009-05-12 Doug Evans <dje@google.com>
11218
11219 Biarch support for i386/amd64 gdbserver.
11220 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
11221 Add linux-x86-low.c.
11222 (linux-i386-low.o, linux-x86-64-low.o): Delete.
11223 (linux-x86-low.o): Add.
11224 * linux-x86-64-low.c: Delete.
11225 * linux-i386-low.c: Delete.
11226 * linux-x86-low.c: New file.
11227 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
11228 linux-x86-low.o.
11229 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
11230 linux-x86-low.o.
11231 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
11232 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
11233 (linux_child_pid_to_exec_file): New function.
11234 (elf_64_header_p, elf_64_file_p): New functions.
11235 (siginfo_fixup): New function.
11236 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
11237 give target a chance to convert layout.
11238 * linux-low.h (linux_target_ops): New member siginfo_fixup.
11239 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
11240
11241 2009-05-07 Doug Evans <dje@google.com>
11242
11243 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
11244 (regsets_store_inferior_registers): Ditto.
11245
11246 2009-05-06 Pedro Alves <pedro@codesourcery.com>
11247
11248 PR server/10048
11249
11250 * linux-low.c (must_set_ptrace_flags): Delete.
11251 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
11252 of the global.
11253 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
11254 `lwp->must_set_ptrace_flags' instead.
11255 (linux_wait_for_event_1): Set ptrace options here.
11256 (linux_wait_1): ... not here.
11257
11258 2009-04-30 Doug Evans <dje@google.com>
11259
11260 * inferiors.c (started_inferior_callback): New function.
11261 (attached_inferior_callback): New function.
11262 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
11263 * server.c (print_started_pid, print_attached_pid): New functions.
11264 (detach_or_kill_for_exit): New function.
11265 (main): Call it instead of for_each_inferior (kill_inferior_callback).
11266 * server.h (have_started_inferiors_p): Declare.
11267 (have_attached_inferiors_p): Declare.
11268
11269 * inferiors.c (remove_process): Fix memory leak, free process.
11270 * linux-low.c (linux_remove_process): New function.
11271 (linux_kill): Call it instead of remove_process.
11272 (linux_detach, linux_wait_1): Ditto.
11273
11274 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
11275
11276 * configure.srv: Add x86 Windows CE target.
11277
11278 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11279
11280 * inferiors.c (get_thread_process): Make global.
11281 * server.h (get_thread_process): Add prototype.
11282 * thread-db.c (find_one_thread): Use get_thread_process
11283 instead of current_process.
11284 (thread_db_get_tls_address): Do not crash if called when
11285 thread layer is not yet initialized.
11286
11287 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11288
11289 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
11290 * spu-low.c (current_tid): Rename to ...
11291 (current_ptid): ... this.
11292 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
11293 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
11294 ptid_get_lwp (current_ptid) instead of current_tid.
11295 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
11296 instead of current_tid. Use find_process_pid to verify pid
11297 argument is valid. Pass proper argument to remove_process.
11298 (spu_thread_alive): Compare current_ptid instead of current_tid.
11299 (spu_resume): Likewise.
11300
11301 2009-04-02 Pedro Alves <pedro@codesourcery.com>
11302
11303 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
11304 variable.
11305
11306 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11307
11308 Implement the multiprocess extensions, and add linux multiprocess
11309 support.
11310
11311 * server.h (ULONGEST): Declare.
11312 (struct ptid, ptid_t): New.
11313 (minus_one_ptid, null_ptid): Declare.
11314 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11315 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
11316 (struct inferior_list_entry): Change `id' type from unsigned from
11317 to ptid_t.
11318 (struct sym_cache, struct breakpoint, struct
11319 process_info_private): Forward declare.
11320 (struct process_info): Declare.
11321 (current_process): Declare.
11322 (all_processes): Declare.
11323 (initialize_inferiors): Declare.
11324 (add_thread): Adjust to use ptid_t.
11325 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
11326 (add_process, remove_process, find_thread_pid): Declare.
11327 (find_inferior_id): Adjust to use ptid_t.
11328 (cont_thread, general_thread, step_thread): Change type to ptid_t.
11329 (multi_process): Declare.
11330 (push_event): Adjust to use ptid_t.
11331 (read_ptid, write_ptid): Declare.
11332 (prepare_resume_reply): Adjust to use ptid_t.
11333 (clear_symbol_cache): Declare.
11334 * inferiors.c (all_processes): New.
11335 (null_ptid, minus_one_ptid): New.
11336 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11337 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
11338 (add_thread): Change unsigned long to ptid. Remove gdb_id
11339 parameter. Adjust.
11340 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
11341 (gdb_id_to_thread): Rename to ...
11342 (find_thread_pid): ... this. Change unsigned long to ptid.
11343 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
11344 (loaded_dll, pull_pid_from_list): Adjust.
11345 (add_process, remove_process, find_process_pid)
11346 (get_thread_process, current_process, initialize_inferiors): New.
11347 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
11348 (struct target_waitstatus) <related_pid>: Ditto.
11349 (struct target_ops) <kill, detach>: Add `pid' argument. Change
11350 return type to int.
11351 (struct target_ops) <join>: Add `pid' argument.
11352 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
11353 (struct target_ops) <wait>: Add `ptid' field. Change return type
11354 to ptid.
11355 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
11356 (mywait): Add `ptid' argument. Change return type to ptid_t.
11357 (target_pid_to_str): Declare.
11358 * target.c (set_desired_inferior): Adjust to use ptids.
11359 (mywait): Add new `ptid' argument. Adjust.
11360 (target_pid_to_str): New.
11361 * mem-break.h (free_all_breakpoints): Declare.
11362 * mem-break.c (breakpoints): Delelete.
11363 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
11364 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
11365 to use per-process breakpoint list.
11366 (free_all_breakpoints): New.
11367 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
11368 (symbol_cache, all_symbols_looked_up): Delete.
11369 (hexchars): New.
11370 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
11371 read_ptid): New.
11372 (prepare_resume_reply): Change ptid argument's type from unsigned
11373 long to ptid_t. Adjust. Implement W;process and X;process.
11374 (free_sym_cache, clear_symbol_cache): New.
11375 (look_up_one_symbol): Adjust to per-process symbol cache. *
11376 * server.c (cont_thread, general_thread, step_thread): Change type
11377 to ptid_t.
11378 (attached): Delete.
11379 (multi_process): New.
11380 (last_ptid): Change type to ptid_t.
11381 (struct vstop_notif) <ptid>: Change type to ptid_t.
11382 (queue_stop_reply, push_event): Change `ptid' argument's type to
11383 ptid_t.
11384 (discard_queued_stop_replies): Add `pid' argument.
11385 (start_inferior): Adjust to use ptids. Adjust to mywait interface
11386 changes. Don't reference the `attached' global.
11387 (attach_inferior): Adjust to mywait interface changes.
11388 (handle_query): Adjust to use ptids. Parse GDB's qSupported
11389 features. Handle and report "multiprocess+". Handle
11390 "qAttached:PID".
11391 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
11392 changes.
11393 (handle_v_kill): New.
11394 (handle_v_stopped): Adjust to use target_pid_to_str.
11395 (handle_v_requests): Allow multiple attaches and runs when
11396 multiprocess extensions are in effect. Handle "vKill".
11397 (myresume): Adjust to use ptids.
11398 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
11399 (handle_status): Adjust to discard_queued_stop_replies interface
11400 change.
11401 (first_thread_of, kill_inferior_callback)
11402 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
11403 (main): Call initialize_inferiors. Adjust to use ptids, killing
11404 and detaching from all inferiors. Handle multiprocess packet
11405 variants.
11406 * linux-low.h: Include gdb_proc_service.h.
11407 (struct process_info_private): New.
11408 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
11409 <lwpid_of>: Use ptid_get_lwp.
11410 (get_lwp_thread): Adjust.
11411 (struct lwp_info): Add `dead' member.
11412 (find_lwp_pid): Declare.
11413 * linux-low.c (thread_db_active): Delete.
11414 (new_inferior): Adjust comment.
11415 (inferior_pid): Delete.
11416 (linux_add_process): New.
11417 (handle_extended_wait): Adjust.
11418 (add_lwp): Change unsigned long to ptid.
11419 (linux_create_inferior): Add process to processes table. Adjust
11420 to use ptids. Don't set new_inferior here.
11421 (linux_attach_lwp): Rename to ...
11422 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
11423 it. Adjust to use ptids.
11424 (linux_attach_lwp): New.
11425 (linux_attach): Add process to processes table. Don't set
11426 new_inferior here.
11427 (struct counter): New.
11428 (second_thread_of_pid_p, last_thread_of_process_p): New.
11429 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
11430 multiple processes.
11431 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
11432 processes. Remove process from process table.
11433 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
11434 to multiple processes.
11435 (any_thread_of): New.
11436 (linux_detach): Add `pid' argument, and handle it. Remove process
11437 from processes table.
11438 (linux_join): Add `pid' argument. Handle it.
11439 (linux_thread_alive): Change unsighed long argument to ptid_t.
11440 Consider dead lwps as not being alive.
11441 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
11442 threads we're not interested in.
11443 (same_lwp, find_lwp_pid): New.
11444 (linux_wait_for_lwp): Change `pid' argument's type from int to
11445 ptid_t. Adjust.
11446 (linux_wait_for_event): Rename to ...
11447 (linux_wait_for_event_1): ... this. Change `pid' argument's type
11448 from int to ptid_t. Adjust.
11449 (linux_wait_for_event): New.
11450 (linux_wait_1): Add `ptid' argument. Change return type to
11451 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
11452 that exit from the process table.
11453 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
11454 Adjust.
11455 (mark_lwp_dead): New.
11456 (wait_for_sigstop): Adjust to use ptids. If a process exits while
11457 stopping all threads, mark its main lwp as dead.
11458 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
11459 ptids.
11460 (fetch_register, usr_store_inferior_registers)
11461 (regsets_fetch_inferior_registers)
11462 (regsets_store_inferior_registers, linux_read_memory)
11463 (linux_write_memory): Inline `inferior_pid'.
11464 (linux_look_up_symbols): Adjust to use per-process
11465 `thread_db_active'.
11466 (linux_request_interrupt): Adjust to use ptids.
11467 (linux_read_auxv): Inline `inferior_pid'.
11468 (initialize_low): Don't reference thread_db_active.
11469 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
11470 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
11471 (ps_getpid): Return the pid of the current inferior.
11472 * thread-db.c (proc_handle, thread_agent): Delete.
11473 (thread_db_create_event, thread_db_enable_reporting): Adjust to
11474 per-process data.
11475 (find_one_thread): Change argument type to ptid_t. Adjust to
11476 per-process data.
11477 (maybe_attach_thread): Adjust to per-process data and ptids.
11478 (thread_db_find_new_threads): Ditto.
11479 (thread_db_init): Ditto.
11480 * spu-low.c (spu_create_inferior, spu_attach): Add process to
11481 processes table. Adjust to use ptids.
11482 (spu_kill, spu_detach): Adjust interface. Remove process from
11483 processes table.
11484 (spu_join, spu_thread_alive): Adjust interface.
11485 (spu_wait): Adjust interface. Remove process from processes
11486 table. Adjust to use ptids.
11487 * win32-low.c (current_inferior_tid): Delete.
11488 (current_inferior_ptid): New.
11489 (debug_event_ptid): New.
11490 (thread_rec): Take a ptid. Adjust.
11491 (child_add_thread): Add `pid' argument. Adjust to use ptids.
11492 (child_delete_thread): Ditto.
11493 (do_initial_child_stuff): Add `attached' argument. Add process to
11494 processes table.
11495 (child_fetch_inferior_registers, child_store_inferior_registers):
11496 Adjust.
11497 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
11498 (win32_attach): Pass 1 to do_initial_child_stuff.
11499 (win32_kill): Adjust interface. Remove process from processes
11500 table.
11501 (win32_detach): Ditto.
11502 (win32_join): Adjust interface.
11503 (win32_thread_alive): Take a ptid.
11504 (win32_resume): Adjust to use ptids.
11505 (get_child_debug_event): Ditto.
11506 (win32_wait): Adjust interface. Remove exiting process from
11507 processes table.
11508
11509 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11510
11511 Non-stop mode support.
11512
11513 * server.h (non_stop): Declare.
11514 (gdb_client_data, handler_func): Declare.
11515 (delete_file_handler, add_file_handler, start_event_loop):
11516 Declare.
11517 (handle_serial_event, handle_target_event, push_event)
11518 (putpkt_notif): Declare.
11519 * target.h (enum resume_kind): New.
11520 (struct thread_resume): Replace `step' field by `kind' field.
11521 (TARGET_WNOHANG): Define.
11522 (struct target_ops) <wait>: Add `options' argument.
11523 <supports_non_stop, async, start_non_stop>: New fields.
11524 (target_supports_non_stop, target_async): New.
11525 (start_non_stop): Declare.
11526 (mywait): Add `options' argument.
11527 * target.c (mywait): Add `options' argument. Print child exit
11528 notifications here.
11529 (start_non_stop): New.
11530 * server.c (non_stop, own_buf, mem_buf): New globals.
11531 (struct vstop_notif): New.
11532 (notif_queue): New global.
11533 (queue_stop_reply, push_event, discard_queued_stop_replies)
11534 (send_next_stop_reply): New.
11535 (start_inferior): Adjust to use resume_kind. Adjust to mywait
11536 interface changes.
11537 (attach_inferior): In non-stop mode, don't wait for the target
11538 here.
11539 (handle_general_set): Handle QNonStop.
11540 (handle_query): When handling qC, return the current general
11541 thread, instead of the first thread of the list.
11542 (handle_query): If the backend supports non-stop mode, include
11543 QNonStop+ in the qSupported query response.
11544 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
11545 and non-stop mode.
11546 (handle_v_attach, handle_v_run): Handle non-stop mode.
11547 (handle_v_stopped): New.
11548 (handle_v_requests): Report support for vCont;t. Handle vStopped.
11549 (myresume): Adjust to use resume_kind. Handle non-stop.
11550 (queue_stop_reply_callback): New.
11551 (handle_status): Handle non-stop mode.
11552 (main): Clear non_stop flag on reconnection. Use the event-loop.
11553 Refactor serial protocol handling from here ...
11554 (process_serial_event): ... to this new function. When GDB
11555 selects any thread, select one here. In non-stop mode, wait until
11556 GDB acks all pending events before exiting.
11557 (handle_serial_event, handle_target_event): New.
11558 * remote-utils.c (remote_open): Install remote_desc in the event
11559 loop.
11560 (remote_close): Remove remote_desc from the event loop.
11561 (putpkt_binary): Rename to...
11562 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
11563 (putpkt_binary): New as wrapper around putpkt_binary_1.
11564 (putpkt_notif): New.
11565 (prepare_resume_reply): In non-stop mode, don't change the
11566 general_thread.
11567 * event-loop.c: New.
11568 * Makefile.in (OBJ): Add event-loop.o.
11569 (event-loop.o): New rule.
11570
11571 * linux-low.h (pid_of): Moved here.
11572 (lwpid_of): New.
11573 (get_lwp_thread): Use lwpid_of.
11574 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
11575 * linux-low.c (pid_of): Delete.
11576 (inferior_pid): Use lwpid_of.
11577 (linux_event_pipe): New.
11578 (target_is_async_p): New.
11579 (delete_lwp): New.
11580 (handle_extended_wait): Use lwpid_of.
11581 (add_lwp): Don't set lwpid field.
11582 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
11583 (linux_kill_one_lwp): If killing a running lwp, stop it first.
11584 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
11585 (linux_detach_one_lwp): If detaching from a running lwp, stop it
11586 first. Adjust to linux_wait_for_event interface changes. Use
11587 lwpid_of.
11588 (linux_detach): Don't delete the main lwp here.
11589 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
11590 (status_pending_p): Don't consider explicitly suspended lwps.
11591 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
11592 pointer. Add OPTIONS argument. Change return type to int. Use
11593 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
11594 (linux_wait_for_event): Take an integer pid instead of a lwp_info
11595 pointer. Add status pointer argument. Return a pid instead of a
11596 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
11597 changes. In non-stop mode, don't switch to a random thread.
11598 (linux_wait): Rename to...
11599 (linux_wait_1): ... this. Add target_options argument, and handle
11600 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
11601 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
11602 clean exit and signal exit code. Don't stop all threads in
11603 non-stop mode. In all-stop mode, only stop all threads when
11604 reporting a stop to GDB. Handle explicit thread stop requests.
11605 (async_file_flush, async_file_mark): New.
11606 (linux_wait): New.
11607 (send_sigstop): Use lwpid_of.
11608 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
11609 interface changes. In non-stop mode, don't switch to a random
11610 thread.
11611 (linux_resume_one_lwp): Use lwpid_of.
11612 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
11613 (linux_resume_one_thread): ... this. Handle resume_stop. In
11614 non-stop mode, don't look for pending flag in all threads.
11615 (resume_status_pending_p): Don't consider explicitly suspended
11616 threads.
11617 (my_waitpid): Reimplement. Emulate __WALL.
11618 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11619 Use lwpid_of.
11620 (sigchld_handler, linux_supports_non_stop, linux_async)
11621 (linux_start_non_stop): New.
11622 (linux_target_ops): Register linux_supports_non_stop, linux_async
11623 and linux_start_non_stop.
11624 (initialize_low): Install SIGCHLD handler.
11625 * thread-db.c (thread_db_create_event, find_one_thread)
11626 (thread_db_get_tls_address): Use lwpid_of.
11627 * win32-low.c (win32_detach): Adjust to use resume_kind.
11628 (win32_wait): Add `options' argument.
11629 * spu-low.c (spu_resume): Adjust to use resume_kind.
11630 (spu_wait): Add `options' argument.
11631
11632 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11633
11634 Decouple target code from remote protocol.
11635
11636 * target.h (enum target_waitkind): New.
11637 (struct target_waitstatus): New.
11638 (struct target_ops) <wait>: Return an unsigned long. Take a
11639 target_waitstatus pointer instead of a char pointer.
11640 (mywait): Likewise.
11641 * target.c (mywait): Change prototype to return an unsigned long.
11642 Take a target_waitstatus pointer instead of a char pointer. Adjust.
11643 * server.h (thread_from_wait, old_thread_from_wait): Delete
11644 declarations.
11645 (prepare_resume_reply): Change prototype to take a
11646 target_waitstatus.
11647 * server.c (thread_from_wait, old_thread_from_wait): Delete.
11648 (last_status, last_ptid): New.
11649 (start_inferior): Remove "statusptr" argument. Adjust. Return a
11650 pid instead of a signal.
11651 (attach_inferior): Remove "status" and "signal" parameters.
11652 Adjust.
11653 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
11654 not as an address.
11655 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
11656 (handle_v_requests, myresume): Remove "status" and "signal"
11657 parameters. Adjust.
11658 (handle_status): New.
11659 (main): Delete local `status'. Adjust.
11660 * remote-utils.c: Include target.h.
11661 (prepare_resume_reply): Change prototype to take a
11662 target_waitstatus. Adjust.
11663
11664 * linux-low.c (linux_wait): Adjust to new target_ops->wait
11665 interface.
11666 * spu-low.c (spu_wait): Adjust.
11667 * win32-low.c (enum target_waitkind, struct target_waitstatus):
11668 Delete.
11669 (win32_wait): Adjust.
11670
11671 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11672
11673 * target.h (struct thread_resume): Delete leave_stopped member.
11674 (struct target_ops): Add a `n' argument to the `resume' callback.
11675 * server.c (start_inferior): Adjust.
11676 (handle_v_cont, myresume): Adjust.
11677 * linux-low.c (check_removed_breakpoint): Adjust to resume
11678 interface change, and to removed leave_stopped field.
11679 (resume_ptr): Delete.
11680 (struct thread_resume_array): New.
11681 (linux_set_resume_request): Add new `arg' parameter. Adjust to
11682 resume interface change.
11683 (linux_continue_one_thread, linux_queue_one_thread)
11684 (resume_status_pending_p): Check if the resume field is NULL
11685 instead of checking the leave_stopped member.
11686 (linux_resume): Adjust to the target resume interface change.
11687 * spu-low.c (spu_resume): Adjust to the target resume interface
11688 change.
11689 * win32-low.c (win32_detach, win32_resume): Ditto.
11690
11691 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11692
11693 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
11694 flag.
11695 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
11696 pending.
11697 (linux_continue_one_thread): Only preserve the stepping flag if
11698 there's a pending breakpoint.
11699
11700 2009-03-31 Pedro Alves <pedro@codesourcery.com>
11701
11702 * server.c (main): After the inferior having exited, call
11703 remote_close before exiting gdbserver.
11704
11705 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
11706
11707 Fix size of FPSCR in Power 7 processors.
11708 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
11709 (PPC_FEATURE_HAS_DFP): New #define.
11710 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
11711 size of the FPSCR.
11712
11713 2009-03-23 Pedro Alves <pedro@codesourcery.com>
11714
11715 * server.c (handle_query) Whitespace and formatting.
11716
11717 2009-03-22 Pedro Alves <pedro@codesourcery.com>
11718
11719 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
11720 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
11721 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
11722 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
11723 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
11724 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
11725 Makefile.in, configure.ac: Fix whitespace throughout.
11726 * configure: Regenerate.
11727
11728 2009-03-22 Pedro Alves <pedro@codesourcery.com>
11729
11730 * inferiors.c (find_inferior): Make it safe for the callback
11731 function to delete the currently iterated inferior.
11732
11733 2009-03-22 Pedro Alves <pedro@codesourcery.com>
11734
11735 * Makefile.in (linuw_low_h): Move higher.
11736 (thread-db.o): Depend on $(linux_low_h).
11737
11738 2009-03-17 Pedro Alves <pedro@codesourcery.com>
11739
11740 Rename "process" to "lwp" throughout.
11741
11742 * linux-low.c (all_processes): Rename to...
11743 (all_lwps): ... this.
11744 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
11745 (add_process): Rename to ...
11746 (add_lwp): ... this. Adjust.
11747 (linux_create_inferior): Adjust.
11748 (linux_attach_lwp): Adjust.
11749 (linux_attach): Adjust.
11750 (linux_kill_one_process): Rename to ...
11751 (linux_kill_one_lwp): ... this. Adjust.
11752 (linux_kill): Adjust.
11753 (linux_detach_one_process): Rename to ...
11754 (linux_detach_one_lwp): ... this. Adjust.
11755 (linux_detach): Adjust.
11756 (check_removed_breakpoint): Adjust.
11757 (status_pending_p): Adjust.
11758 (linux_wait_for_process): Rename to ...
11759 (linux_wait_for_lwp): ... this. Adjust.
11760 (linux_wait_for_event): Adjust.
11761 (send_sigstop): Adjust.
11762 (wait_for_sigstop): Adjust.
11763 (stop_all_processes): Rename to ...
11764 (stop_all_lwps): ... this.
11765 (linux_resume_one_process): Rename to ...
11766 (linux_resume_one_lwp): ... this. Adjust.
11767 (linux_set_resume_request, linux_continue_one_thread)
11768 (linux_queue_one_thread, resume_status_pending_p)
11769 (usr_store_inferior_registers, regsets_store_inferior_registers)
11770 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11771 Adjust.
11772 * linux-low.h (get_process): Rename to ...
11773 (get_lwp): ... this. Adjust.
11774 (get_thread_process): Rename to ...
11775 (get_thread_lwp): ... this. Adjust.
11776 (get_process_thread): Rename to ...
11777 (get_lwp_thread): ... this. Adjust.
11778 (struct process_info): Rename to ...
11779 (struct lwp_info): ... this.
11780 (all_processes): Rename to ...
11781 (all_lwps): ... this.
11782 * proc-service.c (ps_lgetregs): Adjust.
11783 * thread-db.c (thread_db_create_event, find_one_thread)
11784 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
11785
11786 2009-03-14 Pedro Alves <pedro@codesourcery.com>
11787
11788 * server.c (handle_query): Handle "qAttached".
11789
11790 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
11791
11792 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
11793 GPLv3, update license URL.
11794
11795 2009-03-01 Doug Evans <dje@google.com>
11796
11797 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
11798 (server_h): Add gdb_signals.h.
11799 (signals.o): Update.
11800 * server.h (target_signal_from_host,target_signal_to_host_p)
11801 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
11802
11803 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
11804
11805 * remote-utils.c (getpkt): Also generate remote-debug
11806 information if noack_mode is set.
11807
11808 2009-02-06 Pedro Alves <pedro@codesourcery.com>
11809
11810 * server.c (handle_query): Report qXfer:siginfo:read and
11811 qXfer:siginfo:write as supported and handle them.
11812 * target.h (struct target_ops) <qxfer_siginfo>: New field.
11813 * linux-low.c (linux_xfer_siginfo): New.
11814 (linux_target_ops): Set it.
11815
11816 2009-01-26 Pedro Alves <pedro@codesourcery.com>
11817
11818 * server.c (gdbserver_usage): Mention --remote-debug.
11819 (main): Accept '--remote-debug' switch.
11820
11821 2009-01-18 Doug Evans <dje@google.com>
11822
11823 * regcache.c (new_register_cache): No need to check result of xcalloc.
11824 * server.c (handle_search_memory): Back out calls to xmalloc,
11825 result is checked and error is returned to user upon failure.
11826 (handle_query): Ditto. Add more checks for result of malloc.
11827 (handle_v_cont): Check result of malloc, report error back to
11828 user upon failure.
11829 (handle_v_run): Ditto. Call freeargv.
11830 * server.h (freeargv): Declare.
11831 * utils.c (freeargv): New fn.
11832
11833 2009-01-15 Doug Evans <dje@google.com>
11834
11835 * gdbreplay.c (perror_with_name): Make arg const char *.
11836 * server.h (target_signal_to_name): Make return type const char *.
11837 * thread-db.c (thread_db_err_str): Make return type const char *.
11838 * utils.c (perror_with_name): Make arg const char *.
11839
11840 2009-01-14 Pedro Alves <pedro@codesourcery.com>
11841
11842 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
11843 when handling a EXIT_PROCESS_DEBUG_EVENT.
11844
11845 2009-01-06 Joel Brobecker <brobecker@adacore.com>
11846
11847 * gdbreplay.c (gdbreplay_version): Update copyright year.
11848 * server.c (gdbserver_version): Likewise.
11849
11850 2009-01-05 Doug Evans <dje@google.com>
11851
11852 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
11853 (handle_extended_wait): Improve comment.
11854
11855 2008-12-13 Doug Evans <dje@google.com>
11856
11857 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
11858 * server.h (ATTR_MALLOC): New macro.
11859 (xmalloc,xcalloc,xstrdup): Declare.
11860 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
11861 * inferiors.c: Ditto.
11862 * linux-low.c: Ditto.
11863 * mem-break.c: Ditto.
11864 * regcache.c: Ditto.
11865 * remote-utils.c: Ditto.
11866 * server.c: Ditto.
11867 * target.c: Ditto.
11868 * win32-low.c: Ditto.
11869
11870 2008-12-12 Doug Evans <dje@google.com>
11871
11872 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
11873 in debugging printf.
11874
11875 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
11876
11877 2008-12-09 Doug Evans <dje@google.com>
11878
11879 * linux-low.h (struct process_info): Delete member tid, unused.
11880 * thread-db.c (find_one_thread): Update.
11881 (maybe_attach_thread): Update.
11882
11883 2008-12-02 Pedro Alves <pedro@codesourcery.com>
11884
11885 * target.h (struct target_ops): Add qxfer_osdata member.
11886 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
11887 and dirent.h.
11888 (linux_qxfer_osdata): New functions.
11889 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
11890 callback.
11891 * server.c (handle_query): Handle "qXfer:osdata:read:".
11892 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
11893 (buffer_xml_printf): New functions.
11894 * server.h (struct buffer): New.
11895 (buffer_grow_str, buffer_grow_str0): New macros.
11896 (buffer_grow, buffer_free, buffer_init, buffer_finish)
11897 (buffer_xml_printf): Declare.
11898
11899 2008-11-24 Doug Evans <dje@google.com>
11900
11901 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
11902
11903 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
11904
11905 * server.c (handle_v_run): Always use the supplied argument list.
11906
11907 2008-11-19 Bob Wilson <bob.wilson@acm.org>
11908
11909 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
11910 (xtensa_regmap_table): Add entry for scompare1.
11911
11912 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
11913
11914 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
11915 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
11916 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
11917 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
11918 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
11919 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
11920 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
11921 XML target descriptions.
11922 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
11923 when inferior is running on an ISA 2.05 or later processor. Add
11924 special case to return offset for full 64-bit slot of FPSCR when
11925 in 32-bits.
11926
11927 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
11928
11929 * Makefile.in (SFILES, clean): Added sparc64 files.
11930 (reg-sparc64.o, reg-sparc64.c): New.
11931 * configure.srv (sparc*-*-linux*): New configuration.
11932 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
11933 syscall arguments for SPARC.
11934 (regsets_store_inferior_registers): Likewise.
11935 * linux-sparc-low.c: New file.
11936
11937 2008-10-21 Doug Evans <dje@google.com>
11938
11939 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
11940 (READLINE_DIR,READLINE_DEP): Delete.
11941 (INTERNAL_CFLAGS): Update.
11942 (LINTFLAGS): Update.
11943
11944 2008-10-10 Pedro Alves <pedro@codesourcery.com>
11945
11946 * server.c (handle_v_run): If GDB didn't specify an argv, use the
11947 whole argv from the last run, not just argv[0].
11948
11949 2008-09-08 Pedro Alves <pedro@codesourcery.com>
11950
11951 * regcache.c (new_register_cache): Return NULL if the register
11952 cache size isn't known yet.
11953 (free_register_cache): Avoid dereferencing a NULL regcache.
11954
11955 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11956
11957 * configure.srv: Merge MIPS and MIPS64.
11958
11959 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
11960
11961 * Makefile.in (uninstall): Apply $(EXEEXT) too.
11962
11963 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
11964
11965 * Makefile.in: Add required vsx dependencies.
11966
11967 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
11968 Declare init_registers_powerpc_vsx32l.
11969 Declare init_registers_powerpc_vsx64l.
11970 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
11971 (ppc_arch_setup): Check for VSX in hwcap.
11972 (ppc_fill_vsxregset): New function.
11973 (ppc_store_vsxregset): New function.
11974 Add new VSX entry in regset_info target_regsets.
11975
11976 * configure.srv: Add new VSX dependencies.
11977
11978 2008-08-12 Pedro Alves <pedro@codesourcery.com>
11979
11980 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
11981 (remote_open): Set or clear transport_is_reliable.
11982 (putpkt_binary): Don't expect acks in noack mode.
11983 (getpkt): Don't send ack/nac in noack mode.
11984 * server.c (handle_general_set): Handle QStartNoAckMode.
11985 (handle_query): If connected by tcp pass QStartNoAckMode+ in
11986 qSupported.
11987 (main): Reset noack_mode on every connection.
11988 * server.h (noack_mode): Declare.
11989
11990 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11991
11992 * Makefile.in (GDBREPLAY_OBS): New variable.
11993 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
11994
11995 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
11996 Daniel Jacobowitz <dan@codesourcery.com>
11997
11998 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
11999 (usr_store_inferior_registers): Likewise.
12000 (regsets_store_inferior_registers): Likewise.
12001
12002 2008-07-31 Rolf Jansen <rj@surtec.com>
12003 Pedro Alves <pedro@codesourcery.com>
12004
12005 * configure.ac: Check for memmem declaration.
12006 * server.c [HAVE_MALLOC_H]: Include malloc.h.
12007 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
12008 (disable_packet_qfThreadInfo): Unconditionally compile.
12009 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
12010 * configure, config.in: Regenerate.
12011
12012 2008-07-28 Doug Kwan <dougkwan@google.com>
12013
12014 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
12015 (linux_write_memory): Remove declaration of errno.
12016
12017 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
12018
12019 * linux-low.c (handle_extended_wait): Do not use "status"
12020 variable uninitialized.
12021
12022 2008-07-07 Pedro Alves <pedro@codesourcery.com>
12023
12024 * server.c (handle_v_attach): Inhibit reporting dll changes.
12025
12026 2008-06-27 Pedro Alves <pedro@codesourcery.com>
12027
12028 * remote-utils.c (prepare_resume_reply): If requested, don't
12029 output "thread:TID" in the T stop reply.
12030
12031 * server.c (disable_packet_vCont, disable_packet_Tthread)
12032 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
12033 (handle_query): If requested, disable support for qC, qfThreadInfo
12034 and qsThreadInfo.
12035 (handle_v_requests): If requested, disable support for vCont.
12036 (gdbserver_show_disableable): New.
12037 (main): Handle --disable-packet and --disable-packet=LIST.
12038
12039 * server.h (disable_packet_vCont, disable_packet_Tthread)
12040 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
12041
12042 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
12043
12044 * server.c (gdbserver_usage): Mention --version.
12045
12046 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
12047
12048 * Makefile.in (gdbreplay.o): New rule.
12049
12050 2008-06-06 Joseph Myers <joseph@codesourcery.com>
12051
12052 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
12053 message, not gdbserver.
12054
12055 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
12056 Nathan Sidwell <nathan@codesourcery.com>
12057 Joseph Myers <joseph@codesourcery.com>
12058
12059 * acinclude.m4: Include ../../config/acx.m4.
12060 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
12061 * configure, config.in: Regenerate.
12062 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
12063 * server.c (gdbserver_version): Print PKGVERSION.
12064 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
12065 (main): Adjust gdbserver_usage calls.
12066 * gdbreplay.c (version, host_name): Add declarations.
12067 (gdbreplay_version, gdbreplay_usage): New.
12068 (main): Accept --version and --help options.
12069
12070 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
12071
12072 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
12073 (arm_breakpoint_at): Handle Thumb.
12074 (the_low_target): Add comment.
12075
12076 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
12077
12078 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
12079
12080 2008-05-09 Doug Evans <dje@google.com>
12081
12082 * server.h (decode_search_memory_packet): Declare.
12083 * remote-utils.c (decode_search_memory_packet): New fn.
12084 * server.c (handle_search_memory_1): New fn.
12085 (handle_search_memory): New fn.
12086 (handle_query): Process qSearch:memory packets.
12087
12088 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
12089
12090 * regcache.c (registers_length): Remove.
12091 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
12092 full register packet.
12093 * regcache.h (registers_length): Remove prototype.
12094 * server.h (PBUFSIZ): Define to 16384.
12095
12096 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
12097
12098 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
12099 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
12100 powerpc-64l.o, and powerpc-altivec64l.o.
12101 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
12102 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
12103 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
12104 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
12105 rs6000/power-linux.xml, and rs6000/power64-linux.xml
12106 to srv_xmlfiles.
12107
12108 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
12109 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
12110 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
12111 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
12112 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
12113 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
12114 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
12115 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
12116 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
12117 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
12118 (clean): Update.
12119
12120 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
12121 (init_registers_powerpc_32l): ... this new prototype.
12122 (init_registers_powerpc_32): Remove, replace by ...
12123 (init_registers_powerpc_altivec32l): ... this new prototype.
12124 (init_registers_powerpc_e500): Remove, replace by ...
12125 (init_registers_powerpc_e500l): ... this new prototype.
12126 (init_registers_ppc64): Remove, replace by ...
12127 (init_registers_powerpc_64l): ... this new prototype.
12128 (init_registers_powerpc_64): Remove, replace by ...
12129 (init_registers_powerpc_altivec64l): ... this new prototype.
12130 (ppc_num_regs): Set to 73.
12131 (PT_ORIG_R3, PT_TRAP): Define if necessary.
12132 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
12133 (ppc_cannot_store_register): Handle orig_r3 and trap.
12134 (ppc_arch_setup): Update init_registers_... calls.
12135 (ppc_fill_gregset): Handle orig_r3 and trap.
12136
12137 * inferiors.c (clear_inferiors): Reset current_inferior.
12138
12139 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
12140
12141 * acinclude.m4: Add override.m4.
12142 * configure: Regenerate.
12143
12144 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12145
12146 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
12147 initial call to init_register_ppc64.
12148
12149 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12150
12151 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
12152 single powerpc*-*-linux* case.
12153 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
12154
12155 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
12156
12157 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
12158 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
12159 from reg_xmlfiles.
12160 * linux-ppc-low.c: Include <elf.h>.
12161 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
12162 (ppc_hwcap): New global variable.
12163 (ppc_regmap): Remove __SPE__ #ifdef sections.
12164 (ppc_regmap_e500): New global variable.
12165 (ppc_cannot_store_register): Update __SPE__ special case.
12166 (ppc_get_hwcap): New function.
12167 (ppc_arch_setup): Use it to determine whether inferior supports
12168 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
12169 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
12170 Do not access registers if target does not support AltiVec.
12171 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
12172 Do not access registers if target does not support SPE.
12173 (target_regsets): Unconditionally include AltiVec and SPE regsets.
12174
12175 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
12176
12177 * linux-low.c (disabled_regsets, num_regsets): New.
12178 (use_regsets_p): Delete.
12179 (linux_wait_for_process): Clear disabled_regsets.
12180 (regsets_fetch_inferior_registers): Check and set it.
12181 (regsets_store_inferior_registers): Likewise.
12182 (linux_fetch_registers, linux_store_registers): Do not use
12183 use_regsets_p.
12184 (initialize_low): Allocate disabled_regsets.
12185
12186 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
12187
12188 * Makefile.in (LIBOBJS): New.
12189 (OBS): Use LIBOBJS.
12190 (memmem.o): New rule.
12191 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
12192 * configure: Regenerated.
12193
12194 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
12195
12196 * server.c (handle_query): Never return "unsupported" for
12197 qXfer:features:read queries.
12198
12199 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
12200
12201 * server.c (get_features_xml): Fix inverted condition.
12202 (handle_query): Always support qXfer:feature:read.
12203
12204 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
12205
12206 * server.c (wrapper_argv): New.
12207 (start_inferior): Handle wrapper_argv. If set, expect an extra
12208 trap.
12209 (gdbserver_usage): Document --wrapper.
12210 (main): Parse --wrapper.
12211
12212 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12213
12214 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
12215 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
12216 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
12217 (ppc_set_pc): Likewise.
12218 (ppc_arch_setup): New function.
12219 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
12220 of collect_register.
12221 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
12222
12223 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12224
12225 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
12226 instead of linux-ppc64-low.o.
12227 * linux-ppc64-low.c: Remove file.
12228 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
12229 (linux-ppc64-low.o): Remove rule.
12230
12231 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
12232 (init_registers_powerpc_64): Likewise.
12233 (ppc_regmap): Conditionally define depending on __powerpc64__.
12234 (ppc_cannot_store_register): Do not special-case "fpscr" when
12235 compiled on __powerpc64__.
12236 (ppc_collect_ptrace_register): New function.
12237 (ppc_supply_ptrace_register): New function.
12238 (ppc_breakpoint): Change type to "unsigned int".
12239 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
12240 (the_low_target): Conditionally provide initializers for the
12241 arch_setup member depending on __powerpc64__. Install
12242 collect_ptrace_register and supply_ptrace_register members.
12243
12244 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12245
12246 * regcache.h (gdbserver_xmltarget): Add extern declaration.
12247 * server.c (gdbserver_xmltarget): Define.
12248 (get_features_xml): Use it to replace "target.xml" and arch_string.
12249
12250 * configure.srv: Remove srv_xmltarget. Add XML files that were
12251 mentioned there to srv_xmlfiles instead. Remove conditional tests
12252 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
12253 srv_xmlfiles and srv_regobj to include all possible choices.
12254 * configure.ac (srv_xmltarget): Remove.
12255 (srv_xmlfiles): Do not add "target.xml".
12256 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
12257 checks for supplementary target information.
12258 * configure: Regenerate.
12259 * Makefile.in (XML_TARGET): Remove.
12260 (target.xml): Remove rule.
12261 (clean): Do not clean up target.xml.
12262 (.PRECIOUS): Do not mention target.xml.
12263
12264 * target.h (struct target_ops): Remove arch_string member.
12265 * linux-low.c (linux_arch_string): Remove.
12266 (linux_target_ops): Remove arch_string initializer.
12267 * linux-low.h (struct linux_target_ops): Remove arch_string member.
12268 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
12269 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
12270 * spu-low.c (spu_arch_string): Remove.
12271 (spu_target_ops): Remove arch_string initializer.
12272 * win32-low.c (win32_arch_string): Remove.
12273 (win32_target_ops): Remove arch_string initializer.
12274 * win32-low.h (struct win32_target_ops): Remove arch_string member.
12275 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
12276 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
12277
12278 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12279
12280 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
12281 by collect_ptrace_register and supply_ptrace_register hooks.
12282 * linux-low.c (fetch_register): Use supply_ptrace_register callback
12283 instead of checking for the_low_target.left_pad_xfer.
12284 (usr_store_inferior_registers): Use collect_ptrace_register callback
12285 instead of checking for the_low_target.left_pad_xfer.
12286
12287 * linux-s390-low.c (s390_collect_ptrace_register): New function.
12288 (s390_supply_ptrace_register): Likewise.
12289 (s390_fill_gregset): Call s390_collect_ptrace_register.
12290 (the_low_target): Update.
12291
12292 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
12293 (ppc_supply_ptrace_register): Likewise.
12294 (the_low_target): Update.
12295
12296 * linux-i386-low.c (the_low_target): Update.
12297 * linux-x86-64-low.c (the_low_target): Update.
12298
12299 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12300
12301 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
12302 reg-s390.o and reg-s390x.o.
12303
12304 * linux-low.c (new_inferior): New global variable.
12305 (linux_create_inferior, linux_attach): Set it.
12306 (linux_wait_for_process): Call the_low_target.arch_setup after the
12307 target has stopped for the first time.
12308 (initialize_low): Do not call the_low_target.arch_setup.
12309
12310 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
12311 (s390_set_pc): Likewise.
12312 (s390_arch_setup): New function.
12313 (the_low_target): Use s390_arch_setup as arch_setup routine.
12314
12315 * regcache.c (realloc_register_cache): New function.
12316 (set_register_cache): Call it for each existing regcache.
12317
12318 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12319
12320 * server.h (init_registers): Remove prototype.
12321
12322 * linux-low.h (struct linux_target_ops): Add arch_setup field.
12323 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
12324 instead of init_registers ().
12325 * linux-arm-low.c (init_registers_arm): Add prototype.
12326 (init_registers_arm_with_iwmmxt): Likewise.
12327 (the_low_target): Add initializer for arch_setup field.
12328 * linux-cris-low.c (init_registers_cris): Add prototype.
12329 (the_low_target): Add initializer for arch_setup field.
12330 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
12331 (the_low_target): Add initializer for arch_setup field.
12332 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
12333 (the_low_target): Add initializer for arch_setup field.
12334 * linux-ia64-low.c (init_registers_ia64): Add prototype.
12335 (the_low_target): Add initializer for arch_setup field.
12336 * linux-m32r-low.c (init_registers_m32r): Add prototype.
12337 (the_low_target): Add initializer for arch_setup field.
12338 * linux-m68k-low.c (init_registers_m68k): Add prototype.
12339 (the_low_target): Add initializer for arch_setup field.
12340 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
12341 (init_registers_mips64_linux): Likewise.
12342 (the_low_target): Add initializer for arch_setup field.
12343 * linux-ppc-low.c (init_registers_ppc): Add prototype.
12344 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
12345 (the_low_target): Add initializer for arch_setup field.
12346 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
12347 (init_registers_powerpc_64): Likewise.
12348 (the_low_target): Add initializer for arch_setup field.
12349 * linux-s390-low.c (init_registers_s390): Add prototype.
12350 (init_registers_s390x): Likewise.
12351 (the_low_target): Add initializer for arch_setup field.
12352 * linux-sh-low.c (init_registers_sh): Add prototype.
12353 (the_low_target): Add initializer for arch_setup field.
12354 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
12355 (the_low_target): Add initializer for arch_setup field.
12356 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
12357 (the_low_target): Add initializer for arch_setup field.
12358
12359 * win32-low.h (struct win32_target_ops): Add arch_setup field.
12360 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
12361 instead of init_registers ().
12362 * win32-arm-low.c (init_registers_arm): Add prototype.
12363 (the_low_target): Add initializer for arch_setup field.
12364 * win32-i386-low.c (init_registers_i386): Add prototype.
12365 (the_low_target): Add initializer for arch_setup field.
12366
12367 * spu-low.c (init_registers_spu): Add prototype.
12368 (initialize_low): Call initialie_registers_spu () instead of
12369 initialize_registers ().
12370
12371 2008-02-19 Pedro Alves <pedro@codesourcery.com>
12372
12373 * server.c (handle_v_requests): When handling the vRun and vAttach
12374 packets, if already debugging a process, don't kill it. Return an
12375 error instead.
12376
12377 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
12378
12379 * server.c (handle_query): Correct length check.
12380
12381 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
12382
12383 * win32-low.c (do_initial_child_stuff): Add process handle
12384 parameter. Set current_process_handle and current_process_id from the
12385 parameters. Clear globals.
12386 (win32_create_inferior): Don't set current_process_handle and
12387 current_process_id here. Instead pass them on the call to
12388 do_initial_child_stuff.
12389 (win32_attach): Likewise.
12390 (win32_clear_inferiors): New.
12391 (win32_kill): Don't close the current process handle or the
12392 current thread handle here. Instead call win32_clear_inferiors.
12393 (win32_detach): Don't open a new handle to the process. Call
12394 win32_clear_inferiors.
12395 (win32_join): Don't rely on current_process_handle; open a new
12396 handle using the process id.
12397 (win32_wait): Call win32_clear_inferiors when the inferior process
12398 has exited.
12399
12400 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
12401
12402 * server.c (monitor_show_help): Add "exit".
12403
12404 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
12405
12406 * Makefile.in (SFILES): Add linux-xtensa-low.c.
12407 (clean): Add reg-xtensa.c.
12408 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
12409 * configure.srv (xtensa*-*-linux*) New target.
12410 * linux-xtensa-low.c: New.
12411 * xtensa-xtregs.c: New.
12412
12413 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
12414
12415 * hostio.c: Don't include errno.h.
12416 (errno_to_fileio_errno): Move to hostio-errno.
12417 * hostio.c: (hostio_error): Remove the error parameter. Defer the
12418 error number outputting to the target->hostio_last_error callback.
12419 (hostio_packet_error): Use FILEIO_EINVAL directly.
12420 (handle_open, handle_pread, hostio_error, handle_unlink): Update
12421 calls to hostio_error.
12422 * hostio-errno.c: New.
12423 * server.h (hostio_last_error_from_errno): Declare.
12424 * target.h (target_ops): Add hostio_last_error member.
12425 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
12426 as hostio_last_error handler.
12427 * spu-low.c (spu_target_ops): Likewise.
12428 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
12429 (wince_hostio_last_error): New functions.
12430 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
12431 as hostio_last_error handler.
12432 (win32_target_ops) [!_WIN32_WCE]: Register
12433 hostio_last_error_from_errno as hostio_last_error handler.
12434 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
12435 (hostio-errno.o): New rule.
12436 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
12437 * configure.srv (srv_hostio_err_objs): New variable. Default to
12438 hostio-errno.o.
12439 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
12440 * configure: Regenerate.
12441
12442 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12443
12444 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
12445 (linux_kill, linux_detach): Clean up the process list.
12446 * remote-utils.c (remote_open): Improve port number parsing.
12447 (putpkt_binary, input_interrupt): Only send interrupts if the target
12448 is running.
12449 * server.c (extended_protocol): Make static.
12450 (attached): Define earlier.
12451 (exit_requested, response_needed, program_argv): New variables.
12452 (target_running): New.
12453 (start_inferior): Clear attached here.
12454 (attach_inferior): Set attached here.
12455 (require_running): Define.
12456 (handle_query): Use require_running and target_running. Implement
12457 "monitor exit".
12458 (handle_v_attach, handle_v_run): New.
12459 (handle_v_requests): Use require_running. Handle vAttach and vRun.
12460 (gdbserver_usage): Update.
12461 (main): Redo argument parsing. Handle --debug and --multi. Handle
12462 --attach along with other options or after the port. Save
12463 program_argv. Support no initial program. Resynchronize
12464 communication with GDB after an error. Handle "monitor exit".
12465 Use require_running and target_running. Always allow the extended
12466 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
12467 restart in extended mode.
12468 * README: Refer to the GDB manual. Update --attach usage.
12469
12470 2007-12-20 Andreas Schwab <schwab@suse.de>
12471
12472 * linux-low.c (STACK_SIZE): Define.
12473 (linux_tracefork_child): Use it. Use __clone2 on ia64.
12474 (linux_test_for_tracefork): Likewise.
12475
12476 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
12477
12478 * linux-low.c (linux_wait_for_event): Update messages. Do not
12479 reinsert auto-delete breakpoints.
12480 * mem-break.c (struct breakpoint): Change return type of handler to
12481 int.
12482 (set_breakpoint_at): Update handler type.
12483 (reinsert_breakpoint_handler): Return 1 instead of calling
12484 delete_breakpoint.
12485 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
12486 setting a new one.
12487 (check_breakpoints): Delete auto-delete breakpoints and return 2.
12488 * mem-break.h (set_breakpoint_at): Update handler type.
12489 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
12490 * win32-low.c (auto_delete_breakpoint): New.
12491 (get_child_debug_event): Use it.
12492
12493 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
12494
12495 * configure.ac: Check for pread and pwrite.
12496 * hostio.c (handle_pread): Fall back to lseek and read.
12497 (handle_pwrite): Fall back to lseek and write.
12498 * config.in, configure: Regenerated.
12499
12500 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
12501
12502 * server.c (myresume): Add own_buf argument.
12503 (main): Update calls.
12504
12505 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
12506
12507 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
12508 * remote-utils.c (remote_open): Do not call disable_async_io.
12509 (block_async_io): Delete.
12510 (unblock_async_io): Make static.
12511 (initialize_async_io): New.
12512 * server.c (handle_v_cont): Handle async I/O here.
12513 (myresume): Likewise. Move other common resume tasks here...
12514 (main): ... from here. Call initialize_async_io. Disable async
12515 I/O before the main loop.
12516 * server.h (initialize_async_io): Declare.
12517 (block_async_io, unblock_async_io): Delete prototypes.
12518 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
12519
12520 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
12521
12522 * remote-utils.c (readchar): Allow binary data in received messages.
12523
12524 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12525
12526 * win32-low.c (attaching): New global.
12527 (win32_create_inferior): Clear the `attaching' global.
12528 (win32_attach): Set the `attaching' global.
12529 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
12530 attaching. Only set a breakpoint at the entry point if not
12531 attaching.
12532
12533 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12534
12535 * server.c (main): Don't report dll events on the initial
12536 connection on attaches.
12537
12538 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12539
12540 * server.c (main): Relax numerical bases supported for the pid of
12541 the --attach command line argument.
12542
12543 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12544
12545 * win32-low.c (win32_attach): Call OpenProcess before
12546 DebugActiveProcess, not after. Add last error output to error
12547 call.
12548
12549 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12550
12551 * win32-low.c (win32_get_thread_context)
12552 (win32_set_thread_context): New functions.
12553 (thread_rec): Use win32_get_thread_context.
12554 (continue_one_thread, win32_resume): Use win32_set_thread_context.
12555 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
12556 field.
12557
12558 2007-12-03 Leo Zayas
12559 Pedro Alves <pedro_alves@portugalmail.pt>
12560
12561 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
12562 global variables.
12563 (child_add_thread): Minor cleanup.
12564 (child_continue): Resume artificially suspended threads before
12565 calling ContinueDebugEvent.
12566 (suspend_one_thread): New.
12567 (fake_breakpoint_event): New.
12568 (get_child_debug_event): Change return type to int. Check here if
12569 gdb sent an interrupt request. If a soft interrupt was requested,
12570 fake a breakpoint event. Return 0 if there is no event to handle,
12571 and 1 otherwise.
12572 (win32_wait): Don't check here if gdb sent an interrupt request.
12573 Ensure there is a valid event to handle.
12574 (win32_request_interrupt): Add soft interruption method as last
12575 resort.
12576
12577 2007-12-03 Leo Zayas
12578 Pedro Alves <pedro_alves@portugalmail.pt>
12579
12580 * win32-low.h (win32_thread_info): Add descriptions to the
12581 structure members. Replace `suspend_count' counter by a
12582 `suspended' flag.
12583 * win32-low.c (thread_rec): Update condition of when to get the
12584 context from the inferior. Rely on ContextFlags being set if it
12585 has already been retrieved. Only suspend the inferior thread if
12586 we haven't already. Warn if that fails.
12587 (continue_one_thread): s/suspend_count/suspended/. Only call
12588 ResumeThread once. Warn if that fails.
12589
12590 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12591
12592 * win32-low.c (win32_wait): Don't read from the inferior when it
12593 has already exited.
12594
12595 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12596
12597 * Makefile.in (win32_low_h): New variable.
12598 (win32-low.o): Add dependency on $(win32_low_h).
12599 (win32-arm-low.o, win32-i386-low.o): New rules.
12600
12601 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12602
12603 * hostio.c: Correct copyright year.
12604
12605 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12606
12607 * Makefile.in (OBS): Add hostio.o.
12608 (hostio.o): New rule.
12609 * server.h (handle_vFile): Declare.
12610 * hostio.c: New file.
12611 * server.c (handle_v_requests): Take packet_len and new_packet_len
12612 for binary packets. Call handle_vFile.
12613 (main): Update call to handle_v_requests.
12614
12615 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
12616
12617 * linux-low.c: Include <sched.h>.
12618
12619 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
12620
12621 * linux-low.c (linux_tracefork_grandchild): New.
12622 (linux_tracefork_child): Use clone.
12623 (linux_test_for_tracefork): Use clone; allocate and free a stack.
12624
12625 2007-10-31 Joel Brobecker <brobecker@adacore.com>
12626
12627 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
12628
12629 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
12630
12631 * linux-low.c (handle_extended_wait): Handle unexpected signals.
12632
12633 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
12634
12635 * inferiors.c (change_inferior_id): Delete.
12636 (add_pid_to_list, pull_pid_from_list): New.
12637 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
12638 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
12639 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
12640 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
12641 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
12642 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
12643 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
12644 (using_threads): Always set to 1.
12645 (handle_extended_wait): New.
12646 (add_process): Do not set TID.
12647 (linux_create_inferior): Set must_set_ptrace_flags.
12648 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
12649 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
12650 (linux_thread_alive): Rename TID argument to LWPID.
12651 (linux_wait_for_process): Handle unknown processes. Do not use TID.
12652 (linux_wait_for_event): Do not use TID or check using_threads. Update
12653 call to dead_thread_notify. Call handle_extended_wait.
12654 (linux_create_inferior): Use PTRACE_SETOPTIONS.
12655 (send_sigstop): Delete sigstop_sent.
12656 (wait_for_sigstop): Avoid TID.
12657 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
12658 (linux_test_for_tracefork): New.
12659 (linux_lookup_signals): Use thread_db_active and
12660 linux_supports_tracefork_flag.
12661 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
12662 * linux-low.h (get_process_thread): Avoid TID.
12663 (struct process_ifo): Move thread_known and tid to the end. Remove
12664 sigstop_sent.
12665 (linux_attach_lwp, thread_db_init): Update prototypes.
12666 * server.h (change_inferior_id): Delete prototype.
12667 (add_pid_to_list, pull_pid_from_list): New prototypes.
12668 * thread-db.c (thread_db_use_events): New.
12669 (find_first_thread): Rename to...
12670 (find_one_thread): ...this. Update callers and messages. Do not
12671 call fatal. Check thread_db_use_events. Do not call
12672 change_inferior_id or new_thread_notify.
12673 (maybe_attach_thread): Update. Do not call new_thread_notify.
12674 (thread_db_init): Set thread_db_use_events. Check use_events.
12675 * utils.c (fatal, warning): Correct message prefix.
12676
12677 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
12678
12679 * Makefile.in (clean): Remove new files.
12680 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
12681 (powerpc-64.o, powerpc-64.c): New rules.
12682 * configure.srv: Use alternate register sets for powerpc64-*-linux*
12683 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
12684 with SPE.
12685 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
12686 SPE targets.
12687 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
12688 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
12689 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
12690 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
12691 (target_regsets): Add AltiVec and SPE register sets.
12692 * configure.ac: Check for AltiVec and SPE.
12693 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
12694 (ppc_fill_vrregset, ppc_store_vrregset): New.
12695 (target_regsets): Add AltiVec register set.
12696 * configure: Regenerated.
12697
12698 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
12699
12700 * linux-low.c (O_LARGEFILE): Define.
12701 (linux_read_memory): Use /proc/PID/mem.
12702 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
12703 * configure, config.in: Regenerated.
12704
12705 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12706
12707 * linux-low.c (linux_wait_for_event): Do not pass signals while
12708 single-stepping.
12709
12710 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12711
12712 * win32-low.c (create_process): New.
12713 (win32_create_inferior): Use create_process instead of
12714 CreateProcess. If create_process failed retry appending an ".exe"
12715 suffix. Store the GetLastError result immediatelly after
12716 create_process calls and use it on the call to error.
12717
12718 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12719
12720 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
12721
12722 2007-08-23 Joel Brobecker <brobecker@adacore.com>
12723
12724 * configure.ac: Switch license to GPLv3.
12725
12726 2007-08-01 Michael Snyder <msnyder@access-company.com>
12727
12728 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
12729
12730 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
12731
12732 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
12733 typedef.
12734 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
12735 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
12736 CloseToolhelp32Snapshot.
12737 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
12738 CloseToolhelp32Snapshot.
12739
12740 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
12741
12742 * server.c (main): Check for inferior exit before main loop.
12743
12744 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
12745
12746 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
12747 instead of on tmp_desc.
12748
12749 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
12750 Daniel Jacobowitz <dan@codesourcery.com>
12751
12752 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
12753 (add_thread): Minor cleanups.
12754 (clear_inferiors): Move lower in the file. Clear the DLL
12755 list.
12756 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
12757 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
12758 (xml_escape_text): New.
12759 * server.c (handle_query): Handle qXfer:libraries:read. Report it
12760 for qSupported.
12761 (handle_v_cont): Report errors.
12762 (gdbserver_version): Update.
12763 (main): Correct size of own_buf. Do not report initial DLL events.
12764 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
12765 (unloaded_dll, xml_escape_text): New.
12766 * win32-low.c (enum target_waitkind): Update comments.
12767 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
12768 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
12769 (win32_EnumProcessModules, win32_GetModuleInformation)
12770 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
12771 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
12772 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
12773 (win32_Module32First, win32_Module32Next, load_toolhelp)
12774 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
12775 (get_child_debug_event): Handle DLL events.
12776 (win32_wait): Likewise.
12777
12778 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12779
12780 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
12781 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
12782
12783 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12784
12785 * win32-low.c (handle_output_debug_string): Ignore event if not
12786 waiting.
12787
12788 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12789
12790 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
12791
12792 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
12793
12794 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
12795
12796 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
12797
12798 * inferiors.c (change_inferior_id): Add comment.
12799 * linux-low.c (check_removed_breakpoint): Add an early
12800 prototype. Improve debug output.
12801 (linux_attach): Doc update.
12802 (linux_detach_one_process, linux_detach): Clean up before releasing
12803 each process.
12804 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
12805 * linux-low.h (struct process_info): Doc improvement.
12806 * mem-break.c (delete_all_breakpoints): New.
12807 * mem-break.h (delete_all_breakpoints): New prototype.
12808 * thread-db.c (find_first_thread): New.
12809 (thread_db_create_event): Call it instead of
12810 thread_db_find_new_threads. Clean up unused variables.
12811 (maybe_attach_thread): Remove first thread handling.
12812 (thread_db_find_new_threads): Use find_first_thread.
12813 (thread_db_get_tls_address): Likewise.
12814
12815 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
12816
12817 * thread-db.c (thread_db_find_new_threads): Add prototype.
12818 (thread_db_create_event): Check for the main thread before adding
12819 a new thread.
12820 (maybe_attach_thread): Only enable event reporting if TID == 0.
12821 (thread_db_get_tls_address): Check for new threads.
12822
12823 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
12824
12825 * linux-low.c (linux_create_inferior): Try execv before execvp.
12826 * spu-low.c (spu_create_inferior): Likewise.
12827
12828 2007-06-13 Mike Frysinger <vapier@gentoo.org>
12829
12830 * linux-low.c (linux_create_inferior): Change execv to execvp.
12831 * spu-low.c (spu_create_inferior): Likewies.
12832
12833 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
12834
12835 * Makefile.in (clean): Clean new files instead of deleted ones.
12836 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
12837 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
12838 rules.
12839 * configure.srv: Specify XML files and new regformats for MIPS and
12840 MIPS64 GNU/Linux.
12841 * linux-mips-low.c (mips_num_regs): Set to only used registers.
12842 (mips_regmap): Do not fetch $0. Remove unused registers. Add
12843 an entry for the restart register.
12844 (mips_cannot_fetch_register, mips_cannot_store_register)
12845 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
12846 register names to match the XML descriptions.
12847 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
12848 restart register instead of $0.
12849
12850 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
12851 Markus Deuling <deuling@de.ibm.com>
12852
12853 * remote-utils.c (decode_xfer_write): New function.
12854 * server.h (decode_xfer_write): Add prototype.
12855 * server.c (handle_query): Add PACKET_LEN argument. Support
12856 qXfer:spu:read and qXfer:spu:write packets.
12857 (main): Pass packet_len to handle_query.
12858 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
12859 * target.h (target_ops): Add qxfer_spu.
12860
12861 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
12862
12863 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
12864 accessing non-seekable spufs files.
12865
12866 2007-05-16 Markus Deuling <deuling@de.ibm.com>
12867
12868 * server.c (handle_query): Add reply for qC packet.
12869
12870 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12871 Leo Zayas <lerele@champenstudios@com>
12872
12873 * server.h (check_remote_input_interrupt_request): New function.
12874 * remote_utils.c (INVALID_DESCRIPTOR): New define.
12875 (remote_desc): Initialize with INVALID_DESCRIPTOR.
12876 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
12877 (check_remote_input_interrupt_request): New function.
12878 * server.h (check_remote_input_interrupt_request): Declare.
12879 * win32-low.c (winapi_DebugBreakProcess,
12880 winapi_GenerateConsoleCtrlEvent): New typedefs.
12881 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
12882 to 250 ms.
12883 (win32_wait): Check for remote interrupt request
12884 with check_remote_input_interrupt_request.
12885 (win32_request_interrupt): New function.
12886 (win32_target_op): Set request_interrupt to win32_request_interrupt.
12887
12888 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12889
12890 * win32-low.c (debug_registers_changed,
12891 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
12892 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
12893 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
12894 (thread_rec): Get context using the low target.
12895 (child_add_thread): Call thread_added on the low target,
12896 which does the same thing.
12897 (regptr): Delete.
12898 (do_initial_child_stuff): Remove debug registers references.
12899 Set context using the low target. Resume threads after
12900 setting the contexts.
12901 (child_continue): Remove dead variable. Remove debug
12902 registers references.
12903 (child_fetch_inferior_registers): Go through the low target.
12904 (do_child_store_inferior_registers): Remove.
12905 (child_store_inferior_registers): Go through the low target.
12906 (win32_resume): Remove debug registers references.
12907 Set context using the low target.
12908 (handle_exception): Change return type to void. Don't record
12909 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
12910 first chance exception.
12911 (get_child_debug_event): Change return type to void. Remove
12912 goto loop. Always return after waiting for debug event.
12913 (win32_wait): Convert to switch statement. Handle spurious
12914 events.
12915
12916 * win32-i386-low.c (debug_registers_changed,
12917 debug_registers_used): New.
12918 (initial_stuff): Rename to ...
12919 (i386_initial_stuff): ... this. Clear debug registers
12920 state variables.
12921 (store_debug_registers): Delete.
12922 (i386_get_thread_context): New.
12923 (load_debug_registers): Delete.
12924 (i386_set_thread_context): New.
12925 (i386_thread_added): New.
12926 (single_step): Rename to ...
12927 (i386_single_step): ... this.
12928 (do_fetch_inferior_registers): Rename to ...
12929 (i386_fetch_inferior_register): ... this.
12930 (i386_store_inferior_register): New.
12931 (the_low_target): Adapt to new interface.
12932
12933 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
12934 (arm_get_thread_context): New.
12935 (arm_set_thread_context): New.
12936 (regptr): New.
12937 (do_fetch_inferior_registers): Rename to ...
12938 (arm_fetch_inferior_register): ... this.
12939 (arm_store_inferior_register): New.
12940 (arm_wince_breakpoint): Reimplement as unsigned long.
12941 (arm_wince_breakpoint_len): Define.
12942 (the_low_target): Adapt to new interface.
12943
12944 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
12945 load_debug_registers. Add get_thread_context, set_thread_context,
12946 thread_added and store_inferior_register. Rename
12947 fetch_inferior_registers to fetch_inferior_register.
12948 (regptr): Remove declaration.
12949
12950 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12951
12952 * linux-low.c (linux_detach): Change return type to int. Return 0.
12953 * spu-low.c (spu_detach): Likewise.
12954
12955 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12956
12957 * target.h (target_ops): Change return type of detach to int.
12958 Add join.
12959 (join_inferior): New.
12960 * server.c (main): Don't skip detach support on mingw32.
12961 If the inferior doesn't support detaching return error.
12962 Call join_inferior instead of using waitpid.
12963 * linux-low.c (linux_join): New.
12964 (linux_target_op): Add linux_join.
12965 * spu-low.c (spu_join): New.
12966 (spu_target_ops): Add spu_join.
12967 * win32-low.c (win32_detach): Adapt to new interface.
12968 Reopen current_process_handle before detaching. Issue a child
12969 resume before detaching.
12970 (win32_join): New.
12971 (win32_target_op): Add win32_join.
12972
12973 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12974
12975 * win32-low.c (win32-attach): Fix return value.
12976 * target.h (target_ops): Describe ATTACH return values.
12977
12978 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12979
12980 * win32-low.c (GETPROCADDRESS): Define.
12981 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
12982 (winapi_DebugSetProcessKillOnExit): Likewise.
12983 (win32_create_inferior): Force usage of ansi CreateProcessA.
12984 (win32_attach): Use GETPROCADDRESS.
12985 (win32_detach): Likewise.
12986
12987 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12988
12989 * win32-low.c (win32_wait): Don't use WSTOPSIG.
12990
12991 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
12992
12993 * win32-low.c: Commit leftover changes from 2007-03-29.
12994
12995 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
12996
12997 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
12998 fields short instead of int. Add explicit padding.
12999 (i387_cache_to_fsave): Remove unnecessary casts.
13000 (i387_fsave_to_cache): Doc fix.
13001 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
13002
13003 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13004
13005 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
13006 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
13007
13008 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13009
13010 * configure.srv (arm*-*-mingw32ce*): Move near the other
13011 arm targets.
13012
13013 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13014
13015 * configure.ac: Add errno checking.
13016 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
13017 sys/file.h and malloc.h.
13018 (AC_CHECK_DECLS): Add perror.
13019 (srv_mingwce): Handle.
13020 * configure.srv (i[34567]86-*-cygwin*): Add
13021 win32-i386-low.o to srv_tgtobj.
13022 (i[34567]86-*-mingw*): Likewise.
13023 (arm*-*-mingw32ce*): Add case.
13024 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13025 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
13026 [__MINGW32CE__] (strerror): New function.
13027 [__MINGW32CE__] (errno): Define to GetLastError.
13028 [__MINGW32CE__] (COUNTOF): New macro.
13029 (remote_open): Remove extra close call.
13030 * mem-break.c (delete_breakpoint_at): New function.
13031 * mem-break.h (delete_breakpoint_at): Declare.
13032 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13033 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
13034 [USE_WIN32API] (read, write): Add char* casts.
13035 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
13036 * server.h: Include wincecompat.h on Windows CE.
13037 [HAVE_ERRNO_H]: Check.
13038 (perror): Declare if not declared.
13039 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
13040 (perror_with_name): Remove errno declaration.
13041 * wincecompat.h: New.
13042 * wincecompat.c: New.
13043 * win32-low.h: New.
13044 * win32-arm-low.c: New.
13045 * win32-i386-low.c: New.
13046 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
13047 (OUTMSG2): Make it safe.
13048 (_T): New macro.
13049 (COUNTOF): New macro.
13050 (NUM_REGS): Get it from the low target.
13051 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
13052 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
13053 (thread_rec): Let low target handle debug registers.
13054 (child_add_thread): Likewise.
13055 (child_init_thread_list): Likewise.
13056 (continue_one_thread): Likewise.
13057 (regptr): New.
13058 (do_child_fetch_inferior_registers): Move to ...
13059 * win32-i386-low.c: ... here, and rename to ...
13060 (do_fetch_inferior_registers): ... this.
13061 * win32-low.c (child_fetch_inferior_registers):
13062 Go through the low target.
13063 (do_child_store_inferior_registers): Use regptr.
13064 (strwinerror): New function.
13065 (win32_create_inferior): Handle Windows CE.
13066 Use strwinerror instead of strerror on Windows error
13067 codes. Add program to the error output.
13068 Don't close the main thread handle on Windows CE.
13069 (win32_attach): Use coredll.dll on Windows CE.
13070 (win32_kill): Close current process and current
13071 thread handles.
13072 (win32_detach): Use coredll.dll on Windows CE.
13073 (win32_resume): Let low target handle debug registers, and
13074 step request.
13075 (handle_exception): Add/Remove initial breakpoint. Avoid
13076 non-existant WSTOPSIG on Windows CE.
13077 (win32_read_inferior_memory): Cast to remove warning.
13078 (win32_arch_string): Go through the low target.
13079 (initialize_low): Call set_breakpoint_data with the low
13080 target's breakpoint.
13081 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
13082 FOP_REGNUM, mappings): Move to ...
13083 * win32-i386-low.c: ... here.
13084 * win32-low.c (win32_thread_info): Move to ...
13085 * win32-low.h: ... here.
13086 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
13087 win32-arm-low.c and wincecompat.c.
13088 (all:): Add $EXEEXT.
13089 (install-only:): Likewise.
13090 (gdbserver:): Likewise.
13091 (gdbreplay:): Likewise.
13092 * config.in: Regenerate.
13093 * configure: Regenerate.
13094
13095 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13096
13097 * win32-low.c: Rename typedef thread_info to
13098 win32_thread_info throughout.
13099
13100 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13101
13102 * win32-i386-low.c: Rename to ...
13103 * win32-low.c: ... this.
13104 * configure.srv: Replace win32-i386-low.o with win32-low.o.
13105 * Makefile.in: Likewise.
13106
13107 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
13108
13109 * remote-utils.c (monitor_output): Constify msg parameter.
13110 * server.h (monitor_output): Likewise.
13111 * win32-i386-low.c (handle_output_debug_string): New.
13112 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
13113 handle_output_debug_string.
13114 (get_child_debug_event): Likewise.
13115
13116 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
13117
13118 * server.c (main): Correct strtoul check.
13119
13120 2007-03-27 Jon Ringle <jon@ringle.org>
13121
13122 * linux-low.c: Check __ARCH_HAS_MMU__ also.
13123
13124 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
13125
13126 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
13127
13128 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
13129
13130 * terminal.h: Check HAVE_SGTTY_H.
13131
13132 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
13133
13134 * remote-utils.c (remote_open): Print out the assigned port number.
13135
13136 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
13137
13138 * remote-utils.c (monitor_output): New function.
13139 * server.c (debug_threads): Define here.
13140 (monitor_show_help): New function.
13141 (handle_query): Handle qRcmd.
13142 (main): Do not handle 'd' packet.
13143 * server.h (debug_threads, remote_debug, monitor_output): Declare.
13144 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
13145 of debug_threads.
13146
13147 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13148
13149 * Makefile.in (EXEEXT): New.
13150 (clean): Use $(EXEEXT).
13151
13152 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13153
13154 * target.h (target_ops): Rename send_signal to request_interrupt,
13155 and remove enum target_signal parameter.
13156 * linux-low.c (linux_request_interrupt): Rename from
13157 linux_send_signal, and always send SIGINT.
13158 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
13159 and always send SIGINT.
13160 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
13161 of send_signal.
13162 (input_interrupt): Likewise.
13163
13164 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13165
13166 * server.c (get_features_xml): Check if target implemented
13167 arch_string.
13168 * win32-i386-low.c (win32_arch_string): New.
13169 (win32_target_ops): Add win32_arch_string as arch_string member.
13170
13171 2007-02-22 Markus Deuling <deuling@de.ibm.com>
13172
13173 * spu-low.c (spu_arch_string): New.
13174 (spu_target_ops): Add spu_arch_string.
13175
13176 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
13177
13178 * remote-utils.c: Remove HAVE_TERMINAL_H check.
13179 * configure.ac: Do not check for terminal.h.
13180 * configure, config.in: Regenerated.
13181
13182 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13183
13184 * Makefile.in (OBS): Add $(XML_BUILTIN).
13185 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
13186 (clean): Update.
13187 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
13188 (arm-with-iwmmxt.c): New.
13189 * config.in, configure: Regenerate.
13190 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
13191 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
13192 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
13193 (arm*-*-linux*): Add iWMMXt and regset support.
13194 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
13195 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
13196 (arm_store_wmmxregset, target_regsets): New.
13197 * server.c (get_features_xml): Take annex argument. Check builtin
13198 XML documents.
13199 (handle_query): Handle multiple annexes.
13200
13201 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13202
13203 * remote-utils.c [USE_WIN32API] (read, write): Define.
13204 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
13205 write.
13206
13207 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
13208
13209 * linux-i386-low.c (the_low_target): Set arch_string.
13210 * linux-x86-64-low.c (the_low_target): Likewise.
13211 * linux-low.c (linux_arch_string): New.
13212 (linux_target_ops): Add it.
13213 * linux-low.h (struct linux_target_ops): Add arch_string.
13214 * server.c (write_qxfer_response): Use const void * for DATA.
13215 (get_features_xml): New.
13216 (handle_query): Handle qXfer:features:read. Report it for qSupported.
13217 * target.h (struct target_ops): Add arch_string method.
13218
13219 2007-01-03 Denis Pilat <denis.pilat@st.com>
13220 Daniel Jacobowitz <dan@codesourcery.com>
13221
13222 * linux-low.c (linux_kill): Handle being called with no threads.
13223 * win32-i386-low.c (win32_kill): Likewise.
13224 (get_child_debug_event): Clear current_process_handle.
13225
13226 2006-12-30 Denis PILAT <denis.pilat@st.com>
13227 Daniel Jacobowitz <dan@codesourcery.com>
13228
13229 * remote-utils.c (remote_open): Check the type of specified
13230 serial port devices before opening them.
13231 * server.c (main): Kill the inferior if an error occurs during
13232 the first remote_open.
13233
13234 2006-12-05 Markus Deuling <deuling@de.ibm.com>
13235
13236 * README: Update supported targets.
13237
13238 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
13239
13240 * Makefile.in (clean): Remove reg-mips64.c.
13241 (reg-mips64.c, reg-mips64.o): New rules.
13242 * configure.srv: Handle mips64. Include regset support for mips.
13243 * linux-mips-low.c (union mips_register): New.
13244 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
13245 (mips_breakpoint, mips_breakpoint_at): Use int.
13246 (mips_collect_register, mips_supply_register)
13247 (mips_collect_register_32bit, mips_supply_register_32bit)
13248 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13249 (mips_store_fpregset, target_regsets): New.
13250 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
13251
13252 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
13253
13254 * configure.srv: Add target "spu*-*-*".
13255 * Makefile.in (clean): Remove reg-spu.c.
13256 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
13257 * spu-low.c: New file.
13258
13259 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13260
13261 * configure.ac: Correct td_thr_tls_get_addr test.
13262 * configure: Regenerated.
13263
13264 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13265
13266 * linux-low.c (linux_wait_for_event): Reformat. Use the
13267 pass_signals array.
13268 * remote-utils.c (decode_address_to_semicolon): New.
13269 * server.c (pass_signals, handle_general_set): New.
13270 (handle_query): Mention QPassSignals for qSupported.
13271 (main): Call handle_general_set.
13272 * server.h (pass_signals, decode_address_to_semicolon): New.
13273
13274 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
13275
13276 * server.c (handle_query): Correct error handling for read_auxv.
13277
13278 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
13279
13280 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
13281 and srv_linux_thread_db to yes.
13282 * linux-s390-low.c (s390_fill_gregset): New function.
13283 (target_regsets): Define data structure.
13284
13285 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
13286
13287 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
13288 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
13289 * config.in, configure: Regenerated.
13290 * inferiors.c (gdb_id_to_thread): New function.
13291 (gdb_id_to_thread_id): Use it.
13292 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
13293 * linux-low.h (struct process_info): Add th member.
13294 (thread_db_get_tls_address): New prototype.
13295 * remote-utils.c (decode_address): Make non-static.
13296 * server.c (handle_query): Handle qGetTLSAddr.
13297 * server.h (gdb_id_to_thread, decode_address): New prototypes.
13298 * target.h (struct target_ops): Add get_tls_address.
13299 * thread-db.c (maybe_attach_thread): Save the thread handle.
13300 (thread_db_get_tls_address): New.
13301
13302 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
13303
13304 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
13305 (linux_resume_one_process): Take a siginfo_t *. Update all
13306 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
13307 (struct pending_signals): Add a siginfo_t.
13308 (linux_wait_for_process): Always set last_status.
13309 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
13310 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
13311 * linux-low.h (struct process_info): Add last_status.
13312
13313 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
13314
13315 * remote-utils.c (try_rle): New function.
13316 (putpkt_binary): Use it.
13317
13318 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
13319
13320 * Makefile.in (clean): Clean reg-x86-64-linux.c.
13321 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
13322 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
13323 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
13324 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
13325 point registers.
13326
13327 2006-08-08 Richard Sandiford <richard@codesourcery.com>
13328
13329 * server.c (terminal_fd): New variable.
13330 (old_foreground_pgrp): Likewise.
13331 (restore_old_foreground_pgrp): New function.
13332 (start_inferior): Record the terminal file descriptor in terminal_fd
13333 and its original foreground group in old_foreground_pgrp. Register
13334 restore_old_foreground_pgrp with atexit().
13335
13336 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
13337
13338 * server.c (handle_query): Correct qPart to qXfer.
13339
13340 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
13341
13342 * configure.ac: Check for more headers which are missing on
13343 Windows. Automatically supply -lwsock32 and USE_WIN32API.
13344 * configure.srv: Add Cygwin and mingw32.
13345 * remote-utils.c: Don't include headers unconditionally which
13346 are missing on mingw32. Include <winsock.h> for mingw32.
13347 (remote_open): Adjust for mingw32 support. Flush
13348 standard error after writing to it.
13349 (remote_close, putpkt_binary, input_interrupt, block_async_io)
13350 (unblock_async_io, enable_async_io, disable_async_io)
13351 (readchar, getpkt): Update for Winsock support.
13352 (prepare_resume_reply): Expect a protocol signal number.
13353 * server.c: Disable <sys/wait.h> on mingw32.
13354 (start_inferior): Adjust for mingw32 support. Flush
13355 standard error after writing to it.
13356 (attach_inferior): Likewise. Use protocol signal
13357 numbers.
13358 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
13359 and names.
13360 * win32-i386-low.c: New file.
13361 * Makefile.in (XM_CLIBS): Set.
13362 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
13363 (win32-i386-low.o): New dependency rule.
13364 * linux-low.c (linux_wait): Use target signal numbers.
13365 * target.h (struct target_ops): Doc fix.
13366 * server.h (target_signal_to_name): New prototype.
13367 * gdbreplay.c: Don't include headers unconditionally which
13368 are missing on mingw32. Include <winsock.h> for mingw32.
13369 (remote_close, remote_open): Adjust for Winsock support.
13370 * configure, config.in: Regenerated.
13371
13372 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13373
13374 * server.c (decode_xfer_read, write_qxfer_response): New.
13375 (handle_query): Take a packet length argument. Handle
13376 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
13377 the qSupported response.
13378 (main): Update call to handle_query.
13379
13380 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
13381
13382 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
13383 (putpkt_binary): Renamed from putpkt and adjusted for binary
13384 data.
13385 (putpkt): New wrapper for putpkt_binary.
13386 (readchar): Don't mask off the high bit.
13387 (decode_X_packet): New function.
13388 * server.c (main): Call putpkt_binary if a handler sets the packet
13389 length. Save the length of the incoming packet. Handle 'X'.
13390 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
13391
13392 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
13393
13394 * server.c (handle_query): Handle qSupported.
13395
13396 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13397
13398 * remote-utils.c (all_symbols_looked_up): New variable.
13399 (look_up_one_symbol): Check it.
13400 * server.h (look_up_one_symbol): New declaration.
13401 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
13402
13403 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13404
13405 * Makefile.in (linux-arm-low.o): Update dependencies.
13406 * linux-arm-low.c: Include "gdb_proc_service.h".
13407 (PTRACE_GET_THREAD_AREA): Define.
13408 (ps_get_thread_area): New function.
13409
13410 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
13411
13412 * configure.srv (m68k*-*-uclinux*): New target.
13413 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
13414 (linux_resume_one_process): Remove extraneous cast.
13415 (linux_read_offsets): New.
13416 (linux_target_op): Add linux_read_offsets on mmuless systems.
13417 * server.c (handle_query): Add qOffsets logic.
13418 * target.h (struct target_ops): Add read_offsets.
13419
13420 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13421
13422 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
13423 (PTRACE_GET_THREAD_AREA): Define.
13424 (ps_get_thread_area): New function.
13425 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
13426 (linux-x86-64-low.o): Update.
13427
13428 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13429
13430 * configure.ac: Remove checks for prfpregset_t.
13431 * gdb_proc_service.h: New file.
13432 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
13433 new "gdb_proc_service.h".
13434 * proc-service.c: Likewise.
13435 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
13436 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
13437 * Makefile.in (gdb_proc_service_h): Updated.
13438 * configure, config.in: Regenerated.
13439
13440 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13441
13442 * remote-utils.c (prepare_resume_reply): Move declaration
13443 of gdb_id_from_wait to the top of the block.
13444
13445 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
13446
13447 * linux-low.c (regsets_store_inferior_registers): Read the regset
13448 from the target before filling it.
13449
13450 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13451
13452 * server.c (attach_inferior): Return SIGTRAP for a successful
13453 attach.
13454
13455 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13456
13457 * Makefile.in (OBS): Add version.o.
13458 (STAGESTUFF): Delete.
13459 (version.o): Add dependencies.
13460 (version.c): Replace rule.
13461 (clean): Remove version.c.
13462 * server.c (gdbserver_version): New.
13463 (gdbserver_usage): Use printf.
13464 (main): Handle --version and --help.
13465 * server.h (version, host_name): Add declarations.
13466
13467 2005-12-23 Eli Zaretskii <eliz@gnu.org>
13468
13469 * linux-arm-low.c:
13470 * linux-arm-low.c:
13471 * inferiors.c:
13472 * i387-fp.h:
13473 * i387-fp.c:
13474 * gdbreplay.c:
13475 * regcache.c:
13476 * proc-service.c:
13477 * mem-break.h:
13478 * mem-break.c:
13479 * linux-x86-64-low.c:
13480 * linux-sh-low.c:
13481 * linux-s390-low.c:
13482 * linux-ppc64-low.c:
13483 * linux-ppc-low.c:
13484 * linux-mips-low.c:
13485 * linux-m68k-low.c:
13486 * linux-m32r-low.c:
13487 * linux-low.h:
13488 * linux-low.c:
13489 * linux-ia64-low.c:
13490 * linux-i386-low.c:
13491 * linux-crisv32-low.c:
13492 * thread-db.c:
13493 * terminal.h:
13494 * target.h:
13495 * target.c:
13496 * server.h:
13497 * server.c:
13498 * remote-utils.c:
13499 * regcache.h:
13500 * utils.c:
13501 * Makefile.in:
13502 * configure.ac:
13503 * gdbserver.1: Add (C) after Copyright. Update the FSF
13504 address.
13505
13506 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
13507
13508 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
13509 (arm_breakpoint_at): Recognize both breakpoints.
13510 (the_low_target): Use the correct breakpoint instruction.
13511
13512 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
13513
13514 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
13515 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
13516 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
13517 (the_low_target): Update.
13518
13519 2005-10-25 Andreas Schwab <schwab@suse.de>
13520
13521 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
13522
13523 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
13524 (ia64_num_regs): Reduce to 462.
13525
13526 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
13527
13528 * acinclude.m4: Correct quoting.
13529 * aclocal.m4: Regenerated.
13530
13531 Suggested by SZOKOVACS Robert <szo@ies.hu>:
13532 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
13533 (thread_db_init): Call thread_db_err_str.
13534 * configure.ac: Check for TD_VERSION.
13535 * config.in, configure: Regenerated.
13536
13537 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13538
13539 * server.h (error, fatal, warning): Add ATTR_FORMAT.
13540
13541 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13542
13543 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
13544 is not available. Define HAVE_PTRACE_GETREGS if it is.
13545 * config.in, configure: Regenerated.
13546 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
13547 * linux-i386-low.c, linux-m68k-low.c: Update to use
13548 HAVE_PTRACE_GETREGS.
13549 * linux-low.c (regsets_fetch_inferior_registers)
13550 (regsets_store_inferior_registers): Only return 0 if we processed
13551 GENERAL_REGS.
13552 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
13553 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
13554
13555 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13556
13557 * inferiors.c (struct thread_info): Add gdb_id.
13558 (add_thread): Add gdb_id argument.
13559 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
13560 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
13561 calls to add_thread.
13562 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
13563 * server.c (handle_query): Use thread_to_gdb_id.
13564 (handle_v_cont, main): Use gdb_id_to_thread_id.
13565 * server.h (add_thread): Update prototype.
13566 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
13567 prototypes.
13568
13569 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13570
13571 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
13572 left-padded registers.
13573 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
13574 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
13575
13576 2005-07-01 Steve Ellcey <sje@cup.hp.com>
13577
13578 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
13579 * configure: Regenerate.
13580 * config.in: Regenerate.
13581 * server.h (NEED_DECLARATION_STRERROR):
13582 Replace with !HAVE_DECL_STRERROR.
13583
13584 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
13585
13586 * linux-low.c (linux_wait, linux_send_signal): Don't test
13587 an unsigned long variable for > 0 if it could be MAX_ULONG.
13588 * server.c (myresume): Likewise.
13589 * target.c (set_desired_inferior): Likewise.
13590
13591 2005-06-13 Mark Kettenis <kettenis@gnu.org>
13592
13593 * configure.ac: Simplify and improve check for socklen_t.
13594 * configure, config.in: Regenerate.
13595
13596 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
13597
13598 * acconfig.h: Remove.
13599 * configure.ac: Add a test for socklen_t. Use three-argument
13600 AC_DEFINE throughout.
13601 * config.in: Regenerated using autoheader 2.59.
13602 * configure: Regenerated.
13603
13604 * gdbreplay.c (socklen_t): Provide a default.
13605 (remote_open): Use socklen_t.
13606 * remote-utils.c (socklen_t): Provide a default.
13607 (remote_open): Use socklen_t.
13608 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
13609 unsigned char.
13610
13611 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
13612 char for buffers.
13613 * linux-low.c (linux_read_memory, linux_write_memory)
13614 (linux_read_auxv): Likewise.
13615 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
13616 (check_mem_write): Likewise.
13617 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
13618 Likewise.
13619 * regcache.c (struct inferior_rgcache_data, registers_to_string)
13620 (registers_from_string, register_data): Likewise.
13621 * server.c (handle_query, main): Likewise.
13622 * server.h (convert_ascii_to_int, convert_int_to_ascii)
13623 (decode_M_packet): Likewise.
13624 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
13625 * target.h (struct target_ops): Update read_memory, write_memory,
13626 and read_auxv.
13627 (read_inferior_memory, write_inferior_memory): Update.
13628 * linux-low.h (struct linux_target_ops): Change type of breakpoint
13629 to unsigned char *.
13630 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
13631 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
13632 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
13633 linux-s390-low.c, linux-sh-low.c: Update for changes in
13634 read_inferior_memory and the_low_target->breakpoint.
13635
13636 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
13637
13638 * Makefile.in (SFILES): Add linux-ppc64-low.c.
13639 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
13640 * configure.srv: Add powerpc64-*-linux*.
13641 * linux-ppc64-low.c: New file.
13642
13643 2005-05-23 Orjan Friberg <orjanf@axis.com>
13644
13645 * linux-cris-low.c: New file with support for CRIS.
13646 * linux-crisv32-low.c: Ditto for CRISv32.
13647 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
13648 (clean): Add reg-cris.c and reg-crisv32.c.
13649 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
13650 reg-crisv32.o, and reg-crisv32.c to make rules.
13651 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
13652 recognized targets.
13653
13654 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
13655
13656 * linux-low.c (fetch_register): Ensure buffer size is a multiple
13657 of sizeof (PTRACE_XFER_TYPE).
13658 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
13659
13660 2005-05-12 Orjan Friberg <orjanf@axis.com>
13661
13662 * target.h (struct target_ops): Add insert_watchpoint,
13663 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
13664 pointers for hardware watchpoint support.
13665 * linux-low.h (struct linux_target_ops): Ditto.
13666 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
13667 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
13668 to linux_target_ops.
13669 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
13670 reply packet.
13671 * server.c (main): Recognize 'Z' and 'z' packets.
13672
13673 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
13674
13675 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
13676 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
13677 (the_low_target): Add new members.
13678
13679 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13680
13681 * proc-service.c (ps_lgetregs): Search all_processes instead of
13682 all_threads.
13683
13684 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13685
13686 * server.c (start_inferior): Change return type to int.
13687 (attach_inferior): Change sigptr to int *.
13688 (handle_v_cont, handle_v_requests): Change signal to int *.
13689 (main): Change signal to int.
13690
13691 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
13692
13693 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
13694 * configure.srv: Add m32r*-*-linux*.
13695 * linux-m32r-low.c: New file.
13696
13697 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
13698
13699 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
13700
13701 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13702
13703 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
13704 Take unsigned long arguments for PIDs.
13705 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
13706 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
13707 (wait_for_sigstop, linux_resume_one_process)
13708 (regsets_fetch_inferior_registers, linux_send_signal)
13709 (linux_read_auxv): Likewise. Update the types of variables holding
13710 PIDs. Update format string specifiers.
13711 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
13712 * remote-utils.c (prepare_resume_reply): Likewise.
13713 * server.c (cont_thread, general_thread, step_thread)
13714 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
13715 unsigned long.
13716 (handle_query): Update format specifiers.
13717 (handle_v_cont, main): Use strtoul for thread IDs.
13718 * server.h (struct inferior_list_entry): Use unsigned long for ID.
13719 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
13720 (general_thread, step_thread, thread_from_wait)
13721 (old_thread_from_wait): Update.
13722 * target.h (struct thread_resume): Use unsigned long for THREAD.
13723 (struct target_ops): Use unsigned long for arguments to attach and
13724 thread_alive.
13725
13726 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
13727
13728 * acinclude.m4: Include bfd/bfd.m4 directly.
13729 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
13730 <agriffis@toolchain.org>.
13731 * aclocal.m4, configure: Regenerated.
13732
13733 2005-01-07 Andrew Cagney <cagney@gnu.org>
13734
13735 * configure.ac: Rename configure.in, require autoconf 2.59.
13736 * configure: Re-generate.
13737
13738 2004-12-08 Daniel Jacobowitz <dan@debian.org>
13739
13740 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
13741 LIBS when finished.
13742 * aclocal.m4: Regenerated.
13743 * configure: Regenerated.
13744
13745 2004-11-21 Andreas Schwab <schwab@suse.de>
13746
13747 * linux-m68k-low.c (m68k_num_gregs): Define.
13748 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
13749 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
13750 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
13751 (m68k_breakpoint_at): New. Add to the_low_target.
13752
13753 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
13754 srv_linux_thread_db to yes.
13755
13756 2004-10-20 Joel Brobecker <brobecker@gnat.com>
13757
13758 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
13759 (ARCH_SET_FS): Likewise.
13760 (ARCH_GET_FS): Likewise.
13761 (ARCH_GET_GS): Likewise.
13762
13763 2004-10-16 Daniel Jacobowitz <dan@debian.org>
13764
13765 * linux-i386-low.c (ps_get_thread_area): New.
13766 * linux-x86-64-low.c (ps_get_thread_area): New.
13767 * linux-low.c: Include <sys/syscall.h>.
13768 (linux_kill_one_process): Don't kill the first thread here.
13769 (linux_kill): Kill the first thread here.
13770 (kill_lwp): New function.
13771 (send_sigstop, linux_send_signal): Use it.
13772 * proc-service.c: Clean up #ifdefs.
13773 (fpregset_info): Delete.
13774 (ps_lgetregs): Update and enable implementation.
13775 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
13776 implementations.
13777 * remote-utils.c (struct sym_cache, symbol_cache): New.
13778 (input_interrupt): Print a clearer message.
13779 (async_io_enabled): New variable.
13780 (enable_async_io, disable_async_io): Use it. Update comments.
13781 (look_up_one_symbol): Use the symbol cache.
13782 * thread-db.c (thread_db_look_up_symbols): New function.
13783 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
13784
13785 2004-10-16 Daniel Jacobowitz <dan@debian.org>
13786
13787 * configure.in: Test for -rdynamic.
13788 * configure: Regenerated.
13789 * Makefile (INTERNAL_LDFLAGS): New.
13790 (gdbserver, gdbreplay): Use it.
13791
13792 2004-09-02 Andrew Cagney <cagney@gnu.org>
13793
13794 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
13795
13796 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
13797
13798 * linux-low.c (linux_wait): Clear all_processes list also.
13799
13800 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
13801
13802 * linux-low.c: Include <errno.h>. Remove extern declaration of
13803 errno.
13804
13805 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
13806
13807 * gdbreplay.c, server.h, utils.c: Update copyright years.
13808
13809 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13810
13811 * server.c (main): Print child status or termination signal from
13812 variable 'signal', not 'sig'.
13813
13814 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13815
13816 * linux-low.c (linux_read_memory): Change return type to
13817 int. Check for and return error from ptrace().
13818 * target.c (read_inferior_memory): Change return type to int. Pass
13819 back return status from the_target->read_memory().
13820 * target.h (struct target_ops): Adapt *read_memory() prototype.
13821 Update comment.
13822 (read_inferior_memory): Adapt prototype.
13823 * server.c (main): Return an error packet if
13824 read_inferior_memory() returns an error.
13825
13826 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
13827
13828 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
13829 Unify with other clean targets.
13830
13831 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
13832
13833 * server.c (handle_v_cont): Call set_desired_inferior.
13834
13835 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
13836
13837 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
13838
13839 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
13840
13841 * linux-low.c (linux_wait): Unblock async I/O.
13842 (linux_resume): Block and enable async I/O.
13843 * remote-utils.c (block_async_io, unblock_async_io): New functions.
13844 * server.h (block_async_io, unblock_async_io): Add prototypes.
13845
13846 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
13847
13848 * remote-utils.c (remote_open): Print a status notice after
13849 opening a TCP port.
13850 * server.c (attach_inferior): Print a status notice after
13851 attaching.
13852
13853 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
13854
13855 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
13856
13857 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
13858
13859 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
13860 error packet.
13861 * server.c, target.h: Update copyright years.
13862
13863 2004-02-25 Roland McGrath <roland@redhat.com>
13864
13865 * target.h (struct target_ops): New member `read_auxv'.
13866 * server.c (handle_query): Handle qPart:auxv:read: query using that.
13867 * linux-low.c (linux_read_auxv): New function.
13868 (linux_target_ops): Initialize `read_auxv' member to that.
13869
13870 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
13871
13872 Committed by Jim Blandy <jimb@redhat.com>.
13873
13874 * linux-s390-low.c (s390_num_regs): Update.
13875 (s390_regmap): Remove control registers. Use __s390x__ predefine
13876 instead of GPR_SIZE to distiguish s390 and s390x targets.
13877
13878 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
13879
13880 * linux-low.c: Update copyright year.
13881 (check_removed_breakpoint): Clear pending_is_breakpoint.
13882 (linux_set_resume_request, linux_queue_one_thread)
13883 (resume_status_pending_p): New functions.
13884 (linux_continue_one_thread): Use process->resume.
13885 (linux_resume): Only resume threads if there are no pending events.
13886 * linux-low.h (struct process_info): Add resume request
13887 pointer.
13888
13889 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
13890
13891 * regcache.c (new_register_cache): Clear the allocated register
13892 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
13893
13894 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
13895
13896 * linux-low.c (linux_resume): Take a struct thread_resume *
13897 argument.
13898 (linux_wait): Update call.
13899 (resume_ptr): New static variable.
13900 (linux_continue_one_thread): Renamed from
13901 linux_continue_one_process. Use resume_ptr.
13902 (linux_resume): Use linux_continue_one_thread.
13903 * server.c (handle_v_cont, handle_v_requests): New functions.
13904 (myresume): New function.
13905 (main): Handle 'v' case.
13906 * target.h (struct thread_resume): New type.
13907 (struct target_ops): Change argument of "resume" to struct
13908 thread_resume *.
13909 (myresume): Delete macro.
13910
13911 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
13912
13913 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
13914 (uninstall): Support DESTDIR.
13915
13916 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
13917
13918 * configure.srv: Add xscale*linux copy of arm*linux entry.
13919
13920 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
13921
13922 * linux-arm-low.c (arm_reinsert_addr): New function.
13923 (the_low_target): Add arm_reinsert_addr.
13924
13925 2003-07-08 Mark Kettenis <kettenis@gnu.org>
13926
13927 * mem-break.c: Remove whitespace at end of file.
13928
13929 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
13930
13931 * configure.in: Check whether we need to prototype strerror.
13932 * server.h: Optionally prototype strerror.
13933 * gdbreplay.c (perror_with_name): Use strerror.
13934 * linux-low.c (linux_attach_lwp): Use strerror.
13935 * utils.c (perror_with_name): Use strerror.
13936 * config.in, configure: Regenerated.
13937
13938 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
13939
13940 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
13941 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
13942
13943 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
13944
13945 * Makefile.in (SFILES): Update.
13946 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
13947 low-sun3.c: Remove files.
13948
13949 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
13950
13951 * linux-low.c: Move comment to linux_thread_alive where it belonged.
13952 (linux_detach_one_process, linux_detach): New functions.
13953 (linux_target_ops): Add linux_detach.
13954 * server.c (main): Handle 'D' packet.
13955 * target.h (struct target_ops): Add "detach" member.
13956 (detach_inferior): Define.
13957
13958 2003-06-13 Mark Kettenis <kettenis@gnu.org>
13959
13960 From Kelley Cook <kelleycook@wideopenwest.com>:
13961 * configure.srv: Accept i[34567]86 variants.
13962
13963 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
13964
13965 * linux-low.c (linux_wait_for_event): Correct comment typos.
13966 (linux_resume_one_process): Call check_removed_breakpoint.
13967 (linux_send_signal): New function.
13968 (linux_target_ops): Add linux_send_signal.
13969 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
13970 of kill.
13971 * target.h (struct target_ops): Add send_signal.
13972
13973 2003-05-29 Jim Blandy <jimb@redhat.com>
13974
13975 * linux-low.c (usr_store_inferior_registers): Transfer buf in
13976 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
13977 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
13978 away part of the register's value.
13979
13980 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
13981
13982 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
13983 (linux_wait_for_event, linux_init_signals): Likewise.
13984
13985 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
13986
13987 * configure.in: Check for stdlib.h.
13988 * configure: Regenerated.
13989 * config.in: Regenerated.
13990
13991 2003-01-04 Andreas Schwab <schwab@suse.de>
13992
13993 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
13994
13995 2003-01-02 Andrew Cagney <ac131313@redhat.com>
13996
13997 * Makefile.in: Remove obsolete code.
13998
13999 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
14000
14001 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
14002 defined(PT_FPR0_HI).
14003
14004 2002-11-17 Stuart Hughes <seh@zee2.com>
14005
14006 * linux-arm-low.c (arm_num_regs): Increase.
14007 (arm_regmap): Include status register.
14008
14009 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
14010
14011 * linux-low.c (register_addr): Remove incorrect -1 check.
14012
14013 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
14014
14015 * linux-low.c (linux_create_inferior): Call setpgid. Return
14016 the new PID.
14017 (unstopped_p, linux_signal_pid): Remove.
14018 (linux_target_ops): Remove linux_signal_pid.
14019 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
14020 global instead of target method.
14021 * target.h (struct target_ops): Remove signal_pid. Update comment
14022 for create_inferior.
14023 * server.c (signal_pid): New variable.
14024 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
14025 gdbserver. Set the child to be the foreground process group.
14026 (attach_inferior): Set signal_pid.
14027
14028 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
14029
14030 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
14031
14032 2002-08-20 Jim Blandy <jimb@redhat.com>
14033
14034 * Makefile.in (LDFLAGS): Allow the configure script to establish a
14035 default for this.
14036
14037 2002-08-01 Andrew Cagney <cagney@redhat.com>
14038
14039 * Makefile.in: Make chill references obsolete.
14040
14041 2002-07-24 Kevin Buettner <kevinb@redhat.com>
14042
14043 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
14044 * configure: Regenerate.
14045 * config.in: Regenerate.
14046
14047 2002-07-09 David O'Brien <obrien@FreeBSD.org>
14048
14049 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
14050 (perror_with_name, remote_close, remote_open, expect, play): Static.
14051
14052 2002-07-04 Michal Ludvig <mludvig@suse.cz>
14053
14054 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
14055 byte offsets instead of an array of indexes.
14056 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
14057
14058 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
14059
14060 * regcache.c: Add comment.
14061
14062 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
14063
14064 * thread-db.c: New file.
14065 * proc-service.c: New file.
14066 * acinclude.m4: New file.
14067 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
14068 proc-service.o, and thread-db.o.
14069 (linux-low.o): Add USE_THREAD_DB.
14070 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
14071 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
14072 * aclocal.m4: Regenerated.
14073 * config.in: Regenerated.
14074 * configure: Regenerated.
14075 * configure.in: Check for proc_service.h, sys/procfs.h,
14076 thread_db.h, and linux/elf.h headrs.
14077 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
14078 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
14079 Check for -lthread_db and thread support.
14080 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
14081 PowerPC, and SuperH.
14082 * i387-fp.c: Constify arguments.
14083 * i387-fp.h: Likewise.
14084 * inferiors.c: (struct thread_info): Renamed from
14085 `struct inferior_info'. Remove PID member. Use generic inferior
14086 list header. All uses updated.
14087 (inferiors, signal_pid): Removed.
14088 (all_threads): New variable.
14089 (get_thread): Define.
14090 (add_inferior_to_list): New function.
14091 (for_each_inferior): New function.
14092 (change_inferior_id): New function.
14093 (add_inferior): Removed.
14094 (remove_inferior): New function.
14095 (add_thread): New function.
14096 (free_one_thread): New function.
14097 (remove_thread): New function.
14098 (clear_inferiors): Use for_each_inferior and free_one_thread.
14099 (find_inferior): New function.
14100 (find_inferior_id): New function.
14101 (inferior_target_data): Update argument type.
14102 (set_inferior_target_data): Likewise.
14103 (inferior_regcache_data): Likewise.
14104 (set_inferior_regcache_data): Likewise.
14105 * linux-low.c (linux_bp_reinsert): Remove.
14106 (all_processes, stopping_threads, using_thrads)
14107 (struct pending_signals, debug_threads, pid_of): New.
14108 (inferior_pid): Replace with macro.
14109 (struct inferior_linux_data): Remove.
14110 (get_stop_pc, add_process): New functions.
14111 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
14112 Use add_process and add_thread.
14113 (linux_attach_lwp): New function, based on old linux_attach. Use
14114 add_process and add_thread. Set stop_expected for new threads.
14115 (linux_attach): New function.
14116 (linux_kill_one_process): New function.
14117 (linux_kill): Kill all LWPs.
14118 (linux_thread_alive): Use find_inferior_id.
14119 (check_removed_breakpoints, status_pending_p): New functions.
14120 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
14121 Update. Use WNOHANG. Wait for cloned processes also. Update process
14122 struct for the found process.
14123 (linux_wait_for_event): New function.
14124 (linux_wait): Use it. Support LWPs.
14125 (send_sigstop, wait_for_sigstop, stop_all_processes)
14126 (linux_resume_one_process, linux_continue_one_process): New functions.
14127 (linux_resume): Support LWPs.
14128 (REGISTER_RAW_SIZE): Remove.
14129 (fetch_register): Use register_size instead. Call supply_register.
14130 (usr_store_inferior_registers): Likewise. Call collect_register.
14131 Fix recursive case.
14132 (regsets_fetch_inferior_registers): Improve error message.
14133 (regsets_store_inferior_registers): Add debugging.
14134 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
14135 (unstopped_p, linux_signal_pid): New functions.
14136 (linux_target_ops): Add linux_signal_pid.
14137 (linux_init_signals): New function.
14138 (initialize_low): Call it. Initialize using_threads.
14139 * regcache.c (inferior_regcache_data): Add valid
14140 flag.
14141 (get_regcache): Fetch registers lazily. Add fetch argument
14142 and update all callers.
14143 (regcache_invalidate_one, regcache_invalidate): New
14144 functions.
14145 (new_register_cache): Renamed from create_register_cache.
14146 Return the new regcache.
14147 (free_register_cache): Change argument to a void *.
14148 (registers_to_string, registers_from_string): Call get_regcache
14149 with fetch flag set.
14150 (register_data): Make static. Pass fetch flag to get_regcache.
14151 (supply_register): Call get_regcache with fetch flag clear.
14152 (collect_register): Call get_regcache with fetch flag set.
14153 (collect_register_as_string): New function.
14154 * regcache.h: Update.
14155 * remote-utils.c (putpkt): Flush after debug output and use
14156 stderr.
14157 Handle input interrupts while waiting for an ACK.
14158 (input_interrupt): Use signal_pid method.
14159 (getpkt): Flush after debug output and use stderr.
14160 (outreg): Use collect_register_as_string.
14161 (new_thread_notify, dead_thread_notify): New functions.
14162 (prepare_resume_reply): Check using_threads. Set thread_from_wait
14163 and general_thread.
14164 (look_up_one_symbol): Flush after debug output.
14165 * server.c (step_thread, server_waiting): New variables.
14166 (start_inferior): Don't use signal_pid. Update call to mywait.
14167 (attach_inferior): Update call to mywait.
14168 (handle_query): Handle qfThreadInfo and qsThreadInfo.
14169 (main): Don't fetch/store registers explicitly. Use
14170 set_desired_inferior. Support proposed ``Hs'' packet. Update
14171 calls to mywait.
14172 * server.h: Update.
14173 (struct inferior_list, struct_inferior_list_entry): New.
14174 * target.c (set_desired_inferior): New.
14175 (write_inferior_memory): Constify.
14176 (mywait): New function.
14177 * target.h: Update.
14178 (struct target_ops): New signal_pid method.
14179 (mywait): Removed macro, added prototype.
14180
14181 * linux-low.h (regset_func): Removed.
14182 (regset_fill_func, regset_store_func): New.
14183 (enum regset_type): New.
14184 (struct regset_info): Add type field. Use new operation types.
14185 (struct linux_target_ops): stop_pc renamed to get_pc.
14186 Add decr_pc_after_break and breakpoint_at.
14187 (get_process, get_thread_proess, get_process_thread)
14188 (strut process_info, all_processes, linux_attach_lwp)
14189 (thread_db_init): New.
14190
14191 * linux-arm-low.c (arm_get_pc, arm_set_pc,
14192 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
14193 (the_low_target): Add new members.
14194 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
14195 (i386_store_fpxregset): Constify.
14196 (target_regsets): Add new kind identifier.
14197 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
14198 (i386_set_pc): Add debugging.
14199 (i386_breakpoint_at): New function.
14200 (the_low_target): Add new members.
14201 * linux-mips-low.c (mips_get_pc, mips_set_pc)
14202 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
14203 (mips_breakpoint_at): New.
14204 (the_low_target): Add new members.
14205 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
14206 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
14207 (the_low_target): Add new members.
14208 * linux-sh-low.c (sh_get_pc, sh_set_pc)
14209 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
14210 (the_low_target): Add new members.
14211 * linux-x86-64-low.c (target_regsets): Add new kind
14212 identifier.
14213
14214 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
14215
14216 From Martin Pool <mbp@samba.org>:
14217 * server.c (gdbserver_usage): New function.
14218 (main): Call it.
14219
14220 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
14221
14222 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
14223 stop_at -> stop_pc.
14224
14225 2002-05-04 Andrew Cagney <ac131313@redhat.com>
14226
14227 * Makefile.in: Remove obsolete code.
14228
14229 2002-04-24 Michal Ludvig <mludvig@suse.cz>
14230
14231 * linux-low.c (regsets_fetch_inferior_registers),
14232 (regsets_store_inferior_registers): Removed cast to int from
14233 ptrace() calls.
14234 * regcache.h: Added declaration of struct inferior_info.
14235
14236 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
14237
14238 * inferiors.c (struct inferior_info): Add regcache_data.
14239 (add_inferior): Call create_register_cache.
14240 (clear_inferiors): Call free_register_cache.
14241 (inferior_regcache_data, set_inferior_regcache_data): New functions.
14242 * regcache.c (struct inferior_regcache_data): New.
14243 (registers): Remove.
14244 (get_regcache): New function.
14245 (create_register_cache, free_register_cache): New functions.
14246 (set_register_cache): Don't initialize the register cache here.
14247 (registers_to_string, registers_from_string, register_data): Call
14248 get_regcache.
14249 * regcache.h: Add prototypes.
14250 * server.h: Likewise.
14251
14252 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
14253
14254 * mem-break.c: New file.
14255 * mem-break.h: New file.
14256 * Makefile.in: Add mem-break.o rule; update server.h
14257 dependencies.
14258 * inferiors.c (struct inferior_info): Add target_data
14259 member.
14260 (clear_inferiors): Free target_data member if set.
14261 (inferior_target_data, set_inferior_target_data): New functions.
14262 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
14263 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
14264 * linux-low.c (linux_bp_reinsert): New variable.
14265 (struct inferior_linux_data): New.
14266 (linux_create_inferior): Use set_inferior_target_data.
14267 (linux_attach): Likewise. Call add_inferior.
14268 (linux_wait_for_one_inferior): New function.
14269 (linux_wait): Call it.
14270 (linux_write_memory): Add const.
14271 (initialize_low): Call set_breakpoint_data.
14272 * linux-low.h (struct linux_target_ops): Add breakpoint
14273 handling members.
14274 * server.c (attach_inferior): Remove extra add_inferior
14275 call.
14276 * server.h: Include mem-break.h. Update inferior.c
14277 prototypes.
14278 * target.c (read_inferior_memory)
14279 (write_inferior_memory): New functions.
14280 * target.h (read_inferior_memory)
14281 (write_inferior_memory): Change macros to prototypes.
14282 (struct target_ops): Update comments. Add const to write_memory
14283 definition.
14284
14285 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
14286
14287 * linux-low.c (usr_store_inferior_registers): Support
14288 registers which are allowed to fail to store.
14289 * linux-low.h (linux_target_ops): Likewise.
14290 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
14291 (ppc_cannot_store_register): FPSCR may not be storable.
14292
14293 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14294
14295 * server.h: Include <string.h> if HAVE_STRING_H.
14296 * ChangeLog: Correct paths in last ChangeLog entry.
14297
14298 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14299
14300 * linux-low.h: Remove obsolete prototypes.
14301 (struct linux_target_ops): New.
14302 (extern the_low_target): New.
14303 * linux-low.c (num_regs, regmap): Remove declarations.
14304 (register_addr): Use the_low_target explicitly.
14305 (fetch_register): Likewise.
14306 (usr_fetch_inferior_registers): Likewise.
14307 (usr_store_inferior_registers): Likewise.
14308 * linux-arm-low.c (num_regs): Remove.
14309 (arm_num_regs): Define.
14310 (arm_regmap): Renamed from regmap, made static.
14311 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
14312 made static.
14313 (arm_cannot_store_register): Renamed from cannot_store_register,
14314 made static.
14315 (the_low_target): New.
14316 * linux-i386-low.c (num_regs): Remove.
14317 (i386_num_regs): Define.
14318 (i386_regmap): Renamed from regmap, made static.
14319 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
14320 made static.
14321 (i386_cannot_store_register): Renamed from cannot_store_register,
14322 made static.
14323 (the_low_target): New.
14324 * linux-ia64-low.c (num_regs): Remove.
14325 (ia64_num_regs): Define.
14326 (ia64_regmap): Renamed from regmap, made static.
14327 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
14328 made static.
14329 (ia64_cannot_store_register): Renamed from cannot_store_register,
14330 made static.
14331 (the_low_target): New.
14332 * linux-m68k-low.c (num_regs): Remove.
14333 (m68k_num_regs): Define.
14334 (m68k_regmap): Renamed from regmap, made static.
14335 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
14336 made static.
14337 (m68k_cannot_store_register): Renamed from cannot_store_register,
14338 made static.
14339 (the_low_target): New.
14340 * linux-mips-low.c (num_regs): Remove.
14341 (mips_num_regs): Define.
14342 (mips_regmap): Renamed from regmap, made static.
14343 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
14344 made static.
14345 (mips_cannot_store_register): Renamed from cannot_store_register,
14346 made static.
14347 (the_low_target): New.
14348 * linux-ppc-low.c (num_regs): Remove.
14349 (ppc_num_regs): Define.
14350 (ppc_regmap): Renamed from regmap, made static.
14351 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
14352 made static.
14353 (ppc_cannot_store_register): Renamed from cannot_store_register,
14354 made static.
14355 (the_low_target): New.
14356 * linux-s390-low.c (num_regs): Remove.
14357 (s390_num_regs): Define.
14358 (s390_regmap): Renamed from regmap, made static.
14359 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
14360 made static.
14361 (s390_cannot_store_register): Renamed from cannot_store_register,
14362 made static.
14363 (the_low_target): New.
14364 * linux-sh-low.c (num_regs): Remove.
14365 (sh_num_regs): Define.
14366 (sh_regmap): Renamed from regmap, made static.
14367 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
14368 made static.
14369 (sh_cannot_store_register): Renamed from cannot_store_register,
14370 made static.
14371 (the_low_target): New.
14372 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
14373 (the_low_target): New.
14374
14375 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14376
14377 * Makefile.in: Add stamp-h target.
14378 * configure.in: Create stamp-h.
14379 * configure: Regenerated.
14380
14381 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14382
14383 * inferiors.c: New file.
14384 * target.c: New file.
14385 * target.h: New file.
14386 * Makefile.in: Add target.o and inferiors.o. Update
14387 dependencies.
14388 * linux-low.c (inferior_pid): New static variable,
14389 moved from server.c.
14390 (linux_create_inferior): Renamed from create_inferior.
14391 Call add_inferior. Return 0 on success instead of a PID.
14392 (linux_attach): Renamed from myattach.
14393 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
14394 (linux_thread_alive): Renamed from mythread_alive.
14395 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
14396 child dies.
14397 (linux_resume): Renamed from myresume. Add missing ``return 0''.
14398 (regsets_store_inferior_registers): Correct error message.
14399 Add missing ``return 0''.
14400 (linux_fetch_registers): Renamed from fetch_inferior_registers.
14401 (linux_store_registers): Renamed from store_inferior_registers.
14402 (linux_read_memory): Renamed from read_inferior_memory.
14403 (linux_write_memory): Renamed from write_inferior_memory.
14404 (linux_target_ops): New structure.
14405 (initialize_low): Call set_target_ops ().
14406 * remote-utils.c (unhexify): New function.
14407 (hexify): New function.
14408 (input_interrupt): Send signals to ``signal_pid''.
14409 * server.c (inferior_pid): Remove.
14410 (start_inferior): Update create_inferior call.
14411 (attach_inferior): Call add_inferior.
14412 (handle_query): New function.
14413 (main): Call handle_query for `q' packets.
14414 * server.h: Include "target.h". Remove obsolete prototypes.
14415 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
14416
14417 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14418
14419 * Makefile.in: Add WARN_CFLAGS. Update configury
14420 dependencies.
14421 * configure.in: Check for <string.h>
14422 * configure: Regenerate.
14423 * config.in: Regenerate.
14424 * gdbreplay.c: Include needed system headers.
14425 (remote_open): Remove strchr prototype.
14426 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
14427 * regcache.c (supply_register): Change buf argument to const void *.
14428 (supply_register_by_name): Likewise.
14429 (collect_register): Change buf argument to void *.
14430 (collect_register_by_name): Likewise.
14431 * regcache.h: Add missing prototypes.
14432 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
14433 * server.c (handle_query): New function.
14434 (attached): New static variable, moved out of main.
14435 (main): Quiet longjmp clobber warnings.
14436 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
14437 * utils.c (error): Remove NORETURN.
14438 (fatal): Likewise.