IPA: Add alloc_jump_pad_buffer target hook.
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
a13c4696
MK
12016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2
3 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4 (alloc_jump_pad_buffer): New function.
5 * linux-amd64-ipa.c: Add <sys/mman.h> include.
6 (alloc_jump_pad_buffer): New function.
7 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
8 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
9 (alloc_jump_pad_buffer): New function.
10 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
11 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
12 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
13 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
14
1cda1512
MK
152016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
16
17 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
18 * linux-amd64-ipa.c: Likewise.
19 * linux-i386-ipa.c: Likewise.
20 * linux-s390-ipa.c: Likewise.
21 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
22 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
23 set_trace_state_variable_value_ptr.
24 (struct ipa_sym_addresses): Likewise.
25 (symbol_list): Likewise.
26 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
27 accessing gdb_collect directly.
28 (gdb_collect_ptr_type): New typedef.
29 (get_raw_reg_ptr_type): New typedef.
30 (get_trace_state_variable_value_ptr_type): New typedef.
31 (set_trace_state_variable_value_ptr_type): New typedef.
32 (gdb_collect_ptr): New global.
33 (get_raw_reg_ptr): New global.
34 (get_trace_state_variable_value_ptr): New global.
35 (set_trace_state_variable_value_ptr): New global.
36 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
37 accessing get_raw_reg directly.
38 (get_get_tsv_func_addr): Likewise for
39 get_trace_state_variable_value_ptr.
40 (get_set_tsv_func_addr): Likewise for
41 set_trace_state_variable_value_ptr.
42 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
43
72fb5488
SM
442016-03-30 Simon Marchi <simon.marchi@ericsson.com>
45
46 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
47
28170b88
MK
482016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
49
50 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
51 packets.
52 (relocate_instruction): Remove own_buf.
53 * server.c (own_buf): Make global.
54 (handle_v_requests): Make global.
55 * server.h (own_buf): New declaration.
56 (handle_v_requests): New prototype.
57
f39e8743
MK
582016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
59
60 PR 18377
61 * linux-s390-low.c (add_insns): New function.
62 (s390_emit_prologue): New function.
63 (s390_emit_epilogue): New function.
64 (s390_emit_add): New function.
65 (s390_emit_sub): New function.
66 (s390_emit_mul): New function.
67 (s390_emit_lsh): New function.
68 (s390_emit_rsh_signed): New function.
69 (s390_emit_rsh_unsigned): New function.
70 (s390_emit_ext): New function.
71 (s390_emit_log_not): New function.
72 (s390_emit_bit_and): New function.
73 (s390_emit_bit_or): New function.
74 (s390_emit_bit_xor): New function.
75 (s390_emit_bit_not): New function.
76 (s390_emit_equal): New function.
77 (s390_emit_less_signed): New function.
78 (s390_emit_less_unsigned): New function.
79 (s390_emit_ref): New function.
80 (s390_emit_if_goto): New function.
81 (s390_emit_goto): New function.
82 (s390_write_goto_address): New function.
83 (s390_emit_litpool): New function.
84 (s390_emit_const): New function.
85 (s390_emit_call): New function.
86 (s390_emit_reg): New function.
87 (s390_emit_pop): New function.
88 (s390_emit_stack_flush): New function.
89 (s390_emit_zero_ext): New function.
90 (s390_emit_swap): New function.
91 (s390_emit_stack_adjust): New function.
92 (s390_emit_set_r2): New function.
93 (s390_emit_int_call_1): New function.
94 (s390_emit_void_call_2): New function.
95 (s390_emit_eq_goto): New function.
96 (s390_emit_ne_goto): New function.
97 (s390_emit_lt_goto): New function.
98 (s390_emit_le_goto): New function.
99 (s390_emit_gt_goto): New function.
100 (s390_emit_ge_goto): New function.
101 (s390x_emit_prologue): New function.
102 (s390x_emit_epilogue): New function.
103 (s390x_emit_add): New function.
104 (s390x_emit_sub): New function.
105 (s390x_emit_mul): New function.
106 (s390x_emit_lsh): New function.
107 (s390x_emit_rsh_signed): New function.
108 (s390x_emit_rsh_unsigned): New function.
109 (s390x_emit_ext): New function.
110 (s390x_emit_log_not): New function.
111 (s390x_emit_bit_and): New function.
112 (s390x_emit_bit_or): New function.
113 (s390x_emit_bit_xor): New function.
114 (s390x_emit_bit_not): New function.
115 (s390x_emit_equal): New function.
116 (s390x_emit_less_signed): New function.
117 (s390x_emit_less_unsigned): New function.
118 (s390x_emit_ref): New function.
119 (s390x_emit_if_goto): New function.
120 (s390x_emit_const): New function.
121 (s390x_emit_call): New function.
122 (s390x_emit_reg): New function.
123 (s390x_emit_pop): New function.
124 (s390x_emit_stack_flush): New function.
125 (s390x_emit_zero_ext): New function.
126 (s390x_emit_swap): New function.
127 (s390x_emit_stack_adjust): New function.
128 (s390x_emit_int_call_1): New function.
129 (s390x_emit_void_call_2): New function.
130 (s390x_emit_eq_goto): New function.
131 (s390x_emit_ne_goto): New function.
132 (s390x_emit_lt_goto): New function.
133 (s390x_emit_le_goto): New function.
134 (s390x_emit_gt_goto): New function.
135 (s390x_emit_ge_goto): New function.
136 (s390_emit_ops): New function.
137 (struct linux_target_ops): Fill in emit_ops hook.
138
abd9baf9
MK
1392016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
140
141 PR 18377
142 * Makefile.in: Add s390 IPA files.
143 * configure.srv: Build IPA for s390.
144 * linux-s390-ipa.c: New file.
145 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
146 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
147 (tdesc_s390_linux32): Likewise.
148 (init_registers_s390_linux32v1): Likewise.
149 (tdesc_s390_linux32v1): Likewise.
150 (init_registers_s390_linux32v2): Likewise.
151 (tdesc_s390_linux32v2): Likewise.
152 (init_registers_s390_linux64): Likewise.
153 (tdesc_s390_linux64): Likewise.
154 (init_registers_s390_linux64v1): Likewise.
155 (tdesc_s390_linux64v1): Likewise.
156 (init_registers_s390_linux64v2): Likewise.
157 (tdesc_s390_linux64v2): Likewise.
158 (init_registers_s390_te_linux64): Likewise.
159 (tdesc_s390_te_linux64): Likewise.
160 (init_registers_s390_vx_linux64): Likewise.
161 (tdesc_s390_vx_linux64): Likewise.
162 (init_registers_s390_tevx_linux64): Likewise.
163 (tdesc_s390_tevx_linux64): Likewise.
164 (init_registers_s390x_linux64): Likewise.
165 (tdesc_s390x_linux64): Likewise.
166 (init_registers_s390x_linux64v1): Likewise.
167 (tdesc_s390x_linux64v1): Likewise.
168 (init_registers_s390x_linux64v2): Likewise.
169 (tdesc_s390x_linux64v2): Likewise.
170 (init_registers_s390x_te_linux64): Likewise.
171 (tdesc_s390x_te_linux64): Likewise.
172 (init_registers_s390x_vx_linux64): Likewise.
173 (tdesc_s390x_vx_linux64): Likewise.
174 (init_registers_s390x_tevx_linux64): Likewise.
175 (tdesc_s390x_tevx_linux64): Likewise.
176 (have_hwcap_s390_vx): New static variable.
177 (s390_arch_setup): Fill have_hwcap_s390_vx.
178 (s390_get_thread_area): New function.
179 (s390_ft_entry_gpr_esa): New const.
180 (s390_ft_entry_gpr_zarch): New const.
181 (s390_ft_entry_misc): New const.
182 (s390_ft_entry_fr): New const.
183 (s390_ft_entry_vr): New const.
184 (s390_ft_main_31): New const.
185 (s390_ft_main_64): New const.
186 (s390_ft_exit_fr): New const.
187 (s390_ft_exit_vr): New const.
188 (s390_ft_exit_misc): New const.
189 (s390_ft_exit_gpr_esa): New const.
190 (s390_ft_exit_gpr_zarch): New const.
191 (append_insns): New function.
192 (s390_relocate_instruction): New function.
193 (s390_install_fast_tracepoint_jump_pad): New function.
194 (s390_get_min_fast_tracepoint_insn_len): New function.
195 (s390_get_ipa_tdesc_idx): New function.
196 (struct linux_target_ops): Wire in the above functions.
197 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
198 * linux-s390-tdesc.h: New file.
199
a4105d04
MK
2002016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
201
202 * linux-s390-low.c (s390_supports_tracepoints): New function.
203 (struct linux_target_ops): Fill supports_tracepoints hook.
204
35ac8b3e
YQ
2052016-03-18 Yao Qi <yao.qi@linaro.org>
206
207 * linux-low.c (lwp_signal_can_be_delivered): New function.
208 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
209
94610ec4
YQ
2102016-03-18 Yao Qi <yao.qi@linaro.org>
211
212 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
213 0 if signal is enqueued. Remove 'signal' from one debugging
214 message. Move one debugging message to some lines below.
215 Remove code setting 'signal' to 0.
216
80aea927
YQ
2172016-03-18 Yao Qi <yao.qi@linaro.org>
218
219 * linux-low.c (linux_low_filter_event): Remove redundant
220 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
221
b04fd3be
MK
2222016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
223
224 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
225 (struct linux_target_ops): Wire in the above.
226
c40c8d4b
YQ
2272016-03-03 Yao Qi <yao.qi@linaro.org>
228
229 * linux-low.c: Update comments to start_step_over.
230
0f8288ae
YQ
2312016-03-03 Yao Qi <yao.qi@linaro.org>
232
233 PR server/19736
234 * linux-low.c (handle_extended_wait): Set child suspended
235 if event_lwp->bp_reinsert isn't zero.
236
fdbd04a8
YQ
2372016-03-02 Yao Qi <yao.qi@linaro.org>
238
239 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
240 enqueue_pending_signal.
241
6896a8fa
MK
2422016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
243
244 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
245 is actually loaded.
246
ab503087
MK
2472016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
248
249 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
250 (s390_regmap_3264) [!__s390x__]: New global.
251 (s390_collect_ptrace_register): Skip map entries containing -1.
252 (s390_supply_ptrace_register): Ditto.
253 (s390_fill_gprs_high): New function.
254 (s390_store_gprs_high): New function.
255 (s390_regsets): Add NT_S390_HIGH_GPRS.
256 (s390_get_hwcap): Enable on 31-bit.
257 (have_hwcap_s390_high_gprs): Enable on 31-bit.
258 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
259 Detect NT_S390_HIGH_GPRS.
260 (s390_usrregs_info_3264): Enable on 31-bit.
261 (s390_regs_info): Enable regs_info_3264 on 31-bit.
262 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
263
ae91f625
MK
2642016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
265
266 PR gdb/13808
267 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
268 * configure.srv: Ditto.
269 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
270 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
271 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
272 (init_registers_amd64_linux): Remove prototype.
273 (tdesc_amd64_linux): Remove declaration.
274 (get_ipa_tdesc): New function.
275 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
276 initialize remaining tdescs.
277 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
278 (init_registers_i386_linux): Remove prototype.
279 (tdesc_i386_linux): Remove declaration.
280 (get_ipa_tdesc): New function.
281 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
282 initialize remaining tdescs.
283 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
284 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
285 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
286 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
287 (x86_get_ipa_tdesc_idx): New function.
288 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
289 * linux-x86-tdesc.h: New file.
290 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
291 (target_get_ipa_tdesc_idx): New macro.
292 * tracepoint.c (ipa_tdesc_idx): New macro.
293 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
294 (symbol_list): Add ipa_tdesc_idx.
295 (cmd_qtstart): Write ipa_tdesc_idx in the target.
296 (ipa_tdesc): Remove.
297 (ipa_tdesc_idx): New variable.
298 (get_context_regcache): Use get_ipa_tdesc.
299 (gdb_collect): Ditto.
300 (gdb_probe): Ditto.
301 * tracepoint.h (get_ipa_tdesc): New prototype.
302 (ipa_tdesc): Remove.
303
e7ad2f14
PA
3042016-02-24 Pedro Alves <palves@redhat.com>
305
306 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
307 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
308 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
309 Factor out common code between the USE_SIGTRAP_SIGINFO and
310 !USE_SIGTRAP_SIGINFO blocks.
311 (linux_low_filter_event): Call save_stop_reason instead of
312 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
313 Update comments.
314 (linux_wait_1): Update comments.
315
657f9cde
WW
3162016-02-24 Wei-cheng Wang <cole945@gmail.com>
317
318 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
319 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
320 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
321 ppc_insert_point, ppc_remove_point.
322
b00b61e1
MK
3232016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
324
325 * linux-s390-low.c (s390_supports_z_point_type): New function.
326 (struct linux_target_ops): Wire s390_supports_z_point_type in.
327
553cb527
YQ
3282016-02-16 Yao Qi <yao.qi@linaro.org>
329
330 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
331 PC. Get pc from regcache_read_pc.
332
a5652c21
YQ
3332016-02-12 Yao Qi <yao.qi@linaro.org>
334
335 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
336 or linux_get_pc_32bit.
337 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
338
ed443b61
YQ
3392016-02-12 Yao Qi <yao.qi@linaro.org>
340
341 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
342 arm_linux_get_next_pcs_fixup.
343
020ecd38
MK
3442016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
345
346 * tracepoint.c (x_tracepoint_action_download): Change
347 write_inferior_data_ptr to write_inferior_data_pointer.
348 (cmd_qtstart): Likewise.
349 (write_inferior_data_ptr): Remove.
350 (download_agent_expr): Change write_inferior_data_ptr to
351 write_inferior_data_pointer.
352 (download_tracepoint_1): Likewise.
353 (download_tracepoint): Likewise.
354 (download_trace_state_variables): Likewise.
355
7cae9051
WW
3562016-02-11 Wei-cheng Wang <cole945@gmail.com>
357 Marcin Kościelnicki <koriakin@0x04.net>
358
359 * tracepoint.c (struct tracepoint_action_ops): Remove.
360 (struct tracepoint_action): Remove ops.
361 (m_tracepoint_action_download, r_tracepoint_action_download)
362 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
363 size and offset accordingly.
364 (m_tracepoint_action_ops, r_tracepoint_action_ops)
365 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
366 (tracepoint_action_send, tracepoint_action_download): New functions.
367 Helpers for trace action handlers.
368 (add_tracepoint_action): Remove setup actions ops.
369 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
370
9f6a71b4
YQ
3712016-02-10 Yao Qi <yao.qi@linaro.org>
372
373 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
374
1e94266c
SM
3752016-02-09 Simon Marchi <simon.marchi@ericsson.com>
376
377 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
378 to AC_OUTPUT.
379 * configure: Regenerate.
380
8adce034
SM
3812016-02-09 Simon Marchi <simon.marchi@ericsson.com>
382
383 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
384 void * to gdb_byte *.
385 * linux-low.c (siginfo_fixup): Likewise.
386 (linux_xfer_siginfo): Likewise.
387 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
388 Likewise.
389 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
390
93813b37
WT
3912016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
392
393 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
394 to srv_tgtobj.
395 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
396 to srv_tgtobj.
397 * linux-x86-low.c [__x86_64__]: Include
398 "nat/amd64-linux-siginfo.h".
399 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
400 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
401 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
402 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
403 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
404 (cpt_si_fd, si_timerid, si_overrun): Move from
405 nat/amd64-linux-siginfo.c.
406 * Makefile.in (amd64-linux-siginfo.o:): New rule.
407
8424cc97
SM
4082016-01-28 Simon Marchi <simon.marchi@ericsson.com>
409
410 * server.c (skip_to_semicolon): Remove.
411 (process_point_options): Use strchrnul instead of
412 skip_to_semicolon.
413
4d18591b
YQ
4142016-01-26 Yao Qi <yao.qi@linaro.org>
415
416 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
417 * linux-low.c (install_software_single_step_breakpoints): Don't
418 call regcache_read_pc.
419 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
420 argument pc.
421
d8020970
YQ
4222016-01-26 Yao Qi <yao.qi@linaro.org>
423
424 * linux-low.c (install_software_single_step_breakpoints): Call
425 regcache_read_pc instead of get_pc.
426
8b207339
YQ
4272016-01-26 Yao Qi <yao.qi@linaro.org>
428
429 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
430 (unblock_async_io): Rename to ...
431 (block_unblock_async_io): ... it. New function.
432 (enable_async_io): Don't install SIGIO handler. Unblock it
433 instead.
434 (disable_async_io): Don't ignore SIGIO. Block it instead.
435 (initialize_async_io): Install SIGIO handler. Don't call
436 unblock_async_io.
437
18879fef
YQ
4382016-01-26 Yao Qi <yao.qi@linaro.org>
439
440 * remote-utils.c (getpkt): If the buffer isn't empty, and the
441 first character is '\003', call *the_target->request_interrupt.
442
a0f8e08a
YQ
4432016-01-25 Yao Qi <yao.qi@linaro.org>
444
445 * remote-utils.c (new_thread_notify): Remove.
446 (dead_thread_notify): Likewise.
447 * remote-utils.h (new_thread_notify): Remove declaration.
448 (dead_thread_notify): Likewise.
449
cc5fd9ab
MK
4502016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
451
452 * gdb.trace/pending.exp: Fix expected message on continue.
453
99e8eb11
MK
4542016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
455
456 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
457 it works properly on big-endian machines where sizeof (CORE_ADDR)
458 != sizeof (void *).
459
a994041d
PA
4602016-01-21 Pedro Alves <palves@redhat.com>
461
462 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
463 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
464 * configure: Regenerate.
465
f7a6a40d
YQ
4662016-01-21 Yao Qi <yao.qi@linaro.org>
467
468 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
469 is_thumb and set it according to CPSR saved on the stack.
470 (get_next_pcs_syscall_next_pc): Pass is_thumb to
471 arm_sigreturn_next_pc.
472
6f69e520
YQ
4732016-01-18 Yao Qi <yao.qi@linaro.org>
474
475 * linux-low.c (linux_set_pc_64bit): New function.
476 (linux_get_pc_64bit): New function.
477 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
478 Declare.
479 * linux-sparc-low.c (debug_threads): Remove declaration.
480 (sparc_get_pc): Remove.
481 (the_low_target): Use linux_get_pc_64bit instead of
482 sparc_get_pc.
483 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
484 (the_low_target): Use linux_get_pc_64bit and
485 linux_set_pc_64bit.
486
276d4552
YQ
4872016-01-18 Yao Qi <yao.qi@linaro.org>
488
489 * linux-arm-low.c (debug_threads): Remove declaration.
490 (arm_get_pc, arm_set_pc): Remove.
491 (the_low_target): Use linux_get_pc_32bit and
492 linux_set_pc_32bit.
493 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
494 (the_low_target): Use linux_get_pc_32bit and
495 linux_set_pc_32bit.
496 * linux-cris-low.c (debug_threads): Remove declaration.
497 (cris_get_pc, cris_set_pc,): Remove.
498 (the_low_target): Use linux_get_pc_32bit and
499 linux_set_pc_32bit.
500 * linux-crisv32-low.c (debug_threads): Remove declaration.
501 (cris_get_pc, cris_set_pc): Remove.
502 (the_low_target): Use linux_get_pc_32bit and
503 linux_set_pc_32bit.
504 * linux-low.c: Include inttypes.h.
505 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
506 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
507 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
508 (the_low_target): Use linux_get_pc_32bit and
509 linux_set_pc_32bit.
510 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
511 (the_low_target): Use linux_get_pc_32bit and
512 linux_set_pc_32bit.
513 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
514 (the_low_target): Use linux_get_pc_32bit and
515 linux_set_pc_32bit.
516 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
517 (the_low_target): Use linux_get_pc_32bit and
518 linux_set_pc_32bit.
519 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
520 (the_low_target): Use linux_get_pc_32bit and
521 linux_set_pc_32bit.
522
eb0edac8
GB
5232016-01-18 Gary Benson <gbenson@redhat.com>
524
525 * configure.ac (AC_FUNC_FORK): New check.
526 * config.in: Regenerate.
527 * configure: Likewise.
528
1b451dda
YQ
5292016-01-14 Yao Qi <yao.qi@linaro.org>
530
531 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
532 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
533 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
534 arm_get_next_pcs_ctor.
535
82075af2
JS
5362016-01-12 Josh Stone <jistone@redhat.com>
537 Philippe Waroquiers <philippe.waroquiers@skynet.be>
538
539 * inferiors.h: Include "gdb_vecs.h".
540 (struct process_info): Add syscalls_to_catch.
541 * inferiors.c (remove_process): Free syscalls_to_catch.
542 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
543 syscall_return stops.
544 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
545 * server.c (handle_general_set): Handle QCatchSyscalls.
546 (handle_query): Report support for QCatchSyscalls.
547 * target.h (struct target_ops): Add supports_catch_syscall.
548 (target_supports_catch_syscall): New macro.
549 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
550 (struct lwp_info): Add syscall_state.
551 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
552 Maintain syscall_state and syscalls_to_catch across exec.
553 (get_syscall_trapinfo): New function, proxy to the_low_target.
554 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
555 (linux_low_filter_event): Toggle syscall_state entry/return for
556 syscall traps, and set it ignored for all others.
557 (gdb_catching_syscalls_p): New function.
558 (gdb_catch_this_syscall_p): New function.
559 (linux_wait_1): Handle SYSCALL_SIGTRAP.
560 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
561 (linux_supports_catch_syscall): New function.
562 (linux_target_ops): Install it.
563 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
564 (the_low_target): Install it.
565
8f13a3ce
MF
5662016-01-12 Mike Frysinger <vapier@gentoo.org>
567
568 * acinclude.m4: Include new ../warning.m4 file.
569 * configure: Regenerated.
570 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
571
5b3da067
MF
5722016-01-12 Mike Frysinger <vapier@gentoo.org>
573
574 * ax.c (is_goto_target): Mark static.
575 * linux-low.c (register_addr): Likewise.
576 (linux_fetch_registers, linux_store_registers): Likewise.
577 * mem-break.c (any_persistent_commands): Fix old prototype.
578 (add_commands_to_breakpoint): Mark static.
579 * regcache.c (find_register_by_name): Delete unused func.
580 * remote-utils.c (hex_or_minus_one): Mark static.
581 * server.c (monitor_show_help): Mark static.
582 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
583 handle_v_requests): Likewise.
584
bc504a31
PA
5852016-01-12 Pedro Alves <palves@redhat.com>
586
587 Remove use of the registered trademark symbol throughout.
588
5a0dd67a
YQ
5892016-01-08 Yao Qi <yao.qi@linaro.org>
590
591 * remote-utils.c (getpkt): If c is '\003', call target hook
592 request_interrupt.
593
b2ca446f
YQ
5942016-01-06 Yao Qi <yao.qi@linaro.org>
595
596 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
597 linux-aarch32-low.c.
598 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
599 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
600 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
601 (thumb2_breakpoint): Declare.
602 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
603 linux-aarch32-low.h.
604 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
605 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
606 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
607
edd88788
JB
6082016-01-01 Joel Brobecker <brobecker@adacore.com>
609
610 * gdbreplay.c (gdbreplay_version): Change copyright year in
611 version message.
612 * server.c (gdbserver_version): Likewise.
613
65da7f14
PP
6142015-12-28 Patrick Palka <patrick@parcs.ath.cx>
615
616 * server.c (crc32_table): Delete.
617 (crc32): Use libiberty's xcrc32 function.
618
4abd5ed2
JB
6192015-12-22 Joel Brobecker <brobecker@adacore.com>
620
621 * lynx-low.c (lynx_delete_thread_callback): New function.
622 (lynx_mourn): Properly delete our process and all of its
623 threads. Remove call to clear_inferiors.
624
0e50fe5c
JB
6252015-12-22 Joel Brobecker <brobecker@adacore.com>
626
627 * target.c (thread_search_callback): Add check that
628 the thread_stopped target callback is not NULL before
629 calling it.
630
35adc03f
YQ
6312015-12-21 Yao Qi <yao.qi@linaro.org>
632
633 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
634 arm breakpoint.
635
bd2b2909
AT
6362015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
637
638 * server.c (handle_query): Call target_supports_software_single_step.
639
7fe5e27e
AT
6402015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
641
642 * linux-low.c (single_step): New function.
643 (linux_resume_one_lwp_throw): Call single_step.
644 (start_step_over): Likewise.
645
d9311bfa
AT
6462015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
647
648 * Makefile.in (SFILES): Append arch/arm-linux.c,
649 arch/arm-get-next-pcs.c.
650 (arm-linux.o): New rule.
651 (arm-get-next-pcs.o): New rule.
652 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
653 arm-linux.o.
654 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
655 to linux-aarch32-low.c.
656 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
657 (arm_breakpoint_len, thumb_breakpoint): Likewise.
658 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
659 (thumb2_breakpoint_len): Likewise.
660 (arm_is_thumb_mode): Make non-static.
661 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
662 from linux-aarch32-low.c.
663 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
664 (arm_breakpoint_len, thumb_breakpoint): Likewise.
665 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
666 (thumb2_breakpoint_len): Likewise.
667 (arm_is_thumb_mode): New declaration.
668 * linux-arm-low.c: Include arch/arm-linux.h
669 aarch/arm-get-next-pcs.h, sys/syscall.h.
670 (get_next_pcs_ops): New struct.
671 (get_next_pcs_addr_bits_remove): New function.
672 (get_next_pcs_is_thumb): New function.
673 (get_next_pcs_read_memory_unsigned_integer): Likewise.
674 (arm_sigreturn_next_pc): Likewise.
675 (get_next_pcs_syscall_next_pc): Likewise.
676 (arm_gdbserver_get_next_pcs): Likewise.
677 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
678 Initialize.
679 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
680 * server.h: Include gdb_vecs.h.
681
68ce2059
AT
6822015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
683
684 * Makefile.in (SFILES): Append common/common-regcache.c.
685 (OBS): Append common-regcache.o.
686 (common-regcache.o): New rule.
687 * regcache.c (init_register_cache): Initialize cache to
688 REG_UNAVAILABLE.
689 (regcache_raw_read_unsigned): New function.
690 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
691 register_status enum.
692
fa5308bd
AT
6932015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
694
695 * linux-aarch64-low.c (the_low_targets): Rename
696 breakpoint_reinsert_addr to get_next_pcs.
697 * linux-arm-low.c (the_low_targets): Likewise.
698 * linux-bfin-low.c (the_low_targets): Likewise.
699 * linux-cris-low.c (the_low_targets): Likewise.
700 * linux-crisv32-low.c (the_low_targets): Likewise.
701 * linux-low.c (can_software_single_step): Likewise.
702 (install_software_single_step_breakpoints): New function.
703 (start_step_over): Use install_software_single_step_breakpoints.
704 * linux-low.h: New CORE_ADDR vector.
705 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
706 get_next_pcs.
707 * linux-mips-low.c (the_low_targets): Likewise.
708 * linux-nios2-low.c (the_low_targets): Likewise.
709 * linux-sparc-low.c (the_low_targets): Likewise.
710
4a6ed09b
PA
7112015-12-17 Pedro Alves <palves@redhat.com>
712
713 * linux-low.c (linux_kill_one_lwp): Remove references to
714 LinuxThreads.
715 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
716 to 'kill'.
717 (linux_init_signals): Delete.
718 (initialize_low): Adjust.
719 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
720
7544db95
PA
7212015-12-16 Pedro Alves <palves@redhat.com>
722
723 * configure.ac (compiler warning flags): When testing a
724 -Wno-foo option, check whether -Wfoo works instead.
725 * configure: Regenerate.
726
8020350c
DB
7272015-12-11 Don Breazeal <donb@codesourcery.com>
728
729 * server.c (process_serial_event): Don't exit from gdbserver
730 in remote mode if there are still active inferiors.
731
db91f502
YQ
7322015-12-11 Yao Qi <yao.qi@linaro.org>
733
734 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
735 arm_breakpoint_at if the process is 32-bit.
736
b37a6290
YQ
7372015-12-11 Yao Qi <yao.qi@linaro.org>
738
739 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
740 arm breakpoint.
741
17b1509a
YQ
7422015-12-07 Yao Qi <yao.qi@linaro.org>
743
744 * configure.srv: Append arm.o to srv_tgtobj for
745 aarch64*-*-linux* target.
746 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
747 from linux-arm-low.c.
748 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
749 (arm_breakpoint_len, thumb_breakpoint): Likewise.
750 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
751 (thumb2_breakpoint_len): Likewise.
752 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
753 (arm_breakpoint_kinds): Likewise.
754 (arm_breakpoint_kind_from_pc): Likewise.
755 (arm_sw_breakpoint_from_kind): Likewise.
756 (arm_breakpoint_kind_from_current_state): Likewise.
757 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
758 (arm_sw_breakpoint_from_kind): Declare.
759 (arm_breakpoint_kind_from_current_state): Declare.
760 (arm_breakpoint_at): Declare.
761 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
762 arm_sw_breakpoint_from_kind if process is 32-bit.
763 (aarch64_breakpoint_kind_from_pc): New function.
764 (aarch64_breakpoint_kind_from_current_state): New function.
765 (the_low_target): Initialize fields breakpoint_kind_from_pc
766 and breakpoint_kind_from_current_state.
767 * linux-arm-low.c (arm_breakpoint_kinds): Move to
768 linux-aarch32-low.c.
769 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
770 (arm_breakpoint, arm_breakpoint_len): Likewise.
771 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
772 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
773 (arm_is_thumb_mode): Likewise.
774 (arm_breakpoint_at): Likewise.
775 (arm_breakpoint_kind_from_pc): Likewise.
776 (arm_sw_breakpoint_from_kind): Likewise.
777 (arm_breakpoint_kind_from_current_state): Likewise.
778
779 Revert:
780 2015-08-04 Yao Qi <yao.qi@linaro.org>
781
782 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
783 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
784 * server.c (extended_protocol): Remove "static".
785 * server.h (extended_protocol): Declare it.
786
ece66d65
JS
7872015-12-04 Josh Stone <jistone@redhat.com>
788
789 * target.h (struct target_ops) <arch_setup>: Rename to ...
790 (struct target_ops) <post_create_inferior>: ... this.
791 (target_arch_setup): Rename to ...
792 (target_post_create_inferior): ... this, calling post_create_inferior.
793 * server.c (start_inferior): Update target_arch_setup calls to
794 target_post_create_inferior.
795 * linux-low.c (linux_low_ptrace_options): Forward declare.
796 (linux_arch_setup): Update its comment for general use.
797 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
798 (struct linux_target_ops): Use linux_post_create_inferior.
799 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
800 to post_create_inferior.
801 * nto-low.c (struct nto_target_ops): Likewise.
802 * spu-low.c (struct spu_target_ops): Likewise.
803 * win32-low.c (struct win32_target_ops): Likewise.
804
e58c48b4
AT
8052015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
806
807 * linux-arm-low.c: Remove duplicate arch/arm.h include.
808
fbec8956
AT
8092015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
810
811 * linux-arm-low.c (arm_reinsert_addr): Remove function.
812 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
813 * linux-cris-low.c (cris_reinsert_addr> Remove function.
814 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
815 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
816 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
817 * linux-mips-low.c (mips_reinsert_addr): Remove function.
818 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
819 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
820 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
821 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
822 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
823
9b4c5f87
AT
8242015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
825
826 * linux-low.c (linux_look_up_symbols): Don't call
827 linux_supports_traceclone.
828 * linux-low.h (thread_db_init): Remove use_events argument.
829 * thread-db.c (thread_db_use_event): Remove global variable.
830 (struct thread_db) <td_thr_event_enable_p>: Remove field.
831 (struct thread_db) <td_create_bp>: Remove field.
832 (thread_db_create_event): Remove function.
833 (thread_db_enable_reporting): Likewise.
834 (find_one_thread): Don't check for thread_db_use_events.
835 (attach_thread): Likewise.
836 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
837 (try_thread_db_load_1): Don't check for thread_db_use_events.
838 (thread_db_init): Remove use_events argument and thread events
839 handling.
840 (remove_thread_event_breakpoints): Remove function.
841 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
842
7d00775e
AT
8432015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
844
845 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
846 New function.
847 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
848 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
849 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
850 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
851 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
852 Initialize.
853 * linux-crisv32-low.c (cris_supports_hardware_single_step):
854 New function.
855 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
856 * linux-low.c (can_hardware_single_step): Use
857 supports_hardware_single_step.
858 (can_software_single_step): New function.
859 (start_step_over): Call can_software_single_step.
860 (linux_supports_hardware_single_step): New function.
861 (struct target_ops) <supports_software_single_step>: Initialize.
862 * linux-low.h (struct linux_target_ops)
863 <supports_hardware_single_step>: Initialize.
864 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
865 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
866 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
867 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
868 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
869 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
870 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
871 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
872 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
873 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
874 Initialize.
875 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
876 (struct linux_target_ops) <tile_supports_hardware_single_step>:
877 Initialize.
878 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
879 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
880 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
881 New function.
882 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
883 * target.h (struct target_ops): <supports_software_single_step>:
884 New field.
885 (target_supports_software_single_step): New macro.
886
2d97cd35
AT
8872015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
888
889 * linux-low.c (linux_wait_1): Fix pc advance condition.
890 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
891 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
892
769ef81f
AT
8932015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
894
895 * linux-arm-low.c (arm_is_thumb_mode): New function.
896 (arm_breakpoint_at): Use arm_is_thumb_mode.
897 (arm_breakpoint_kind_from_current_state): New function.
898 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
899 Initialize.
900 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
901 (linux_breakpoint_kind_from_current_state): New function.
902 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
903 * linux-low.h (struct linux_target_ops)
904 <breakpoint_kind_from_current_state>: New field.
905 * target.h (struct target_ops): Likewise.
906 (target_breakpoint_kind_from_current_state): New macro.
907
1bebeeca
PA
9082015-11-30 Pedro Alves <palves@redhat.com>
909
910 * linux-low.c (linux_resume): Wake up the event loop before
911 returning.
912
a67a9fae
PA
9132015-11-30 Pedro Alves <palves@redhat.com>
914
915 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
916 check.
917 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
918 to -1.
919 * target.c (struct thread_search): New structure.
920 (thread_search_callback): New function.
921 (prev_general_thread): New global.
922 (prepare_to_access_memory, done_accessing_memory): New functions.
923 * target.h (prepare_to_access_memory, done_accessing_memory):
924 Replace macros with function declarations.
925
f2faf941
PA
9262015-11-30 Pedro Alves <palves@redhat.com>
927
928 PR 14618
929 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
930 report TARGET_WAITKIND_NO_RESUMED.
931 * remote-utils.c (prepare_resume_reply): Handle
932 TARGET_WAITKIND_NO_RESUMED.
933 * server.c (report_no_resumed): New global.
934 (handle_query) <qSupported>: Handle "no-resumed+". Report
935 "no-resumed+" support.
936 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
937 return error if the client doesn't support no-resumed events.
938 (push_stop_notification): New function.
939 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
940 events if the client supports them.
941
a681f9c9
PA
9422015-11-30 Pedro Alves <palves@redhat.com>
943
944 * linux-low.c (thread_still_has_status_pending_p): Don't check
945 vCont;t here.
946 (lwp_resumed): New function.
947 (status_pending_p_callback): Return early if the LWP is not
948 supposed to be resumed.
949
65706a29
PA
9502015-11-30 Pedro Alves <palves@redhat.com>
951
952 * linux-low.c (handle_extended_wait): Assert that the LWP's
953 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
954 thread create events, leave the new child's status pending.
955 (linux_low_filter_event): If GDB wants to hear about thread exit
956 events, leave the LWP marked dead and don't delete it.
957 (linux_wait_for_event_filtered): Don't check for thread exit.
958 (filter_exit_event): New function.
959 (linux_wait_1): Use it, when returning an exit event.
960 (linux_resume_one_lwp_throw): Assert that the LWP's
961 waitstatus is TARGET_WAITKIND_IGNORE.
962 * remote-utils.c (prepare_resume_reply): Handle
963 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
964 * server.c (report_thread_events): New global.
965 (handle_general_set): Handle QThreadEvents.
966 (handle_query) <qSupported>: Handle and report QThreadEvents+;
967 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
968 TARGET_WAITKIND_THREAD_EXITED.
969 * server.h (report_thread_events): Declare.
970
56cf4bed
PA
9712015-11-30 Pedro Alves <palves@redhat.com>
972
973 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
974 the thread's last_resume_kind was resume_stop.
975
500c1d85
PA
9762015-11-30 Pedro Alves <palves@redhat.com>
977
978 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
979 before returning.
980
de979965
PA
9812015-11-30 Pedro Alves <palves@redhat.com>
982
983 * server.c (handle_v_requests): Handle vCtrlC.
984
34c65914
PA
9852015-11-30 Pedro Alves <palves@redhat.com>
986
987 * gdbthread.h (find_any_thread_of_pid): Declare.
988 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
989 functions.
990 * server.c (handle_query): If current_thread is NULL, look for
991 another thread of the selected process.
992
79efa585 9932015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 994 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
995
996 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
997 * server.c (handle_qxfer_threads_worker): Refactor to include thread
998 name in reply.
999 * target.h (struct target_ops) <thread_name>: New field.
1000 (target_thread_name): New macro.
1001
80d82c19
JB
10022015-11-23 Joel Brobecker <brobecker@adacore.com>
1003
1004 * regcache.h (regcache_invalidate_pid): Add declaration.
1005 * regcache.c (regcache_invalidate_pid): New function, extracted
1006 from regcache_invalidate.
1007 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
1008 Add trivial documentation comment.
1009 * lynx-low.c: Use regcache_invalidate_pid instead of
1010 regcache_invalidate.
1011
64da5dd5
JB
10122015-11-23 Joel Brobecker <brobecker@adacore.com>
1013
1014 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
1015 and Elf64_auxv_t if the target is Android.
1016
37ce4055
DE
10172015-11-22 Doug Evans <xdje42@gmail.com>
1018
1019 * target.h: #include <sys/types.h>.
1020
06e03fff
PA
10212015-11-19 Pedro Alves <palves@redhat.com>
1022
1023 * linux-low.c (linux_process_qsupported): Change prototype.
1024 Adjust.
1025 * linux-low.h (struct linux_target_ops) <process_qsupported>:
1026 Change prototype.
1027 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
1028 and adjust to loop over all features.
1029 * server.c (handle_query) <qSupported>: Adjust to call
1030 target_process_qsupported once, passing it a vector of unprocessed
1031 features.
1032 * target.h (struct target_ops) <process_qsupported>: Change
1033 prototype.
1034 (target_process_qsupported): Adjust.
1035
9a084706
PA
10362015-11-19 Pedro Alves <palves@redhat.com>
1037
1038 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
1039 mode.
1040 * configure: Regenerate.
1041
dad44a1f
PA
10422015-11-19 Pedro Alves <palves@redhat.com>
1043
1044 * configure: Regenerate.
1045
231c0592
YQ
10462015-11-19 Yao Qi <yao.qi@linaro.org>
1047
1048 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
1049 type to uint32_t.
1050
6c1c9a8b
YQ
10512015-11-19 Yao Qi <yao.qi@linaro.org>
1052
1053 * linux-aarch64-low.c (enum aarch64_operand_type): New.
1054 (struct aarch64_operand): Move enum out.
1055
9caa3311
YQ
10562015-11-19 Yao Qi <yao.qi@linaro.org>
1057
1058 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
1059 struct user_fpsimd_state *.
1060 (aarch64_store_fpregset): Likewise.
1061
6a69a054
YQ
10622015-11-19 Yao Qi <yao.qi@linaro.org>
1063
1064 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
1065 struct user_pt_regs *.
1066 (aarch64_store_gregset): Likewise.
1067
1798301e
PA
10682015-11-18 Pedro Alves <palves@redhat.com>
1069
1070 * Makefile.in (all_object_files): Add $IPA_OBJS.
1071
ce7715e2
PA
10722015-11-17 Pedro Alves <palves@redhat.com>
1073
1074 * win32-low.c (win32_resume): Use gdb_signal_from_host,
1075 GDB_SIGNAL_0 and gdb_signal_to_string.
1076
c0879059
PA
10772015-11-17 Pedro Alves <palves@redhat.com>
1078
1079 * win32-low.c (handle_output_debug_string): Remove parameter.
1080 (win32_kill): Remove our_status local and adjust call to
1081 handle_output_debug_string.
1082 (get_child_debug_event): Adjust call to
1083 handle_output_debug_string.
1084
1996e237
SM
10852015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1086
1087 * linux-mips-low.c (mips_fill_gregset): Add cast.
1088 (mips_store_gregset): Likewise.
1089 (mips_fill_fpregset): Likewise.
1090 (mips_store_fpregset): Likewise.
1091
cbec665b
SM
10922015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1093
1094 * linux-mips-low.c (mips_add_watchpoint): Rename private to
1095 priv.
1096
eb3e3c67
SM
10972015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1098
1099 * linux-mips-low.c (mips_linux_new_thread): Change type of
1100 watch_type to enum target_hw_bp_type.
1101
171de4b8
SM
11022015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1103
1104 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
1105 Change return type to arm_hwbp_type.
1106
04248ead
SM
11072015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1108
1109 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
1110 (arm_store_gregset): Likewise.
1111 * linux-arm-low.c (arm_get_hwcap): Likewise.
1112 (arm_read_description): Likewise.
1113
04b3479c
SM
11142015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1115
1116 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
1117
2bc84e8a
SM
11182015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1119
1120 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
1121 (ppc_fill_vsxregset): Likewise.
1122 (ppc_store_vsxregset): Likewise.
1123 (ppc_fill_vrregset): Likewise.
1124 (ppc_store_vrregset): Likewise.
1125 (ppc_fill_evrregset): Likewise.
1126 (ppc_store_evrregset): Likewise.
1127
e6c5bb05
SM
11282015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1129
1130 * linux-ppc-low.c (ppc_usrregs_info): Remove
1131 forward-declaration.
1132 (ppc_arch_setup): Move lower in file.
1133
7ea45d72
SM
11342015-10-30 Simon Marchi <simon.marchi@ericsson.com>
1135
1136 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
1137 (ps_pdwrite): Likewise.
1138
69291610
HW
11392015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
1140
1141 * linux-arm-low.c (arm_new_thread): Move pointer dereference
1142 to after assert checks.
1143
b42945fd
SM
11442015-10-29 Simon Marchi <simon.marchi@ericsson.com>
1145
1146 * proc-service.c (ps_pdread): Add/adjust casts.
1147 (ps_pdwrite): Add/adjust casts.
1148
d6f85c84
SM
11492015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1150
1151 * server.c (handle_search_memory_1): Cast return value of
1152 memmem.
1153
f98cd059
SM
11542015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1155
1156 * server.c (write_qxfer_response): Change type of data to
1157 gdb_byte *.
1158
d2412fa5
PA
11592015-10-29 Pedro Alves <palves@redhat.com>
1160
1161 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
1162
c17414a2
PA
11632015-10-29 Pedro Alves <palves@redhat.com>
1164
1165 * tracepoint.c (clear_installed_tracepoints): Add casts.
1166
e053fbc4
PA
11672015-10-29 Pedro Alves <palves@redhat.com>
1168
1169 * server.c (handle_v_cont, process_serial_event): Add enum
1170 gdb_signal casts to signal parsing code.
1171
add67df8
PA
11722015-10-29 Pedro Alves <palves@redhat.com>
1173
1174 * linux-low.h (NULL_REGSET): Define.
1175 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1176 * linux-arm-low.c (arm_regsets): Likewise.
1177 * linux-crisv32-low.c (cris_regsets): Likewise.
1178 * linux-m68k-low.c (m68k_regsets): Likewise.
1179 * linux-mips-low.c (mips_regsets): Likewise.
1180 * linux-nios2-low.c (nios2_regsets): Likewise.
1181 * linux-ppc-low.c (ppc_regsets): Likewise.
1182 * linux-s390-low.c (s390_regsets): Likewise.
1183 * linux-sh-low.c (sh_regsets): Likewise.
1184 * linux-sparc-low.c (sparc_regsets): Likewise.
1185 * linux-tic6x-low.c (tic6x_regsets): Likewise.
1186 * linux-tile-low.c (tile_regsets): Likewise.
1187 * linux-x86-low.c (x86_regsets): Likewise.
1188 * linux-xtensa-low.c (xtensa_regsets): Likewise.
1189
50bc912a
PA
11902015-10-29 Pedro Alves <palves@redhat.com>
1191
1192 * linux-low.h (NULL_REGSET): Define.
1193 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1194 * linux-arm-low.c (arm_regsets): Likewise.
1195 * linux-crisv32-low.c (cris_regsets): Likewise.
1196 * linux-m68k-low.c (m68k_regsets): Likewise.
1197 * linux-mips-low.c (mips_regsets): Likewise.
1198 * linux-nios2-low.c (nios2_regsets): Likewise.
1199 * linux-ppc-low.c (ppc_regsets): Likewise.
1200 * linux-s390-low.c (s390_regsets): Likewise.
1201 * linux-sh-low.c (sh_regsets): Likewise.
1202 * linux-sparc-low.c (sparc_regsets): Likewise.
1203 * linux-tic6x-low.c (tic6x_regsets): Likewise.
1204 * linux-tile-low.c (tile_regsets): Likewise.
1205 * linux-x86-low.c (x86_regsets): Likewise.
1206 * linux-xtensa-low.c (xtensa_regsets): Likewise.
1207
682b2546
DE
12082015-10-26 Doug Evans <dje@google.com>
1209
1210 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
1211
963843d4
DE
12122015-10-26 Doug Evans <dje@google.com>
1213
1214 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
1215
d41401ac
DE
12162015-10-26 Doug Evans <dje@google.com>
1217
1218 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
1219 for debug_printf.
1220 (attach_thread, find_new_threads_callback): Ditto.
1221
3db28855
AT
12222015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1223
1224 * mem-break.h (set_breakpoint_data): Remove.
1225
fb78e89c
AT
12262015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1227
1228 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
1229 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
1230 (initialize_low): Remove set_breakpoint_data call.
1231 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
1232 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
1233 (initialize_low): Remove set_breakpoint_data call.
1234 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
1235 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
1236 (initialize_low): Remove set_breakpoint_data call.
1237
2e6ee069
AT
12382015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1239
1240 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
1241 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
1242 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
1243 * target.h (target_breakpoint_kind_from_pc): New macro.
1244
1652a986
AT
12452015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
1246
1247 * linux-low.c (default_breakpoint_kind_from_pc): New function.
1248 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
1249 the default breakpoint kind.
1250
abeead09
AT
12512015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1252
1253 * linux-arm-low.c (arm_supports_z_point_type): Add software
1254 breakpoint support.
1255
b0b4b501
AT
12562015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1257
1258 * linux-arm-low.c: Refactor breakpoint definitions.
1259 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
1260 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
1261
8689682c
AT
12622015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1263
1264 * Makefile.in: Add arm.c/o.
1265 * configure.srv: Likewise.
1266 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
1267 (arm_breakpoint_kind_from_pc): New function.
1268 (arm_sw_breakpoint_from_kind): Return proper kind.
1269 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
1270
27165294
AT
12712015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1272
1273 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
1274 removal.
1275 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
1276 (struct raw_breakpoint) <size>: Remove.
1277 (struct raw_breakpoint) <kind>: Add.
1278 (bp_size): New function.
1279 (bp_opcode): Likewise.
1280 (find_raw_breakpoint_at): Adjust for kind.
1281 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
1282 (remove_memory_breakpoint): Adjust for kind call bp_size.
1283 (set_raw_breakpoint_at): Adjust for kind.
1284 (set_breakpoint): Likewise.
1285 (set_breakpoint_at): Call breakpoint_kind_from_pc.
1286 (delete_raw_breakpoint): Adjust for kind.
1287 (delete_breakpoint): Likewise.
1288 (find_gdb_breakpoint): Likewise.
1289 (set_gdb_breakpoint_1): Likewise.
1290 (set_gdb_breakpoint): Likewise.
1291 (delete_gdb_breakpoint_1): Likewise.
1292 (delete_gdb_breakpoint): Likewise.
1293 (uninsert_raw_breakpoint): Likewise.
1294 (reinsert_raw_breakpoint): Likewise.
1295 (set_breakpoint_data): Remove.
1296 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
1297 (check_mem_read): Adjust for kind call bp_size.
1298 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
1299 (clone_one_breakpoint): Adjust for kind.
1300 * mem-break.h (set_gdb_breakpoint): Likewise.
1301 (delete_gdb_breakpoint): Likewise.
1302 * server.c (process_serial_event): Likewise.
1303
dd373349
AT
13042015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1305
1306 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
1307 (struct linux_target_ops) <breakpoint>: Remove.
1308 (struct linux_target_ops) <breakpoint_len>: Remove.
1309 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1310 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1311 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
1312 (arm_sw_breakpoint_from_kind): New function.
1313 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
1314 (struct linux_target_ops) <breakpoint>: Remove.
1315 (struct linux_target_ops) <breakpoint_len>: Remove.
1316 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1317 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1318 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
1319 (struct linux_target_ops) <breakpoint>: Remove.
1320 (struct linux_target_ops) <breakpoint_len>: Remove.
1321 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1322 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1323 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
1324 (struct linux_target_ops) <breakpoint>: Remove.
1325 (struct linux_target_ops) <breakpoint_len>: Remove.
1326 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1327 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1328 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
1329 and sw_breakpoint_from_kind to increment the pc.
1330 (linux_breakpoint_kind_from_pc): New function.
1331 (linux_sw_breakpoint_from_kind): New function.
1332 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
1333 (initialize_low): Call breakpoint_kind_from_pc and
1334 sw_breakpoint_from_kind to replace breakpoint_data/len.
1335 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
1336 New field.
1337 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
1338 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
1339 (struct linux_target_ops) <breakpoint>: Remove.
1340 (struct linux_target_ops) <breakpoint_len>: Remove.
1341 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1342 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1343 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
1344 (struct linux_target_ops) <breakpoint>: Remove.
1345 (struct linux_target_ops) <breakpoint_len>: Remove.
1346 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1347 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1348 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
1349 (struct linux_target_ops) <breakpoint>: Remove.
1350 (struct linux_target_ops) <breakpoint_len>: Remove.
1351 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1352 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1353 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
1354 (struct linux_target_ops) <breakpoint>: Remove.
1355 (struct linux_target_ops) <breakpoint_len>: Remove.
1356 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1357 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1358 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
1359 (struct linux_target_ops) <breakpoint>: Remove.
1360 (struct linux_target_ops) <breakpoint_len>: Remove.
1361 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1362 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1363 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
1364 (struct linux_target_ops) <breakpoint>: Remove.
1365 (struct linux_target_ops) <breakpoint_len>: Remove.
1366 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1367 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1368 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
1369 (struct linux_target_ops) <breakpoint>: Remove.
1370 (struct linux_target_ops) <breakpoint_len>: Remove.
1371 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1372 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1373 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
1374 (struct linux_target_ops) <breakpoint>: Remove.
1375 (struct linux_target_ops) <breakpoint_len>: Remove.
1376 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1377 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1378 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
1379 (struct linux_target_ops) <breakpoint>: Remove.
1380 (struct linux_target_ops) <breakpoint_len>: Remove.
1381 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1382 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1383 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
1384 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
1385 (struct linux_target_ops) <breakpoint>: Remove.
1386 (struct linux_target_ops) <breakpoint_len>: Remove.
1387 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1388 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1389 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
1390 (struct linux_target_ops) <breakpoint>: Remove.
1391 (struct linux_target_ops) <breakpoint_len>: Remove.
1392 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1393 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1394
4cd98a19
AT
13952015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1396
1397 * linux-cris-low.c (cris_get_pc): Remove void arg.
1398
774ee6d2
AR
13992015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
1400
1401 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
1402 variable name.
1403
833dcd29
AR
14042015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
1405
1406 * inferiors.c (thread_pid_matches_callback): New function.
1407 (find_thread_process): New function.
1408 (remove_thread): Reset current_thread.
1409 (remove_process): Assert threads have been removed first.
1410
8d689ee5
YQ
14112015-10-15 Yao Qi <yao.qi@linaro.org>
1412
1413 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
1414 if it is 3.
1415 (aarch64_remove_point): Likewise.
1416 * regcache.c (regcache_register_size): New function.
1417
1c2e1515
YQ
14182015-10-12 Yao Qi <yao.qi@linaro.org>
1419
1420 * linux-aarch64-low.c: Update all callers as emit_load_store
1421 is renamed to aarch64_emit_load_store.
1422
e1c587c3
YQ
14232015-10-12 Yao Qi <yao.qi@linaro.org>
1424
1425 * linux-aarch64-low.c: Update all callers of function renaming
1426 from emit_insn to aarch64_emit_insn.
1427
b6542f81
YQ
14282015-10-12 Yao Qi <yao.qi@linaro.org>
1429
1430 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
1431 arch/aarch64-insn.h.
1432 (struct aarch64_memory_operand): Likewise.
1433 (ENCODE): Likewise.
1434 (emit_insn): Move to arch/aarch64-insn.c.
1435 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
1436 (emit_load_store): Move to arch/aarch64-insn.c.
1437 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
1438 (can_encode_int32): Remove.
1439
246994ce
YQ
14402015-10-12 Yao Qi <yao.qi@linaro.org>
1441
1442 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
1443 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
1444 (aarch64_relocate_instruction): Likewise.
1445 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
1446 (struct aarch64_insn_visitor): Likewise.
1447
0badd99f
YQ
14482015-10-12 Yao Qi <yao.qi@linaro.org>
1449
1450 * linux-aarch64-low.c (struct aarch64_insn_data): New.
1451 (struct aarch64_insn_visitor): New.
1452 (struct aarch64_insn_relocation_data): New.
1453 (aarch64_ftrace_insn_reloc_b): New function.
1454 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1455 (aarch64_ftrace_insn_reloc_cb): Likewise.
1456 (aarch64_ftrace_insn_reloc_tb): Likewise.
1457 (aarch64_ftrace_insn_reloc_adr): Likewise.
1458 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
1459 (aarch64_ftrace_insn_reloc_others): Likewise.
1460 (visitor): New.
1461 (aarch64_relocate_instruction): Use visitor.
1462
dfaffe9d
YQ
14632015-10-12 Yao Qi <yao.qi@linaro.org>
1464
1465 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
1466 int. Add argument buf.
1467 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
1468 aarch64_relocate_instruction.
1469
70b439f0
YQ
14702015-10-12 Yao Qi <yao.qi@linaro.org>
1471
1472 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
1473 argument insn. Remove local variable insn. Don't call
1474 target_read_uint32.
1475 (aarch64_install_fast_tracepoint_jump_pad): Call
1476 target_read_uint32.
1477
7781c06f
YQ
14782015-09-30 Yao Qi <yao.qi@linaro.org>
1479
1480 * linux-aarch64-low.c (emit_movk): Shorten a long line.
1481 (emit_load_store_pair): Likewise.
1482
9a3c8263
SM
14832015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1484
1485 * dll.c (match_dll): Add cast(s).
1486 (unloaded_dll): Likewise.
1487 * linux-low.c (second_thread_of_pid_p): Likewise.
1488 (delete_lwp_callback): Likewise.
1489 (count_events_callback): Likewise.
1490 (select_event_lwp_callback): Likewise.
1491 (linux_set_resume_request): Likewise.
1492 * server.c (accumulate_file_name_length): Likewise.
1493 (emit_dll_description): Likewise.
1494 (handle_qxfer_threads_worker): Likewise.
1495 (visit_actioned_threads): Likewise.
1496 * thread-db.c (any_thread_of): Likewise.
1497 * tracepoint.c (same_process_p): Likewise.
1498 (match_blocktype): Likewise.
1499 (build_traceframe_info_xml): Likewise.
1500
224c3ddb
SM
15012015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1502
1503 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
1504 assignment.
1505 (gdb_unparse_agent_expr): Likewise.
1506 * hostio.c (require_data): Likewise.
1507 (handle_pread): Likewise.
1508 * linux-low.c (disable_regset): Likewise.
1509 (fetch_register): Likewise.
1510 (store_register): Likewise.
1511 (get_dynamic): Likewise.
1512 (linux_qxfer_libraries_svr4): Likewise.
1513 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
1514 (set_fast_tracepoint_jump): Likewise.
1515 (uninsert_fast_tracepoint_jumps_at): Likewise.
1516 (reinsert_fast_tracepoint_jumps_at): Likewise.
1517 (validate_inserted_breakpoint): Likewise.
1518 (clone_agent_expr): Likewise.
1519 * regcache.c (init_register_cache): Likewise.
1520 * remote-utils.c (putpkt_binary_1): Likewise.
1521 (decode_M_packet): Likewise.
1522 (decode_X_packet): Likewise.
1523 (look_up_one_symbol): Likewise.
1524 (relocate_instruction): Likewise.
1525 (monitor_output): Likewise.
1526 * server.c (handle_search_memory): Likewise.
1527 (handle_qxfer_exec_file): Likewise.
1528 (handle_qxfer_libraries): Likewise.
1529 (handle_qxfer): Likewise.
1530 (handle_query): Likewise.
1531 (handle_v_cont): Likewise.
1532 (handle_v_run): Likewise.
1533 (captured_main): Likewise.
1534 * target.c (write_inferior_memory): Likewise.
1535 * thread-db.c (try_thread_db_load_from_dir): Likewise.
1536 * tracepoint.c (init_trace_buffer): Likewise.
1537 (add_tracepoint_action): Likewise.
1538 (add_traceframe): Likewise.
1539 (add_traceframe_block): Likewise.
1540 (cmd_qtdpsrc): Likewise.
1541 (cmd_qtdv): Likewise.
1542 (cmd_qtstatus): Likewise.
1543 (response_source): Likewise.
1544 (response_tsv): Likewise.
1545 (cmd_qtnotes): Likewise.
1546 (gdb_collect): Likewise.
1547 (initialize_tracepoint): Likewise.
1548
afbe19f8
PL
15492015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1550
1551 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
1552 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
1553 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
1554 <NOP>: New.
1555 (enum aarch64_condition_codes): New enum.
1556 (w0): New static global.
1557 (fp): Likewise.
1558 (lr): Likewise.
1559 (struct aarch64_memory_operand) <type>: New
1560 MEMORY_OPERAND_POSTINDEX type.
1561 (postindex_memory_operand): New helper function.
1562 (emit_ret): New function.
1563 (emit_load_store_pair): New function, factored out of emit_stp
1564 with support for MEMORY_OPERAND_POSTINDEX.
1565 (emit_stp): Rewrite using emit_load_store_pair.
1566 (emit_ldp): New function.
1567 (emit_load_store): Likewise.
1568 (emit_ldr): Mention post-index instruction in comment.
1569 (emit_ldrh): New function.
1570 (emit_ldrb): New function.
1571 (emit_ldrsw): Mention post-index instruction in comment.
1572 (emit_str): Likewise.
1573 (emit_subs): New function.
1574 (emit_cmp): Likewise.
1575 (emit_and): Likewise.
1576 (emit_orr): Likewise.
1577 (emit_orn): Likewise.
1578 (emit_eor): Likewise.
1579 (emit_mvn): Likewise.
1580 (emit_lslv): Likewise.
1581 (emit_lsrv): Likewise.
1582 (emit_asrv): Likewise.
1583 (emit_mul): Likewise.
1584 (emit_sbfm): Likewise.
1585 (emit_sbfx): Likewise.
1586 (emit_ubfm): Likewise.
1587 (emit_ubfx): Likewise.
1588 (emit_csinc): Likewise.
1589 (emit_cset): Likewise.
1590 (emit_nop): Likewise.
1591 (emit_ops_insns): New helper function.
1592 (emit_pop): Likewise.
1593 (emit_push): Likewise.
1594 (aarch64_emit_prologue): New function.
1595 (aarch64_emit_epilogue): Likewise.
1596 (aarch64_emit_add): Likewise.
1597 (aarch64_emit_sub): Likewise.
1598 (aarch64_emit_mul): Likewise.
1599 (aarch64_emit_lsh): Likewise.
1600 (aarch64_emit_rsh_signed): Likewise.
1601 (aarch64_emit_rsh_unsigned): Likewise.
1602 (aarch64_emit_ext): Likewise.
1603 (aarch64_emit_log_not): Likewise.
1604 (aarch64_emit_bit_and): Likewise.
1605 (aarch64_emit_bit_or): Likewise.
1606 (aarch64_emit_bit_xor): Likewise.
1607 (aarch64_emit_bit_not): Likewise.
1608 (aarch64_emit_equal): Likewise.
1609 (aarch64_emit_less_signed): Likewise.
1610 (aarch64_emit_less_unsigned): Likewise.
1611 (aarch64_emit_ref): Likewise.
1612 (aarch64_emit_if_goto): Likewise.
1613 (aarch64_emit_goto): Likewise.
1614 (aarch64_write_goto_address): Likewise.
1615 (aarch64_emit_const): Likewise.
1616 (aarch64_emit_call): Likewise.
1617 (aarch64_emit_reg): Likewise.
1618 (aarch64_emit_pop): Likewise.
1619 (aarch64_emit_stack_flush): Likewise.
1620 (aarch64_emit_zero_ext): Likewise.
1621 (aarch64_emit_swap): Likewise.
1622 (aarch64_emit_stack_adjust): Likewise.
1623 (aarch64_emit_int_call_1): Likewise.
1624 (aarch64_emit_void_call_2): Likewise.
1625 (aarch64_emit_eq_goto): Likewise.
1626 (aarch64_emit_ne_goto): Likewise.
1627 (aarch64_emit_lt_goto): Likewise.
1628 (aarch64_emit_le_goto): Likewise.
1629 (aarch64_emit_gt_goto): Likewise.
1630 (aarch64_emit_ge_got): Likewise.
1631 (aarch64_emit_ops_impl): New static global variable.
1632 (aarch64_emit_ops): New target function, return
1633 &aarch64_emit_ops_impl.
1634 (struct linux_target_ops): Install it.
1635
bb903df0
PL
16362015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1637
1638 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
1639 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
1640 aarch64-ipa.o.
1641 * linux-aarch64-ipa.c: New file.
1642 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
1643 and endian.h.
1644 (aarch64_get_thread_area): New target method.
1645 (extract_signed_bitfield): New helper function.
1646 (aarch64_decode_ldr_literal): New function.
1647 (enum aarch64_opcodes): New enum.
1648 (struct aarch64_register): New struct.
1649 (struct aarch64_operand): New struct.
1650 (x0): New static global.
1651 (x1): Likewise.
1652 (x2): Likewise.
1653 (x3): Likewise.
1654 (x4): Likewise.
1655 (w2): Likewise.
1656 (ip0): Likewise.
1657 (sp): Likewise.
1658 (xzr): Likewise.
1659 (aarch64_register): New helper function.
1660 (register_operand): Likewise.
1661 (immediate_operand): Likewise.
1662 (struct aarch64_memory_operand): New struct.
1663 (offset_memory_operand): New helper function.
1664 (preindex_memory_operand): Likewise.
1665 (enum aarch64_system_control_registers): New enum.
1666 (ENCODE): New macro.
1667 (emit_insn): New helper function.
1668 (emit_b): New function.
1669 (emit_bcond): Likewise.
1670 (emit_cb): Likewise.
1671 (emit_tb): Likewise.
1672 (emit_blr): Likewise.
1673 (emit_stp): Likewise.
1674 (emit_ldp_q_offset): Likewise.
1675 (emit_stp_q_offset): Likewise.
1676 (emit_load_store): Likewise.
1677 (emit_ldr): Likewise.
1678 (emit_ldrsw): Likewise.
1679 (emit_str): Likewise.
1680 (emit_ldaxr): Likewise.
1681 (emit_stxr): Likewise.
1682 (emit_stlr): Likewise.
1683 (emit_data_processing_reg): Likewise.
1684 (emit_data_processing): Likewise.
1685 (emit_add): Likewise.
1686 (emit_sub): Likewise.
1687 (emit_mov): Likewise.
1688 (emit_movk): Likewise.
1689 (emit_mov_addr): Likewise.
1690 (emit_mrs): Likewise.
1691 (emit_msr): Likewise.
1692 (emit_sevl): Likewise.
1693 (emit_wfe): Likewise.
1694 (append_insns): Likewise.
1695 (can_encode_int32_in): New helper function.
1696 (aarch64_relocate_instruction): New function.
1697 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
1698 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
1699 (struct linux_target_ops): Install aarch64_get_thread_area,
1700 aarch64_install_fast_tracepoint_jump_pad and
1701 aarch64_get_min_fast_tracepoint_insn_len.
1702
787749ea
PL
17032015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1704
1705 * Makefile.in (aarch64-insn.o): New rule.
1706 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
1707
9812b2e6
YQ
17082015-09-21 Yao Qi <yao.qi@linaro.org>
1709
1710 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
1711
18fe412b
YQ
17122015-09-21 Yao Qi <yao.qi@linaro.org>
1713
1714 * tracepoint.c (max_jump_pad_size): Remove.
1715
a0cc84cd
YQ
17162015-09-18 Yao Qi <yao.qi@linaro.org>
1717
1718 * linux-aarch64-low.c: Don't include sys/uio.h.
1719 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
1720
d78908cf
WW
17212015-09-16 Wei-cheng Wang <cole945@gmail.com>
1722
1723 * tracepoint.c (eval_result_type): Change prototype.
1724 (condition_true_at_tracepoint): Fix argument to compiled_cond.
1725
d57e0d50
PA
17262015-09-15 Pedro Alves <palves@redhat.com>
1727
1728 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
1729 Check whether to report exec events instead of checking whether
1730 multiprocess is enabled.
1731
5a676acc
PA
17322015-09-15 Pedro Alves <palves@redhat.com>
1733
1734 PR remote/18965
1735 * remote-utils.c (prepare_resume_reply): Merge
1736 TARGET_WAITKIND_VFORK_DONE switch case with the
1737 TARGET_WAITKIND_FORKED case.
1738
7c5d0fad
YQ
17392015-09-15 Yao Qi <yao.qi@linaro.org>
1740
1741 * server.c (handle_query): Check string comparison using
1742 "else if" instead of "if".
1743
750ce8d1
YQ
17442015-09-15 Yao Qi <yao.qi@linaro.org>
1745
1746 * server.c (vCont_supported): New global variable.
1747 (handle_query): Set vCont_supported to 1 if "vContSupported+"
1748 matches. Append ";vContSupported+" to own_buf.
1749 (handle_v_requests): Append ";s;S" to own_buf if target supports
1750 hardware single step or vCont_supported is false.
1751 (capture_main): Set vCont_supported to zero.
1752
70b90b91
YQ
17532015-09-15 Yao Qi <yao.qi@linaro.org>
1754
1755 * linux-low.c (linux_supports_conditional_breakpoints): Rename
1756 it to ...
1757 (linux_supports_hardware_single_step): ... New function.
1758 (linux_target_ops): Update.
1759 * lynx-low.c (lynx_target_ops): Set field
1760 supports_hardware_single_step to target_can_do_hardware_single_step.
1761 * nto-low.c (nto_target_ops): Likewise.
1762 * spu-low.c (spu_target_ops): Likewise.
1763 * win32-low.c (win32_target_ops): Likewise.
1764 * target.c (target_can_do_hardware_single_step): New function.
1765 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1766 Remove. <supports_hardware_single_step>: New field.
1767 (target_supports_conditional_breakpoints): Remove.
1768 (target_supports_hardware_single_step): New macro.
1769 (target_can_do_hardware_single_step): Declare.
1770 * server.c (handle_query): Use target_supports_hardware_single_step
1771 instead of target_supports_conditional_breakpoints.
1772
ade90bde
YQ
17732015-09-15 Yao Qi <yao.qi@linaro.org>
1774
1775 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
1776 function.
1777 (struct linux_target_ops the_low_target): Install
1778 aarch64_linux_siginfo_fixup.
1779
94585166
DB
17802015-09-11 Don Breazeal <donb@codesourcery.com>
1781 Luis Machado <lgustavo@codesourcery.com>
1782
1783 * linux-low.c (linux_mourn): Static declaration.
1784 (linux_arch_setup): Move in front of
1785 handle_extended_wait.
1786 (linux_arch_setup_thread): New function.
1787 (handle_extended_wait): Handle exec events. Call
1788 linux_arch_setup_thread. Make event_lwp argument a
1789 pointer-to-a-pointer.
1790 (check_zombie_leaders): Do not check stopped threads.
1791 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
1792 (linux_low_filter_event): Add lwp and thread for exec'ing
1793 non-leader thread if leader thread has been deleted.
1794 Refactor code into linux_arch_setup_thread and call it.
1795 Pass child lwp pointer by reference to handle_extended_wait.
1796 (linux_wait_for_event_filtered): Update comment.
1797 (linux_wait_1): Prevent clobbering exec event status.
1798 (linux_supports_exec_events): New function.
1799 (linux_target_ops) <supports_exec_events>: Initialize new member.
1800 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
1801 new member.
1802 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
1803 * server.c (report_exec_events): New global variable.
1804 (handle_query): Handle qSupported query for exec-events feature.
1805 (captured_main): Initialize report_exec_events.
1806 * server.h (report_exec_events): Declare new global variable.
1807 * target.h (struct target_ops) <supports_exec_events>: New
1808 member.
1809 (target_supports_exec_events): New macro.
1810 * win32-low.c (win32_target_ops) <supports_exec_events>:
1811 Initialize new member.
1812
0568462b
MM
18132015-09-09 Markus Metzger <markus.t.metzger@intel.com>
1814
1815 * linux-low.c (linux_low_enable_btrace): Remove.
1816 (linux_target_ops): Replace linux_low_enable_btrace with
1817 linux_enable_btrace.
1818
39edd165
YQ
18192015-09-03 Yao Qi <yao.qi@linaro.org>
1820
1821 * linux-aarch64-low.c (aarch64_insert_point): Call
1822 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
1823 returns true.
1824
1db33b5a
UW
18252015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1826
1827 * linux-low.c (check_stopped_by_breakpoint): Use
1828 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
1829
ab290430
PA
18302015-08-27 Pedro Alves <palves@redhat.com>
1831
1832 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
1833
8d749320
SM
18342015-08-26 Simon Marchi <simon.marchi@ericsson.com>
1835
6711b7f8
SM
1836 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
1837 the XNEW-family equivalent.
8d749320
SM
1838 (compile_bytecodes): Likewise.
1839 * dll.c (loaded_dll): Likewise.
1840 * event-loop.c (append_callback_event): Likewise.
1841 (create_file_handler): Likewise.
1842 (create_file_event): Likewise.
1843 * hostio.c (handle_open): Likewise.
1844 * inferiors.c (add_thread): Likewise.
1845 (add_process): Likewise.
1846 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
1847 * linux-arm-low.c (arm_new_process): Likewise.
1848 (arm_new_thread): Likewise.
1849 * linux-low.c (add_to_pid_list): Likewise.
1850 (linux_add_process): Likewise.
1851 (handle_extended_wait): Likewise.
1852 (add_lwp): Likewise.
1853 (enqueue_one_deferred_signal): Likewise.
1854 (enqueue_pending_signal): Likewise.
1855 (linux_resume_one_lwp_throw): Likewise.
1856 (linux_resume_one_thread): Likewise.
1857 (linux_read_memory): Likewise.
1858 (linux_write_memory): Likewise.
1859 * linux-mips-low.c (mips_linux_new_process): Likewise.
1860 (mips_linux_new_thread): Likewise.
1861 (mips_add_watchpoint): Likewise.
1862 * linux-x86-low.c (initialize_low_arch): Likewise.
1863 * lynx-low.c (lynx_add_process): Likewise.
1864 * mem-break.c (set_raw_breakpoint_at): Likewise.
1865 (set_breakpoint): Likewise.
1866 (add_condition_to_breakpoint): Likewise.
1867 (add_commands_to_breakpoint): Likewise.
1868 (clone_agent_expr): Likewise.
1869 (clone_one_breakpoint): Likewise.
1870 * regcache.c (new_register_cache): Likewise.
1871 * remote-utils.c (look_up_one_symbol): Likewise.
1872 * server.c (queue_stop_reply): Likewise.
1873 (start_inferior): Likewise.
1874 (queue_stop_reply_callback): Likewise.
1875 (handle_target_event): Likewise.
1876 * spu-low.c (fetch_ppc_memory): Likewise.
1877 (store_ppc_memory): Likewise.
1878 * target.c (set_target_ops): Likewise.
1879 * thread-db.c (thread_db_load_search): Likewise.
1880 (try_thread_db_load_1): Likewise.
1881 * tracepoint.c (add_tracepoint): Likewise.
1882 (add_tracepoint_action): Likewise.
1883 (create_trace_state_variable): Likewise.
1884 (cmd_qtdpsrc): Likewise.
1885 (cmd_qtro): Likewise.
1886 (add_while_stepping_state): Likewise.
1887 * win32-low.c (child_add_thread): Likewise.
1888 (get_image_name): Likewise.
1889
ed8b7b42
YQ
18902015-08-25 Yao Qi <yao.qi@linaro.org>
1891
1892 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
1893
db3cb7cb
YQ
18942015-08-25 Yao Qi <yao.qi@linaro.org>
1895
1896 * Makefile.in (aarch64-linux.o): New rule.
1897 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
1898 srv_tgtobj.
1899 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
1900 (aarch64_init_debug_reg_state): Make it extern.
1901 (aarch64_linux_prepare_to_resume): Remove.
1902
f6011a1c
YQ
19032015-08-25 Yao Qi <yao.qi@linaro.org>
1904
1905 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
1906 lwp_arch_private_info and ptid_of_lwp.
1907
88e2cf7e
YQ
19082015-08-25 Yao Qi <yao.qi@linaro.org>
1909
1910 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
1911 Find proc_info by find_process_pid. All callers updated.
1912
5e35436e
YQ
19132015-08-25 Yao Qi <yao.qi@linaro.org>
1914
1915 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
1916 Remove.
1917 (debug_reg_change_callback): Remove.
1918 (aarch64_notify_debug_reg_change): Remove.
1919
4a8a7965
YQ
19202015-08-25 Yao Qi <yao.qi@linaro.org>
1921
1922 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
1923 Call current_lwp_ptid.
1924
32a271ee
YQ
19252015-08-25 Yao Qi <yao.qi@linaro.org>
1926
1927 * linux-aarch64-low.c (debug_reg_change_callback): Use
1928 debug_printf.
1929
0d51c8d7
YQ
19302015-08-25 Yao Qi <yao.qi@linaro.org>
1931
1932 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
1933
31a43dd5
YQ
19342015-08-25 Yao Qi <yao.qi@linaro.org>
1935
1936 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
1937
8ee52567
YQ
19382015-08-25 Yao Qi <yao.qi@linaro.org>
1939
1940 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
1941 the code.
1942
ff3f0f45
YQ
19432015-08-25 Yao Qi <yao.qi@linaro.org>
1944
1945 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
1946 Remove.
1947 (debug_reg_change_callback): Remove argument entry and add argument
1948 lwp. Remove local variable thread. Don't print thread id in the
1949 debugging output. Don't check whether pid of thread equals to pid.
1950 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
1951 iterate_over_lwps instead find_inferior.
1952
3d40fbb5
PA
19532015-08-24 Pedro Alves <palves@redhat.com>
1954
1955 * inferiors.c (get_first_process): New function.
1956 * inferiors.h (get_first_process): New declaration.
1957 * remote-utils.c (read_ptid): Default to the first process in the
1958 list, instead of to the current thread's process.
1959
438e1e42
PA
19602015-08-24 Pedro Alves <palves@redhat.com>
1961
1962 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
1963 * event-loop.c: Likewise.
1964 * remote-utils.c: Likewise.
1965 * tracepoint.c: Likewise.
1966
a8c6d4fc
PA
19672015-08-24 Pedro Alves <palves@redhat.com>
1968
1969 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
1970 ptid_get_lwp.
1971
99b0bb12
PA
19722015-08-21 Pedro Alves <palves@redhat.com>
1973
1974 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
1975 instead of literal 1.
1976
f8904751
PA
19772015-08-21 Pedro Alves <palves@redhat.com>
1978
1979 * tdesc.c (default_description): Explicitly zero-initialize.
1980
465a859e
PA
19812015-08-21 Pedro Alves <palves@redhat.com>
1982
1983 PR gdb/18749
1984 * inferiors.c (remove_thread): Discard any pending stop reply for
1985 this thread.
1986 * server.c (remove_all_on_match_pid): Rename to ...
1987 (remove_all_on_match_ptid): ... this. Work with a filter ptid
1988 instead of a pid.
1989 (discard_queued_stop_replies): Change parameter to a ptid. Now
1990 extern.
1991 (handle_v_kill, kill_inferior_callback, captured_main)
1992 (process_serial_event): Adjust.
1993 * server.h (discard_queued_stop_replies): Declare.
1994
f0db101d
PA
19952015-08-21 Pedro Alves <palves@redhat.com>
1996
1997 * linux-low.c (wait_for_sigstop): Always switch to no thread
1998 selected if the previously current thread dies.
1999 * lynx-low.c (lynx_request_interrupt): Use the first thread's
2000 process instead of the current thread's.
2001 * remote-utils.c (input_interrupt): Don't check if there's no
2002 current thread.
2003 * server.c (gdb_read_memory, gdb_write_memory): If setting the
2004 current thread to the general thread fails, error out.
2005 (handle_qxfer_auxv, handle_qxfer_libraries)
2006 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
2007 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
2008 (handle_query): Check if there's a thread selected instead of
2009 checking whether there's any thread in the thread list.
2010 (handle_qxfer_threads, handle_qxfer_btrace)
2011 (handle_qxfer_btrace_conf): Don't error out early if there's no
2012 thread in the thread list.
2013 (handle_v_cont, myresume): Don't set the current thread to the
2014 continue thread.
2015 (process_serial_event) <Hg handling>: Also set thread_id if the
2016 previous general thread is still alive.
2017 (process_serial_event) <g/G handling>: If setting the current
2018 thread to the general thread fails, error out.
2019 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
2020 thread's lwp instead of the current thread's.
2021 * target.c (set_desired_thread): If the desired thread was not
2022 found, leave the current thread pointing to NULL. Return an int
2023 (boolean) indicating success.
2024 * target.h (set_desired_thread): Change return type to int.
2025
40045d91
MF
20262015-08-20 Max Filippov <jcmvbkbc@gmail.com>
2027
2028 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
2029 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
2030 #includes.
2031 (ps_get_thread_area): New function.
2032
45face3b
GB
20332015-08-19 Gary Benson <gbenson@redhat.com>
2034
2035 * hostio.c (handle_pread): Do not attempt to read more data
2036 than hostio_reply_with_data can fit in a packet.
2037
16d5f642
JB
20382015-08-18 Joel Brobecker <brobecker@adacore.com>
2039
2040 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
2041
a738da3a
MF
20422015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
2043
2044 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
2045
33ebda9d
PA
20462015-08-06 Pedro Alves <palves@redhat.com>
2047
2048 * tracepoint.c (expr_eval_result): Now an int.
2049
a44892be
PA
20502015-08-06 Pedro Alves <palves@redhat.com>
2051
2052 * gdbthread.h (struct regcache): Forward declare.
2053 (struct thread_info) <regcache_data>: Now a struct regcache
2054 pointer.
2055 * inferiors.c (inferior_regcache_data)
2056 (set_inferior_regcache_data): Now work with struct regcache
2057 pointers.
2058 * inferiors.h (struct regcache): Forward declare.
2059 (inferior_regcache_data, set_inferior_regcache_data): Now work
2060 with struct regcache pointers.
2061 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
2062 (free_register_cache_thread): Remove struct regcache pointer
2063 casts.
2064
608a1e46
PA
20652015-08-06 Pedro Alves <palves@redhat.com>
2066
2067 * server.c (captured_main): On error, print the exception message
2068 to stderr, and if run_once is set, throw a quit.
2069
f0ce0d3a
PA
20702015-08-06 Pedro Alves <palves@redhat.com>
2071
2072 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
2073 the current thread.
2074
bf47e248
PA
20752015-08-06 Pedro Alves <palves@redhat.com>
2076
2077 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
2078 reading beyond the passed in buffer length.
2079
b6b9ffcc
PL
20802015-08-06 Pierre Langlois <pierre.langlois@arm.com>
2081
2082 * tracepoint.c (symbol_list) <required>: Remove.
2083
863d01bd
PA
20842015-08-06 Pedro Alves <palves@redhat.com>
2085
2086 * linux-low.c (handle_extended_wait): Set the fork child's suspend
2087 count if stopping and suspending threads.
2088 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
2089 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
2090 (linux_detach): Complete an ongoing step-over.
2091 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
2092 throughout.
2093 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
2094 (linux_wait_1): If passing a signal to the inferior after
2095 finishing a step-over, unsuspend and re-resume all lwps. If we
2096 see a single-step event but the thread should be continuing, don't
2097 pass the trap to gdb.
2098 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
2099 internal_error instead of gdb_assert.
2100 (enqueue_pending_signal): New function.
2101 (check_ptrace_stopped_lwp_gone): Add debug output.
2102 (start_step_over): Use internal_error instead of gdb_assert.
2103 (complete_ongoing_step_over): New function.
2104 (linux_resume_one_thread): Don't resume a suspended thread.
2105 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
2106 it stepping.
2107
00db26fa
PA
21082015-08-06 Pedro Alves <palves@redhat.com>
2109
2110 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
2111 (linux_thread_alive): Use lwp_is_marked_dead.
2112 (extended_event_reported): Delete.
2113 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
2114 instead of extended_event_reported.
2115 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
2116 as well.
2117 (lwp_is_marked_dead): New function.
2118 (lwp_running): Use lwp_is_marked_dead.
2119 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
2120 comment.
2121
ad071a30
PA
21222015-08-06 Pedro Alves <palves@redhat.com>
2123
2124 * linux-low.c (linux_wait_1): Move fork event output out of the
2125 !report_to_gdb check. Pass event_child->waitstatus to
2126 target_waitstatus_to_string instead of ourstatus.
2127
524b57e6
YQ
21282015-08-04 Yao Qi <yao.qi@linaro.org>
2129
2130 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
2131 if current_thread is 32 bit.
2132
6085d6f6
YQ
21332015-08-04 Yao Qi <yao.qi@linaro.org>
2134
2135 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2136 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2137 * server.c (extended_protocol): Remove "static".
2138 * server.h (extended_protocol): Declare it.
2139
8a7e4587
YQ
21402015-08-04 Yao Qi <yao.qi@linaro.org>
2141
2142 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
2143 both aarch64 and aarch32.
2144 (aarch64_set_pc): Likewise.
2145
3b53ae99
YQ
21462015-08-04 Yao Qi <yao.qi@linaro.org>
2147
2148 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
2149 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
2150 arm-with-neon.xml to srv_xmlfiles.
2151 * linux-aarch64-low.c: Include linux-aarch32-low.h.
2152 (is_64bit_tdesc): New function.
2153 (aarch64_linux_read_description): New function.
2154 (aarch64_arch_setup): Call aarch64_linux_read_description.
2155 (regs_info): Rename to regs_info_aarch64.
2156 (aarch64_regs_info): Return right regs_info.
2157 (initialize_low_arch): Call initialize_low_arch_aarch32.
2158
bd9e6534
YQ
21592015-08-04 Yao Qi <yao.qi@linaro.org>
2160
2161 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
2162 * linux-aarch32-low.c: New file.
2163 * linux-aarch32-low.h: New file.
2164 * linux-arm-low.c (arm_fill_gregset): Move it to
2165 linux-aarch32-low.c.
2166 (arm_store_gregset): Likewise.
2167 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
2168 (arm_store_vfpregset): Call arm_store_vfpregset_num.
2169 (arm_arch_setup): Check if PTRACE_GETREGSET works.
2170 (regs_info): Rename to regs_info_arm.
2171 (arm_regs_info): Return regs_info_aarch32 if
2172 have_ptrace_getregset is 1 and target description is
2173 arm_with_neon or arm_with_vfpv3.
2174 (initialize_low_arch): Don't call init_registers_arm_with_neon.
2175 Call initialize_low_arch_aarch32 instead.
2176
ded48a5e
YQ
21772015-08-04 Yao Qi <yao.qi@linaro.org>
2178
2179 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
2180 * linux-low.c: ... here.
2181 * linux-low.h (have_ptrace_getregset): Declare it.
2182
96e9210f
PA
21832015-08-04 Pedro Alves <palves@redhat.com>
2184
2185 * thread-db.c (struct thread_db): Use new typedefs.
2186 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
2187 CHK calls.
2188 (disable_thread_event_reporting): Cast result of dlsym to
2189 destination function pointer type.
2190 (thread_db_mourn): Use td_ta_delete_ftype.
2191
af60a1ef
SL
21922015-08-03 Sandra Loosemore <sandra@codesourcery.com>
2193
2194 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
2195 arch variant.
2196 (CDX_BREAKPOINT): Define for R2.
2197 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
2198 (the_low_target): Add comments.
2199
e8b41681
YQ
22002015-07-30 Yao Qi <yao.qi@linaro.org>
2201
2202 * linux-arm-low.c (arm_hwcap): Remove it.
2203 (arm_read_description): New local variable arm_hwcap. Don't
2204 set arm_hwcap to zero.
2205
89abb039
YQ
22062015-07-30 Yao Qi <yao.qi@linaro.org>
2207
2208 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
2209 Use regcache->tdesc instead.
2210 (arm_store_wmmxregset): Likewise.
2211 (arm_fill_vfpregset): Likewise.
2212 (arm_store_vfpregset): Likewise.
2213
deca266c
YQ
22142015-07-30 Yao Qi <yao.qi@linaro.org>
2215
2216 * linux-arm-low.c: Include arch/arm.h.
2217 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
2218 (arm_store_gregset): Likewise.
2219
aa58a496
SM
22202015-07-29 Simon Marchi <simon.marchi@ericsson.com>
2221
2222 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
2223 ptrace's 4th parameter.
2224
50904b25
YQ
22252015-07-27 Yao Qi <yao.qi@linaro.org>
2226
2227 * configure.srv (case aarch64*-*-linux*): Don't set
2228 srv_linux_usrregs.
2229
5826e159
PA
22302015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
2231
2232 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
2233 sys/ptrace.h.
2234 * linux-arm-low.c: Likewise.
2235 * linux-cris-low.c: Likewise.
2236 * linux-crisv32-low.c: Likewise.
2237 * linux-low.c: Likewise.
2238 * linux-m68k-low.c: Likewise.
2239 * linux-mips-low.c: Likewise.
2240 * linux-nios2-low.c: Likewise.
2241 * linux-s390-low.c: Likewise.
2242 * linux-sparc-low.c: Likewise.
2243 * linux-tic6x-low.c: Likewise.
2244 * linux-tile-low.c: Likewise.
2245 * linux-x86-low.c: Likewise.
2246
54019719
PA
22472015-07-24 Pedro Alves <palves@redhat.com>
2248
2249 * config.in: Regenerate.
2250 * configure: Regenerate.
2251
eb7aa561
PA
22522015-07-24 Pedro Alves <palves@redhat.com>
2253
2254 * acinclude.m4: Include ../ptrace.m4.
2255 * configure.ac: Call GDB_AC_PTRACE.
2256 * config.in, configure: Regenerate.
2257
55d7b841
YQ
22582015-07-24 Yao Qi <yao.qi@linaro.org>
2259
2260 * linux-low.c (linux_create_inferior): Remove setting to
2261 proc->priv->new_inferior.
2262 (linux_attach): Likewise.
2263 (linux_low_filter_event): Likewise.
2264 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
2265
c06cbd92
YQ
22662015-07-24 Yao Qi <yao.qi@linaro.org>
2267
2268 * linux-low.c (linux_arch_setup): New function.
2269 (linux_low_filter_event): If proc->tdesc is NULL and
2270 proc->attached is true, call the_low_target.arch_setup.
2271 Otherwise, keep status pending, and return.
2272 (linux_resume_one_lwp_throw): Don't call get_pc if
2273 thread->while_stepping isn't NULL. Don't call
2274 get_thread_regcache if proc->tdesc is NULL.
2275 (need_step_over_p): Return 0 if proc->tdesc is NULL.
2276 (linux_target_ops): Install arch_setup.
2277 * server.c (start_inferior): Call the_target->arch_setup.
2278 * target.h (struct target_ops) <arch_setup>: New field.
2279 (target_arch_setup): New marco.
2280 * lynx-low.c (lynx_target_ops): Update.
2281 * nto-low.c (nto_target_ops): Update.
2282 * spu-low.c (spu_target_ops): Update.
2283 * win32-low.c (win32_target_ops): Update.
2284
5ae3ebba
YQ
22852015-07-24 Yao Qi <yao.qi@linaro.org>
2286
2287 * linux-low.c (linux_add_process): Don't set
2288 proc->priv->new_inferior.
2289 (linux_create_inferior): Set proc->priv->new_inferior to 1.
2290 (linux_attach): Likewise.
2291
eb97750b
YQ
22922015-07-24 Yao Qi <yao.qi@linaro.org>
2293
2294 * server.c (start_inferior): Code refactor.
2295
51aee833
YQ
22962015-07-24 Yao Qi <yao.qi@linaro.org>
2297
2298 * server.c (process_serial_event): Set general_thread.
2299
af1b22f3
YQ
23002015-07-21 Yao Qi <yao.qi@linaro.org>
2301
2302 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
2303 aarch64_linux_get_debug_reg_capacity.
2304
554717a3
YQ
23052015-07-17 Yao Qi <yao.qi@linaro.org>
2306
2307 * Makefile.in (aarch64-linux-hw-point.o): New rule.
2308 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
2309 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
2310 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
2311 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
2312 (AARCH64_HWP_ALIGNMENT): Likewise.
2313 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
2314 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
2315 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
2316 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
2317 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
2318 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
2319 (struct aarch64_debug_reg_state): Likewise.
2320 (struct arch_lwp_info): Likewise.
2321 (aarch64_align_watchpoint): Likewise.
2322 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
2323 (aarch64_watchpoint_length): Likewise.
2324 (aarch64_point_encode_ctrl_reg): Likewise
2325 (aarch64_point_is_aligned): Likewise.
2326 (aarch64_align_watchpoint): Likewise.
2327 (aarch64_linux_set_debug_regs):
2328 (aarch64_dr_state_insert_one_point): Likewise.
2329 (aarch64_dr_state_remove_one_point): Likewise.
2330 (aarch64_handle_breakpoint): Likewise.
2331 (aarch64_handle_aligned_watchpoint): Likewise.
2332 (aarch64_handle_unaligned_watchpoint): Likewise.
2333 (aarch64_handle_watchpoint): Likewise.
2334
c67ca4de
YQ
23352015-07-17 Yao Qi <yao.qi@linaro.org>
2336
2337 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
2338 and don't aarch64_get_debug_reg_state. All callers update.
2339 (aarch64_handle_aligned_watchpoint): Likewise.
2340 (aarch64_handle_unaligned_watchpoint): Likewise.
2341 (aarch64_handle_watchpoint): Likewise.
2342 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
2343 (aarch64_remove_point): Likewise.
2344
25abf979
YQ
23452015-07-17 Yao Qi <yao.qi@linaro.org>
2346
2347 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
2348 debug_printf.
2349 (aarch64_handle_unaligned_watchpoint): Likewise.
2350
db1ff28b
JK
23512015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2352
2353 Revert the previous 3 commits:
2354 Move gdb_regex* to common/
2355 Move linux_find_memory_regions_full & co.
2356 gdbserver build-id attribute generator
2357
700ca40f
JK
23582015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2359 Jan Kratochvil <jan.kratochvil@redhat.com>
2360
2361 gdbserver build-id attribute generator.
2362 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
2363 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
2364 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
2365 (find_phdr): New.
2366 (get_dynamic): Use find_pdhr to traverse program headers.
2367 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
2368 (compare_mapping_entry_range, struct find_memory_region_callback_data)
2369 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
2370 (get_hex_build_id): New.
2371 (linux_qxfer_libraries_svr4): Add optional build-id attribute
2372 to reply XML document.
2373
9904185c
JK
23742015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2375 Jan Kratochvil <jan.kratochvil@redhat.com>
2376
2377 * target.c: Include target/target-utils.h and fcntl.h.
2378 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
2379 (target_fileio_read_stralloc): New functions.
2380
6e5b4429
JK
23812015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2382
2383 * Makefile.in (OBS): Add gdb_regex.o.
2384 (gdb_regex.o): New.
2385 * config.in: Rebuilt.
2386 * configure: Rebuilt.
2387
ddc98fbf
JK
23882015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2389 Jan Kratochvil <jan.kratochvil@redhat.com>
2390
2391 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
2392 * Makefile.in (OBS): Add target-utils.o.
2393 (linux-maps.o, target-utils.o): New.
2394 * configure.srv (srv_linux_obj): Add linux-maps.o.
2395
e57bb7a0
PL
23962015-07-15 Pierre Langlois <pierre.langlois@arm.com>
2397
2398 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
2399 function, return 1.
2400 (the_low_target): Install it.
2401
586b02a9
PA
24022015-07-14 Pedro Alves <palves@redhat.com>
2403
2404 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
2405 Instead, ignore ECHILD, and throw an error for other errnos.
2406
58c1b36c
PA
24072015-07-10 Pedro Alves <palves@redhat.com>
2408
2409 * event-loop.c (struct callback_event) <data>: Change type to
2410 gdb_client_data instance instead of gdb_client_data pointer.
2411 (append_callback_event): Adjust.
2412
421530db
PL
24132015-07-10 Pierre Langlois <pierre.langlois@arm.com>
2414
2415 * linux-aarch64-low.c: Add comments for each linux_target_ops
2416 method. Remove comments already covered in target_ops and
2417 linux_target_ops definitions.
2418 (the_low_target): Add comments for each unimplemented method.
2419
c2d65f38
YQ
24202015-07-09 Yao Qi <yao.qi@linaro.org>
2421
2422 * linux-aarch64-low.c (aarch64_regmap): Remove.
2423 (aarch64_usrregs_info): Remove.
2424 (regs_info): Set field usrregs to NULL.
2425
b20a6524
MM
24262015-07-02 Markus Metzger <markus.t.metzger@intel.com>
2427
2428 * linux-low.c: Include "rsp-low.h"
2429 (linux_low_encode_pt_config, linux_low_encode_raw): New.
2430 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
2431 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
2432 (handle_btrace_enable_pt): New.
2433 (handle_btrace_general_set): Support "pt".
2434 (handle_btrace_conf_general_set): Support "pt:size".
2435
96c97461
PL
24362015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2437
2438 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
2439 Z_PACKET_SW_BP.
2440
37d66942
PL
24412015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2442
2443 * linux-aarch64-low.c: Remove comment about endianness.
2444 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
2445 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
2446 memcmp.
2447
dc06243f
GB
24482015-06-24 Gary Benson <gbenson@redhat.com>
2449
2450 * linux-i386-ipa.c (stdint.h): Do not include.
2451 * lynx-i386-low.c (stdint.h): Likewise.
2452 * lynx-ppc-low.c (stdint.h): Likewise.
2453 * mem-break.c (stdint.h): Likewise.
2454 * thread-db.c (stdint.h): Likewise.
2455 * tracepoint.c (stdint.h): Likewise.
2456 * win32-low.c (stdint.h): Likewise.
2457
124e13d9
SM
24582015-06-18 Simon Marchi <simon.marchi@ericsson.com>
2459
2460 * server.c (write_qxfer_response): Update call to
2461 remote_escape_output.
2462
909c2cda
JK
24632015-06-15 Aleksandar Ristovski <aristovski@qnx.com
2464 Jan Kratochvil <jan.kratochvil@redhat.com>
2465
2466 Merge multiple hex conversions.
2467 * gdbreplay.c (tohex): Rename to 'fromhex'.
2468 (logchar): Use fromhex.
2469
24c05f46
JK
24702015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
2471
2472 * server.c (handle_qxfer_libraries): Set `version' attribute for
2473 <library-list>.
2474
14d2069a
GB
24752015-06-10 Gary Benson <gbenson@redhat.com>
2476
2477 * target.h (struct target_ops) <multifs_open>: New field.
2478 <multifs_unlink>: Likewise.
2479 <multifs_readlink>: Likewise.
2480 * linux-low.c (nat/linux-namespaces.h): New include.
2481 (linux_target_ops): Initialize the_target->multifs_open,
2482 the_target->multifs_unlink and the_target->multifs_readlink.
2483 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
2484 * hostio.c (hostio_fs_pid): New static variable.
2485 (hostio_handle_new_gdb_connection): New function.
2486 (handle_setfs): Likewise.
2487 (handle_open): Use the_target->multifs_open as appropriate.
2488 (handle_unlink): Use the_target->multifs_unlink as appropriate.
2489 (handle_readlink): Use the_target->multifs_readlink as
2490 appropriate.
2491 (handle_vFile): Handle vFile:setfs packets.
2492 * server.c (handle_query): Call hostio_handle_new_gdb_connection
2493 after target_handle_new_gdb_connection.
2494
4b8b5e72
GB
24952015-06-10 Gary Benson <gbenson@redhat.com>
2496
2497 * configure.ac (AC_CHECK_FUNCS): Add setns.
2498 * config.in: Regenerate.
2499 * configure: Likewise.
2500 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
2501 (linux-namespaces.o): New rule.
2502 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
2503
3ac2e371
GB
25042015-06-09 Gary Benson <gbenson@redhat.com>
2505
2506 * hostio.c (handle_open): Process mode argument with
2507 fileio_to_host_mode.
2508
ca9b78ce
YQ
25092015-06-01 Yao Qi <yao.qi@linaro.org>
2510
2511 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
2512 * linux-x86-low.c: Likewise.
2513
bfacd19d
DB
25142015-05-28 Don Breazeal <donb@codesourcery.com>
2515
2516 * linux-low.c (handle_extended_wait): Initialize
2517 thread_info.last_resume_kind for new fork children.
2518
452003ef
PA
25192015-05-15 Pedro Alves <palves@redhat.com>
2520
2521 * target.h (target_handle_new_gdb_connection): Rewrite using if
2522 wrapped in do/while.
2523
1041a03c
JB
25242015-05-14 Joel Brobecker <brobecker@adacore.com>
2525
2526 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
2527 * configure, config.in: Regenerate.
2528 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
2529 Declare typedef.
2530
c269dbdb
DB
25312015-05-12 Don Breazeal <donb@codesourcery.com>
2532
2533 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
2534 PTRACE_EVENT_VFORK_DONE.
2535 (linux_low_ptrace_options, extended_event_reported): Add vfork
2536 events.
2537 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
2538 and "vforkdone" for RSP 'T' Stop Reply Packet.
2539 * server.h (report_vfork_events): Declare
2540 global variable.
2541
3a8a0396
DB
25422015-05-12 Don Breazeal <donb@codesourcery.com>
2543
2544 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
2545 (the_low_target) <new_fork>: Initialize new member.
2546 * linux-arm-low.c (arm_new_fork): New function.
2547 (the_low_target) <new_fork>: Initialize new member.
2548 * linux-low.c (handle_extended_wait): Call new target function
2549 new_fork.
2550 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
2551 * linux-mips-low.c (mips_add_watchpoint): New function
2552 extracted from mips_insert_point.
2553 (the_low_target) <new_fork>: Initialize new member.
2554 (mips_linux_new_fork): New function.
2555 (mips_insert_point): Call mips_add_watchpoint.
2556 * linux-x86-low.c (x86_linux_new_fork): New function.
2557 (the_low_target) <new_fork>: Initialize new member.
2558
de0d863e
DB
25592015-05-12 Don Breazeal <donb@codesourcery.com>
2560
2561 * linux-low.c (handle_extended_wait): Implement return value,
2562 rename argument 'event_child' to 'event_lwp', handle
2563 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
2564 (linux_low_ptrace_options): New function.
2565 (linux_low_filter_event): Call linux_low_ptrace_options,
2566 use different argument fo linux_enable_event_reporting,
2567 use return value from handle_extended_wait.
2568 (extended_event_reported): New function.
2569 (linux_wait_1): Call extended_event_reported and set
2570 status to report fork events.
2571 (linux_write_memory): Add pid to debug message.
2572 (reset_lwp_ptrace_options_callback): New function.
2573 (linux_handle_new_gdb_connection): New function.
2574 (linux_target_ops): Initialize new structure member.
2575 * linux-low.h (struct lwp_info) <waitstatus>: New member.
2576 * lynx-low.c: Initialize new structure member.
2577 * remote-utils.c (prepare_resume_reply): Implement stop reason
2578 "fork" for "T" stop message.
2579 * server.c (handle_query): Call handle_new_gdb_connection.
2580 * server.h (report_fork_events): Declare global flag.
2581 * target.h (struct target_ops) <handle_new_gdb_connection>:
2582 New member.
2583 (target_handle_new_gdb_connection): New macro.
2584 * win32-low.c: Initialize new structure member.
2585
ddcbc397
DB
25862015-05-12 Don Breazeal <donb@codesourcery.com>
2587
2588 * mem-break.c (APPEND_TO_LIST): Define macro.
2589 (clone_agent_expr): New function.
2590 (clone_one_breakpoint): New function.
2591 (clone_all_breakpoints): New function.
2592 * mem-break.h: Declare new functions.
2593
89245bc0
DB
25942015-05-12 Don Breazeal <donb@codesourcery.com>
2595
2596 * linux-low.c (linux_supports_fork_events): New function.
2597 (linux_supports_vfork_events): New function.
2598 (linux_target_ops): Initialize new structure members.
2599 (initialize_low): Call linux_check_ptrace_features.
2600 * lynx-low.c (lynx_target_ops): Initialize new structure
2601 members.
2602 * server.c (report_fork_events, report_vfork_events):
2603 New global flags.
2604 (handle_query): Add new features to qSupported packet and
2605 response.
2606 (captured_main): Initialize new global variables.
2607 * target.h (struct target_ops) <supports_fork_events>:
2608 New member.
2609 <supports_vfork_events>: New member.
2610 (target_supports_fork_events): New macro.
2611 (target_supports_vfork_events): New macro.
2612 * win32-low.c (win32_target_ops): Initialize new structure
2613 members.
2614
835205d0
GB
26152015-05-12 Gary Benson <gbenson@redhat.com>
2616
2617 * server.c (handle_qxfer_exec_file): Use current process
2618 if annex is empty.
2619
21e94bd9
SL
26202015-05-08 Sandra Loosemore <sandra@codesourcery.com>
2621
2622 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
2623 Remove HAVE_PTRACE_GETREGS conditionals.
2624 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
2625 instead of PTRACE_GETREGS and PTRACE_SETREGS.
2626
45614f15
YQ
26272015-05-08 Yao Qi <yao.qi@linaro.org>
2628
2629 * linux-low.c (linux_supports_conditional_breakpoints): New
2630 function.
2631 (linux_target_ops): Install new target method.
2632 * lynx-low.c (lynx_target_ops): Install NULL hook for
2633 supports_conditional_breakpoints.
2634 * nto-low.c (nto_target_ops): Likewise.
2635 * spu-low.c (spu_target_ops): Likewise.
2636 * win32-low.c (win32_target_ops): Likewise.
2637 * server.c (handle_query): Check
2638 target_supports_conditional_breakpoints.
2639 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2640 New field.
2641 (target_supports_conditional_breakpoints): New macro.
2642
80ad801e
PA
26432015-05-06 Pedro Alves <palves@redhat.com>
2644
2645 PR server/18081
2646 * server.c (start_inferior): If the process exits, mourn it.
2647
819843c7
GB
26482015-04-21 Gary Benson <gbenson@redhat.com>
2649
2650 * hostio.c (fileio_open_flags_to_host): Factored out to
2651 fileio_to_host_openflags in common/fileio.c. Single use
2652 updated.
2653
a2d5a9d7
MF
26542015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2655
2656 * linux-xtensa-low.c (xtensa_fill_gregset)
2657 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
2658 XCHAL_HAVE_LOOP.
2659
deb44829
MF
26602015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2661
2662 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
2663 (regs_info): Replace usrregs pointer with NULL.
2664
e57f1de3
GB
26652015-04-17 Gary Benson <gbenson@redhat.com>
2666
2667 * target.h (struct target_ops) <pid_to_exec_file>: New field.
2668 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
2669 * server.c (handle_qxfer_exec_file): New function.
2670 (qxfer_packets): Add exec-file entry.
2671 (handle_query): Report qXfer:exec-file:read as supported packet.
2672
62828379
RN
26732015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
2674
2675 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
2676
b88bb450
GB
26772015-04-09 Gary Benson <gbenson@redhat.com>
2678
2679 * hostio-errno.c (errno_to_fileio_error): Remove function.
2680 Update caller to use remote_fileio_to_fio_error.
2681
c8f4bfdd
YQ
26822015-04-09 Yao Qi <yao.qi@linaro.org>
2683
2684 * linux-low.c (linux_insert_point): Call
2685 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
2686 (linux_remove_point): Call remove_memory_breakpoint if type is
2687 raw_bkpt_type_sw.
2688 * linux-x86-low.c (x86_insert_point): Don't call
2689 insert_memory_breakpoint.
2690 (x86_remove_point): Don't call remove_memory_breakpoint.
2691
41f98f02
PA
26922015-04-01 Pedro Alves <palves@redhat.com>
2693 Cleber Rosa <crosa@redhat.com>
2694
2695 * server.c (gdbserver_usage): Reorganize and extend the usage
2696 message.
2697
2bf6fb9d
PA
26982015-03-24 Pedro Alves <palves@redhat.com>
2699
2700 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
2701 output. Also dump TRAP_TRACE.
2702 (linux_low_filter_event): In debug output, distinguish a
2703 resume_stop SIGSTOP from a delayed SIGSTOP.
2704
369f6daa
GB
27052015-03-24 Gary Benson <gbenson@redhat.com>
2706
2707 * linux-x86-low.c (x86_linux_new_thread): Moved to
2708 nat/x86-linux.c.
2709 (x86_linux_prepare_to_resume): Likewise.
2710
8e5d4070
GB
27112015-03-24 Gary Benson <gbenson@redhat.com>
2712
2713 * Makefile.in (x86-linux-dregs.o): New rule.
2714 * configure.srv: Add x86-linux-dregs.o to relevant targets.
2715 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
2716 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
2717 (x86_linux_dr_get): Likewise.
2718 (x86_linux_dr_set): Likewise.
2719 (update_debug_registers_callback): Likewise.
2720 (x86_linux_dr_set_addr): Likewise.
2721 (x86_linux_dr_get_addr): Likewise.
2722 (x86_linux_dr_set_control): Likewise.
2723 (x86_linux_dr_get_control): Likewise.
2724 (x86_linux_dr_get_status): Likewise.
2725 (x86_linux_update_debug_registers): Likewise.
2726
2b95d440
GB
27272015-03-24 Gary Benson <gbenson@redhat.com>
2728
2729 * linux-x86-low.c (x86_linux_update_debug_registers):
2730 New function, factored out from...
2731 (x86_linux_prepare_to_resume): ...this.
2732
14b0bc68
GB
27332015-03-24 Gary Benson <gbenson@redhat.com>
2734
2735 * linux-x86-low.c (x86_linux_dr_get): Update comments.
2736 (x86_linux_dr_set): Likewise.
2737 (update_debug_registers_callback): Likewise.
2738 (x86_linux_dr_set_addr): Likewise.
2739 (x86_linux_dr_get_addr): Likewise.
2740 (x86_linux_dr_set_control): Likewise.
2741 (x86_linux_dr_get_control): Likewise.
2742 (x86_linux_dr_get_status): Likewise.
2743 (x86_linux_prepare_to_resume): Likewise.
2744
5dfe6ca8
GB
27452015-03-24 Gary Benson <gbenson@redhat.com>
2746
2747 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
2748 Use perror_with_name. Pass string through gettext.
2749 (x86_linux_dr_set): Likewise.
2750
d33472ad
GB
27512015-03-24 Gary Benson <gbenson@redhat.com>
2752
2753 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
2754 (x86_linux_dr_set_addr): ...this.
2755 (x86_dr_low_get_addr): Rename to...
2756 (x86_linux_dr_get_addr): ...this.
2757 (x86_dr_low_set_control): Rename to...
2758 (x86_linux_dr_set_control): ...this.
2759 (x86_dr_low_get_control): Rename to...
2760 (x86_linux_dr_get_control): ...this.
2761 (x86_dr_low_get_status): Rename to...
2762 (x86_linux_dr_get_status): ...this.
2763 (x86_dr_low): Update with new function names.
2764
4b134ca1
GB
27652015-03-24 Gary Benson <gbenson@redhat.com>
2766
2767 * Makefile.in (x86-linux.o): New rule.
2768 * configure.srv: Add x86-linux.o to relevant targets.
2769 * linux-low.c (lwp_set_arch_private_info): New function.
2770 (lwp_arch_private_info): Likewise.
2771 * linux-x86-low.c: Include nat/x86-linux.h.
2772 (arch_lwp_info): Removed structure.
2773 (update_debug_registers_callback):
2774 Use lwp_set_debug_registers_changed.
2775 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
2776 and lwp_set_debug_registers_changed.
2777 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
2778
34c703da
GB
27792015-03-24 Gary Benson <gbenson@redhat.com>
2780
2781 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
2782 * linux-arm-low.c (arm_new_thread): Likewise.
2783 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
2784 * linux-mips-low.c (mips_linux_new_thread): Likewise.
2785 * linux-x86-low.c (x86_linux_new_thread): Likewise.
2786 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
2787
cff068da
GB
27882015-03-24 Gary Benson <gbenson@redhat.com>
2789
2790 * linux-low.c (ptid_of_lwp): New function.
2791 (lwp_is_stopped): Likewise.
2792 (lwp_stop_reason): Likewise.
2793 * linux-x86-low.c (update_debug_registers_callback):
2794 Use lwp_is_stopped.
2795 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
2796 lwp_stop_reason.
2797
b2f7c7e8
GB
27982015-03-24 Gary Benson <gbenson@redhat.com>
2799
2800 * linux-low.h (linux_stop_lwp): Remove declaration.
2801
6d4ee8c6
GB
28022015-03-24 Gary Benson <gbenson@redhat.com>
2803
2804 * linux-low.h: Include nat/linux-nat.h.
2805 * linux-low.c (iterate_over_lwps_args): New structure.
2806 (iterate_over_lwps_filter): New function.
2807 (iterate_over_lwps): Likewise.
2808 * linux-x86-low.c (update_debug_registers_callback):
2809 Update signature to what iterate_over_lwps expects.
2810 Remove PID check that iterate_over_lwps now performs.
2811 (x86_dr_low_set_addr): Use iterate_over_lwps.
2812 (x86_dr_low_set_control): Likewise.
2813
70a0bb6b
GB
28142015-03-24 Gary Benson <gbenson@redhat.com>
2815
2816 * linux-x86-low.c (x86_debug_reg_state): New function.
2817 (x86_linux_prepare_to_resume): Use the above.
2818
7b669087
GB
28192015-03-24 Gary Benson <gbenson@redhat.com>
2820
2821 * linux-low.c (current_lwp_ptid): New function.
2822 * linux-x86-low.c: Include nat/linux-nat.h.
2823 (x86_dr_low_get_addr): Use current_lwp_ptid.
2824 (x86_dr_low_get_control): Likewise.
2825 (x86_dr_low_get_status): Likewise.
2826
eef49a3d
PA
28272015-03-20 Pedro Alves <palves@redhat.com>
2828
2829 * tracepoint.c (cmd_qtstatus): Make "str" const.
2830
b2333d22
PA
28312015-03-20 Pedro Alves <palves@redhat.com>
2832
2833 * server.c (handle_general_set): Make "req_str" const.
2834
23f238d3
PA
28352015-03-19 Pedro Alves <palves@redhat.com>
2836
2837 * linux-low.c (linux_resume_one_lwp): Rename to ...
2838 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
2839 instead call perror_with_name.
2840 (check_ptrace_stopped_lwp_gone): New function.
2841 (linux_resume_one_lwp): Reimplement as wrapper around
2842 linux_resume_one_lwp_throw that swallows errors if the LWP is
2843 gone.
2844
91baf43f
PA
28452015-03-19 Pedro Alves <palves@redhat.com>
2846
2847 * linux-low.c (count_events_callback, select_event_lwp_callback):
2848 No longer check whether the thread has resume_stop as last resume
2849 kind.
2850
8bf3b159
PA
28512015-03-19 Pedro Alves <palves@redhat.com>
2852
2853 * linux-low.c (count_events_callback, select_event_lwp_callback):
2854 Use the lwp's status_pending_p field, not the thread's.
2855
b90fc188
PA
28562015-03-19 Pedro Alves <palves@redhat.com>
2857
2858 * linux-low.c (select_event_lwp_callback): Update comments to
2859 no longer mention SIGTRAP.
2860
464b0089
GB
28612015-03-18 Gary Benson <gbenson@redhat.com>
2862
2863 * server.c (handle_query): Do not report vFile:fstat as supported.
2864
aa9e327f
GB
28652015-03-11 Gary Benson <gbenson@redhat.com>
2866
2867 * hostio.c (sys/types.h): New include.
2868 (sys/stat.h): Likewise.
2869 (common-remote-fileio.h): Likewise.
2870 (handle_fstat): New function.
2871 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 2872
791c0056
GB
28732015-03-11 Gary Benson <gbenson@redhat.com>
2874
2875 * configure.ac (AC_CHECK_MEMBERS): Add checks for
2876 struct stat.st_blocks and struct stat.st_blksize.
2877 * configure: Regenerate.
2878 * config.in: Likewise.
2879 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
2880 (OBS): Add common-remote-fileio.o.
2881 (common-remote-fileio.o): New rule.
2882
9a9df970
PA
28832015-03-09 Pedro Alves <palves@redhat.com>
2884
2885 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
2886 'struct sockaddr' pointer in 'accept' call.
2887
9eb1356e
PA
28882015-03-09 Pedro Alves <palves@redhat.com>
2889
2890 Revert:
2891 2015-03-07 Pedro Alves <palves@redhat.com>
2892 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2893 or <winsock2.h> here. Instead include "gdb_socket.h".
2894 (remote_open): Use union gdb_sockaddr_u.
2895 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2896 or <winsock2.h> here. Instead include "gdb_socket.h".
2897 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2898 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2899 or <sys/un.h>.
2900 (init_named_socket, gdb_agent_helper_thread): Use union
2901 gdb_sockaddr_u.
2902
aac331e4
PA
29032015-03-07 Pedro Alves <palves@redhat.com>
2904
2905 * configure.ac (build_warnings): Move
2906 -Wdeclaration-after-statement to the C-specific set.
2907 * configure: Regenerate.
2908
366c75fc
PA
29092015-03-07 Pedro Alves <palves@redhat.com>
2910
2911 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2912 or <winsock2.h> here. Instead include "gdb_socket.h".
2913 (remote_open): Use union gdb_sockaddr_u.
2914 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2915 or <winsock2.h> here. Instead include "gdb_socket.h".
2916 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2917 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2918 or <sys/un.h>.
2919 (init_named_socket, gdb_agent_helper_thread): Use union
2920 gdb_sockaddr_u.
2921
492d29ea
PA
29222015-03-07 Pedro Alves <palves@redhat.com>
2923
2924 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
2925 instead.
2926
60a191ed
YQ
29272015-03-06 Yao Qi <yao.qi@linaro.org>
2928
2929 * linux-aarch64-low.c (aarch64_insert_point): Use
2930 show_debug_regs as a boolean.
2931 (aarch64_remove_point): Likewise.
2932
f5771b1d
PA
29332015-03-05 Pedro Alves <palves@redhat.com>
2934
2935 * lynx-low.c (lynx_target_ops): Install NULL hooks for
2936 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
2937 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
2938 * nto-low.c (nto_target_ops): Likewise.
2939 * spu-low.c (spu_target_ops): Likewise.
2940 * win32-low.c (win32_target_ops): Likewise.
2941
3e572f71
PA
29422015-03-04 Pedro Alves <palves@redhat.com>
2943
72f4393d 2944 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
2945 Decide whether a breakpoint triggered based on the SIGTRAP's
2946 siginfo.si_code.
72f4393d
L
2947 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
2948 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
2949 (linux_low_filter_event): Check for breakpoints before checking
2950 watchpoints.
2951 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
2952 siginfo.si_code.
72f4393d
L
2953 (linux_stopped_by_sw_breakpoint)
2954 (linux_supports_stopped_by_sw_breakpoint)
2955 (linux_stopped_by_hw_breakpoint)
2956 (linux_supports_stopped_by_hw_breakpoint): New functions.
2957 (linux_target_ops): Install new target methods.
3e572f71 2958
1ec68e26
PA
29592015-03-04 Pedro Alves <palves@redhat.com>
2960
2961 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
2962 * server.c (swbreak_feature, hwbreak_feature): New globals.
2963 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
2964 (captured_main): Clear swbreak_feature and hwbreak_feature.
2965 * server.h (swbreak_feature, hwbreak_feature): Declare.
2966 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
2967 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
2968 supports_stopped_by_hw_breakpoint>: New fields.
2969 (target_supports_stopped_by_sw_breakpoint)
2970 (target_stopped_by_sw_breakpoint)
2971 (target_supports_stopped_by_hw_breakpoint)
2972 (target_stopped_by_hw_breakpoint): Declare.
2973
15c66dd6
PA
29742015-03-04 Pedro Alves <palves@redhat.com>
2975
2976 enum lwp_stop_reason -> enum target_stop_reason
2977 * linux-low.c (check_stopped_by_breakpoint): Adjust.
2978 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
2979 (linux_wait_1, stuck_in_jump_pad_callback)
2980 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
2981 (linux_stopped_by_watchpoint):
2982 * linux-low.h (enum lwp_stop_reason): Delete.
2983 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
2984 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2985
98fc70d6
YQ
29862015-03-04 Yao Qi <yao.qi@linaro.org>
2987
2988 * Makefile.in (SFILES): Add linux-aarch64-low.c.
2989
dd2ac174
GB
29902015-03-03 Gary Benson <gbenson@redhat.com>
2991
2992 * hostio.c (handle_vFile): Fix prefix lengths.
2993
d68e53f4
MM
29942015-03-03 Markus Metzger <markus.t.metzger@intel.com>
2995
2996 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
2997 ptr_bits.
2998
bf2d68ab
AA
29992015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
3000
3001 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
3002 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
3003 (clean): Add "rm -f" for above C files.
3004 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
3005 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
3006 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
3007 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
3008 * linux-s390-low.c (HWCAP_S390_VX): New macro.
3009 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
3010 (init_registers_s390x_vx_linux64)
3011 (init_registers_s390x_tevx_linux64)
3012 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
3013 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
3014 declarations.
3015 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
3016 (s390_store_vxrs_high): New functions.
3017 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
3018 NT_S390_VXRS_HIGH.
3019 (s390_arch_setup): Add logic for selecting one of the new target
3020 descriptions. Activate the new vector regsets if applicable.
3021 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
3022 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
3023 and init_registers_s390x_tevx_linux64.
3024
c966a859
PA
30252015-03-01 Pedro Alves <palves@redhat.com>
3026
3027 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
3028 parameter.
3029
4180215b
PA
30302015-02-27 Pedro Alves <palves@redhat.com>
3031
3032 * linux-x86-low.c (u_debugreg_offset): New function.
3033 (x86_linux_dr_get, x86_linux_dr_set): Use it.
3034
749bab01
PA
30352015-02-27 Pedro Alves <palves@redhat.com>
3036
3037 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
3038 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
3039 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
3040 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3041 (ps_lsetfpregs, ps_getpid)
3042 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
3043 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
3044 (ps_lsetxregs, ps_plog): Declare.
3045
3c14e5a3
PA
30462015-02-27 Pedro Alves <palves@redhat.com>
3047
3048 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
3049 IP_AGENT_EXPORT_FUNC.
3050 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
3051 IP_AGENT_EXPORT_FUNC.
3052 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
3053 (IP_AGENT_EXPORT): Delete.
3054 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3055 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3056 (gdb_trampoline_buffer_error, collecting, gdb_collect)
3057 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
3058 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
3059 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
3060 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
3061 (traceframe_read_count, traceframe_write_count)
3062 (traceframes_created, trace_state_variables, get_raw_reg)
3063 (get_trace_state_variable_value, set_trace_state_variable_value)
3064 (ust_loaded, helper_thread_id, cmd_buf): Use
3065 IPA_SYM_EXPORTED_NAME.
3066 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
3067 (tracepoints) Use IP_AGENT_EXPORT_VAR.
3068 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
3069 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3070 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
3071 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
3072 EXTERN_C_PUSH/EXTERN_C_POP.
3073 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
3074 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
3075 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3076 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
3077 (traceframe_write_count, traceframe_read_count)
3078 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
3079 (about_to_request_buffer_space, get_trace_state_variable_value)
3080 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
3081 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
3082 EXTERN_C_PUSH/EXTERN_C_POP.
3083 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
3084 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
3085 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
3086 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3087 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3088 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3089 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
3090 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
3091 Define.
3092 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
3093 (IP_AGENT_EXPORT_VAR_DECL): Define.
3094 (tracing): Declare.
3095 (gdb_agent_get_raw_reg): Declare.
3096
fe978cb0
PA
30972015-02-27 Tom Tromey <tromey@redhat.com>
3098 Pedro Alves <palves@redhat.com>
3099
3100 Rename symbols whose names are reserved C++ keywords throughout.
3101
3bc3d82a
PA
31022015-02-27 Pedro Alves <palves@redhat.com>
3103
3104 * Makefile.in (COMPILER): New, get it from autoconf.
3105 (CXX): Get from autoconf instead.
3106 (COMPILE.pre): Use COMPILER.
3107 (CC-LD): Rename to ...
3108 (CC_LD): ... this. Use COMPILER.
3109 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
3110 (CXX_FOR_TARGET): Default to g++ instead of gcc.
3111 * acinclude.m4: Include build-with-cxx.m4.
3112 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
3113 Disable -Werror by default if building in C++ mode.
3114 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
3115 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
3116 the C++ compiler. Save/restore CXXFLAGS too.
3117 * configure: Regenerate.
3118
07697489
PA
31192015-02-27 Pedro Alves <palves@redhat.com>
3120
3121 * acinclude.m4: Include libiberty.m4.
3122 * configure.ac: Call libiberty_INIT.
3123 * config.in, configure: Regenerate.
3124
9beb7c4e
PA
31252015-02-26 Pedro Alves <palves@redhat.com>
3126
3127 * linux-low.c (linux_wait_1): When incrementing the PC past a
3128 program breakpoint always use the_low_target.breakpoint_len as
3129 increment, rather than the maximum between that and
3130 the_low_target.decr_pc_after_break.
3131
8090aef2
PA
31322015-02-23 Pedro Alves <palves@redhat.com>
3133
3134 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
3135 thread was doing a step-over; always adjust the PC if
3136 we stepped over a permanent breakpoint.
3137 (linux_wait_1): If we stepped over breakpoint that was on top of a
3138 permanent breakpoint, manually advance the PC past it.
3139
bc9540e8
PA
31402015-02-23 Pedro Alves <palves@redhat.com>
3141
3142 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
3143 modes.
3144 (x86_fill_gregset, x86_store_gregset): Use it when handling
3145 $orig_eax.
3146
2db9a427
PA
31472015-02-20 Pedro Alves <palves@redhat.com>
3148
3149 * thread-db.c: Include "nat/linux-procfs.h".
3150 (thread_db_init): Skip listing new threads if the kernel supports
3151 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
3152
afa8d396
PA
31532015-02-20 Pedro Alves <palves@redhat.com>
3154
3155 * linux-low.c (status_pending_p_callback): Use ptid_match.
3156
c9587f88
AT
31572015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
3158
3159 PR breakpoints/16812
3160 * linux-low.c (wstatus_maybe_breakpoint): Remove.
3161 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
3162 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
3163
b05ec7a5
AT
31642015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
3165
3166 PR breakpoints/15956
3167 * tracepoint.c (cmd_qtinit): Add check for current_thread.
3168
d33501a5
MM
31692015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3170
3171 * linux-low.c (linux_low_btrace_conf): Print size.
3172 * server.c (handle_btrace_conf_general_set): New.
3173 (hanle_general_set): Call handle_btrace_conf_general_set.
3174 (handle_query): Report Qbtrace-conf:bts:size as supported.
3175
f4abbc16
MM
31762015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3177
3178 * linux-low.c (linux_low_enable_btrace): Update parameters.
3179 (linux_low_btrace_conf): New.
3180 (linux_target_ops)<to_btrace_conf>: Initialize.
3181 * server.c (current_btrace_conf): New.
3182 (handle_btrace_enable): Rename to ...
3183 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
3184 to target_enable_btrace. Update comment. Update users.
3185 (handle_qxfer_btrace_conf): New.
3186 (qxfer_packets): Add btrace-conf entry.
3187 (handle_query): Report qXfer:btrace-conf:read as supported packet.
3188 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
3189 (target_ops)<read_btrace_conf>: New.
3190 (target_enable_btrace): Update parameters.
3191 (target_read_btrace_conf): New.
3192
043c3577
MM
31932015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3194
3195 * server.c (handle_btrace_general_set): Remove call to
3196 target_supports_btrace.
3197 (supported_btrace_packets): New.
3198 (handle_query): Call supported_btrace_packets.
3199 * target.h: include btrace-common.h.
3200 (btrace_target_info): Removed.
3201 (supports_btrace, target_supports_btrace): Update parameters.
3202
734b0e4b
MM
32032015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3204
3205 * Makefile.in (SFILES): Add common/btrace-common.c.
3206 (OBS): Add common/btrace-common.o.
3207 (btrace-common.o): Add build rules.
3208 * linux-low: Include btrace-common.h.
3209 (linux_low_read_btrace): Use struct btrace_data. Call
3210 btrace_data_init and btrace_data_fini.
3211
d6c146e9
PA
32122015-02-06 Pedro Alves <palves@redhat.com>
3213
3214 * thread-db.c (find_new_threads_callback): Add debug output.
3215
20ba1ce6
PA
32162015-02-04 Pedro Alves <palves@redhat.com>
3217
3218 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
3219 (resume_stopped_resumed_lwps): New function.
3220 (linux_wait_for_event_filtered): Use it.
3221
8cc73a39
SDJ
32222015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
3223
3224 * Makefile.in (SFILES): Add linux-personality.c.
3225 (linux-personality.o): New rule.
3226 * configure.srv (srv_linux_obj): Add linux-personality.o to the
3227 list of objects to be built.
3228 * linux-low.c: Include nat/linux-personality.h.
3229 (linux_create_inferior): Remove code to disable address space
3230 randomization (moved to ../nat/linux-personality.c). Create
3231 cleanup to disable address space randomization.
3232
fb23d554
SDJ
32332015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
3234
3235 * Makefile.in (posix-strerror.o): New rule.
3236 (mingw-strerror.o): Likewise.
3237 * configure: Regenerated.
3238 * configure.ac: Source file ../common/common.host. Initialize new
3239 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
3240
cdf43629
YQ
32412015-01-14 Yao Qi <yao@codesourcery.com>
3242
3243 * Makefile.in (SFILES): Add nat/ppc-linux.c.
3244 (ppc-linux.o): New rule.
3245 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
3246 * configure.ac: AC_CHECK_FUNCS(getauxval).
3247 * config.in: Re-generated.
3248 * configure: Re-generated.
3249 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
3250 ppc64_64bit_inferior_p
3251
514c5338
YQ
32522015-01-14 Yao Qi <yao@codesourcery.com>
3253
3254 * linux-ppc-low.c: Include "nat/ppc-linux.h".
3255 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
3256 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
3257 (PT_ORIG_R3, PT_TRAP): Likewise.
3258 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
3259 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
3260 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
3261
3368c1e5
JB
32622015-01-10 Joel Brobecker <brobecker@adacore.com>
3263
3264 * i387-fp.c (i387_cache_to_xsave): In look over
3265 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
3266 zmmh_low_space field by use of zmmh_high_space.
3267
582511be
PA
32682015-01-09 Pedro Alves <palves@redhat.com>
3269
3270 * linux-low.c (step_over_bkpt): Move higher up in the file.
3271 (handle_extended_wait): Don't store the stop_pc here.
3272 (get_stop_pc): Adjust comments and rename to ...
3273 (check_stopped_by_breakpoint): ... this. Record whether the LWP
3274 stopped for a software breakpoint or hardware breakpoint.
3275 (thread_still_has_status_pending_p): New function.
3276 (status_pending_p_callback): Use
3277 thread_still_has_status_pending_p. If the event is no longer
3278 interesting, resume the LWP.
3279 (handle_tracepoints): Add assert.
3280 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
3281 (wstatus_maybe_breakpoint): New function.
3282 (cancel_breakpoint): Delete function.
3283 (check_stopped_by_watchpoint): New function, factored out from
3284 linux_low_filter_event.
3285 (lp_status_maybe_breakpoint): Delete function.
3286 (linux_low_filter_event): Remove filter_ptid argument.
3287 Leave thread group exits pending here. Store the LWP's stop PC.
3288 Always leave events pending.
3289 (linux_wait_for_event_filtered): Pull all events out of the
3290 kernel, and leave them all pending.
3291 (count_events_callback, select_event_lwp_callback): Consider all
3292 events.
3293 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
3294 (select_event_lwp): Only give preference to the stepping LWP in
3295 all-stop mode. Adjust comments.
3296 (ignore_event): New function.
3297 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
3298 references to cancel_breakpoints. Adjust to renames. Also give
3299 equal priority to all LWPs that have had events in non-stop mode.
3300 If reporting a software breakpoint event, unadjust the LWP's PC.
3301 (linux_wait): If linux_wait_1 returned an ignored event, retry.
3302 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
3303 Adjust.
3304 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
3305 (resume_status_pending_p): Use thread_still_has_status_pending_p.
3306 (linux_stopped_by_watchpoint): Adjust.
3307 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
3308 * linux-low.h (enum lwp_stop_reason): New.
3309 (struct lwp_info) <stop_pc>: Adjust comment.
3310 <stopped_by_watchpoint>: Delete field.
3311 <stop_reason>: New field.
3312 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3313 * mem-break.c (software_breakpoint_inserted_here)
3314 (hardware_breakpoint_inserted_here): New function.
3315 * mem-break.h (software_breakpoint_inserted_here)
3316 (hardware_breakpoint_inserted_here): Declare.
3317 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
3318 (cancel_breakpoints): Delete.
3319 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
3320 (upload_fast_traceframes): Remove references to
3321 cancel_breakpoints.
3322
a33e3959
PA
33232015-01-09 Pedro Alves <palves@redhat.com>
3324
3325 * thread-db.c (find_new_threads_callback): Ignore thread if the
3326 kernel thread ID is -1.
3327
8784d563
PA
33282015-01-09 Pedro Alves <palves@redhat.com>
3329
3330 * linux-low.c (linux_attach_fail_reason_string): Move to
3331 nat/linux-ptrace.c, and rename.
3332 (linux_attach_lwp): Update comment.
3333 (attach_proc_task_lwp_callback): New function.
3334 (linux_attach): Adjust to rename and use
3335 linux_proc_attach_tgid_threads.
3336 (linux_attach_fail_reason_string): Delete declaration.
3337
76f2b779
JB
33382015-01-01 Joel Brobecker <brobecker@adacore.com>
3339
3340 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
3341 * server.c (gdbserver_version): Likewise.
3342
fafcc06a
SDJ
33432014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
3344
3345 * remote-utils.c: Include ctype.h.
3346 (input_interrupt): Explicitly handle the case when the char
3347 received is the NUL byte. Improve the printing of non-ASCII
3348 characters.
3349
beed38b8
JB
33502014-12-16 Joel Brobecker <brobecker@adacore.com>
3351
3352 * linux-low.c (linux_low_filter_event): Update call to
3353 linux_enable_event_reporting following the addition of
3354 a new parameter to that function.
3355
bf330350
CU
33562014-12-16 Catalin Udma <catalin.udma@freescale.com>
3357
3358 PR server/17457
3359 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
3360 (AARCH64_FPCR_REGNO): Likewise.
3361 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
3362 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
3363 (aarch64_store_fpregset): Likewise.
3364
5227d625
JB
33652014-12-15 Joel Brobecker <brobecker@adacore.com>
3366
3367 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
3368 Remove FIXME comment about assumption about N.
3369
f93b65a0
JB
33702014-12-13 Joel Brobecker <brobecker@adacore.com>
3371
3372 * configure.ac: If large-file support is disabled in GDBserver,
3373 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
3374 * configure: Regenerate.
3375
e5a9158d
AA
33762014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3377
3378 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
3379 warning upon ENODATA from ptrace.
3380 * linux-s390-low.c (s390_store_tdb): New.
3381 (s390_regsets): Add regset for NT_S390_TDB.
3382
feea5f36
AA
33832014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3384
3385 * linux-low.c (regsets_store_inferior_registers): Skip regsets
3386 without a fill_function.
3387 * linux-s390-low.c (s390_fill_last_break): Remove.
3388 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
3389 (s390_arch_setup): Use regset's size instead of fill_function for
3390 loop end condition.
3391
098dbe61
AA
33922014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3393
3394 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
3395 the regset's store function when ptrace returned an error.
3396 * regcache.c (get_thread_regcache): Invalidate register cache
3397 before fetching inferior's registers.
3398
28eef672
AA
33992014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3400
3401 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
3402 while-loop as for-loop.
3403 (regsets_store_inferior_registers): Likewise.
3404
bdca27a2
YQ
34052014-11-28 Yao Qi <yao@codesourcery.com>
3406
3407 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
3408 * config.in, configure: Re-generate.
3409 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
3410 is defined.
3411
9c232dda
YQ
34122014-11-21 Yao Qi <yao@codesourcery.com>
3413
3414 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
3415 (AC_CHECK_HEADERS): Remove malloc.h.
3416 * configure: Re-generated.
3417 * config.in: Re-generated.
3418 * server.h: Don't include alloca.h and malloc.h.
3419 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
3420 Don't include malloc.h.
3421
43968415
JB
34222014-11-17 Joel Brobecker <brobecker@adacore.com>
3423
3424 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
3425 corresponding ERRNO check in same block.
3426
40e91bc7
PA
34272014-11-12 Pedro Alves <palves@redhat.com>
3428
3429 * server.c (cont_thread): Update comment.
3430 (start_inferior, attach_inferior): No longer clear cont_thread.
3431 (handle_v_cont): No longer set cont_thread.
3432 (captured_main): Clear cont_thread each time a GDB connects.
3433
c2c118cf
PA
34342014-11-12 Pedro Alves <palves@redhat.com>
3435
3436 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
3437 thread, and don't resume all threads if the Hc thread has exited.
3438
78708b7c
PA
34392014-11-12 Pedro Alves <palves@redhat.com>
3440
3441 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
3442 the process group instead of to a specific LWP.
3443
a2abc7de
PA
34442014-10-15 Pedro Alves <palves@redhat.com>
3445
3446 PR server/17487
3447 * win32-arm-low.c (arm_set_thread_context): Remove current_event
3448 parameter.
3449 (arm_set_thread_context): Delete.
3450 (the_low_target): Adjust.
3451 * win32-i386-low.c (debug_registers_changed)
3452 (debug_registers_used): Delete.
3453 (update_debug_registers_callback): New function.
3454 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
3455 needing to update their debug registers.
3456 (win32_get_current_dr): New function.
3457 (x86_dr_low_get_addr, x86_dr_low_get_control)
3458 (x86_dr_low_get_status): Fetch the debug register from the thread
3459 record's context.
3460 (i386_initial_stuff): Adjust.
3461 (i386_get_thread_context): Remove current_event parameter. Don't
3462 clear debug_registers_changed nor copy DR values to
3463 debug_reg_state.
3464 (i386_set_thread_context): Delete.
3465 (i386_prepare_to_resume): New function.
3466 (i386_thread_added): Mark the thread as needing to update irs
3467 debug registers.
3468 (the_low_target): Remove i386_set_thread_context and install
3469 i386_prepare_to_resume.
3470 * win32-low.c (win32_get_thread_context): Adjust.
3471 (win32_set_thread_context): Use SetThreadContext
3472 directly.
3473 (win32_prepare_to_resume): New function.
3474 (win32_require_context): New function, factored out from ...
3475 (thread_rec): ... this.
3476 (continue_one_thread): Call win32_prepare_to_resume on each thread
3477 we're about to continue.
3478 (win32_resume): Call win32_prepare_to_resume on the event thread.
3479 * win32-low.h (struct win32_thread_info)
3480 <debug_registers_changed>: New field.
3481 (struct win32_target_ops): Change prototype of set_thread_context,
3482 delete set_thread_context and add prepare_to_resume.
3483 (win32_require_context): New declaration.
3484
a442d071
GB
34852014-10-08 Gary Benson <gbenson@redhat.com>
3486
3487 * server.h: Do not include common-exceptions.h.
3488
6f1947e8
GB
34892014-10-08 Gary Benson <gbenson@redhat.com>
3490
3491 * server.h: Do not include cleanups.h.
3492
63b434a4
JH
34932014-09-30 James Hogan <james.hogan@imgtec.com>
3494
3495 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
3496 mips64-dsp-linux.c.
3497
c4d9ceb6
YQ
34982014-09-23 Yao Qi <yao@codesourcery.com>
3499
3500 * linux-low.c (lp_status_maybe_breakpoint): New function.
3501 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
3502 (count_events_callback): Likewise.
3503 (select_event_lwp_callback): Likewise.
3504 (cancel_breakpoints_callback): Likewise.
3505
89a5711c
DB
35062014-09-19 Don Breazeal <donb@codesourcery.com>
3507
3508 * linux-low.c (handle_extended_wait): Call
3509 linux_ptrace_get_extended_event.
3510 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
3511 linux_is_extended_waitstatus.
3512
bffc0964
JB
35132014-09-16 Joel Brobecker <brobecker@adacore.com>
3514
3515 * Makefile.in (CPPFLAGS): Define.
3516 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
3517 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
3518
0bfdf32f
GB
35192014-09-16 Gary Benson <gbenson@redhat.com>
3520
3521 * inferiors.h (current_inferior): Renamed as...
3522 (current_thread): New variable. All uses updated.
3523 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
3524 (maybe_move_out_of_jump_pad): Likewise.
3525 (cancel_breakpoint): Likewise.
3526 (linux_low_filter_event): Likewise.
3527 (wait_for_sigstop): Likewise.
3528 (linux_resume_one_lwp): Likewise.
3529 (need_step_over_p): Likewise.
3530 (start_step_over): Likewise.
3531 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
3532 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
3533 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
3534 and save_inferior as saved_thread.
3535 * regcache.c (get_thread_regcache): Renamed saved_inferior as
3536 saved_thread.
3537 (regcache_invalidate_thread): Likewise.
3538 * remote-utils.c (prepare_resume_reply): Likewise.
3539 * thread-db.c (thread_db_get_tls_address): Likewise.
3540 (disable_thread_event_reporting): Likewise.
3541 (remove_thread_event_breakpoints): Likewise.
3542 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
3543 as saved_thread.
3544 * target.h (set_desired_inferior): Renamed as...
3545 (set_desired_thread): New declaration. All uses updated.
3546 * server.c (myresume): Updated comment to reference thread instead
3547 of inferior.
3548 (handle_serial_event): Likewise.
3549 (handle_target_event): Likewise.
3550
361c8ade
GB
35512014-09-12 Tom Tromey <tromey@redhat.com>
3552 Gary Benson <gbenson@redhat.com>
3553
3554 * regcache.h: Include common-regcache.h.
3555 (regcache_read_pc): Don't declare.
3556 * regcache.c (get_thread_regcache_for_ptid): New function.
3557
bd9269f7
GB
35582014-09-11 Tom Tromey <tromey@redhat.com>
3559 Gary Benson <gbenson@redhat.com>
3560
3561 * symbol.c: New file.
3562 * Makefile.in (SFILES): Add symbol.c.
3563 (OBS): Add symbol.o.
3564
f8c1d06b
GB
35652014-09-11 Gary Benson <gbenson@redhat.com>
3566
3567 * target.c (target_stop_ptid, target_continue_ptid): New
3568 functions.
3569
721ec300
GB
35702014-09-11 Tom Tromey <tromey@redhat.com>
3571 Gary Benson <gbenson@redhat.com>
3572
3573 * target.h: Include target/target.h.
3574 * target.c (target_read_memory, target_read_uint32)
3575 (target_write_memory): New functions.
3576
c5e92cca
GB
35772014-09-11 Gary Benson <gbenson@redhat.com>
3578
3579 * server.h (debug_hw_points): Don't declare.
3580 * server.c (debug_hw_points): Don't define. Replace all uses
3581 with show_debug_regs.
3582 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
3583 all uses with show_debug_regs.
3584
2e4bb98a
EBM
35852014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
3586
3587 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
3588 endianness into account.
3589 (ppc_supply_ptrace_register): Likewise.
3590
ac740bc7
JH
35912014-09-03 James Hogan <james.hogan@imgtec.com>
3592
3593 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
3594 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
3595
97ea6506
GB
35962014-09-03 Gary Benson <gbenson@redhat.com>
3597
3598 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
3599 ALL_DEBUG_ADDRESS_REGISTERS.
3600
df7e5265
GB
36012014-09-02 Gary Benson <gbenson@redhat.com>
3602
3603 * i386-low.h: Renamed as...
3604 * x86-low.h: New file. All type, function and variable name
3605 prefixes changed from "i386_" to "x86_". All references updated.
3606 * i386-low.c: Renamed as...
3607 * x86-low.c: New file. All type, function and variable name
3608 prefixes changed from "i386_" to "x86_". All references updated.
3609
ed859da7
GB
36102014-09-02 Gary Benson <gbenson@redhat.com>
3611
3612 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
3613 (x86_linux_new_thread): Likewise.
3614
860789c7
GB
36152014-08-29 Gary Benson <gbenson@redhat.com>
3616
3617 * server.h (setjmp.h): Do not include.
3618 (toplevel): Do not declare.
3619 (common-exceptions.h): Include.
3620 (cleanups.h): Likewise.
3621 * server.c (toplevel): Do not define.
3622 (exit_code): New static global.
3623 (detach_or_kill_for_exit_cleanup): New function.
3624 (main): New function. Original main renamed to...
3625 (captured_main): New function.
3626 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
3627
ff55e1b5
GB
36282014-08-29 Gary Benson <gbenson@redhat.com>
3629
3630 * Makefile.in (SFILES): Add common/common-exceptions.c.
3631 (OBS): Add common-exceptions.o.
3632 (common-exceptions.o): New rule.
3633 * utils.c (prepare_to_throw_exception): New function.
3634
e9bcb658
GB
36352014-08-29 Gary Benson <gbenson@redhat.com>
3636
3637 * config.in: Regenerate.
3638 * configure: Likewise.
3639
e3180625
GB
36402014-08-29 Gary Benson <gbenson@redhat.com>
3641
3642 * Makefile.in (SFILES): Add common/cleanups.c.
3643 (OBS): cleanups.o.
3644 (cleanups.o): New rule.
3645
e3d6ba5d
GB
36462014-08-29 Gary Benson <gbenson@redhat.com>
3647
3648 * utils.c (internal_vwarning): New function.
3649
7096e886
GB
36502014-08-28 Gary Benson <gbenson@redhat.com>
3651
3652 * utils.h (fatal): Remove declaration.
3653 * utils.c (fatal): Remove function.
3654
14ce3192
GB
36552014-08-28 Gary Benson <gbenson@redhat.com>
3656
3657 * tracepoint.c (gdb_agent_init): Replace fatal with
3658 perror_with_name.
3659 (initialize_tracepoint): Likewise.
3660
50278d59
GB
36612014-08-28 Gary Benson <gbenson@redhat.com>
3662
3663 * remote-utils.c (remote_prepare): Replace fatal with error.
3664
aa96c426
GB
36652014-08-28 Gary Benson <gbenson@redhat.com>
3666
3667 * linux-low.c (linux_async): Replace fatal with warning.
3668 Tidy up and return.
3669 (linux_start_non_stop): Return -1 if linux_async failed.
3670
f7160e97
GB
36712014-08-28 Gary Benson <gbenson@redhat.com>
3672
3673 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
3674 gdb_assert.
3675 (i386_dr_low_get_addr): Remove vague comment.
3676 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
3677 gdb_assert.
3678
38e08fca
GB
36792014-08-28 Gary Benson <gbenson@redhat.com>
3680
3681 * inferiors.c (get_thread_process): Replace check with gdb_assert.
3682 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
3683 internal_error.
3684 (linux_resume_one_lwp): Likewise.
3685 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
3686 gdb_assert.
3687 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
3688 with internal_error.
3689 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
3690 (init_register_cache): Replace fatal with gdb_assert_not_reached.
3691 (find_register_by_name): Replace fatal with internal_error.
3692 (find_regno): Likewise.
3693 * tdesc.c (init_target_desc): Replace check with gdb_assert.
3694 * thread-db.c (thread_db_create_event): Likewise.
3695 (thread_db_load_search): Likewise.
3696 (try_thread_db_load_1): Likewise.
3697 * tracepoint.c (get_jump_space_head): Replace fatal with
3698 internal_error.
3699 (claim_trampoline_space): Likewise.
3700 (have_fast_tracepoint_trampoline_buffer): Likewise.
3701 (cmd_qtstart): Likewise.
3702 (stop_tracing): Likewise.
3703 (fast_tracepoint_collecting): Likewise.
3704 (target_malloc): Likewise.
3705 (download_tracepoint): Likewise.
3706 (download_trace_state_variables): Replace check with gdb_assert.
3707 (upload_fast_traceframes): Replace fatal with internal_error.
3708
34abf635
GB
37092014-08-19 Tom Tromey <tromey@redhat.com>
3710 Gary Benson <gbenson@redhat.com>
3711
3712 * Makefile.in (SFILES): Add common/common-debug.c.
3713 (OBS): Add common-debug.o.
3714 (common-debug.o): New rule.
3715 * debug.h (debug_printf): Don't declare.
3716 * debug.c (debug_printf): Renamed and rewritten as...
3717 (debug_vprintf): New function.
3718
f6e94d78
GB
37192014-08-19 Gary Benson <gbenson@redhat.com>
3720
3721 * utils.h: Do not include print-utils.h.
3722
9239eeab
GB
37232014-08-19 Tom Tromey <tromey@redhat.com>
3724 Gary Benson <gbenson@redhat.com>
3725
3726 * server.h: Add static assertion.
3727 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
3728
ef87c8bb
GB
37292014-08-19 Tom Tromey <tromey@redhat.com>
3730 Gary Benson <gbenson@redhat.com>
3731
3732 * Makefile.in (SFILES): Add common/errors.c.
3733 (OBS): Add errors.o.
3734 (IPA_OBS): Add errors-ipa.o.
3735 (errors.o): New rule.
3736 (errors-ipa.o): Likewise.
3737 * utils.h (perror_with_name, error, warning): Don't declare.
3738 * utils.c (warning): Renamed and rewritten as...
3739 (vwarning): New function.
3740 (error): Renamed and rewritten as...
3741 (verror): New function.
3742 (internal_error): Renamed and rewritten as...
3743 (internal_verror): New function.
3744
bb974a24
GB
37452014-08-07 Gary Benson <gbenson@redhat.com>
3746
3747 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
3748 * configure: Regenerate.
3749 * config.in: Likewise.
3750 * server.h: Do not include errno.h.
3751 * event-loop.c: Likewise.
3752 * hostio-errno.c: Likewise.
3753 * linux-low.c: Likewise.
3754 * remote-utils.c: Likewise.
3755 * spu-low.c: Likewise.
3756 * utils.c: Likewise.
3757 * gdbreplay.c: Unconditionally include errno.h.
3758
6d3d12eb
GB
37592014-08-07 Gary Benson <gbenson@redhat.com>
3760
3761 * server.h: Do not include string.h.
3762 * event-loop.c: Likewise.
3763 * linux-low.c: Likewise.
3764 * regcache.c: Likewise.
3765 * remote-utils.c: Likewise.
3766 * spu-low.c: Likewise.
3767 * utils.c: Likewise.
3768
dccbb609
GB
37692014-08-07 Gary Benson <gbenson@redhat.com>
3770
3771 * server.h: Do not include gdb_assert.h.
3772
e76df0d0
GB
37732014-08-07 Gary Benson <gbenson@redhat.com>
3774
3775 * server.h: Do not include common-utils.h.
3776
4cb9c816
GB
37772014-08-07 Gary Benson <gbenson@redhat.com>
3778
3779 * server.h: Do not include ptid.h.
3780 * notif.h: Likewise.
3781
3995eeee
GB
37822014-08-07 Gary Benson <gbenson@redhat.com>
3783
3784 * server.h: Do not include gdb_locale.h.
3785
cb9f1a9b
GB
37862014-08-07 Gary Benson <gbenson@redhat.com>
3787
3788 * server.h: Do not include gdb/signals.h.
3789 * win32-low.c: Likewise.
3790
a5fceff8
GB
37912014-08-07 Gary Benson <gbenson@redhat.com>
3792
3793 * server.h: Do not include pathmax.h.
3794
b9391142
GB
37952014-08-07 Gary Benson <gbenson@redhat.com>
3796
3797 * server.h: Do not include libiberty.h.
3798 * linux-bfin-low.c: Likewise.
3799
0e443c87
GB
38002014-08-07 Gary Benson <gbenson@redhat.com>
3801
3802 * server.h: Do not include ansidecl.h.
3803
8ebb3f56
GB
38042014-08-07 Gary Benson <gbenson@redhat.com>
3805
3806 * linux-x86-low.c: Do not include stddef.h.
3807 * lynx-ppc-low.c: Likewise.
3808 * tracepoint.c: Likewise.
3809
8980bdf6
GB
38102014-08-07 Gary Benson <gbenson@redhat.com>
3811
3812 * server.h: Do not include stdarg.h.
3813 * nto-low.c: Likewise.
3814
d7096f71
GB
38152014-08-07 Gary Benson <gbenson@redhat.com>
3816
3817 * server.h: Do not include stdlib.h.
3818 * inferiors.c: Likewise.
3819 * linux-low.c: Likewise.
3820 * regcache.c: Likewise.
3821 * spu-low.c: Likewise.
3822 * tracepoint.c: Likewise.
3823 * utils.c: Likewise.
3824
d02f550d
GB
38252014-08-07 Gary Benson <gbenson@redhat.com>
3826
3827 * server.h: Do not include stdio.h.
3828 * linux-low.c: Likewise.
3829 * remote-utils.c: Likewise.
3830 * spu-low.c: Likewise.
3831 * utils.c: Likewise.
3832 * wincecompat.c: Likewise.
3833
87f6c4e3
GB
38342014-08-06 Gary Benson <gbenson@redhat.com>
3835
3836 * regcache.c (init_register_cache): Move conditionals inside if.
3837
7089dca4
GB
38382014-08-06 Gary Benson <gbenson@redhat.com>
3839
3840 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
3841
462f517e
GB
38422014-07-31 Gary Benson <gbenson@redhat.com>
3843
3844 * ax.h: Do not include server.h.
3845 * gdbthread.h: Likewise.
3846 * lynx-low.h: Likewise.
3847 * notif.h: Likewise.
3848
976411d6
GB
38492014-07-30 Gary Benson <gbenson@redhat.com>
3850
3851 * server.h: Include common-defs.h.
3852 Do not include config.h or build-gnulib-gdbserver/config.h.
3853
d41f6d8e
GB
38542014-07-30 Gary Benson <gbenson@redhat.com>
3855
3856 * hostio-errno.c: Move server.h to top of includes list.
3857 * inferiors.c: Likewise.
3858 * linux-x86-low.c: Likewise.
3859 * notif.c: Include server.h.
3860
314c6a35
TT
38612014-07-24 Tom Tromey <tromey@redhat.com>
3862 Gary Benson <gbenson@redhat.com>
3863
3864 * server.h (CORE_ADDR): Now unsigned.
3865
69ff6be5
PA
38662014-07-16 Pedro Alves <palves@redhat.com>
3867
3868 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
3869
ce9e3fe7
PA
38702014-07-15 Pedro Alves <palves@redhat.com>
3871
3872 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
3873 copy.
3874
e76126e8
PA
38752014-07-11 Pedro Alves <palves@redhat.com>
3876
3877 * linux-low.c (kill_wait_lwp): New function, based on
3878 kill_one_lwp_callback, but use my_waitpid directly.
3879 (kill_one_lwp_callback, linux_kill): Use it.
3880
8e9db26e
PA
38812014-06-23 Pedro Alves <palves@redhat.com>
3882
3883 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
3884 before setting DR0..DR3.
3885
698b3e08
GB
38862014-06-20 Gary Benson <gbenson@redhat.com>
3887
3888 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
3889 * configure: Regenerated.
3890 * config.in: Likewise.
3891
125f8a3d
GB
38922014-06-20 Gary Benson <gbenson@redhat.com>
3893
3894 * Makefile.in (SFILES): Update locations for files moved
3895 from common to nat.
3896 (object file files): Reordered.
3897
42995dbd
GB
38982014-06-20 Gary Benson <gbenson@redhat.com>
3899
3900 * i386-low.h (i386_dr_low_can_set_addr): Removed.
3901 (i386_dr_low_set_addr): Likewise.
3902 (i386_dr_low_get_addr): Likewise.
3903 (i386_dr_low_can_set_control): Likewise.
3904 (i386_dr_low_set_control): Likewise.
3905 (i386_dr_low_get_control): Likewise.
3906 (i386_dr_low_get_status): Likewise.
3907 (i386_get_debug_register_length): Likewise.
3908 * linux-x86-low.c (i386_dr_low_set_addr):
3909 Changed signature. Made static.
3910 (i386_dr_low_get_addr): Likewise.
3911 (i386_dr_low_set_control): Likewise.
3912 (i386_dr_low_get_control): Likewise.
3913 (i386_dr_low_get_status): Likewise.
3914 (i386_dr_low): New global variable.
3915 * win32-i386-low.c (i386_dr_low_set_addr):
3916 Changed signature. Made static.
3917 (i386_dr_low_get_addr): Likewise.
3918 (i386_dr_low_set_control): Likewise.
3919 (i386_dr_low_get_control): Likewise.
3920 (i386_dr_low_get_status): Likewise.
3921 (i386_dr_low): New global variable.
3922
e1d2394b
MS
39232014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
3924
3925 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
3926 * Makefile.in (AR, AR_FLAGS): Define.
3927 * configure: Regenerate.
3928
3a8ee006
GB
39292014-06-19 Gary Benson <gbenson@redhat.com>
3930
3931 * Makefile.in (i386-dregs.o): New rule.
3932 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
3933 * i386-low.c (target.h): Remove include.
3934 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
3935 (DR_CONTROL_SHIFT): Likewise.
3936 (DR_CONTROL_SIZE): Likewise.
3937 (DR_RW_EXECUTE): Likewise.
3938 (DR_RW_WRITE): Likewise.
3939 (DR_RW_READ): Likewise.
3940 (DR_RW_IORW): Likewise.
3941 (DR_LEN_1): Likewise.
3942 (DR_LEN_2): Likewise.
3943 (DR_LEN_4): Likewise.
3944 (DR_LEN_8): Likewise.
3945 (DR_LOCAL_ENABLE_SHIFT): Likewise.
3946 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
3947 (DR_ENABLE_SIZE): Likewise.
3948 (DR_LOCAL_SLOWDOWN): Likewise.
3949 (DR_GLOBAL_SLOWDOWN): Likewise.
3950 (DR_CONTROL_RESERVED): Likewise.
3951 (I386_DR_CONTROL_MASK): Likewise.
3952 (I386_DR_VACANT): Likewise.
3953 (I386_DR_LOCAL_ENABLE): Likewise.
3954 (I386_DR_GLOBAL_ENABLE): Likewise.
3955 (I386_DR_DISABLE): Likewise.
3956 (I386_DR_SET_RW_LEN): Likewise.
3957 (I386_DR_GET_RW_LEN): Likewise.
3958 (I386_DR_WATCH_HIT): Likewise.
3959 (i386_wp_op_t): Likewise.
3960 (i386_show_dr): Likewise.
3961 (i386_length_and_rw_bits): Likewise.
3962 (i386_insert_aligned_watchpoint): Likewise.
3963 (i386_remove_aligned_watchpoint): Likewise.
3964 (i386_handle_nonaligned_watchpoint): Likewise.
3965 i386_update_inferior_debug_regs(): Likewise.
3966 (i386_dr_insert_watchpoint): Likewise.
3967 (i386_dr_remove_watchpoint): Likewise.
3968 (i386_dr_region_ok_for_watchpoint): Likewise.
3969 (i386_dr_stopped_data_address): Likewise.
3970 (i386_dr_stopped_by_watchpoint): Likewise.
3971
8f26655c
GB
39722014-06-19 Gary Benson <gbenson@redhat.com>
3973
3974 * i386-low.c (i386_dr_show): Renamed to
3975 i386_show_dr and made static. All uses updated.
3976 (i386_dr_length_and_rw_bits): Renamed to
3977 i386_length_and_rw_bits and made static.
3978 All uses updated.
3979 (i386_dr_insert_aligned_watchpoint): Renamed to
3980 i386_insert_aligned_watchpoint and made static.
3981 All uses updated.
3982 (i386_dr_remove_aligned_watchpoint): Renamed to
3983 i386_remove_aligned_watchpoint and made static.
3984 All uses updated.
3985 (i386_dr_update_inferior_debug_regs): Renamed to
3986 i386_update_inferior_debug_regs and made static.
3987 All uses updated.
3988
b9228891
GB
39892014-06-18 Gary Benson <gbenson@redhat.com>
3990
5171def3
GB
3991 * i386-low.h (i386_dr_low_can_set_addr): New macro.
3992 (i386_dr_low_can_set_control): Likewise.
3993 (i386_get_debug_register_length): Likewise.
3994 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
3995 (i386_dr_low_can_set_control): Likewise.
3996 (i386_get_debug_register_length): Likewise.
3997
39982014-06-17 Gary Benson <gbenson@redhat.com>
3999
b9228891
GB
4000 * i386-low.h (i386-dregs.h): New include.
4001 (DR_FIRSTADDR): Now in i386-dregs.h.
4002 (DR_LASTADDR): Likewise.
4003 (DR_NADDR): Likewise.
4004 (DR_STATUS): Likewise.
4005 (DR_CONTROL): Likewise.
4006 (i386_debug_reg_state): Likewise.
4007 (i386_dr_insert_watchpoint): Likewise.
4008 (i386_dr_remove_watchpoint): Likewise.
4009 (i386_dr_region_ok_for_watchpoint): Likewise.
4010 (i386_dr_stopped_data_address): Likewise.
4011 (i386_dr_stopped_by_watchpoint): Likewise.
4012 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
4013
4be83cc2
GB
40142014-06-18 Gary Benson <gbenson@redhat.com>
4015
4016 * i386-low.h (i386_low_insert_watchpoint): Renamed to
4017 i386_dr_insert_watchpoint.
4018 (i386_low_remove_watchpoint): Renamed to
4019 i386_dr_remove_watchpoint.
4020 (i386_low_region_ok_for_watchpoint): Renamed to
4021 i386_dr_region_ok_for_watchpoint.
4022 (i386_low_stopped_data_address): Renamed to
4023 i386_dr_stopped_data_address.
4024 (i386_low_stopped_by_watchpoint): Renamed to
4025 i386_dr_stopped_by_watchpoint.
4026 * i386-low.c (i386_show_dr): Renamed to
4027 i386_dr_show and made nonstatic. All uses updated.
4028 (i386_length_and_rw_bits): Renamed to
4029 i386_dr_length_and_rw_bits and made nonstatic.
4030 All uses updated.
4031 (i386_insert_aligned_watchpoint): Renamed to
4032 i386_dr_insert_aligned_watchpoint and made nonstatic.
4033 All uses updated.
4034 (i386_remove_aligned_watchpoint): Renamed to
4035 i386_dr_remove_aligned_watchpoint and made nonstatic.
4036 All uses updated.
4037 (i386_update_inferior_debug_regs): Renamed to
4038 i386_dr_update_inferior_debug_regs and made nonstatic.
4039 All uses updated.
4040 (i386_low_insert_watchpoint): Renamed to
4041 i386_dr_insert_watchpoint. All uses updated.
4042 (i386_low_remove_watchpoint): Renamed to
4043 i386_dr_remove_watchpoint. All uses updated.
4044 (i386_low_region_ok_for_watchpoint): Renamed to
4045 i386_dr_region_ok_for_watchpoint. All uses updated.
4046 (i386_low_stopped_data_address): Renamed to
4047 i386_dr_stopped_data_address. All uses updated.
4048 (i386_low_stopped_by_watchpoint): Renamed to
4049 i386_dr_stopped_by_watchpoint. All uses updated.
4050
131aa0d4
GB
40512014-06-18 Gary Benson <gbenson@redhat.com>
4052
4053 * i386-low.c (i386_dr_low_can_set_addr): New macro.
4054 (i386_dr_low_can_set_control): Likewise.
4055 (i386_insert_aligned_watchpoint): New check.
4056
d9305f7f
GB
40572014-06-18 Gary Benson <gbenson@redhat.com>
4058
4059 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
4060 Renamed to state.
4061
e927c9fc
GB
40622014-06-18 Gary Benson <gbenson@redhat.com>
4063
4064 * i386-low.c (i386_length_and_rw_bits): Use internal_error
4065 instead of fatal and error.
4066 (i386_handle_nonaligned_watchpoint): Likewise.
4067
1b6d4134
GB
40682014-06-18 Gary Benson <gbenson@redhat.com>
4069
4070 * i386-low.c (i386_get_debug_register_length): New macro.
4071 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
4072 (i386_show_dr): Use debug_printf instead of fprintf. Use
4073 phex to format values.
4074
6e62758f
GB
40752014-06-18 Gary Benson <gbenson@redhat.com>
4076
4077 * i386-low.h: Comment changes.
4078 * i386-low.c: Likewise.
4079
fc6e2f03
GB
40802014-06-18 Gary Benson <gbenson@redhat.com>
4081
4082 * i386-low.c: Whitespace changes.
4083
f9d1eeed
TT
40842014-06-12 Tom Tromey <tromey@redhat.com>
4085
4086 * utils.c (freeargv): Remove.
4087
0b04e523
TT
40882014-06-12 Tom Tromey <tromey@redhat.com>
4089
4090 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
4091 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
4092 (parse_debug_format_options): Likewise.
4093 (gdbserver_usage): Likewise.
4094 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
4095 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
4096 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
4097 against libiberty.
4098 ($(LIBGNU)): Depend on libiberty.
4099 (all-lib): Recurse into all subdirs.
4100 (install-only): Invoke "install" target in subdirs.
4101 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
4102 targets.
4103 * configure: Rebuild.
4104 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
4105 for vasprintf, vsnprintf, or gettimeofday.
4106 * configure.srv: Don't add safe-ctype.o or lbasename.o to
4107 srv_tgtobj.
4108
270c9937
JB
41092014-06-05 Joel Brobecker <brobecker@adacore.com>
4110
4111 * development.sh: Delete.
4112 * Makefile.in (config.status): Adjust dependency on development.sh.
4113 * configure.ac: Adjust development.sh source call.
4114 * configure: Regenerate.
4115
0a261ed8
PA
41162014-06-02 Pedro Alves <palves@redhat.com>
4117
4118 * ax.c (gdb_free_agent_expr): New function.
4119 * ax.h (gdb_free_agent_expr): New declaration.
4120 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
4121 list.
4122 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
4123 static.
4124 (clear_breakpoint_conditions_and_commands): New function.
4125 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
4126 (clear_breakpoint_conditions_and_commands): New declaration.
4127
e9dae05e
RR
41282014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
4129
4130 * linux-aarch64-low.c (asm/ptrace.h): Include.
4131
5876f503
JK
41322014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
4133
4134 Fix TLS access for -static -pthread.
4135 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
4136 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
4137 (thread_db_load_search, try_thread_db_load_1): Initialize it.
4138
802e8e6d
PA
41392014-05-20 Pedro Alves <palves@redhat.com>
4140
4141 * linux-aarch64-low.c (aarch64_insert_point)
4142 (aarch64_remove_point): No longer check whether the type is
4143 supported here. Adjust to new interface.
4144 (the_low_target): Install aarch64_supports_z_point_type as
4145 supports_z_point_type method.
4146 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
4147 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
4148 instead of a Z packet char. Adjust.
4149 (arm_supports_z_point_type): New function.
4150 (arm_insert_point, arm_remove_point): Adjust to new interface.
4151 (the_low_target): Install arm_supports_z_point_type.
4152 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
4153 (cris_insert_point, cris_remove_point): Adjust to new interface.
4154 Don't check whether the type is supported here.
4155 (the_low_target): Install cris_supports_z_point_type.
4156 * linux-low.c (linux_supports_z_point_type): New function.
4157 (linux_insert_point, linux_remove_point): Adjust to new interface.
4158 * linux-low.h (struct linux_target_ops) <insert_point,
4159 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
4160 raw_breakpoint pointer parameter.
4161 <supports_z_point_type>: New method.
4162 * linux-mips-low.c (mips_supports_z_point_type): New function.
4163 (mips_insert_point, mips_remove_point): Adjust to new interface.
4164 Use mips_supports_z_point_type.
4165 (the_low_target): Install mips_supports_z_point_type.
4166 * linux-ppc-low.c (the_low_target): Install NULL as
4167 supports_z_point_type method.
4168 * linux-s390-low.c (the_low_target): Install NULL as
4169 supports_z_point_type method.
4170 * linux-sparc-low.c (the_low_target): Install NULL as
4171 supports_z_point_type method.
4172 * linux-x86-low.c (x86_supports_z_point_type): New function.
4173 (x86_insert_point): Adjust to new insert_point interface. Use
4174 insert_memory_breakpoint. Adjust to new
4175 i386_low_insert_watchpoint interface.
4176 (x86_remove_point): Adjust to remove_point interface. Use
4177 remove_memory_breakpoint. Adjust to new
4178 i386_low_remove_watchpoint interface.
4179 (the_low_target): Install x86_supports_z_point_type.
4180 * lynx-low.c (lynx_target_ops): Install NULL as
4181 supports_z_point_type callback.
4182 * nto-low.c (nto_supports_z_point_type): New.
4183 (nto_insert_point, nto_remove_point): Adjust to new interface.
4184 (nto_target_ops): Install nto_supports_z_point_type.
4185 * mem-break.c: Adjust intro comment.
4186 (struct raw_breakpoint) <raw_type, size>: New fields.
4187 <inserted>: Update comment.
4188 <shlib_disabled>: Delete field.
4189 (enum bkpt_type) <gdb_breakpoint>: Delete value.
4190 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
4191 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
4192 (raw_bkpt_type_to_target_hw_bp_type): New function.
4193 (find_enabled_raw_code_breakpoint_at): New function.
4194 (find_raw_breakpoint_at): New type and size parameters. Use them.
4195 (insert_memory_breakpoint): New function, based off
4196 set_raw_breakpoint_at.
4197 (remove_memory_breakpoint): New function.
4198 (set_raw_breakpoint_at): Reimplement.
4199 (set_breakpoint): New, based on set_breakpoint_at.
4200 (set_breakpoint_at): Reimplement.
4201 (delete_raw_breakpoint): Go through the_target->remove_point
4202 instead of assuming memory breakpoints.
4203 (find_gdb_breakpoint_at): Delete.
4204 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
4205 (find_gdb_breakpoint): New function.
4206 (set_gdb_breakpoint_at): Delete.
4207 (z_type_supported): New function.
4208 (set_gdb_breakpoint_1): New function, loosely based off
4209 set_gdb_breakpoint_at.
4210 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
4211 (delete_gdb_breakpoint_at): Delete.
4212 (delete_gdb_breakpoint_1): New function, loosely based off
4213 delete_gdb_breakpoint_at.
4214 (delete_gdb_breakpoint): New function.
4215 (clear_gdb_breakpoint_conditions): Rename to ...
4216 (clear_breakpoint_conditions): ... this. Don't handle a NULL
4217 breakpoint.
4218 (add_condition_to_breakpoint): Make static.
4219 (add_breakpoint_condition): Take a struct breakpoint pointer
4220 instead of an address. Adjust.
4221 (gdb_condition_true_at_breakpoint): Rename to ...
4222 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
4223 z_type parameter.
4224 (gdb_condition_true_at_breakpoint): Reimplement.
4225 (add_breakpoint_commands): Take a struct breakpoint pointer
4226 instead of an address. Adjust.
4227 (gdb_no_commands_at_breakpoint): Rename to ...
4228 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
4229 parameter. Return true if no breakpoint was found. Change debug
4230 output.
4231 (gdb_no_commands_at_breakpoint): Reimplement.
4232 (run_breakpoint_commands): Rename to ...
4233 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
4234 and change return type to boolean.
4235 (run_breakpoint_commands): New function.
4236 (gdb_breakpoint_here): Also check for Z1 breakpoints.
4237 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
4238 breakpoint. Go through the_target->remove_point instead of
4239 assuming memory breakpoint.
4240 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
4241 software and hardware breakpoints.
4242 (reinsert_raw_breakpoint): Go through the_target->insert_point
4243 instead of assuming memory breakpoint.
4244 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
4245 software and hardware breakpoints.
4246 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
4247 Check both software and hardware breakpoints.
4248 (validate_inserted_breakpoint): Assert the breakpoint is a
4249 software breakpoint. Set the inserted flag to -1 instead of
4250 setting shlib_disabled.
4251 (delete_disabled_breakpoints): Adjust.
4252 (validate_breakpoints): Only validate software breakpoints.
4253 Adjust to inserted flag change.
4254 (check_mem_read, check_mem_write): Skip breakpoint types other
4255 than software breakpoints. Adjust to inserted flag change.
4256 * mem-break.h (enum raw_bkpt_type): New enum.
4257 (raw_breakpoint, struct process_info): Forward declare.
4258 (Z_packet_to_target_hw_bp_type): Delete declaration.
4259 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
4260 (set_gdb_breakpoint, delete_gdb_breakpoint)
4261 (clear_breakpoint_conditions): New declarations.
4262 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
4263 (breakpoint_inserted_here): Update comment.
4264 (add_breakpoint_condition, add_breakpoint_commands): Replace
4265 address parameter with a breakpoint pointer parameter.
4266 (gdb_breakpoint_here): Update comment.
4267 (delete_gdb_breakpoint_at): Delete.
4268 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
4269 * server.c (process_point_options): Take a struct breakpoint
4270 pointer instead of an address. Adjust.
4271 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
4272 delete_gdb_breakpoint.
4273 * spu-low.c (spu_target_ops): Install NULL as
4274 supports_z_point_type method.
4275 * target.h: Include mem-break.h.
4276 (struct target_ops) <prepare_to_access_memory>: Update comment.
4277 <supports_z_point_type>: New field.
4278 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
4279 instead of a char. Also take a raw breakpoint pointer.
4280 * win32-arm-low.c (the_low_target): Install NULL as
4281 supports_z_point_type.
4282 * win32-i386-low.c (i386_supports_z_point_type): New function.
4283 (i386_insert_point, i386_remove_point): Adjust to new interface.
4284 (the_low_target): Install i386_supports_z_point_type.
4285 * win32-low.c (win32_supports_z_point_type): New function.
4286 (win32_insert_point, win32_remove_point): Adjust to new interface.
4287 (win32_target_ops): Install win32_supports_z_point_type.
4288 * win32-low.h (struct win32_target_ops):
4289 <supports_z_point_type>: New method.
4290 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
4291 instead of a char. Also take a raw breakpoint pointer.
4292
932539e3
PA
42932014-05-20 Pedro Alves <palves@redhat.com>
4294
4295 * mem-break.h: Include break-common.h.
4296 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
4297 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
4298 (Z_packet_to_target_hw_bp_type): New declaration.
4299 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
4300 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
4301 (Z_PACKET_ACCESS_WP): Delete macros.
4302 (Z_packet_to_hw_type): Delete function.
4303 * i386-low.h: Don't include break-common.h here.
4304 (Z_packet_to_hw_type): Delete declaration.
4305 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
4306 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4307 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
4308 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4309 * linux-aarch64-low.c: Don't include break-common.h here.
4310 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
4311 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
4312 (Z_packet_to_target_hw_bp_type): Delete function.
4313 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
4314 function.
4315 (mips_insert_point, mips_remove_point): Use
4316 Z_packet_to_target_hw_bp_type.
4317
4ff0d3d8
PA
43182014-05-20 Pedro Alves <palves@redhat.com>
4319
4320 * linux-aarch64-low.c: Include break-common.h.
4321 (enum target_point_type): Delete.
4322 (Z_packet_to_point_type): Rename to ...
4323 (Z_packet_to_target_hw_bp_type): ... this, and return a
4324 target_hw_bp_type instead.
4325 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
4326 instead of an enum target_point_type.
4327 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
4328 breakpoint type.
4329 (aarch64_dr_state_insert_one_point)
4330 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
4331 (aarch64_handle_aligned_watchpoint)
4332 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
4333 Take an enum target_hw_bp_type instead of an enum
4334 target_point_type.
4335 (aarch64_supports_z_point_type): New function.
4336 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
4337 use Z_packet_to_target_hw_bp_type.
4338
786dc519
JB
43392014-05-20 Joel Brobecker <brobecker@adacore.com>
4340
4341 * configure.ac: Only use -Werror by default when DEVELOPMENT
4342 is true.
4343 * configure: Regenerate.
4344
9e0aa64f
JK
43452014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
4346
4347 Fix gdbserver qGetTLSAddr for x86_64 -m32.
4348 * linux-x86-low.c (X86_64_USER_REGS): New.
4349 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
4350
2b577b92
YQ
43512014-04-28 Yao Qi <yao@codesourcery.com>
4352
4353 * Makefile.in (i386-avx512.c): Fix the typo of generated file
4354 name.
4355
94611da2
PA
43562014-04-25 Pedro Alves <palves@redhat.com>
4357
4358 PR server/16255
4359 * linux-low.c (linux_attach_fail_reason_string): New function.
4360 (linux_attach_lwp): Delete.
4361 (linux_attach_lwp_1): Rename to ...
4362 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
4363 argument. Remove "initial" parameter. Return int instead of
4364 void. Don't error or warn here.
4365 (linux_attach): Adjust to call linux_attach_lwp. Call error on
4366 failure to attach to the tgid. Call warning when failing to
4367 attach to an lwp.
4368 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
4369 argument. Remove "initial" parameter. Return int instead of
4370 void. Don't error or warn here.
4371 (linux_attach_fail_reason_string): New declaration.
4372 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
4373 interface change. Use linux_attach_fail_reason_string.
4374
01f9f808
MS
43752014-04-24 Michael Sturm <michael.sturm@mintel.com>
4376 Walfred Tedeschi <walfred.tedeschi@intel.com>
4377
4378 * Makefile.in: Added rules to handle new files
4379 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
4380 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
4381 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
4382 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
4383 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
4384 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
4385 x32-avx512-linux.o.
4386 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
4387 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
4388 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
4389 i386/x32-avx512.xml.
4390 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
4391 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
4392 i386/x32-avx512-linux.xml.
4393 * i387-fp.c (num_avx512_k_registers): New constant for number
4394 of K registers.
4395 (num_avx512_zmmh_low_registers): New constant for number of
4396 lower ZMM registers (0-15).
4397 (num_avx512_zmmh_high_registers): New constant for number of
4398 higher ZMM registers (16-31).
4399 (num_avx512_ymmh_registers): New contant for number of higher
4400 YMM registers (ymm16-31 added by avx521 on x86_64).
4401 (num_avx512_xmm_registers): New constant for number of higher
4402 XMM registers (xmm16-31 added by AVX512 on x86_64).
4403 (struct i387_xsave): Add space for AVX512 registers.
4404 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
4405 Add code to handle AVX512 registers.
4406 (i387_xsave_to_cache): Add code to handle AVX512 registers.
4407 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
4408 prototypei from generated file.
4409 (tdesc_amd64_avx512_linux): Likewise.
4410 (init_registers_x32_avx512_linux): Likewise.
4411 (tdesc_x32_avx512_linux): Likewise.
4412 (init_registers_i386_avx512_linux): Likewise.
4413 (tdesc_i386_avx512_linux): Likewise.
4414 (x86_64_regmap): Add AVX512 registers.
4415 (x86_linux_read_description): Add code to handle AVX512 XSTATE
4416 mask.
4417 (initialize_low_arch): Add code to initialize AVX512 registers.
4418
51aa91f9
PA
44192014-04-23 Pedro Alves <palves@redhat.com>
4420
4421 * mem-break.c (find_gdb_breakpoint_at): Make static.
4422 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
4423
a4165e94
PA
44242014-04-23 Pedro Alves <palves@redhat.com>
4425
4426 * i386-low.c: Don't include break-common.h here.
4427 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4428 prototype to take target_hw_bp_type as argument instead of a Z
4429 packet char.
4430 * i386-low.h: Include break-common.h here.
4431 (Z_packet_to_hw_type): Declare.
4432 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4433 prototypes.
4434 * linux-x86-low.c (x86_insert_point): Convert the packet number to
4435 a target_hw_bp_type before calling i386_low_insert_watchpoint.
4436 (x86_remove_point): Convert the packet number to a
4437 target_hw_bp_type before calling i386_low_remove_watchpoint.
4438 * win32-i386-low.c (i386_insert_point): Convert the packet number
4439 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
4440 (i386_remove_point): Convert the packet number to a
4441 target_hw_bp_type before calling i386_low_remove_watchpoint.
4442
b8acf843
PA
44432014-04-23 Pedro Alves <palves@redhat.com>
4444
4445 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
4446
d708bcd1
PA
44472014-04-10 Pedro Alves <palves@redhat.com>
4448
4449 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4450 Check if the condition or command is NULL before checking if the
4451 breakpoint is known. On success, return true.
4452 * mem-break.h (add_breakpoint_condition): Document return.
4453 (add_breakpoint_commands): Add describing comment.
4454 * server.c (skip_to_semicolon): New function.
4455 (process_point_options): Use it.
4456
2eec7d5b
PA
44572014-04-09 Pedro Alves <palves@redhat.com>
4458
4459 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
4460 to lwpid_of.
4461
fa96cb38
PA
44622014-02-27 Pedro Alves <palves@redhat.com>
4463
4464 PR 12702
4465 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
4466 macros.
4467 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
4468 output.
4469 (last_thread_of_process_p): Take a PID argument instead of a
4470 thread pointer.
4471 (linux_wait_for_lwp): Delete.
4472 (num_lwps, check_zombie_leaders, not_stopped_callback): New
4473 functions.
4474 (linux_low_filter_event): New function, party factored out from
4475 linux_wait_for_event.
4476 (linux_wait_for_event): Rename to ...
4477 (linux_wait_for_event_filtered): ... this. Add new filter ptid
4478 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
4479 sigsuspend. Check for zombie leaders.
4480 (linux_wait_for_event): Reimplement as wrapper around
4481 linux_wait_for_event_filtered.
4482 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
4483 a normal or signal exit is seen, it's the whole process exiting.
4484 (wait_for_sigstop): No longer a for_each_inferior callback.
4485 Rewrite on top of linux_wait_for_event_filtered.
4486 (stop_all_lwps): Call wait_for_sigstop directly.
4487 * server.c (resume, handle_target_event): Handle
4488 TARGET_WAITKIND_NO_RESUMED.
4489
d763de10
JB
44902014-02-26 Joel Brobecker <brobecker@adacore.com>
4491
4492 * win32-low.c (psapi_get_dll_name,
4493 * win32_CreateToolhelp32Snapshot): Delete.
4494 (win32_CreateToolhelp32Snapshot, win32_Module32First)
4495 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
4496 Delete.
4497 (handle_load_dll): Add function description.
4498 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
4499
850a0f76
JB
45002014-02-26 Joel Brobecker <brobecker@adacore.com>
4501
4502 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
4503 Add comment.
4504 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
4505 base address when calling win32_add_one_solib.
4506 (handle_load_dll): Delete local variable load_addr.
4507 Remove 0x1000 offset applied to DLL base address when calling
4508 win32_add_one_solib.
4509 (handle_unload_dll): Add comment.
4510
f25b3fc3
JB
45112014-02-26 Joel Brobecker <brobecker@adacore.com>
4512
4513 * win32-low.c (win32_add_all_dlls): Renames
4514 win32_ensure_ntdll_loaded. Rewrite function documentation.
4515 Adjust implementation to always load all DLLs.
4516 Add 0x1000 offset to DLL base address when calling
4517 win32_add_one_solib.
4518 (child_initialization_done): New static global.
4519 (do_initial_child_stuff): Set child_initialization_done to
4520 zero during child initialization, and 1 after. Replace call
4521 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
4522 Add comment.
4523 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
4524 (handle_unload_dll): Add function documentation.
4525 (get_child_debug_event): Ignore load and unload DLL events
4526 during child initialization.
4527
d86d4aaf
DE
45282014-02-20 Doug Evans <dje@google.com>
4529
3bc32da3 4530 Remove global all_lwps.
d86d4aaf
DE
4531 * inferiors.h (ptid_of): Move here from linux-low.h.
4532 (pid_of, lwpid_of): Ditto.
4533 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
4534 parameter is a struct thread_info * now.
4535 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
4536 directly. Pass &all_threads to find_inferior instead of &all_lwps.
4537 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
4538 directly.
4539 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
4540 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
4541 * linux-arm-low.c (update_registers_callback): Update, "entry"
4542 parameter is a struct thread_info * now.
4543 Fetch lwpid from current_inferior directly.
4544 (arm_insert_point): Pass &all_threads to find_inferior instead of
4545 &all_lwps.
4546 (arm_remove_point): Ditto.
4547 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
4548 (arm_prepare_to_resume): Fetch pid from thread.
4549 (arm_read_description): Fetch lwpid from current_inferior directly.
4550 * linux-low.c (all_lwps): Delete.
4551 (delete_lwp): Delete call to remove_inferior.
4552 (handle_extended_wait): Fetch lwpid from thread.
4553 (add_lwp): Don't set lwp->entry.id. Remove call to
4554 add_inferior_to_list.
4555 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
4556 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
4557 (kill_one_lwp_callback): Ditto.
4558 (linux_kill): Don't dereference NULL pointer.
4559 Fetch ptid,lwpid from thread.
4560 (get_detach_signal): Fetch ptid from thread.
4561 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
4562 Simplify call to regcache_invalidate_thread.
4563 (delete_lwp_callback): Update, "entry" parameter is a
4564 struct thread_info * now. Fetch pid from thread.
4565 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
4566 (status_pending_p_callback): Update, "entry" parameter is a
4567 struct thread_info * now. Fetch ptid from thread.
4568 (find_lwp_pid): Update, "entry" parameter is a
4569 struct thread_info * now.
4570 (linux_wait_for_lwp): Fetch pid from thread.
4571 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
4572 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
4573 (enqueue_one_deferred_signal): Fetch lwpid from thread.
4574 (dequeue_one_deferred_signal): Ditto.
4575 (cancel_breakpoint): Fetch ptid from current_inferior.
4576 (linux_wait_for_event): Pass &all_threads to find_inferior,
4577 not &all_lwps. Fetch ptid, lwpid from thread.
4578 (count_events_callback): Update, "entry" parameter is a
4579 struct thread_info * now.
4580 (select_singlestep_lwp_callback): Ditto.
4581 (select_event_lwp_callback): Ditto.
4582 (cancel_breakpoints_callback): Ditto.
4583 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
4584 not &all_lwps.
4585 (select_event_lwp): Ditto. Fetch ptid from event_thread.
4586 (unsuspend_one_lwp): Update, "entry" parameter is a
4587 struct thread_info * now.
4588 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
4589 not &all_lwps.
4590 (linux_stabilize_threads): Ditto. And for for_each_inferior.
4591 Fetch lwpid from thread, not lwp.
4592 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
4593 Pass &all_threads to find_inferior, not &all_lwps.
4594 (send_sigstop): Fetch lwpid from thread, not lwp.
4595 (send_sigstop_callback): Update, "entry" parameter is a
4596 struct thread_info * now.
4597 (suspend_and_send_sigstop_callback): Ditto.
4598 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
4599 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
4600 struct thread_info * now.
4601 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
4602 from thread, lwp.
4603 (lwp_running): Update, "entry" parameter is a
4604 struct thread_info * now.
4605 (stop_all_lwps): Fetch ptid from thread.
4606 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
4607 (linux_resume_one_lwp): Fetch lwpid from thread.
4608 (linux_set_resume_request): Update, "entry" parameter is a
4609 struct thread_info * now. Fetch pid, lwpid from thread.
4610 (resume_status_pending_p): Update, "entry" parameter is a
4611 struct thread_info * now.
4612 (need_step_over_p): Ditto. Fetch lwpid from thread.
4613 (start_step_over): Fetch lwpid from thread.
4614 (linux_resume_one_thread): Update, "entry" parameter is a
4615 struct thread_info * now. Fetch lwpid from thread.
4616 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
4617 (proceed_one_lwp): Update, "entry" parameter is a
4618 struct thread_info * now. Fetch lwpid from thread.
4619 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
4620 struct thread_info * now.
4621 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
4622 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
4623 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
4624 directly.
4625 (regsets_store_inferior_registers): Ditto.
4626 (fetch_register, store_register): Ditto.
4627 (linux_read_memory, linux_write_memory): Ditto.
4628 (linux_request_interrupt): Ditto.
4629 (linux_read_auxv): Ditto.
4630 (linux_xfer_siginfo): Ditto.
4631 (linux_qxfer_spu): Ditto.
4632 (linux_qxfer_libraries_svr4): Ditto.
4633 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
4634 moved to inferiors.h.
4635 (get_lwp): Delete.
4636 (get_thread_lwp): Update.
4637 (struct lwp_info): Delete member "entry". Simplify comment for
4638 member "thread".
4639 (all_lwps): Delete.
4640 * linux-mips-low.c (mips_read_description): Fetch lwpid from
4641 current_inferior directly.
4642 (update_watch_registers_callback): Update, "entry" parameter is a
4643 struct thread_info * now. Fetch pid from thread.
4644 (mips_linux_prepare_to_resume): Fetch ptid from thread.
4645 (mips_insert_point): Fetch lwpid from current_inferior.
4646 Pass &all_threads to find_inferior, not &all_lwps.
4647 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
4648 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
4649 directly.
4650 (mips_stopped_data_address): Ditto.
4651 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
4652 directly.
4653 * linux-tile-low.c (tile_arch_setup): Ditto.
4654 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
4655 (update_debug_registers_callback): Update, "entry" parameter is a
4656 struct thread_info * now. Fetch pid from thread.
4657 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
4658 Pass &all_threads to find_inferior, not &all_lwps.
4659 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
4660 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
4661 Pass &all_threads to find_inferior, not &all_lwps.
4662 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
4663 (i386_dr_low_get_status): Ditto.
4664 (x86_linux_prepare_to_resume): Fetch ptid from thread.
4665 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
4666 (x86_linux_read_description): Ditto.
4667 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
4668
3b8361aa
DE
46692014-02-20 Doug Evans <dje@google.com>
4670
4671 * inferiors.c (get_first_inferior): Fix buglet.
4672
f7667f0d
DE
46732014-02-19 Doug Evans <dje@google.com>
4674
4675 * gdbthread.h (add_thread): Change result type to struct thread_info *.
4676 * inferiors.c (add_thread): Change result type to struct thread_info *.
4677 All callers updated.
4678 (add_lwp): Call add_thread here instead of in callers.
4679 All callers updated.
4680 * linux-low.h (get_lwp_thread): Rewrite.
4681 (struct lwp_info): New member "thread".
4682
b3312d80
DE
46832014-02-19 Doug Evans <dje@google.com>
4684
4685 * linux-low.c (add_lwp): Change result to struct lwp_info *.
4686 All callers updated.
4687
ecc6f45c
DE
46882014-02-19 Doug Evans <dje@google.com>
4689
4690 * inferiors.c (add_thread): Fix whitespace.
4691
649ebbca
DE
46922014-02-19 Doug Evans <dje@google.com>
4693
4694 * dll.c (clear_dlls): Replace accessing list implemention details
4695 with API function.
4696 * gdbthread.h (get_first_thread): Declare.
4697 * inferiors.c (for_each_inferior_with_data): New function.
4698 (get_first_thread): New function.
4699 (find_thread_ptid): Simplify.
4700 (get_first_inferior): New function.
4701 (clear_list): Delete.
4702 (one_inferior_p): New function.
4703 (clear_inferior_list): New function.
4704 (clear_inferiors): Update.
4705 * inferiors.h (for_each_inferior_with_data): Declare.
4706 (clear_inferior_list): Declare.
4707 (one_inferior_p): Declare.
4708 (get_first_inferior): Declare.
4709 * linux-low.c (linux_wait_for_event): Replace accessing list
4710 implemention details with API function.
4711 * server.c (target_running): Ditto.
4712 (accumulate_file_name_length): New function.
4713 (emit_dll_description): New function.
4714 (handle_qxfer_libraries): Replace accessing list implemention
4715 details with API function.
4716 (handle_qxfer_threads_worker): New function.
4717 (handle_qxfer_threads_proper): Replace accessing list implemention
4718 details with API function.
4719 (handle_query): Ditto.
4720 (visit_actioned_threads_callback_ftype): New typedef.
4721 (visit_actioned_threads_data): New struct.
4722 (visit_actioned_threads): Rewrite to be find_inferior callback.
4723 (resume): Call find_inferior.
4724 (handle_status): Replace accessing list implemention
4725 details with API function.
4726 (process_serial_event): Replace accessing list implemention details
4727 with API function.
4728 * target.c (set_desired_inferior): Replace accessing list implemention
4729 details with API function.
4730 * tracepoint.c (same_process_p): New function.
4731 (gdb_agent_about_to_close): Replace accessing list implemention
4732 details with API function.
4733 * win32-low.c (child_delete_thread): Replace accessing list
4734 implemention details with API function.
4735 (match_dll_by_basename): New function.
4736 (dll_is_loaded_by_basename): New function.
4737 (win32_ensure_ntdll_loaded): Replace accessing list implemention
4738 details call to dll_is_loaded_by_basename.
4739
80894984
DE
47402014-02-19 Doug Evans <dje@google.com>
4741
4742 * dll.h (struct dll_info): Add comment.
4743 * gdbthread.h (struct thread_info): Add comment.
4744 (current_ptid): Simplify.
4745 * inferiors.c (add_process): Update.
4746 (remove_process): Update.
4747 * inferiors.h (struct process_info): Rename member "head" to "entry".
4748 * linux-low.c (delete_lwp): Update.
4749 (add_lwp): Update.
4750 (last_thread_of_process_p): Update.
4751 (kill_one_lwp_callback, linux_kill): Update.
4752 (status_pending_p_callback): Update.
4753 (wait_for_sigstop): Update. Simplify read of ptid.
4754 (start_step_over): Update.
4755 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
4756 (get_lwp_thread): Update.
4757 (struct lwp_info): Rename member "head" to "entry".
4758 * regcache.h (inferior_list_entry): Delete.
4759 * server.c (kill_inferior_callback): Update.
4760 (detach_or_kill_inferior_callback): Update.
4761 (print_started_pid): Update.
4762 (print_attached_pid): Update.
4763 (process_serial_event): Simplify read of ptid.
4764 * thread-db.c (thread_db_create_event): Update.
4765 (thread_db_get_tls_address): Update.
4766 * win32-low.c (current_inferior_ptid): Simplify.
4767
46917d26
TT
47682014-02-19 Tom Tromey <tromey@redhat.com>
4769
4770 * target.h (struct target_ops) <supports_btrace>: Add target_ops
4771 argument.
4772 (target_supports_btrace): Update.
4773
0759a81e
YQ
47742014-02-14 Yao Qi <yao@codesourcery.com>
4775
4776 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
4777 (rsp-low-ipa.o): New target.
4778
a7191e8b
TT
47792014-02-12 Tom Tromey <tromey@redhat.com>
4780
4781 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
4782 convert_ascii_to_int.
4783 * regcache.c (registers_to_string): Likewise.
4784 * remote-utils.c (decode_M_packet): Likewise.
4785 * server.c (process_serial_event): Likewise.
4786
ff0e980e
TT
47872014-02-12 Tom Tromey <tromey@redhat.com>
4788
4789 * server.c (handle_query, handle_v_run): Use hex2bin, not
4790 unhexify.
4791 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
4792
e9371aff
TT
47932014-02-12 Tom Tromey <tromey@redhat.com>
4794
4795 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
4796 convert_int_to_ascii.
4797 * regcache.c (registers_to_string, collect_register_as_string):
4798 Likewise.
4799 * remote-utils.c (look_up_one_symbol, relocate_instruction):
4800 Likewise.
4801 * server.c (process_serial_event): Likewise.
4802 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
4803 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
4804
971dc0b8
TT
48052014-02-12 Tom Tromey <tromey@redhat.com>
4806
4807 * remote-utils.c (look_up_one_symbol, monitor_output): Use
4808 bin2hex, not hexify.
4809 * tracepoint.c (cmd_qtstatus): Likewise.
4810
0a822afb
TT
48112014-02-12 Tom Tromey <tromey@redhat.com>
4812
4813 * remote-utils.c (monitor_output): Pass explicit length to
4814 hexify.
4815
9c3d6531
TT
48162014-02-12 Tom Tromey <tromey@redhat.com>
4817
4818 * tracepoint.c: Include rsp-low.h.
4819 * server.c: Include rsp-low.h.
4820 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
4821 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
4822 declare.
4823 * remote-utils.c: Include rsp-low.h.
4824 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
4825 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
4826 (convert_int_to_ascii, convert_ascii_to_int): Move to
4827 common/rsp-low.c.
4828 * regcache.c: Include rsp-low.h.
4829 * ax.c: Include rsp-low.h.
4830 * Makefile.in (SFILES): Add common/rsp-low.c.
4831 (OBS): Add rsp-low.o.
4832 (rsp-low.o): New target.
4833
01fd3ea5
TT
48342014-02-12 Tom Tromey <tromey@redhat.com>
4835
4836 * utils.h (pulongest, plongest, phex_nz): Don't declare.
4837 Include print-utils.h.
4838 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
4839 (plongest, thirty_two, phex_nz): Remove.
4840 * Makefile.in (SFILES): Add common/print-utils.c.
4841 (OBS): Add print-utils.o.
4842 (print-utils-ipa.o): New target.
4843 (print-utils.o): New target.
4844 (IPA_OBJS): Add print-utils-ipa.o.
4845
e99dc820
TT
48462014-02-06 Tom Tromey <tromey@redhat.com>
4847
4848 * Makefile.in (SFILES): Fix indentation.
4849
ee1e2d4f
DE
48502014-02-05 Doug Evans <dje@google.com>
4851
4852 * linux-low.c (linux_wait_for_event): Improve comment.
4853 (linux_wait_1): Keep current_inferior in sync with event_child.
4854
f5a02773
DE
48552014-01-22 Doug Evans <dje@google.com>
4856
4857 * gdbthread.h (gdb_id_to_thread): Delete, unused.
4858
87ce2a04
DE
48592014-01-22 Doug Evans <dje@google.com>
4860
4861 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
4862 * configure: Regenerate.
4863 * config.in: Regenerate.
4864 * Makefile.in (SFILES): Add debug.c.
4865 (OBS): Add debug.o.
4866 * debug.c: New file.
4867 * debug.h: New file.
4868 * linux-aarch64-low.c (*): Update all debugging printfs to use
4869 debug_printf instead of fprintf.
4870 * linux-arm-low.c (*): Ditto.
4871 * linux-cris-low.c (*): Ditto.
4872 * linux-crisv32-low.c (*): Ditto.
4873 * linux-m32r-low.c (*): Ditto.
4874 * linux-sparc-low.c (*): Ditto.
4875 * linux-x86.c (*): Ditto.
4876 * linux-low.c (*): Ditto.
4877 (linux_wait_1): Add calls to debug_enter, debug_exit.
4878 (linux_wait): Remove redundant debugging printf.
4879 (stop_all_lwps): Add calls to debug_enter, debug_exit.
4880 (linux_resume, unstop_all_lwps): Ditto.
4881 * mem-break.c (*): Update all debugging printfs to use
4882 debug_printf instead of fprintf.
4883 * remote-utils.c (*): Ditto.
4884 * thread-db.c (*): Ditto.
4885 * server.c #include <ctype.h>, "gdb_vecs.h".
4886 (debug_threads): Moved to debug.c.
4887 (*): Update all debugging printfs to use debug_printf instead of
4888 fprintf.
4889 (start_inferior): Replace call to fflush with call to debug_flush.
4890 (monitor_show_help): Mention set debug-format.
4891 (parse_debug_format_options): New function.
4892 (handle_monitor_command): Handle "monitor set debug-format".
4893 (gdbserver_usage): Mention --debug-format.
4894 (main): Parse --debug-format.
4895 * server.h (debug_threads): Declaration moved to debug.h.
4896 #include "debug.h".
4897 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
4898 trace_debug_1 that uses debug_printf.
4899 (tracepoint_look_up_symbols): Update all debugging printfs to use
4900 debug_printf instead of fprintf.
4901
e671835b
BS
49022014-01-20 Baruch Siach <baruch@tkos.co.il>
4903
4904 * linux-xtensa-low.c: Include asm/ptrace.h instead of
4905 sys/ptrace.h.
4906
b5737fa9
PA
49072014-01-17 Pedro Alves <palves@redhat.com>
4908
ea38d2a9 4909 PR build/16445
c7faa97a
PA
4910 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
4911 defined after including gdb_proc_service.h.
b5737fa9 4912
40ed484e
DE
49132014-01-16 Doug Evans <dje@google.com>
4914
4915 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
4916 (match_dll): Use it.
4917
969c39fb
MM
49182014-01-16 Markus Metzger <markus.t.metzger@intel.com>
4919
4920 * target.h (target_ops) <read_btrace>: Change parameters and
4921 return type to allow error reporting.
4922 * server.c (handle_qxfer_btrace): Support delta reads. Pass
4923 trace reading errors on.
4924 * linux-low.c (linux_low_read_btrace): Pass trace reading
4925 errors on.
4926 (linux_low_disable_btrace): New.
4927
ab7f45ba
DE
49282014-01-15 Doug Evans <dje@google.com>
4929
4930 * inferiors.c (thread_id_to_gdb_id): Delete.
4931 * inferiors.h (thread_id_to_gdb_id): Delete.
4932
66af0f44
EZ
49332014-01-13 Eli Zaretskii <eliz@gnu.org>
4934
4935 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
4936 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
4937 versions.
4938
9939e131
PA
49392014-01-08 Pedro Alves <palves@redhat.com>
4940
4941 * server.c (handle_status): Don't discard previous queued stop
4942 replies or thread's pending status here.
4943 (main) <disconnection>: Do it here instead.
4944
b7ea362b
PA
49452014-01-08 Pedro Alves <palves@redhat.com>
4946
4947 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
4948 * server.c (visit_actioned_threads, handle_pending_status): New
4949 function.
4950 (handle_v_cont): Factor out parts to ...
4951 (resume): ... this new function. If in all-stop, and a thread
4952 being resumed has a pending status, report it without actually
4953 resuming.
4954 (myresume): Adjust to use the new 'resume' function.
4955 (clear_pending_status_callback, set_pending_status_callback)
4956 (find_status_pending_thread_callback): New functions.
4957 (handle_status): Handle the case of multiple threads having
4958 interesting statuses to report. Report threads' real last signal
4959 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
4960 with an interesting thread to report the status for, instead of
4961 always reporting the status of the first thread.
4962
28498c42
JB
49632014-01-01 Joel Brobecker <brobecker@adacore.com>
4964
4965 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
4966 * gdbreplay.c (gdbreplay_version): Likewise.
4967
f45c82da
YZ
49682013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
4969
4970 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
4971 iov.iov_len with the real length in use.
4972
379a5e2d
JB
49732013-12-13 Joel Brobecker <brobecker@adacore.com>
4974
4975 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
4976 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
4977 for all targets that use win32-low.c.
4978 * win32-low.c (win32_ensure_ntdll_loaded): New function.
4979 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
4980
4210d83e
PA
49812013-12-13 Pedro Alves <palves@redhat.com>
4982
4983 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
4984 if equal to TARGET_WAITKIND_LOADED.
4985 * win32-low.c (cached_status): New static global.
4986 (win32_wait): Add declaration.
4987 (do_initial_child_stuff): Flush all initial pending debug events
4988 up to the initial breakpoint.
4989 (win32_wait): If CACHED_STATUS was set, return that instead
4990 of doing a real wait. Remove the code resuming the execution
4991 of the inferior after receiving a TARGET_WAITKIND_LOADED event
4992 during the initial phase. Also remove the code changing
4993 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
4994 TARGET_WAITKIND_STOPPED.
4995
e7f0d979
YQ
49962013-12-11 Yao Qi <yao@codesourcery.com>
4997
4998 * notif.c (handle_notif_ack): Return 0 if no notification
4999 matches.
5000
ebcf782c
DE
50012013-11-20 Doug Evans <dje@google.com>
5002
5003 * linux-low.c (linux_set_resume_request): Fix comment.
5004
20ad9378
DE
50052013-11-20 Doug Evans <dje@google.com>
5006
5007 * linux-low.c (resume_status_pending_p): Tweak comment.
5008
a196ebeb
WT
50092013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5010
5011 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
5012 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
5013 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
5014 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
5015 (srv_amd64_regobj): Add amd64-mpx.o.
5016 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
5017 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
5018 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
5019 * i387-fp.c (num_pl_bnd_register) Added constant.
5020 (num_pl_bnd_cfg_registers) Added constant.
5021 (struct i387_xsave) Added reserved area and MPX fields.
5022 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
5023 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
5024 function.
5025 (tdesc_i386_mpx_linux): Add MPX amd64 target.
5026 (init_registers_amd64_mpx_linux): Declare new function.
5027 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
5028 (x86_64_regmap): Add MPX registers.
5029 (x86_linux_read_description): Add MPX case.
5030 (initialize_low_arch): Initialize MPX targets.
5031
0080a2f6
TT
50322013-11-18 Tom Tromey <tromey@redhat.com>
5033
5034 * configure: Rebuild.
5035 * configure.ac: Don't check for stdlib.h.
5036 * gdbreplay.c: Unconditionally include stdlib.h.
5037
2978b111
TT
50382013-11-18 Tom Tromey <tromey@redhat.com>
5039
5040 * config.in: Rebuild.
5041 * configure: Rebuild.
5042 * configure.ac: Don't use AC_HEADER_DIRENT.
5043
a3d08894
TT
50442013-11-18 Tom Tromey <tromey@redhat.com>
5045
5046 * server.h: Don't check HAVE_STRING_H.
5047 * gdbreplay.c: Don't check HAVE_STRING_H.
5048 * configure: Rebuild.
5049
0a5dd17d
TT
50502013-11-18 Tom Tromey <tromey@redhat.com>
5051
5052 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
5053 LIBGNU.
5054
1bd2f0ba
TT
50552013-11-08 Tom Tromey <tromey@redhat.com>
5056
5057 * configure, config.in: Rebuild.
5058 * configure.ac: Remove unused configury.
5059
3266f10b
TT
50602013-11-08 Tom Tromey <tromey@redhat.com>
5061
5062 * acinclude.m4: Include common.m4, codeset.m4.
5063 * configure, config.in: Rebuild.
5064 * configure.ac: Use GDB_AC_COMMON.
5065
6682d959
AA
50662013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
5067
5068 * linux-s390-low.c (HWCAP_S390_TE): New define.
5069 (s390_arch_setup): Consider the TE field in the HWCAP for
5070 determining 'have_regset_tdb'.
5071
fd0a4d76
SDJ
50722013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
5073
5074 PR gdb/16014
5075 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
5076 call to sizeof.
5077
1a3d890b
PA
50782013-10-02 Pedro Alves <palves@redhat.com>
5079
5080 * server.c (process_serial_event): Don't output "GDBserver
5081 exiting" if GDB is connected through stdio.
5082 * target.c (mywait): Likewise, be silent if GDB is connected
5083 through stdio.
5084
97ad4581
JB
50852013-10-01 Joel Brobecker <brobecker@adacore.com>
5086
5087 * lynx-low.c (lynx_add_threads_after_attach): New function.
5088 (lynx_attach): Remove call to add_thread. Add call to
5089 lynx_add_threads_after_attach instead.
5090
5b4e221c
MF
50912013-09-28 Mike Frysinger <vapier@gentoo.org>
5092
5093 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
5094 * config.in, configure: Regenerated.
5095
ee47b2f8
YQ
50962013-09-18 Yao Qi <yao@codesourcery.com>
5097
5098 PR server/15959
5099 * server.c (start_inferior): Clear 'resume_info'.
5100
d6707650 51012013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 5102
d6707650
JW
5103 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
5104 for each register.
5105
9243dd0e 51062013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 5107
9243dd0e
JW
5108 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
5109 linux-tile-low.o to srv_tgtobj.
5110
c623a6ef
WN
51112013-09-16 Will Newton <will.newton@linaro.org>
5112
5113 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
5114 out regs.
5115
fb71d39e
PA
51162013-09-06 Pedro Alves <palves@redhat.com>
5117
5118 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
5119 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
5120 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
5121 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
5122 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
5123 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
5124
8e7e9910
PA
51252013-09-06 Pedro Alves <palves@redhat.com>
5126
5127 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
5128 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
5129
7c3a12ca
PA
51302013-09-06 Pedro Alves <palves@redhat.com>
5131
5132 * linux-amd64-ipa.c: Include tracepoint.h.
5133 * linux-i386-ipa.c: Include tracepoint.h.
5134
8eb3d7b6
RW
51352013-09-06 Ricard Wanderlof <ricardw@axis.com>
5136
5137 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
5138 (ps_get_thread_area): New function.
5139
eddddb9d
RW
51402013-09-06 Ricard Wanderlof <ricardw@axis.com>
5141
5142 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
5143 (initialize_low_arch): Call init_registers_crisv32 rather than
5144 init_register_crisv32.
5145
533b0600
PA
51462013-09-05 Pedro Alves <palves@redhat.com>
5147
5148 * server.h (handle_vFile, hostio_last_error_from_errno): Move
5149 to ...
5150 * hostio.h: ... this new file.
5151 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
5152 win32-low.c: Include hostio.h.
5153
0ce3d3b5
PA
51542013-09-05 Pedro Alves <palves@redhat.com>
5155
5156 * server.h (gdb_client_data, handler_func, callback_handler_func)
5157 (delete_file_handler, add_file_handler, append_callback_event)
5158 (delete_callback_event, start_event_loop, initialize_event_loop):
5159 Move to event-loop.h and include it.
5160 * event-loop.h: New file.
5161
799cdc37
PA
51622013-09-05 Pedro Alves <palves@redhat.com>
5163
5164 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
5165 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
5166 (loaded_dll, unloaded_dll): Move to ...
5167 * dll.h: ... this new file.
5168 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
5169
6a6bbd9d
PA
51702013-09-05 Pedro Alves <palves@redhat.com>
5171
5172 * server.h (current_process, get_thread_process, all_processes)
5173 (add_inferior_to_list, for_each_inferior, current_inferior)
5174 (remove_inferior, add_process, remove_process, find_process_pid)
5175 (have_started_inferiors_p, have_attached_inferiors_p)
5176 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
5177 (clear_inferiors, find_inferior, find_inferior_id)
5178 (inferior_target_data, set_inferior_target_data)
5179 (inferior_regcache_data, set_inferior_regcache_data): Move to
5180 inferiors.h, and include it.
5181 * inferiors.h: New file.
5182
f699aaba
PA
51832013-09-05 Pedro Alves <palves@redhat.com>
5184
5185 * server.h (struct emit_ops, current_insn_ptr, emit_error):
5186 Move ...
72f4393d 5187 * ax.h: ... here.
f699aaba 5188
c144c7a0
PA
51892013-09-05 Pedro Alves <palves@redhat.com>
5190
5191 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
5192 tracepoint.h.
5193 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
5194 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
5195 (handle_tracepoint_general_set, handle_tracepoint_query)
5196 (tracepoint_finished_step, tracepoint_was_hit)
5197 (release_while_stepping_state_list, current_traceframe)
5198 (in_readonly_region, traceframe_read_mem)
5199 (fetch_traceframe_registers, traceframe_read_sdata)
5200 (traceframe_read_info, struct fast_tpoint_collect_status)
5201 (fast_tracepoint_collecting, force_unlock_trace_buffer)
5202 (handle_tracepoit_bkpts, initialize_low_tracepoint)
5203 (supply_fast_tracepoint_registers)
5204 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
5205 (ipa_tdesc, claim_trampoline_space)
5206 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
5207 (agent_mem_read, agent_get_trace_state_variable_value)
5208 (agent_set_trace_state_variable_value, agent_tsv_read)
5209 (agent_mem_read_string, get_raw_reg_func_addr)
5210 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
5211 * tracepoint.h: ... this new file.
5212
ff42e6ab
PA
52132013-09-05 Pedro Alves <palves@redhat.com>
5214
5215 * server.h (perror_with_name, error, fatal, warning, paddress)
5216 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
5217 include it.
5218 * utils.h: New file.
5219
541af0f4
PA
52202013-09-05 Pedro Alves <palves@redhat.com>
5221
5222 * server.h (remote_debug, noack_mode, transport_is_reliable)
5223 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
5224 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
5225 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
5226 (write_enn, initialize_async_io, enable_async_io)
5227 (disable_async_io, check_remote_input_interrupt_request)
5228 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
5229 (dead_thread_notify, prepare_resume_reply)
5230 (decode_address_to_semicolon, decode_address, decode_m_packet)
5231 (decode_M_packet, decode_X_packet, decode_xfer_write)
5232 (decode_search_memory_packet, unhexify, hexify)
5233 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
5234 (look_up_one_symbol, relocate_instruction)
5235 (monitor_output): Move to remote-utils.h, and include it.
5236 * remote-utils.h: New file.
5237
eebdf26b
PA
52382013-09-05 Pedro Alves <palves@redhat.com>
5239
5240 * server.h (_): Delete.
5241
3aafd2ff
PA
52422013-09-02 Pedro Alves <palves@redhat.com>
5243
5244 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
5245 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
5246 allocated.
5247 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
5248
cee83bcb
PM
52492013-09-02 Pierre Muller <muller@sourceware.org>
5250
5251 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
5252 or WriteProcessMemory complete successfully and handle
5253 ERROR_PARTIAL_COPY error.
5254
9a13b2fa
PA
52552013-09-02 Pedro Alves <palves@redhat.com>
5256
5257 * server.c (gdb_read_memory): Return -1 on traceframe memory read
5258 error instead of EIO.
5259
602e3198
JK
52602013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5261
5262 PR server/15604
5263 * linux-low.c: Include filestuff.h.
5264 (linux_create_inferior) <pid == 0>: Call close_most_fds.
5265 * lynx-low.c: Include filestuff.h.
5266 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
5267 * server.c: Include filestuff.h.
5268 (main): Call notice_open_fds.
5269 * spu-low.c: Include filestuff.h.
5270 (spu_create_inferior) <pid == 0>: Call close_most_fds.
5271
96d7229d
LM
52722013-08-22 Luis Machado <lgustavo@codesourcery.com>
5273
5274 * Makefile.in: Explain why ../target and ../nat are not
5275 listed as include file search paths.
5276 (linux-waitpid.o): New object file rule.
5277 * configure.srv (srv_native_linux_obj): New variable.
5278 Replace all occurrences of linux native object files with
5279 $srv_native_linux_obj.
5280 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
5281 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
5282 (linux_enable_event_reporting): Remove declaration.
5283 (my_waitpid): Moved to common/linux-waitpid.c.
5284 (linux_wait_for_event): Pass ptid when calling
5285 linux_enable_event_reporting.
5286 (linux_supports_tracefork_flag): Remove.
5287 (linux_enable_event_reporting): Likewise.
5288 (linux_tracefork_grandchild): Remove.
5289 (STACK_SIZE): Moved to common/linux-ptrace.c.
5290 (linux_tracefork_child): Remove.
5291 (linux_test_for_tracefork): Remove.
5292 (linux_look_up_symbols): Call linux_supports_traceclone.
5293 (initialize_low): Remove call to linux_test_for_tracefork.
5294 * linux-low.h (PTRACE_TYPE_ARG3): Move to
5295 common/linux-ptrace.h.
5296 (PTRACE_TYPE_ARG4): Likewise.
5297 Include linux-ptrace.h.
5298
32940073
PA
52992013-08-21 Pedro Alves <palves@redhat.com>
5300
5301 * config.in: Renegerate.
5302
33b60d58 53032013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 5304
33b60d58
LM
5305 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
5306 (SFILES): Remove $(srcdir)/common/target-common.c and
5307 add $(srcdir)/target/waitstatus.c.
5308 (OBS): Remove target-common.o and add waitstatus.o.
5309 (server_h): Remove $(srcdir)/../common/target-common.h and
5310 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
5311 and $(srcdir)/../target/waitstatus.h.
5312 (target-common.o): Remove.
5313 (waitstatus.o): New target object file.
5314 * target.h: Do not include target-common.h and
5315 include target/resume.h, target/wait.h and
5316 target/waitstatus.h.
5317
b8e1b30e
LM
53182013-08-13 Luis Machado <lgustavo@codesourcery.com>
5319
5320 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5321 to PTRACE_TYPE_ARG3.
5322 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5323 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
5324 PTRACE_TYPE_ARG4.
5325 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
5326 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
5327
7a60ad40
YQ
53282013-07-27 Jie Zhang <jie@codesourcery.com>
5329 Daniel Jacobowitz <dan@codesourcery.com>
5330 Yao Qi <yao@codesourcery.com>
5331
5332 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
5333 (mips-linux-watch.o): New rule.
5334 (mips_linux_watch_h): New variable.
5335 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
5336 srv_tgtobj.
5337 * linux-mips-low.c: Include mips-linux-watch.h.
5338 (struct arch_process_info, struct arch_lwp_info): New.
5339 (update_watch_registers_callback): New function.
5340 (mips_linux_new_process, mips_linux_new_thread) New functions.
5341 (mips_linux_prepare_to_resume, mips_insert_point): New
5342 functions.
5343 (mips_remove_point, mips_stopped_by_watchpoint): New
5344 functions.
5345 (rsp_bp_type_to_target_hw_bp_type): New function.
5346 (mips_stopped_data_address): New function.
5347 (the_low_target): Add watchpoint support functions.
5348
de6f69ad
YQ
53492013-07-27 Yao Qi <yao@codesourcery.com>
5350
5351 * i386-low.c: Include break-common.h.
5352 (enum target_hw_bp_type): Remove.
5353
3360c0bf
LM
53542013-07-24 Luis Machado <lgustavo@codesourcery.com>
5355
5356 * Makefile.in (SFILES): /common/target-common.c.
5357 (OBS): Add target-common.o.
5358 (server_h): Add $(srcdir)/../common/target-common.h.
5359 (target-common.o): New target.
5360 * server.c (queue_stop_reply_callback): Free
5361 status string after use.
5362 * target.c (target_waitstatus_to_string): Remove.
5363 * target.h: Include target-common.h.
5364 (resume_kind): Likewise.
5365 (target_waitkind): Likewise.
5366 (target_waitstatus): Likewise.
5367 (TARGET_WNOHANG): Likewise.
5368
bd885420
YQ
53692013-07-04 Yao Qi <yao@codesourcery.com>
5370
5371 * Makefile.in (host_alias): Use @host_noncanonical@.
5372 (target_alias): Use @target_noncanonical@.
5373 * configure.ac: Use ACX_NONCANONICAL_TARGET and
5374 ACX_NONCANONICAL_HOST.
5375 * configure: Regenerated.
5376
5377 Revert:
5378 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
5379
5380 * configure.ac (version_host, version_target): Set and AC_SUBST them.
5381 * configure: Rebuild.
5382 * Makefile.in (version_host, version_target): Get from configure.
5383 (version.c): Use $(version_host) and $(version_target).
5384
17ef446e
PA
53852013-07-03 Pedro Alves <palves@redhat.com>
5386
5387 * Makefile.in (config.status): Depend on development.sh.
5388 * acinclude.m4: Include libmcheck.m4.
5389 * configure: Regenerate.
5390
7a9a7487
MG
53912013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
5392
5393 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
5394 attribute inside the parentheses.
5395 (winapi_DebugSetProcessKillOnExit): Ditto.
5396 (winapi_DebugBreakProcess): Ditto.
5397 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 5398
49b64de6
MG
53992013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
5400
5401 * notif.h (notif_event): Add a dummy member to avoid compiler
5402 errors.
5403
d5749ee7
PA
54042013-07-01 Pedro Alves <palves@redhat.com>
5405
5406 * hostio.c (HOSTIO_PATH_MAX): Define.
5407 (require_filename, handle_open, handle_unlink, handle_readlink):
5408 Use it.
5409
d8d2a3ee
PA
54102013-07-01 Pedro Alves <palves@redhat.com>
5411
5412 * server.h: Include "pathmax.h".
5413 * linux-low.c: Don't include sys/param.h.
5414 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
5415 MAXPATHLEN.
5416 * win32-low.c: Don't include sys/param.h.
5417 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
5418
bc7dea8d
PA
54192013-07-01 Pedro Alves <palves@redhat.com>
5420
5421 * event-loop.c: Don't check HAVE_UNISTD_H before including
5422 <unistd.h>.
5423 * gdbreplay.c: Likewise.
5424 * remote-utils.c: Likewise.
5425 * server.c: Likewise.
5426 * configure.ac: Don't check for unistd.h.
5427 * configure: Regenerate.
5428
d6c2da54
TT
54292013-06-28 Tom Tromey <tromey@redhat.com>
5430
5431 * Makefile.in (version.c): Use version.in, not
5432 common/version.in.
5433
257b6bec
MG
54342013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
5435
5436 * configure.ac (version_host, version_target): Set and AC_SUBST them.
5437 * configure: Rebuild.
5438 * Makefile.in (version_host, version_target): Get from configure.
5439 (version.c): Use $(version_host) and $(version_target).
5440
86ebe149
DK
54412013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5442
5443 Fix trace-status to output user name without trailing colon.
5444 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
5445
f30aa5af
DK
54462013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5447
5448 Fix trace-status to output proper start-time and stop-time.
5449 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
5450 output start time and stop time in hex as gdb expects.
5451
28a93511
YQ
54522013-06-26 Pedro Alves <pedro@codesourcery.com>
5453
5454 * tracepoint.c (build_traceframe_info_xml): Output trace state
5455 variables present in the trace buffer.
5456
01208463
TT
54572013-06-24 Tom Tromey <tromey@redhat.com>
5458
5459 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
5460 create-version.sh.
5461 (version.o): Remove.
5462 * gdbreplay.c: Include version.h.
5463 (version, host_name): Don't declare.
5464 * server.h: Include version.h.
5465 (version, host_name): Don't declare.
5466
760256f9
PA
54672013-06-12 Pedro Alves <palves@redhat.com>
5468
5469 * linux-x86-low.c (linux_is_elf64): Delete global.
5470 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
5471 with local linux_pid_exe_is_elf_64_file use.
5472
030031ee
PA
54732013-06-11 Pedro Alves <palves@redhat.com>
5474
5475 * linux-low.c (regset_disabled, disable_regset): New functions.
5476 (regsets_fetch_inferior_registers)
5477 (regsets_store_inferior_registers): Use them.
5478 (initialize_regsets_info); Don't allocate the disabled_regsets
5479 array here.
5480 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
5481 comment.
5482
5da6eb0a
PA
54832013-06-11 Pedro Alves <palves@redhat.com>
5484
5485 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
5486 xmalloc.
5487
7e5aaa09
PA
54882013-06-11 Pedro Alves <palves@redhat.com>
5489
5490 * linux-x86-low.c (initialize_low_arch): Call
5491 init_registers_x32_avx_linux.
5492
d878444c
JK
54932013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
5494
5495 Fix compatibility with Android Bionic.
5496 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
5497 it is not empty.
5498
3aee8918
PA
54992013-06-07 Pedro Alves <palves@redhat.com>
5500
5f2b57b5 5501 PR server/14823
3aee8918
PA
5502 * Makefile.in (OBS): Add tdesc.o.
5503 (IPA_OBJS): Add tdesc-ipa.o.
5504 (tdesc-ipa.o): New rule.
5505 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
5506 interface.
5507 * linux-low.c (new_inferior): Delete.
5508 (disabled_regsets, num_regsets): Delete.
5509 (linux_add_process): Adjust to set the new per-process
5510 new_inferior flag.
5511 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
5512 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
5513 was a stop. When calling arch_setup, switch the current inferior
5514 to the thread that got an event.
5515 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
5516 (regsets_fetch_inferior_registers)
5517 (regsets_store_inferior_registers): New regsets_info parameter.
5518 Adjust to use it.
5519 (linux_register_in_regsets): New regs_info parameter. Adjust to
5520 use it.
5521 (register_addr, fetch_register, store_register): New usrregs_info
5522 parameter. Adjust to use it.
5523 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
5524 parameter regs_info. Adjust to use it.
5525 (linux_fetch_registers): Get the current inferior's regs_info, and
5526 adjust to use it.
5527 (linux_store_registers): Ditto.
5528 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
5529 (initialize_low): Don't initialize the target_regsets here. Call
5530 initialize_low_arch.
5531 * linux-low.h (target_regsets): Delete declaration.
5532 (struct regsets_info): New.
5533 (struct usrregs_info): New.
5534 (struct regs_info): New.
5535 (struct process_info_private) <new_inferior>: New field.
5536 (struct linux_target_ops): Delete the num_regs, regmap, and
5537 regset_bitmap fields. New field regs_info.
5538 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
5539 * i387-fp.c (num_xmm_registers): Delete.
5540 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
5541 calls to new interface.
5542 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
5543 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
5544 Infer the number of xmm registers from the regcache's target
5545 description.
5546 * i387-fp.h (num_xmm_registers): Delete.
5547 * inferiors.c (add_thread): Don't install the thread's regcache
5548 here.
5549 * proc-service.c (gregset_info): Fetch the current inferior's
5550 regs_info. Adjust to use it.
5551 * regcache.c: Include tdesc.h.
5552 (register_bytes, reg_defs, num_registers)
5553 (gdbserver_expedite_regs): Delete.
5554 (get_thread_regcache): If the thread doesn't have a regcache yet,
5555 create one, instead of aborting gdbserver.
5556 (regcache_invalidate_one): Rename to ...
5557 (regcache_invalidate_thread): ... this.
5558 (regcache_invalidate_one): New.
5559 (regcache_invalidate): Only invalidate registers of the current
5560 process.
5561 (init_register_cache): Add target_desc parameter, and use it.
5562 (new_register_cache): Ditto. Assert the target description has a
5563 non zero registers_size.
5564 (regcache_cpy): Add assertions. Adjust.
5565 (realloc_register_cache, set_register_cache): Delete.
5566 (registers_to_string, registers_from_string): Adjust.
5567 (find_register_by_name, find_regno, find_register_by_number)
5568 (register_cache_size): Add target_desc parameter, and use it.
5569 (free_register_cache_thread, free_register_cache_thread_one)
5570 (regcache_release, register_cache_size): New.
5571 (register_size): Add target_desc parameter, and use it.
5572 (register_data, supply_register, supply_register_zeroed)
5573 (supply_regblock, supply_register_by_name, collect_register)
5574 (collect_register_as_string, collect_register_by_name): Adjust.
5575 * regcache.h (struct target_desc): Forward declare.
5576 (struct regcache) <tdesc>: New field.
5577 (init_register_cache, new_register_cache): Add target_desc
5578 parameter.
5579 (regcache_invalidate_thread): Declare.
5580 (regcache_invalidate_one): Delete declaration.
5581 (regcache_release): Declare.
5582 (find_register_by_number, register_cache_size, register_size)
5583 (find_regno): Add target_desc parameter.
5584 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
5585 declarations.
5586 * remote-utils.c: Include tdesc.h.
5587 (outreg, prepare_resume_reply): Adjust.
5588 * server.c: Include tdesc.h.
5589 (gdbserver_xmltarget): Delete declaration.
5590 (get_features_xml, process_serial_event): Adjust.
5591 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
5592 declare.
5593 (struct process_info) <tdesc>: New field.
5594 (ipa_tdesc): Declare.
5595 * tdesc.c: New file.
5596 * tdesc.h: New file.
5597 * tracepoint.c: Include tdesc.h.
5598 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
5599 (get_context_regcache): Adjust to pass ipa_tdesc down.
5600 (do_action_at_tracepoint): Adjust to get the register cache size
5601 from the context regcache's description.
5602 (traceframe_walk_blocks): Adjust to get the register cache size
5603 from the current trace frame's description.
5604 (traceframe_get_pc): Adjust to get current trace frame's
5605 description and pass it down.
5606 (gdb_collect): Adjust to get the register cache size from the
5607 IPA's description.
5608 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
5609 (gdbserver_xmltarget): Delete.
5610 (initialize_low_tracepoint): Set the ipa's target description.
5611 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
5612 (initialize_low_tracepoint): Set the ipa's target description.
5613 * linux-x86-low.c: Include tdesc.h.
5614 [__x86_64__] (is_64bit_tdesc): New.
5615 (ps_get_thread_area, x86_get_thread_area): Use it.
5616 (i386_cannot_store_register): Rename to ...
5617 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
5618 (i386_cannot_fetch_register): Rename to ...
5619 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
5620 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
5621 to new interface.
5622 (target_regsets): Rename to ...
5623 (x86_regsets): ... this.
5624 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
5625 interface.
5626 (x86_siginfo_fixup): Use is_64bit_tdesc.
5627 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
5628 (tdesc_x32_avx_linux, tdesc_x32_linux)
5629 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
5630 Declare.
5631 (x86_linux_update_xmltarget): Delete.
5632 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
5633 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
5634 (AMD64_LINUX_USER64_CS): New.
5635 (x86_linux_read_description): New, based on
5636 x86_linux_update_xmltarget.
5637 (same_process_callback): New.
5638 (x86_arch_setup_process_callback): New.
5639 (x86_linux_update_xmltarget): New.
5640 (x86_regsets_info): New.
5641 (amd64_linux_regs_info): New.
5642 (i386_linux_usrregs_info): New.
5643 (i386_linux_regs_info): New.
5644 (x86_linux_regs_info): New.
5645 (x86_arch_setup): Reimplement.
5646 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
5647 (x86_emit_ops): Ditto.
5648 (the_low_target): Adjust. Install x86_linux_regs_info,
5649 x86_cannot_fetch_register, and x86_cannot_store_register.
5650 (initialize_low_arch): New.
5651 * linux-ia64-low.c (tdesc_ia64): Declare.
5652 (ia64_fetch_register): Adjust.
5653 (ia64_usrregs_info, regs_info): New globals.
5654 (ia64_regs_info): New function.
5655 (the_low_target): Adjust.
5656 (initialize_low_arch): New function.
5657 * linux-sparc-low.c (tdesc_sparc64): Declare.
5658 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
5659 Adjust.
5660 (sparc_arch_setup): New function.
5661 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
5662 (the_low_target): Adjust.
5663 (initialize_low_arch): New function.
5664 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
5665 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
5666 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
5667 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
5668 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
5669 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
5670 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
5671 (tdesc_powerpc_isa205_vsx64l): Declare.
5672 (ppc_cannot_store_register, ppc_collect_ptrace_register)
5673 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
5674 (ppc_set_pc, ppc_get_hwcap): Adjust.
5675 (ppc_usrregs_info): Forward declare.
5676 (!__powerpc64__) ppc_regmap_adjusted: New global.
5677 (ppc_arch_setup): Adjust to the current process'es target
5678 description.
5679 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
5680 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
5681 (ppc_store_evrregset): Adjust.
5682 (target_regsets): Rename to ...
5683 (ppc_regsets): ... this, and make static.
5684 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
5685 (ppc_regs_info): New function.
5686 (the_low_target): Adjust.
5687 (initialize_low_arch): New function.
5688 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
5689 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
5690 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
5691 (tdesc_s390x_linux64v2): Declare.
5692 (s390_collect_ptrace_register, s390_supply_ptrace_register)
5693 (s390_fill_gregset, s390_store_last_break): Adjust.
5694 (target_regsets): Rename to ...
5695 (s390_regsets): ... this, and make static.
5696 (s390_get_pc, s390_set_pc): Adjust.
5697 (s390_get_hwcap): New target_desc parameter, and use it.
5698 [__s390x__] (have_hwcap_s390_high_gprs): New global.
5699 (s390_arch_setup): Adjust to set the current process'es target
5700 description. Don't adjust the regmap.
5701 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
5702 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
5703 (regs_info_3264): New globals.
5704 (s390_regs_info): New function.
5705 (the_low_target): Adjust.
5706 (initialize_low_arch): New function.
5707 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
5708 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
5709 [__mips64] (init_registers_mips_linux)
5710 (init_registers_mips_dsp_linux): Delete defines.
5711 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
5712 (have_dsp): New global.
5713 (mips_read_description): New, based on mips_arch_setup.
5714 (mips_arch_setup): Reimplement.
5715 (get_usrregs_info): New function.
5716 (mips_cannot_fetch_register, mips_cannot_store_register)
5717 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
5718 (mips_fill_fpregset, mips_store_fpregset): Adjust.
5719 (target_regsets): Rename to ...
5720 (mips_regsets): ... this, and make static.
5721 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
5722 (dsp_regs_info, regs_info): New globals.
5723 (mips_regs_info): New function.
5724 (the_low_target): Adjust.
5725 (initialize_low_arch): New function.
5726 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
5727 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
5728 Declare.
5729 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
5730 (arm_read_description): New, with bits factored from
5731 arm_arch_setup.
5732 (arm_arch_setup): Reimplement.
5733 (target_regsets): Rename to ...
5734 (arm_regsets): ... this, and make static.
5735 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
5736 (arm_regs_info): New function.
5737 (the_low_target): Adjust.
5738 (initialize_low_arch): New function.
5739 * linux-m68k-low.c (tdesc_m68k): Declare.
5740 (target_regsets): Rename to ...
5741 (m68k_regsets): ... this, and make static.
5742 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
5743 (m68k_regs_info): New function.
5744 (m68k_arch_setup): New function.
5745 (the_low_target): Adjust.
5746 (initialize_low_arch): New function.
5747 * linux-sh-low.c (tdesc_sharch): Declare.
5748 (target_regsets): Rename to ...
5749 (sh_regsets): ... this, and make static.
5750 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
5751 (sh_regs_info, sh_arch_setup): New functions.
5752 (the_low_target): Adjust.
5753 (initialize_low_arch): New function.
5754 * linux-bfin-low.c (tdesc_bfin): Declare.
5755 (bfin_arch_setup): New function.
5756 (bfin_usrregs_info, regs_info): New globals.
5757 (bfin_regs_info): New function.
5758 (the_low_target): Adjust.
5759 (initialize_low_arch): New function.
5760 * linux-cris-low.c (tdesc_cris): Declare.
5761 (cris_arch_setup): New function.
5762 (cris_usrregs_info, regs_info): New globals.
5763 (cris_regs_info): New function.
5764 (the_low_target): Adjust.
5765 (initialize_low_arch): New function.
5766 * linux-cris-low.c (tdesc_crisv32): Declare.
5767 (cris_arch_setup): New function.
5768 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
5769 (cris_regs_info): New function.
5770 (the_low_target): Adjust.
5771 (initialize_low_arch): New function.
5772 * linux-m32r-low.c (tdesc_m32r): Declare.
5773 (m32r_arch_setup): New function.
5774 (m32r_usrregs_info, regs_info): New globals.
5775 (m32r_regs_info): Adjust.
5776 (initialize_low_arch): New function.
5777 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
5778 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
5779 (tic6x_usrregs_info): Forward declare.
5780 (tic6x_read_description): New function, based on ...
5781 (tic6x_arch_setup): ... this. Reimplement.
5782 (target_regsets): Rename to ...
5783 (tic6x_regsets): ... this, and make static.
5784 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
5785 (tic6x_regs_info): New function.
5786 (the_low_target): Adjust.
5787 (initialize_low_arch): New function.
5788 * linux-xtensa-low.c (tdesc_xtensa): Declare.
5789 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
5790 (target_regsets): Rename to ...
5791 (xtensa_regsets): ... this, and make static.
5792 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
5793 globals.
5794 (xtensa_arch_setup, xtensa_regs_info): New functions.
5795 (the_low_target): Adjust.
5796 (initialize_low_arch): New function.
5797 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
5798 (nios2_arch_setup): Set the current process'es tdesc.
5799 (target_regsets): Rename to ...
5800 (nios2_regsets): ... this.
5801 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
5802 (nios2_regs_info): New function.
5803 (the_low_target): Adjust.
5804 (initialize_low_arch): New function.
a261b8f5
PA
5805 * linux-aarch64-low.c (tdesc_aarch64): Declare.
5806 (aarch64_arch_setup): Set the current process'es tdesc.
5807 (target_regsets): Rename to ...
5808 (aarch64_regsets): ... this.
5809 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
5810 (aarch64_regs_info): New function.
5811 (the_low_target): Adjust.
5812 (initialize_low_arch): New function.
3aee8918
PA
5813 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
5814 globals.
5815 (target_regsets): Rename to ...
5816 (tile_regsets): ... this.
5817 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
5818 (tile_regs_info): New function.
5819 (tile_arch_setup): Set the current process'es tdesc.
5820 (the_low_target): Adjust.
5821 (initialize_low_arch): New function.
5822 * spu-low.c (tdesc_spu): Declare.
5823 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
5824 * win32-arm-low.c (tdesc_arm): Declare.
5825 (arm_arch_setup): New function.
5826 (the_low_target): Install arm_arch_setup instead of
5827 init_registers_arm.
5828 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
5829 (init_windows_x86): Rename to ...
5830 (i386_arch_setup): ... this. Set `win32_tdesc'.
5831 (the_low_target): Adjust.
5832 * win32-low.c (win32_tdesc): New global.
5833 (child_add_thread): Don't create the thread cache here.
5834 (do_initial_child_stuff): Set the new process'es tdesc.
5835 * win32-low.h (struct target_desc): Forward declare.
5836 (win32_tdesc): Declare.
5837 * lynx-i386-low.c (tdesc_i386): Declare global.
5838 (lynx_i386_arch_setup): Set `lynx_tdesc'.
5839 * lynx-low.c (lynx_tdesc): New global.
5840 (lynx_add_process): Set the new process'es tdesc.
5841 * lynx-low.h (struct target_desc): Forward declare.
5842 (lynx_tdesc): Declare global.
5843 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
5844 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
5845 * nto-low.c (nto_tdesc): New global.
5846 (do_attach): Set the new process'es tdesc.
5847 * nto-low.h (struct target_desc): Forward declare.
5848 (nto_tdesc): Declare.
5849 * nto-x86-low.c (tdesc_i386): Declare.
5850 (nto_x86_arch_setup): Set `nto_tdesc'.
5851
b1fbec62
GB
58522013-06-04 Gary Benson <gbenson@redhat.com>
5853
5854 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
5855 to qSupported response when appropriate.
5856 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
5857 with nonzero-length annex.
5858 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
5859 arguments supplied in annex.
5860
d1ec4ce7
DE
58612013-05-31 Doug Evans <dje@google.com>
5862
ac44adcb 5863 PR server/15594
d1ec4ce7
DE
5864 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
5865 64 bits in 64-cross-32 environment.
5866
9b25f2d3
PA
58672013-05-28 Pedro Alves <palves@redhat.com>
5868
5869 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
5870 (aarch64-without-fpu.c): Delete rule.
5871 * configure.srv (aarch64*-*-linux*): Remove references to
5872 aarch64-without-fpu.o and aarch64-without-fpu.xml.
5873 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
5874 declaration.
5875
6740dc9c
PA
58762013-05-24 Pedro Alves <palves@redhat.com>
5877
5878 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
5879 instead of strchr/decode_address. Error if the range isn't split
5880 with a ','. Don't assume there's be a ':' in the action.
5881
c2d6af84
PA
58822013-05-23 Yao Qi <yao@codesourcery.com>
5883 Pedro Alves <palves@redhat.com>
5884
5885 * linux-low.c (lwp_in_step_range): New function.
5886 (linux_wait_1): If the thread was range stepping and stopped
5887 outside the stepping range, report the stop to GDB. Otherwise,
5888 continue stepping. Add range stepping debug output.
5889 (linux_set_resume_request): Copy the step range from the resume
5890 request to the lwp.
5891 (linux_supports_range_stepping): New.
5892 (linux_target_ops) <supports_range_stepping>: Set to
5893 linux_supports_range_stepping.
5894 * linux-low.h (struct linux_target_ops)
5895 <supports_range_stepping>: New field.
5896 (struct lwp_info) <step_range_start, step_range_end>: New fields.
5897 * linux-x86-low.c (x86_supports_range_stepping): New.
5898 (the_low_target) <supports_range_stepping>: Set to
5899 x86_supports_range_stepping.
5900 * server.c (handle_v_cont): Handle 'r' action.
5901 (handle_v_requests): Append ";r" if the target supports range
5902 stepping.
5903 * target.h (struct thread_resume) <step_range_start,
5904 step_range_end>: New fields.
5905 (struct target_ops) <supports_range_stepping>:
5906 New field.
5907 (target_supports_range_stepping): New macro.
5908
58794e1a
JB
59092013-05-17 Joel Brobecker <brobecker@adacore.com>
5910
5911 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
5912 confusion in comment.
5913
d631c5a7
JB
59142013-05-17 Joel Brobecker <brobecker@adacore.com>
5915
5916 * lynx-low.c (struct process_info_private): New type.
5917 (lynx_add_process): New function.
5918 (lynx_create_inferior, lynx_attach): Replace calls to
5919 add_process by calls to lynx_add_process.
5920 (lynx_resume): If PTID is null, then try using
5921 current_process()->private->last_wait_event_ptid.
5922 Add comments.
5923 (lynx_clear_inferiors): Delete. The contents of that function
5924 has been inlined in lynx_mourn;
5925 (lynx_wait_1): Save the ptid in the process's private data.
5926 (lynx_mourn): Free the process' private data. Replace call
5927 to lynx_clear_inferiors by call to clear_inferiors.
5928
96f7a20f
YQ
59292013-05-17 Yao Qi <yao@codesourcery.com>
5930
5931 * i386-low.c (i386_length_and_rw_bits): Move the comment to
5932 the right place.
5933
db0dfaa0
LM
59342013-05-16 Luis Machado <lgustavo@codesourcery.com>
5935
5936 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
5937 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
5938 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
5939 PT_TEXT_END_ADDR guards. Update comments.
5940 (linux_target_op) <read_offsets>: Conditionally define to
5941 linux_read_offsets if the target is UCLIBC and if it defines
5942 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
5943
68f5f838
SL
59442013-05-06 Sandra Loosemore <sandra@codesourcery.com>
5945 Andrew Jenner <andrew@codesourcery.com>
5946
5947 * Makefile.in (SFILES): Add linux-nios2-low.c.
5948 (clean): Add action to delete nios2-linux.c.
5949 (nios2-linux.c): New rule.
5950 * configure.srv: Add nios2*-*-linux*.
5951 * linux-nios2-low.c: New.
5952
1ebff1fd
HAQ
59532013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
5954
5955 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
5956
f6150862
HZ
59572013-04-25 Hui Zhu <hui@codesourcery.com>
5958
5959 PR gdb/15186
f6150862
HZ
5960 * ax.c (ax_printf): Add fflush.
5961
614c279d
TT
59622013-04-22 Tom Tromey <tromey@redhat.com>
5963
5964 * Makefile.in (SFILES): Add filestuff.c.
5965 (OBS): Add filestuff.o.
5966 (filestuff.o): New target.
5967 * config.in, configure: Rebuild.
5968 * configure.ac: Check for fdwalk, pipe2.
5969
7d4e5717
PA
59702013-04-17 Pedro Alves <palves@redhat.com>
5971
5972 * configure.ac (USE_THREAD_DB): Delete variable.
5973 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
5974 Don't AC_SUBST USE_THREAD_DB.
5975 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
5976 * config.in, configure: Regenerate.
5977
d5c93e41
PA
59782013-04-16 Pedro Alves <palves@redhat.com>
5979
5980 * linux-low.h (struct lwp_info) <thread_known>: Move under
5981 the USE_THREAD_DB #ifdef.
5982
04f5fe89
PA
59832013-04-16 Pedro Alves <palves@redhat.com>
5984
5985 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
5986 (linux-low.o): Delete rule.
5987 * linux-low.h: Always include "gdb_thread_db.h" instead of
5988 conditionally including thread_db.h.
5989 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
5990 HAVE_THREAD_DB_H.
5991
480b27bf
JK
59922013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5993
5994 * Makefile.in (install-only): Fix make install regression.
5995
43662968
JK
59962013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
5997
5998 Convert man pages to texinfo, new gdbinit.5 texinfo page.
5999 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
6000 installation.
6001 * gdbserver.1: Remove.
6002
3e74e146
PA
60032013-03-22 Pedro Alves <palves@redhat.com>
6004
6005 * linux-low.c (handle_extended_wait): Don't call
6006 linux_enable_event_reporting.
6007
a8347a2a
TT
60082013-03-15 Tony Theodore <tonyt@logyst.com>
6009
6010 PR build/9098:
6011 * Makefile.in (SHELL): Use @SHELL@.
6012
eeb56fa7
SDJ
60132013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
6014
6015 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
6016 compiler warning.
6017
4fa7e2ff
JB
60182013-03-13 Joel Brobecker <brobecker@adacore.com>
6019
6020 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
6021 Remove extraneous NULL element.
6022
8ddb1965
YQ
60232013-03-13 Yao Qi <yao@codesourcery.com>
6024
6025 * tracepoint.c (traceframe_read_tsv): Look for the last matched
6026 'V' block in trace frame.
6027
9accd112
MM
60282013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6029
6030 * target.h (struct target_ops): Add btrace ops.
6031 (target_supports_btrace): New macro.
6032 (target_enable_btrace): New macro.
6033 (target_disable_btrace): New macro.
6034 (target_read_btrace): New macro.
6035 * gdbthread.h (struct thread_info): Add btrace field.
6036 * server.c: Include btrace-common.h.
6037 (handle_btrace_general_set): New function.
6038 (handle_btrace_enable): New function.
6039 (handle_btrace_disable): New function.
6040 (handle_general_set): Call handle_btrace_general_set.
6041 (handle_qxfer_btrace): New function.
6042 (struct qxfer qxfer_packets[]): Add btrace entry.
6043 * inferiors.c (remove_thread): Disable btrace.
6044 * linux-low: Include linux-btrace.h.
6045 (linux_low_enable_btrace): New function.
6046 (linux_low_read_btrace): New function.
6047 (linux_target_ops): Add btrace ops.
6048 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
6049 Add srv_linux_btrace=yes.
6050 (x86_64-*-linux*): Add linux-btrace.o.
6051 Add srv_linux_btrace=yes.
6052 * configure.ac: Define HAVE_LINUX_BTRACE.
6053 * config.in: Regenerated.
6054 * configure: Regenerated.
6055
5cc22e4c
MM
60562013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6057
6058 * server.c (handle_qxfer): Preserve error message if -3 is
6059 returned.
6060 (qxfer): Document the -3 return value.
6061
7c97f91e
MM
60622013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6063
6064 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
6065 (linux_btrace_h): New variable.
6066 (linux-btrace.o): New rule.
6067
be9a119c 60682013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
6069 Hafiz Abid Qadeer <abidh@codesourcery.com>
6070
6071 * tracepoint.c (trace_buffer_size): New global.
6072 (DEFAULT_TRACE_BUFFER_SIZE): New define.
6073 (init_trace_buffer): Change to one-argument function. Allocate
6074 trace buffer memory.
6075 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
6076 handle QTBuffer:size packet.
6077 (cmd_bigqtbuffer_size): New function.
6078 (initialize_tracepoint): Call init_trace_buffer with
6079 DEFAULT_TRACE_BUFFER_SIZE.
6080 * server.c (handle_query): Add QTBuffer:size in the
6081 supported packets.
6082
e64f7499
YQ
60832013-03-07 Yao Qi <yao@codesourcery.com>
6084
6085 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
6086 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
6087 of -1.
6088 (cmd_qtsp): Adjust condition. Do post increment.
6089 Set cur_action and cur_step_action back to 0.
6090
f0ae6fc3
PA
60912013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
6092
6093 PR server/15236
6094 * linux-low.c (linux_write_memory): Return early success if LEN is
6095 zero.
6096
b5b0b0af
CV
60972013-03-05 Corinna Vinschen <vinschen@redhat.de>
6098
334ad4a8 6099 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 6100
589bc927
TT
61012013-02-28 Tom Tromey <tromey@redhat.com>
6102
6103 * configure.ac: Invoke AC_SYS_LARGEFILE.
6104 * configure, config.in: Rebuild.
6105
dfe07582
CV
61062013-02-28 Corinna Vinschen <vinschen@redhat.com>
6107
6108 * win32-low.c: Throughout, fix format strings and casts of
6109 printf-like functions to avoid type related warnings on all
6110 platforms.
6111 (get_child_debug_event): Print dwDebugEventCode as hex since
6112 that's how it's usually documented.
6113
736cd585
YQ
61142013-02-28 Yao Qi <yao@codesourcery.com>
6115
6116 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
6117 pulongest.
6118
e1f58301
JW
61192013-02-27 Jiong Wang <jiwang@tilera.com>
6120
6121 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
6122 (reg-tilegx32.c): New rule.
6123 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
6124 * linux-tile-low.c (tile_arch_setup): New function. Invoke
6125 different register info initializer according to elf class.
6126 (init_registers_tilgx32): New function. The tilegx32 register info
6127 initializer.
6128 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
6129 (tile_store_gregset): Likewise.
6130
d171ca78
YQ
61312013-02-27 Yao Qi <yao@codesourcery.com>
6132
6133 * server.c (process_point_options): Print debug message when
6134 debug_threads is true.
6135
282bbdf3
YQ
61362013-02-26 Yao Qi <yao@codesourcery.com>
6137
6138 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
6139
aca22551
PA
61402013-02-19 Pedro Alves <palves@redhat.com>
6141 Kai Tietz <ktietz@redhat.com>
6142
6143 PR gdb/15161
6144
6145 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
6146 instead of strtoul to extract address from packet.
6147 (process_serial_event) <'z'>: Likewise.
6148
4f3cee1c
YQ
61492013-02-18 Yao Qi <yao@codesourcery.com>
6150
6151 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
6152
8e1d55a3
PA
61532013-02-14 Pedro Alves <palves@redhat.com>
6154
6155 Plug memory leak.
6156
6157 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
6158 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
6159
458820da
PA
61602013-02-14 Pedro Alves <palves@redhat.com>
6161
6162 * tracepoint.c (cmd_qtdpsrc): Use savestring.
6163
baea0dae
PA
61642013-02-14 Pedro Alves <palves@redhat.com>
6165
6166 * tracepoint.c (save_string): Delete.
6167 (add_tracepoint_action): Use savestring instead of save_string.
6168
0b1afbb3
PA
61692013-02-12 Pedro Alves <palves@redhat.com>
6170
6171 * linux-xtensa-low.c: Ditto.
6172 * xtensa-xtregs.c: Ditto.
6173
8a4ac37e
PA
61742013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
6175
6176 * thread-db.c (thread_db_get_tls_address): NULL pointer check
6177 thread_db.
6178
148de6bb
MS
61792013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
6180
6181 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
6182 aarch64_num_wp_regs and aarch64_num_bp_regs to
6183 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
6184
55fac6e0
MS
61852013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
6186
6187 * linux-aarch64-low.c (ps_get_thread_area): Replace
6188 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
6189
176eb98c
MS
61902013-02-04 Jim MacArthur <jim.macarthur@arm.com>
6191 Marcus Shawcroft <marcus.shawcroft@arm.com>
6192 Nigel Stephens <nigel.stephens@arm.com>
6193 Yufeng Zhang <yufeng.zhang@arm.com>
6194
6195 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
6196 (aarch64.c, aarch64-without-fpu.c): New targets.
6197 * configure.srv (aarch64*-*-linux*): New.
6198 * linux-aarch64-low.c: New file.
6199
56f7af9c
MS
62002013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
6201
43aaf8b6 6202 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
6203 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
6204 (dequeue_one_deferred_signal, linux_resume_one_thread)
6205 (fetch_register, linux_write_memory, linux_enable_event_reporting)
6206 (linux_tracefork_grandchild, linux_test_for_tracefork)
6207 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
6208 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
6209 where the argument is 0.
6210
60f662b0
YQ
62112013-01-25 Yao Qi <yao@codesourcery.com>
6212
6213 * event-loop.c: Include "queue.h".
6214 (gdb_event_p): New typedef.
6215 (struct gdb_event) <next_event>: Remove.
6216 (event_queue): Change to QUEUE(gdb_event_p).
6217 (async_queue_event): Remove.
6218 (gdb_event_xfree): New.
6219 (initialize_event_loop): New.
6220 (process_event): Use API from QUEUE.
6221 (wait_for_event): Likewise.
6222 * server.c (main): Call initialize_event_loop.
6223 * server.h (initialize_event_loop): Declare.
6224
5ae4861a
YQ
62252013-01-18 Yao Qi <yao@codesourcery.com>
6226
6227 * ax.h (struct eval_agent_expr_context): New.
6228 (gdb_eval_agent_expr): Update declaration.
6229 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
6230 TFRAME. Add new argument CTX.
6231 * server.h (struct eval_agent_expr_context): Declare.
6232 (agent_mem_read, agent_tsv_read): Update declaration.
6233 (agent_mem_read_string): Likewise.
6234 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
6235 (add_traceframe_block): Add new argument TPOINT.
6236 Increase TPOINT->traceframe_usage.
6237 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
6238 eval_tracepoint_agent_expr.
6239 (condition_true_at_tracepoint): Likewise.
6240 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
6241 (agent_mem_read_string, agent_tsv_read): Likewise.
6242
85e00e85
YQ
62432013-01-16 Yao Qi <yao@codesourcery.com>
6244
6245 * linux-low.c (linux_resume_one_lwp): Don't check
6246 'lwp->bp_reinsert != 0'.
6247
4039cf45
JB
62482013-01-07 Joel Brobecker <brobecker@adacore.com>
6249 Pedro Alves <palves@redhat.com>
6250
6251 * lynx-low.c (ptrace_request_to_str): Define a temporary
6252 macro and use it to simplify this function's implementation.
6253
9044dee2
JB
62542013-01-07 Joel Brobecker <brobecker@adacore.com>
6255
6256 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
6257 sets errno.
6258
e6352c8f
JB
62592013-01-07 Joel Brobecker <brobecker@adacore.com>
6260
6261 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
6262
50681a27
JB
62632013-01-07 Joel Brobecker <brobecker@adacore.com>
6264
6265 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
6266
3f6e77ef
JB
62672013-01-07 Joel Brobecker <brobecker@adacore.com>
6268
6269 * lynx-low.c (lynx_resume): Use the resume_info parameter
6270 to determine the ptid for the lynx_ptrace call, unless
6271 it is equal to minus_one_ptid, in which case we use the
6272 ptid of the current_inferior.
6273 (lynx_wait_1): After having received a thread create/exit
6274 event, resume the inferior's execution using the signaling
6275 thread's ptid, rather than the old ptid.
6276
7fda33ae
JB
62772013-01-07 Joel Brobecker <brobecker@adacore.com>
6278
6279 * lynx-low.c (lynx_resume): Delete variable ret.
6280
b9786c74
JB
62812013-01-01 Joel Brobecker <brobecker@adacore.com>
6282
6283 * gdbreplay.c (gdbreplay_version): Update copyright year.
6284 * server.c (gdbserver_version): Likewise.
6285
8b93d60f
JB
62862012-12-17 Joel Brobecker <brobecker@adacore.com>
6287
6288 * lynx-low.c (lynx_wait_1): Add debug trace before adding
6289 new thread.
6290
037335a7
JB
62912012-12-17 Joel Brobecker <brobecker@adacore.com>
6292
6293 * lynx-low.c (ptrace_request_to_str): Add handling for
6294 PTRACE_GETTRACESIG.
6295
52d4cbd8
JB
62962012-12-17 Joel Brobecker <brobecker@adacore.com>
6297
6298 * lynx-low.c (lynx_attach): Delete variable new_process.
6299
ab8f6ca9
JB
63002012-12-17 Joel Brobecker <brobecker@adacore.com>
6301
6302 * lynx-low.c (lynx_create_inferior): Delete variable
6303 new_process.
6304
78cbc024
JB
63052012-12-17 Joel Brobecker <brobecker@adacore.com>
6306
6307 * lynx-low.c (ptrace_request_to_str): Do not handle
6308 PTRACE_GETTHREADLIST if this macro does not exist.
6309
14a00470
YQ
63102012-12-15 Yao Qi <yao@codesourcery.com>
6311
6312 * Makefile.in (OBS): Add notif.o.
6313 * notif.c, notif.h: New.
6314 * server.c: Include "notif.h".
6315 (struct vstop_notif) <next>: Remove.
6316 <base>: New field.
6317 (queue_stop_reply): Update.
6318 (push_event, send_next_stop_reply): Remove.
6319 (discard_queued_stop_replies): Update.
6320 (notif_stop): New variable.
6321 (handle_v_stopped): Remove.
6322 (handle_v_requests): Don't call handle_v_stopped. Call
6323 handle_ack_notif instead.
6324 (queue_stop_reply_callback): Call notif_event_enque instead
6325 of queue_stop_reply.
6326 (handle_status): Don't call send_next_stop_reply, call
6327 notif_write_event instead.
6328 (kill_inferior_callback): Likewise.
6329 (detach_or_kill_inferior_callback): Likewise.
6330 (main): Call initialize_notif.
6331 (process_serial_event): Call QUEUE_is_empty.
6332 (handle_target_event): Call notif_push instead of push event.
6333 * server.h (push_event): Remove declaration.
6334
61c125b9
TT
63352012-12-10 Tom Tromey <tromey@redhat.com>
6336
6337 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
6338 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
6339 macros.
6340 (.c.o): Rewrite.
6341 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
6342 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
6343 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
6344 (amd64-linux-ipa.o, ax.o): Rewrite.
6345 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
6346 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
6347 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
6348 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
6349 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
6350 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
6351 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
6352 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
6353 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
6354 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
6355 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
6356 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
6357 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
6358 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
6359 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
6360 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
6361 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
6362 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
6363 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
6364 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
6365 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
6366 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
6367 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
6368 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
6369 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
6370 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
6371 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
6372 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
6373 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
6374 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
6375 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
6376 (reg-tilegx.o): Remove.
6377 (all_object_files): New macro.
6378 Include .deps files.
6379 * aclocal.m4, configure: Rebuild.
6380 * acinclude.m4: Include depstand.m4, lead-dot.m4.
6381 * configure.ac: Invoke ZW_CREATE_DEPDIR,
6382 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
6383
e90e9ad9
TT
63842012-12-05 Tom Tromey <tromey@redhat.com>
6385
6386 PR gdb/14917:
6387 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
6388
02d403bf 63892012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
6390
6391 * configure.ac: Check for linux/perf_event.h.
6392 * config.in: Regenerated.
6393 * configure: Regenerated.
6394
0270a750
PA
63952012-11-26 Maxime Villard <rustyBSD@gmx.fr>
6396
6397 * hostio.c (handle_readlink): Decrease buffer size
6398 parameter passed to readlink by one byte.
6399
8c29b58e
YQ
64002012-11-26 Yao Qi <yao@codesourcery.com>
6401
6402 * configure.ac (build_warnings): Append '-Wempty-body'.
6403 * configure: Regenerated.
6404 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
6405 body.
6406
8bdce1ff
PM
64072012-11-15 Pierre Muller <muller@sourceware.org>
6408
6409 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
6410 * config.in: Regenerate.
6411 * configure: Regenerate.
6412 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
6413 Use "gdb_wait.h" header instead of <sys/wait.h> header.
6414 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6415 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
6416 header.
6417 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
6418 instead of <sys/wait.h> header.
6419 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6420
02d403bf 64212012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
6422
6423 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
6424 (various make rules): Remove -DGDBSERVER
6425
fbd5db48
YQ
64262012-11-09 Yao Qi <yao@codesourcery.com>
6427
6428 * spu-low.c (current_ptid): Move it to ..
6429 * gdbthread.h: ... here. New.
6430 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
6431 * server.c (myresume, process_serial_event): Likewise.
6432 * thread-db.c (thread_db_find_new_threads): Likewise.
6433 * tracepoint.c (run_inferior_command): Likewise.
6434
b3dc46ff
AB
64352012-10-01 Andrew Burgess <aburgess@broadcom.com>
6436
6437 * server.c (handle_search_memory_1): Include access length in
6438 warning message.
6439
07c04788
HPN
64402012-09-05 Michael Brandt <michael.brandt@axis.com>
6441
6442 * linux-crisv32-low.c: Fix compile errors.
6443
918d227b
YQ
64442012-09-04 Yao Qi <yao@codesourcery.com>
6445
6446 * tracepoint.c (cmd_qtsv): Adjust debug message.
6447 Don't check CUR_TPOINT.
6448
18c1b81a
YQ
64492012-08-28 Yao Qi <yao@codesourcery.com>
6450
6451 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
6452 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
6453 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
6454 Remove declarations of xmalloc, xreallloc, xstrdup and
6455 freeargv.
6456 * Makefile.in (libiberty_h): New.
6457 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
6458 (linux-bfin-low.o): Append dependency 'libiberty.h'.
6459
dc82f37b
YQ
64602012-08-23 Yao Qi <yao@codesourcery.com>
6461
6462 * server.h: Remove declaration of 'xsnprintf'.
6463
406b1477
KS
64642012-08-22 Keith Seitz <keiths@redhat.com>
6465
6466 * server.h: Include build-gnulib-gbserver/config.h.
6467 * gdbreplay.c: Likewise.
6468
e6712ff1
DE
64692012-08-08 Doug Evans <dje@google.com>
6470
6471 * Makefile.in (SFILES): Add gdb_vecs.c.
6472 (OBS): Add gdb_vecs.o.
6473 (gdb_vecs_h, host_defs_h): New variables.
6474 (thread-db.o): Add $(gdb_vecs_h) dependency.
6475 (gdb_vecs.o): New rule.
6476 * thread-db.c: #include "gdb_vecs.h".
6477 (thread_db_load_search): Use a vector to iterate over path elements.
6478 Handle text appearing after "$pdir".
6479
6480 * configure.ac: Add check for strstr.
6481 * config.in: Regenerate.
6482 * configure: Regenerate.
6483
7c3270ae
UW
64842012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
6485
6486 * hostio.c (handle_pread): If pread fails, fall back to attempting
6487 lseek/read.
6488 (handle_pwrite): Likewise for pwrite.
6489
b62e2b27
UW
64902012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
6491
6492 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
6493 between unsupported TYPE and unimplementable ADDR/LEN combination.
6494 (arm_insert_point): Act on new return value.
6495
78a99e91
PA
64962012-07-31 Pedro Alves <palves@redhat.com>
6497
6498 * server.c (process_point_options): Only skip tokens if we find
6499 one that is unrecognized. Don't treat 'X' specially while
6500 skipping unrecognized tokens.
6501
fcf303ab
UW
65022012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
6503
6504 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
6505 to 4-byte-align HW breakpoint addresses for Thumb.
6506
7255706c
YQ
65072012-07-27 Yao Qi <yao@codesourcery.com>
6508
6509 PR remote/14161.
6510
6511 * server.h: Declare gdb_agent_about_to_close.
6512 * target.c (kill_inferior): Include "agent.h".
6513 New. Send command 'kill'.
6514 * target.h (kill_inferior): Removed macro.
6515 * tracepoint.c (gdb_agent_about_to_close): New.
6516 (gdb_agent_helper_thread): Handle command 'close'.
6517 Wait endlessly until the inferior stops.
6518 Install gdb_agent_remove_socket to atexit hook.
6519 (agent_socket_name): New static variable.
6520 (gdb_agent_socket_init): Replace local variable 'name' with
6521 'agent_socket_name'.
6522 (gdb_agent_remove_socket): New.
6523
5a3f286f
YQ
65242012-07-27 Yao Qi <yao@codesourcery.com>
6525
6526 * server.c (process_point_options): Stop at 'X' when parsing.
6527
961bd387
ME
65282012-07-19 Michael Eager <eager@eagercon.com>
6529
a261b8f5 6530 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
6531 to hw_execute.
6532 * linux-x86-low.c (x86_insert_point, x86_remove_point):
6533 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
6534 hardware breakpoint.
6535
aa7c7447
JK
65362012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6537
6538 * gdbserver/linux-low.c (initialize_low): Call
6539 linux_ptrace_init_warnings.
6540
7f216e7c
DE
65412012-07-02 Doug Evans <dje@google.com>
6542
6543 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
6544 pointer to int.
6545
d3ce09f5
SS
65462012-07-02 Stan Shebs <stan@codesourcery.com>
6547
6548 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
6549 (ax.o): Add it to build rule.
6550 (ax-ipa.o): Ditto.
6551 (OBS): Add format.o.
6552 (IPA_OBS): Add format.o.
6553 * server.c (handle_query): Claim support for breakpoint commands.
6554 (process_point_options): Add command case.
6555 (process_serial_event): Leave running if there are printfs in
6556 effect.
6557 * mem-break.h (any_persistent_commands): Declare.
6558 (add_breakpoint_commands): Declare.
6559 (gdb_no_commands_at_breakpoint): Declare.
6560 (run_breakpoint_commands): Declare.
6561 * mem-break.c (struct point_command_list): New struct.
6562 (struct breakpoint): New field command_list.
6563 (any_persistent_commands): New function.
6564 (add_commands_to_breakpoint): New function.
6565 (add_breakpoint_commands): New function.
6566 (gdb_no_commands_at_breakpoint): New function.
6567 (run_breakpoint_commands): New function.
6568 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
6569 locally.
6570 * ax.c: Include format.h.
6571 (ax_printf): New function.
6572 (gdb_eval_agent_expr): Add printf opcode.
6573
2f8f6aed
YQ
65742012-06-13 Yao Qi <yao@codesourcery.com>
6575
6576 * server.c (start_inferior): Remove duplicated writes to fields
6577 'last_resume_kind' and 'last_status' of 'current_inferior'.
6578
0c9070b3
YQ
65792012-06-12 Yao Qi <yao@codesourcery.com>
6580 Pedro Alves <palves@redhat.com>
6581
6582 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
6583 comment.
6584 * server.c (handle_v_cont): Extend comment.
6585
c52daf70
YQ
65862012-06-11 Yao Qi <yao@codesourcery.com>
6587
6588 * linux-low.c (linux_attach): Add 'static'.
6589
d38bbb0a
YQ
65902012-06-06 Yao Qi <yao@codesourcery.com>
6591
6592 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
6593
89dc0afd
JK
65942012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
6595
6596 Fix gcc -flto compilation warning.
6597 * server.c (main): Make variable multi_mode and attach volatile.
6598
75f62ce7
TJB
65992012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6600
6601 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
6602 if the platform doesn't know about it.
6603
65f479b6
PA
66042012-05-30 Jeff Kenton <jkenton@tilera.com>
6605
6606 * Makefile.in (SFILES): Add linux-tile-low.c.
6607 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
6608 * configure.srv: Handle tilegx-*-linux*.
6609 * linux-tile-low.c: New file.
6610
0c5bf5a9
JK
66112012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6612
6613 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
6614
a493e3e2
PA
66152012-05-24 Pedro Alves <palves@redhat.com>
6616
6617 PR gdb/7205
6618
43aaf8b6 6619 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 6620
2ea28649
PA
66212012-05-24 Pedro Alves <palves@redhat.com>
6622
6623 PR gdb/7205
6624
6625 Replace target_signal with gdb_signal throughout.
6626
8d409d16
MR
66272012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
6628
6629 * linux-low.c (linux_store_registers): Avoid the copying sequence
6630 when no data has been retrieved by ptrace.
6631
23512c01
MGD
66322012-05-22 Will Deacon <will.deacon@arm.com>
6633
6634 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
6635 Include asm/ptrace.h.
6636 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
6637 already defined.
6638
4934b29e
MR
66392012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
6640
6641 * linux-low.c (linux_store_registers): Don't re-retrieve data
6642 with ptrace that has already been obtained from /proc. Always
6643 copy any data retrieved with ptrace to the buffer supplied.
6644
bde24c0a
PA
66452012-05-11 Yao Qi <yao@codesourcery.com>
6646 Pedro Alves <palves@redhat.com>
6647
6648 * linux-low.c (enum stopping_threads_kind): New.
6649 (stopping_threads): Change type to `enum stopping_threads_kind'.
6650 (handle_extended_wait): If stopping and suspending threads, leave
6651 the new_lwp suspended too.
6652 (linux_wait_for_event): Adjust.
6653 (stop_all_lwps): Set `stopping_threads' to
6654 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
6655 whether we're suspending threads or just stopping them. Assert no
6656 recursion happens.
6657
623b6bdf
YQ
66582012-04-29 Yao Qi <yao@codesourcery.com>
6659
6660 * server.h: Move some code to ...
6661 * gdbthread.h: ... here. New.
6662 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
6663 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
6664 (nto-low.o, win32-low.o): Likewise.
6665 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
6666 * regcache.c, remote-utils.c, server.c: Likewise.
6667 * target.c, tracepoint.c, win32-low.c: Likewise.
6668
f15f9948
TJB
66692012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6670
6671 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
6672 (PTRACE_ARG4_TYPE): Likewise.
6673 (PTRACE_XFER_TYPE): Likewise.
6674 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
6675 ptrace to PTRACE_ARG3_TYPE.
6676 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
6677 (PTRACE_ARG4_TYPE): Likewise.
6678 (PTRACE_XFER_TYPE): Likewise.
6679 (linux_detach_one_lwp): Cast fourth argument of
6680 ptrace to long then PTRACE_ARG4_TYPE.
6681 (regsets_fetch_inferior_registers): Cast third argument of
6682 ptrace to long then PTRACE_ARG3_TYPE.
6683 (regsets_store_inferior_registers): Likewise.
6684
38ea300a
PA
66852012-04-20 Pedro Alves <palves@redhat.com>
6686
6687 * configure: Regenerate.
6688
c971b7fa
PA
66892012-04-19 Pedro Alves <palves@redhat.com>
6690
43aaf8b6 6691 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 6692 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
6693 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
6694 (all, install-only, uninstall, clean-info, all-lib, clean): No
6695 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
6696 (maintainer-clean realclean distclean): Use subdir_do.
6697 (subdir_do): New.
6698 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 6699 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
6700 * acinclude.m4: Include acx_configure_dir.m4.
6701 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
6702 calls. Call AC_PROG_RANLIB. Configure gnulib using
6703 ACX_CONFIGURE_DIR.
6704 (GNULIB): New.
6705 (GNULIB_STDINT_H): Adjust.
6706 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
6707 * gdbreplay.c: Include build-gnulib/config.h.
6708 * server.h: Likewise.
6709 * aclocal.m4: Regenerate.
6710 * config.in: Regenerate.
6711 * configure: Regenerate.
c971b7fa 6712
809277f8
PA
67132012-04-19 Pedro Alves <palves@redhat.com>
6714
6715 * Makefile.in (LIBGNU, INCGNU): Adjust.
6716 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
6717 (all, install-only, uninstall, clean-info, all-lib, clean)
6718 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
6719 * configure.ac: Adjust AC_OUTPUT output.
6720 * aclocal.m4: Regenerate.
6721 * configure: Regenerate.
6722
fd9bb8b8
PA
67232012-04-19 Pedro Alves <palves@redhat.com>
6724
6725 * Makefile.in (generated_files): New.
6726 (server_h): Remove the explicit dependency on config.h, and depend
6727 on $generated_files.
6728
1c298c66
PA
67292012-04-19 Pedro Alves <palves@redhat.com>
6730
6731 * Makefile.in (INCGNU): Add -Ignulib.
6732
57c4b50b
PA
67332012-04-19 Pedro Alves <palves@redhat.com>
6734
6735 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
6736 (INCGNU): ... this, and spell out -I here.
6737 (GNULIB_LIB): Rename to ...
6738 (LIBGNU): ... this.
6739 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
6740
1030e047
PA
67412012-04-19 Pedro Alves <palves@redhat.com>
6742
6743 * config.in: Regenerate.
6744
447d4319
PA
67452012-04-19 Pedro Alves <palves@redhat.com>
6746
6747 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
6748 * server.h (memmem): Remove declaration.
6749 * config.in: Regenerate.
6750 * configure: Regenerate.
6751
aad9eab9
YQ
67522012-04-19 Yao Qi <yao@codesourcery.com>
6753
6754 * Makefile.in (SFILES): Add common/vec.c.
6755 (OBS): Add vec.o.
6756 (vec.o): New rule.
6757
3e10640f
YQ
67582012-04-19 Yao Qi <yao@codesourcery.com>
6759
6760 * remote-utils.c (prepare_resume_reply): Replace with macro
6761 target_core_of_thread.
6762 * server.c (handle_qxfer_threads_proper): Likewise.
6763 * target.h (traget_core_of_thread): New macro.
6764
71622373
PA
67652012-04-18 Pedro Alves <palves@redhat.com>
6766
6767 * aclocal.m4: Regenerate.
6768 * configure: Regenerate.
6769
80d26939
YQ
67702012-04-16 Yao Qi <yao@codesourcery.com>
6771
6772 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
6773 duplicated on address.
6774
42476b70
YQ
67752012-04-16 Yao Qi <yao@codesourcery.com>
6776
6777 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
6778 (struct tracepoint_action_ops) <send>: New field.
6779 (m_tracepoint_action_send, r_tracepoint_action_send): New.
6780 (agent_expr_send, x_tracepoint_action_send): New.
6781 (l_tracepoint_action_send): New.
6782 (cmd_qtdp): Download and install tracepoint
6783 according to `use_agent'.
6784 (run_inferior_command): Add one more parameter `len'.
6785 Update callers.
6786 (tracepoint_send_agent): New.
6787 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
6788
7bc83639
YQ
67892012-04-16 Yao Qi <yao@codesourcery.com>
6790
6791 * tracepoint.c (download_tracepoints): Moved to ...
6792 (cmd_qtstart): ... here.
6793
5f18041e
YQ
67942012-04-14 Yao Qi <yao@codesourcery.com>
6795
6796 * tracepoint.c: Include inttypes.h.
6797 (struct collect_memory_action): Use sized types.
6798 (struct tracepoint): Likewise.
6799 (cmd_qtdp, stop_tracing): Update print specifiers.
6800 (cmd_qtp, response_tracepoint): Likewise.
6801 (collect_data_at_tracepoint): Likewise.
6802 (collect_data_at_step): Likewise.
6803
55a8c076
YQ
68042012-04-14 Yao Qi <yao@codesourcery.com>
6805
6806 Import gnulib module inttypes.
6807 * aclocal.m4, config.in, configure: Regenerated.
6808
dc750257
YQ
68092012-04-14 Yao Qi <yao@codesourcery.com>
6810
6811 * Makefile.in (maintainer-clean, realclean, distclean): Remove
6812 Makefile and config.status at last.
6813
0ab5faf9
YQ
68142012-04-13 Yao Qi <yao@codesourcery.com>
6815
6816 * tracepoint.c: Include stdint.h unconditionally.
6817
18f5fd81
TJB
68182012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6819
6820 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
6821 on BFD_HAVE_SYS_PROCFS_TYPE.
6822 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
6823 * configure: Regenerate.
6824 * config.in: Likewise.
6825
4d47af5c
L
68262012-04-13 H.J. Lu <hongjiu.lu@intel.com>
6827
6828 * Makefile.in (clean): Also remove x32.c x32-linux.c
6829 x32-avx.c x32-avx-linux.c.
6830 (x32.o): New target.
6831 (x32.c): Likewise.
6832 (x32-linux.o): Likewise.
6833 (x32-linux.c): Likewise.
6834 (x32-avx.o): Likewise.
6835 (x32-avx.c): Likewise.
6836 (x32-avx-linux.o): Likewise.
6837 (x32-avx-linux.c): Likewise.
6838
6839 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
6840 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
6841 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
6842 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
6843 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
6844 i386/x32-avx-linux.xml.
6845
6846 * linux-x86-low.c (init_registers_x32_linux): New prototype.
6847 (init_registers_x32_avx_linux): Likwise.
6848 (x86_linux_update_xmltarget): Call init_registers_x32_linux
6849 or init_registers_x32_avx_linux if linux_is_elf64 is false.
6850
ecedbe58
PA
68512012-04-13 Pedro Alves <palves@redhat.com>
6852
6853 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
6854 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
6855 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
6856 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
6857 the sub-make.
6858
c92b5177
L
68592012-04-12 H.J. Lu <hongjiu.lu@intel.com>
6860
6861 * linux-x86-low.c (compat_x32_clock_t): New.
6862 (compat_x32_siginfo_t): Likewise.
6863 (compat_x32_siginfo_from_siginfo): Likewise.
6864 (siginfo_from_compat_x32_siginfo): Likewise.
6865 (linux_is_elf64): Likewise.
6866 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
6867 and siginfo_from_compat_x32_siginfo for x32.
6868 (x86_arch_setup): Set linux_is_elf64.
6869
214d508e
L
68702012-04-12 H.J. Lu <hongjiu.lu@intel.com>
6871
6872 PR gdb/13969
6873 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
6874 e_machine field.
6875 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
6876 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
6877 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
6878 compatible with process.
6879
c9a1864a
YQ
68802012-04-12 Yao Qi <yao@codesourcery.com>
6881
6882 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
6883 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
6884 (install-only, install-info, clean): Handle sub dir gnulib.
6885 (all-lib, am--refresh): New targets.
6886 (memmem.o): Remove target.
6887 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
6888 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
6889 (AC_REPLACE_FUNCS): Remove memmem.
6890 Invoke gl_INIT and AM_INIT_AUTOMAKE.
6891 (AC_OUTPUT): Generate Makefile in gnulib/.
6892 * aclocal.m4, config.in, configure: Regenerated.
6893
367ba2c2
MR
68942012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
6895
6896 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
6897
9d236627
PA
68982012-04-05 Pedro Alves <palves@redhat.com>
6899
6900 -Werror=strict-aliasing
6901
6902 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
6903 pointer.
6904
111217b3
PA
69052012-04-04 Pedro Alves <palves@redhat.com>
6906
6907 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6908 (sparc_store_gregset_from_stack, sparc_store_gregset)
6909 (sparc_breakpoint_at): Fix formatting.
6910
8365dcf5
TJB
69112012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6912
6913 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
6914 are available.
6915 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
6916 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
6917 * config.in: Regenerate.
6918 * configure: Likewise.
6919
689cc2ae
PA
69202012-03-29 Pedro Alves <palves@redhat.com>
6921
6922 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
6923 Correct ptrace arguments.
6924
c14dfd32
PA
69252012-03-28 Pedro Alves <palves@redhat.com>
6926
6927 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
6928 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
6929 (IA64_FR1_REGNUM): New defines.
6930 (ia64_fetch_register): New.
6931 (the_low_target): Install it.
6932 * linux-low.h (struct linux_target_ops) <fetch_register>: New
6933 field.
6934 * linux-low.c (linux_fetch_registers): Try the
6935 the_low_target.fetch_register hook first.
6936
6937 * linux-arm-low.c (the_low_target): Adjust.
6938 * linux-bfin-low.c (the_low_target): Adjust.
6939 * linux-cris-low.c (the_low_target): Adjust.
6940 * linux-crisv32-low.c (the_low_target): Adjust.
6941 * linux-m32r-low.c (the_low_target): Adjust.
6942 * linux-m68k-low.c (the_low_target): Adjust.
6943 * linux-mips-low.c (the_low_target): Adjust.
6944 * linux-ppc-low.c (the_low_target): Adjust.
6945 * linux-s390-low.c (the_low_target): Adjust.
6946 * linux-sh-low.c (the_low_target): Adjust.
6947 * linux-sparc-low.c (the_low_target): Adjust.
6948 * linux-tic6x-low.c (the_low_target): Adjust.
6949 * linux-x86-low.c (the_low_target): Adjust.
6950 * linux-xtensa-low.c (the_low_target): Adjust.
6951
63c88e13
PA
69522012-03-26 Pedro Alves <palves@redhat.com>
6953
6954 * server.c (handle_qxfer_libraries): Don't bail early if
6955 the_target->qxfer_libraries_svr4 is not NULL.
6956
fb723180
PA
69572012-03-26 Pedro Alves <palves@redhat.com>
6958
6959 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
6960
0afae3cf
PA
69612012-03-23 Pedro Alves <palves@redhat.com>
6962
6963 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
6964 "library-list-svr4" element's start tag when the the DSO list is
6965 empty.
6966
485f1ee4
PA
69672012-03-23 Pedro Alves <palves@redhat.com>
6968
6969 * linux-low.c (read_one_ptr): Read the inferior's pointer through
6970 a variable whose type size is the same as the inferior's pointer
6971 size.
6972
a5362b9a
TS
69732012-03-21 Thomas Schwinge <thomas@codesourcery.com>
6974
6975 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
6976 struct siginfo.
6977 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
6978 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
6979 * linux-low.h: Include <signal.h>.
6980 (struct siginfo): Remove forward declaration.
6981 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
6982 struct siginfo.
6983
d226c142
MF
69842012-03-21 Mike Frysinger <vapier@gentoo.org>
6985
6986 * .gitignore: Ignore more files.
6987
122f36ef
PA
69882012-03-19 Pedro Alves <palves@redhat.com>
6989 Jan Kratochvil <jan.kratochvil@redhat.com>
6990
6991 * server.c (cont_thread, general_thread): Add describing comments.
6992 (start_inferior): Clear `cont_thread'.
6993 (handle_v_cont): Don't set `cont_thread' if resuming all threads
6994 of a process.
6995
fc3e5175
YQ
69962012-03-15 Yao Qi <yao@codesourcery.com>
6997
6998 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
6999 handling to ...
7000 (cmd_qtdp): ... here.
7001
8d0d92cd
YQ
70022012-03-15 Yao Qi <yao@codesourcery.com>
7003
7004 * tracepoint.c (struct tracepoint_action_ops): New.
7005 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
7006 (m_tracepoint_action_download): New.
7007 (r_tracepoint_action_download): New.
7008 (x_tracepoint_action_download): New.
7009 (l_tracepoint_action_download): New.
7010 (add_tracepoint_action): Install `action->ops' according type.
7011 (download_tracepoint_1): Move code `download' function pointer
7012 of various tracepoint_action_ops.
7013
87b0bb13
JK
70142012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7015
7016 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
7017 linux_ptrace_attach_warnings.
7018
5f572dec
JK
70192012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7020
7021 * Makefile.in (linux-ptrace.o): New.
7022 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
7023 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
7024 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
7025 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
7026 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
7027 of these targets.
7028 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
7029
f4647387
YQ
70302012-03-08 Yao Qi <yao@codesourcery.com>
7031 Pedro Alves <palves@redhat.com>
7032
7033 Fix PR server/13392.
7034 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
7035 offset of JMP insn.
7036 * tracepoint.c (remove_tracepoint): New.
7037 (cmd_qtdp): Call remove_tracepoint when failed to install.
7038
9b224c5e
PA
70392012-03-07 Pedro Alves <palves@redhat.com>
7040
7041 * linux-low.c (get_detach_signal): New.
7042 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
7043 Pass on pending signals to PTRACE_DETACH. Check the result of the
7044 ptrace call.
7045 * server.c (program_signals, program_signals_p): New.
7046 (handle_general_set): Handle QProgramSignals.
7047 * server.h (program_signals, program_signals_p): Declare.
7048
e237a7e2
JK
70492012-03-05 Pedro Alves <palves@redhat.com>
7050 Jan Kratochvil <jan.kratochvil@redhat.com>
7051
7052 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
7053 New comment why.
7054
5808517f
YQ
70552012-03-03 Yao Qi <yao@codesourcery.com>
7056
7057 * tracepoint.c (tracepoint_look_up_symbols): Update call to
7058 agent_look_up_symbols.
7059
58b4daa5
YQ
70602012-03-03 Yao Qi <yao@codesourcery.com>
7061
7062 * Makefile.in (linux-low.o): Keep dependence on agent.h.
7063 (linux-x86-low.o): Likewise.
7064 * server.h: Remove in_process_agent_loaded.
7065 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
7066 common/agent.c.
7067 Update callers.
7068
8ffcbaaf
YQ
70692012-03-03 Yao Qi <yao@codesourcery.com>
7070
7071 * tracepoint.c (gdb_agent_capability): New global.
7072 (in_process_agent_loaded_ust): Renamed to
7073 `in_process_agent_supports_ust'.
7074 Update callers.
7075 (in_process_agent_supports_ust): Call agent_capability_check.
7076 (clear_installed_tracepoints): Assert that agent supports
7077 agent.
7078
d1feda86
YQ
70792012-03-03 Yao Qi <yao@codesourcery.com>
7080
7081 * linux-low.c (linux_supports_agent): New.
7082 (linux_target_ops): Initialize field `supports_agent' with
7083 linux_supports_agent.
7084 * target.h (struct target_ops) <supports_agent>: New.
7085 (target_supports_agent): New macro.
7086 * server.c (handle_general_set): Handle packet 'QAgent'.
7087 (handle_query): Send `QAgent+'.
7088 * Makefile.in (server.o): Depends on agent.h.
7089
2fa291ac
YQ
70902012-03-03 Yao Qi <yao@codesourcery.com>
7091
7092 * Makefile.in (OBS): Add agent.o.
7093 Add new rule for agent.o.
7094 Track dependence of tracepoint.c on agent.h.
7095 * tracepoint.c (run_inferior_command_1):
7096 (run_inferior_command): Call agent_run_command.
7097 (gdb_ust_connect_sync_socket): Deleted. Move it to
7098 common/agent.c.
7099 (resume_thread, stop_thread): Likewise.
7100 (gdb_ust_socket_init): Renamed to ...
7101 (gdb_agent_socket_init): ... New.
7102 (gdb_ust_thread): Renamed to ...
7103 (gdb_agent_helper_thread): ... New.
7104 (gdb_ust_init): Move some code to ...
7105 (gdb_agent_init): ... here. New.
7106 [HAVE_UST]: Call gdb_ust_init.
7107 (initialize_tracepoint_ftlib): Call gdb_agent_init.
7108 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
7109 * config.in, configure: Regenerated.
7110
05044653
PA
71112012-03-02 Pedro Alves <palves@redhat.com>
7112
7113 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
7114 * linux-low.c (struct simple_pid_list): New.
7115 (stopped_pids): New a struct simple_pid_list pointer.
7116 (add_to_pid_list, pull_pid_from_list): New.
7117 (handle_extended_wait): Don't assume the first signal new children
7118 report is SIGSTOP. Adjust call to pull_pid_from_list.
7119 (linux_wait_for_lwp): Adjust.
7120
8d00225b
YQ
71212012-03-02 Yao Qi <yao@codesourcery.com>
7122
7123 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
7124 debug log.
7125
19560ba5
YQ
71262012-03-02 Yao Qi <yao@codesourcery.com>
7127
7128 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
7129 `stop_pc' and `tpoint'. Update caller.
7130
1faeff08
MR
71312012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
7132
7133 * linux-low.h (linux_target_ops): Add regset_bitmap member.
7134 * linux-low.c (use_linux_regsets): New macro.
7135 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
7136 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
7137 (linux_register_in_regsets): New function.
7138 (usr_fetch_inferior_registers): Skip registers covered by
7139 regsets.
7140 (usr_store_inferior_registers): Likewise.
7141 (usr_fetch_inferior_registers): New macro.
7142 (usr_store_inferior_registers): Likewise.
7143 (linux_fetch_registers): Handle mixed regset/non-regset targets.
7144 (linux_store_registers): Likewise.
7145 * linux-mips-low.c (init_registers_mips_dsp_linux): New
7146 prototype.
7147 (init_registers_mips64_dsp_linux): Likewise.
7148 (init_registers_mips_linux): New macro.
7149 (init_registers_mips_dsp_linux): Likewise.
7150 (mips_dsp_num_regs): Likewise.
7151 (DSP_BASE, DSP_CONTROL): New fallback macros.
7152 (mips_base_regs): New macro.
7153 (mips_regmap): Use it. Fix the size.
7154 (mips_dsp_regmap): New variable.
7155 (mips_dsp_regset_bitmap): Likewise.
7156 (mips_arch_setup): New function.
7157 (mips_cannot_fetch_register): Use the_low_target.regmap rather
7158 than mips_regmap.
7159 (mips_cannot_store_register): Likewise.
7160 (the_low_target): Update .arch_setup, .num_regs and .regmap
7161 initializers. Add .regset_bitmap initializer.
7162 * linux-arm-low.c (the_low_target): Add .regset_bitmap
7163 initializer.
7164 * linux-bfin-low.c (the_low_target): Likewise.
7165 * linux-cris-low.c (the_low_target): Likewise.
7166 * linux-crisv32-low.c (the_low_target): Likewise.
7167 * linux-ia64-low.c (the_low_target): Likewise.
7168 * linux-m32r-low.c (the_low_target): Likewise.
7169 * linux-m68k-low.c (the_low_target): Likewise.
7170 * linux-ppc-low.c (the_low_target): Likewise.
7171 * linux-s390-low.c (the_low_target): Likewise.
7172 * linux-sh-low.c (the_low_target): Likewise.
7173 * linux-sparc-low.c (the_low_target): Likewise.
7174 * linux-tic6x-low.c (the_low_target): Likewise.
7175 * linux-x86-low.c (the_low_target): Likewise.
7176 * linux-xtensa-low.c (the_low_target): Likewise.
7177 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
7178 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
7179 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
7180 srv_xmlfiles.
7181 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
7182 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
7183
c03e6ccc
YQ
71842012-02-29 Yao Qi <yao@codesourcery.com>
7185 Pedro Alves <palves@redhat.com>
7186
7187 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
7188 `step_over_finished' is true.
7189
644cebc9
PA
71902012-02-27 Pedro Alves <palves@redhat.com>
7191
7192 * linux-low.c (pid_is_stopped): Delete, moved to common/.
7193 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
7194
c14d7ab2
PA
71952012-02-27 Pedro Alves <palves@redhat.com>
7196
7197 PR server/9684
7198 * linux-low.c (pid_is_stopped): New.
7199 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
7200
412c89dd
LM
72012012-02-25 Luis Machado <lgustavo@codesourcery.com>
7202
7203 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
7204 of conditions.
7205
b745defe
MR
72062012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
7207
7208 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
7209
9f3a5c85
LM
72102012-02-24 Luis Machado <lgustavo@codesourcery>
7211
7212 * server.c (handle_query): Advertise support for target-side
7213 breakpoint condition evaluation.
7214 (process_point_options): New function.
7215 (process_serial_event): When inserting a breakpoint, check for
7216 a target-side condition that should be evaluated.
7217
7218 * mem-break.c: Include regcache.h and ax.h.
7219 (point_cond_list_t): New data structure.
7220 (breakpoint) <cond_list>: New field.
7221 (find_gdb_breakpoint_at): Make non-static.
7222 (delete_gdb_breakpoint_at): Clear any target-side
7223 conditions.
7224 (clear_gdb_breakpoint_conditions): New function.
7225 (add_condition_to_breakpoint): Likewise.
7226 (add_breakpoint_condition): Likewise.
7227 (gdb_condition_true_at_breakpoint): Likewise.
7228 (gdb_breakpoint_here): Return result directly instead
7229 of going through a local variable.
7230
7231 * mem-break.h (find_gdb_breakpoint_at): New prototype.
7232 (clear_gdb_breakpoint_conditions): Likewise.
7233 (add_breakpoint_condition): Likewise.
7234 (gdb_condition_true_at_breakpoint): Likewise.
7235
7236 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
7237 (need_step_over_p): Take target-side breakpoint condition into
7238 consideration.
7239
5e1dc496
LM
72402012-02-24 Luis Machado <lgustavo@codesourcery>
7241
7242 * server.h: Include tracepoint.h.
7243 (agent_mem_read, agent_get_trace_state_variable_value,
7244 agent_set_trace_state_variable_value,
7245 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
7246 get_set_tsv_func_addr): New prototypes.
7247
7248 * ax.h: New include file.
7249 * ax.c: New source file.
7250
7251 * tracepoint.c: Include ax.h.
7252 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
7253 agent_expr, eval_result_type): Move to ax.h.
7254 (parse_agent_expr): Rename to ...
7255 (gdb_parse_agent_expr): ... this, make it non-static and move
7256 to ax.h.
7257 (unparse_agent_expr) Rename to ...
7258 (gdb_unparse_agent_expr): ... this, make it non-static and move
7259 to ax.h.
7260 (eval_agent_expr): Rename to ...
7261 (eval_tracepoint_agent_expr): ... this.
7262 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
7263 forward declarations.
7264 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
7265 (agent_get_trace_state_variable_value): New function.
7266 (agent_set_trace_state_variable_value): New function.
7267 (cmd_qtdp): Call gdb_parse_agent_expr (...).
7268 (response_tracepoint): Call gdb_unparse_agent_expr (...).
7269 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
7270 (condition_true_at_tracepoint): Likewise.
7271 (parse_agent_expr): Rename to ...
7272 (gdb_parse_agent_expr): ... this and move to ax.c.
7273 (unparse_agent_expr): Rename to ...
7274 (gdb_unparse_agent_expr): ... this and move to ax.c.
7275 (gdb_agent_op_name): Move to ax.c.
7276 (eval_agent_expr): Rename to ...
7277 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
7278 and move to ax.c.
7279 (eval_tracepoint_agent_expr): New function.
7280 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 7281 non-static.
5e1dc496
LM
7282 (current_insn_ptr, emit_error, struct bytecode_address): Move to
7283 ax.c.
7284 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
7285 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
7286 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
7287 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
7288 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
7289 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
7290 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
7291 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
7292 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
7293 (compile_bytecodes): Remove forward declaration.
7294 (is_goto_target): Move to ax.c.
7295 (compile_bytecodes): Move to ax.c and call
7296 agent_get_trace_state_variable_value (...) and
7297 agent_set_trace_state_variable_value (...).
7298
7299 * Makefile.in: Update ax.c and IPA dependencies.
7300
277e4e52
PA
73012012-02-24 Pedro Alves <palves@redhat.com>
7302
7303 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
7304 (cmd_bigqtbuffer_circular): ... this. Only handle
7305 'QTBuffer:circular:'.
7306 (handle_tracepoint_general_set): Adjust.
7307
bf4c19f7
YQ
73082012-02-16 Yao Qi <yao@codesourcery.com>
7309
7310 * inferiors.c: Move code to ...
7311 * dll.c: .... here. New.
7312 * server.h: Declare clear_dlls.
7313 * Makefile.in (SFILES): Add dll.c.
7314 (OBS): Add dll.o
7315 (dll.o): New rule.
7316
d73f2619
YQ
73172012-02-11 Yao Qi <yao@codesourcery.com>
7318
7319 * server.c: (handle_monitor_command): Add a new parameter
7320 `own_buf'.
7321 (handle_query): Update caller.
7322
f8255c2a
JB
73232012-02-09 Joel Brobecker <brobecker@adacore.com>
7324
7325 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
7326 * configure, config.in: Regenerate.
7327 * hostio.c: Provide an alternate implementation if HAVE_READLINK
7328 is not defined.
7329
da84f473
PA
73302012-02-02 Pedro Alves <palves@redhat.com>
7331
7332 Try SIGKILL first, then PTRACE_KILL.
7333 * linux-low.c (linux_kill_one_lwp): New.
7334 (linux_kill_one_lwp): Rename to ...
7335 (kill_one_lwp_callback): ... this. Use the new
7336 linux_kill_one_lwp.
7337
e886a173
PA
73382012-02-02 Pedro Alves <palves@redhat.com>
7339
7340 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
7341 inferior.
7342
be07f1a2
PA
73432012-01-27 Pedro Alves <palves@redhat.com>
7344
7345 * linux-low.c (linux_child_pid_to_exec_file): Delete.
7346 (elf_64_file_p): Make static.
7347 (linux_pid_exe_is_elf_64_file): New.
7348 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
7349 Delete declarations.
7350 (linux_pid_exe_is_elf_64_file): Declare.
7351 * linux-x86-low.c (x86_arch_setup): Use
7352 linux_pid_exe_is_elf_64_file.
7353
d8301ad1
JK
73542012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7355
7356 * linux-low.c (linux_wait_for_event_1): Rename to ...
7357 (linux_wait_for_event): ... here and merge it with former
7358 linux_wait_for_event - new variable wait_ptid, use it.
7359 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
7360
01b17894
PA
73612012-01-23 Pedro Alves <palves@redhat.com>
7362
7363 * server.c (main): Avoid yet another case of infinite loop while
7364 detaching/killing after a longjmp.
7365
e825046f
JK
73662012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
7367
7368 Code cleanup.
7369 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
7370
b9e7b9c3
UW
73712012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
7372
7373 * hostio.c (handle_readlink): New function.
7374 (handle_vFile): Call it to handle "vFile:readlink" packets.
7375
901f9912
UW
73762012-01-20 Pedro Alves <palves@redhat.com>
7377 Ulrich Weigand <ulrich.weigand@linaro.org>
7378
7379 * server.c (handle_v_requests): Only support vAttach and vRun to
7380 start multiple processes when in extended protocol mode.
7381
fc1ab1a0
PA
73822012-01-17 Pedro Alves <palves@redhat.com>
7383
7384 * tracepoint.c (initialize_tracepoint): Use mmap instead of
7385 memalign plus mprotect to allocate the scratch buffer.
7386
7d5d4e98
PA
73872012-01-13 Pedro Alves <palves@redhat.com>
7388
7389 * server.c (attach_inferior): Clear `cont_thread'.
7390
f128d5e9
PA
73912012-01-13 Pedro Alves <palves@redhat.com>
7392
7393 * server.c (main): Avoid infinite loop while detaching/killing
7394 after a longjmp.
7395
06db92f0
DE
73962012-01-09 Doug Evans <dje@google.com>
7397
7398 * server.c (start_inferior): Set last_ptid in --wrapper case.
7399
32d92999
YQ
74002012-01-06 Yao Qi <yao@codesourcery.com>
7401
7402 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
7403 defined.
7404 [IN_PROCESS_AGENT] (debug_agent): New global variable.
7405
5e0a92a9
YQ
74062012-01-04 Yao Qi <yao@codesourcery.com>
7407
7408 * tracepoint.c (cmd_qtdp): Print debug message
7409 for static tracepoint.
7410
ae639e8c
YQ
74112012-01-04 Yao Qi <yao@codesourcery.com>
7412
7413 * tracepoint.c (trace_vdebug): Differentiate debug message
7414 between gdbserver and IPA.
7415
f72429c5
YQ
74162012-01-03 Yao Qi <yao@codesourcery.com>
7417
7418 * tracepoint.c (tracepoint_was_hit): Don't collect for
7419 static tracepoint.
7420
12c3e59c
JB
74212012-01-02 Joel Brobecker <brobecker@adacore.com>
7422
7423 * terminal.h: Reformat copyright header.
7424
67827812
JB
74252012-01-02 Joel Brobecker <brobecker@adacore.com>
7426
7427 * server.c (gdbserver_version): Update copyright year.
7428 * gdbreplay.c (gdbreplay_version): Likewise.
7429
3e52c33d
JK
74302011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
7431
7432 * linux-low.c (linux_create_inferior): Put empty if clause for write.
7433
7434 Revert:
7435 2011-12-18 Hui Zhu <teawater@gmail.com>
7436 * linux-low.c (linux_create_inferior): Save return value to ret.
7437
66f1260e
HZ
74382011-12-18 Hui Zhu <teawater@gmail.com>
7439
7440 * linux-low.c (linux_create_inferior): Save return value to ret.
7441
e77616d7
DE
74422011-12-16 Doug Evans <dje@google.com>
7443
e7b06c57
DE
7444 * linux-low.c (linux_create_inferior): If stdio connection,
7445 redirect stdin from /dev/null, stdout to stderr.
7446 * remote-utils.c (remote_is_stdio): New static global.
7447 (remote_connection_is_stdio): New function.
7448 (remote_prepare): Handle stdio connection.
7449 (remote_open): Ditto.
7450 (remote_close): Don't close stdin for stdio connections.
7451 (read_prim,write_prim): New functions. Replace all calls to
7452 read/write to these.
7453 * server.c (main): Watch for "-" argument. Move call to
7454 remote_prepare before start_inferior.
7455 * server.h (STDIO_CONNECTION_NAME): New macro.
7456 (remote_connection_is_stdio): Declare.
7457
e77616d7
DE
7458 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
7459 in debugging output.
7460
82067193
YQ
74612011-12-15 Yao Qi <yao@codesourcery.com>
7462
7463 * tracepoint.c: Include sys/syscall.h.
7464 (gdb_ust_thread): Remove preprocessor conditional.
7465
82bfbe7e
PA
74662011-12-14 Pedro Alves <pedro@codesourcery.com>
7467
7468 * linux-low.c (linux_detach_one_lwp): Call
7469 the_low_target.prepare_to_resume before detaching.
7470
712c6575
YQ
74712011-12-14 Yao Qi <yao@codesourcery.com>
7472
7473 * tracepoint.c (gdb_ust_thread): Don't ignore return value
7474 of write.
7475
d54d1edf
YQ
74762011-12-14 Yao Qi <yao@codesourcery.com>
7477
7478 * i386-low.c (i386_low_stopped_data_address): Initialize local
7479 variable `control'.
7480
6210a125
PA
74812011-12-13 Pedro Alves <pedro@codesourcery.com>
7482
7483 PR remote/13492
7484
7485 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
7486 DR_CONTROL unless necessary. Extend comments.
7487 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
7488 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
7489
2ece8244
YQ
74902011-12-13 Yao Qi <yao@codesourcery.com>
7491
7492 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
7493 macros.
7494 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
7495
784867a5
JK
74962011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
7497
7498 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
7499 Print new debug message for such case.
7500
6bf36717
JK
75012011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7502
7503 Fix overlapping memcpy.
7504 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
7505 the read_inferior_memory transfer.
7506 (delete_fast_tracepoint_jump): New variable buf. Use it for the
7507 write_inferior_memory transfer.
7508 (set_fast_tracepoint_jump): New variable buf. Use it for the
7509 read_inferior_memory and write_inferior_memory transfers.
7510 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
7511 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
7512 Use it for the write_inferior_memory transfer.
7513 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
7514 buffers.
7515
50275556
MR
75162011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7517
7518 * linux-low.c (fetch_register, store_register): Make code
7519 consistent, fix formatting.
7520
7325beb4
MR
75212011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7522
7523 * linux-low.c (usr_store_inferior_registers): Factor out code
7524 to handle individual registers into...
7525 (store_register): ... this new function.
7526
c642a434
UW
75272011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
7528
7529 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
7530 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
7531 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
7532 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
7533 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
7534 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
7535 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
7536 (srv_xmlfiles): Add new XML files.
7537
7538 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
7539 and <sys/uio.h>.
7540 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
7541 (init_registers_s390_linux32v1): Add prototype.
7542 (init_registers_s390_linux32v2): Likewise.
7543 (init_registers_s390_linux64v1): Likewise.
7544 (init_registers_s390_linux64v2): Likewise.
7545 (init_registers_s390x_linux64v1): Likewise.
7546 (init_registers_s390x_linux64v2): Likewise.
7547 (s390_num_regs): Increment to 52.
7548 (s390_regmap): Add orig_r2 register.
7549 (s390_num_regs_3264): Increment to 68.
7550 (s390_regmap_3264): Add orig_r2 register.
7551 (s390_collect_ptrace_register): Handle orig_r2 register.
7552 (s390_supply_ptrace_register): Likewise.
7553 (s390_fill_last_break): New function.
7554 (s390_store_last_break): Likewise.
7555 (s390_fill_system_call): New function.
7556 (s390_store_system_call): Likewise.
7557 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
7558 register sets.
7559 (s390_check_regset): New function.
7560 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
7561 NT_S390_SYSTEM_CALL regsets and use appropriate description.
7562 Update target_regsets for available register sets.
7563
2268b414
JK
75642011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
7565 Jan Kratochvil <jan.kratochvil@redhat.com>
7566
7567 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
7568 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
7569 New.
7570 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
7571 * linux-low.h (struct process_info_private): New member r_debug.
7572 * server.c (handle_qxfer_libraries): Call
7573 the_target->qxfer_libraries_svr4.
7574 (handle_qxfer_libraries_svr4): New function.
7575 (qxfer_packets): New entry "libraries-svr4".
7576 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
7577 * target.h (struct target_ops): New member qxfer_libraries_svr4.
7578 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
7579 PACKET_qXfer_libraries_svr4.
7580
d6db1fab
UW
75812011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
7582
7583 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
7584 PSW address/mask between 8-byte and 16-byte formats.
7585 (s390_supply_ptrace_register): Likewise.
7586 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
7587 basic addressing mode bit.
7588
242f5f1c
SS
75892011-11-24 Stan Shebs <stan@codesourcery.com>
7590
7591 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
7592
f196051f
SS
75932011-11-17 Stan Shebs <stan@codesourcery.com>
7594
7595 * tracepoint.c (struct tracepoint): New field traceframe_usage.
7596 (tracing_start_time): New global.
7597 (tracing_stop_time): New global.
7598 (tracing_user_name): New global.
7599 (tracing_notes): New global.
7600 (tracing_stop_note): New global.
7601 (cmd_qtstart): Set traceframe_usage, start_time.
7602 (stop_tracing): Set stop_time.
7603 (cmd_qtstatus): Report additional status.
7604 (cmd_qtp): New function.
7605 (handle_tracepoint_query): Call it.
7606 (cmd_qtnotes): New function.
7607 (handle_tracepoint_general_set): Call it.
7608 (get_timestamp): Rename from tsv_get_timestamp.
7609
405f8e94
SS
76102011-11-14 Stan Shebs <stan@codesourcery.com>
7611 Kwok Cheung Yeung <kcy@codesourcery.com>
7612
7613 * linux-x86-low.c (small_jump_insn): New.
7614 (i386_install_fast_tracepoint_jump_pad): Add arguments for
7615 trampoline and error message, build a trampoline and issue a small
7616 jump instruction to it.
7617 (x86_install_fast_tracepoint_jump_pad): Add arguments for
7618 trampoline and error message.
7619 (x86_get_min_fast_tracepoint_insn_len): New.
7620 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
7621 * linux-low.h (struct linux_target_ops): Add arguments to
7622 install_fast_tracepoint_jump_pad operation, add new operation.
7623 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
7624 arguments.
7625 (linux_get_min_fast_tracepoint_insn_len): New function.
7626 (linux_target_op): Add new operation.
7627 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
7628 (gdb_trampoline_buffer_end): Ditto.
7629 (gdb_trampoline_buffer_error): Ditto.
7630 (struct ipa_sym_addresses): Add fields for new IPA variables.
7631 (symbol_list): Add entries for new IPA variables.
7632 (struct tracepoint): Add fields to hold the address range of the
7633 trampoline used by the tracepoint.
7634 (trampoline_buffer_head): New static variable.
7635 (trampoline_buffer_tail): Ditto.
7636 (claim_trampoline_space): New function.
7637 (have_fast_tracepoint_trampoline_buffer): New function.
7638 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
7639 structure.
7640 (install_fast_tracepoint): Ditto, also add error buffer argument.
7641 (cmd_qtminftpilen): New function.
7642 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
7643 (fast_tracepoint_from_trampoline_address): New function.
7644 (fast_tracepoint_collecting): Handle trampoline as part of jump
7645 pad space.
7646 (set_trampoline_buffer_space): New function.
7647 (initialize_tracepoint): Initialize new IPA variables.
7648 * target.h (struct target_ops): Add arguments to
7649 install_fast_tracepoint_jump_pad operation, add new
7650 get_min_fast_tracepoint_insn_len operation.
7651 (target_get_min_fast_tracepoint_insn_len): New.
7652 (install_fast_tracepoint_jump_pad): Add arguments.
7653 * server.h (IPA_BUFSIZ): Define.
7654 * linux-i386-ipa.c: Include extra header files.
7655 (initialize_fast_tracepoint_trampoline_buffer): New function.
7656 (initialize_low_tracepoint): Call it.
7657 * server.h (set_trampoline_buffer_space): Declare.
7658 (claim_trampoline_space): Ditto.
7659 (have_fast_tracepoint_trampoline_buffer): Ditto.
7660
1e4d1764
YQ
76612011-11-14 Yao Qi <yao@codesourcery.com>
7662
7663 * server.c (handle_query): Handle InstallInTrace for qSupported.
7664 * tracepoint.c (add_tracepoint): Sort list.
7665 (install_tracepoint, download_tracepoint): New.
7666 (cmd_qtdp): Call them to install and download tracepoints.
7667 (sort_tracepoints): Removed.
7668 (cmd_qtstart): Update.
7669
5c73ff4e
YQ
76702011-11-14 Yao Qi <yao@codesourcery.com>
7671
7672 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
7673 * mem-break.h: Declare.
7674 * tracepoint.c (cmd_qtstart): Move some code to ...
7675 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
7676 New.
7677 (download_tracepoints): Move some code to ...
7678 (download_tracepoint_1): ... here. New.
7679
86a30030
YQ
76802011-11-08 Yao Qi <yao@codesourcery.com>
7681
7682 * remote-utils.c (relocate_instruction): A comment fix.
7683
8d26e50c
JB
76842011-11-07 Joel Brobecker <brobecker@adacore.com>
7685
7686 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
7687 (i386_dr_low_get_control, i386_dr_low_get_status): Use
7688 dr_status_mirror and dr_control_mirror from debug_reg_state.
7689 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
7690 (i386_initial_stuff): Remove use of deleted globals.
7691 (i386_get_thread_context, i386_set_thread_context,
7692 i386_thread_added): Use dr_status_mirror and dr_control_mirror
7693 from debug_reg_state.
7694
a59306a3
YQ
76952011-11-05 Yao Qi <yao@codesourcery.com>
7696
7697 * tracepoint.c (gdb_collect): Loop over tracepoints of same
7698 address as TPOINT's.
7699
3065dfb6
SS
77002011-11-02 Stan Shebs <stan@codesourcery.com>
7701
7702 * tracepoint.c (agent_mem_read_string): New function.
7703 (eval_agent_expr): Call it for tracenz.
7704 * server.c (handle_query): Report support for tracenz.
7705
fd0d8c7c
YQ
77062011-11-02 Yao Qi <yao@codesourcery.com>
7707
7708 * tracepoint.c (cmd_qtstart): Remove unused local variables.
7709
609086b1
YQ
77102011-11-02 Yao Qi <yao@codesourcery.com>
7711
7712 * target.h: Fix a typo in comment.
7713
b9fd1791
PA
77142011-10-31 Pedro Alves <pedro@codesourcery.com>
7715
7716 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
7717 clobber the breakpoints' shadows with fast tracepoint jumps.
7718 * mem-break.h (check_mem_write): Add `myaddr' parameter.
7719 * target.c (write_inferior_memory): Also pass MYADDR down to
7720 check_mem_write.
7721
03583c20
UW
77222011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
7723
7724 * configure.ac: Check support for personality routine.
7725 * configure: Regenerate.
7726 * config.in: Likewise.
7727 * linux-low.c: Include <sys/personality.h>.
7728 Define ADDR_NO_RANDOMIZE if necessary.
7729 (linux_create_inferior): Disable address space randomization when
7730 forking inferior, if requested.
7731 (linux_supports_disable_randomization): New function.
7732 (linux_target_ops): Install it.
7733 * server.h (disable_randomization): Declare.
7734 * server.c (disable_randomization): New global variable.
7735 (handle_general_set): Handle QDisableRandomization.
7736 (handle_query): Likewise for qSupported.
7737 (main): Support --disable-randomization and --no-disable-randomization
7738 command line arguments.
7739 * target.h (struct target_ops): Add supports_disable_randomization.
7740 (target_supports_disable_randomization): New macro.
7741
723b724b
MF
77422011-09-29 Mike Frysinger <vapier@gentoo.org>
7743
7744 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
7745 ifdef check.
7746 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
7747 [!PT_GETDSBT] (target_loadmap): New definition.
7748 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
7749 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
7750 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
7751 and PT_GETDSBT to LINUX_LOADMAP.
7752 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
7753 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
7754
55329a5c 77552011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
7756
7757 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
7758 (arm_linux_hwbp_cap): New static variable.
7759 (arm_linux_get_hwbp_cap): Replace by ...
7760 (arm_linux_init_hwbp_cap): ... this new function.
7761 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
7762 (arm_linux_get_hw_watchpoint_count): Likewise.
7763 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7764 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
7765 (arm_prepare_to_resume): Use perror_with_name instead of error.
7766
55329a5c 77672011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
7768
7769 * linux-arm-low.c: Include <signal.h>.
7770 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
7771 (struct arm_linux_hwbp_cap): New data type.
7772 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
7773 (struct arm_linux_hw_breakpoint): New data type.
7774 (MAX_BPTS, MAX_WPTS): Define.
7775 (struct arch_process_info, struct arch_lwp_info): New data types.
7776 (arm_linux_get_hwbp_cap): New function.
7777 (arm_linux_get_hw_breakpoint_count): Likewise.
7778 (arm_linux_get_hw_watchpoint_count): Likewise.
7779 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7780 (arm_hwbp_control_initialize): Likewise.
7781 (arm_hwbp_control_is_enabled): Likewise.
7782 (arm_hwbp_control_is_initialized): Likewise.
7783 (arm_hwbp_control_disable): Likewise.
7784 (arm_linux_hw_breakpoint_equal): Likewise.
7785 (arm_linux_hw_point_initialize): Likewise.
7786 (struct update_registers_data): New data structure.
7787 (update_registers_callback: New function.
7788 (arm_insert_point): Likewise.
7789 (arm_remove_point): Likewise.
7790 (arm_stopped_by_watchpoint): Likewise.
7791 (arm_stopped_data_address): Likewise.
7792 (arm_new_process): Likewise.
7793 (arm_new_thread): Likewise.
7794 (arm_prepare_to_resume): Likewise.
7795 (the_low_target): Register arm_insert_point, arm_remove_point,
7796 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
7797 arm_new_thread, and arm_prepare_to_resume.
7798
6b9801d4
SS
77992011-09-15 Stan Shebs <stan@codesourcery.com>
7800
7801 * server.h (struct emit_ops): Add compare-goto fields.
7802 * tracepoint.c (gdb_agent_op_sizes): New table.
7803 (emit_eq_goto): New function.
7804 (emit_ne_goto): New function.
7805 (emit_lt_goto): New function.
7806 (emit_le_goto): New function.
7807 (emit_gt_goto): New function.
7808 (emit_ge_goto): New function.
7809 (is_goto_target): New function.
7810 (compile_bytecodes): Recognize special cases of compare-goto
7811 combinations and call specialized emitters for them.
7812 * linux-x86-low.c (amd64_emit_eq_goto): New function.
7813 (amd64_emit_ne_goto): New function.
7814 (amd64_emit_lt_goto): New function.
7815 (amd64_emit_le_goto): New function.
7816 (amd64_emit_gt_goto): New function.
7817 (amd64_emit_ge_goto): New function.
7818 (amd64_emit_ops): Add the new functions.
7819 (i386_emit_eq_goto): New function.
7820 (i386_emit_ne_goto): New function.
7821 (i386_emit_lt_goto): New function.
7822 (i386_emit_le_goto): New function.
7823 (i386_emit_gt_goto): New function.
7824 (i386_emit_ge_goto): New function.
7825 (i386_emit_ops): Add the new functions.
7826
bf15cbda
SS
78272011-09-08 Stan Shebs <stan@codesourcery.com>
7828
7829 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
7830 (i386_emit_epilogue): Restore %ebx.
7831
943ca1dd
JZ
78322011-08-31 Jie Zhang <jzhang918@gmail.com>
7833
7834 * server.c (step_thread): Remove definition.
7835 (process_serial_event): Don't handle Hs.
7836 * server.h (step_thread): Remove declaration.
7837 * target.c (set_desired_inferior): Remove use of step_thread.
7838
e3deef73
LM
78392011-08-24 Luis Machado <lgustavo@codesourcery.com>
7840
7841 * linux-low.c: Include linux-procfs.h.
7842 (linux_attach_lwp_1): Update comments.
7843 (linux_attach): Scan for existing threads when attaching to a
7844 process that is the tgid.
7845 * Makefile.in: Update dependencies.
7846
13da1c97
LM
78472011-08-24 Luis Machado <lgustavo@codesourcery.com>
7848
7849 * configure.srv: Add linux-procfs.o dependencies.
7850
881127c9
YQ
78512011-08-14 Yao Qi <yao@codesourcery.com>
7852
7853 * target.h (struct target_ops): Fix indent.
7854 * win32-low.c (win32_target_ops): Fix comment.
7855
58dbd541
YQ
78562011-08-14 Andrew Jenner <andrew@codesourcery.com>
7857 Yao Qi <yao@codesourcery.com>
7858
7859 * Makefile.in (clean): Remove tic6x-*.c files.
7860 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
7861 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
7862 (tic6x-c64xp-linux.c): Likewise.
7863 * configure.srv: Add support for tic6x-*-uclinux.
7864 * linux-tic6x-low.c: New.
7865 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
7866
78d85199
YQ
78672011-08-14 Andrew Stubbs <ams@codesourcery.com>
7868 Yao Qi <yao@codesourcery.com>
7869
7870 * target.h (struct target_ops): Add read_loadmap.
7871 * linux-low.c (struct target_loadseg): New type.
7872 (struct target_loadmap): New type.
7873 (linux_read_loadmap): New function.
7874 (linux_target_ops): Add linux_read_loadmap.
7875 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
7876 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
7877 to NULL.
78d85199 7878
a959a88d
EZ
78792011-08-05 Eli Zaretskii <eliz@gnu.org>
7880
7881 * win32-low.c: Include <stdint.h>.
7882
1ced966e
PA
78832011-07-22 Pedro Alves <pedro@codesourcery.com>
7884
7885 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
7886 to the inferior here.
7887 (i386_remove_aligned_watchpoint): Ditto.
7888 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
7889 fit part of the watchpoint in the debug registers.
7890 (i386_update_inferior_debug_regs): New.
7891 (i386_low_insert_watchpoint): Work on a local mirror of the debug
7892 registers, and only update the inferior on success.
7893 (i386_low_remove_watchpoint): Ditto.
7894
d26e3629
KY
78952011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
7896
7897 * linux-low.c (compare_ints, unique, list_threads, show_process,
7898 linux_core_of_thread): Delete.
7899 (linux_target_ops): Change linux_core_of_thread to
7900 linux_common_core_of_thread.
7901 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
7902 * utils.c (malloc_failure): Change type of argument.
7903 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
7904 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
7905 common/linux-osdata.c, common/ptid.c and common/buffer.c.
7906 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
7907 (IPA_OBJS): Add common-utils-ipa.o.
7908 (ptid_h, linux_osdata_h): New macros.
7909 (server_h): Add common/common-utils.h, common/xml-utils.h,
7910 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
7911 common/ptid.h.
7912 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
7913 ptid.o, buffer.o): New rules.
7914 (linux-low.o): Add common/linux-osdata.h as a dependency.
7915 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
7916 * configure.ac: Add AC_HEADER_DIRENT check.
7917 * config.in: Regenerate.
7918 * configure: Regenerate.
7919 * remote-utils.c (xml_escape_text): Delete.
7920 (buffer_grow, buffer_free, buffer_init, buffer_finish,
7921 buffer_xml_printf): Move to common/buffer.c.
7922 * server.c (main): Remove call to initialize_inferiors.
7923 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
7924 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
7925 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
7926 internal_error, gdb_assert, gdb_assert_fail): Delete.
7927 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
7928 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
7929 common/buffer.h.
7930 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
7931 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
7932 initialize_inferiors): Delete.
7933
2275a1a7
PA
79342011-07-20 Pedro Alves <pedro@codesourcery.com>
7935
7936 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
7937 symbol error.
7938
0a5b1e09
PA
79392011-05-31 Pedro Alves <pedro@codesourcery.com>
7940
7941 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
7942 assertion.
7943 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
7944
6938fd34
YQ
79452011-05-26 Yao Qi <yao@codesourcery.com>
7946
7947 * Makefile.in (thread-db.o): Track dependence to
7948 common/gdb_thread_db.h.
7949 * thread-db.c: include gdb_thread_db.h from right place.
7950
b481f9e0
TT
79512011-05-16 Adrian Cornish <gnu@bluedreamer.com>
7952
7953 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
7954 __FILE__ and __LINE__ to internal_error.
7955
98a5dd13
DE
79562011-05-13 Doug Evans <dje@google.com>
7957
7958 * thread-db.c (try_thread_db_load_from_sdir): New function.
7959 (try_thread_db_load_from_dir): New function.
7960 (thread_db_load_search): Handle $sdir, ignore $pdir.
7961 Remove trying of system directories if search of
7962 libthread-db-search-path fails, that is now done via $sdir.
7963
d248b706
KY
79642011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
7965
7966 * server.c (handle_query): Add EnableDisableTracepoints to the list
7967 of supported features.
43aaf8b6 7968 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 7969 tracepoints.
43aaf8b6
PA
7970 (cmd_qtenable_disable): New.
7971 (cmd_qtstart): Install tracepoints even if disabled.
7972 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
7973 receiving a QTEnable or QTDisable packet.
7974 (gdb_collect): Skip data collection if fast tracepoint is disabled.
7975 (ust_marker_to_static_tracepoint): Do not ignore disabled static
7976 tracepoints.
7977 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 7978
84e578fb
DE
79792011-05-10 Doug Evans <dje@google.com>
7980
7981 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
7982
71f55dd8
DE
79832011-05-04 Doug Evans <dje@google.com>
7984
7985 * linux-low.c (linux_join): Skip process lookup.
7986 * spu-low.c (spu_join): Ditto.
7987 * server.c (join_inferiors_callback): Delete.
7988 (process_serial_event): For 'D' packet (detach) call join_inferior
7989 directly.
7990
4d393d60
JM
79912011-05-04 Joseph Myers <joseph@codesourcery.com>
7992
7993 * README: Don't mention xscale*-*-linux*.
7994 * configure.srv (xscale*-*-linux*): Don't handle target.
7995
b00ad6ff
NF
79962011-04-27 Nathan Froyd <froydnj@codesourcery.com>
7997
7998 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
7999 casting pointers.
8000 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
8001 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
8002 (i386_emit_void_call_2): Likewise.
8003
af96c192
YQ
80042011-04-26 Yao Qi <yao@codesourcery.com>
8005
43aaf8b6
PA
8006 * linux-low.c: Move common macros to linux-ptrace.h.
8007 Include linux-ptrace.h.
af96c192
YQ
8008 * Makefile.in (linux_ptrace_h): New.
8009 (linux-low.o): Depends on linux-ptrace.h.
8010
03f2bd59
JK
80112011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8012
8013 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
8014 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
8015 (remote_prepare): New function with most of the TCP code from ...
8016 (remote_open): ... here. Detect PORT here unconditionally. Move also
8017 setting transport_is_reliable.
8018 * server.c (run_once): New variable.
8019 (gdbserver_usage): Document it.
8020 (main): Set run_once for `--once'. Call remote_prepare. Exit after
8021 the first run if RUN_ONCE.
8022 * server.h (run_once, remote_prepare): New declarations.
8023
7a9dd1b2
TT
80242011-04-19 Tom Tromey <tromey@redhat.com>
8025
8026 * win32-low.c (handle_load_dll): Remove duplicate "the".
8027
81239425
PM
80282011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
8029
8030 Remove support for old Cygwin 1.5 versions.
8031 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
8032 function to avoid warning.
8033 (win32_add_one_solib): Use cygwin_conv_path function to avoid
8034 warning.
8035
9e0627f1
PM
80362011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
8037
8038 * gdbserver/server.h (Macro _): Define it if not available.
8039
588eebee
MS
80402011-03-14 Michael Snyder <msnyder@vmware.com>
8041
348af9f7 8042 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 8043
43f70d4c
JB
80442011-03-10 Joel Brobecker <brobecker@adacore.com>
8045
8046 * Makefile.in (maintainer-clean realclean distclean): Remove
8047 "make ... subdir_do" command.
8048
348af9f7
MS
80492011-03-10 Michael Snyder <msnyder@vmware.com>
8050
8051 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
8052
8053 * server.c (handle_v_run): Free alloced buffer on early return.
8054
e637a4f5
YQ
80552011-03-09 Yao Qi <yao@codesourcery.com>
8056
8057 Revert:
8058 2011-03-04 Yao Qi <yao@codesourcery.com>
8059
8060 * Makefile.in: Remove GNU make feature --directory.
8061
8062 2011-03-05 Yao Qi <yao@codesourcery.com>
8063
8064 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8065 (subdir_do): New make target. Copied from gdb/Makefile.
8066 (maintainer-clean, realclean, distclean, clean): Call corresponding
8067 make targets in common/Makefile.
8068
8069 2011-02-11 Yao Qi <yao@codesourcery.com>
8070
8071 * configure.ac: Call AC_PROG_RANLIB.
8072 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
8073 * configure: Regenerate.
8074
e6edda56
JK
80752011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8076
8077 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
8078
e5141119
JB
80792011-03-06 Yao Qi <yao@codesourcery.com>
8080
8081 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
8082
64794aa4
JB
80832011-03-05 Yao Qi <yao@codesourcery.com>
8084
8085 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8086 (subdir_do): New make target. Copied from gdb/Makefile.
8087 (maintainer-clean, realclean, distclean, clean): Call corresponding
8088 make targets in common/Makefile.
8089
7a762829
YQ
80902011-03-04 Yao Qi <yao@codesourcery.com>
8091
8092 * Makefile.in: Remove GNU make feature --directory.
8093
348af9f7
MS
80942011-03-04 Michael Snyder <msnyder@vmware.com>
8095
8096 * server.c (queue_stop_reply): Call xmalloc not malloc.
8097
80982011-03-02 Michael Snyder <msnyder@vmware.com>
8099
8100 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
8101
9f72fee2
MS
81022011-02-28 Michael Snyder <msnyder@vmware.com>
8103
588eebee
MS
8104 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
8105 (cmd_qtframe): Ditto.
8106 (cmd_qtbuffer): Ditto.
8107 (cmd_bigqtbuffer): Ditto.
8108
9f72fee2
MS
8109 * utils.c (decimal2str): Initialize 'width' to nine, then
8110 don't mess with it.
8111
8040bd49
UW
81122011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8113
8114 * hostio.c (require_data): Free *data, not data.
8115
7e52cbd0
JK
81162011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8117
8118 * hostio.c (require_data): Use free, not xfree.
8119
9130f83e
MS
81202011-02-27 Michael Snyder <msnyder@vmware.com>
8121
4b812f4e
MS
8122 * server.c (handle_query): Discard unused value.
8123
9130f83e
MS
8124 * hostio.c (require_data): Free malloc memory before returning
8125 error.
8126
69d37113
MS
81272011-02-26 Michael Snyder <msnyder@vmware.com>
8128
8129 * linux-low.c (list_threads): Call closedir for dirent.
8130
35f5825a
MS
81312011-02-27 Michael Snyder <msnyder@vmware.com>
8132
2a589cef
MS
8133 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
8134 a case statement falls through.
8135
0adea5f7
MS
8136 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
8137
35f5825a
MS
8138 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
8139 in comparison.
8140
238f1c74
MS
81412011-02-26 Michael Snyder <msnyder@vmware.com>
8142
8143 * utils.c (decimal2str): Eliminate dead code and dead param.
8144 (pulongest): Drop dead param from call to decimal2str.
8145 (plongest): Ditto.
8146
633ff500
JB
81472011-02-24 Joel Brobecker <brobecker@adacore.com>
8148
8149 Revert the following patch (not approved yet):
8150 2011-02-21 Hui Zhu <teawater@gmail.com>
8151 * tracepoint.c (tp_printf): New function.
8152 (eval_agent_expr): Handle gdb_agent_op_printf.
8153
f9c6ff72
HZ
81542011-02-21 Hui Zhu <teawater@gmail.com>
8155
8156 * tracepoint.c (tp_printf): New function.
8157 (eval_agent_expr): Handle gdb_agent_op_printf.
8158
94d5e490
TT
81592011-02-18 Tom Tromey <tromey@redhat.com>
8160
8161 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
8162 (tracepoint.o): Likewise.
8163 * tracepoint.c (enum gdb_agent_op): Use ax.def.
8164 (gdb_agent_op_names): Likewise.
8165
c7f96d2b
TT
81662011-02-18 Tom Tromey <tromey@redhat.com>
8167
8168 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
8169 gdb_agent_op_rot>: New constants.
8170 (gdb_agent_op_names): Add pick and roll.
8171 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
8172 cases.
8173
0feedb2c
JK
81742011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
8175
8176 * aclocal.m4: Regenerated with aclocal-1.11.1.
8177
b3b9301e
PA
81782011-02-14 Pedro Alves <pedro@codesourcery.com>
8179
8180 * server.c (handle_qxfer_traceframe_info): New.
8181 (qxfer_packets): Register "traceframe-info".
8182 (handle_query): Report support for qXfer:traceframe-info:read+.
8183 * tracepoint.c (match_blocktype): New.
8184 (traceframe_find_block_type): Rename to ...
8185 (traceframe_walk_blocks): ... this. Add callback filter argument,
8186 and use it.
8187 (traceframe_find_block_type): New, reimplemented on top of
8188 traceframe_walk_blocks.
8189 (build_traceframe_info_xml): New.
8190 (traceframe_read_info): New.
8191 * server.h (traceframe_read_info): Declare.
8192
4f3e6fb7
YQ
81932011-02-11 Yao Qi <yao@codesourcery.com>
8194
8195 * configure.ac: Call AC_PROG_RANLIB.
8196 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
8197 * configure: Regenerate.
8198
764880b7
PA
81992011-02-07 Pedro Alves <pedro@codesourcery.com>
8200
8201 * server.c (gdb_read_memory): Change return semantics to allow
8202 partial transfers.
8203 (handle_search_memory_1): Adjust.
8204 (process_serial_event) <'m' packet>: Handle partial transfers.
8205 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
8206
1c79eb8a
PA
82072011-01-28 Pedro Alves <pedro@codesourcery.com>
8208
8209 * regcache.c (init_register_cache): Initialize
8210 regcache->register_status.
8211 (free_register_cache): Release regcache->register_status.
8212 (regcache_cpy): Copy register_status.
8213 (registers_to_string): Print 'x's for unavailable registers.
8214 (supply_register): Mark the register's status valid or
8215 unavailable, depending on whether a buffer was passed in or not.
8216 (supply_register_zeroed): New.
8217 (supply_regblock): Mark the registers' status valid or
8218 unavailable, depending on whether a buffer was passed in or not.
8219 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
8220 (struct regcache): New `register_status' field.
8221 (supply_register_zeroed): Declare.
8222 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
8223 supply_register_zeroed, rather than passing a NULL buffer to
8224 supply_register.
8225 * tracepoint.c (fetch_traceframe_registers): Update comment.
8226
85724a0e
PA
82272011-01-28 Pedro Alves <pedro@codesourcery.com>
8228
8229 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
8230 buffer explicit.
8231
d08aafef
PA
82322011-01-25 Pedro Alves <pedro@codesourcery.com>
8233
8234 * server.h (decode_xfer_write): Change prototype.
8235 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
8236 and don't extract the annex here.
8237 * server.c (decode_xfer_read): Remove `annex' parameter,
8238 and don't extract the annex here.
8239 (decode_xfer): New.
8240 (struct qxfer): New.
8241 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
8242 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
8243 (handle_qxfer_statictrace): New functions, abstracted out from
8244 handle_query, and made to use the struct qxfer interface.
8245 (handle_threads_qxfer_proper): Rename to ...
8246 (handle_qxfer_threads_proper): ... this.
8247 (handle_threads_qxfer): Rename to ...
8248 (handle_qxfer_threads): ... this. Adjust.
8249 (qxfer_packets): New array.
8250 (handle_qxfer): New function.
8251 (handle_query): Use handle_qxfer.
8252
493e2a69
MS
82532011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
8254
8255 * gdbreplay.c: Shorten lines of >= 80 columns.
8256 * linux-low.c: Ditto.
8257 * linux-ppc-low.c: Ditto.
8258 * linux-s390-low.c: Ditto.
8259 * linux-sparc-low.c: Ditto.
8260 * linux-x86-low.c: Ditto.
8261 * linux-xtensa-low.c: Ditto.
8262 * mem-break.c: Ditto.
8263 * nto-low.c: Ditto.
8264 * regcache.h: Ditto.
8265 * remote-utils.c: Ditto.
8266 * server.c: Ditto.
8267 * server.h: Ditto.
8268 * thread-db.c: Ditto.
8269 * tracepoint.c: Ditto.
8270 * utils.c: Ditto.
8271 * win32-low.h: Ditto.
8272
44944448
JB
82732011-01-05 Joel Brobecker <brobecker@adacore.com>
8274
8275 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
8276 update.
8277
71ce852c
JB
82782011-01-01 Joel Brobecker <brobecker@adacore.com>
8279
8280 * server.c (gdbserver_version): Update copyright year in version
8281 output.
8282 * gdbreplay.c (gdbreplay_version): Ditto.
8283
eb826dc6
MF
82842010-12-29 Jie Zhang <jie.zhang@analog.com>
8285
8286 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
8287 * linux-bfin-low.c: New file.
8288 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
8289 PT_DATA_ADDR for BFIN targets.
8290 * Makefile.in (SFILES): Add linux-bfin-low.c.
8291 (clean): Remove reg-bfin.c.
8292 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
8293 * README: Mention supported Blackfin targets.
8294
39ab222a
MF
82952010-12-23 Mike Frysinger <vapier@gentoo.org>
8296
8297 * .gitignore: New file.
8298
a1f2ce7d
MF
82992010-11-16 Mike Frysinger <vapier@gentoo.org>
8300
8301 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
8302
f474844c
JZ
83032010-10-22 Jie Zhang <jie@codesourcery.com>
8304
8305 * Makefile.in: Add FLAGS_TO_PASS variable.
8306 (install): Remove dependency of install-only and recursively
8307 invoke make for install-only.
8308
f1048712
DE
83092010-10-04 Doug Evans <dje@google.com>
8310
8311 * Makefile.in (uninstall): Use $(DESTDIR).
8312
b53a1623
PA
83132010-09-24 Pedro Alves <pedro@codesourcery.com>
8314
e6ee044d
PA
8315 PR gdb/11842
8316
b53a1623
PA
8317 * linux-x86-low.c (compat_siginfo_from_siginfo)
8318 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
8319 si_code is < 0. Check for si_code == SI_TIMER before checking for
8320 si_code < 0.
8321
fa1bd1e4
JB
83222010-09-13 Joel Brobecker <brobecker@adacore.com>
8323
8324 * lynx-i386-low.c: New file.
8325 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
8326
47fac8f8
JB
83272010-09-13 Joel Brobecker <brobecker@adacore.com>
8328
8329 * lynx-low.c (ptrace_request_to_str): Remove handling for
8330 request values that have been removed in LynxOS 5.x.
8331
1adfc54d
JB
83322010-09-13 Joel Brobecker <brobecker@adacore.com>
8333
8334 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
8335 <ptrace.h>
8336
c2a66c29
NS
83372010-09-09 Nathan Sidwell <nathan@codesourcery.com>
8338
8339 * configure.ac: Add --enable-inprocess-agent option.
8340 * configure: Rebuilt.
8341
32fcada3
YQ
83422010-09-06 Yao Qi <yao@codesourcery.com>
8343
8344 * linux-low.c (linux_kill): Remove unused variable.
8345 (linux_stabilize_threads): Likewise.
8346 * server.c (start_inferior): Likewise.
8347 (queue_stop_reply_callback): Likewise.
8348 * tracepoint.c (do_action_at_tracepoint): Likewise.
8349
0cccb683
YQ
83502010-09-06 Yao Qi <yao@codesourcery.com>
8351
8352 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
8353 on return.
8354
423ec54c
JK
83552010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8356
8357 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
8358
12ac6819
PA
83592010-09-06 Pedro Alves <pedro@codesourcery.com>
8360
8361 * Makefile.in (install-only): Replace $IPA_DEPFILES with
8362 "$(IPA_DEPFILES)".
8363
8ed54b31
JB
83642010-09-01 Joel Brobecker <brobecker@adacore.com>
8365
8366 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
8367 gdbserver/lynx-ppc-low.c: New files.
8368 * Makefile.in (lynx_low_h): New variable.
8369 (lynx-low.o, lynx-ppc-low.o): New rules.
8370 * configure.ac: On LynxOS, link with -lnetinet.
8371 * configure.srv: Add handling of powerpc-*-lynxos* targets.
8372 * configure: regenerate.
8373
bb0116a4
JB
83742010-09-01 Joel Brobecker <brobecker@adacore.com>
8375
8376 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
8377 * configure.ac: Add check for vasprintf and vsnprintf.
8378 * configure, config.in: Regenerate.
8379 * server.h (vasprintf, vsnprintf): Add conditional declarations.
8380
a778ab81 83812010-09-01 Joel Brobecker <brobecker@adacore.com>
8382
8383 * gdbreplay.c: Move include of alloca.h up, next to include of
8384 malloc.h.
8385 * server.h: Add include of malloc.h.
8386 * mem-break.c: Remove include of malloc.h.
8387 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
8388
8b034a19 83892010-09-01 Joel Brobecker <brobecker@adacore.com>
8390
8391 * Makefile.in (memmem.o): Build with -Wno-error.
8392
83932010-09-01 Joel Brobecker <brobecker@adacore.com>
8394
8395 * utils.c (xsnprintf): Make non-static.
8396 * server.h: Add xsnprintf declaration.
8397 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
8398 replace calls to snprintf by calls to xsnprintf throughout.
8399
84002010-09-01 Joel Brobecker <brobecker@adacore.com>
8401
8402 * configure.ac: Add configure check for alloca.
8403 * configure, config.in: Regenerate.
8404 * server.h: Include alloca.h if it exists.
8405 * gdbreplay.c: Include alloca.h if it exists.
8406
1a981360
PA
84072010-08-28 Pedro Alves <pedro@codesourcery.com>
8408
8409 * linux-low.c (__SIGRTMIN): Define if not already defined.
8410 (linux_create_inferior): Check for __ANDROID__ rather than
8411 __SIGRTMIN.
8412 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
8413 are already deferred.
8414 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
8415 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
8416 stopped and already has a pending signal to report.
8417 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
8418 a pending signal to report or is moving out of a jump pad.
8419 (linux_init_signals): Check for __ANDROID__ rather than
8420 __SIGRTMIN.
8421
b4d51a55
PA
84222010-08-28 Pedro Alves <pedro@codesourcery.com>
8423
8424 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
8425 debug_threads check. Avoid a linear search when not doing debug
8426 output.
8427
ec48365d
PA
84282010-08-27 Pedro Alves <pedro@codesourcery.com>
8429
8430 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
8431 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
8432 (struct file_handler) <fd>: Change type to gdb_fildes_t.
8433 (process_event): Change local fd's type to gdb_fildes_t.
8434 (create_file_handler): Adjust prototype.
8435 (delete_file_handler): Adjust prototype.
8436 (handle_file_event): Adjust prototype. Use pfildes.
8437 (create_file_event): Adjsut prototype.
8438 * remote-utils.c (remote_desc, listen_desc): Change type to
8439 gdb_fildes_t.
8440 * server.h: New gdb_fildes_t typedef.
8441 [USE_WIN32API]: Include winsock2.h.
8442 (delete_file_handler, add_file_handler): Adjust prototypes.
8443 (pfildes): Declare.
8444 * utils.c (pfildes): New.
8445
854d88f0
PA
84462010-08-27 Pedro Alves <pedro@codesourcery.com>
8447
8448 * configure.ac (build_warnings): Add -Wno-char-subscripts.
8449 * configure: Regenerate.
8450
0146f85b
PA
84512010-08-27 Pedro Alves <pedro@codesourcery.com>
8452
8453 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
8454 (linux_done_accessing_memory): ... this.
8455 (linux_target_ops): Adjust.
8456 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
8457 * nto-low.c (nto_target_ops): Adjust comment.
8458 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
8459 * spu-low.c (spu_target_ops): Adjust comment.
8460 * target.h (target_ops): Rename unprepare_to_access_memory field
8461 to done_accessing_memory.
8462 (unprepare_to_access_memory): Rename to ...
8463 (done_accessing_memory): ... this.
8464
90d74c30
PA
84652010-08-26 Pedro Alves <pedro@codesourcery.com>
8466
8467 * linux-low.c (linux_prepare_to_access_memory): New.
8468 (linux_unprepare_to_access_memory): New.
8469 (linux_target_ops): Install them.
8470 * server.c (read_memory): Rename to ...
8471 (gdb_read_memory): ... this. Use
8472 prepare_to_access_memory/prepare_to_access_memory.
8473 (write_memory): Rename to ...
8474 (gdb_write_memory): ... this. Use
8475 prepare_to_access_memory/prepare_to_access_memory.
8476 (handle_search_memory_1): Adjust.
8477 (process_serial_event): Adjust.
8478 * target.h (struct target_ops): New fields
8479 prepare_to_access_memory and unprepare_to_access_memory.
8480 (prepare_to_access_memory, unprepare_to_access_memory): New.
8481 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
8482 prepare_to_access_memory/prepare_to_access_memory.
8483 * nto-low.c (nto_target_ops): Adjust.
8484 * spu-low.c (spu_target_ops): Adjust.
8485 * win32-low.c (win32_target_ops): Adjust.
8486
fd467969
PA
84872010-08-26 Pedro Alves <pedro@codesourcery.com>
8488
8489 * Makefile.in (WARN_CFLAGS): Get it from configure.
8490 (WERROR_CFLAGS): New.
8491 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
8492 * configure.ac: Introduce --enable-werror, which adds -Werror to
8493 the compiler command line. Enabled by default. Disable with
8494 --disable-werror. Add -Wdeclaration-after-statement
8495 Wpointer-arith and -Wformat-nonliteral to warning flags.
8496 * configure: Regenerate.
8497
331e2f5f
PA
84982010-08-26 Pedro Alves <pedro@codesourcery.com>
8499
8500 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
8501
e581f2b4
PA
85022010-08-26 Pedro Alves <pedro@codesourcery.com>
8503
8504 * gdbreplay.c (remote_error): New.
8505 (gdbchar): New.
8506 (expect): Use gdbchar. Check for error reading from GDB.
8507 Clarify sync error output.
8508 (play): Check for errors writing to GDB.
8509 * linux-low.c (sigchld_handler): Really ignore `write' errors.
8510 * remote-utils.c (getpkt): Check for errors writing to the remote
8511 descriptor.
8512
3c11dd79
PA
85132010-08-25 Pedro Alves <pedro@codesourcery.com>
8514
8515 * linux-low.c (linux_wait_1): Move non-debugging code out of
8516 `debug_threads' control.
8517
d20a8ad9
PA
85182010-08-25 Pedro Alves <pedro@codesourcery.com>
8519
8520 * linux-low.c (linux_wait_1): Don't set last_status here.
8521 * server.c (push_event, queue_stop_reply_callback): Assert we're
8522 not pushing a TARGET_WAITKIND_IGNORE event.
8523 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
8524 (myresume, handle_target_event): Set the thread's last_resume_kind
8525 and last_status from the target returned status.
8526
964e4306
PA
85272010-08-25 Pedro Alves <pedro@codesourcery.com>
8528
8529 PR threads/10729
8530
8531 * linux-x86-low.c (update_debug_registers_callback): New.
8532 (i386_dr_low_set_addr): Use it.
8533 (i386_dr_low_get_addr): New.
8534 (i386_dr_low_set_control): Use update_debug_registers_callback.
8535 (i386_dr_low_get_control): New.
8536 (i386_dr_low_get_status): Adjust.
8537 * linux-low.c (linux_stop_lwp): New.
8538 * linux-low.h (linux_stop_lwp): Declare.
8539
8540 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
8541 argument instead of a i386_debug_reg_state.
8542 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
8543 a i386_debug_reg_state.
8544 (i386_insert_aligned_watchpoint): Adjust.
8545 (i386_remove_aligned_watchpoint): Adjust.
8546 (i386_low_stopped_data_address): Read the debug registers from the
8547 inferior instead of from the mirrors.
8548 * i386-low.h (struct i386_debug_reg_state): Extend comment.
8549 (i386_dr_low_get_addr): Declare.
8550 (i386_dr_low_get_control): Declare.
8551 (i386_dr_low_get_status): Change prototype.
8552
8553 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
8554 (i386_dr_low_get_addr): New.
8555 (i386_dr_low_get_control): New.
8556 (i386_dr_low_get_status): Adjust prototype. Return
8557 dr_status_mirror.
8558 (i386_initial_stuff): Clear dr_status_mirror and
8559 dr_control_mirror.
8560 (i386_get_thread_context): Adjust.
8561 (i386_set_thread_context): Adjust.
8562 (i386_thread_added): Adjust.
8563
5f21a75b
PA
85642010-08-24 Pedro Alves <pedro@codesourcery.com>
8565
8566 * linux-low.h (linux_thread_area): Delete declaration.
8567
3e4c1235
TS
85682010-08-11 Thomas Schwinge <thomas@codesourcery.com>
8569
8570 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
8571 after its termination.
8572
1971b033
PA
85732010-08-09 Pedro Alves <pedro@codesourcery.com>
8574
8575 * linux-low.c (gdb_wants_lwp_stopped): Delete.
8576 (gdb_wants_all_stopped): Delete.
8577 (linux_wait_1): Don't call them.
8578 * server.c (handle_v_cont): Tag all threads as want-stopped.
8579 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
8580 stopped as "client-wants-stopped".
8581
310444ac
PA
85822010-07-31 Pedro Alves <pedro@codesourcery.com>
8583
8584 * Makefile.in (signals_h): New.
8585 (server_h): Depend on it.
8586 (server.o): Don't depend on $(signals_def).
8587 (signals.o): Depend on $(signals_def).
8588
a19cae16
JK
85892010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
8590
8591 * Makefile.in (signals_def): New.
8592 (server_h): Append include/gdb/signals.h and signals_def.
8593 (server.o): Append signals_def.
8594
30d50328
JK
85952010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8596
8597 * server.c (handle_target_event): Use target_signal_to_host for
8598 resume_info.sig initialization.
8599 * target.h (struct thread_resume) <sig>: New comment.
8600
5c3216e2
OS
86012010-07-20 Ozkan Sezer <sezeroz@gmail.com>
8602
c6f46ca0
OS
8603 * server.c (handle_query): strcpy() the returned string from paddress()
8604 instead of sprintf().
5c3216e2
OS
8605 * utils.c (paddress): Return phex_nz().
8606
6bd31874
JB
86072010-07-07 Joel Brobecker <brobecker@adacore.com>
8608
8609 * server.c (handle_v_cont): Call mourn_inferior if process
8610 just exited.
8611 (myresume): Likewise.
8612
0fb4aa4b
PA
86132010-07-01 Pedro Alves <pedro@codesourcery.com>
8614
8615 Static tracepoints, and integration with UST.
8616
8617 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
8618 * mem-break.c (uninsert_all_breakpoints)
8619 (reinsert_all_breakpoints): New.
8620 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
8621 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
8622 (gdb_agent_ust_loaded, helper_thread_id)
8623 (gdb_agent_helper_thread_id): New macros.
8624 (struct ipa_sym_addresses): Add addr_ust_loaded,
8625 addr_helper_thread_id, addr_cmd_buf.
8626 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
8627 (in_process_agent_loaded_ust): New.
8628 (write_e_ust_not_loaded): New.
8629 (maybe_write_ipa_ust_not_loaded): New.
8630 (struct collect_static_trace_data_action): New.
8631 (enum tracepoint_type) <static_tracepoint>: New.
8632 (struct tracepoint) <handle>: Mention static tracepoints.
8633 (struct static_tracepoint_ctx): New.
8634 (CMD_BUF_SIZE): New.
8635 (add_tracepoint_action): Handle static tracepoint actions.
8636 (unprobe_marker_at): New.
8637 (clear_installed_tracepoints): Handle static tracepoints.
8638 (cmd_qtdp): Handle static tracepoints.
8639 (probe_marker_at): New.
8640 (cmd_qtstart): Handle static tracepoints.
8641 (response_tracepoint): Handle static tracepoints.
8642 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
8643 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
8644 (get_context_regcache): Handle static tracepoints.
8645 (do_action_at_tracepoint): Handle static tracepoint actions.
8646 (traceframe_find_block_type): Handle static trace data blocks.
8647 (traceframe_read_sdata): New.
8648 (download_tracepoints): Download static tracepoint actions.
8649 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
8650 (GDB_PROBE_NAME): New.
8651 (ust_ops): New.
8652 (GET_UST_SYM): New.
8653 (USTF): New.
8654 (dlsym_ust): New.
8655 (ust_marker_to_static_tracepoint): New.
8656 (gdb_probe): New.
8657 (collect_ust_data_at_tracepoint): New.
8658 (gdb_ust_probe): New.
8659 (UNIX_PATH_MAX, SOCK_DIR): New.
8660 (gdb_ust_connect_sync_socket): New.
8661 (resume_thread, stop_thread): New.
8662 (run_inferior_command): New.
8663 (init_named_socket): New.
8664 (gdb_ust_socket_init): New.
8665 (cstr_to_hexstr): New.
8666 (next_st): New.
8667 (first_marker, next_marker): New.
8668 (response_ust_marker): New.
8669 (cmd_qtfstm, cmd_qtsstm): New.
8670 (unprobe_marker_at, probe_marker_at): New.
8671 (cmd_qtstmat, gdb_ust_thread): New.
8672 (gdb_ust_init): New.
8673 (initialize_tracepoint_ftlib): Call gdb_ust_init.
8674 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
8675 (ST_REGENTRY): New.
8676 (x86_64_st_collect_regmap): New.
8677 (X86_64_NUM_ST_COLLECT_GREGS): New.
8678 (AMD64_RIP_REGNUM): New.
8679 (supply_static_tracepoint_registers): New.
8680 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
8681 (ST_REGENTRY): New.
8682 (i386_st_collect_regmap): New.
8683 (i386_NUM_ST_COLLECT_GREGS): New.
8684 (supply_static_tracepoint_registers): New.
8685 * server.c (handle_query): Handle qXfer:statictrace:read.
8686 <qSupported>: Report support for StaticTracepoints, and
8687 qXfer:statictrace:read features.
8688 * server.h (traceframe_read_sdata)
8689 (supply_static_tracepoint_registers): Declare.
8690 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
8691 (unpack_varlen_hex): Include in IPA build.
8692 * Makefile.in (ustlibs, ustinc): New.
8693 (IPA_OBJS): Add remote-utils-ipa.o.
8694 ($(IPA_LIB)): Link -ldl and -lpthread.
8695 (UST_CFLAGS): New.
8696 (IPAGENT_CFLAGS): Add UST_CFLAGS.
8697 * config.in, configure: Regenerate.
8698
9e4344e5
PA
86992010-06-20 Ian Lance Taylor <iant@google.com>
8700 Pedro Alves <pedro@codesourcery.com>
8701
8702 * linux-x86-low.c (always_true): Delete.
8703 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
8704 trying to fool the compiler with always_true.
8705
c6beb2cb
PA
87062010-06-20 Pedro Alves <pedro@codesourcery.com>
8707
8708 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
8709 conditions in gdbserver.
8710
d2ed6730
UW
87112010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
8712
8713 * spu-low.c (spu_read_memory): Wrap around local store limit.
8714 (spu_write_memory): Likewise.
8715
4e29fb54
PA
87162010-06-15 Pedro Alves <pedro@codesourcery.com>
8717
8718 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
8719 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
8720 LONGEST uses.
8721 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
8722 uses.
8723 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
8724 uses with LONGEST uses.
8725
6a271cae
PA
87262010-06-14 Stan Shebs <stan@codesourcery.com>
8727 Pedro Alves <pedro@codesourcery.com>
8728
8729 Bytecode compiler.
8730
8731 * linux-x86-low.c: Include limits.h.
8732 (add_insns): New.
8733 (always_true): New.
8734 (EMIT_ASM): New.
8735 (EMIT_ASM32): New.
8736 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
8737 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
8738 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
8739 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
8740 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
8741 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
8742 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
8743 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
8744 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
8745 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
8746 (amd64_emit_void_call_2): New.
8747 (amd64_emit_ops): New.
8748 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
8749 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
8750 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
8751 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
8752 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
8753 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
8754 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
8755 (i386_emit_call, i386_emit_reg, i386_emit_pop)
8756 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
8757 (i386_emit_stack_adjust, i386_emit_int_call_1)
8758 (i386_emit_void_call_2): New.
8759 (i386_emit_ops): New.
8760 (x86_emit_ops): New.
8761 (the_low_target): Install x86_emit_ops.
8762 * server.h (struct emit_ops): New.
8763 (get_raw_reg_func_addr): Declare.
8764 (current_insn_ptr, emit_error): Declare.
8765 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
8766 (set_trace_state_variable_value): New defines.
8767 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
8768 addr_get_trace_state_variable_value and
8769 addr_set_trace_state_variable_value.
8770 (symbol_list): New fields for get_raw_reg,
8771 get_trace_state_variable_value and set_trace_state_variable_value.
8772 (condfn): New typedef.
8773 (struct tracepoint): New field `compiled_cond'.
8774 (do_action_at_tracepoint): Clear compiled_cond.
8775 (get_trace_state_variable_value, set_trace_state_variable_value):
8776 Export in the IPA.
8777 (condition_true_at_tracepoint): If there's a compiled condition,
8778 run that.
8779 (current_insn_ptr, emit_error): New globals.
8780 (struct bytecode_address): New.
8781 (get_raw_reg_func_addr): New.
8782 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
8783 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
8784 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
8785 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
8786 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
8787 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
8788 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
8789 (compile_tracepoint_condition, compile_bytecodes): New.
8790 * target.h (emit_ops): Forward declare.
8791 (struct target_ops): New field emit_ops.
8792 (target_emit_ops): New.
8793 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
8794 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
8795 * linux-low.c (linux_emit_ops): New.
8796 (linux_target_ops): Install it.
8797 * linux-low.h (struct linux_target_ops): New field emit_ops.
8798
92b72907
UW
87992010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
8800
8801 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
8802 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
8803
fa593d66
PA
88042010-06-01 Pedro Alves <pedro@codesourcery.com>
8805 Stan Shebs <stan@codesourcery.com>
8806
8807 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
8808 (all): Depend on $(extra_libraries).
8809 (install-only): Install the IPA.
8810 (IPA_OBJS, IPA_LIB): New.
8811 (clean): Remove the IPA lib.
8812 (IPAGENT_CFLAGS): New.
8813 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
8814 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
8815 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
8816 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
8817 * configure.ac: Check for atomic builtins support in the compiler.
8818 (IPA_DEPFILES, extra_libraries): Define.
8819 * configure.srv (ipa_obj): Add description.
8820 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
8821 (i[34567]86-*-linux*): Set ipa_obj.
8822 (x86_64-*-linux*): Set ipa_obj.
8823 * linux-low.c (stabilizing_threads): New.
8824 (supports_fast_tracepoints): New.
8825 (linux_detach): Stabilize threads before detaching.
8826 (handle_tracepoints): Handle internal tracing breakpoints. Assert
8827 the lwp is either not stabilizing, or is moving out of a jump pad.
8828 (linux_fast_tracepoint_collecting): New.
8829 (maybe_move_out_of_jump_pad): New.
8830 (enqueue_one_deferred_signal): New.
8831 (dequeue_one_deferred_signal): New.
8832 (linux_wait_for_event_1): If moving out of a jump pad, defer
8833 pending signals to later.
8834 (linux_stabilize_threads): New.
8835 (linux_wait_1): Check if threads need moving out of jump pads, and
8836 do it if so.
8837 (stuck_in_jump_pad_callback): New.
8838 (move_out_of_jump_pad_callback): New.
8839 (lwp_running): New.
8840 (linux_resume_one_lwp): Handle moving out of jump pads.
8841 (linux_set_resume_request): Dequeue deferred signals.
8842 (need_step_over_p): Also step over fast tracepoint jumps.
8843 (start_step_over): Also uninsert fast tracepoint jumps.
8844 (finish_step_over): Also reinsert fast tracepoint jumps.
8845 (linux_install_fast_tracepoint_jump): New.
8846 (linux_target_ops): Install linux_stabilize_threads and
8847 linux_install_fast_tracepoint_jump_pad.
8848 * linux-low.h (linux_target_ops) <get_thread_area,
8849 install_fast_tracepoint_jump_pad>: New fields.
8850 (struct lwp_info) <collecting_fast_tracepoint,
8851 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
8852 (linux_get_thread_area): Declare.
8853 * linux-x86-low.c (jump_insn): New.
8854 (x86_get_thread_area): New.
8855 (append_insns): New.
8856 (push_opcode): New.
8857 (amd64_install_fast_tracepoint_jump_pad): New.
8858 (i386_install_fast_tracepoint_jump_pad): New.
8859 (x86_install_fast_tracepoint_jump_pad): New.
8860 (the_low_target): Install x86_get_thread_area and
8861 x86_install_fast_tracepoint_jump_pad.
8862 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
8863 (struct fast_tracepoint_jump): New.
8864 (fast_tracepoint_jump_insn): New.
8865 (fast_tracepoint_jump_shadow): New.
8866 (find_fast_tracepoint_jump_at): New.
8867 (fast_tracepoint_jump_here): New.
8868 (delete_fast_tracepoint_jump): New.
8869 (set_fast_tracepoint_jump): New.
8870 (uninsert_fast_tracepoint_jumps_at): New.
8871 (reinsert_fast_tracepoint_jumps_at): New.
8872 (set_breakpoint_at): Use write_inferior_memory.
8873 (uninsert_raw_breakpoint): Use write_inferior_memory.
8874 (check_mem_read): Mask out fast tracepoint jumps.
8875 (check_mem_write): Mask out fast tracepoint jumps.
8876 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
8877 (set_fast_tracepoint_jump): Declare.
8878 (delete_fast_tracepoint_jump)
8879 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
8880 (reinsert_fast_tracepoint_jumps_at): Declare.
8881 * regcache.c: Don't compile many functions when building the
8882 in-process agent library.
8883 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
8884 the register buffer in the heap.
8885 (free_register_cache): If the register buffer isn't owned by the
8886 regcache, don't free it.
8887 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
8888 pre-existing register caches.
8889 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
8890 type.
8891 (convert_ascii_to_int): : Constify `from' parameter type.
8892 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
8893 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
8894 the needed buffer in-place.
8895 (relocate_instruction): New.
8896 * server.c (handle_query) <qSymbols>: If the target supports
8897 tracepoints, give it a chance of looking up symbols. Report
8898 support for fast tracepoints.
8899 (handle_status): Stabilize threads.
8900 (process_serial_event): Adjust.
8901 * server.h (struct fast_tracepoint_jump): Forward declare.
8902 (struct process_info) <fast_tracepoint_jumps>: New field.
8903 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
8904 (decode_X_packet, decode_M_packet): Adjust.
8905 (relocate_instruction): Declare.
8906 (in_process_agent_loaded): Declare.
8907 (tracepoint_look_up_symbols): Declare.
8908 (struct fast_tpoint_collect_status): Declare.
8909 (fast_tracepoint_collecting): Declare.
8910 (force_unlock_trace_buffer): Declare.
8911 (handle_tracepoint_bkpts): Declare.
8912 (initialize_low_tracepoint)
8913 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
8914 * target.h (struct target_ops) <stabilize_threads,
8915 install_fast_tracepoint_jump_pad>: New fields.
8916 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
8917 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
8918 [HAVE_STDINT_H]: Include stdint.h.
8919 (trace_debug_1): Rename to ...
8920 (trace_vdebug): ... this.
8921 (trace_debug): Rename to ...
8922 (trace_debug_1): ... this. Add `level' parameter.
8923 (trace_debug): New.
8924 (ATTR_USED, ATTR_NOINLINE): New.
8925 (IP_AGENT_EXPORT): New.
8926 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8927 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
8928 (about_to_request_buffer_space, trace_buffer_is_full)
8929 (stopping_tracepoint, expr_eval_result, error_tracepoint)
8930 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
8931 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
8932 (traceframe_write_count, traceframes_created)
8933 (trace_state_variables)
8934 New renaming defines.
8935 (struct ipa_sym_addresses): New.
8936 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
8937 (symbol_list): New.
8938 (ipa_sym_addrs): New.
8939 (all_tracepoint_symbols_looked_up): New.
8940 (in_process_agent_loaded): New.
8941 (write_e_ipa_not_loaded): New.
8942 (maybe_write_ipa_not_loaded): New.
8943 (tracepoint_look_up_symbols): New.
8944 (debug_threads) [IN_PROCESS_AGENT]: New.
8945 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
8946 (UNKNOWN_SIDE_EFFECTS): New.
8947 (stop_tracing): New.
8948 (flush_trace_buffer): New.
8949 (stop_tracing_bkpt): New.
8950 (flush_trace_buffer_bkpt): New.
8951 (read_inferior_integer): New.
8952 (read_inferior_uinteger): New.
8953 (read_inferior_data_pointer): New.
8954 (write_inferior_data_pointer): New.
8955 (write_inferior_integer): New.
8956 (write_inferior_uinteger): New.
8957 (struct collect_static_trace_data_action): Delete.
8958 (enum tracepoint_type): New.
8959 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
8960 <actions_str, step_actions, step_actions_str>: Only include in
8961 GDBserver.
fa593d66
PA
8962 <orig_size, obj_addr_on_target, adjusted_insn_addr>
8963 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
8964 (tracepoints): Use IP_AGENT_EXPORT.
8965 (last_tracepoint): Don't include in the IPA.
8966 (stopping_tracepoint): Use IP_AGENT_EXPORT.
8967 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
8968 (alloced_trace_state_variables): New.
8969 (trace_state_variables): Use IP_AGENT_EXPORT.
8970 (traceframe_t): Delete unused variable.
8971 (circular_trace_buffer): Don't include in the IPA.
8972 (trace_buffer_start): Delete.
8973 (struct trace_buffer_control): New.
8974 (trace_buffer_free): Delete.
8975 (struct ipa_trace_buffer_control): New.
8976 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
8977 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
8978 New.
8979 (trace_buffer_ctrl): New.
8980 (TRACE_BUFFER_CTRL_CURR): New.
8981 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
8982 Reimplement as macros.
8983 (trace_buffer_wrap): Delete.
8984 (traceframe_write_count, traceframe_read_count)
8985 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
8986 (struct tracepoint_hit_ctx) <type>: New field.
8987 (struct fast_tracepoint_ctx): New.
8988 (memory_barrier): New.
8989 (cmpxchg): New.
8990 (record_tracepoint_error): Update atomically in the IPA.
8991 (clear_inferior_trace_buffer): New.
8992 (about_to_request_buffer_space): New.
8993 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
8994 updating the same buffer.
8995 (add_tracepoint): Default the tracepoint's type to trap
8996 tracepoint, and orig_size to -1.
8997 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
8998 internal variables.
8999 (create_trace_state_variable): New parameter `gdb'. Handle it.
9000 (clear_installed_tracepoints): Clear fast tracepoint jumps.
9001 (cmd_qtdp): Handle fast tracepoints.
9002 (cmd_qtdv): Adjust.
9003 (max_jump_pad_size): New.
9004 (gdb_jump_pad_head): New.
9005 (get_jump_space_head): New.
9006 (claim_jump_space): New.
9007 (sort_tracepoints): New.
9008 (MAX_JUMP_SIZE): New.
9009 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
9010 IPA.
9011 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
9012 support. Upload fast traceframes, and delete internal IPA
9013 breakpoints.
9014 (stop_tracing_handler): New.
9015 (flush_trace_buffer_handler): New.
9016 (cmd_qtstop): Upload fast tracepoints.
9017 (response_tracepoint): Handle fast tracepoints.
9018 (tracepoint_finished_step): Upload fast traceframes. Set the
9019 tracepoint hit context's tracepoint type.
9020 (handle_tracepoint_bkpts): New.
9021 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
9022 type. Add comment about fast tracepoints.
9023 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
9024 non-existing action_str field.
9025 (get_context_regcache): Handle fast tracepoints.
9026 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
9027 to the regcache.
9028 (fast_tracepoint_from_jump_pad_address): New.
9029 (fast_tracepoint_from_ipa_tpoint_address): New.
9030 (collecting_t): New.
9031 (force_unlock_trace_buffer): New.
9032 (fast_tracepoint_collecting): New.
9033 (collecting): New.
9034 (gdb_collect): New.
9035 (write_inferior_data_ptr): New.
9036 (target_tp_heap): New.
9037 (target_malloc): New.
9038 (download_agent_expr): New.
9039 (UALIGN): New.
9040 (download_tracepoints): New.
9041 (download_trace_state_variables): New.
9042 (upload_fast_traceframes): New.
9043 (IPA_FIRST_TRACEFRAME): New.
9044 (IPA_NEXT_TRACEFRAME_1): New.
9045 (IPA_NEXT_TRACEFRAME): New.
9046 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
9047 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
9048 (gdb_jump_pad_buffer_end): New.
9049 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
9050 (initialize_tracepoint): Adjust.
9051 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
9052 buffer. Initialize the low module.
9053 * utils.c (PREFIX, TOOLNAME): New.
9054 (malloc_failure): Use PREFIX.
9055 (error): In the IPA, an error causes an exit.
9056 (fatal, warning): Use PREFIX.
9057 (internal_error): Use TOOLNAME.
9058 (NUMCELLS): Increase to 10.
9059 * configure, config.in: Regenerate.
9060
d149dd1d
PA
90612010-06-01 Pedro Alves <pedro@codesourcery.com>
9062
9063 * server.c (handle_query) <qSupported>: Do two passes over the
9064 qSupported string to avoid nesting strtok.
9065
f6528abd
JK
90662010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9067
9068 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
9069 (CDEPS): New.
9070 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
9071 -Wl,--dynamic-list.
9072 * configure: Regenerate.
9073 * proc-service.list: New.
9074
ca2a87a0
JK
90752010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9076
9077 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
9078 New comment.
9079
363a6e9f
OS
90802010-05-26 Ozkan Sezer <sezeroz@gmail.com>
9081
9082 * gdbreplay.c (remote_open): Check error return from socket() call by
9083 its equality to -1 not by it being negative.
9084 * remote-utils.c (remote_open): Likewise.
9085
d23b6cb1
PA
90862010-05-23 Pedro Alves <pedro@codesourcery.com>
9087
9088 * config.h: Regenerate.
9089
28d3cf85
MK
90902010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9091
9092 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
9093 doesn't provide PTRACE_GET_THREAD_AREA.
9094
fea36a59
MK
90952010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9096
9097 * linux-m68k-low.c: Include <asm/ptrace.h>
9098 (ps_get_thread_area): Implement.
9099
24b066ba
DE
91002010-05-03 Doug Evans <dje@google.com>
9101
9102 * event-loop.c (struct callback_event): New struct.
9103 (callback_list): New global.
9104 (append_callback_event, delete_callback_event): New functions.
9105 (process_callback): New function.
9106 (start_event_loop): Call it.
9107 * remote-utils.c (NOT_SCHEDULED): Define.
9108 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
9109 moved out of readchar.
9110 (readchar): Rewrite. Call reschedule before returning.
9111 (reset_readchar): New function.
9112 (remote_close): Call it.
9113 (process_remaining, reschedule): New functions.
9114 * server.h (callback_handler_func): New typedef.
9115 (append_callback_event, delete_callback_event): Declare.
9116
9836d6ea
PA
91172010-05-03 Pedro Alves <pedro@codesourcery.com>
9118
9119 * proc-service.c (ps_pglobal_lookup): Use
9120 thread_db_look_up_one_symbol.
9121 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
9122 parameter. Use it instead of all_symbols_looked_up.
9123 * server.h (struct process_info) <all_symbols_looked_up>: Delete
9124 field.
9125 (all_symbols_looked_up): Don't declare.
9126 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
9127 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
9128 field.
9129 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
9130 Set all_symbols_looked_up here.
9131 (thread_db_look_up_one_symbol): New.
9132 (thread_db_get_tls_address): Adjust.
9133 (thread_db_load_search, try_thread_db_load_1): Always allocate the
9134 thread_db object on the heap, and tentatively set it in the
9135 process structure.
9136 (thread_db_init): Don't set all_symbols_looked_up here.
9137 * linux-low.h (thread_db_look_up_one_symbol): Declare.
9138
7984d532
PA
91392010-05-03 Pedro Alves <pedro@codesourcery.com>
9140
9141 * linux-low.c (linux_kill, linux_detach): Adjust.
9142 (status_pending_p_callback): Remove redundant statement. Check
9143 for !TARGET_WAITIKIND_IGNORE, instead of
9144 TARGET_WAITKIND_STOPPED.
9145 (handle_tracepoints): Make sure LWP is locked. Adjust.
9146 (linux_wait_for_event_1): Adjust.
9147 (linux_cancel_breakpoints): New.
9148 (unsuspend_one_lwp): New.
9149 (unsuspend_all_lwps): New.
9150 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
9151 (send_sigstop_callback): Change return type to int, add new
9152 `except' parameter and handle it.
9153 (suspend_and_send_sigstop_callback): New.
9154 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
9155 pass them down. If SUSPEND, also increment the lwp's suspend
9156 count.
9157 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
9158 (need_step_over_p): Don't consider suspended LWPs.
9159 (start_step_over): Adjust.
9160 (proceed_one_lwp): Change return type to int, add new `except'
9161 parameter and handle it.
9162 (unsuspend_and_proceed_one_lwp): New.
9163 (proceed_all_lwps): Use find_inferior instead of
9164 for_each_inferior.
9165 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
9166 also decrement the suspend count of LWPs. Pass `except' down,
9167 instead of hacking its suspend count.
9168 (linux_pause_all): Add `freeze' parameter. Adjust.
9169 (linux_unpause_all): New.
9170 (linux_target_ops): Install linux_unpause_all.
9171 * server.c (handle_status): Adjust.
9172 * target.h (struct target_ops): New fields `unpause_all' and
9173 `cancel_breakpoints'. Add new parameter to `pause_all'.
9174 (pause_all): Add new `freeze' parameter.
9175 (unpause_all): New.
9176 (cancel_breakpoints): New.
9177 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
9178 cancel breakpoints.
9179 (cmd_qtstart): Pause threads.
9180 (stop_tracing): Pause threads, and cancel breakpoints.
9181 * win32-low.c (win32_target_ops): Adjust.
9182
e471f25b
PA
91832010-05-03 Pedro Alves <pedro@codesourcery.com>
9184
9185 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
9186 the inferior right away from here...
9187 (linux_wait_1): ... to here, and adjust to check the thread's
9188 last_resume_kind instead of the lwp's step or stop_expected flags.
9189
1915ef4f
PA
91902010-05-02 Pedro Alves <pedro@codesourcery.com>
9191
9192 * README: Use consistent `GDB' and `GDBserver' spellings.
9193
f9e39928
PA
91942010-05-02 Pedro Alves <pedro@codesourcery.com>
9195
9196 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
9197 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
9198 (linux_detach_one_lwp): Assume the lwp is stopped.
9199 (any_thread_of): Delete.
9200 (linux_detach): Stop all lwps here. Don't blindly delete all
9201 breakpoints.
9202 (delete_lwp_callback): New.
9203 (linux_mourn): Delete all lwps of the process that is gone.
9204 (linux_wait_1): Don't delete the last lwp of the process here.
9205 * mem-break.h (mark_breakpoints_out): Declare.
9206 * mem-break.c (mark_breakpoints_out): New.
9207 (free_all_breakpoints): Use it.
9208 * server.c (handle_target_event): If the process is gone, mark
9209 breakpoints out.
9210 * thread-db.c (struct thread_db) <create_bp>: New field.
9211 (thread_db_enable_reporting): Fix prototype. Store a thread event
9212 breakpoint reference in the thread_db struct.
9213 (thread_db_load_search): Clear the thread_db object.
9214 (try_thread_db_load_1): Ditto.
9215 (switch_to_process): New.
9216 (disable_thread_event_reporting): Use it.
9217 (remove_thread_event_breakpoints): New.
9218 (thread_db_detach, thread_db_mourn): Use it.
9219
1e7fc18c
PA
92202010-05-01 Pedro Alves <pedro@codesourcery.com>
9221
9222 * linux-low.c (linux_enable_event_reporting): New.
9223 (linux_wait_for_event_1, handle_extended_wait): Use it.
9224
02fc4de7
PA
92252010-04-30 Pedro Alves <pedro@codesourcery.com>
9226
9227 * linux-low.c (linux_kill_one_lwp, linux_kill)
9228 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
9229 (send_sigstop): Take an lwp_info as parameter instead. Queue a
9230 SIGSTOP even if the LWP is stopped.
9231 (send_sigstop_callback): New.
9232 (stop_all_lwps): Use send_sigstop_callback instead.
9233 (linux_resume_one_thread): Adjust.
9234 (proceed_one_lwp): Still proceed an LWP that the client has
9235 requested to stop, if we haven't reported it as stopped yet. Make
9236 sure that LWPs the client want stopped, have a pending SIGSTOP.
9237
bc3b5632
DE
92382010-04-26 Doug Evans <dje@google.com>
9239
ae1ada35
DE
9240 * server.c (handle_general_set): Make static.
9241
bc3b5632
DE
9242 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
9243 Print received char after testing for error/eof instead of before.
9244 (input_interrupt): Tweak comment.
9245
65730243
DE
92462010-04-23 Doug Evans <dje@google.com>
9247
9248 * server.c (start_inferior): Print inferior argv if --debug.
9249
a8ae7dc0
AR
92502010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
9251
9252 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
9253 * nto-x86-low.c: Include server.h
9254
1c07cc19
PM
92552010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
9256
9257 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
9258 be consistent with other sources of this directory.
9259 (init_registers_amd64): Correct name of source file of this function
9260 in the comment.
9261
e0a61e09
PM
92622010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9263
9264 * configure.srv (x86_64-*-mingw*): New configuration for Windows
9265 64-bit executables.
9266
54709339
PM
92672010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9268
9269 * win32-i386-low.c: Add 64-bit support.
9270 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
9271 (init_registers_amd64): Declare.
9272 (mappings): Add 64-bit version of array.
9273 (init_windows_x86): New function.
9274 (the_low_target): Change init_arch field to init_windows_x86.
9275
e8f0053d
PM
92762010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9277
9278 * win32-low.c: Adapt to support also 64-bit architecture.
9279 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
9280 (get_image_name): Use SIZE_T type for local variable `done'.
9281 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
9282 (toolhelp_get_dll_name): Idem.
9283 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
9284 Use uintptr_t typecast to avoid warning.
9285 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
9286 (handle_exception): Use phex_nz to avoid warning.
9287 (win32_wait): Remove unused local variable `process'.
9288
c481e77e
PM
92892010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9290
9291 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
9292 `amd64-avx.o'.
9293
12ea4b69
PM
92942010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
9295
9296 * configure.ac: Use `ws2_32' library for srv_mingw.
9297 * configure: Regenerate.
9298 * gdbreplay.c: Include winsock2.h instead of winsock.h.
9299 * remote-utils.c: Likewise.
9300
f6d1620c
L
93012010-04-17 H.J. Lu <hongjiu.lu@intel.com>
9302
9303 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
9304 if __x86_64__ is defined.
9305
8e642873
PM
93062010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
9307
9308 * configure: Regenerate.
9309
711e434b
PM
93102010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
9311
9312 * server.c (handle_query): Handle 'qGetTIBAddr' query.
9313 * target.h (target_ops): New get_tib_address field.
9314 * win32-low.h (win32_thread_info): Add thread_local_base field.
9315 * win32-low.c (child_add_thread): Add tlb argument.
9316 Set thread_local_base field to TLB.
9317 (get_child_debug_event): Adapt to child_add_thread change.
9318 (win32_get_tib_address): New function.
9319 (win32_target_ops): Set get_tib_address field to
9320 win32_get_tib_address.
9321 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
9322
505106cd
PA
93232010-04-12 Pedro Alves <pedro@codesourcery.com>
9324
505106cd
PA
9325 * linux-low.c (linux_mourn): Also remove the process.
9326 * server.c (handle_target_event): Don't remove the process here.
9327 * nto-low.c (nto_mourn): New.
9328 (nto_target_ops): Install it.
9329 * spu-low.c (spu_mourn): New.
9330 (spu_target_ops): Install it.
9331 * win32-low.c (win32_mourn): New.
9332 (win32_target_ops): Install it.
9333
e8470a06
PA
93342010-04-12 Pedro Alves <pedro@codesourcery.com>
9335
9336 * server.h (buffer_xml_printf): Remove redundant `;'.
9337
45ba0d02
PA
93382010-04-12 Pedro Alves <pedro@codesourcery.com>
9339
9340 * regcache.c (set_register_cache): Invalidate regcaches before
9341 changing the register cache layout.
9342 (regcache_invalidate_one): Allow a NULL regcache.
9343 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
9344 regcaches before changing the register cache layout or the target
9345 regsets.
9346
59e04013
L
93472010-04-12 H.J. Lu <hongjiu.lu@intel.com>
9348
9349 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
9350 variable warning on Linux/x86-64.
9351
8336d594
PA
93522010-04-11 Pedro Alves <pedro@codesourcery.com>
9353
9354 GDBserver disconnected tracing support.
9355
9356 * linux-low.c (linux_remove_process): Delete.
9357 (add_lwp): Don't set last_resume_kind here.
9358 (linux_kill): Use `mourn'.
9359 (linux_detach): Use `thread_db_detach', and `mourn'.
9360 (linux_mourn): New.
9361 (linux_attach_lwp_1): Adjust comment.
9362 (linux_attach): last_resume_kind moved the thread_info; adjust.
9363 (status_pending_p_callback): Adjust.
9364 (linux_wait_for_event_1): Adjust.
9365 (count_events_callback, select_singlestep_lwp_callback)
9366 (select_event_lwp_callback, cancel_breakpoints_callback)
9367 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
9368 (proceed_one_lwp): Adjust.
9369 (linux_async): Add debug output.
9370 (linux_thread_stopped): New.
9371 (linux_pause_all): New.
9372 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
9373 linux_pause_all.
9374 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
9375 (thread_db_free): Delete declaration.
9376 (thread_db_detach, thread_db_mourn): Declare.
9377 * thread-db.c (thread_db_init): Use thread_db_mourn.
9378 (thread_db_free): Delete, split in two.
9379 (disable_thread_event_reporting): New.
9380 (thread_db_detach): New.
9381 (thread_db_mourn): New.
9382
9383 * server.h (struct thread_info) <last_resume_kind>: New field.
9384 <attached>: Add comment.
9385 <gdb_detached>: New field.
9386 (handler_func): Change return type to int.
9387 (handle_serial_event, handle_target_event): Ditto.
9388 (gdb_connected): Declare.
9389 (tracing): Delete.
9390 (disconnected_tracing): Declare.
9391 (stop_tracing): Declare.
9392
9393 * server.c (handle_query) <qSupported>: Report support for
9394 disconnected tracing.
9395 (queue_stop_reply_callback): Account for running threads.
9396 (gdb_wants_thread_stopped): New.
9397 (gdb_wants_all_threads_stopped): New.
9398 (gdb_reattached_process): New.
9399 (handle_status): Clear the `gdb_detached' flag of all processes.
9400 In all-stop, stop all threads.
9401 (main): Be sure to leave tfind mode. Handle disconnected tracing.
9402 (process_serial_event): If the remote connection breaks, or if an
9403 exit was forced with "monitor exit", force an event loop exit.
9404 Handle disconnected tracing on detach.
9405 (handle_serial_event): Adjust.
9406 (handle_target_event): If GDB isn't connected, forward events back
9407 to the inferior, unless the last process exited, in which case,
9408 exit gdbserver. Adjust interface.
9409
9410 * remote-utils.c (remote_open): Don't block in accept. Instead
9411 register an event loop source on the listen socket file
9412 descriptor. Refactor bits into ...
9413 (listen_desc): ... this new global.
9414 (gdb_connected): ... this new function.
9415 (enable_async_notification): ... this new function.
9416 (handle_accept_event): ... this new function.
9417 (remote_close): Clear remote_desc.
9418
9419 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
9420
9421 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
9422 New fields.
9423 (mourn_inferior): Define.
9424 (target_process_qsupported): Avoid the dangling else problem.
9425 (thread_stopped): Define.
9426 (pause_all): Define.
9427 (target_waitstatus_to_string): Declare.
9428 * target.c (target_waitstatus_to_string): New.
9429
9430 * tracepoint.c (tracing): Make extern.
9431 (disconnected_tracing): New.
9432 (stop_tracing): Make extern. Handle tracing stops due to GDB
9433 disconnecting.
9434 (cmd_qtdisconnected): New.
9435 (cmd_qtstatus): Report disconnected tracing status in trace reply.
9436 (handle_tracepoint_general_set): Handle QTDisconnected.
9437
9438 * event-loop.c (event_handler_func): Change return type to int.
9439 (process_event): Bail out if the event handler wants the event
9440 loop to stop.
9441 (handle_file_event): Ditto.
9442 (start_event_loop): Bail out if the event handler wants the event
9443 loop to stop.
9444
9445 * nto-low.c (nto_target_ops): Adjust.
9446 * spu-low.c (spu_wait): Don't remove the process here.
9447 (spu_target_ops): Adjust.
9448 * win32-low.c (win32_wait): Don't remove the process here.
9449 (win32_target_ops): Adjust.
9450
5d267c4c
PA
94512010-04-11 Pedro Alves <pedro@codesourcery.com>
9452
9453 * regcache.c (realloc_register_cache): Invalidate inferior's
9454 regcache before recreating it.
9455
623ccd72
PA
94562010-04-09 Pedro Alves <pedro@codesourcery.com>
9457
9458 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
9459
219f2f23
PA
94602010-04-09 Stan Shebs <stan@codesourcery.com>
9461 Pedro Alves <pedro@codesourcery.com>
9462
9463 * server.h (LONGEST): New.
9464 (struct thread_info) <while_stepping>: New field.
9465 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
9466 Declare.
9467 (initialize_tracepoint, handle_tracepoint_general_set)
9468 (handle_tracepoint_query, tracepoint_finished_step)
9469 (tracepoint_was_hit, release_while_stepping_state_list):
9470 (current_traceframe): Declare.
9471 * server.c (handle_general_set): Handle tracepoint packets.
9472 (read_memory): New.
9473 (write_memory): New.
9474 (handle_search_memory_1): Use read_memory.
9475 (handle_query): Report support for conditional tracepoints, trace
9476 state variables, and tracepoint sources. Handle tracepoint
9477 queries.
9478 (main): Initialize the tracepoints module.
9479 (process_serial_event): Handle traceframe reads/writes.
9480
9481 * linux-low.c (handle_tracepoints): New.
9482 (linux_wait_1): Call it.
9483 (linux_resume_one_lwp): Handle while-stepping.
9484 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
9485 (linux_target_ops): Install them.
9486 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
9487 New field.
9488 * linux-x86-low.c (x86_supports_tracepoints): New.
9489 (the_low_target). Install it.
9490
9491 * mem-break.h (delete_breakpoint): Declare.
9492 * mem-break.c (delete_breakpoint): Make external.
9493
9494 * target.h (struct target_ops): Add `supports_tracepoints',
9495 `read_pc', and `write_pc' fields.
9496 (target_supports_tracepoints): Define.
9497 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
9498 (phex_nz): New.
9499
9500 * regcache.h (struct regcache) <registers_owned>: New field.
9501 (init_register_cache, regcache_cpy): Declare.
9502 (regcache_read_pc, regcache_write_pc): Declare.
9503 (register_cache_size): Declare.
9504 (supply_regblock): Declare.
9505 * regcache.c (init_register_cache): New.
9506 (new_register_cache): Use it.
9507 (regcache_cpy): New.
9508 (register_cache_size): New.
9509 (supply_regblock): New.
9510 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 9511
219f2f23
PA
9512 * tracepoint.c: New.
9513
9514 * Makefile.in (OBS): Add tracepoint.o.
9515 (tracepoint.o): New rule.
9516
3a13a53b
L
95172010-04-08 H.J. Lu <hongjiu.lu@intel.com>
9518
9519 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
9520 (i386-mmx.o): New.
9521 (i386-mmx.c): Likewise.
9522 (i386-mmx-linux.o): Likewise.
9523 (i386-mmx-linux.c): Likewise.
9524
9525 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
9526 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
9527 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
9528 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
9529
9530 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
9531 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
9532 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
9533
1570b33e
L
95342010-04-07 H.J. Lu <hongjiu.lu@intel.com>
9535
9536 * Makefile.in (clean): Updated.
9537 (i386-avx.o): New.
9538 (i386-avx.c): Likewise.
9539 (i386-avx-linux.o): Likewise.
9540 (i386-avx-linux.c): Likewise.
9541 (amd64-avx.o): Likewise.
9542 (amd64-avx.c): Likewise.
9543 (amd64-avx-linux.o): Likewise.
9544 (amd64-avx-linux.c): Likewise.
9545
9546 * configure.srv (srv_i386_regobj): Add i386-avx.o.
9547 (srv_i386_linux_regobj): Add i386-avx-linux.o.
9548 (srv_amd64_regobj): Add amd64-avx.o.
9549 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
9550 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
9551 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
9552 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
9553 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
9554 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
9555 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
9556
9557 * i387-fp.c: Include "i386-xstate.h".
9558 (i387_xsave): New.
9559 (i387_cache_to_xsave): Likewise.
9560 (i387_xsave_to_cache): Likewise.
9561 (x86_xcr0): Likewise.
9562
9563 * i387-fp.h (i387_cache_to_xsave): Likewise.
9564 (i387_xsave_to_cache): Likewise.
9565 (x86_xcr0): Likewise.
9566
9567 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
9568 * linux-crisv32-low.c (target_regsets): Likewise.
9569 * linux-m68k-low.c (target_regsets): Likewise.
9570 * linux-mips-low.c (target_regsets): Likewise.
9571 * linux-ppc-low.c (target_regsets): Likewise.
9572 * linux-s390-low.c (target_regsets): Likewise.
9573 * linux-sh-low.c (target_regsets): Likewise.
9574 * linux-sparc-low.c (target_regsets): Likewise.
9575 * linux-xtensa-low.c (target_regsets): Likewise.
9576
9577 * linux-low.c: Include <sys/uio.h>.
9578 (regsets_fetch_inferior_registers): Support nt_type.
9579 (regsets_store_inferior_registers): Likewise.
9580 (linux_process_qsupported): New.
9581 (linux_target_ops): Add linux_process_qsupported.
9582
9583 * linux-low.h (regset_info): Add nt_type.
9584 (linux_target_ops): Add process_qsupported.
9585
9586 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
9587 and <sys/uio.h>.
9588 (init_registers_i386_avx_linux): New.
9589 (init_registers_amd64_avx_linux): Likewise.
9590 (xmltarget_i386_linux_no_xml): Likewise.
9591 (xmltarget_amd64_linux_no_xml): Likewise.
9592 (PTRACE_GETREGSET): Likewise.
9593 (PTRACE_SETREGSET): Likewise.
9594 (x86_fill_xstateregset): Likewise.
9595 (x86_store_xstateregset): Likewise.
9596 (use_xml): Likewise.
9597 (x86_linux_update_xmltarget): Likewise.
9598 (x86_linux_process_qsupported): Likewise.
9599 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
9600 (x86_arch_setup): Don't call init_registers_amd64_linux nor
9601 init_registers_i386_linux here. Call
9602 x86_linux_update_xmltarget.
9603 (the_low_target): Add x86_linux_process_qsupported.
9604
9605 * server.c (handle_query): Call target_process_qsupported.
9606
9607 * target.h (target_ops): Add process_qsupported.
9608 (target_process_qsupported): New.
9609
fc7238bb
PA
96102010-04-03 Pedro Alves <pedro@codesourcery.com>
9611
9612 * inferiors.c (add_thread): Set last_status kind to
9613 TARGET_WAITKIND_IGNORE.
9614 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
9615 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
9616 (linux_wait_1): Move `thread' local definition to block that uses
9617 it. Don't NULL initialize `event_child'.
9618 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
9619 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
9620 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
9621
bdabb078
PA
96222010-04-01 Pedro Alves <pedro@codesourcery.com>
9623
9624 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
9625 an extended waitstatus, or by a watchpoint.
9626 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
9627 thread was stepping or has been stopped by a watchpoint.
9628
d3bbe7a0
PA
96292010-04-01 Pedro Alves <pedro@codesourcery.com>
9630
9631 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
9632 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
9633 of another, then delete the previous, and validate all
9634 breakpoints.
9635 (validate_inserted_breakpoint): New.
9636 (delete_disabled_breakpoints): New.
9637 (validate_breakpoints): New.
9638 (check_mem_read): Validate breakpoints before trusting their
9639 shadow. Delete disabled breakpoints.
9640 (check_mem_write): Validate breakpoints before trusting they
9641 should be inserted. Delete disabled breakpoints.
9642 * mem-break.h (validate_breakpoints):
9643 * server.c (handle_query): Validate breakpoints when we see a
9644 qSymbol query.
9645
8b07ae33
PA
96462010-04-01 Pedro Alves <pedro@codesourcery.com>
9647
9648 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
9649 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
9650 if we could tell there's a GDB breakpoint at stop_pc.
9651 (need_step_over_p): Don't do a step over if we find a GDB
9652 breakpoint at the resume PC.
9653
9654 * mem-break.c (struct raw_breakpoint): New.
9655 (enum bkpt_type): New type `gdb_breakpoint'.
9656 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
9657 fields. New field `raw'.
9658 (find_raw_breakpoint_at): New.
9659 (set_raw_breakpoint_at): Handle refcounting. Create a raw
9660 breakpoint instead.
9661 (set_breakpoint_at): Adjust.
9662 (delete_raw_breakpoint): New.
9663 (release_breakpoint): New.
9664 (delete_breakpoint): Rename to...
9665 (delete_breakpoint_1): ... this. Add proc parameter. Use
9666 release_breakpoint. Return ENOENT.
9667 (delete_breakpoint): Reimplement.
9668 (find_breakpoint_at): Delete.
9669 (find_gdb_breakpoint_at): New.
9670 (delete_breakpoint_at): Delete.
9671 (set_gdb_breakpoint_at): New.
9672 (delete_gdb_breakpoint_at): New.
9673 (gdb_breakpoint_here): New.
9674 (set_reinsert_breakpoint): Use release_breakpoint.
9675 (uninsert_breakpoint): Rename to ...
9676 (uninsert_raw_breakpoint): ... this.
9677 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
9678 (reinsert_raw_breakpoint): Change parameter type to
9679 raw_breakpoint.
9680 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
9681 instead.
9682 (check_breakpoints): Adjust. Use release_breakpoint.
9683 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
9684 (breakpoint_inserted_here): Ditto.
9685 (check_mem_read): Adjust to iterate over raw breakpoints instead.
9686 Don't trust the breakpoint's shadow if it is not inserted.
9687 (check_mem_write): Adjust to iterate over raw breakpoints instead.
9688 (delete_all_breakpoints): Adjust.
9689 (free_all_breakpoints): Mark all breakpoints as uninserted, and
9690 use delete_breakpoint_1.
9691
9692 * mem-break.h (breakpoints_supported): Delete declaration.
9693 (set_gdb_breakpoint_at): Declare.
9694 (gdb_breakpoint_here): Declare.
9695 (delete_breakpoint_at): Delete.
9696 (delete_gdb_breakpoint_at): Declare.
9697
9698 * server.h (struct raw_breakpoint): Forward declare.
9699 (struct process_info): New field `raw_breakpoints'.
9700
9701 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
9702 breakpoints.
9703
6bf5e0ba
PA
97042010-03-24 Pedro Alves <pedro@codesourcery.com>
9705
9706 * linux-low.c (status_pending_p_callback): Fix comment.
9707 (linux_wait_for_event_1): Move most of the internal breakpoint
9708 handling from here...
9709 (linux_wait_1): ... to here.
9710 (count_events_callback): New.
9711 (select_singlestep_lwp_callback): New.
9712 (select_event_lwp_callback): New.
9713 (cancel_breakpoints_callback): New.
9714 (select_event_lwp): New.
9715 (linux_wait_1): Simplify internal breakpoint handling. Give equal
9716 priority to all LWPs that have had events that should be reported
9717 to the client. Cancel breakpoints when about to reporting the
9718 event to the client, not while stopping lwps. No longer cancel
9719 finished single-steps here.
9720 (cancel_finished_single_step): Delete.
9721 (cancel_finished_single_steps): Delete.
9722
414a389f
PA
97232010-03-24 Pedro Alves <pedro@codesourcery.com>
9724
9725 * mem-break.c (enum bkpt_type): New.
9726 (struct breakpoint): New field `type'.
9727 (set_breakpoint_at): Change return type to struct breakpoint
9728 pointer. Set type to `other_breakpoint' by default.
9729 (delete_breakpoint): Rewrite, supporting more than one breakpoint
9730 in the breakpoint list.
9731 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
9732 (reinsert_breakpoint): Rename to ...
9733 (reinsert_raw_breakpoint): ... this.
9734 (reinsert_breakpoints_at): Adjust.
9735 * mem-break.h (struct breakpoint): Declare.
9736 (set_breakpoint_at): Change return type to struct breakpoint
9737 pointer.
9738
2280c721
PA
97392010-03-24 Pedro Alves <pedro@codesourcery.com>
9740
9741 * server.c (handle_query): Assign, not compare.
9742
d50171e4
PA
97432010-03-24 Pedro Alves <pedro@codesourcery.com>
9744
9745 Teach linux gdbserver to step-over-breakpoints.
9746
9747 * linux-low.c (can_hardware_single_step): New.
9748 (supports_breakpoints): New.
9749 (handle_extended_wait): If stopping threads, read the stop pc of
9750 the new cloned LWP.
9751 (get_pc): New.
9752 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
9753 low target doesn't support retrieving the PC.
9754 (add_lwp): Set last_resume_kind to resume_continue.
9755 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
9756 (linux_attach): Don't clear stop_expected. Set the lwp's
9757 last_resume_kind to resume_stop.
9758 (linux_detach_one_lwp): Don't check for removed breakpoints.
9759 (check_removed_breakpoint): Delete.
9760 (status_pending_p): Rename to ...
9761 (status_pending_p_callback): ... this. Don't check for removed
9762 breakpoints. Don't consider threads that are stopped from GDB's
9763 perspective.
9764 (linux_wait_for_lwp): Always read the stop_pc here.
9765 (cancel_breakpoint): New.
9766 (step_over_bkpt): New global.
9767 (linux_wait_for_event_1): Implement stepping over breakpoints.
9768 (gdb_wants_lwp_stopped): New.
9769 (gdb_wants_all_stopped): New.
9770 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
9771 single-step traps here. Store the thread's last reported target
9772 wait status.
9773 (send_sigstop): Don't clear stop_expected. Always set it,
9774 instead.
9775 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
9776 (cancel_finished_single_step): New.
9777 (cancel_finished_single_steps): New.
9778 (wait_for_sigstop): Don't cancel finished single-step traps here.
9779 (linux_resume_one_lwp): Don't check for removed breakpoints.
9780 Don't set `step' on non-hardware step archs.
9781 (linux_set_resume_request): Ignore resume_stop requests if already
9782 stopping or stopped. Set the lwp's last_resume_kind.
9783 (resume_status_pending_p): Don't check for removed breakpoints.
9784 (need_step_over_p): New.
9785 (start_step_over): New.
9786 (finish_step_over): New.
9787 (linux_resume_one_thread): Always queue a sigstop for resume_stop
9788 requests. Clear the thread's last reported target waitstatus.
9789 Don't use the `suspended' flag. Don't consider pending breakpoints.
9790 (linux_resume): Start a step-over if necessary.
9791 (proceed_one_lwp): New.
9792 (proceed_all_lwps): New.
9793 (unstop_all_lwps): New.
9794 * linux-low.h (struct lwp_info): Rewrite comment for the
9795 `suspended' flag. Add the `stop_pc' field. Delete the
9796 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
9797 Add `'last_resume_kind' and `need_step_over' fields.
9798 * inferiors.c (struct thread_info): Delete, moved elsewhere.
9799 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
9800 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
9801 (set_raw_breakpoint_at): New.
9802 (set_breakpoint_at): Rewrite to use it.
9803 (reinsert_breakpoint_handler): Delete.
9804 (set_reinsert_breakpoint): New.
9805 (reinsert_breakpoint_by_bp): Delete.
9806 (delete_reinsert_breakpoints): New.
9807 (uninsert_breakpoint): Rewrite.
9808 (uninsert_breakpoints_at): New.
9809 (reinsert_breakpoint): Rewrite.
9810 (reinsert_breakpoints_at): New.
9811 (check_breakpoints): Rewrite.
9812 (breakpoint_here): New.
9813 (breakpoint_inserted_here): New.
9814 (check_mem_read): Adjust.
9815 * mem-break.h (breakpoints_supported, breakpoint_here)
9816 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
9817 (reinsert_breakpoint_by_bp): Delete declaration.
9818 (delete_reinsert_breakpoints): Declare.
9819 (reinsert_breakpoint): Delete declaration.
9820 (reinsert_breakpoints_at): Declare.
9821 (uninsert_breakpoint): Delete declaration.
9822 (uninsert_breakpoints_at): Declare.
9823 (check_breakpoints): Adjust prototype.
9824 * server.h: Adjust include order.
9825 (struct thread_info): Declare here. Add a `last_status' field.
9826
30ba68cb
MS
98272010-03-23 Michael Snyder <msnyder@vmware.com>
9828
9829 * server.c (crc32): New function.
9830 (handle_query): Add handling for 'qCRC:' request.
9831
b9a881c2
PA
98322010-03-23 Pedro Alves <pedro@codesourcery.com>
9833
9834 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
9835 lwp had been stopped by a watchpoint.
9836
e92d13d5
PA
98372010-03-16 Pedro Alves <pedro@codesourcery.com>
9838
9839 * server.h (internal_error): Declare.
9840 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
9841 * utils.c (internal_error): New function.
9842
64daa791
AS
98432010-03-15 Andreas Schwab <schwab@redhat.com>
9844
9845 * configure.srv: Fix typo setting srv_regobj.
9846
f52cd8cd
PA
98472010-03-15 Pedro Alves <pedro@codesourcery.com>
9848
9849 * linux-low.c (fetch_register): Avoid passing a non string literal
9850 format to `error'.
9851 (usr_store_inferior_registers): Ditto.
9852
93ae6fdc
PA
98532010-03-14 Pedro Alves <pedro@codesourcery.com>
9854
9855 * linux-low.c (linux_write_memory): Bail out early if peeking
9856 memory failed.
9857
c3adc08c
PA
98582010-03-14 Pedro Alves <pedro@codesourcery.com>
9859
9860 * linux-low.h (struct lwp_info): New fields
9861 `stopped_by_watchpoint' and `stopped_data_address'.
9862 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
9863 here, and cache them in the lwp object.
9864 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
9865 directly.
9866 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
9867 field.
9868 (linux_stopped_by_watchpoint): Rewrite.
9869 (linux_stopped_data_address): Rewrite.
9870
bce522a2
PA
98712010-03-06 Simo Melenius <simo.melenius@iki.fi>
9872
9873 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
9874 switching the current inferior, not before.
9875
90884b2b
L
98762010-03-01 H.J. Lu <hongjiu.lu@intel.com>
9877
9878 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
9879 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
9880 i386-linux.c and amd64-linux.c.
9881 (reg-i386.o): Removed.
9882 (reg-i386.c): Likewise.
9883 (reg-i386-linux.o): Likewise.
9884 (reg-i386-linux.c): Likewise.
9885 (reg-x86-64.o): Likewise.
9886 (reg-x86-64.c): Likewise.
9887 (reg-x86-64-linux.o): Likewise.
9888 (reg-x86-64-linux.c): Likewise.
9889 (i386.o): New.
9890 (i386.c): Likewise.
9891 (i386-linux.o): Likewise.
9892 (i386-linux.c): Likewise.
9893 (amd64.o): Likewise.
9894 (amd64.c): Likewise.
9895 (amd64-linux.o): Likewise.
9896 (amd64-linux.c): Likewise.
9897
9898 * configure.srv (srv_i386_regobj): New.
9899 (srv_i386_linux_regobj): Likewise.
9900 (srv_amd64_regobj): Likewise.
9901 (srv_amd64_linux_regobj): Likewise.
9902 (srv_i386_32bit_xmlfiles): Likewise.
9903 (srv_i386_64bit_xmlfiles): Likewise.
9904 (srv_i386_xmlfiles): Likewise.
9905 (srv_amd64_xmlfiles): Likewise.
9906 (srv_i386_linux_xmlfiles): Likewise.
9907 (srv_amd64_linux_xmlfiles): Likewise.
9908 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
9909 srv_xmlfiles to $srv_i386_xmlfiles.
9910 (i[34567]86-*-mingw32ce*): Likewise.
9911 (i[34567]86-*-mingw*): Likewise.
9912 (i[34567]86-*-nto*): Likewise.
9913 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
9914 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
9915 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
9916 (x86_64-*-linux*): Likewise.
9917
9918 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
9919 (init_registers_amd64_linux): New.
9920 (x86_arch_setup): Replace init_registers_x86_64_linux with
9921 init_registers_amd64_linux.
9922
193f13e6
MK
99232010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
9924
9925 * configure.ac: Check for libdl. If it is not available link against
9926 static libthread_db.
9927 * configure: Regenerate.
9928
85d721b8
PA
99292010-02-22 Pedro Alves <pedro@codesourcery.com>
9930
9931 PR9605
9932
9933 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
9934 handing a read watchpoint.
9935 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
9936
6076632b
DE
99372010-02-12 Doug Evans <dje@google.com>
9938
9939 * linux-low.c (linux_supports_tracefork_flag): Document.
9940 (linux_look_up_symbols): Add comment.
9941
3327ccf7
L
99422010-02-03 H.J. Lu <hongjiu.lu@intel.com>
9943
9944 * regcache.c (supply_register): Clear regcache if buf is NULL.
9945
0718675c 99462010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 9947 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
9948
9949 * inferiors.c (find_inferior): Add function documentation.
9950 (unloaded_dll): Handle the case where the unloaded dll has not
9951 been previously registered in the dll list.
9952
177321bd
DJ
99532010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9954
9955 * linux-arm-low.c (thumb_breakpoint_len): Delete.
9956 (thumb2_breakpoint): New.
9957 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
9958
2b009048
DJ
99592010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9960
9961 * linux-low.c (get_stop_pc): Check for SIGTRAP.
9962 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
9963 breakpoints.
9964
3be029c7
PA
99652010-01-21 Pedro Alves <pedro@codesourcery.com>
9966
9967 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
9968
18f5de3b
JK
99692010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9970
9971 * linux-s390-low.c (s390_collect_ptrace_register)
9972 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
9973
3743bb4f
DE
99742010-01-21 Doug Evans <dje@google.com>
9975
14ce3065
DE
9976 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
9977 (PTRACE_ARG4_TYPE): New macro.
9978 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
9979 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
9980 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
9981 (usr_store_inferior_registers): Ditto.
9982 (linux_read_memory, linux_write_memory): Ditto.
9983 (linux_test_for_tracefork): Ditto.
9984
3743bb4f
DE
9985 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
9986 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
9987
8b315be5
PA
99882010-01-21 Pedro Alves <pedro@codesourcery.com>
9989
9990 * proc-service.c (ps_lgetregs): Don't refetch registers from the
9991 target.
9992
85492558
PA
99932010-01-21 Pedro Alves <pedro@codesourcery.com>
9994
9995 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
9996 prototype to take a regcache. Adjust.
9997
442ea881
PA
99982010-01-20 Pedro Alves <pedro@codesourcery.com>
9999
10000 * regcache.h (struct thread_info): Forward declare.
10001 (struct regcache): New.
10002 (new_register_cache): Adjust prototype.
10003 (get_thread_regcache): Declare.
10004 (free_register_cache): Adjust prototype.
10005 (registers_to_string, registers_from_string): Ditto.
10006 (supply_register, supply_register_by_name, collect_register)
10007 (collect_register_as_string, collect_register_by_name): Ditto.
10008 * regcache.c (struct inferior_regcache_data): Delete.
10009 (get_regcache): Rename to ...
10010 (get_thread_regcache): ... this. Adjust. Switch inferior before
10011 fetching registers.
10012 (regcache_invalidate_one): Adjust.
10013 (regcache_invalidate): Fix prototype.
10014 (new_register_cache): Return the new register cache.
10015 (free_register_cache): Change prototype.
10016 (realloc_register_cache): Adjust.
10017 (registers_to_string): Change prototype to take a regcache. Adjust.
10018 (registers_from_string): Ditto.
10019 (register_data): Ditto.
10020 (supply_register): Ditto.
10021 (supply_register_by_name): Ditto.
10022 (collect_register): Ditto.
10023 (collect_register_as_string): Ditto.
10024 (collect_register_by_name): Ditto.
10025 * server.c (process_serial_event): Adjust.
10026 * linux-low.h (regset_fill_func, regset_store_func): Change
10027 prototype.
10028 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
10029 Change prototype.
10030 * linux-low.c (get_stop_pc): Adjust.
10031 (check_removed_breakpoint): Adjust.
10032 (linux_wait_for_event): Adjust.
10033 (linux_resume_one_lwp): Adjust.
10034 (fetch_register): Add regcache parameter. Adjust.
10035 (usr_store_inferior_registers): Ditto.
10036 (regsets_fetch_inferior_registers): Ditto.
10037 (regsets_store_inferior_registers): Ditto.
10038 (linux_fetch_registers, linux_store_registers): Ditto.
10039 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
10040 regcache. Adjust.
43aaf8b6
PA
10041 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
10042 Ditto.
442ea881
PA
10043 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
10044 prototype to take a regcache.
10045 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
10046 * remote-utils.c (convert_ascii_to_int, outreg)
10047 (prepare_resume_reply): Change prototype to take a regcache.
10048 Adjust.
10049 * target.h (struct target_ops) <fetch_registers, store_registers>:
10050 Change prototype to take a regcache.
10051 (fetch_inferior_registers, store_inferior_registers): Change
10052 prototype to take a regcache. Adjust.
10053 * proc-service.c (ps_lgetregs): Adjust.
10054 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
10055 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
10056 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
10057 take a regcache. Adjust.
10058 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
10059 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
10060 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
10061 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
10062 * linux-cris-low.c (cris_get_pc, cris_set_pc)
10063 (cris_cannot_fetch_register):
10064 (cris_breakpoint_at): Change prototype to take a regcache.
10065 Adjust.
10066 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
10067 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
10068 to take a regcache. Adjust.
10069 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
10070 Adjust.
10071 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
10072 take a regcache. Adjust.
10073 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
10074 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
10075 (m68k_set_pc): Change prototype to take a regcache. Adjust.
10076 * linux-mips-low.c (mips_get_pc):
10077 (mips_set_pc): Change prototype to take a regcache. Adjust.
10078 (mips_reinsert_addr): Adjust.
10079 (mips_collect_register): Change prototype to take a regcache.
10080 Adjust.
10081 (mips_supply_register):
10082 (mips_collect_register_32bit, mips_supply_register_32bit)
10083 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10084 (mips_store_fpregset): Ditto.
43aaf8b6
PA
10085 * linux-ppc-low.c (ppc_supply_ptrace_register)
10086 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
10087 (parse_spufs_run): Adjust.
10088 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
10089 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
10090 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
10091 take a regcache. Adjust.
10092 * linux-s390-low.c (s390_collect_ptrace_register)
10093 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
10094 (s390_set_pc): Change prototype to take a regcache. Adjust.
10095 (s390_arch_setup): Adjust.
10096 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
10097 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
10098 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10099 (sparc_fill_gregset, sparc_store_gregset_from_stack)
10100 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
10101 regcache. Adjust.
10102 (sparc_breakpoint_at): Adjust.
10103 * linux-xtensa-low.c (xtensa_fill_gregset):
10104 (xtensa_store_gregset):
10105 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
10106 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
10107 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
10108 prototype to take a regcache. Adjust.
10109 * win32-arm-low.c (arm_fetch_inferior_register)
10110 (arm_store_inferior_register): Change prototype to take a
10111 regcache. Adjust.
10112 * win32-i386-low.c (i386_fetch_inferior_register)
10113 (i386_store_inferior_register): Change prototype to take a
10114 regcache. Adjust.
10115 * win32-low.c (child_fetch_inferior_registers)
10116 (child_store_inferior_registers): Change prototype to take a
10117 regcache. Adjust.
10118 (win32_wait): Adjust.
10119 (win32_fetch_inferior_registers): Change prototype to take a
10120 regcache. Adjust.
10121 (win32_store_inferior_registers): Adjust.
10122 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
10123 store_inferior_register>: Change prototype to take a regcache.
10124
60c3d7b0
DE
101252010-01-20 Doug Evans <dje@google.com>
10126
10127 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
10128 #ifdef.
10129 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 10130 (W_STOPCODE): Provide definition if missing.
60c3d7b0 10131
dc146f7c
VP
101322010-01-13 Vladimir Prus <vladimir@codesourcery.com>
10133
10134 * linux-low.c (linux_core_of_thread): New.
10135 (compare_ints, show_process, list_threads): New.
10136 (linux_qxfer_osdata): Report threads and cores.
10137 (linux_target_op): Register linux_core_of_thread.
10138 * remote-utils.c (prepare_resume_reply): Report the core.
10139 (buffer_xml_printf): Support %d specifier.
10140 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
10141 New.
10142 (handle_query): Handle qXfer:threads. Announce availability
10143 thereof.
10144 * target.h (struct target_ops): New field core_of_thread.
10145
7803799a
UW
101462010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
10147
10148 * Makefile.in (clean): Remove new generated files.
10149 (reg-s390.o, reg-s390.c): Remove rules.
10150 (reg-s390x.o, reg-s390x.c): Likewise.
10151 (s390-linux32.o, s390-linux32.c): Add rules.
10152 (s390-linux64.o, s390-linux64.c): Likewise.
10153 (s390x-linux64.o, s390x-linux64.c): Likewise.
10154 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
10155 * linux-s390-low.c: Include <elf.h>.
10156 (HWCAP_S390_HIGH_GPRS): Define if undefined.
10157 (init_registers_s390): Remove prototype.
10158 (init_registers_s390x): Likewise.
10159 (init_registers_s390_linux32): Add prototype.
10160 (init_registers_s390_linux64): Likewise.
10161 (init_registers_s390x_linux64): Likewise.
10162 (s390_num_regs_3264): New define.
10163 (s390_regmap_3264): New global variable.
10164 (s390_cannot_fetch_register): Remove obsolete check.
10165 (s390_cannot_store_register): Likewise.
10166 (s390_collect_ptrace_register): Handle upper/lower register halves.
10167 (s390_supply_ptrace_register): Likewise.
10168 (s390_fill_gregset): Update to register number changes.
10169 (s390_get_hwcap): New routine.
10170 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
10171 Install appropriate regmap and register set.
10172
6e7ffa39
JB
101732010-01-01 Joel Brobecker <brobecker@adacore.com>
10174
10175 * server.c (gdbserver_version): Update copyright year to 2010.
10176 * gdbreplay.c (gdbreplay_version): Likewise.
10177
957f3f49
DE
101782009-12-28 Doug Evans <dje@google.com>
10179
10180 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
10181 elf/external.h. Include <elf.h> instead but only if necessary.
10182
ca5c370d
PA
101832009-12-28 Pedro Alves <pedro@codesourcery.com>
10184
10185 * linux-low.c (linux_remove_process): Remove `detaching'
10186 parameter. Don't release/detach from thread_db here.
10187 (linux_kill): Release/detach from thread_db here, ...
10188 (linux_detach): ... and here, before actually detaching.
10189 (linux_wait_1): ... and here, when a process exits.
10190 * thread-db.c (any_thread_of): New.
10191 (thread_db_free): Switch the current inferior to a thread of the
10192 passed in process.
10193
4ee62156
DE
101942009-12-21 Doug Evans <dje@google.com>
10195
d90e6a88
DE
10196 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
10197
c5f62d5f
DE
10198 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
10199 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
10200 warning ifndef __NR_tkill. Move setting of errno there too.
10201 Delete unnecessary resetting of errno after syscall.
10202 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
10203
10e86dd7
DE
10204 * configure.ac: Check for dladdr.
10205 * config.in: Regenerate.
10206 * configure: Regenerate.
10207 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
10208 (try_thread_db_load): Update.
10209
4ee62156
DE
10210 * linux-low.c (my_waitpid): Delete unnecessary prototype.
10211
00f515da
DE
102122009-12-18 Doug Evans <dje@google.com>
10213
e9464885
DE
10214 * event-loop.c: Include unistd.h if it exists.
10215
07d4f67e
DE
10216 * linux-low.c (my_waitpid): Move definition away from being in
10217 between linux_tracefork_child/linux_test_for_tracefork.
10218
00f515da
DE
10219 * gdb_proc_service.h (psaddr_t): Fix type.
10220 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
10221 signature to match glibc.
10222
1de1badb
DE
102232009-12-16 Doug Evans <dje@google.com>
10224
10225 * linux-low.c (linux_read_memory): Fix argument to read.
10226
aeeb81d1
PA
102272009-11-26 Pedro Alves <pedro@codesourcery.com>
10228
10229 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
10230 events, don't leave current_inferior pointing at null.
10231
10357975
PA
102322009-11-26 Pedro Alves <pedro@codesourcery.com>
10233
10234 * win32-low.c (LOG): Delete.
10235 (OUTMSG): Output to stderr.
10236 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
10237 on compile time LOG macro.
10238 (win32_wait): Fix debug output.
10239
cf6e3471
PA
102402009-11-26 Pedro Alves <pedro@codesourcery.com>
10241
10242 * win32-low.c (win32_add_one_solib): If the dll name is
10243 "ntdll.dll", prepend the system directory to the dll path.
10244
0c85e18e
MK
102452009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
10246
10247 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
10248
9ac544ce 102492009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 10250 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
10251
10252 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
10253 * configure.ac: Check for __mcoldfire__ and set
10254 gdb_cv_m68k_is_coldfire.
10255 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
10256 reg-cf.o and reg-m68k.o.
10257 * configure: Regenerated.
10258
fd7dd3e6
PA
102592009-11-16 Pedro Alves <pedro@codesourcery.com>
10260
10261 * linux-low.c (linux_remove_process): Add `detaching' parameter.
10262 Pass it to thread_db_free.
10263 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
10264 proper `detaching' argument to linux_remove_process.
10265 * linux-low.h (thread_db_free): Add `detaching' parameter.
10266 * thread-db.c (thread_db_init): Pass false as `detaching' argument
10267 to thread_db_free.
10268 (thread_db_free): Add `detaching' parameter. Only
10269 call td_ta_clear_event if detaching from process.
10270
75aa492e
MK
102712009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
10272
10273 * thread-db.c (thread_db_free): Fix typo.
10274
21e1bee4
PP
102752009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
10276
10277 PR gdb/10838
10278 * thread-db.c (thread_db_free): Call td_ta_clear_event.
10279
8838b45e
NS
102802009-11-03 Nathan Sidwell <nathan@codesourcery.com>
10281
10282 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
10283 with an i686 compiler.
10284 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
10285 needed.
10286 * configure: Rebuilt.
10287
8a35fb51
SL
102882009-10-29 Sandra Loosemore <sandra@codesourcery.com>
10289
10290 PR gdb/10783
10291
10292 * server.c (handle_search_memory_1): Correct read_addr initialization
10293 in loop for searching subsequent chunks.
10294
96f15937
PP
102952009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
10296
10297 * configure.ac: New --with-libthread-db option.
10298 * thread-db.c: Allow direct dependence on libthread_db.
10299 (thread_db_free): Adjust.
10300 * config.in: Regenerate.
10301 * configure: Likewise.
889bf7c5 10302
5f7d1694
PP
103032009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
10304
10305 PR gdb/10757
10306 * thread-db.c (attach_thread): New function.
10307 (maybe_attach_thread): Return success/failure.
10308 (find_new_threads_callback): Adjust.
889bf7c5
PA
10309 (thread_db_find_new_threads): Loop until no new threads.
10310
88e3b899
PA
103112009-10-13 Pedro Alves <pedro@codesourcery.com>
10312
10313 * proc-service.c (ps_lgetregs): Formatting.
10314
cdbfd419
PP
103152009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
10316
10317 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
10318 * configure.ac: Adjust.
10319 * linux-low.h (struct process_info_private): Move members to struct
10320 thread_db.
10321 (thread_db_free, thread_db_handle_monitor_command): New prototype.
10322 * linux-low.c (linux_remove_process): Adjust.
10323 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
10324 * server.c (handle_query): Move code ...
10325 (handle_monitor_command): ... here. New function.
10326 * target.h (struct target_ops): New member.
10327 * thread-db.c (struct thread_db): New.
10328 (libthread_db_search_path): New variable.
10329 (thread_db_create_event, thread_db_enable_reporting)
10330 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
10331 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
10332 (try_thread_db_load_1, dladdr_to_soname): New functions.
10333 (try_thread_db_load, thread_db_load_search): New functions.
10334 (thread_db_init): Search for libthread_db.
10335 (thread_db_free): New function.
10336 (thread_db_handle_monitor_command): Likewise.
10337 * config.in: Regenerate.
10338 * configure: Regenerate.
889bf7c5 10339
4168d2d6
UW
103402009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
10341
10342 * spu-low.c (spu_kill): Wait for inferior to terminate.
10343 Call clear_inferiors.
10344 (spu_detach): Call clear_inferiors.
10345
81ecdfbb
RW
103462009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10347
10348 * aclocal.m4: Regenerate.
10349 * config.in: Likewise.
10350 * configure: Likewise.
10351
0b9ff2c0
UW
103522009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10353
10354 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
10355 (parse_spufs_run): New function.
10356 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
10357 (ppc_breakpoint_at): Handle SPU breakpoints.
10358
efcbbd14
UW
103592009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10360
10361 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
10362 (SPUFS_MAGIC): Define.
10363 (spu_enumerate_spu_ids): New function.
10364 (linux_qxfer_spu): New function.
10365 (linux_target_ops): Install linux_qxfer_spu.
10366
f4d9bade
UW
103672009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10368
10369 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
10370 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
10371 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
10372 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
10373 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
10374 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
10375 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
10376 (init_registers_powerpc_cell32l): Add prototype.
10377 (init_registers_powerpc_cell64l): Likewise.
10378 (ppc_arch_setup): Detect Cell/B.E. architecture.
10379
96e946ca
RW
103802009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10381
10382 * Makefile.in (datarootdir): New variable.
10383
58d6951d
DJ
103842009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
10385
10386 * linux-low.c (linux_write_memory): Update debugging output.
10387 * Makefile.in (clean): Add new descriptions.
10388 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
10389 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
10390 * configure.srv: Add new files for arm*-*-linux*.
10391 * linux-arm-low.c: Add new declarations.
10392 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
10393 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
10394 (HWCAP_VFPv3D16): New.
10395 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
10396 instead of __IWMMXT__.
10397 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
10398 (arm_arch_setup): New.
10399 (target_regsets): Remove #ifdef. Add VFP regset.
10400 (the_low_target): Use arm_arch_setup.
10401
12b42a12
DJ
104022009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
10403
10404 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
10405 the main thread again.
10406
ac8c974e
AR
104072009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
10408
10409 Adding Neutrino gdbserver.
10410 * configure: Regenerated.
10411 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
10412 * configure.srv (i[34567]86-*-nto*): New target.
10413 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
10414 * remote-utils.c [__QNX__]: Include sys/iomgr.h
10415 (nto_comctrl) [__QNX__]: New function.
10416 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
10417
4424e0c3 104182009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
10419
10420 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
10421 srv_tgtobj.
10422
912cf4ba
PA
104232009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
10424 Pedro Alves <pedro@codesourcery.com>
10425
10426 * win32-i386-low.c (i386_get_thread_context): Handle systems that
10427 don't support CONTEXT_EXTENDED_REGISTERS.
10428 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
10429 (the_low_target): Install them.
10430 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
10431 failing with ERROR_PIPE_NOT_CONNECTED.
10432
aa5ca48f
DE
104332009-06-30 Doug Evans <dje@google.com>
10434 Pierre Muller <muller@ics.u-strasbg.fr>
10435
10436 Add h/w watchpoint support to x86-linux, win32-i386.
10437 * Makefile.in (SFILES): Add i386-low.c
10438 (i386_low_h): Define.
10439 (i386-low.o): Add dependencies.
10440 (linux-x86-low.o): Add i386-low.h dependency.
10441 (win32-i386-low.o): Ditto.
10442 * i386-low.c: New file.
10443 * i386-low.h: New file.
10444 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
10445 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
10446 * linux-low.c (linux_add_process): Initialize arch_private.
10447 (linux_remove_process): Free arch_private.
10448 (add_lwp): Initialize arch_private.
10449 (delete_lwp): Free arch_private.
10450 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
10451 provided.
10452 * linux-low.h (process_info_private): New member arch_private.
10453 (lwp_info): New member arch_private.
10454 (linux_target_ops): New members new_process, new_thread,
10455 prepare_to_resume.
10456 (ptid_of): New macro.
10457 * linux-x86-low.c: Include stddef.h, i386-low.h.
10458 (arch_process_info): New struct.
10459 (arch_lwp_info): New struct.
10460 (x86_linux_dr_get, x86_linux_dr_set): New functions.
10461 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10462 (i386_dr_low_get_status): New function.
10463 (x86_insert_point, x86_remove_point): New functions.
10464 (x86_stopped_by_watchpoint): New function.
10465 (x86_stopped_data_address): New function.
10466 (x86_linux_new_process, x86_linux_new_thread): New functions.
10467 (x86_linux_prepare_to_resume): New function.
10468 (the_low_target): Add entries for insert_point, remove_point,
10469 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
10470 prepare_to_resume.
10471 * server.c (debug_hw_points): New global.
10472 (monitor_show_help): Document set debug-hw-points.
10473 (handle_query): Process "set debug-hw-points".
10474 * server.h (debug_hw_points): Declare.
10475 (paddress): Declare.
10476 * utils.c (NUMCELLS, CELLSIZE): New macros.
10477 (get_sell, xsnprintf, paddress): New functions.
10478 * win32-arm-low.c (the_low_target): Add entries for insert_point,
10479 remove_point, stopped_by_watchpoint, stopped_data_address.
10480 * win32-i386-low.c: Include i386-low.h.
10481 (debug_reg_state): Replaces dr.
10482 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10483 (i386_dr_low_get_status): New function.
10484 (i386_insert_point, i386_remove_point): New functions.
10485 (i386_stopped_by_watchpoint): New function.
10486 (i386_stopped_data_address): New function.
10487 (i386_initial_stuff): Update.
10488 (get_thread_context,set_thread_context,i386_thread_added): Update.
10489 (the_low_target): Add entries for insert_point,
10490 remove_point, stopped_by_watchpoint, stopped_data_address.
10491 * win32-low.c (win32_insert_watchpoint): New function.
10492 (win32_remove_watchpoint): New function.
10493 (win32_stopped_by_watchpoint): New function.
10494 (win32_stopped_data_address): New function.
10495 (win32_target_ops): Add entries for insert_watchpoint,
10496 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
10497 * win32-low.h (win32_target_ops): New members insert_point,
10498 remove_point, stopped_by_watchpoint, stopped_data_address.
10499
d993e290
PA
105002009-06-25 Pedro Alves <pedro@codesourcery.com>
10501
10502 * server.c (process_serial_event): Re-return unsupported, not
10503 error, if the type isn't recognized. Re-allow supporting only
10504 insert or remove packets. Also call require_running for
10505 breakpoints. Add missing break statement to default case. Tidy.
10506 * target.h (struct target_ops): Rename insert_watchpoint to
10507 insert_point, and remove_watchpoint to remove_point.
10508
10509 * linux-low.h (struct linux_target_ops): Likewise.
10510 * linux-low.c (linux_insert_watchpoint): Rename to ...
10511 (linux_insert_point): ... this. Adjust.
10512 (linux_remove_watchpoint): Rename to ...
10513 (linux_remove_point): ... this. Adjust.
10514 (linux_target_ops): Adjust.
10515 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
10516 (cris_insert_point): ... this.
10517 (cris_remove_watchpoint): Rename to ...
10518 (cris_remove_point): ... this.
10519 (the_low_target): Adjust.
10520
0f54c268
PM
105212009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
10522
10523 * server.c (handle_v_kill): Pass signal_pid to
10524 kill_inferior if multi_process is zero.
10525
c6314022
AR
105262009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
10527
10528 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
10529 * target.h (target_ops): Comment for *_watchpoint to make it clear
10530 the functions can get types '0' and '1'.
10531
4463ce24
AR
105322009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
10533
10534 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
10535 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
10536 * regcache.c (get_regcache): Likewise.
10537 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
10538 * win32-low.c (child_fetch_inferior_registers): Remove check for
10539 regno 0.
10540
cf8fd78b
PA
105412009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
10542 Pedro Alves <pedro@codesourcery.com>
10543
10544 * target.h (struct target_ops) <supports_multi_process>: New
10545 callback.
10546 (target_supports_multi_process): New.
10547 * server.c (handle_query): Even if GDB reports support, only
10548 enable multi-process if the target also supports it. Report
10549 multi-process support only if the target backend supports it.
10550 * linux-low.c (linux_supports_multi_process): New function.
10551 (linux_target_ops): Install it as target_supports_multi_process
10552 callback.
10553
47c0c975
DE
105542009-05-24 Doug Evans <dje@google.com>
10555
e09875d4
DE
10556 Global renaming of find_thread_pid to find_thread_ptid.
10557 * server.h (find_thread_ptid): Renamed from find_thread_pid.
10558 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
10559 All callers updated.
10560
e27d73f6
DE
10561 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
10562 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
10563 directly.
10564
47c0c975
DE
10565 * linux-low.c (get_stop_pc): Print pc if debug_threads.
10566 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
10567 (linux_resume_one_lwp): Ditto.
10568
2acc282a
DE
105692009-05-23 Doug Evans <dje@google.com>
10570
10571 * linux-low.c (linux_resume_one_lwp): Change type of first arg
10572 from struct inferior_list_entry * to struct lwp_info *.
10573 All callers updated.
10574
9f1036c1
DE
105752009-05-13 Doug Evans <dje@google.com>
10576
10577 * linux-x86-low.c: Don't include assert.h.
10578 (x86_siginfo_fixup): Use fatal, not assert.
10579 (x86_arch_setup): Fix comment.
10580
d0722149
DE
105812009-05-12 Doug Evans <dje@google.com>
10582
10583 Biarch support for i386/amd64 gdbserver.
10584 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
10585 Add linux-x86-low.c.
10586 (linux-i386-low.o, linux-x86-64-low.o): Delete.
10587 (linux-x86-low.o): Add.
10588 * linux-x86-64-low.c: Delete.
10589 * linux-i386-low.c: Delete.
10590 * linux-x86-low.c: New file.
10591 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
10592 linux-x86-low.o.
10593 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
10594 linux-x86-low.o.
10595 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
10596 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
10597 (linux_child_pid_to_exec_file): New function.
10598 (elf_64_header_p, elf_64_file_p): New functions.
10599 (siginfo_fixup): New function.
10600 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
10601 give target a chance to convert layout.
10602 * linux-low.h (linux_target_ops): New member siginfo_fixup.
10603 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
10604
fdeb2a12
DE
106052009-05-07 Doug Evans <dje@google.com>
10606
10607 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
10608 (regsets_store_inferior_registers): Ditto.
10609
a6dbe5df
PA
106102009-05-06 Pedro Alves <pedro@codesourcery.com>
10611
10612 PR server/10048
10613
10614 * linux-low.c (must_set_ptrace_flags): Delete.
10615 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
10616 of the global.
10617 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
10618 `lwp->must_set_ptrace_flags' instead.
ba42693b 10619 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
10620 (linux_wait_1): ... not here.
10621
5091eb23
DE
106222009-04-30 Doug Evans <dje@google.com>
10623
9f767825
DE
10624 * inferiors.c (started_inferior_callback): New function.
10625 (attached_inferior_callback): New function.
10626 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
10627 * server.c (print_started_pid, print_attached_pid): New functions.
10628 (detach_or_kill_for_exit): New function.
10629 (main): Call it instead of for_each_inferior (kill_inferior_callback).
10630 * server.h (have_started_inferiors_p): Declare.
10631 (have_attached_inferiors_p): Declare.
10632
5091eb23
DE
10633 * inferiors.c (remove_process): Fix memory leak, free process.
10634 * linux-low.c (linux_remove_process): New function.
10635 (linux_kill): Call it instead of remove_process.
10636 (linux_detach, linux_wait_1): Ditto.
10637
155c8968
PA
106382009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
10639
10640 * configure.srv: Add x86 Windows CE target.
10641
7fe519cb
UW
106422009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10643
10644 * inferiors.c (get_thread_process): Make global.
10645 * server.h (get_thread_process): Add prototype.
10646 * thread-db.c (find_one_thread): Use get_thread_process
10647 instead of current_process.
10648 (thread_db_get_tls_address): Do not crash if called when
10649 thread layer is not yet initialized.
10650
5472f405
UW
106512009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10652
10653 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
10654 * spu-low.c (current_tid): Rename to ...
10655 (current_ptid): ... this.
10656 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
10657 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
10658 ptid_get_lwp (current_ptid) instead of current_tid.
10659 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
10660 instead of current_tid. Use find_process_pid to verify pid
10661 argument is valid. Pass proper argument to remove_process.
10662 (spu_thread_alive): Compare current_ptid instead of current_tid.
10663 (spu_resume): Likewise.
10664
55ac2b99
PA
106652009-04-02 Pedro Alves <pedro@codesourcery.com>
10666
10667 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
10668 variable.
10669
95954743
PA
106702009-04-01 Pedro Alves <pedro@codesourcery.com>
10671
10672 Implement the multiprocess extensions, and add linux multiprocess
10673 support.
10674
10675 * server.h (ULONGEST): Declare.
10676 (struct ptid, ptid_t): New.
10677 (minus_one_ptid, null_ptid): Declare.
10678 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10679 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
10680 (struct inferior_list_entry): Change `id' type from unsigned from
10681 to ptid_t.
10682 (struct sym_cache, struct breakpoint, struct
10683 process_info_private): Forward declare.
10684 (struct process_info): Declare.
10685 (current_process): Declare.
10686 (all_processes): Declare.
10687 (initialize_inferiors): Declare.
10688 (add_thread): Adjust to use ptid_t.
10689 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
10690 (add_process, remove_process, find_thread_pid): Declare.
10691 (find_inferior_id): Adjust to use ptid_t.
10692 (cont_thread, general_thread, step_thread): Change type to ptid_t.
10693 (multi_process): Declare.
10694 (push_event): Adjust to use ptid_t.
10695 (read_ptid, write_ptid): Declare.
10696 (prepare_resume_reply): Adjust to use ptid_t.
10697 (clear_symbol_cache): Declare.
10698 * inferiors.c (all_processes): New.
10699 (null_ptid, minus_one_ptid): New.
10700 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10701 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
10702 (add_thread): Change unsigned long to ptid. Remove gdb_id
10703 parameter. Adjust.
10704 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
10705 (gdb_id_to_thread): Rename to ...
10706 (find_thread_pid): ... this. Change unsigned long to ptid.
10707 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
10708 (loaded_dll, pull_pid_from_list): Adjust.
10709 (add_process, remove_process, find_process_pid)
10710 (get_thread_process, current_process, initialize_inferiors): New.
10711 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
10712 (struct target_waitstatus) <related_pid>: Ditto.
10713 (struct target_ops) <kill, detach>: Add `pid' argument. Change
10714 return type to int.
10715 (struct target_ops) <join>: Add `pid' argument.
10716 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
10717 (struct target_ops) <wait>: Add `ptid' field. Change return type
10718 to ptid.
10719 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
10720 (mywait): Add `ptid' argument. Change return type to ptid_t.
10721 (target_pid_to_str): Declare.
10722 * target.c (set_desired_inferior): Adjust to use ptids.
10723 (mywait): Add new `ptid' argument. Adjust.
10724 (target_pid_to_str): New.
10725 * mem-break.h (free_all_breakpoints): Declare.
10726 * mem-break.c (breakpoints): Delelete.
10727 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
10728 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
10729 to use per-process breakpoint list.
10730 (free_all_breakpoints): New.
10731 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
10732 (symbol_cache, all_symbols_looked_up): Delete.
10733 (hexchars): New.
10734 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
10735 read_ptid): New.
10736 (prepare_resume_reply): Change ptid argument's type from unsigned
10737 long to ptid_t. Adjust. Implement W;process and X;process.
10738 (free_sym_cache, clear_symbol_cache): New.
10739 (look_up_one_symbol): Adjust to per-process symbol cache. *
10740 * server.c (cont_thread, general_thread, step_thread): Change type
10741 to ptid_t.
10742 (attached): Delete.
10743 (multi_process): New.
10744 (last_ptid): Change type to ptid_t.
10745 (struct vstop_notif) <ptid>: Change type to ptid_t.
10746 (queue_stop_reply, push_event): Change `ptid' argument's type to
10747 ptid_t.
10748 (discard_queued_stop_replies): Add `pid' argument.
10749 (start_inferior): Adjust to use ptids. Adjust to mywait interface
10750 changes. Don't reference the `attached' global.
10751 (attach_inferior): Adjust to mywait interface changes.
10752 (handle_query): Adjust to use ptids. Parse GDB's qSupported
10753 features. Handle and report "multiprocess+". Handle
10754 "qAttached:PID".
10755 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
10756 changes.
10757 (handle_v_kill): New.
10758 (handle_v_stopped): Adjust to use target_pid_to_str.
10759 (handle_v_requests): Allow multiple attaches and runs when
10760 multiprocess extensions are in effect. Handle "vKill".
10761 (myresume): Adjust to use ptids.
10762 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
10763 (handle_status): Adjust to discard_queued_stop_replies interface
10764 change.
10765 (first_thread_of, kill_inferior_callback)
10766 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
10767 (main): Call initialize_inferiors. Adjust to use ptids, killing
10768 and detaching from all inferiors. Handle multiprocess packet
10769 variants.
10770 * linux-low.h: Include gdb_proc_service.h.
10771 (struct process_info_private): New.
10772 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
10773 <lwpid_of>: Use ptid_get_lwp.
10774 (get_lwp_thread): Adjust.
10775 (struct lwp_info): Add `dead' member.
10776 (find_lwp_pid): Declare.
10777 * linux-low.c (thread_db_active): Delete.
10778 (new_inferior): Adjust comment.
10779 (inferior_pid): Delete.
10780 (linux_add_process): New.
10781 (handle_extended_wait): Adjust.
10782 (add_lwp): Change unsigned long to ptid.
10783 (linux_create_inferior): Add process to processes table. Adjust
10784 to use ptids. Don't set new_inferior here.
10785 (linux_attach_lwp): Rename to ...
10786 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
10787 it. Adjust to use ptids.
10788 (linux_attach_lwp): New.
10789 (linux_attach): Add process to processes table. Don't set
10790 new_inferior here.
10791 (struct counter): New.
10792 (second_thread_of_pid_p, last_thread_of_process_p): New.
10793 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
10794 multiple processes.
10795 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
10796 processes. Remove process from process table.
10797 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
10798 to multiple processes.
10799 (any_thread_of): New.
10800 (linux_detach): Add `pid' argument, and handle it. Remove process
10801 from processes table.
10802 (linux_join): Add `pid' argument. Handle it.
10803 (linux_thread_alive): Change unsighed long argument to ptid_t.
10804 Consider dead lwps as not being alive.
10805 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
10806 threads we're not interested in.
10807 (same_lwp, find_lwp_pid): New.
10808 (linux_wait_for_lwp): Change `pid' argument's type from int to
10809 ptid_t. Adjust.
10810 (linux_wait_for_event): Rename to ...
10811 (linux_wait_for_event_1): ... this. Change `pid' argument's type
10812 from int to ptid_t. Adjust.
10813 (linux_wait_for_event): New.
10814 (linux_wait_1): Add `ptid' argument. Change return type to
10815 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
10816 that exit from the process table.
10817 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
10818 Adjust.
10819 (mark_lwp_dead): New.
10820 (wait_for_sigstop): Adjust to use ptids. If a process exits while
10821 stopping all threads, mark its main lwp as dead.
10822 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
10823 ptids.
10824 (fetch_register, usr_store_inferior_registers)
10825 (regsets_fetch_inferior_registers)
10826 (regsets_store_inferior_registers, linux_read_memory)
10827 (linux_write_memory): Inline `inferior_pid'.
10828 (linux_look_up_symbols): Adjust to use per-process
10829 `thread_db_active'.
10830 (linux_request_interrupt): Adjust to use ptids.
10831 (linux_read_auxv): Inline `inferior_pid'.
10832 (initialize_low): Don't reference thread_db_active.
10833 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
10834 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
10835 (ps_getpid): Return the pid of the current inferior.
10836 * thread-db.c (proc_handle, thread_agent): Delete.
10837 (thread_db_create_event, thread_db_enable_reporting): Adjust to
10838 per-process data.
10839 (find_one_thread): Change argument type to ptid_t. Adjust to
10840 per-process data.
10841 (maybe_attach_thread): Adjust to per-process data and ptids.
10842 (thread_db_find_new_threads): Ditto.
10843 (thread_db_init): Ditto.
10844 * spu-low.c (spu_create_inferior, spu_attach): Add process to
10845 processes table. Adjust to use ptids.
10846 (spu_kill, spu_detach): Adjust interface. Remove process from
10847 processes table.
10848 (spu_join, spu_thread_alive): Adjust interface.
10849 (spu_wait): Adjust interface. Remove process from processes
10850 table. Adjust to use ptids.
10851 * win32-low.c (current_inferior_tid): Delete.
10852 (current_inferior_ptid): New.
10853 (debug_event_ptid): New.
10854 (thread_rec): Take a ptid. Adjust.
10855 (child_add_thread): Add `pid' argument. Adjust to use ptids.
10856 (child_delete_thread): Ditto.
10857 (do_initial_child_stuff): Add `attached' argument. Add process to
10858 processes table.
10859 (child_fetch_inferior_registers, child_store_inferior_registers):
10860 Adjust.
10861 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
10862 (win32_attach): Pass 1 to do_initial_child_stuff.
10863 (win32_kill): Adjust interface. Remove process from processes
10864 table.
10865 (win32_detach): Ditto.
10866 (win32_join): Adjust interface.
10867 (win32_thread_alive): Take a ptid.
10868 (win32_resume): Adjust to use ptids.
10869 (get_child_debug_event): Ditto.
10870 (win32_wait): Adjust interface. Remove exiting process from
10871 processes table.
10872
bd99dc85
PA
108732009-04-01 Pedro Alves <pedro@codesourcery.com>
10874
10875 Non-stop mode support.
10876
10877 * server.h (non_stop): Declare.
10878 (gdb_client_data, handler_func): Declare.
10879 (delete_file_handler, add_file_handler, start_event_loop):
10880 Declare.
10881 (handle_serial_event, handle_target_event, push_event)
10882 (putpkt_notif): Declare.
10883 * target.h (enum resume_kind): New.
10884 (struct thread_resume): Replace `step' field by `kind' field.
10885 (TARGET_WNOHANG): Define.
10886 (struct target_ops) <wait>: Add `options' argument.
10887 <supports_non_stop, async, start_non_stop>: New fields.
10888 (target_supports_non_stop, target_async): New.
10889 (start_non_stop): Declare.
10890 (mywait): Add `options' argument.
10891 * target.c (mywait): Add `options' argument. Print child exit
10892 notifications here.
10893 (start_non_stop): New.
10894 * server.c (non_stop, own_buf, mem_buf): New globals.
10895 (struct vstop_notif): New.
10896 (notif_queue): New global.
10897 (queue_stop_reply, push_event, discard_queued_stop_replies)
10898 (send_next_stop_reply): New.
10899 (start_inferior): Adjust to use resume_kind. Adjust to mywait
10900 interface changes.
10901 (attach_inferior): In non-stop mode, don't wait for the target
10902 here.
10903 (handle_general_set): Handle QNonStop.
10904 (handle_query): When handling qC, return the current general
10905 thread, instead of the first thread of the list.
10906 (handle_query): If the backend supports non-stop mode, include
10907 QNonStop+ in the qSupported query response.
10908 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
10909 and non-stop mode.
10910 (handle_v_attach, handle_v_run): Handle non-stop mode.
10911 (handle_v_stopped): New.
10912 (handle_v_requests): Report support for vCont;t. Handle vStopped.
10913 (myresume): Adjust to use resume_kind. Handle non-stop.
10914 (queue_stop_reply_callback): New.
10915 (handle_status): Handle non-stop mode.
10916 (main): Clear non_stop flag on reconnection. Use the event-loop.
10917 Refactor serial protocol handling from here ...
10918 (process_serial_event): ... to this new function. When GDB
10919 selects any thread, select one here. In non-stop mode, wait until
10920 GDB acks all pending events before exiting.
10921 (handle_serial_event, handle_target_event): New.
10922 * remote-utils.c (remote_open): Install remote_desc in the event
10923 loop.
10924 (remote_close): Remove remote_desc from the event loop.
10925 (putpkt_binary): Rename to...
10926 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
10927 (putpkt_binary): New as wrapper around putpkt_binary_1.
10928 (putpkt_notif): New.
10929 (prepare_resume_reply): In non-stop mode, don't change the
10930 general_thread.
10931 * event-loop.c: New.
10932 * Makefile.in (OBJ): Add event-loop.o.
10933 (event-loop.o): New rule.
10934
10935 * linux-low.h (pid_of): Moved here.
10936 (lwpid_of): New.
10937 (get_lwp_thread): Use lwpid_of.
10938 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
10939 * linux-low.c (pid_of): Delete.
10940 (inferior_pid): Use lwpid_of.
10941 (linux_event_pipe): New.
10942 (target_is_async_p): New.
10943 (delete_lwp): New.
10944 (handle_extended_wait): Use lwpid_of.
10945 (add_lwp): Don't set lwpid field.
10946 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
10947 (linux_kill_one_lwp): If killing a running lwp, stop it first.
10948 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
10949 (linux_detach_one_lwp): If detaching from a running lwp, stop it
10950 first. Adjust to linux_wait_for_event interface changes. Use
10951 lwpid_of.
10952 (linux_detach): Don't delete the main lwp here.
10953 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
10954 (status_pending_p): Don't consider explicitly suspended lwps.
10955 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
10956 pointer. Add OPTIONS argument. Change return type to int. Use
10957 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
10958 (linux_wait_for_event): Take an integer pid instead of a lwp_info
10959 pointer. Add status pointer argument. Return a pid instead of a
10960 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
10961 changes. In non-stop mode, don't switch to a random thread.
10962 (linux_wait): Rename to...
10963 (linux_wait_1): ... this. Add target_options argument, and handle
10964 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
10965 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
10966 clean exit and signal exit code. Don't stop all threads in
10967 non-stop mode. In all-stop mode, only stop all threads when
10968 reporting a stop to GDB. Handle explicit thread stop requests.
10969 (async_file_flush, async_file_mark): New.
10970 (linux_wait): New.
10971 (send_sigstop): Use lwpid_of.
10972 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
10973 interface changes. In non-stop mode, don't switch to a random
10974 thread.
10975 (linux_resume_one_lwp): Use lwpid_of.
10976 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
10977 (linux_resume_one_thread): ... this. Handle resume_stop. In
10978 non-stop mode, don't look for pending flag in all threads.
10979 (resume_status_pending_p): Don't consider explicitly suspended
10980 threads.
10981 (my_waitpid): Reimplement. Emulate __WALL.
10982 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10983 Use lwpid_of.
10984 (sigchld_handler, linux_supports_non_stop, linux_async)
10985 (linux_start_non_stop): New.
10986 (linux_target_ops): Register linux_supports_non_stop, linux_async
10987 and linux_start_non_stop.
10988 (initialize_low): Install SIGCHLD handler.
10989 * thread-db.c (thread_db_create_event, find_one_thread)
10990 (thread_db_get_tls_address): Use lwpid_of.
10991 * win32-low.c (win32_detach): Adjust to use resume_kind.
10992 (win32_wait): Add `options' argument.
10993 * spu-low.c (spu_resume): Adjust to use resume_kind.
10994 (spu_wait): Add `options' argument.
10995
5b1c542e
PA
109962009-04-01 Pedro Alves <pedro@codesourcery.com>
10997
10998 Decouple target code from remote protocol.
10999
11000 * target.h (enum target_waitkind): New.
11001 (struct target_waitstatus): New.
11002 (struct target_ops) <wait>: Return an unsigned long. Take a
11003 target_waitstatus pointer instead of a char pointer.
11004 (mywait): Likewise.
11005 * target.c (mywait): Change prototype to return an unsigned long.
11006 Take a target_waitstatus pointer instead of a char pointer. Adjust.
11007 * server.h (thread_from_wait, old_thread_from_wait): Delete
11008 declarations.
11009 (prepare_resume_reply): Change prototype to take a
11010 target_waitstatus.
11011 * server.c (thread_from_wait, old_thread_from_wait): Delete.
11012 (last_status, last_ptid): New.
11013 (start_inferior): Remove "statusptr" argument. Adjust. Return a
11014 pid instead of a signal.
11015 (attach_inferior): Remove "status" and "signal" parameters.
11016 Adjust.
11017 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
11018 not as an address.
11019 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
11020 (handle_v_requests, myresume): Remove "status" and "signal"
11021 parameters. Adjust.
11022 (handle_status): New.
11023 (main): Delete local `status'. Adjust.
11024 * remote-utils.c: Include target.h.
11025 (prepare_resume_reply): Change prototype to take a
11026 target_waitstatus. Adjust.
11027
11028 * linux-low.c (linux_wait): Adjust to new target_ops->wait
11029 interface.
11030 * spu-low.c (spu_wait): Adjust.
11031 * win32-low.c (enum target_waitkind, struct target_waitstatus):
11032 Delete.
11033 (win32_wait): Adjust.
11034
2bd7c093
PA
110352009-04-01 Pedro Alves <pedro@codesourcery.com>
11036
11037 * target.h (struct thread_resume): Delete leave_stopped member.
11038 (struct target_ops): Add a `n' argument to the `resume' callback.
11039 * server.c (start_inferior): Adjust.
11040 (handle_v_cont, myresume): Adjust.
11041 * linux-low.c (check_removed_breakpoint): Adjust to resume
11042 interface change, and to removed leave_stopped field.
11043 (resume_ptr): Delete.
11044 (struct thread_resume_array): New.
11045 (linux_set_resume_request): Add new `arg' parameter. Adjust to
11046 resume interface change.
11047 (linux_continue_one_thread, linux_queue_one_thread)
11048 (resume_status_pending_p): Check if the resume field is NULL
11049 instead of checking the leave_stopped member.
11050 (linux_resume): Adjust to the target resume interface change.
11051 * spu-low.c (spu_resume): Adjust to the target resume interface
11052 change.
11053 * win32-low.c (win32_detach, win32_resume): Ditto.
11054
c35fafde
PA
110552009-04-01 Pedro Alves <pedro@codesourcery.com>
11056
11057 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
11058 flag.
11059 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
11060 pending.
11061 (linux_continue_one_thread): Only preserve the stepping flag if
11062 there's a pending breakpoint.
11063
0a59d50b
PA
110642009-03-31 Pedro Alves <pedro@codesourcery.com>
11065
11066 * server.c (main): After the inferior having exited, call
11067 remote_close before exiting gdbserver.
11068
f04c6d38
TJB
110692009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
11070
11071 Fix size of FPSCR in Power 7 processors.
11072 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
11073 (PPC_FEATURE_HAS_DFP): New #define.
11074 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
11075 size of the FPSCR.
11076
78e5cee6
PA
110772009-03-23 Pedro Alves <pedro@codesourcery.com>
11078
11079 * server.c (handle_query) Whitespace and formatting.
11080
1b3f6016
PA
110812009-03-22 Pedro Alves <pedro@codesourcery.com>
11082
11083 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
11084 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
11085 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
11086 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
11087 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
11088 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
11089 Makefile.in, configure.ac: Fix whitespace throughout.
11090 * configure: Regenerate.
11091
a07b2135
PA
110922009-03-22 Pedro Alves <pedro@codesourcery.com>
11093
11094 * inferiors.c (find_inferior): Make it safe for the callback
11095 function to delete the currently iterated inferior.
11096
67cc2626
PA
110972009-03-22 Pedro Alves <pedro@codesourcery.com>
11098
11099 * Makefile.in (linuw_low_h): Move higher.
11100 (thread-db.o): Depend on $(linux_low_h).
11101
54a0b537
PA
111022009-03-17 Pedro Alves <pedro@codesourcery.com>
11103
11104 Rename "process" to "lwp" throughout.
11105
11106 * linux-low.c (all_processes): Rename to...
11107 (all_lwps): ... this.
11108 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
11109 (add_process): Rename to ...
11110 (add_lwp): ... this. Adjust.
11111 (linux_create_inferior): Adjust.
11112 (linux_attach_lwp): Adjust.
11113 (linux_attach): Adjust.
11114 (linux_kill_one_process): Rename to ...
11115 (linux_kill_one_lwp): ... this. Adjust.
11116 (linux_kill): Adjust.
11117 (linux_detach_one_process): Rename to ...
11118 (linux_detach_one_lwp): ... this. Adjust.
11119 (linux_detach): Adjust.
11120 (check_removed_breakpoint): Adjust.
11121 (status_pending_p): Adjust.
11122 (linux_wait_for_process): Rename to ...
11123 (linux_wait_for_lwp): ... this. Adjust.
11124 (linux_wait_for_event): Adjust.
11125 (send_sigstop): Adjust.
11126 (wait_for_sigstop): Adjust.
11127 (stop_all_processes): Rename to ...
11128 (stop_all_lwps): ... this.
11129 (linux_resume_one_process): Rename to ...
11130 (linux_resume_one_lwp): ... this. Adjust.
11131 (linux_set_resume_request, linux_continue_one_thread)
11132 (linux_queue_one_thread, resume_status_pending_p)
11133 (usr_store_inferior_registers, regsets_store_inferior_registers)
11134 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11135 Adjust.
11136 * linux-low.h (get_process): Rename to ...
11137 (get_lwp): ... this. Adjust.
11138 (get_thread_process): Rename to ...
11139 (get_thread_lwp): ... this. Adjust.
11140 (get_process_thread): Rename to ...
11141 (get_lwp_thread): ... this. Adjust.
11142 (struct process_info): Rename to ...
11143 (struct lwp_info): ... this.
11144 (all_processes): Rename to ...
11145 (all_lwps): ... this.
11146 * proc-service.c (ps_lgetregs): Adjust.
11147 * thread-db.c (thread_db_create_event, find_one_thread)
11148 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
11149
0b16c5cf
PA
111502009-03-14 Pedro Alves <pedro@codesourcery.com>
11151
11152 * server.c (handle_query): Handle "qAttached".
11153
32de4b9d
NS
111542009-03-13 Nathan Sidwell <nathan@codesourcery.com>
11155
11156 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
11157 GPLv3, update license URL.
11158
2aecd87f
DE
111592009-03-01 Doug Evans <dje@google.com>
11160
93efd302 11161 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
11162 (server_h): Add gdb_signals.h.
11163 (signals.o): Update.
11164 * server.h (target_signal_from_host,target_signal_to_host_p)
11165 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
11166
86b1f9c5
PM
111672009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
11168
11169 * remote-utils.c (getpkt): Also generate remote-debug
11170 information if noack_mode is set.
11171
4aa995e1
PA
111722009-02-06 Pedro Alves <pedro@codesourcery.com>
11173
11174 * server.c (handle_query): Report qXfer:siginfo:read and
11175 qXfer:siginfo:write as supported and handle them.
11176 * target.h (struct target_ops) <qxfer_siginfo>: New field.
11177 * linux-low.c (linux_xfer_siginfo): New.
11178 (linux_target_ops): Set it.
11179
62709adf
PA
111802009-01-26 Pedro Alves <pedro@codesourcery.com>
11181
11182 * server.c (gdbserver_usage): Mention --remote-debug.
11183 (main): Accept '--remote-debug' switch.
11184
aef93bd7
DE
111852009-01-18 Doug Evans <dje@google.com>
11186
11187 * regcache.c (new_register_cache): No need to check result of xcalloc.
11188 * server.c (handle_search_memory): Back out calls to xmalloc,
11189 result is checked and error is returned to user upon failure.
11190 (handle_query): Ditto. Add more checks for result of malloc.
11191 (handle_v_cont): Check result of malloc, report error back to
11192 user upon failure.
11193 (handle_v_run): Ditto. Call freeargv.
11194 * server.h (freeargv): Declare.
11195 * utils.c (freeargv): New fn.
11196
54363045
DE
111972009-01-15 Doug Evans <dje@google.com>
11198
f626972c
DE
11199 * gdbreplay.c (perror_with_name): Make arg const char *.
11200 * server.h (target_signal_to_name): Make return type const char *.
0842e787 11201 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 11202 * utils.c (perror_with_name): Make arg const char *.
54363045 11203
18aae699
PA
112042009-01-14 Pedro Alves <pedro@codesourcery.com>
11205
11206 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
11207 when handling a EXIT_PROCESS_DEBUG_EVENT.
11208
ff703abe
JB
112092009-01-06 Joel Brobecker <brobecker@adacore.com>
11210
11211 * gdbreplay.c (gdbreplay_version): Update copyright year.
11212 * server.c (gdbserver_version): Likewise.
11213
f21cc1a2 112142009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
11215
11216 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 11217 (handle_extended_wait): Improve comment.
0e21c1ec 11218
bca929d3
DE
112192008-12-13 Doug Evans <dje@google.com>
11220
11221 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
11222 * server.h (ATTR_MALLOC): New macro.
11223 (xmalloc,xcalloc,xstrdup): Declare.
11224 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
11225 * inferiors.c: Ditto.
11226 * linux-low.c: Ditto.
11227 * mem-break.c: Ditto.
11228 * regcache.c: Ditto.
11229 * remote-utils.c: Ditto.
11230 * server.c: Ditto.
11231 * target.c: Ditto.
11232 * win32-low.c: Ditto.
11233
97438e3f
DE
112342008-12-12 Doug Evans <dje@google.com>
11235
896c7fbb
DE
11236 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
11237 in debugging printf.
11238
97438e3f
DE
11239 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
11240
e3b886f8
DE
112412008-12-09 Doug Evans <dje@google.com>
11242
11243 * linux-low.h (struct process_info): Delete member tid, unused.
11244 * thread-db.c (find_one_thread): Update.
11245 (maybe_attach_thread): Update.
11246
07e059b5
VP
112472008-12-02 Pedro Alves <pedro@codesourcery.com>
11248
889bf7c5
PA
11249 * target.h (struct target_ops): Add qxfer_osdata member.
11250 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
11251 and dirent.h.
11252 (linux_qxfer_osdata): New functions.
11253 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
11254 callback.
11255 * server.c (handle_query): Handle "qXfer:osdata:read:".
11256 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
11257 (buffer_xml_printf): New functions.
11258 * server.h (struct buffer): New.
11259 (buffer_grow_str, buffer_grow_str0): New macros.
11260 (buffer_grow, buffer_free, buffer_init, buffer_finish)
11261 (buffer_xml_printf): Declare.
07e059b5 11262
4cab47ab
DE
112632008-11-24 Doug Evans <dje@google.com>
11264
11265 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
11266
f142445f
DJ
112672008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
11268
11269 * server.c (handle_v_run): Always use the supplied argument list.
11270
d0107bb6 112712008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 11272
d0107bb6
BW
11273 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
11274 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 11275
2c4ad781
TJB
112762008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
11277
11278 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
11279 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
11280 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
11281 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
11282 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
11283 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
11284 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
11285 XML target descriptions.
11286 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
11287 when inferior is running on an ISA 2.05 or later processor. Add
11288 special case to return offset for full 64-bit slot of FPSCR when
11289 in 32-bits.
11290
dfb64f85
DJ
112912008-11-14 Daniel Gutson <dgutson@codesourcery.com>
11292
11293 * Makefile.in (SFILES, clean): Added sparc64 files.
11294 (reg-sparc64.o, reg-sparc64.c): New.
11295 * configure.srv (sparc*-*-linux*): New configuration.
11296 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
11297 syscall arguments for SPARC.
11298 (regsets_store_inferior_registers): Likewise.
11299 * linux-sparc-low.c: New file.
11300
66b6e1dd
DE
113012008-10-21 Doug Evans <dje@google.com>
11302
11303 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
11304 (READLINE_DIR,READLINE_DEP): Delete.
11305 (INTERNAL_CFLAGS): Update.
11306 (LINTFLAGS): Update.
11307
9b710a42
PA
113082008-10-10 Pedro Alves <pedro@codesourcery.com>
11309
11310 * server.c (handle_v_run): If GDB didn't specify an argv, use the
11311 whole argv from the last run, not just argv[0].
11312
5822d809
PA
113132008-09-08 Pedro Alves <pedro@codesourcery.com>
11314
11315 * regcache.c (new_register_cache): Return NULL if the register
11316 cache size isn't known yet.
11317 (free_register_cache): Avoid dereferencing a NULL regcache.
11318
74aac56f
DJ
113192008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11320
11321 * configure.srv: Merge MIPS and MIPS64.
11322
400b20f5
MR
113232008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
11324
11325 * Makefile.in (uninstall): Apply $(EXEEXT) too.
11326
677c5bb1
LM
113272008-08-18 Luis Machado <luisgpm@br.ibm.com>
11328
11329 * Makefile.in: Add required vsx dependencies.
11330
11331 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
11332 Declare init_registers_powerpc_vsx32l.
11333 Declare init_registers_powerpc_vsx64l.
11334 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
11335 (ppc_arch_setup): Check for VSX in hwcap.
11336 (ppc_fill_vsxregset): New function.
11337 (ppc_store_vsxregset): New function.
11338 Add new VSX entry in regset_info target_regsets.
11339
11340 * configure.srv: Add new VSX dependencies.
11341
a6f3e723
SL
113422008-08-12 Pedro Alves <pedro@codesourcery.com>
11343
11344 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
11345 (remote_open): Set or clear transport_is_reliable.
11346 (putpkt_binary): Don't expect acks in noack mode.
11347 (getpkt): Don't send ack/nac in noack mode.
11348 * server.c (handle_general_set): Handle QStartNoAckMode.
11349 (handle_query): If connected by tcp pass QStartNoAckMode+ in
11350 qSupported.
11351 (main): Reset noack_mode on every connection.
11352 * server.h (noack_mode): Declare.
11353
a417dc56
RW
113542008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11355
11356 * Makefile.in (GDBREPLAY_OBS): New variable.
11357 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
11358
3221518c
UW
113592008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
11360 Daniel Jacobowitz <dan@codesourcery.com>
11361
11362 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
11363 (usr_store_inferior_registers): Likewise.
11364 (regsets_store_inferior_registers): Likewise.
11365
ec56be1b
PA
113662008-07-31 Rolf Jansen <rj@surtec.com>
11367 Pedro Alves <pedro@codesourcery.com>
11368
11369 * configure.ac: Check for memmem declaration.
11370 * server.c [HAVE_MALLOC_H]: Include malloc.h.
11371 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
11372 (disable_packet_qfThreadInfo): Unconditionally compile.
11373 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
11374 * configure, config.in: Regenerate.
11375
2fe5e3ff
DE
113762008-07-28 Doug Kwan <dougkwan@google.com>
11377
11378 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
11379 (linux_write_memory): Remove declaration of errno.
11380
836acd6d
UW
113812008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
11382
11383 * linux-low.c (handle_extended_wait): Do not use "status"
11384 variable uninitialized.
11385
aeba519e
PA
113862008-07-07 Pedro Alves <pedro@codesourcery.com>
11387
11388 * server.c (handle_v_attach): Inhibit reporting dll changes.
11389
db42f210
PA
113902008-06-27 Pedro Alves <pedro@codesourcery.com>
11391
11392 * remote-utils.c (prepare_resume_reply): If requested, don't
11393 output "thread:TID" in the T stop reply.
11394
11395 * server.c (disable_packet_vCont, disable_packet_Tthread)
11396 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
11397 (handle_query): If requested, disable support for qC, qfThreadInfo
11398 and qsThreadInfo.
11399 (handle_v_requests): If requested, disable support for vCont.
11400 (gdbserver_show_disableable): New.
11401 (main): Handle --disable-packet and --disable-packet=LIST.
11402
11403 * server.h (disable_packet_vCont, disable_packet_Tthread)
11404 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
11405
8e4c5421
CD
114062008-06-20 Carlos O'Donell <carlos@codesourcery.com>
11407
11408 * server.c (gdbserver_usage): Mention --version.
11409
6e23a804
DJ
114102008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
11411
11412 * Makefile.in (gdbreplay.o): New rule.
11413
90aa6a40
JM
114142008-06-06 Joseph Myers <joseph@codesourcery.com>
11415
11416 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
11417 message, not gdbserver.
11418
c16158bc 114192008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
11420 Nathan Sidwell <nathan@codesourcery.com>
11421 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
11422
11423 * acinclude.m4: Include ../../config/acx.m4.
11424 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
11425 * configure, config.in: Regenerate.
11426 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
11427 * server.c (gdbserver_version): Print PKGVERSION.
11428 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
11429 (main): Adjust gdbserver_usage calls.
11430 * gdbreplay.c (version, host_name): Add declarations.
11431 (gdbreplay_version, gdbreplay_usage): New.
11432 (main): Accept --version and --help options.
11433
aeb75bf5
DJ
114342008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
11435
11436 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
11437 (arm_breakpoint_at): Handle Thumb.
11438 (the_low_target): Add comment.
11439
76b233dd
UW
114402008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
11441
11442 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
11443
08388c79
DE
114442008-05-09 Doug Evans <dje@google.com>
11445
a3c83fae
DE
11446 * server.h (decode_search_memory_packet): Declare.
11447 * remote-utils.c (decode_search_memory_packet): New fn.
11448 * server.c (handle_search_memory_1): New fn.
08388c79
DE
11449 (handle_search_memory): New fn.
11450 (handle_query): Process qSearch:memory packets.
11451
bb9c3d36
UW
114522008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
11453
11454 * regcache.c (registers_length): Remove.
11455 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
11456 full register packet.
11457 * regcache.h (registers_length): Remove prototype.
11458 * server.h (PBUFSIZ): Define to 16384.
11459
7284e1be
UW
114602008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
11461
11462 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
11463 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
11464 powerpc-64l.o, and powerpc-altivec64l.o.
11465 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
11466 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
11467 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
11468 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
11469 rs6000/power-linux.xml, and rs6000/power64-linux.xml
11470 to srv_xmlfiles.
11471
11472 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
11473 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
11474 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
11475 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
11476 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
11477 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
11478 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
11479 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
11480 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
11481 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
11482 (clean): Update.
11483
11484 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
11485 (init_registers_powerpc_32l): ... this new prototype.
11486 (init_registers_powerpc_32): Remove, replace by ...
11487 (init_registers_powerpc_altivec32l): ... this new prototype.
11488 (init_registers_powerpc_e500): Remove, replace by ...
11489 (init_registers_powerpc_e500l): ... this new prototype.
11490 (init_registers_ppc64): Remove, replace by ...
11491 (init_registers_powerpc_64l): ... this new prototype.
11492 (init_registers_powerpc_64): Remove, replace by ...
11493 (init_registers_powerpc_altivec64l): ... this new prototype.
11494 (ppc_num_regs): Set to 73.
11495 (PT_ORIG_R3, PT_TRAP): Define if necessary.
11496 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
11497 (ppc_cannot_store_register): Handle orig_r3 and trap.
11498 (ppc_arch_setup): Update init_registers_... calls.
11499 (ppc_fill_gregset): Handle orig_r3 and trap.
11500
11501 * inferiors.c (clear_inferiors): Reset current_inferior.
11502
fdc59709
PB
115032008-04-23 Paolo Bonzini <bonzini@gnu.org>
11504
889bf7c5
PA
11505 * acinclude.m4: Add override.m4.
11506 * configure: Regenerate.
fdc59709 11507
c9b2f845
UW
115082008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11509
11510 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
11511 initial call to init_register_ppc64.
11512
550512b8
UW
115132008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11514
43aaf8b6
PA
11515 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
11516 single powerpc*-*-linux* case.
550512b8
UW
11517 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
11518
b6430ec3
UW
115192008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
11520
11521 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 11522 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
11523 from reg_xmlfiles.
11524 * linux-ppc-low.c: Include <elf.h>.
11525 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
11526 (ppc_hwcap): New global variable.
11527 (ppc_regmap): Remove __SPE__ #ifdef sections.
11528 (ppc_regmap_e500): New global variable.
11529 (ppc_cannot_store_register): Update __SPE__ special case.
11530 (ppc_get_hwcap): New function.
11531 (ppc_arch_setup): Use it to determine whether inferior supports
11532 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
11533 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
11534 Do not access registers if target does not support AltiVec.
11535 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
11536 Do not access registers if target does not support SPE.
11537 (target_regsets): Unconditionally include AltiVec and SPE regsets.
11538
52fa2412
UW
115392008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
11540
11541 * linux-low.c (disabled_regsets, num_regsets): New.
11542 (use_regsets_p): Delete.
11543 (linux_wait_for_process): Clear disabled_regsets.
11544 (regsets_fetch_inferior_registers): Check and set it.
11545 (regsets_store_inferior_registers): Likewise.
11546 (linux_fetch_registers, linux_store_registers): Do not use
11547 use_regsets_p.
11548 (initialize_low): Allocate disabled_regsets.
11549
e28b3332
DJ
115502008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
11551
11552 * Makefile.in (LIBOBJS): New.
11553 (OBS): Use LIBOBJS.
11554 (memmem.o): New rule.
11555 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
11556 * configure: Regenerated.
11557
4536995d
UW
115582008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
11559
11560 * server.c (handle_query): Never return "unsupported" for
11561 qXfer:features:read queries.
11562
221c031f
UW
115632008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
11564
11565 * server.c (get_features_xml): Fix inverted condition.
11566 (handle_query): Always support qXfer:feature:read.
11567
ccd213ac
DJ
115682008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
11569
11570 * server.c (wrapper_argv): New.
11571 (start_inferior): Handle wrapper_argv. If set, expect an extra
11572 trap.
11573 (gdbserver_usage): Document --wrapper.
11574 (main): Parse --wrapper.
11575
6fe305f7
UW
115762008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11577
11578 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
11579 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
11580 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
11581 (ppc_set_pc): Likewise.
11582 (ppc_arch_setup): New function.
11583 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
11584 of collect_register.
889bf7c5 11585 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 11586
5b0a002e
UW
115872008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11588
11589 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
11590 instead of linux-ppc64-low.o.
11591 * linux-ppc64-low.c: Remove file.
11592 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
11593 (linux-ppc64-low.o): Remove rule.
11594
11595 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
11596 (init_registers_powerpc_64): Likewise.
11597 (ppc_regmap): Conditionally define depending on __powerpc64__.
11598 (ppc_cannot_store_register): Do not special-case "fpscr" when
11599 compiled on __powerpc64__.
11600 (ppc_collect_ptrace_register): New function.
11601 (ppc_supply_ptrace_register): New function.
11602 (ppc_breakpoint): Change type to "unsigned int".
11603 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
11604 (the_low_target): Conditionally provide initializers for the
889bf7c5 11605 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
11606 collect_ptrace_register and supply_ptrace_register members.
11607
9b4b61c8
UW
116082008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11609
11610 * regcache.h (gdbserver_xmltarget): Add extern declaration.
11611 * server.c (gdbserver_xmltarget): Define.
11612 (get_features_xml): Use it to replace "target.xml" and arch_string.
11613
11614 * configure.srv: Remove srv_xmltarget. Add XML files that were
11615 mentioned there to srv_xmlfiles instead. Remove conditional tests
11616 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
11617 srv_xmlfiles and srv_regobj to include all possible choices.
11618 * configure.ac (srv_xmltarget): Remove.
11619 (srv_xmlfiles): Do not add "target.xml".
11620 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
11621 checks for supplementary target information.
11622 * configure: Regenerate.
11623 * Makefile.in (XML_TARGET): Remove.
11624 (target.xml): Remove rule.
11625 (clean): Do not clean up target.xml.
11626 (.PRECIOUS): Do not mention target.xml.
11627
11628 * target.h (struct target_ops): Remove arch_string member.
11629 * linux-low.c (linux_arch_string): Remove.
11630 (linux_target_ops): Remove arch_string initializer.
11631 * linux-low.h (struct linux_target_ops): Remove arch_string member.
11632 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
11633 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
11634 * spu-low.c (spu_arch_string): Remove.
11635 (spu_target_ops): Remove arch_string initializer.
11636 * win32-low.c (win32_arch_string): Remove.
11637 (win32_target_ops): Remove arch_string initializer.
11638 * win32-low.h (struct win32_target_ops): Remove arch_string member.
11639 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
11640 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
11641
ee1a7ae4
UW
116422008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11643
11644 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
11645 by collect_ptrace_register and supply_ptrace_register hooks.
11646 * linux-low.c (fetch_register): Use supply_ptrace_register callback
11647 instead of checking for the_low_target.left_pad_xfer.
11648 (usr_store_inferior_registers): Use collect_ptrace_register callback
11649 instead of checking for the_low_target.left_pad_xfer.
11650
11651 * linux-s390-low.c (s390_collect_ptrace_register): New function.
11652 (s390_supply_ptrace_register): Likewise.
11653 (s390_fill_gregset): Call s390_collect_ptrace_register.
11654 (the_low_target): Update.
11655
11656 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
11657 (ppc_supply_ptrace_register): Likewise.
11658 (the_low_target): Update.
11659
11660 * linux-i386-low.c (the_low_target): Update.
11661 * linux-x86-64-low.c (the_low_target): Update.
11662
d61ddec4
UW
116632008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11664
11665 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
11666 reg-s390.o and reg-s390x.o.
11667
11668 * linux-low.c (new_inferior): New global variable.
11669 (linux_create_inferior, linux_attach): Set it.
11670 (linux_wait_for_process): Call the_low_target.arch_setup after the
11671 target has stopped for the first time.
11672 (initialize_low): Do not call the_low_target.arch_setup.
11673
11674 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
11675 (s390_set_pc): Likewise.
11676 (s390_arch_setup): New function.
11677 (the_low_target): Use s390_arch_setup as arch_setup routine.
11678
11679 * regcache.c (realloc_register_cache): New function.
11680 (set_register_cache): Call it for each existing regcache.
11681
d05b4ac3
UW
116822008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11683
11684 * server.h (init_registers): Remove prototype.
11685
11686 * linux-low.h (struct linux_target_ops): Add arch_setup field.
11687 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
11688 instead of init_registers ().
11689 * linux-arm-low.c (init_registers_arm): Add prototype.
11690 (init_registers_arm_with_iwmmxt): Likewise.
11691 (the_low_target): Add initializer for arch_setup field.
11692 * linux-cris-low.c (init_registers_cris): Add prototype.
11693 (the_low_target): Add initializer for arch_setup field.
11694 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
11695 (the_low_target): Add initializer for arch_setup field.
11696 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
11697 (the_low_target): Add initializer for arch_setup field.
11698 * linux-ia64-low.c (init_registers_ia64): Add prototype.
11699 (the_low_target): Add initializer for arch_setup field.
11700 * linux-m32r-low.c (init_registers_m32r): Add prototype.
11701 (the_low_target): Add initializer for arch_setup field.
11702 * linux-m68k-low.c (init_registers_m68k): Add prototype.
11703 (the_low_target): Add initializer for arch_setup field.
11704 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
11705 (init_registers_mips64_linux): Likewise.
11706 (the_low_target): Add initializer for arch_setup field.
11707 * linux-ppc-low.c (init_registers_ppc): Add prototype.
11708 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
11709 (the_low_target): Add initializer for arch_setup field.
11710 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
11711 (init_registers_powerpc_64): Likewise.
11712 (the_low_target): Add initializer for arch_setup field.
11713 * linux-s390-low.c (init_registers_s390): Add prototype.
11714 (init_registers_s390x): Likewise.
11715 (the_low_target): Add initializer for arch_setup field.
11716 * linux-sh-low.c (init_registers_sh): Add prototype.
11717 (the_low_target): Add initializer for arch_setup field.
11718 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
11719 (the_low_target): Add initializer for arch_setup field.
11720 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
11721 (the_low_target): Add initializer for arch_setup field.
11722
11723 * win32-low.h (struct win32_target_ops): Add arch_setup field.
11724 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
11725 instead of init_registers ().
11726 * win32-arm-low.c (init_registers_arm): Add prototype.
11727 (the_low_target): Add initializer for arch_setup field.
11728 * win32-i386-low.c (init_registers_i386): Add prototype.
11729 (the_low_target): Add initializer for arch_setup field.
11730
11731 * spu-low.c (init_registers_spu): Add prototype.
11732 (initialize_low): Call initialie_registers_spu () instead of
11733 initialize_registers ().
11734
fd96d250
PA
117352008-02-19 Pedro Alves <pedro@codesourcery.com>
11736
11737 * server.c (handle_v_requests): When handling the vRun and vAttach
11738 packets, if already debugging a process, don't kill it. Return an
11739 error instead.
11740
d41b6bb4
DJ
117412008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
11742
11743 * server.c (handle_query): Correct length check.
11744
5ac588cf
PA
117452008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
11746
11747 * win32-low.c (do_initial_child_stuff): Add process handle
11748 parameter. Set current_process_handle and current_process_id from the
11749 parameters. Clear globals.
11750 (win32_create_inferior): Don't set current_process_handle and
11751 current_process_id here. Instead pass them on the call to
11752 do_initial_child_stuff.
11753 (win32_attach): Likewise.
11754 (win32_clear_inferiors): New.
11755 (win32_kill): Don't close the current process handle or the
11756 current thread handle here. Instead call win32_clear_inferiors.
11757 (win32_detach): Don't open a new handle to the process. Call
11758 win32_clear_inferiors.
11759 (win32_join): Don't rely on current_process_handle; open a new
11760 handle using the process id.
11761 (win32_wait): Call win32_clear_inferiors when the inferior process
11762 has exited.
11763
ecd7ecbc
DJ
117642008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
11765
11766 * server.c (monitor_show_help): Add "exit".
11767
1525d545
MG
117682008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
11769
ecd7ecbc 11770 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
11771 (clean): Add reg-xtensa.c.
11772 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
11773 * configure.srv (xtensa*-*-linux*) New target.
11774 * linux-xtensa-low.c: New.
11775 * xtensa-xtregs.c: New.
1525d545 11776
59a016f0
PA
117772008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
11778
11779 * hostio.c: Don't include errno.h.
11780 (errno_to_fileio_errno): Move to hostio-errno.
11781 * hostio.c: (hostio_error): Remove the error parameter. Defer the
11782 error number outputting to the target->hostio_last_error callback.
11783 (hostio_packet_error): Use FILEIO_EINVAL directly.
11784 (handle_open, handle_pread, hostio_error, handle_unlink): Update
11785 calls to hostio_error.
11786 * hostio-errno.c: New.
11787 * server.h (hostio_last_error_from_errno): Declare.
11788 * target.h (target_ops): Add hostio_last_error member.
11789 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
11790 as hostio_last_error handler.
889bf7c5 11791 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
11792 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
11793 (wince_hostio_last_error): New functions.
11794 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
11795 as hostio_last_error handler.
11796 (win32_target_ops) [!_WIN32_WCE]: Register
11797 hostio_last_error_from_errno as hostio_last_error handler.
11798 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
11799 (hostio-errno.o): New rule.
11800 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
11801 * configure.srv (srv_hostio_err_objs): New variable. Default to
11802 hostio-errno.o.
11803 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
11804 * configure: Regenerate.
11805
2d717e4f
DJ
118062008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11807
11808 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
11809 (linux_kill, linux_detach): Clean up the process list.
11810 * remote-utils.c (remote_open): Improve port number parsing.
11811 (putpkt_binary, input_interrupt): Only send interrupts if the target
11812 is running.
11813 * server.c (extended_protocol): Make static.
11814 (attached): Define earlier.
11815 (exit_requested, response_needed, program_argv): New variables.
11816 (target_running): New.
11817 (start_inferior): Clear attached here.
11818 (attach_inferior): Set attached here.
11819 (require_running): Define.
11820 (handle_query): Use require_running and target_running. Implement
11821 "monitor exit".
11822 (handle_v_attach, handle_v_run): New.
11823 (handle_v_requests): Use require_running. Handle vAttach and vRun.
11824 (gdbserver_usage): Update.
11825 (main): Redo argument parsing. Handle --debug and --multi. Handle
11826 --attach along with other options or after the port. Save
11827 program_argv. Support no initial program. Resynchronize
11828 communication with GDB after an error. Handle "monitor exit".
11829 Use require_running and target_running. Always allow the extended
11830 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
11831 restart in extended mode.
11832 * README: Refer to the GDB manual. Update --attach usage.
11833
7407e2de
AS
118342007-12-20 Andreas Schwab <schwab@suse.de>
11835
11836 * linux-low.c (STACK_SIZE): Define.
11837 (linux_tracefork_child): Use it. Use __clone2 on ia64.
11838 (linux_test_for_tracefork): Likewise.
11839
b65d95c5
DJ
118402007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
11841
11842 * linux-low.c (linux_wait_for_event): Update messages. Do not
11843 reinsert auto-delete breakpoints.
11844 * mem-break.c (struct breakpoint): Change return type of handler to
11845 int.
11846 (set_breakpoint_at): Update handler type.
11847 (reinsert_breakpoint_handler): Return 1 instead of calling
11848 delete_breakpoint.
11849 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
11850 setting a new one.
11851 (check_breakpoints): Delete auto-delete breakpoints and return 2.
11852 * mem-break.h (set_breakpoint_at): Update handler type.
11853 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
11854 * win32-low.c (auto_delete_breakpoint): New.
11855 (get_child_debug_event): Use it.
11856
4e799345
DJ
118572007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
11858
11859 * configure.ac: Check for pread and pwrite.
11860 * hostio.c (handle_pread): Fall back to lseek and read.
11861 (handle_pwrite): Fall back to lseek and write.
11862 * config.in, configure: Regenerated.
11863
27524b67
DJ
118642007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
11865
11866 * server.c (myresume): Add own_buf argument.
11867 (main): Update calls.
11868
a20d5e98
DJ
118692007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
11870
11871 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
11872 * remote-utils.c (remote_open): Do not call disable_async_io.
11873 (block_async_io): Delete.
11874 (unblock_async_io): Make static.
11875 (initialize_async_io): New.
11876 * server.c (handle_v_cont): Handle async I/O here.
11877 (myresume): Likewise. Move other common resume tasks here...
11878 (main): ... from here. Call initialize_async_io. Disable async
11879 I/O before the main loop.
11880 * server.h (initialize_async_io): Declare.
11881 (block_async_io, unblock_async_io): Delete prototypes.
11882 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
11883
b79d787e
DJ
118842007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
11885
11886 * remote-utils.c (readchar): Allow binary data in received messages.
11887
d97903b2
PA
118882007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11889
11890 * win32-low.c (attaching): New global.
11891 (win32_create_inferior): Clear the `attaching' global.
11892 (win32_attach): Set the `attaching' global.
11893 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
11894 attaching. Only set a breakpoint at the entry point if not
11895 attaching.
11896
311de423
PA
118972007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11898
11899 * server.c (main): Don't report dll events on the initial
11900 connection on attaches.
11901
6c2d16d2
PA
119022007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11903
11904 * server.c (main): Relax numerical bases supported for the pid of
11905 the --attach command line argument.
11906
5ca906e6
PA
119072007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11908
11909 * win32-low.c (win32_attach): Call OpenProcess before
11910 DebugActiveProcess, not after. Add last error output to error
11911 call.
11912
9c6c8194
PA
119132007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11914
11915 * win32-low.c (win32_get_thread_context)
11916 (win32_set_thread_context): New functions.
11917 (thread_rec): Use win32_get_thread_context.
11918 (continue_one_thread, win32_resume): Use win32_set_thread_context.
11919 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
11920 field.
11921
4d5d1aaa
PA
119222007-12-03 Leo Zayas
11923 Pedro Alves <pedro_alves@portugalmail.pt>
11924
11925 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
11926 global variables.
11927 (child_add_thread): Minor cleanup.
11928 (child_continue): Resume artificially suspended threads before
11929 calling ContinueDebugEvent.
11930 (suspend_one_thread): New.
11931 (fake_breakpoint_event): New.
11932 (get_child_debug_event): Change return type to int. Check here if
11933 gdb sent an interrupt request. If a soft interrupt was requested,
11934 fake a breakpoint event. Return 0 if there is no event to handle,
11935 and 1 otherwise.
11936 (win32_wait): Don't check here if gdb sent an interrupt request.
11937 Ensure there is a valid event to handle.
11938 (win32_request_interrupt): Add soft interruption method as last
11939 resort.
11940
c436e841
PA
119412007-12-03 Leo Zayas
11942 Pedro Alves <pedro_alves@portugalmail.pt>
11943
11944 * win32-low.h (win32_thread_info): Add descriptions to the
11945 structure members. Replace `suspend_count' counter by a
11946 `suspended' flag.
11947 * win32-low.c (thread_rec): Update condition of when to get the
11948 context from the inferior. Rely on ContextFlags being set if it
11949 has already been retrieved. Only suspend the inferior thread if
11950 we haven't already. Warn if that fails.
11951 (continue_one_thread): s/suspend_count/suspended/. Only call
11952 ResumeThread once. Warn if that fails.
11953
e7b5fa67
PA
119542007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11955
11956 * win32-low.c (win32_wait): Don't read from the inferior when it
11957 has already exited.
11958
a385171d
PA
119592007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11960
11961 * Makefile.in (win32_low_h): New variable.
11962 (win32-low.o): Add dependency on $(win32_low_h).
11963 (win32-arm-low.o, win32-i386-low.o): New rules.
11964
f80c84b3
DJ
119652007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11966
11967 * hostio.c: Correct copyright year.
11968
a6b151f1
DJ
119692007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11970
11971 * Makefile.in (OBS): Add hostio.o.
11972 (hostio.o): New rule.
11973 * server.h (handle_vFile): Declare.
11974 * hostio.c: New file.
11975 * server.c (handle_v_requests): Take packet_len and new_packet_len
11976 for binary packets. Call handle_vFile.
11977 (main): Update call to handle_v_requests.
11978
f9387fc3
DJ
119792007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
11980
11981 * linux-low.c: Include <sched.h>.
11982
51c2684e
DJ
119832007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
11984
11985 * linux-low.c (linux_tracefork_grandchild): New.
11986 (linux_tracefork_child): Use clone.
11987 (linux_test_for_tracefork): Use clone; allocate and free a stack.
11988
75f83163
JB
119892007-10-31 Joel Brobecker <brobecker@adacore.com>
11990
11991 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
11992
da5898ce
DJ
119932007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
11994
11995 * linux-low.c (handle_extended_wait): Handle unexpected signals.
11996
24a09b5f
DJ
119972007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
11998
11999 * inferiors.c (change_inferior_id): Delete.
12000 (add_pid_to_list, pull_pid_from_list): New.
12001 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
12002 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
12003 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
12004 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
12005 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
12006 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
12007 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
12008 (using_threads): Always set to 1.
12009 (handle_extended_wait): New.
12010 (add_process): Do not set TID.
12011 (linux_create_inferior): Set must_set_ptrace_flags.
12012 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
12013 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
12014 (linux_thread_alive): Rename TID argument to LWPID.
12015 (linux_wait_for_process): Handle unknown processes. Do not use TID.
12016 (linux_wait_for_event): Do not use TID or check using_threads. Update
12017 call to dead_thread_notify. Call handle_extended_wait.
12018 (linux_create_inferior): Use PTRACE_SETOPTIONS.
12019 (send_sigstop): Delete sigstop_sent.
12020 (wait_for_sigstop): Avoid TID.
12021 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
12022 (linux_test_for_tracefork): New.
12023 (linux_lookup_signals): Use thread_db_active and
12024 linux_supports_tracefork_flag.
12025 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
12026 * linux-low.h (get_process_thread): Avoid TID.
12027 (struct process_ifo): Move thread_known and tid to the end. Remove
12028 sigstop_sent.
12029 (linux_attach_lwp, thread_db_init): Update prototypes.
12030 * server.h (change_inferior_id): Delete prototype.
12031 (add_pid_to_list, pull_pid_from_list): New prototypes.
12032 * thread-db.c (thread_db_use_events): New.
12033 (find_first_thread): Rename to...
12034 (find_one_thread): ...this. Update callers and messages. Do not
12035 call fatal. Check thread_db_use_events. Do not call
12036 change_inferior_id or new_thread_notify.
12037 (maybe_attach_thread): Update. Do not call new_thread_notify.
12038 (thread_db_init): Set thread_db_use_events. Check use_events.
12039 * utils.c (fatal, warning): Correct message prefix.
12040
30ed0a8f
DJ
120412007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
12042
12043 * Makefile.in (clean): Remove new files.
12044 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
12045 (powerpc-64.o, powerpc-64.c): New rules.
12046 * configure.srv: Use alternate register sets for powerpc64-*-linux*
12047 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
12048 with SPE.
12049 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
12050 SPE targets.
12051 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
12052 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
12053 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
12054 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
12055 (target_regsets): Add AltiVec and SPE register sets.
12056 * configure.ac: Check for AltiVec and SPE.
12057 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
12058 (ppc_fill_vrregset, ppc_store_vrregset): New.
12059 (target_regsets): Add AltiVec register set.
12060 * configure: Regenerated.
12061
fd462a61
DJ
120622007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
12063
12064 * linux-low.c (O_LARGEFILE): Define.
12065 (linux_read_memory): Use /proc/PID/mem.
12066 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
12067 * configure, config.in: Regenerated.
12068
69f223ed
DJ
120692007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12070
12071 * linux-low.c (linux_wait_for_event): Do not pass signals while
12072 single-stepping.
12073
aec18585
PA
120742007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12075
12076 * win32-low.c (create_process): New.
12077 (win32_create_inferior): Use create_process instead of
12078 CreateProcess. If create_process failed retry appending an ".exe"
12079 suffix. Store the GetLastError result immediatelly after
12080 create_process calls and use it on the call to error.
12081
34d86ddd
PA
120822007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12083
12084 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
12085
5a0e3bd0
JB
120862007-08-23 Joel Brobecker <brobecker@adacore.com>
12087
12088 * configure.ac: Switch license to GPLv3.
12089
f88c79e6
MS
120902007-08-01 Michael Snyder <msnyder@access-company.com>
12091
12092 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
12093
6b3d9b83
PA
120942007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
12095
12096 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
12097 typedef.
12098 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
12099 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
12100 CloseToolhelp32Snapshot.
12101 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
12102 CloseToolhelp32Snapshot.
12103
c588c53c
MS
121042007-07-27 Michael Snyder <michael.snyder@access-company.com>
12105
12106 * server.c (main): Check for inferior exit before main loop.
12107
aa0403d9
PA
121082007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
12109
12110 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
12111 instead of on tmp_desc.
12112
255e7678
DJ
121132007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
12114 Daniel Jacobowitz <dan@codesourcery.com>
12115
12116 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
12117 (add_thread): Minor cleanups.
12118 (clear_inferiors): Move lower in the file. Clear the DLL
12119 list.
12120 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
12121 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
12122 (xml_escape_text): New.
12123 * server.c (handle_query): Handle qXfer:libraries:read. Report it
12124 for qSupported.
12125 (handle_v_cont): Report errors.
12126 (gdbserver_version): Update.
12127 (main): Correct size of own_buf. Do not report initial DLL events.
12128 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
12129 (unloaded_dll, xml_escape_text): New.
12130 * win32-low.c (enum target_waitkind): Update comments.
12131 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
12132 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
12133 (win32_EnumProcessModules, win32_GetModuleInformation)
12134 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
12135 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
12136 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
12137 (win32_Module32First, win32_Module32Next, load_toolhelp)
12138 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
12139 (get_child_debug_event): Handle DLL events.
12140 (win32_wait): Likewise.
12141
0d37add9
DJ
121422007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12143
12144 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
12145 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
12146
45e2715e
PA
121472007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12148
12149 * win32-low.c (handle_output_debug_string): Ignore event if not
12150 waiting.
12151
c5674cf1
PA
121522007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12153
12154 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
12155
2bbe3cc1
DJ
121562007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
12157
12158 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
12159
ae13219e
DJ
121602007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
12161
12162 * inferiors.c (change_inferior_id): Add comment.
12163 * linux-low.c (check_removed_breakpoint): Add an early
12164 prototype. Improve debug output.
12165 (linux_attach): Doc update.
12166 (linux_detach_one_process, linux_detach): Clean up before releasing
12167 each process.
12168 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
12169 * linux-low.h (struct process_info): Doc improvement.
12170 * mem-break.c (delete_all_breakpoints): New.
12171 * mem-break.h (delete_all_breakpoints): New prototype.
12172 * thread-db.c (find_first_thread): New.
12173 (thread_db_create_event): Call it instead of
12174 thread_db_find_new_threads. Clean up unused variables.
12175 (maybe_attach_thread): Remove first thread handling.
12176 (thread_db_find_new_threads): Use find_first_thread.
12177 (thread_db_get_tls_address): Likewise.
12178
4105de34
DJ
121792007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
12180
12181 * thread-db.c (thread_db_find_new_threads): Add prototype.
12182 (thread_db_create_event): Check for the main thread before adding
12183 a new thread.
12184 (maybe_attach_thread): Only enable event reporting if TID == 0.
12185 (thread_db_get_tls_address): Check for new threads.
12186
2b876972
DJ
121872007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
12188
12189 * linux-low.c (linux_create_inferior): Try execv before execvp.
12190 * spu-low.c (spu_create_inferior): Likewise.
12191
7a245884
DJ
121922007-06-13 Mike Frysinger <vapier@gentoo.org>
12193
12194 * linux-low.c (linux_create_inferior): Change execv to execvp.
12195 * spu-low.c (spu_create_inferior): Likewies.
12196
117ce543
DJ
121972007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
12198
12199 * Makefile.in (clean): Clean new files instead of deleted ones.
12200 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
12201 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
12202 rules.
12203 * configure.srv: Specify XML files and new regformats for MIPS and
12204 MIPS64 GNU/Linux.
12205 * linux-mips-low.c (mips_num_regs): Set to only used registers.
12206 (mips_regmap): Do not fetch $0. Remove unused registers. Add
12207 an entry for the restart register.
12208 (mips_cannot_fetch_register, mips_cannot_store_register)
12209 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
12210 register names to match the XML descriptions.
12211 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
12212 restart register instead of $0.
12213
0e7f50da
UW
122142007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
12215 Markus Deuling <deuling@de.ibm.com>
12216
12217 * remote-utils.c (decode_xfer_write): New function.
12218 * server.h (decode_xfer_write): Add prototype.
12219 * server.c (handle_query): Add PACKET_LEN argument. Support
12220 qXfer:spu:read and qXfer:spu:write packets.
12221 (main): Pass packet_len to handle_query.
12222 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
12223 * target.h (target_ops): Add qxfer_spu.
12224
374c1d38
UW
122252007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
12226
12227 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
12228 accessing non-seekable spufs files.
12229
bb63802a
UW
122302007-05-16 Markus Deuling <deuling@de.ibm.com>
12231
889bf7c5 12232 * server.c (handle_query): Add reply for qC packet.
bb63802a 12233
7390519e
PA
122342007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12235 Leo Zayas <lerele@champenstudios@com>
12236
12237 * server.h (check_remote_input_interrupt_request): New function.
12238 * remote_utils.c (INVALID_DESCRIPTOR): New define.
12239 (remote_desc): Initialize with INVALID_DESCRIPTOR.
12240 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
12241 (check_remote_input_interrupt_request): New function.
12242 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 12243 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
12244 winapi_GenerateConsoleCtrlEvent): New typedefs.
12245 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
12246 to 250 ms.
12247 (win32_wait): Check for remote interrupt request
12248 with check_remote_input_interrupt_request.
12249 (win32_request_interrupt): New function.
12250 (win32_target_op): Set request_interrupt to win32_request_interrupt.
12251
34b34921
PA
122522007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12253
12254 * win32-low.c (debug_registers_changed,
12255 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
12256 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
12257 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
12258 (thread_rec): Get context using the low target.
12259 (child_add_thread): Call thread_added on the low target,
12260 which does the same thing.
12261 (regptr): Delete.
12262 (do_initial_child_stuff): Remove debug registers references.
12263 Set context using the low target. Resume threads after
12264 setting the contexts.
12265 (child_continue): Remove dead variable. Remove debug
12266 registers references.
12267 (child_fetch_inferior_registers): Go through the low target.
12268 (do_child_store_inferior_registers): Remove.
12269 (child_store_inferior_registers): Go through the low target.
12270 (win32_resume): Remove debug registers references.
12271 Set context using the low target.
12272 (handle_exception): Change return type to void. Don't record
12273 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
12274 first chance exception.
889bf7c5 12275 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
12276 goto loop. Always return after waiting for debug event.
12277 (win32_wait): Convert to switch statement. Handle spurious
12278 events.
12279
12280 * win32-i386-low.c (debug_registers_changed,
12281 debug_registers_used): New.
12282 (initial_stuff): Rename to ...
12283 (i386_initial_stuff): ... this. Clear debug registers
12284 state variables.
12285 (store_debug_registers): Delete.
12286 (i386_get_thread_context): New.
12287 (load_debug_registers): Delete.
12288 (i386_set_thread_context): New.
12289 (i386_thread_added): New.
12290 (single_step): Rename to ...
12291 (i386_single_step): ... this.
12292 (do_fetch_inferior_registers): Rename to ...
12293 (i386_fetch_inferior_register): ... this.
12294 (i386_store_inferior_register): New.
12295 (the_low_target): Adapt to new interface.
12296
12297 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
12298 (arm_get_thread_context): New.
12299 (arm_set_thread_context): New.
12300 (regptr): New.
12301 (do_fetch_inferior_registers): Rename to ...
12302 (arm_fetch_inferior_register): ... this.
12303 (arm_store_inferior_register): New.
12304 (arm_wince_breakpoint): Reimplement as unsigned long.
12305 (arm_wince_breakpoint_len): Define.
12306 (the_low_target): Adapt to new interface.
12307
12308 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
12309 load_debug_registers. Add get_thread_context, set_thread_context,
12310 thread_added and store_inferior_register. Rename
12311 fetch_inferior_registers to fetch_inferior_register.
12312 (regptr): Remove declaration.
12313
dd6953e1
PA
123142007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12315
12316 * linux-low.c (linux_detach): Change return type to int. Return 0.
12317 * spu-low.c (spu_detach): Likewise.
12318
444d6139
PA
123192007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12320
12321 * target.h (target_ops): Change return type of detach to int.
12322 Add join.
12323 (join_inferior): New.
12324 * server.c (main): Don't skip detach support on mingw32.
12325 If the inferior doesn't support detaching return error.
12326 Call join_inferior instead of using waitpid.
12327 * linux-low.c (linux_join): New.
12328 (linux_target_op): Add linux_join.
12329 * spu-low.c (spu_join): New.
12330 (spu_target_ops): Add spu_join.
12331 * win32-low.c (win32_detach): Adapt to new interface.
12332 Reopen current_process_handle before detaching. Issue a child
12333 resume before detaching.
12334 (win32_join): New.
12335 (win32_target_op): Add win32_join.
12336
1d5315fe
PA
123372007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12338
12339 * win32-low.c (win32-attach): Fix return value.
12340 * target.h (target_ops): Describe ATTACH return values.
12341
bf914831
PA
123422007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12343
12344 * win32-low.c (GETPROCADDRESS): Define.
12345 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
12346 (winapi_DebugSetProcessKillOnExit): Likewise.
12347 (win32_create_inferior): Force usage of ansi CreateProcessA.
12348 (win32_attach): Use GETPROCADDRESS.
12349 (win32_detach): Likewise.
12350
f72f3e60
PA
123512007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12352
12353 * win32-low.c (win32_wait): Don't use WSTOPSIG.
12354
ed50f18f
PA
123552007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
12356
12357 * win32-low.c: Commit leftover changes from 2007-03-29.
12358
0c2ead7e
DJ
123592007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
12360
12361 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
12362 fields short instead of int. Add explicit padding.
12363 (i387_cache_to_fsave): Remove unnecessary casts.
12364 (i387_fsave_to_cache): Doc fix.
12365 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
12366
73725ff3
DJ
123672007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
12368
12369 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
12370 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
12371
d99f33d8
PA
123722007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
12373
12374 * configure.srv (arm*-*-mingw32ce*): Move near the other
12375 arm targets.
12376
68070c10
PA
123772007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
12378
2482afc6 12379 * configure.ac: Add errno checking.
68070c10
PA
12380 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
12381 sys/file.h and malloc.h.
12382 (AC_CHECK_DECLS): Add perror.
12383 (srv_mingwce): Handle.
2482afc6 12384 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
12385 win32-i386-low.o to srv_tgtobj.
12386 (i[34567]86-*-mingw*): Likewise.
12387 (arm*-*-mingw32ce*): Add case.
12388 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12389 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
12390 [__MINGW32CE__] (strerror): New function.
12391 [__MINGW32CE__] (errno): Define to GetLastError.
12392 [__MINGW32CE__] (COUNTOF): New macro.
12393 (remote_open): Remove extra close call.
12394 * mem-break.c (delete_breakpoint_at): New function.
12395 * mem-break.h (delete_breakpoint_at): Declare.
12396 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12397 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
12398 [USE_WIN32API] (read, write): Add char* casts.
12399 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
12400 * server.h: Include wincecompat.h on Windows CE.
12401 [HAVE_ERRNO_H]: Check.
12402 (perror): Declare if not declared.
12403 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
12404 (perror_with_name): Remove errno declaration.
12405 * wincecompat.h: New.
12406 * wincecompat.c: New.
12407 * win32-low.h: New.
12408 * win32-arm-low.c: New.
12409 * win32-i386-low.c: New.
12410 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
12411 (OUTMSG2): Make it safe.
12412 (_T): New macro.
12413 (COUNTOF): New macro.
12414 (NUM_REGS): Get it from the low target.
12415 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
12416 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
12417 (thread_rec): Let low target handle debug registers.
12418 (child_add_thread): Likewise.
12419 (child_init_thread_list): Likewise.
12420 (continue_one_thread): Likewise.
12421 (regptr): New.
12422 (do_child_fetch_inferior_registers): Move to ...
12423 * win32-i386-low.c: ... here, and rename to ...
12424 (do_fetch_inferior_registers): ... this.
889bf7c5 12425 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
12426 Go through the low target.
12427 (do_child_store_inferior_registers): Use regptr.
12428 (strwinerror): New function.
12429 (win32_create_inferior): Handle Windows CE.
12430 Use strwinerror instead of strerror on Windows error
12431 codes. Add program to the error output.
12432 Don't close the main thread handle on Windows CE.
12433 (win32_attach): Use coredll.dll on Windows CE.
12434 (win32_kill): Close current process and current
12435 thread handles.
12436 (win32_detach): Use coredll.dll on Windows CE.
12437 (win32_resume): Let low target handle debug registers, and
12438 step request.
12439 (handle_exception): Add/Remove initial breakpoint. Avoid
12440 non-existant WSTOPSIG on Windows CE.
12441 (win32_read_inferior_memory): Cast to remove warning.
12442 (win32_arch_string): Go through the low target.
12443 (initialize_low): Call set_breakpoint_data with the low
12444 target's breakpoint.
12445 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
12446 FOP_REGNUM, mappings): Move to ...
12447 * win32-i386-low.c: ... here.
12448 * win32-low.c (win32_thread_info): Move to ...
12449 * win32-low.h: ... here.
12450 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
12451 win32-arm-low.c and wincecompat.c.
12452 (all:): Add $EXEEXT.
12453 (install-only:): Likewise.
12454 (gdbserver:): Likewise.
12455 (gdbreplay:): Likewise.
12456 * config.in: Regenerate.
12457 * configure: Regenerate.
12458
41093d81
PA
124592007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12460
12461 * win32-low.c: Rename typedef thread_info to
12462 win32_thread_info throughout.
12463
544afa54
PA
124642007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12465
12466 * win32-i386-low.c: Rename to ...
12467 * win32-low.c: ... this.
12468 * configure.srv: Replace win32-i386-low.o with win32-low.o.
12469 * Makefile.in: Likewise.
12470
bce7165d
PA
124712007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
12472
12473 * remote-utils.c (monitor_output): Constify msg parameter.
12474 * server.h (monitor_output): Likewise.
12475 * win32-i386-low.c (handle_output_debug_string): New.
12476 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
12477 handle_output_debug_string.
12478 (get_child_debug_event): Likewise.
12479
506c7aa0
DJ
124802007-03-27 Mat Hostetter <mat@lcs.mit.edu>
12481
12482 * server.c (main): Correct strtoul check.
12483
42c81e2a
DJ
124842007-03-27 Jon Ringle <jon@ringle.org>
12485
12486 * linux-low.c: Check __ARCH_HAS_MMU__ also.
12487
9453113a
DJ
124882007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
12489
12490 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
12491
64a69107
DJ
124922007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
12493
12494 * terminal.h: Check HAVE_SGTTY_H.
12495
124962007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
12497
12498 * remote-utils.c (remote_open): Print out the assigned port number.
12499
c74d0ad8
DJ
125002007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
12501
12502 * remote-utils.c (monitor_output): New function.
12503 * server.c (debug_threads): Define here.
12504 (monitor_show_help): New function.
12505 (handle_query): Handle qRcmd.
12506 (main): Do not handle 'd' packet.
12507 * server.h (debug_threads, remote_debug, monitor_output): Declare.
12508 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
12509 of debug_threads.
12510
de7c3b4a
PA
125112007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12512
12513 * Makefile.in (EXEEXT): New.
12514 (clean): Use $(EXEEXT).
12515
ef57601b
PA
125162007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12517
12518 * target.h (target_ops): Rename send_signal to request_interrupt,
12519 and remove enum target_signal parameter.
12520 * linux-low.c (linux_request_interrupt): Rename from
12521 linux_send_signal, and always send SIGINT.
12522 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
12523 and always send SIGINT.
12524 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
12525 of send_signal.
12526 (input_interrupt): Likewise.
12527
820f2bda
PA
125282007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12529
12530 * server.c (get_features_xml): Check if target implemented
12531 arch_string.
12532 * win32-i386-low.c (win32_arch_string): New.
12533 (win32_target_ops): Add win32_arch_string as arch_string member.
12534
ab39bf24
UW
125352007-02-22 Markus Deuling <deuling@de.ibm.com>
12536
12537 * spu-low.c (spu_arch_string): New.
12538 (spu_target_ops): Add spu_arch_string.
12539
61ff6e04
DJ
125402007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
12541
12542 * remote-utils.c: Remove HAVE_TERMINAL_H check.
12543 * configure.ac: Do not check for terminal.h.
12544 * configure, config.in: Regenerated.
12545
fb1e4ffc
DJ
125462007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12547
12548 * Makefile.in (OBS): Add $(XML_BUILTIN).
12549 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
12550 (clean): Update.
12551 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
12552 (arm-with-iwmmxt.c): New.
12553 * config.in, configure: Regenerate.
12554 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
12555 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
12556 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
12557 (arm*-*-linux*): Add iWMMXt and regset support.
12558 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
12559 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
12560 (arm_store_wmmxregset, target_regsets): New.
12561 * server.c (get_features_xml): Take annex argument. Check builtin
12562 XML documents.
12563 (handle_query): Handle multiple annexes.
12564
0f48aa01
DJ
125652007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12566
12567 * remote-utils.c [USE_WIN32API] (read, write): Define.
12568 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
12569 write.
12570
23181151
DJ
125712007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
12572
12573 * linux-i386-low.c (the_low_target): Set arch_string.
12574 * linux-x86-64-low.c (the_low_target): Likewise.
12575 * linux-low.c (linux_arch_string): New.
12576 (linux_target_ops): Add it.
12577 * linux-low.h (struct linux_target_ops): Add arch_string.
12578 * server.c (write_qxfer_response): Use const void * for DATA.
12579 (get_features_xml): New.
12580 (handle_query): Handle qXfer:features:read. Report it for qSupported.
12581 * target.h (struct target_ops): Add arch_string method.
12582
9d606399
DJ
125832007-01-03 Denis Pilat <denis.pilat@st.com>
12584 Daniel Jacobowitz <dan@codesourcery.com>
12585
12586 * linux-low.c (linux_kill): Handle being called with no threads.
12587 * win32-i386-low.c (win32_kill): Likewise.
12588 (get_child_debug_event): Clear current_process_handle.
12589
125902006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
12591 Daniel Jacobowitz <dan@codesourcery.com>
12592
12593 * remote-utils.c (remote_open): Check the type of specified
12594 serial port devices before opening them.
12595 * server.c (main): Kill the inferior if an error occurs during
12596 the first remote_open.
12597
a5e13d24
DJ
125982006-12-05 Markus Deuling <deuling@de.ibm.com>
12599
12600 * README: Update supported targets.
12601
186947f7
DJ
126022006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
12603
12604 * Makefile.in (clean): Remove reg-mips64.c.
12605 (reg-mips64.c, reg-mips64.o): New rules.
12606 * configure.srv: Handle mips64. Include regset support for mips.
12607 * linux-mips-low.c (union mips_register): New.
12608 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
12609 (mips_breakpoint, mips_breakpoint_at): Use int.
12610 (mips_collect_register, mips_supply_register)
12611 (mips_collect_register_32bit, mips_supply_register_32bit)
12612 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12613 (mips_store_fpregset, target_regsets): New.
12614 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
12615
a13e2c95
UW
126162006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
12617
12618 * configure.srv: Add target "spu*-*-*".
12619 * Makefile.in (clean): Remove reg-spu.c.
12620 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
12621 * spu-low.c: New file.
12622
cb7283db
DJ
126232006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12624
12625 * configure.ac: Correct td_thr_tls_get_addr test.
12626 * configure: Regenerated.
12627
89be2091
DJ
126282006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12629
12630 * linux-low.c (linux_wait_for_event): Reformat. Use the
12631 pass_signals array.
12632 * remote-utils.c (decode_address_to_semicolon): New.
12633 * server.c (pass_signals, handle_general_set): New.
12634 (handle_query): Mention QPassSignals for qSupported.
12635 (main): Call handle_general_set.
12636 * server.h (pass_signals, decode_address_to_semicolon): New.
12637
000ef4f0
DJ
126382006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
12639
12640 * server.c (handle_query): Correct error handling for read_auxv.
12641
b7149293
UW
126422005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
12643
12644 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
12645 and srv_linux_thread_db to yes.
12646 * linux-s390-low.c (s390_fill_gregset): New function.
12647 (target_regsets): Define data structure.
12648
dae5f5cf
DJ
126492006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
12650
12651 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
12652 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
12653 * config.in, configure: Regenerated.
12654 * inferiors.c (gdb_id_to_thread): New function.
12655 (gdb_id_to_thread_id): Use it.
12656 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
12657 * linux-low.h (struct process_info): Add th member.
12658 (thread_db_get_tls_address): New prototype.
12659 * remote-utils.c (decode_address): Make non-static.
12660 * server.c (handle_query): Handle qGetTLSAddr.
12661 * server.h (gdb_id_to_thread, decode_address): New prototypes.
12662 * target.h (struct target_ops): Add get_tls_address.
12663 * thread-db.c (maybe_attach_thread): Save the thread handle.
12664 (thread_db_get_tls_address): New.
12665
32ca6d61
DJ
126662006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
12667
12668 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
12669 (linux_resume_one_process): Take a siginfo_t *. Update all
12670 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
12671 (struct pending_signals): Add a siginfo_t.
12672 (linux_wait_for_process): Always set last_status.
12673 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
12674 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
12675 * linux-low.h (struct process_info): Add last_status.
12676
5ffff7c1
DJ
126772006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
12678
12679 * remote-utils.c (try_rle): New function.
12680 (putpkt_binary): Use it.
12681
8695c747
DJ
126822006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
12683
12684 * Makefile.in (clean): Clean reg-x86-64-linux.c.
12685 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
12686 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
12687 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
12688 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
12689 point registers.
12690
290fadea
RS
126912006-08-08 Richard Sandiford <richard@codesourcery.com>
12692
12693 * server.c (terminal_fd): New variable.
12694 (old_foreground_pgrp): Likewise.
12695 (restore_old_foreground_pgrp): New function.
12696 (start_inferior): Record the terminal file descriptor in terminal_fd
12697 and its original foreground group in old_foreground_pgrp. Register
12698 restore_old_foreground_pgrp with atexit().
12699
9f2e1e63
DJ
127002006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
12701
12702 * server.c (handle_query): Correct qPart to qXfer.
12703
b80864fb
DJ
127042006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
12705
12706 * configure.ac: Check for more headers which are missing on
12707 Windows. Automatically supply -lwsock32 and USE_WIN32API.
12708 * configure.srv: Add Cygwin and mingw32.
12709 * remote-utils.c: Don't include headers unconditionally which
12710 are missing on mingw32. Include <winsock.h> for mingw32.
12711 (remote_open): Adjust for mingw32 support. Flush
12712 standard error after writing to it.
12713 (remote_close, putpkt_binary, input_interrupt, block_async_io)
12714 (unblock_async_io, enable_async_io, disable_async_io)
12715 (readchar, getpkt): Update for Winsock support.
12716 (prepare_resume_reply): Expect a protocol signal number.
12717 * server.c: Disable <sys/wait.h> on mingw32.
12718 (start_inferior): Adjust for mingw32 support. Flush
12719 standard error after writing to it.
12720 (attach_inferior): Likewise. Use protocol signal
12721 numbers.
12722 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
12723 and names.
12724 * win32-i386-low.c: New file.
12725 * Makefile.in (XM_CLIBS): Set.
12726 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
12727 (win32-i386-low.o): New dependency rule.
12728 * linux-low.c (linux_wait): Use target signal numbers.
12729 * target.h (struct target_ops): Doc fix.
12730 * server.h (target_signal_to_name): New prototype.
12731 * gdbreplay.c: Don't include headers unconditionally which
12732 are missing on mingw32. Include <winsock.h> for mingw32.
12733 (remote_close, remote_open): Adjust for Winsock support.
12734 * configure, config.in: Regenerated.
12735
0876f84a
DJ
127362006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12737
12738 * server.c (decode_xfer_read, write_qxfer_response): New.
12739 (handle_query): Take a packet length argument. Handle
12740 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
12741 the qSupported response.
12742 (main): Update call to handle_query.
12743
01f9e8fa
DJ
127442006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
12745
12746 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
12747 (putpkt_binary): Renamed from putpkt and adjusted for binary
12748 data.
12749 (putpkt): New wrapper for putpkt_binary.
12750 (readchar): Don't mask off the high bit.
12751 (decode_X_packet): New function.
12752 * server.c (main): Call putpkt_binary if a handler sets the packet
12753 length. Save the length of the incoming packet. Handle 'X'.
12754 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
12755
be2a5f71
DJ
127562006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
12757
12758 * server.c (handle_query): Handle qSupported.
12759
ea025f5f
DJ
127602006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12761
12762 * remote-utils.c (all_symbols_looked_up): New variable.
12763 (look_up_one_symbol): Check it.
12764 * server.h (look_up_one_symbol): New declaration.
12765 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
12766
9308fc88
DJ
127672006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12768
12769 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 12770 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
12771 (PTRACE_GET_THREAD_AREA): Define.
12772 (ps_get_thread_area): New function.
12773
52fb6437
NS
127742006-05-09 Nathan Sidwell <nathan@codesourcery.com>
12775
12776 * configure.srv (m68k*-*-uclinux*): New target.
12777 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
12778 (linux_resume_one_process): Remove extraneous cast.
12779 (linux_read_offsets): New.
12780 (linux_target_op): Add linux_read_offsets on mmuless systems.
12781 * server.c (handle_query): Add qOffsets logic.
12782 * target.h (struct target_ops): Add read_offsets.
12783
21b0f40c
DJ
127842006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12785
12786 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
12787 (PTRACE_GET_THREAD_AREA): Define.
12788 (ps_get_thread_area): New function.
12789 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
12790 (linux-x86-64-low.o): Update.
12791
0050a760
DJ
127922006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12793
12794 * configure.ac: Remove checks for prfpregset_t.
12795 * gdb_proc_service.h: New file.
12796 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
12797 new "gdb_proc_service.h".
12798 * proc-service.c: Likewise.
12799 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
12800 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
12801 * Makefile.in (gdb_proc_service_h): Updated.
12802 * configure, config.in: Regenerated.
12803
b92a518e
DJ
128042006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12805
12806 * remote-utils.c (prepare_resume_reply): Move declaration
12807 of gdb_id_from_wait to the top of the block.
12808
545587ee
DJ
128092006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
12810
12811 * linux-low.c (regsets_store_inferior_registers): Read the regset
12812 from the target before filling it.
12813
9db87ebd
DJ
128142006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12815
12816 * server.c (attach_inferior): Return SIGTRAP for a successful
12817 attach.
12818
dd24457d
DJ
128192006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12820
12821 * Makefile.in (OBS): Add version.o.
12822 (STAGESTUFF): Delete.
12823 (version.o): Add dependencies.
12824 (version.c): Replace rule.
12825 (clean): Remove version.c.
12826 * server.c (gdbserver_version): New.
12827 (gdbserver_usage): Use printf.
12828 (main): Handle --version and --help.
12829 * server.h (version, host_name): Add declarations.
12830
6f0f660e
EZ
128312005-12-23 Eli Zaretskii <eliz@gnu.org>
12832
889bf7c5
PA
12833 * linux-arm-low.c:
12834 * linux-arm-low.c:
12835 * inferiors.c:
12836 * i387-fp.h:
12837 * i387-fp.c:
12838 * gdbreplay.c:
12839 * regcache.c:
12840 * proc-service.c:
12841 * mem-break.h:
12842 * mem-break.c:
12843 * linux-x86-64-low.c:
12844 * linux-sh-low.c:
12845 * linux-s390-low.c:
12846 * linux-ppc64-low.c:
12847 * linux-ppc-low.c:
12848 * linux-mips-low.c:
12849 * linux-m68k-low.c:
12850 * linux-m32r-low.c:
12851 * linux-low.h:
12852 * linux-low.c:
12853 * linux-ia64-low.c:
12854 * linux-i386-low.c:
12855 * linux-crisv32-low.c:
12856 * thread-db.c:
12857 * terminal.h:
12858 * target.h:
12859 * target.c:
12860 * server.h:
12861 * server.c:
12862 * remote-utils.c:
12863 * regcache.h:
12864 * utils.c:
12865 * Makefile.in:
12866 * configure.ac:
6f0f660e
EZ
12867 * gdbserver.1: Add (C) after Copyright. Update the FSF
12868 address.
12869
9d1fb177
DJ
128702005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
12871
12872 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
12873 (arm_breakpoint_at): Recognize both breakpoints.
12874 (the_low_target): Use the correct breakpoint instruction.
12875
011a70c2
DJ
128762005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
12877
12878 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
12879 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
12880 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
12881 (the_low_target): Update.
12882
7fb85e41
AS
128832005-10-25 Andreas Schwab <schwab@suse.de>
12884
12885 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
12886
12887 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
12888 (ia64_num_regs): Reduce to 462.
12889
3db0444b
DJ
128902005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
12891
12892 * acinclude.m4: Correct quoting.
12893 * aclocal.m4: Regenerated.
12894
12895 Suggested by SZOKOVACS Robert <szo@ies.hu>:
12896 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
12897 (thread_db_init): Call thread_db_err_str.
12898 * configure.ac: Check for TD_VERSION.
12899 * config.in, configure: Regenerated.
12900
bee0189a
DJ
129012005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12902
12903 * server.h (error, fatal, warning): Add ATTR_FORMAT.
12904
e9d25b98
DJ
129052005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12906
12907 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
12908 is not available. Define HAVE_PTRACE_GETREGS if it is.
12909 * config.in, configure: Regenerated.
12910 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
12911 * linux-i386-low.c, linux-m68k-low.c: Update to use
12912 HAVE_PTRACE_GETREGS.
12913 * linux-low.c (regsets_fetch_inferior_registers)
12914 (regsets_store_inferior_registers): Only return 0 if we processed
12915 GENERAL_REGS.
12916 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
12917 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
12918
a06660f7
DJ
129192005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12920
12921 * inferiors.c (struct thread_info): Add gdb_id.
12922 (add_thread): Add gdb_id argument.
12923 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
12924 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
12925 calls to add_thread.
12926 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
12927 * server.c (handle_query): Use thread_to_gdb_id.
12928 (handle_v_cont, main): Use gdb_id_to_thread_id.
12929 * server.h (add_thread): Update prototype.
12930 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
12931 prototypes.
12932
5a1f5858
DJ
129332005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12934
12935 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
12936 left-padded registers.
12937 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
12938 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
12939
e122f1f5
SE
129402005-07-01 Steve Ellcey <sje@cup.hp.com>
12941
12942 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
12943 * configure: Regenerate.
12944 * config.in: Regenerate.
12945 * server.h (NEED_DECLARATION_STRERROR):
12946 Replace with !HAVE_DECL_STRERROR.
12947
d592fa2f
DJ
129482005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
12949
12950 * linux-low.c (linux_wait, linux_send_signal): Don't test
12951 an unsigned long variable for > 0 if it could be MAX_ULONG.
12952 * server.c (myresume): Likewise.
12953 * target.c (set_desired_inferior): Likewise.
12954
ccbd4912
MK
129552005-06-13 Mark Kettenis <kettenis@gnu.org>
12956
12957 * configure.ac: Simplify and improve check for socklen_t.
12958 * configure, config.in: Regenerate.
12959
f450004a
DJ
129602005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
12961
12962 * acconfig.h: Remove.
12963 * configure.ac: Add a test for socklen_t. Use three-argument
12964 AC_DEFINE throughout.
12965 * config.in: Regenerated using autoheader 2.59.
12966 * configure: Regenerated.
12967
12968 * gdbreplay.c (socklen_t): Provide a default.
12969 (remote_open): Use socklen_t.
12970 * remote-utils.c (socklen_t): Provide a default.
12971 (remote_open): Use socklen_t.
12972 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
12973 unsigned char.
12974
12975 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
12976 char for buffers.
12977 * linux-low.c (linux_read_memory, linux_write_memory)
12978 (linux_read_auxv): Likewise.
12979 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
12980 (check_mem_write): Likewise.
12981 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
12982 Likewise.
12983 * regcache.c (struct inferior_rgcache_data, registers_to_string)
12984 (registers_from_string, register_data): Likewise.
12985 * server.c (handle_query, main): Likewise.
12986 * server.h (convert_ascii_to_int, convert_int_to_ascii)
12987 (decode_M_packet): Likewise.
12988 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
12989 * target.h (struct target_ops): Update read_memory, write_memory,
12990 and read_auxv.
12991 (read_inferior_memory, write_inferior_memory): Update.
12992 * linux-low.h (struct linux_target_ops): Change type of breakpoint
12993 to unsigned char *.
12994 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
12995 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
12996 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
12997 linux-s390-low.c, linux-sh-low.c: Update for changes in
12998 read_inferior_memory and the_low_target->breakpoint.
12999
eee84df1
DJ
130002005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
13001
13002 * Makefile.in (SFILES): Add linux-ppc64-low.c.
13003 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
13004 * configure.srv: Add powerpc64-*-linux*.
13005 * linux-ppc64-low.c: New file.
13006
45b134e5
OF
130072005-05-23 Orjan Friberg <orjanf@axis.com>
13008
13009 * linux-cris-low.c: New file with support for CRIS.
13010 * linux-crisv32-low.c: Ditto for CRISv32.
13011 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
13012 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 13013 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
13014 reg-crisv32.o, and reg-crisv32.c to make rules.
13015 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
13016 recognized targets.
13017
48d93c75
UW
130182005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
13019
13020 * linux-low.c (fetch_register): Ensure buffer size is a multiple
13021 of sizeof (PTRACE_XFER_TYPE).
13022 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
13023
e013ee27
OF
130242005-05-12 Orjan Friberg <orjanf@axis.com>
13025
889bf7c5 13026 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
13027 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
13028 pointers for hardware watchpoint support.
13029 * linux-low.h (struct linux_target_ops): Ditto.
13030 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
13031 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
13032 to linux_target_ops.
13033 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
13034 reply packet.
13035 * server.c (main): Recognize 'Z' and 'z' packets.
13036
b0ded00b
UW
130372005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
13038
13039 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
13040 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
13041 (the_low_target): Add new members.
13042
8643e2ad
DJ
130432005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13044
13045 * proc-service.c (ps_lgetregs): Search all_processes instead of
13046 all_threads.
13047
fc620387
DJ
130482005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13049
13050 * server.c (start_inferior): Change return type to int.
13051 (attach_inferior): Change sigptr to int *.
13052 (handle_v_cont, handle_v_requests): Change signal to int *.
13053 (main): Change signal to int.
13054
130552005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
13056
13057 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
13058 * configure.srv: Add m32r*-*-linux*.
13059 * linux-m32r-low.c: New file.
13060
e0e76420
DJ
130612005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
13062
13063 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
13064
a1928bad
DJ
130652005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13066
13067 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
13068 Take unsigned long arguments for PIDs.
13069 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
13070 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
13071 (wait_for_sigstop, linux_resume_one_process)
13072 (regsets_fetch_inferior_registers, linux_send_signal)
13073 (linux_read_auxv): Likewise. Update the types of variables holding
13074 PIDs. Update format string specifiers.
13075 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
13076 * remote-utils.c (prepare_resume_reply): Likewise.
13077 * server.c (cont_thread, general_thread, step_thread)
13078 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
13079 unsigned long.
13080 (handle_query): Update format specifiers.
13081 (handle_v_cont, main): Use strtoul for thread IDs.
13082 * server.h (struct inferior_list_entry): Use unsigned long for ID.
13083 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
13084 (general_thread, step_thread, thread_from_wait)
13085 (old_thread_from_wait): Update.
13086 * target.h (struct thread_resume): Use unsigned long for THREAD.
13087 (struct target_ops): Use unsigned long for arguments to attach and
13088 thread_alive.
13089
dcdb98d2
DJ
130902005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
13091
13092 * acinclude.m4: Include bfd/bfd.m4 directly.
13093 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
13094 <agriffis@toolchain.org>.
13095 * aclocal.m4, configure: Regenerated.
13096
bec39cab
AC
130972005-01-07 Andrew Cagney <cagney@gnu.org>
13098
13099 * configure.ac: Rename configure.in, require autoconf 2.59.
13100 * configure: Re-generate.
13101
434c4c77
DJ
131022004-12-08 Daniel Jacobowitz <dan@debian.org>
13103
13104 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
13105 LIBS when finished.
13106 * aclocal.m4: Regenerated.
13107 * configure: Regenerated.
13108
db1d3e1b
AS
131092004-11-21 Andreas Schwab <schwab@suse.de>
13110
13111 * linux-m68k-low.c (m68k_num_gregs): Define.
13112 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
13113 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
13114 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
13115 (m68k_breakpoint_at): New. Add to the_low_target.
13116
13117 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
13118 srv_linux_thread_db to yes.
13119
43360365
JB
131202004-10-20 Joel Brobecker <brobecker@gnat.com>
13121
13122 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
13123 (ARCH_SET_FS): Likewise.
13124 (ARCH_GET_FS): Likewise.
13125 (ARCH_GET_GS): Likewise.
13126
fd500816
DJ
131272004-10-16 Daniel Jacobowitz <dan@debian.org>
13128
13129 * linux-i386-low.c (ps_get_thread_area): New.
13130 * linux-x86-64-low.c (ps_get_thread_area): New.
13131 * linux-low.c: Include <sys/syscall.h>.
13132 (linux_kill_one_process): Don't kill the first thread here.
13133 (linux_kill): Kill the first thread here.
13134 (kill_lwp): New function.
13135 (send_sigstop, linux_send_signal): Use it.
13136 * proc-service.c: Clean up #ifdefs.
13137 (fpregset_info): Delete.
13138 (ps_lgetregs): Update and enable implementation.
13139 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
13140 implementations.
13141 * remote-utils.c (struct sym_cache, symbol_cache): New.
13142 (input_interrupt): Print a clearer message.
13143 (async_io_enabled): New variable.
13144 (enable_async_io, disable_async_io): Use it. Update comments.
13145 (look_up_one_symbol): Use the symbol cache.
13146 * thread-db.c (thread_db_look_up_symbols): New function.
13147 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
13148
f6de3c42
DJ
131492004-10-16 Daniel Jacobowitz <dan@debian.org>
13150
13151 * configure.in: Test for -rdynamic.
13152 * configure: Regenerated.
13153 * Makefile (INTERNAL_LDFLAGS): New.
13154 (gdbserver, gdbreplay): Use it.
13155
2c0fc042
AC
131562004-09-02 Andrew Cagney <cagney@gnu.org>
13157
13158 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
13159
075b3282
DJ
131602004-03-23 Daniel Jacobowitz <drow@mvista.com>
13161
13162 * linux-low.c (linux_wait): Clear all_processes list also.
13163
fa6a77dc
DJ
131642004-03-12 Daniel Jacobowitz <drow@mvista.com>
13165
13166 * linux-low.c: Include <errno.h>. Remove extern declaration of
13167 errno.
13168
6d782a97
DJ
131692004-03-12 Daniel Jacobowitz <drow@mvista.com>
13170
13171 * gdbreplay.c, server.h, utils.c: Update copyright years.
13172
3a7fb99b
DJ
131732004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13174
13175 * server.c (main): Print child status or termination signal from
13176 variable 'signal', not 'sig'.
13177
c3e735a6
DJ
131782004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13179
13180 * linux-low.c (linux_read_memory): Change return type to
13181 int. Check for and return error from ptrace().
13182 * target.c (read_inferior_memory): Change return type to int. Pass
13183 back return status from the_target->read_memory().
13184 * target.h (struct target_ops): Adapt *read_memory() prototype.
13185 Update comment.
13186 (read_inferior_memory): Adapt prototype.
13187 * server.c (main): Return an error packet if
13188 read_inferior_memory() returns an error.
13189
a59d1c82
DJ
131902004-03-04 Daniel Jacobowitz <drow@mvista.com>
13191
13192 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
13193 Unify with other clean targets.
13194
dc3f8883
DJ
131952004-02-29 Daniel Jacobowitz <drow@mvista.com>
13196
13197 * server.c (handle_v_cont): Call set_desired_inferior.
13198
89a208da
DJ
131992004-02-29 Daniel Jacobowitz <drow@mvista.com>
13200
13201 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
13202
62ea82f5
DJ
132032004-02-29 Daniel Jacobowitz <drow@mvista.com>
13204
13205 * linux-low.c (linux_wait): Unblock async I/O.
13206 (linux_resume): Block and enable async I/O.
13207 * remote-utils.c (block_async_io, unblock_async_io): New functions.
13208 * server.h (block_async_io, unblock_async_io): Add prototypes.
13209
6910d122
DJ
132102004-02-29 Daniel Jacobowitz <drow@mvista.com>
13211
13212 * remote-utils.c (remote_open): Print a status notice after
13213 opening a TCP port.
13214 * server.c (attach_inferior): Print a status notice after
13215 attaching.
13216
132172004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
13218
13219 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
13220
c89dc5d4
DJ
132212004-02-26 Daniel Jacobowitz <drow@mvista.com>
13222
13223 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
13224 error packet.
13225 * server.c, target.h: Update copyright years.
13226
4b8dad4a
RM
132272004-02-25 Roland McGrath <roland@redhat.com>
13228
13229 * target.h (struct target_ops): New member `read_auxv'.
13230 * server.c (handle_query): Handle qPart:auxv:read: query using that.
13231 * linux-low.c (linux_read_auxv): New function.
13232 (linux_target_ops): Initialize `read_auxv' member to that.
13233
d7446758
JB
132342004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
13235
13236 Committed by Jim Blandy <jimb@redhat.com>.
13237
13238 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 13239 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
13240 instead of GPR_SIZE to distiguish s390 and s390x targets.
13241
5544ad89
DJ
132422004-01-31 Daniel Jacobowitz <drow@mvista.com>
13243
13244 * linux-low.c: Update copyright year.
13245 (check_removed_breakpoint): Clear pending_is_breakpoint.
13246 (linux_set_resume_request, linux_queue_one_thread)
13247 (resume_status_pending_p): New functions.
13248 (linux_continue_one_thread): Use process->resume.
13249 (linux_resume): Only resume threads if there are no pending events.
13250 * linux-low.h (struct process_info): Add resume request
13251 pointer.
13252
2a68b70e
DJ
132532004-01-30 Daniel Jacobowitz <drow@mvista.com>
13254
13255 * regcache.c (new_register_cache): Clear the allocated register
13256 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
13257
64386c31
DJ
132582003-10-13 Daniel Jacobowitz <drow@mvista.com>
13259
13260 * linux-low.c (linux_resume): Take a struct thread_resume *
13261 argument.
13262 (linux_wait): Update call.
13263 (resume_ptr): New static variable.
13264 (linux_continue_one_thread): Renamed from
13265 linux_continue_one_process. Use resume_ptr.
13266 (linux_resume): Use linux_continue_one_thread.
13267 * server.c (handle_v_cont, handle_v_requests): New functions.
13268 (myresume): New function.
13269 (main): Handle 'v' case.
13270 * target.h (struct thread_resume): New type.
13271 (struct target_ops): Change argument of "resume" to struct
13272 thread_resume *.
13273 (myresume): Delete macro.
13274
c938e9b0
L
132752003-08-08 H.J. Lu <hongjiu.lu@intel.com>
13276
13277 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
13278 (uninstall): Support DESTDIR.
13279
7f313d07
BC
13280Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
13281
13282 * configure.srv: Add xscale*linux copy of arm*linux entry.
13283
3b2fc2ea
DJ
132842003-07-24 Daniel Jacobowitz <drow@mvista.com>
13285
13286 * linux-arm-low.c (arm_reinsert_addr): New function.
13287 (the_low_target): Add arm_reinsert_addr.
13288
1c0a559e
MK
132892003-07-08 Mark Kettenis <kettenis@gnu.org>
13290
13291 * mem-break.c: Remove whitespace at end of file.
13292
43d5792c
DJ
132932003-06-28 Daniel Jacobowitz <drow@mvista.com>
13294
13295 * configure.in: Check whether we need to prototype strerror.
13296 * server.h: Optionally prototype strerror.
13297 * gdbreplay.c (perror_with_name): Use strerror.
13298 * linux-low.c (linux_attach_lwp): Use strerror.
13299 * utils.c (perror_with_name): Use strerror.
13300 * config.in, configure: Regenerated.
13301
c8a86edf
DJ
133022003-06-28 Daniel Jacobowitz <drow@mvista.com>
13303
13304 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
13305 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
13306
73d37363
DJ
133072003-06-20 Daniel Jacobowitz <drow@mvista.com>
13308
13309 * Makefile.in (SFILES): Update.
13310 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
13311 low-sun3.c: Remove files.
13312
6ad8ae5c
DJ
133132003-06-17 Daniel Jacobowitz <drow@mvista.com>
13314
13315 * linux-low.c: Move comment to linux_thread_alive where it belonged.
13316 (linux_detach_one_process, linux_detach): New functions.
13317 (linux_target_ops): Add linux_detach.
13318 * server.c (main): Handle 'D' packet.
13319 * target.h (struct target_ops): Add "detach" member.
13320 (detach_inferior): Define.
13321
1581182a
MK
133222003-06-13 Mark Kettenis <kettenis@gnu.org>
13323
13324 From Kelley Cook <kelleycook@wideopenwest.com>:
13325 * configure.srv: Accept i[34567]86 variants.
13326
e5379b03
DJ
133272003-06-05 Daniel Jacobowitz <drow@mvista.com>
13328
13329 * linux-low.c (linux_wait_for_event): Correct comment typos.
13330 (linux_resume_one_process): Call check_removed_breakpoint.
13331 (linux_send_signal): New function.
13332 (linux_target_ops): Add linux_send_signal.
13333 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
13334 of kill.
13335 * target.h (struct target_ops): Add send_signal.
13336
2ff29de4
JB
133372003-05-29 Jim Blandy <jimb@redhat.com>
13338
13339 * linux-low.c (usr_store_inferior_registers): Transfer buf in
13340 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
13341 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
13342 away part of the register's value.
13343
254787d4
DJ
133442003-03-26 Daniel Jacobowitz <drow@mvista.com>
13345
13346 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
13347 (linux_wait_for_event, linux_init_signals): Likewise.
13348
94e10508
DJ
133492003-03-17 Daniel Jacobowitz <drow@mvista.com>
13350
13351 * configure.in: Check for stdlib.h.
13352 * configure: Regenerated.
13353 * config.in: Regenerated.
13354
4c0711e0
DJ
133552003-01-04 Andreas Schwab <schwab@suse.de>
13356
13357 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
13358
ef66e766
AC
133592003-01-02 Andrew Cagney <ac131313@redhat.com>
13360
13361 * Makefile.in: Remove obsolete code.
13362
a1358604
DJ
133632002-11-20 Daniel Jacobowitz <drow@mvista.com>
13364
13365 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
13366 defined(PT_FPR0_HI).
13367
23ce3b1c
DJ
133682002-11-17 Stuart Hughes <seh@zee2.com>
13369
13370 * linux-arm-low.c (arm_num_regs): Increase.
13371 (arm_regmap): Include status register.
13372
133732002-11-17 Daniel Jacobowitz <drow@mvista.com>
13374
13375 * linux-low.c (register_addr): Remove incorrect -1 check.
13376
a9fa9f7d
DJ
133772002-08-29 Daniel Jacobowitz <drow@mvista.com>
13378
13379 * linux-low.c (linux_create_inferior): Call setpgid. Return
13380 the new PID.
13381 (unstopped_p, linux_signal_pid): Remove.
13382 (linux_target_ops): Remove linux_signal_pid.
13383 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
13384 global instead of target method.
13385 * target.h (struct target_ops): Remove signal_pid. Update comment
13386 for create_inferior.
13387 * server.c (signal_pid): New variable.
13388 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 13389 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
13390 (attach_inferior): Set signal_pid.
13391
17574093
DJ
133922002-08-23 Daniel Jacobowitz <drow@mvista.com>
13393
13394 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
13395
133962002-08-20 Jim Blandy <jimb@redhat.com>
13397
13398 * Makefile.in (LDFLAGS): Allow the configure script to establish a
13399 default for this.
13400
134012002-08-01 Andrew Cagney <cagney@redhat.com>
13402
13403 * Makefile.in: Make chill references obsolete.
13404
134052002-07-24 Kevin Buettner <kevinb@redhat.com>
13406
13407 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
13408 * configure: Regenerate.
13409 * config.in: Regenerate.
13410
134112002-07-09 David O'Brien <obrien@FreeBSD.org>
13412
13413 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
13414 (perror_with_name, remote_close, remote_open, expect, play): Static.
13415
134162002-07-04 Michal Ludvig <mludvig@suse.cz>
13417
4b8dad4a 13418 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
13419 byte offsets instead of an array of indexes.
13420 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
13421
134222002-06-13 Daniel Jacobowitz <drow@mvista.com>
13423
13424 * regcache.c: Add comment.
13425
134262002-06-11 Daniel Jacobowitz <drow@mvista.com>
13427
13428 * thread-db.c: New file.
13429 * proc-service.c: New file.
13430 * acinclude.m4: New file.
13431 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
13432 proc-service.o, and thread-db.o.
13433 (linux-low.o): Add USE_THREAD_DB.
13434 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
13435 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
13436 * aclocal.m4: Regenerated.
13437 * config.in: Regenerated.
13438 * configure: Regenerated.
13439 * configure.in: Check for proc_service.h, sys/procfs.h,
13440 thread_db.h, and linux/elf.h headrs.
13441 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
13442 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
13443 Check for -lthread_db and thread support.
13444 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
13445 PowerPC, and SuperH.
13446 * i387-fp.c: Constify arguments.
13447 * i387-fp.h: Likewise.
13448 * inferiors.c: (struct thread_info): Renamed from
13449 `struct inferior_info'. Remove PID member. Use generic inferior
13450 list header. All uses updated.
13451 (inferiors, signal_pid): Removed.
13452 (all_threads): New variable.
13453 (get_thread): Define.
13454 (add_inferior_to_list): New function.
13455 (for_each_inferior): New function.
13456 (change_inferior_id): New function.
13457 (add_inferior): Removed.
13458 (remove_inferior): New function.
13459 (add_thread): New function.
13460 (free_one_thread): New function.
13461 (remove_thread): New function.
13462 (clear_inferiors): Use for_each_inferior and free_one_thread.
13463 (find_inferior): New function.
13464 (find_inferior_id): New function.
13465 (inferior_target_data): Update argument type.
13466 (set_inferior_target_data): Likewise.
13467 (inferior_regcache_data): Likewise.
13468 (set_inferior_regcache_data): Likewise.
13469 * linux-low.c (linux_bp_reinsert): Remove.
13470 (all_processes, stopping_threads, using_thrads)
13471 (struct pending_signals, debug_threads, pid_of): New.
13472 (inferior_pid): Replace with macro.
13473 (struct inferior_linux_data): Remove.
13474 (get_stop_pc, add_process): New functions.
13475 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
13476 Use add_process and add_thread.
13477 (linux_attach_lwp): New function, based on old linux_attach. Use
13478 add_process and add_thread. Set stop_expected for new threads.
13479 (linux_attach): New function.
13480 (linux_kill_one_process): New function.
13481 (linux_kill): Kill all LWPs.
13482 (linux_thread_alive): Use find_inferior_id.
13483 (check_removed_breakpoints, status_pending_p): New functions.
13484 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
13485 Update. Use WNOHANG. Wait for cloned processes also. Update process
13486 struct for the found process.
13487 (linux_wait_for_event): New function.
13488 (linux_wait): Use it. Support LWPs.
13489 (send_sigstop, wait_for_sigstop, stop_all_processes)
13490 (linux_resume_one_process, linux_continue_one_process): New functions.
13491 (linux_resume): Support LWPs.
13492 (REGISTER_RAW_SIZE): Remove.
13493 (fetch_register): Use register_size instead. Call supply_register.
13494 (usr_store_inferior_registers): Likewise. Call collect_register.
13495 Fix recursive case.
13496 (regsets_fetch_inferior_registers): Improve error message.
13497 (regsets_store_inferior_registers): Add debugging.
13498 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
13499 (unstopped_p, linux_signal_pid): New functions.
13500 (linux_target_ops): Add linux_signal_pid.
13501 (linux_init_signals): New function.
13502 (initialize_low): Call it. Initialize using_threads.
13503 * regcache.c (inferior_regcache_data): Add valid
13504 flag.
13505 (get_regcache): Fetch registers lazily. Add fetch argument
13506 and update all callers.
13507 (regcache_invalidate_one, regcache_invalidate): New
13508 functions.
13509 (new_register_cache): Renamed from create_register_cache.
13510 Return the new regcache.
13511 (free_register_cache): Change argument to a void *.
13512 (registers_to_string, registers_from_string): Call get_regcache
13513 with fetch flag set.
13514 (register_data): Make static. Pass fetch flag to get_regcache.
13515 (supply_register): Call get_regcache with fetch flag clear.
13516 (collect_register): Call get_regcache with fetch flag set.
13517 (collect_register_as_string): New function.
13518 * regcache.h: Update.
13519 * remote-utils.c (putpkt): Flush after debug output and use
13520 stderr.
13521 Handle input interrupts while waiting for an ACK.
13522 (input_interrupt): Use signal_pid method.
13523 (getpkt): Flush after debug output and use stderr.
13524 (outreg): Use collect_register_as_string.
13525 (new_thread_notify, dead_thread_notify): New functions.
13526 (prepare_resume_reply): Check using_threads. Set thread_from_wait
13527 and general_thread.
13528 (look_up_one_symbol): Flush after debug output.
13529 * server.c (step_thread, server_waiting): New variables.
13530 (start_inferior): Don't use signal_pid. Update call to mywait.
13531 (attach_inferior): Update call to mywait.
13532 (handle_query): Handle qfThreadInfo and qsThreadInfo.
13533 (main): Don't fetch/store registers explicitly. Use
13534 set_desired_inferior. Support proposed ``Hs'' packet. Update
13535 calls to mywait.
13536 * server.h: Update.
13537 (struct inferior_list, struct_inferior_list_entry): New.
13538 * target.c (set_desired_inferior): New.
13539 (write_inferior_memory): Constify.
13540 (mywait): New function.
13541 * target.h: Update.
13542 (struct target_ops): New signal_pid method.
13543 (mywait): Removed macro, added prototype.
13544
13545 * linux-low.h (regset_func): Removed.
13546 (regset_fill_func, regset_store_func): New.
13547 (enum regset_type): New.
13548 (struct regset_info): Add type field. Use new operation types.
13549 (struct linux_target_ops): stop_pc renamed to get_pc.
13550 Add decr_pc_after_break and breakpoint_at.
13551 (get_process, get_thread_proess, get_process_thread)
13552 (strut process_info, all_processes, linux_attach_lwp)
13553 (thread_db_init): New.
13554
13555 * linux-arm-low.c (arm_get_pc, arm_set_pc,
13556 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
13557 (the_low_target): Add new members.
13558 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
13559 (i386_store_fpxregset): Constify.
13560 (target_regsets): Add new kind identifier.
13561 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
13562 (i386_set_pc): Add debugging.
13563 (i386_breakpoint_at): New function.
13564 (the_low_target): Add new members.
13565 * linux-mips-low.c (mips_get_pc, mips_set_pc)
13566 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
13567 (mips_breakpoint_at): New.
13568 (the_low_target): Add new members.
13569 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
13570 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
13571 (the_low_target): Add new members.
13572 * linux-sh-low.c (sh_get_pc, sh_set_pc)
13573 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
13574 (the_low_target): Add new members.
13575 * linux-x86-64-low.c (target_regsets): Add new kind
13576 identifier.
13577
135782002-05-15 Daniel Jacobowitz <drow@mvista.com>
13579
13580 From Martin Pool <mbp@samba.org>:
13581 * server.c (gdbserver_usage): New function.
13582 (main): Call it.
13583
135842002-05-14 Daniel Jacobowitz <drow@mvista.com>
13585
13586 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
13587 stop_at -> stop_pc.
13588
135892002-05-04 Andrew Cagney <ac131313@redhat.com>
13590
13591 * Makefile.in: Remove obsolete code.
13592
135932002-04-24 Michal Ludvig <mludvig@suse.cz>
13594
13595 * linux-low.c (regsets_fetch_inferior_registers),
13596 (regsets_store_inferior_registers): Removed cast to int from
13597 ptrace() calls.
13598 * regcache.h: Added declaration of struct inferior_info.
13599
136002002-04-20 Daniel Jacobowitz <drow@mvista.com>
13601
13602 * inferiors.c (struct inferior_info): Add regcache_data.
13603 (add_inferior): Call create_register_cache.
13604 (clear_inferiors): Call free_register_cache.
13605 (inferior_regcache_data, set_inferior_regcache_data): New functions.
13606 * regcache.c (struct inferior_regcache_data): New.
13607 (registers): Remove.
13608 (get_regcache): New function.
13609 (create_register_cache, free_register_cache): New functions.
13610 (set_register_cache): Don't initialize the register cache here.
13611 (registers_to_string, registers_from_string, register_data): Call
13612 get_regcache.
13613 * regcache.h: Add prototypes.
13614 * server.h: Likewise.
13615
136162002-04-20 Daniel Jacobowitz <drow@mvista.com>
13617
13618 * mem-break.c: New file.
13619 * mem-break.h: New file.
13620 * Makefile.in: Add mem-break.o rule; update server.h
13621 dependencies.
13622 * inferiors.c (struct inferior_info): Add target_data
13623 member.
13624 (clear_inferiors): Free target_data member if set.
13625 (inferior_target_data, set_inferior_target_data): New functions.
13626 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
13627 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
13628 * linux-low.c (linux_bp_reinsert): New variable.
13629 (struct inferior_linux_data): New.
13630 (linux_create_inferior): Use set_inferior_target_data.
13631 (linux_attach): Likewise. Call add_inferior.
13632 (linux_wait_for_one_inferior): New function.
13633 (linux_wait): Call it.
13634 (linux_write_memory): Add const.
13635 (initialize_low): Call set_breakpoint_data.
13636 * linux-low.h (struct linux_target_ops): Add breakpoint
13637 handling members.
13638 * server.c (attach_inferior): Remove extra add_inferior
13639 call.
13640 * server.h: Include mem-break.h. Update inferior.c
13641 prototypes.
13642 * target.c (read_inferior_memory)
13643 (write_inferior_memory): New functions.
13644 * target.h (read_inferior_memory)
13645 (write_inferior_memory): Change macros to prototypes.
13646 (struct target_ops): Update comments. Add const to write_memory
13647 definition.
13648
136492002-04-11 Daniel Jacobowitz <drow@mvista.com>
13650
13651 * linux-low.c (usr_store_inferior_registers): Support
13652 registers which are allowed to fail to store.
13653 * linux-low.h (linux_target_ops): Likewise.
13654 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
13655 (ppc_cannot_store_register): FPSCR may not be storable.
13656
136572002-04-09 Daniel Jacobowitz <drow@mvista.com>
13658
13659 * server.h: Include <string.h> if HAVE_STRING_H.
13660 * ChangeLog: Correct paths in last ChangeLog entry.
13661
136622002-04-09 Daniel Jacobowitz <drow@mvista.com>
13663
13664 * linux-low.h: Remove obsolete prototypes.
13665 (struct linux_target_ops): New.
13666 (extern the_low_target): New.
13667 * linux-low.c (num_regs, regmap): Remove declarations.
13668 (register_addr): Use the_low_target explicitly.
13669 (fetch_register): Likewise.
13670 (usr_fetch_inferior_registers): Likewise.
13671 (usr_store_inferior_registers): Likewise.
13672 * linux-arm-low.c (num_regs): Remove.
13673 (arm_num_regs): Define.
13674 (arm_regmap): Renamed from regmap, made static.
13675 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
13676 made static.
13677 (arm_cannot_store_register): Renamed from cannot_store_register,
13678 made static.
13679 (the_low_target): New.
13680 * linux-i386-low.c (num_regs): Remove.
13681 (i386_num_regs): Define.
13682 (i386_regmap): Renamed from regmap, made static.
13683 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
13684 made static.
13685 (i386_cannot_store_register): Renamed from cannot_store_register,
13686 made static.
13687 (the_low_target): New.
13688 * linux-ia64-low.c (num_regs): Remove.
13689 (ia64_num_regs): Define.
13690 (ia64_regmap): Renamed from regmap, made static.
13691 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
13692 made static.
13693 (ia64_cannot_store_register): Renamed from cannot_store_register,
13694 made static.
13695 (the_low_target): New.
13696 * linux-m68k-low.c (num_regs): Remove.
13697 (m68k_num_regs): Define.
13698 (m68k_regmap): Renamed from regmap, made static.
13699 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
13700 made static.
13701 (m68k_cannot_store_register): Renamed from cannot_store_register,
13702 made static.
13703 (the_low_target): New.
13704 * linux-mips-low.c (num_regs): Remove.
13705 (mips_num_regs): Define.
13706 (mips_regmap): Renamed from regmap, made static.
13707 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
13708 made static.
13709 (mips_cannot_store_register): Renamed from cannot_store_register,
13710 made static.
13711 (the_low_target): New.
13712 * linux-ppc-low.c (num_regs): Remove.
13713 (ppc_num_regs): Define.
13714 (ppc_regmap): Renamed from regmap, made static.
13715 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
13716 made static.
13717 (ppc_cannot_store_register): Renamed from cannot_store_register,
13718 made static.
13719 (the_low_target): New.
13720 * linux-s390-low.c (num_regs): Remove.
13721 (s390_num_regs): Define.
13722 (s390_regmap): Renamed from regmap, made static.
13723 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
13724 made static.
13725 (s390_cannot_store_register): Renamed from cannot_store_register,
13726 made static.
13727 (the_low_target): New.
13728 * linux-sh-low.c (num_regs): Remove.
13729 (sh_num_regs): Define.
13730 (sh_regmap): Renamed from regmap, made static.
13731 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
13732 made static.
13733 (sh_cannot_store_register): Renamed from cannot_store_register,
13734 made static.
13735 (the_low_target): New.
13736 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
13737 (the_low_target): New.
13738
137392002-04-09 Daniel Jacobowitz <drow@mvista.com>
13740
13741 * Makefile.in: Add stamp-h target.
13742 * configure.in: Create stamp-h.
13743 * configure: Regenerated.
13744
137452002-04-09 Daniel Jacobowitz <drow@mvista.com>
13746
13747 * inferiors.c: New file.
13748 * target.c: New file.
13749 * target.h: New file.
13750 * Makefile.in: Add target.o and inferiors.o. Update
13751 dependencies.
13752 * linux-low.c (inferior_pid): New static variable,
13753 moved from server.c.
13754 (linux_create_inferior): Renamed from create_inferior.
13755 Call add_inferior. Return 0 on success instead of a PID.
13756 (linux_attach): Renamed from myattach.
13757 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
13758 (linux_thread_alive): Renamed from mythread_alive.
13759 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
13760 child dies.
13761 (linux_resume): Renamed from myresume. Add missing ``return 0''.
13762 (regsets_store_inferior_registers): Correct error message.
13763 Add missing ``return 0''.
13764 (linux_fetch_registers): Renamed from fetch_inferior_registers.
13765 (linux_store_registers): Renamed from store_inferior_registers.
13766 (linux_read_memory): Renamed from read_inferior_memory.
13767 (linux_write_memory): Renamed from write_inferior_memory.
13768 (linux_target_ops): New structure.
13769 (initialize_low): Call set_target_ops ().
13770 * remote-utils.c (unhexify): New function.
13771 (hexify): New function.
13772 (input_interrupt): Send signals to ``signal_pid''.
13773 * server.c (inferior_pid): Remove.
13774 (start_inferior): Update create_inferior call.
13775 (attach_inferior): Call add_inferior.
13776 (handle_query): New function.
13777 (main): Call handle_query for `q' packets.
13778 * server.h: Include "target.h". Remove obsolete prototypes.
13779 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
13780
137812002-04-09 Daniel Jacobowitz <drow@mvista.com>
13782
13783 * Makefile.in: Add WARN_CFLAGS. Update configury
13784 dependencies.
13785 * configure.in: Check for <string.h>
13786 * configure: Regenerate.
13787 * config.in: Regenerate.
13788 * gdbreplay.c: Include needed system headers.
13789 (remote_open): Remove strchr prototype.
13790 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
13791 * regcache.c (supply_register): Change buf argument to const void *.
13792 (supply_register_by_name): Likewise.
13793 (collect_register): Change buf argument to void *.
13794 (collect_register_by_name): Likewise.
13795 * regcache.h: Add missing prototypes.
13796 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
13797 * server.c (handle_query): New function.
13798 (attached): New static variable, moved out of main.
13799 (main): Quiet longjmp clobber warnings.
13800 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
13801 * utils.c (error): Remove NORETURN.
13802 (fatal): Likewise.
This page took 2.559903 seconds and 4 git commands to generate.