94e1c040ea75dd70c0323bcc1243c688b32125d6
[deliverable/binutils-gdb.git] / gdbserver / ChangeLog
1 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2
3 * configure: Re-generate.
4
5 2020-03-11 Simon Marchi <simon.marchi@efficios.com>
6
7 * configure: Re-generate.
8
9 2020-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10
11 * .dir-locals.el: New file.
12
13 2020-03-05 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
14
15 * .gitattributes: New file.
16
17 2020-03-02 Andrew Burgess <andrew.burgess@embecosm.com>
18
19 * remote-utils.cc (prepare_resume_reply): Add ability to convert T
20 reply into an S reply.
21 * server.cc (disable_packet_T): New global.
22 (captured_main): Set new global when appropriate.
23 * server.h (disable_packet_T): Declare.
24
25 2020-02-21 Tom Tromey <tom@tromey.com>
26
27 * Makefile.in (mostlyclean): New target.
28
29 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
30
31 * target.h (struct process_stratum_target): Remove.
32 (class process_target): Rename to ...
33 (class process_stratum_target): ... this.
34 * linux-low.h (class linux_process_target): Derive from
35 'process_stratum_target'.
36 * linux-low.cc (linux_target_ops): Remove.
37 (initialize_low): Set the_target to the singleton instance of
38 linux_process_target.
39 * lynx-low.h (class lynx_process_target): Derive from
40 'process_stratum_target'.
41 * lynx-low.cc (lynx_target_ops): Remove.
42 (initialize_low): Set the_target to the singleton instance of
43 lynx_process_target.
44 * nto-low.h (class nto_process_target): Derive from
45 'process_stratum_target'.
46 * nto-low.cc (nto_target_ops): Remove.
47 (initialize_low): Set the_target to the singleton instance of
48 nto_process_target.
49 * win32-low.h (class win32_process_target): Derive from
50 'process_stratum_target'.
51 * win32-low.cc (win32_target_ops): Remove.
52 (initialize_low): Set the_target to the singleton instance of
53 win32_process_target.
54
55 Replace 'the_target->pt' with 'the_target' in the uses below.
56
57 * hostio.cc (hostio_error)
58 (handle_setfs)
59 (handle_open)
60 (handle_unlink)
61 (handle_readlink)
62 * linux-aarch32-low.cc (arm_breakpoint_at)
63 * linux-aarch64-low.cc (aarch64_breakpoint_at)
64 * linux-arm-low.cc (arm_sigreturn_next_pc)
65 (arm_get_hwcap)
66 (arm_get_syscall_trapinfo)
67 * linux-cris-low.cc (cris_breakpoint_at)
68 * linux-crisv32-low.cc (cris_breakpoint_at)
69 * linux-low.cc (handle_extended_wait)
70 (linux_wait_1)
71 (linux_read_memory)
72 (linux_process_target::breakpoint_kind_from_pc)
73 (linux_get_auxv)
74 * linux-m32r-low.cc (m32r_breakpoint_at)
75 * linux-mips-low.cc (mips_breakpoint_at)
76 * linux-nios2-low.cc (nios2_breakpoint_at)
77 * linux-ppc-low.cc (ppc_breakpoint_at)
78 * linux-s390-low.cc (s390_get_hwcap)
79 * linux-sh-low.cc (sh_breakpoint_at)
80 * linux-sparc-low.cc (sparc_fill_gregset_to_stack)
81 (sparc_store_gregset_from_stack)
82 (sparc_breakpoint_at)
83 * linux-tic6x-low.cc (tic6x_breakpoint_at)
84 * linux-tile-low.cc (tile_breakpoint_at)
85 * linux-x86-low.cc (x86_breakpoint_at)
86 * linux-xtensa-low.cc (xtensa_breakpoint_at)
87 * mem-break.cc (bp_size)
88 (bp_opcode)
89 (insert_memory_breakpoint)
90 (set_raw_breakpoint_at)
91 (delete_raw_breakpoint)
92 (z_type_supported)
93 (uninsert_raw_breakpoint)
94 (reinsert_raw_breakpoint)
95 (validate_inserted_breakpoint)
96 * regcache.cc (regcache_read_pc)
97 (regcache_write_pc)
98 * remote-utils.cc (putpkt_binary_1)
99 (input_interrupt)
100 (getpkt)
101 (prepare_resume_reply)
102 * server.cc (handle_general_set)
103 (handle_detach)
104 (handle_qxfer_auxv)
105 (handle_qxfer_exec_file)
106 (handle_qxfer_libraries_svr4)
107 (handle_qxfer_osdata)
108 (handle_qxfer_siginfo)
109 (handle_qxfer_fdpic)
110 (handle_query)
111 (resume)
112 (handle_v_requests)
113 (queue_stop_reply_callback)
114 (captured_main)
115 * target.cc (prepare_to_access_memory)
116 (done_accessing_memory)
117 (read_inferior_memory)
118 (target_write_memory)
119 (target_stop_and_wait)
120 (target_wait)
121 (target_mourn_inferior)
122 (target_continue_no_signal)
123 (target_continue)
124 (target_supports_multi_process)
125 (kill_inferior)
126 * target.h
127 (target_create_inferior)
128 (target_post_create_inferior)
129 (myattach)
130 (target_supports_fork_events)
131 (target_supports_vfork_events)
132 (target_supports_exec_events)
133 (target_handle_new_gdb_connection)
134 (detach_inferior)
135 (mythread_alive)
136 (fetch_inferior_registers)
137 (store_inferior_registers)
138 (join_inferior)
139 (target_supports_non_stop)
140 (target_async)
141 (target_process_qsupported)
142 (target_supports_catch_syscall)
143 (target_get_ipa_tdesc_idx)
144 (target_supports_tracepoints)
145 (target_supports_fast_tracepoints)
146 (target_get_min_fast_tracepoint_insn_len)
147 (target_thread_stopped)
148 (target_pause_all)
149 (target_unpause_all)
150 (target_stabilize_threads)
151 (target_install_fast_tracepoint_jump_pad)
152 (target_emit_ops)
153 (target_supports_disable_randomization)
154 (target_supports_agent)
155 (target_enable_btrace)
156 (target_disable_btrace)
157 (target_read_btrace)
158 (target_read_btrace_conf)
159 (target_supports_range_stepping)
160 (target_supports_stopped_by_sw_breakpoint)
161 (target_stopped_by_sw_breakpoint)
162 (target_supports_stopped_by_hw_breakpoint)
163 (target_supports_hardware_single_step)
164 (target_stopped_by_hw_breakpoint)
165 (target_breakpoint_kind_from_pc)
166 (target_breakpoint_kind_from_current_state)
167 (target_supports_software_single_step)
168 (target_core_of_thread)
169 (target_thread_name)
170 (target_thread_handle)
171 * win32-low.cc (do_initial_child_stuff)
172
173 Rename target op default definitions listed below.
174
175 * target.cc (process_target::post_create_inferior): Rename as ...
176 (process_stratum_target::post_create_inferior): ... this.
177 (process_target::prepare_to_access_memory): Rename as ...
178 (process_stratum_target::prepare_to_access_memory): ... this.
179 (process_target::done_accessing_memory): Rename as ...
180 (process_stratum_target::done_accessing_memory): ... this.
181 (process_target::look_up_symbols): Rename as ...
182 (process_stratum_target::look_up_symbols): ... this.
183 (process_target::supports_read_auxv): Rename as ...
184 (process_stratum_target::supports_read_auxv): ... this.
185 (process_target::read_auxv): Rename as ...
186 (process_stratum_target::read_auxv): ... this.
187 (process_target::supports_z_point_type): Rename as ...
188 (process_stratum_target::supports_z_point_type): ... this.
189 (process_target::insert_point): Rename as ...
190 (process_stratum_target::insert_point): ... this.
191 (process_target::remove_point): Rename as ...
192 (process_stratum_target::remove_point): ... this.
193 (process_target::stopped_by_sw_breakpoint): Rename as ...
194 (process_stratum_target::stopped_by_sw_breakpoint): ... this.
195 (process_target::supports_stopped_by_sw_breakpoint): Rename as ...
196 (process_stratum_target::supports_stopped_by_sw_breakpoint): ... this.
197 (process_target::stopped_by_hw_breakpoint): Rename as ...
198 (process_stratum_target::stopped_by_hw_breakpoint): ... this.
199 (process_target::supports_stopped_by_hw_breakpoint): Rename as ...
200 (process_stratum_target::supports_stopped_by_hw_breakpoint): ... this.
201 (process_target::supports_hardware_single_step): Rename as ...
202 (process_stratum_target::supports_hardware_single_step): ... this.
203 (process_target::stopped_by_watchpoint): Rename as ...
204 (process_stratum_target::stopped_by_watchpoint): ... this.
205 (process_target::stopped_data_address): Rename as ...
206 (process_stratum_target::stopped_data_address): ... this.
207 (process_target::supports_read_offsets): Rename as ...
208 (process_stratum_target::supports_read_offsets): ... this.
209 (process_target::read_offsets): Rename as ...
210 (process_stratum_target::read_offsets): ... this.
211 (process_target::supports_get_tls_address): Rename as ...
212 (process_stratum_target::supports_get_tls_address): ... this.
213 (process_target::get_tls_address): Rename as ...
214 (process_stratum_target::get_tls_address): ... this.
215 (process_target::hostio_last_error): Rename as ...
216 (process_stratum_target::hostio_last_error): ... this.
217 (process_target::supports_qxfer_osdata): Rename as ...
218 (process_stratum_target::supports_qxfer_osdata): ... this.
219 (process_target::qxfer_osdata): Rename as ...
220 (process_stratum_target::qxfer_osdata): ... this.
221 (process_target::supports_qxfer_siginfo): Rename as ...
222 (process_stratum_target::supports_qxfer_siginfo): ... this.
223 (process_target::qxfer_siginfo): Rename as ...
224 (process_stratum_target::qxfer_siginfo): ... this.
225 (process_target::supports_non_stop): Rename as ...
226 (process_stratum_target::supports_non_stop): ... this.
227 (process_target::async): Rename as ...
228 (process_stratum_target::async): ... this.
229 (process_target::start_non_stop): Rename as ...
230 (process_stratum_target::start_non_stop): ... this.
231 (process_target::supports_multi_process): Rename as ...
232 (process_stratum_target::supports_multi_process): ... this.
233 (process_target::supports_fork_events): Rename as ...
234 (process_stratum_target::supports_fork_events): ... this.
235 (process_target::supports_vfork_events): Rename as ...
236 (process_stratum_target::supports_vfork_events): ... this.
237 (process_target::supports_exec_events): Rename as ...
238 (process_stratum_target::supports_exec_events): ... this.
239 (process_target::handle_new_gdb_connection): Rename as ...
240 (process_stratum_target::handle_new_gdb_connection): ... this.
241 (process_target::handle_monitor_command): Rename as ...
242 (process_stratum_target::handle_monitor_command): ... this.
243 (process_target::core_of_thread): Rename as ...
244 (process_stratum_target::core_of_thread): ... this.
245 (process_target::supports_read_loadmap): Rename as ...
246 (process_stratum_target::supports_read_loadmap): ... this.
247 (process_target::read_loadmap): Rename as ...
248 (process_stratum_target::read_loadmap): ... this.
249 (process_target::process_qsupported): Rename as ...
250 (process_stratum_target::process_qsupported): ... this.
251 (process_target::supports_tracepoints): Rename as ...
252 (process_stratum_target::supports_tracepoints): ... this.
253 (process_target::read_pc): Rename as ...
254 (process_stratum_target::read_pc): ... this.
255 (process_target::write_pc): Rename as ...
256 (process_stratum_target::write_pc): ... this.
257 (process_target::supports_thread_stopped): Rename as ...
258 (process_stratum_target::supports_thread_stopped): ... this.
259 (process_target::thread_stopped): Rename as ...
260 (process_stratum_target::thread_stopped): ... this.
261 (process_target::supports_get_tib_address): Rename as ...
262 (process_stratum_target::supports_get_tib_address): ... this.
263 (process_target::get_tib_address): Rename as ...
264 (process_stratum_target::get_tib_address): ... this.
265 (process_target::pause_all): Rename as ...
266 (process_stratum_target::pause_all): ... this.
267 (process_target::unpause_all): Rename as ...
268 (process_stratum_target::unpause_all): ... this.
269 (process_target::stabilize_threads): Rename as ...
270 (process_stratum_target::stabilize_threads): ... this.
271 (process_target::supports_fast_tracepoints): Rename as ...
272 (process_stratum_target::supports_fast_tracepoints): ... this.
273 (process_target::get_min_fast_tracepoint_insn_len): Rename as ...
274 (process_stratum_target::get_min_fast_tracepoint_insn_len): ... this.
275 (process_target::emit_ops): Rename as ...
276 (process_stratum_target::emit_ops): ... this.
277 (process_target::supports_disable_randomization): Rename as ...
278 (process_stratum_target::supports_disable_randomization): ... this.
279 (process_target::supports_qxfer_libraries_svr4): Rename as ...
280 (process_stratum_target::supports_qxfer_libraries_svr4): ... this.
281 (process_target::qxfer_libraries_svr4): Rename as ...
282 (process_stratum_target::qxfer_libraries_svr4): ... this.
283 (process_target::supports_agent): Rename as ...
284 (process_stratum_target::supports_agent): ... this.
285 (process_target::enable_btrace): Rename as ...
286 (process_stratum_target::enable_btrace): ... this.
287 (process_target::disable_btrace): Rename as ...
288 (process_stratum_target::disable_btrace): ... this.
289 (process_target::read_btrace): Rename as ...
290 (process_stratum_target::read_btrace): ... this.
291 (process_target::read_btrace_conf): Rename as ...
292 (process_stratum_target::read_btrace_conf): ... this.
293 (process_target::supports_range_stepping): Rename as ...
294 (process_stratum_target::supports_range_stepping): ... this.
295 (process_target::supports_pid_to_exec_file): Rename as ...
296 (process_stratum_target::supports_pid_to_exec_file): ... this.
297 (process_target::pid_to_exec_file): Rename as ...
298 (process_stratum_target::pid_to_exec_file): ... this.
299 (process_target::supports_multifs): Rename as ...
300 (process_stratum_target::supports_multifs): ... this.
301 (process_target::multifs_open): Rename as ...
302 (process_stratum_target::multifs_open): ... this.
303 (process_target::multifs_unlink): Rename as ...
304 (process_stratum_target::multifs_unlink): ... this.
305 (process_target::multifs_readlink): Rename as ...
306 (process_stratum_target::multifs_readlink): ... this.
307 (process_target::breakpoint_kind_from_pc): Rename as ...
308 (process_stratum_target::breakpoint_kind_from_pc): ... this.
309 (process_target::breakpoint_kind_from_current_state): Rename as ...
310 (process_stratum_target::breakpoint_kind_from_current_state): ... this.
311 (process_target::thread_name): Rename as ...
312 (process_stratum_target::thread_name): ... this.
313 (process_target::thread_handle): Rename as ...
314 (process_stratum_target::thread_handle): ... this.
315 (process_target::supports_software_single_step): Rename as ...
316 (process_stratum_target::supports_software_single_step): ... this.
317 (process_target::supports_catch_syscall): Rename as ...
318 (process_stratum_target::supports_catch_syscall): ... this.
319 (process_target::get_ipa_tdesc_idx): Rename as ...
320 (process_stratum_target::get_ipa_tdesc_idx): ... this.
321
322 2020-02-20 Pedro Alves <palves@redhat.com>
323
324 * target.cc (set_target_ops): Simply copy the given target pointer
325 instead of creating a copy of the pointed object.
326
327 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
328
329 Turn process_stratum_target's get_ipa_tdesc_idx op into a method
330 of process_target.
331
332 * target.h (struct process_stratum_target): Remove the target op.
333 (class process_target): Add the target op.
334 (target_get_ipa_tdesc_idx): Update the macro.
335 * target.cc (process_target::get_ipa_tdesc_idx): Define.
336
337 Update the derived classes and callers below.
338
339 * linux-low.cc (linux_target_ops): Update.
340 (linux_get_ipa_tdesc_idx): Turn into ...
341 (linux_process_target::get_ipa_tdesc_idx): ... this.
342 * linux-low.h (class linux_process_target): Update.
343 * lynx-low.cc (lynx_target_ops): Update.
344 * nto-low.cc (nto_target_ops): Update.
345 * win32-low.cc (win32_target_ops): Update.
346
347 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
348
349 Turn process_stratum_target's supports_catch_syscall op into a
350 method of process_target.
351
352 * target.h (struct process_stratum_target): Remove the target op.
353 (class process_target): Add the target op.
354 (target_supports_catch_syscall): Update the macro.
355 * target.cc (process_target::supports_catch_syscall): Define.
356
357 Update the derived classes and callers below.
358
359 * linux-low.cc (linux_target_ops): Update.
360 (linux_supports_catch_syscall): Turn into ...
361 (linux_process_target::supports_catch_syscall): ... this.
362 * linux-low.h (class linux_process_target): Update.
363 * lynx-low.cc (lynx_target_ops): Update.
364 * nto-low.cc (nto_target_ops): Update.
365 * win32-low.cc (win32_target_ops): Update.
366
367 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
368
369 Turn process_stratum_target's supports_software_single_step op
370 into a method of process_target.
371
372 * target.h (struct process_stratum_target): Remove the target op.
373 (class process_target): Add the target op.
374 (target_supports_software_single_step): Update the macro.
375 * target.cc (process_target::supports_software_single_step): Define.
376
377 Update the derived classes and callers below.
378
379 * linux-low.cc (linux_target_ops): Update.
380 (linux_supports_software_single_step): Turn into ...
381 (linux_process_target::supports_software_single_step): ... this.
382 * linux-low.h (class linux_process_target): Update.
383 * lynx-low.cc (lynx_target_ops): Update.
384 * nto-low.cc (nto_target_ops): Update.
385 * win32-low.cc (win32_target_ops): Update.
386
387 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
388
389 Turn process_stratum_target's thread_name and thread_handle ops
390 into methods of process_target.
391
392 * target.h (struct process_stratum_target): Remove the target ops.
393 (class process_target): Add the target ops.
394 (target_thread_name): Update the macro.
395 (target_thread_handle): Update the macro.
396 * target.cc (process_target::thread_name): Define.
397 (process_target::thread_handle): Define.
398
399 Update the derived classes and callers below.
400
401 * linux-low.cc (linux_target_ops): Update.
402 (linux_process_target::thread_name): Define.
403 (linux_process_target::thread_handle): Define.
404 * linux-low.h (class linux_process_target): Update.
405 * lynx-low.cc (lynx_target_ops): Update.
406 * nto-low.cc (nto_target_ops): Update.
407 * win32-low.cc (win32_target_ops): Update.
408
409 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
410
411 Turn process_stratum_target's breakpoint_kind_from_pc,
412 sw_breakpoint_from_kind, and breakpoint_kind_from_current_state
413 ops into methods of process_target.
414
415 * target.h (struct process_stratum_target): Remove the target op.
416 (class process_target): Add the target op.
417 (target_breakpoint_kind_from_pc): Update the macro.
418 (target_breakpoint_kind_from_current_state): Update the macro.
419 (default_breakpoint_kind_from_pc): Remove declaration.
420 * target.cc (default_breakpoint_kind_from_pc): Turn into ...
421 (process_target::breakpoint_kind_from_pc): ... this.
422 (process_target::breakpoint_kind_from_current_state): Define.
423
424 Update the derived classes and callers below.
425
426 * mem-break.cc (bp_size): Update.
427 (bp_opcode): Update.
428 * linux-low.cc (linux_target_ops): Update.
429 (linux_wait_1): Update.
430 (linux_breakpoint_kind_from_pc): Turn into ...
431 (linux_process_target::breakpoint_kind_from_pc): ... this.
432 (linux_sw_breakpoint_from_kind): Turn into ...
433 (linux_process_target::sw_breakpoint_from_kind): ... this.
434 (linux_breakpoint_kind_from_current_state): Turn into ...
435 (linux_process_target::breakpoint_kind_from_current_state): ... this.
436 * linux-low.h (class linux_process_target): Update.
437 * lynx-low.cc (lynx_target_ops): Update.
438 (lynx_process_target::sw_breakpoint_from_kind): Define.
439 * lynx-low.h (class lynx_process_target): Update.
440 * nto-low.cc (nto_target_ops): Update.
441 (nto_sw_breakpoint_from_kind): Turn into ...
442 (nto_process_target::sw_breakpoint_from_kind): ... this.
443 * nto-low.h (class nto_process_target): Update.
444 * win32-low.cc (win32_target_ops): Update.
445 (win32_sw_breakpoint_from_kind): Turn into ...
446 (win32_process_target::sw_breakpoint_from_kind): ... this.
447 * win32-low.h (class win32_process_target): Update.
448
449 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
450
451 Turn process_stratum_target's multifs_open, multifs_readlink,
452 multifs_unlink ops into methods of process_target.
453
454 * target.h (struct process_stratum_target): Remove the target ops.
455 (class process_target): Add the target ops. Also add
456 'supports_multifs'.
457 * target.cc: Include "fcntl.h", "unistd.h", "sys/types.h", and
458 "sys/stat.h".
459 (process_target::supports_multifs): Define.
460 (process_target::multifs_open): Define.
461 (process_target::multifs_readlink): Define.
462 (process_target::multifs_unlink): Define.
463
464 Update the derived classes and callers below.
465
466 * hostio.cc (handle_setfs): Update.
467 (handle_open): Update.
468 (handle_unlink): Update.
469 (handle_readlink): Update.
470 * linux-low.cc (linux_target_ops): Update.
471 (linux_process_target::supports_multifs): Define.
472 (linux_process_target::multifs_open): Define.
473 (linux_process_target::multifs_readlink): Define.
474 (linux_process_target::multifs_unlink): Define.
475 * linux-low.h (class linux_process_target): Update.
476 * lynx-low.cc (lynx_target_ops): Update.
477 * nto-low.cc (nto_target_ops): Update.
478 * win32-low.cc (win32_target_ops): Update.
479
480 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
481
482 Turn process_stratum_target's pid_to_exec_file op into a method
483 of process_target.
484
485 * target.h (struct process_stratum_target): Remove the target op.
486 (class process_target): Add the target op. Also add
487 'supports_pid_to_exec_file'.
488 * target.cc (process_target::pid_to_exec_file): Define.
489 (process_target::supports_pid_to_exec_file): Define.
490
491 Update the derived classes and callers below.
492
493 * server.cc (handle_qxfer_exec_file): Update.
494 (handle_query): Update.
495 * linux-low.cc (linux_target_ops): Update.
496 (linux_process_target::supports_pid_to_exec_file): Define.
497 (linux_process_target::pid_to_exec_file): Define.
498 * linux-low.h (class linux_process_target): Update.
499 * lynx-low.cc (lynx_target_ops): Update.
500 * nto-low.cc (nto_target_ops): Update.
501 * win32-low.cc (win32_target_ops): Update.
502
503 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
504
505 Turn process_stratum_target's supports_range_stepping op into a
506 method of process_target.
507
508 * target.h (struct process_stratum_target): Remove the target op.
509 (class process_target): Add the target op.
510 (target_supports_range_stepping): Update the macro.
511 * target.cc (process_target::supports_range_stepping): Define.
512
513 Update the derived classes and callers below.
514
515 * linux-low.cc (linux_target_ops): Update.
516 (linux_supports_range_stepping): Turn into ...
517 (linux_process_target::supports_range_stepping): ... this.
518 * linux-low.h (class linux_process_target): Update.
519 * lynx-low.cc (lynx_target_ops): Update.
520 * nto-low.cc (nto_target_ops): Update.
521 * win32-low.cc (win32_target_ops): Update.
522
523 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
524
525 Turn process_stratum_target's btrace-related ops (enable_btrace,
526 disable_btrace, read_btrace, read_btrace_conf) into methods of
527 process_target.
528
529 * target.h (struct process_stratum_target): Remove the target ops.
530 (class process_target): Add the target ops.
531 (target_enable_btrace): Update.
532 (target_disable_btrace): Update.
533 (target_read_btrace): Update.
534 (target_read_btrace_conf): Update.
535 * target.cc (process_target::enable_btrace): Define.
536 (process_target::disable_btrace): Define.
537 (process_target::read_btrace): Define.
538 (process_target::read_btrace_conf): Define.
539
540 Update the derived classes and callers below.
541
542 * linux-low.cc (linux_target_ops): Update.
543 (linux_process_target:enable_btrace): Define as a wrapper around
544 linux_enable_btrace.
545 (linux_low_disable_btrace): Turn into ...
546 (linux_process_target::disable_btrace): ... this.
547 (linux_low_read_btrace): Turn into ...
548 (linux_process_target::read_btrace): ... this.
549 (linux_low_btrace_conf): Turn into ...
550 (linux_process_target::read_btrace_conf): ... this.
551 * linux-low.h (class linux_process_target): Update.
552 * lynx-low.cc (lynx_target_ops): Update.
553 * nto-low.cc (nto_target_ops): Update.
554 * win32-low.cc (win32_target_ops): Update.
555
556 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
557
558 Turn process_stratum_target's supports_agent op into a method of
559 process_target.
560
561 * target.h (struct process_stratum_target): Remove the target op.
562 (class process_target): Add the target op.
563 (target_supports_agent): Update the macro.
564 * target.cc (process_target::supports_agent): Define.
565
566 Update the derived classes and callers below.
567
568 * linux-low.cc (linux_target_ops): Update.
569 (linux_supports_agent): Turn into ...
570 (linux_process_target::supports_agent): ... this.
571 * linux-low.h (class linux_process_target): Update.
572 * lynx-low.cc (lynx_target_ops): Update.
573 * nto-low.cc (nto_target_ops): Update.
574 * win32-low.cc (win32_target_ops): Update.
575
576 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
577
578 Turn process_stratum_target's qxfer_libraries_svr4 op into a
579 method of process_target.
580
581 * target.h (struct process_stratum_target): Remove the target op.
582 (class process_target): Add the target op. Also add
583 'supports_qxfer_libraries_svr4'.
584 * target.cc (process_target::qxfer_libraries_svr4): Define.
585 (process_target::supports_qxfer_libraries_svr4): Define.
586
587 Update the derived classes and callers below.
588
589 * server.cc (handle_qxfer_libraries_svr4): Update.
590 (handle_query): Update.
591 * linux-low.cc (linux_target_ops): Update.
592 (linux_process_target::supports_qxfer_libraries_svr4): Define.
593 (linux_qxfer_libraries_svr4): Turn into ...
594 (linux_process_target::qxfer_libraries_svr4): ... this.
595 * linux-low.h (class linux_process_target): Update.
596 * lynx-low.cc (lynx_target_ops): Update.
597 * nto-low.cc (nto_target_ops): Update.
598 * win32-low.cc (win32_target_ops): Update.
599
600 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
601
602 Turn process_stratum_target's supports_disable_randomization op
603 into a method of process_target.
604
605 * target.h (struct process_stratum_target): Remove the target op.
606 (class process_target): Add the target op.
607 (target_supports_disable_randomization): Update the macro.
608 * target.cc (process_target::supports_disable_randomization): Define.
609
610 Update the derived classes and callers below.
611
612 * linux-low.cc (linux_target_ops): Update.
613 (linux_supports_disable_randomization): Turn into ...
614 (linux_process_target::supports_disable_randomization): ... this.
615 * linux-low.h (class linux_process_target): Update.
616 * lynx-low.cc (lynx_target_ops): Update.
617 * nto-low.cc (nto_target_ops): Update.
618 * win32-low.cc (win32_target_ops): Update.
619
620 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
621
622 Turn process_stratum_target's emit_ops op into a method of
623 process_target.
624
625 * target.h (struct process_stratum_target): Remove the target op.
626 (class process_target): Add the target op.
627 (target_emit_ops): Update the macro.
628 * target.cc (process_target::emit_ops): Define.
629
630 Update the derived classes and callers below.
631
632 * linux-low.cc (linux_target_ops): Update.
633 (linux_emit_ops): Turn into ...
634 (linux_process_target::emit_ops): ... this.
635 * linux-low.h (class linux_process_target): Update.
636 * lynx-low.cc (lynx_target_ops): Update.
637 * nto-low.cc (nto_target_ops): Update.
638 * win32-low.cc (win32_target_ops): Update.
639
640 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
641
642 Turn process_stratum_target's install_fast_tracepoint_jump_pad
643 and get_min_fast_tracepoint_insn_len ops into methods of
644 process_target.
645
646 * target.h (struct process_stratum_target): Remove the target ops.
647 (class process_target): Add the target ops. Also add
648 'supports_fast_tracepoints'.
649 (target_supports_fast_tracepoints): Update the macro.
650 (target_get_min_fast_tracepoint_insn_len): Update the macro.
651 (install_fast_tracepoint_jump_pad): Update and rename the macro
652 to ...
653 (target_install_fast_tracepoint_jump_pad): ... this.
654 * target.cc (process_target::supports_fast_tracepoints): Define.
655 (process_target::install_fast_tracepoint_jump_pad): Define.
656 (process_target::get_min_fast_tracepoint_insn_len): Define.
657
658 Update the derived classes and callers below.
659
660 * tracepoint.cc (install_fast_tracepoint): Update.
661 * linux-low.cc (linux_target_ops): Update.
662 (linux_process_target::supports_fast_tracepoints): Define.
663 (linux_install_fast_tracepoint_jump_pad): Turn into ...
664 (linux_process_target::install_fast_tracepoint_jump_pad): ... this.
665 (linux_get_min_fast_tracepoint_insn_len): Turn into ...
666 (linux_process_target::get_min_fast_tracepoint_insn_len): ... this.
667 * linux-low.h (class linux_process_target): Update.
668 * lynx-low.cc (lynx_target_ops): Update.
669 * nto-low.cc (nto_target_ops): Update.
670 * win32-low.cc (win32_target_ops): Update.
671
672 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
673
674 Turn process_stratum_target's stabilize_threads op into a
675 method of process_target.
676
677 * target.h (struct process_stratum_target): Remove the target op.
678 (class process_target): Add the target op.
679 (target_stabilize_threads): Update the macro.
680 * target.cc (process_target::stabilize_threads): Define.
681
682 Update the derived classes and callers below.
683
684 * server.cc (handle_status): Update.
685 * tracepoint.cc (cmd_qtdp): Update.
686 (cmd_qtstart): Update.
687 * linux-low.cc (linux_target_ops): Update.
688 (linux_stabilize_threads): Turn into ...
689 (linux_process_target::stabilize_threads): ... this.
690 (linux_wait_1): Update.
691 * linux-low.h (class linux_process_target): Update.
692 * lynx-low.cc (lynx_target_ops): Update.
693 * nto-low.cc (nto_target_ops): Update.
694 * win32-low.cc (win32_target_ops): Update.
695
696 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
697
698 Turn process_stratum_target's pause_all and unpause_all ops
699 into methods of process_target.
700
701 * target.h (struct process_stratum_target): Remove the target ops.
702 (class process_target): Add the target ops.
703 (pause_all): Update the macro and rename to...
704 (target_pause_all): ... this.
705 (unpause_all): Update the macro and rename to...
706 (target_unpause_all): ... this.
707 * target.cc (process_target::pause_all): Define.
708 (process_target::unpause_all): Define.
709
710 Update the derived classes and callers below.
711
712 * server.cc (handle_status): Update.
713 * tracepoint.cc (clear_installed_tracepoints): Update.
714 (cmd_qtdp): Update.
715 (cmd_qtstart): Update.
716 (stop_tracing): Update.
717 (cmd_qtstatus): Update.
718 (upload_fast_traceframes): Update.
719 (run_inferior_command): Update.
720 * linux-low.cc (linux_target_ops): Update.
721 (linux_pause_all): Turn into ...
722 (linux_process_target::pause_all): ... this.
723 (linux_unpause_all): Turn into ...
724 (linux_process_target::unpause_all): ... this.
725 (linux_process_target::prepare_to_access_memory): Update.
726 (linux_process_target::done_accessing_memory): Update.
727 * linux-low.h (class linux_process_target): Update.
728 * lynx-low.cc (lynx_target_ops): Update.
729 * nto-low.cc (nto_target_ops): Update.
730 * win32-low.cc (win32_target_ops): Update.
731
732 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
733
734 Turn process_stratum_target's get_tib_address op into a method of
735 process_target.
736
737 * target.h (struct process_stratum_target): Remove the target op.
738 (class process_target): Add the target op. Also add
739 'supports_get_tib_address'.
740 * target.cc (process_target::get_tib_address): Define.
741 (process_target::supports_get_tib_address): Define.
742
743 Update the derived classes and callers below.
744
745 * server.cc (handle_query): Update.
746 * linux-low.cc (win32_target_ops): Update.
747 * lynx-low.cc (lynx_target_ops): Update.
748 * nto-low.cc (nto_target_ops): Update.
749 * win32-low.cc (win32_target_ops): Update.
750 (win32_process_target::supports_get_tib_address): Define.
751 (win32_get_tib_address): Turn into ...
752 (win32_process_target::get_tib_address): ... this.
753 * win32-low.h (class win32_process_target): Update.
754
755 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
756
757 Turn process_stratum_target's thread_stopped op into a method of
758 process_target.
759
760 * target.h (struct process_stratum_target): Remove the target op.
761 (class process_target): Add the target op. Also add
762 'supports_thread_stopped'.
763 (target_thread_stopped): Update the macro.
764 * target.cc (process_target::thread_stopped): Define.
765 (process_target::supports_thread_stopped): Define.
766 (prepare_to_access_memory): Update.
767
768 Update the derived classes and callers below.
769
770 * server.cc (queue_stop_reply_callback): Update.
771 * linux-low.cc (linux_target_ops): Update.
772 (linux_process_target::supports_thread_stopped): Define.
773 (linux_thread_stopped): Turn into ...
774 (linux_process_target::thread_stopped): ... this.
775 * linux-low.h (class linux_process_target): Update.
776 * lynx-low.cc (lynx_target_ops): Update.
777 * nto-low.cc (nto_target_ops): Update.
778 * win32-low.cc (win32_target_ops): Update.
779
780 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
781
782 Turn process_stratum_target's read_pc and write_pc ops into
783 methods of process_target.
784
785 * target.h (struct process_stratum_target): Remove the target ops.
786 (class process_target): Add the target ops.
787 * target.cc (process_target::read_pc): Define.
788 (process_target::write_pc): Define.
789
790 Update the derived classes and callers below.
791
792 * regcache.cc (regcache_read_pc): Update.
793 (regcache_write_pc): Update.
794 * linux-low.cc (linux_target_ops): Update.
795 (linux_read_pc): Turn into ...
796 (linux_process_target::read_pc): ... this.
797 (linux_write_pc): Turn into ...
798 (linux_process_target::write_pc): ... this.
799 * linux-low.h (class linux_process_target): Update.
800 * lynx-low.cc (lynx_target_ops): Update.
801 * nto-low.cc (nto_target_ops): Update.
802 * win32-low.cc (win32_target_ops): Update.
803
804 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
805
806 Turn process_stratum_target's supports_tracepoints op into a
807 method of process_target.
808
809 * target.h (struct process_stratum_target): Remove the target op.
810 (class process_target): Add the target op.
811 (target_supports_tracepoints): Update the macro.
812 * target.cc (process_target::supports_tracepoints): Define.
813
814 Update the derived classes and callers below.
815
816 * linux-low.cc (linux_target_ops): Update.
817 (linux_supports_tracepoints): Turn into ...
818 (linux_process_target::supports_tracepoints): ... this.
819 * linux-low.h (class linux_process_target): Update.
820 * lynx-low.cc (lynx_target_ops): Update.
821 * nto-low.cc (nto_target_ops): Update.
822 * win32-low.cc (win32_target_ops): Update.
823
824 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
825
826 Turn process_stratum_target's process_qsupported op into a method
827 of process_target.
828
829 * target.h (struct process_stratum_target): Remove the target op.
830 (class process_target): Add the target op.
831 (target_process_qsupported): Update the macro.
832 * target.cc (process_target::process_qsupported): Define.
833
834 Update the derived classes and callers below.
835
836 * linux-low.cc (linux_target_ops): Update.
837 (linux_process_qsupported): Turn into ...
838 (linux_process_target::process_qsupported): ... this.
839 * linux-low.h (class linux_process_target): Update.
840 * lynx-low.cc (lynx_target_ops): Update.
841 * nto-low.cc (nto_target_ops): Update.
842 * win32-low.cc (win32_target_ops): Update.
843
844 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
845
846 Turn process_stratum_target's read_loadmap op into a method of
847 process_target.
848
849 * target.h (struct process_stratum_target): Remove the target op.
850 (class process_target): Add the target op. Also add
851 'supports_read_loadmap'.
852 * target.cc (process_target::read_loadmap): Define.
853 (process_target::supports_read_loadmap): Define.
854
855 Update the derived classes and callers below.
856
857 * server.cc (handle_qxfer_fdpic): Update.
858 (handle_query): Update.
859 * linux-low.cc (linux_target_ops): Update.
860 (linux_process_target::supports_read_loadmap): Define.
861 (linux_read_loadmap): Turn into ...
862 (linux_process_target::read_loadmap): ... this.
863 * linux-low.h (class linux_process_target): Update.
864 * lynx-low.cc (lynx_target_ops): Update.
865 * nto-low.cc (nto_target_ops): Update.
866 * win32-low.cc (win32_target_ops): Update.
867
868 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
869
870 Turn process_stratum_target's core_of_thread op into a method of
871 process_target.
872
873 * target.h (struct process_stratum_target): Remove the target op.
874 (class process_target): Add the target op.
875 (target_core_of_thread): Update the macro.
876 * target.cc (process_target::core_of_thread): Define.
877
878 Update the derived classes and callers below.
879
880 * linux-low.cc (linux_target_ops): Update.
881 (linux_process_target::core_of_thread): Define.
882 * linux-low.h (class linux_process_target): Update.
883 * lynx-low.cc (lynx_target_ops): Update.
884 * nto-low.cc (nto_target_ops): Update.
885 * win32-low.cc (win32_target_ops): Update.
886
887 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
888
889 Turn process_stratum_target's handle_monitor_command op into a
890 method of process_target.
891
892 * target.h (struct process_stratum_target): Remove the target op.
893 (class process_target): Add the target op.
894 (target_handle_monitor_command): Update the macro.
895 * target.cc (process_target::handle_monitor_command): Define.
896
897 Update the derived classes and callers below.
898
899 * server.cc (handle_query): Update.
900 * linux-low.cc (linux_target_ops): Update.
901 (linux_process_target::handle_monitor_command): Define.
902 * linux-low.h (class linux_process_target): Update.
903 * lynx-low.cc (lynx_target_ops): Update.
904 * nto-low.cc (nto_target_ops): Update.
905 * win32-low.cc (win32_target_ops): Update.
906
907 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
908
909 Turn process_stratum_target's handle_new_gdb_connection op into a
910 method of process_target.
911
912 * target.h (struct process_stratum_target): Remove the target op.
913 (class process_target): Add the target op.
914 (target_handle_new_gdb_connection): Update the macro.
915 * target.cc (process_target::handle_new_gdb_connection): Define.
916
917 Update the derived classes and callers below.
918
919 * linux-low.cc (linux_target_ops): Update.
920 (linux_handle_new_gdb_connection): Turn into ...
921 (linux_process_target::handle_new_gdb_connection): ... this.
922 * linux-low.h (class linux_process_target): Update.
923 * lynx-low.cc (lynx_target_ops): Update.
924 * nto-low.cc (nto_target_ops): Update.
925 * win32-low.cc (win32_target_ops): Update.
926
927 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
928
929 Turn process_stratum_target's supports_fork_events,
930 supports_vfork_events, and supports_exec_events ops into methods
931 of process_target.
932
933 * target.h (struct process_stratum_target): Remove the target ops.
934 (class process_target): Add the target ops.
935 (target_supports_fork_events): Update the macro.
936 (target_supports_vfork_events): Update the macro.
937 (target_supports_exec_events): Update the macro.
938 * target.cc (process_target::supports_fork_events): Define.
939 (process_target::supports_vfork_events): Define.
940 (process_target::supports_exec_events): Define.
941
942 Update the derived classes and callers below.
943
944 * linux-low.cc (linux_target_ops): Update.
945 (linux_supports_fork_events): Turn into ...
946 (linux_process_target::supports_fork_events): ... this.
947 (linux_supports_vfork_events): Turn into ...
948 (linux_process_target::supports_vfork_events): ... this.
949 (linux_supports_exec_events): Turn into ...
950 (linux_process_target::supports_exec_events): ... this.
951 * linux-low.h (class linux_process_target): Update.
952 * lynx-low.cc (lynx_target_ops): Update.
953 * nto-low.cc (nto_target_ops): Update.
954 * win32-low.cc (win32_target_ops): Update.
955
956 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
957
958 Turn process_stratum_target's supports_multi_process op into a
959 method of process_target.
960
961 * target.h (struct process_stratum_target): Remove the target op.
962 (class process_target): Add the target op.
963 * target.cc (process_target::supports_multi_process): Define.
964 (target_supports_multi_process): Update.
965
966 Update the derived classes and callers below.
967
968 * linux-low.cc (linux_target_ops): Update.
969 (linux_supports_multi_process): Turn into ...
970 (linux_process_target::supports_multi_process): ... this.
971 * linux-low.h (class linux_process_target): Update.
972 * lynx-low.cc (lynx_target_ops): Update.
973 * nto-low.cc (nto_target_ops): Update.
974 * win32-low.cc (win32_target_ops): Update.
975
976 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
977
978 Turn process_stratum_target's supports_non_stop, async, and
979 start_non_stop ops into methods of process_target.
980
981 * target.h (struct process_stratum_target): Remove the target ops.
982 (class process_target): Add the target ops.
983 (target_supports_non_stop): Update the macro.
984 (target_async): Update the macro.
985 (start_non_stop): Remove declaration.
986 * target.cc (process_target::supports_non_stop): Define.
987 (process_target::async): Define.
988 (process_target::start_non_stop): Define.
989 (start_non_stop): Remove.
990
991 Update the derived classes and callers below.
992
993 * server.cc (handle_qxfer_siginfo): Update.
994 (handle_query): Update.
995 * linux-low.cc (linux_target_ops): Update.
996 (linux_supports_non_stop): Turn into ...
997 (linux_process_target::supports_non_stop): ... this.
998 (linux_async): Turn into ...
999 (linux_process_target::async): ... this.
1000 (linux_start_non_stop): Turn into ...
1001 (linux_process_target::start_non_stop): ... this.
1002 * linux-low.h (class linux_process_target): Update.
1003 * lynx-low.cc (lynx_target_ops): Update.
1004 * nto-low.cc (nto_target_ops): Update.
1005 (nto_supports_non_stop): Remove; rely on the default behavior
1006 instead.
1007 * win32-low.cc (win32_target_ops): Update.
1008
1009 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1010
1011 Turn process_stratum_target's qxfer_siginfo op into a method of
1012 process_target.
1013
1014 * target.h (struct process_stratum_target): Remove the target op.
1015 (class process_target): Add the target op. Also add
1016 'supports_qxfer_siginfo'.
1017 * target.cc (process_target::qxfer_siginfo): Define.
1018 (process_target::supports_qxfer_siginfo): Define.
1019
1020 Update the derived classes and callers below.
1021
1022 * server.cc (handle_qxfer_siginfo): Update.
1023 (handle_query): Update.
1024 * linux-low.cc (linux_target_ops): Update.
1025 (linux_process_target::supports_qxfer_siginfo): Define.
1026 (linux_xfer_siginfo): Turn into ...
1027 (linux_process_target::qxfer_siginfo): ... this.
1028 * linux-low.h (class linux_process_target): Update.
1029 * lynx-low.cc (lynx_target_ops): Update.
1030 * nto-low.cc (nto_target_ops): Update.
1031 * win32-low.cc (win32_target_ops): Update.
1032
1033 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1034
1035 Turn process_stratum_target's qxfer_osdata op into a method of
1036 process_target.
1037
1038 * target.h (struct process_stratum_target): Remove the target op.
1039 (class process_target): Add the target op. Also add
1040 'supports_qxfer_osdata'.
1041 * target.cc (process_target::qxfer_osdata): Define.
1042 (process_target::supports_qxfer_osdata): Define.
1043
1044 Update the derived classes and callers below.
1045
1046 * server.cc (handle_qxfer_osdata): Update.
1047 (handle_query): Update.
1048 * linux-low.cc (linux_target_ops): Update.
1049 (linux_process_target::supports_qxfer_osdata): Define.
1050 (linux_qxfer_osdata): Turn into ...
1051 (linux_process_target::qxfer_osdata): ... this.
1052 * linux-low.h (class linux_process_target): Update.
1053 * lynx-low.cc (lynx_target_ops): Update.
1054 * nto-low.cc (nto_target_ops): Update.
1055 * win32-low.cc (win32_target_ops): Update.
1056
1057 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1058
1059 Turn process_stratum_target's hostio_last_error op into a
1060 method of process_target.
1061
1062 * target.h (struct process_stratum_target): Remove the target op.
1063 (class process_target): Add the target op.
1064 * target.cc: Add "hostio.h" to includes.
1065 (process_target::hostio_last_error): Define.
1066
1067 Update the derived classes and callers below.
1068
1069 * hostio.cc (hostio_error): Update.
1070 * linux-low.cc: Remove "hostio.h" from includes.
1071 (linux_target_ops): Update.
1072 * lynx-low.cc (lynx_target_ops): Update.
1073 * nto-low.cc (nto_target_ops): Update.
1074 * win32-low.h (class win32_process_target): Update.
1075 * win32-low.cc (win32_target_ops): Update.
1076 (wince_hostio_last_error): Turn into ...
1077 (win32_process_target::hostio_last_error): ... this.
1078
1079 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1080
1081 Turn process_stratum_target's get_tls_address op into a method of
1082 process_target.
1083
1084 * target.h (struct process_stratum_target): Remove the target op.
1085 (class process_target): Add the target op. Also add
1086 'supports_get_tls_address'.
1087 * target.cc (process_target::get_tls_address): Define.
1088 (process_target::supports_get_tls_address): Define.
1089
1090 Update the derived classes and callers below.
1091
1092 * server.cc (handle_query): Update.
1093 * linux-low.cc (linux_target_ops): Update.
1094 (linux_process_target::supports_get_tls_address): Define.
1095 (linux_process_target::get_tls_address): Define.
1096 * linux-low.h (class linux_process_target): Update.
1097 * lynx-low.cc (lynx_target_ops): Update.
1098 * nto-low.cc (nto_target_ops): Update.
1099 * win32-low.cc (win32_target_ops): Update.
1100
1101 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1102
1103 Turn process_stratum_target's read_offsets op into a method of
1104 process_target.
1105
1106 * target.h (struct process_stratum_target): Remove the target op.
1107 (class process_target): Add the target op. Also add
1108 'supports_read_offsets'.
1109 * target.cc (process_target::read_offsets): Define.
1110 (process_target::supports_read_offsets): Define.
1111
1112 Update the derived classes and callers below.
1113
1114 * server.cc (handle_query): Update.
1115 * linux-low.cc (SUPPORTS_READ_OFFSETS): New #define directive.
1116 (linux_target_ops): Update.
1117 (linux_process_target::supports_read_offsets): Define.
1118 (linux_read_offsets): Turn into ...
1119 (linux_process_target::read_offsets): ... this.
1120 * linux-low.h (class linux_process_target): Update.
1121 * lynx-low.cc (lynx_target_ops): Update.
1122 * nto-low.cc (nto_target_ops): Update.
1123 * win32-low.cc (win32_target_ops): Update.
1124
1125 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1126
1127 Turn process_stratum_target's stopped_by_watchpoint and
1128 stopped_data_address ops into methods of process_target.
1129
1130 * target.h (struct process_stratum_target): Remove the target ops.
1131 (class process_target): Add the target ops.
1132 * target.cc (process_target::stopped_by_watchpoint): Define.
1133 (process_target::stopped_data_address): Define.
1134
1135 Update the derived classes and callers below.
1136
1137 * remote-utils.cc (prepare_resume_reply): Update.
1138 * linux-low.cc (linux_target_ops): Update.
1139 (linux_stopped_by_watchpoint): Turn into ...
1140 (linux_process_target::stopped_by_watchpoint): ... this.
1141 (linux_stopped_data_address): Turn into ...
1142 (linux_process_target::stopped_data_address): ... this.
1143 * linux-low.h (class linux_process_target): Update.
1144 * lynx-low.cc (lynx_target_ops): Update.
1145 * nto-low.cc (nto_target_ops): Update.
1146 (nto_stopped_by_watchpoint): Turn into ...
1147 (nto_process_target::stopped_by_watchpoint): ... this.
1148 (nto_stopped_data_address): Turn into ...
1149 (nto_process_target::stopped_data_address): ... this.
1150 * nto-low.h (class nto_process_target): Update.
1151 * win32-low.cc (win32_target_ops): Update.
1152 (win32_stopped_by_watchpoint): Turn into ...
1153 (win32_process_target::stopped_by_watchpoint): ... this.
1154 (win32_stopped_data_address): Turn into ...
1155 (win32_process_target::stopped_data_address): ... this.
1156 * win32-low.h (class win32_process_target): Update.
1157
1158 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1159
1160 Turn process_stratum_target's supports_hardware_single_step op into
1161 a method of process_target.
1162
1163 * target.h (struct process_stratum_target): Remove the target op.
1164 (class process_target): Add the target op.
1165 (target_supports_hardware_single_step): Update the macro.
1166 (target_can_do_hardware_single_step): Remove declaration.
1167 * target.cc (process_target::supports_hardware_single_step): Define.
1168 (target_can_do_hardware_single_step): Remove.
1169
1170 Update the derived classes and callers below.
1171
1172 * linux-low.h (class linux_process_target): Update.
1173 * linux-low.cc (linux_target_ops): Update.
1174 (linux_supports_hardware_single_step): Turn into ...
1175 (linux_process_target::supports_hardware_single_step): ... this.
1176 * lynx-low.h (class lynx_process_target): Update.
1177 * lynx-low.cc (lynx_target_ops): Update.
1178 (lynx_process_target::supports_hardware_single_step): Define.
1179 * nto-low.h (class nto_process_target): Update.
1180 * nto-low.cc (nto_target_ops): Update.
1181 (nto_process_target::supports_hardware_single_step): Define.
1182 * win32-low.h (class win32_process_target): Update.
1183 * win32-low.cc (win32_target_ops): Update.
1184 (win32_process_target::supports_hardware_single_step): Define.
1185
1186 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1187
1188 Turn process_stratum_target's {supports_}stopped_by_hw_breakpoint
1189 ops into methods of process_target.
1190
1191 * target.h (struct process_stratum_target): Remove the target ops.
1192 (class process_target): Add the target ops.
1193 (target_stopped_by_hw_breakpoint): Update the macro.
1194 (target_supports_stopped_by_hw_breakpoint): Update the macro.
1195 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
1196 (process_target::supports_stopped_by_hw_breakpoint): Define.
1197
1198 Update the derived classes and callers below.
1199
1200 * linux-low.cc (linux_target_ops): Update.
1201 (linux_stopped_by_hw_breakpoint): Turn into ...
1202 (linux_process_target::stopped_by_hw_breakpoint): ... this.
1203 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
1204 (linux_process_target::supports_stopped_by_hw_breakpoint): ... this.
1205 * linux-low.h (class linux_process_target): Update.
1206 * lynx-low.cc (lynx_target_ops): Update.
1207 * nto-low.cc (nto_target_ops): Update.
1208 * win32-low.cc (win32_target_ops): Update.
1209
1210 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1211
1212 Turn process_stratum_target's {supports_}stopped_by_sw_breakpoint
1213 ops into methods of process_target.
1214
1215 * target.h (struct process_stratum_target): Remove the target ops.
1216 (class process_target): Add the target ops.
1217 (target_stopped_by_sw_breakpoint): Update the macro.
1218 (target_supports_stopped_by_sw_breakpoint): Update the macro.
1219 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
1220 (process_target::supports_stopped_by_sw_breakpoint): Define.
1221
1222 Update the derived classes and callers below.
1223
1224 * linux-low.cc (linux_target_ops): Update.
1225 (linux_stopped_by_sw_breakpoint): Turn into ...
1226 (linux_process_target::stopped_by_sw_breakpoint): ... this.
1227 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
1228 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
1229 * linux-low.h (class linux_process_target): Update.
1230 * lynx-low.cc (lynx_target_ops): Update.
1231 * nto-low.cc (nto_target_ops): Update.
1232 * win32-low.cc (win32_target_ops): Update.
1233
1234 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1235
1236 Turn process_stratum_target's insert_point and remove_point ops
1237 into methods of process_target.
1238
1239 * target.h (struct process_stratum_target): Remove the target ops.
1240 (class process_target): Add the target ops.
1241 * target.cc (process_target::insert_point): Define.
1242 (process_target::remove_point): Define.
1243
1244 Update the derived classes and callers below.
1245
1246 * mem-break.cc (set_raw_breakpoint_at): Update.
1247 (delete_raw_breakpoint): Update.
1248 (uninsert_raw_breakpoint): Update.
1249 (reinsert_raw_breakpoint): Update.
1250 * linux-low.cc (linux_target_ops): Update.
1251 (linux_insert_point): Turn into ...
1252 (linux_process_target::insert_point): ... this.
1253 (linux_remove_point): Turn into ...
1254 (linux_process_target::remove_point): ... this.
1255 * linux-low.h (class linux_process_target): Update.
1256 * lynx-low.cc (lynx_target_ops): Update.
1257 * nto-low.cc (nto_target_ops): Update.
1258 (nto_insert_point): Turn into ...
1259 (nto_process_target::insert_point): ... this.
1260 (nto_remove_point): Turn into ...
1261 (nto_process_target::remove_point): ... this.
1262 * nto-low.h (class nto_process_target): Update.
1263 * win32-low.cc (win32_target_ops): Update.
1264 (win32_insert_point): Turn into ...
1265 (win32_process_target::insert_point): ... this.
1266 (win32_remove_point): Turn into ...
1267 (win32_process_target::remove_point): ... this.
1268 * win32-low.h (class win32_process_target): Update.
1269
1270 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1271
1272 Turn process_stratum_target's supports_z_point_type op into a
1273 method of process_target.
1274
1275 * target.h (struct process_stratum_target): Remove the target op.
1276 (class process_target): Add the target op.
1277 * target.cc (process_target::supports_z_point_type): Define.
1278
1279 Update the derived classes and callers below.
1280
1281 * mem-break.cc (z_type_supported): Update.
1282 * linux-low.cc (linux_target_ops): Update.
1283 (linux_supports_z_point_type): Turn into ...
1284 (linux_process_target::supports_z_point_type): ... this.
1285 * linux-low.h (class linux_process_target): Update.
1286 * lynx-low.cc (lynx_target_ops): Update.
1287 * nto-low.cc (nto_target_ops): Update.
1288 (nto_supports_z_point_type): Turn into ...
1289 (nto_process_target::supports_z_point_type): ... this.
1290 * nto-low.h (class nto_process_target): Update.
1291 * win32-low.cc (win32_target_ops): Update.
1292 (win32_supports_z_point_type): Turn into ...
1293 (win32_process_target::supports_z_point_type): ... this.
1294 * win32-low.h (class win32_process_target): Update.
1295
1296 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1297
1298 Turn process_stratum_target's read_auxv op into a method of
1299 process_target.
1300
1301 * target.h (class process_stratum_target): Remove the target op.
1302 (struct process_target): Add the target op. Also add
1303 'supports_read_auxv'.
1304 * target.cc (process_target::read_auxv): Define.
1305 (process_target::supports_read_auxv): Define.
1306
1307 Update the derived classes and callers below.
1308
1309 * server.cc (handle_qxfer_auxv): Update.
1310 (handle_query): Update.
1311 * linux-low.cc (linux_target_ops): Update.
1312 (linux_process_target::supports_read_auxv): Define.
1313 (linux_read_auxv): Turn into ...
1314 (linux_process_target::read_auxv): ... this.
1315 * linux-low.h (class linux_process_target): Update.
1316 * lynx-low.cc (lynx_target_ops): Update.
1317 * nto-low.cc (nto_target_ops): Update.
1318 (nto_process_target::supports_read_auxv): Define.
1319 (nto_read_auxv): Turn into ...
1320 (nto_process_target::read_auxv): ... this.
1321 * nto-low.h (class nto_process_target): Update.
1322 * win32-low.cc (win32_target_ops): Update.
1323
1324 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1325
1326 Turn process_stratum_target's request_interrupt op into a method of
1327 process_target.
1328
1329 * target.h (struct process_stratum_target): Remove the target op.
1330 (class process_target): Add the target op.
1331
1332 Update the derived classes and callers below.
1333
1334 * remote-utils.cc (putpkt_binary_1): Update.
1335 (input_interrupt): Update.
1336 (getpkt): Update.
1337 * server.cc (handle_v_requests): Update.
1338 * linux-low.cc (linux_target_ops): Update.
1339 (linux_request_interrupt): Turn into ...
1340 (linux_process_target::request_interrupt): ... this.
1341 * linux-low.h (class linux_process_target): Update.
1342 * lynx-low.cc (lynx_target_ops): Update.
1343 (lynx_request_interrupt): Turn into ...
1344 (lynx_process_target::request_interrupt): ... this.
1345 * lynx-low.h (class lynx_process_target): Update.
1346 * nto-low.cc (nto_target_ops): Update.
1347 (nto_request_interrupt): Turn into ...
1348 (nto_process_target::request_interrupt): ... this.
1349 * nto-low.h (class nto_process_target): Update.
1350 * win32-low.cc (win32_target_ops): Update.
1351 (win32_request_interrupt): Turn into ...
1352 (win32_process_target::request_interrupt): ... this.
1353 * win32-low.h (class win32_process_target): Update.
1354
1355 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1356
1357 Turn process_stratum_target's look_up_symbols op into a method of
1358 process_target.
1359
1360 * target.h (struct process_stratum_target): Remove the target op.
1361 (class process_target): Add the target op.
1362 * target.cc (process_target::look_up_symbols): Define.
1363
1364 Update the derived classes and callers below.
1365
1366 * server.cc (handle_query): Update.
1367 * linux-low.cc (linux_target_ops): Update.
1368 (linux_look_up_symbols): Turn into ...
1369 (linux_process_target::look_up_symbols): ... this.
1370 * linux-low.h (class linux_process_target): Update.
1371 * lynx-low.cc (lynx_target_ops): Update.
1372 * nto-low.cc (nto_target_ops): Update.
1373 * win32-low.cc (win32_target_ops): Update.
1374
1375 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1376
1377 Turn process_stratum_target's read_memory and write_memory
1378 ops into methods of process_target.
1379
1380 * target.h (struct process_stratum_target): Remove the target ops.
1381 (class process_target): Add the target ops.
1382
1383 Update the derived classes and callers below.
1384
1385 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
1386 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
1387 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
1388 (arm_get_syscall_trapinfo): Update.
1389 * linux-cris-low.cc (cris_breakpoint_at): Update.
1390 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
1391 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
1392 * linux-mips-low.cc (mips_breakpoint_at): Update.
1393 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
1394 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
1395 * linux-sh-low.cc (sh_breakpoint_at): Update.
1396 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
1397 (sparc_store_gregset_from_stack): Update.
1398 (sparc_breakpoint_at): Update.
1399 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
1400 * linux-tile-low.cc (tile_breakpoint_at): Update.
1401 * linux-x86-low.cc (x86_breakpoint_at): Update.
1402 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
1403 * mem-brea.cc (insert_memory_breakpoint): Update.
1404 (validate_inserted_breakpoint): Update.
1405 * target.cc (read_inferior_memory): Update.
1406 (target_write_memory): Update.
1407 * linux-low.cc (linux_target_ops): Update.
1408 (linux_read_memory): Make a wrapper around the read_memory target
1409 op call.
1410 (linux_process_target::read_memory): Rename from linux_read_memory.
1411 (linux_write_memory): Turn into ...
1412 (linux_process_target::write_memory): ... this.
1413 * linux-low.h (class linux_process_target): Update.
1414 * lynx-low.cc (lynx_target_ops): Update.
1415 (lynx_read_memory): Turn into ...
1416 (lynx_process_target::read_memory): ... this.
1417 (lynx_write_memory): Turn into ...
1418 (lynx_process_target::write_memory): ... this.
1419 * lynx-low.h (class lynx_process_target): Update.
1420 * nto-low.cc (nto_target_ops): Update.
1421 (nto_read_memory): Turn into ...
1422 (nto_process_target::read_memory): ... this.
1423 (nto_write_memory): Turn into ...
1424 (nto_process_target::write_memory): ... this.
1425 * nto-low.h (class nto_process_target): Update.
1426 * win32-low.cc (win32_target_ops): Update.
1427 (win32_read_inferior_memory): Turn into ...
1428 (win32_process_target::read_memory): ... this.
1429 (win32_write_inferior_memory): Turn into ...
1430 (win32_process_target::write_memory): ... this.
1431 * win32-low.h (class win32_process_target): Update.
1432
1433 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1434
1435 Turn process_stratum_target's prepare_to_access_memory and
1436 done_accessing_memory ops into methods of process_target.
1437
1438 * target.h (struct process_stratum_target): Remove the target ops.
1439 (class process_target): Add the target ops.
1440 * target.cc (process_target::prepare_to_access_memory): Define.
1441 (process_target::done_accessing_memory): Define.
1442 (prepare_to_access_memory): Update.
1443 (done_accessing_memory): Update.
1444
1445 Update the derived classes and callers below.
1446
1447 * linux-low.cc (linux_target_ops): Update.
1448 (linux_prepare_to_access_memory): Turn into ...
1449 (linux_process_target::prepare_to_access_memory): ... this.
1450 (linux_done_accessing_memory): Turn into ...
1451 (linux_process_target::done_accessing_memory): ... this.
1452 * linux-low.h (class linux_process_target): Update.
1453 * lynx-low.cc (lynx_target_ops): Update.
1454 * nto-low.cc (nto_target_ops): Update.
1455 * win32-low.cc (win32_target_ops): Update.
1456
1457 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1458
1459 Turn process_stratum_target's fetch_registers and store_registers
1460 ops into methods of process_target.
1461
1462 * target.h (struct process_stratum_target): Remove the target ops.
1463 (class process_target): Add the target ops.
1464 (fetch_inferior_registers): Update the macro.
1465 (store_inferior_registers): Update the macro.
1466
1467 Update the derived classes and callers below.
1468
1469 * linux-low.cc (linux_target_ops): Update.
1470 (linux_fetch_registers): Turn into ...
1471 (linux_process_target::fetch_registers): ... this.
1472 (linux_store_registers): Turn into ...
1473 (linux_process_target::store_registers): ... this.
1474 * linux-low.h (class linux_process_target): Update.
1475 * lynx-low.cc (lynx_target_ops): Update.
1476 (lynx_fetch_registers): Turn into ...
1477 (lynx_process_target::fetch_registers): ... this.
1478 (lynx_store_registers): Turn into ...
1479 (lynx_process_target::store_registers): ... this.
1480 * lynx-low.h (class lynx_process_target): Update.
1481 * nto-low.cc (nto_target_ops): Update.
1482 (nto_fetch_registers): Turn into ...
1483 (nto_process_target::fetch_registers): ... this.
1484 (nto_store_registers): Turn into ...
1485 (nto_process_target::store_registers): ... this.
1486 * nto-low.h (class nto_process_target): Update.
1487 * win32-low.cc (win32_target_ops): Update.
1488 (win32_fetch_inferior_registers): Turn into ...
1489 (win32_process_target::fetch_registers): ... this.
1490 (win32_store_inferior_registers): Turn into ...
1491 (win32_process_target::store_registers): ... this.
1492 * win32-low.h (class win32_process_target): Update.
1493
1494 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1495
1496 Turn process_stratum_target's wait op into a method of
1497 process_target.
1498
1499 * target.h (struct process_stratum_target): Remove the target op.
1500 (class process_target): Add the target op.
1501
1502 Update the derived classes and callers below.
1503
1504 * target.cc (target_wait): Update.
1505 * linux-low.cc (linux_target_ops): Update.
1506 (linux_wait): Turn into ...
1507 (linux_process_target::wait): ... this.
1508 * linux-low.h (class linux_process_target): Update.
1509 * lynx-low.cc (lynx_target_ops): Update.
1510 (lynx_wait): Turn into ...
1511 (lynx_process_target::wait): ... this.
1512 * lynx-low.h (class lynx_process_target): Update.
1513 * nto-low.cc (nto_target_ops): Update.
1514 (nto_wait): Turn into ...
1515 (nto_process_target::wait): ... this.
1516 * nto-low.h (class nto_process_target): Update.
1517 * win32-low.cc (win32_target_ops): Update.
1518 (win32_wait): Turn into ...
1519 (win32_process_target::wait): ... this.
1520 (do_initial_child_stuff): Update.
1521 * win32-low.h (class win32_process_target): Update.
1522
1523 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1524
1525 Turn process_stratum_target's resume op into a method of
1526 process_target.
1527
1528 * target.h (struct process_stratum_target): Remove the target op.
1529 (class process_target): Add the target op.
1530
1531 Update the derived classes and callers below.
1532
1533 * server.cc (resume): Update.
1534 * target.cc (target_stop_and_wait): Update.
1535 (target_continue_no_signal): Update.
1536 (target_continue): Update.
1537 * linux-low.cc (linux_target_ops): Update.
1538 (linux_resume): Turn into ...
1539 (linux_process_target::resume): ... this.
1540 * linux-low.h (class linux_process_target): Update.
1541 * lynx-low.cc (lynx_target_ops): Update.
1542 (lynx_resume): Turn into ...
1543 (lynx_process_target::resume): ... this.
1544 * lynx-low.h (class lynx_process_target): Update.
1545 * nto-low.cc (nto_target_ops): Update.
1546 (nto_resume): Turn into ...
1547 (nto_process_target::resume): ... this.
1548 * nto-low.h (class nto_process_target): Update.
1549 * win32-low.cc (win32_target_ops): Update.
1550 (win32_resume): Turn into ...
1551 (win32_process_target::resume): ... this.
1552 (win32_process_target::detach): Update.
1553 (do_initial_child_stuff): Update.
1554 * win32-low.h (class win32_process_target): Update.
1555
1556 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1557
1558 Turn process_stratum_target's thread_alive op into a method of
1559 process_target.
1560
1561 * target.h (struct process_stratum_target): Remove the target op.
1562 (class process_target): Add the target op.
1563 (mythread_alive): Update the macro.
1564
1565 Update the derived classes and callers below.
1566
1567 * linux-low.cc (linux_target_ops): Update.
1568 (linux_thread_alive): Turn into ...
1569 (linux_process_target::thread_alive): ... this.
1570 (wait_for_sigstop): Update.
1571 * linux-low.h (class linux_process_target): Update.
1572 * lynx-low.cc (lynx_target_ops): Update.
1573 (lynx_thread_alive): Turn into ...
1574 (lynx_process_target::thread_alive): ... this.
1575 * lynx-low.h (class lynx_process_target): Update.
1576 * nto-low.cc (nto_target_ops): Update.
1577 (nto_thread_alive): Turn into ...
1578 (nto_process_target::thread_alive): ... this.
1579 * nto-low.h (class nto_process_target): Update.
1580 * win32-low.cc (win32_target_ops): Update.
1581 (win32_thread_alive): Turn into ...
1582 (win32_process_target::thread_alive): ... this.
1583 * win32-low.h (class win32_process_target): Update.
1584
1585 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1586
1587 Turn process_stratum_target's join op into a method of
1588 process_target.
1589
1590 * target.h (struct process_stratum_target): Remove the target op.
1591 (class process_target): Add the target op.
1592 (join_inferior): Update the macro.
1593
1594 Update the derived classes and callers below.
1595
1596 * linux-low.cc (linux_target_ops): Update.
1597 (linux_join): Turn into ...
1598 (linux_process_target::join): ... this.
1599 * linux-low.h (class linux_process_target): Update.
1600 * lynx-low.cc (lynx_target_ops): Update.
1601 (lynx_join): Turn into ...
1602 (lynx_process_target::join): ... this.
1603 * lynx-low.h (class lynx_process_target): Update.
1604 * nto-low.cc (nto_target_ops): Update.
1605 (nto_process_target::join): Define.
1606 * nto-low.h (class nto_process_target): Update.
1607 * win32-low.cc (win32_target_ops): Update.
1608 (win32_join): Turn into ...
1609 (win32_process_target::join): ... this.
1610 * win32-low.h (class win32_process_target): Update.
1611
1612 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1613
1614 Turn process_stratum_target's mourn op into a method of
1615 process_target.
1616
1617 * target.h (struct process_stratum_target): Remove the target op.
1618 (class process_target): Add the target op.
1619
1620 Update the derived classes and callers below.
1621
1622 * target.cc (target_mourn_inferior): Update.
1623 * linux-low.cc (linux_target_ops): Update.
1624 (linux_mourn): Turn into ...
1625 (linux_process_target::mourn): ... this.
1626 (handle_extended_wait): Update.
1627 (linux_process_target::kill): Update.
1628 (linux_process_target::detach): Update.
1629 * linux-low.h (class linux_process_target): Update.
1630 * lynx-low.cc (lynx_target_ops): Update.
1631 (lynx_mourn): Turn into ...
1632 (lynx_process_target::mourn): ... this.
1633 * lynx-low.h (class lynx_process_target): Update.
1634 * nto-low.cc (nto_target_ops): Update.
1635 (nto_mourn): Turn into ...
1636 (nto_process_target::mourn): ... this.
1637 * nto-low.h (class nto_process_target): Update.
1638 * win32-low.cc (win32_target_ops): Update.
1639 (win32_mourn): Turn into ...
1640 (win32_process_target::mourn): ... this.
1641 * win32-low.h (class win32_process_target): Update.
1642
1643 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1644
1645 Turn process_stratum_target's detach op into a method of
1646 process_target.
1647
1648 * target.h (struct process_stratum_target): Remove the target op.
1649 (class process_target): Add the target op.
1650 (detach_inferior): Update the macro.
1651
1652 Update the derived classes and callers below.
1653
1654 * linux-low.cc (linux_target_ops): Update.
1655 (linux_detach): Turn into ...
1656 (linux_process_target::detach): ... this.
1657 * linux-low.h (class linux_process_target): Update.
1658 * lynx-low.cc (lynx_target_ops): Update.
1659 (lynx_detach): Turn into ...
1660 (lynx_process_target::detach): ... this.
1661 * lynx-low.h (class lynx_process_target): Update.
1662 * nto-low.cc (nto_target_ops): Update.
1663 (nto_detach): Turn into ...
1664 (nto_process_target::detach): ... this.
1665 * nto-low.h (class nto_process_target): Update.
1666 * win32-low.cc (win32_target_ops): Update.
1667 (win32_detach): Turn into ...
1668 (win32_process_target::detach): ... this.
1669 * win32-low.h (class win32_process_target): Update.
1670
1671 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1672
1673 Turn process_stratum_target's kill op into a method of
1674 process_target.
1675
1676 * target.h (struct process_stratum_target): Remove the target op.
1677 (class process_target): Add the target op.
1678
1679 Update the derived classes and callers below.
1680
1681 * target.cc (kill_inferior): Update.
1682 * linux-low.cc (linux_target_ops): Update.
1683 (linux_kill): Turn into ...
1684 (linux_process_target::kill): ... this.
1685 * linux-low.h (class linux_process_target): Update.
1686 * lynx-low.cc (lynx_target_ops): Update.
1687 (lynx_kill): Turn into ...
1688 (lynx_process_target::kill): ... this.
1689 * lynx-low.h (class lynx_process_target): Update.
1690 * nto-low.cc (nto_target_ops): Update.
1691 (nto_kill): Turn into ...
1692 (nto_process_target::kill): ... this.
1693 * nto-low.h (class nto_process_target): Update.
1694 * win32-low.cc (win32_target_ops): Update.
1695 (win32_kill): Turn into ...
1696 (win32_process_target::kill): ... this.
1697 * win32-low.h (class win32_process_target): Update.
1698
1699 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1700
1701 Turn process_stratum_target's attach op into a method of
1702 process_target.
1703
1704 * target.h (struct process_stratum_target): Remove the target op.
1705 (class process_target): Add the target op.
1706 (myattach): Update the macro.
1707
1708 Update the derived classes and callers below.
1709
1710 * linux-low.cc (linux_target_ops): Update.
1711 (linux_attach): Turn into ...
1712 (linux_process_target::attach): ... this.
1713 * linux-low.h (class linux_process_target): Update.
1714 * lynx-low.cc (lynx_target_ops): Update.
1715 (lynx_attach): Turn into ...
1716 (lynx_process_target::attach): ... this.
1717 * lynx-low.h (class lynx_process_target): Update.
1718 * nto-low.cc (nto_target_ops): Update.
1719 (nto_attach): Turn into ...
1720 (nto_process_target::attach): ... this.
1721 * nto-low.h (class nto_process_target): Update.
1722 * win32-low.cc (win32_target_ops): Update.
1723 (win32_attach): Turn into ...
1724 (win32_process_target::attach): ... this.
1725 * win32-low.h (class win32_process_target): Update.
1726
1727 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1728
1729 Turn process_stratum_target's post_create_inferior op into a method
1730 of process_target.
1731
1732 * target.h (struct process_stratum_target): Remove the target op.
1733 (class process_target): Add the target op.
1734 (target_post_create_inferior): Update the macro.
1735 * target.cc (process_target::post_create_inferior): Define.
1736
1737 Update the derived classes and callers below.
1738
1739 * linux-low.cc (linux_target_ops): Update.
1740 (linux_post_create_inferior): Turn into ...
1741 (linux_process_target::post_create_inferior): ... this.
1742 * linux-low.h (class linux_process_target): Update.
1743 * lynx-low.cc (lynx_target_ops): Update.
1744 * nto-low.cc (nto_target_ops): Update.
1745 * win32-low.cc (win32_target_ops): Update.
1746
1747 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1748
1749 Turn process_stratum_target's create_inferior op into a method of
1750 process_target.
1751
1752 * target.h (struct process_stratum_target): Remove the target op.
1753 (class process_target): Add the target op.
1754 (create_inferior): Rename the macro to ...
1755 (target_create_inferior): ... this.
1756
1757 Update the derived classes and callers below.
1758
1759 * server.cc (handle_v_run): Update.
1760 (captured_main): Update.
1761 (process_serial_event): Update.
1762 * linux-low.cc (linux_target_ops): Update.
1763 (linux_create_inferior): Turn into ...
1764 (linux_process_target::create_inferior): ... this.
1765 * linux-low.h (class linux_process_target): Update.
1766 * lynx-low.cc (lynx_target_ops): Update.
1767 (lynx_create_inferior): Turn into ...
1768 (lynx_process_target::create_inferior): ... this.
1769 * lynx-low.h (class lynx_process_target): Update.
1770 * nto-low.cc (nto_target_ops): Update.
1771 (nto_create_inferior): Turn into ...
1772 (nto_process_target::create_inferior): ... this.
1773 * nto-low.h (class nto_process_target): Update.
1774 * win32-low.cc (win32_target_ops): Update.
1775 (win32_create_inferior): Turn into ...
1776 (win32_process_target::create_inferior): ... this.
1777 * win32-low.h (class win32_process_target): Update.
1778
1779 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1780
1781 * target.h (class process_target): New class definition.
1782 (struct process_stratum_target) <pt>: New field with type
1783 'process_target*'.
1784 * linux-low.h (class linux_process_target): Define as a derived
1785 class of 'process_target'.
1786 * linux-low.cc (linux_target_ops): Add a linux_process_target*
1787 as the 'pt' field.
1788 * lynx-low.h (class lynx_process_target): Define as a derived
1789 class of 'process_target'.
1790 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
1791 as the 'pt' field.
1792 * nto-low.h (class nto_process_target): Define as a derived
1793 class of 'process_target'.
1794 * nto-low.cc (nto_target_ops): Add an nto_process_target*
1795 as the 'pt' field.
1796 * win32-low.h (class win32_process_target): Define as a derived
1797 class of 'process_target'.
1798 * win32-low.cc (win32_target_ops): Add a win32_process_target*
1799 as the 'pt' field.
1800
1801 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
1802
1803 * configure: Regenerate.
1804
1805 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
1806 Andrew Burgess <andrew.burgess@embecosm.com>
1807
1808 * linux-riscv-low.cc: New file.
1809 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
1810 and nat/riscv-linux-tdesc.c.
1811 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
1812 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
1813 Define.
1814
1815 2020-02-14 Tom Tromey <tom@tromey.com>
1816
1817 * acinclude.m4: Don't include acx_configure_dir.m4.
1818 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
1819 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
1820 (all, install-only, uninstall, clean-info, clean)
1821 (maintainer-clean): Don't recurse.
1822 (subdir_do, all-lib): Remove.
1823 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
1824 (GNULIB_H): Remove.
1825 (generated_files): Update.
1826 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
1827 * configure: Rebuild.
1828 * configure.ac: Don't configure gnulib or libiberty.
1829 (GNULIB): Update.
1830
1831 2020-02-14 Eli Zaretskii <eliz@gnu.org>
1832
1833 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
1834 preparing the command line for CreateProcess.
1835 (win32_create_inferior): Reflect the program name in debugging
1836 output that shows the process and its command line.
1837
1838 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
1839
1840 * Makefile.in: Rename source files from .c to .cc.
1841 * %.c: Rename to %.cc.
1842 * configure.ac: Rename server.c to server.cc.
1843 * configure: Re-generate.
1844
1845 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
1846
1847 * Makefile.in: Rename gdbsupport source files from .c to .cc.
1848
1849 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
1850
1851 * win32-low.c (win32_create_inferior): Set signal_pid.
1852
1853 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
1854 Pedro Alves <palves@redhat.com>
1855
1856 Skip building gdbserver in a cross-configuration.
1857 * configure.srv: Set $gdbserver_host depending on whether $target
1858 is $host. Use $gdbserver_host instead of $host.
1859
1860 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
1861
1862 * configure: Re-generate.
1863
1864 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
1865
1866 * configure: Re-generate.
1867
1868 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
1869
1870 * acinclude.m4: Update warning.m4 path.
1871
1872 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
1873
1874 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
1875 (handle_exception): Set siginfo_er.
1876 (win32_xfer_siginfo): New function.
1877
1878 2020-02-07 Tom Tromey <tom@tromey.com>
1879 Pedro Alves <palves@redhat.com>
1880
1881 * README: Update build documentation.
1882 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
1883 host, not target.
1884 * configure.ac: Update paths.
1885 * configure: Rebuild.
1886 * acinclude.m4: Update paths.
1887 * Makefile.in: Update include paths.
1888 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
1889 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
1890 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
1891 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
1892 (%-generated.c): Update paths.
1893 * Move entire directory from ../gdb/gdbserver.
1894
1895 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
1896
1897 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
1898
1899 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1900
1901 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
1902 assignment instead of srv_linux_obj.
1903
1904 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
1905
1906 * server.c (handle_qxfer_libraries): Write segment-address with
1907 paddress.
1908
1909 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
1910
1911 * Makefile.in (install-strip): New target.
1912 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
1913 * aclocal.m4: Regenerate.
1914 * configure: Regenerate.
1915 * configure.ac: Add AM_PROG_INSTALL_STRIP.
1916
1917 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
1918
1919 * Makefile.in (SFILES): Adjust paths to point to real files.
1920 (OBS): Move waitstatus.o to target/waitstatus.o.
1921 (TAGS): Transform paths appropriately.
1922 (%.o): Rename to...
1923 (nat/%.o): ... this pattern rule.
1924 (%.o): Rename to...
1925 (target/%.o): ... this pattern rule.
1926 * configure.srv: Adjust paths throughout to include nat/ prefix
1927 with the revant files.
1928 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
1929 * configure: Regenerate.
1930
1931 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
1932
1933 * Makefile.in (TAGS): Remove config files from the recipe.
1934
1935 2020-01-14 Tom Tromey <tom@tromey.com>
1936
1937 * configure: Rebuild.
1938 * configure.ac: Remove any checks that were added to common.m4.
1939 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
1940 lib-link.m4.
1941
1942 2020-01-14 Tom Tromey <tom@tromey.com>
1943
1944 * server.h: Include config.h.
1945 * gdbreplay.c: Include config.h.
1946 * configure: Rebuild.
1947 * configure.ac: Don't source common.host.
1948 * acinclude.m4: Update path.
1949 * Makefile.in (INCSUPPORT): New variable.
1950 (INCLUDE_CFLAGS): Add INCSUPPORT.
1951 (SFILES): Update paths.
1952 (version-generated.c): Update path to create-version.sh.
1953 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
1954
1955 2020-01-14 Tom Tromey <tom@tromey.com>
1956
1957 * configure.ac (LIBS): Use WIN32APILIBS.
1958 (USE_WIN32API): Don't define.
1959 * configure: Rebuild.
1960
1961 2020-01-14 Tom Tromey <tom@tromey.com>
1962
1963 * configure: Rebuild.
1964
1965 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1966
1967 * Makefile.in (%-generated.c): Remove rule for files from
1968 regformats/i386.
1969
1970 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1971
1972 * configure: Re-generate.
1973
1974 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1975
1976 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
1977 Define to static.
1978 * tracepoint.c (stop_tracing, flush_trace_buffer,
1979 about_to_request_buffer_space, get_trace_state_variable_value,
1980 set_trace_state_variable_value, gdb_collect): Add declaration.
1981
1982 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1983
1984 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
1985 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
1986 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
1987 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
1988 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
1989 static.
1990
1991 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1992
1993 * inferiors.c: Include gdbsupport/common-inferior.h.
1994
1995 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1996
1997 * hostio-errno.c: Include hostio.h.
1998
1999 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
2000
2001 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
2002 prerequisite.
2003
2004 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
2005
2006 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
2007 * linux-arm-tdesc.h: Include arch/arm.h.
2008
2009 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
2010
2011 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
2012
2013 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
2014
2015 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
2016 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
2017
2018 2020-01-10 Pedro Alves <palves@redhat.com>
2019
2020 * fork-child.c (post_fork_inferior): Pass target down to
2021 startup_inferior.
2022 * inferiors.c (switch_to_thread): Add process_stratum_target
2023 parameter.
2024 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
2025 * nto-low.c (nto_target_ops): Now a process_stratum_target.
2026 * linux-low.c (linux_target_ops): Now a process_stratum_target.
2027 * remote-utils.c (prepare_resume_reply): Pass the target to
2028 switch_to_thread.
2029 * target.c (the_target): Now a process_stratum_target.
2030 (done_accessing_memory): Pass the target to switch_to_thread.
2031 (set_target_ops): Ajust to use process_stratum_target.
2032 * target.h (struct target_ops): Rename to ...
2033 (struct process_stratum_target): ... this.
2034 (the_target, set_target_ops): Adjust.
2035 (prepare_to_access_memory): Adjust comment.
2036 * win32-low.c (child_xfer_memory): Adjust to use
2037 process_stratum_target.
2038 (win32_target_ops): Now a process_stratum_target.
2039
2040 2020-01-06 Eli Zaretskii <eliz@gnu.org>
2041 Pedro Alves <palves@redhat.com>
2042
2043 * win32-low.c (get_child_debug_event): Extract the fatal exception
2044 from the exit status and convert to the equivalent Posix signal
2045 number.
2046 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
2047 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
2048
2049 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
2050
2051 * Makefile.in: Use INSTALL_PROGRAM_ENV.
2052
2053 2020-01-01 Joel Brobecker <brobecker@adacore.com>
2054
2055 * server.c (gdbserver_version): Change copyright year to 2020.
2056 * gdbreplay.c (gdbreplay_version): Likewise.
2057
2058 2019-12-19 Christian Biesinger <cbiesinger@google.com>
2059
2060 * configure: Regenerate.
2061 * configure.ac: Quote variable arguments of test.
2062
2063 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
2064
2065 * Makefile.in: Fix build with GNU Make 3.81
2066
2067 2019-12-16 Tom Tromey <tromey@adacore.com>
2068
2069 * server.c (get_exec_file): Constify result.
2070
2071 2019-12-10 Christian Biesinger <cbiesinger@google.com>
2072
2073 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
2074 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
2075 * config.in: Regenerate.
2076 * configure: Regenerate.
2077 * configure.ac: Don't check for strerror.
2078 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
2079 Call safe_strerror instead of strerror.
2080 * server.h (strerror): Remove this now-unnecessary declaration.
2081 * tracepoint.c (init_named_socket): Call safe_strerror instead of
2082 strerror.
2083 (gdb_agent_helper_thread): Likewise.
2084 * utils.c (perror_with_name): Likewise.
2085
2086 2019-11-26 Tom Tromey <tom@tromey.com>
2087
2088 * configure, config.in: Rebuild.
2089
2090 2019-11-26 Tom Tromey <tom@tromey.com>
2091
2092 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
2093 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
2094 gdb_sigmask.
2095 * configure, config.in: Rebuild.
2096
2097 2019-11-26 Tom Tromey <tom@tromey.com>
2098
2099 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
2100 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
2101 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
2102 * acinclude.m4: Include ax_pthread.m4.
2103 * config.in, configure: Rebuild.
2104
2105 2019-11-26 Christian Biesinger <cbiesinger@google.com>
2106
2107 * debug.c (debug_set_output): Call safe_strerror instead of
2108 strerror.
2109 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
2110 (linux_kill_one_lwp): Likewise.
2111 (linux_detach_one_lwp): Likewise.
2112 (linux_wait_for_event_filtered): Likewise.
2113 (store_register): Likewise.
2114 * lynx-low.c (lynx_attach): Likewise.
2115 * mem-break.c (insert_memory_breakpoint): Likewise.
2116 (remove_memory_breakpoint): Likewise.
2117 (delete_fast_tracepoint_jump): Likewise.
2118 (set_fast_tracepoint_jump): Likewise.
2119 (uninsert_fast_tracepoint_jumps_at): Likewise.
2120 (reinsert_fast_tracepoint_jumps_at): Likewise.
2121 * nto-low.c (nto_xfer_memory): Likewise.
2122 (nto_resume): Likewise.
2123
2124 2019-11-20 Luis Machado <luis.machado@linaro.org>
2125
2126 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
2127 instead of register count.
2128 * tdesc.c (tdesc_contains_feature): New function.
2129 * tdesc.h (tdesc_contains_feature): New prototype.
2130
2131 2019-11-15 Christian Biesinger <cbiesinger@google.com>
2132
2133 * Makefile.in: Add safe-strerror.c.
2134 * configure: Regenerate.
2135 * configure.ac: Don't source common.host.
2136
2137 2019-11-15 Christian Biesinger <cbiesinger@google.com>
2138
2139 * config.in: Regenerate.
2140 * configure: Regenerate.
2141
2142 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
2143
2144 * ax.c (ax_printf): Handle size_t_arg.
2145
2146 2019-11-06 Christian Biesinger <cbiesinger@google.com>
2147
2148 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
2149 * mi/mi-main.c (output_cores): Likewise.
2150 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
2151 (linux_xfer_osdata_modules): Likewise.
2152 * remote.c (register_remote_support_xml): Likewise.
2153 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
2154 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
2155
2156 2019-11-01 Christian Biesinger <cbiesinger@google.com>
2157
2158 * configure: Regenerate.
2159 * configure.ac: Remove check for strerror_r.
2160
2161 2019-10-31 Christian Biesinger <cbiesinger@google.com>
2162
2163 * config.in: Regenerate.
2164 * configure: Regenerate.
2165 * configure.ac: Also check for strerror_r.
2166
2167 2019-10-31 Christian Biesinger <cbiesinger@google.com>
2168
2169 * ax.h (debug_agent): Remove duplicate declaration.
2170
2171 2019-10-26 Tom de Vries <tdevries@suse.de>
2172
2173 * linux-aarch64-low.c: Fix typos in comments.
2174 * linux-arm-low.c: Same.
2175 * linux-low.c: Same.
2176 * linux-ppc-low.c: Same.
2177 * proc-service.c: Same.
2178 * regcache.h: Same.
2179 * server.c: Same.
2180 * tracepoint.c: Same.
2181 * win32-low.c: Same.
2182
2183 2019-10-25 Tom Tromey <tromey@adacore.com>
2184
2185 * utils.c (xstrdup): Remove.
2186
2187 2019-10-23 Tom Tromey <tom@tromey.com>
2188
2189 * configure, config.in: Rebuild.
2190
2191 2019-10-23 Tom Tromey <tom@tromey.com>
2192
2193 * configure: Rebuild.
2194 * acinclude.m4: Use m4_include, not sinclude.
2195
2196 2019-10-17 Tom Tromey <tromey@adacore.com>
2197
2198 * configure: Rebuild.
2199 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
2200 in AC_CONFIG_FILES invocation.
2201 * Makefile.in (stamp-h, Makefile): Use new-style config.status
2202 invocation.
2203
2204 2019-10-16 Christian Biesinger <cbiesinger@google.com>
2205
2206 * server.c: Include xml-builtin.h.
2207 (get_xml_features): Don't declare xml_builtins here.
2208
2209 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
2210
2211 * Makefile.in: Remove references to vec-ipa.o.
2212
2213 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
2214
2215 * Makefile.in: Remove references to vec.c.
2216
2217 2019-10-02 Christian Biesinger <cbiesinger@google.com>
2218
2219 * server.c (server_waiting): Change to bool.
2220 (extended_protocol): Likewise.
2221 (response_needed): Likewise.
2222 (exit_requested): Likewise.
2223 (run_once): Likewise.
2224 (report_no_resumed): Likewise.
2225 (non_stop): Likewise.
2226 (disable_packet_vCont): Likewise.
2227 (disable_packet_Tthread): Likewise.
2228 (disable_packet_qC): Likewise.
2229 (disable_packet_qfThreadInfo): Likewise.
2230 (handle_general_set): Update.
2231 (handle_detach): Update.
2232 (handle_monitor_command): Update.
2233 (handle_query): Update.
2234 (captured_main): Update.
2235 (process_serial_event): Update.
2236 * server.h (server_waiting): Change to bool.
2237 (disable_packet_vCont): Likewise.
2238 (disable_packet_Tthread): Likewise.
2239 (disable_packet_qC): Likewise.
2240 (disable_packet_qfThreadInfo): Likewise.
2241 (run_once): Likewise.
2242 (non_stop): Likewise.
2243 * target.c (target_stop_and_wait): Update.
2244
2245 2019-10-02 Tom Tromey <tromey@adacore.com>
2246
2247 * Makefile.in (SFILES): Add common-inferior.c.
2248 (OBS): Add common-inferior.o.
2249 * server.c (startup_with_shell): Don't define.
2250
2251 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
2252
2253 * linux-low.c (linux_low_read_btrace): Update for change to
2254 std::vector.
2255
2256 2019-09-20 Christian Biesinger <cbiesinger@google.com>
2257
2258 * debug.c (debug_threads): Remove comment in favor of the header.
2259 * debug.h (using_threads): Add declaration.
2260 (debug_threads): Add comment.
2261 * linux-aarch64-low.c: Include debug.h and remove declaration of
2262 debug_threads.
2263 * nto-low.c: Likewise.
2264 * remote-utils.c: Likewise.
2265 * thread-db.c: Likewise.
2266
2267 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
2268
2269 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
2270 and powerpc-cell64l-ipa.o.
2271 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
2272 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
2273 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
2274 (spu*-*-*): Remove.
2275
2276 * spu-low.c: Remove file.
2277
2278 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
2279 (parse_spufs_run): Remove.
2280 (ppc_get_pc): Remove Cell/B.E. support.
2281 (ppc_set_pc): Likewise.
2282 (ppc_breakpoint_at): Likewise.
2283 (ppc_arch_setup): Likewise.
2284 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
2285 tdesc_powerpc_cell32l.
2286 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
2287 or init_registers_powerpc_cell32l.
2288 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
2289 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
2290 or init_registers_powerpc_cell32l.
2291 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
2292 (init_registers_powerpc_cell32l): Remove prototype.
2293 (init_registers_powerpc_cell64l): Likewise.
2294
2295 * target.h (struct target_ops): Remove qxfer_spu member.
2296 * server.c (handle_qxfer_spu): Remove.
2297 (qxfer_packets): Remove entry for "spu".
2298 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
2299 * linux-low.c (SPUFS_MAGIC): Remove.
2300 (spu_enumerate_spu_ids): Remove.
2301 (linux_qxfer_spu): Remove.
2302 (linux_target_ops): Remove qxfer_spu member.
2303 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
2304 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
2305 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
2306
2307 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
2308
2309 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
2310 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
2311 * config.in: Regenerate.
2312 * configure: Regenerate.
2313
2314 2019-08-15 Tom Tromey <tromey@adacore.com>
2315
2316 * target.c (target_write_memory): Use gdb::byte_vector.
2317
2318 2019-08-15 Tom Tromey <tromey@adacore.com>
2319
2320 * tracepoint.c (write_inferior_data_pointer)
2321 (write_inferior_integer, write_inferior_int8)
2322 (write_inferior_uinteger, m_tracepoint_action_download)
2323 (r_tracepoint_action_download, x_tracepoint_action_download)
2324 (l_tracepoint_action_download, clear_inferior_trace_buffer)
2325 (download_agent_expr, download_tracepoint_1)
2326 (download_trace_state_variables, upload_fast_traceframes): Update.
2327 * server.c (gdb_write_memory): Update.
2328 * remote-utils.c (relocate_instruction): Update.
2329 * proc-service.c (ps_pdwrite): Update.
2330 * mem-break.c (remove_memory_breakpoint)
2331 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
2332 (uninsert_fast_tracepoint_jumps_at)
2333 (reinsert_fast_tracepoint_jumps_at): Update.
2334 * linux-x86-low.c (append_insns)
2335 (i386_install_fast_tracepoint_jump_pad)
2336 (amd64_write_goto_address, i386_write_goto_address): Update.
2337 * linux-s390-low.c (append_insns, s390_write_goto_address):
2338 Update.
2339 * linux-ppc-low.c (ppc_relocate_instruction)
2340 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
2341 (ppc_write_goto_address): Update.
2342 * linux-aarch64-low.c (append_insns): Update.
2343 * target.h (struct target_ops): Update.
2344 (write_inferior_memory): Don't declare.
2345 * target.c (target_write_memory): Rename from
2346 write_inferior_memory. Remove old target_write_memory.
2347
2348 2019-08-15 Tom Tromey <tromey@adacore.com>
2349
2350 * target.c (write_inferior_memory): Use std::vector.
2351
2352 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
2353
2354 PR build/24886
2355 * configure.ac: Drop enable-libmcheck support.
2356 * configure, config.in: Rebuild.
2357 * acinclude.m4: Don't include it.
2358
2359 2019-07-19 Alan Hayward <alan.hayward@arm.com>
2360
2361 * configure.srv: Remove Arm xml files.
2362
2363 2019-07-19 Alan Hayward <alan.hayward@arm.com>
2364
2365 * configure.srv: Add new files. Remove xml generated files.
2366 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
2367 registers.
2368 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
2369 * linux-aarch32-tdesc.c: New file.
2370 * linux-aarch32-tdesc.h: New file.
2371 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
2372 * linux-arm-low.c (init_registers_arm, tdesc_arm)
2373 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
2374 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
2375 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
2376 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
2377 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
2378 (arm_read_description): Call arm_linux_read_description.
2379 (initialize_low_arch): Don't init registers.
2380 * linux-arm-tdesc.c: New file.
2381 * linux-arm-tdesc.h: New file.
2382
2383 2019-07-10 Alan Hayward <alan.hayward@arm.com>
2384
2385 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
2386 Move counter inside for.
2387 (arm_read_description): Check ptrace earlier.
2388 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
2389
2390 2019-07-09 Tom Tromey <tom@tromey.com>
2391
2392 * configure: Rebuild.
2393 * configure.ac: Change common to gdbsupport.
2394 * acinclude.m4: Change common to gdbsupport.
2395 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
2396 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
2397 common to gdbsupport.
2398 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
2399 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
2400 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
2401 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
2402 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
2403 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
2404 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
2405 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
2406 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
2407 common to gdbsupport.
2408
2409 2019-07-04 Alan Hayward <alan.hayward@arm.com>
2410
2411 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
2412 defines.
2413 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
2414
2415 2019-07-04 Alan Hayward <alan.hayward@arm.com>
2416
2417 * configure.srv: Remove legacy xml.
2418 * linux-aarch64-low.c (initialize_low_arch): Remove
2419 initialize_low_tdesc call.
2420 * linux-aarch64-tdesc-selftest.c: Remove file.
2421 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
2422 * linux-x86-low.c (initialize_low_arch): Remove
2423 initialize_low_tdesc call.
2424 * linux-x86-tdesc-selftest.c: Remove file.
2425 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
2426
2427 2019-06-20 Tom de Vries <tdevries@suse.de>
2428
2429 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
2430 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
2431
2432 2019-06-19 Tom de Vries <tdevries@suse.de>
2433
2434 * debug.h (debug_write): Change return type to ssize_t.
2435 * debug.c (debug_write): Same.
2436
2437 2019-06-14 Tom Tromey <tom@tromey.com>
2438
2439 * configure.ac: Use new path to gnulib.
2440 * configure: Rebuild.
2441 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
2442 to gnulib.
2443
2444 2019-06-11 Tom Tromey <tom@tromey.com>
2445
2446 * Makefile.in (SFILES): Add alloc.c.
2447 (OBS): Add alloc.o.
2448 (IPA_OBJS): Add alloc-ipa.o.
2449 (alloc-ipa.o): New target.
2450 (%.o: ../%.c): New pattern rule.
2451
2452 2019-06-10 Tom Tromey <tromey@adacore.com>
2453
2454 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
2455 end warning with a newline.
2456 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
2457 newline.
2458 * thread-db.c (attach_thread): Don't end warning with a newline.
2459 (thread_db_notice_clone): Likewise.
2460 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
2461 newline.
2462 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
2463 end warning with a newline.
2464
2465 2019-06-04 Pedro Alves <palves@redhat.com>
2466
2467 * server.c (captured_main): Use make_unique_xstrdup.
2468
2469 2019-06-02 Tom Tromey <tom@tromey.com>
2470
2471 * gdbreplay.c (fromhex): Remove.
2472 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
2473
2474 2019-05-29 Tom Tromey <tromey@adacore.com>
2475
2476 * configure: Rebuild.
2477
2478 2019-05-06 Kevin Buettner <kevinb@redhat.com>
2479
2480 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
2481 sign extension code on 32-bit builds.
2482
2483 2019-05-03 Eli Zaretskii <eliz@gnu.org>
2484
2485 * remote-utils.c:
2486 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
2487
2488 2019-04-19 Tom Tromey <tom@tromey.com>
2489
2490 * server.c (struct vstop_notif): Derive from notif_event.
2491 <base>: Remove.
2492 (queue_stop_reply): Update.
2493 (remove_all_on_match_ptid): Change type. Rewrite.
2494 (discard_queued_stop_replies): Rewrite.
2495 (in_queued_stop_replies_ptid): Change type.
2496 (in_queued_stop_replies): Rewrite.
2497 (notif_stop): Update.
2498 (queue_stop_reply_callback): Update.
2499 (captured_main): Don't call initialize_notif.
2500 (push_stop_notification): Update.
2501 * notif.c (notif_write_event, handle_notif_ack)
2502 (notif_event_enque, notif_push): Update.
2503 (notif_event_xfree, initialize_notif): Remove.
2504 * notif.h (struct notif_event): Include <list>, not
2505 "common/queue.h".
2506 (struct notif_server) <queue>: Now a std::list.
2507 (notif_event_p): Remove typedef.
2508 (initialize_notif): Don't declare.
2509 (struct notif_event): Add virtual destructor.
2510
2511 2019-04-17 Alan Hayward <alan.hayward@arm.com>
2512
2513 * ax.c (ax_vdebug): Call debug_printf.
2514 * debug.c (debug_write): New function.
2515 * debug.h (debug_write): New declaration.
2516 * linux-low.c (sigchld_handler): Call debug_write.
2517
2518 2019-04-17 Alan Hayward <alan.hayward@arm.com>
2519
2520 * debug.c (debug_set_output): New function.
2521 (debug_vprintf): Send output to debug_file.
2522 (debug_flush): Likewise.
2523 * debug.h (debug_set_output): New declaration.
2524 * server.c (handle_monitor_command): Add debug-file option.
2525 (captured_main): Likewise.
2526
2527 2019-04-17 Alan Hayward <alan.hayward@arm.com>
2528
2529 * debug.c (remote_debug): Add definition.
2530 * debug.h (remote_debug): Add declaration.
2531 * hostio.c (remote_debug): Remove declaration.
2532 * remote-utils.c (struct ui_file): Likewise.
2533 (remote_debug): Likewise.
2534 * remote-utils.h (remote_debug): Likewise,
2535 * server.c (remote_debug): Remove definition.
2536
2537 2019-04-10 Kevin Buettner <kevinb@redhat.com>
2538
2539 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
2540 when using a 64-bit gdbserver.
2541
2542 2019-04-09 Tom Tromey <tromey@adacore.com>
2543
2544 * linux-low.c (select_event_lwp): Use find_thread_in_random.
2545
2546 2019-04-08 Tom Tromey <tom@tromey.com>
2547
2548 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
2549 throw.
2550 (linux_resume_one_lwp): Likewise.
2551
2552 2019-04-08 Tom Tromey <tom@tromey.com>
2553
2554 * gdbreplay.c: Update.
2555 * linux-low.c: Update.
2556 * server.c: Update.
2557
2558 2019-04-08 Tom Tromey <tom@tromey.com>
2559
2560 * server.c: Use C++ exception handling.
2561 * linux-low.c: Use C++ exception handling.
2562 * gdbreplay.c: Use C++ exception handling.
2563
2564 2019-04-08 Tom Tromey <tom@tromey.com>
2565
2566 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
2567 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
2568 (captured_main, main): Update.
2569 * gdbreplay.c (main): Update.
2570
2571 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2572
2573 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
2574 value in argument pointer, return 1 if the entry is found and 0
2575 otherwise. Move comment.
2576 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
2577 * linux-low.h (linux_get_auxv): Declare.
2578 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
2579
2580 2019-04-05 Tom Tromey <tromey@adacore.com>
2581
2582 * server.c (gdbserver_usage): Use upper-case for metasyntactic
2583 variables.
2584
2585 2019-03-28 Alan Hayward <alan.hayward@arm.com>
2586
2587 * linux-low.c (AT_HWCAP2): Add define if not already included.
2588
2589 2019-03-26 Alan Hayward <alan.hayward@arm.com>
2590
2591 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
2592 (aarch64_arch_setup): Call linux_get_hwcap.
2593 * linux-arm-low.c (arm_get_hwcap): Remove function.
2594 (arm_read_description): Call linux_get_hwcap.
2595 * linux-low.c (linux_get_auxv): New function.
2596 (linux_get_hwcap): Likewise.
2597 (linux_get_hwcap2): Likewise.
2598 * linux-low.h (linux_get_hwcap): New declaration.
2599 (linux_get_hwcap2): Likewise.
2600 * linux-ppc-low.c (ppc_get_auxv): Remove function.
2601 (ppc_arch_setup): Call linux_get_hwcap.
2602 * linux-s390-low.c (s390_get_hwcap): Remove function.
2603 (s390_arch_setup): Call linux_get_hwcap.
2604
2605 2019-03-22 Alan Hayward <alan.hayward@arm.com>
2606 Jiong Wang <jiong.wang@arm.com>
2607
2608 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
2609 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
2610 to fail.
2611 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
2612
2613 2019-03-22 Alan Hayward <alan.hayward@arm.com>
2614 Jiong Wang <jiong.wang@arm.com>
2615
2616 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
2617 (aarch64_get_hwcap): New function.
2618 (aarch64_arch_setup): Read APIA hwcap.
2619
2620 2019-03-22 Alan Hayward <alan.hayward@arm.com>
2621 Jiong Wang <jiong.wang@arm.com>
2622
2623 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
2624 (initialize_low_tracepoint): Likewise.
2625 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
2626 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
2627 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
2628 (aarch64_linux_read_description): Likewise.
2629 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
2630
2631 2019-03-12 John Baldwin <jhb@FreeBSD.org>
2632
2633 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
2634 i386_create_target_description for 'segments' parameter.
2635 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
2636 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2637 * win32-i386-low.c (i386_arch_setup): Likewise.
2638
2639 2019-03-12 Tom Tromey <tromey@adacore.com>
2640
2641 * linux-low.c (iterate_over_lwps): Update.
2642
2643 2019-03-06 Tom Tromey <tom@tromey.com>
2644
2645 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
2646 (captured_main): Use SCOPE_EXIT.
2647
2648 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
2649
2650 * configure.srv: Use '$enable_unittest' instead of '$development'
2651 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
2652 case.
2653
2654 2019-02-27 Tom Tromey <tromey@adacore.com>
2655
2656 * gdbreplay.c (logchar): Handle \r\n.
2657
2658 2019-02-07 Alan Hayward <alan.hayward@arm.com>
2659
2660 * linux-low.c (linux_attach): Add process before lwp.
2661 * server.c (attach_inferior): Check if already attached.
2662
2663 2019-02-07 Tom Tromey <tom@tromey.com>
2664
2665 * x86-tdesc.h: Rename include guard.
2666 * x86-low.h: Add include guard.
2667 * wincecompat.h: Rename include guard.
2668 * win32-low.h: Add include guard.
2669 * utils.h: Rename include guard.
2670 * tracepoint.h: Rename include guard.
2671 * tdesc.h: Rename include guard.
2672 * target.h: Rename include guard.
2673 * server.h: Rename include guard.
2674 * remote-utils.h: Rename include guard.
2675 * regcache.h: Rename include guard.
2676 * nto-low.h: Rename include guard.
2677 * notif.h: Add include guard.
2678 * mem-break.h: Rename include guard.
2679 * lynx-low.h: Add include guard.
2680 * linux-x86-tdesc.h: Add include guard.
2681 * linux-s390-tdesc.h: Add include guard.
2682 * linux-ppc-tdesc-init.h: Add include guard.
2683 * linux-low.h: Add include guard.
2684 * linux-aarch64-tdesc.h: Add include guard.
2685 * linux-aarch32-low.h: Add include guard.
2686 * inferiors.h: Rename include guard.
2687 * i387-fp.h: Rename include guard.
2688 * hostio.h: Rename include guard.
2689 * gdbthread.h: Rename include guard.
2690 * gdb_proc_service.h: Rename include guard.
2691 * event-loop.h: Rename include guard.
2692 * dll.h: Rename include guard.
2693 * debug.h: Rename include guard.
2694 * ax.h: Rename include guard.
2695
2696 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
2697
2698 PR gdb/23985
2699 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
2700 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
2701
2702 2019-01-25 Tom Tromey <tom@tromey.com>
2703
2704 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
2705
2706 2019-01-25 Tom Tromey <tom@tromey.com>
2707
2708 * win32-low.c: Fix common/ includes.
2709 * win32-i386-low.c: Fix common/ includes.
2710 * tracepoint.c: Fix common/ includes.
2711 * thread-db.c: Fix common/ includes.
2712 * target.h: Fix common/ includes.
2713 * symbol.c: Fix common/ includes.
2714 * spu-low.c: Fix common/ includes.
2715 * server.h: Fix common/ includes.
2716 * server.c: Fix common/ includes.
2717 * remote-utils.c: Fix common/ includes.
2718 * regcache.h: Fix common/ includes.
2719 * regcache.c: Fix common/ includes.
2720 * nto-x86-low.c: Fix common/ includes.
2721 * notif.h: Fix common/ includes.
2722 * mem-break.h: Fix common/ includes.
2723 * lynx-low.c: Fix common/ includes.
2724 * lynx-i386-low.c: Fix common/ includes.
2725 * linux-x86-tdesc-selftest.c: Fix common/ includes.
2726 * linux-x86-low.c: Fix common/ includes.
2727 * linux-low.c: Fix common/ includes.
2728 * inferiors.h: Fix common/ includes.
2729 * i387-fp.c: Fix common/ includes.
2730 * hostio.c: Fix common/ includes.
2731 * hostio-errno.c: Fix common/ includes.
2732 * gdbthread.h: Fix common/ includes.
2733 * gdbreplay.c: Fix common/ includes.
2734 * fork-child.c: Fix common/ includes.
2735 * event-loop.c: Fix common/ includes.
2736 * ax.c:
2737 (enum gdb_agent_op): Fix common/ includes.
2738
2739 2019-01-21 Tom Tromey <tom@tromey.com>
2740
2741 * tracepoint.c: Fix includes.
2742 * remote-utils.c: Fix includes.
2743 * linux-x86-low.c: Fix includes.
2744
2745 2019-01-01 Joel Brobecker <brobecker@adacore.com>
2746
2747 * gdbreplay.c (gdbreplay_version): Update copyright year in
2748 version message.
2749 * server.c (gdbserver_version): Likewise.
2750
2751 2018-12-05 Alan Hayward <alan.hayward@arm.com>
2752
2753 * linux-low.c (add_lwp): Switch ordering.
2754
2755 2018-11-29 Tom Tromey <tom@tromey.com>
2756
2757 * win32-low.c (win32_join): Take pid, not process.
2758 * target.h (struct target_ops) <join>: Change argument type.
2759 (join_inferior): Change argument name.
2760 * spu-low.c (spu_join): Take pid, not process.
2761 * server.c (handle_detach): Preserve pid before destroying
2762 process.
2763 * lynx-low.c (lynx_join): Take pid, not process.
2764 * linux-low.c (linux_join): Take pid, not process.
2765
2766 2018-11-23 Alan Hayward <alan.hayward@arm.com>
2767
2768 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
2769 (aarch64_cannot_fetch_register): Likewise.
2770 (struct linux_target_ops): Update references.
2771
2772 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2773
2774 * linux-ppc-low.c: Include nat/linux-ptrace.h.
2775
2776 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2777
2778 * configure.srv (ipa_ppc_linux_regobj): Add
2779 powerpc-isa207-htm-vsx32l-ipa.o and
2780 powerpc-isa207-htm-vsx64l-ipa.o.
2781 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
2782 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
2783 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
2784 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
2785 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
2786 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
2787 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
2788 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
2789 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
2790 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
2791 (init_registers_powerpc_isa207_htm_vsx32l)
2792 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
2793 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
2794 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
2795 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
2796 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
2797 (ppc_store_tm_ctarregset): New functions.
2798 (ppc_regsets): Add entries for HTM regsets.
2799 (ppc_arch_setup): Set htm in features struct when needed. Set
2800 sizes for the HTM regsets.
2801 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
2802 (initialize_low_arch): Call
2803 init_registers_powerpc_isa207_htm_vsx32l and
2804 init_registers_powerpc_isa207_htm_vsx64l.
2805 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
2806 PPC_TDESC_ISA207_HTM_VSX.
2807 (initialize_low_tracepoint): Call
2808 init_registers_powerpc_isa207_htm_vsx32l and
2809 init_registers_powerpc_isa207_htm_vsx64l.
2810
2811 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2812
2813 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
2814 rs6000/power-linux-pmu.xml to srv_xmlfiles.
2815 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
2816 (ppc_store_pmuregset): New functions.
2817 (ppc_regsets): Add entries for ebb and pmu regsets.
2818 (ppc_arch_setup): Set isa207 in features struct if the ebb and
2819 pmu regsets are available. Set sizes for these regsets.
2820
2821 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2822
2823 * configure.srv (ipa_ppc_linux_regobj): Add
2824 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
2825 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
2826 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
2827 rs6000/powerpc-isa207-vsx32l.xml, and
2828 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
2829 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
2830 <PPC_TDESC_ISA207_VSX>: New enum value.
2831 (init_registers_powerpc_isa207_vsx32l): Declare.
2832 (init_registers_powerpc_isa207_vsx64l): Declare.
2833 * linux-ppc-low.c (ppc_fill_tarregset): New function.
2834 (ppc_store_tarregset): New function.
2835 (ppc_regsets): Add entry for the TAR regset.
2836 (ppc_arch_setup): Set isa207 in features struct when needed. Set
2837 size for the TAR regsets.
2838 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
2839 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
2840 and init_registers_powerpc_isa207_vsx64l.
2841 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
2842 (initialize_low_tracepoint): Call
2843 init_registers_powerpc_isa207_vsx32l and
2844 init_registers_powerpc_isa207_vsx64l.
2845
2846 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2847 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2848
2849 * configure.srv (ipa_ppc_linux_regobj): Add
2850 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
2851 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
2852 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
2853 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
2854 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
2855 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
2856 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
2857 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
2858 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
2859 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
2860 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
2861 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
2862 (ppc_hwcap): Add comment.
2863 (ppc_hwcap2): New global.
2864 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
2865 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
2866 (ppc_regsets): Add entries for the DSCR and PPR regsets.
2867 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
2868 when needed. Set sizes for the the DSCR and PPR regsets.
2869 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
2870 (initialize_low_arch): Call
2871 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
2872 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
2873 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
2874 PPC_TDESC_ISA205_PPR_DSCR_VSX.
2875 (initialize_low_tracepoint): Call
2876 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
2877 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
2878
2879 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2880
2881 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
2882
2883 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
2884 Simon Marchi <simark@simark.ca>
2885
2886 * acinclude.m4: Include "../selftest.m4".
2887 * configure: Regenerate.
2888 * configure.ac: Use "GDB_AC_SELFTEST".
2889 * configure.srv: Use "$enable_unittests" instead of
2890 "$development" when checking whether unit tests have been
2891 enabled.
2892 * server.c (captured_main): Update message informing that
2893 selftests have been disabled.
2894
2895 2018-10-04 Tom Tromey <tom@tromey.com>
2896
2897 * configure: Rebuild.
2898
2899 2018-10-04 Tom Tromey <tom@tromey.com>
2900
2901 * server.c (handle_status): Rename inner "thread".
2902 (process_serial_event): Declare "res" in 'm' case.
2903 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
2904 (iterate_over_lwps): Rename inner "thread".
2905 (linux_qxfer_libraries_svr4): Rename inner "len".
2906 * gdbthread.h (find_thread_in_random): Rename inner "thread".
2907
2908 2018-10-01 Gary Benson <gbenson@redhat.com>
2909
2910 * gdb_proc_service.h: Moved common code to
2911 common/gdb_proc_service.h.
2912
2913 2018-10-01 Gary Benson <gbenson@redhat.com>
2914
2915 * gdb_proc_service.h: Synchronize comments and whitespace with
2916 GDB's version of this file.
2917
2918 2018-09-25 Tom Tromey <tom@tromey.com>
2919
2920 * configure: Rebuild.
2921 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
2922
2923 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
2924
2925 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
2926 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
2927 ($(IPA_LIB)): Sort IPA_OBJS.
2928
2929 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
2930
2931 * Makefile.in: Remove references to $(ADD_DEPS).
2932
2933 2018-09-16 Tom Tromey <tom@tromey.com>
2934
2935 * remote-utils.c (remote_open): Use GNU style for metasyntactic
2936 variables.
2937 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
2938 variables.
2939
2940 2018-09-05 Tom Tromey <tom@tromey.com>
2941
2942 * configure: Rebuild.
2943
2944 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
2945
2946 PR build/23399
2947 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
2948
2949 2018-08-27 Tom Tromey <tom@tromey.com>
2950
2951 PR build/23087:
2952 * configure: Rebuild.
2953
2954 2018-08-27 Tom Tromey <tom@tromey.com>
2955
2956 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
2957 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
2958 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
2959 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
2960 (s390x_emit_stack_adjust): Add casts to unsigned char.
2961
2962 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
2963
2964 PR gdb/23374
2965 PR gdb/23375
2966 * server.h (struct client_state) <disable_randomization>:
2967 Initialize to 1.
2968
2969 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
2970
2971 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
2972 variable.
2973 (mips_supply_ptrace_register): Likewise.
2974
2975 2018-07-22 Tom Tromey <tom@tromey.com>
2976
2977 * configure: Rebuild.
2978
2979 2018-07-22 Tom Tromey <tom@tromey.com>
2980
2981 * win32-low.c (win32_create_inferior): Remove unused variables.
2982 * gdbreplay.c (remote_open): Remove unused variable.
2983 * remote-utils.c (remote_prepare): Remove unused variable.
2984 * x86-tdesc.h (X86_TDESC_H): Define.
2985 (amd64_expedite_regs): Define conditionally.
2986 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
2987 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
2988 * remote-utils.c (readchar): Remove unused variable.
2989
2990 2018-07-13 Pedro Alves <palves@redhat.com>
2991
2992 * linux-low.c (linux_kill): Change parameter to process_info
2993 pointer instead of pid. Adjust.
2994 * lynx-low.c (lynx_kill): Likewise.
2995 * nto-low.c (nto_kill): Likewise.
2996 * spu-low.c (spu_kill): Likewise.
2997 * win32-low.c (win32_kill): Likewise.
2998 * server.c (handle_v_kill, kill_inferior_callback)
2999 (detach_or_kill_for_exit): Adjust.
3000 * target.c (kill_inferior): Change parameter to process_info
3001 pointer instead of pid. Adjust.
3002 * target.h (struct target_ops) <kill>: Change parameter to
3003 process_info pointer instead of pid. Adjust all implementations
3004 and callers.
3005 (kill_inferior): Likewise.
3006
3007 2018-07-13 Pedro Alves <palves@redhat.com>
3008
3009 * linux-low.c (linux_detach, linux_join): Change parameter to
3010 process_info pointer instead of pid. Adjust.
3011 * lynx-low.c (lynx_detach, lynx_join): Likewise.
3012 * nto-low.c (nto_detach): Likewise.
3013 * spu-low.c (spu_detach, spu_join): Likewise.
3014 * win32-low.c (win32_detach, win32_join): Likewise.
3015 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
3016 * target.h (struct target_ops) <detach, join>: Change parameter to
3017 process_info pointer instead of pid. Adjust all implementations
3018 and callers.
3019 (detach_inferior, join_inferior): Rename 'pid' parameter to
3020 'proc'.
3021
3022 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
3023 Jan Kratochvil <jan.kratochvil@redhat.com>
3024 Paul Fertser <fercerpav@gmail.com>
3025 Tsutomu Seki <sekiriki@gmail.com>
3026
3027 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
3028 (OBS): Add 'common/netstuff.o'.
3029 (GDBREPLAY_OBS): Likewise.
3030 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
3031 (remote_open): Implement support for IPv6
3032 connections.
3033 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
3034 and 'wspiapi.h'.
3035 (handle_accept_event): Accept connections from IPv6 sources.
3036 (remote_prepare): Handle IPv6-style hostnames; implement
3037 support for IPv6 connections.
3038 (remote_open): Implement support for printing connections from
3039 IPv6 sources.
3040
3041 2018-07-11 Pedro Alves <palves@redhat.com>
3042
3043 PR gdb/23377
3044 * mem-break.c (any_persistent_commands): Add process_info
3045 parameter and use it instead of relying on the current process.
3046 Change return type to bool.
3047 * mem-break.h (any_persistent_commands): Add process_info
3048 parameter and change return type to bool.
3049 * server.c (handle_detach): Remove require_running_or_return call.
3050 Look up the process_info for the process we're about to detach.
3051 If not found, return back error to GDB. Adjust
3052 any_persistent_commands call to pass down a process pointer.
3053
3054 2018-07-11 Pedro Alves <palves@redhat.com>
3055
3056 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
3057 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
3058 instead of collect_register_by_name.
3059 * regcache.c (regcache_raw_get_unsigned_by_name): New.
3060 * regcache.h (regcache_raw_get_unsigned_by_name): New.
3061
3062 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
3063 Pedro Alves <palves@redhat.com>
3064
3065 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
3066
3067 2018-07-03 Tom Tromey <tom@tromey.com>
3068
3069 * linux-low.c: Update.
3070 * lynx-low.c: Update.
3071 * mem-break.c: Update.
3072 * nto-low.c: Update.
3073 * remote-utils.c: Update.
3074 * server.c: Update.
3075 * spu-low.c: Update.
3076 * target.c: Update.
3077 * win32-low.c: Update.
3078
3079 2018-07-03 Tom Tromey <tom@tromey.com>
3080
3081 * server.c: Update.
3082
3083 2018-07-03 Tom Tromey <tom@tromey.com>
3084
3085 * linux-low.c: Update.
3086
3087 2018-07-03 Tom Tromey <tom@tromey.com>
3088
3089 * target.c: Update.
3090
3091 2018-07-03 Tom Tromey <tom@tromey.com>
3092
3093 * linux-low.c: Update.
3094 * linux-mips-low.c: Update.
3095 * lynx-low.c: Update.
3096 * nto-low.c: Update.
3097 * remote-utils.c: Update.
3098 * server.c: Update.
3099 * spu-low.c: Update.
3100 * target.c: Update.
3101 * thread-db.c: Update.
3102
3103 2018-07-03 Tom Tromey <tom@tromey.com>
3104
3105 * linux-low.c: Update.
3106 * linux-mips-low.c: Update.
3107 * lynx-low.c: Update.
3108 * mem-break.c: Update.
3109 * nto-low.c: Update.
3110 * remote-utils.c: Update.
3111 * server.c: Update.
3112 * spu-low.c: Update.
3113 * target.c: Update.
3114 * tracepoint.c: Update.
3115
3116 2018-07-03 Tom Tromey <tom@tromey.com>
3117
3118 * linux-low.c: Update.
3119 * linux-ppc-low.c: Update.
3120 * linux-x86-low.c: Update.
3121 * proc-service.c: Update.
3122 * server.c: Update.
3123 * spu-low.c: Update.
3124 * thread-db.c: Update.
3125 * win32-low.c: Update.
3126
3127 2018-07-03 Tom Tromey <tom@tromey.com>
3128
3129 * linux-low.c: Update.
3130 * lynx-low.c: Update.
3131 * nto-low.c: Update.
3132 * remote-utils.c: Update.
3133 * spu-low.c: Update.
3134 * thread-db.c: Update.
3135 * win32-low.c: Update.
3136
3137 2018-06-29 Joel Brobecker <brobecker@adacore.com>
3138
3139 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
3140 parameter in call to 'amd64_create_target_description'.
3141
3142 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3143
3144 * x86-tdesc.h: Remove executable permission flag.
3145
3146 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
3147
3148 * configure.ac: Remove AC_PREREQ, add missing quoting.
3149 * configure: Re-generate.
3150 * config.in: Re-generate.
3151 * aclocal.m4: Re-generate.
3152
3153 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
3154
3155 * tracepoint.h (current_traceframe): Remove declaration.
3156
3157 2018-06-18 Alan Hayward <alan.hayward@arm.com>
3158
3159 * linux-aarch64-low.c (is_sve_tdesc): New function.
3160 (aarch64_sve_regs_copy_to_regcache): Likewise.
3161 (aarch64_sve_regs_copy_from_regcache): Likewise.
3162 (aarch64_regs_info): Add SVE checks.
3163 (initialize_low_arch): Initialize SVE.
3164
3165 2018-06-18 Alan Hayward <alan.hayward@arm.com>
3166
3167 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
3168
3169 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3170
3171 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
3172 (initialize_low_tracepoint): Likewise
3173 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
3174 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
3175 param.
3176 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
3177 checks.
3178 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
3179
3180 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3181
3182 * server.h (PBUFSIZ): Increase size
3183
3184 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3185
3186 * regcache.c (regcache::raw_compare): New function.
3187 * regcache.h (regcache::raw_compare): New declaration.
3188
3189 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3190
3191 * regcache.c (new_register_cache): Use new.
3192 (free_register_cache): Use delete.
3193 (register_data): Use const.
3194 (supply_register): Move body inside regcache.
3195 (regcache::raw_supply): New override function.
3196 (collect_register): Move body inside regcache.
3197 (regcache::raw_collect): New override function.
3198 (regcache::get_register_status): New override function.
3199 * regcache.h (struct regcache): Inherit from reg_buffer_common.
3200
3201 2018-06-09 Tom Tromey <tom@tromey.com>
3202
3203 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
3204 declare queue.
3205 (event_queue): Use std::queue.
3206 (gdb_event_xfree): Remove.
3207 (initialize_event_loop, process_event, wait_for_event): Update.
3208
3209 2018-06-08 Stan Cox <scox@redhat.com>
3210
3211 * win32-low.c (win32_create_inferior): last_ptid and last_status
3212 moved to client_state.
3213
3214 2018-06-08 Pedro Alves <palves@redhat.com>
3215
3216 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
3217 common/common-exceptions.o, common/common-utils.o,
3218 common/errors.o, common/print-utils.o and utils.o.
3219 * gdbreplay.c: Include "common-defs.h" instead of the two
3220 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
3221 string.h or alloca.h.
3222 (perror_with_name): Delete.
3223 (remote_open): Use xstrdup instead of strdup.
3224 (main): Rename to ...
3225 (captured_main): ... this.
3226 (main): New.
3227
3228 2018-06-08 Tom Tromey <tom@tromey.com>
3229
3230 * linux-low.c (linux_low_read_btrace): Update.
3231
3232 2018-06-04 Stan Cox <scox@redhat.com>
3233
3234 * server.h (struct client_state): New.
3235 * server.c (cont_thread, general_thread, multi_process)
3236 (report_fork_events, report_vfork_events, report_exec_events)
3237 (report_thread_events, swbreak_feature, hwbreak_feature)
3238 (vCont_supported, disable_randomization, pass_signals)
3239 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
3240 Moved to client_state.
3241 * remote-utils.c (remote_debug, noack_mode)
3242 (transport_is_reliable): Moved to client_state.
3243 * tracepoint.c (current_traceframe): Moved to client_state.
3244
3245 Update all callers.
3246 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
3247 linux-low.c, remote-utils.h, target.c: Use client_state.
3248
3249 2018-05-31 Alan Hayward <alan.hayward@arm.com>
3250
3251 * configure.srv: Add new c/h file.
3252
3253 2018-05-31 Alan Hayward <alan.hayward@arm.com>
3254
3255 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
3256 null VQ.
3257
3258 2018-05-25 Maciej W. Rozycki <macro@mips.com>
3259
3260 * gdb.arch/mips-fpregset-core.exp: New test.
3261 * gdb.arch/mips-fpregset-core.c: New test source.
3262
3263 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
3264
3265 PR server/23198
3266 * hostio.c (require_int): Do not report overflow for integers
3267 between 0xfffffff and 0x7fffffff.
3268
3269 2018-05-22 Maciej W. Rozycki <macro@mips.com>
3270
3271 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
3272 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
3273 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
3274 functions.
3275 (the_low_target): Wire them.
3276
3277 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3278
3279 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
3280 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
3281 mode. Call collect_register_by_name with vscr using
3282 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
3283 (ppc_store_vrregset): Add and set vscr_offset variable as in
3284 ppc_fill_vrregset. Call supply_register_by_name with vscr using
3285 vscr_offset.
3286
3287 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3288
3289 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
3290 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
3291 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
3292
3293 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3294
3295 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
3296 (ppc_store_vsxregset): Likewise.
3297 (ppc_fill_vrregset): Likewise.
3298 (ppc_store_vrregset): Likewise.
3299 (ppc_fill_evrregset): Likewise.
3300 (ppc_store_evrregset): Likewise.
3301 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
3302 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
3303 needed.
3304
3305 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3306
3307 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
3308 wordsize of the inferior. Call ppc_linux_target_wordsize.
3309
3310 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3311
3312 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
3313 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
3314 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
3315 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
3316 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
3317 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
3318 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
3319 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
3320 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
3321 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
3322 (tdesc_powerpc_e500l): Remove.
3323 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
3324 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
3325 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
3326 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
3327 linux-ppc-tdesc.h.
3328 (ppc_arch_setup): Remove target description matching code. Fill a
3329 ppc_linux_features struct and call ppc_linux_match_description
3330 with it.
3331
3332 2018-05-22 Maciej W. Rozycki <macro@mips.com>
3333
3334 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
3335 width of the requested register exceeds the width of the
3336 `ptrace' data type.
3337 (mips_cannot_store_register): Likewise.
3338
3339 2018-05-21 Maciej W. Rozycki <macro@mips.com>
3340
3341 * linux-mips-low.c (mips_fetch_register): New function. Update
3342 preceding comment.
3343 (mips_store_gregset): Supply 0 rather than $restart for $zero.
3344 (the_low_target): Wire `mips_fetch_register'.
3345
3346 2018-05-10 Joel Brobecker <brobecker@adacore.com>
3347
3348 * lynx-i386-low.c (LYNXOS_178): New macro.
3349 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
3350 the layout on LynxOS-178.
3351 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
3352 handle floating point registers that are not supported by
3353 LynxOS-178.
3354
3355 2018-05-10 Tom Tromey <tom@tromey.com>
3356
3357 * configure: Rebuild.
3358
3359 2018-05-10 Joel Brobecker <brobecker@adacore.com>
3360
3361 PR server/23158:
3362 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
3363 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
3364 Use it to set the expedite_regs field in the given tdesc.
3365 * x86-tdesc.h: New file.
3366 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
3367 Adjust following the addition of the new expedite_regs parameter
3368 to init_target_desc.
3369 * linux-tic6x-low.c (tic6x_read_description): Likewise.
3370 * linux-x86-tdesc.c: #include "x86-tdesc.h".
3371 (i386_linux_read_description, amd64_linux_read_description):
3372 Adjust following the addition of the new expedite_regs parameter
3373 to init_target_desc.
3374 * lynx-i386-low.c: #include "x86-tdesc.h".
3375 (lynx_i386_arch_setup): Adjust following the addition of the new
3376 expedite_regs parameter to init_target_desc.
3377 * nto-x86-low.c: #include "x86-tdesc.h".
3378 (nto_x86_arch_setup): Adjust following the addition of the new
3379 expedite_regs parameter to init_target_desc.
3380 * win32-i386-low.c: #include "x86-tdesc.h".
3381 (i386_arch_setup): Adjust following the addition of the new
3382 expedite_regs parameter to init_target_desc.
3383
3384 2018-05-10 Joel Brobecker <brobecker@adacore.com>
3385
3386 PR server/23158:
3387 * win32-low.c (win32_create_inferior): Add call to my_wait
3388 setting last_status global.
3389
3390 2018-05-10 Joel Brobecker <brobecker@adacore.com>
3391
3392 PR server/23158:
3393 * win32-low.c (create_process): Only call gdb_tilde_expand if
3394 inferior_cwd is not NULL.
3395
3396 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
3397
3398 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
3399 registers to the cache if their values have changed.
3400 (i387_xsave_to_cache): Provide default values for x87 control
3401 registers when these features are available, but disabled.
3402 * regcache.c (supply_register_by_name_zeroed): New function.
3403 * regcache.h (supply_register_by_name_zeroed): Declare new
3404 function.
3405
3406 2018-05-07 Tom Tromey <tom@tromey.com>
3407
3408 * configure: Rebuild.
3409
3410 2018-05-04 Tom Tromey <tom@tromey.com>
3411
3412 * configure: Rebuild.
3413
3414 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
3415 Pedro Alves <palves@redhat.com>
3416
3417 * linux-aarch64-low.c (aarch64_stopped_data_address):
3418 Likewise.
3419
3420 2018-04-27 Tom Tromey <tom@tromey.com>
3421
3422 * configure: Rebuild.
3423
3424 2018-04-23 Tom Tromey <tom@tromey.com>
3425
3426 * configure: Rebuild.
3427
3428 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
3429
3430 * Makefile.in (depcomp): Add "..".
3431 (all_deps_files): New and use it.
3432
3433 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3434
3435 * configure.srv (aarch64*-*-linux*): Don't include xml.
3436 (i[34567]86-*-cygwin*): Likewise.
3437 (i[34567]86-*-linux*): Likewise.
3438 (i[34567]86-*-lynxos*): Likewise.
3439 (i[34567]86-*-mingw32ce*): Likewise.
3440 (i[34567]86-*-mingw*): Likewise.
3441 (i[34567]86-*-nto*): Likewise.
3442 (tic6x-*-uclinux): Likewise.
3443 (x86_64-*-linux*): Likewise.
3444 (x86_64-*-mingw*): Likewise.
3445 (x86_64-*-cygwin*): Likewise.
3446
3447 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3448
3449 * tdesc.c: Remove xml parameter.
3450
3451 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3452
3453 * server.c (get_features_xml): Remove cast.
3454 * tdesc.c (void target_desc::accept): Fill in function.
3455 (tdesc_get_features_xml): Remove old xml creation.
3456 (print_xml_feature::visit_pre): Add xml vistor.
3457 * tdesc.h (struct target_desc): Make xmltarget mutable.
3458 (tdesc_get_features_xml): Remove declaration.
3459
3460 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3461
3462 * tdesc.c (tdesc_architecture_name): Add new function.
3463 (tdesc_osabi_name): Likewise.
3464 (tdesc_get_features_xml): Use new functions.
3465
3466 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3467
3468 * tdesc.c (tdesc_create_flags): Remove.
3469 (tdesc_add_flag): Likewise.
3470 (tdesc_named_type): Likewise.
3471 (tdesc_create_union): Likewise.
3472 (tdesc_create_struct): Likewise.
3473 (tdesc_create_vector): Likewise.
3474 (tdesc_add_bitfield): Likewise.
3475 (tdesc_add_field): Likewise.
3476 (tdesc_set_struct_size): Likewise.
3477
3478 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3479
3480 * tdesc.c (~target_desc): Remove implictly deleted items.
3481 (init_target_desc): Iterate all features.
3482 (tdesc_get_features_xml): Use vector.
3483 (tdesc_create_feature): Create feature.
3484 * tdesc.h (tdesc_feature) Remove
3485 (target_desc): Add features.
3486
3487 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3488
3489 * Makefile.in: Add common/tdesc.c
3490 * tdesc.c (init_target_desc): init all reg_defs from register
3491 vector.
3492 (tdesc_create_reg): Create tdesc_reg.
3493 * tdesc.h (tdesc_feature): Add register vector.
3494
3495 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
3496
3497 * tdesc.h (struct target_desc) <features>: Change type to
3498 std::vector<std::string>.
3499 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
3500 changes.
3501 (tdesc_get_features_xml): Likewise.
3502 (tdesc_create_feature): Likewise.
3503
3504 2018-03-26 Alan Hayward <alan.hayward@arm.com>
3505
3506 * regcache.c (find_register_by_number): Return a ref.
3507 (find_regno): Use references.
3508 (register_size): Likewise.
3509 (register_data): Likewise.
3510 * tdesc.c (target_desc::~target_desc): Remove free calls.
3511 (target_desc::operator==): Use std::vector compare.
3512 (init_target_desc): Use reference.
3513 (tdesc_create_reg): Use reg constructors.
3514 * tdesc.h (struct target_desc): Replace pointer with object.
3515
3516 2018-03-23 Alan Hayward <alan.hayward@arm.com>
3517
3518 * regcache.c (find_register_by_number): Make static.
3519 (find_regno): Use find_register_by_number
3520 * regcache.h (struct reg): Remove declaration.
3521
3522 2018-03-23 Alan Hayward <alan.hayward@arm.com>
3523
3524 * tdesc.c (target_desc::~target_desc): Move to here.
3525 (target_desc::operator==): Likewise.
3526 * tdesc.h (target_desc::~target_desc): Move from here.
3527 (target_desc::operator==): Likewise.
3528
3529 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
3530
3531 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
3532
3533 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3534
3535 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
3536 S390_TDESC_GS.
3537 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
3538 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
3539 and init_registers_s390_gs_linux64.
3540
3541 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3542
3543 * linux-s390-low.c (s390_fill_gs): Remove function.
3544 (s390_fill_gsbc): Remove function.
3545 (s390_regsets): Set fill functions for the guarded storage regsets
3546 to NULL.
3547
3548 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3549
3550 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
3551 the word size. Add comment.
3552 (s390_get_wordsize): New function.
3553 (s390_arch_setup): No longer select a temporary tdesc to fetch the
3554 pswm with it. Instead, use s390_get_wordsize to determine the
3555 word size first and derive the correct tdesc from that directly.
3556
3557 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
3558
3559 * Makefile.in: Include silent-rules.mk.
3560 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
3561 (COMPILE): Add ECHO_CXX.
3562 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
3563 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
3564 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
3565 (version-generated.c): Add ECHO_GEN.
3566 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
3567 (IPAGENT_COMPILE): Add ECHO_CXX.
3568 (%-generated.c): Add ECHO_REGDAT.
3569
3570 2018-03-14 Tom Tromey <tom@tromey.com>
3571
3572 PR cli/14977:
3573 * ax.c (ax_printf): Special case for NULL.
3574
3575 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
3576
3577 * linux-low.c (linux_qxfer_libraries_svr4): Use
3578 xml_escape_text_append.
3579
3580 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
3581
3582 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
3583
3584 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
3585
3586 * server.c (handle_general_set): Remove unnecessary xstrdup.
3587
3588 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
3589
3590 * server.c (parse_debug_format_options): Adjust to
3591 delim_string_to_char_ptr_vec changes.
3592 * thread-db.c (thread_db_load_search): Adjust to
3593 dirnames_to_char_ptr_vec changes.
3594
3595 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
3596
3597 * target.h (target_enable_btrace, target_disable_btrace)
3598 (target_read_btrace, target_read_btrace_conf): Turn macro into
3599 inline function. Throw error if target method is not defined.
3600 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
3601 check for btrace target method. Be prepared to handle exceptions
3602 from btrace target methods.
3603
3604 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
3605
3606 * server.c (captured_main): Change order of error message printed
3607 when the current working directory cannot be found.
3608
3609 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
3610
3611 * server.c: Include "filenames.h" and "pathstuff.h".
3612 (program_name): Delete variable.
3613 (program_path): New anonymous class.
3614 (get_exec_wrapper): Use "program_path" instead of
3615 "program_name".
3616 (handle_v_run): Likewise.
3617 (captured_main): Likewise.
3618 (process_serial_event): Likewise.
3619
3620 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
3621
3622 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
3623 (OBJS): Add "pathstuff.o".
3624 * server.c (current_directory): New global variable.
3625 (captured_main): Initialize "current_directory".
3626
3627 2018-02-26 Alan Hayward <alan.hayward@arm.com>
3628
3629 * tdesc.c: Use common/tdesc.h.
3630 * tdesc.h: Likewise.
3631
3632 2018-02-20 Alan Hayward <alan.hayward@arm.com>
3633 Simon Marchi <simon.marchi@ericsson.com>
3634
3635 * Makefile.in: Switch order of make rules.
3636
3637 2018-02-19 Alan Hayward <alan.hayward@arm.com>
3638
3639 * Makefile.in: Add common directory in build.
3640 * configure.ac: Add common reference.
3641 * configure: Regenerate.
3642
3643 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
3644
3645 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
3646 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
3647 * spu-low.c (spu_target_ops): Likewise.
3648 * win32-low.c (win32_target_ops): Likewise.
3649 * server.c (supported_btrace_packets): Report packets unconditionally.
3650 * target.h (target_ops) <supports_btrace>: Remove.
3651 (target_supports_btrace): Remove.
3652
3653 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
3654
3655 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
3656 (handle_btrace_disable): Change return type to void. Use exceptions
3657 to report errors.
3658 (handle_btrace_general_set): Catch exception and copy message to
3659 return message.
3660
3661 2018-02-08 Tom Tromey <tom@tromey.com>
3662
3663 * linux-low.c (install_software_single_step_breakpoints): Use
3664 make_scoped_restore.
3665 * inferiors.c (make_cleanup_restore_current_thread): Remove.
3666 (do_restore_current_thread_cleanup): Remove.
3667 * gdbthread.h (make_cleanup_restore_current_thread): Don't
3668 declare.
3669
3670 2018-02-08 Tom Tromey <tom@tromey.com>
3671
3672 * mem-break.c (set_raw_breakpoint_at): Use
3673 gdb::unique_xmalloc_ptr.
3674
3675 2018-01-30 Pedro Alves <palves@redhat.com>
3676
3677 PR gdb/13211
3678 * target.c (target_terminal::terminal_state): Rename to ...
3679 (target_terminal::m_terminal_state): ... this.
3680
3681 2018-01-19 James Clarke <jrtc27@jrtc27.com>
3682
3683 * linux-low.c (handle_extended_wait): Surround call to
3684 thread_db_notice_clone with #ifdef USE_THREAD_DB.
3685
3686 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
3687
3688 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
3689 linux_ptrace_attach_fail_reason_string now returning an
3690 std::string.
3691 (linux_attach): Likewise.
3692 * thread-db.c (attach_thread): Likewise.
3693
3694 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
3695
3696 PR gdb/21559
3697 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
3698 checking for fs_base/gs_base fields in struct user_regs_struct.
3699 * configure: Regenerate.
3700
3701 2018-01-16 Yao Qi <yao.qi@linaro.org>
3702
3703 PR gdb/18749
3704 * linux-low.c (fetch_register): Call supply_register instead of
3705 error.
3706
3707 2018-01-08 Yao Qi <yao.qi@linaro.org>
3708 Simon Marchi <simon.marchi@ericsson.com>
3709
3710 * Makefile.in (OBS): Remove selftest.o.
3711 * configure.ac: Set srv_selftest_objs if $development is true.
3712 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
3713 * configure: Re-generated.
3714 * server.c (captured_main): Wrap variable selftest_filter with
3715 GDB_SELF_TEST.
3716
3717 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
3718
3719 * server.c (parse_debug_format_options): Return std::string.
3720 (handle_monitor_command, captured_main): Adjust.
3721
3722 2018-01-05 Pedro Alves <palves@redhat.com>
3723
3724 PR gdb/18653
3725 * server.c (captured_main): Pass quiet=false to
3726 save_original_signals_state.
3727
3728 2018-01-01 Joel Brobecker <brobecker@adacore.com>
3729
3730 * gdbreplay.c (gdbreplay_version): Update copyright year in
3731 version message.
3732 * server.c (gdbserver_version): Likewise.
3733
3734 2017-12-08 Tom Tromey <tom@tromey.com>
3735
3736 * ax.c (ax_printf): Update.
3737
3738 2017-12-07 Yao Qi <yao.qi@linaro.org>
3739
3740 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
3741 aarch64_linux_read_description.
3742 * linux-amd64-ipa.c (idx2mask): New array.
3743 (get_ipa_tdesc): Move idx2mask out.
3744 (initialize_low_tracepoint): Initialize target descriptions.
3745 * linux-i386-ipa.c (idx2mask): New array.
3746 (get_ipa_tdesc): Move idx2mask out.
3747 (initialize_low_tracepoint): Initialize target descriptions.
3748
3749 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
3750
3751 * tdesc.c (struct tdesc_type): Change return type.
3752 (tdesc_add_flag): Change parameter type.
3753 (tdesc_add_bitfield): Likewise.
3754 (tdesc_add_field): Likewise.
3755 (tdesc_set_struct_size): Likewise.
3756
3757 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
3758
3759 * regcache.c (registers_to_string): Remove unused variable.
3760
3761 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3762
3763 * inferiors.c (for_each_inferior_with_data): Remove.
3764 * inferiors.h (for_each_inferior_with_data): Remove.
3765 * server.c (handle_qxfer_threads_worker): Change parameter type.
3766 (handle_qxfer_threads_proper): Use for_each_thread.
3767
3768 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3769
3770 * inferiors.c (for_each_inferior): Remove.
3771 (clear_inferiors): Use for_each_thread.
3772 * inferiors.h (for_each_inferior): Remove.
3773 * linux-low.c (linux_wait_for_event_filtered): Use
3774 for_each_thread.
3775 (linux_stabilize_threads): Likewise.
3776 * regcache.c (regcache_release): Likewise.
3777 * server.c (gdb_wants_all_threads_stopped): Likewise.
3778 (clear_pending_status_callback): Remove.
3779 (handle_status): Use for_each_thread.
3780 (captured_main): Likewise.
3781 * win32-low.c (child_init_thread_list): Likewise.
3782 (win32_clear_inferiors): Likewise.
3783 (fake_breakpoint_event): Likewise.
3784
3785 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3786
3787 * inferiors.h (find_inferior): Remove.
3788 * inferiors.c (find_inferior): Remove.
3789
3790 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3791
3792 * linux-low.c (resume_status_pending_p): Update comment.
3793 (need_step_over_p): Update comment.
3794
3795 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3796
3797 * linux-low.c (proceed_one_lwp): Return void, change parameter
3798 type.
3799 (unsuspend_and_proceed_one_lwp): Likewise.
3800 (proceed_all_lwps): Use for_each_thread.
3801 (unstop_all_lwps): Likewise.
3802
3803 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3804
3805 * linux-low.c (linux_resume_one_thread): Return void, take
3806 parameter directly.
3807 (linux_resume): Use for_each_thread.
3808
3809 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3810
3811 * linux-low.c (send_sigstop_callback): Return void, change
3812 parameter type. Rename to...
3813 (send_sigstop): ... this.
3814 (suspend_and_send_sigstop_callback): Return void, change parameter
3815 type. Rename to...
3816 (suspend_and_send_sigstop): ... this.
3817 (stop_all_lwps): Use for_each_thread.
3818
3819 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3820
3821 * linux-low.c (lwp_running): Return bool, remove unused
3822 argument.
3823 (linux_stabilize_threads): Use find_thread.
3824
3825 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3826
3827 * linux-low.c (select_singlestep_lwp_callback): Remove.
3828 (count_events_callback): Remove.
3829 (select_event_lwp_callback): Remove.
3830 (select_event_lwp): Use find_thread/for_each_thread.
3831
3832 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3833
3834 * linux-low.c (not_stopped_callback): Return bool, take filter
3835 argument directly.
3836 (linux_wait_for_event_filtered): Use find_thread.
3837 (linux_wait_1): Likewise.
3838
3839 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3840
3841 * linux-low.c (same_lwp): Remove.
3842 (find_lwp_pid): Use find_thread.
3843
3844 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3845
3846 * linux-low.c (delete_lwp_callback): Remove.
3847 (linux_mourn): Use for_each_thread.
3848
3849 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3850
3851 * linux-low.c (linux_detach_lwp_callback): Return void, remove
3852 args parameter, don't check for pid.
3853 (linux_detach): Use for_each_thread.
3854
3855 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3856
3857 * linux-low.c (struct counter): Remove.
3858 (second_thread_of_pid_p): Remove.
3859 (last_thread_of_process_p): Use find_thread.
3860
3861 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3862
3863 * inferiors.c (find_inferior_in_random): Remove.
3864 * inferiors.h (find_inferior_in_random): Remove.
3865 * linux-low.c (status_pending_p_callback): Return bool, accept
3866 parameter ptid directly.
3867 (linux_wait_for_event_filtered): Use find_thread_in_random.
3868 (linux_wait_1): Likewise.
3869
3870 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3871
3872 * inferiors.c (find_inferior_id): Remove.
3873 (find_thread_ptid): Move implemention from find_inferior_id to
3874 here.
3875 * inferiors.h (find_inferior_id): Remove.
3876 * server.c (handle_status): Use find_thread_ptid.
3877 (process_serial_event): Likewise.
3878 * thread-db.c (find_one_thread): Likewise.
3879 (thread_db_thread_handle): Likewise.
3880 * win32-low.c (thread_rec): Likewise.
3881 (child_delete_thread): Likewise.
3882 (win32_thread_alive): Likewise.
3883 (get_child_debug_event): Likewise.
3884
3885 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3886
3887 * linux-mips-low.c (update_watch_registers_callback): Return
3888 void, remove pid_p parameter, don't check for pid.
3889 (mips_insert_point, mips_remove_point): Use for_each_thread.
3890
3891 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3892
3893 * lynx.low (lynx_delete_thread_callback): Remove.
3894 (lynx_mourn): Use for_each_thread.
3895
3896 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3897
3898 * regcache.c (regcache_invalidate_one): Remove.
3899 (regcache_invalidate_pid): use for_each_thread.
3900
3901 2017-11-26 Tom Tromey <tom@tromey.com>
3902
3903 * linux-low.c (linux_create_inferior): Update.
3904
3905 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
3906
3907 * spu-low.c (spu_create_inferior): Fix typo in argument name.
3908
3909 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3910
3911 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
3912 * linux-aarch64-low.c (initialize_low_arch): Call init func.
3913 * linux-aarch64-tdesc-selftest.c: New file.
3914 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
3915
3916 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3917
3918 * configure.srv: Add new file.
3919 * linux-aarch64-low.c (initialize_low_arch): Call init func.
3920 * linux-aarch64-tdesc-selftest.c: New file.
3921 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
3922
3923 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3924
3925 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
3926 * linux-aarch64-low.c (initialize_low_arch): Remove init.
3927 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
3928
3929 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3930
3931 * configure.srv: Add new files.
3932 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
3933 aarch64_linux_read_description.
3934 * linux-aarch64-low.c (aarch64_linux_read_description):
3935 Merge with aarch64_arch_setup.
3936 (aarch64_arch_setup): Call aarch64_linux_read_description.
3937 * linux-aarch64-tdesc.c: New file.
3938 * linux-aarch64-tdesc.h: New file.
3939
3940 2017-11-24 Yao Qi <yao.qi@linaro.org>
3941
3942 * configure.srv: Set $srv_regobj for tic6x-linux.
3943 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
3944 (tic6x_read_description): Move some code to tic6x_arch_setup.
3945 (tic6x_tdesc_test): New function.
3946 (initialize_low_arch): Call selftests::register_test.
3947
3948 2017-11-22 Yao Qi <yao.qi@linaro.org>
3949
3950 * remote-utils.c (prepare_resume_reply): Use memcpy.
3951
3952 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3953
3954 * linux-low.c (kill_one_lwp_callback): Return void, take
3955 argument directly, don't filter on pid.
3956 (linux_kill): Use for_each_thread.
3957
3958 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3959
3960 * linux-low.c (need_step_over_p): Return bool, remove dummy
3961 argument.
3962 (linux_resume, proceed_all_lwps): Use find_thread.
3963
3964 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3965
3966 * linux-low.c (resume_status_pending_p): Return bool, remove
3967 flag_p argument.
3968 (linux_resume): Use find_thread.
3969
3970 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3971
3972 * linux-low.c (struct thread_resume_array): Remove.
3973 (linux_set_resume_request): Return void, take arguments
3974 directly.
3975 (linux_resume): Use for_each_thread.
3976
3977 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3978
3979 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
3980 return bool, remove data argument.
3981 (linux_stabilize_threads): Use find_thread.
3982
3983 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3984
3985 * linux-low.c (unsuspend_one_lwp): Remove.
3986 (unsuspend_all_lwps): Use for_each_thread, inline code from
3987 unsuspend_one_lwp.
3988
3989 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3990
3991 * gdbthread.h (find_thread): Add overload with ptid_t filter.
3992 * linux-low.c (struct iterate_over_lwps_args): Remove.
3993 (iterate_over_lwps_filter): Remove.
3994 (iterate_over_lwps): Use find_thread.
3995
3996 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3997
3998 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
3999 (linux_handle_new_gdb_connection): Use for_each_thread, inline
4000 code from reset_lwp_ptrace_options_callback.
4001
4002 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
4003
4004 * linux-arm-low.c (struct update_registers_data): Remove.
4005 (update_registers_callback): Return void, take arguments
4006 directly, don't check thread's pid.
4007 (arm_insert_point, arm_remove_point): Use for_each_thread.
4008
4009 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
4010
4011 * win32-low.c (continue_one_thread): Return void, take argument
4012 directly.
4013 (child_continue): Use for_each_thread.
4014
4015 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
4016
4017 * win32-i386-low.c (update_debug_registers_callback): Rename
4018 to ...
4019 (update_debug_registers): ... this, return void, remove pid_p arg.
4020 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
4021
4022 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4023
4024 * inferiors.h (struct process_info): Add constructor, initialize
4025 fields..
4026 <syscalls_to_catch>: Change type to std::vector<int>.
4027 * inferiors.c (add_process): Allocate process_info with new.
4028 (remove_process): Free process_info with delete.
4029 * linux-low.c (handle_extended_wait): Adjust.
4030 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
4031 * server.c (handle_general_set): Adjust.
4032
4033 2017-11-16 Pedro Alves <palves@redhat.com>
4034
4035 * remote-utils.c (remote_close): Block SIGIO signals instead of
4036 uninstalling the SIGIO handler.
4037
4038 2017-11-16 Alan Hayward <alan.hayward@arm.com>
4039
4040 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
4041
4042 2017-11-16 Yao Qi <yao.qi@linaro.org>
4043
4044 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
4045 (tic6x_store_gregset): Likewise.
4046 (tic6x_usrregs_info): Move it up.
4047
4048 2017-11-15 Alan Hayward <alan.hayward@arm.com>
4049
4050 * Makefile.in: Update arch rules.
4051 * configure.srv: Explicitly mark arch/ files.
4052
4053 2017-11-13 Andreas Schwab <schwab@suse.de>
4054
4055 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
4056 function.
4057 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4058
4059 2017-11-06 Pedro Alves <palves@redhat.com>
4060
4061 * config.in, configure: Regenerate.
4062
4063 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
4064
4065 * target.c (struct thread_search): Remove.
4066 (thread_search_callback): Remove.
4067 (prepare_to_access_memory): Use for_each_thread instead of
4068 find_inferior. Inline code from thread_search_callback.
4069
4070 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
4071
4072 * server.c (struct visit_actioned_threads_data): Remove.
4073 (visit_actioned_threads): Change prototype to take arguments
4074 directly.
4075 (resume): Use find_thread instead of find_inferior.
4076
4077 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
4078
4079 * server.c (queue_stop_reply_callback): Change prototype, return
4080 void.
4081 (find_status_pending_thread_callback): Remove.
4082 (handle_status): Replace find_inferior with find_thread and
4083 for_each_thread.
4084
4085 2017-10-25 Alan Hayward <alan.hayward@arm.com>
4086
4087 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
4088 with REGNO.
4089 (aarch64_store_gregset): Likewise.
4090 (aarch64_fill_fpregset): Likewise.
4091 (aarch64_store_fpregset): Likewise.
4092
4093 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
4094
4095 * gdbthread.h (find_thread, for_each_thread): New functions.
4096 * inferiors.c (thread_of_pid): Remove.
4097 (find_any_thread_of_pid): Use find_thread.
4098 * linux-low.c (num_lwps): Use for_each_thread.
4099
4100 2017-10-17 Yao Qi <yao.qi@linaro.org>
4101
4102 * Makefile.in: Remove one rule.
4103 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
4104
4105 2017-10-17 Yao Qi <yao.qi@linaro.org>
4106
4107 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
4108 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
4109
4110 2017-10-17 Yao Qi <yao.qi@linaro.org>
4111
4112 * configure.srv: Rename arm.o with arch/arm.o.
4113
4114 2017-10-17 Yao Qi <yao.qi@linaro.org>
4115
4116 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
4117 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
4118 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
4119 (arch-i386.o, arch-amd64.o): Remove rules.
4120 (arch/%.o): New rule.
4121 Update POSTCOMPILE and COMPILE.pre.
4122 * configure.ac: Invoke AC_CONFIG_COMMANDS.
4123 * configure: Re-generated.
4124 * configure.srv: Replace arch-i386.o with arch/i386.o.
4125 Replace arch-amd64.o with arch/amd64.o.
4126
4127 2017-10-16 Yao Qi <yao.qi@linaro.org>
4128
4129 * configure: Regenerated.
4130
4131 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4132
4133 * inferiors.h: (struct inferior_list): Remove.
4134 (struct inferior_list_entry); Remove.
4135 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
4136 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
4137 get_first_inferior): Remove.
4138 (for_each_inferior, for_each_inferior_with_data, find_inferior,
4139 find_inferior_id, find_inferior_in_random): Change signature.
4140 * inferiors.c (all_threads): Change type to
4141 std::list<thread_info *>.
4142 (get_thread): Remove macro.
4143 (find_inferior, find_inferior_id): Change signature, implement
4144 using find_thread.
4145 (find_inferior_in_random): Change signature, implement using
4146 find_thread_in_random.
4147 (for_each_inferior, for_each_inferior_with_data): Change
4148 signature, implement using for_each_thread.
4149 (add_inferior_to_list, remove_inferior): Remove.
4150 (add_thread, get_first_thread, thread_of_pid,
4151 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
4152 (get_first_inferior, one_inferior_p, clear_inferior_list):
4153 Remove.
4154 (clear_inferiors, get_thread_process): Update.
4155 * gdbthread.h: Include <list>.
4156 (struct thread_info) <entry>: Remove field.
4157 <id>: New field.
4158 (all_threads): Change type to std::list<thread_info *>.
4159 (get_first_inferior): Add doc.
4160 (find_thread, for_each_thread, find_thread_in_random): New
4161 functions.
4162 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
4163 * linux-arm-low.c (update_registers_callback): Update.
4164 * linux-low.c (second_thread_of_pid_p): Update.
4165 (kill_one_lwp_callback, linux_detach_lwp_callback,
4166 delete_lwp_callback, status_pending_p_callback, same_lwp,
4167 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
4168 iterate_over_lwps, not_stopped_callback,
4169 resume_stopped_resumed_lwps, count_events_callback,
4170 select_singlestep_lwp_callback, select_event_lwp_callback,
4171 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
4172 suspend_and_send_sigstop_callback, wait_for_sigstop,
4173 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
4174 lwp_running, linux_set_resume_request, resume_status_pending_p,
4175 need_step_over_p, start_step_over, linux_resume_one_thread,
4176 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
4177 reset_lwp_ptrace_options_callback): Update.
4178 * linux-mips-low.c (update_watch_registers_callback): Update.
4179 * regcache.c (regcache_invalidate_one, regcache_invalidate):
4180 Update.
4181 (free_register_cache_thread_one): Remove.
4182 (regcache_release): Update.
4183 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
4184 handle_qxfer_threads_worker): Update.
4185 (handle_query): Update, use list iterator.
4186 (visit_actioned_threads, handle_pending_status,
4187 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
4188 clear_pending_status_callback, set_pending_status_callback,
4189 find_status_pending_thread_callback, handle_status,
4190 process_serial_event): Update.
4191 * target.c (thread_search_callback): Update.
4192 * thread-db.c (thread_db_get_tls_address): Update.
4193 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
4194 Update.
4195 * win32-i386-low.c (update_debug_registers_callback): Update.
4196 * win32-low.c (delete_thread_info, child_delete_thread,
4197 continue_one_thread, suspend_one_thread,
4198 get_child_debug_event): Adjust.
4199
4200 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4201
4202 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
4203 * inferiors.h: Include <list>.
4204 (struct process_info) <entry>: Remove field.
4205 <pid>: New field.
4206 (pid_of): Change macro to function.
4207 (ptid_of, lwpid_of): Remove macro.
4208 (all_processes): Change type to std::list<process_info *>.
4209 (ALL_PROCESSES): Remove macro.
4210 (for_each_process, find_process): New function.
4211 * inferiors.c (all_processes): Change type to
4212 std::list<process_info *>.
4213 (find_thread_process): Adjust.
4214 (add_process): Likewise.
4215 (remove_process): Likewise.
4216 (find_process_pid): Likewise.
4217 (get_first_process): Likewise.
4218 (started_inferior_callback): Remove.
4219 (have_started_inferiors_p): Adjust.
4220 (attached_inferior_callback): Remove.
4221 (have_attached_inferiors_p): Adjust.
4222 * linux-low.c (check_zombie_leaders): Likewise.
4223 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
4224 (x86_linux_update_xmltarget): Adjust.
4225 * server.c (handle_query): Likewise.
4226 (gdb_reattached_process): Remove.
4227 (handle_status): Adjust.
4228 (kill_inferior_callback): Likewise.
4229 (detach_or_kill_inferior): Remove.
4230 (print_started_pid): Likewise.
4231 (print_attached_pid): Likewise.
4232 (detach_or_kill_for_exit): Update.
4233 (process_serial_event): Likewise.
4234 * linux-arm-low.c (arm_new_fork): Likewise.
4235
4236 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4237
4238 * dll.h: Include <list>.
4239 (struct dll_info): Add constructor.
4240 <entry>: Remove field.
4241 (all_dlls): Change type to std::list<dll_info>.
4242 * dll.c: Include <algorithm>.
4243 (get_dll): Remove macro.
4244 (all_dlls): Change type to std::list<dll_info *>.
4245 (free_one_dll): Remove.
4246 (match_dll): Likewise.
4247 (loaded_dll): Adjust.
4248 (unloaded_dll): Adjust to all_dlls type change, use
4249 std::find_if. Inline code from match_dll.
4250 (clear_dlls): Adjust to all_dlls type change.
4251 * server.c (emit_dll_description): Remove.
4252 (handle_qxfer_libraries): Adjust to all_dlls type change,
4253 integrate emit_dll_description's functionality.
4254
4255 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
4256
4257 * linux-low.h (struct linux_target_ops) <delete_process>: New
4258 field.
4259 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
4260 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
4261 (struct linux_target_ops): Add delete_process callback.
4262 * linux-arm-low.c (arm_delete_process): New.
4263 (struct linux_target_ops): Add delete_process callback.
4264 * linux-bfin-low.c (struct linux_target_ops): Likewise.
4265 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
4266 * linux-m32r-low.c (struct linux_target_ops): Likewise.
4267 * linux-mips-low.c (mips_linux_delete_process): New.
4268 (struct linux_target_ops): Add delete_process callback.
4269 * linux-ppc-low.c (struct linux_target_ops): Likewise.
4270 * linux-s390-low.c (struct linux_target_ops): Likewise.
4271 * linux-sh-low.c (struct linux_target_ops): Likewise.
4272 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
4273 * linux-tile-low.c (struct linux_target_ops): Likewise.
4274 * linux-x86-low.c (x86_linux_delete_process): New.
4275 (struct linux_target_ops): Add delete_process callback.
4276 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
4277
4278 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
4279
4280 * linux-aarch64-low.c (the_low_target): Add thread delete
4281 callback.
4282 * linux-arm-low.c (arm_delete_thread): New function.
4283 (the_low_target): Add thread delete callback.
4284 * linux-bfin-low.c (the_low_target): Likewise.
4285 * linux-crisv32-low.c (the_low_target): Likewise.
4286 * linux-low.c (delete_lwp): Invoke delete_thread callback if
4287 set.
4288 * linux-low.h (struct linux_target_ops) <delete_thread>: New
4289 field.
4290 * linux-m32r-low.c (the_low_target): Add thread delete callback.
4291 * linux-mips-low.c (mips_linux_delete_thread): New function.
4292 (the_low_target): Add thread delete callback.
4293 * linux-ppc-low.c (the_low_target): Likewise.
4294 * linux-s390-low.c (the_low_target): Likewise.
4295 * linux-sh-low.c (the_low_target): Likewise.
4296 * linux-tic6x-low.c (the_low_target): Likewise.
4297 * linux-tile-low.c (the_low_target): Likewise.
4298 * linux-x86-low.c (the_low_target): Likewise.
4299 * linux-xtensa-low.c (the_low_target): Likewise.
4300
4301 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
4302
4303 * win32-low.c: Include "common-inferior.h".
4304
4305 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4306
4307 * inferiors.c (set_inferior_cwd): New function.
4308 * server.c (handle_general_set): Handle QSetWorkingDir packet.
4309 (handle_query): Inform that QSetWorkingDir is supported.
4310 * win32-low.c (create_process): Pass the inferior's cwd to
4311 CreateProcess.
4312
4313 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4314
4315 * inferiors.c (current_inferior_cwd): New global variable.
4316 (get_inferior_cwd): New function.
4317 * inferiors.h (struct process_info) <cwd>: New field.
4318
4319 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4320
4321 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
4322 (OBS): Add gdb_tilde_expand.o.
4323
4324 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
4325
4326 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
4327 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
4328
4329 2017-09-29 Pedro Alves <palves@redhat.com>
4330
4331 * ax.c (gdb_parse_agent_expr): Constify.
4332 * ax.h (gdb_parse_agent_expr): Constify.
4333 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4334 Constify.
4335 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
4336 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
4337 * remote-utils.h (read_ptid): Constify.
4338 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
4339 (process_point_options, process_serial_event): Constify.
4340 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
4341 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
4342 (cmd_qtbuffer): Constify.
4343
4344 2017-09-29 Pedro Alves <palves@redhat.com>
4345
4346 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
4347 fails.
4348
4349 2017-09-29 Pedro Alves <palves@redhat.com>
4350
4351 * linux-low.c (handle_extended_wait): Pass parent thread instead
4352 of process to thread_db_notice_clone.
4353 * linux-low.h (thread_db_notice_clone): Replace parent process
4354 parameter with parent thread parameter.
4355 * thread-db.c (find_one_thread): Add comment.
4356 (thread_db_notice_clone): Replace parent process parameter with
4357 parent thread parameter. Temporarily switch to the parent thread.
4358
4359 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
4360
4361 * gdbthread.h: Include "common-gdbthread.h".
4362 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
4363 "if" when validating the ptid.
4364 * remote-utils.c: Include "gdbthread.h".
4365 (prepare_resume_reply): Use "switch_to_thread".
4366 * target.c (done_accessing_memory): Likewise.
4367
4368 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
4369
4370 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
4371 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
4372 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
4373 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
4374 s390x-gs-linux64-ipa.o to ipa_obj.
4375 * linux-s390-low.c (HWCAP_S390_GS): New define.
4376 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
4377 New functions.
4378 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
4379 (s390_arch_setup): Check for guarded-storage support and choose
4380 appropriate tdesc.
4381 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
4382 init_registers_s390x_gs_linux64.
4383 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
4384 enum value.
4385 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
4386 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
4387
4388 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
4389
4390 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
4391
4392 2017-09-21 Kevin Buettner <kevinb@redhat.com>
4393
4394 * linux-low.h (struct lwp_info): Add new field, thread_handle.
4395 (thread_db_thread_handle): Declare.
4396 * linux-low.c (linux_target_ops): Initialize thread_handle.
4397 * server.c (handle_qxfer_threads_worker): Add support for
4398 "handle" attribute.
4399 * target.h (struct target_ops): Add new function pointer,
4400 thread_handle.
4401 (target_thread_handle): Define.
4402 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
4403 field in lwp.
4404 (thread_db_thread_handle): New function.
4405
4406 2017-09-21 Kevin Buettner <kevinb@redhat.com>
4407
4408 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
4409 * linux-low.h (thread_db_notice_clone): Declare.
4410 * thread-db.c (thread_db_notice_clone): New function.
4411
4412 2017-09-21 Pedro Alves <palves@redhat.com>
4413
4414 * server.c (gdb_read_memory, handle_status, process_serial_event)
4415 (handle_serial_event, handle_target_event): Adjust to
4416 set_desired_thread prototype change.
4417 * target.c (set_desired_thread): Remove 'use_general' parameter
4418 and adjust.
4419 * target.h (set_desired_thread): Remove 'use_general' parameter.
4420
4421 2017-09-20 Tom Tromey <tom@tromey.com>
4422
4423 * target.c (target_terminal::terminal_state): Define.
4424 (target_terminal::init): Rename from target_terminal_init.
4425 (target_terminal::inferior): Rename from
4426 target_terminal_inferior.
4427 (target_terminal::ours): Rename from target_terminal_ours.
4428 (target_terminal::ours_for_output, target_terminal::info): New.
4429
4430 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4431
4432 * server.c (accumulate_file_name_length): Remove.
4433 (emit_dll_description): Adjust to std::string change.
4434 (handle_qxfer_libraries): Use std::string to hold document.
4435
4436 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4437
4438 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
4439 return type of xml_escape_text.
4440 * server.c (emit_dll_description): Likewise.
4441
4442 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4443
4444 * server.c (captured_main): Accept argument for --selftest.
4445 Update run_tests call.
4446 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
4447 when registering selftests.
4448
4449 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
4450
4451 * regcache.c (get_thread_regcache): Update code to use "std::vector"
4452 instead of "VEC" for "target_desc.reg_defs".
4453 (regcache_cpy): Likewise.
4454 (registers_to_string): Likewise.
4455 (registers_from_string): Likewise.
4456 (find_regno): Likewise.
4457 (supply_regblock): Likewise.
4458 (regcache_raw_read_unsigned): Likewise.
4459 * tdesc.c (init_target_desc): Likewise.
4460 (tdesc_create_reg): Likewise.
4461 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
4462 (struct target_desc) <reg_defs>: Convert to "std::vector".
4463 (target_desc): Do not initialize "reg_defs".
4464 (~target_desc): Update code to use "std::vector" instead of "VEC"
4465 for "target_desc.reg_defs".
4466 (operator==): Likewise.
4467
4468 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4469
4470 * inferiors.h (thread_to_gdb_id): Remove.
4471 * inferiors.c (thread_to_gdb_id): Remove.
4472 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
4473 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
4474 lynx_store_registers, lynx_read_memory, lynx_write_memory):
4475 Likewise.
4476 * nto-low.c (nto_fetch_registers, nto_store_registers,
4477 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
4478
4479 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4480
4481 * inferiors.h (gdb_id_to_thread_id): Remove.
4482 * inferiors.c (gdb_id_to_thread_id): Remove.
4483 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
4484 removal. Move pid declaration closer to where it's used.
4485
4486 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4487
4488 * server.c (handle_detach): New function.
4489 (process_serial_event): Move code out, call handle_detach.
4490
4491 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4492
4493 * server.c (require_running): Rename to ...
4494 (require_running_or_return): ... this ...
4495 (require_running_or_break): ... and this.
4496 (handle_query, process_serial_event): Adjust.
4497
4498 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4499
4500 * linux-low.c (linux_set_resume_request): Remove unused
4501 variables.
4502
4503 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4504
4505 * server.c (first_thread_of): Remove.
4506 (process_serial_event): Replace usage of first_thread_of with
4507 find_any_thread_of_pid.
4508 * tracepoint.c (same_process_p): Remove.
4509 (gdb_agent_about_to_close): Replace usage of same_process_p with
4510 find_any_thread_of_pid.
4511 * linux-x86-low.c (same_process_callback): Remove.
4512 (x86_arch_setup_process_callback): Replace usage of
4513 same_process_callback with find_any_thread_of_pid.
4514 * thread-db.c (any_thread_of): Remove.
4515 (switch_to_process): Replace usage of any_thread_of with
4516 find_any_thread_of_pid.
4517 * inferiors.c (thread_pid_matches_callback): Remove.
4518 (find_thread_process): Adjust to use find_any_thread_of_pid.
4519
4520 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
4521
4522 * regcache.c (get_thread_regcache): Guard calls to "memset"
4523 with "!VEC_empty".
4524
4525 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
4526
4527 * linux-low.c (handle_extended_wait): Use
4528 "allocate_target_description" instead of "XNEW".
4529 * linux-x86-low.c (initialize_low_arch): Likewise.
4530
4531 2017-09-05 Yao Qi <yao.qi@linaro.org>
4532
4533 * configure.srv (srv_i386_regobj): Remove.
4534 (srv_amd64_regobj): Remove.
4535 (srv_regobj): Set it to "" for x86 non-linux targets.
4536 * linux-x86-tdesc.c (i386_linux_read_description):
4537 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
4538 (init_registers_i386): Remove the declaration.
4539 (tdesc_i386): Remove the declaration.
4540 (lynx_i386_arch_setup): Call i386_create_target_description.
4541 * nto-x86-low.c: Likewise.
4542 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
4543 [!__x86_64__]: include arch/i386.h.
4544 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
4545
4546 2017-09-05 Yao Qi <yao.qi@linaro.org>
4547
4548 * configure.srv (srv_amd64_linux_xmlfiles): Remove
4549 i386/amd64-XXX-linux from it.
4550
4551 2017-09-05 Yao Qi <yao.qi@linaro.org>
4552
4553 * configure.srv: Empty srv_amd64_linux_regobj if $development is
4554 false.
4555 (ipa_amd64_linux_regobj): Remove.
4556 (ipa_x32_linux_regobj): Remove.
4557
4558 2017-09-05 Yao Qi <yao.qi@linaro.org>
4559
4560 * Makefile.in (arch-amd64.o): New rule.
4561 * configure.srv: Append arch-amd64.o.
4562 * linux-amd64-ipa.c: Include common/x86-xstate.h.
4563 (get_ipa_tdesc): Call amd64_linux_read_description.
4564 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
4565 and init_registers_amd64_XXX.
4566 * linux-x86-low.c (x86_linux_read_description): Call
4567 amd64_linux_read_description.
4568 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
4569 (initialize_low_arch): Don't call init_registers_x32_XXX and
4570 init_registers_amd64_XXX.
4571 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
4572 and tdesc_amd64_XXX.
4573 [__x86_64__] (amd64_tdesc_test): New function.
4574 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
4575 and init_registers_amd64_XXX.
4576 * linux-x86-tdesc.c: Include arch/amd64.h.
4577 (xcr0_to_tdesc_idx): New function.
4578 (i386_linux_read_description): New function.
4579 (amd64_get_ipa_tdesc_idx): New function.
4580 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
4581 (amd64_get_ipa_tdesc): Declare.
4582
4583 2017-09-05 Yao Qi <yao.qi@linaro.org>
4584
4585 * configure.srv (srv_i386_linux_xmlfiles): Remove
4586 i386/i386-XXX-linux.xml from it.
4587
4588 2017-09-05 Yao Qi <yao.qi@linaro.org>
4589
4590 * configure.srv: Set srv_i386_linux_regobj empty if $development
4591 is false.
4592 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
4593 initialize_low_tdesc.
4594 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
4595 with #if initialize_low_tdesc.
4596 * linux-x86-tdesc-selftest.c: New file.
4597 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
4598
4599 2017-09-05 Yao Qi <yao.qi@linaro.org>
4600
4601 * Makefile.in (arch-i386.o): New rule.
4602 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
4603 (x86_64-*-linux*): Likewise.
4604 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
4605 include arch/i386.h.
4606 (i386_linux_read_description): Remove code and call
4607 i386_create_target_description.
4608 * tdesc.c (allocate_target_description): New function.
4609 * tdesc.h (set_tdesc_architecture): Remove declaration.
4610 (set_tdesc_osabi): Likewise.
4611
4612 2017-09-05 Yao Qi <yao.qi@linaro.org>
4613
4614 * linux-x86-tdesc.c: Don't include <inttypes.h>.
4615 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
4616 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
4617 .xmltarget.
4618 * server.c (get_features_xml): Call tdesc_get_features_xml.
4619 * tdesc.c (set_tdesc_architecture): New function.
4620 (set_tdesc_osabi): New function.
4621 (tdesc_get_features_xml): New function.
4622 (tdesc_create_feature): Add an argument.
4623 * tdesc.h (struct target_desc) <features>: New field.
4624 <arch, osabi>: New field.
4625 (~target_desc): xfree features, arch, and osabi.
4626 (target_desc::oerator==): Don't compare .xmltarget.
4627 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
4628 (set_tdesc_osabi): Likewise.
4629 (tdesc_get_features_xml): Likewise.
4630
4631 2017-09-05 Yao Qi <yao.qi@linaro.org>
4632
4633 * linux-x86-tdesc.c: Include selftest.h.
4634 (i386_tdesc_test): New function.
4635 (initialize_low_tdesc): Call selftests::register_test.
4636 * tdesc.h: Include regdef.h.
4637 (target_desc): Override operator == and !=.
4638
4639 2017-09-05 Yao Qi <yao.qi@linaro.org>
4640
4641 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
4642 (ipa_obj): Likewise.
4643 * linux-i386-ipa.c: Include common/x86-xstate.h
4644 (get_ipa_tdesc): Call i386_linux_read_description.
4645 (initialize_low_tracepoint): Don't call init_registers_XXX
4646 functions, call initialize_low_tdesc instead.
4647 * linux-x86-low.c (x86_linux_read_description): Call
4648 i386_linux_read_description.
4649 (initialize_low_arch): Don't call init_registers_i386_XXX
4650 functions, call initialize_low_tdesc.
4651 * linux-x86-tdesc.c: New file.
4652 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
4653 (i386_get_ipa_tdesc_idx): Declare.
4654 (i386_get_ipa_tdesc): Declare.
4655 (initialize_low_tdesc): Declare.
4656
4657 2017-09-05 Yao Qi <yao.qi@linaro.org>
4658
4659 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
4660 instead of 0.
4661
4662 2017-09-05 Yao Qi <yao.qi@linaro.org>
4663
4664 * Makefile.in (IPA_OBJS): Add vec-ipa.o
4665 * regcache.c (get_thread_regcache): Use VEC_length.
4666 (init_register_cache): Likewise.
4667 (regcache_cpy): Likewise.
4668 (registers_to_string): Iterate reg_defs via VEC_iterate.
4669 (find_regno): Likewise.
4670 (find_register_by_number): Use VEC_index.
4671 (register_size): Call find_register_by_number.
4672 (register_data): Call find_register_by_number.
4673 (supply_regblock): Use VEC_length.
4674 (regcache_raw_read_unsigned): Likewise.
4675 * tdesc.c (init_target_desc): Iterate reg_defs via
4676 VEC_iterate.
4677 (default_description): Update initializer.
4678 (copy_target_description): Don't update field num_registers.
4679 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
4680 <num_registers>: Remove.
4681
4682 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
4683
4684 * Makefile.in (.SECONDARY): Define target.
4685
4686 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
4687
4688 * linux-low.c (linux_wait_1): Adjust.
4689 * server.c (queue_stop_reply_callback): Adjust.
4690
4691 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
4692
4693 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
4694 QEnvironmentUnset and QEnvironmentReset packets.
4695 (handle_query): Inform remote that QEnvironmentHexEncoded,
4696 QEnvironmentUnset and QEnvironmentReset are supported.
4697
4698 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
4699
4700 * inferiors.h (inferior_target_data): Rename to ...
4701 (thread_target_data): ... this.
4702 (inferior_regcache_data): Rename to ...
4703 (thread_regcache_data): ... this.
4704 (set_inferior_regcache_data): Rename to ...
4705 (set_thread_regcache_data): ... this.
4706 * inferiors.c (inferior_target_data): Rename to ...
4707 (thread_target_data): ... this.
4708 (inferior_regcache_data): Rename to ...
4709 (thread_regcache_data): ... this.
4710 (set_inferior_regcache_data): Rename to ...
4711 (set_thread_regcache_data): ... this.
4712 (free_one_thread): Update.
4713 * linux-low.h (get_thread_lwp): Update.
4714 * regcache.c (get_thread_regcache): Update.
4715 (regcache_invalidate_thread): Update.
4716 (free_register_cache_thread): Update.
4717 * win32-i386-low.c (update_debug_registers_callback): Update.
4718 (win32_get_current_dr): Update.
4719 * win32-low.c (thread_rec): Update.
4720 (delete_thread_info): Update.
4721 (continue_one_thread): Update.
4722 (suspend_one_thread): Update.
4723
4724 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
4725
4726 * inferiors.c (set_inferior_target_data): Remove.
4727 * inferiors.h (set_inferior_target_data): Remove.
4728
4729 2017-08-18 Yao Qi <yao.qi@linaro.org>
4730
4731 * Makefile.in (OBS): Add selftest.o.
4732 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
4733 * configure, config.in: Re-generated.
4734 * server.c: Include common/sefltest.h.
4735 (captured_main): Handle option --selftest.
4736
4737 2017-08-09 Yao Qi <yao.qi@linaro.org>
4738
4739 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
4740 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
4741 i386-avx-mpx.o and i386-mmx.o.
4742 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
4743 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
4744 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
4745 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
4746 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
4747 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
4748 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
4749 i386/amd64-avx-mpx.xml.
4750
4751 2017-08-09 Yao Qi <yao.qi@linaro.org>
4752
4753 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
4754 and x32-avx-avx512.o.
4755 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
4756 i386/x32-avx-avx512.xml.
4757
4758 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
4759
4760 * tracepoint.h (enum class fast_tpoint_collect_result): New
4761 enumeration.
4762 (fast_tracepoint_collecting): Change return type to
4763 fast_tpoint_collect_result.
4764 * tracepoint.c (fast_tracepoint_collecting): Likewise.
4765 * linux-low.h: Include tracepoint.h.
4766 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
4767 fast_tpoint_collect_result.
4768 * linux-low.c (handle_tracepoints): Adjust.
4769 (linux_fast_tracepoint_collecting): Change return type to
4770 fast_tpoint_collect_result.
4771 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
4772 linux_wait_1, stuck_in_jump_pad_callback,
4773 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
4774 proceed_one_lwp): Adjust to type change.
4775
4776 2017-07-10 Yao Qi <yao.qi@linaro.org>
4777
4778 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
4779
4780 2017-06-29 Yao Qi <yao.qi@linaro.org>
4781
4782 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
4783 Remove.
4784 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
4785
4786 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
4787
4788 * Makefile.in (IPA_OBJS): Sort and format one item per line.
4789
4790 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
4791
4792 * linux-low.c (linux_create_inferior): Adjust code to access the
4793 environment information via 'gdb_environ' class.
4794 * lynx-low.c (lynx_create_inferior): Likewise.
4795 * server.c (our_environ): Make it an instance of 'gdb_environ'.
4796 (get_environ): Return a pointer to 'our_environ'.
4797 (captured_main): Initialize 'our_environ'.
4798 * server.h (get_environ): Adjust prototype.
4799 * spu-low.c (spu_create_inferior): Adjust code to access the
4800 environment information via 'gdb_environ' class.
4801
4802 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4803
4804 * linux-low.c (linux_read_memory, linux_write_memory): Remove
4805 usage of "register" keyword.
4806
4807 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4808
4809 * configure: Re-generate.
4810
4811 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4812
4813 * configure: Re-generate.
4814
4815 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4816
4817 * Makefile.in (COMPILE.pre): Add "-x c++".
4818
4819 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
4820
4821 * fork-child.c: Conditionally include <signal.h>.
4822
4823 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4824
4825 * server.c (handle_general_set): Handle new packet
4826 "QStartupWithShell".
4827 (handle_query): Add "QStartupWithShell" to the list of supported
4828 packets.
4829 (gdbserver_usage): Add help text explaining the
4830 new "--startup-with-shell" and "--no-startup-with-shell" CLI
4831 options.
4832 (captured_main): Recognize and act upon the presence of the new
4833 CLI options.
4834
4835 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4836 Pedro Alves <palves@redhat.com>
4837
4838 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
4839 * configure: Regenerate.
4840 * configure.srv (srv_linux_obj): Add "fork-child.o" and
4841 "fork-inferior.o".
4842 (i[34567]86-*-lynxos*): Likewise.
4843 (spu*-*-*): Likewise.
4844 * fork-child.c: New file.
4845 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
4846 and "environ.h".
4847 (linux_ptrace_fun): New function.
4848 (linux_create_inferior): Adjust function prototype to reflect
4849 change on "target.h". Adjust function code to use
4850 "fork_inferior".
4851 (linux_request_interrupt): Delete "signal_pid".
4852 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
4853 (lynx_ptrace_fun): New function.
4854 (lynx_create_inferior): Adjust function prototype to reflect
4855 change on "target.h". Adjust function code to use
4856 "fork_inferior".
4857 * nto-low.c (nto_create_inferior): Adjust function prototype and
4858 code to reflect change on "target.h". Update comments.
4859 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
4860 "common-terminal.h" and "environ.h".
4861 (terminal_fd): Moved to fork-child.c.
4862 (old_foreground_pgrp): Likewise.
4863 (restore_old_foreground_pgrp): Likewise.
4864 (last_status): Make it global.
4865 (last_ptid): Likewise.
4866 (our_environ): New variable.
4867 (startup_with_shell): Likewise.
4868 (program_name): Likewise.
4869 (program_argv): Rename to...
4870 (program_args): ...this.
4871 (wrapper_argv): New variable.
4872 (start_inferior): Delete function.
4873 (get_exec_wrapper): New function.
4874 (get_exec_file): Likewise.
4875 (get_environ): Likewise.
4876 (prefork_hook): Likewise.
4877 (post_fork_inferior): Likewise.
4878 (postfork_hook): Likewise.
4879 (postfork_child_hook): Likewise.
4880 (handle_v_run): Update code to deal with arguments coming from the
4881 remote host. Update calls from "start_inferior" to
4882 "create_inferior".
4883 (captured_main): Likewise. Initialize environment variable. Call
4884 "have_job_control".
4885 * server.h (post_fork_inferior): New prototype.
4886 (get_environ): Likewise.
4887 (last_status): Declare.
4888 (last_ptid): Likewise.
4889 (signal_pid): Likewise.
4890 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
4891 (spu_ptrace_fun): New function.
4892 (spu_create_inferior): Adjust function prototype to reflect change
4893 on "target.h". Adjust function code to use "fork_inferior".
4894 * target.c (target_terminal_init): New function.
4895 (target_terminal_inferior): Likewise.
4896 (target_terminal_ours): Likewise.
4897 * target.h: Include <vector>.
4898 (struct target_ops) <create_inferior>: Update prototype.
4899 (create_inferior): Update macro.
4900 * utils.c (gdb_flush_out_err): New function.
4901 * win32-low.c (win32_create_inferior): Adjust function prototype
4902 and code to reflect change on "target.h".
4903
4904 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4905
4906 * inferiors.c (switch_to_thread): New function.
4907
4908 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4909
4910 * Makefile.in (SFILE): Add "common/job-control.c".
4911 (OBS): Add "job-control.o".
4912
4913 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
4914
4915 * Makefile: Remove "@host_makefile_frag@".
4916
4917 2017-05-05 Pedro Alves <palves@redhat.com>
4918
4919 * configure: Regenerate.
4920
4921 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
4922
4923 * configure: Regenerate.
4924
4925 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
4926
4927 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
4928 software_single_step change of return type to
4929 std::vector<CORE_ADDR>.
4930 * linux-low.c (install_software_single_step_breakpoints):
4931 Likewise.
4932 * linux-low.h (install_software_single_step_breakpoints):
4933 Likewise.
4934
4935 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
4936
4937 * remote-utils.c: Include "gdb_termios.h" instead of
4938 "terminal.h".
4939 * terminal.h: Delete file.
4940
4941 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
4942
4943 * server.c: Include <vector>.
4944 <program_argv, wrapper_argv>: Convert to std::vector.
4945 (start_inferior): Rewrite function to use C++.
4946 (handle_v_run): Likewise. Update code that calculates the argv
4947 based on the vRun packet; use C++.
4948 (captured_main): Likewise.
4949
4950 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
4951
4952 * server.c (handle_v_cont): Initialize thread_resume::thread
4953 with null_ptid.
4954
4955 2017-04-05 Pedro Alves <palves@redhat.com>
4956
4957 * configure: Regenerate.
4958
4959 2017-04-05 Pedro Alves <palves@redhat.com>
4960
4961 * gdbreplay.c (sync_error): Constify.
4962 * linux-x86-low.c (push_opcode): Constify.
4963
4964 2017-04-05 Pedro Alves <palves@redhat.com>
4965
4966 * win32-low.c (get_child_debug_event)
4967 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
4968 Report TARGET_WAITKIND_SPURIOUS instead.
4969
4970 2017-04-05 Pedro Alves <palves@redhat.com>
4971
4972 * remote-utils.c (remote_prepare, remote_open): Constify.
4973 * remote-utils.h (remote_prepare, remote_open): Constify.
4974 * server.c (captured_main): Constify 'port' handling.
4975
4976 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
4977
4978 * Makefile.in (clean): Clear .deps.
4979
4980 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
4981
4982 * .gitignore: Remove generated files, replace with wildcard.
4983 * (clean): Replace removal of generated files with wildcard.
4984 (version.c): Replace with...
4985 (version-generated.c): ...this.
4986 (xml-builtin.c): Replace with...
4987 (xml-builtin-generated.c): ...this.
4988 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
4989 (%.c: *regformats*): Replace with...
4990 (%-generated.c: *regformats*): ...this.
4991
4992 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
4993
4994 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
4995 (xtensa_fill_gregset): Call collect_register_by_name for
4996 threadptr register.
4997 (xtensa_store_gregset): Call supply_register_by_name for
4998 threadptr register.
4999
5000 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
5001
5002 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
5003 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
5004 (xtensa_store_gregset): Call supply_register for all registers in
5005 a0_regnum..a0_regnum + C0_NREGS range.
5006
5007 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
5008
5009 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
5010 (ax-ipa.o: ax.c): Remove.
5011 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
5012 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
5013 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
5014 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
5015 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
5016
5017 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
5018
5019 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
5020 (print-utils-ipa.o: ../common/print-utils.c): Remove.
5021 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
5022 (errors-ipa.o: ../common/errors.c): Remove.
5023 (format-ipa.o: ../common/format.c): Remove.
5024 (common-utils-ipa.o: ../common/common-utils.c): Remove.
5025
5026 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
5027
5028 * Makefile.in (%-ipa.o: %.c): New rule.
5029 (tracepoint-ipa.o: tracepoint.c): Remove.
5030 (utils-ipa.o: utils.c): Remove.
5031 (remote-utils-ipa.o: remote-utils.c): Remove.
5032 (regcache-ipa.o: regcache.c): Remove.
5033 (i386-linux-ipa.o: i386-linux.c): Remove.
5034 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
5035 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
5036 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
5037 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
5038 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
5039 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
5040 (amd64-linux-ipa.o: amd64-linux.c): Remove.
5041 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
5042 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
5043 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
5044 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
5045 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
5046 (aarch64-ipa.o: aarch64.c): Remove.
5047 (s390-linux32-ipa.o: s390-linux32.c): Remove.
5048 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
5049 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
5050 (s390-linux64-ipa.o: s390-linux64.c): Remove.
5051 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
5052 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
5053 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
5054 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
5055 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
5056 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
5057 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
5058 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
5059 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
5060 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
5061 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
5062 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
5063 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
5064 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
5065 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
5066 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
5067 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
5068 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
5069 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
5070 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
5071 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
5072 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
5073 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
5074 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
5075 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
5076 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
5077 (tdesc-ipa.o: tdesc.c): Remove.
5078 (x32-linux-ipa.o: x32-linux.c): Remove.
5079 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
5080 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
5081
5082 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
5083
5084 * Makefile.in (%.o: ../arch/%.c): New rule.
5085 (arm.o: ../arch/arm.c): Remove.
5086 (arm-linux.o: ../arch/arm-linux.c): Remove.
5087 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
5088 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
5089
5090 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
5091
5092 * Makefile.in (%.o: ../nat/%.c): New rule.
5093 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
5094 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
5095 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
5096 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
5097 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
5098 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
5099 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
5100 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
5101 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
5102 (linux-personality.o: ../nat/linux-personality.c): Remove.
5103 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
5104 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
5105 (x86-linux.o: ../nat/x86-linux.c): Remove.
5106 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
5107 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
5108
5109 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
5110
5111 * Makefile.in (%.o: ../common/%.c): New rule.
5112 (signals.o: ../common/signals.c): Remove.
5113 (print-utils.o: ../common/print-utils.c): Remove.
5114 (rsp-low.o: ../common/rsp-low.c): Remove.
5115 (common-utils.o: ../common/common-utils.c): Remove.
5116 (posix-strerror.o: ../common/posix-strerror.c): Remove.
5117 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
5118 (vec.o: ../common/vec.c): Remove.
5119 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
5120 (xml-utils.o: ../common/xml-utils.c): Remove.
5121 (ptid.o: ../common/ptid.c): Remove.
5122 (buffer.o: ../common/buffer.c): Remove.
5123 (format.o: ../common/format.c): Remove.
5124 (filestuff.o: ../common/filestuff.c): Remove.
5125 (agent.o: ../common/agent.c): Remove.
5126 (errors.o: ../common/errors.c): Remove.
5127 (environ.o: ../common/environ.c): Remove.
5128 (common-debug.o: ../common/common-debug.c): Remove.
5129 (cleanups.o: ../common/cleanups.c): Remove.
5130 (common-exceptions.o: ../common/common-exceptions.c): Remove.
5131 (fileio.o: ../common/fileio.c): Remove.
5132 (common-regcache.o: ../common/common-regcache.c): Remove.
5133 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
5134 (new-op.o: ../common/new-op.c): Remove.
5135 (btrace-common.o: ../common/btrace-common.c): Remove.
5136
5137 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
5138
5139 * Makefile.in (%.o: ../target/%.c): New rule.
5140 (waitstatus.o: ../target/waitstatus.c): Remove.
5141
5142 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
5143
5144 * Makefile.in
5145 (%.c: ../regformats/%.dat,
5146 (%.c: ../regformats/arm/%.dat,
5147 (%.c: ../regformats/i386/%.dat,
5148 (%.c: ../regformats/rs6000/%.dat): New rules.
5149 (aarch64.c): Remove.
5150 (reg-arm.c): Remove.
5151 (arm-with-iwmmxt.c): Remove.
5152 (arm-with-vfpv2.c): Remove.
5153 (arm-with-vfpv3.c): Remove.
5154 (arm-with-neon.c): Remove.
5155 (reg-bfin.c): Remove.
5156 (reg-cris.c): Remove.
5157 (reg-crisv32.c): Remove.
5158 (i386.c): Remove.
5159 (i386-linux.c): Remove.
5160 (i386-avx.c): Remove.
5161 (i386-avx-linux.c): Remove.
5162 (i386-avx-avx512.c): Remove.
5163 (i386-avx-avx512-linux.c): Remove.
5164 (i386-mpx.c): Remove.
5165 (i386-mpx-linux.c): Remove.
5166 (i386-avx-mpx-avx512-pku.c): Remove.
5167 (i386-avx-mpx-avx512-pku-linux.c): Remove.
5168 (i386-avx-mpx.c): Remove.
5169 (i386-avx-mpx-linux.c): Remove.
5170 (i386-mmx.c): Remove.
5171 (i386-mmx-linux.c): Remove.
5172 (reg-ia64.c): Remove.
5173 (reg-m32r.c): Remove.
5174 (reg-m68k.c): Remove.
5175 (reg-cf.c): Remove.
5176 (mips-linux.c): Remove.
5177 (mips-dsp-linux.c): Remove.
5178 (mips64-linux.c): Remove.
5179 (mips64-dsp-linux.c): Remove.
5180 (nios2-linux.c): Remove.
5181 (powerpc-32.c): Remove.
5182 (powerpc-32l.c): Remove.
5183 (powerpc-altivec32l.c): Remove.
5184 (powerpc-cell32l.c): Remove.
5185 (powerpc-vsx32l.c): Remove.
5186 (powerpc-isa205-32l.c): Remove.
5187 (powerpc-isa205-altivec32l.c): Remove.
5188 (powerpc-isa205-vsx32l.c): Remove.
5189 (powerpc-e500l.c): Remove.
5190 (powerpc-64l.c): Remove.
5191 (powerpc-altivec64l.c): Remove.
5192 (powerpc-cell64l.c): Remove.
5193 (powerpc-vsx64l.c): Remove.
5194 (powerpc-isa205-64l.c): Remove.
5195 (powerpc-isa205-altivec64l.c): Remove.
5196 (powerpc-isa205-vsx64l.c): Remove.
5197 (s390-linux32.c): Remove.
5198 (s390-linux32v1.c): Remove.
5199 (s390-linux32v2.c): Remove.
5200 (s390-linux64.c): Remove.
5201 (s390-linux64v1.c): Remove.
5202 (s390-linux64v2.c): Remove.
5203 (s390-te-linux64.c): Remove.
5204 (s390-vx-linux64.c): Remove.
5205 (s390-tevx-linux64.c): Remove.
5206 (s390x-linux64.c): Remove.
5207 (s390x-linux64v1.c): Remove.
5208 (s390x-linux64v2.c): Remove.
5209 (s390x-te-linux64.c): Remove.
5210 (s390x-vx-linux64.c): Remove.
5211 (s390x-tevx-linux64.c): Remove.
5212 (tic6x-c64xp-linux.c): Remove.
5213 (tic6x-c64x-linux.c): Remove.
5214 (tic6x-c62x-linux.c): Remove.
5215 (reg-sh.c): Remove.
5216 (reg-sparc64.c): Remove.
5217 (reg-spu.c): Remove.
5218 (amd64.c): Remove.
5219 (amd64-linux.c): Remove.
5220 (amd64-avx.c): Remove.
5221 (amd64-avx-linux.c): Remove.
5222 (amd64-avx-avx512.c): Remove.
5223 (amd64-avx-avx512-linux.c): Remove.
5224 (amd64-mpx.c): Remove.
5225 (amd64-mpx-linux.c): Remove.
5226 (amd64-avx-mpx-avx512-pku.c): Remove.
5227 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
5228 (amd64-avx-mpx.c): Remove.
5229 (amd64-avx-mpx-linux.c): Remove.
5230 (x32.c): Remove.
5231 (x32-linux.c): Remove.
5232 (x32-avx.c): Remove.
5233 (x32-avx-linux.c): Remove.
5234 (x32-avx-avx512.c): Remove.
5235 (x32-avx-avx512-linux.c): Remove.
5236 (reg-xtensa.c): Remove.
5237 (reg-tilegx.c): Remove.
5238 (reg-tilegx32.c): Remove.
5239
5240 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
5241
5242 * Makefile.in (SFILES): Add "common/environ.c".
5243 (OBJS): Add "common/environ.h".
5244
5245 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
5246
5247 * configure.ac: Check if the fs_base and gs_base members of
5248 `struct user_regs_struct' exist.
5249 * config.in: Regenerated.
5250 * configure: Likewise.
5251
5252 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
5253
5254 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
5255 target_read_memory.
5256 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
5257 (get_next_pcs_syscall_next_pc): Likewise.
5258
5259 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
5260
5261 * win32-i386-low.c: Fix incorrect reference to a couple source files.
5262 * nto-x86-low.c: Likewise.
5263
5264 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
5265
5266 * Makefile.in: Include disable-implicit-rules.mk.
5267
5268 2016-11-23 Pedro Alves <palves@redhat.com>
5269
5270 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
5271 (debug_vprintf): Use std::chrono::steady_clock instead of
5272 gettimeofday. Use '.' instead of ':'.
5273 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
5274 (get_timestamp): Use std::chrono::steady_clock instead of
5275 gettimeofday.
5276
5277 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
5278
5279 * Makefile.in: Fix whitespace formatting.
5280
5281 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
5282
5283 * Makefile.in (SFILES, OBS): Flatten list and order
5284 alphabetically.
5285
5286 2016-11-23 Pedro Alves <palves@redhat.com>
5287
5288 * event-loop.c (handle_file_event): Use warning.
5289 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
5290 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5291 Use warning.
5292
5293 2016-11-23 Pedro Alves <palves@redhat.com>
5294
5295 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
5296 output.
5297 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
5298 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
5299 debug_printf and debug_flush for debug output.
5300 * server.c (handle_general_set): Likewise.
5301 * thread-db.c (try_thread_db_load): Use debug_printf for debug
5302 output.
5303
5304 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
5305
5306 * Makefile.in (.c.o): Replace rule with ...
5307 (%.o: %.c): ... this one.
5308
5309 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
5310
5311 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
5312 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
5313 make.
5314 * configure.ac: Remove checks for the make program.
5315 * configure: Re-generate.
5316
5317 2016-10-28 Pedro Alves <palves@redhat.com>
5318
5319 * Makefile.in (CXX_DIALECT): Get from configure.
5320 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
5321 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
5322 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
5323 * config.in: Regenerate.
5324 * configure: Regenerate.
5325
5326 2016-10-27 Yao Qi <yao.qi@linaro.org>
5327
5328 * linux-low.c (linux_supports_range_stepping): Return true if
5329 can_software_single_step return true.
5330
5331 2016-10-27 Yao Qi <yao.qi@linaro.org>
5332
5333 * inferiors.c (find_inferior_in_random): New function.
5334 * inferiors.h (find_inferior_in_random): Declare.
5335 * linux-low.c (linux_wait_for_event_filtered): Call
5336 find_inferior_in_random instead of find_inferior.
5337
5338 2016-10-27 Yao Qi <yao.qi@linaro.org>
5339
5340 * linux-low.c (linux_wait_1): If single-step breakpoints are
5341 inserted, remove them.
5342
5343 2016-10-26 Pedro Alves <palves@redhat.com>
5344
5345 * linux-low.c (handle_extended_wait): Link parent/child fork
5346 threads.
5347 (linux_wait_1): Unlink them.
5348 (linux_set_resume_request): Ignore resume requests for
5349 already-resumed and unhandled fork child threads.
5350 * linux-low.h (struct lwp_info) <fork_relative>: New field.
5351 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
5352 New functions.
5353 (handle_v_requests) <vCont>: Don't call require_running.
5354 * server.h (in_queued_stop_replies): New declaration.
5355
5356 2016-10-24 Yao Qi <yao.qi@linaro.org>
5357
5358 PR server/20733
5359 * linux-aarch64-low.c (append_insns): Cast the return value to
5360 'uint32_t *'.
5361
5362 2016-10-10 Yao Qi <yao.qi@linaro.org>
5363
5364 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
5365
5366 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
5367
5368 * target.c (target_supports_multi_process): New function, moved
5369 from...
5370 * target.h (target_supports_multi_process): ... here. Remove
5371 macro.
5372
5373 2016-10-05 Tom Tromey <tom@tromey.com>
5374
5375 PR remote/20655:
5376 * tracepoint.c (handle_tracepoint_bkpts): Check
5377 ipa_error_tracepoint, not ipa_stopping_tracepoint.
5378
5379 2016-10-05 Yao Qi <yao.qi@linaro.org>
5380
5381 * configure.srv: Update the path of arm-*.xml files.
5382
5383 2016-10-05 Terry Guo <terry.guo@arm.com>
5384 Yao Qi <yao.qi@linaro.org>
5385
5386 * Makefile.in: Adjust the path of rules.
5387 * configure.srv: Update the path of xml files.
5388 * regformats/arm-with-iwmmxt.dat: Regenerated.
5389 * regformats/arm-with-neon.dat: Likewise.
5390 * regformats/arm-with-vfpv2.dat: Likewise.
5391 * regformats/arm-with-vfpv3.dat Likewise.
5392
5393 2016-09-30 Yao Qi <yao.qi@linaro.org>
5394
5395 PR gdbserver/20627
5396 * target.c (target_stop_and_wait): Don't call
5397 target_continue_no_signal, use resume_stop instead.
5398
5399 2016-09-26 Yao Qi <yao.qi@linaro.org>
5400
5401 * linux-low.c (linux_wait_1): Call debug_exit.
5402
5403 2016-09-23 Pedro Alves <palves@redhat.com>
5404
5405 * Makefile.in (SFILES): Add common/new-op.c.
5406 (OBS): Add common/new-op.o.
5407 (new-op.o): New rule.
5408
5409 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
5410
5411 * .gitinore: Ignore more files.
5412
5413 2016-09-21 Yao Qi <yao.qi@linaro.org>
5414
5415 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
5416 23.
5417
5418 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
5419
5420 * server.c (start_inferior): Call target_mourn_inferior instead of
5421 mourn_inferior; pass ptid_t argument to it.
5422 (resume): Likewise.
5423 (handle_target_event): Likewise.
5424 * target.c (target_mourn_inferior): New function.
5425 * target.h (mourn_inferior): Delete macro.
5426
5427 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
5428
5429 * linux-low.c (lwp_is_stepping): New function.
5430
5431 2016-09-06 Carl Love <cel@us.ibm.com>
5432
5433 * server.c (start_inferior): Fixed comment, requested comment change
5434 didn't get updated correctly. Removed reference to ptrace () call as
5435 it is only true on Linux systems.
5436
5437 2016-09-06 Carl Love <cel@us.ibm.com>
5438
5439 * server.c (start_inferior): Do not call
5440 function target_post_create_inferior () if the
5441 inferior process has already exited.
5442
5443 2016-09-05 Pedro Alves <palves@redhat.com>
5444
5445 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
5446 (COMPILE.pre, CC_LD): Use CXX directly.
5447 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
5448 * acinclude.m4: Don't include build-with-cxx.m4.
5449 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
5450 * configure: Regenerate.
5451
5452 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
5453
5454 PR gdb/19495
5455 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
5456 call writing data to own_buf.
5457
5458 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
5459
5460 * target.c (mywait): Call target_wait instead of
5461 the_target->wait.
5462 (target_wait): New function.
5463
5464 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
5465
5466 * server.c (start_inferior): New variable 'ptid'. Replace calls
5467 to the_target->resume by target_continue{,_no_signal}, depending
5468 on the case.
5469 * target.c (target_stop_and_wait): Call target_continue_no_signal
5470 instead of the_target->resume.
5471 (target_continue): New function.
5472
5473 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
5474
5475 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
5476
5477 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
5478
5479 PR server/20491
5480 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
5481 ps_prochandle.
5482 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
5483 * linux-arm-low.c (ps_get_thread_area): Likewise.
5484 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
5485 * linux-m68k-low.c (ps_get_thread_area): Likewise.
5486 * linux-mips-low.c (ps_get_thread_area): Likewise.
5487 * linux-nios2-low.c (ps_get_thread_area): Likewise.
5488 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
5489 * linux-x86-low.c (ps_get_thread_area): Likewise.
5490 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
5491
5492 2016-08-19 Pedro Alves <palves@redhat.com>
5493
5494 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
5495
5496 2016-08-19 Pedro Alves <palves@redhat.com>
5497
5498 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
5499 comment. Use memcpy instead of casting through unsigned long.
5500
5501 2016-08-19 Pedro Alves <palves@redhat.com>
5502
5503 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
5504 allocating around 0x80000000.
5505
5506 2016-08-19 Pedro Alves <palves@redhat.com>
5507
5508 PR gdb/20415
5509 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
5510 (x32-avx512-linux-ipa.o): New rules.
5511 * configure.ac (x86_64-*-linux*): New x32 check.
5512 * configure.srv (ipa_x32_linux_regobj): New.
5513 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
5514 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
5515 descriptions.
5516 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
5517 descriptions.
5518 * configure: Regenerate.
5519
5520 2016-08-09 Pedro Alves <palves@redhat.com>
5521
5522 PR gdb/18653
5523 * Makefile.in (OBS): Add signals-state-save-restore.o.
5524 (signals-state-save-restore.o): New rule.
5525 * config.in: Regenerate.
5526 * configure: Regenerate.
5527 * linux-low.c: Include "signals-state-save-restore.h".
5528 (linux_create_inferior): Call
5529 restore_original_signals_state.
5530 * server.c: Include "dispositions-save-restore.h".
5531 (captured_main): Call save_original_signals_state.
5532
5533 2016-08-05 Pedro Alves <palves@redhat.com>
5534
5535 * configure: Regenerate.
5536
5537 2016-08-04 Yao Qi <yao.qi@linaro.org>
5538
5539 * linux-low.c (regsets_fetch_inferior_registers): Check
5540 errno is ESRCH or not.
5541
5542 2016-08-02 Yao Qi <yao.qi@linaro.org>
5543
5544 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
5545 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
5546 (thread_db_load_search): Update.
5547 (try_thread_db_load_1): Don't look for td_ta_event_addr,
5548 td_ta_set_event and td_ta_event_getmsg.
5549
5550 2016-07-26 Pedro Alves <palves@redhat.com>
5551
5552 PR server/20414
5553 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
5554 of unsigned long for 64-bit registers and use uint32_t instead of
5555 unsigned int for 32-bit registers.
5556
5557 2016-07-26 Pedro Alves <palves@redhat.com>
5558
5559 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
5560 to 'ptrace'.
5561
5562 2016-07-21 Tom Tromey <tom@tromey.com>
5563
5564 * configure: Rebuild.
5565
5566 2016-07-21 Yao Qi <yao.qi@linaro.org>
5567
5568 * mem-break.c (find_gdb_breakpoint): Cast bp to
5569 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
5570
5571 2016-07-21 Yao Qi <yao.qi@linaro.org>
5572
5573 * server.c (handle_v_requests): Support s and S actions
5574 if target_supports_software_single_step return true.
5575
5576 2016-07-21 Yao Qi <yao.qi@linaro.org>
5577
5578 * linux-low.c (resume_stopped_resumed_lwps): If resume request
5579 is resume_step, call maybe_hw_step.
5580 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
5581 and unstop them.
5582 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
5583 breakpoints or not.
5584 (proceed_one_lwp): If resume request is resume_step, install
5585 reinsert breakpoints and call maybe_hw_step.
5586
5587 2016-07-21 Yao Qi <yao.qi@linaro.org>
5588
5589 * linux-low.c (proceed_one_lwp): Declare.
5590 (linux_resume_one_thread): Remove local variable 'step'.
5591 Lift code enqueue signal. Call proceed_one_lwp instead of
5592 linux_resume_one_lwp.
5593
5594 2016-07-21 Yao Qi <yao.qi@linaro.org>
5595
5596 * linux-low.c (linux_resume_one_thread): Call
5597 enqueue_pending_signal.
5598
5599 2016-07-21 Yao Qi <yao.qi@linaro.org>
5600
5601 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
5602 * inferiors.c (do_restore_current_thread_cleanup): New function.
5603 (make_cleanup_restore_current_thread): Likewise.
5604 * linux-low.c (install_software_single_step_breakpoints): Call
5605 make_cleanup_restore_current_thread. Switch current_thread to
5606 thread.
5607
5608 2016-07-21 Yao Qi <yao.qi@linaro.org>
5609
5610 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
5611 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
5612 (clone_one_breakpoint): Likewise.
5613 (delete_reinsert_breakpoints): Change parameter to thread.
5614 Callers updated.
5615 (has_reinsert_breakpoints): Likewise.
5616 (uninsert_reinsert_breakpoints): Likewise.
5617 (reinsert_reinsert_breakpoints): Likewise.
5618 * mem-break.h (set_reinsert_breakpoint): Update declaration.
5619 (delete_reinsert_breakpoints): Likewise.
5620 (reinsert_reinsert_breakpoints): Likewise.
5621 (uninsert_reinsert_breakpoints): Likewise.
5622 (has_reinsert_breakpoints): Likewise.
5623
5624 2016-07-21 Yao Qi <yao.qi@linaro.org>
5625
5626 * inferiors.c (get_thread_process): Make parameter const.
5627 * inferiors.h (get_thread_process): Update declaration.
5628 * mem-break.c (clone_all_breakpoints): Remove all parameters.
5629 Add new parameters child_thread and parent_thread. Callers
5630 updated.
5631 * mem-break.h (clone_all_breakpoints): Update declaration.
5632
5633 2016-07-21 Yao Qi <yao.qi@linaro.org>
5634
5635 * mem-break.c (struct breakpoint) <cond_list>: Remove.
5636 <command_list, handler>: Remove.
5637 (struct gdb_breakpoint): New.
5638 (struct other_breakpoint): New.
5639 (struct reinsert_breakpoint): New.
5640 (is_gdb_breakpoint): New function.
5641 (any_persistent_commands): Update command_list if
5642 is_gdb_breakpoint returns true.
5643 (set_breakpoint): Create breakpoints according to their types.
5644 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
5645 (set_gdb_breakpoint_1): Likewise.
5646 (set_gdb_breakpoint): Likewise.
5647 (clear_breakpoint_conditions): Change parameter type to
5648 'struct gdb_breakpoint *'.
5649 (clear_breakpoint_commands): Likewise.
5650 (clear_breakpoint_conditions_and_commands): Likewise.
5651 (add_condition_to_breakpoint): Likewise.
5652 (add_breakpoint_condition): Likewise.
5653 (add_commands_to_breakpoint): Likewise.
5654 (check_breakpoints): Check other_breakpoint.
5655 (clone_one_breakpoint): Clone breakpopint according to its type.
5656 * mem-break.h (struct gdb_breakpoint): Declare.
5657 (set_gdb_breakpoint): Update declaration.
5658 (clear_breakpoint_conditions_and_commands): Likewise.
5659 (add_breakpoint_condition): Likewise.
5660 (add_breakpoint_commands): Likewise.
5661 * server.c (process_point_options): Change parameter type to
5662 'struct gdb_breakpoint *'.
5663
5664 2016-07-21 Yao Qi <yao.qi@linaro.org>
5665
5666 * mem-break.c (set_breakpoint_at): Rename it to ...
5667 (set_breakpoint_type_at): ... it.
5668 (set_breakpoint_at): Call set_breakpoint_type_at.
5669 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
5670 * mem-break.h (set_breakpoint_at): Update comments.
5671
5672 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
5673
5674 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
5675 to buf parameter.
5676 (nios2_store_gregset): Likewise.
5677
5678 2016-07-01 Pedro Alves <palves@redhat.com>
5679 Antoine Tremblay <antoine.tremblay@ericsson.com>
5680
5681 * linux-low.c: Change interface to take the target lwp_info
5682 pointer directly and return void. Handle detaching from a zombie
5683 thread.
5684 (linux_detach_lwp_callback): New function.
5685 (linux_detach): Detach from the leader thread after detaching from
5686 the clone threads.
5687
5688 2016-06-28 Yao Qi <yao.qi@linaro.org>
5689
5690 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
5691 for variable new_offset.
5692 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5693 (aarch64_ftrace_insn_reloc_cb): Likewise.
5694 (aarch64_ftrace_insn_reloc_tb): Likewise.
5695 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
5696 PRIx64 instead of PRIx32.
5697
5698 2016-06-28 Yao Qi <yao.qi@linaro.org>
5699
5700 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
5701 (the_low_target): Install arm_get_syscall_trapinfo.
5702
5703 2016-06-28 Yao Qi <yao.qi@linaro.org>
5704
5705 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
5706 function.
5707 (the_low_target): Install aarch64_get_syscall_trapinfo.
5708
5709 2016-06-28 Yao Qi <yao.qi@linaro.org>
5710
5711 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
5712 Callers updated.
5713 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
5714 Remove parameter sysno.
5715 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
5716 sysret.
5717
5718 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5719
5720 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
5721 (s390_emit_ne_goto): Likewise.
5722 (s390_emit_lt_goto): Likewise.
5723 (s390_emit_le_goto): Likewise.
5724 (s390_emit_gt_goto): Likewise.
5725 (s390_emit_ge_goto): Likewise.
5726 (s390x_emit_eq_goto): Likewise.
5727 (s390x_emit_ne_goto): Likewise.
5728 (s390x_emit_lt_goto): Likewise.
5729 (s390x_emit_le_goto): Likewise.
5730 (s390x_emit_gt_goto): Likewise.
5731 (s390x_emit_ge_goto): Likewise.
5732 (s390_emit_ops_impl): Mark variable static.
5733 (s390x_emit_ops): Likewise.
5734
5735 2016-06-17 Yao Qi <yao.qi@linaro.org>
5736
5737 * linux-low.c (handle_extended_wait): Call
5738 uninsert_reinsert_breakpoints for the parent process. Remove
5739 reinsert breakpoints from the child process. Reinsert them to
5740 the parent process when vfork is done.
5741 * mem-break.c (uninsert_reinsert_breakpoints): New function.
5742 (reinsert_reinsert_breakpoints): New function.
5743 * mem-break.h (uninsert_reinsert_breakpoints): Declare
5744 (reinsert_reinsert_breakpoints): Declare.
5745
5746 2016-06-17 Yao Qi <yao.qi@linaro.org>
5747
5748 * linux-low.c (handle_extended_wait): If the parent is doing
5749 step-over, remove the reinsert breakpoints from the forked child.
5750
5751 2016-06-17 Yao Qi <yao.qi@linaro.org>
5752
5753 * linux-low.c (unsuspend_all_lwps): Declare.
5754 (linux_low_filter_event): If thread exited, call finish_step_over.
5755 If step-over is finished, unsuspend other threads.
5756
5757 2016-06-17 Yao Qi <yao.qi@linaro.org>
5758
5759 * linux-low.c (linux_resume_one_lwp_throw): Assert
5760 has_reinsert_breakpoints returns false.
5761 * mem-break.c (delete_disabled_breakpoints): Assert
5762 bp type isn't reinsert_breakpoint.
5763
5764 2016-06-17 Yao Qi <yao.qi@linaro.org>
5765
5766 * linux-low.c (maybe_hw_step): New function.
5767 (linux_resume_one_lwp_throw): Call maybe_hw_step.
5768 (finish_step_over): Switch current_thread to lwp temporarily,
5769 and assert has_reinsert_breakpoints returns true.
5770 (proceed_one_lwp): Call maybe_hw_step.
5771 * mem-break.c (has_reinsert_breakpoints): New function.
5772 * mem-break.h (has_reinsert_breakpoints): Declare.
5773
5774 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
5775
5776 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
5777
5778 2016-05-17 Yao Qi <yao.qi@linaro.org>
5779
5780 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
5781 instead of find_inferior.
5782
5783 2016-05-05 Yao Qi <yao.qi@linaro.org>
5784
5785 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
5786 Initialize res to zero.
5787
5788 2016-05-05 Yao Qi <yao.qi@linaro.org>
5789
5790 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
5791 to uint32_t.
5792
5793 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5794
5795 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
5796 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
5797 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
5798
5799 2016-04-28 Par Olsson <par.olsson@windriver.com>
5800 Simon Marchi <simon.marchi@ericsson.com>
5801
5802 * tracepoint.c (write_inferior_int8): New function.
5803 (cmd_qtenable_disable): Write enable flag using
5804 write_inferior_int8.
5805
5806 2016-04-25 Yao Qi <yao.qi@linaro.org>
5807
5808 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
5809 (need_step_over_p): Return zero if the LWP has pending signals
5810 can be delivered on software single step target.
5811
5812 2016-04-25 Yao Qi <yao.qi@linaro.org>
5813
5814 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
5815 return instead of error.
5816
5817 2016-04-22 Yao Qi <yao.qi@linaro.org>
5818
5819 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
5820 to 23.
5821
5822 2016-04-22 Yao Qi <yao.qi@linaro.org>
5823
5824 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
5825 signal when stepping over breakpoint with software single
5826 step.
5827
5828 2016-04-21 Pedro Alves <palves@redhat.com>
5829
5830 * linux-s390-low.c (s390_collect_ptrace_register)
5831 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
5832 add casts.
5833 (s390_check_regset): Use void * instead of gdb_byte *.
5834
5835 2016-04-20 Pedro Alves <palves@redhat.com>
5836
5837 * configure: Renegerate.
5838
5839 2016-04-20 Yao Qi <yao.qi@linaro.org>
5840
5841 * linux-aarch32-low.c: Include "arch/arm-linux.h".
5842 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
5843 number 16.
5844 (arm_store_gregset): Likewise.
5845
5846 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
5847
5848 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
5849 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
5850 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
5851 (amd64-avx-mpx-linux.c): New rules.
5852 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
5853 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
5854 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
5855 (srv_amd64_regobj): Add amd64-avx-mpx.o.
5856 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
5857 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
5858 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
5859 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
5860 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
5861 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
5862 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
5863 * linux-x86-low.c (x86_linux_read_description): Add case for
5864 X86_XSTATE_AVX_MPX_MASK.
5865 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
5866 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
5867 init_registers_i386_avx_mpx_linux.
5868 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
5869 (initialize_low_tracepoint): Call
5870 init_registers_i386_avx_mpx_linux.
5871 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
5872 (initialize_low_tracepoint): Call
5873 init_registers_amd64_avx_mpx_linux.
5874 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
5875 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
5876 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
5877 declarations.
5878
5879 2016-04-18 Pedro Alves <palves@redhat.com>
5880
5881 * configure: Regenerate.
5882
5883 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
5884
5885 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
5886 (aarch64_emit_sub): Likewise.
5887
5888 2016-04-12 Pedro Alves <palves@redhat.com>
5889
5890 * utils.c (prepare_to_throw_exception): Delete.
5891
5892 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
5893
5894 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
5895
5896 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
5897
5898 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
5899
5900 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
5901
5902 * linux-aarch64-ipa.c: Add <elf.h> include.
5903 * linux-ppc-ipa.c: Add <elf.h> include.
5904 * linux-s390-ipa.c: Add <elf.h> include.
5905
5906 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
5907
5908 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
5909 (get_raw_reg_ptr): Likewise.
5910 (get_trace_state_variable_value_ptr): Likewise.
5911 (set_trace_state_variable_value_ptr): Likewise.
5912 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
5913 char *.
5914
5915 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
5916 Marcin Kościelnicki <koriakin@0x04.net>
5917
5918 PR/17221
5919 * linux-ppc-low.c (emit_insns): New function.
5920 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
5921 (ppc_emit_prologue): New function.
5922 (ppc_emit_epilogue): New function.
5923 (ppc_emit_add): New function.
5924 (ppc_emit_sub): New function.
5925 (ppc_emit_mul): New function.
5926 (ppc_emit_lsh): New function.
5927 (ppc_emit_rsh_signed): New function.
5928 (ppc_emit_rsh_unsigned): New function.
5929 (ppc_emit_ext): New function.
5930 (ppc_emit_zero_ext): New function.
5931 (ppc_emit_log_not): New function.
5932 (ppc_emit_bit_and): New function.
5933 (ppc_emit_bit_or): New function.
5934 (ppc_emit_bit_xor): New function.
5935 (ppc_emit_bit_not): New function.
5936 (ppc_emit_equal): New function.
5937 (ppc_emit_less_signed): New function.
5938 (ppc_emit_less_unsigned): New function.
5939 (ppc_emit_ref): New function.
5940 (ppc_emit_const): New function.
5941 (ppc_emit_reg): New function.
5942 (ppc_emit_pop): New function.
5943 (ppc_emit_stack_flush): New function.
5944 (ppc_emit_swap): New function.
5945 (ppc_emit_stack_adjust): New function.
5946 (ppc_emit_call): New function.
5947 (ppc_emit_int_call_1): New function.
5948 (ppc_emit_void_call_2): New function.
5949 (ppc_emit_if_goto): New function.
5950 (ppc_emit_goto): New function.
5951 (ppc_emit_eq_goto): New function.
5952 (ppc_emit_ne_goto): New function.
5953 (ppc_emit_lt_goto): New function.
5954 (ppc_emit_le_goto): New function.
5955 (ppc_emit_gt_goto): New function.
5956 (ppc_emit_ge_goto): New function.
5957 (ppc_write_goto_address): New function.
5958 (ppc_emit_ops_impl): New static variable.
5959 (ppc64v1_emit_prologue): New function.
5960 (ppc64v2_emit_prologue): New function.
5961 (ppc64_emit_epilogue): New function.
5962 (ppc64_emit_add): New function.
5963 (ppc64_emit_sub): New function.
5964 (ppc64_emit_mul): New function.
5965 (ppc64_emit_lsh): New function.
5966 (ppc64_emit_rsh_signed): New function.
5967 (ppc64_emit_rsh_unsigned): New function.
5968 (ppc64_emit_ext): New function.
5969 (ppc64_emit_zero_ext): New function.
5970 (ppc64_emit_log_not): New function.
5971 (ppc64_emit_bit_and): New function.
5972 (ppc64_emit_bit_or): New function.
5973 (ppc64_emit_bit_xor): New function.
5974 (ppc64_emit_bit_not): New function.
5975 (ppc64_emit_equal): New function.
5976 (ppc64_emit_less_signed): New function.
5977 (ppc64_emit_less_unsigned): New function.
5978 (ppc64_emit_ref): New function.
5979 (ppc64_emit_const): New function.
5980 (ppc64v1_emit_reg): New function.
5981 (ppc64v2_emit_reg): New function.
5982 (ppc64_emit_pop): New function.
5983 (ppc64_emit_stack_flush): New function.
5984 (ppc64_emit_swap): New function.
5985 (ppc64v1_emit_call): New function.
5986 (ppc64v2_emit_call): New function.
5987 (ppc64v1_emit_int_call_1): New function.
5988 (ppc64v2_emit_int_call_1): New function.
5989 (ppc64v1_emit_void_call_2): New function.
5990 (ppc64v2_emit_void_call_2): New function.
5991 (ppc64_emit_if_goto): New function.
5992 (ppc64_emit_eq_goto): New function.
5993 (ppc64_emit_ne_goto): New function.
5994 (ppc64_emit_lt_goto): New function.
5995 (ppc64_emit_le_goto): New function.
5996 (ppc64_emit_gt_goto): New function.
5997 (ppc64_emit_ge_goto): New function.
5998 (ppc64v1_emit_ops_impl): New static variable.
5999 (ppc64v2_emit_ops_impl): New static variable.
6000 (ppc_emit_ops): New function.
6001 (linux_low_target): Wire in ppc_emit_ops.
6002
6003 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
6004 Marcin Kościelnicki <koriakin@0x04.net>
6005
6006 PR/17221
6007 * Makefile.in: Add powerpc-*-ipa.o
6008 * configure.srv: Add ipa_obj for powerpc*-linux.
6009 * linux-ppc-ipa.c: New file.
6010 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
6011 includes.
6012 (PPC_FIELD): New macro.
6013 (PPC_SEXT): New macro.
6014 (PPC_OP6): New macro.
6015 (PPC_BO): New macro.
6016 (PPC_LI): New macro.
6017 (PPC_BD): New macro.
6018 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
6019 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
6020 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
6021 (ppc_get_thread_area): New function.
6022 (is_elfv2_inferior): New function.
6023 (gen_ds_form): New function.
6024 (GEN_STD): New macro.
6025 (GEN_STDU): New macro.
6026 (GEN_LD): New macro.
6027 (GEN_LDU): New macro.
6028 (gen_d_form): New function.
6029 (GEN_ADDI): New macro.
6030 (GEN_ADDIS): New macro.
6031 (GEN_LI): New macro.
6032 (GEN_LIS): New macro.
6033 (GEN_ORI): New macro.
6034 (GEN_ORIS): New macro.
6035 (GEN_LWZ): New macro.
6036 (GEN_STW): New macro.
6037 (GEN_STWU): New macro.
6038 (gen_xfx_form): New function.
6039 (GEN_MFSPR): New macro.
6040 (GEN_MTSPR): New macro.
6041 (GEN_MFCR): New macro.
6042 (GEN_MTCR): New macro.
6043 (GEN_SYNC): New macro.
6044 (GEN_LWSYNC): New macro.
6045 (gen_x_form): New function.
6046 (GEN_OR): New macro.
6047 (GEN_MR): New macro.
6048 (GEN_LWARX): New macro.
6049 (GEN_STWCX): New macro.
6050 (GEN_CMPW): New macro.
6051 (gen_md_form): New function.
6052 (GEN_RLDICL): New macro.
6053 (GEN_RLDICR): New macro.
6054 (gen_i_form): New function.
6055 (GEN_B): New macro.
6056 (GEN_BL): New macro.
6057 (gen_b_form): New function.
6058 (GEN_BNE): New macro.
6059 (GEN_LOAD): New macro.
6060 (GEN_STORE): New macro.
6061 (gen_limm): New function.
6062 (gen_atomic_xchg): New function.
6063 (gen_call): New function.
6064 (ppc_relocate_instruction): New function.
6065 (ppc_install_fast_tracepoint_jump_pad): New function.
6066 (ppc_get_min_fast_tracepoint_insn_len): New function.
6067 (ppc_get_ipa_tdesc_idx): New function.
6068 (the_low_target): Wire in the new functions.
6069 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
6070 tdescs.
6071 * linux-ppc-tdesc.h: New file.
6072
6073 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
6074
6075 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
6076 (alloc_jump_pad_buffer): New function.
6077 * linux-amd64-ipa.c: Add <sys/mman.h> include.
6078 (alloc_jump_pad_buffer): New function.
6079 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
6080 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
6081 (alloc_jump_pad_buffer): New function.
6082 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
6083 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
6084 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
6085 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
6086
6087 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
6088
6089 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
6090 * linux-amd64-ipa.c: Likewise.
6091 * linux-i386-ipa.c: Likewise.
6092 * linux-s390-ipa.c: Likewise.
6093 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
6094 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
6095 set_trace_state_variable_value_ptr.
6096 (struct ipa_sym_addresses): Likewise.
6097 (symbol_list): Likewise.
6098 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
6099 accessing gdb_collect directly.
6100 (gdb_collect_ptr_type): New typedef.
6101 (get_raw_reg_ptr_type): New typedef.
6102 (get_trace_state_variable_value_ptr_type): New typedef.
6103 (set_trace_state_variable_value_ptr_type): New typedef.
6104 (gdb_collect_ptr): New global.
6105 (get_raw_reg_ptr): New global.
6106 (get_trace_state_variable_value_ptr): New global.
6107 (set_trace_state_variable_value_ptr): New global.
6108 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
6109 accessing get_raw_reg directly.
6110 (get_get_tsv_func_addr): Likewise for
6111 get_trace_state_variable_value_ptr.
6112 (get_set_tsv_func_addr): Likewise for
6113 set_trace_state_variable_value_ptr.
6114 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
6115
6116 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
6117
6118 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
6119
6120 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
6121
6122 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
6123 packets.
6124 (relocate_instruction): Remove own_buf.
6125 * server.c (own_buf): Make global.
6126 (handle_v_requests): Make global.
6127 * server.h (own_buf): New declaration.
6128 (handle_v_requests): New prototype.
6129
6130 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
6131
6132 PR 18377
6133 * linux-s390-low.c (add_insns): New function.
6134 (s390_emit_prologue): New function.
6135 (s390_emit_epilogue): New function.
6136 (s390_emit_add): New function.
6137 (s390_emit_sub): New function.
6138 (s390_emit_mul): New function.
6139 (s390_emit_lsh): New function.
6140 (s390_emit_rsh_signed): New function.
6141 (s390_emit_rsh_unsigned): New function.
6142 (s390_emit_ext): New function.
6143 (s390_emit_log_not): New function.
6144 (s390_emit_bit_and): New function.
6145 (s390_emit_bit_or): New function.
6146 (s390_emit_bit_xor): New function.
6147 (s390_emit_bit_not): New function.
6148 (s390_emit_equal): New function.
6149 (s390_emit_less_signed): New function.
6150 (s390_emit_less_unsigned): New function.
6151 (s390_emit_ref): New function.
6152 (s390_emit_if_goto): New function.
6153 (s390_emit_goto): New function.
6154 (s390_write_goto_address): New function.
6155 (s390_emit_litpool): New function.
6156 (s390_emit_const): New function.
6157 (s390_emit_call): New function.
6158 (s390_emit_reg): New function.
6159 (s390_emit_pop): New function.
6160 (s390_emit_stack_flush): New function.
6161 (s390_emit_zero_ext): New function.
6162 (s390_emit_swap): New function.
6163 (s390_emit_stack_adjust): New function.
6164 (s390_emit_set_r2): New function.
6165 (s390_emit_int_call_1): New function.
6166 (s390_emit_void_call_2): New function.
6167 (s390_emit_eq_goto): New function.
6168 (s390_emit_ne_goto): New function.
6169 (s390_emit_lt_goto): New function.
6170 (s390_emit_le_goto): New function.
6171 (s390_emit_gt_goto): New function.
6172 (s390_emit_ge_goto): New function.
6173 (s390x_emit_prologue): New function.
6174 (s390x_emit_epilogue): New function.
6175 (s390x_emit_add): New function.
6176 (s390x_emit_sub): New function.
6177 (s390x_emit_mul): New function.
6178 (s390x_emit_lsh): New function.
6179 (s390x_emit_rsh_signed): New function.
6180 (s390x_emit_rsh_unsigned): New function.
6181 (s390x_emit_ext): New function.
6182 (s390x_emit_log_not): New function.
6183 (s390x_emit_bit_and): New function.
6184 (s390x_emit_bit_or): New function.
6185 (s390x_emit_bit_xor): New function.
6186 (s390x_emit_bit_not): New function.
6187 (s390x_emit_equal): New function.
6188 (s390x_emit_less_signed): New function.
6189 (s390x_emit_less_unsigned): New function.
6190 (s390x_emit_ref): New function.
6191 (s390x_emit_if_goto): New function.
6192 (s390x_emit_const): New function.
6193 (s390x_emit_call): New function.
6194 (s390x_emit_reg): New function.
6195 (s390x_emit_pop): New function.
6196 (s390x_emit_stack_flush): New function.
6197 (s390x_emit_zero_ext): New function.
6198 (s390x_emit_swap): New function.
6199 (s390x_emit_stack_adjust): New function.
6200 (s390x_emit_int_call_1): New function.
6201 (s390x_emit_void_call_2): New function.
6202 (s390x_emit_eq_goto): New function.
6203 (s390x_emit_ne_goto): New function.
6204 (s390x_emit_lt_goto): New function.
6205 (s390x_emit_le_goto): New function.
6206 (s390x_emit_gt_goto): New function.
6207 (s390x_emit_ge_goto): New function.
6208 (s390_emit_ops): New function.
6209 (struct linux_target_ops): Fill in emit_ops hook.
6210
6211 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
6212
6213 PR 18377
6214 * Makefile.in: Add s390 IPA files.
6215 * configure.srv: Build IPA for s390.
6216 * linux-s390-ipa.c: New file.
6217 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
6218 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
6219 (tdesc_s390_linux32): Likewise.
6220 (init_registers_s390_linux32v1): Likewise.
6221 (tdesc_s390_linux32v1): Likewise.
6222 (init_registers_s390_linux32v2): Likewise.
6223 (tdesc_s390_linux32v2): Likewise.
6224 (init_registers_s390_linux64): Likewise.
6225 (tdesc_s390_linux64): Likewise.
6226 (init_registers_s390_linux64v1): Likewise.
6227 (tdesc_s390_linux64v1): Likewise.
6228 (init_registers_s390_linux64v2): Likewise.
6229 (tdesc_s390_linux64v2): Likewise.
6230 (init_registers_s390_te_linux64): Likewise.
6231 (tdesc_s390_te_linux64): Likewise.
6232 (init_registers_s390_vx_linux64): Likewise.
6233 (tdesc_s390_vx_linux64): Likewise.
6234 (init_registers_s390_tevx_linux64): Likewise.
6235 (tdesc_s390_tevx_linux64): Likewise.
6236 (init_registers_s390x_linux64): Likewise.
6237 (tdesc_s390x_linux64): Likewise.
6238 (init_registers_s390x_linux64v1): Likewise.
6239 (tdesc_s390x_linux64v1): Likewise.
6240 (init_registers_s390x_linux64v2): Likewise.
6241 (tdesc_s390x_linux64v2): Likewise.
6242 (init_registers_s390x_te_linux64): Likewise.
6243 (tdesc_s390x_te_linux64): Likewise.
6244 (init_registers_s390x_vx_linux64): Likewise.
6245 (tdesc_s390x_vx_linux64): Likewise.
6246 (init_registers_s390x_tevx_linux64): Likewise.
6247 (tdesc_s390x_tevx_linux64): Likewise.
6248 (have_hwcap_s390_vx): New static variable.
6249 (s390_arch_setup): Fill have_hwcap_s390_vx.
6250 (s390_get_thread_area): New function.
6251 (s390_ft_entry_gpr_esa): New const.
6252 (s390_ft_entry_gpr_zarch): New const.
6253 (s390_ft_entry_misc): New const.
6254 (s390_ft_entry_fr): New const.
6255 (s390_ft_entry_vr): New const.
6256 (s390_ft_main_31): New const.
6257 (s390_ft_main_64): New const.
6258 (s390_ft_exit_fr): New const.
6259 (s390_ft_exit_vr): New const.
6260 (s390_ft_exit_misc): New const.
6261 (s390_ft_exit_gpr_esa): New const.
6262 (s390_ft_exit_gpr_zarch): New const.
6263 (append_insns): New function.
6264 (s390_relocate_instruction): New function.
6265 (s390_install_fast_tracepoint_jump_pad): New function.
6266 (s390_get_min_fast_tracepoint_insn_len): New function.
6267 (s390_get_ipa_tdesc_idx): New function.
6268 (struct linux_target_ops): Wire in the above functions.
6269 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
6270 * linux-s390-tdesc.h: New file.
6271
6272 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
6273
6274 * linux-s390-low.c (s390_supports_tracepoints): New function.
6275 (struct linux_target_ops): Fill supports_tracepoints hook.
6276
6277 2016-03-18 Yao Qi <yao.qi@linaro.org>
6278
6279 * linux-low.c (lwp_signal_can_be_delivered): New function.
6280 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
6281
6282 2016-03-18 Yao Qi <yao.qi@linaro.org>
6283
6284 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
6285 0 if signal is enqueued. Remove 'signal' from one debugging
6286 message. Move one debugging message to some lines below.
6287 Remove code setting 'signal' to 0.
6288
6289 2016-03-18 Yao Qi <yao.qi@linaro.org>
6290
6291 * linux-low.c (linux_low_filter_event): Remove redundant
6292 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
6293
6294 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
6295
6296 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
6297 (struct linux_target_ops): Wire in the above.
6298
6299 2016-03-03 Yao Qi <yao.qi@linaro.org>
6300
6301 * linux-low.c: Update comments to start_step_over.
6302
6303 2016-03-03 Yao Qi <yao.qi@linaro.org>
6304
6305 PR server/19736
6306 * linux-low.c (handle_extended_wait): Set child suspended
6307 if event_lwp->bp_reinsert isn't zero.
6308
6309 2016-03-02 Yao Qi <yao.qi@linaro.org>
6310
6311 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
6312 enqueue_pending_signal.
6313
6314 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
6315
6316 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
6317 is actually loaded.
6318
6319 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
6320
6321 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
6322 (s390_regmap_3264) [!__s390x__]: New global.
6323 (s390_collect_ptrace_register): Skip map entries containing -1.
6324 (s390_supply_ptrace_register): Ditto.
6325 (s390_fill_gprs_high): New function.
6326 (s390_store_gprs_high): New function.
6327 (s390_regsets): Add NT_S390_HIGH_GPRS.
6328 (s390_get_hwcap): Enable on 31-bit.
6329 (have_hwcap_s390_high_gprs): Enable on 31-bit.
6330 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
6331 Detect NT_S390_HIGH_GPRS.
6332 (s390_usrregs_info_3264): Enable on 31-bit.
6333 (s390_regs_info): Enable regs_info_3264 on 31-bit.
6334 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
6335
6336 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
6337
6338 PR gdb/13808
6339 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
6340 * configure.srv: Ditto.
6341 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
6342 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
6343 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
6344 (init_registers_amd64_linux): Remove prototype.
6345 (tdesc_amd64_linux): Remove declaration.
6346 (get_ipa_tdesc): New function.
6347 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
6348 initialize remaining tdescs.
6349 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
6350 (init_registers_i386_linux): Remove prototype.
6351 (tdesc_i386_linux): Remove declaration.
6352 (get_ipa_tdesc): New function.
6353 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
6354 initialize remaining tdescs.
6355 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
6356 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
6357 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
6358 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
6359 (x86_get_ipa_tdesc_idx): New function.
6360 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
6361 * linux-x86-tdesc.h: New file.
6362 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
6363 (target_get_ipa_tdesc_idx): New macro.
6364 * tracepoint.c (ipa_tdesc_idx): New macro.
6365 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
6366 (symbol_list): Add ipa_tdesc_idx.
6367 (cmd_qtstart): Write ipa_tdesc_idx in the target.
6368 (ipa_tdesc): Remove.
6369 (ipa_tdesc_idx): New variable.
6370 (get_context_regcache): Use get_ipa_tdesc.
6371 (gdb_collect): Ditto.
6372 (gdb_probe): Ditto.
6373 * tracepoint.h (get_ipa_tdesc): New prototype.
6374 (ipa_tdesc): Remove.
6375
6376 2016-02-24 Pedro Alves <palves@redhat.com>
6377
6378 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
6379 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
6380 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
6381 Factor out common code between the USE_SIGTRAP_SIGINFO and
6382 !USE_SIGTRAP_SIGINFO blocks.
6383 (linux_low_filter_event): Call save_stop_reason instead of
6384 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
6385 Update comments.
6386 (linux_wait_1): Update comments.
6387
6388 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
6389
6390 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
6391 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
6392 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
6393 ppc_insert_point, ppc_remove_point.
6394
6395 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
6396
6397 * linux-s390-low.c (s390_supports_z_point_type): New function.
6398 (struct linux_target_ops): Wire s390_supports_z_point_type in.
6399
6400 2016-02-16 Yao Qi <yao.qi@linaro.org>
6401
6402 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
6403 PC. Get pc from regcache_read_pc.
6404
6405 2016-02-12 Yao Qi <yao.qi@linaro.org>
6406
6407 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
6408 or linux_get_pc_32bit.
6409 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
6410
6411 2016-02-12 Yao Qi <yao.qi@linaro.org>
6412
6413 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
6414 arm_linux_get_next_pcs_fixup.
6415
6416 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
6417
6418 * tracepoint.c (x_tracepoint_action_download): Change
6419 write_inferior_data_ptr to write_inferior_data_pointer.
6420 (cmd_qtstart): Likewise.
6421 (write_inferior_data_ptr): Remove.
6422 (download_agent_expr): Change write_inferior_data_ptr to
6423 write_inferior_data_pointer.
6424 (download_tracepoint_1): Likewise.
6425 (download_tracepoint): Likewise.
6426 (download_trace_state_variables): Likewise.
6427
6428 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
6429 Marcin Kościelnicki <koriakin@0x04.net>
6430
6431 * tracepoint.c (struct tracepoint_action_ops): Remove.
6432 (struct tracepoint_action): Remove ops.
6433 (m_tracepoint_action_download, r_tracepoint_action_download)
6434 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
6435 size and offset accordingly.
6436 (m_tracepoint_action_ops, r_tracepoint_action_ops)
6437 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
6438 (tracepoint_action_send, tracepoint_action_download): New functions.
6439 Helpers for trace action handlers.
6440 (add_tracepoint_action): Remove setup actions ops.
6441 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
6442
6443 2016-02-10 Yao Qi <yao.qi@linaro.org>
6444
6445 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
6446
6447 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
6448
6449 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
6450 to AC_OUTPUT.
6451 * configure: Regenerate.
6452
6453 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
6454
6455 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
6456 void * to gdb_byte *.
6457 * linux-low.c (siginfo_fixup): Likewise.
6458 (linux_xfer_siginfo): Likewise.
6459 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
6460 Likewise.
6461 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
6462
6463 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
6464
6465 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
6466 to srv_tgtobj.
6467 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
6468 to srv_tgtobj.
6469 * linux-x86-low.c [__x86_64__]: Include
6470 "nat/amd64-linux-siginfo.h".
6471 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
6472 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
6473 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
6474 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
6475 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
6476 (cpt_si_fd, si_timerid, si_overrun): Move from
6477 nat/amd64-linux-siginfo.c.
6478 * Makefile.in (amd64-linux-siginfo.o:): New rule.
6479
6480 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
6481
6482 * server.c (skip_to_semicolon): Remove.
6483 (process_point_options): Use strchrnul instead of
6484 skip_to_semicolon.
6485
6486 2016-01-26 Yao Qi <yao.qi@linaro.org>
6487
6488 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
6489 * linux-low.c (install_software_single_step_breakpoints): Don't
6490 call regcache_read_pc.
6491 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
6492 argument pc.
6493
6494 2016-01-26 Yao Qi <yao.qi@linaro.org>
6495
6496 * linux-low.c (install_software_single_step_breakpoints): Call
6497 regcache_read_pc instead of get_pc.
6498
6499 2016-01-26 Yao Qi <yao.qi@linaro.org>
6500
6501 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
6502 (unblock_async_io): Rename to ...
6503 (block_unblock_async_io): ... it. New function.
6504 (enable_async_io): Don't install SIGIO handler. Unblock it
6505 instead.
6506 (disable_async_io): Don't ignore SIGIO. Block it instead.
6507 (initialize_async_io): Install SIGIO handler. Don't call
6508 unblock_async_io.
6509
6510 2016-01-26 Yao Qi <yao.qi@linaro.org>
6511
6512 * remote-utils.c (getpkt): If the buffer isn't empty, and the
6513 first character is '\003', call *the_target->request_interrupt.
6514
6515 2016-01-25 Yao Qi <yao.qi@linaro.org>
6516
6517 * remote-utils.c (new_thread_notify): Remove.
6518 (dead_thread_notify): Likewise.
6519 * remote-utils.h (new_thread_notify): Remove declaration.
6520 (dead_thread_notify): Likewise.
6521
6522 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
6523
6524 * gdb.trace/pending.exp: Fix expected message on continue.
6525
6526 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
6527
6528 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
6529 it works properly on big-endian machines where sizeof (CORE_ADDR)
6530 != sizeof (void *).
6531
6532 2016-01-21 Pedro Alves <palves@redhat.com>
6533
6534 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
6535 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
6536 * configure: Regenerate.
6537
6538 2016-01-21 Yao Qi <yao.qi@linaro.org>
6539
6540 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
6541 is_thumb and set it according to CPSR saved on the stack.
6542 (get_next_pcs_syscall_next_pc): Pass is_thumb to
6543 arm_sigreturn_next_pc.
6544
6545 2016-01-18 Yao Qi <yao.qi@linaro.org>
6546
6547 * linux-low.c (linux_set_pc_64bit): New function.
6548 (linux_get_pc_64bit): New function.
6549 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
6550 Declare.
6551 * linux-sparc-low.c (debug_threads): Remove declaration.
6552 (sparc_get_pc): Remove.
6553 (the_low_target): Use linux_get_pc_64bit instead of
6554 sparc_get_pc.
6555 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
6556 (the_low_target): Use linux_get_pc_64bit and
6557 linux_set_pc_64bit.
6558
6559 2016-01-18 Yao Qi <yao.qi@linaro.org>
6560
6561 * linux-arm-low.c (debug_threads): Remove declaration.
6562 (arm_get_pc, arm_set_pc): Remove.
6563 (the_low_target): Use linux_get_pc_32bit and
6564 linux_set_pc_32bit.
6565 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
6566 (the_low_target): Use linux_get_pc_32bit and
6567 linux_set_pc_32bit.
6568 * linux-cris-low.c (debug_threads): Remove declaration.
6569 (cris_get_pc, cris_set_pc,): Remove.
6570 (the_low_target): Use linux_get_pc_32bit and
6571 linux_set_pc_32bit.
6572 * linux-crisv32-low.c (debug_threads): Remove declaration.
6573 (cris_get_pc, cris_set_pc): Remove.
6574 (the_low_target): Use linux_get_pc_32bit and
6575 linux_set_pc_32bit.
6576 * linux-low.c: Include inttypes.h.
6577 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
6578 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
6579 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
6580 (the_low_target): Use linux_get_pc_32bit and
6581 linux_set_pc_32bit.
6582 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
6583 (the_low_target): Use linux_get_pc_32bit and
6584 linux_set_pc_32bit.
6585 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
6586 (the_low_target): Use linux_get_pc_32bit and
6587 linux_set_pc_32bit.
6588 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
6589 (the_low_target): Use linux_get_pc_32bit and
6590 linux_set_pc_32bit.
6591 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
6592 (the_low_target): Use linux_get_pc_32bit and
6593 linux_set_pc_32bit.
6594
6595 2016-01-18 Gary Benson <gbenson@redhat.com>
6596
6597 * configure.ac (AC_FUNC_FORK): New check.
6598 * config.in: Regenerate.
6599 * configure: Likewise.
6600
6601 2016-01-14 Yao Qi <yao.qi@linaro.org>
6602
6603 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
6604 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
6605 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
6606 arm_get_next_pcs_ctor.
6607
6608 2016-01-12 Josh Stone <jistone@redhat.com>
6609 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6610
6611 * inferiors.h: Include "gdb_vecs.h".
6612 (struct process_info): Add syscalls_to_catch.
6613 * inferiors.c (remove_process): Free syscalls_to_catch.
6614 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
6615 syscall_return stops.
6616 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
6617 * server.c (handle_general_set): Handle QCatchSyscalls.
6618 (handle_query): Report support for QCatchSyscalls.
6619 * target.h (struct target_ops): Add supports_catch_syscall.
6620 (target_supports_catch_syscall): New macro.
6621 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
6622 (struct lwp_info): Add syscall_state.
6623 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
6624 Maintain syscall_state and syscalls_to_catch across exec.
6625 (get_syscall_trapinfo): New function, proxy to the_low_target.
6626 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
6627 (linux_low_filter_event): Toggle syscall_state entry/return for
6628 syscall traps, and set it ignored for all others.
6629 (gdb_catching_syscalls_p): New function.
6630 (gdb_catch_this_syscall_p): New function.
6631 (linux_wait_1): Handle SYSCALL_SIGTRAP.
6632 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
6633 (linux_supports_catch_syscall): New function.
6634 (linux_target_ops): Install it.
6635 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
6636 (the_low_target): Install it.
6637
6638 2016-01-12 Mike Frysinger <vapier@gentoo.org>
6639
6640 * acinclude.m4: Include new ../warning.m4 file.
6641 * configure: Regenerated.
6642 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
6643
6644 2016-01-12 Mike Frysinger <vapier@gentoo.org>
6645
6646 * ax.c (is_goto_target): Mark static.
6647 * linux-low.c (register_addr): Likewise.
6648 (linux_fetch_registers, linux_store_registers): Likewise.
6649 * mem-break.c (any_persistent_commands): Fix old prototype.
6650 (add_commands_to_breakpoint): Mark static.
6651 * regcache.c (find_register_by_name): Delete unused func.
6652 * remote-utils.c (hex_or_minus_one): Mark static.
6653 * server.c (monitor_show_help): Mark static.
6654 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
6655 handle_v_requests): Likewise.
6656
6657 2016-01-12 Pedro Alves <palves@redhat.com>
6658
6659 Remove use of the registered trademark symbol throughout.
6660
6661 2016-01-08 Yao Qi <yao.qi@linaro.org>
6662
6663 * remote-utils.c (getpkt): If c is '\003', call target hook
6664 request_interrupt.
6665
6666 2016-01-06 Yao Qi <yao.qi@linaro.org>
6667
6668 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
6669 linux-aarch32-low.c.
6670 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6671 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
6672 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
6673 (thumb2_breakpoint): Declare.
6674 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
6675 linux-aarch32-low.h.
6676 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6677 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
6678 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
6679
6680 2016-01-01 Joel Brobecker <brobecker@adacore.com>
6681
6682 * gdbreplay.c (gdbreplay_version): Change copyright year in
6683 version message.
6684 * server.c (gdbserver_version): Likewise.
6685
6686 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
6687
6688 * server.c (crc32_table): Delete.
6689 (crc32): Use libiberty's xcrc32 function.
6690
6691 2015-12-22 Joel Brobecker <brobecker@adacore.com>
6692
6693 * lynx-low.c (lynx_delete_thread_callback): New function.
6694 (lynx_mourn): Properly delete our process and all of its
6695 threads. Remove call to clear_inferiors.
6696
6697 2015-12-22 Joel Brobecker <brobecker@adacore.com>
6698
6699 * target.c (thread_search_callback): Add check that
6700 the thread_stopped target callback is not NULL before
6701 calling it.
6702
6703 2015-12-21 Yao Qi <yao.qi@linaro.org>
6704
6705 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
6706 arm breakpoint.
6707
6708 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6709
6710 * server.c (handle_query): Call target_supports_software_single_step.
6711
6712 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6713
6714 * linux-low.c (single_step): New function.
6715 (linux_resume_one_lwp_throw): Call single_step.
6716 (start_step_over): Likewise.
6717
6718 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6719
6720 * Makefile.in (SFILES): Append arch/arm-linux.c,
6721 arch/arm-get-next-pcs.c.
6722 (arm-linux.o): New rule.
6723 (arm-get-next-pcs.o): New rule.
6724 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
6725 arm-linux.o.
6726 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
6727 to linux-aarch32-low.c.
6728 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6729 (arm_breakpoint_len, thumb_breakpoint): Likewise.
6730 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
6731 (thumb2_breakpoint_len): Likewise.
6732 (arm_is_thumb_mode): Make non-static.
6733 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
6734 from linux-aarch32-low.c.
6735 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6736 (arm_breakpoint_len, thumb_breakpoint): Likewise.
6737 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
6738 (thumb2_breakpoint_len): Likewise.
6739 (arm_is_thumb_mode): New declaration.
6740 * linux-arm-low.c: Include arch/arm-linux.h
6741 aarch/arm-get-next-pcs.h, sys/syscall.h.
6742 (get_next_pcs_ops): New struct.
6743 (get_next_pcs_addr_bits_remove): New function.
6744 (get_next_pcs_is_thumb): New function.
6745 (get_next_pcs_read_memory_unsigned_integer): Likewise.
6746 (arm_sigreturn_next_pc): Likewise.
6747 (get_next_pcs_syscall_next_pc): Likewise.
6748 (arm_gdbserver_get_next_pcs): Likewise.
6749 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
6750 Initialize.
6751 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
6752 * server.h: Include gdb_vecs.h.
6753
6754 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6755
6756 * Makefile.in (SFILES): Append common/common-regcache.c.
6757 (OBS): Append common-regcache.o.
6758 (common-regcache.o): New rule.
6759 * regcache.c (init_register_cache): Initialize cache to
6760 REG_UNAVAILABLE.
6761 (regcache_raw_read_unsigned): New function.
6762 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
6763 register_status enum.
6764
6765 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6766
6767 * linux-aarch64-low.c (the_low_targets): Rename
6768 breakpoint_reinsert_addr to get_next_pcs.
6769 * linux-arm-low.c (the_low_targets): Likewise.
6770 * linux-bfin-low.c (the_low_targets): Likewise.
6771 * linux-cris-low.c (the_low_targets): Likewise.
6772 * linux-crisv32-low.c (the_low_targets): Likewise.
6773 * linux-low.c (can_software_single_step): Likewise.
6774 (install_software_single_step_breakpoints): New function.
6775 (start_step_over): Use install_software_single_step_breakpoints.
6776 * linux-low.h: New CORE_ADDR vector.
6777 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
6778 get_next_pcs.
6779 * linux-mips-low.c (the_low_targets): Likewise.
6780 * linux-nios2-low.c (the_low_targets): Likewise.
6781 * linux-sparc-low.c (the_low_targets): Likewise.
6782
6783 2015-12-17 Pedro Alves <palves@redhat.com>
6784
6785 * linux-low.c (linux_kill_one_lwp): Remove references to
6786 LinuxThreads.
6787 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
6788 to 'kill'.
6789 (linux_init_signals): Delete.
6790 (initialize_low): Adjust.
6791 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
6792
6793 2015-12-16 Pedro Alves <palves@redhat.com>
6794
6795 * configure.ac (compiler warning flags): When testing a
6796 -Wno-foo option, check whether -Wfoo works instead.
6797 * configure: Regenerate.
6798
6799 2015-12-11 Don Breazeal <donb@codesourcery.com>
6800
6801 * server.c (process_serial_event): Don't exit from gdbserver
6802 in remote mode if there are still active inferiors.
6803
6804 2015-12-11 Yao Qi <yao.qi@linaro.org>
6805
6806 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
6807 arm_breakpoint_at if the process is 32-bit.
6808
6809 2015-12-11 Yao Qi <yao.qi@linaro.org>
6810
6811 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
6812 arm breakpoint.
6813
6814 2015-12-07 Yao Qi <yao.qi@linaro.org>
6815
6816 * configure.srv: Append arm.o to srv_tgtobj for
6817 aarch64*-*-linux* target.
6818 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
6819 from linux-arm-low.c.
6820 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6821 (arm_breakpoint_len, thumb_breakpoint): Likewise.
6822 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
6823 (thumb2_breakpoint_len): Likewise.
6824 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
6825 (arm_breakpoint_kinds): Likewise.
6826 (arm_breakpoint_kind_from_pc): Likewise.
6827 (arm_sw_breakpoint_from_kind): Likewise.
6828 (arm_breakpoint_kind_from_current_state): Likewise.
6829 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
6830 (arm_sw_breakpoint_from_kind): Declare.
6831 (arm_breakpoint_kind_from_current_state): Declare.
6832 (arm_breakpoint_at): Declare.
6833 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
6834 arm_sw_breakpoint_from_kind if process is 32-bit.
6835 (aarch64_breakpoint_kind_from_pc): New function.
6836 (aarch64_breakpoint_kind_from_current_state): New function.
6837 (the_low_target): Initialize fields breakpoint_kind_from_pc
6838 and breakpoint_kind_from_current_state.
6839 * linux-arm-low.c (arm_breakpoint_kinds): Move to
6840 linux-aarch32-low.c.
6841 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
6842 (arm_breakpoint, arm_breakpoint_len): Likewise.
6843 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
6844 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
6845 (arm_is_thumb_mode): Likewise.
6846 (arm_breakpoint_at): Likewise.
6847 (arm_breakpoint_kind_from_pc): Likewise.
6848 (arm_sw_breakpoint_from_kind): Likewise.
6849 (arm_breakpoint_kind_from_current_state): Likewise.
6850
6851 Revert:
6852 2015-08-04 Yao Qi <yao.qi@linaro.org>
6853
6854 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6855 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6856 * server.c (extended_protocol): Remove "static".
6857 * server.h (extended_protocol): Declare it.
6858
6859 2015-12-04 Josh Stone <jistone@redhat.com>
6860
6861 * target.h (struct target_ops) <arch_setup>: Rename to ...
6862 (struct target_ops) <post_create_inferior>: ... this.
6863 (target_arch_setup): Rename to ...
6864 (target_post_create_inferior): ... this, calling post_create_inferior.
6865 * server.c (start_inferior): Update target_arch_setup calls to
6866 target_post_create_inferior.
6867 * linux-low.c (linux_low_ptrace_options): Forward declare.
6868 (linux_arch_setup): Update its comment for general use.
6869 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
6870 (struct linux_target_ops): Use linux_post_create_inferior.
6871 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
6872 to post_create_inferior.
6873 * nto-low.c (struct nto_target_ops): Likewise.
6874 * spu-low.c (struct spu_target_ops): Likewise.
6875 * win32-low.c (struct win32_target_ops): Likewise.
6876
6877 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
6878
6879 * linux-arm-low.c: Remove duplicate arch/arm.h include.
6880
6881 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6882
6883 * linux-arm-low.c (arm_reinsert_addr): Remove function.
6884 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
6885 * linux-cris-low.c (cris_reinsert_addr> Remove function.
6886 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6887 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
6888 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6889 * linux-mips-low.c (mips_reinsert_addr): Remove function.
6890 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6891 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
6892 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6893 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
6894 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6895
6896 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6897
6898 * linux-low.c (linux_look_up_symbols): Don't call
6899 linux_supports_traceclone.
6900 * linux-low.h (thread_db_init): Remove use_events argument.
6901 * thread-db.c (thread_db_use_event): Remove global variable.
6902 (struct thread_db) <td_thr_event_enable_p>: Remove field.
6903 (struct thread_db) <td_create_bp>: Remove field.
6904 (thread_db_create_event): Remove function.
6905 (thread_db_enable_reporting): Likewise.
6906 (find_one_thread): Don't check for thread_db_use_events.
6907 (attach_thread): Likewise.
6908 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
6909 (try_thread_db_load_1): Don't check for thread_db_use_events.
6910 (thread_db_init): Remove use_events argument and thread events
6911 handling.
6912 (remove_thread_event_breakpoints): Remove function.
6913 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
6914
6915 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6916
6917 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
6918 New function.
6919 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6920 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
6921 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6922 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
6923 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
6924 Initialize.
6925 * linux-crisv32-low.c (cris_supports_hardware_single_step):
6926 New function.
6927 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6928 * linux-low.c (can_hardware_single_step): Use
6929 supports_hardware_single_step.
6930 (can_software_single_step): New function.
6931 (start_step_over): Call can_software_single_step.
6932 (linux_supports_hardware_single_step): New function.
6933 (struct target_ops) <supports_software_single_step>: Initialize.
6934 * linux-low.h (struct linux_target_ops)
6935 <supports_hardware_single_step>: Initialize.
6936 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
6937 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6938 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
6939 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
6940 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
6941 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6942 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
6943 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6944 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
6945 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
6946 Initialize.
6947 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
6948 (struct linux_target_ops) <tile_supports_hardware_single_step>:
6949 Initialize.
6950 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
6951 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6952 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
6953 New function.
6954 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6955 * target.h (struct target_ops): <supports_software_single_step>:
6956 New field.
6957 (target_supports_software_single_step): New macro.
6958
6959 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6960
6961 * linux-low.c (linux_wait_1): Fix pc advance condition.
6962 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
6963 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
6964
6965 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6966
6967 * linux-arm-low.c (arm_is_thumb_mode): New function.
6968 (arm_breakpoint_at): Use arm_is_thumb_mode.
6969 (arm_breakpoint_kind_from_current_state): New function.
6970 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
6971 Initialize.
6972 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
6973 (linux_breakpoint_kind_from_current_state): New function.
6974 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
6975 * linux-low.h (struct linux_target_ops)
6976 <breakpoint_kind_from_current_state>: New field.
6977 * target.h (struct target_ops): Likewise.
6978 (target_breakpoint_kind_from_current_state): New macro.
6979
6980 2015-11-30 Pedro Alves <palves@redhat.com>
6981
6982 * linux-low.c (linux_resume): Wake up the event loop before
6983 returning.
6984
6985 2015-11-30 Pedro Alves <palves@redhat.com>
6986
6987 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
6988 check.
6989 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
6990 to -1.
6991 * target.c (struct thread_search): New structure.
6992 (thread_search_callback): New function.
6993 (prev_general_thread): New global.
6994 (prepare_to_access_memory, done_accessing_memory): New functions.
6995 * target.h (prepare_to_access_memory, done_accessing_memory):
6996 Replace macros with function declarations.
6997
6998 2015-11-30 Pedro Alves <palves@redhat.com>
6999
7000 PR 14618
7001 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
7002 report TARGET_WAITKIND_NO_RESUMED.
7003 * remote-utils.c (prepare_resume_reply): Handle
7004 TARGET_WAITKIND_NO_RESUMED.
7005 * server.c (report_no_resumed): New global.
7006 (handle_query) <qSupported>: Handle "no-resumed+". Report
7007 "no-resumed+" support.
7008 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
7009 return error if the client doesn't support no-resumed events.
7010 (push_stop_notification): New function.
7011 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
7012 events if the client supports them.
7013
7014 2015-11-30 Pedro Alves <palves@redhat.com>
7015
7016 * linux-low.c (thread_still_has_status_pending_p): Don't check
7017 vCont;t here.
7018 (lwp_resumed): New function.
7019 (status_pending_p_callback): Return early if the LWP is not
7020 supposed to be resumed.
7021
7022 2015-11-30 Pedro Alves <palves@redhat.com>
7023
7024 * linux-low.c (handle_extended_wait): Assert that the LWP's
7025 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
7026 thread create events, leave the new child's status pending.
7027 (linux_low_filter_event): If GDB wants to hear about thread exit
7028 events, leave the LWP marked dead and don't delete it.
7029 (linux_wait_for_event_filtered): Don't check for thread exit.
7030 (filter_exit_event): New function.
7031 (linux_wait_1): Use it, when returning an exit event.
7032 (linux_resume_one_lwp_throw): Assert that the LWP's
7033 waitstatus is TARGET_WAITKIND_IGNORE.
7034 * remote-utils.c (prepare_resume_reply): Handle
7035 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
7036 * server.c (report_thread_events): New global.
7037 (handle_general_set): Handle QThreadEvents.
7038 (handle_query) <qSupported>: Handle and report QThreadEvents+;
7039 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
7040 TARGET_WAITKIND_THREAD_EXITED.
7041 * server.h (report_thread_events): Declare.
7042
7043 2015-11-30 Pedro Alves <palves@redhat.com>
7044
7045 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
7046 the thread's last_resume_kind was resume_stop.
7047
7048 2015-11-30 Pedro Alves <palves@redhat.com>
7049
7050 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
7051 before returning.
7052
7053 2015-11-30 Pedro Alves <palves@redhat.com>
7054
7055 * server.c (handle_v_requests): Handle vCtrlC.
7056
7057 2015-11-30 Pedro Alves <palves@redhat.com>
7058
7059 * gdbthread.h (find_any_thread_of_pid): Declare.
7060 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
7061 functions.
7062 * server.c (handle_query): If current_thread is NULL, look for
7063 another thread of the selected process.
7064
7065 2015-11-26 Daniel Colascione <dancol@dancol.org>
7066 Simon Marchi <simon.marchi@ericsson.com>
7067
7068 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
7069 * server.c (handle_qxfer_threads_worker): Refactor to include thread
7070 name in reply.
7071 * target.h (struct target_ops) <thread_name>: New field.
7072 (target_thread_name): New macro.
7073
7074 2015-11-23 Joel Brobecker <brobecker@adacore.com>
7075
7076 * regcache.h (regcache_invalidate_pid): Add declaration.
7077 * regcache.c (regcache_invalidate_pid): New function, extracted
7078 from regcache_invalidate.
7079 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
7080 Add trivial documentation comment.
7081 * lynx-low.c: Use regcache_invalidate_pid instead of
7082 regcache_invalidate.
7083
7084 2015-11-23 Joel Brobecker <brobecker@adacore.com>
7085
7086 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
7087 and Elf64_auxv_t if the target is Android.
7088
7089 2015-11-22 Doug Evans <xdje42@gmail.com>
7090
7091 * target.h: #include <sys/types.h>.
7092
7093 2015-11-19 Pedro Alves <palves@redhat.com>
7094
7095 * linux-low.c (linux_process_qsupported): Change prototype.
7096 Adjust.
7097 * linux-low.h (struct linux_target_ops) <process_qsupported>:
7098 Change prototype.
7099 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
7100 and adjust to loop over all features.
7101 * server.c (handle_query) <qSupported>: Adjust to call
7102 target_process_qsupported once, passing it a vector of unprocessed
7103 features.
7104 * target.h (struct target_ops) <process_qsupported>: Change
7105 prototype.
7106 (target_process_qsupported): Adjust.
7107
7108 2015-11-19 Pedro Alves <palves@redhat.com>
7109
7110 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
7111 mode.
7112 * configure: Regenerate.
7113
7114 2015-11-19 Pedro Alves <palves@redhat.com>
7115
7116 * configure: Regenerate.
7117
7118 2015-11-19 Yao Qi <yao.qi@linaro.org>
7119
7120 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
7121 type to uint32_t.
7122
7123 2015-11-19 Yao Qi <yao.qi@linaro.org>
7124
7125 * linux-aarch64-low.c (enum aarch64_operand_type): New.
7126 (struct aarch64_operand): Move enum out.
7127
7128 2015-11-19 Yao Qi <yao.qi@linaro.org>
7129
7130 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
7131 struct user_fpsimd_state *.
7132 (aarch64_store_fpregset): Likewise.
7133
7134 2015-11-19 Yao Qi <yao.qi@linaro.org>
7135
7136 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
7137 struct user_pt_regs *.
7138 (aarch64_store_gregset): Likewise.
7139
7140 2015-11-18 Pedro Alves <palves@redhat.com>
7141
7142 * Makefile.in (all_object_files): Add $IPA_OBJS.
7143
7144 2015-11-17 Pedro Alves <palves@redhat.com>
7145
7146 * win32-low.c (win32_resume): Use gdb_signal_from_host,
7147 GDB_SIGNAL_0 and gdb_signal_to_string.
7148
7149 2015-11-17 Pedro Alves <palves@redhat.com>
7150
7151 * win32-low.c (handle_output_debug_string): Remove parameter.
7152 (win32_kill): Remove our_status local and adjust call to
7153 handle_output_debug_string.
7154 (get_child_debug_event): Adjust call to
7155 handle_output_debug_string.
7156
7157 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
7158
7159 * linux-mips-low.c (mips_fill_gregset): Add cast.
7160 (mips_store_gregset): Likewise.
7161 (mips_fill_fpregset): Likewise.
7162 (mips_store_fpregset): Likewise.
7163
7164 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
7165
7166 * linux-mips-low.c (mips_add_watchpoint): Rename private to
7167 priv.
7168
7169 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
7170
7171 * linux-mips-low.c (mips_linux_new_thread): Change type of
7172 watch_type to enum target_hw_bp_type.
7173
7174 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
7175
7176 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
7177 Change return type to arm_hwbp_type.
7178
7179 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
7180
7181 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
7182 (arm_store_gregset): Likewise.
7183 * linux-arm-low.c (arm_get_hwcap): Likewise.
7184 (arm_read_description): Likewise.
7185
7186 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
7187
7188 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
7189
7190 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
7191
7192 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
7193 (ppc_fill_vsxregset): Likewise.
7194 (ppc_store_vsxregset): Likewise.
7195 (ppc_fill_vrregset): Likewise.
7196 (ppc_store_vrregset): Likewise.
7197 (ppc_fill_evrregset): Likewise.
7198 (ppc_store_evrregset): Likewise.
7199
7200 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
7201
7202 * linux-ppc-low.c (ppc_usrregs_info): Remove
7203 forward-declaration.
7204 (ppc_arch_setup): Move lower in file.
7205
7206 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
7207
7208 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
7209 (ps_pdwrite): Likewise.
7210
7211 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
7212
7213 * linux-arm-low.c (arm_new_thread): Move pointer dereference
7214 to after assert checks.
7215
7216 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
7217
7218 * proc-service.c (ps_pdread): Add/adjust casts.
7219 (ps_pdwrite): Add/adjust casts.
7220
7221 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
7222
7223 * server.c (handle_search_memory_1): Cast return value of
7224 memmem.
7225
7226 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
7227
7228 * server.c (write_qxfer_response): Change type of data to
7229 gdb_byte *.
7230
7231 2015-10-29 Pedro Alves <palves@redhat.com>
7232
7233 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
7234
7235 2015-10-29 Pedro Alves <palves@redhat.com>
7236
7237 * tracepoint.c (clear_installed_tracepoints): Add casts.
7238
7239 2015-10-29 Pedro Alves <palves@redhat.com>
7240
7241 * server.c (handle_v_cont, process_serial_event): Add enum
7242 gdb_signal casts to signal parsing code.
7243
7244 2015-10-29 Pedro Alves <palves@redhat.com>
7245
7246 * linux-low.h (NULL_REGSET): Define.
7247 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
7248 * linux-arm-low.c (arm_regsets): Likewise.
7249 * linux-crisv32-low.c (cris_regsets): Likewise.
7250 * linux-m68k-low.c (m68k_regsets): Likewise.
7251 * linux-mips-low.c (mips_regsets): Likewise.
7252 * linux-nios2-low.c (nios2_regsets): Likewise.
7253 * linux-ppc-low.c (ppc_regsets): Likewise.
7254 * linux-s390-low.c (s390_regsets): Likewise.
7255 * linux-sh-low.c (sh_regsets): Likewise.
7256 * linux-sparc-low.c (sparc_regsets): Likewise.
7257 * linux-tic6x-low.c (tic6x_regsets): Likewise.
7258 * linux-tile-low.c (tile_regsets): Likewise.
7259 * linux-x86-low.c (x86_regsets): Likewise.
7260 * linux-xtensa-low.c (xtensa_regsets): Likewise.
7261
7262 2015-10-29 Pedro Alves <palves@redhat.com>
7263
7264 * linux-low.h (NULL_REGSET): Define.
7265 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
7266 * linux-arm-low.c (arm_regsets): Likewise.
7267 * linux-crisv32-low.c (cris_regsets): Likewise.
7268 * linux-m68k-low.c (m68k_regsets): Likewise.
7269 * linux-mips-low.c (mips_regsets): Likewise.
7270 * linux-nios2-low.c (nios2_regsets): Likewise.
7271 * linux-ppc-low.c (ppc_regsets): Likewise.
7272 * linux-s390-low.c (s390_regsets): Likewise.
7273 * linux-sh-low.c (sh_regsets): Likewise.
7274 * linux-sparc-low.c (sparc_regsets): Likewise.
7275 * linux-tic6x-low.c (tic6x_regsets): Likewise.
7276 * linux-tile-low.c (tile_regsets): Likewise.
7277 * linux-x86-low.c (x86_regsets): Likewise.
7278 * linux-xtensa-low.c (xtensa_regsets): Likewise.
7279
7280 2015-10-26 Doug Evans <dje@google.com>
7281
7282 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
7283
7284 2015-10-26 Doug Evans <dje@google.com>
7285
7286 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
7287
7288 2015-10-26 Doug Evans <dje@google.com>
7289
7290 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
7291 for debug_printf.
7292 (attach_thread, find_new_threads_callback): Ditto.
7293
7294 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
7295
7296 * mem-break.h (set_breakpoint_data): Remove.
7297
7298 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
7299
7300 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
7301 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
7302 (initialize_low): Remove set_breakpoint_data call.
7303 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
7304 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
7305 (initialize_low): Remove set_breakpoint_data call.
7306 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
7307 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
7308 (initialize_low): Remove set_breakpoint_data call.
7309
7310 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
7311
7312 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
7313 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
7314 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
7315 * target.h (target_breakpoint_kind_from_pc): New macro.
7316
7317 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
7318
7319 * linux-low.c (default_breakpoint_kind_from_pc): New function.
7320 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
7321 the default breakpoint kind.
7322
7323 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
7324
7325 * linux-arm-low.c (arm_supports_z_point_type): Add software
7326 breakpoint support.
7327
7328 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
7329
7330 * linux-arm-low.c: Refactor breakpoint definitions.
7331 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
7332 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
7333
7334 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
7335
7336 * Makefile.in: Add arm.c/o.
7337 * configure.srv: Likewise.
7338 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
7339 (arm_breakpoint_kind_from_pc): New function.
7340 (arm_sw_breakpoint_from_kind): Return proper kind.
7341 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
7342
7343 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
7344
7345 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
7346 removal.
7347 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
7348 (struct raw_breakpoint) <size>: Remove.
7349 (struct raw_breakpoint) <kind>: Add.
7350 (bp_size): New function.
7351 (bp_opcode): Likewise.
7352 (find_raw_breakpoint_at): Adjust for kind.
7353 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
7354 (remove_memory_breakpoint): Adjust for kind call bp_size.
7355 (set_raw_breakpoint_at): Adjust for kind.
7356 (set_breakpoint): Likewise.
7357 (set_breakpoint_at): Call breakpoint_kind_from_pc.
7358 (delete_raw_breakpoint): Adjust for kind.
7359 (delete_breakpoint): Likewise.
7360 (find_gdb_breakpoint): Likewise.
7361 (set_gdb_breakpoint_1): Likewise.
7362 (set_gdb_breakpoint): Likewise.
7363 (delete_gdb_breakpoint_1): Likewise.
7364 (delete_gdb_breakpoint): Likewise.
7365 (uninsert_raw_breakpoint): Likewise.
7366 (reinsert_raw_breakpoint): Likewise.
7367 (set_breakpoint_data): Remove.
7368 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
7369 (check_mem_read): Adjust for kind call bp_size.
7370 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
7371 (clone_one_breakpoint): Adjust for kind.
7372 * mem-break.h (set_gdb_breakpoint): Likewise.
7373 (delete_gdb_breakpoint): Likewise.
7374 * server.c (process_serial_event): Likewise.
7375
7376 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
7377
7378 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
7379 (struct linux_target_ops) <breakpoint>: Remove.
7380 (struct linux_target_ops) <breakpoint_len>: Remove.
7381 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7382 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7383 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
7384 (arm_sw_breakpoint_from_kind): New function.
7385 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
7386 (struct linux_target_ops) <breakpoint>: Remove.
7387 (struct linux_target_ops) <breakpoint_len>: Remove.
7388 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7389 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7390 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
7391 (struct linux_target_ops) <breakpoint>: Remove.
7392 (struct linux_target_ops) <breakpoint_len>: Remove.
7393 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7394 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7395 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
7396 (struct linux_target_ops) <breakpoint>: Remove.
7397 (struct linux_target_ops) <breakpoint_len>: Remove.
7398 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7399 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7400 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
7401 and sw_breakpoint_from_kind to increment the pc.
7402 (linux_breakpoint_kind_from_pc): New function.
7403 (linux_sw_breakpoint_from_kind): New function.
7404 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
7405 (initialize_low): Call breakpoint_kind_from_pc and
7406 sw_breakpoint_from_kind to replace breakpoint_data/len.
7407 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
7408 New field.
7409 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
7410 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
7411 (struct linux_target_ops) <breakpoint>: Remove.
7412 (struct linux_target_ops) <breakpoint_len>: Remove.
7413 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7414 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7415 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
7416 (struct linux_target_ops) <breakpoint>: Remove.
7417 (struct linux_target_ops) <breakpoint_len>: Remove.
7418 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7419 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7420 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
7421 (struct linux_target_ops) <breakpoint>: Remove.
7422 (struct linux_target_ops) <breakpoint_len>: Remove.
7423 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7424 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7425 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
7426 (struct linux_target_ops) <breakpoint>: Remove.
7427 (struct linux_target_ops) <breakpoint_len>: Remove.
7428 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7429 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7430 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
7431 (struct linux_target_ops) <breakpoint>: Remove.
7432 (struct linux_target_ops) <breakpoint_len>: Remove.
7433 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7434 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7435 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
7436 (struct linux_target_ops) <breakpoint>: Remove.
7437 (struct linux_target_ops) <breakpoint_len>: Remove.
7438 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7439 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7440 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
7441 (struct linux_target_ops) <breakpoint>: Remove.
7442 (struct linux_target_ops) <breakpoint_len>: Remove.
7443 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7444 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7445 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
7446 (struct linux_target_ops) <breakpoint>: Remove.
7447 (struct linux_target_ops) <breakpoint_len>: Remove.
7448 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7449 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7450 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
7451 (struct linux_target_ops) <breakpoint>: Remove.
7452 (struct linux_target_ops) <breakpoint_len>: Remove.
7453 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7454 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7455 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
7456 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
7457 (struct linux_target_ops) <breakpoint>: Remove.
7458 (struct linux_target_ops) <breakpoint_len>: Remove.
7459 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7460 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7461 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
7462 (struct linux_target_ops) <breakpoint>: Remove.
7463 (struct linux_target_ops) <breakpoint_len>: Remove.
7464 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7465 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7466
7467 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
7468
7469 * linux-cris-low.c (cris_get_pc): Remove void arg.
7470
7471 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
7472
7473 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
7474 variable name.
7475
7476 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
7477
7478 * inferiors.c (thread_pid_matches_callback): New function.
7479 (find_thread_process): New function.
7480 (remove_thread): Reset current_thread.
7481 (remove_process): Assert threads have been removed first.
7482
7483 2015-10-15 Yao Qi <yao.qi@linaro.org>
7484
7485 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
7486 if it is 3.
7487 (aarch64_remove_point): Likewise.
7488 * regcache.c (regcache_register_size): New function.
7489
7490 2015-10-12 Yao Qi <yao.qi@linaro.org>
7491
7492 * linux-aarch64-low.c: Update all callers as emit_load_store
7493 is renamed to aarch64_emit_load_store.
7494
7495 2015-10-12 Yao Qi <yao.qi@linaro.org>
7496
7497 * linux-aarch64-low.c: Update all callers of function renaming
7498 from emit_insn to aarch64_emit_insn.
7499
7500 2015-10-12 Yao Qi <yao.qi@linaro.org>
7501
7502 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
7503 arch/aarch64-insn.h.
7504 (struct aarch64_memory_operand): Likewise.
7505 (ENCODE): Likewise.
7506 (emit_insn): Move to arch/aarch64-insn.c.
7507 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
7508 (emit_load_store): Move to arch/aarch64-insn.c.
7509 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
7510 (can_encode_int32): Remove.
7511
7512 2015-10-12 Yao Qi <yao.qi@linaro.org>
7513
7514 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
7515 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
7516 (aarch64_relocate_instruction): Likewise.
7517 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
7518 (struct aarch64_insn_visitor): Likewise.
7519
7520 2015-10-12 Yao Qi <yao.qi@linaro.org>
7521
7522 * linux-aarch64-low.c (struct aarch64_insn_data): New.
7523 (struct aarch64_insn_visitor): New.
7524 (struct aarch64_insn_relocation_data): New.
7525 (aarch64_ftrace_insn_reloc_b): New function.
7526 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
7527 (aarch64_ftrace_insn_reloc_cb): Likewise.
7528 (aarch64_ftrace_insn_reloc_tb): Likewise.
7529 (aarch64_ftrace_insn_reloc_adr): Likewise.
7530 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
7531 (aarch64_ftrace_insn_reloc_others): Likewise.
7532 (visitor): New.
7533 (aarch64_relocate_instruction): Use visitor.
7534
7535 2015-10-12 Yao Qi <yao.qi@linaro.org>
7536
7537 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
7538 int. Add argument buf.
7539 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
7540 aarch64_relocate_instruction.
7541
7542 2015-10-12 Yao Qi <yao.qi@linaro.org>
7543
7544 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
7545 argument insn. Remove local variable insn. Don't call
7546 target_read_uint32.
7547 (aarch64_install_fast_tracepoint_jump_pad): Call
7548 target_read_uint32.
7549
7550 2015-09-30 Yao Qi <yao.qi@linaro.org>
7551
7552 * linux-aarch64-low.c (emit_movk): Shorten a long line.
7553 (emit_load_store_pair): Likewise.
7554
7555 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
7556
7557 * dll.c (match_dll): Add cast(s).
7558 (unloaded_dll): Likewise.
7559 * linux-low.c (second_thread_of_pid_p): Likewise.
7560 (delete_lwp_callback): Likewise.
7561 (count_events_callback): Likewise.
7562 (select_event_lwp_callback): Likewise.
7563 (linux_set_resume_request): Likewise.
7564 * server.c (accumulate_file_name_length): Likewise.
7565 (emit_dll_description): Likewise.
7566 (handle_qxfer_threads_worker): Likewise.
7567 (visit_actioned_threads): Likewise.
7568 * thread-db.c (any_thread_of): Likewise.
7569 * tracepoint.c (same_process_p): Likewise.
7570 (match_blocktype): Likewise.
7571 (build_traceframe_info_xml): Likewise.
7572
7573 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
7574
7575 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
7576 assignment.
7577 (gdb_unparse_agent_expr): Likewise.
7578 * hostio.c (require_data): Likewise.
7579 (handle_pread): Likewise.
7580 * linux-low.c (disable_regset): Likewise.
7581 (fetch_register): Likewise.
7582 (store_register): Likewise.
7583 (get_dynamic): Likewise.
7584 (linux_qxfer_libraries_svr4): Likewise.
7585 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
7586 (set_fast_tracepoint_jump): Likewise.
7587 (uninsert_fast_tracepoint_jumps_at): Likewise.
7588 (reinsert_fast_tracepoint_jumps_at): Likewise.
7589 (validate_inserted_breakpoint): Likewise.
7590 (clone_agent_expr): Likewise.
7591 * regcache.c (init_register_cache): Likewise.
7592 * remote-utils.c (putpkt_binary_1): Likewise.
7593 (decode_M_packet): Likewise.
7594 (decode_X_packet): Likewise.
7595 (look_up_one_symbol): Likewise.
7596 (relocate_instruction): Likewise.
7597 (monitor_output): Likewise.
7598 * server.c (handle_search_memory): Likewise.
7599 (handle_qxfer_exec_file): Likewise.
7600 (handle_qxfer_libraries): Likewise.
7601 (handle_qxfer): Likewise.
7602 (handle_query): Likewise.
7603 (handle_v_cont): Likewise.
7604 (handle_v_run): Likewise.
7605 (captured_main): Likewise.
7606 * target.c (write_inferior_memory): Likewise.
7607 * thread-db.c (try_thread_db_load_from_dir): Likewise.
7608 * tracepoint.c (init_trace_buffer): Likewise.
7609 (add_tracepoint_action): Likewise.
7610 (add_traceframe): Likewise.
7611 (add_traceframe_block): Likewise.
7612 (cmd_qtdpsrc): Likewise.
7613 (cmd_qtdv): Likewise.
7614 (cmd_qtstatus): Likewise.
7615 (response_source): Likewise.
7616 (response_tsv): Likewise.
7617 (cmd_qtnotes): Likewise.
7618 (gdb_collect): Likewise.
7619 (initialize_tracepoint): Likewise.
7620
7621 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
7622
7623 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
7624 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
7625 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
7626 <NOP>: New.
7627 (enum aarch64_condition_codes): New enum.
7628 (w0): New static global.
7629 (fp): Likewise.
7630 (lr): Likewise.
7631 (struct aarch64_memory_operand) <type>: New
7632 MEMORY_OPERAND_POSTINDEX type.
7633 (postindex_memory_operand): New helper function.
7634 (emit_ret): New function.
7635 (emit_load_store_pair): New function, factored out of emit_stp
7636 with support for MEMORY_OPERAND_POSTINDEX.
7637 (emit_stp): Rewrite using emit_load_store_pair.
7638 (emit_ldp): New function.
7639 (emit_load_store): Likewise.
7640 (emit_ldr): Mention post-index instruction in comment.
7641 (emit_ldrh): New function.
7642 (emit_ldrb): New function.
7643 (emit_ldrsw): Mention post-index instruction in comment.
7644 (emit_str): Likewise.
7645 (emit_subs): New function.
7646 (emit_cmp): Likewise.
7647 (emit_and): Likewise.
7648 (emit_orr): Likewise.
7649 (emit_orn): Likewise.
7650 (emit_eor): Likewise.
7651 (emit_mvn): Likewise.
7652 (emit_lslv): Likewise.
7653 (emit_lsrv): Likewise.
7654 (emit_asrv): Likewise.
7655 (emit_mul): Likewise.
7656 (emit_sbfm): Likewise.
7657 (emit_sbfx): Likewise.
7658 (emit_ubfm): Likewise.
7659 (emit_ubfx): Likewise.
7660 (emit_csinc): Likewise.
7661 (emit_cset): Likewise.
7662 (emit_nop): Likewise.
7663 (emit_ops_insns): New helper function.
7664 (emit_pop): Likewise.
7665 (emit_push): Likewise.
7666 (aarch64_emit_prologue): New function.
7667 (aarch64_emit_epilogue): Likewise.
7668 (aarch64_emit_add): Likewise.
7669 (aarch64_emit_sub): Likewise.
7670 (aarch64_emit_mul): Likewise.
7671 (aarch64_emit_lsh): Likewise.
7672 (aarch64_emit_rsh_signed): Likewise.
7673 (aarch64_emit_rsh_unsigned): Likewise.
7674 (aarch64_emit_ext): Likewise.
7675 (aarch64_emit_log_not): Likewise.
7676 (aarch64_emit_bit_and): Likewise.
7677 (aarch64_emit_bit_or): Likewise.
7678 (aarch64_emit_bit_xor): Likewise.
7679 (aarch64_emit_bit_not): Likewise.
7680 (aarch64_emit_equal): Likewise.
7681 (aarch64_emit_less_signed): Likewise.
7682 (aarch64_emit_less_unsigned): Likewise.
7683 (aarch64_emit_ref): Likewise.
7684 (aarch64_emit_if_goto): Likewise.
7685 (aarch64_emit_goto): Likewise.
7686 (aarch64_write_goto_address): Likewise.
7687 (aarch64_emit_const): Likewise.
7688 (aarch64_emit_call): Likewise.
7689 (aarch64_emit_reg): Likewise.
7690 (aarch64_emit_pop): Likewise.
7691 (aarch64_emit_stack_flush): Likewise.
7692 (aarch64_emit_zero_ext): Likewise.
7693 (aarch64_emit_swap): Likewise.
7694 (aarch64_emit_stack_adjust): Likewise.
7695 (aarch64_emit_int_call_1): Likewise.
7696 (aarch64_emit_void_call_2): Likewise.
7697 (aarch64_emit_eq_goto): Likewise.
7698 (aarch64_emit_ne_goto): Likewise.
7699 (aarch64_emit_lt_goto): Likewise.
7700 (aarch64_emit_le_goto): Likewise.
7701 (aarch64_emit_gt_goto): Likewise.
7702 (aarch64_emit_ge_got): Likewise.
7703 (aarch64_emit_ops_impl): New static global variable.
7704 (aarch64_emit_ops): New target function, return
7705 &aarch64_emit_ops_impl.
7706 (struct linux_target_ops): Install it.
7707
7708 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
7709
7710 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
7711 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
7712 aarch64-ipa.o.
7713 * linux-aarch64-ipa.c: New file.
7714 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
7715 and endian.h.
7716 (aarch64_get_thread_area): New target method.
7717 (extract_signed_bitfield): New helper function.
7718 (aarch64_decode_ldr_literal): New function.
7719 (enum aarch64_opcodes): New enum.
7720 (struct aarch64_register): New struct.
7721 (struct aarch64_operand): New struct.
7722 (x0): New static global.
7723 (x1): Likewise.
7724 (x2): Likewise.
7725 (x3): Likewise.
7726 (x4): Likewise.
7727 (w2): Likewise.
7728 (ip0): Likewise.
7729 (sp): Likewise.
7730 (xzr): Likewise.
7731 (aarch64_register): New helper function.
7732 (register_operand): Likewise.
7733 (immediate_operand): Likewise.
7734 (struct aarch64_memory_operand): New struct.
7735 (offset_memory_operand): New helper function.
7736 (preindex_memory_operand): Likewise.
7737 (enum aarch64_system_control_registers): New enum.
7738 (ENCODE): New macro.
7739 (emit_insn): New helper function.
7740 (emit_b): New function.
7741 (emit_bcond): Likewise.
7742 (emit_cb): Likewise.
7743 (emit_tb): Likewise.
7744 (emit_blr): Likewise.
7745 (emit_stp): Likewise.
7746 (emit_ldp_q_offset): Likewise.
7747 (emit_stp_q_offset): Likewise.
7748 (emit_load_store): Likewise.
7749 (emit_ldr): Likewise.
7750 (emit_ldrsw): Likewise.
7751 (emit_str): Likewise.
7752 (emit_ldaxr): Likewise.
7753 (emit_stxr): Likewise.
7754 (emit_stlr): Likewise.
7755 (emit_data_processing_reg): Likewise.
7756 (emit_data_processing): Likewise.
7757 (emit_add): Likewise.
7758 (emit_sub): Likewise.
7759 (emit_mov): Likewise.
7760 (emit_movk): Likewise.
7761 (emit_mov_addr): Likewise.
7762 (emit_mrs): Likewise.
7763 (emit_msr): Likewise.
7764 (emit_sevl): Likewise.
7765 (emit_wfe): Likewise.
7766 (append_insns): Likewise.
7767 (can_encode_int32_in): New helper function.
7768 (aarch64_relocate_instruction): New function.
7769 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
7770 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
7771 (struct linux_target_ops): Install aarch64_get_thread_area,
7772 aarch64_install_fast_tracepoint_jump_pad and
7773 aarch64_get_min_fast_tracepoint_insn_len.
7774
7775 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
7776
7777 * Makefile.in (aarch64-insn.o): New rule.
7778 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
7779
7780 2015-09-21 Yao Qi <yao.qi@linaro.org>
7781
7782 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
7783
7784 2015-09-21 Yao Qi <yao.qi@linaro.org>
7785
7786 * tracepoint.c (max_jump_pad_size): Remove.
7787
7788 2015-09-18 Yao Qi <yao.qi@linaro.org>
7789
7790 * linux-aarch64-low.c: Don't include sys/uio.h.
7791 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
7792
7793 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
7794
7795 * tracepoint.c (eval_result_type): Change prototype.
7796 (condition_true_at_tracepoint): Fix argument to compiled_cond.
7797
7798 2015-09-15 Pedro Alves <palves@redhat.com>
7799
7800 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
7801 Check whether to report exec events instead of checking whether
7802 multiprocess is enabled.
7803
7804 2015-09-15 Pedro Alves <palves@redhat.com>
7805
7806 PR remote/18965
7807 * remote-utils.c (prepare_resume_reply): Merge
7808 TARGET_WAITKIND_VFORK_DONE switch case with the
7809 TARGET_WAITKIND_FORKED case.
7810
7811 2015-09-15 Yao Qi <yao.qi@linaro.org>
7812
7813 * server.c (handle_query): Check string comparison using
7814 "else if" instead of "if".
7815
7816 2015-09-15 Yao Qi <yao.qi@linaro.org>
7817
7818 * server.c (vCont_supported): New global variable.
7819 (handle_query): Set vCont_supported to 1 if "vContSupported+"
7820 matches. Append ";vContSupported+" to own_buf.
7821 (handle_v_requests): Append ";s;S" to own_buf if target supports
7822 hardware single step or vCont_supported is false.
7823 (capture_main): Set vCont_supported to zero.
7824
7825 2015-09-15 Yao Qi <yao.qi@linaro.org>
7826
7827 * linux-low.c (linux_supports_conditional_breakpoints): Rename
7828 it to ...
7829 (linux_supports_hardware_single_step): ... New function.
7830 (linux_target_ops): Update.
7831 * lynx-low.c (lynx_target_ops): Set field
7832 supports_hardware_single_step to target_can_do_hardware_single_step.
7833 * nto-low.c (nto_target_ops): Likewise.
7834 * spu-low.c (spu_target_ops): Likewise.
7835 * win32-low.c (win32_target_ops): Likewise.
7836 * target.c (target_can_do_hardware_single_step): New function.
7837 * target.h (struct target_ops) <supports_conditional_breakpoints>:
7838 Remove. <supports_hardware_single_step>: New field.
7839 (target_supports_conditional_breakpoints): Remove.
7840 (target_supports_hardware_single_step): New macro.
7841 (target_can_do_hardware_single_step): Declare.
7842 * server.c (handle_query): Use target_supports_hardware_single_step
7843 instead of target_supports_conditional_breakpoints.
7844
7845 2015-09-15 Yao Qi <yao.qi@linaro.org>
7846
7847 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
7848 function.
7849 (struct linux_target_ops the_low_target): Install
7850 aarch64_linux_siginfo_fixup.
7851
7852 2015-09-11 Don Breazeal <donb@codesourcery.com>
7853 Luis Machado <lgustavo@codesourcery.com>
7854
7855 * linux-low.c (linux_mourn): Static declaration.
7856 (linux_arch_setup): Move in front of
7857 handle_extended_wait.
7858 (linux_arch_setup_thread): New function.
7859 (handle_extended_wait): Handle exec events. Call
7860 linux_arch_setup_thread. Make event_lwp argument a
7861 pointer-to-a-pointer.
7862 (check_zombie_leaders): Do not check stopped threads.
7863 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
7864 (linux_low_filter_event): Add lwp and thread for exec'ing
7865 non-leader thread if leader thread has been deleted.
7866 Refactor code into linux_arch_setup_thread and call it.
7867 Pass child lwp pointer by reference to handle_extended_wait.
7868 (linux_wait_for_event_filtered): Update comment.
7869 (linux_wait_1): Prevent clobbering exec event status.
7870 (linux_supports_exec_events): New function.
7871 (linux_target_ops) <supports_exec_events>: Initialize new member.
7872 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
7873 new member.
7874 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
7875 * server.c (report_exec_events): New global variable.
7876 (handle_query): Handle qSupported query for exec-events feature.
7877 (captured_main): Initialize report_exec_events.
7878 * server.h (report_exec_events): Declare new global variable.
7879 * target.h (struct target_ops) <supports_exec_events>: New
7880 member.
7881 (target_supports_exec_events): New macro.
7882 * win32-low.c (win32_target_ops) <supports_exec_events>:
7883 Initialize new member.
7884
7885 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
7886
7887 * linux-low.c (linux_low_enable_btrace): Remove.
7888 (linux_target_ops): Replace linux_low_enable_btrace with
7889 linux_enable_btrace.
7890
7891 2015-09-03 Yao Qi <yao.qi@linaro.org>
7892
7893 * linux-aarch64-low.c (aarch64_insert_point): Call
7894 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
7895 returns true.
7896
7897 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
7898
7899 * linux-low.c (check_stopped_by_breakpoint): Use
7900 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
7901
7902 2015-08-27 Pedro Alves <palves@redhat.com>
7903
7904 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
7905
7906 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
7907
7908 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
7909 the XNEW-family equivalent.
7910 (compile_bytecodes): Likewise.
7911 * dll.c (loaded_dll): Likewise.
7912 * event-loop.c (append_callback_event): Likewise.
7913 (create_file_handler): Likewise.
7914 (create_file_event): Likewise.
7915 * hostio.c (handle_open): Likewise.
7916 * inferiors.c (add_thread): Likewise.
7917 (add_process): Likewise.
7918 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
7919 * linux-arm-low.c (arm_new_process): Likewise.
7920 (arm_new_thread): Likewise.
7921 * linux-low.c (add_to_pid_list): Likewise.
7922 (linux_add_process): Likewise.
7923 (handle_extended_wait): Likewise.
7924 (add_lwp): Likewise.
7925 (enqueue_one_deferred_signal): Likewise.
7926 (enqueue_pending_signal): Likewise.
7927 (linux_resume_one_lwp_throw): Likewise.
7928 (linux_resume_one_thread): Likewise.
7929 (linux_read_memory): Likewise.
7930 (linux_write_memory): Likewise.
7931 * linux-mips-low.c (mips_linux_new_process): Likewise.
7932 (mips_linux_new_thread): Likewise.
7933 (mips_add_watchpoint): Likewise.
7934 * linux-x86-low.c (initialize_low_arch): Likewise.
7935 * lynx-low.c (lynx_add_process): Likewise.
7936 * mem-break.c (set_raw_breakpoint_at): Likewise.
7937 (set_breakpoint): Likewise.
7938 (add_condition_to_breakpoint): Likewise.
7939 (add_commands_to_breakpoint): Likewise.
7940 (clone_agent_expr): Likewise.
7941 (clone_one_breakpoint): Likewise.
7942 * regcache.c (new_register_cache): Likewise.
7943 * remote-utils.c (look_up_one_symbol): Likewise.
7944 * server.c (queue_stop_reply): Likewise.
7945 (start_inferior): Likewise.
7946 (queue_stop_reply_callback): Likewise.
7947 (handle_target_event): Likewise.
7948 * spu-low.c (fetch_ppc_memory): Likewise.
7949 (store_ppc_memory): Likewise.
7950 * target.c (set_target_ops): Likewise.
7951 * thread-db.c (thread_db_load_search): Likewise.
7952 (try_thread_db_load_1): Likewise.
7953 * tracepoint.c (add_tracepoint): Likewise.
7954 (add_tracepoint_action): Likewise.
7955 (create_trace_state_variable): Likewise.
7956 (cmd_qtdpsrc): Likewise.
7957 (cmd_qtro): Likewise.
7958 (add_while_stepping_state): Likewise.
7959 * win32-low.c (child_add_thread): Likewise.
7960 (get_image_name): Likewise.
7961
7962 2015-08-25 Yao Qi <yao.qi@linaro.org>
7963
7964 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
7965
7966 2015-08-25 Yao Qi <yao.qi@linaro.org>
7967
7968 * Makefile.in (aarch64-linux.o): New rule.
7969 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
7970 srv_tgtobj.
7971 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
7972 (aarch64_init_debug_reg_state): Make it extern.
7973 (aarch64_linux_prepare_to_resume): Remove.
7974
7975 2015-08-25 Yao Qi <yao.qi@linaro.org>
7976
7977 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
7978 lwp_arch_private_info and ptid_of_lwp.
7979
7980 2015-08-25 Yao Qi <yao.qi@linaro.org>
7981
7982 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
7983 Find proc_info by find_process_pid. All callers updated.
7984
7985 2015-08-25 Yao Qi <yao.qi@linaro.org>
7986
7987 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
7988 Remove.
7989 (debug_reg_change_callback): Remove.
7990 (aarch64_notify_debug_reg_change): Remove.
7991
7992 2015-08-25 Yao Qi <yao.qi@linaro.org>
7993
7994 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
7995 Call current_lwp_ptid.
7996
7997 2015-08-25 Yao Qi <yao.qi@linaro.org>
7998
7999 * linux-aarch64-low.c (debug_reg_change_callback): Use
8000 debug_printf.
8001
8002 2015-08-25 Yao Qi <yao.qi@linaro.org>
8003
8004 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
8005
8006 2015-08-25 Yao Qi <yao.qi@linaro.org>
8007
8008 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
8009
8010 2015-08-25 Yao Qi <yao.qi@linaro.org>
8011
8012 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
8013 the code.
8014
8015 2015-08-25 Yao Qi <yao.qi@linaro.org>
8016
8017 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
8018 Remove.
8019 (debug_reg_change_callback): Remove argument entry and add argument
8020 lwp. Remove local variable thread. Don't print thread id in the
8021 debugging output. Don't check whether pid of thread equals to pid.
8022 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
8023 iterate_over_lwps instead find_inferior.
8024
8025 2015-08-24 Pedro Alves <palves@redhat.com>
8026
8027 * inferiors.c (get_first_process): New function.
8028 * inferiors.h (get_first_process): New declaration.
8029 * remote-utils.c (read_ptid): Default to the first process in the
8030 list, instead of to the current thread's process.
8031
8032 2015-08-24 Pedro Alves <palves@redhat.com>
8033
8034 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
8035 * event-loop.c: Likewise.
8036 * remote-utils.c: Likewise.
8037 * tracepoint.c: Likewise.
8038
8039 2015-08-24 Pedro Alves <palves@redhat.com>
8040
8041 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
8042 ptid_get_lwp.
8043
8044 2015-08-21 Pedro Alves <palves@redhat.com>
8045
8046 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
8047 instead of literal 1.
8048
8049 2015-08-21 Pedro Alves <palves@redhat.com>
8050
8051 * tdesc.c (default_description): Explicitly zero-initialize.
8052
8053 2015-08-21 Pedro Alves <palves@redhat.com>
8054
8055 PR gdb/18749
8056 * inferiors.c (remove_thread): Discard any pending stop reply for
8057 this thread.
8058 * server.c (remove_all_on_match_pid): Rename to ...
8059 (remove_all_on_match_ptid): ... this. Work with a filter ptid
8060 instead of a pid.
8061 (discard_queued_stop_replies): Change parameter to a ptid. Now
8062 extern.
8063 (handle_v_kill, kill_inferior_callback, captured_main)
8064 (process_serial_event): Adjust.
8065 * server.h (discard_queued_stop_replies): Declare.
8066
8067 2015-08-21 Pedro Alves <palves@redhat.com>
8068
8069 * linux-low.c (wait_for_sigstop): Always switch to no thread
8070 selected if the previously current thread dies.
8071 * lynx-low.c (lynx_request_interrupt): Use the first thread's
8072 process instead of the current thread's.
8073 * remote-utils.c (input_interrupt): Don't check if there's no
8074 current thread.
8075 * server.c (gdb_read_memory, gdb_write_memory): If setting the
8076 current thread to the general thread fails, error out.
8077 (handle_qxfer_auxv, handle_qxfer_libraries)
8078 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
8079 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
8080 (handle_query): Check if there's a thread selected instead of
8081 checking whether there's any thread in the thread list.
8082 (handle_qxfer_threads, handle_qxfer_btrace)
8083 (handle_qxfer_btrace_conf): Don't error out early if there's no
8084 thread in the thread list.
8085 (handle_v_cont, myresume): Don't set the current thread to the
8086 continue thread.
8087 (process_serial_event) <Hg handling>: Also set thread_id if the
8088 previous general thread is still alive.
8089 (process_serial_event) <g/G handling>: If setting the current
8090 thread to the general thread fails, error out.
8091 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
8092 thread's lwp instead of the current thread's.
8093 * target.c (set_desired_thread): If the desired thread was not
8094 found, leave the current thread pointing to NULL. Return an int
8095 (boolean) indicating success.
8096 * target.h (set_desired_thread): Change return type to int.
8097
8098 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
8099
8100 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
8101 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
8102 #includes.
8103 (ps_get_thread_area): New function.
8104
8105 2015-08-19 Gary Benson <gbenson@redhat.com>
8106
8107 * hostio.c (handle_pread): Do not attempt to read more data
8108 than hostio_reply_with_data can fit in a packet.
8109
8110 2015-08-18 Joel Brobecker <brobecker@adacore.com>
8111
8112 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
8113
8114 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
8115
8116 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
8117
8118 2015-08-06 Pedro Alves <palves@redhat.com>
8119
8120 * tracepoint.c (expr_eval_result): Now an int.
8121
8122 2015-08-06 Pedro Alves <palves@redhat.com>
8123
8124 * gdbthread.h (struct regcache): Forward declare.
8125 (struct thread_info) <regcache_data>: Now a struct regcache
8126 pointer.
8127 * inferiors.c (inferior_regcache_data)
8128 (set_inferior_regcache_data): Now work with struct regcache
8129 pointers.
8130 * inferiors.h (struct regcache): Forward declare.
8131 (inferior_regcache_data, set_inferior_regcache_data): Now work
8132 with struct regcache pointers.
8133 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
8134 (free_register_cache_thread): Remove struct regcache pointer
8135 casts.
8136
8137 2015-08-06 Pedro Alves <palves@redhat.com>
8138
8139 * server.c (captured_main): On error, print the exception message
8140 to stderr, and if run_once is set, throw a quit.
8141
8142 2015-08-06 Pedro Alves <palves@redhat.com>
8143
8144 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
8145 the current thread.
8146
8147 2015-08-06 Pedro Alves <palves@redhat.com>
8148
8149 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
8150 reading beyond the passed in buffer length.
8151
8152 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
8153
8154 * tracepoint.c (symbol_list) <required>: Remove.
8155
8156 2015-08-06 Pedro Alves <palves@redhat.com>
8157
8158 * linux-low.c (handle_extended_wait): Set the fork child's suspend
8159 count if stopping and suspending threads.
8160 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
8161 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
8162 (linux_detach): Complete an ongoing step-over.
8163 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
8164 throughout.
8165 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
8166 (linux_wait_1): If passing a signal to the inferior after
8167 finishing a step-over, unsuspend and re-resume all lwps. If we
8168 see a single-step event but the thread should be continuing, don't
8169 pass the trap to gdb.
8170 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
8171 internal_error instead of gdb_assert.
8172 (enqueue_pending_signal): New function.
8173 (check_ptrace_stopped_lwp_gone): Add debug output.
8174 (start_step_over): Use internal_error instead of gdb_assert.
8175 (complete_ongoing_step_over): New function.
8176 (linux_resume_one_thread): Don't resume a suspended thread.
8177 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
8178 it stepping.
8179
8180 2015-08-06 Pedro Alves <palves@redhat.com>
8181
8182 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
8183 (linux_thread_alive): Use lwp_is_marked_dead.
8184 (extended_event_reported): Delete.
8185 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
8186 instead of extended_event_reported.
8187 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
8188 as well.
8189 (lwp_is_marked_dead): New function.
8190 (lwp_running): Use lwp_is_marked_dead.
8191 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
8192 comment.
8193
8194 2015-08-06 Pedro Alves <palves@redhat.com>
8195
8196 * linux-low.c (linux_wait_1): Move fork event output out of the
8197 !report_to_gdb check. Pass event_child->waitstatus to
8198 target_waitstatus_to_string instead of ourstatus.
8199
8200 2015-08-04 Yao Qi <yao.qi@linaro.org>
8201
8202 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
8203 if current_thread is 32 bit.
8204
8205 2015-08-04 Yao Qi <yao.qi@linaro.org>
8206
8207 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
8208 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
8209 * server.c (extended_protocol): Remove "static".
8210 * server.h (extended_protocol): Declare it.
8211
8212 2015-08-04 Yao Qi <yao.qi@linaro.org>
8213
8214 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
8215 both aarch64 and aarch32.
8216 (aarch64_set_pc): Likewise.
8217
8218 2015-08-04 Yao Qi <yao.qi@linaro.org>
8219
8220 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
8221 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
8222 arm-with-neon.xml to srv_xmlfiles.
8223 * linux-aarch64-low.c: Include linux-aarch32-low.h.
8224 (is_64bit_tdesc): New function.
8225 (aarch64_linux_read_description): New function.
8226 (aarch64_arch_setup): Call aarch64_linux_read_description.
8227 (regs_info): Rename to regs_info_aarch64.
8228 (aarch64_regs_info): Return right regs_info.
8229 (initialize_low_arch): Call initialize_low_arch_aarch32.
8230
8231 2015-08-04 Yao Qi <yao.qi@linaro.org>
8232
8233 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
8234 * linux-aarch32-low.c: New file.
8235 * linux-aarch32-low.h: New file.
8236 * linux-arm-low.c (arm_fill_gregset): Move it to
8237 linux-aarch32-low.c.
8238 (arm_store_gregset): Likewise.
8239 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
8240 (arm_store_vfpregset): Call arm_store_vfpregset_num.
8241 (arm_arch_setup): Check if PTRACE_GETREGSET works.
8242 (regs_info): Rename to regs_info_arm.
8243 (arm_regs_info): Return regs_info_aarch32 if
8244 have_ptrace_getregset is 1 and target description is
8245 arm_with_neon or arm_with_vfpv3.
8246 (initialize_low_arch): Don't call init_registers_arm_with_neon.
8247 Call initialize_low_arch_aarch32 instead.
8248
8249 2015-08-04 Yao Qi <yao.qi@linaro.org>
8250
8251 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
8252 * linux-low.c: ... here.
8253 * linux-low.h (have_ptrace_getregset): Declare it.
8254
8255 2015-08-04 Pedro Alves <palves@redhat.com>
8256
8257 * thread-db.c (struct thread_db): Use new typedefs.
8258 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
8259 CHK calls.
8260 (disable_thread_event_reporting): Cast result of dlsym to
8261 destination function pointer type.
8262 (thread_db_mourn): Use td_ta_delete_ftype.
8263
8264 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
8265
8266 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
8267 arch variant.
8268 (CDX_BREAKPOINT): Define for R2.
8269 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
8270 (the_low_target): Add comments.
8271
8272 2015-07-30 Yao Qi <yao.qi@linaro.org>
8273
8274 * linux-arm-low.c (arm_hwcap): Remove it.
8275 (arm_read_description): New local variable arm_hwcap. Don't
8276 set arm_hwcap to zero.
8277
8278 2015-07-30 Yao Qi <yao.qi@linaro.org>
8279
8280 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
8281 Use regcache->tdesc instead.
8282 (arm_store_wmmxregset): Likewise.
8283 (arm_fill_vfpregset): Likewise.
8284 (arm_store_vfpregset): Likewise.
8285
8286 2015-07-30 Yao Qi <yao.qi@linaro.org>
8287
8288 * linux-arm-low.c: Include arch/arm.h.
8289 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
8290 (arm_store_gregset): Likewise.
8291
8292 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
8293
8294 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
8295 ptrace's 4th parameter.
8296
8297 2015-07-27 Yao Qi <yao.qi@linaro.org>
8298
8299 * configure.srv (case aarch64*-*-linux*): Don't set
8300 srv_linux_usrregs.
8301
8302 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
8303
8304 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
8305 sys/ptrace.h.
8306 * linux-arm-low.c: Likewise.
8307 * linux-cris-low.c: Likewise.
8308 * linux-crisv32-low.c: Likewise.
8309 * linux-low.c: Likewise.
8310 * linux-m68k-low.c: Likewise.
8311 * linux-mips-low.c: Likewise.
8312 * linux-nios2-low.c: Likewise.
8313 * linux-s390-low.c: Likewise.
8314 * linux-sparc-low.c: Likewise.
8315 * linux-tic6x-low.c: Likewise.
8316 * linux-tile-low.c: Likewise.
8317 * linux-x86-low.c: Likewise.
8318
8319 2015-07-24 Pedro Alves <palves@redhat.com>
8320
8321 * config.in: Regenerate.
8322 * configure: Regenerate.
8323
8324 2015-07-24 Pedro Alves <palves@redhat.com>
8325
8326 * acinclude.m4: Include ../ptrace.m4.
8327 * configure.ac: Call GDB_AC_PTRACE.
8328 * config.in, configure: Regenerate.
8329
8330 2015-07-24 Yao Qi <yao.qi@linaro.org>
8331
8332 * linux-low.c (linux_create_inferior): Remove setting to
8333 proc->priv->new_inferior.
8334 (linux_attach): Likewise.
8335 (linux_low_filter_event): Likewise.
8336 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
8337
8338 2015-07-24 Yao Qi <yao.qi@linaro.org>
8339
8340 * linux-low.c (linux_arch_setup): New function.
8341 (linux_low_filter_event): If proc->tdesc is NULL and
8342 proc->attached is true, call the_low_target.arch_setup.
8343 Otherwise, keep status pending, and return.
8344 (linux_resume_one_lwp_throw): Don't call get_pc if
8345 thread->while_stepping isn't NULL. Don't call
8346 get_thread_regcache if proc->tdesc is NULL.
8347 (need_step_over_p): Return 0 if proc->tdesc is NULL.
8348 (linux_target_ops): Install arch_setup.
8349 * server.c (start_inferior): Call the_target->arch_setup.
8350 * target.h (struct target_ops) <arch_setup>: New field.
8351 (target_arch_setup): New marco.
8352 * lynx-low.c (lynx_target_ops): Update.
8353 * nto-low.c (nto_target_ops): Update.
8354 * spu-low.c (spu_target_ops): Update.
8355 * win32-low.c (win32_target_ops): Update.
8356
8357 2015-07-24 Yao Qi <yao.qi@linaro.org>
8358
8359 * linux-low.c (linux_add_process): Don't set
8360 proc->priv->new_inferior.
8361 (linux_create_inferior): Set proc->priv->new_inferior to 1.
8362 (linux_attach): Likewise.
8363
8364 2015-07-24 Yao Qi <yao.qi@linaro.org>
8365
8366 * server.c (start_inferior): Code refactor.
8367
8368 2015-07-24 Yao Qi <yao.qi@linaro.org>
8369
8370 * server.c (process_serial_event): Set general_thread.
8371
8372 2015-07-21 Yao Qi <yao.qi@linaro.org>
8373
8374 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
8375 aarch64_linux_get_debug_reg_capacity.
8376
8377 2015-07-17 Yao Qi <yao.qi@linaro.org>
8378
8379 * Makefile.in (aarch64-linux-hw-point.o): New rule.
8380 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
8381 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
8382 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
8383 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
8384 (AARCH64_HWP_ALIGNMENT): Likewise.
8385 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
8386 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
8387 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
8388 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
8389 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
8390 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
8391 (struct aarch64_debug_reg_state): Likewise.
8392 (struct arch_lwp_info): Likewise.
8393 (aarch64_align_watchpoint): Likewise.
8394 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
8395 (aarch64_watchpoint_length): Likewise.
8396 (aarch64_point_encode_ctrl_reg): Likewise
8397 (aarch64_point_is_aligned): Likewise.
8398 (aarch64_align_watchpoint): Likewise.
8399 (aarch64_linux_set_debug_regs):
8400 (aarch64_dr_state_insert_one_point): Likewise.
8401 (aarch64_dr_state_remove_one_point): Likewise.
8402 (aarch64_handle_breakpoint): Likewise.
8403 (aarch64_handle_aligned_watchpoint): Likewise.
8404 (aarch64_handle_unaligned_watchpoint): Likewise.
8405 (aarch64_handle_watchpoint): Likewise.
8406
8407 2015-07-17 Yao Qi <yao.qi@linaro.org>
8408
8409 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
8410 and don't aarch64_get_debug_reg_state. All callers update.
8411 (aarch64_handle_aligned_watchpoint): Likewise.
8412 (aarch64_handle_unaligned_watchpoint): Likewise.
8413 (aarch64_handle_watchpoint): Likewise.
8414 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
8415 (aarch64_remove_point): Likewise.
8416
8417 2015-07-17 Yao Qi <yao.qi@linaro.org>
8418
8419 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
8420 debug_printf.
8421 (aarch64_handle_unaligned_watchpoint): Likewise.
8422
8423 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
8424
8425 Revert the previous 3 commits:
8426 Move gdb_regex* to common/
8427 Move linux_find_memory_regions_full & co.
8428 gdbserver build-id attribute generator
8429
8430 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
8431 Jan Kratochvil <jan.kratochvil@redhat.com>
8432
8433 gdbserver build-id attribute generator.
8434 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
8435 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
8436 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
8437 (find_phdr): New.
8438 (get_dynamic): Use find_pdhr to traverse program headers.
8439 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
8440 (compare_mapping_entry_range, struct find_memory_region_callback_data)
8441 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
8442 (get_hex_build_id): New.
8443 (linux_qxfer_libraries_svr4): Add optional build-id attribute
8444 to reply XML document.
8445
8446 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
8447 Jan Kratochvil <jan.kratochvil@redhat.com>
8448
8449 * target.c: Include target/target-utils.h and fcntl.h.
8450 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
8451 (target_fileio_read_stralloc): New functions.
8452
8453 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
8454
8455 * Makefile.in (OBS): Add gdb_regex.o.
8456 (gdb_regex.o): New.
8457 * config.in: Rebuilt.
8458 * configure: Rebuilt.
8459
8460 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
8461 Jan Kratochvil <jan.kratochvil@redhat.com>
8462
8463 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
8464 * Makefile.in (OBS): Add target-utils.o.
8465 (linux-maps.o, target-utils.o): New.
8466 * configure.srv (srv_linux_obj): Add linux-maps.o.
8467
8468 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
8469
8470 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
8471 function, return 1.
8472 (the_low_target): Install it.
8473
8474 2015-07-14 Pedro Alves <palves@redhat.com>
8475
8476 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
8477 Instead, ignore ECHILD, and throw an error for other errnos.
8478
8479 2015-07-10 Pedro Alves <palves@redhat.com>
8480
8481 * event-loop.c (struct callback_event) <data>: Change type to
8482 gdb_client_data instance instead of gdb_client_data pointer.
8483 (append_callback_event): Adjust.
8484
8485 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
8486
8487 * linux-aarch64-low.c: Add comments for each linux_target_ops
8488 method. Remove comments already covered in target_ops and
8489 linux_target_ops definitions.
8490 (the_low_target): Add comments for each unimplemented method.
8491
8492 2015-07-09 Yao Qi <yao.qi@linaro.org>
8493
8494 * linux-aarch64-low.c (aarch64_regmap): Remove.
8495 (aarch64_usrregs_info): Remove.
8496 (regs_info): Set field usrregs to NULL.
8497
8498 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
8499
8500 * linux-low.c: Include "rsp-low.h"
8501 (linux_low_encode_pt_config, linux_low_encode_raw): New.
8502 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
8503 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
8504 (handle_btrace_enable_pt): New.
8505 (handle_btrace_general_set): Support "pt".
8506 (handle_btrace_conf_general_set): Support "pt:size".
8507
8508 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
8509
8510 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
8511 Z_PACKET_SW_BP.
8512
8513 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
8514
8515 * linux-aarch64-low.c: Remove comment about endianness.
8516 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
8517 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
8518 memcmp.
8519
8520 2015-06-24 Gary Benson <gbenson@redhat.com>
8521
8522 * linux-i386-ipa.c (stdint.h): Do not include.
8523 * lynx-i386-low.c (stdint.h): Likewise.
8524 * lynx-ppc-low.c (stdint.h): Likewise.
8525 * mem-break.c (stdint.h): Likewise.
8526 * thread-db.c (stdint.h): Likewise.
8527 * tracepoint.c (stdint.h): Likewise.
8528 * win32-low.c (stdint.h): Likewise.
8529
8530 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
8531
8532 * server.c (write_qxfer_response): Update call to
8533 remote_escape_output.
8534
8535 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
8536 Jan Kratochvil <jan.kratochvil@redhat.com>
8537
8538 Merge multiple hex conversions.
8539 * gdbreplay.c (tohex): Rename to 'fromhex'.
8540 (logchar): Use fromhex.
8541
8542 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
8543
8544 * server.c (handle_qxfer_libraries): Set `version' attribute for
8545 <library-list>.
8546
8547 2015-06-10 Gary Benson <gbenson@redhat.com>
8548
8549 * target.h (struct target_ops) <multifs_open>: New field.
8550 <multifs_unlink>: Likewise.
8551 <multifs_readlink>: Likewise.
8552 * linux-low.c (nat/linux-namespaces.h): New include.
8553 (linux_target_ops): Initialize the_target->multifs_open,
8554 the_target->multifs_unlink and the_target->multifs_readlink.
8555 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
8556 * hostio.c (hostio_fs_pid): New static variable.
8557 (hostio_handle_new_gdb_connection): New function.
8558 (handle_setfs): Likewise.
8559 (handle_open): Use the_target->multifs_open as appropriate.
8560 (handle_unlink): Use the_target->multifs_unlink as appropriate.
8561 (handle_readlink): Use the_target->multifs_readlink as
8562 appropriate.
8563 (handle_vFile): Handle vFile:setfs packets.
8564 * server.c (handle_query): Call hostio_handle_new_gdb_connection
8565 after target_handle_new_gdb_connection.
8566
8567 2015-06-10 Gary Benson <gbenson@redhat.com>
8568
8569 * configure.ac (AC_CHECK_FUNCS): Add setns.
8570 * config.in: Regenerate.
8571 * configure: Likewise.
8572 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
8573 (linux-namespaces.o): New rule.
8574 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
8575
8576 2015-06-09 Gary Benson <gbenson@redhat.com>
8577
8578 * hostio.c (handle_open): Process mode argument with
8579 fileio_to_host_mode.
8580
8581 2015-06-01 Yao Qi <yao.qi@linaro.org>
8582
8583 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
8584 * linux-x86-low.c: Likewise.
8585
8586 2015-05-28 Don Breazeal <donb@codesourcery.com>
8587
8588 * linux-low.c (handle_extended_wait): Initialize
8589 thread_info.last_resume_kind for new fork children.
8590
8591 2015-05-15 Pedro Alves <palves@redhat.com>
8592
8593 * target.h (target_handle_new_gdb_connection): Rewrite using if
8594 wrapped in do/while.
8595
8596 2015-05-14 Joel Brobecker <brobecker@adacore.com>
8597
8598 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
8599 * configure, config.in: Regenerate.
8600 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
8601 Declare typedef.
8602
8603 2015-05-12 Don Breazeal <donb@codesourcery.com>
8604
8605 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
8606 PTRACE_EVENT_VFORK_DONE.
8607 (linux_low_ptrace_options, extended_event_reported): Add vfork
8608 events.
8609 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
8610 and "vforkdone" for RSP 'T' Stop Reply Packet.
8611 * server.h (report_vfork_events): Declare
8612 global variable.
8613
8614 2015-05-12 Don Breazeal <donb@codesourcery.com>
8615
8616 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
8617 (the_low_target) <new_fork>: Initialize new member.
8618 * linux-arm-low.c (arm_new_fork): New function.
8619 (the_low_target) <new_fork>: Initialize new member.
8620 * linux-low.c (handle_extended_wait): Call new target function
8621 new_fork.
8622 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
8623 * linux-mips-low.c (mips_add_watchpoint): New function
8624 extracted from mips_insert_point.
8625 (the_low_target) <new_fork>: Initialize new member.
8626 (mips_linux_new_fork): New function.
8627 (mips_insert_point): Call mips_add_watchpoint.
8628 * linux-x86-low.c (x86_linux_new_fork): New function.
8629 (the_low_target) <new_fork>: Initialize new member.
8630
8631 2015-05-12 Don Breazeal <donb@codesourcery.com>
8632
8633 * linux-low.c (handle_extended_wait): Implement return value,
8634 rename argument 'event_child' to 'event_lwp', handle
8635 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
8636 (linux_low_ptrace_options): New function.
8637 (linux_low_filter_event): Call linux_low_ptrace_options,
8638 use different argument fo linux_enable_event_reporting,
8639 use return value from handle_extended_wait.
8640 (extended_event_reported): New function.
8641 (linux_wait_1): Call extended_event_reported and set
8642 status to report fork events.
8643 (linux_write_memory): Add pid to debug message.
8644 (reset_lwp_ptrace_options_callback): New function.
8645 (linux_handle_new_gdb_connection): New function.
8646 (linux_target_ops): Initialize new structure member.
8647 * linux-low.h (struct lwp_info) <waitstatus>: New member.
8648 * lynx-low.c: Initialize new structure member.
8649 * remote-utils.c (prepare_resume_reply): Implement stop reason
8650 "fork" for "T" stop message.
8651 * server.c (handle_query): Call handle_new_gdb_connection.
8652 * server.h (report_fork_events): Declare global flag.
8653 * target.h (struct target_ops) <handle_new_gdb_connection>:
8654 New member.
8655 (target_handle_new_gdb_connection): New macro.
8656 * win32-low.c: Initialize new structure member.
8657
8658 2015-05-12 Don Breazeal <donb@codesourcery.com>
8659
8660 * mem-break.c (APPEND_TO_LIST): Define macro.
8661 (clone_agent_expr): New function.
8662 (clone_one_breakpoint): New function.
8663 (clone_all_breakpoints): New function.
8664 * mem-break.h: Declare new functions.
8665
8666 2015-05-12 Don Breazeal <donb@codesourcery.com>
8667
8668 * linux-low.c (linux_supports_fork_events): New function.
8669 (linux_supports_vfork_events): New function.
8670 (linux_target_ops): Initialize new structure members.
8671 (initialize_low): Call linux_check_ptrace_features.
8672 * lynx-low.c (lynx_target_ops): Initialize new structure
8673 members.
8674 * server.c (report_fork_events, report_vfork_events):
8675 New global flags.
8676 (handle_query): Add new features to qSupported packet and
8677 response.
8678 (captured_main): Initialize new global variables.
8679 * target.h (struct target_ops) <supports_fork_events>:
8680 New member.
8681 <supports_vfork_events>: New member.
8682 (target_supports_fork_events): New macro.
8683 (target_supports_vfork_events): New macro.
8684 * win32-low.c (win32_target_ops): Initialize new structure
8685 members.
8686
8687 2015-05-12 Gary Benson <gbenson@redhat.com>
8688
8689 * server.c (handle_qxfer_exec_file): Use current process
8690 if annex is empty.
8691
8692 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
8693
8694 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
8695 Remove HAVE_PTRACE_GETREGS conditionals.
8696 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
8697 instead of PTRACE_GETREGS and PTRACE_SETREGS.
8698
8699 2015-05-08 Yao Qi <yao.qi@linaro.org>
8700
8701 * linux-low.c (linux_supports_conditional_breakpoints): New
8702 function.
8703 (linux_target_ops): Install new target method.
8704 * lynx-low.c (lynx_target_ops): Install NULL hook for
8705 supports_conditional_breakpoints.
8706 * nto-low.c (nto_target_ops): Likewise.
8707 * spu-low.c (spu_target_ops): Likewise.
8708 * win32-low.c (win32_target_ops): Likewise.
8709 * server.c (handle_query): Check
8710 target_supports_conditional_breakpoints.
8711 * target.h (struct target_ops) <supports_conditional_breakpoints>:
8712 New field.
8713 (target_supports_conditional_breakpoints): New macro.
8714
8715 2015-05-06 Pedro Alves <palves@redhat.com>
8716
8717 PR server/18081
8718 * server.c (start_inferior): If the process exits, mourn it.
8719
8720 2015-04-21 Gary Benson <gbenson@redhat.com>
8721
8722 * hostio.c (fileio_open_flags_to_host): Factored out to
8723 fileio_to_host_openflags in common/fileio.c. Single use
8724 updated.
8725
8726 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
8727
8728 * linux-xtensa-low.c (xtensa_fill_gregset)
8729 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
8730 XCHAL_HAVE_LOOP.
8731
8732 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
8733
8734 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
8735 (regs_info): Replace usrregs pointer with NULL.
8736
8737 2015-04-17 Gary Benson <gbenson@redhat.com>
8738
8739 * target.h (struct target_ops) <pid_to_exec_file>: New field.
8740 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
8741 * server.c (handle_qxfer_exec_file): New function.
8742 (qxfer_packets): Add exec-file entry.
8743 (handle_query): Report qXfer:exec-file:read as supported packet.
8744
8745 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
8746
8747 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
8748
8749 2015-04-09 Gary Benson <gbenson@redhat.com>
8750
8751 * hostio-errno.c (errno_to_fileio_error): Remove function.
8752 Update caller to use remote_fileio_to_fio_error.
8753
8754 2015-04-09 Yao Qi <yao.qi@linaro.org>
8755
8756 * linux-low.c (linux_insert_point): Call
8757 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
8758 (linux_remove_point): Call remove_memory_breakpoint if type is
8759 raw_bkpt_type_sw.
8760 * linux-x86-low.c (x86_insert_point): Don't call
8761 insert_memory_breakpoint.
8762 (x86_remove_point): Don't call remove_memory_breakpoint.
8763
8764 2015-04-01 Pedro Alves <palves@redhat.com>
8765 Cleber Rosa <crosa@redhat.com>
8766
8767 * server.c (gdbserver_usage): Reorganize and extend the usage
8768 message.
8769
8770 2015-03-24 Pedro Alves <palves@redhat.com>
8771
8772 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
8773 output. Also dump TRAP_TRACE.
8774 (linux_low_filter_event): In debug output, distinguish a
8775 resume_stop SIGSTOP from a delayed SIGSTOP.
8776
8777 2015-03-24 Gary Benson <gbenson@redhat.com>
8778
8779 * linux-x86-low.c (x86_linux_new_thread): Moved to
8780 nat/x86-linux.c.
8781 (x86_linux_prepare_to_resume): Likewise.
8782
8783 2015-03-24 Gary Benson <gbenson@redhat.com>
8784
8785 * Makefile.in (x86-linux-dregs.o): New rule.
8786 * configure.srv: Add x86-linux-dregs.o to relevant targets.
8787 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
8788 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
8789 (x86_linux_dr_get): Likewise.
8790 (x86_linux_dr_set): Likewise.
8791 (update_debug_registers_callback): Likewise.
8792 (x86_linux_dr_set_addr): Likewise.
8793 (x86_linux_dr_get_addr): Likewise.
8794 (x86_linux_dr_set_control): Likewise.
8795 (x86_linux_dr_get_control): Likewise.
8796 (x86_linux_dr_get_status): Likewise.
8797 (x86_linux_update_debug_registers): Likewise.
8798
8799 2015-03-24 Gary Benson <gbenson@redhat.com>
8800
8801 * linux-x86-low.c (x86_linux_update_debug_registers):
8802 New function, factored out from...
8803 (x86_linux_prepare_to_resume): ...this.
8804
8805 2015-03-24 Gary Benson <gbenson@redhat.com>
8806
8807 * linux-x86-low.c (x86_linux_dr_get): Update comments.
8808 (x86_linux_dr_set): Likewise.
8809 (update_debug_registers_callback): Likewise.
8810 (x86_linux_dr_set_addr): Likewise.
8811 (x86_linux_dr_get_addr): Likewise.
8812 (x86_linux_dr_set_control): Likewise.
8813 (x86_linux_dr_get_control): Likewise.
8814 (x86_linux_dr_get_status): Likewise.
8815 (x86_linux_prepare_to_resume): Likewise.
8816
8817 2015-03-24 Gary Benson <gbenson@redhat.com>
8818
8819 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
8820 Use perror_with_name. Pass string through gettext.
8821 (x86_linux_dr_set): Likewise.
8822
8823 2015-03-24 Gary Benson <gbenson@redhat.com>
8824
8825 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
8826 (x86_linux_dr_set_addr): ...this.
8827 (x86_dr_low_get_addr): Rename to...
8828 (x86_linux_dr_get_addr): ...this.
8829 (x86_dr_low_set_control): Rename to...
8830 (x86_linux_dr_set_control): ...this.
8831 (x86_dr_low_get_control): Rename to...
8832 (x86_linux_dr_get_control): ...this.
8833 (x86_dr_low_get_status): Rename to...
8834 (x86_linux_dr_get_status): ...this.
8835 (x86_dr_low): Update with new function names.
8836
8837 2015-03-24 Gary Benson <gbenson@redhat.com>
8838
8839 * Makefile.in (x86-linux.o): New rule.
8840 * configure.srv: Add x86-linux.o to relevant targets.
8841 * linux-low.c (lwp_set_arch_private_info): New function.
8842 (lwp_arch_private_info): Likewise.
8843 * linux-x86-low.c: Include nat/x86-linux.h.
8844 (arch_lwp_info): Removed structure.
8845 (update_debug_registers_callback):
8846 Use lwp_set_debug_registers_changed.
8847 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
8848 and lwp_set_debug_registers_changed.
8849 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
8850
8851 2015-03-24 Gary Benson <gbenson@redhat.com>
8852
8853 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
8854 * linux-arm-low.c (arm_new_thread): Likewise.
8855 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
8856 * linux-mips-low.c (mips_linux_new_thread): Likewise.
8857 * linux-x86-low.c (x86_linux_new_thread): Likewise.
8858 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
8859
8860 2015-03-24 Gary Benson <gbenson@redhat.com>
8861
8862 * linux-low.c (ptid_of_lwp): New function.
8863 (lwp_is_stopped): Likewise.
8864 (lwp_stop_reason): Likewise.
8865 * linux-x86-low.c (update_debug_registers_callback):
8866 Use lwp_is_stopped.
8867 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
8868 lwp_stop_reason.
8869
8870 2015-03-24 Gary Benson <gbenson@redhat.com>
8871
8872 * linux-low.h (linux_stop_lwp): Remove declaration.
8873
8874 2015-03-24 Gary Benson <gbenson@redhat.com>
8875
8876 * linux-low.h: Include nat/linux-nat.h.
8877 * linux-low.c (iterate_over_lwps_args): New structure.
8878 (iterate_over_lwps_filter): New function.
8879 (iterate_over_lwps): Likewise.
8880 * linux-x86-low.c (update_debug_registers_callback):
8881 Update signature to what iterate_over_lwps expects.
8882 Remove PID check that iterate_over_lwps now performs.
8883 (x86_dr_low_set_addr): Use iterate_over_lwps.
8884 (x86_dr_low_set_control): Likewise.
8885
8886 2015-03-24 Gary Benson <gbenson@redhat.com>
8887
8888 * linux-x86-low.c (x86_debug_reg_state): New function.
8889 (x86_linux_prepare_to_resume): Use the above.
8890
8891 2015-03-24 Gary Benson <gbenson@redhat.com>
8892
8893 * linux-low.c (current_lwp_ptid): New function.
8894 * linux-x86-low.c: Include nat/linux-nat.h.
8895 (x86_dr_low_get_addr): Use current_lwp_ptid.
8896 (x86_dr_low_get_control): Likewise.
8897 (x86_dr_low_get_status): Likewise.
8898
8899 2015-03-20 Pedro Alves <palves@redhat.com>
8900
8901 * tracepoint.c (cmd_qtstatus): Make "str" const.
8902
8903 2015-03-20 Pedro Alves <palves@redhat.com>
8904
8905 * server.c (handle_general_set): Make "req_str" const.
8906
8907 2015-03-19 Pedro Alves <palves@redhat.com>
8908
8909 * linux-low.c (linux_resume_one_lwp): Rename to ...
8910 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
8911 instead call perror_with_name.
8912 (check_ptrace_stopped_lwp_gone): New function.
8913 (linux_resume_one_lwp): Reimplement as wrapper around
8914 linux_resume_one_lwp_throw that swallows errors if the LWP is
8915 gone.
8916
8917 2015-03-19 Pedro Alves <palves@redhat.com>
8918
8919 * linux-low.c (count_events_callback, select_event_lwp_callback):
8920 No longer check whether the thread has resume_stop as last resume
8921 kind.
8922
8923 2015-03-19 Pedro Alves <palves@redhat.com>
8924
8925 * linux-low.c (count_events_callback, select_event_lwp_callback):
8926 Use the lwp's status_pending_p field, not the thread's.
8927
8928 2015-03-19 Pedro Alves <palves@redhat.com>
8929
8930 * linux-low.c (select_event_lwp_callback): Update comments to
8931 no longer mention SIGTRAP.
8932
8933 2015-03-18 Gary Benson <gbenson@redhat.com>
8934
8935 * server.c (handle_query): Do not report vFile:fstat as supported.
8936
8937 2015-03-11 Gary Benson <gbenson@redhat.com>
8938
8939 * hostio.c (sys/types.h): New include.
8940 (sys/stat.h): Likewise.
8941 (common-remote-fileio.h): Likewise.
8942 (handle_fstat): New function.
8943 (handle_vFile): Handle vFile:fstat packets.
8944
8945 2015-03-11 Gary Benson <gbenson@redhat.com>
8946
8947 * configure.ac (AC_CHECK_MEMBERS): Add checks for
8948 struct stat.st_blocks and struct stat.st_blksize.
8949 * configure: Regenerate.
8950 * config.in: Likewise.
8951 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
8952 (OBS): Add common-remote-fileio.o.
8953 (common-remote-fileio.o): New rule.
8954
8955 2015-03-09 Pedro Alves <palves@redhat.com>
8956
8957 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
8958 'struct sockaddr' pointer in 'accept' call.
8959
8960 2015-03-09 Pedro Alves <palves@redhat.com>
8961
8962 Revert:
8963 2015-03-07 Pedro Alves <palves@redhat.com>
8964 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
8965 or <winsock2.h> here. Instead include "gdb_socket.h".
8966 (remote_open): Use union gdb_sockaddr_u.
8967 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
8968 or <winsock2.h> here. Instead include "gdb_socket.h".
8969 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
8970 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
8971 or <sys/un.h>.
8972 (init_named_socket, gdb_agent_helper_thread): Use union
8973 gdb_sockaddr_u.
8974
8975 2015-03-07 Pedro Alves <palves@redhat.com>
8976
8977 * configure.ac (build_warnings): Move
8978 -Wdeclaration-after-statement to the C-specific set.
8979 * configure: Regenerate.
8980
8981 2015-03-07 Pedro Alves <palves@redhat.com>
8982
8983 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
8984 or <winsock2.h> here. Instead include "gdb_socket.h".
8985 (remote_open): Use union gdb_sockaddr_u.
8986 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
8987 or <winsock2.h> here. Instead include "gdb_socket.h".
8988 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
8989 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
8990 or <sys/un.h>.
8991 (init_named_socket, gdb_agent_helper_thread): Use union
8992 gdb_sockaddr_u.
8993
8994 2015-03-07 Pedro Alves <palves@redhat.com>
8995
8996 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
8997 instead.
8998
8999 2015-03-06 Yao Qi <yao.qi@linaro.org>
9000
9001 * linux-aarch64-low.c (aarch64_insert_point): Use
9002 show_debug_regs as a boolean.
9003 (aarch64_remove_point): Likewise.
9004
9005 2015-03-05 Pedro Alves <palves@redhat.com>
9006
9007 * lynx-low.c (lynx_target_ops): Install NULL hooks for
9008 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
9009 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
9010 * nto-low.c (nto_target_ops): Likewise.
9011 * spu-low.c (spu_target_ops): Likewise.
9012 * win32-low.c (win32_target_ops): Likewise.
9013
9014 2015-03-04 Pedro Alves <palves@redhat.com>
9015
9016 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
9017 Decide whether a breakpoint triggered based on the SIGTRAP's
9018 siginfo.si_code.
9019 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
9020 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
9021 (linux_low_filter_event): Check for breakpoints before checking
9022 watchpoints.
9023 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
9024 siginfo.si_code.
9025 (linux_stopped_by_sw_breakpoint)
9026 (linux_supports_stopped_by_sw_breakpoint)
9027 (linux_stopped_by_hw_breakpoint)
9028 (linux_supports_stopped_by_hw_breakpoint): New functions.
9029 (linux_target_ops): Install new target methods.
9030
9031 2015-03-04 Pedro Alves <palves@redhat.com>
9032
9033 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
9034 * server.c (swbreak_feature, hwbreak_feature): New globals.
9035 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
9036 (captured_main): Clear swbreak_feature and hwbreak_feature.
9037 * server.h (swbreak_feature, hwbreak_feature): Declare.
9038 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
9039 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
9040 supports_stopped_by_hw_breakpoint>: New fields.
9041 (target_supports_stopped_by_sw_breakpoint)
9042 (target_stopped_by_sw_breakpoint)
9043 (target_supports_stopped_by_hw_breakpoint)
9044 (target_stopped_by_hw_breakpoint): Declare.
9045
9046 2015-03-04 Pedro Alves <palves@redhat.com>
9047
9048 enum lwp_stop_reason -> enum target_stop_reason
9049 * linux-low.c (check_stopped_by_breakpoint): Adjust.
9050 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
9051 (linux_wait_1, stuck_in_jump_pad_callback)
9052 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
9053 (linux_stopped_by_watchpoint):
9054 * linux-low.h (enum lwp_stop_reason): Delete.
9055 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
9056 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
9057
9058 2015-03-04 Yao Qi <yao.qi@linaro.org>
9059
9060 * Makefile.in (SFILES): Add linux-aarch64-low.c.
9061
9062 2015-03-03 Gary Benson <gbenson@redhat.com>
9063
9064 * hostio.c (handle_vFile): Fix prefix lengths.
9065
9066 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
9067
9068 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
9069 ptr_bits.
9070
9071 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
9072
9073 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
9074 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
9075 (clean): Add "rm -f" for above C files.
9076 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
9077 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
9078 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
9079 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
9080 * linux-s390-low.c (HWCAP_S390_VX): New macro.
9081 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
9082 (init_registers_s390x_vx_linux64)
9083 (init_registers_s390x_tevx_linux64)
9084 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
9085 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
9086 declarations.
9087 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
9088 (s390_store_vxrs_high): New functions.
9089 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
9090 NT_S390_VXRS_HIGH.
9091 (s390_arch_setup): Add logic for selecting one of the new target
9092 descriptions. Activate the new vector regsets if applicable.
9093 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
9094 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
9095 and init_registers_s390x_tevx_linux64.
9096
9097 2015-03-01 Pedro Alves <palves@redhat.com>
9098
9099 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
9100 parameter.
9101
9102 2015-02-27 Pedro Alves <palves@redhat.com>
9103
9104 * linux-x86-low.c (u_debugreg_offset): New function.
9105 (x86_linux_dr_get, x86_linux_dr_set): Use it.
9106
9107 2015-02-27 Pedro Alves <palves@redhat.com>
9108
9109 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
9110 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
9111 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
9112 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
9113 (ps_lsetfpregs, ps_getpid)
9114 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
9115 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
9116 (ps_lsetxregs, ps_plog): Declare.
9117
9118 2015-02-27 Pedro Alves <palves@redhat.com>
9119
9120 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
9121 IP_AGENT_EXPORT_FUNC.
9122 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
9123 IP_AGENT_EXPORT_FUNC.
9124 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
9125 (IP_AGENT_EXPORT): Delete.
9126 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
9127 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
9128 (gdb_trampoline_buffer_error, collecting, gdb_collect)
9129 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
9130 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
9131 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
9132 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
9133 (traceframe_read_count, traceframe_write_count)
9134 (traceframes_created, trace_state_variables, get_raw_reg)
9135 (get_trace_state_variable_value, set_trace_state_variable_value)
9136 (ust_loaded, helper_thread_id, cmd_buf): Use
9137 IPA_SYM_EXPORTED_NAME.
9138 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
9139 (tracepoints) Use IP_AGENT_EXPORT_VAR.
9140 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
9141 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
9142 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
9143 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
9144 EXTERN_C_PUSH/EXTERN_C_POP.
9145 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
9146 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
9147 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
9148 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
9149 (traceframe_write_count, traceframe_read_count)
9150 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
9151 (about_to_request_buffer_space, get_trace_state_variable_value)
9152 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
9153 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
9154 EXTERN_C_PUSH/EXTERN_C_POP.
9155 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
9156 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
9157 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
9158 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
9159 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
9160 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
9161 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
9162 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
9163 Define.
9164 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
9165 (IP_AGENT_EXPORT_VAR_DECL): Define.
9166 (tracing): Declare.
9167 (gdb_agent_get_raw_reg): Declare.
9168
9169 2015-02-27 Tom Tromey <tromey@redhat.com>
9170 Pedro Alves <palves@redhat.com>
9171
9172 Rename symbols whose names are reserved C++ keywords throughout.
9173
9174 2015-02-27 Pedro Alves <palves@redhat.com>
9175
9176 * Makefile.in (COMPILER): New, get it from autoconf.
9177 (CXX): Get from autoconf instead.
9178 (COMPILE.pre): Use COMPILER.
9179 (CC-LD): Rename to ...
9180 (CC_LD): ... this. Use COMPILER.
9181 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
9182 (CXX_FOR_TARGET): Default to g++ instead of gcc.
9183 * acinclude.m4: Include build-with-cxx.m4.
9184 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
9185 Disable -Werror by default if building in C++ mode.
9186 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
9187 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
9188 the C++ compiler. Save/restore CXXFLAGS too.
9189 * configure: Regenerate.
9190
9191 2015-02-27 Pedro Alves <palves@redhat.com>
9192
9193 * acinclude.m4: Include libiberty.m4.
9194 * configure.ac: Call libiberty_INIT.
9195 * config.in, configure: Regenerate.
9196
9197 2015-02-26 Pedro Alves <palves@redhat.com>
9198
9199 * linux-low.c (linux_wait_1): When incrementing the PC past a
9200 program breakpoint always use the_low_target.breakpoint_len as
9201 increment, rather than the maximum between that and
9202 the_low_target.decr_pc_after_break.
9203
9204 2015-02-23 Pedro Alves <palves@redhat.com>
9205
9206 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
9207 thread was doing a step-over; always adjust the PC if
9208 we stepped over a permanent breakpoint.
9209 (linux_wait_1): If we stepped over breakpoint that was on top of a
9210 permanent breakpoint, manually advance the PC past it.
9211
9212 2015-02-23 Pedro Alves <palves@redhat.com>
9213
9214 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
9215 modes.
9216 (x86_fill_gregset, x86_store_gregset): Use it when handling
9217 $orig_eax.
9218
9219 2015-02-20 Pedro Alves <palves@redhat.com>
9220
9221 * thread-db.c: Include "nat/linux-procfs.h".
9222 (thread_db_init): Skip listing new threads if the kernel supports
9223 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
9224
9225 2015-02-20 Pedro Alves <palves@redhat.com>
9226
9227 * linux-low.c (status_pending_p_callback): Use ptid_match.
9228
9229 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
9230
9231 PR breakpoints/16812
9232 * linux-low.c (wstatus_maybe_breakpoint): Remove.
9233 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
9234 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
9235
9236 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
9237
9238 PR breakpoints/15956
9239 * tracepoint.c (cmd_qtinit): Add check for current_thread.
9240
9241 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
9242
9243 * linux-low.c (linux_low_btrace_conf): Print size.
9244 * server.c (handle_btrace_conf_general_set): New.
9245 (hanle_general_set): Call handle_btrace_conf_general_set.
9246 (handle_query): Report Qbtrace-conf:bts:size as supported.
9247
9248 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
9249
9250 * linux-low.c (linux_low_enable_btrace): Update parameters.
9251 (linux_low_btrace_conf): New.
9252 (linux_target_ops)<to_btrace_conf>: Initialize.
9253 * server.c (current_btrace_conf): New.
9254 (handle_btrace_enable): Rename to ...
9255 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
9256 to target_enable_btrace. Update comment. Update users.
9257 (handle_qxfer_btrace_conf): New.
9258 (qxfer_packets): Add btrace-conf entry.
9259 (handle_query): Report qXfer:btrace-conf:read as supported packet.
9260 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
9261 (target_ops)<read_btrace_conf>: New.
9262 (target_enable_btrace): Update parameters.
9263 (target_read_btrace_conf): New.
9264
9265 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
9266
9267 * server.c (handle_btrace_general_set): Remove call to
9268 target_supports_btrace.
9269 (supported_btrace_packets): New.
9270 (handle_query): Call supported_btrace_packets.
9271 * target.h: include btrace-common.h.
9272 (btrace_target_info): Removed.
9273 (supports_btrace, target_supports_btrace): Update parameters.
9274
9275 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
9276
9277 * Makefile.in (SFILES): Add common/btrace-common.c.
9278 (OBS): Add common/btrace-common.o.
9279 (btrace-common.o): Add build rules.
9280 * linux-low: Include btrace-common.h.
9281 (linux_low_read_btrace): Use struct btrace_data. Call
9282 btrace_data_init and btrace_data_fini.
9283
9284 2015-02-06 Pedro Alves <palves@redhat.com>
9285
9286 * thread-db.c (find_new_threads_callback): Add debug output.
9287
9288 2015-02-04 Pedro Alves <palves@redhat.com>
9289
9290 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
9291 (resume_stopped_resumed_lwps): New function.
9292 (linux_wait_for_event_filtered): Use it.
9293
9294 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
9295
9296 * Makefile.in (SFILES): Add linux-personality.c.
9297 (linux-personality.o): New rule.
9298 * configure.srv (srv_linux_obj): Add linux-personality.o to the
9299 list of objects to be built.
9300 * linux-low.c: Include nat/linux-personality.h.
9301 (linux_create_inferior): Remove code to disable address space
9302 randomization (moved to ../nat/linux-personality.c). Create
9303 cleanup to disable address space randomization.
9304
9305 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
9306
9307 * Makefile.in (posix-strerror.o): New rule.
9308 (mingw-strerror.o): Likewise.
9309 * configure: Regenerated.
9310 * configure.ac: Source file ../common/common.host. Initialize new
9311 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
9312
9313 2015-01-14 Yao Qi <yao@codesourcery.com>
9314
9315 * Makefile.in (SFILES): Add nat/ppc-linux.c.
9316 (ppc-linux.o): New rule.
9317 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
9318 * configure.ac: AC_CHECK_FUNCS(getauxval).
9319 * config.in: Re-generated.
9320 * configure: Re-generated.
9321 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
9322 ppc64_64bit_inferior_p
9323
9324 2015-01-14 Yao Qi <yao@codesourcery.com>
9325
9326 * linux-ppc-low.c: Include "nat/ppc-linux.h".
9327 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
9328 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
9329 (PT_ORIG_R3, PT_TRAP): Likewise.
9330 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
9331 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
9332 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
9333
9334 2015-01-10 Joel Brobecker <brobecker@adacore.com>
9335
9336 * i387-fp.c (i387_cache_to_xsave): In look over
9337 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
9338 zmmh_low_space field by use of zmmh_high_space.
9339
9340 2015-01-09 Pedro Alves <palves@redhat.com>
9341
9342 * linux-low.c (step_over_bkpt): Move higher up in the file.
9343 (handle_extended_wait): Don't store the stop_pc here.
9344 (get_stop_pc): Adjust comments and rename to ...
9345 (check_stopped_by_breakpoint): ... this. Record whether the LWP
9346 stopped for a software breakpoint or hardware breakpoint.
9347 (thread_still_has_status_pending_p): New function.
9348 (status_pending_p_callback): Use
9349 thread_still_has_status_pending_p. If the event is no longer
9350 interesting, resume the LWP.
9351 (handle_tracepoints): Add assert.
9352 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
9353 (wstatus_maybe_breakpoint): New function.
9354 (cancel_breakpoint): Delete function.
9355 (check_stopped_by_watchpoint): New function, factored out from
9356 linux_low_filter_event.
9357 (lp_status_maybe_breakpoint): Delete function.
9358 (linux_low_filter_event): Remove filter_ptid argument.
9359 Leave thread group exits pending here. Store the LWP's stop PC.
9360 Always leave events pending.
9361 (linux_wait_for_event_filtered): Pull all events out of the
9362 kernel, and leave them all pending.
9363 (count_events_callback, select_event_lwp_callback): Consider all
9364 events.
9365 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
9366 (select_event_lwp): Only give preference to the stepping LWP in
9367 all-stop mode. Adjust comments.
9368 (ignore_event): New function.
9369 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
9370 references to cancel_breakpoints. Adjust to renames. Also give
9371 equal priority to all LWPs that have had events in non-stop mode.
9372 If reporting a software breakpoint event, unadjust the LWP's PC.
9373 (linux_wait): If linux_wait_1 returned an ignored event, retry.
9374 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
9375 Adjust.
9376 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
9377 (resume_status_pending_p): Use thread_still_has_status_pending_p.
9378 (linux_stopped_by_watchpoint): Adjust.
9379 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
9380 * linux-low.h (enum lwp_stop_reason): New.
9381 (struct lwp_info) <stop_pc>: Adjust comment.
9382 <stopped_by_watchpoint>: Delete field.
9383 <stop_reason>: New field.
9384 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
9385 * mem-break.c (software_breakpoint_inserted_here)
9386 (hardware_breakpoint_inserted_here): New function.
9387 * mem-break.h (software_breakpoint_inserted_here)
9388 (hardware_breakpoint_inserted_here): Declare.
9389 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
9390 (cancel_breakpoints): Delete.
9391 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
9392 (upload_fast_traceframes): Remove references to
9393 cancel_breakpoints.
9394
9395 2015-01-09 Pedro Alves <palves@redhat.com>
9396
9397 * thread-db.c (find_new_threads_callback): Ignore thread if the
9398 kernel thread ID is -1.
9399
9400 2015-01-09 Pedro Alves <palves@redhat.com>
9401
9402 * linux-low.c (linux_attach_fail_reason_string): Move to
9403 nat/linux-ptrace.c, and rename.
9404 (linux_attach_lwp): Update comment.
9405 (attach_proc_task_lwp_callback): New function.
9406 (linux_attach): Adjust to rename and use
9407 linux_proc_attach_tgid_threads.
9408 (linux_attach_fail_reason_string): Delete declaration.
9409
9410 2015-01-01 Joel Brobecker <brobecker@adacore.com>
9411
9412 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
9413 * server.c (gdbserver_version): Likewise.
9414
9415 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
9416
9417 * remote-utils.c: Include ctype.h.
9418 (input_interrupt): Explicitly handle the case when the char
9419 received is the NUL byte. Improve the printing of non-ASCII
9420 characters.
9421
9422 2014-12-16 Joel Brobecker <brobecker@adacore.com>
9423
9424 * linux-low.c (linux_low_filter_event): Update call to
9425 linux_enable_event_reporting following the addition of
9426 a new parameter to that function.
9427
9428 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
9429
9430 PR server/17457
9431 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
9432 (AARCH64_FPCR_REGNO): Likewise.
9433 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
9434 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
9435 (aarch64_store_fpregset): Likewise.
9436
9437 2014-12-15 Joel Brobecker <brobecker@adacore.com>
9438
9439 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
9440 Remove FIXME comment about assumption about N.
9441
9442 2014-12-13 Joel Brobecker <brobecker@adacore.com>
9443
9444 * configure.ac: If large-file support is disabled in GDBserver,
9445 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
9446 * configure: Regenerate.
9447
9448 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9449
9450 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
9451 warning upon ENODATA from ptrace.
9452 * linux-s390-low.c (s390_store_tdb): New.
9453 (s390_regsets): Add regset for NT_S390_TDB.
9454
9455 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9456
9457 * linux-low.c (regsets_store_inferior_registers): Skip regsets
9458 without a fill_function.
9459 * linux-s390-low.c (s390_fill_last_break): Remove.
9460 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
9461 (s390_arch_setup): Use regset's size instead of fill_function for
9462 loop end condition.
9463
9464 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9465
9466 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
9467 the regset's store function when ptrace returned an error.
9468 * regcache.c (get_thread_regcache): Invalidate register cache
9469 before fetching inferior's registers.
9470
9471 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9472
9473 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
9474 while-loop as for-loop.
9475 (regsets_store_inferior_registers): Likewise.
9476
9477 2014-11-28 Yao Qi <yao@codesourcery.com>
9478
9479 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
9480 * config.in, configure: Re-generate.
9481 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
9482 is defined.
9483
9484 2014-11-21 Yao Qi <yao@codesourcery.com>
9485
9486 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
9487 (AC_CHECK_HEADERS): Remove malloc.h.
9488 * configure: Re-generated.
9489 * config.in: Re-generated.
9490 * server.h: Don't include alloca.h and malloc.h.
9491 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
9492 Don't include malloc.h.
9493
9494 2014-11-17 Joel Brobecker <brobecker@adacore.com>
9495
9496 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
9497 corresponding ERRNO check in same block.
9498
9499 2014-11-12 Pedro Alves <palves@redhat.com>
9500
9501 * server.c (cont_thread): Update comment.
9502 (start_inferior, attach_inferior): No longer clear cont_thread.
9503 (handle_v_cont): No longer set cont_thread.
9504 (captured_main): Clear cont_thread each time a GDB connects.
9505
9506 2014-11-12 Pedro Alves <palves@redhat.com>
9507
9508 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
9509 thread, and don't resume all threads if the Hc thread has exited.
9510
9511 2014-11-12 Pedro Alves <palves@redhat.com>
9512
9513 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
9514 the process group instead of to a specific LWP.
9515
9516 2014-10-15 Pedro Alves <palves@redhat.com>
9517
9518 PR server/17487
9519 * win32-arm-low.c (arm_set_thread_context): Remove current_event
9520 parameter.
9521 (arm_set_thread_context): Delete.
9522 (the_low_target): Adjust.
9523 * win32-i386-low.c (debug_registers_changed)
9524 (debug_registers_used): Delete.
9525 (update_debug_registers_callback): New function.
9526 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
9527 needing to update their debug registers.
9528 (win32_get_current_dr): New function.
9529 (x86_dr_low_get_addr, x86_dr_low_get_control)
9530 (x86_dr_low_get_status): Fetch the debug register from the thread
9531 record's context.
9532 (i386_initial_stuff): Adjust.
9533 (i386_get_thread_context): Remove current_event parameter. Don't
9534 clear debug_registers_changed nor copy DR values to
9535 debug_reg_state.
9536 (i386_set_thread_context): Delete.
9537 (i386_prepare_to_resume): New function.
9538 (i386_thread_added): Mark the thread as needing to update irs
9539 debug registers.
9540 (the_low_target): Remove i386_set_thread_context and install
9541 i386_prepare_to_resume.
9542 * win32-low.c (win32_get_thread_context): Adjust.
9543 (win32_set_thread_context): Use SetThreadContext
9544 directly.
9545 (win32_prepare_to_resume): New function.
9546 (win32_require_context): New function, factored out from ...
9547 (thread_rec): ... this.
9548 (continue_one_thread): Call win32_prepare_to_resume on each thread
9549 we're about to continue.
9550 (win32_resume): Call win32_prepare_to_resume on the event thread.
9551 * win32-low.h (struct win32_thread_info)
9552 <debug_registers_changed>: New field.
9553 (struct win32_target_ops): Change prototype of set_thread_context,
9554 delete set_thread_context and add prepare_to_resume.
9555 (win32_require_context): New declaration.
9556
9557 2014-10-08 Gary Benson <gbenson@redhat.com>
9558
9559 * server.h: Do not include common-exceptions.h.
9560
9561 2014-10-08 Gary Benson <gbenson@redhat.com>
9562
9563 * server.h: Do not include cleanups.h.
9564
9565 2014-09-30 James Hogan <james.hogan@imgtec.com>
9566
9567 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
9568 mips64-dsp-linux.c.
9569
9570 2014-09-23 Yao Qi <yao@codesourcery.com>
9571
9572 * linux-low.c (lp_status_maybe_breakpoint): New function.
9573 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
9574 (count_events_callback): Likewise.
9575 (select_event_lwp_callback): Likewise.
9576 (cancel_breakpoints_callback): Likewise.
9577
9578 2014-09-19 Don Breazeal <donb@codesourcery.com>
9579
9580 * linux-low.c (handle_extended_wait): Call
9581 linux_ptrace_get_extended_event.
9582 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
9583 linux_is_extended_waitstatus.
9584
9585 2014-09-16 Joel Brobecker <brobecker@adacore.com>
9586
9587 * Makefile.in (CPPFLAGS): Define.
9588 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
9589 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
9590
9591 2014-09-16 Gary Benson <gbenson@redhat.com>
9592
9593 * inferiors.h (current_inferior): Renamed as...
9594 (current_thread): New variable. All uses updated.
9595 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
9596 (maybe_move_out_of_jump_pad): Likewise.
9597 (cancel_breakpoint): Likewise.
9598 (linux_low_filter_event): Likewise.
9599 (wait_for_sigstop): Likewise.
9600 (linux_resume_one_lwp): Likewise.
9601 (need_step_over_p): Likewise.
9602 (start_step_over): Likewise.
9603 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
9604 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
9605 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
9606 and save_inferior as saved_thread.
9607 * regcache.c (get_thread_regcache): Renamed saved_inferior as
9608 saved_thread.
9609 (regcache_invalidate_thread): Likewise.
9610 * remote-utils.c (prepare_resume_reply): Likewise.
9611 * thread-db.c (thread_db_get_tls_address): Likewise.
9612 (disable_thread_event_reporting): Likewise.
9613 (remove_thread_event_breakpoints): Likewise.
9614 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
9615 as saved_thread.
9616 * target.h (set_desired_inferior): Renamed as...
9617 (set_desired_thread): New declaration. All uses updated.
9618 * server.c (myresume): Updated comment to reference thread instead
9619 of inferior.
9620 (handle_serial_event): Likewise.
9621 (handle_target_event): Likewise.
9622
9623 2014-09-12 Tom Tromey <tromey@redhat.com>
9624 Gary Benson <gbenson@redhat.com>
9625
9626 * regcache.h: Include common-regcache.h.
9627 (regcache_read_pc): Don't declare.
9628 * regcache.c (get_thread_regcache_for_ptid): New function.
9629
9630 2014-09-11 Tom Tromey <tromey@redhat.com>
9631 Gary Benson <gbenson@redhat.com>
9632
9633 * symbol.c: New file.
9634 * Makefile.in (SFILES): Add symbol.c.
9635 (OBS): Add symbol.o.
9636
9637 2014-09-11 Gary Benson <gbenson@redhat.com>
9638
9639 * target.c (target_stop_ptid, target_continue_ptid): New
9640 functions.
9641
9642 2014-09-11 Tom Tromey <tromey@redhat.com>
9643 Gary Benson <gbenson@redhat.com>
9644
9645 * target.h: Include target/target.h.
9646 * target.c (target_read_memory, target_read_uint32)
9647 (target_write_memory): New functions.
9648
9649 2014-09-11 Gary Benson <gbenson@redhat.com>
9650
9651 * server.h (debug_hw_points): Don't declare.
9652 * server.c (debug_hw_points): Don't define. Replace all uses
9653 with show_debug_regs.
9654 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
9655 all uses with show_debug_regs.
9656
9657 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
9658
9659 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
9660 endianness into account.
9661 (ppc_supply_ptrace_register): Likewise.
9662
9663 2014-09-03 James Hogan <james.hogan@imgtec.com>
9664
9665 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
9666 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
9667
9668 2014-09-03 Gary Benson <gbenson@redhat.com>
9669
9670 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
9671 ALL_DEBUG_ADDRESS_REGISTERS.
9672
9673 2014-09-02 Gary Benson <gbenson@redhat.com>
9674
9675 * i386-low.h: Renamed as...
9676 * x86-low.h: New file. All type, function and variable name
9677 prefixes changed from "i386_" to "x86_". All references updated.
9678 * i386-low.c: Renamed as...
9679 * x86-low.c: New file. All type, function and variable name
9680 prefixes changed from "i386_" to "x86_". All references updated.
9681
9682 2014-09-02 Gary Benson <gbenson@redhat.com>
9683
9684 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
9685 (x86_linux_new_thread): Likewise.
9686
9687 2014-08-29 Gary Benson <gbenson@redhat.com>
9688
9689 * server.h (setjmp.h): Do not include.
9690 (toplevel): Do not declare.
9691 (common-exceptions.h): Include.
9692 (cleanups.h): Likewise.
9693 * server.c (toplevel): Do not define.
9694 (exit_code): New static global.
9695 (detach_or_kill_for_exit_cleanup): New function.
9696 (main): New function. Original main renamed to...
9697 (captured_main): New function.
9698 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
9699
9700 2014-08-29 Gary Benson <gbenson@redhat.com>
9701
9702 * Makefile.in (SFILES): Add common/common-exceptions.c.
9703 (OBS): Add common-exceptions.o.
9704 (common-exceptions.o): New rule.
9705 * utils.c (prepare_to_throw_exception): New function.
9706
9707 2014-08-29 Gary Benson <gbenson@redhat.com>
9708
9709 * config.in: Regenerate.
9710 * configure: Likewise.
9711
9712 2014-08-29 Gary Benson <gbenson@redhat.com>
9713
9714 * Makefile.in (SFILES): Add common/cleanups.c.
9715 (OBS): cleanups.o.
9716 (cleanups.o): New rule.
9717
9718 2014-08-29 Gary Benson <gbenson@redhat.com>
9719
9720 * utils.c (internal_vwarning): New function.
9721
9722 2014-08-28 Gary Benson <gbenson@redhat.com>
9723
9724 * utils.h (fatal): Remove declaration.
9725 * utils.c (fatal): Remove function.
9726
9727 2014-08-28 Gary Benson <gbenson@redhat.com>
9728
9729 * tracepoint.c (gdb_agent_init): Replace fatal with
9730 perror_with_name.
9731 (initialize_tracepoint): Likewise.
9732
9733 2014-08-28 Gary Benson <gbenson@redhat.com>
9734
9735 * remote-utils.c (remote_prepare): Replace fatal with error.
9736
9737 2014-08-28 Gary Benson <gbenson@redhat.com>
9738
9739 * linux-low.c (linux_async): Replace fatal with warning.
9740 Tidy up and return.
9741 (linux_start_non_stop): Return -1 if linux_async failed.
9742
9743 2014-08-28 Gary Benson <gbenson@redhat.com>
9744
9745 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
9746 gdb_assert.
9747 (i386_dr_low_get_addr): Remove vague comment.
9748 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
9749 gdb_assert.
9750
9751 2014-08-28 Gary Benson <gbenson@redhat.com>
9752
9753 * inferiors.c (get_thread_process): Replace check with gdb_assert.
9754 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
9755 internal_error.
9756 (linux_resume_one_lwp): Likewise.
9757 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
9758 gdb_assert.
9759 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
9760 with internal_error.
9761 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
9762 (init_register_cache): Replace fatal with gdb_assert_not_reached.
9763 (find_register_by_name): Replace fatal with internal_error.
9764 (find_regno): Likewise.
9765 * tdesc.c (init_target_desc): Replace check with gdb_assert.
9766 * thread-db.c (thread_db_create_event): Likewise.
9767 (thread_db_load_search): Likewise.
9768 (try_thread_db_load_1): Likewise.
9769 * tracepoint.c (get_jump_space_head): Replace fatal with
9770 internal_error.
9771 (claim_trampoline_space): Likewise.
9772 (have_fast_tracepoint_trampoline_buffer): Likewise.
9773 (cmd_qtstart): Likewise.
9774 (stop_tracing): Likewise.
9775 (fast_tracepoint_collecting): Likewise.
9776 (target_malloc): Likewise.
9777 (download_tracepoint): Likewise.
9778 (download_trace_state_variables): Replace check with gdb_assert.
9779 (upload_fast_traceframes): Replace fatal with internal_error.
9780
9781 2014-08-19 Tom Tromey <tromey@redhat.com>
9782 Gary Benson <gbenson@redhat.com>
9783
9784 * Makefile.in (SFILES): Add common/common-debug.c.
9785 (OBS): Add common-debug.o.
9786 (common-debug.o): New rule.
9787 * debug.h (debug_printf): Don't declare.
9788 * debug.c (debug_printf): Renamed and rewritten as...
9789 (debug_vprintf): New function.
9790
9791 2014-08-19 Gary Benson <gbenson@redhat.com>
9792
9793 * utils.h: Do not include print-utils.h.
9794
9795 2014-08-19 Tom Tromey <tromey@redhat.com>
9796 Gary Benson <gbenson@redhat.com>
9797
9798 * server.h: Add static assertion.
9799 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
9800
9801 2014-08-19 Tom Tromey <tromey@redhat.com>
9802 Gary Benson <gbenson@redhat.com>
9803
9804 * Makefile.in (SFILES): Add common/errors.c.
9805 (OBS): Add errors.o.
9806 (IPA_OBS): Add errors-ipa.o.
9807 (errors.o): New rule.
9808 (errors-ipa.o): Likewise.
9809 * utils.h (perror_with_name, error, warning): Don't declare.
9810 * utils.c (warning): Renamed and rewritten as...
9811 (vwarning): New function.
9812 (error): Renamed and rewritten as...
9813 (verror): New function.
9814 (internal_error): Renamed and rewritten as...
9815 (internal_verror): New function.
9816
9817 2014-08-07 Gary Benson <gbenson@redhat.com>
9818
9819 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
9820 * configure: Regenerate.
9821 * config.in: Likewise.
9822 * server.h: Do not include errno.h.
9823 * event-loop.c: Likewise.
9824 * hostio-errno.c: Likewise.
9825 * linux-low.c: Likewise.
9826 * remote-utils.c: Likewise.
9827 * spu-low.c: Likewise.
9828 * utils.c: Likewise.
9829 * gdbreplay.c: Unconditionally include errno.h.
9830
9831 2014-08-07 Gary Benson <gbenson@redhat.com>
9832
9833 * server.h: Do not include string.h.
9834 * event-loop.c: Likewise.
9835 * linux-low.c: Likewise.
9836 * regcache.c: Likewise.
9837 * remote-utils.c: Likewise.
9838 * spu-low.c: Likewise.
9839 * utils.c: Likewise.
9840
9841 2014-08-07 Gary Benson <gbenson@redhat.com>
9842
9843 * server.h: Do not include gdb_assert.h.
9844
9845 2014-08-07 Gary Benson <gbenson@redhat.com>
9846
9847 * server.h: Do not include common-utils.h.
9848
9849 2014-08-07 Gary Benson <gbenson@redhat.com>
9850
9851 * server.h: Do not include ptid.h.
9852 * notif.h: Likewise.
9853
9854 2014-08-07 Gary Benson <gbenson@redhat.com>
9855
9856 * server.h: Do not include gdb_locale.h.
9857
9858 2014-08-07 Gary Benson <gbenson@redhat.com>
9859
9860 * server.h: Do not include gdb/signals.h.
9861 * win32-low.c: Likewise.
9862
9863 2014-08-07 Gary Benson <gbenson@redhat.com>
9864
9865 * server.h: Do not include pathmax.h.
9866
9867 2014-08-07 Gary Benson <gbenson@redhat.com>
9868
9869 * server.h: Do not include libiberty.h.
9870 * linux-bfin-low.c: Likewise.
9871
9872 2014-08-07 Gary Benson <gbenson@redhat.com>
9873
9874 * server.h: Do not include ansidecl.h.
9875
9876 2014-08-07 Gary Benson <gbenson@redhat.com>
9877
9878 * linux-x86-low.c: Do not include stddef.h.
9879 * lynx-ppc-low.c: Likewise.
9880 * tracepoint.c: Likewise.
9881
9882 2014-08-07 Gary Benson <gbenson@redhat.com>
9883
9884 * server.h: Do not include stdarg.h.
9885 * nto-low.c: Likewise.
9886
9887 2014-08-07 Gary Benson <gbenson@redhat.com>
9888
9889 * server.h: Do not include stdlib.h.
9890 * inferiors.c: Likewise.
9891 * linux-low.c: Likewise.
9892 * regcache.c: Likewise.
9893 * spu-low.c: Likewise.
9894 * tracepoint.c: Likewise.
9895 * utils.c: Likewise.
9896
9897 2014-08-07 Gary Benson <gbenson@redhat.com>
9898
9899 * server.h: Do not include stdio.h.
9900 * linux-low.c: Likewise.
9901 * remote-utils.c: Likewise.
9902 * spu-low.c: Likewise.
9903 * utils.c: Likewise.
9904 * wincecompat.c: Likewise.
9905
9906 2014-08-06 Gary Benson <gbenson@redhat.com>
9907
9908 * regcache.c (init_register_cache): Move conditionals inside if.
9909
9910 2014-08-06 Gary Benson <gbenson@redhat.com>
9911
9912 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
9913
9914 2014-07-31 Gary Benson <gbenson@redhat.com>
9915
9916 * ax.h: Do not include server.h.
9917 * gdbthread.h: Likewise.
9918 * lynx-low.h: Likewise.
9919 * notif.h: Likewise.
9920
9921 2014-07-30 Gary Benson <gbenson@redhat.com>
9922
9923 * server.h: Include common-defs.h.
9924 Do not include config.h or build-gnulib-gdbserver/config.h.
9925
9926 2014-07-30 Gary Benson <gbenson@redhat.com>
9927
9928 * hostio-errno.c: Move server.h to top of includes list.
9929 * inferiors.c: Likewise.
9930 * linux-x86-low.c: Likewise.
9931 * notif.c: Include server.h.
9932
9933 2014-07-24 Tom Tromey <tromey@redhat.com>
9934 Gary Benson <gbenson@redhat.com>
9935
9936 * server.h (CORE_ADDR): Now unsigned.
9937
9938 2014-07-16 Pedro Alves <palves@redhat.com>
9939
9940 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
9941
9942 2014-07-15 Pedro Alves <palves@redhat.com>
9943
9944 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
9945 copy.
9946
9947 2014-07-11 Pedro Alves <palves@redhat.com>
9948
9949 * linux-low.c (kill_wait_lwp): New function, based on
9950 kill_one_lwp_callback, but use my_waitpid directly.
9951 (kill_one_lwp_callback, linux_kill): Use it.
9952
9953 2014-06-23 Pedro Alves <palves@redhat.com>
9954
9955 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
9956 before setting DR0..DR3.
9957
9958 2014-06-20 Gary Benson <gbenson@redhat.com>
9959
9960 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
9961 * configure: Regenerated.
9962 * config.in: Likewise.
9963
9964 2014-06-20 Gary Benson <gbenson@redhat.com>
9965
9966 * Makefile.in (SFILES): Update locations for files moved
9967 from common to nat.
9968 (object file files): Reordered.
9969
9970 2014-06-20 Gary Benson <gbenson@redhat.com>
9971
9972 * i386-low.h (i386_dr_low_can_set_addr): Removed.
9973 (i386_dr_low_set_addr): Likewise.
9974 (i386_dr_low_get_addr): Likewise.
9975 (i386_dr_low_can_set_control): Likewise.
9976 (i386_dr_low_set_control): Likewise.
9977 (i386_dr_low_get_control): Likewise.
9978 (i386_dr_low_get_status): Likewise.
9979 (i386_get_debug_register_length): Likewise.
9980 * linux-x86-low.c (i386_dr_low_set_addr):
9981 Changed signature. Made static.
9982 (i386_dr_low_get_addr): Likewise.
9983 (i386_dr_low_set_control): Likewise.
9984 (i386_dr_low_get_control): Likewise.
9985 (i386_dr_low_get_status): Likewise.
9986 (i386_dr_low): New global variable.
9987 * win32-i386-low.c (i386_dr_low_set_addr):
9988 Changed signature. Made static.
9989 (i386_dr_low_get_addr): Likewise.
9990 (i386_dr_low_set_control): Likewise.
9991 (i386_dr_low_get_control): Likewise.
9992 (i386_dr_low_get_status): Likewise.
9993 (i386_dr_low): New global variable.
9994
9995 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
9996
9997 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
9998 * Makefile.in (AR, AR_FLAGS): Define.
9999 * configure: Regenerate.
10000
10001 2014-06-19 Gary Benson <gbenson@redhat.com>
10002
10003 * Makefile.in (i386-dregs.o): New rule.
10004 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
10005 * i386-low.c (target.h): Remove include.
10006 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
10007 (DR_CONTROL_SHIFT): Likewise.
10008 (DR_CONTROL_SIZE): Likewise.
10009 (DR_RW_EXECUTE): Likewise.
10010 (DR_RW_WRITE): Likewise.
10011 (DR_RW_READ): Likewise.
10012 (DR_RW_IORW): Likewise.
10013 (DR_LEN_1): Likewise.
10014 (DR_LEN_2): Likewise.
10015 (DR_LEN_4): Likewise.
10016 (DR_LEN_8): Likewise.
10017 (DR_LOCAL_ENABLE_SHIFT): Likewise.
10018 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
10019 (DR_ENABLE_SIZE): Likewise.
10020 (DR_LOCAL_SLOWDOWN): Likewise.
10021 (DR_GLOBAL_SLOWDOWN): Likewise.
10022 (DR_CONTROL_RESERVED): Likewise.
10023 (I386_DR_CONTROL_MASK): Likewise.
10024 (I386_DR_VACANT): Likewise.
10025 (I386_DR_LOCAL_ENABLE): Likewise.
10026 (I386_DR_GLOBAL_ENABLE): Likewise.
10027 (I386_DR_DISABLE): Likewise.
10028 (I386_DR_SET_RW_LEN): Likewise.
10029 (I386_DR_GET_RW_LEN): Likewise.
10030 (I386_DR_WATCH_HIT): Likewise.
10031 (i386_wp_op_t): Likewise.
10032 (i386_show_dr): Likewise.
10033 (i386_length_and_rw_bits): Likewise.
10034 (i386_insert_aligned_watchpoint): Likewise.
10035 (i386_remove_aligned_watchpoint): Likewise.
10036 (i386_handle_nonaligned_watchpoint): Likewise.
10037 i386_update_inferior_debug_regs(): Likewise.
10038 (i386_dr_insert_watchpoint): Likewise.
10039 (i386_dr_remove_watchpoint): Likewise.
10040 (i386_dr_region_ok_for_watchpoint): Likewise.
10041 (i386_dr_stopped_data_address): Likewise.
10042 (i386_dr_stopped_by_watchpoint): Likewise.
10043
10044 2014-06-19 Gary Benson <gbenson@redhat.com>
10045
10046 * i386-low.c (i386_dr_show): Renamed to
10047 i386_show_dr and made static. All uses updated.
10048 (i386_dr_length_and_rw_bits): Renamed to
10049 i386_length_and_rw_bits and made static.
10050 All uses updated.
10051 (i386_dr_insert_aligned_watchpoint): Renamed to
10052 i386_insert_aligned_watchpoint and made static.
10053 All uses updated.
10054 (i386_dr_remove_aligned_watchpoint): Renamed to
10055 i386_remove_aligned_watchpoint and made static.
10056 All uses updated.
10057 (i386_dr_update_inferior_debug_regs): Renamed to
10058 i386_update_inferior_debug_regs and made static.
10059 All uses updated.
10060
10061 2014-06-18 Gary Benson <gbenson@redhat.com>
10062
10063 * i386-low.h (i386_dr_low_can_set_addr): New macro.
10064 (i386_dr_low_can_set_control): Likewise.
10065 (i386_get_debug_register_length): Likewise.
10066 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
10067 (i386_dr_low_can_set_control): Likewise.
10068 (i386_get_debug_register_length): Likewise.
10069
10070 2014-06-17 Gary Benson <gbenson@redhat.com>
10071
10072 * i386-low.h (i386-dregs.h): New include.
10073 (DR_FIRSTADDR): Now in i386-dregs.h.
10074 (DR_LASTADDR): Likewise.
10075 (DR_NADDR): Likewise.
10076 (DR_STATUS): Likewise.
10077 (DR_CONTROL): Likewise.
10078 (i386_debug_reg_state): Likewise.
10079 (i386_dr_insert_watchpoint): Likewise.
10080 (i386_dr_remove_watchpoint): Likewise.
10081 (i386_dr_region_ok_for_watchpoint): Likewise.
10082 (i386_dr_stopped_data_address): Likewise.
10083 (i386_dr_stopped_by_watchpoint): Likewise.
10084 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
10085
10086 2014-06-18 Gary Benson <gbenson@redhat.com>
10087
10088 * i386-low.h (i386_low_insert_watchpoint): Renamed to
10089 i386_dr_insert_watchpoint.
10090 (i386_low_remove_watchpoint): Renamed to
10091 i386_dr_remove_watchpoint.
10092 (i386_low_region_ok_for_watchpoint): Renamed to
10093 i386_dr_region_ok_for_watchpoint.
10094 (i386_low_stopped_data_address): Renamed to
10095 i386_dr_stopped_data_address.
10096 (i386_low_stopped_by_watchpoint): Renamed to
10097 i386_dr_stopped_by_watchpoint.
10098 * i386-low.c (i386_show_dr): Renamed to
10099 i386_dr_show and made nonstatic. All uses updated.
10100 (i386_length_and_rw_bits): Renamed to
10101 i386_dr_length_and_rw_bits and made nonstatic.
10102 All uses updated.
10103 (i386_insert_aligned_watchpoint): Renamed to
10104 i386_dr_insert_aligned_watchpoint and made nonstatic.
10105 All uses updated.
10106 (i386_remove_aligned_watchpoint): Renamed to
10107 i386_dr_remove_aligned_watchpoint and made nonstatic.
10108 All uses updated.
10109 (i386_update_inferior_debug_regs): Renamed to
10110 i386_dr_update_inferior_debug_regs and made nonstatic.
10111 All uses updated.
10112 (i386_low_insert_watchpoint): Renamed to
10113 i386_dr_insert_watchpoint. All uses updated.
10114 (i386_low_remove_watchpoint): Renamed to
10115 i386_dr_remove_watchpoint. All uses updated.
10116 (i386_low_region_ok_for_watchpoint): Renamed to
10117 i386_dr_region_ok_for_watchpoint. All uses updated.
10118 (i386_low_stopped_data_address): Renamed to
10119 i386_dr_stopped_data_address. All uses updated.
10120 (i386_low_stopped_by_watchpoint): Renamed to
10121 i386_dr_stopped_by_watchpoint. All uses updated.
10122
10123 2014-06-18 Gary Benson <gbenson@redhat.com>
10124
10125 * i386-low.c (i386_dr_low_can_set_addr): New macro.
10126 (i386_dr_low_can_set_control): Likewise.
10127 (i386_insert_aligned_watchpoint): New check.
10128
10129 2014-06-18 Gary Benson <gbenson@redhat.com>
10130
10131 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
10132 Renamed to state.
10133
10134 2014-06-18 Gary Benson <gbenson@redhat.com>
10135
10136 * i386-low.c (i386_length_and_rw_bits): Use internal_error
10137 instead of fatal and error.
10138 (i386_handle_nonaligned_watchpoint): Likewise.
10139
10140 2014-06-18 Gary Benson <gbenson@redhat.com>
10141
10142 * i386-low.c (i386_get_debug_register_length): New macro.
10143 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
10144 (i386_show_dr): Use debug_printf instead of fprintf. Use
10145 phex to format values.
10146
10147 2014-06-18 Gary Benson <gbenson@redhat.com>
10148
10149 * i386-low.h: Comment changes.
10150 * i386-low.c: Likewise.
10151
10152 2014-06-18 Gary Benson <gbenson@redhat.com>
10153
10154 * i386-low.c: Whitespace changes.
10155
10156 2014-06-12 Tom Tromey <tromey@redhat.com>
10157
10158 * utils.c (freeargv): Remove.
10159
10160 2014-06-12 Tom Tromey <tromey@redhat.com>
10161
10162 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
10163 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
10164 (parse_debug_format_options): Likewise.
10165 (gdbserver_usage): Likewise.
10166 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
10167 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
10168 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
10169 against libiberty.
10170 ($(LIBGNU)): Depend on libiberty.
10171 (all-lib): Recurse into all subdirs.
10172 (install-only): Invoke "install" target in subdirs.
10173 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
10174 targets.
10175 * configure: Rebuild.
10176 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
10177 for vasprintf, vsnprintf, or gettimeofday.
10178 * configure.srv: Don't add safe-ctype.o or lbasename.o to
10179 srv_tgtobj.
10180
10181 2014-06-05 Joel Brobecker <brobecker@adacore.com>
10182
10183 * development.sh: Delete.
10184 * Makefile.in (config.status): Adjust dependency on development.sh.
10185 * configure.ac: Adjust development.sh source call.
10186 * configure: Regenerate.
10187
10188 2014-06-02 Pedro Alves <palves@redhat.com>
10189
10190 * ax.c (gdb_free_agent_expr): New function.
10191 * ax.h (gdb_free_agent_expr): New declaration.
10192 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
10193 list.
10194 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
10195 static.
10196 (clear_breakpoint_conditions_and_commands): New function.
10197 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
10198 (clear_breakpoint_conditions_and_commands): New declaration.
10199
10200 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
10201
10202 * linux-aarch64-low.c (asm/ptrace.h): Include.
10203
10204 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10205
10206 Fix TLS access for -static -pthread.
10207 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
10208 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
10209 (thread_db_load_search, try_thread_db_load_1): Initialize it.
10210
10211 2014-05-20 Pedro Alves <palves@redhat.com>
10212
10213 * linux-aarch64-low.c (aarch64_insert_point)
10214 (aarch64_remove_point): No longer check whether the type is
10215 supported here. Adjust to new interface.
10216 (the_low_target): Install aarch64_supports_z_point_type as
10217 supports_z_point_type method.
10218 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
10219 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
10220 instead of a Z packet char. Adjust.
10221 (arm_supports_z_point_type): New function.
10222 (arm_insert_point, arm_remove_point): Adjust to new interface.
10223 (the_low_target): Install arm_supports_z_point_type.
10224 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
10225 (cris_insert_point, cris_remove_point): Adjust to new interface.
10226 Don't check whether the type is supported here.
10227 (the_low_target): Install cris_supports_z_point_type.
10228 * linux-low.c (linux_supports_z_point_type): New function.
10229 (linux_insert_point, linux_remove_point): Adjust to new interface.
10230 * linux-low.h (struct linux_target_ops) <insert_point,
10231 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
10232 raw_breakpoint pointer parameter.
10233 <supports_z_point_type>: New method.
10234 * linux-mips-low.c (mips_supports_z_point_type): New function.
10235 (mips_insert_point, mips_remove_point): Adjust to new interface.
10236 Use mips_supports_z_point_type.
10237 (the_low_target): Install mips_supports_z_point_type.
10238 * linux-ppc-low.c (the_low_target): Install NULL as
10239 supports_z_point_type method.
10240 * linux-s390-low.c (the_low_target): Install NULL as
10241 supports_z_point_type method.
10242 * linux-sparc-low.c (the_low_target): Install NULL as
10243 supports_z_point_type method.
10244 * linux-x86-low.c (x86_supports_z_point_type): New function.
10245 (x86_insert_point): Adjust to new insert_point interface. Use
10246 insert_memory_breakpoint. Adjust to new
10247 i386_low_insert_watchpoint interface.
10248 (x86_remove_point): Adjust to remove_point interface. Use
10249 remove_memory_breakpoint. Adjust to new
10250 i386_low_remove_watchpoint interface.
10251 (the_low_target): Install x86_supports_z_point_type.
10252 * lynx-low.c (lynx_target_ops): Install NULL as
10253 supports_z_point_type callback.
10254 * nto-low.c (nto_supports_z_point_type): New.
10255 (nto_insert_point, nto_remove_point): Adjust to new interface.
10256 (nto_target_ops): Install nto_supports_z_point_type.
10257 * mem-break.c: Adjust intro comment.
10258 (struct raw_breakpoint) <raw_type, size>: New fields.
10259 <inserted>: Update comment.
10260 <shlib_disabled>: Delete field.
10261 (enum bkpt_type) <gdb_breakpoint>: Delete value.
10262 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
10263 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
10264 (raw_bkpt_type_to_target_hw_bp_type): New function.
10265 (find_enabled_raw_code_breakpoint_at): New function.
10266 (find_raw_breakpoint_at): New type and size parameters. Use them.
10267 (insert_memory_breakpoint): New function, based off
10268 set_raw_breakpoint_at.
10269 (remove_memory_breakpoint): New function.
10270 (set_raw_breakpoint_at): Reimplement.
10271 (set_breakpoint): New, based on set_breakpoint_at.
10272 (set_breakpoint_at): Reimplement.
10273 (delete_raw_breakpoint): Go through the_target->remove_point
10274 instead of assuming memory breakpoints.
10275 (find_gdb_breakpoint_at): Delete.
10276 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
10277 (find_gdb_breakpoint): New function.
10278 (set_gdb_breakpoint_at): Delete.
10279 (z_type_supported): New function.
10280 (set_gdb_breakpoint_1): New function, loosely based off
10281 set_gdb_breakpoint_at.
10282 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
10283 (delete_gdb_breakpoint_at): Delete.
10284 (delete_gdb_breakpoint_1): New function, loosely based off
10285 delete_gdb_breakpoint_at.
10286 (delete_gdb_breakpoint): New function.
10287 (clear_gdb_breakpoint_conditions): Rename to ...
10288 (clear_breakpoint_conditions): ... this. Don't handle a NULL
10289 breakpoint.
10290 (add_condition_to_breakpoint): Make static.
10291 (add_breakpoint_condition): Take a struct breakpoint pointer
10292 instead of an address. Adjust.
10293 (gdb_condition_true_at_breakpoint): Rename to ...
10294 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
10295 z_type parameter.
10296 (gdb_condition_true_at_breakpoint): Reimplement.
10297 (add_breakpoint_commands): Take a struct breakpoint pointer
10298 instead of an address. Adjust.
10299 (gdb_no_commands_at_breakpoint): Rename to ...
10300 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
10301 parameter. Return true if no breakpoint was found. Change debug
10302 output.
10303 (gdb_no_commands_at_breakpoint): Reimplement.
10304 (run_breakpoint_commands): Rename to ...
10305 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
10306 and change return type to boolean.
10307 (run_breakpoint_commands): New function.
10308 (gdb_breakpoint_here): Also check for Z1 breakpoints.
10309 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
10310 breakpoint. Go through the_target->remove_point instead of
10311 assuming memory breakpoint.
10312 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
10313 software and hardware breakpoints.
10314 (reinsert_raw_breakpoint): Go through the_target->insert_point
10315 instead of assuming memory breakpoint.
10316 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
10317 software and hardware breakpoints.
10318 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
10319 Check both software and hardware breakpoints.
10320 (validate_inserted_breakpoint): Assert the breakpoint is a
10321 software breakpoint. Set the inserted flag to -1 instead of
10322 setting shlib_disabled.
10323 (delete_disabled_breakpoints): Adjust.
10324 (validate_breakpoints): Only validate software breakpoints.
10325 Adjust to inserted flag change.
10326 (check_mem_read, check_mem_write): Skip breakpoint types other
10327 than software breakpoints. Adjust to inserted flag change.
10328 * mem-break.h (enum raw_bkpt_type): New enum.
10329 (raw_breakpoint, struct process_info): Forward declare.
10330 (Z_packet_to_target_hw_bp_type): Delete declaration.
10331 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
10332 (set_gdb_breakpoint, delete_gdb_breakpoint)
10333 (clear_breakpoint_conditions): New declarations.
10334 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
10335 (breakpoint_inserted_here): Update comment.
10336 (add_breakpoint_condition, add_breakpoint_commands): Replace
10337 address parameter with a breakpoint pointer parameter.
10338 (gdb_breakpoint_here): Update comment.
10339 (delete_gdb_breakpoint_at): Delete.
10340 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
10341 * server.c (process_point_options): Take a struct breakpoint
10342 pointer instead of an address. Adjust.
10343 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
10344 delete_gdb_breakpoint.
10345 * spu-low.c (spu_target_ops): Install NULL as
10346 supports_z_point_type method.
10347 * target.h: Include mem-break.h.
10348 (struct target_ops) <prepare_to_access_memory>: Update comment.
10349 <supports_z_point_type>: New field.
10350 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
10351 instead of a char. Also take a raw breakpoint pointer.
10352 * win32-arm-low.c (the_low_target): Install NULL as
10353 supports_z_point_type.
10354 * win32-i386-low.c (i386_supports_z_point_type): New function.
10355 (i386_insert_point, i386_remove_point): Adjust to new interface.
10356 (the_low_target): Install i386_supports_z_point_type.
10357 * win32-low.c (win32_supports_z_point_type): New function.
10358 (win32_insert_point, win32_remove_point): Adjust to new interface.
10359 (win32_target_ops): Install win32_supports_z_point_type.
10360 * win32-low.h (struct win32_target_ops):
10361 <supports_z_point_type>: New method.
10362 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
10363 instead of a char. Also take a raw breakpoint pointer.
10364
10365 2014-05-20 Pedro Alves <palves@redhat.com>
10366
10367 * mem-break.h: Include break-common.h.
10368 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
10369 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
10370 (Z_packet_to_target_hw_bp_type): New declaration.
10371 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
10372 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
10373 (Z_PACKET_ACCESS_WP): Delete macros.
10374 (Z_packet_to_hw_type): Delete function.
10375 * i386-low.h: Don't include break-common.h here.
10376 (Z_packet_to_hw_type): Delete declaration.
10377 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
10378 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
10379 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
10380 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
10381 * linux-aarch64-low.c: Don't include break-common.h here.
10382 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
10383 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
10384 (Z_packet_to_target_hw_bp_type): Delete function.
10385 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
10386 function.
10387 (mips_insert_point, mips_remove_point): Use
10388 Z_packet_to_target_hw_bp_type.
10389
10390 2014-05-20 Pedro Alves <palves@redhat.com>
10391
10392 * linux-aarch64-low.c: Include break-common.h.
10393 (enum target_point_type): Delete.
10394 (Z_packet_to_point_type): Rename to ...
10395 (Z_packet_to_target_hw_bp_type): ... this, and return a
10396 target_hw_bp_type instead.
10397 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
10398 instead of an enum target_point_type.
10399 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
10400 breakpoint type.
10401 (aarch64_dr_state_insert_one_point)
10402 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
10403 (aarch64_handle_aligned_watchpoint)
10404 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
10405 Take an enum target_hw_bp_type instead of an enum
10406 target_point_type.
10407 (aarch64_supports_z_point_type): New function.
10408 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
10409 use Z_packet_to_target_hw_bp_type.
10410
10411 2014-05-20 Joel Brobecker <brobecker@adacore.com>
10412
10413 * configure.ac: Only use -Werror by default when DEVELOPMENT
10414 is true.
10415 * configure: Regenerate.
10416
10417 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
10418
10419 Fix gdbserver qGetTLSAddr for x86_64 -m32.
10420 * linux-x86-low.c (X86_64_USER_REGS): New.
10421 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
10422
10423 2014-04-28 Yao Qi <yao@codesourcery.com>
10424
10425 * Makefile.in (i386-avx512.c): Fix the typo of generated file
10426 name.
10427
10428 2014-04-25 Pedro Alves <palves@redhat.com>
10429
10430 PR server/16255
10431 * linux-low.c (linux_attach_fail_reason_string): New function.
10432 (linux_attach_lwp): Delete.
10433 (linux_attach_lwp_1): Rename to ...
10434 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
10435 argument. Remove "initial" parameter. Return int instead of
10436 void. Don't error or warn here.
10437 (linux_attach): Adjust to call linux_attach_lwp. Call error on
10438 failure to attach to the tgid. Call warning when failing to
10439 attach to an lwp.
10440 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
10441 argument. Remove "initial" parameter. Return int instead of
10442 void. Don't error or warn here.
10443 (linux_attach_fail_reason_string): New declaration.
10444 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
10445 interface change. Use linux_attach_fail_reason_string.
10446
10447 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
10448 Walfred Tedeschi <walfred.tedeschi@intel.com>
10449
10450 * Makefile.in: Added rules to handle new files
10451 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
10452 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
10453 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
10454 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
10455 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
10456 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
10457 x32-avx512-linux.o.
10458 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
10459 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
10460 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
10461 i386/x32-avx512.xml.
10462 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
10463 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
10464 i386/x32-avx512-linux.xml.
10465 * i387-fp.c (num_avx512_k_registers): New constant for number
10466 of K registers.
10467 (num_avx512_zmmh_low_registers): New constant for number of
10468 lower ZMM registers (0-15).
10469 (num_avx512_zmmh_high_registers): New constant for number of
10470 higher ZMM registers (16-31).
10471 (num_avx512_ymmh_registers): New contant for number of higher
10472 YMM registers (ymm16-31 added by avx521 on x86_64).
10473 (num_avx512_xmm_registers): New constant for number of higher
10474 XMM registers (xmm16-31 added by AVX512 on x86_64).
10475 (struct i387_xsave): Add space for AVX512 registers.
10476 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
10477 Add code to handle AVX512 registers.
10478 (i387_xsave_to_cache): Add code to handle AVX512 registers.
10479 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
10480 prototypei from generated file.
10481 (tdesc_amd64_avx512_linux): Likewise.
10482 (init_registers_x32_avx512_linux): Likewise.
10483 (tdesc_x32_avx512_linux): Likewise.
10484 (init_registers_i386_avx512_linux): Likewise.
10485 (tdesc_i386_avx512_linux): Likewise.
10486 (x86_64_regmap): Add AVX512 registers.
10487 (x86_linux_read_description): Add code to handle AVX512 XSTATE
10488 mask.
10489 (initialize_low_arch): Add code to initialize AVX512 registers.
10490
10491 2014-04-23 Pedro Alves <palves@redhat.com>
10492
10493 * mem-break.c (find_gdb_breakpoint_at): Make static.
10494 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
10495
10496 2014-04-23 Pedro Alves <palves@redhat.com>
10497
10498 * i386-low.c: Don't include break-common.h here.
10499 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
10500 prototype to take target_hw_bp_type as argument instead of a Z
10501 packet char.
10502 * i386-low.h: Include break-common.h here.
10503 (Z_packet_to_hw_type): Declare.
10504 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
10505 prototypes.
10506 * linux-x86-low.c (x86_insert_point): Convert the packet number to
10507 a target_hw_bp_type before calling i386_low_insert_watchpoint.
10508 (x86_remove_point): Convert the packet number to a
10509 target_hw_bp_type before calling i386_low_remove_watchpoint.
10510 * win32-i386-low.c (i386_insert_point): Convert the packet number
10511 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
10512 (i386_remove_point): Convert the packet number to a
10513 target_hw_bp_type before calling i386_low_remove_watchpoint.
10514
10515 2014-04-23 Pedro Alves <palves@redhat.com>
10516
10517 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
10518
10519 2014-04-10 Pedro Alves <palves@redhat.com>
10520
10521 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
10522 Check if the condition or command is NULL before checking if the
10523 breakpoint is known. On success, return true.
10524 * mem-break.h (add_breakpoint_condition): Document return.
10525 (add_breakpoint_commands): Add describing comment.
10526 * server.c (skip_to_semicolon): New function.
10527 (process_point_options): Use it.
10528
10529 2014-04-09 Pedro Alves <palves@redhat.com>
10530
10531 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
10532 to lwpid_of.
10533
10534 2014-02-27 Pedro Alves <palves@redhat.com>
10535
10536 PR 12702
10537 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
10538 macros.
10539 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
10540 output.
10541 (last_thread_of_process_p): Take a PID argument instead of a
10542 thread pointer.
10543 (linux_wait_for_lwp): Delete.
10544 (num_lwps, check_zombie_leaders, not_stopped_callback): New
10545 functions.
10546 (linux_low_filter_event): New function, party factored out from
10547 linux_wait_for_event.
10548 (linux_wait_for_event): Rename to ...
10549 (linux_wait_for_event_filtered): ... this. Add new filter ptid
10550 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
10551 sigsuspend. Check for zombie leaders.
10552 (linux_wait_for_event): Reimplement as wrapper around
10553 linux_wait_for_event_filtered.
10554 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
10555 a normal or signal exit is seen, it's the whole process exiting.
10556 (wait_for_sigstop): No longer a for_each_inferior callback.
10557 Rewrite on top of linux_wait_for_event_filtered.
10558 (stop_all_lwps): Call wait_for_sigstop directly.
10559 * server.c (resume, handle_target_event): Handle
10560 TARGET_WAITKIND_NO_RESUMED.
10561
10562 2014-02-26 Joel Brobecker <brobecker@adacore.com>
10563
10564 * win32-low.c (psapi_get_dll_name,
10565 * win32_CreateToolhelp32Snapshot): Delete.
10566 (win32_CreateToolhelp32Snapshot, win32_Module32First)
10567 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
10568 Delete.
10569 (handle_load_dll): Add function description.
10570 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
10571
10572 2014-02-26 Joel Brobecker <brobecker@adacore.com>
10573
10574 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
10575 Add comment.
10576 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
10577 base address when calling win32_add_one_solib.
10578 (handle_load_dll): Delete local variable load_addr.
10579 Remove 0x1000 offset applied to DLL base address when calling
10580 win32_add_one_solib.
10581 (handle_unload_dll): Add comment.
10582
10583 2014-02-26 Joel Brobecker <brobecker@adacore.com>
10584
10585 * win32-low.c (win32_add_all_dlls): Renames
10586 win32_ensure_ntdll_loaded. Rewrite function documentation.
10587 Adjust implementation to always load all DLLs.
10588 Add 0x1000 offset to DLL base address when calling
10589 win32_add_one_solib.
10590 (child_initialization_done): New static global.
10591 (do_initial_child_stuff): Set child_initialization_done to
10592 zero during child initialization, and 1 after. Replace call
10593 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
10594 Add comment.
10595 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
10596 (handle_unload_dll): Add function documentation.
10597 (get_child_debug_event): Ignore load and unload DLL events
10598 during child initialization.
10599
10600 2014-02-20 Doug Evans <dje@google.com>
10601
10602 Remove global all_lwps.
10603 * inferiors.h (ptid_of): Move here from linux-low.h.
10604 (pid_of, lwpid_of): Ditto.
10605 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
10606 parameter is a struct thread_info * now.
10607 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
10608 directly. Pass &all_threads to find_inferior instead of &all_lwps.
10609 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
10610 directly.
10611 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
10612 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
10613 * linux-arm-low.c (update_registers_callback): Update, "entry"
10614 parameter is a struct thread_info * now.
10615 Fetch lwpid from current_inferior directly.
10616 (arm_insert_point): Pass &all_threads to find_inferior instead of
10617 &all_lwps.
10618 (arm_remove_point): Ditto.
10619 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
10620 (arm_prepare_to_resume): Fetch pid from thread.
10621 (arm_read_description): Fetch lwpid from current_inferior directly.
10622 * linux-low.c (all_lwps): Delete.
10623 (delete_lwp): Delete call to remove_inferior.
10624 (handle_extended_wait): Fetch lwpid from thread.
10625 (add_lwp): Don't set lwp->entry.id. Remove call to
10626 add_inferior_to_list.
10627 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
10628 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
10629 (kill_one_lwp_callback): Ditto.
10630 (linux_kill): Don't dereference NULL pointer.
10631 Fetch ptid,lwpid from thread.
10632 (get_detach_signal): Fetch ptid from thread.
10633 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
10634 Simplify call to regcache_invalidate_thread.
10635 (delete_lwp_callback): Update, "entry" parameter is a
10636 struct thread_info * now. Fetch pid from thread.
10637 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
10638 (status_pending_p_callback): Update, "entry" parameter is a
10639 struct thread_info * now. Fetch ptid from thread.
10640 (find_lwp_pid): Update, "entry" parameter is a
10641 struct thread_info * now.
10642 (linux_wait_for_lwp): Fetch pid from thread.
10643 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
10644 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
10645 (enqueue_one_deferred_signal): Fetch lwpid from thread.
10646 (dequeue_one_deferred_signal): Ditto.
10647 (cancel_breakpoint): Fetch ptid from current_inferior.
10648 (linux_wait_for_event): Pass &all_threads to find_inferior,
10649 not &all_lwps. Fetch ptid, lwpid from thread.
10650 (count_events_callback): Update, "entry" parameter is a
10651 struct thread_info * now.
10652 (select_singlestep_lwp_callback): Ditto.
10653 (select_event_lwp_callback): Ditto.
10654 (cancel_breakpoints_callback): Ditto.
10655 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
10656 not &all_lwps.
10657 (select_event_lwp): Ditto. Fetch ptid from event_thread.
10658 (unsuspend_one_lwp): Update, "entry" parameter is a
10659 struct thread_info * now.
10660 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
10661 not &all_lwps.
10662 (linux_stabilize_threads): Ditto. And for for_each_inferior.
10663 Fetch lwpid from thread, not lwp.
10664 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
10665 Pass &all_threads to find_inferior, not &all_lwps.
10666 (send_sigstop): Fetch lwpid from thread, not lwp.
10667 (send_sigstop_callback): Update, "entry" parameter is a
10668 struct thread_info * now.
10669 (suspend_and_send_sigstop_callback): Ditto.
10670 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
10671 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
10672 struct thread_info * now.
10673 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
10674 from thread, lwp.
10675 (lwp_running): Update, "entry" parameter is a
10676 struct thread_info * now.
10677 (stop_all_lwps): Fetch ptid from thread.
10678 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
10679 (linux_resume_one_lwp): Fetch lwpid from thread.
10680 (linux_set_resume_request): Update, "entry" parameter is a
10681 struct thread_info * now. Fetch pid, lwpid from thread.
10682 (resume_status_pending_p): Update, "entry" parameter is a
10683 struct thread_info * now.
10684 (need_step_over_p): Ditto. Fetch lwpid from thread.
10685 (start_step_over): Fetch lwpid from thread.
10686 (linux_resume_one_thread): Update, "entry" parameter is a
10687 struct thread_info * now. Fetch lwpid from thread.
10688 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
10689 (proceed_one_lwp): Update, "entry" parameter is a
10690 struct thread_info * now. Fetch lwpid from thread.
10691 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
10692 struct thread_info * now.
10693 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
10694 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
10695 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
10696 directly.
10697 (regsets_store_inferior_registers): Ditto.
10698 (fetch_register, store_register): Ditto.
10699 (linux_read_memory, linux_write_memory): Ditto.
10700 (linux_request_interrupt): Ditto.
10701 (linux_read_auxv): Ditto.
10702 (linux_xfer_siginfo): Ditto.
10703 (linux_qxfer_spu): Ditto.
10704 (linux_qxfer_libraries_svr4): Ditto.
10705 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
10706 moved to inferiors.h.
10707 (get_lwp): Delete.
10708 (get_thread_lwp): Update.
10709 (struct lwp_info): Delete member "entry". Simplify comment for
10710 member "thread".
10711 (all_lwps): Delete.
10712 * linux-mips-low.c (mips_read_description): Fetch lwpid from
10713 current_inferior directly.
10714 (update_watch_registers_callback): Update, "entry" parameter is a
10715 struct thread_info * now. Fetch pid from thread.
10716 (mips_linux_prepare_to_resume): Fetch ptid from thread.
10717 (mips_insert_point): Fetch lwpid from current_inferior.
10718 Pass &all_threads to find_inferior, not &all_lwps.
10719 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
10720 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
10721 directly.
10722 (mips_stopped_data_address): Ditto.
10723 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
10724 directly.
10725 * linux-tile-low.c (tile_arch_setup): Ditto.
10726 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
10727 (update_debug_registers_callback): Update, "entry" parameter is a
10728 struct thread_info * now. Fetch pid from thread.
10729 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
10730 Pass &all_threads to find_inferior, not &all_lwps.
10731 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
10732 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
10733 Pass &all_threads to find_inferior, not &all_lwps.
10734 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
10735 (i386_dr_low_get_status): Ditto.
10736 (x86_linux_prepare_to_resume): Fetch ptid from thread.
10737 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
10738 (x86_linux_read_description): Ditto.
10739 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
10740
10741 2014-02-20 Doug Evans <dje@google.com>
10742
10743 * inferiors.c (get_first_inferior): Fix buglet.
10744
10745 2014-02-19 Doug Evans <dje@google.com>
10746
10747 * gdbthread.h (add_thread): Change result type to struct thread_info *.
10748 * inferiors.c (add_thread): Change result type to struct thread_info *.
10749 All callers updated.
10750 (add_lwp): Call add_thread here instead of in callers.
10751 All callers updated.
10752 * linux-low.h (get_lwp_thread): Rewrite.
10753 (struct lwp_info): New member "thread".
10754
10755 2014-02-19 Doug Evans <dje@google.com>
10756
10757 * linux-low.c (add_lwp): Change result to struct lwp_info *.
10758 All callers updated.
10759
10760 2014-02-19 Doug Evans <dje@google.com>
10761
10762 * inferiors.c (add_thread): Fix whitespace.
10763
10764 2014-02-19 Doug Evans <dje@google.com>
10765
10766 * dll.c (clear_dlls): Replace accessing list implemention details
10767 with API function.
10768 * gdbthread.h (get_first_thread): Declare.
10769 * inferiors.c (for_each_inferior_with_data): New function.
10770 (get_first_thread): New function.
10771 (find_thread_ptid): Simplify.
10772 (get_first_inferior): New function.
10773 (clear_list): Delete.
10774 (one_inferior_p): New function.
10775 (clear_inferior_list): New function.
10776 (clear_inferiors): Update.
10777 * inferiors.h (for_each_inferior_with_data): Declare.
10778 (clear_inferior_list): Declare.
10779 (one_inferior_p): Declare.
10780 (get_first_inferior): Declare.
10781 * linux-low.c (linux_wait_for_event): Replace accessing list
10782 implemention details with API function.
10783 * server.c (target_running): Ditto.
10784 (accumulate_file_name_length): New function.
10785 (emit_dll_description): New function.
10786 (handle_qxfer_libraries): Replace accessing list implemention
10787 details with API function.
10788 (handle_qxfer_threads_worker): New function.
10789 (handle_qxfer_threads_proper): Replace accessing list implemention
10790 details with API function.
10791 (handle_query): Ditto.
10792 (visit_actioned_threads_callback_ftype): New typedef.
10793 (visit_actioned_threads_data): New struct.
10794 (visit_actioned_threads): Rewrite to be find_inferior callback.
10795 (resume): Call find_inferior.
10796 (handle_status): Replace accessing list implemention
10797 details with API function.
10798 (process_serial_event): Replace accessing list implemention details
10799 with API function.
10800 * target.c (set_desired_inferior): Replace accessing list implemention
10801 details with API function.
10802 * tracepoint.c (same_process_p): New function.
10803 (gdb_agent_about_to_close): Replace accessing list implemention
10804 details with API function.
10805 * win32-low.c (child_delete_thread): Replace accessing list
10806 implemention details with API function.
10807 (match_dll_by_basename): New function.
10808 (dll_is_loaded_by_basename): New function.
10809 (win32_ensure_ntdll_loaded): Replace accessing list implemention
10810 details call to dll_is_loaded_by_basename.
10811
10812 2014-02-19 Doug Evans <dje@google.com>
10813
10814 * dll.h (struct dll_info): Add comment.
10815 * gdbthread.h (struct thread_info): Add comment.
10816 (current_ptid): Simplify.
10817 * inferiors.c (add_process): Update.
10818 (remove_process): Update.
10819 * inferiors.h (struct process_info): Rename member "head" to "entry".
10820 * linux-low.c (delete_lwp): Update.
10821 (add_lwp): Update.
10822 (last_thread_of_process_p): Update.
10823 (kill_one_lwp_callback, linux_kill): Update.
10824 (status_pending_p_callback): Update.
10825 (wait_for_sigstop): Update. Simplify read of ptid.
10826 (start_step_over): Update.
10827 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
10828 (get_lwp_thread): Update.
10829 (struct lwp_info): Rename member "head" to "entry".
10830 * regcache.h (inferior_list_entry): Delete.
10831 * server.c (kill_inferior_callback): Update.
10832 (detach_or_kill_inferior_callback): Update.
10833 (print_started_pid): Update.
10834 (print_attached_pid): Update.
10835 (process_serial_event): Simplify read of ptid.
10836 * thread-db.c (thread_db_create_event): Update.
10837 (thread_db_get_tls_address): Update.
10838 * win32-low.c (current_inferior_ptid): Simplify.
10839
10840 2014-02-19 Tom Tromey <tromey@redhat.com>
10841
10842 * target.h (struct target_ops) <supports_btrace>: Add target_ops
10843 argument.
10844 (target_supports_btrace): Update.
10845
10846 2014-02-14 Yao Qi <yao@codesourcery.com>
10847
10848 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
10849 (rsp-low-ipa.o): New target.
10850
10851 2014-02-12 Tom Tromey <tromey@redhat.com>
10852
10853 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
10854 convert_ascii_to_int.
10855 * regcache.c (registers_to_string): Likewise.
10856 * remote-utils.c (decode_M_packet): Likewise.
10857 * server.c (process_serial_event): Likewise.
10858
10859 2014-02-12 Tom Tromey <tromey@redhat.com>
10860
10861 * server.c (handle_query, handle_v_run): Use hex2bin, not
10862 unhexify.
10863 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
10864
10865 2014-02-12 Tom Tromey <tromey@redhat.com>
10866
10867 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
10868 convert_int_to_ascii.
10869 * regcache.c (registers_to_string, collect_register_as_string):
10870 Likewise.
10871 * remote-utils.c (look_up_one_symbol, relocate_instruction):
10872 Likewise.
10873 * server.c (process_serial_event): Likewise.
10874 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
10875 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
10876
10877 2014-02-12 Tom Tromey <tromey@redhat.com>
10878
10879 * remote-utils.c (look_up_one_symbol, monitor_output): Use
10880 bin2hex, not hexify.
10881 * tracepoint.c (cmd_qtstatus): Likewise.
10882
10883 2014-02-12 Tom Tromey <tromey@redhat.com>
10884
10885 * remote-utils.c (monitor_output): Pass explicit length to
10886 hexify.
10887
10888 2014-02-12 Tom Tromey <tromey@redhat.com>
10889
10890 * tracepoint.c: Include rsp-low.h.
10891 * server.c: Include rsp-low.h.
10892 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
10893 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
10894 declare.
10895 * remote-utils.c: Include rsp-low.h.
10896 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
10897 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
10898 (convert_int_to_ascii, convert_ascii_to_int): Move to
10899 common/rsp-low.c.
10900 * regcache.c: Include rsp-low.h.
10901 * ax.c: Include rsp-low.h.
10902 * Makefile.in (SFILES): Add common/rsp-low.c.
10903 (OBS): Add rsp-low.o.
10904 (rsp-low.o): New target.
10905
10906 2014-02-12 Tom Tromey <tromey@redhat.com>
10907
10908 * utils.h (pulongest, plongest, phex_nz): Don't declare.
10909 Include print-utils.h.
10910 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
10911 (plongest, thirty_two, phex_nz): Remove.
10912 * Makefile.in (SFILES): Add common/print-utils.c.
10913 (OBS): Add print-utils.o.
10914 (print-utils-ipa.o): New target.
10915 (print-utils.o): New target.
10916 (IPA_OBJS): Add print-utils-ipa.o.
10917
10918 2014-02-06 Tom Tromey <tromey@redhat.com>
10919
10920 * Makefile.in (SFILES): Fix indentation.
10921
10922 2014-02-05 Doug Evans <dje@google.com>
10923
10924 * linux-low.c (linux_wait_for_event): Improve comment.
10925 (linux_wait_1): Keep current_inferior in sync with event_child.
10926
10927 2014-01-22 Doug Evans <dje@google.com>
10928
10929 * gdbthread.h (gdb_id_to_thread): Delete, unused.
10930
10931 2014-01-22 Doug Evans <dje@google.com>
10932
10933 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
10934 * configure: Regenerate.
10935 * config.in: Regenerate.
10936 * Makefile.in (SFILES): Add debug.c.
10937 (OBS): Add debug.o.
10938 * debug.c: New file.
10939 * debug.h: New file.
10940 * linux-aarch64-low.c (*): Update all debugging printfs to use
10941 debug_printf instead of fprintf.
10942 * linux-arm-low.c (*): Ditto.
10943 * linux-cris-low.c (*): Ditto.
10944 * linux-crisv32-low.c (*): Ditto.
10945 * linux-m32r-low.c (*): Ditto.
10946 * linux-sparc-low.c (*): Ditto.
10947 * linux-x86.c (*): Ditto.
10948 * linux-low.c (*): Ditto.
10949 (linux_wait_1): Add calls to debug_enter, debug_exit.
10950 (linux_wait): Remove redundant debugging printf.
10951 (stop_all_lwps): Add calls to debug_enter, debug_exit.
10952 (linux_resume, unstop_all_lwps): Ditto.
10953 * mem-break.c (*): Update all debugging printfs to use
10954 debug_printf instead of fprintf.
10955 * remote-utils.c (*): Ditto.
10956 * thread-db.c (*): Ditto.
10957 * server.c #include <ctype.h>, "gdb_vecs.h".
10958 (debug_threads): Moved to debug.c.
10959 (*): Update all debugging printfs to use debug_printf instead of
10960 fprintf.
10961 (start_inferior): Replace call to fflush with call to debug_flush.
10962 (monitor_show_help): Mention set debug-format.
10963 (parse_debug_format_options): New function.
10964 (handle_monitor_command): Handle "monitor set debug-format".
10965 (gdbserver_usage): Mention --debug-format.
10966 (main): Parse --debug-format.
10967 * server.h (debug_threads): Declaration moved to debug.h.
10968 #include "debug.h".
10969 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
10970 trace_debug_1 that uses debug_printf.
10971 (tracepoint_look_up_symbols): Update all debugging printfs to use
10972 debug_printf instead of fprintf.
10973
10974 2014-01-20 Baruch Siach <baruch@tkos.co.il>
10975
10976 * linux-xtensa-low.c: Include asm/ptrace.h instead of
10977 sys/ptrace.h.
10978
10979 2014-01-17 Pedro Alves <palves@redhat.com>
10980
10981 PR build/16445
10982 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
10983 defined after including gdb_proc_service.h.
10984
10985 2014-01-16 Doug Evans <dje@google.com>
10986
10987 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
10988 (match_dll): Use it.
10989
10990 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
10991
10992 * target.h (target_ops) <read_btrace>: Change parameters and
10993 return type to allow error reporting.
10994 * server.c (handle_qxfer_btrace): Support delta reads. Pass
10995 trace reading errors on.
10996 * linux-low.c (linux_low_read_btrace): Pass trace reading
10997 errors on.
10998 (linux_low_disable_btrace): New.
10999
11000 2014-01-15 Doug Evans <dje@google.com>
11001
11002 * inferiors.c (thread_id_to_gdb_id): Delete.
11003 * inferiors.h (thread_id_to_gdb_id): Delete.
11004
11005 2014-01-13 Eli Zaretskii <eliz@gnu.org>
11006
11007 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
11008 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
11009 versions.
11010
11011 2014-01-08 Pedro Alves <palves@redhat.com>
11012
11013 * server.c (handle_status): Don't discard previous queued stop
11014 replies or thread's pending status here.
11015 (main) <disconnection>: Do it here instead.
11016
11017 2014-01-08 Pedro Alves <palves@redhat.com>
11018
11019 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
11020 * server.c (visit_actioned_threads, handle_pending_status): New
11021 function.
11022 (handle_v_cont): Factor out parts to ...
11023 (resume): ... this new function. If in all-stop, and a thread
11024 being resumed has a pending status, report it without actually
11025 resuming.
11026 (myresume): Adjust to use the new 'resume' function.
11027 (clear_pending_status_callback, set_pending_status_callback)
11028 (find_status_pending_thread_callback): New functions.
11029 (handle_status): Handle the case of multiple threads having
11030 interesting statuses to report. Report threads' real last signal
11031 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
11032 with an interesting thread to report the status for, instead of
11033 always reporting the status of the first thread.
11034
11035 2014-01-01 Joel Brobecker <brobecker@adacore.com>
11036
11037 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
11038 * gdbreplay.c (gdbreplay_version): Likewise.
11039
11040 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
11041
11042 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
11043 iov.iov_len with the real length in use.
11044
11045 2013-12-13 Joel Brobecker <brobecker@adacore.com>
11046
11047 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
11048 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
11049 for all targets that use win32-low.c.
11050 * win32-low.c (win32_ensure_ntdll_loaded): New function.
11051 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
11052
11053 2013-12-13 Pedro Alves <palves@redhat.com>
11054
11055 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
11056 if equal to TARGET_WAITKIND_LOADED.
11057 * win32-low.c (cached_status): New static global.
11058 (win32_wait): Add declaration.
11059 (do_initial_child_stuff): Flush all initial pending debug events
11060 up to the initial breakpoint.
11061 (win32_wait): If CACHED_STATUS was set, return that instead
11062 of doing a real wait. Remove the code resuming the execution
11063 of the inferior after receiving a TARGET_WAITKIND_LOADED event
11064 during the initial phase. Also remove the code changing
11065 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
11066 TARGET_WAITKIND_STOPPED.
11067
11068 2013-12-11 Yao Qi <yao@codesourcery.com>
11069
11070 * notif.c (handle_notif_ack): Return 0 if no notification
11071 matches.
11072
11073 2013-11-20 Doug Evans <dje@google.com>
11074
11075 * linux-low.c (linux_set_resume_request): Fix comment.
11076
11077 2013-11-20 Doug Evans <dje@google.com>
11078
11079 * linux-low.c (resume_status_pending_p): Tweak comment.
11080
11081 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
11082
11083 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
11084 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
11085 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
11086 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
11087 (srv_amd64_regobj): Add amd64-mpx.o.
11088 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
11089 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
11090 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
11091 * i387-fp.c (num_pl_bnd_register) Added constant.
11092 (num_pl_bnd_cfg_registers) Added constant.
11093 (struct i387_xsave) Added reserved area and MPX fields.
11094 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
11095 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
11096 function.
11097 (tdesc_i386_mpx_linux): Add MPX amd64 target.
11098 (init_registers_amd64_mpx_linux): Declare new function.
11099 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
11100 (x86_64_regmap): Add MPX registers.
11101 (x86_linux_read_description): Add MPX case.
11102 (initialize_low_arch): Initialize MPX targets.
11103
11104 2013-11-18 Tom Tromey <tromey@redhat.com>
11105
11106 * configure: Rebuild.
11107 * configure.ac: Don't check for stdlib.h.
11108 * gdbreplay.c: Unconditionally include stdlib.h.
11109
11110 2013-11-18 Tom Tromey <tromey@redhat.com>
11111
11112 * config.in: Rebuild.
11113 * configure: Rebuild.
11114 * configure.ac: Don't use AC_HEADER_DIRENT.
11115
11116 2013-11-18 Tom Tromey <tromey@redhat.com>
11117
11118 * server.h: Don't check HAVE_STRING_H.
11119 * gdbreplay.c: Don't check HAVE_STRING_H.
11120 * configure: Rebuild.
11121
11122 2013-11-18 Tom Tromey <tromey@redhat.com>
11123
11124 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
11125 LIBGNU.
11126
11127 2013-11-08 Tom Tromey <tromey@redhat.com>
11128
11129 * configure, config.in: Rebuild.
11130 * configure.ac: Remove unused configury.
11131
11132 2013-11-08 Tom Tromey <tromey@redhat.com>
11133
11134 * acinclude.m4: Include common.m4, codeset.m4.
11135 * configure, config.in: Rebuild.
11136 * configure.ac: Use GDB_AC_COMMON.
11137
11138 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
11139
11140 * linux-s390-low.c (HWCAP_S390_TE): New define.
11141 (s390_arch_setup): Consider the TE field in the HWCAP for
11142 determining 'have_regset_tdb'.
11143
11144 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
11145
11146 PR gdb/16014
11147 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
11148 call to sizeof.
11149
11150 2013-10-02 Pedro Alves <palves@redhat.com>
11151
11152 * server.c (process_serial_event): Don't output "GDBserver
11153 exiting" if GDB is connected through stdio.
11154 * target.c (mywait): Likewise, be silent if GDB is connected
11155 through stdio.
11156
11157 2013-10-01 Joel Brobecker <brobecker@adacore.com>
11158
11159 * lynx-low.c (lynx_add_threads_after_attach): New function.
11160 (lynx_attach): Remove call to add_thread. Add call to
11161 lynx_add_threads_after_attach instead.
11162
11163 2013-09-28 Mike Frysinger <vapier@gentoo.org>
11164
11165 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
11166 * config.in, configure: Regenerated.
11167
11168 2013-09-18 Yao Qi <yao@codesourcery.com>
11169
11170 PR server/15959
11171 * server.c (start_inferior): Clear 'resume_info'.
11172
11173 2013-09-16 Jiong Wang <jiwang@tilera.com>
11174
11175 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
11176 for each register.
11177
11178 2013-09-16 Jiong Wang <jiwang@tilera.com>
11179
11180 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
11181 linux-tile-low.o to srv_tgtobj.
11182
11183 2013-09-16 Will Newton <will.newton@linaro.org>
11184
11185 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
11186 out regs.
11187
11188 2013-09-06 Pedro Alves <palves@redhat.com>
11189
11190 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
11191 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
11192 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
11193 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
11194 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
11195 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
11196
11197 2013-09-06 Pedro Alves <palves@redhat.com>
11198
11199 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
11200 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
11201
11202 2013-09-06 Pedro Alves <palves@redhat.com>
11203
11204 * linux-amd64-ipa.c: Include tracepoint.h.
11205 * linux-i386-ipa.c: Include tracepoint.h.
11206
11207 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
11208
11209 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
11210 (ps_get_thread_area): New function.
11211
11212 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
11213
11214 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
11215 (initialize_low_arch): Call init_registers_crisv32 rather than
11216 init_register_crisv32.
11217
11218 2013-09-05 Pedro Alves <palves@redhat.com>
11219
11220 * server.h (handle_vFile, hostio_last_error_from_errno): Move
11221 to ...
11222 * hostio.h: ... this new file.
11223 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
11224 win32-low.c: Include hostio.h.
11225
11226 2013-09-05 Pedro Alves <palves@redhat.com>
11227
11228 * server.h (gdb_client_data, handler_func, callback_handler_func)
11229 (delete_file_handler, add_file_handler, append_callback_event)
11230 (delete_callback_event, start_event_loop, initialize_event_loop):
11231 Move to event-loop.h and include it.
11232 * event-loop.h: New file.
11233
11234 2013-09-05 Pedro Alves <palves@redhat.com>
11235
11236 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
11237 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
11238 (loaded_dll, unloaded_dll): Move to ...
11239 * dll.h: ... this new file.
11240 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
11241
11242 2013-09-05 Pedro Alves <palves@redhat.com>
11243
11244 * server.h (current_process, get_thread_process, all_processes)
11245 (add_inferior_to_list, for_each_inferior, current_inferior)
11246 (remove_inferior, add_process, remove_process, find_process_pid)
11247 (have_started_inferiors_p, have_attached_inferiors_p)
11248 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
11249 (clear_inferiors, find_inferior, find_inferior_id)
11250 (inferior_target_data, set_inferior_target_data)
11251 (inferior_regcache_data, set_inferior_regcache_data): Move to
11252 inferiors.h, and include it.
11253 * inferiors.h: New file.
11254
11255 2013-09-05 Pedro Alves <palves@redhat.com>
11256
11257 * server.h (struct emit_ops, current_insn_ptr, emit_error):
11258 Move ...
11259 * ax.h: ... here.
11260
11261 2013-09-05 Pedro Alves <palves@redhat.com>
11262
11263 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
11264 tracepoint.h.
11265 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
11266 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
11267 (handle_tracepoint_general_set, handle_tracepoint_query)
11268 (tracepoint_finished_step, tracepoint_was_hit)
11269 (release_while_stepping_state_list, current_traceframe)
11270 (in_readonly_region, traceframe_read_mem)
11271 (fetch_traceframe_registers, traceframe_read_sdata)
11272 (traceframe_read_info, struct fast_tpoint_collect_status)
11273 (fast_tracepoint_collecting, force_unlock_trace_buffer)
11274 (handle_tracepoit_bkpts, initialize_low_tracepoint)
11275 (supply_fast_tracepoint_registers)
11276 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
11277 (ipa_tdesc, claim_trampoline_space)
11278 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
11279 (agent_mem_read, agent_get_trace_state_variable_value)
11280 (agent_set_trace_state_variable_value, agent_tsv_read)
11281 (agent_mem_read_string, get_raw_reg_func_addr)
11282 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
11283 * tracepoint.h: ... this new file.
11284
11285 2013-09-05 Pedro Alves <palves@redhat.com>
11286
11287 * server.h (perror_with_name, error, fatal, warning, paddress)
11288 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
11289 include it.
11290 * utils.h: New file.
11291
11292 2013-09-05 Pedro Alves <palves@redhat.com>
11293
11294 * server.h (remote_debug, noack_mode, transport_is_reliable)
11295 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
11296 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
11297 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
11298 (write_enn, initialize_async_io, enable_async_io)
11299 (disable_async_io, check_remote_input_interrupt_request)
11300 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
11301 (dead_thread_notify, prepare_resume_reply)
11302 (decode_address_to_semicolon, decode_address, decode_m_packet)
11303 (decode_M_packet, decode_X_packet, decode_xfer_write)
11304 (decode_search_memory_packet, unhexify, hexify)
11305 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
11306 (look_up_one_symbol, relocate_instruction)
11307 (monitor_output): Move to remote-utils.h, and include it.
11308 * remote-utils.h: New file.
11309
11310 2013-09-05 Pedro Alves <palves@redhat.com>
11311
11312 * server.h (_): Delete.
11313
11314 2013-09-02 Pedro Alves <palves@redhat.com>
11315
11316 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
11317 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
11318 allocated.
11319 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
11320
11321 2013-09-02 Pierre Muller <muller@sourceware.org>
11322
11323 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
11324 or WriteProcessMemory complete successfully and handle
11325 ERROR_PARTIAL_COPY error.
11326
11327 2013-09-02 Pedro Alves <palves@redhat.com>
11328
11329 * server.c (gdb_read_memory): Return -1 on traceframe memory read
11330 error instead of EIO.
11331
11332 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11333
11334 PR server/15604
11335 * linux-low.c: Include filestuff.h.
11336 (linux_create_inferior) <pid == 0>: Call close_most_fds.
11337 * lynx-low.c: Include filestuff.h.
11338 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
11339 * server.c: Include filestuff.h.
11340 (main): Call notice_open_fds.
11341 * spu-low.c: Include filestuff.h.
11342 (spu_create_inferior) <pid == 0>: Call close_most_fds.
11343
11344 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
11345
11346 * Makefile.in: Explain why ../target and ../nat are not
11347 listed as include file search paths.
11348 (linux-waitpid.o): New object file rule.
11349 * configure.srv (srv_native_linux_obj): New variable.
11350 Replace all occurrences of linux native object files with
11351 $srv_native_linux_obj.
11352 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
11353 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
11354 (linux_enable_event_reporting): Remove declaration.
11355 (my_waitpid): Moved to common/linux-waitpid.c.
11356 (linux_wait_for_event): Pass ptid when calling
11357 linux_enable_event_reporting.
11358 (linux_supports_tracefork_flag): Remove.
11359 (linux_enable_event_reporting): Likewise.
11360 (linux_tracefork_grandchild): Remove.
11361 (STACK_SIZE): Moved to common/linux-ptrace.c.
11362 (linux_tracefork_child): Remove.
11363 (linux_test_for_tracefork): Remove.
11364 (linux_look_up_symbols): Call linux_supports_traceclone.
11365 (initialize_low): Remove call to linux_test_for_tracefork.
11366 * linux-low.h (PTRACE_TYPE_ARG3): Move to
11367 common/linux-ptrace.h.
11368 (PTRACE_TYPE_ARG4): Likewise.
11369 Include linux-ptrace.h.
11370
11371 2013-08-21 Pedro Alves <palves@redhat.com>
11372
11373 * config.in: Renegerate.
11374
11375 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
11376
11377 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
11378 (SFILES): Remove $(srcdir)/common/target-common.c and
11379 add $(srcdir)/target/waitstatus.c.
11380 (OBS): Remove target-common.o and add waitstatus.o.
11381 (server_h): Remove $(srcdir)/../common/target-common.h and
11382 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
11383 and $(srcdir)/../target/waitstatus.h.
11384 (target-common.o): Remove.
11385 (waitstatus.o): New target object file.
11386 * target.h: Do not include target-common.h and
11387 include target/resume.h, target/wait.h and
11388 target/waitstatus.h.
11389
11390 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
11391
11392 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
11393 to PTRACE_TYPE_ARG3.
11394 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
11395 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
11396 PTRACE_TYPE_ARG4.
11397 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
11398 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
11399
11400 2013-07-27 Jie Zhang <jie@codesourcery.com>
11401 Daniel Jacobowitz <dan@codesourcery.com>
11402 Yao Qi <yao@codesourcery.com>
11403
11404 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
11405 (mips-linux-watch.o): New rule.
11406 (mips_linux_watch_h): New variable.
11407 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
11408 srv_tgtobj.
11409 * linux-mips-low.c: Include mips-linux-watch.h.
11410 (struct arch_process_info, struct arch_lwp_info): New.
11411 (update_watch_registers_callback): New function.
11412 (mips_linux_new_process, mips_linux_new_thread) New functions.
11413 (mips_linux_prepare_to_resume, mips_insert_point): New
11414 functions.
11415 (mips_remove_point, mips_stopped_by_watchpoint): New
11416 functions.
11417 (rsp_bp_type_to_target_hw_bp_type): New function.
11418 (mips_stopped_data_address): New function.
11419 (the_low_target): Add watchpoint support functions.
11420
11421 2013-07-27 Yao Qi <yao@codesourcery.com>
11422
11423 * i386-low.c: Include break-common.h.
11424 (enum target_hw_bp_type): Remove.
11425
11426 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
11427
11428 * Makefile.in (SFILES): /common/target-common.c.
11429 (OBS): Add target-common.o.
11430 (server_h): Add $(srcdir)/../common/target-common.h.
11431 (target-common.o): New target.
11432 * server.c (queue_stop_reply_callback): Free
11433 status string after use.
11434 * target.c (target_waitstatus_to_string): Remove.
11435 * target.h: Include target-common.h.
11436 (resume_kind): Likewise.
11437 (target_waitkind): Likewise.
11438 (target_waitstatus): Likewise.
11439 (TARGET_WNOHANG): Likewise.
11440
11441 2013-07-04 Yao Qi <yao@codesourcery.com>
11442
11443 * Makefile.in (host_alias): Use @host_noncanonical@.
11444 (target_alias): Use @target_noncanonical@.
11445 * configure.ac: Use ACX_NONCANONICAL_TARGET and
11446 ACX_NONCANONICAL_HOST.
11447 * configure: Regenerated.
11448
11449 Revert:
11450 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
11451
11452 * configure.ac (version_host, version_target): Set and AC_SUBST them.
11453 * configure: Rebuild.
11454 * Makefile.in (version_host, version_target): Get from configure.
11455 (version.c): Use $(version_host) and $(version_target).
11456
11457 2013-07-03 Pedro Alves <palves@redhat.com>
11458
11459 * Makefile.in (config.status): Depend on development.sh.
11460 * acinclude.m4: Include libmcheck.m4.
11461 * configure: Regenerate.
11462
11463 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
11464
11465 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
11466 attribute inside the parentheses.
11467 (winapi_DebugSetProcessKillOnExit): Ditto.
11468 (winapi_DebugBreakProcess): Ditto.
11469 (winapi_GenerateConsoleCtrlEvent): Ditto.
11470
11471 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
11472
11473 * notif.h (notif_event): Add a dummy member to avoid compiler
11474 errors.
11475
11476 2013-07-01 Pedro Alves <palves@redhat.com>
11477
11478 * hostio.c (HOSTIO_PATH_MAX): Define.
11479 (require_filename, handle_open, handle_unlink, handle_readlink):
11480 Use it.
11481
11482 2013-07-01 Pedro Alves <palves@redhat.com>
11483
11484 * server.h: Include "pathmax.h".
11485 * linux-low.c: Don't include sys/param.h.
11486 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
11487 MAXPATHLEN.
11488 * win32-low.c: Don't include sys/param.h.
11489 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
11490
11491 2013-07-01 Pedro Alves <palves@redhat.com>
11492
11493 * event-loop.c: Don't check HAVE_UNISTD_H before including
11494 <unistd.h>.
11495 * gdbreplay.c: Likewise.
11496 * remote-utils.c: Likewise.
11497 * server.c: Likewise.
11498 * configure.ac: Don't check for unistd.h.
11499 * configure: Regenerate.
11500
11501 2013-06-28 Tom Tromey <tromey@redhat.com>
11502
11503 * Makefile.in (version.c): Use version.in, not
11504 common/version.in.
11505
11506 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
11507
11508 * configure.ac (version_host, version_target): Set and AC_SUBST them.
11509 * configure: Rebuild.
11510 * Makefile.in (version_host, version_target): Get from configure.
11511 (version.c): Use $(version_host) and $(version_target).
11512
11513 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
11514
11515 Fix trace-status to output user name without trailing colon.
11516 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
11517
11518 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
11519
11520 Fix trace-status to output proper start-time and stop-time.
11521 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
11522 output start time and stop time in hex as gdb expects.
11523
11524 2013-06-26 Pedro Alves <pedro@codesourcery.com>
11525
11526 * tracepoint.c (build_traceframe_info_xml): Output trace state
11527 variables present in the trace buffer.
11528
11529 2013-06-24 Tom Tromey <tromey@redhat.com>
11530
11531 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
11532 create-version.sh.
11533 (version.o): Remove.
11534 * gdbreplay.c: Include version.h.
11535 (version, host_name): Don't declare.
11536 * server.h: Include version.h.
11537 (version, host_name): Don't declare.
11538
11539 2013-06-12 Pedro Alves <palves@redhat.com>
11540
11541 * linux-x86-low.c (linux_is_elf64): Delete global.
11542 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
11543 with local linux_pid_exe_is_elf_64_file use.
11544
11545 2013-06-11 Pedro Alves <palves@redhat.com>
11546
11547 * linux-low.c (regset_disabled, disable_regset): New functions.
11548 (regsets_fetch_inferior_registers)
11549 (regsets_store_inferior_registers): Use them.
11550 (initialize_regsets_info); Don't allocate the disabled_regsets
11551 array here.
11552 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
11553 comment.
11554
11555 2013-06-11 Pedro Alves <palves@redhat.com>
11556
11557 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
11558 xmalloc.
11559
11560 2013-06-11 Pedro Alves <palves@redhat.com>
11561
11562 * linux-x86-low.c (initialize_low_arch): Call
11563 init_registers_x32_avx_linux.
11564
11565 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
11566
11567 Fix compatibility with Android Bionic.
11568 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
11569 it is not empty.
11570
11571 2013-06-07 Pedro Alves <palves@redhat.com>
11572
11573 PR server/14823
11574 * Makefile.in (OBS): Add tdesc.o.
11575 (IPA_OBJS): Add tdesc-ipa.o.
11576 (tdesc-ipa.o): New rule.
11577 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
11578 interface.
11579 * linux-low.c (new_inferior): Delete.
11580 (disabled_regsets, num_regsets): Delete.
11581 (linux_add_process): Adjust to set the new per-process
11582 new_inferior flag.
11583 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
11584 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
11585 was a stop. When calling arch_setup, switch the current inferior
11586 to the thread that got an event.
11587 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
11588 (regsets_fetch_inferior_registers)
11589 (regsets_store_inferior_registers): New regsets_info parameter.
11590 Adjust to use it.
11591 (linux_register_in_regsets): New regs_info parameter. Adjust to
11592 use it.
11593 (register_addr, fetch_register, store_register): New usrregs_info
11594 parameter. Adjust to use it.
11595 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
11596 parameter regs_info. Adjust to use it.
11597 (linux_fetch_registers): Get the current inferior's regs_info, and
11598 adjust to use it.
11599 (linux_store_registers): Ditto.
11600 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
11601 (initialize_low): Don't initialize the target_regsets here. Call
11602 initialize_low_arch.
11603 * linux-low.h (target_regsets): Delete declaration.
11604 (struct regsets_info): New.
11605 (struct usrregs_info): New.
11606 (struct regs_info): New.
11607 (struct process_info_private) <new_inferior>: New field.
11608 (struct linux_target_ops): Delete the num_regs, regmap, and
11609 regset_bitmap fields. New field regs_info.
11610 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
11611 * i387-fp.c (num_xmm_registers): Delete.
11612 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
11613 calls to new interface.
11614 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
11615 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
11616 Infer the number of xmm registers from the regcache's target
11617 description.
11618 * i387-fp.h (num_xmm_registers): Delete.
11619 * inferiors.c (add_thread): Don't install the thread's regcache
11620 here.
11621 * proc-service.c (gregset_info): Fetch the current inferior's
11622 regs_info. Adjust to use it.
11623 * regcache.c: Include tdesc.h.
11624 (register_bytes, reg_defs, num_registers)
11625 (gdbserver_expedite_regs): Delete.
11626 (get_thread_regcache): If the thread doesn't have a regcache yet,
11627 create one, instead of aborting gdbserver.
11628 (regcache_invalidate_one): Rename to ...
11629 (regcache_invalidate_thread): ... this.
11630 (regcache_invalidate_one): New.
11631 (regcache_invalidate): Only invalidate registers of the current
11632 process.
11633 (init_register_cache): Add target_desc parameter, and use it.
11634 (new_register_cache): Ditto. Assert the target description has a
11635 non zero registers_size.
11636 (regcache_cpy): Add assertions. Adjust.
11637 (realloc_register_cache, set_register_cache): Delete.
11638 (registers_to_string, registers_from_string): Adjust.
11639 (find_register_by_name, find_regno, find_register_by_number)
11640 (register_cache_size): Add target_desc parameter, and use it.
11641 (free_register_cache_thread, free_register_cache_thread_one)
11642 (regcache_release, register_cache_size): New.
11643 (register_size): Add target_desc parameter, and use it.
11644 (register_data, supply_register, supply_register_zeroed)
11645 (supply_regblock, supply_register_by_name, collect_register)
11646 (collect_register_as_string, collect_register_by_name): Adjust.
11647 * regcache.h (struct target_desc): Forward declare.
11648 (struct regcache) <tdesc>: New field.
11649 (init_register_cache, new_register_cache): Add target_desc
11650 parameter.
11651 (regcache_invalidate_thread): Declare.
11652 (regcache_invalidate_one): Delete declaration.
11653 (regcache_release): Declare.
11654 (find_register_by_number, register_cache_size, register_size)
11655 (find_regno): Add target_desc parameter.
11656 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
11657 declarations.
11658 * remote-utils.c: Include tdesc.h.
11659 (outreg, prepare_resume_reply): Adjust.
11660 * server.c: Include tdesc.h.
11661 (gdbserver_xmltarget): Delete declaration.
11662 (get_features_xml, process_serial_event): Adjust.
11663 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
11664 declare.
11665 (struct process_info) <tdesc>: New field.
11666 (ipa_tdesc): Declare.
11667 * tdesc.c: New file.
11668 * tdesc.h: New file.
11669 * tracepoint.c: Include tdesc.h.
11670 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
11671 (get_context_regcache): Adjust to pass ipa_tdesc down.
11672 (do_action_at_tracepoint): Adjust to get the register cache size
11673 from the context regcache's description.
11674 (traceframe_walk_blocks): Adjust to get the register cache size
11675 from the current trace frame's description.
11676 (traceframe_get_pc): Adjust to get current trace frame's
11677 description and pass it down.
11678 (gdb_collect): Adjust to get the register cache size from the
11679 IPA's description.
11680 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
11681 (gdbserver_xmltarget): Delete.
11682 (initialize_low_tracepoint): Set the ipa's target description.
11683 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
11684 (initialize_low_tracepoint): Set the ipa's target description.
11685 * linux-x86-low.c: Include tdesc.h.
11686 [__x86_64__] (is_64bit_tdesc): New.
11687 (ps_get_thread_area, x86_get_thread_area): Use it.
11688 (i386_cannot_store_register): Rename to ...
11689 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
11690 (i386_cannot_fetch_register): Rename to ...
11691 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
11692 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
11693 to new interface.
11694 (target_regsets): Rename to ...
11695 (x86_regsets): ... this.
11696 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
11697 interface.
11698 (x86_siginfo_fixup): Use is_64bit_tdesc.
11699 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
11700 (tdesc_x32_avx_linux, tdesc_x32_linux)
11701 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
11702 Declare.
11703 (x86_linux_update_xmltarget): Delete.
11704 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
11705 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
11706 (AMD64_LINUX_USER64_CS): New.
11707 (x86_linux_read_description): New, based on
11708 x86_linux_update_xmltarget.
11709 (same_process_callback): New.
11710 (x86_arch_setup_process_callback): New.
11711 (x86_linux_update_xmltarget): New.
11712 (x86_regsets_info): New.
11713 (amd64_linux_regs_info): New.
11714 (i386_linux_usrregs_info): New.
11715 (i386_linux_regs_info): New.
11716 (x86_linux_regs_info): New.
11717 (x86_arch_setup): Reimplement.
11718 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
11719 (x86_emit_ops): Ditto.
11720 (the_low_target): Adjust. Install x86_linux_regs_info,
11721 x86_cannot_fetch_register, and x86_cannot_store_register.
11722 (initialize_low_arch): New.
11723 * linux-ia64-low.c (tdesc_ia64): Declare.
11724 (ia64_fetch_register): Adjust.
11725 (ia64_usrregs_info, regs_info): New globals.
11726 (ia64_regs_info): New function.
11727 (the_low_target): Adjust.
11728 (initialize_low_arch): New function.
11729 * linux-sparc-low.c (tdesc_sparc64): Declare.
11730 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
11731 Adjust.
11732 (sparc_arch_setup): New function.
11733 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
11734 (the_low_target): Adjust.
11735 (initialize_low_arch): New function.
11736 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
11737 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
11738 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
11739 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
11740 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
11741 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
11742 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
11743 (tdesc_powerpc_isa205_vsx64l): Declare.
11744 (ppc_cannot_store_register, ppc_collect_ptrace_register)
11745 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
11746 (ppc_set_pc, ppc_get_hwcap): Adjust.
11747 (ppc_usrregs_info): Forward declare.
11748 (!__powerpc64__) ppc_regmap_adjusted: New global.
11749 (ppc_arch_setup): Adjust to the current process'es target
11750 description.
11751 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
11752 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
11753 (ppc_store_evrregset): Adjust.
11754 (target_regsets): Rename to ...
11755 (ppc_regsets): ... this, and make static.
11756 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
11757 (ppc_regs_info): New function.
11758 (the_low_target): Adjust.
11759 (initialize_low_arch): New function.
11760 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
11761 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
11762 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
11763 (tdesc_s390x_linux64v2): Declare.
11764 (s390_collect_ptrace_register, s390_supply_ptrace_register)
11765 (s390_fill_gregset, s390_store_last_break): Adjust.
11766 (target_regsets): Rename to ...
11767 (s390_regsets): ... this, and make static.
11768 (s390_get_pc, s390_set_pc): Adjust.
11769 (s390_get_hwcap): New target_desc parameter, and use it.
11770 [__s390x__] (have_hwcap_s390_high_gprs): New global.
11771 (s390_arch_setup): Adjust to set the current process'es target
11772 description. Don't adjust the regmap.
11773 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
11774 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
11775 (regs_info_3264): New globals.
11776 (s390_regs_info): New function.
11777 (the_low_target): Adjust.
11778 (initialize_low_arch): New function.
11779 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
11780 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
11781 [__mips64] (init_registers_mips_linux)
11782 (init_registers_mips_dsp_linux): Delete defines.
11783 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
11784 (have_dsp): New global.
11785 (mips_read_description): New, based on mips_arch_setup.
11786 (mips_arch_setup): Reimplement.
11787 (get_usrregs_info): New function.
11788 (mips_cannot_fetch_register, mips_cannot_store_register)
11789 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
11790 (mips_fill_fpregset, mips_store_fpregset): Adjust.
11791 (target_regsets): Rename to ...
11792 (mips_regsets): ... this, and make static.
11793 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
11794 (dsp_regs_info, regs_info): New globals.
11795 (mips_regs_info): New function.
11796 (the_low_target): Adjust.
11797 (initialize_low_arch): New function.
11798 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
11799 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
11800 Declare.
11801 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
11802 (arm_read_description): New, with bits factored from
11803 arm_arch_setup.
11804 (arm_arch_setup): Reimplement.
11805 (target_regsets): Rename to ...
11806 (arm_regsets): ... this, and make static.
11807 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
11808 (arm_regs_info): New function.
11809 (the_low_target): Adjust.
11810 (initialize_low_arch): New function.
11811 * linux-m68k-low.c (tdesc_m68k): Declare.
11812 (target_regsets): Rename to ...
11813 (m68k_regsets): ... this, and make static.
11814 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
11815 (m68k_regs_info): New function.
11816 (m68k_arch_setup): New function.
11817 (the_low_target): Adjust.
11818 (initialize_low_arch): New function.
11819 * linux-sh-low.c (tdesc_sharch): Declare.
11820 (target_regsets): Rename to ...
11821 (sh_regsets): ... this, and make static.
11822 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
11823 (sh_regs_info, sh_arch_setup): New functions.
11824 (the_low_target): Adjust.
11825 (initialize_low_arch): New function.
11826 * linux-bfin-low.c (tdesc_bfin): Declare.
11827 (bfin_arch_setup): New function.
11828 (bfin_usrregs_info, regs_info): New globals.
11829 (bfin_regs_info): New function.
11830 (the_low_target): Adjust.
11831 (initialize_low_arch): New function.
11832 * linux-cris-low.c (tdesc_cris): Declare.
11833 (cris_arch_setup): New function.
11834 (cris_usrregs_info, regs_info): New globals.
11835 (cris_regs_info): New function.
11836 (the_low_target): Adjust.
11837 (initialize_low_arch): New function.
11838 * linux-cris-low.c (tdesc_crisv32): Declare.
11839 (cris_arch_setup): New function.
11840 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
11841 (cris_regs_info): New function.
11842 (the_low_target): Adjust.
11843 (initialize_low_arch): New function.
11844 * linux-m32r-low.c (tdesc_m32r): Declare.
11845 (m32r_arch_setup): New function.
11846 (m32r_usrregs_info, regs_info): New globals.
11847 (m32r_regs_info): Adjust.
11848 (initialize_low_arch): New function.
11849 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
11850 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
11851 (tic6x_usrregs_info): Forward declare.
11852 (tic6x_read_description): New function, based on ...
11853 (tic6x_arch_setup): ... this. Reimplement.
11854 (target_regsets): Rename to ...
11855 (tic6x_regsets): ... this, and make static.
11856 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
11857 (tic6x_regs_info): New function.
11858 (the_low_target): Adjust.
11859 (initialize_low_arch): New function.
11860 * linux-xtensa-low.c (tdesc_xtensa): Declare.
11861 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
11862 (target_regsets): Rename to ...
11863 (xtensa_regsets): ... this, and make static.
11864 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
11865 globals.
11866 (xtensa_arch_setup, xtensa_regs_info): New functions.
11867 (the_low_target): Adjust.
11868 (initialize_low_arch): New function.
11869 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
11870 (nios2_arch_setup): Set the current process'es tdesc.
11871 (target_regsets): Rename to ...
11872 (nios2_regsets): ... this.
11873 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
11874 (nios2_regs_info): New function.
11875 (the_low_target): Adjust.
11876 (initialize_low_arch): New function.
11877 * linux-aarch64-low.c (tdesc_aarch64): Declare.
11878 (aarch64_arch_setup): Set the current process'es tdesc.
11879 (target_regsets): Rename to ...
11880 (aarch64_regsets): ... this.
11881 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
11882 (aarch64_regs_info): New function.
11883 (the_low_target): Adjust.
11884 (initialize_low_arch): New function.
11885 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
11886 globals.
11887 (target_regsets): Rename to ...
11888 (tile_regsets): ... this.
11889 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
11890 (tile_regs_info): New function.
11891 (tile_arch_setup): Set the current process'es tdesc.
11892 (the_low_target): Adjust.
11893 (initialize_low_arch): New function.
11894 * spu-low.c (tdesc_spu): Declare.
11895 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
11896 * win32-arm-low.c (tdesc_arm): Declare.
11897 (arm_arch_setup): New function.
11898 (the_low_target): Install arm_arch_setup instead of
11899 init_registers_arm.
11900 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
11901 (init_windows_x86): Rename to ...
11902 (i386_arch_setup): ... this. Set `win32_tdesc'.
11903 (the_low_target): Adjust.
11904 * win32-low.c (win32_tdesc): New global.
11905 (child_add_thread): Don't create the thread cache here.
11906 (do_initial_child_stuff): Set the new process'es tdesc.
11907 * win32-low.h (struct target_desc): Forward declare.
11908 (win32_tdesc): Declare.
11909 * lynx-i386-low.c (tdesc_i386): Declare global.
11910 (lynx_i386_arch_setup): Set `lynx_tdesc'.
11911 * lynx-low.c (lynx_tdesc): New global.
11912 (lynx_add_process): Set the new process'es tdesc.
11913 * lynx-low.h (struct target_desc): Forward declare.
11914 (lynx_tdesc): Declare global.
11915 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
11916 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
11917 * nto-low.c (nto_tdesc): New global.
11918 (do_attach): Set the new process'es tdesc.
11919 * nto-low.h (struct target_desc): Forward declare.
11920 (nto_tdesc): Declare.
11921 * nto-x86-low.c (tdesc_i386): Declare.
11922 (nto_x86_arch_setup): Set `nto_tdesc'.
11923
11924 2013-06-04 Gary Benson <gbenson@redhat.com>
11925
11926 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
11927 to qSupported response when appropriate.
11928 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
11929 with nonzero-length annex.
11930 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
11931 arguments supplied in annex.
11932
11933 2013-05-31 Doug Evans <dje@google.com>
11934
11935 PR server/15594
11936 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
11937 64 bits in 64-cross-32 environment.
11938
11939 2013-05-28 Pedro Alves <palves@redhat.com>
11940
11941 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
11942 (aarch64-without-fpu.c): Delete rule.
11943 * configure.srv (aarch64*-*-linux*): Remove references to
11944 aarch64-without-fpu.o and aarch64-without-fpu.xml.
11945 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
11946 declaration.
11947
11948 2013-05-24 Pedro Alves <palves@redhat.com>
11949
11950 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
11951 instead of strchr/decode_address. Error if the range isn't split
11952 with a ','. Don't assume there's be a ':' in the action.
11953
11954 2013-05-23 Yao Qi <yao@codesourcery.com>
11955 Pedro Alves <palves@redhat.com>
11956
11957 * linux-low.c (lwp_in_step_range): New function.
11958 (linux_wait_1): If the thread was range stepping and stopped
11959 outside the stepping range, report the stop to GDB. Otherwise,
11960 continue stepping. Add range stepping debug output.
11961 (linux_set_resume_request): Copy the step range from the resume
11962 request to the lwp.
11963 (linux_supports_range_stepping): New.
11964 (linux_target_ops) <supports_range_stepping>: Set to
11965 linux_supports_range_stepping.
11966 * linux-low.h (struct linux_target_ops)
11967 <supports_range_stepping>: New field.
11968 (struct lwp_info) <step_range_start, step_range_end>: New fields.
11969 * linux-x86-low.c (x86_supports_range_stepping): New.
11970 (the_low_target) <supports_range_stepping>: Set to
11971 x86_supports_range_stepping.
11972 * server.c (handle_v_cont): Handle 'r' action.
11973 (handle_v_requests): Append ";r" if the target supports range
11974 stepping.
11975 * target.h (struct thread_resume) <step_range_start,
11976 step_range_end>: New fields.
11977 (struct target_ops) <supports_range_stepping>:
11978 New field.
11979 (target_supports_range_stepping): New macro.
11980
11981 2013-05-17 Joel Brobecker <brobecker@adacore.com>
11982
11983 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
11984 confusion in comment.
11985
11986 2013-05-17 Joel Brobecker <brobecker@adacore.com>
11987
11988 * lynx-low.c (struct process_info_private): New type.
11989 (lynx_add_process): New function.
11990 (lynx_create_inferior, lynx_attach): Replace calls to
11991 add_process by calls to lynx_add_process.
11992 (lynx_resume): If PTID is null, then try using
11993 current_process()->private->last_wait_event_ptid.
11994 Add comments.
11995 (lynx_clear_inferiors): Delete. The contents of that function
11996 has been inlined in lynx_mourn;
11997 (lynx_wait_1): Save the ptid in the process's private data.
11998 (lynx_mourn): Free the process' private data. Replace call
11999 to lynx_clear_inferiors by call to clear_inferiors.
12000
12001 2013-05-17 Yao Qi <yao@codesourcery.com>
12002
12003 * i386-low.c (i386_length_and_rw_bits): Move the comment to
12004 the right place.
12005
12006 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
12007
12008 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
12009 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
12010 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
12011 PT_TEXT_END_ADDR guards. Update comments.
12012 (linux_target_op) <read_offsets>: Conditionally define to
12013 linux_read_offsets if the target is UCLIBC and if it defines
12014 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
12015
12016 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
12017 Andrew Jenner <andrew@codesourcery.com>
12018
12019 * Makefile.in (SFILES): Add linux-nios2-low.c.
12020 (clean): Add action to delete nios2-linux.c.
12021 (nios2-linux.c): New rule.
12022 * configure.srv: Add nios2*-*-linux*.
12023 * linux-nios2-low.c: New.
12024
12025 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
12026
12027 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
12028
12029 2013-04-25 Hui Zhu <hui@codesourcery.com>
12030
12031 PR gdb/15186
12032 * ax.c (ax_printf): Add fflush.
12033
12034 2013-04-22 Tom Tromey <tromey@redhat.com>
12035
12036 * Makefile.in (SFILES): Add filestuff.c.
12037 (OBS): Add filestuff.o.
12038 (filestuff.o): New target.
12039 * config.in, configure: Rebuild.
12040 * configure.ac: Check for fdwalk, pipe2.
12041
12042 2013-04-17 Pedro Alves <palves@redhat.com>
12043
12044 * configure.ac (USE_THREAD_DB): Delete variable.
12045 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
12046 Don't AC_SUBST USE_THREAD_DB.
12047 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
12048 * config.in, configure: Regenerate.
12049
12050 2013-04-16 Pedro Alves <palves@redhat.com>
12051
12052 * linux-low.h (struct lwp_info) <thread_known>: Move under
12053 the USE_THREAD_DB #ifdef.
12054
12055 2013-04-16 Pedro Alves <palves@redhat.com>
12056
12057 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
12058 (linux-low.o): Delete rule.
12059 * linux-low.h: Always include "gdb_thread_db.h" instead of
12060 conditionally including thread_db.h.
12061 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
12062 HAVE_THREAD_DB_H.
12063
12064 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12065
12066 * Makefile.in (install-only): Fix make install regression.
12067
12068 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
12069
12070 Convert man pages to texinfo, new gdbinit.5 texinfo page.
12071 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
12072 installation.
12073 * gdbserver.1: Remove.
12074
12075 2013-03-22 Pedro Alves <palves@redhat.com>
12076
12077 * linux-low.c (handle_extended_wait): Don't call
12078 linux_enable_event_reporting.
12079
12080 2013-03-15 Tony Theodore <tonyt@logyst.com>
12081
12082 PR build/9098:
12083 * Makefile.in (SHELL): Use @SHELL@.
12084
12085 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
12086
12087 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
12088 compiler warning.
12089
12090 2013-03-13 Joel Brobecker <brobecker@adacore.com>
12091
12092 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
12093 Remove extraneous NULL element.
12094
12095 2013-03-13 Yao Qi <yao@codesourcery.com>
12096
12097 * tracepoint.c (traceframe_read_tsv): Look for the last matched
12098 'V' block in trace frame.
12099
12100 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
12101
12102 * target.h (struct target_ops): Add btrace ops.
12103 (target_supports_btrace): New macro.
12104 (target_enable_btrace): New macro.
12105 (target_disable_btrace): New macro.
12106 (target_read_btrace): New macro.
12107 * gdbthread.h (struct thread_info): Add btrace field.
12108 * server.c: Include btrace-common.h.
12109 (handle_btrace_general_set): New function.
12110 (handle_btrace_enable): New function.
12111 (handle_btrace_disable): New function.
12112 (handle_general_set): Call handle_btrace_general_set.
12113 (handle_qxfer_btrace): New function.
12114 (struct qxfer qxfer_packets[]): Add btrace entry.
12115 * inferiors.c (remove_thread): Disable btrace.
12116 * linux-low: Include linux-btrace.h.
12117 (linux_low_enable_btrace): New function.
12118 (linux_low_read_btrace): New function.
12119 (linux_target_ops): Add btrace ops.
12120 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
12121 Add srv_linux_btrace=yes.
12122 (x86_64-*-linux*): Add linux-btrace.o.
12123 Add srv_linux_btrace=yes.
12124 * configure.ac: Define HAVE_LINUX_BTRACE.
12125 * config.in: Regenerated.
12126 * configure: Regenerated.
12127
12128 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
12129
12130 * server.c (handle_qxfer): Preserve error message if -3 is
12131 returned.
12132 (qxfer): Document the -3 return value.
12133
12134 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
12135
12136 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
12137 (linux_btrace_h): New variable.
12138 (linux-btrace.o): New rule.
12139
12140 2013-03-08 Stan Shebs <stan@codesourcery.com>
12141 Hafiz Abid Qadeer <abidh@codesourcery.com>
12142
12143 * tracepoint.c (trace_buffer_size): New global.
12144 (DEFAULT_TRACE_BUFFER_SIZE): New define.
12145 (init_trace_buffer): Change to one-argument function. Allocate
12146 trace buffer memory.
12147 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
12148 handle QTBuffer:size packet.
12149 (cmd_bigqtbuffer_size): New function.
12150 (initialize_tracepoint): Call init_trace_buffer with
12151 DEFAULT_TRACE_BUFFER_SIZE.
12152 * server.c (handle_query): Add QTBuffer:size in the
12153 supported packets.
12154
12155 2013-03-07 Yao Qi <yao@codesourcery.com>
12156
12157 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
12158 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
12159 of -1.
12160 (cmd_qtsp): Adjust condition. Do post increment.
12161 Set cur_action and cur_step_action back to 0.
12162
12163 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
12164
12165 PR server/15236
12166 * linux-low.c (linux_write_memory): Return early success if LEN is
12167 zero.
12168
12169 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
12170
12171 * configure.srv: Add x86_64-*-cygwin* as target.
12172
12173 2013-02-28 Tom Tromey <tromey@redhat.com>
12174
12175 * configure.ac: Invoke AC_SYS_LARGEFILE.
12176 * configure, config.in: Rebuild.
12177
12178 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
12179
12180 * win32-low.c: Throughout, fix format strings and casts of
12181 printf-like functions to avoid type related warnings on all
12182 platforms.
12183 (get_child_debug_event): Print dwDebugEventCode as hex since
12184 that's how it's usually documented.
12185
12186 2013-02-28 Yao Qi <yao@codesourcery.com>
12187
12188 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
12189 pulongest.
12190
12191 2013-02-27 Jiong Wang <jiwang@tilera.com>
12192
12193 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
12194 (reg-tilegx32.c): New rule.
12195 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
12196 * linux-tile-low.c (tile_arch_setup): New function. Invoke
12197 different register info initializer according to elf class.
12198 (init_registers_tilgx32): New function. The tilegx32 register info
12199 initializer.
12200 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
12201 (tile_store_gregset): Likewise.
12202
12203 2013-02-27 Yao Qi <yao@codesourcery.com>
12204
12205 * server.c (process_point_options): Print debug message when
12206 debug_threads is true.
12207
12208 2013-02-26 Yao Qi <yao@codesourcery.com>
12209
12210 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
12211
12212 2013-02-19 Pedro Alves <palves@redhat.com>
12213 Kai Tietz <ktietz@redhat.com>
12214
12215 PR gdb/15161
12216
12217 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
12218 instead of strtoul to extract address from packet.
12219 (process_serial_event) <'z'>: Likewise.
12220
12221 2013-02-18 Yao Qi <yao@codesourcery.com>
12222
12223 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
12224
12225 2013-02-14 Pedro Alves <palves@redhat.com>
12226
12227 Plug memory leak.
12228
12229 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
12230 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
12231
12232 2013-02-14 Pedro Alves <palves@redhat.com>
12233
12234 * tracepoint.c (cmd_qtdpsrc): Use savestring.
12235
12236 2013-02-14 Pedro Alves <palves@redhat.com>
12237
12238 * tracepoint.c (save_string): Delete.
12239 (add_tracepoint_action): Use savestring instead of save_string.
12240
12241 2013-02-12 Pedro Alves <palves@redhat.com>
12242
12243 * linux-xtensa-low.c: Ditto.
12244 * xtensa-xtregs.c: Ditto.
12245
12246 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
12247
12248 * thread-db.c (thread_db_get_tls_address): NULL pointer check
12249 thread_db.
12250
12251 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
12252
12253 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
12254 aarch64_num_wp_regs and aarch64_num_bp_regs to
12255 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
12256
12257 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
12258
12259 * linux-aarch64-low.c (ps_get_thread_area): Replace
12260 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
12261
12262 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
12263 Marcus Shawcroft <marcus.shawcroft@arm.com>
12264 Nigel Stephens <nigel.stephens@arm.com>
12265 Yufeng Zhang <yufeng.zhang@arm.com>
12266
12267 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
12268 (aarch64.c, aarch64-without-fpu.c): New targets.
12269 * configure.srv (aarch64*-*-linux*): New.
12270 * linux-aarch64-low.c: New file.
12271
12272 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
12273
12274 * linux-low.c (handle_extended_wait, linux_create_inferior)
12275 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
12276 (dequeue_one_deferred_signal, linux_resume_one_thread)
12277 (fetch_register, linux_write_memory, linux_enable_event_reporting)
12278 (linux_tracefork_grandchild, linux_test_for_tracefork)
12279 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
12280 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
12281 where the argument is 0.
12282
12283 2013-01-25 Yao Qi <yao@codesourcery.com>
12284
12285 * event-loop.c: Include "queue.h".
12286 (gdb_event_p): New typedef.
12287 (struct gdb_event) <next_event>: Remove.
12288 (event_queue): Change to QUEUE(gdb_event_p).
12289 (async_queue_event): Remove.
12290 (gdb_event_xfree): New.
12291 (initialize_event_loop): New.
12292 (process_event): Use API from QUEUE.
12293 (wait_for_event): Likewise.
12294 * server.c (main): Call initialize_event_loop.
12295 * server.h (initialize_event_loop): Declare.
12296
12297 2013-01-18 Yao Qi <yao@codesourcery.com>
12298
12299 * ax.h (struct eval_agent_expr_context): New.
12300 (gdb_eval_agent_expr): Update declaration.
12301 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
12302 TFRAME. Add new argument CTX.
12303 * server.h (struct eval_agent_expr_context): Declare.
12304 (agent_mem_read, agent_tsv_read): Update declaration.
12305 (agent_mem_read_string): Likewise.
12306 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
12307 (add_traceframe_block): Add new argument TPOINT.
12308 Increase TPOINT->traceframe_usage.
12309 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
12310 eval_tracepoint_agent_expr.
12311 (condition_true_at_tracepoint): Likewise.
12312 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
12313 (agent_mem_read_string, agent_tsv_read): Likewise.
12314
12315 2013-01-16 Yao Qi <yao@codesourcery.com>
12316
12317 * linux-low.c (linux_resume_one_lwp): Don't check
12318 'lwp->bp_reinsert != 0'.
12319
12320 2013-01-07 Joel Brobecker <brobecker@adacore.com>
12321 Pedro Alves <palves@redhat.com>
12322
12323 * lynx-low.c (ptrace_request_to_str): Define a temporary
12324 macro and use it to simplify this function's implementation.
12325
12326 2013-01-07 Joel Brobecker <brobecker@adacore.com>
12327
12328 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
12329 sets errno.
12330
12331 2013-01-07 Joel Brobecker <brobecker@adacore.com>
12332
12333 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
12334
12335 2013-01-07 Joel Brobecker <brobecker@adacore.com>
12336
12337 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
12338
12339 2013-01-07 Joel Brobecker <brobecker@adacore.com>
12340
12341 * lynx-low.c (lynx_resume): Use the resume_info parameter
12342 to determine the ptid for the lynx_ptrace call, unless
12343 it is equal to minus_one_ptid, in which case we use the
12344 ptid of the current_inferior.
12345 (lynx_wait_1): After having received a thread create/exit
12346 event, resume the inferior's execution using the signaling
12347 thread's ptid, rather than the old ptid.
12348
12349 2013-01-07 Joel Brobecker <brobecker@adacore.com>
12350
12351 * lynx-low.c (lynx_resume): Delete variable ret.
12352
12353 2013-01-01 Joel Brobecker <brobecker@adacore.com>
12354
12355 * gdbreplay.c (gdbreplay_version): Update copyright year.
12356 * server.c (gdbserver_version): Likewise.
12357
12358 2012-12-17 Joel Brobecker <brobecker@adacore.com>
12359
12360 * lynx-low.c (lynx_wait_1): Add debug trace before adding
12361 new thread.
12362
12363 2012-12-17 Joel Brobecker <brobecker@adacore.com>
12364
12365 * lynx-low.c (ptrace_request_to_str): Add handling for
12366 PTRACE_GETTRACESIG.
12367
12368 2012-12-17 Joel Brobecker <brobecker@adacore.com>
12369
12370 * lynx-low.c (lynx_attach): Delete variable new_process.
12371
12372 2012-12-17 Joel Brobecker <brobecker@adacore.com>
12373
12374 * lynx-low.c (lynx_create_inferior): Delete variable
12375 new_process.
12376
12377 2012-12-17 Joel Brobecker <brobecker@adacore.com>
12378
12379 * lynx-low.c (ptrace_request_to_str): Do not handle
12380 PTRACE_GETTHREADLIST if this macro does not exist.
12381
12382 2012-12-15 Yao Qi <yao@codesourcery.com>
12383
12384 * Makefile.in (OBS): Add notif.o.
12385 * notif.c, notif.h: New.
12386 * server.c: Include "notif.h".
12387 (struct vstop_notif) <next>: Remove.
12388 <base>: New field.
12389 (queue_stop_reply): Update.
12390 (push_event, send_next_stop_reply): Remove.
12391 (discard_queued_stop_replies): Update.
12392 (notif_stop): New variable.
12393 (handle_v_stopped): Remove.
12394 (handle_v_requests): Don't call handle_v_stopped. Call
12395 handle_ack_notif instead.
12396 (queue_stop_reply_callback): Call notif_event_enque instead
12397 of queue_stop_reply.
12398 (handle_status): Don't call send_next_stop_reply, call
12399 notif_write_event instead.
12400 (kill_inferior_callback): Likewise.
12401 (detach_or_kill_inferior_callback): Likewise.
12402 (main): Call initialize_notif.
12403 (process_serial_event): Call QUEUE_is_empty.
12404 (handle_target_event): Call notif_push instead of push event.
12405 * server.h (push_event): Remove declaration.
12406
12407 2012-12-10 Tom Tromey <tromey@redhat.com>
12408
12409 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
12410 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
12411 macros.
12412 (.c.o): Rewrite.
12413 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
12414 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
12415 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
12416 (amd64-linux-ipa.o, ax.o): Rewrite.
12417 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
12418 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
12419 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
12420 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
12421 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
12422 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
12423 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
12424 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
12425 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
12426 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
12427 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
12428 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
12429 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
12430 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
12431 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
12432 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
12433 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
12434 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
12435 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
12436 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
12437 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
12438 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
12439 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
12440 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
12441 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
12442 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
12443 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
12444 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
12445 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
12446 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
12447 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
12448 (reg-tilegx.o): Remove.
12449 (all_object_files): New macro.
12450 Include .deps files.
12451 * aclocal.m4, configure: Rebuild.
12452 * acinclude.m4: Include depstand.m4, lead-dot.m4.
12453 * configure.ac: Invoke ZW_CREATE_DEPDIR,
12454 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
12455
12456 2012-12-05 Tom Tromey <tromey@redhat.com>
12457
12458 PR gdb/14917:
12459 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
12460
12461 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
12462
12463 * configure.ac: Check for linux/perf_event.h.
12464 * config.in: Regenerated.
12465 * configure: Regenerated.
12466
12467 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
12468
12469 * hostio.c (handle_readlink): Decrease buffer size
12470 parameter passed to readlink by one byte.
12471
12472 2012-11-26 Yao Qi <yao@codesourcery.com>
12473
12474 * configure.ac (build_warnings): Append '-Wempty-body'.
12475 * configure: Regenerated.
12476 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
12477 body.
12478
12479 2012-11-15 Pierre Muller <muller@sourceware.org>
12480
12481 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
12482 * config.in: Regenerate.
12483 * configure: Regenerate.
12484 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
12485 Use "gdb_wait.h" header instead of <sys/wait.h> header.
12486 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
12487 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
12488 header.
12489 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
12490 instead of <sys/wait.h> header.
12491 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
12492
12493 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
12494
12495 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
12496 (various make rules): Remove -DGDBSERVER
12497
12498 2012-11-09 Yao Qi <yao@codesourcery.com>
12499
12500 * spu-low.c (current_ptid): Move it to ..
12501 * gdbthread.h: ... here. New.
12502 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
12503 * server.c (myresume, process_serial_event): Likewise.
12504 * thread-db.c (thread_db_find_new_threads): Likewise.
12505 * tracepoint.c (run_inferior_command): Likewise.
12506
12507 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
12508
12509 * server.c (handle_search_memory_1): Include access length in
12510 warning message.
12511
12512 2012-09-05 Michael Brandt <michael.brandt@axis.com>
12513
12514 * linux-crisv32-low.c: Fix compile errors.
12515
12516 2012-09-04 Yao Qi <yao@codesourcery.com>
12517
12518 * tracepoint.c (cmd_qtsv): Adjust debug message.
12519 Don't check CUR_TPOINT.
12520
12521 2012-08-28 Yao Qi <yao@codesourcery.com>
12522
12523 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
12524 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
12525 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
12526 Remove declarations of xmalloc, xreallloc, xstrdup and
12527 freeargv.
12528 * Makefile.in (libiberty_h): New.
12529 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
12530 (linux-bfin-low.o): Append dependency 'libiberty.h'.
12531
12532 2012-08-23 Yao Qi <yao@codesourcery.com>
12533
12534 * server.h: Remove declaration of 'xsnprintf'.
12535
12536 2012-08-22 Keith Seitz <keiths@redhat.com>
12537
12538 * server.h: Include build-gnulib-gbserver/config.h.
12539 * gdbreplay.c: Likewise.
12540
12541 2012-08-08 Doug Evans <dje@google.com>
12542
12543 * Makefile.in (SFILES): Add gdb_vecs.c.
12544 (OBS): Add gdb_vecs.o.
12545 (gdb_vecs_h, host_defs_h): New variables.
12546 (thread-db.o): Add $(gdb_vecs_h) dependency.
12547 (gdb_vecs.o): New rule.
12548 * thread-db.c: #include "gdb_vecs.h".
12549 (thread_db_load_search): Use a vector to iterate over path elements.
12550 Handle text appearing after "$pdir".
12551
12552 * configure.ac: Add check for strstr.
12553 * config.in: Regenerate.
12554 * configure: Regenerate.
12555
12556 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
12557
12558 * hostio.c (handle_pread): If pread fails, fall back to attempting
12559 lseek/read.
12560 (handle_pwrite): Likewise for pwrite.
12561
12562 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
12563
12564 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
12565 between unsupported TYPE and unimplementable ADDR/LEN combination.
12566 (arm_insert_point): Act on new return value.
12567
12568 2012-07-31 Pedro Alves <palves@redhat.com>
12569
12570 * server.c (process_point_options): Only skip tokens if we find
12571 one that is unrecognized. Don't treat 'X' specially while
12572 skipping unrecognized tokens.
12573
12574 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
12575
12576 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
12577 to 4-byte-align HW breakpoint addresses for Thumb.
12578
12579 2012-07-27 Yao Qi <yao@codesourcery.com>
12580
12581 PR remote/14161.
12582
12583 * server.h: Declare gdb_agent_about_to_close.
12584 * target.c (kill_inferior): Include "agent.h".
12585 New. Send command 'kill'.
12586 * target.h (kill_inferior): Removed macro.
12587 * tracepoint.c (gdb_agent_about_to_close): New.
12588 (gdb_agent_helper_thread): Handle command 'close'.
12589 Wait endlessly until the inferior stops.
12590 Install gdb_agent_remove_socket to atexit hook.
12591 (agent_socket_name): New static variable.
12592 (gdb_agent_socket_init): Replace local variable 'name' with
12593 'agent_socket_name'.
12594 (gdb_agent_remove_socket): New.
12595
12596 2012-07-27 Yao Qi <yao@codesourcery.com>
12597
12598 * server.c (process_point_options): Stop at 'X' when parsing.
12599
12600 2012-07-19 Michael Eager <eager@eagercon.com>
12601
12602 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
12603 to hw_execute.
12604 * linux-x86-low.c (x86_insert_point, x86_remove_point):
12605 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
12606 hardware breakpoint.
12607
12608 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12609
12610 * gdbserver/linux-low.c (initialize_low): Call
12611 linux_ptrace_init_warnings.
12612
12613 2012-07-02 Doug Evans <dje@google.com>
12614
12615 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
12616 pointer to int.
12617
12618 2012-07-02 Stan Shebs <stan@codesourcery.com>
12619
12620 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
12621 (ax.o): Add it to build rule.
12622 (ax-ipa.o): Ditto.
12623 (OBS): Add format.o.
12624 (IPA_OBS): Add format.o.
12625 * server.c (handle_query): Claim support for breakpoint commands.
12626 (process_point_options): Add command case.
12627 (process_serial_event): Leave running if there are printfs in
12628 effect.
12629 * mem-break.h (any_persistent_commands): Declare.
12630 (add_breakpoint_commands): Declare.
12631 (gdb_no_commands_at_breakpoint): Declare.
12632 (run_breakpoint_commands): Declare.
12633 * mem-break.c (struct point_command_list): New struct.
12634 (struct breakpoint): New field command_list.
12635 (any_persistent_commands): New function.
12636 (add_commands_to_breakpoint): New function.
12637 (add_breakpoint_commands): New function.
12638 (gdb_no_commands_at_breakpoint): New function.
12639 (run_breakpoint_commands): New function.
12640 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
12641 locally.
12642 * ax.c: Include format.h.
12643 (ax_printf): New function.
12644 (gdb_eval_agent_expr): Add printf opcode.
12645
12646 2012-06-13 Yao Qi <yao@codesourcery.com>
12647
12648 * server.c (start_inferior): Remove duplicated writes to fields
12649 'last_resume_kind' and 'last_status' of 'current_inferior'.
12650
12651 2012-06-12 Yao Qi <yao@codesourcery.com>
12652 Pedro Alves <palves@redhat.com>
12653
12654 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
12655 comment.
12656 * server.c (handle_v_cont): Extend comment.
12657
12658 2012-06-11 Yao Qi <yao@codesourcery.com>
12659
12660 * linux-low.c (linux_attach): Add 'static'.
12661
12662 2012-06-06 Yao Qi <yao@codesourcery.com>
12663
12664 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
12665
12666 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
12667
12668 Fix gcc -flto compilation warning.
12669 * server.c (main): Make variable multi_mode and attach volatile.
12670
12671 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12672
12673 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
12674 if the platform doesn't know about it.
12675
12676 2012-05-30 Jeff Kenton <jkenton@tilera.com>
12677
12678 * Makefile.in (SFILES): Add linux-tile-low.c.
12679 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
12680 * configure.srv: Handle tilegx-*-linux*.
12681 * linux-tile-low.c: New file.
12682
12683 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12684
12685 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
12686
12687 2012-05-24 Pedro Alves <palves@redhat.com>
12688
12689 PR gdb/7205
12690
12691 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
12692
12693 2012-05-24 Pedro Alves <palves@redhat.com>
12694
12695 PR gdb/7205
12696
12697 Replace target_signal with gdb_signal throughout.
12698
12699 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
12700
12701 * linux-low.c (linux_store_registers): Avoid the copying sequence
12702 when no data has been retrieved by ptrace.
12703
12704 2012-05-22 Will Deacon <will.deacon@arm.com>
12705
12706 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
12707 Include asm/ptrace.h.
12708 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
12709 already defined.
12710
12711 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
12712
12713 * linux-low.c (linux_store_registers): Don't re-retrieve data
12714 with ptrace that has already been obtained from /proc. Always
12715 copy any data retrieved with ptrace to the buffer supplied.
12716
12717 2012-05-11 Yao Qi <yao@codesourcery.com>
12718 Pedro Alves <palves@redhat.com>
12719
12720 * linux-low.c (enum stopping_threads_kind): New.
12721 (stopping_threads): Change type to `enum stopping_threads_kind'.
12722 (handle_extended_wait): If stopping and suspending threads, leave
12723 the new_lwp suspended too.
12724 (linux_wait_for_event): Adjust.
12725 (stop_all_lwps): Set `stopping_threads' to
12726 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
12727 whether we're suspending threads or just stopping them. Assert no
12728 recursion happens.
12729
12730 2012-04-29 Yao Qi <yao@codesourcery.com>
12731
12732 * server.h: Move some code to ...
12733 * gdbthread.h: ... here. New.
12734 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
12735 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
12736 (nto-low.o, win32-low.o): Likewise.
12737 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
12738 * regcache.c, remote-utils.c, server.c: Likewise.
12739 * target.c, tracepoint.c, win32-low.c: Likewise.
12740
12741 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12742
12743 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
12744 (PTRACE_ARG4_TYPE): Likewise.
12745 (PTRACE_XFER_TYPE): Likewise.
12746 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
12747 ptrace to PTRACE_ARG3_TYPE.
12748 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
12749 (PTRACE_ARG4_TYPE): Likewise.
12750 (PTRACE_XFER_TYPE): Likewise.
12751 (linux_detach_one_lwp): Cast fourth argument of
12752 ptrace to long then PTRACE_ARG4_TYPE.
12753 (regsets_fetch_inferior_registers): Cast third argument of
12754 ptrace to long then PTRACE_ARG3_TYPE.
12755 (regsets_store_inferior_registers): Likewise.
12756
12757 2012-04-20 Pedro Alves <palves@redhat.com>
12758
12759 * configure: Regenerate.
12760
12761 2012-04-19 Pedro Alves <palves@redhat.com>
12762
12763 * Makefile.in (GNULIB_BUILDDIR): New.
12764 (LIBGNU, INCGNU, GNULIB_H): Adjust.
12765 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
12766 (all, install-only, uninstall, clean-info, all-lib, clean): No
12767 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
12768 (maintainer-clean realclean distclean): Use subdir_do.
12769 (subdir_do): New.
12770 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
12771 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
12772 * acinclude.m4: Include acx_configure_dir.m4.
12773 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
12774 calls. Call AC_PROG_RANLIB. Configure gnulib using
12775 ACX_CONFIGURE_DIR.
12776 (GNULIB): New.
12777 (GNULIB_STDINT_H): Adjust.
12778 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
12779 * gdbreplay.c: Include build-gnulib/config.h.
12780 * server.h: Likewise.
12781 * aclocal.m4: Regenerate.
12782 * config.in: Regenerate.
12783 * configure: Regenerate.
12784
12785 2012-04-19 Pedro Alves <palves@redhat.com>
12786
12787 * Makefile.in (LIBGNU, INCGNU): Adjust.
12788 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
12789 (all, install-only, uninstall, clean-info, all-lib, clean)
12790 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
12791 * configure.ac: Adjust AC_OUTPUT output.
12792 * aclocal.m4: Regenerate.
12793 * configure: Regenerate.
12794
12795 2012-04-19 Pedro Alves <palves@redhat.com>
12796
12797 * Makefile.in (generated_files): New.
12798 (server_h): Remove the explicit dependency on config.h, and depend
12799 on $generated_files.
12800
12801 2012-04-19 Pedro Alves <palves@redhat.com>
12802
12803 * Makefile.in (INCGNU): Add -Ignulib.
12804
12805 2012-04-19 Pedro Alves <palves@redhat.com>
12806
12807 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
12808 (INCGNU): ... this, and spell out -I here.
12809 (GNULIB_LIB): Rename to ...
12810 (LIBGNU): ... this.
12811 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
12812
12813 2012-04-19 Pedro Alves <palves@redhat.com>
12814
12815 * config.in: Regenerate.
12816
12817 2012-04-19 Pedro Alves <palves@redhat.com>
12818
12819 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
12820 * server.h (memmem): Remove declaration.
12821 * config.in: Regenerate.
12822 * configure: Regenerate.
12823
12824 2012-04-19 Yao Qi <yao@codesourcery.com>
12825
12826 * Makefile.in (SFILES): Add common/vec.c.
12827 (OBS): Add vec.o.
12828 (vec.o): New rule.
12829
12830 2012-04-19 Yao Qi <yao@codesourcery.com>
12831
12832 * remote-utils.c (prepare_resume_reply): Replace with macro
12833 target_core_of_thread.
12834 * server.c (handle_qxfer_threads_proper): Likewise.
12835 * target.h (traget_core_of_thread): New macro.
12836
12837 2012-04-18 Pedro Alves <palves@redhat.com>
12838
12839 * aclocal.m4: Regenerate.
12840 * configure: Regenerate.
12841
12842 2012-04-16 Yao Qi <yao@codesourcery.com>
12843
12844 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
12845 duplicated on address.
12846
12847 2012-04-16 Yao Qi <yao@codesourcery.com>
12848
12849 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
12850 (struct tracepoint_action_ops) <send>: New field.
12851 (m_tracepoint_action_send, r_tracepoint_action_send): New.
12852 (agent_expr_send, x_tracepoint_action_send): New.
12853 (l_tracepoint_action_send): New.
12854 (cmd_qtdp): Download and install tracepoint
12855 according to `use_agent'.
12856 (run_inferior_command): Add one more parameter `len'.
12857 Update callers.
12858 (tracepoint_send_agent): New.
12859 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
12860
12861 2012-04-16 Yao Qi <yao@codesourcery.com>
12862
12863 * tracepoint.c (download_tracepoints): Moved to ...
12864 (cmd_qtstart): ... here.
12865
12866 2012-04-14 Yao Qi <yao@codesourcery.com>
12867
12868 * tracepoint.c: Include inttypes.h.
12869 (struct collect_memory_action): Use sized types.
12870 (struct tracepoint): Likewise.
12871 (cmd_qtdp, stop_tracing): Update print specifiers.
12872 (cmd_qtp, response_tracepoint): Likewise.
12873 (collect_data_at_tracepoint): Likewise.
12874 (collect_data_at_step): Likewise.
12875
12876 2012-04-14 Yao Qi <yao@codesourcery.com>
12877
12878 Import gnulib module inttypes.
12879 * aclocal.m4, config.in, configure: Regenerated.
12880
12881 2012-04-14 Yao Qi <yao@codesourcery.com>
12882
12883 * Makefile.in (maintainer-clean, realclean, distclean): Remove
12884 Makefile and config.status at last.
12885
12886 2012-04-13 Yao Qi <yao@codesourcery.com>
12887
12888 * tracepoint.c: Include stdint.h unconditionally.
12889
12890 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12891
12892 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
12893 on BFD_HAVE_SYS_PROCFS_TYPE.
12894 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
12895 * configure: Regenerate.
12896 * config.in: Likewise.
12897
12898 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
12899
12900 * Makefile.in (clean): Also remove x32.c x32-linux.c
12901 x32-avx.c x32-avx-linux.c.
12902 (x32.o): New target.
12903 (x32.c): Likewise.
12904 (x32-linux.o): Likewise.
12905 (x32-linux.c): Likewise.
12906 (x32-avx.o): Likewise.
12907 (x32-avx.c): Likewise.
12908 (x32-avx-linux.o): Likewise.
12909 (x32-avx-linux.c): Likewise.
12910
12911 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
12912 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
12913 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
12914 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
12915 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
12916 i386/x32-avx-linux.xml.
12917
12918 * linux-x86-low.c (init_registers_x32_linux): New prototype.
12919 (init_registers_x32_avx_linux): Likwise.
12920 (x86_linux_update_xmltarget): Call init_registers_x32_linux
12921 or init_registers_x32_avx_linux if linux_is_elf64 is false.
12922
12923 2012-04-13 Pedro Alves <palves@redhat.com>
12924
12925 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
12926 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
12927 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
12928 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
12929 the sub-make.
12930
12931 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
12932
12933 * linux-x86-low.c (compat_x32_clock_t): New.
12934 (compat_x32_siginfo_t): Likewise.
12935 (compat_x32_siginfo_from_siginfo): Likewise.
12936 (siginfo_from_compat_x32_siginfo): Likewise.
12937 (linux_is_elf64): Likewise.
12938 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
12939 and siginfo_from_compat_x32_siginfo for x32.
12940 (x86_arch_setup): Set linux_is_elf64.
12941
12942 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
12943
12944 PR gdb/13969
12945 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
12946 e_machine field.
12947 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
12948 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
12949 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
12950 compatible with process.
12951
12952 2012-04-12 Yao Qi <yao@codesourcery.com>
12953
12954 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
12955 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
12956 (install-only, install-info, clean): Handle sub dir gnulib.
12957 (all-lib, am--refresh): New targets.
12958 (memmem.o): Remove target.
12959 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
12960 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
12961 (AC_REPLACE_FUNCS): Remove memmem.
12962 Invoke gl_INIT and AM_INIT_AUTOMAKE.
12963 (AC_OUTPUT): Generate Makefile in gnulib/.
12964 * aclocal.m4, config.in, configure: Regenerated.
12965
12966 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
12967
12968 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
12969
12970 2012-04-05 Pedro Alves <palves@redhat.com>
12971
12972 -Werror=strict-aliasing
12973
12974 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
12975 pointer.
12976
12977 2012-04-04 Pedro Alves <palves@redhat.com>
12978
12979 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12980 (sparc_store_gregset_from_stack, sparc_store_gregset)
12981 (sparc_breakpoint_at): Fix formatting.
12982
12983 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12984
12985 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
12986 are available.
12987 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
12988 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
12989 * config.in: Regenerate.
12990 * configure: Likewise.
12991
12992 2012-03-29 Pedro Alves <palves@redhat.com>
12993
12994 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
12995 Correct ptrace arguments.
12996
12997 2012-03-28 Pedro Alves <palves@redhat.com>
12998
12999 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
13000 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
13001 (IA64_FR1_REGNUM): New defines.
13002 (ia64_fetch_register): New.
13003 (the_low_target): Install it.
13004 * linux-low.h (struct linux_target_ops) <fetch_register>: New
13005 field.
13006 * linux-low.c (linux_fetch_registers): Try the
13007 the_low_target.fetch_register hook first.
13008
13009 * linux-arm-low.c (the_low_target): Adjust.
13010 * linux-bfin-low.c (the_low_target): Adjust.
13011 * linux-cris-low.c (the_low_target): Adjust.
13012 * linux-crisv32-low.c (the_low_target): Adjust.
13013 * linux-m32r-low.c (the_low_target): Adjust.
13014 * linux-m68k-low.c (the_low_target): Adjust.
13015 * linux-mips-low.c (the_low_target): Adjust.
13016 * linux-ppc-low.c (the_low_target): Adjust.
13017 * linux-s390-low.c (the_low_target): Adjust.
13018 * linux-sh-low.c (the_low_target): Adjust.
13019 * linux-sparc-low.c (the_low_target): Adjust.
13020 * linux-tic6x-low.c (the_low_target): Adjust.
13021 * linux-x86-low.c (the_low_target): Adjust.
13022 * linux-xtensa-low.c (the_low_target): Adjust.
13023
13024 2012-03-26 Pedro Alves <palves@redhat.com>
13025
13026 * server.c (handle_qxfer_libraries): Don't bail early if
13027 the_target->qxfer_libraries_svr4 is not NULL.
13028
13029 2012-03-26 Pedro Alves <palves@redhat.com>
13030
13031 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
13032
13033 2012-03-23 Pedro Alves <palves@redhat.com>
13034
13035 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
13036 "library-list-svr4" element's start tag when the the DSO list is
13037 empty.
13038
13039 2012-03-23 Pedro Alves <palves@redhat.com>
13040
13041 * linux-low.c (read_one_ptr): Read the inferior's pointer through
13042 a variable whose type size is the same as the inferior's pointer
13043 size.
13044
13045 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
13046
13047 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
13048 struct siginfo.
13049 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
13050 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
13051 * linux-low.h: Include <signal.h>.
13052 (struct siginfo): Remove forward declaration.
13053 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
13054 struct siginfo.
13055
13056 2012-03-21 Mike Frysinger <vapier@gentoo.org>
13057
13058 * .gitignore: Ignore more files.
13059
13060 2012-03-19 Pedro Alves <palves@redhat.com>
13061 Jan Kratochvil <jan.kratochvil@redhat.com>
13062
13063 * server.c (cont_thread, general_thread): Add describing comments.
13064 (start_inferior): Clear `cont_thread'.
13065 (handle_v_cont): Don't set `cont_thread' if resuming all threads
13066 of a process.
13067
13068 2012-03-15 Yao Qi <yao@codesourcery.com>
13069
13070 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
13071 handling to ...
13072 (cmd_qtdp): ... here.
13073
13074 2012-03-15 Yao Qi <yao@codesourcery.com>
13075
13076 * tracepoint.c (struct tracepoint_action_ops): New.
13077 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
13078 (m_tracepoint_action_download): New.
13079 (r_tracepoint_action_download): New.
13080 (x_tracepoint_action_download): New.
13081 (l_tracepoint_action_download): New.
13082 (add_tracepoint_action): Install `action->ops' according type.
13083 (download_tracepoint_1): Move code `download' function pointer
13084 of various tracepoint_action_ops.
13085
13086 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
13087
13088 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
13089 linux_ptrace_attach_warnings.
13090
13091 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
13092
13093 * Makefile.in (linux-ptrace.o): New.
13094 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
13095 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
13096 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
13097 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
13098 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
13099 of these targets.
13100 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
13101
13102 2012-03-08 Yao Qi <yao@codesourcery.com>
13103 Pedro Alves <palves@redhat.com>
13104
13105 Fix PR server/13392.
13106 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
13107 offset of JMP insn.
13108 * tracepoint.c (remove_tracepoint): New.
13109 (cmd_qtdp): Call remove_tracepoint when failed to install.
13110
13111 2012-03-07 Pedro Alves <palves@redhat.com>
13112
13113 * linux-low.c (get_detach_signal): New.
13114 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
13115 Pass on pending signals to PTRACE_DETACH. Check the result of the
13116 ptrace call.
13117 * server.c (program_signals, program_signals_p): New.
13118 (handle_general_set): Handle QProgramSignals.
13119 * server.h (program_signals, program_signals_p): Declare.
13120
13121 2012-03-05 Pedro Alves <palves@redhat.com>
13122 Jan Kratochvil <jan.kratochvil@redhat.com>
13123
13124 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
13125 New comment why.
13126
13127 2012-03-03 Yao Qi <yao@codesourcery.com>
13128
13129 * tracepoint.c (tracepoint_look_up_symbols): Update call to
13130 agent_look_up_symbols.
13131
13132 2012-03-03 Yao Qi <yao@codesourcery.com>
13133
13134 * Makefile.in (linux-low.o): Keep dependence on agent.h.
13135 (linux-x86-low.o): Likewise.
13136 * server.h: Remove in_process_agent_loaded.
13137 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
13138 common/agent.c.
13139 Update callers.
13140
13141 2012-03-03 Yao Qi <yao@codesourcery.com>
13142
13143 * tracepoint.c (gdb_agent_capability): New global.
13144 (in_process_agent_loaded_ust): Renamed to
13145 `in_process_agent_supports_ust'.
13146 Update callers.
13147 (in_process_agent_supports_ust): Call agent_capability_check.
13148 (clear_installed_tracepoints): Assert that agent supports
13149 agent.
13150
13151 2012-03-03 Yao Qi <yao@codesourcery.com>
13152
13153 * linux-low.c (linux_supports_agent): New.
13154 (linux_target_ops): Initialize field `supports_agent' with
13155 linux_supports_agent.
13156 * target.h (struct target_ops) <supports_agent>: New.
13157 (target_supports_agent): New macro.
13158 * server.c (handle_general_set): Handle packet 'QAgent'.
13159 (handle_query): Send `QAgent+'.
13160 * Makefile.in (server.o): Depends on agent.h.
13161
13162 2012-03-03 Yao Qi <yao@codesourcery.com>
13163
13164 * Makefile.in (OBS): Add agent.o.
13165 Add new rule for agent.o.
13166 Track dependence of tracepoint.c on agent.h.
13167 * tracepoint.c (run_inferior_command_1):
13168 (run_inferior_command): Call agent_run_command.
13169 (gdb_ust_connect_sync_socket): Deleted. Move it to
13170 common/agent.c.
13171 (resume_thread, stop_thread): Likewise.
13172 (gdb_ust_socket_init): Renamed to ...
13173 (gdb_agent_socket_init): ... New.
13174 (gdb_ust_thread): Renamed to ...
13175 (gdb_agent_helper_thread): ... New.
13176 (gdb_ust_init): Move some code to ...
13177 (gdb_agent_init): ... here. New.
13178 [HAVE_UST]: Call gdb_ust_init.
13179 (initialize_tracepoint_ftlib): Call gdb_agent_init.
13180 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
13181 * config.in, configure: Regenerated.
13182
13183 2012-03-02 Pedro Alves <palves@redhat.com>
13184
13185 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
13186 * linux-low.c (struct simple_pid_list): New.
13187 (stopped_pids): New a struct simple_pid_list pointer.
13188 (add_to_pid_list, pull_pid_from_list): New.
13189 (handle_extended_wait): Don't assume the first signal new children
13190 report is SIGSTOP. Adjust call to pull_pid_from_list.
13191 (linux_wait_for_lwp): Adjust.
13192
13193 2012-03-02 Yao Qi <yao@codesourcery.com>
13194
13195 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
13196 debug log.
13197
13198 2012-03-02 Yao Qi <yao@codesourcery.com>
13199
13200 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
13201 `stop_pc' and `tpoint'. Update caller.
13202
13203 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
13204
13205 * linux-low.h (linux_target_ops): Add regset_bitmap member.
13206 * linux-low.c (use_linux_regsets): New macro.
13207 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
13208 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
13209 (linux_register_in_regsets): New function.
13210 (usr_fetch_inferior_registers): Skip registers covered by
13211 regsets.
13212 (usr_store_inferior_registers): Likewise.
13213 (usr_fetch_inferior_registers): New macro.
13214 (usr_store_inferior_registers): Likewise.
13215 (linux_fetch_registers): Handle mixed regset/non-regset targets.
13216 (linux_store_registers): Likewise.
13217 * linux-mips-low.c (init_registers_mips_dsp_linux): New
13218 prototype.
13219 (init_registers_mips64_dsp_linux): Likewise.
13220 (init_registers_mips_linux): New macro.
13221 (init_registers_mips_dsp_linux): Likewise.
13222 (mips_dsp_num_regs): Likewise.
13223 (DSP_BASE, DSP_CONTROL): New fallback macros.
13224 (mips_base_regs): New macro.
13225 (mips_regmap): Use it. Fix the size.
13226 (mips_dsp_regmap): New variable.
13227 (mips_dsp_regset_bitmap): Likewise.
13228 (mips_arch_setup): New function.
13229 (mips_cannot_fetch_register): Use the_low_target.regmap rather
13230 than mips_regmap.
13231 (mips_cannot_store_register): Likewise.
13232 (the_low_target): Update .arch_setup, .num_regs and .regmap
13233 initializers. Add .regset_bitmap initializer.
13234 * linux-arm-low.c (the_low_target): Add .regset_bitmap
13235 initializer.
13236 * linux-bfin-low.c (the_low_target): Likewise.
13237 * linux-cris-low.c (the_low_target): Likewise.
13238 * linux-crisv32-low.c (the_low_target): Likewise.
13239 * linux-ia64-low.c (the_low_target): Likewise.
13240 * linux-m32r-low.c (the_low_target): Likewise.
13241 * linux-m68k-low.c (the_low_target): Likewise.
13242 * linux-ppc-low.c (the_low_target): Likewise.
13243 * linux-s390-low.c (the_low_target): Likewise.
13244 * linux-sh-low.c (the_low_target): Likewise.
13245 * linux-sparc-low.c (the_low_target): Likewise.
13246 * linux-tic6x-low.c (the_low_target): Likewise.
13247 * linux-x86-low.c (the_low_target): Likewise.
13248 * linux-xtensa-low.c (the_low_target): Likewise.
13249 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
13250 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
13251 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
13252 srv_xmlfiles.
13253 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
13254 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
13255
13256 2012-02-29 Yao Qi <yao@codesourcery.com>
13257 Pedro Alves <palves@redhat.com>
13258
13259 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
13260 `step_over_finished' is true.
13261
13262 2012-02-27 Pedro Alves <palves@redhat.com>
13263
13264 * linux-low.c (pid_is_stopped): Delete, moved to common/.
13265 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
13266
13267 2012-02-27 Pedro Alves <palves@redhat.com>
13268
13269 PR server/9684
13270 * linux-low.c (pid_is_stopped): New.
13271 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
13272
13273 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
13274
13275 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
13276 of conditions.
13277
13278 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
13279
13280 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
13281
13282 2012-02-24 Luis Machado <lgustavo@codesourcery>
13283
13284 * server.c (handle_query): Advertise support for target-side
13285 breakpoint condition evaluation.
13286 (process_point_options): New function.
13287 (process_serial_event): When inserting a breakpoint, check for
13288 a target-side condition that should be evaluated.
13289
13290 * mem-break.c: Include regcache.h and ax.h.
13291 (point_cond_list_t): New data structure.
13292 (breakpoint) <cond_list>: New field.
13293 (find_gdb_breakpoint_at): Make non-static.
13294 (delete_gdb_breakpoint_at): Clear any target-side
13295 conditions.
13296 (clear_gdb_breakpoint_conditions): New function.
13297 (add_condition_to_breakpoint): Likewise.
13298 (add_breakpoint_condition): Likewise.
13299 (gdb_condition_true_at_breakpoint): Likewise.
13300 (gdb_breakpoint_here): Return result directly instead
13301 of going through a local variable.
13302
13303 * mem-break.h (find_gdb_breakpoint_at): New prototype.
13304 (clear_gdb_breakpoint_conditions): Likewise.
13305 (add_breakpoint_condition): Likewise.
13306 (gdb_condition_true_at_breakpoint): Likewise.
13307
13308 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
13309 (need_step_over_p): Take target-side breakpoint condition into
13310 consideration.
13311
13312 2012-02-24 Luis Machado <lgustavo@codesourcery>
13313
13314 * server.h: Include tracepoint.h.
13315 (agent_mem_read, agent_get_trace_state_variable_value,
13316 agent_set_trace_state_variable_value,
13317 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
13318 get_set_tsv_func_addr): New prototypes.
13319
13320 * ax.h: New include file.
13321 * ax.c: New source file.
13322
13323 * tracepoint.c: Include ax.h.
13324 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
13325 agent_expr, eval_result_type): Move to ax.h.
13326 (parse_agent_expr): Rename to ...
13327 (gdb_parse_agent_expr): ... this, make it non-static and move
13328 to ax.h.
13329 (unparse_agent_expr) Rename to ...
13330 (gdb_unparse_agent_expr): ... this, make it non-static and move
13331 to ax.h.
13332 (eval_agent_expr): Rename to ...
13333 (eval_tracepoint_agent_expr): ... this.
13334 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
13335 forward declarations.
13336 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
13337 (agent_get_trace_state_variable_value): New function.
13338 (agent_set_trace_state_variable_value): New function.
13339 (cmd_qtdp): Call gdb_parse_agent_expr (...).
13340 (response_tracepoint): Call gdb_unparse_agent_expr (...).
13341 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
13342 (condition_true_at_tracepoint): Likewise.
13343 (parse_agent_expr): Rename to ...
13344 (gdb_parse_agent_expr): ... this and move to ax.c.
13345 (unparse_agent_expr): Rename to ...
13346 (gdb_unparse_agent_expr): ... this and move to ax.c.
13347 (gdb_agent_op_name): Move to ax.c.
13348 (eval_agent_expr): Rename to ...
13349 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
13350 and move to ax.c.
13351 (eval_tracepoint_agent_expr): New function.
13352 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
13353 non-static.
13354 (current_insn_ptr, emit_error, struct bytecode_address): Move to
13355 ax.c.
13356 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
13357 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
13358 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
13359 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
13360 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
13361 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
13362 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
13363 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
13364 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
13365 (compile_bytecodes): Remove forward declaration.
13366 (is_goto_target): Move to ax.c.
13367 (compile_bytecodes): Move to ax.c and call
13368 agent_get_trace_state_variable_value (...) and
13369 agent_set_trace_state_variable_value (...).
13370
13371 * Makefile.in: Update ax.c and IPA dependencies.
13372
13373 2012-02-24 Pedro Alves <palves@redhat.com>
13374
13375 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
13376 (cmd_bigqtbuffer_circular): ... this. Only handle
13377 'QTBuffer:circular:'.
13378 (handle_tracepoint_general_set): Adjust.
13379
13380 2012-02-16 Yao Qi <yao@codesourcery.com>
13381
13382 * inferiors.c: Move code to ...
13383 * dll.c: .... here. New.
13384 * server.h: Declare clear_dlls.
13385 * Makefile.in (SFILES): Add dll.c.
13386 (OBS): Add dll.o
13387 (dll.o): New rule.
13388
13389 2012-02-11 Yao Qi <yao@codesourcery.com>
13390
13391 * server.c: (handle_monitor_command): Add a new parameter
13392 `own_buf'.
13393 (handle_query): Update caller.
13394
13395 2012-02-09 Joel Brobecker <brobecker@adacore.com>
13396
13397 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
13398 * configure, config.in: Regenerate.
13399 * hostio.c: Provide an alternate implementation if HAVE_READLINK
13400 is not defined.
13401
13402 2012-02-02 Pedro Alves <palves@redhat.com>
13403
13404 Try SIGKILL first, then PTRACE_KILL.
13405 * linux-low.c (linux_kill_one_lwp): New.
13406 (linux_kill_one_lwp): Rename to ...
13407 (kill_one_lwp_callback): ... this. Use the new
13408 linux_kill_one_lwp.
13409
13410 2012-02-02 Pedro Alves <palves@redhat.com>
13411
13412 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
13413 inferior.
13414
13415 2012-01-27 Pedro Alves <palves@redhat.com>
13416
13417 * linux-low.c (linux_child_pid_to_exec_file): Delete.
13418 (elf_64_file_p): Make static.
13419 (linux_pid_exe_is_elf_64_file): New.
13420 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
13421 Delete declarations.
13422 (linux_pid_exe_is_elf_64_file): Declare.
13423 * linux-x86-low.c (x86_arch_setup): Use
13424 linux_pid_exe_is_elf_64_file.
13425
13426 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
13427
13428 * linux-low.c (linux_wait_for_event_1): Rename to ...
13429 (linux_wait_for_event): ... here and merge it with former
13430 linux_wait_for_event - new variable wait_ptid, use it.
13431 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
13432
13433 2012-01-23 Pedro Alves <palves@redhat.com>
13434
13435 * server.c (main): Avoid yet another case of infinite loop while
13436 detaching/killing after a longjmp.
13437
13438 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13439
13440 Code cleanup.
13441 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
13442
13443 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
13444
13445 * hostio.c (handle_readlink): New function.
13446 (handle_vFile): Call it to handle "vFile:readlink" packets.
13447
13448 2012-01-20 Pedro Alves <palves@redhat.com>
13449 Ulrich Weigand <ulrich.weigand@linaro.org>
13450
13451 * server.c (handle_v_requests): Only support vAttach and vRun to
13452 start multiple processes when in extended protocol mode.
13453
13454 2012-01-17 Pedro Alves <palves@redhat.com>
13455
13456 * tracepoint.c (initialize_tracepoint): Use mmap instead of
13457 memalign plus mprotect to allocate the scratch buffer.
13458
13459 2012-01-13 Pedro Alves <palves@redhat.com>
13460
13461 * server.c (attach_inferior): Clear `cont_thread'.
13462
13463 2012-01-13 Pedro Alves <palves@redhat.com>
13464
13465 * server.c (main): Avoid infinite loop while detaching/killing
13466 after a longjmp.
13467
13468 2012-01-09 Doug Evans <dje@google.com>
13469
13470 * server.c (start_inferior): Set last_ptid in --wrapper case.
13471
13472 2012-01-06 Yao Qi <yao@codesourcery.com>
13473
13474 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
13475 defined.
13476 [IN_PROCESS_AGENT] (debug_agent): New global variable.
13477
13478 2012-01-04 Yao Qi <yao@codesourcery.com>
13479
13480 * tracepoint.c (cmd_qtdp): Print debug message
13481 for static tracepoint.
13482
13483 2012-01-04 Yao Qi <yao@codesourcery.com>
13484
13485 * tracepoint.c (trace_vdebug): Differentiate debug message
13486 between gdbserver and IPA.
13487
13488 2012-01-03 Yao Qi <yao@codesourcery.com>
13489
13490 * tracepoint.c (tracepoint_was_hit): Don't collect for
13491 static tracepoint.
13492
13493 2012-01-02 Joel Brobecker <brobecker@adacore.com>
13494
13495 * terminal.h: Reformat copyright header.
13496
13497 2012-01-02 Joel Brobecker <brobecker@adacore.com>
13498
13499 * server.c (gdbserver_version): Update copyright year.
13500 * gdbreplay.c (gdbreplay_version): Likewise.
13501
13502 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
13503
13504 * linux-low.c (linux_create_inferior): Put empty if clause for write.
13505
13506 Revert:
13507 2011-12-18 Hui Zhu <teawater@gmail.com>
13508 * linux-low.c (linux_create_inferior): Save return value to ret.
13509
13510 2011-12-18 Hui Zhu <teawater@gmail.com>
13511
13512 * linux-low.c (linux_create_inferior): Save return value to ret.
13513
13514 2011-12-16 Doug Evans <dje@google.com>
13515
13516 * linux-low.c (linux_create_inferior): If stdio connection,
13517 redirect stdin from /dev/null, stdout to stderr.
13518 * remote-utils.c (remote_is_stdio): New static global.
13519 (remote_connection_is_stdio): New function.
13520 (remote_prepare): Handle stdio connection.
13521 (remote_open): Ditto.
13522 (remote_close): Don't close stdin for stdio connections.
13523 (read_prim,write_prim): New functions. Replace all calls to
13524 read/write to these.
13525 * server.c (main): Watch for "-" argument. Move call to
13526 remote_prepare before start_inferior.
13527 * server.h (STDIO_CONNECTION_NAME): New macro.
13528 (remote_connection_is_stdio): Declare.
13529
13530 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
13531 in debugging output.
13532
13533 2011-12-15 Yao Qi <yao@codesourcery.com>
13534
13535 * tracepoint.c: Include sys/syscall.h.
13536 (gdb_ust_thread): Remove preprocessor conditional.
13537
13538 2011-12-14 Pedro Alves <pedro@codesourcery.com>
13539
13540 * linux-low.c (linux_detach_one_lwp): Call
13541 the_low_target.prepare_to_resume before detaching.
13542
13543 2011-12-14 Yao Qi <yao@codesourcery.com>
13544
13545 * tracepoint.c (gdb_ust_thread): Don't ignore return value
13546 of write.
13547
13548 2011-12-14 Yao Qi <yao@codesourcery.com>
13549
13550 * i386-low.c (i386_low_stopped_data_address): Initialize local
13551 variable `control'.
13552
13553 2011-12-13 Pedro Alves <pedro@codesourcery.com>
13554
13555 PR remote/13492
13556
13557 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
13558 DR_CONTROL unless necessary. Extend comments.
13559 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
13560 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
13561
13562 2011-12-13 Yao Qi <yao@codesourcery.com>
13563
13564 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
13565 macros.
13566 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
13567
13568 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
13569
13570 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
13571 Print new debug message for such case.
13572
13573 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
13574
13575 Fix overlapping memcpy.
13576 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
13577 the read_inferior_memory transfer.
13578 (delete_fast_tracepoint_jump): New variable buf. Use it for the
13579 write_inferior_memory transfer.
13580 (set_fast_tracepoint_jump): New variable buf. Use it for the
13581 read_inferior_memory and write_inferior_memory transfers.
13582 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
13583 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
13584 Use it for the write_inferior_memory transfer.
13585 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
13586 buffers.
13587
13588 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
13589
13590 * linux-low.c (fetch_register, store_register): Make code
13591 consistent, fix formatting.
13592
13593 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
13594
13595 * linux-low.c (usr_store_inferior_registers): Factor out code
13596 to handle individual registers into...
13597 (store_register): ... this new function.
13598
13599 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
13600
13601 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
13602 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
13603 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
13604 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
13605 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
13606 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
13607 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
13608 (srv_xmlfiles): Add new XML files.
13609
13610 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
13611 and <sys/uio.h>.
13612 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
13613 (init_registers_s390_linux32v1): Add prototype.
13614 (init_registers_s390_linux32v2): Likewise.
13615 (init_registers_s390_linux64v1): Likewise.
13616 (init_registers_s390_linux64v2): Likewise.
13617 (init_registers_s390x_linux64v1): Likewise.
13618 (init_registers_s390x_linux64v2): Likewise.
13619 (s390_num_regs): Increment to 52.
13620 (s390_regmap): Add orig_r2 register.
13621 (s390_num_regs_3264): Increment to 68.
13622 (s390_regmap_3264): Add orig_r2 register.
13623 (s390_collect_ptrace_register): Handle orig_r2 register.
13624 (s390_supply_ptrace_register): Likewise.
13625 (s390_fill_last_break): New function.
13626 (s390_store_last_break): Likewise.
13627 (s390_fill_system_call): New function.
13628 (s390_store_system_call): Likewise.
13629 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
13630 register sets.
13631 (s390_check_regset): New function.
13632 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
13633 NT_S390_SYSTEM_CALL regsets and use appropriate description.
13634 Update target_regsets for available register sets.
13635
13636 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
13637 Jan Kratochvil <jan.kratochvil@redhat.com>
13638
13639 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
13640 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
13641 New.
13642 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
13643 * linux-low.h (struct process_info_private): New member r_debug.
13644 * server.c (handle_qxfer_libraries): Call
13645 the_target->qxfer_libraries_svr4.
13646 (handle_qxfer_libraries_svr4): New function.
13647 (qxfer_packets): New entry "libraries-svr4".
13648 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
13649 * target.h (struct target_ops): New member qxfer_libraries_svr4.
13650 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
13651 PACKET_qXfer_libraries_svr4.
13652
13653 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
13654
13655 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
13656 PSW address/mask between 8-byte and 16-byte formats.
13657 (s390_supply_ptrace_register): Likewise.
13658 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
13659 basic addressing mode bit.
13660
13661 2011-11-24 Stan Shebs <stan@codesourcery.com>
13662
13663 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
13664
13665 2011-11-17 Stan Shebs <stan@codesourcery.com>
13666
13667 * tracepoint.c (struct tracepoint): New field traceframe_usage.
13668 (tracing_start_time): New global.
13669 (tracing_stop_time): New global.
13670 (tracing_user_name): New global.
13671 (tracing_notes): New global.
13672 (tracing_stop_note): New global.
13673 (cmd_qtstart): Set traceframe_usage, start_time.
13674 (stop_tracing): Set stop_time.
13675 (cmd_qtstatus): Report additional status.
13676 (cmd_qtp): New function.
13677 (handle_tracepoint_query): Call it.
13678 (cmd_qtnotes): New function.
13679 (handle_tracepoint_general_set): Call it.
13680 (get_timestamp): Rename from tsv_get_timestamp.
13681
13682 2011-11-14 Stan Shebs <stan@codesourcery.com>
13683 Kwok Cheung Yeung <kcy@codesourcery.com>
13684
13685 * linux-x86-low.c (small_jump_insn): New.
13686 (i386_install_fast_tracepoint_jump_pad): Add arguments for
13687 trampoline and error message, build a trampoline and issue a small
13688 jump instruction to it.
13689 (x86_install_fast_tracepoint_jump_pad): Add arguments for
13690 trampoline and error message.
13691 (x86_get_min_fast_tracepoint_insn_len): New.
13692 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
13693 * linux-low.h (struct linux_target_ops): Add arguments to
13694 install_fast_tracepoint_jump_pad operation, add new operation.
13695 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
13696 arguments.
13697 (linux_get_min_fast_tracepoint_insn_len): New function.
13698 (linux_target_op): Add new operation.
13699 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
13700 (gdb_trampoline_buffer_end): Ditto.
13701 (gdb_trampoline_buffer_error): Ditto.
13702 (struct ipa_sym_addresses): Add fields for new IPA variables.
13703 (symbol_list): Add entries for new IPA variables.
13704 (struct tracepoint): Add fields to hold the address range of the
13705 trampoline used by the tracepoint.
13706 (trampoline_buffer_head): New static variable.
13707 (trampoline_buffer_tail): Ditto.
13708 (claim_trampoline_space): New function.
13709 (have_fast_tracepoint_trampoline_buffer): New function.
13710 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
13711 structure.
13712 (install_fast_tracepoint): Ditto, also add error buffer argument.
13713 (cmd_qtminftpilen): New function.
13714 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
13715 (fast_tracepoint_from_trampoline_address): New function.
13716 (fast_tracepoint_collecting): Handle trampoline as part of jump
13717 pad space.
13718 (set_trampoline_buffer_space): New function.
13719 (initialize_tracepoint): Initialize new IPA variables.
13720 * target.h (struct target_ops): Add arguments to
13721 install_fast_tracepoint_jump_pad operation, add new
13722 get_min_fast_tracepoint_insn_len operation.
13723 (target_get_min_fast_tracepoint_insn_len): New.
13724 (install_fast_tracepoint_jump_pad): Add arguments.
13725 * server.h (IPA_BUFSIZ): Define.
13726 * linux-i386-ipa.c: Include extra header files.
13727 (initialize_fast_tracepoint_trampoline_buffer): New function.
13728 (initialize_low_tracepoint): Call it.
13729 * server.h (set_trampoline_buffer_space): Declare.
13730 (claim_trampoline_space): Ditto.
13731 (have_fast_tracepoint_trampoline_buffer): Ditto.
13732
13733 2011-11-14 Yao Qi <yao@codesourcery.com>
13734
13735 * server.c (handle_query): Handle InstallInTrace for qSupported.
13736 * tracepoint.c (add_tracepoint): Sort list.
13737 (install_tracepoint, download_tracepoint): New.
13738 (cmd_qtdp): Call them to install and download tracepoints.
13739 (sort_tracepoints): Removed.
13740 (cmd_qtstart): Update.
13741
13742 2011-11-14 Yao Qi <yao@codesourcery.com>
13743
13744 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
13745 * mem-break.h: Declare.
13746 * tracepoint.c (cmd_qtstart): Move some code to ...
13747 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
13748 New.
13749 (download_tracepoints): Move some code to ...
13750 (download_tracepoint_1): ... here. New.
13751
13752 2011-11-08 Yao Qi <yao@codesourcery.com>
13753
13754 * remote-utils.c (relocate_instruction): A comment fix.
13755
13756 2011-11-07 Joel Brobecker <brobecker@adacore.com>
13757
13758 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
13759 (i386_dr_low_get_control, i386_dr_low_get_status): Use
13760 dr_status_mirror and dr_control_mirror from debug_reg_state.
13761 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
13762 (i386_initial_stuff): Remove use of deleted globals.
13763 (i386_get_thread_context, i386_set_thread_context,
13764 i386_thread_added): Use dr_status_mirror and dr_control_mirror
13765 from debug_reg_state.
13766
13767 2011-11-05 Yao Qi <yao@codesourcery.com>
13768
13769 * tracepoint.c (gdb_collect): Loop over tracepoints of same
13770 address as TPOINT's.
13771
13772 2011-11-02 Stan Shebs <stan@codesourcery.com>
13773
13774 * tracepoint.c (agent_mem_read_string): New function.
13775 (eval_agent_expr): Call it for tracenz.
13776 * server.c (handle_query): Report support for tracenz.
13777
13778 2011-11-02 Yao Qi <yao@codesourcery.com>
13779
13780 * tracepoint.c (cmd_qtstart): Remove unused local variables.
13781
13782 2011-11-02 Yao Qi <yao@codesourcery.com>
13783
13784 * target.h: Fix a typo in comment.
13785
13786 2011-10-31 Pedro Alves <pedro@codesourcery.com>
13787
13788 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
13789 clobber the breakpoints' shadows with fast tracepoint jumps.
13790 * mem-break.h (check_mem_write): Add `myaddr' parameter.
13791 * target.c (write_inferior_memory): Also pass MYADDR down to
13792 check_mem_write.
13793
13794 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
13795
13796 * configure.ac: Check support for personality routine.
13797 * configure: Regenerate.
13798 * config.in: Likewise.
13799 * linux-low.c: Include <sys/personality.h>.
13800 Define ADDR_NO_RANDOMIZE if necessary.
13801 (linux_create_inferior): Disable address space randomization when
13802 forking inferior, if requested.
13803 (linux_supports_disable_randomization): New function.
13804 (linux_target_ops): Install it.
13805 * server.h (disable_randomization): Declare.
13806 * server.c (disable_randomization): New global variable.
13807 (handle_general_set): Handle QDisableRandomization.
13808 (handle_query): Likewise for qSupported.
13809 (main): Support --disable-randomization and --no-disable-randomization
13810 command line arguments.
13811 * target.h (struct target_ops): Add supports_disable_randomization.
13812 (target_supports_disable_randomization): New macro.
13813
13814 2011-09-29 Mike Frysinger <vapier@gentoo.org>
13815
13816 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
13817 ifdef check.
13818 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
13819 [!PT_GETDSBT] (target_loadmap): New definition.
13820 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
13821 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
13822 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
13823 and PT_GETDSBT to LINUX_LOADMAP.
13824 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
13825 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
13826
13827 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
13828
13829 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
13830 (arm_linux_hwbp_cap): New static variable.
13831 (arm_linux_get_hwbp_cap): Replace by ...
13832 (arm_linux_init_hwbp_cap): ... this new function.
13833 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
13834 (arm_linux_get_hw_watchpoint_count): Likewise.
13835 (arm_linux_get_hw_watchpoint_max_length): Likewise.
13836 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
13837 (arm_prepare_to_resume): Use perror_with_name instead of error.
13838
13839 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
13840
13841 * linux-arm-low.c: Include <signal.h>.
13842 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
13843 (struct arm_linux_hwbp_cap): New data type.
13844 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
13845 (struct arm_linux_hw_breakpoint): New data type.
13846 (MAX_BPTS, MAX_WPTS): Define.
13847 (struct arch_process_info, struct arch_lwp_info): New data types.
13848 (arm_linux_get_hwbp_cap): New function.
13849 (arm_linux_get_hw_breakpoint_count): Likewise.
13850 (arm_linux_get_hw_watchpoint_count): Likewise.
13851 (arm_linux_get_hw_watchpoint_max_length): Likewise.
13852 (arm_hwbp_control_initialize): Likewise.
13853 (arm_hwbp_control_is_enabled): Likewise.
13854 (arm_hwbp_control_is_initialized): Likewise.
13855 (arm_hwbp_control_disable): Likewise.
13856 (arm_linux_hw_breakpoint_equal): Likewise.
13857 (arm_linux_hw_point_initialize): Likewise.
13858 (struct update_registers_data): New data structure.
13859 (update_registers_callback: New function.
13860 (arm_insert_point): Likewise.
13861 (arm_remove_point): Likewise.
13862 (arm_stopped_by_watchpoint): Likewise.
13863 (arm_stopped_data_address): Likewise.
13864 (arm_new_process): Likewise.
13865 (arm_new_thread): Likewise.
13866 (arm_prepare_to_resume): Likewise.
13867 (the_low_target): Register arm_insert_point, arm_remove_point,
13868 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
13869 arm_new_thread, and arm_prepare_to_resume.
13870
13871 2011-09-15 Stan Shebs <stan@codesourcery.com>
13872
13873 * server.h (struct emit_ops): Add compare-goto fields.
13874 * tracepoint.c (gdb_agent_op_sizes): New table.
13875 (emit_eq_goto): New function.
13876 (emit_ne_goto): New function.
13877 (emit_lt_goto): New function.
13878 (emit_le_goto): New function.
13879 (emit_gt_goto): New function.
13880 (emit_ge_goto): New function.
13881 (is_goto_target): New function.
13882 (compile_bytecodes): Recognize special cases of compare-goto
13883 combinations and call specialized emitters for them.
13884 * linux-x86-low.c (amd64_emit_eq_goto): New function.
13885 (amd64_emit_ne_goto): New function.
13886 (amd64_emit_lt_goto): New function.
13887 (amd64_emit_le_goto): New function.
13888 (amd64_emit_gt_goto): New function.
13889 (amd64_emit_ge_goto): New function.
13890 (amd64_emit_ops): Add the new functions.
13891 (i386_emit_eq_goto): New function.
13892 (i386_emit_ne_goto): New function.
13893 (i386_emit_lt_goto): New function.
13894 (i386_emit_le_goto): New function.
13895 (i386_emit_gt_goto): New function.
13896 (i386_emit_ge_goto): New function.
13897 (i386_emit_ops): Add the new functions.
13898
13899 2011-09-08 Stan Shebs <stan@codesourcery.com>
13900
13901 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
13902 (i386_emit_epilogue): Restore %ebx.
13903
13904 2011-08-31 Jie Zhang <jzhang918@gmail.com>
13905
13906 * server.c (step_thread): Remove definition.
13907 (process_serial_event): Don't handle Hs.
13908 * server.h (step_thread): Remove declaration.
13909 * target.c (set_desired_inferior): Remove use of step_thread.
13910
13911 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
13912
13913 * linux-low.c: Include linux-procfs.h.
13914 (linux_attach_lwp_1): Update comments.
13915 (linux_attach): Scan for existing threads when attaching to a
13916 process that is the tgid.
13917 * Makefile.in: Update dependencies.
13918
13919 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
13920
13921 * configure.srv: Add linux-procfs.o dependencies.
13922
13923 2011-08-14 Yao Qi <yao@codesourcery.com>
13924
13925 * target.h (struct target_ops): Fix indent.
13926 * win32-low.c (win32_target_ops): Fix comment.
13927
13928 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
13929 Yao Qi <yao@codesourcery.com>
13930
13931 * Makefile.in (clean): Remove tic6x-*.c files.
13932 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
13933 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
13934 (tic6x-c64xp-linux.c): Likewise.
13935 * configure.srv: Add support for tic6x-*-uclinux.
13936 * linux-tic6x-low.c: New.
13937 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
13938
13939 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
13940 Yao Qi <yao@codesourcery.com>
13941
13942 * target.h (struct target_ops): Add read_loadmap.
13943 * linux-low.c (struct target_loadseg): New type.
13944 (struct target_loadmap): New type.
13945 (linux_read_loadmap): New function.
13946 (linux_target_ops): Add linux_read_loadmap.
13947 * server.c (handle_query): Support qXfer:fdpic:read packet.
13948 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
13949 to NULL.
13950
13951 2011-08-05 Eli Zaretskii <eliz@gnu.org>
13952
13953 * win32-low.c: Include <stdint.h>.
13954
13955 2011-07-22 Pedro Alves <pedro@codesourcery.com>
13956
13957 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
13958 to the inferior here.
13959 (i386_remove_aligned_watchpoint): Ditto.
13960 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
13961 fit part of the watchpoint in the debug registers.
13962 (i386_update_inferior_debug_regs): New.
13963 (i386_low_insert_watchpoint): Work on a local mirror of the debug
13964 registers, and only update the inferior on success.
13965 (i386_low_remove_watchpoint): Ditto.
13966
13967 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
13968
13969 * linux-low.c (compare_ints, unique, list_threads, show_process,
13970 linux_core_of_thread): Delete.
13971 (linux_target_ops): Change linux_core_of_thread to
13972 linux_common_core_of_thread.
13973 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
13974 * utils.c (malloc_failure): Change type of argument.
13975 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
13976 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
13977 common/linux-osdata.c, common/ptid.c and common/buffer.c.
13978 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
13979 (IPA_OBJS): Add common-utils-ipa.o.
13980 (ptid_h, linux_osdata_h): New macros.
13981 (server_h): Add common/common-utils.h, common/xml-utils.h,
13982 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
13983 common/ptid.h.
13984 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
13985 ptid.o, buffer.o): New rules.
13986 (linux-low.o): Add common/linux-osdata.h as a dependency.
13987 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
13988 * configure.ac: Add AC_HEADER_DIRENT check.
13989 * config.in: Regenerate.
13990 * configure: Regenerate.
13991 * remote-utils.c (xml_escape_text): Delete.
13992 (buffer_grow, buffer_free, buffer_init, buffer_finish,
13993 buffer_xml_printf): Move to common/buffer.c.
13994 * server.c (main): Remove call to initialize_inferiors.
13995 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
13996 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
13997 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
13998 internal_error, gdb_assert, gdb_assert_fail): Delete.
13999 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
14000 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
14001 common/buffer.h.
14002 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
14003 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
14004 initialize_inferiors): Delete.
14005
14006 2011-07-20 Pedro Alves <pedro@codesourcery.com>
14007
14008 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
14009 symbol error.
14010
14011 2011-05-31 Pedro Alves <pedro@codesourcery.com>
14012
14013 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
14014 assertion.
14015 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
14016
14017 2011-05-26 Yao Qi <yao@codesourcery.com>
14018
14019 * Makefile.in (thread-db.o): Track dependence to
14020 common/gdb_thread_db.h.
14021 * thread-db.c: include gdb_thread_db.h from right place.
14022
14023 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
14024
14025 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
14026 __FILE__ and __LINE__ to internal_error.
14027
14028 2011-05-13 Doug Evans <dje@google.com>
14029
14030 * thread-db.c (try_thread_db_load_from_sdir): New function.
14031 (try_thread_db_load_from_dir): New function.
14032 (thread_db_load_search): Handle $sdir, ignore $pdir.
14033 Remove trying of system directories if search of
14034 libthread-db-search-path fails, that is now done via $sdir.
14035
14036 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
14037
14038 * server.c (handle_query): Add EnableDisableTracepoints to the list
14039 of supported features.
14040 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
14041 tracepoints.
14042 (cmd_qtenable_disable): New.
14043 (cmd_qtstart): Install tracepoints even if disabled.
14044 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
14045 receiving a QTEnable or QTDisable packet.
14046 (gdb_collect): Skip data collection if fast tracepoint is disabled.
14047 (ust_marker_to_static_tracepoint): Do not ignore disabled static
14048 tracepoints.
14049 (gdb_probe): Skip data collection if static tracepoint is disabled.
14050
14051 2011-05-10 Doug Evans <dje@google.com>
14052
14053 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
14054
14055 2011-05-04 Doug Evans <dje@google.com>
14056
14057 * linux-low.c (linux_join): Skip process lookup.
14058 * spu-low.c (spu_join): Ditto.
14059 * server.c (join_inferiors_callback): Delete.
14060 (process_serial_event): For 'D' packet (detach) call join_inferior
14061 directly.
14062
14063 2011-05-04 Joseph Myers <joseph@codesourcery.com>
14064
14065 * README: Don't mention xscale*-*-linux*.
14066 * configure.srv (xscale*-*-linux*): Don't handle target.
14067
14068 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
14069
14070 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
14071 casting pointers.
14072 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
14073 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
14074 (i386_emit_void_call_2): Likewise.
14075
14076 2011-04-26 Yao Qi <yao@codesourcery.com>
14077
14078 * linux-low.c: Move common macros to linux-ptrace.h.
14079 Include linux-ptrace.h.
14080 * Makefile.in (linux_ptrace_h): New.
14081 (linux-low.o): Depends on linux-ptrace.h.
14082
14083 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
14084
14085 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
14086 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
14087 (remote_prepare): New function with most of the TCP code from ...
14088 (remote_open): ... here. Detect PORT here unconditionally. Move also
14089 setting transport_is_reliable.
14090 * server.c (run_once): New variable.
14091 (gdbserver_usage): Document it.
14092 (main): Set run_once for `--once'. Call remote_prepare. Exit after
14093 the first run if RUN_ONCE.
14094 * server.h (run_once, remote_prepare): New declarations.
14095
14096 2011-04-19 Tom Tromey <tromey@redhat.com>
14097
14098 * win32-low.c (handle_load_dll): Remove duplicate "the".
14099
14100 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
14101
14102 Remove support for old Cygwin 1.5 versions.
14103 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
14104 function to avoid warning.
14105 (win32_add_one_solib): Use cygwin_conv_path function to avoid
14106 warning.
14107
14108 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
14109
14110 * gdbserver/server.h (Macro _): Define it if not available.
14111
14112 2011-03-14 Michael Snyder <msnyder@vmware.com>
14113
14114 * hostio.c (handle_close): Remove unnecessary null test.
14115
14116 2011-03-10 Joel Brobecker <brobecker@adacore.com>
14117
14118 * Makefile.in (maintainer-clean realclean distclean): Remove
14119 "make ... subdir_do" command.
14120
14121 2011-03-10 Michael Snyder <msnyder@vmware.com>
14122
14123 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
14124
14125 * server.c (handle_v_run): Free alloced buffer on early return.
14126
14127 2011-03-09 Yao Qi <yao@codesourcery.com>
14128
14129 Revert:
14130 2011-03-04 Yao Qi <yao@codesourcery.com>
14131
14132 * Makefile.in: Remove GNU make feature --directory.
14133
14134 2011-03-05 Yao Qi <yao@codesourcery.com>
14135
14136 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
14137 (subdir_do): New make target. Copied from gdb/Makefile.
14138 (maintainer-clean, realclean, distclean, clean): Call corresponding
14139 make targets in common/Makefile.
14140
14141 2011-02-11 Yao Qi <yao@codesourcery.com>
14142
14143 * configure.ac: Call AC_PROG_RANLIB.
14144 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
14145 * configure: Regenerate.
14146
14147 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
14148
14149 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
14150
14151 2011-03-06 Yao Qi <yao@codesourcery.com>
14152
14153 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
14154
14155 2011-03-05 Yao Qi <yao@codesourcery.com>
14156
14157 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
14158 (subdir_do): New make target. Copied from gdb/Makefile.
14159 (maintainer-clean, realclean, distclean, clean): Call corresponding
14160 make targets in common/Makefile.
14161
14162 2011-03-04 Yao Qi <yao@codesourcery.com>
14163
14164 * Makefile.in: Remove GNU make feature --directory.
14165
14166 2011-03-04 Michael Snyder <msnyder@vmware.com>
14167
14168 * server.c (queue_stop_reply): Call xmalloc not malloc.
14169
14170 2011-03-02 Michael Snyder <msnyder@vmware.com>
14171
14172 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
14173
14174 2011-02-28 Michael Snyder <msnyder@vmware.com>
14175
14176 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
14177 (cmd_qtframe): Ditto.
14178 (cmd_qtbuffer): Ditto.
14179 (cmd_bigqtbuffer): Ditto.
14180
14181 * utils.c (decimal2str): Initialize 'width' to nine, then
14182 don't mess with it.
14183
14184 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14185
14186 * hostio.c (require_data): Free *data, not data.
14187
14188 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14189
14190 * hostio.c (require_data): Use free, not xfree.
14191
14192 2011-02-27 Michael Snyder <msnyder@vmware.com>
14193
14194 * server.c (handle_query): Discard unused value.
14195
14196 * hostio.c (require_data): Free malloc memory before returning
14197 error.
14198
14199 2011-02-26 Michael Snyder <msnyder@vmware.com>
14200
14201 * linux-low.c (list_threads): Call closedir for dirent.
14202
14203 2011-02-27 Michael Snyder <msnyder@vmware.com>
14204
14205 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
14206 a case statement falls through.
14207
14208 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
14209
14210 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
14211 in comparison.
14212
14213 2011-02-26 Michael Snyder <msnyder@vmware.com>
14214
14215 * utils.c (decimal2str): Eliminate dead code and dead param.
14216 (pulongest): Drop dead param from call to decimal2str.
14217 (plongest): Ditto.
14218
14219 2011-02-24 Joel Brobecker <brobecker@adacore.com>
14220
14221 Revert the following patch (not approved yet):
14222 2011-02-21 Hui Zhu <teawater@gmail.com>
14223 * tracepoint.c (tp_printf): New function.
14224 (eval_agent_expr): Handle gdb_agent_op_printf.
14225
14226 2011-02-21 Hui Zhu <teawater@gmail.com>
14227
14228 * tracepoint.c (tp_printf): New function.
14229 (eval_agent_expr): Handle gdb_agent_op_printf.
14230
14231 2011-02-18 Tom Tromey <tromey@redhat.com>
14232
14233 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
14234 (tracepoint.o): Likewise.
14235 * tracepoint.c (enum gdb_agent_op): Use ax.def.
14236 (gdb_agent_op_names): Likewise.
14237
14238 2011-02-18 Tom Tromey <tromey@redhat.com>
14239
14240 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
14241 gdb_agent_op_rot>: New constants.
14242 (gdb_agent_op_names): Add pick and roll.
14243 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
14244 cases.
14245
14246 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
14247
14248 * aclocal.m4: Regenerated with aclocal-1.11.1.
14249
14250 2011-02-14 Pedro Alves <pedro@codesourcery.com>
14251
14252 * server.c (handle_qxfer_traceframe_info): New.
14253 (qxfer_packets): Register "traceframe-info".
14254 (handle_query): Report support for qXfer:traceframe-info:read+.
14255 * tracepoint.c (match_blocktype): New.
14256 (traceframe_find_block_type): Rename to ...
14257 (traceframe_walk_blocks): ... this. Add callback filter argument,
14258 and use it.
14259 (traceframe_find_block_type): New, reimplemented on top of
14260 traceframe_walk_blocks.
14261 (build_traceframe_info_xml): New.
14262 (traceframe_read_info): New.
14263 * server.h (traceframe_read_info): Declare.
14264
14265 2011-02-11 Yao Qi <yao@codesourcery.com>
14266
14267 * configure.ac: Call AC_PROG_RANLIB.
14268 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
14269 * configure: Regenerate.
14270
14271 2011-02-07 Pedro Alves <pedro@codesourcery.com>
14272
14273 * server.c (gdb_read_memory): Change return semantics to allow
14274 partial transfers.
14275 (handle_search_memory_1): Adjust.
14276 (process_serial_event) <'m' packet>: Handle partial transfers.
14277 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
14278
14279 2011-01-28 Pedro Alves <pedro@codesourcery.com>
14280
14281 * regcache.c (init_register_cache): Initialize
14282 regcache->register_status.
14283 (free_register_cache): Release regcache->register_status.
14284 (regcache_cpy): Copy register_status.
14285 (registers_to_string): Print 'x's for unavailable registers.
14286 (supply_register): Mark the register's status valid or
14287 unavailable, depending on whether a buffer was passed in or not.
14288 (supply_register_zeroed): New.
14289 (supply_regblock): Mark the registers' status valid or
14290 unavailable, depending on whether a buffer was passed in or not.
14291 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
14292 (struct regcache): New `register_status' field.
14293 (supply_register_zeroed): Declare.
14294 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
14295 supply_register_zeroed, rather than passing a NULL buffer to
14296 supply_register.
14297 * tracepoint.c (fetch_traceframe_registers): Update comment.
14298
14299 2011-01-28 Pedro Alves <pedro@codesourcery.com>
14300
14301 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
14302 buffer explicit.
14303
14304 2011-01-25 Pedro Alves <pedro@codesourcery.com>
14305
14306 * server.h (decode_xfer_write): Change prototype.
14307 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
14308 and don't extract the annex here.
14309 * server.c (decode_xfer_read): Remove `annex' parameter,
14310 and don't extract the annex here.
14311 (decode_xfer): New.
14312 (struct qxfer): New.
14313 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
14314 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
14315 (handle_qxfer_statictrace): New functions, abstracted out from
14316 handle_query, and made to use the struct qxfer interface.
14317 (handle_threads_qxfer_proper): Rename to ...
14318 (handle_qxfer_threads_proper): ... this.
14319 (handle_threads_qxfer): Rename to ...
14320 (handle_qxfer_threads): ... this. Adjust.
14321 (qxfer_packets): New array.
14322 (handle_qxfer): New function.
14323 (handle_query): Use handle_qxfer.
14324
14325 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
14326
14327 * gdbreplay.c: Shorten lines of >= 80 columns.
14328 * linux-low.c: Ditto.
14329 * linux-ppc-low.c: Ditto.
14330 * linux-s390-low.c: Ditto.
14331 * linux-sparc-low.c: Ditto.
14332 * linux-x86-low.c: Ditto.
14333 * linux-xtensa-low.c: Ditto.
14334 * mem-break.c: Ditto.
14335 * nto-low.c: Ditto.
14336 * regcache.h: Ditto.
14337 * remote-utils.c: Ditto.
14338 * server.c: Ditto.
14339 * server.h: Ditto.
14340 * thread-db.c: Ditto.
14341 * tracepoint.c: Ditto.
14342 * utils.c: Ditto.
14343 * win32-low.h: Ditto.
14344
14345 2011-01-05 Joel Brobecker <brobecker@adacore.com>
14346
14347 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
14348 update.
14349
14350 2011-01-01 Joel Brobecker <brobecker@adacore.com>
14351
14352 * server.c (gdbserver_version): Update copyright year in version
14353 output.
14354 * gdbreplay.c (gdbreplay_version): Ditto.
14355
14356 2010-12-29 Jie Zhang <jie.zhang@analog.com>
14357
14358 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
14359 * linux-bfin-low.c: New file.
14360 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
14361 PT_DATA_ADDR for BFIN targets.
14362 * Makefile.in (SFILES): Add linux-bfin-low.c.
14363 (clean): Remove reg-bfin.c.
14364 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
14365 * README: Mention supported Blackfin targets.
14366
14367 2010-12-23 Mike Frysinger <vapier@gentoo.org>
14368
14369 * .gitignore: New file.
14370
14371 2010-11-16 Mike Frysinger <vapier@gentoo.org>
14372
14373 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
14374
14375 2010-10-22 Jie Zhang <jie@codesourcery.com>
14376
14377 * Makefile.in: Add FLAGS_TO_PASS variable.
14378 (install): Remove dependency of install-only and recursively
14379 invoke make for install-only.
14380
14381 2010-10-04 Doug Evans <dje@google.com>
14382
14383 * Makefile.in (uninstall): Use $(DESTDIR).
14384
14385 2010-09-24 Pedro Alves <pedro@codesourcery.com>
14386
14387 PR gdb/11842
14388
14389 * linux-x86-low.c (compat_siginfo_from_siginfo)
14390 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
14391 si_code is < 0. Check for si_code == SI_TIMER before checking for
14392 si_code < 0.
14393
14394 2010-09-13 Joel Brobecker <brobecker@adacore.com>
14395
14396 * lynx-i386-low.c: New file.
14397 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
14398
14399 2010-09-13 Joel Brobecker <brobecker@adacore.com>
14400
14401 * lynx-low.c (ptrace_request_to_str): Remove handling for
14402 request values that have been removed in LynxOS 5.x.
14403
14404 2010-09-13 Joel Brobecker <brobecker@adacore.com>
14405
14406 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
14407 <ptrace.h>
14408
14409 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
14410
14411 * configure.ac: Add --enable-inprocess-agent option.
14412 * configure: Rebuilt.
14413
14414 2010-09-06 Yao Qi <yao@codesourcery.com>
14415
14416 * linux-low.c (linux_kill): Remove unused variable.
14417 (linux_stabilize_threads): Likewise.
14418 * server.c (start_inferior): Likewise.
14419 (queue_stop_reply_callback): Likewise.
14420 * tracepoint.c (do_action_at_tracepoint): Likewise.
14421
14422 2010-09-06 Yao Qi <yao@codesourcery.com>
14423
14424 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
14425 on return.
14426
14427 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
14428
14429 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
14430
14431 2010-09-06 Pedro Alves <pedro@codesourcery.com>
14432
14433 * Makefile.in (install-only): Replace $IPA_DEPFILES with
14434 "$(IPA_DEPFILES)".
14435
14436 2010-09-01 Joel Brobecker <brobecker@adacore.com>
14437
14438 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
14439 gdbserver/lynx-ppc-low.c: New files.
14440 * Makefile.in (lynx_low_h): New variable.
14441 (lynx-low.o, lynx-ppc-low.o): New rules.
14442 * configure.ac: On LynxOS, link with -lnetinet.
14443 * configure.srv: Add handling of powerpc-*-lynxos* targets.
14444 * configure: regenerate.
14445
14446 2010-09-01 Joel Brobecker <brobecker@adacore.com>
14447
14448 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
14449 * configure.ac: Add check for vasprintf and vsnprintf.
14450 * configure, config.in: Regenerate.
14451 * server.h (vasprintf, vsnprintf): Add conditional declarations.
14452
14453 2010-09-01 Joel Brobecker <brobecker@adacore.com>
14454
14455 * gdbreplay.c: Move include of alloca.h up, next to include of
14456 malloc.h.
14457 * server.h: Add include of malloc.h.
14458 * mem-break.c: Remove include of malloc.h.
14459 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
14460
14461 2010-09-01 Joel Brobecker <brobecker@adacore.com>
14462
14463 * Makefile.in (memmem.o): Build with -Wno-error.
14464
14465 2010-09-01 Joel Brobecker <brobecker@adacore.com>
14466
14467 * utils.c (xsnprintf): Make non-static.
14468 * server.h: Add xsnprintf declaration.
14469 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
14470 replace calls to snprintf by calls to xsnprintf throughout.
14471
14472 2010-09-01 Joel Brobecker <brobecker@adacore.com>
14473
14474 * configure.ac: Add configure check for alloca.
14475 * configure, config.in: Regenerate.
14476 * server.h: Include alloca.h if it exists.
14477 * gdbreplay.c: Include alloca.h if it exists.
14478
14479 2010-08-28 Pedro Alves <pedro@codesourcery.com>
14480
14481 * linux-low.c (__SIGRTMIN): Define if not already defined.
14482 (linux_create_inferior): Check for __ANDROID__ rather than
14483 __SIGRTMIN.
14484 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
14485 are already deferred.
14486 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
14487 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
14488 stopped and already has a pending signal to report.
14489 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
14490 a pending signal to report or is moving out of a jump pad.
14491 (linux_init_signals): Check for __ANDROID__ rather than
14492 __SIGRTMIN.
14493
14494 2010-08-28 Pedro Alves <pedro@codesourcery.com>
14495
14496 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
14497 debug_threads check. Avoid a linear search when not doing debug
14498 output.
14499
14500 2010-08-27 Pedro Alves <pedro@codesourcery.com>
14501
14502 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
14503 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
14504 (struct file_handler) <fd>: Change type to gdb_fildes_t.
14505 (process_event): Change local fd's type to gdb_fildes_t.
14506 (create_file_handler): Adjust prototype.
14507 (delete_file_handler): Adjust prototype.
14508 (handle_file_event): Adjust prototype. Use pfildes.
14509 (create_file_event): Adjsut prototype.
14510 * remote-utils.c (remote_desc, listen_desc): Change type to
14511 gdb_fildes_t.
14512 * server.h: New gdb_fildes_t typedef.
14513 [USE_WIN32API]: Include winsock2.h.
14514 (delete_file_handler, add_file_handler): Adjust prototypes.
14515 (pfildes): Declare.
14516 * utils.c (pfildes): New.
14517
14518 2010-08-27 Pedro Alves <pedro@codesourcery.com>
14519
14520 * configure.ac (build_warnings): Add -Wno-char-subscripts.
14521 * configure: Regenerate.
14522
14523 2010-08-27 Pedro Alves <pedro@codesourcery.com>
14524
14525 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
14526 (linux_done_accessing_memory): ... this.
14527 (linux_target_ops): Adjust.
14528 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
14529 * nto-low.c (nto_target_ops): Adjust comment.
14530 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
14531 * spu-low.c (spu_target_ops): Adjust comment.
14532 * target.h (target_ops): Rename unprepare_to_access_memory field
14533 to done_accessing_memory.
14534 (unprepare_to_access_memory): Rename to ...
14535 (done_accessing_memory): ... this.
14536
14537 2010-08-26 Pedro Alves <pedro@codesourcery.com>
14538
14539 * linux-low.c (linux_prepare_to_access_memory): New.
14540 (linux_unprepare_to_access_memory): New.
14541 (linux_target_ops): Install them.
14542 * server.c (read_memory): Rename to ...
14543 (gdb_read_memory): ... this. Use
14544 prepare_to_access_memory/prepare_to_access_memory.
14545 (write_memory): Rename to ...
14546 (gdb_write_memory): ... this. Use
14547 prepare_to_access_memory/prepare_to_access_memory.
14548 (handle_search_memory_1): Adjust.
14549 (process_serial_event): Adjust.
14550 * target.h (struct target_ops): New fields
14551 prepare_to_access_memory and unprepare_to_access_memory.
14552 (prepare_to_access_memory, unprepare_to_access_memory): New.
14553 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
14554 prepare_to_access_memory/prepare_to_access_memory.
14555 * nto-low.c (nto_target_ops): Adjust.
14556 * spu-low.c (spu_target_ops): Adjust.
14557 * win32-low.c (win32_target_ops): Adjust.
14558
14559 2010-08-26 Pedro Alves <pedro@codesourcery.com>
14560
14561 * Makefile.in (WARN_CFLAGS): Get it from configure.
14562 (WERROR_CFLAGS): New.
14563 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
14564 * configure.ac: Introduce --enable-werror, which adds -Werror to
14565 the compiler command line. Enabled by default. Disable with
14566 --disable-werror. Add -Wdeclaration-after-statement
14567 Wpointer-arith and -Wformat-nonliteral to warning flags.
14568 * configure: Regenerate.
14569
14570 2010-08-26 Pedro Alves <pedro@codesourcery.com>
14571
14572 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
14573
14574 2010-08-26 Pedro Alves <pedro@codesourcery.com>
14575
14576 * gdbreplay.c (remote_error): New.
14577 (gdbchar): New.
14578 (expect): Use gdbchar. Check for error reading from GDB.
14579 Clarify sync error output.
14580 (play): Check for errors writing to GDB.
14581 * linux-low.c (sigchld_handler): Really ignore `write' errors.
14582 * remote-utils.c (getpkt): Check for errors writing to the remote
14583 descriptor.
14584
14585 2010-08-25 Pedro Alves <pedro@codesourcery.com>
14586
14587 * linux-low.c (linux_wait_1): Move non-debugging code out of
14588 `debug_threads' control.
14589
14590 2010-08-25 Pedro Alves <pedro@codesourcery.com>
14591
14592 * linux-low.c (linux_wait_1): Don't set last_status here.
14593 * server.c (push_event, queue_stop_reply_callback): Assert we're
14594 not pushing a TARGET_WAITKIND_IGNORE event.
14595 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
14596 (myresume, handle_target_event): Set the thread's last_resume_kind
14597 and last_status from the target returned status.
14598
14599 2010-08-25 Pedro Alves <pedro@codesourcery.com>
14600
14601 PR threads/10729
14602
14603 * linux-x86-low.c (update_debug_registers_callback): New.
14604 (i386_dr_low_set_addr): Use it.
14605 (i386_dr_low_get_addr): New.
14606 (i386_dr_low_set_control): Use update_debug_registers_callback.
14607 (i386_dr_low_get_control): New.
14608 (i386_dr_low_get_status): Adjust.
14609 * linux-low.c (linux_stop_lwp): New.
14610 * linux-low.h (linux_stop_lwp): Declare.
14611
14612 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
14613 argument instead of a i386_debug_reg_state.
14614 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
14615 a i386_debug_reg_state.
14616 (i386_insert_aligned_watchpoint): Adjust.
14617 (i386_remove_aligned_watchpoint): Adjust.
14618 (i386_low_stopped_data_address): Read the debug registers from the
14619 inferior instead of from the mirrors.
14620 * i386-low.h (struct i386_debug_reg_state): Extend comment.
14621 (i386_dr_low_get_addr): Declare.
14622 (i386_dr_low_get_control): Declare.
14623 (i386_dr_low_get_status): Change prototype.
14624
14625 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
14626 (i386_dr_low_get_addr): New.
14627 (i386_dr_low_get_control): New.
14628 (i386_dr_low_get_status): Adjust prototype. Return
14629 dr_status_mirror.
14630 (i386_initial_stuff): Clear dr_status_mirror and
14631 dr_control_mirror.
14632 (i386_get_thread_context): Adjust.
14633 (i386_set_thread_context): Adjust.
14634 (i386_thread_added): Adjust.
14635
14636 2010-08-24 Pedro Alves <pedro@codesourcery.com>
14637
14638 * linux-low.h (linux_thread_area): Delete declaration.
14639
14640 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
14641
14642 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
14643 after its termination.
14644
14645 2010-08-09 Pedro Alves <pedro@codesourcery.com>
14646
14647 * linux-low.c (gdb_wants_lwp_stopped): Delete.
14648 (gdb_wants_all_stopped): Delete.
14649 (linux_wait_1): Don't call them.
14650 * server.c (handle_v_cont): Tag all threads as want-stopped.
14651 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
14652 stopped as "client-wants-stopped".
14653
14654 2010-07-31 Pedro Alves <pedro@codesourcery.com>
14655
14656 * Makefile.in (signals_h): New.
14657 (server_h): Depend on it.
14658 (server.o): Don't depend on $(signals_def).
14659 (signals.o): Depend on $(signals_def).
14660
14661 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
14662
14663 * Makefile.in (signals_def): New.
14664 (server_h): Append include/gdb/signals.h and signals_def.
14665 (server.o): Append signals_def.
14666
14667 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
14668
14669 * server.c (handle_target_event): Use target_signal_to_host for
14670 resume_info.sig initialization.
14671 * target.h (struct thread_resume) <sig>: New comment.
14672
14673 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
14674
14675 * server.c (handle_query): strcpy() the returned string from paddress()
14676 instead of sprintf().
14677 * utils.c (paddress): Return phex_nz().
14678
14679 2010-07-07 Joel Brobecker <brobecker@adacore.com>
14680
14681 * server.c (handle_v_cont): Call mourn_inferior if process
14682 just exited.
14683 (myresume): Likewise.
14684
14685 2010-07-01 Pedro Alves <pedro@codesourcery.com>
14686
14687 Static tracepoints, and integration with UST.
14688
14689 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
14690 * mem-break.c (uninsert_all_breakpoints)
14691 (reinsert_all_breakpoints): New.
14692 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
14693 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
14694 (gdb_agent_ust_loaded, helper_thread_id)
14695 (gdb_agent_helper_thread_id): New macros.
14696 (struct ipa_sym_addresses): Add addr_ust_loaded,
14697 addr_helper_thread_id, addr_cmd_buf.
14698 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
14699 (in_process_agent_loaded_ust): New.
14700 (write_e_ust_not_loaded): New.
14701 (maybe_write_ipa_ust_not_loaded): New.
14702 (struct collect_static_trace_data_action): New.
14703 (enum tracepoint_type) <static_tracepoint>: New.
14704 (struct tracepoint) <handle>: Mention static tracepoints.
14705 (struct static_tracepoint_ctx): New.
14706 (CMD_BUF_SIZE): New.
14707 (add_tracepoint_action): Handle static tracepoint actions.
14708 (unprobe_marker_at): New.
14709 (clear_installed_tracepoints): Handle static tracepoints.
14710 (cmd_qtdp): Handle static tracepoints.
14711 (probe_marker_at): New.
14712 (cmd_qtstart): Handle static tracepoints.
14713 (response_tracepoint): Handle static tracepoints.
14714 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
14715 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
14716 (get_context_regcache): Handle static tracepoints.
14717 (do_action_at_tracepoint): Handle static tracepoint actions.
14718 (traceframe_find_block_type): Handle static trace data blocks.
14719 (traceframe_read_sdata): New.
14720 (download_tracepoints): Download static tracepoint actions.
14721 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
14722 (GDB_PROBE_NAME): New.
14723 (ust_ops): New.
14724 (GET_UST_SYM): New.
14725 (USTF): New.
14726 (dlsym_ust): New.
14727 (ust_marker_to_static_tracepoint): New.
14728 (gdb_probe): New.
14729 (collect_ust_data_at_tracepoint): New.
14730 (gdb_ust_probe): New.
14731 (UNIX_PATH_MAX, SOCK_DIR): New.
14732 (gdb_ust_connect_sync_socket): New.
14733 (resume_thread, stop_thread): New.
14734 (run_inferior_command): New.
14735 (init_named_socket): New.
14736 (gdb_ust_socket_init): New.
14737 (cstr_to_hexstr): New.
14738 (next_st): New.
14739 (first_marker, next_marker): New.
14740 (response_ust_marker): New.
14741 (cmd_qtfstm, cmd_qtsstm): New.
14742 (unprobe_marker_at, probe_marker_at): New.
14743 (cmd_qtstmat, gdb_ust_thread): New.
14744 (gdb_ust_init): New.
14745 (initialize_tracepoint_ftlib): Call gdb_ust_init.
14746 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
14747 (ST_REGENTRY): New.
14748 (x86_64_st_collect_regmap): New.
14749 (X86_64_NUM_ST_COLLECT_GREGS): New.
14750 (AMD64_RIP_REGNUM): New.
14751 (supply_static_tracepoint_registers): New.
14752 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
14753 (ST_REGENTRY): New.
14754 (i386_st_collect_regmap): New.
14755 (i386_NUM_ST_COLLECT_GREGS): New.
14756 (supply_static_tracepoint_registers): New.
14757 * server.c (handle_query): Handle qXfer:statictrace:read.
14758 <qSupported>: Report support for StaticTracepoints, and
14759 qXfer:statictrace:read features.
14760 * server.h (traceframe_read_sdata)
14761 (supply_static_tracepoint_registers): Declare.
14762 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
14763 (unpack_varlen_hex): Include in IPA build.
14764 * Makefile.in (ustlibs, ustinc): New.
14765 (IPA_OBJS): Add remote-utils-ipa.o.
14766 ($(IPA_LIB)): Link -ldl and -lpthread.
14767 (UST_CFLAGS): New.
14768 (IPAGENT_CFLAGS): Add UST_CFLAGS.
14769 * config.in, configure: Regenerate.
14770
14771 2010-06-20 Ian Lance Taylor <iant@google.com>
14772 Pedro Alves <pedro@codesourcery.com>
14773
14774 * linux-x86-low.c (always_true): Delete.
14775 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
14776 trying to fool the compiler with always_true.
14777
14778 2010-06-20 Pedro Alves <pedro@codesourcery.com>
14779
14780 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
14781 conditions in gdbserver.
14782
14783 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
14784
14785 * spu-low.c (spu_read_memory): Wrap around local store limit.
14786 (spu_write_memory): Likewise.
14787
14788 2010-06-15 Pedro Alves <pedro@codesourcery.com>
14789
14790 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
14791 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
14792 LONGEST uses.
14793 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
14794 uses.
14795 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
14796 uses with LONGEST uses.
14797
14798 2010-06-14 Stan Shebs <stan@codesourcery.com>
14799 Pedro Alves <pedro@codesourcery.com>
14800
14801 Bytecode compiler.
14802
14803 * linux-x86-low.c: Include limits.h.
14804 (add_insns): New.
14805 (always_true): New.
14806 (EMIT_ASM): New.
14807 (EMIT_ASM32): New.
14808 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
14809 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
14810 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
14811 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
14812 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
14813 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
14814 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
14815 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
14816 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
14817 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
14818 (amd64_emit_void_call_2): New.
14819 (amd64_emit_ops): New.
14820 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
14821 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
14822 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
14823 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
14824 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
14825 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
14826 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
14827 (i386_emit_call, i386_emit_reg, i386_emit_pop)
14828 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
14829 (i386_emit_stack_adjust, i386_emit_int_call_1)
14830 (i386_emit_void_call_2): New.
14831 (i386_emit_ops): New.
14832 (x86_emit_ops): New.
14833 (the_low_target): Install x86_emit_ops.
14834 * server.h (struct emit_ops): New.
14835 (get_raw_reg_func_addr): Declare.
14836 (current_insn_ptr, emit_error): Declare.
14837 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
14838 (set_trace_state_variable_value): New defines.
14839 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
14840 addr_get_trace_state_variable_value and
14841 addr_set_trace_state_variable_value.
14842 (symbol_list): New fields for get_raw_reg,
14843 get_trace_state_variable_value and set_trace_state_variable_value.
14844 (condfn): New typedef.
14845 (struct tracepoint): New field `compiled_cond'.
14846 (do_action_at_tracepoint): Clear compiled_cond.
14847 (get_trace_state_variable_value, set_trace_state_variable_value):
14848 Export in the IPA.
14849 (condition_true_at_tracepoint): If there's a compiled condition,
14850 run that.
14851 (current_insn_ptr, emit_error): New globals.
14852 (struct bytecode_address): New.
14853 (get_raw_reg_func_addr): New.
14854 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
14855 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
14856 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
14857 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
14858 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
14859 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
14860 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
14861 (compile_tracepoint_condition, compile_bytecodes): New.
14862 * target.h (emit_ops): Forward declare.
14863 (struct target_ops): New field emit_ops.
14864 (target_emit_ops): New.
14865 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
14866 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
14867 * linux-low.c (linux_emit_ops): New.
14868 (linux_target_ops): Install it.
14869 * linux-low.h (struct linux_target_ops): New field emit_ops.
14870
14871 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
14872
14873 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
14874 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
14875
14876 2010-06-01 Pedro Alves <pedro@codesourcery.com>
14877 Stan Shebs <stan@codesourcery.com>
14878
14879 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
14880 (all): Depend on $(extra_libraries).
14881 (install-only): Install the IPA.
14882 (IPA_OBJS, IPA_LIB): New.
14883 (clean): Remove the IPA lib.
14884 (IPAGENT_CFLAGS): New.
14885 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
14886 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
14887 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
14888 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
14889 * configure.ac: Check for atomic builtins support in the compiler.
14890 (IPA_DEPFILES, extra_libraries): Define.
14891 * configure.srv (ipa_obj): Add description.
14892 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
14893 (i[34567]86-*-linux*): Set ipa_obj.
14894 (x86_64-*-linux*): Set ipa_obj.
14895 * linux-low.c (stabilizing_threads): New.
14896 (supports_fast_tracepoints): New.
14897 (linux_detach): Stabilize threads before detaching.
14898 (handle_tracepoints): Handle internal tracing breakpoints. Assert
14899 the lwp is either not stabilizing, or is moving out of a jump pad.
14900 (linux_fast_tracepoint_collecting): New.
14901 (maybe_move_out_of_jump_pad): New.
14902 (enqueue_one_deferred_signal): New.
14903 (dequeue_one_deferred_signal): New.
14904 (linux_wait_for_event_1): If moving out of a jump pad, defer
14905 pending signals to later.
14906 (linux_stabilize_threads): New.
14907 (linux_wait_1): Check if threads need moving out of jump pads, and
14908 do it if so.
14909 (stuck_in_jump_pad_callback): New.
14910 (move_out_of_jump_pad_callback): New.
14911 (lwp_running): New.
14912 (linux_resume_one_lwp): Handle moving out of jump pads.
14913 (linux_set_resume_request): Dequeue deferred signals.
14914 (need_step_over_p): Also step over fast tracepoint jumps.
14915 (start_step_over): Also uninsert fast tracepoint jumps.
14916 (finish_step_over): Also reinsert fast tracepoint jumps.
14917 (linux_install_fast_tracepoint_jump): New.
14918 (linux_target_ops): Install linux_stabilize_threads and
14919 linux_install_fast_tracepoint_jump_pad.
14920 * linux-low.h (linux_target_ops) <get_thread_area,
14921 install_fast_tracepoint_jump_pad>: New fields.
14922 (struct lwp_info) <collecting_fast_tracepoint,
14923 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
14924 (linux_get_thread_area): Declare.
14925 * linux-x86-low.c (jump_insn): New.
14926 (x86_get_thread_area): New.
14927 (append_insns): New.
14928 (push_opcode): New.
14929 (amd64_install_fast_tracepoint_jump_pad): New.
14930 (i386_install_fast_tracepoint_jump_pad): New.
14931 (x86_install_fast_tracepoint_jump_pad): New.
14932 (the_low_target): Install x86_get_thread_area and
14933 x86_install_fast_tracepoint_jump_pad.
14934 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
14935 (struct fast_tracepoint_jump): New.
14936 (fast_tracepoint_jump_insn): New.
14937 (fast_tracepoint_jump_shadow): New.
14938 (find_fast_tracepoint_jump_at): New.
14939 (fast_tracepoint_jump_here): New.
14940 (delete_fast_tracepoint_jump): New.
14941 (set_fast_tracepoint_jump): New.
14942 (uninsert_fast_tracepoint_jumps_at): New.
14943 (reinsert_fast_tracepoint_jumps_at): New.
14944 (set_breakpoint_at): Use write_inferior_memory.
14945 (uninsert_raw_breakpoint): Use write_inferior_memory.
14946 (check_mem_read): Mask out fast tracepoint jumps.
14947 (check_mem_write): Mask out fast tracepoint jumps.
14948 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
14949 (set_fast_tracepoint_jump): Declare.
14950 (delete_fast_tracepoint_jump)
14951 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
14952 (reinsert_fast_tracepoint_jumps_at): Declare.
14953 * regcache.c: Don't compile many functions when building the
14954 in-process agent library.
14955 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
14956 the register buffer in the heap.
14957 (free_register_cache): If the register buffer isn't owned by the
14958 regcache, don't free it.
14959 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
14960 pre-existing register caches.
14961 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
14962 type.
14963 (convert_ascii_to_int): : Constify `from' parameter type.
14964 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
14965 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
14966 the needed buffer in-place.
14967 (relocate_instruction): New.
14968 * server.c (handle_query) <qSymbols>: If the target supports
14969 tracepoints, give it a chance of looking up symbols. Report
14970 support for fast tracepoints.
14971 (handle_status): Stabilize threads.
14972 (process_serial_event): Adjust.
14973 * server.h (struct fast_tracepoint_jump): Forward declare.
14974 (struct process_info) <fast_tracepoint_jumps>: New field.
14975 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
14976 (decode_X_packet, decode_M_packet): Adjust.
14977 (relocate_instruction): Declare.
14978 (in_process_agent_loaded): Declare.
14979 (tracepoint_look_up_symbols): Declare.
14980 (struct fast_tpoint_collect_status): Declare.
14981 (fast_tracepoint_collecting): Declare.
14982 (force_unlock_trace_buffer): Declare.
14983 (handle_tracepoint_bkpts): Declare.
14984 (initialize_low_tracepoint)
14985 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
14986 * target.h (struct target_ops) <stabilize_threads,
14987 install_fast_tracepoint_jump_pad>: New fields.
14988 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
14989 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
14990 [HAVE_STDINT_H]: Include stdint.h.
14991 (trace_debug_1): Rename to ...
14992 (trace_vdebug): ... this.
14993 (trace_debug): Rename to ...
14994 (trace_debug_1): ... this. Add `level' parameter.
14995 (trace_debug): New.
14996 (ATTR_USED, ATTR_NOINLINE): New.
14997 (IP_AGENT_EXPORT): New.
14998 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
14999 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
15000 (about_to_request_buffer_space, trace_buffer_is_full)
15001 (stopping_tracepoint, expr_eval_result, error_tracepoint)
15002 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
15003 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
15004 (traceframe_write_count, traceframes_created)
15005 (trace_state_variables)
15006 New renaming defines.
15007 (struct ipa_sym_addresses): New.
15008 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
15009 (symbol_list): New.
15010 (ipa_sym_addrs): New.
15011 (all_tracepoint_symbols_looked_up): New.
15012 (in_process_agent_loaded): New.
15013 (write_e_ipa_not_loaded): New.
15014 (maybe_write_ipa_not_loaded): New.
15015 (tracepoint_look_up_symbols): New.
15016 (debug_threads) [IN_PROCESS_AGENT]: New.
15017 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
15018 (UNKNOWN_SIDE_EFFECTS): New.
15019 (stop_tracing): New.
15020 (flush_trace_buffer): New.
15021 (stop_tracing_bkpt): New.
15022 (flush_trace_buffer_bkpt): New.
15023 (read_inferior_integer): New.
15024 (read_inferior_uinteger): New.
15025 (read_inferior_data_pointer): New.
15026 (write_inferior_data_pointer): New.
15027 (write_inferior_integer): New.
15028 (write_inferior_uinteger): New.
15029 (struct collect_static_trace_data_action): Delete.
15030 (enum tracepoint_type): New.
15031 (struct tracepoint) <type>: New field `type'.
15032 <actions_str, step_actions, step_actions_str>: Only include in
15033 GDBserver.
15034 <orig_size, obj_addr_on_target, adjusted_insn_addr>
15035 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
15036 (tracepoints): Use IP_AGENT_EXPORT.
15037 (last_tracepoint): Don't include in the IPA.
15038 (stopping_tracepoint): Use IP_AGENT_EXPORT.
15039 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
15040 (alloced_trace_state_variables): New.
15041 (trace_state_variables): Use IP_AGENT_EXPORT.
15042 (traceframe_t): Delete unused variable.
15043 (circular_trace_buffer): Don't include in the IPA.
15044 (trace_buffer_start): Delete.
15045 (struct trace_buffer_control): New.
15046 (trace_buffer_free): Delete.
15047 (struct ipa_trace_buffer_control): New.
15048 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
15049 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
15050 New.
15051 (trace_buffer_ctrl): New.
15052 (TRACE_BUFFER_CTRL_CURR): New.
15053 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
15054 Reimplement as macros.
15055 (trace_buffer_wrap): Delete.
15056 (traceframe_write_count, traceframe_read_count)
15057 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
15058 (struct tracepoint_hit_ctx) <type>: New field.
15059 (struct fast_tracepoint_ctx): New.
15060 (memory_barrier): New.
15061 (cmpxchg): New.
15062 (record_tracepoint_error): Update atomically in the IPA.
15063 (clear_inferior_trace_buffer): New.
15064 (about_to_request_buffer_space): New.
15065 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
15066 updating the same buffer.
15067 (add_tracepoint): Default the tracepoint's type to trap
15068 tracepoint, and orig_size to -1.
15069 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
15070 internal variables.
15071 (create_trace_state_variable): New parameter `gdb'. Handle it.
15072 (clear_installed_tracepoints): Clear fast tracepoint jumps.
15073 (cmd_qtdp): Handle fast tracepoints.
15074 (cmd_qtdv): Adjust.
15075 (max_jump_pad_size): New.
15076 (gdb_jump_pad_head): New.
15077 (get_jump_space_head): New.
15078 (claim_jump_space): New.
15079 (sort_tracepoints): New.
15080 (MAX_JUMP_SIZE): New.
15081 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
15082 IPA.
15083 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
15084 support. Upload fast traceframes, and delete internal IPA
15085 breakpoints.
15086 (stop_tracing_handler): New.
15087 (flush_trace_buffer_handler): New.
15088 (cmd_qtstop): Upload fast tracepoints.
15089 (response_tracepoint): Handle fast tracepoints.
15090 (tracepoint_finished_step): Upload fast traceframes. Set the
15091 tracepoint hit context's tracepoint type.
15092 (handle_tracepoint_bkpts): New.
15093 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
15094 type. Add comment about fast tracepoints.
15095 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
15096 non-existing action_str field.
15097 (get_context_regcache): Handle fast tracepoints.
15098 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
15099 to the regcache.
15100 (fast_tracepoint_from_jump_pad_address): New.
15101 (fast_tracepoint_from_ipa_tpoint_address): New.
15102 (collecting_t): New.
15103 (force_unlock_trace_buffer): New.
15104 (fast_tracepoint_collecting): New.
15105 (collecting): New.
15106 (gdb_collect): New.
15107 (write_inferior_data_ptr): New.
15108 (target_tp_heap): New.
15109 (target_malloc): New.
15110 (download_agent_expr): New.
15111 (UALIGN): New.
15112 (download_tracepoints): New.
15113 (download_trace_state_variables): New.
15114 (upload_fast_traceframes): New.
15115 (IPA_FIRST_TRACEFRAME): New.
15116 (IPA_NEXT_TRACEFRAME_1): New.
15117 (IPA_NEXT_TRACEFRAME): New.
15118 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
15119 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
15120 (gdb_jump_pad_buffer_end): New.
15121 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
15122 (initialize_tracepoint): Adjust.
15123 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
15124 buffer. Initialize the low module.
15125 * utils.c (PREFIX, TOOLNAME): New.
15126 (malloc_failure): Use PREFIX.
15127 (error): In the IPA, an error causes an exit.
15128 (fatal, warning): Use PREFIX.
15129 (internal_error): Use TOOLNAME.
15130 (NUMCELLS): Increase to 10.
15131 * configure, config.in: Regenerate.
15132
15133 2010-06-01 Pedro Alves <pedro@codesourcery.com>
15134
15135 * server.c (handle_query) <qSupported>: Do two passes over the
15136 qSupported string to avoid nesting strtok.
15137
15138 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
15139
15140 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
15141 (CDEPS): New.
15142 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
15143 -Wl,--dynamic-list.
15144 * configure: Regenerate.
15145 * proc-service.list: New.
15146
15147 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
15148
15149 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
15150 New comment.
15151
15152 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
15153
15154 * gdbreplay.c (remote_open): Check error return from socket() call by
15155 its equality to -1 not by it being negative.
15156 * remote-utils.c (remote_open): Likewise.
15157
15158 2010-05-23 Pedro Alves <pedro@codesourcery.com>
15159
15160 * config.h: Regenerate.
15161
15162 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
15163
15164 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
15165 doesn't provide PTRACE_GET_THREAD_AREA.
15166
15167 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
15168
15169 * linux-m68k-low.c: Include <asm/ptrace.h>
15170 (ps_get_thread_area): Implement.
15171
15172 2010-05-03 Doug Evans <dje@google.com>
15173
15174 * event-loop.c (struct callback_event): New struct.
15175 (callback_list): New global.
15176 (append_callback_event, delete_callback_event): New functions.
15177 (process_callback): New function.
15178 (start_event_loop): Call it.
15179 * remote-utils.c (NOT_SCHEDULED): Define.
15180 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
15181 moved out of readchar.
15182 (readchar): Rewrite. Call reschedule before returning.
15183 (reset_readchar): New function.
15184 (remote_close): Call it.
15185 (process_remaining, reschedule): New functions.
15186 * server.h (callback_handler_func): New typedef.
15187 (append_callback_event, delete_callback_event): Declare.
15188
15189 2010-05-03 Pedro Alves <pedro@codesourcery.com>
15190
15191 * proc-service.c (ps_pglobal_lookup): Use
15192 thread_db_look_up_one_symbol.
15193 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
15194 parameter. Use it instead of all_symbols_looked_up.
15195 * server.h (struct process_info) <all_symbols_looked_up>: Delete
15196 field.
15197 (all_symbols_looked_up): Don't declare.
15198 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
15199 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
15200 field.
15201 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
15202 Set all_symbols_looked_up here.
15203 (thread_db_look_up_one_symbol): New.
15204 (thread_db_get_tls_address): Adjust.
15205 (thread_db_load_search, try_thread_db_load_1): Always allocate the
15206 thread_db object on the heap, and tentatively set it in the
15207 process structure.
15208 (thread_db_init): Don't set all_symbols_looked_up here.
15209 * linux-low.h (thread_db_look_up_one_symbol): Declare.
15210
15211 2010-05-03 Pedro Alves <pedro@codesourcery.com>
15212
15213 * linux-low.c (linux_kill, linux_detach): Adjust.
15214 (status_pending_p_callback): Remove redundant statement. Check
15215 for !TARGET_WAITIKIND_IGNORE, instead of
15216 TARGET_WAITKIND_STOPPED.
15217 (handle_tracepoints): Make sure LWP is locked. Adjust.
15218 (linux_wait_for_event_1): Adjust.
15219 (linux_cancel_breakpoints): New.
15220 (unsuspend_one_lwp): New.
15221 (unsuspend_all_lwps): New.
15222 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
15223 (send_sigstop_callback): Change return type to int, add new
15224 `except' parameter and handle it.
15225 (suspend_and_send_sigstop_callback): New.
15226 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
15227 pass them down. If SUSPEND, also increment the lwp's suspend
15228 count.
15229 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
15230 (need_step_over_p): Don't consider suspended LWPs.
15231 (start_step_over): Adjust.
15232 (proceed_one_lwp): Change return type to int, add new `except'
15233 parameter and handle it.
15234 (unsuspend_and_proceed_one_lwp): New.
15235 (proceed_all_lwps): Use find_inferior instead of
15236 for_each_inferior.
15237 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
15238 also decrement the suspend count of LWPs. Pass `except' down,
15239 instead of hacking its suspend count.
15240 (linux_pause_all): Add `freeze' parameter. Adjust.
15241 (linux_unpause_all): New.
15242 (linux_target_ops): Install linux_unpause_all.
15243 * server.c (handle_status): Adjust.
15244 * target.h (struct target_ops): New fields `unpause_all' and
15245 `cancel_breakpoints'. Add new parameter to `pause_all'.
15246 (pause_all): Add new `freeze' parameter.
15247 (unpause_all): New.
15248 (cancel_breakpoints): New.
15249 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
15250 cancel breakpoints.
15251 (cmd_qtstart): Pause threads.
15252 (stop_tracing): Pause threads, and cancel breakpoints.
15253 * win32-low.c (win32_target_ops): Adjust.
15254
15255 2010-05-03 Pedro Alves <pedro@codesourcery.com>
15256
15257 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
15258 the inferior right away from here...
15259 (linux_wait_1): ... to here, and adjust to check the thread's
15260 last_resume_kind instead of the lwp's step or stop_expected flags.
15261
15262 2010-05-02 Pedro Alves <pedro@codesourcery.com>
15263
15264 * README: Use consistent `GDB' and `GDBserver' spellings.
15265
15266 2010-05-02 Pedro Alves <pedro@codesourcery.com>
15267
15268 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
15269 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
15270 (linux_detach_one_lwp): Assume the lwp is stopped.
15271 (any_thread_of): Delete.
15272 (linux_detach): Stop all lwps here. Don't blindly delete all
15273 breakpoints.
15274 (delete_lwp_callback): New.
15275 (linux_mourn): Delete all lwps of the process that is gone.
15276 (linux_wait_1): Don't delete the last lwp of the process here.
15277 * mem-break.h (mark_breakpoints_out): Declare.
15278 * mem-break.c (mark_breakpoints_out): New.
15279 (free_all_breakpoints): Use it.
15280 * server.c (handle_target_event): If the process is gone, mark
15281 breakpoints out.
15282 * thread-db.c (struct thread_db) <create_bp>: New field.
15283 (thread_db_enable_reporting): Fix prototype. Store a thread event
15284 breakpoint reference in the thread_db struct.
15285 (thread_db_load_search): Clear the thread_db object.
15286 (try_thread_db_load_1): Ditto.
15287 (switch_to_process): New.
15288 (disable_thread_event_reporting): Use it.
15289 (remove_thread_event_breakpoints): New.
15290 (thread_db_detach, thread_db_mourn): Use it.
15291
15292 2010-05-01 Pedro Alves <pedro@codesourcery.com>
15293
15294 * linux-low.c (linux_enable_event_reporting): New.
15295 (linux_wait_for_event_1, handle_extended_wait): Use it.
15296
15297 2010-04-30 Pedro Alves <pedro@codesourcery.com>
15298
15299 * linux-low.c (linux_kill_one_lwp, linux_kill)
15300 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
15301 (send_sigstop): Take an lwp_info as parameter instead. Queue a
15302 SIGSTOP even if the LWP is stopped.
15303 (send_sigstop_callback): New.
15304 (stop_all_lwps): Use send_sigstop_callback instead.
15305 (linux_resume_one_thread): Adjust.
15306 (proceed_one_lwp): Still proceed an LWP that the client has
15307 requested to stop, if we haven't reported it as stopped yet. Make
15308 sure that LWPs the client want stopped, have a pending SIGSTOP.
15309
15310 2010-04-26 Doug Evans <dje@google.com>
15311
15312 * server.c (handle_general_set): Make static.
15313
15314 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
15315 Print received char after testing for error/eof instead of before.
15316 (input_interrupt): Tweak comment.
15317
15318 2010-04-23 Doug Evans <dje@google.com>
15319
15320 * server.c (start_inferior): Print inferior argv if --debug.
15321
15322 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
15323
15324 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
15325 * nto-x86-low.c: Include server.h
15326
15327 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
15328
15329 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
15330 be consistent with other sources of this directory.
15331 (init_registers_amd64): Correct name of source file of this function
15332 in the comment.
15333
15334 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
15335
15336 * configure.srv (x86_64-*-mingw*): New configuration for Windows
15337 64-bit executables.
15338
15339 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
15340
15341 * win32-i386-low.c: Add 64-bit support.
15342 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
15343 (init_registers_amd64): Declare.
15344 (mappings): Add 64-bit version of array.
15345 (init_windows_x86): New function.
15346 (the_low_target): Change init_arch field to init_windows_x86.
15347
15348 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
15349
15350 * win32-low.c: Adapt to support also 64-bit architecture.
15351 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
15352 (get_image_name): Use SIZE_T type for local variable `done'.
15353 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
15354 (toolhelp_get_dll_name): Idem.
15355 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
15356 Use uintptr_t typecast to avoid warning.
15357 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
15358 (handle_exception): Use phex_nz to avoid warning.
15359 (win32_wait): Remove unused local variable `process'.
15360
15361 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
15362
15363 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
15364 `amd64-avx.o'.
15365
15366 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
15367
15368 * configure.ac: Use `ws2_32' library for srv_mingw.
15369 * configure: Regenerate.
15370 * gdbreplay.c: Include winsock2.h instead of winsock.h.
15371 * remote-utils.c: Likewise.
15372
15373 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
15374
15375 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
15376 if __x86_64__ is defined.
15377
15378 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
15379
15380 * configure: Regenerate.
15381
15382 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
15383
15384 * server.c (handle_query): Handle 'qGetTIBAddr' query.
15385 * target.h (target_ops): New get_tib_address field.
15386 * win32-low.h (win32_thread_info): Add thread_local_base field.
15387 * win32-low.c (child_add_thread): Add tlb argument.
15388 Set thread_local_base field to TLB.
15389 (get_child_debug_event): Adapt to child_add_thread change.
15390 (win32_get_tib_address): New function.
15391 (win32_target_ops): Set get_tib_address field to
15392 win32_get_tib_address.
15393 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
15394
15395 2010-04-12 Pedro Alves <pedro@codesourcery.com>
15396
15397 * linux-low.c (linux_mourn): Also remove the process.
15398 * server.c (handle_target_event): Don't remove the process here.
15399 * nto-low.c (nto_mourn): New.
15400 (nto_target_ops): Install it.
15401 * spu-low.c (spu_mourn): New.
15402 (spu_target_ops): Install it.
15403 * win32-low.c (win32_mourn): New.
15404 (win32_target_ops): Install it.
15405
15406 2010-04-12 Pedro Alves <pedro@codesourcery.com>
15407
15408 * server.h (buffer_xml_printf): Remove redundant `;'.
15409
15410 2010-04-12 Pedro Alves <pedro@codesourcery.com>
15411
15412 * regcache.c (set_register_cache): Invalidate regcaches before
15413 changing the register cache layout.
15414 (regcache_invalidate_one): Allow a NULL regcache.
15415 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
15416 regcaches before changing the register cache layout or the target
15417 regsets.
15418
15419 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
15420
15421 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
15422 variable warning on Linux/x86-64.
15423
15424 2010-04-11 Pedro Alves <pedro@codesourcery.com>
15425
15426 GDBserver disconnected tracing support.
15427
15428 * linux-low.c (linux_remove_process): Delete.
15429 (add_lwp): Don't set last_resume_kind here.
15430 (linux_kill): Use `mourn'.
15431 (linux_detach): Use `thread_db_detach', and `mourn'.
15432 (linux_mourn): New.
15433 (linux_attach_lwp_1): Adjust comment.
15434 (linux_attach): last_resume_kind moved the thread_info; adjust.
15435 (status_pending_p_callback): Adjust.
15436 (linux_wait_for_event_1): Adjust.
15437 (count_events_callback, select_singlestep_lwp_callback)
15438 (select_event_lwp_callback, cancel_breakpoints_callback)
15439 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
15440 (proceed_one_lwp): Adjust.
15441 (linux_async): Add debug output.
15442 (linux_thread_stopped): New.
15443 (linux_pause_all): New.
15444 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
15445 linux_pause_all.
15446 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
15447 (thread_db_free): Delete declaration.
15448 (thread_db_detach, thread_db_mourn): Declare.
15449 * thread-db.c (thread_db_init): Use thread_db_mourn.
15450 (thread_db_free): Delete, split in two.
15451 (disable_thread_event_reporting): New.
15452 (thread_db_detach): New.
15453 (thread_db_mourn): New.
15454
15455 * server.h (struct thread_info) <last_resume_kind>: New field.
15456 <attached>: Add comment.
15457 <gdb_detached>: New field.
15458 (handler_func): Change return type to int.
15459 (handle_serial_event, handle_target_event): Ditto.
15460 (gdb_connected): Declare.
15461 (tracing): Delete.
15462 (disconnected_tracing): Declare.
15463 (stop_tracing): Declare.
15464
15465 * server.c (handle_query) <qSupported>: Report support for
15466 disconnected tracing.
15467 (queue_stop_reply_callback): Account for running threads.
15468 (gdb_wants_thread_stopped): New.
15469 (gdb_wants_all_threads_stopped): New.
15470 (gdb_reattached_process): New.
15471 (handle_status): Clear the `gdb_detached' flag of all processes.
15472 In all-stop, stop all threads.
15473 (main): Be sure to leave tfind mode. Handle disconnected tracing.
15474 (process_serial_event): If the remote connection breaks, or if an
15475 exit was forced with "monitor exit", force an event loop exit.
15476 Handle disconnected tracing on detach.
15477 (handle_serial_event): Adjust.
15478 (handle_target_event): If GDB isn't connected, forward events back
15479 to the inferior, unless the last process exited, in which case,
15480 exit gdbserver. Adjust interface.
15481
15482 * remote-utils.c (remote_open): Don't block in accept. Instead
15483 register an event loop source on the listen socket file
15484 descriptor. Refactor bits into ...
15485 (listen_desc): ... this new global.
15486 (gdb_connected): ... this new function.
15487 (enable_async_notification): ... this new function.
15488 (handle_accept_event): ... this new function.
15489 (remote_close): Clear remote_desc.
15490
15491 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
15492
15493 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
15494 New fields.
15495 (mourn_inferior): Define.
15496 (target_process_qsupported): Avoid the dangling else problem.
15497 (thread_stopped): Define.
15498 (pause_all): Define.
15499 (target_waitstatus_to_string): Declare.
15500 * target.c (target_waitstatus_to_string): New.
15501
15502 * tracepoint.c (tracing): Make extern.
15503 (disconnected_tracing): New.
15504 (stop_tracing): Make extern. Handle tracing stops due to GDB
15505 disconnecting.
15506 (cmd_qtdisconnected): New.
15507 (cmd_qtstatus): Report disconnected tracing status in trace reply.
15508 (handle_tracepoint_general_set): Handle QTDisconnected.
15509
15510 * event-loop.c (event_handler_func): Change return type to int.
15511 (process_event): Bail out if the event handler wants the event
15512 loop to stop.
15513 (handle_file_event): Ditto.
15514 (start_event_loop): Bail out if the event handler wants the event
15515 loop to stop.
15516
15517 * nto-low.c (nto_target_ops): Adjust.
15518 * spu-low.c (spu_wait): Don't remove the process here.
15519 (spu_target_ops): Adjust.
15520 * win32-low.c (win32_wait): Don't remove the process here.
15521 (win32_target_ops): Adjust.
15522
15523 2010-04-11 Pedro Alves <pedro@codesourcery.com>
15524
15525 * regcache.c (realloc_register_cache): Invalidate inferior's
15526 regcache before recreating it.
15527
15528 2010-04-09 Pedro Alves <pedro@codesourcery.com>
15529
15530 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
15531
15532 2010-04-09 Stan Shebs <stan@codesourcery.com>
15533 Pedro Alves <pedro@codesourcery.com>
15534
15535 * server.h (LONGEST): New.
15536 (struct thread_info) <while_stepping>: New field.
15537 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
15538 Declare.
15539 (initialize_tracepoint, handle_tracepoint_general_set)
15540 (handle_tracepoint_query, tracepoint_finished_step)
15541 (tracepoint_was_hit, release_while_stepping_state_list):
15542 (current_traceframe): Declare.
15543 * server.c (handle_general_set): Handle tracepoint packets.
15544 (read_memory): New.
15545 (write_memory): New.
15546 (handle_search_memory_1): Use read_memory.
15547 (handle_query): Report support for conditional tracepoints, trace
15548 state variables, and tracepoint sources. Handle tracepoint
15549 queries.
15550 (main): Initialize the tracepoints module.
15551 (process_serial_event): Handle traceframe reads/writes.
15552
15553 * linux-low.c (handle_tracepoints): New.
15554 (linux_wait_1): Call it.
15555 (linux_resume_one_lwp): Handle while-stepping.
15556 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
15557 (linux_target_ops): Install them.
15558 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
15559 New field.
15560 * linux-x86-low.c (x86_supports_tracepoints): New.
15561 (the_low_target). Install it.
15562
15563 * mem-break.h (delete_breakpoint): Declare.
15564 * mem-break.c (delete_breakpoint): Make external.
15565
15566 * target.h (struct target_ops): Add `supports_tracepoints',
15567 `read_pc', and `write_pc' fields.
15568 (target_supports_tracepoints): Define.
15569 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
15570 (phex_nz): New.
15571
15572 * regcache.h (struct regcache) <registers_owned>: New field.
15573 (init_register_cache, regcache_cpy): Declare.
15574 (regcache_read_pc, regcache_write_pc): Declare.
15575 (register_cache_size): Declare.
15576 (supply_regblock): Declare.
15577 * regcache.c (init_register_cache): New.
15578 (new_register_cache): Use it.
15579 (regcache_cpy): New.
15580 (register_cache_size): New.
15581 (supply_regblock): New.
15582 (regcache_read_pc, regcache_write_pc): New.
15583
15584 * tracepoint.c: New.
15585
15586 * Makefile.in (OBS): Add tracepoint.o.
15587 (tracepoint.o): New rule.
15588
15589 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
15590
15591 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
15592 (i386-mmx.o): New.
15593 (i386-mmx.c): Likewise.
15594 (i386-mmx-linux.o): Likewise.
15595 (i386-mmx-linux.c): Likewise.
15596
15597 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
15598 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
15599 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
15600 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
15601
15602 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
15603 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
15604 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
15605
15606 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
15607
15608 * Makefile.in (clean): Updated.
15609 (i386-avx.o): New.
15610 (i386-avx.c): Likewise.
15611 (i386-avx-linux.o): Likewise.
15612 (i386-avx-linux.c): Likewise.
15613 (amd64-avx.o): Likewise.
15614 (amd64-avx.c): Likewise.
15615 (amd64-avx-linux.o): Likewise.
15616 (amd64-avx-linux.c): Likewise.
15617
15618 * configure.srv (srv_i386_regobj): Add i386-avx.o.
15619 (srv_i386_linux_regobj): Add i386-avx-linux.o.
15620 (srv_amd64_regobj): Add amd64-avx.o.
15621 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
15622 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
15623 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
15624 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
15625 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
15626 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
15627 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
15628
15629 * i387-fp.c: Include "i386-xstate.h".
15630 (i387_xsave): New.
15631 (i387_cache_to_xsave): Likewise.
15632 (i387_xsave_to_cache): Likewise.
15633 (x86_xcr0): Likewise.
15634
15635 * i387-fp.h (i387_cache_to_xsave): Likewise.
15636 (i387_xsave_to_cache): Likewise.
15637 (x86_xcr0): Likewise.
15638
15639 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
15640 * linux-crisv32-low.c (target_regsets): Likewise.
15641 * linux-m68k-low.c (target_regsets): Likewise.
15642 * linux-mips-low.c (target_regsets): Likewise.
15643 * linux-ppc-low.c (target_regsets): Likewise.
15644 * linux-s390-low.c (target_regsets): Likewise.
15645 * linux-sh-low.c (target_regsets): Likewise.
15646 * linux-sparc-low.c (target_regsets): Likewise.
15647 * linux-xtensa-low.c (target_regsets): Likewise.
15648
15649 * linux-low.c: Include <sys/uio.h>.
15650 (regsets_fetch_inferior_registers): Support nt_type.
15651 (regsets_store_inferior_registers): Likewise.
15652 (linux_process_qsupported): New.
15653 (linux_target_ops): Add linux_process_qsupported.
15654
15655 * linux-low.h (regset_info): Add nt_type.
15656 (linux_target_ops): Add process_qsupported.
15657
15658 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
15659 and <sys/uio.h>.
15660 (init_registers_i386_avx_linux): New.
15661 (init_registers_amd64_avx_linux): Likewise.
15662 (xmltarget_i386_linux_no_xml): Likewise.
15663 (xmltarget_amd64_linux_no_xml): Likewise.
15664 (PTRACE_GETREGSET): Likewise.
15665 (PTRACE_SETREGSET): Likewise.
15666 (x86_fill_xstateregset): Likewise.
15667 (x86_store_xstateregset): Likewise.
15668 (use_xml): Likewise.
15669 (x86_linux_update_xmltarget): Likewise.
15670 (x86_linux_process_qsupported): Likewise.
15671 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
15672 (x86_arch_setup): Don't call init_registers_amd64_linux nor
15673 init_registers_i386_linux here. Call
15674 x86_linux_update_xmltarget.
15675 (the_low_target): Add x86_linux_process_qsupported.
15676
15677 * server.c (handle_query): Call target_process_qsupported.
15678
15679 * target.h (target_ops): Add process_qsupported.
15680 (target_process_qsupported): New.
15681
15682 2010-04-03 Pedro Alves <pedro@codesourcery.com>
15683
15684 * inferiors.c (add_thread): Set last_status kind to
15685 TARGET_WAITKIND_IGNORE.
15686 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
15687 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
15688 (linux_wait_1): Move `thread' local definition to block that uses
15689 it. Don't NULL initialize `event_child'.
15690 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
15691 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
15692 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
15693
15694 2010-04-01 Pedro Alves <pedro@codesourcery.com>
15695
15696 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
15697 an extended waitstatus, or by a watchpoint.
15698 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
15699 thread was stepping or has been stopped by a watchpoint.
15700
15701 2010-04-01 Pedro Alves <pedro@codesourcery.com>
15702
15703 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
15704 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
15705 of another, then delete the previous, and validate all
15706 breakpoints.
15707 (validate_inserted_breakpoint): New.
15708 (delete_disabled_breakpoints): New.
15709 (validate_breakpoints): New.
15710 (check_mem_read): Validate breakpoints before trusting their
15711 shadow. Delete disabled breakpoints.
15712 (check_mem_write): Validate breakpoints before trusting they
15713 should be inserted. Delete disabled breakpoints.
15714 * mem-break.h (validate_breakpoints):
15715 * server.c (handle_query): Validate breakpoints when we see a
15716 qSymbol query.
15717
15718 2010-04-01 Pedro Alves <pedro@codesourcery.com>
15719
15720 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
15721 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
15722 if we could tell there's a GDB breakpoint at stop_pc.
15723 (need_step_over_p): Don't do a step over if we find a GDB
15724 breakpoint at the resume PC.
15725
15726 * mem-break.c (struct raw_breakpoint): New.
15727 (enum bkpt_type): New type `gdb_breakpoint'.
15728 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
15729 fields. New field `raw'.
15730 (find_raw_breakpoint_at): New.
15731 (set_raw_breakpoint_at): Handle refcounting. Create a raw
15732 breakpoint instead.
15733 (set_breakpoint_at): Adjust.
15734 (delete_raw_breakpoint): New.
15735 (release_breakpoint): New.
15736 (delete_breakpoint): Rename to...
15737 (delete_breakpoint_1): ... this. Add proc parameter. Use
15738 release_breakpoint. Return ENOENT.
15739 (delete_breakpoint): Reimplement.
15740 (find_breakpoint_at): Delete.
15741 (find_gdb_breakpoint_at): New.
15742 (delete_breakpoint_at): Delete.
15743 (set_gdb_breakpoint_at): New.
15744 (delete_gdb_breakpoint_at): New.
15745 (gdb_breakpoint_here): New.
15746 (set_reinsert_breakpoint): Use release_breakpoint.
15747 (uninsert_breakpoint): Rename to ...
15748 (uninsert_raw_breakpoint): ... this.
15749 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
15750 (reinsert_raw_breakpoint): Change parameter type to
15751 raw_breakpoint.
15752 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
15753 instead.
15754 (check_breakpoints): Adjust. Use release_breakpoint.
15755 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
15756 (breakpoint_inserted_here): Ditto.
15757 (check_mem_read): Adjust to iterate over raw breakpoints instead.
15758 Don't trust the breakpoint's shadow if it is not inserted.
15759 (check_mem_write): Adjust to iterate over raw breakpoints instead.
15760 (delete_all_breakpoints): Adjust.
15761 (free_all_breakpoints): Mark all breakpoints as uninserted, and
15762 use delete_breakpoint_1.
15763
15764 * mem-break.h (breakpoints_supported): Delete declaration.
15765 (set_gdb_breakpoint_at): Declare.
15766 (gdb_breakpoint_here): Declare.
15767 (delete_breakpoint_at): Delete.
15768 (delete_gdb_breakpoint_at): Declare.
15769
15770 * server.h (struct raw_breakpoint): Forward declare.
15771 (struct process_info): New field `raw_breakpoints'.
15772
15773 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
15774 breakpoints.
15775
15776 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15777
15778 * linux-low.c (status_pending_p_callback): Fix comment.
15779 (linux_wait_for_event_1): Move most of the internal breakpoint
15780 handling from here...
15781 (linux_wait_1): ... to here.
15782 (count_events_callback): New.
15783 (select_singlestep_lwp_callback): New.
15784 (select_event_lwp_callback): New.
15785 (cancel_breakpoints_callback): New.
15786 (select_event_lwp): New.
15787 (linux_wait_1): Simplify internal breakpoint handling. Give equal
15788 priority to all LWPs that have had events that should be reported
15789 to the client. Cancel breakpoints when about to reporting the
15790 event to the client, not while stopping lwps. No longer cancel
15791 finished single-steps here.
15792 (cancel_finished_single_step): Delete.
15793 (cancel_finished_single_steps): Delete.
15794
15795 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15796
15797 * mem-break.c (enum bkpt_type): New.
15798 (struct breakpoint): New field `type'.
15799 (set_breakpoint_at): Change return type to struct breakpoint
15800 pointer. Set type to `other_breakpoint' by default.
15801 (delete_breakpoint): Rewrite, supporting more than one breakpoint
15802 in the breakpoint list.
15803 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
15804 (reinsert_breakpoint): Rename to ...
15805 (reinsert_raw_breakpoint): ... this.
15806 (reinsert_breakpoints_at): Adjust.
15807 * mem-break.h (struct breakpoint): Declare.
15808 (set_breakpoint_at): Change return type to struct breakpoint
15809 pointer.
15810
15811 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15812
15813 * server.c (handle_query): Assign, not compare.
15814
15815 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15816
15817 Teach linux gdbserver to step-over-breakpoints.
15818
15819 * linux-low.c (can_hardware_single_step): New.
15820 (supports_breakpoints): New.
15821 (handle_extended_wait): If stopping threads, read the stop pc of
15822 the new cloned LWP.
15823 (get_pc): New.
15824 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
15825 low target doesn't support retrieving the PC.
15826 (add_lwp): Set last_resume_kind to resume_continue.
15827 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
15828 (linux_attach): Don't clear stop_expected. Set the lwp's
15829 last_resume_kind to resume_stop.
15830 (linux_detach_one_lwp): Don't check for removed breakpoints.
15831 (check_removed_breakpoint): Delete.
15832 (status_pending_p): Rename to ...
15833 (status_pending_p_callback): ... this. Don't check for removed
15834 breakpoints. Don't consider threads that are stopped from GDB's
15835 perspective.
15836 (linux_wait_for_lwp): Always read the stop_pc here.
15837 (cancel_breakpoint): New.
15838 (step_over_bkpt): New global.
15839 (linux_wait_for_event_1): Implement stepping over breakpoints.
15840 (gdb_wants_lwp_stopped): New.
15841 (gdb_wants_all_stopped): New.
15842 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
15843 single-step traps here. Store the thread's last reported target
15844 wait status.
15845 (send_sigstop): Don't clear stop_expected. Always set it,
15846 instead.
15847 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
15848 (cancel_finished_single_step): New.
15849 (cancel_finished_single_steps): New.
15850 (wait_for_sigstop): Don't cancel finished single-step traps here.
15851 (linux_resume_one_lwp): Don't check for removed breakpoints.
15852 Don't set `step' on non-hardware step archs.
15853 (linux_set_resume_request): Ignore resume_stop requests if already
15854 stopping or stopped. Set the lwp's last_resume_kind.
15855 (resume_status_pending_p): Don't check for removed breakpoints.
15856 (need_step_over_p): New.
15857 (start_step_over): New.
15858 (finish_step_over): New.
15859 (linux_resume_one_thread): Always queue a sigstop for resume_stop
15860 requests. Clear the thread's last reported target waitstatus.
15861 Don't use the `suspended' flag. Don't consider pending breakpoints.
15862 (linux_resume): Start a step-over if necessary.
15863 (proceed_one_lwp): New.
15864 (proceed_all_lwps): New.
15865 (unstop_all_lwps): New.
15866 * linux-low.h (struct lwp_info): Rewrite comment for the
15867 `suspended' flag. Add the `stop_pc' field. Delete the
15868 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
15869 Add `'last_resume_kind' and `need_step_over' fields.
15870 * inferiors.c (struct thread_info): Delete, moved elsewhere.
15871 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
15872 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
15873 (set_raw_breakpoint_at): New.
15874 (set_breakpoint_at): Rewrite to use it.
15875 (reinsert_breakpoint_handler): Delete.
15876 (set_reinsert_breakpoint): New.
15877 (reinsert_breakpoint_by_bp): Delete.
15878 (delete_reinsert_breakpoints): New.
15879 (uninsert_breakpoint): Rewrite.
15880 (uninsert_breakpoints_at): New.
15881 (reinsert_breakpoint): Rewrite.
15882 (reinsert_breakpoints_at): New.
15883 (check_breakpoints): Rewrite.
15884 (breakpoint_here): New.
15885 (breakpoint_inserted_here): New.
15886 (check_mem_read): Adjust.
15887 * mem-break.h (breakpoints_supported, breakpoint_here)
15888 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
15889 (reinsert_breakpoint_by_bp): Delete declaration.
15890 (delete_reinsert_breakpoints): Declare.
15891 (reinsert_breakpoint): Delete declaration.
15892 (reinsert_breakpoints_at): Declare.
15893 (uninsert_breakpoint): Delete declaration.
15894 (uninsert_breakpoints_at): Declare.
15895 (check_breakpoints): Adjust prototype.
15896 * server.h: Adjust include order.
15897 (struct thread_info): Declare here. Add a `last_status' field.
15898
15899 2010-03-23 Michael Snyder <msnyder@vmware.com>
15900
15901 * server.c (crc32): New function.
15902 (handle_query): Add handling for 'qCRC:' request.
15903
15904 2010-03-23 Pedro Alves <pedro@codesourcery.com>
15905
15906 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
15907 lwp had been stopped by a watchpoint.
15908
15909 2010-03-16 Pedro Alves <pedro@codesourcery.com>
15910
15911 * server.h (internal_error): Declare.
15912 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
15913 * utils.c (internal_error): New function.
15914
15915 2010-03-15 Andreas Schwab <schwab@redhat.com>
15916
15917 * configure.srv: Fix typo setting srv_regobj.
15918
15919 2010-03-15 Pedro Alves <pedro@codesourcery.com>
15920
15921 * linux-low.c (fetch_register): Avoid passing a non string literal
15922 format to `error'.
15923 (usr_store_inferior_registers): Ditto.
15924
15925 2010-03-14 Pedro Alves <pedro@codesourcery.com>
15926
15927 * linux-low.c (linux_write_memory): Bail out early if peeking
15928 memory failed.
15929
15930 2010-03-14 Pedro Alves <pedro@codesourcery.com>
15931
15932 * linux-low.h (struct lwp_info): New fields
15933 `stopped_by_watchpoint' and `stopped_data_address'.
15934 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
15935 here, and cache them in the lwp object.
15936 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
15937 directly.
15938 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
15939 field.
15940 (linux_stopped_by_watchpoint): Rewrite.
15941 (linux_stopped_data_address): Rewrite.
15942
15943 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
15944
15945 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
15946 switching the current inferior, not before.
15947
15948 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
15949
15950 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
15951 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
15952 i386-linux.c and amd64-linux.c.
15953 (reg-i386.o): Removed.
15954 (reg-i386.c): Likewise.
15955 (reg-i386-linux.o): Likewise.
15956 (reg-i386-linux.c): Likewise.
15957 (reg-x86-64.o): Likewise.
15958 (reg-x86-64.c): Likewise.
15959 (reg-x86-64-linux.o): Likewise.
15960 (reg-x86-64-linux.c): Likewise.
15961 (i386.o): New.
15962 (i386.c): Likewise.
15963 (i386-linux.o): Likewise.
15964 (i386-linux.c): Likewise.
15965 (amd64.o): Likewise.
15966 (amd64.c): Likewise.
15967 (amd64-linux.o): Likewise.
15968 (amd64-linux.c): Likewise.
15969
15970 * configure.srv (srv_i386_regobj): New.
15971 (srv_i386_linux_regobj): Likewise.
15972 (srv_amd64_regobj): Likewise.
15973 (srv_amd64_linux_regobj): Likewise.
15974 (srv_i386_32bit_xmlfiles): Likewise.
15975 (srv_i386_64bit_xmlfiles): Likewise.
15976 (srv_i386_xmlfiles): Likewise.
15977 (srv_amd64_xmlfiles): Likewise.
15978 (srv_i386_linux_xmlfiles): Likewise.
15979 (srv_amd64_linux_xmlfiles): Likewise.
15980 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
15981 srv_xmlfiles to $srv_i386_xmlfiles.
15982 (i[34567]86-*-mingw32ce*): Likewise.
15983 (i[34567]86-*-mingw*): Likewise.
15984 (i[34567]86-*-nto*): Likewise.
15985 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
15986 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
15987 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
15988 (x86_64-*-linux*): Likewise.
15989
15990 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
15991 (init_registers_amd64_linux): New.
15992 (x86_arch_setup): Replace init_registers_x86_64_linux with
15993 init_registers_amd64_linux.
15994
15995 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
15996
15997 * configure.ac: Check for libdl. If it is not available link against
15998 static libthread_db.
15999 * configure: Regenerate.
16000
16001 2010-02-22 Pedro Alves <pedro@codesourcery.com>
16002
16003 PR9605
16004
16005 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
16006 handing a read watchpoint.
16007 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
16008
16009 2010-02-12 Doug Evans <dje@google.com>
16010
16011 * linux-low.c (linux_supports_tracefork_flag): Document.
16012 (linux_look_up_symbols): Add comment.
16013
16014 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
16015
16016 * regcache.c (supply_register): Clear regcache if buf is NULL.
16017
16018 2010-02-02 Nicolas Roche <roche@sourceware.org>
16019 Joel Brobecker <brobecker@adacore.com>
16020
16021 * inferiors.c (find_inferior): Add function documentation.
16022 (unloaded_dll): Handle the case where the unloaded dll has not
16023 been previously registered in the dll list.
16024
16025 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16026
16027 * linux-arm-low.c (thumb_breakpoint_len): Delete.
16028 (thumb2_breakpoint): New.
16029 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
16030
16031 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16032
16033 * linux-low.c (get_stop_pc): Check for SIGTRAP.
16034 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
16035 breakpoints.
16036
16037 2010-01-21 Pedro Alves <pedro@codesourcery.com>
16038
16039 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
16040
16041 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
16042
16043 * linux-s390-low.c (s390_collect_ptrace_register)
16044 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
16045
16046 2010-01-21 Doug Evans <dje@google.com>
16047
16048 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
16049 (PTRACE_ARG4_TYPE): New macro.
16050 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
16051 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
16052 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
16053 (usr_store_inferior_registers): Ditto.
16054 (linux_read_memory, linux_write_memory): Ditto.
16055 (linux_test_for_tracefork): Ditto.
16056
16057 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
16058 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
16059
16060 2010-01-21 Pedro Alves <pedro@codesourcery.com>
16061
16062 * proc-service.c (ps_lgetregs): Don't refetch registers from the
16063 target.
16064
16065 2010-01-21 Pedro Alves <pedro@codesourcery.com>
16066
16067 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
16068 prototype to take a regcache. Adjust.
16069
16070 2010-01-20 Pedro Alves <pedro@codesourcery.com>
16071
16072 * regcache.h (struct thread_info): Forward declare.
16073 (struct regcache): New.
16074 (new_register_cache): Adjust prototype.
16075 (get_thread_regcache): Declare.
16076 (free_register_cache): Adjust prototype.
16077 (registers_to_string, registers_from_string): Ditto.
16078 (supply_register, supply_register_by_name, collect_register)
16079 (collect_register_as_string, collect_register_by_name): Ditto.
16080 * regcache.c (struct inferior_regcache_data): Delete.
16081 (get_regcache): Rename to ...
16082 (get_thread_regcache): ... this. Adjust. Switch inferior before
16083 fetching registers.
16084 (regcache_invalidate_one): Adjust.
16085 (regcache_invalidate): Fix prototype.
16086 (new_register_cache): Return the new register cache.
16087 (free_register_cache): Change prototype.
16088 (realloc_register_cache): Adjust.
16089 (registers_to_string): Change prototype to take a regcache. Adjust.
16090 (registers_from_string): Ditto.
16091 (register_data): Ditto.
16092 (supply_register): Ditto.
16093 (supply_register_by_name): Ditto.
16094 (collect_register): Ditto.
16095 (collect_register_as_string): Ditto.
16096 (collect_register_by_name): Ditto.
16097 * server.c (process_serial_event): Adjust.
16098 * linux-low.h (regset_fill_func, regset_store_func): Change
16099 prototype.
16100 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
16101 Change prototype.
16102 * linux-low.c (get_stop_pc): Adjust.
16103 (check_removed_breakpoint): Adjust.
16104 (linux_wait_for_event): Adjust.
16105 (linux_resume_one_lwp): Adjust.
16106 (fetch_register): Add regcache parameter. Adjust.
16107 (usr_store_inferior_registers): Ditto.
16108 (regsets_fetch_inferior_registers): Ditto.
16109 (regsets_store_inferior_registers): Ditto.
16110 (linux_fetch_registers, linux_store_registers): Ditto.
16111 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
16112 regcache. Adjust.
16113 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
16114 Ditto.
16115 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
16116 prototype to take a regcache.
16117 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
16118 * remote-utils.c (convert_ascii_to_int, outreg)
16119 (prepare_resume_reply): Change prototype to take a regcache.
16120 Adjust.
16121 * target.h (struct target_ops) <fetch_registers, store_registers>:
16122 Change prototype to take a regcache.
16123 (fetch_inferior_registers, store_inferior_registers): Change
16124 prototype to take a regcache. Adjust.
16125 * proc-service.c (ps_lgetregs): Adjust.
16126 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
16127 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
16128 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
16129 take a regcache. Adjust.
16130 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
16131 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
16132 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
16133 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
16134 * linux-cris-low.c (cris_get_pc, cris_set_pc)
16135 (cris_cannot_fetch_register):
16136 (cris_breakpoint_at): Change prototype to take a regcache.
16137 Adjust.
16138 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
16139 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
16140 to take a regcache. Adjust.
16141 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
16142 Adjust.
16143 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
16144 take a regcache. Adjust.
16145 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
16146 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
16147 (m68k_set_pc): Change prototype to take a regcache. Adjust.
16148 * linux-mips-low.c (mips_get_pc):
16149 (mips_set_pc): Change prototype to take a regcache. Adjust.
16150 (mips_reinsert_addr): Adjust.
16151 (mips_collect_register): Change prototype to take a regcache.
16152 Adjust.
16153 (mips_supply_register):
16154 (mips_collect_register_32bit, mips_supply_register_32bit)
16155 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16156 (mips_store_fpregset): Ditto.
16157 * linux-ppc-low.c (ppc_supply_ptrace_register)
16158 (ppc_supply_ptrace_register): Ditto.
16159 (parse_spufs_run): Adjust.
16160 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
16161 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
16162 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
16163 take a regcache. Adjust.
16164 * linux-s390-low.c (s390_collect_ptrace_register)
16165 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
16166 (s390_set_pc): Change prototype to take a regcache. Adjust.
16167 (s390_arch_setup): Adjust.
16168 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
16169 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
16170 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
16171 (sparc_fill_gregset, sparc_store_gregset_from_stack)
16172 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
16173 regcache. Adjust.
16174 (sparc_breakpoint_at): Adjust.
16175 * linux-xtensa-low.c (xtensa_fill_gregset):
16176 (xtensa_store_gregset):
16177 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
16178 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
16179 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
16180 prototype to take a regcache. Adjust.
16181 * win32-arm-low.c (arm_fetch_inferior_register)
16182 (arm_store_inferior_register): Change prototype to take a
16183 regcache. Adjust.
16184 * win32-i386-low.c (i386_fetch_inferior_register)
16185 (i386_store_inferior_register): Change prototype to take a
16186 regcache. Adjust.
16187 * win32-low.c (child_fetch_inferior_registers)
16188 (child_store_inferior_registers): Change prototype to take a
16189 regcache. Adjust.
16190 (win32_wait): Adjust.
16191 (win32_fetch_inferior_registers): Change prototype to take a
16192 regcache. Adjust.
16193 (win32_store_inferior_registers): Adjust.
16194 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
16195 store_inferior_register>: Change prototype to take a regcache.
16196
16197 2010-01-20 Doug Evans <dje@google.com>
16198
16199 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
16200 #ifdef.
16201 (linux_wait_for_event1, linux_init_signals): Ditto.
16202 (W_STOPCODE): Provide definition if missing.
16203
16204 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
16205
16206 * linux-low.c (linux_core_of_thread): New.
16207 (compare_ints, show_process, list_threads): New.
16208 (linux_qxfer_osdata): Report threads and cores.
16209 (linux_target_op): Register linux_core_of_thread.
16210 * remote-utils.c (prepare_resume_reply): Report the core.
16211 (buffer_xml_printf): Support %d specifier.
16212 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
16213 New.
16214 (handle_query): Handle qXfer:threads. Announce availability
16215 thereof.
16216 * target.h (struct target_ops): New field core_of_thread.
16217
16218 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
16219
16220 * Makefile.in (clean): Remove new generated files.
16221 (reg-s390.o, reg-s390.c): Remove rules.
16222 (reg-s390x.o, reg-s390x.c): Likewise.
16223 (s390-linux32.o, s390-linux32.c): Add rules.
16224 (s390-linux64.o, s390-linux64.c): Likewise.
16225 (s390x-linux64.o, s390x-linux64.c): Likewise.
16226 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
16227 * linux-s390-low.c: Include <elf.h>.
16228 (HWCAP_S390_HIGH_GPRS): Define if undefined.
16229 (init_registers_s390): Remove prototype.
16230 (init_registers_s390x): Likewise.
16231 (init_registers_s390_linux32): Add prototype.
16232 (init_registers_s390_linux64): Likewise.
16233 (init_registers_s390x_linux64): Likewise.
16234 (s390_num_regs_3264): New define.
16235 (s390_regmap_3264): New global variable.
16236 (s390_cannot_fetch_register): Remove obsolete check.
16237 (s390_cannot_store_register): Likewise.
16238 (s390_collect_ptrace_register): Handle upper/lower register halves.
16239 (s390_supply_ptrace_register): Likewise.
16240 (s390_fill_gregset): Update to register number changes.
16241 (s390_get_hwcap): New routine.
16242 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
16243 Install appropriate regmap and register set.
16244
16245 2010-01-01 Joel Brobecker <brobecker@adacore.com>
16246
16247 * server.c (gdbserver_version): Update copyright year to 2010.
16248 * gdbreplay.c (gdbreplay_version): Likewise.
16249
16250 2009-12-28 Doug Evans <dje@google.com>
16251
16252 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
16253 elf/external.h. Include <elf.h> instead but only if necessary.
16254
16255 2009-12-28 Pedro Alves <pedro@codesourcery.com>
16256
16257 * linux-low.c (linux_remove_process): Remove `detaching'
16258 parameter. Don't release/detach from thread_db here.
16259 (linux_kill): Release/detach from thread_db here, ...
16260 (linux_detach): ... and here, before actually detaching.
16261 (linux_wait_1): ... and here, when a process exits.
16262 * thread-db.c (any_thread_of): New.
16263 (thread_db_free): Switch the current inferior to a thread of the
16264 passed in process.
16265
16266 2009-12-21 Doug Evans <dje@google.com>
16267
16268 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
16269
16270 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
16271 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
16272 warning ifndef __NR_tkill. Move setting of errno there too.
16273 Delete unnecessary resetting of errno after syscall.
16274 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
16275
16276 * configure.ac: Check for dladdr.
16277 * config.in: Regenerate.
16278 * configure: Regenerate.
16279 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
16280 (try_thread_db_load): Update.
16281
16282 * linux-low.c (my_waitpid): Delete unnecessary prototype.
16283
16284 2009-12-18 Doug Evans <dje@google.com>
16285
16286 * event-loop.c: Include unistd.h if it exists.
16287
16288 * linux-low.c (my_waitpid): Move definition away from being in
16289 between linux_tracefork_child/linux_test_for_tracefork.
16290
16291 * gdb_proc_service.h (psaddr_t): Fix type.
16292 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
16293 signature to match glibc.
16294
16295 2009-12-16 Doug Evans <dje@google.com>
16296
16297 * linux-low.c (linux_read_memory): Fix argument to read.
16298
16299 2009-11-26 Pedro Alves <pedro@codesourcery.com>
16300
16301 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
16302 events, don't leave current_inferior pointing at null.
16303
16304 2009-11-26 Pedro Alves <pedro@codesourcery.com>
16305
16306 * win32-low.c (LOG): Delete.
16307 (OUTMSG): Output to stderr.
16308 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
16309 on compile time LOG macro.
16310 (win32_wait): Fix debug output.
16311
16312 2009-11-26 Pedro Alves <pedro@codesourcery.com>
16313
16314 * win32-low.c (win32_add_one_solib): If the dll name is
16315 "ntdll.dll", prepend the system directory to the dll path.
16316
16317 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
16318
16319 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
16320
16321 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
16322 Vladimir Prus <vladimir@codesourcery.com>
16323
16324 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
16325 * configure.ac: Check for __mcoldfire__ and set
16326 gdb_cv_m68k_is_coldfire.
16327 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
16328 reg-cf.o and reg-m68k.o.
16329 * configure: Regenerated.
16330
16331 2009-11-16 Pedro Alves <pedro@codesourcery.com>
16332
16333 * linux-low.c (linux_remove_process): Add `detaching' parameter.
16334 Pass it to thread_db_free.
16335 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
16336 proper `detaching' argument to linux_remove_process.
16337 * linux-low.h (thread_db_free): Add `detaching' parameter.
16338 * thread-db.c (thread_db_init): Pass false as `detaching' argument
16339 to thread_db_free.
16340 (thread_db_free): Add `detaching' parameter. Only
16341 call td_ta_clear_event if detaching from process.
16342
16343 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
16344
16345 * thread-db.c (thread_db_free): Fix typo.
16346
16347 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
16348
16349 PR gdb/10838
16350 * thread-db.c (thread_db_free): Call td_ta_clear_event.
16351
16352 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
16353
16354 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
16355 with an i686 compiler.
16356 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
16357 needed.
16358 * configure: Rebuilt.
16359
16360 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
16361
16362 PR gdb/10783
16363
16364 * server.c (handle_search_memory_1): Correct read_addr initialization
16365 in loop for searching subsequent chunks.
16366
16367 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
16368
16369 * configure.ac: New --with-libthread-db option.
16370 * thread-db.c: Allow direct dependence on libthread_db.
16371 (thread_db_free): Adjust.
16372 * config.in: Regenerate.
16373 * configure: Likewise.
16374
16375 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
16376
16377 PR gdb/10757
16378 * thread-db.c (attach_thread): New function.
16379 (maybe_attach_thread): Return success/failure.
16380 (find_new_threads_callback): Adjust.
16381 (thread_db_find_new_threads): Loop until no new threads.
16382
16383 2009-10-13 Pedro Alves <pedro@codesourcery.com>
16384
16385 * proc-service.c (ps_lgetregs): Formatting.
16386
16387 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
16388
16389 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
16390 * configure.ac: Adjust.
16391 * linux-low.h (struct process_info_private): Move members to struct
16392 thread_db.
16393 (thread_db_free, thread_db_handle_monitor_command): New prototype.
16394 * linux-low.c (linux_remove_process): Adjust.
16395 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
16396 * server.c (handle_query): Move code ...
16397 (handle_monitor_command): ... here. New function.
16398 * target.h (struct target_ops): New member.
16399 * thread-db.c (struct thread_db): New.
16400 (libthread_db_search_path): New variable.
16401 (thread_db_create_event, thread_db_enable_reporting)
16402 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
16403 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
16404 (try_thread_db_load_1, dladdr_to_soname): New functions.
16405 (try_thread_db_load, thread_db_load_search): New functions.
16406 (thread_db_init): Search for libthread_db.
16407 (thread_db_free): New function.
16408 (thread_db_handle_monitor_command): Likewise.
16409 * config.in: Regenerate.
16410 * configure: Regenerate.
16411
16412 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
16413
16414 * spu-low.c (spu_kill): Wait for inferior to terminate.
16415 Call clear_inferiors.
16416 (spu_detach): Call clear_inferiors.
16417
16418 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
16419
16420 * aclocal.m4: Regenerate.
16421 * config.in: Likewise.
16422 * configure: Likewise.
16423
16424 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
16425
16426 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
16427 (parse_spufs_run): New function.
16428 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
16429 (ppc_breakpoint_at): Handle SPU breakpoints.
16430
16431 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
16432
16433 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
16434 (SPUFS_MAGIC): Define.
16435 (spu_enumerate_spu_ids): New function.
16436 (linux_qxfer_spu): New function.
16437 (linux_target_ops): Install linux_qxfer_spu.
16438
16439 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
16440
16441 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
16442 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
16443 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
16444 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
16445 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
16446 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
16447 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
16448 (init_registers_powerpc_cell32l): Add prototype.
16449 (init_registers_powerpc_cell64l): Likewise.
16450 (ppc_arch_setup): Detect Cell/B.E. architecture.
16451
16452 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
16453
16454 * Makefile.in (datarootdir): New variable.
16455
16456 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
16457
16458 * linux-low.c (linux_write_memory): Update debugging output.
16459 * Makefile.in (clean): Add new descriptions.
16460 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
16461 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
16462 * configure.srv: Add new files for arm*-*-linux*.
16463 * linux-arm-low.c: Add new declarations.
16464 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
16465 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
16466 (HWCAP_VFPv3D16): New.
16467 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
16468 instead of __IWMMXT__.
16469 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
16470 (arm_arch_setup): New.
16471 (target_regsets): Remove #ifdef. Add VFP regset.
16472 (the_low_target): Use arm_arch_setup.
16473
16474 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
16475
16476 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
16477 the main thread again.
16478
16479 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
16480
16481 Adding Neutrino gdbserver.
16482 * configure: Regenerated.
16483 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
16484 * configure.srv (i[34567]86-*-nto*): New target.
16485 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
16486 * remote-utils.c [__QNX__]: Include sys/iomgr.h
16487 (nto_comctrl) [__QNX__]: New function.
16488 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
16489
16490 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
16491
16492 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
16493 srv_tgtobj.
16494
16495 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
16496 Pedro Alves <pedro@codesourcery.com>
16497
16498 * win32-i386-low.c (i386_get_thread_context): Handle systems that
16499 don't support CONTEXT_EXTENDED_REGISTERS.
16500 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
16501 (the_low_target): Install them.
16502 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
16503 failing with ERROR_PIPE_NOT_CONNECTED.
16504
16505 2009-06-30 Doug Evans <dje@google.com>
16506 Pierre Muller <muller@ics.u-strasbg.fr>
16507
16508 Add h/w watchpoint support to x86-linux, win32-i386.
16509 * Makefile.in (SFILES): Add i386-low.c
16510 (i386_low_h): Define.
16511 (i386-low.o): Add dependencies.
16512 (linux-x86-low.o): Add i386-low.h dependency.
16513 (win32-i386-low.o): Ditto.
16514 * i386-low.c: New file.
16515 * i386-low.h: New file.
16516 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
16517 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
16518 * linux-low.c (linux_add_process): Initialize arch_private.
16519 (linux_remove_process): Free arch_private.
16520 (add_lwp): Initialize arch_private.
16521 (delete_lwp): Free arch_private.
16522 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
16523 provided.
16524 * linux-low.h (process_info_private): New member arch_private.
16525 (lwp_info): New member arch_private.
16526 (linux_target_ops): New members new_process, new_thread,
16527 prepare_to_resume.
16528 (ptid_of): New macro.
16529 * linux-x86-low.c: Include stddef.h, i386-low.h.
16530 (arch_process_info): New struct.
16531 (arch_lwp_info): New struct.
16532 (x86_linux_dr_get, x86_linux_dr_set): New functions.
16533 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
16534 (i386_dr_low_get_status): New function.
16535 (x86_insert_point, x86_remove_point): New functions.
16536 (x86_stopped_by_watchpoint): New function.
16537 (x86_stopped_data_address): New function.
16538 (x86_linux_new_process, x86_linux_new_thread): New functions.
16539 (x86_linux_prepare_to_resume): New function.
16540 (the_low_target): Add entries for insert_point, remove_point,
16541 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
16542 prepare_to_resume.
16543 * server.c (debug_hw_points): New global.
16544 (monitor_show_help): Document set debug-hw-points.
16545 (handle_query): Process "set debug-hw-points".
16546 * server.h (debug_hw_points): Declare.
16547 (paddress): Declare.
16548 * utils.c (NUMCELLS, CELLSIZE): New macros.
16549 (get_sell, xsnprintf, paddress): New functions.
16550 * win32-arm-low.c (the_low_target): Add entries for insert_point,
16551 remove_point, stopped_by_watchpoint, stopped_data_address.
16552 * win32-i386-low.c: Include i386-low.h.
16553 (debug_reg_state): Replaces dr.
16554 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
16555 (i386_dr_low_get_status): New function.
16556 (i386_insert_point, i386_remove_point): New functions.
16557 (i386_stopped_by_watchpoint): New function.
16558 (i386_stopped_data_address): New function.
16559 (i386_initial_stuff): Update.
16560 (get_thread_context,set_thread_context,i386_thread_added): Update.
16561 (the_low_target): Add entries for insert_point,
16562 remove_point, stopped_by_watchpoint, stopped_data_address.
16563 * win32-low.c (win32_insert_watchpoint): New function.
16564 (win32_remove_watchpoint): New function.
16565 (win32_stopped_by_watchpoint): New function.
16566 (win32_stopped_data_address): New function.
16567 (win32_target_ops): Add entries for insert_watchpoint,
16568 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
16569 * win32-low.h (win32_target_ops): New members insert_point,
16570 remove_point, stopped_by_watchpoint, stopped_data_address.
16571
16572 2009-06-25 Pedro Alves <pedro@codesourcery.com>
16573
16574 * server.c (process_serial_event): Re-return unsupported, not
16575 error, if the type isn't recognized. Re-allow supporting only
16576 insert or remove packets. Also call require_running for
16577 breakpoints. Add missing break statement to default case. Tidy.
16578 * target.h (struct target_ops): Rename insert_watchpoint to
16579 insert_point, and remove_watchpoint to remove_point.
16580
16581 * linux-low.h (struct linux_target_ops): Likewise.
16582 * linux-low.c (linux_insert_watchpoint): Rename to ...
16583 (linux_insert_point): ... this. Adjust.
16584 (linux_remove_watchpoint): Rename to ...
16585 (linux_remove_point): ... this. Adjust.
16586 (linux_target_ops): Adjust.
16587 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
16588 (cris_insert_point): ... this.
16589 (cris_remove_watchpoint): Rename to ...
16590 (cris_remove_point): ... this.
16591 (the_low_target): Adjust.
16592
16593 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
16594
16595 * server.c (handle_v_kill): Pass signal_pid to
16596 kill_inferior if multi_process is zero.
16597
16598 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
16599
16600 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
16601 * target.h (target_ops): Comment for *_watchpoint to make it clear
16602 the functions can get types '0' and '1'.
16603
16604 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
16605
16606 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
16607 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
16608 * regcache.c (get_regcache): Likewise.
16609 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
16610 * win32-low.c (child_fetch_inferior_registers): Remove check for
16611 regno 0.
16612
16613 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
16614 Pedro Alves <pedro@codesourcery.com>
16615
16616 * target.h (struct target_ops) <supports_multi_process>: New
16617 callback.
16618 (target_supports_multi_process): New.
16619 * server.c (handle_query): Even if GDB reports support, only
16620 enable multi-process if the target also supports it. Report
16621 multi-process support only if the target backend supports it.
16622 * linux-low.c (linux_supports_multi_process): New function.
16623 (linux_target_ops): Install it as target_supports_multi_process
16624 callback.
16625
16626 2009-05-24 Doug Evans <dje@google.com>
16627
16628 Global renaming of find_thread_pid to find_thread_ptid.
16629 * server.h (find_thread_ptid): Renamed from find_thread_pid.
16630 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
16631 All callers updated.
16632
16633 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
16634 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
16635 directly.
16636
16637 * linux-low.c (get_stop_pc): Print pc if debug_threads.
16638 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
16639 (linux_resume_one_lwp): Ditto.
16640
16641 2009-05-23 Doug Evans <dje@google.com>
16642
16643 * linux-low.c (linux_resume_one_lwp): Change type of first arg
16644 from struct inferior_list_entry * to struct lwp_info *.
16645 All callers updated.
16646
16647 2009-05-13 Doug Evans <dje@google.com>
16648
16649 * linux-x86-low.c: Don't include assert.h.
16650 (x86_siginfo_fixup): Use fatal, not assert.
16651 (x86_arch_setup): Fix comment.
16652
16653 2009-05-12 Doug Evans <dje@google.com>
16654
16655 Biarch support for i386/amd64 gdbserver.
16656 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
16657 Add linux-x86-low.c.
16658 (linux-i386-low.o, linux-x86-64-low.o): Delete.
16659 (linux-x86-low.o): Add.
16660 * linux-x86-64-low.c: Delete.
16661 * linux-i386-low.c: Delete.
16662 * linux-x86-low.c: New file.
16663 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
16664 linux-x86-low.o.
16665 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
16666 linux-x86-low.o.
16667 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
16668 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
16669 (linux_child_pid_to_exec_file): New function.
16670 (elf_64_header_p, elf_64_file_p): New functions.
16671 (siginfo_fixup): New function.
16672 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
16673 give target a chance to convert layout.
16674 * linux-low.h (linux_target_ops): New member siginfo_fixup.
16675 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
16676
16677 2009-05-07 Doug Evans <dje@google.com>
16678
16679 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
16680 (regsets_store_inferior_registers): Ditto.
16681
16682 2009-05-06 Pedro Alves <pedro@codesourcery.com>
16683
16684 PR server/10048
16685
16686 * linux-low.c (must_set_ptrace_flags): Delete.
16687 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
16688 of the global.
16689 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
16690 `lwp->must_set_ptrace_flags' instead.
16691 (linux_wait_for_event_1): Set ptrace options here.
16692 (linux_wait_1): ... not here.
16693
16694 2009-04-30 Doug Evans <dje@google.com>
16695
16696 * inferiors.c (started_inferior_callback): New function.
16697 (attached_inferior_callback): New function.
16698 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
16699 * server.c (print_started_pid, print_attached_pid): New functions.
16700 (detach_or_kill_for_exit): New function.
16701 (main): Call it instead of for_each_inferior (kill_inferior_callback).
16702 * server.h (have_started_inferiors_p): Declare.
16703 (have_attached_inferiors_p): Declare.
16704
16705 * inferiors.c (remove_process): Fix memory leak, free process.
16706 * linux-low.c (linux_remove_process): New function.
16707 (linux_kill): Call it instead of remove_process.
16708 (linux_detach, linux_wait_1): Ditto.
16709
16710 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
16711
16712 * configure.srv: Add x86 Windows CE target.
16713
16714 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
16715
16716 * inferiors.c (get_thread_process): Make global.
16717 * server.h (get_thread_process): Add prototype.
16718 * thread-db.c (find_one_thread): Use get_thread_process
16719 instead of current_process.
16720 (thread_db_get_tls_address): Do not crash if called when
16721 thread layer is not yet initialized.
16722
16723 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
16724
16725 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
16726 * spu-low.c (current_tid): Rename to ...
16727 (current_ptid): ... this.
16728 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
16729 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
16730 ptid_get_lwp (current_ptid) instead of current_tid.
16731 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
16732 instead of current_tid. Use find_process_pid to verify pid
16733 argument is valid. Pass proper argument to remove_process.
16734 (spu_thread_alive): Compare current_ptid instead of current_tid.
16735 (spu_resume): Likewise.
16736
16737 2009-04-02 Pedro Alves <pedro@codesourcery.com>
16738
16739 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
16740 variable.
16741
16742 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16743
16744 Implement the multiprocess extensions, and add linux multiprocess
16745 support.
16746
16747 * server.h (ULONGEST): Declare.
16748 (struct ptid, ptid_t): New.
16749 (minus_one_ptid, null_ptid): Declare.
16750 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
16751 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
16752 (struct inferior_list_entry): Change `id' type from unsigned from
16753 to ptid_t.
16754 (struct sym_cache, struct breakpoint, struct
16755 process_info_private): Forward declare.
16756 (struct process_info): Declare.
16757 (current_process): Declare.
16758 (all_processes): Declare.
16759 (initialize_inferiors): Declare.
16760 (add_thread): Adjust to use ptid_t.
16761 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
16762 (add_process, remove_process, find_thread_pid): Declare.
16763 (find_inferior_id): Adjust to use ptid_t.
16764 (cont_thread, general_thread, step_thread): Change type to ptid_t.
16765 (multi_process): Declare.
16766 (push_event): Adjust to use ptid_t.
16767 (read_ptid, write_ptid): Declare.
16768 (prepare_resume_reply): Adjust to use ptid_t.
16769 (clear_symbol_cache): Declare.
16770 * inferiors.c (all_processes): New.
16771 (null_ptid, minus_one_ptid): New.
16772 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
16773 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
16774 (add_thread): Change unsigned long to ptid. Remove gdb_id
16775 parameter. Adjust.
16776 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
16777 (gdb_id_to_thread): Rename to ...
16778 (find_thread_pid): ... this. Change unsigned long to ptid.
16779 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
16780 (loaded_dll, pull_pid_from_list): Adjust.
16781 (add_process, remove_process, find_process_pid)
16782 (get_thread_process, current_process, initialize_inferiors): New.
16783 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
16784 (struct target_waitstatus) <related_pid>: Ditto.
16785 (struct target_ops) <kill, detach>: Add `pid' argument. Change
16786 return type to int.
16787 (struct target_ops) <join>: Add `pid' argument.
16788 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
16789 (struct target_ops) <wait>: Add `ptid' field. Change return type
16790 to ptid.
16791 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
16792 (mywait): Add `ptid' argument. Change return type to ptid_t.
16793 (target_pid_to_str): Declare.
16794 * target.c (set_desired_inferior): Adjust to use ptids.
16795 (mywait): Add new `ptid' argument. Adjust.
16796 (target_pid_to_str): New.
16797 * mem-break.h (free_all_breakpoints): Declare.
16798 * mem-break.c (breakpoints): Delelete.
16799 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
16800 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
16801 to use per-process breakpoint list.
16802 (free_all_breakpoints): New.
16803 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
16804 (symbol_cache, all_symbols_looked_up): Delete.
16805 (hexchars): New.
16806 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
16807 read_ptid): New.
16808 (prepare_resume_reply): Change ptid argument's type from unsigned
16809 long to ptid_t. Adjust. Implement W;process and X;process.
16810 (free_sym_cache, clear_symbol_cache): New.
16811 (look_up_one_symbol): Adjust to per-process symbol cache. *
16812 * server.c (cont_thread, general_thread, step_thread): Change type
16813 to ptid_t.
16814 (attached): Delete.
16815 (multi_process): New.
16816 (last_ptid): Change type to ptid_t.
16817 (struct vstop_notif) <ptid>: Change type to ptid_t.
16818 (queue_stop_reply, push_event): Change `ptid' argument's type to
16819 ptid_t.
16820 (discard_queued_stop_replies): Add `pid' argument.
16821 (start_inferior): Adjust to use ptids. Adjust to mywait interface
16822 changes. Don't reference the `attached' global.
16823 (attach_inferior): Adjust to mywait interface changes.
16824 (handle_query): Adjust to use ptids. Parse GDB's qSupported
16825 features. Handle and report "multiprocess+". Handle
16826 "qAttached:PID".
16827 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
16828 changes.
16829 (handle_v_kill): New.
16830 (handle_v_stopped): Adjust to use target_pid_to_str.
16831 (handle_v_requests): Allow multiple attaches and runs when
16832 multiprocess extensions are in effect. Handle "vKill".
16833 (myresume): Adjust to use ptids.
16834 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
16835 (handle_status): Adjust to discard_queued_stop_replies interface
16836 change.
16837 (first_thread_of, kill_inferior_callback)
16838 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
16839 (main): Call initialize_inferiors. Adjust to use ptids, killing
16840 and detaching from all inferiors. Handle multiprocess packet
16841 variants.
16842 * linux-low.h: Include gdb_proc_service.h.
16843 (struct process_info_private): New.
16844 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
16845 <lwpid_of>: Use ptid_get_lwp.
16846 (get_lwp_thread): Adjust.
16847 (struct lwp_info): Add `dead' member.
16848 (find_lwp_pid): Declare.
16849 * linux-low.c (thread_db_active): Delete.
16850 (new_inferior): Adjust comment.
16851 (inferior_pid): Delete.
16852 (linux_add_process): New.
16853 (handle_extended_wait): Adjust.
16854 (add_lwp): Change unsigned long to ptid.
16855 (linux_create_inferior): Add process to processes table. Adjust
16856 to use ptids. Don't set new_inferior here.
16857 (linux_attach_lwp): Rename to ...
16858 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
16859 it. Adjust to use ptids.
16860 (linux_attach_lwp): New.
16861 (linux_attach): Add process to processes table. Don't set
16862 new_inferior here.
16863 (struct counter): New.
16864 (second_thread_of_pid_p, last_thread_of_process_p): New.
16865 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
16866 multiple processes.
16867 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
16868 processes. Remove process from process table.
16869 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
16870 to multiple processes.
16871 (any_thread_of): New.
16872 (linux_detach): Add `pid' argument, and handle it. Remove process
16873 from processes table.
16874 (linux_join): Add `pid' argument. Handle it.
16875 (linux_thread_alive): Change unsighed long argument to ptid_t.
16876 Consider dead lwps as not being alive.
16877 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
16878 threads we're not interested in.
16879 (same_lwp, find_lwp_pid): New.
16880 (linux_wait_for_lwp): Change `pid' argument's type from int to
16881 ptid_t. Adjust.
16882 (linux_wait_for_event): Rename to ...
16883 (linux_wait_for_event_1): ... this. Change `pid' argument's type
16884 from int to ptid_t. Adjust.
16885 (linux_wait_for_event): New.
16886 (linux_wait_1): Add `ptid' argument. Change return type to
16887 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
16888 that exit from the process table.
16889 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
16890 Adjust.
16891 (mark_lwp_dead): New.
16892 (wait_for_sigstop): Adjust to use ptids. If a process exits while
16893 stopping all threads, mark its main lwp as dead.
16894 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
16895 ptids.
16896 (fetch_register, usr_store_inferior_registers)
16897 (regsets_fetch_inferior_registers)
16898 (regsets_store_inferior_registers, linux_read_memory)
16899 (linux_write_memory): Inline `inferior_pid'.
16900 (linux_look_up_symbols): Adjust to use per-process
16901 `thread_db_active'.
16902 (linux_request_interrupt): Adjust to use ptids.
16903 (linux_read_auxv): Inline `inferior_pid'.
16904 (initialize_low): Don't reference thread_db_active.
16905 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
16906 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
16907 (ps_getpid): Return the pid of the current inferior.
16908 * thread-db.c (proc_handle, thread_agent): Delete.
16909 (thread_db_create_event, thread_db_enable_reporting): Adjust to
16910 per-process data.
16911 (find_one_thread): Change argument type to ptid_t. Adjust to
16912 per-process data.
16913 (maybe_attach_thread): Adjust to per-process data and ptids.
16914 (thread_db_find_new_threads): Ditto.
16915 (thread_db_init): Ditto.
16916 * spu-low.c (spu_create_inferior, spu_attach): Add process to
16917 processes table. Adjust to use ptids.
16918 (spu_kill, spu_detach): Adjust interface. Remove process from
16919 processes table.
16920 (spu_join, spu_thread_alive): Adjust interface.
16921 (spu_wait): Adjust interface. Remove process from processes
16922 table. Adjust to use ptids.
16923 * win32-low.c (current_inferior_tid): Delete.
16924 (current_inferior_ptid): New.
16925 (debug_event_ptid): New.
16926 (thread_rec): Take a ptid. Adjust.
16927 (child_add_thread): Add `pid' argument. Adjust to use ptids.
16928 (child_delete_thread): Ditto.
16929 (do_initial_child_stuff): Add `attached' argument. Add process to
16930 processes table.
16931 (child_fetch_inferior_registers, child_store_inferior_registers):
16932 Adjust.
16933 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
16934 (win32_attach): Pass 1 to do_initial_child_stuff.
16935 (win32_kill): Adjust interface. Remove process from processes
16936 table.
16937 (win32_detach): Ditto.
16938 (win32_join): Adjust interface.
16939 (win32_thread_alive): Take a ptid.
16940 (win32_resume): Adjust to use ptids.
16941 (get_child_debug_event): Ditto.
16942 (win32_wait): Adjust interface. Remove exiting process from
16943 processes table.
16944
16945 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16946
16947 Non-stop mode support.
16948
16949 * server.h (non_stop): Declare.
16950 (gdb_client_data, handler_func): Declare.
16951 (delete_file_handler, add_file_handler, start_event_loop):
16952 Declare.
16953 (handle_serial_event, handle_target_event, push_event)
16954 (putpkt_notif): Declare.
16955 * target.h (enum resume_kind): New.
16956 (struct thread_resume): Replace `step' field by `kind' field.
16957 (TARGET_WNOHANG): Define.
16958 (struct target_ops) <wait>: Add `options' argument.
16959 <supports_non_stop, async, start_non_stop>: New fields.
16960 (target_supports_non_stop, target_async): New.
16961 (start_non_stop): Declare.
16962 (mywait): Add `options' argument.
16963 * target.c (mywait): Add `options' argument. Print child exit
16964 notifications here.
16965 (start_non_stop): New.
16966 * server.c (non_stop, own_buf, mem_buf): New globals.
16967 (struct vstop_notif): New.
16968 (notif_queue): New global.
16969 (queue_stop_reply, push_event, discard_queued_stop_replies)
16970 (send_next_stop_reply): New.
16971 (start_inferior): Adjust to use resume_kind. Adjust to mywait
16972 interface changes.
16973 (attach_inferior): In non-stop mode, don't wait for the target
16974 here.
16975 (handle_general_set): Handle QNonStop.
16976 (handle_query): When handling qC, return the current general
16977 thread, instead of the first thread of the list.
16978 (handle_query): If the backend supports non-stop mode, include
16979 QNonStop+ in the qSupported query response.
16980 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
16981 and non-stop mode.
16982 (handle_v_attach, handle_v_run): Handle non-stop mode.
16983 (handle_v_stopped): New.
16984 (handle_v_requests): Report support for vCont;t. Handle vStopped.
16985 (myresume): Adjust to use resume_kind. Handle non-stop.
16986 (queue_stop_reply_callback): New.
16987 (handle_status): Handle non-stop mode.
16988 (main): Clear non_stop flag on reconnection. Use the event-loop.
16989 Refactor serial protocol handling from here ...
16990 (process_serial_event): ... to this new function. When GDB
16991 selects any thread, select one here. In non-stop mode, wait until
16992 GDB acks all pending events before exiting.
16993 (handle_serial_event, handle_target_event): New.
16994 * remote-utils.c (remote_open): Install remote_desc in the event
16995 loop.
16996 (remote_close): Remove remote_desc from the event loop.
16997 (putpkt_binary): Rename to...
16998 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
16999 (putpkt_binary): New as wrapper around putpkt_binary_1.
17000 (putpkt_notif): New.
17001 (prepare_resume_reply): In non-stop mode, don't change the
17002 general_thread.
17003 * event-loop.c: New.
17004 * Makefile.in (OBJ): Add event-loop.o.
17005 (event-loop.o): New rule.
17006
17007 * linux-low.h (pid_of): Moved here.
17008 (lwpid_of): New.
17009 (get_lwp_thread): Use lwpid_of.
17010 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
17011 * linux-low.c (pid_of): Delete.
17012 (inferior_pid): Use lwpid_of.
17013 (linux_event_pipe): New.
17014 (target_is_async_p): New.
17015 (delete_lwp): New.
17016 (handle_extended_wait): Use lwpid_of.
17017 (add_lwp): Don't set lwpid field.
17018 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
17019 (linux_kill_one_lwp): If killing a running lwp, stop it first.
17020 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
17021 (linux_detach_one_lwp): If detaching from a running lwp, stop it
17022 first. Adjust to linux_wait_for_event interface changes. Use
17023 lwpid_of.
17024 (linux_detach): Don't delete the main lwp here.
17025 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
17026 (status_pending_p): Don't consider explicitly suspended lwps.
17027 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
17028 pointer. Add OPTIONS argument. Change return type to int. Use
17029 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
17030 (linux_wait_for_event): Take an integer pid instead of a lwp_info
17031 pointer. Add status pointer argument. Return a pid instead of a
17032 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
17033 changes. In non-stop mode, don't switch to a random thread.
17034 (linux_wait): Rename to...
17035 (linux_wait_1): ... this. Add target_options argument, and handle
17036 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
17037 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
17038 clean exit and signal exit code. Don't stop all threads in
17039 non-stop mode. In all-stop mode, only stop all threads when
17040 reporting a stop to GDB. Handle explicit thread stop requests.
17041 (async_file_flush, async_file_mark): New.
17042 (linux_wait): New.
17043 (send_sigstop): Use lwpid_of.
17044 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
17045 interface changes. In non-stop mode, don't switch to a random
17046 thread.
17047 (linux_resume_one_lwp): Use lwpid_of.
17048 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
17049 (linux_resume_one_thread): ... this. Handle resume_stop. In
17050 non-stop mode, don't look for pending flag in all threads.
17051 (resume_status_pending_p): Don't consider explicitly suspended
17052 threads.
17053 (my_waitpid): Reimplement. Emulate __WALL.
17054 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
17055 Use lwpid_of.
17056 (sigchld_handler, linux_supports_non_stop, linux_async)
17057 (linux_start_non_stop): New.
17058 (linux_target_ops): Register linux_supports_non_stop, linux_async
17059 and linux_start_non_stop.
17060 (initialize_low): Install SIGCHLD handler.
17061 * thread-db.c (thread_db_create_event, find_one_thread)
17062 (thread_db_get_tls_address): Use lwpid_of.
17063 * win32-low.c (win32_detach): Adjust to use resume_kind.
17064 (win32_wait): Add `options' argument.
17065 * spu-low.c (spu_resume): Adjust to use resume_kind.
17066 (spu_wait): Add `options' argument.
17067
17068 2009-04-01 Pedro Alves <pedro@codesourcery.com>
17069
17070 Decouple target code from remote protocol.
17071
17072 * target.h (enum target_waitkind): New.
17073 (struct target_waitstatus): New.
17074 (struct target_ops) <wait>: Return an unsigned long. Take a
17075 target_waitstatus pointer instead of a char pointer.
17076 (mywait): Likewise.
17077 * target.c (mywait): Change prototype to return an unsigned long.
17078 Take a target_waitstatus pointer instead of a char pointer. Adjust.
17079 * server.h (thread_from_wait, old_thread_from_wait): Delete
17080 declarations.
17081 (prepare_resume_reply): Change prototype to take a
17082 target_waitstatus.
17083 * server.c (thread_from_wait, old_thread_from_wait): Delete.
17084 (last_status, last_ptid): New.
17085 (start_inferior): Remove "statusptr" argument. Adjust. Return a
17086 pid instead of a signal.
17087 (attach_inferior): Remove "status" and "signal" parameters.
17088 Adjust.
17089 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
17090 not as an address.
17091 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
17092 (handle_v_requests, myresume): Remove "status" and "signal"
17093 parameters. Adjust.
17094 (handle_status): New.
17095 (main): Delete local `status'. Adjust.
17096 * remote-utils.c: Include target.h.
17097 (prepare_resume_reply): Change prototype to take a
17098 target_waitstatus. Adjust.
17099
17100 * linux-low.c (linux_wait): Adjust to new target_ops->wait
17101 interface.
17102 * spu-low.c (spu_wait): Adjust.
17103 * win32-low.c (enum target_waitkind, struct target_waitstatus):
17104 Delete.
17105 (win32_wait): Adjust.
17106
17107 2009-04-01 Pedro Alves <pedro@codesourcery.com>
17108
17109 * target.h (struct thread_resume): Delete leave_stopped member.
17110 (struct target_ops): Add a `n' argument to the `resume' callback.
17111 * server.c (start_inferior): Adjust.
17112 (handle_v_cont, myresume): Adjust.
17113 * linux-low.c (check_removed_breakpoint): Adjust to resume
17114 interface change, and to removed leave_stopped field.
17115 (resume_ptr): Delete.
17116 (struct thread_resume_array): New.
17117 (linux_set_resume_request): Add new `arg' parameter. Adjust to
17118 resume interface change.
17119 (linux_continue_one_thread, linux_queue_one_thread)
17120 (resume_status_pending_p): Check if the resume field is NULL
17121 instead of checking the leave_stopped member.
17122 (linux_resume): Adjust to the target resume interface change.
17123 * spu-low.c (spu_resume): Adjust to the target resume interface
17124 change.
17125 * win32-low.c (win32_detach, win32_resume): Ditto.
17126
17127 2009-04-01 Pedro Alves <pedro@codesourcery.com>
17128
17129 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
17130 flag.
17131 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
17132 pending.
17133 (linux_continue_one_thread): Only preserve the stepping flag if
17134 there's a pending breakpoint.
17135
17136 2009-03-31 Pedro Alves <pedro@codesourcery.com>
17137
17138 * server.c (main): After the inferior having exited, call
17139 remote_close before exiting gdbserver.
17140
17141 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
17142
17143 Fix size of FPSCR in Power 7 processors.
17144 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
17145 (PPC_FEATURE_HAS_DFP): New #define.
17146 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
17147 size of the FPSCR.
17148
17149 2009-03-23 Pedro Alves <pedro@codesourcery.com>
17150
17151 * server.c (handle_query) Whitespace and formatting.
17152
17153 2009-03-22 Pedro Alves <pedro@codesourcery.com>
17154
17155 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
17156 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
17157 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
17158 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
17159 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
17160 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
17161 Makefile.in, configure.ac: Fix whitespace throughout.
17162 * configure: Regenerate.
17163
17164 2009-03-22 Pedro Alves <pedro@codesourcery.com>
17165
17166 * inferiors.c (find_inferior): Make it safe for the callback
17167 function to delete the currently iterated inferior.
17168
17169 2009-03-22 Pedro Alves <pedro@codesourcery.com>
17170
17171 * Makefile.in (linuw_low_h): Move higher.
17172 (thread-db.o): Depend on $(linux_low_h).
17173
17174 2009-03-17 Pedro Alves <pedro@codesourcery.com>
17175
17176 Rename "process" to "lwp" throughout.
17177
17178 * linux-low.c (all_processes): Rename to...
17179 (all_lwps): ... this.
17180 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
17181 (add_process): Rename to ...
17182 (add_lwp): ... this. Adjust.
17183 (linux_create_inferior): Adjust.
17184 (linux_attach_lwp): Adjust.
17185 (linux_attach): Adjust.
17186 (linux_kill_one_process): Rename to ...
17187 (linux_kill_one_lwp): ... this. Adjust.
17188 (linux_kill): Adjust.
17189 (linux_detach_one_process): Rename to ...
17190 (linux_detach_one_lwp): ... this. Adjust.
17191 (linux_detach): Adjust.
17192 (check_removed_breakpoint): Adjust.
17193 (status_pending_p): Adjust.
17194 (linux_wait_for_process): Rename to ...
17195 (linux_wait_for_lwp): ... this. Adjust.
17196 (linux_wait_for_event): Adjust.
17197 (send_sigstop): Adjust.
17198 (wait_for_sigstop): Adjust.
17199 (stop_all_processes): Rename to ...
17200 (stop_all_lwps): ... this.
17201 (linux_resume_one_process): Rename to ...
17202 (linux_resume_one_lwp): ... this. Adjust.
17203 (linux_set_resume_request, linux_continue_one_thread)
17204 (linux_queue_one_thread, resume_status_pending_p)
17205 (usr_store_inferior_registers, regsets_store_inferior_registers)
17206 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
17207 Adjust.
17208 * linux-low.h (get_process): Rename to ...
17209 (get_lwp): ... this. Adjust.
17210 (get_thread_process): Rename to ...
17211 (get_thread_lwp): ... this. Adjust.
17212 (get_process_thread): Rename to ...
17213 (get_lwp_thread): ... this. Adjust.
17214 (struct process_info): Rename to ...
17215 (struct lwp_info): ... this.
17216 (all_processes): Rename to ...
17217 (all_lwps): ... this.
17218 * proc-service.c (ps_lgetregs): Adjust.
17219 * thread-db.c (thread_db_create_event, find_one_thread)
17220 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
17221
17222 2009-03-14 Pedro Alves <pedro@codesourcery.com>
17223
17224 * server.c (handle_query): Handle "qAttached".
17225
17226 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
17227
17228 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
17229 GPLv3, update license URL.
17230
17231 2009-03-01 Doug Evans <dje@google.com>
17232
17233 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
17234 (server_h): Add gdb_signals.h.
17235 (signals.o): Update.
17236 * server.h (target_signal_from_host,target_signal_to_host_p)
17237 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
17238
17239 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
17240
17241 * remote-utils.c (getpkt): Also generate remote-debug
17242 information if noack_mode is set.
17243
17244 2009-02-06 Pedro Alves <pedro@codesourcery.com>
17245
17246 * server.c (handle_query): Report qXfer:siginfo:read and
17247 qXfer:siginfo:write as supported and handle them.
17248 * target.h (struct target_ops) <qxfer_siginfo>: New field.
17249 * linux-low.c (linux_xfer_siginfo): New.
17250 (linux_target_ops): Set it.
17251
17252 2009-01-26 Pedro Alves <pedro@codesourcery.com>
17253
17254 * server.c (gdbserver_usage): Mention --remote-debug.
17255 (main): Accept '--remote-debug' switch.
17256
17257 2009-01-18 Doug Evans <dje@google.com>
17258
17259 * regcache.c (new_register_cache): No need to check result of xcalloc.
17260 * server.c (handle_search_memory): Back out calls to xmalloc,
17261 result is checked and error is returned to user upon failure.
17262 (handle_query): Ditto. Add more checks for result of malloc.
17263 (handle_v_cont): Check result of malloc, report error back to
17264 user upon failure.
17265 (handle_v_run): Ditto. Call freeargv.
17266 * server.h (freeargv): Declare.
17267 * utils.c (freeargv): New fn.
17268
17269 2009-01-15 Doug Evans <dje@google.com>
17270
17271 * gdbreplay.c (perror_with_name): Make arg const char *.
17272 * server.h (target_signal_to_name): Make return type const char *.
17273 * thread-db.c (thread_db_err_str): Make return type const char *.
17274 * utils.c (perror_with_name): Make arg const char *.
17275
17276 2009-01-14 Pedro Alves <pedro@codesourcery.com>
17277
17278 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
17279 when handling a EXIT_PROCESS_DEBUG_EVENT.
17280
17281 2009-01-06 Joel Brobecker <brobecker@adacore.com>
17282
17283 * gdbreplay.c (gdbreplay_version): Update copyright year.
17284 * server.c (gdbserver_version): Likewise.
17285
17286 2009-01-05 Doug Evans <dje@google.com>
17287
17288 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
17289 (handle_extended_wait): Improve comment.
17290
17291 2008-12-13 Doug Evans <dje@google.com>
17292
17293 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
17294 * server.h (ATTR_MALLOC): New macro.
17295 (xmalloc,xcalloc,xstrdup): Declare.
17296 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
17297 * inferiors.c: Ditto.
17298 * linux-low.c: Ditto.
17299 * mem-break.c: Ditto.
17300 * regcache.c: Ditto.
17301 * remote-utils.c: Ditto.
17302 * server.c: Ditto.
17303 * target.c: Ditto.
17304 * win32-low.c: Ditto.
17305
17306 2008-12-12 Doug Evans <dje@google.com>
17307
17308 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
17309 in debugging printf.
17310
17311 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
17312
17313 2008-12-09 Doug Evans <dje@google.com>
17314
17315 * linux-low.h (struct process_info): Delete member tid, unused.
17316 * thread-db.c (find_one_thread): Update.
17317 (maybe_attach_thread): Update.
17318
17319 2008-12-02 Pedro Alves <pedro@codesourcery.com>
17320
17321 * target.h (struct target_ops): Add qxfer_osdata member.
17322 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
17323 and dirent.h.
17324 (linux_qxfer_osdata): New functions.
17325 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
17326 callback.
17327 * server.c (handle_query): Handle "qXfer:osdata:read:".
17328 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
17329 (buffer_xml_printf): New functions.
17330 * server.h (struct buffer): New.
17331 (buffer_grow_str, buffer_grow_str0): New macros.
17332 (buffer_grow, buffer_free, buffer_init, buffer_finish)
17333 (buffer_xml_printf): Declare.
17334
17335 2008-11-24 Doug Evans <dje@google.com>
17336
17337 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
17338
17339 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
17340
17341 * server.c (handle_v_run): Always use the supplied argument list.
17342
17343 2008-11-19 Bob Wilson <bob.wilson@acm.org>
17344
17345 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
17346 (xtensa_regmap_table): Add entry for scompare1.
17347
17348 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
17349
17350 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
17351 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
17352 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
17353 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
17354 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
17355 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
17356 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
17357 XML target descriptions.
17358 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
17359 when inferior is running on an ISA 2.05 or later processor. Add
17360 special case to return offset for full 64-bit slot of FPSCR when
17361 in 32-bits.
17362
17363 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
17364
17365 * Makefile.in (SFILES, clean): Added sparc64 files.
17366 (reg-sparc64.o, reg-sparc64.c): New.
17367 * configure.srv (sparc*-*-linux*): New configuration.
17368 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
17369 syscall arguments for SPARC.
17370 (regsets_store_inferior_registers): Likewise.
17371 * linux-sparc-low.c: New file.
17372
17373 2008-10-21 Doug Evans <dje@google.com>
17374
17375 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
17376 (READLINE_DIR,READLINE_DEP): Delete.
17377 (INTERNAL_CFLAGS): Update.
17378 (LINTFLAGS): Update.
17379
17380 2008-10-10 Pedro Alves <pedro@codesourcery.com>
17381
17382 * server.c (handle_v_run): If GDB didn't specify an argv, use the
17383 whole argv from the last run, not just argv[0].
17384
17385 2008-09-08 Pedro Alves <pedro@codesourcery.com>
17386
17387 * regcache.c (new_register_cache): Return NULL if the register
17388 cache size isn't known yet.
17389 (free_register_cache): Avoid dereferencing a NULL regcache.
17390
17391 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
17392
17393 * configure.srv: Merge MIPS and MIPS64.
17394
17395 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
17396
17397 * Makefile.in (uninstall): Apply $(EXEEXT) too.
17398
17399 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
17400
17401 * Makefile.in: Add required vsx dependencies.
17402
17403 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
17404 Declare init_registers_powerpc_vsx32l.
17405 Declare init_registers_powerpc_vsx64l.
17406 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
17407 (ppc_arch_setup): Check for VSX in hwcap.
17408 (ppc_fill_vsxregset): New function.
17409 (ppc_store_vsxregset): New function.
17410 Add new VSX entry in regset_info target_regsets.
17411
17412 * configure.srv: Add new VSX dependencies.
17413
17414 2008-08-12 Pedro Alves <pedro@codesourcery.com>
17415
17416 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
17417 (remote_open): Set or clear transport_is_reliable.
17418 (putpkt_binary): Don't expect acks in noack mode.
17419 (getpkt): Don't send ack/nac in noack mode.
17420 * server.c (handle_general_set): Handle QStartNoAckMode.
17421 (handle_query): If connected by tcp pass QStartNoAckMode+ in
17422 qSupported.
17423 (main): Reset noack_mode on every connection.
17424 * server.h (noack_mode): Declare.
17425
17426 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
17427
17428 * Makefile.in (GDBREPLAY_OBS): New variable.
17429 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
17430
17431 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
17432 Daniel Jacobowitz <dan@codesourcery.com>
17433
17434 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
17435 (usr_store_inferior_registers): Likewise.
17436 (regsets_store_inferior_registers): Likewise.
17437
17438 2008-07-31 Rolf Jansen <rj@surtec.com>
17439 Pedro Alves <pedro@codesourcery.com>
17440
17441 * configure.ac: Check for memmem declaration.
17442 * server.c [HAVE_MALLOC_H]: Include malloc.h.
17443 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
17444 (disable_packet_qfThreadInfo): Unconditionally compile.
17445 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
17446 * configure, config.in: Regenerate.
17447
17448 2008-07-28 Doug Kwan <dougkwan@google.com>
17449
17450 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
17451 (linux_write_memory): Remove declaration of errno.
17452
17453 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
17454
17455 * linux-low.c (handle_extended_wait): Do not use "status"
17456 variable uninitialized.
17457
17458 2008-07-07 Pedro Alves <pedro@codesourcery.com>
17459
17460 * server.c (handle_v_attach): Inhibit reporting dll changes.
17461
17462 2008-06-27 Pedro Alves <pedro@codesourcery.com>
17463
17464 * remote-utils.c (prepare_resume_reply): If requested, don't
17465 output "thread:TID" in the T stop reply.
17466
17467 * server.c (disable_packet_vCont, disable_packet_Tthread)
17468 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
17469 (handle_query): If requested, disable support for qC, qfThreadInfo
17470 and qsThreadInfo.
17471 (handle_v_requests): If requested, disable support for vCont.
17472 (gdbserver_show_disableable): New.
17473 (main): Handle --disable-packet and --disable-packet=LIST.
17474
17475 * server.h (disable_packet_vCont, disable_packet_Tthread)
17476 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
17477
17478 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
17479
17480 * server.c (gdbserver_usage): Mention --version.
17481
17482 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
17483
17484 * Makefile.in (gdbreplay.o): New rule.
17485
17486 2008-06-06 Joseph Myers <joseph@codesourcery.com>
17487
17488 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
17489 message, not gdbserver.
17490
17491 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
17492 Nathan Sidwell <nathan@codesourcery.com>
17493 Joseph Myers <joseph@codesourcery.com>
17494
17495 * acinclude.m4: Include ../../config/acx.m4.
17496 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
17497 * configure, config.in: Regenerate.
17498 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
17499 * server.c (gdbserver_version): Print PKGVERSION.
17500 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
17501 (main): Adjust gdbserver_usage calls.
17502 * gdbreplay.c (version, host_name): Add declarations.
17503 (gdbreplay_version, gdbreplay_usage): New.
17504 (main): Accept --version and --help options.
17505
17506 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
17507
17508 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
17509 (arm_breakpoint_at): Handle Thumb.
17510 (the_low_target): Add comment.
17511
17512 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
17513
17514 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
17515
17516 2008-05-09 Doug Evans <dje@google.com>
17517
17518 * server.h (decode_search_memory_packet): Declare.
17519 * remote-utils.c (decode_search_memory_packet): New fn.
17520 * server.c (handle_search_memory_1): New fn.
17521 (handle_search_memory): New fn.
17522 (handle_query): Process qSearch:memory packets.
17523
17524 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
17525
17526 * regcache.c (registers_length): Remove.
17527 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
17528 full register packet.
17529 * regcache.h (registers_length): Remove prototype.
17530 * server.h (PBUFSIZ): Define to 16384.
17531
17532 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
17533
17534 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
17535 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
17536 powerpc-64l.o, and powerpc-altivec64l.o.
17537 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
17538 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
17539 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
17540 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
17541 rs6000/power-linux.xml, and rs6000/power64-linux.xml
17542 to srv_xmlfiles.
17543
17544 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
17545 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
17546 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
17547 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
17548 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
17549 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
17550 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
17551 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
17552 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
17553 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
17554 (clean): Update.
17555
17556 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
17557 (init_registers_powerpc_32l): ... this new prototype.
17558 (init_registers_powerpc_32): Remove, replace by ...
17559 (init_registers_powerpc_altivec32l): ... this new prototype.
17560 (init_registers_powerpc_e500): Remove, replace by ...
17561 (init_registers_powerpc_e500l): ... this new prototype.
17562 (init_registers_ppc64): Remove, replace by ...
17563 (init_registers_powerpc_64l): ... this new prototype.
17564 (init_registers_powerpc_64): Remove, replace by ...
17565 (init_registers_powerpc_altivec64l): ... this new prototype.
17566 (ppc_num_regs): Set to 73.
17567 (PT_ORIG_R3, PT_TRAP): Define if necessary.
17568 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
17569 (ppc_cannot_store_register): Handle orig_r3 and trap.
17570 (ppc_arch_setup): Update init_registers_... calls.
17571 (ppc_fill_gregset): Handle orig_r3 and trap.
17572
17573 * inferiors.c (clear_inferiors): Reset current_inferior.
17574
17575 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
17576
17577 * acinclude.m4: Add override.m4.
17578 * configure: Regenerate.
17579
17580 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
17581
17582 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
17583 initial call to init_register_ppc64.
17584
17585 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
17586
17587 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
17588 single powerpc*-*-linux* case.
17589 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
17590
17591 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
17592
17593 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
17594 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
17595 from reg_xmlfiles.
17596 * linux-ppc-low.c: Include <elf.h>.
17597 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
17598 (ppc_hwcap): New global variable.
17599 (ppc_regmap): Remove __SPE__ #ifdef sections.
17600 (ppc_regmap_e500): New global variable.
17601 (ppc_cannot_store_register): Update __SPE__ special case.
17602 (ppc_get_hwcap): New function.
17603 (ppc_arch_setup): Use it to determine whether inferior supports
17604 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
17605 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
17606 Do not access registers if target does not support AltiVec.
17607 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
17608 Do not access registers if target does not support SPE.
17609 (target_regsets): Unconditionally include AltiVec and SPE regsets.
17610
17611 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
17612
17613 * linux-low.c (disabled_regsets, num_regsets): New.
17614 (use_regsets_p): Delete.
17615 (linux_wait_for_process): Clear disabled_regsets.
17616 (regsets_fetch_inferior_registers): Check and set it.
17617 (regsets_store_inferior_registers): Likewise.
17618 (linux_fetch_registers, linux_store_registers): Do not use
17619 use_regsets_p.
17620 (initialize_low): Allocate disabled_regsets.
17621
17622 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
17623
17624 * Makefile.in (LIBOBJS): New.
17625 (OBS): Use LIBOBJS.
17626 (memmem.o): New rule.
17627 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
17628 * configure: Regenerated.
17629
17630 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
17631
17632 * server.c (handle_query): Never return "unsupported" for
17633 qXfer:features:read queries.
17634
17635 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
17636
17637 * server.c (get_features_xml): Fix inverted condition.
17638 (handle_query): Always support qXfer:feature:read.
17639
17640 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
17641
17642 * server.c (wrapper_argv): New.
17643 (start_inferior): Handle wrapper_argv. If set, expect an extra
17644 trap.
17645 (gdbserver_usage): Document --wrapper.
17646 (main): Parse --wrapper.
17647
17648 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
17649
17650 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
17651 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
17652 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
17653 (ppc_set_pc): Likewise.
17654 (ppc_arch_setup): New function.
17655 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
17656 of collect_register.
17657 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
17658
17659 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
17660
17661 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
17662 instead of linux-ppc64-low.o.
17663 * linux-ppc64-low.c: Remove file.
17664 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
17665 (linux-ppc64-low.o): Remove rule.
17666
17667 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
17668 (init_registers_powerpc_64): Likewise.
17669 (ppc_regmap): Conditionally define depending on __powerpc64__.
17670 (ppc_cannot_store_register): Do not special-case "fpscr" when
17671 compiled on __powerpc64__.
17672 (ppc_collect_ptrace_register): New function.
17673 (ppc_supply_ptrace_register): New function.
17674 (ppc_breakpoint): Change type to "unsigned int".
17675 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
17676 (the_low_target): Conditionally provide initializers for the
17677 arch_setup member depending on __powerpc64__. Install
17678 collect_ptrace_register and supply_ptrace_register members.
17679
17680 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
17681
17682 * regcache.h (gdbserver_xmltarget): Add extern declaration.
17683 * server.c (gdbserver_xmltarget): Define.
17684 (get_features_xml): Use it to replace "target.xml" and arch_string.
17685
17686 * configure.srv: Remove srv_xmltarget. Add XML files that were
17687 mentioned there to srv_xmlfiles instead. Remove conditional tests
17688 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
17689 srv_xmlfiles and srv_regobj to include all possible choices.
17690 * configure.ac (srv_xmltarget): Remove.
17691 (srv_xmlfiles): Do not add "target.xml".
17692 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
17693 checks for supplementary target information.
17694 * configure: Regenerate.
17695 * Makefile.in (XML_TARGET): Remove.
17696 (target.xml): Remove rule.
17697 (clean): Do not clean up target.xml.
17698 (.PRECIOUS): Do not mention target.xml.
17699
17700 * target.h (struct target_ops): Remove arch_string member.
17701 * linux-low.c (linux_arch_string): Remove.
17702 (linux_target_ops): Remove arch_string initializer.
17703 * linux-low.h (struct linux_target_ops): Remove arch_string member.
17704 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
17705 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
17706 * spu-low.c (spu_arch_string): Remove.
17707 (spu_target_ops): Remove arch_string initializer.
17708 * win32-low.c (win32_arch_string): Remove.
17709 (win32_target_ops): Remove arch_string initializer.
17710 * win32-low.h (struct win32_target_ops): Remove arch_string member.
17711 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
17712 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
17713
17714 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
17715
17716 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
17717 by collect_ptrace_register and supply_ptrace_register hooks.
17718 * linux-low.c (fetch_register): Use supply_ptrace_register callback
17719 instead of checking for the_low_target.left_pad_xfer.
17720 (usr_store_inferior_registers): Use collect_ptrace_register callback
17721 instead of checking for the_low_target.left_pad_xfer.
17722
17723 * linux-s390-low.c (s390_collect_ptrace_register): New function.
17724 (s390_supply_ptrace_register): Likewise.
17725 (s390_fill_gregset): Call s390_collect_ptrace_register.
17726 (the_low_target): Update.
17727
17728 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
17729 (ppc_supply_ptrace_register): Likewise.
17730 (the_low_target): Update.
17731
17732 * linux-i386-low.c (the_low_target): Update.
17733 * linux-x86-64-low.c (the_low_target): Update.
17734
17735 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
17736
17737 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
17738 reg-s390.o and reg-s390x.o.
17739
17740 * linux-low.c (new_inferior): New global variable.
17741 (linux_create_inferior, linux_attach): Set it.
17742 (linux_wait_for_process): Call the_low_target.arch_setup after the
17743 target has stopped for the first time.
17744 (initialize_low): Do not call the_low_target.arch_setup.
17745
17746 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
17747 (s390_set_pc): Likewise.
17748 (s390_arch_setup): New function.
17749 (the_low_target): Use s390_arch_setup as arch_setup routine.
17750
17751 * regcache.c (realloc_register_cache): New function.
17752 (set_register_cache): Call it for each existing regcache.
17753
17754 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
17755
17756 * server.h (init_registers): Remove prototype.
17757
17758 * linux-low.h (struct linux_target_ops): Add arch_setup field.
17759 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
17760 instead of init_registers ().
17761 * linux-arm-low.c (init_registers_arm): Add prototype.
17762 (init_registers_arm_with_iwmmxt): Likewise.
17763 (the_low_target): Add initializer for arch_setup field.
17764 * linux-cris-low.c (init_registers_cris): Add prototype.
17765 (the_low_target): Add initializer for arch_setup field.
17766 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
17767 (the_low_target): Add initializer for arch_setup field.
17768 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
17769 (the_low_target): Add initializer for arch_setup field.
17770 * linux-ia64-low.c (init_registers_ia64): Add prototype.
17771 (the_low_target): Add initializer for arch_setup field.
17772 * linux-m32r-low.c (init_registers_m32r): Add prototype.
17773 (the_low_target): Add initializer for arch_setup field.
17774 * linux-m68k-low.c (init_registers_m68k): Add prototype.
17775 (the_low_target): Add initializer for arch_setup field.
17776 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
17777 (init_registers_mips64_linux): Likewise.
17778 (the_low_target): Add initializer for arch_setup field.
17779 * linux-ppc-low.c (init_registers_ppc): Add prototype.
17780 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
17781 (the_low_target): Add initializer for arch_setup field.
17782 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
17783 (init_registers_powerpc_64): Likewise.
17784 (the_low_target): Add initializer for arch_setup field.
17785 * linux-s390-low.c (init_registers_s390): Add prototype.
17786 (init_registers_s390x): Likewise.
17787 (the_low_target): Add initializer for arch_setup field.
17788 * linux-sh-low.c (init_registers_sh): Add prototype.
17789 (the_low_target): Add initializer for arch_setup field.
17790 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
17791 (the_low_target): Add initializer for arch_setup field.
17792 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
17793 (the_low_target): Add initializer for arch_setup field.
17794
17795 * win32-low.h (struct win32_target_ops): Add arch_setup field.
17796 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
17797 instead of init_registers ().
17798 * win32-arm-low.c (init_registers_arm): Add prototype.
17799 (the_low_target): Add initializer for arch_setup field.
17800 * win32-i386-low.c (init_registers_i386): Add prototype.
17801 (the_low_target): Add initializer for arch_setup field.
17802
17803 * spu-low.c (init_registers_spu): Add prototype.
17804 (initialize_low): Call initialie_registers_spu () instead of
17805 initialize_registers ().
17806
17807 2008-02-19 Pedro Alves <pedro@codesourcery.com>
17808
17809 * server.c (handle_v_requests): When handling the vRun and vAttach
17810 packets, if already debugging a process, don't kill it. Return an
17811 error instead.
17812
17813 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
17814
17815 * server.c (handle_query): Correct length check.
17816
17817 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
17818
17819 * win32-low.c (do_initial_child_stuff): Add process handle
17820 parameter. Set current_process_handle and current_process_id from the
17821 parameters. Clear globals.
17822 (win32_create_inferior): Don't set current_process_handle and
17823 current_process_id here. Instead pass them on the call to
17824 do_initial_child_stuff.
17825 (win32_attach): Likewise.
17826 (win32_clear_inferiors): New.
17827 (win32_kill): Don't close the current process handle or the
17828 current thread handle here. Instead call win32_clear_inferiors.
17829 (win32_detach): Don't open a new handle to the process. Call
17830 win32_clear_inferiors.
17831 (win32_join): Don't rely on current_process_handle; open a new
17832 handle using the process id.
17833 (win32_wait): Call win32_clear_inferiors when the inferior process
17834 has exited.
17835
17836 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
17837
17838 * server.c (monitor_show_help): Add "exit".
17839
17840 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
17841
17842 * Makefile.in (SFILES): Add linux-xtensa-low.c.
17843 (clean): Add reg-xtensa.c.
17844 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
17845 * configure.srv (xtensa*-*-linux*) New target.
17846 * linux-xtensa-low.c: New.
17847 * xtensa-xtregs.c: New.
17848
17849 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
17850
17851 * hostio.c: Don't include errno.h.
17852 (errno_to_fileio_errno): Move to hostio-errno.
17853 * hostio.c: (hostio_error): Remove the error parameter. Defer the
17854 error number outputting to the target->hostio_last_error callback.
17855 (hostio_packet_error): Use FILEIO_EINVAL directly.
17856 (handle_open, handle_pread, hostio_error, handle_unlink): Update
17857 calls to hostio_error.
17858 * hostio-errno.c: New.
17859 * server.h (hostio_last_error_from_errno): Declare.
17860 * target.h (target_ops): Add hostio_last_error member.
17861 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
17862 as hostio_last_error handler.
17863 * spu-low.c (spu_target_ops): Likewise.
17864 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
17865 (wince_hostio_last_error): New functions.
17866 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
17867 as hostio_last_error handler.
17868 (win32_target_ops) [!_WIN32_WCE]: Register
17869 hostio_last_error_from_errno as hostio_last_error handler.
17870 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
17871 (hostio-errno.o): New rule.
17872 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
17873 * configure.srv (srv_hostio_err_objs): New variable. Default to
17874 hostio-errno.o.
17875 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
17876 * configure: Regenerate.
17877
17878 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
17879
17880 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
17881 (linux_kill, linux_detach): Clean up the process list.
17882 * remote-utils.c (remote_open): Improve port number parsing.
17883 (putpkt_binary, input_interrupt): Only send interrupts if the target
17884 is running.
17885 * server.c (extended_protocol): Make static.
17886 (attached): Define earlier.
17887 (exit_requested, response_needed, program_argv): New variables.
17888 (target_running): New.
17889 (start_inferior): Clear attached here.
17890 (attach_inferior): Set attached here.
17891 (require_running): Define.
17892 (handle_query): Use require_running and target_running. Implement
17893 "monitor exit".
17894 (handle_v_attach, handle_v_run): New.
17895 (handle_v_requests): Use require_running. Handle vAttach and vRun.
17896 (gdbserver_usage): Update.
17897 (main): Redo argument parsing. Handle --debug and --multi. Handle
17898 --attach along with other options or after the port. Save
17899 program_argv. Support no initial program. Resynchronize
17900 communication with GDB after an error. Handle "monitor exit".
17901 Use require_running and target_running. Always allow the extended
17902 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
17903 restart in extended mode.
17904 * README: Refer to the GDB manual. Update --attach usage.
17905
17906 2007-12-20 Andreas Schwab <schwab@suse.de>
17907
17908 * linux-low.c (STACK_SIZE): Define.
17909 (linux_tracefork_child): Use it. Use __clone2 on ia64.
17910 (linux_test_for_tracefork): Likewise.
17911
17912 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
17913
17914 * linux-low.c (linux_wait_for_event): Update messages. Do not
17915 reinsert auto-delete breakpoints.
17916 * mem-break.c (struct breakpoint): Change return type of handler to
17917 int.
17918 (set_breakpoint_at): Update handler type.
17919 (reinsert_breakpoint_handler): Return 1 instead of calling
17920 delete_breakpoint.
17921 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
17922 setting a new one.
17923 (check_breakpoints): Delete auto-delete breakpoints and return 2.
17924 * mem-break.h (set_breakpoint_at): Update handler type.
17925 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
17926 * win32-low.c (auto_delete_breakpoint): New.
17927 (get_child_debug_event): Use it.
17928
17929 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
17930
17931 * configure.ac: Check for pread and pwrite.
17932 * hostio.c (handle_pread): Fall back to lseek and read.
17933 (handle_pwrite): Fall back to lseek and write.
17934 * config.in, configure: Regenerated.
17935
17936 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
17937
17938 * server.c (myresume): Add own_buf argument.
17939 (main): Update calls.
17940
17941 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
17942
17943 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
17944 * remote-utils.c (remote_open): Do not call disable_async_io.
17945 (block_async_io): Delete.
17946 (unblock_async_io): Make static.
17947 (initialize_async_io): New.
17948 * server.c (handle_v_cont): Handle async I/O here.
17949 (myresume): Likewise. Move other common resume tasks here...
17950 (main): ... from here. Call initialize_async_io. Disable async
17951 I/O before the main loop.
17952 * server.h (initialize_async_io): Declare.
17953 (block_async_io, unblock_async_io): Delete prototypes.
17954 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
17955
17956 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
17957
17958 * remote-utils.c (readchar): Allow binary data in received messages.
17959
17960 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17961
17962 * win32-low.c (attaching): New global.
17963 (win32_create_inferior): Clear the `attaching' global.
17964 (win32_attach): Set the `attaching' global.
17965 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
17966 attaching. Only set a breakpoint at the entry point if not
17967 attaching.
17968
17969 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17970
17971 * server.c (main): Don't report dll events on the initial
17972 connection on attaches.
17973
17974 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17975
17976 * server.c (main): Relax numerical bases supported for the pid of
17977 the --attach command line argument.
17978
17979 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17980
17981 * win32-low.c (win32_attach): Call OpenProcess before
17982 DebugActiveProcess, not after. Add last error output to error
17983 call.
17984
17985 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17986
17987 * win32-low.c (win32_get_thread_context)
17988 (win32_set_thread_context): New functions.
17989 (thread_rec): Use win32_get_thread_context.
17990 (continue_one_thread, win32_resume): Use win32_set_thread_context.
17991 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
17992 field.
17993
17994 2007-12-03 Leo Zayas
17995 Pedro Alves <pedro_alves@portugalmail.pt>
17996
17997 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
17998 global variables.
17999 (child_add_thread): Minor cleanup.
18000 (child_continue): Resume artificially suspended threads before
18001 calling ContinueDebugEvent.
18002 (suspend_one_thread): New.
18003 (fake_breakpoint_event): New.
18004 (get_child_debug_event): Change return type to int. Check here if
18005 gdb sent an interrupt request. If a soft interrupt was requested,
18006 fake a breakpoint event. Return 0 if there is no event to handle,
18007 and 1 otherwise.
18008 (win32_wait): Don't check here if gdb sent an interrupt request.
18009 Ensure there is a valid event to handle.
18010 (win32_request_interrupt): Add soft interruption method as last
18011 resort.
18012
18013 2007-12-03 Leo Zayas
18014 Pedro Alves <pedro_alves@portugalmail.pt>
18015
18016 * win32-low.h (win32_thread_info): Add descriptions to the
18017 structure members. Replace `suspend_count' counter by a
18018 `suspended' flag.
18019 * win32-low.c (thread_rec): Update condition of when to get the
18020 context from the inferior. Rely on ContextFlags being set if it
18021 has already been retrieved. Only suspend the inferior thread if
18022 we haven't already. Warn if that fails.
18023 (continue_one_thread): s/suspend_count/suspended/. Only call
18024 ResumeThread once. Warn if that fails.
18025
18026 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
18027
18028 * win32-low.c (win32_wait): Don't read from the inferior when it
18029 has already exited.
18030
18031 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
18032
18033 * Makefile.in (win32_low_h): New variable.
18034 (win32-low.o): Add dependency on $(win32_low_h).
18035 (win32-arm-low.o, win32-i386-low.o): New rules.
18036
18037 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
18038
18039 * hostio.c: Correct copyright year.
18040
18041 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
18042
18043 * Makefile.in (OBS): Add hostio.o.
18044 (hostio.o): New rule.
18045 * server.h (handle_vFile): Declare.
18046 * hostio.c: New file.
18047 * server.c (handle_v_requests): Take packet_len and new_packet_len
18048 for binary packets. Call handle_vFile.
18049 (main): Update call to handle_v_requests.
18050
18051 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
18052
18053 * linux-low.c: Include <sched.h>.
18054
18055 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
18056
18057 * linux-low.c (linux_tracefork_grandchild): New.
18058 (linux_tracefork_child): Use clone.
18059 (linux_test_for_tracefork): Use clone; allocate and free a stack.
18060
18061 2007-10-31 Joel Brobecker <brobecker@adacore.com>
18062
18063 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
18064
18065 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
18066
18067 * linux-low.c (handle_extended_wait): Handle unexpected signals.
18068
18069 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
18070
18071 * inferiors.c (change_inferior_id): Delete.
18072 (add_pid_to_list, pull_pid_from_list): New.
18073 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
18074 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
18075 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
18076 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
18077 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
18078 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
18079 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
18080 (using_threads): Always set to 1.
18081 (handle_extended_wait): New.
18082 (add_process): Do not set TID.
18083 (linux_create_inferior): Set must_set_ptrace_flags.
18084 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
18085 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
18086 (linux_thread_alive): Rename TID argument to LWPID.
18087 (linux_wait_for_process): Handle unknown processes. Do not use TID.
18088 (linux_wait_for_event): Do not use TID or check using_threads. Update
18089 call to dead_thread_notify. Call handle_extended_wait.
18090 (linux_create_inferior): Use PTRACE_SETOPTIONS.
18091 (send_sigstop): Delete sigstop_sent.
18092 (wait_for_sigstop): Avoid TID.
18093 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
18094 (linux_test_for_tracefork): New.
18095 (linux_lookup_signals): Use thread_db_active and
18096 linux_supports_tracefork_flag.
18097 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
18098 * linux-low.h (get_process_thread): Avoid TID.
18099 (struct process_ifo): Move thread_known and tid to the end. Remove
18100 sigstop_sent.
18101 (linux_attach_lwp, thread_db_init): Update prototypes.
18102 * server.h (change_inferior_id): Delete prototype.
18103 (add_pid_to_list, pull_pid_from_list): New prototypes.
18104 * thread-db.c (thread_db_use_events): New.
18105 (find_first_thread): Rename to...
18106 (find_one_thread): ...this. Update callers and messages. Do not
18107 call fatal. Check thread_db_use_events. Do not call
18108 change_inferior_id or new_thread_notify.
18109 (maybe_attach_thread): Update. Do not call new_thread_notify.
18110 (thread_db_init): Set thread_db_use_events. Check use_events.
18111 * utils.c (fatal, warning): Correct message prefix.
18112
18113 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
18114
18115 * Makefile.in (clean): Remove new files.
18116 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
18117 (powerpc-64.o, powerpc-64.c): New rules.
18118 * configure.srv: Use alternate register sets for powerpc64-*-linux*
18119 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
18120 with SPE.
18121 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
18122 SPE targets.
18123 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
18124 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
18125 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
18126 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
18127 (target_regsets): Add AltiVec and SPE register sets.
18128 * configure.ac: Check for AltiVec and SPE.
18129 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
18130 (ppc_fill_vrregset, ppc_store_vrregset): New.
18131 (target_regsets): Add AltiVec register set.
18132 * configure: Regenerated.
18133
18134 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
18135
18136 * linux-low.c (O_LARGEFILE): Define.
18137 (linux_read_memory): Use /proc/PID/mem.
18138 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
18139 * configure, config.in: Regenerated.
18140
18141 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
18142
18143 * linux-low.c (linux_wait_for_event): Do not pass signals while
18144 single-stepping.
18145
18146 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
18147
18148 * win32-low.c (create_process): New.
18149 (win32_create_inferior): Use create_process instead of
18150 CreateProcess. If create_process failed retry appending an ".exe"
18151 suffix. Store the GetLastError result immediatelly after
18152 create_process calls and use it on the call to error.
18153
18154 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
18155
18156 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
18157
18158 2007-08-23 Joel Brobecker <brobecker@adacore.com>
18159
18160 * configure.ac: Switch license to GPLv3.
18161
18162 2007-08-01 Michael Snyder <msnyder@access-company.com>
18163
18164 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
18165
18166 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
18167
18168 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
18169 typedef.
18170 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
18171 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
18172 CloseToolhelp32Snapshot.
18173 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
18174 CloseToolhelp32Snapshot.
18175
18176 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
18177
18178 * server.c (main): Check for inferior exit before main loop.
18179
18180 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
18181
18182 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
18183 instead of on tmp_desc.
18184
18185 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
18186 Daniel Jacobowitz <dan@codesourcery.com>
18187
18188 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
18189 (add_thread): Minor cleanups.
18190 (clear_inferiors): Move lower in the file. Clear the DLL
18191 list.
18192 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
18193 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
18194 (xml_escape_text): New.
18195 * server.c (handle_query): Handle qXfer:libraries:read. Report it
18196 for qSupported.
18197 (handle_v_cont): Report errors.
18198 (gdbserver_version): Update.
18199 (main): Correct size of own_buf. Do not report initial DLL events.
18200 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
18201 (unloaded_dll, xml_escape_text): New.
18202 * win32-low.c (enum target_waitkind): Update comments.
18203 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
18204 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
18205 (win32_EnumProcessModules, win32_GetModuleInformation)
18206 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
18207 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
18208 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
18209 (win32_Module32First, win32_Module32Next, load_toolhelp)
18210 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
18211 (get_child_debug_event): Handle DLL events.
18212 (win32_wait): Likewise.
18213
18214 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
18215
18216 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
18217 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
18218
18219 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
18220
18221 * win32-low.c (handle_output_debug_string): Ignore event if not
18222 waiting.
18223
18224 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
18225
18226 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
18227
18228 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
18229
18230 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
18231
18232 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
18233
18234 * inferiors.c (change_inferior_id): Add comment.
18235 * linux-low.c (check_removed_breakpoint): Add an early
18236 prototype. Improve debug output.
18237 (linux_attach): Doc update.
18238 (linux_detach_one_process, linux_detach): Clean up before releasing
18239 each process.
18240 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
18241 * linux-low.h (struct process_info): Doc improvement.
18242 * mem-break.c (delete_all_breakpoints): New.
18243 * mem-break.h (delete_all_breakpoints): New prototype.
18244 * thread-db.c (find_first_thread): New.
18245 (thread_db_create_event): Call it instead of
18246 thread_db_find_new_threads. Clean up unused variables.
18247 (maybe_attach_thread): Remove first thread handling.
18248 (thread_db_find_new_threads): Use find_first_thread.
18249 (thread_db_get_tls_address): Likewise.
18250
18251 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
18252
18253 * thread-db.c (thread_db_find_new_threads): Add prototype.
18254 (thread_db_create_event): Check for the main thread before adding
18255 a new thread.
18256 (maybe_attach_thread): Only enable event reporting if TID == 0.
18257 (thread_db_get_tls_address): Check for new threads.
18258
18259 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
18260
18261 * linux-low.c (linux_create_inferior): Try execv before execvp.
18262 * spu-low.c (spu_create_inferior): Likewise.
18263
18264 2007-06-13 Mike Frysinger <vapier@gentoo.org>
18265
18266 * linux-low.c (linux_create_inferior): Change execv to execvp.
18267 * spu-low.c (spu_create_inferior): Likewies.
18268
18269 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
18270
18271 * Makefile.in (clean): Clean new files instead of deleted ones.
18272 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
18273 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
18274 rules.
18275 * configure.srv: Specify XML files and new regformats for MIPS and
18276 MIPS64 GNU/Linux.
18277 * linux-mips-low.c (mips_num_regs): Set to only used registers.
18278 (mips_regmap): Do not fetch $0. Remove unused registers. Add
18279 an entry for the restart register.
18280 (mips_cannot_fetch_register, mips_cannot_store_register)
18281 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
18282 register names to match the XML descriptions.
18283 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
18284 restart register instead of $0.
18285
18286 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
18287 Markus Deuling <deuling@de.ibm.com>
18288
18289 * remote-utils.c (decode_xfer_write): New function.
18290 * server.h (decode_xfer_write): Add prototype.
18291 * server.c (handle_query): Add PACKET_LEN argument. Support
18292 qXfer:spu:read and qXfer:spu:write packets.
18293 (main): Pass packet_len to handle_query.
18294 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
18295 * target.h (target_ops): Add qxfer_spu.
18296
18297 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
18298
18299 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
18300 accessing non-seekable spufs files.
18301
18302 2007-05-16 Markus Deuling <deuling@de.ibm.com>
18303
18304 * server.c (handle_query): Add reply for qC packet.
18305
18306 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
18307 Leo Zayas <lerele@champenstudios@com>
18308
18309 * server.h (check_remote_input_interrupt_request): New function.
18310 * remote_utils.c (INVALID_DESCRIPTOR): New define.
18311 (remote_desc): Initialize with INVALID_DESCRIPTOR.
18312 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
18313 (check_remote_input_interrupt_request): New function.
18314 * server.h (check_remote_input_interrupt_request): Declare.
18315 * win32-low.c (winapi_DebugBreakProcess,
18316 winapi_GenerateConsoleCtrlEvent): New typedefs.
18317 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
18318 to 250 ms.
18319 (win32_wait): Check for remote interrupt request
18320 with check_remote_input_interrupt_request.
18321 (win32_request_interrupt): New function.
18322 (win32_target_op): Set request_interrupt to win32_request_interrupt.
18323
18324 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
18325
18326 * win32-low.c (debug_registers_changed,
18327 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
18328 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
18329 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
18330 (thread_rec): Get context using the low target.
18331 (child_add_thread): Call thread_added on the low target,
18332 which does the same thing.
18333 (regptr): Delete.
18334 (do_initial_child_stuff): Remove debug registers references.
18335 Set context using the low target. Resume threads after
18336 setting the contexts.
18337 (child_continue): Remove dead variable. Remove debug
18338 registers references.
18339 (child_fetch_inferior_registers): Go through the low target.
18340 (do_child_store_inferior_registers): Remove.
18341 (child_store_inferior_registers): Go through the low target.
18342 (win32_resume): Remove debug registers references.
18343 Set context using the low target.
18344 (handle_exception): Change return type to void. Don't record
18345 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
18346 first chance exception.
18347 (get_child_debug_event): Change return type to void. Remove
18348 goto loop. Always return after waiting for debug event.
18349 (win32_wait): Convert to switch statement. Handle spurious
18350 events.
18351
18352 * win32-i386-low.c (debug_registers_changed,
18353 debug_registers_used): New.
18354 (initial_stuff): Rename to ...
18355 (i386_initial_stuff): ... this. Clear debug registers
18356 state variables.
18357 (store_debug_registers): Delete.
18358 (i386_get_thread_context): New.
18359 (load_debug_registers): Delete.
18360 (i386_set_thread_context): New.
18361 (i386_thread_added): New.
18362 (single_step): Rename to ...
18363 (i386_single_step): ... this.
18364 (do_fetch_inferior_registers): Rename to ...
18365 (i386_fetch_inferior_register): ... this.
18366 (i386_store_inferior_register): New.
18367 (the_low_target): Adapt to new interface.
18368
18369 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
18370 (arm_get_thread_context): New.
18371 (arm_set_thread_context): New.
18372 (regptr): New.
18373 (do_fetch_inferior_registers): Rename to ...
18374 (arm_fetch_inferior_register): ... this.
18375 (arm_store_inferior_register): New.
18376 (arm_wince_breakpoint): Reimplement as unsigned long.
18377 (arm_wince_breakpoint_len): Define.
18378 (the_low_target): Adapt to new interface.
18379
18380 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
18381 load_debug_registers. Add get_thread_context, set_thread_context,
18382 thread_added and store_inferior_register. Rename
18383 fetch_inferior_registers to fetch_inferior_register.
18384 (regptr): Remove declaration.
18385
18386 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
18387
18388 * linux-low.c (linux_detach): Change return type to int. Return 0.
18389 * spu-low.c (spu_detach): Likewise.
18390
18391 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
18392
18393 * target.h (target_ops): Change return type of detach to int.
18394 Add join.
18395 (join_inferior): New.
18396 * server.c (main): Don't skip detach support on mingw32.
18397 If the inferior doesn't support detaching return error.
18398 Call join_inferior instead of using waitpid.
18399 * linux-low.c (linux_join): New.
18400 (linux_target_op): Add linux_join.
18401 * spu-low.c (spu_join): New.
18402 (spu_target_ops): Add spu_join.
18403 * win32-low.c (win32_detach): Adapt to new interface.
18404 Reopen current_process_handle before detaching. Issue a child
18405 resume before detaching.
18406 (win32_join): New.
18407 (win32_target_op): Add win32_join.
18408
18409 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
18410
18411 * win32-low.c (win32-attach): Fix return value.
18412 * target.h (target_ops): Describe ATTACH return values.
18413
18414 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
18415
18416 * win32-low.c (GETPROCADDRESS): Define.
18417 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
18418 (winapi_DebugSetProcessKillOnExit): Likewise.
18419 (win32_create_inferior): Force usage of ansi CreateProcessA.
18420 (win32_attach): Use GETPROCADDRESS.
18421 (win32_detach): Likewise.
18422
18423 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
18424
18425 * win32-low.c (win32_wait): Don't use WSTOPSIG.
18426
18427 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
18428
18429 * win32-low.c: Commit leftover changes from 2007-03-29.
18430
18431 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
18432
18433 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
18434 fields short instead of int. Add explicit padding.
18435 (i387_cache_to_fsave): Remove unnecessary casts.
18436 (i387_fsave_to_cache): Doc fix.
18437 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
18438
18439 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
18440
18441 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
18442 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
18443
18444 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
18445
18446 * configure.srv (arm*-*-mingw32ce*): Move near the other
18447 arm targets.
18448
18449 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
18450
18451 * configure.ac: Add errno checking.
18452 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
18453 sys/file.h and malloc.h.
18454 (AC_CHECK_DECLS): Add perror.
18455 (srv_mingwce): Handle.
18456 * configure.srv (i[34567]86-*-cygwin*): Add
18457 win32-i386-low.o to srv_tgtobj.
18458 (i[34567]86-*-mingw*): Likewise.
18459 (arm*-*-mingw32ce*): Add case.
18460 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
18461 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
18462 [__MINGW32CE__] (strerror): New function.
18463 [__MINGW32CE__] (errno): Define to GetLastError.
18464 [__MINGW32CE__] (COUNTOF): New macro.
18465 (remote_open): Remove extra close call.
18466 * mem-break.c (delete_breakpoint_at): New function.
18467 * mem-break.h (delete_breakpoint_at): Declare.
18468 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
18469 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
18470 [USE_WIN32API] (read, write): Add char* casts.
18471 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
18472 * server.h: Include wincecompat.h on Windows CE.
18473 [HAVE_ERRNO_H]: Check.
18474 (perror): Declare if not declared.
18475 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
18476 (perror_with_name): Remove errno declaration.
18477 * wincecompat.h: New.
18478 * wincecompat.c: New.
18479 * win32-low.h: New.
18480 * win32-arm-low.c: New.
18481 * win32-i386-low.c: New.
18482 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
18483 (OUTMSG2): Make it safe.
18484 (_T): New macro.
18485 (COUNTOF): New macro.
18486 (NUM_REGS): Get it from the low target.
18487 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
18488 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
18489 (thread_rec): Let low target handle debug registers.
18490 (child_add_thread): Likewise.
18491 (child_init_thread_list): Likewise.
18492 (continue_one_thread): Likewise.
18493 (regptr): New.
18494 (do_child_fetch_inferior_registers): Move to ...
18495 * win32-i386-low.c: ... here, and rename to ...
18496 (do_fetch_inferior_registers): ... this.
18497 * win32-low.c (child_fetch_inferior_registers):
18498 Go through the low target.
18499 (do_child_store_inferior_registers): Use regptr.
18500 (strwinerror): New function.
18501 (win32_create_inferior): Handle Windows CE.
18502 Use strwinerror instead of strerror on Windows error
18503 codes. Add program to the error output.
18504 Don't close the main thread handle on Windows CE.
18505 (win32_attach): Use coredll.dll on Windows CE.
18506 (win32_kill): Close current process and current
18507 thread handles.
18508 (win32_detach): Use coredll.dll on Windows CE.
18509 (win32_resume): Let low target handle debug registers, and
18510 step request.
18511 (handle_exception): Add/Remove initial breakpoint. Avoid
18512 non-existant WSTOPSIG on Windows CE.
18513 (win32_read_inferior_memory): Cast to remove warning.
18514 (win32_arch_string): Go through the low target.
18515 (initialize_low): Call set_breakpoint_data with the low
18516 target's breakpoint.
18517 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
18518 FOP_REGNUM, mappings): Move to ...
18519 * win32-i386-low.c: ... here.
18520 * win32-low.c (win32_thread_info): Move to ...
18521 * win32-low.h: ... here.
18522 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
18523 win32-arm-low.c and wincecompat.c.
18524 (all:): Add $EXEEXT.
18525 (install-only:): Likewise.
18526 (gdbserver:): Likewise.
18527 (gdbreplay:): Likewise.
18528 * config.in: Regenerate.
18529 * configure: Regenerate.
18530
18531 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
18532
18533 * win32-low.c: Rename typedef thread_info to
18534 win32_thread_info throughout.
18535
18536 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
18537
18538 * win32-i386-low.c: Rename to ...
18539 * win32-low.c: ... this.
18540 * configure.srv: Replace win32-i386-low.o with win32-low.o.
18541 * Makefile.in: Likewise.
18542
18543 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
18544
18545 * remote-utils.c (monitor_output): Constify msg parameter.
18546 * server.h (monitor_output): Likewise.
18547 * win32-i386-low.c (handle_output_debug_string): New.
18548 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
18549 handle_output_debug_string.
18550 (get_child_debug_event): Likewise.
18551
18552 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
18553
18554 * server.c (main): Correct strtoul check.
18555
18556 2007-03-27 Jon Ringle <jon@ringle.org>
18557
18558 * linux-low.c: Check __ARCH_HAS_MMU__ also.
18559
18560 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
18561
18562 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
18563
18564 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
18565
18566 * terminal.h: Check HAVE_SGTTY_H.
18567
18568 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
18569
18570 * remote-utils.c (remote_open): Print out the assigned port number.
18571
18572 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
18573
18574 * remote-utils.c (monitor_output): New function.
18575 * server.c (debug_threads): Define here.
18576 (monitor_show_help): New function.
18577 (handle_query): Handle qRcmd.
18578 (main): Do not handle 'd' packet.
18579 * server.h (debug_threads, remote_debug, monitor_output): Declare.
18580 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
18581 of debug_threads.
18582
18583 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
18584
18585 * Makefile.in (EXEEXT): New.
18586 (clean): Use $(EXEEXT).
18587
18588 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
18589
18590 * target.h (target_ops): Rename send_signal to request_interrupt,
18591 and remove enum target_signal parameter.
18592 * linux-low.c (linux_request_interrupt): Rename from
18593 linux_send_signal, and always send SIGINT.
18594 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
18595 and always send SIGINT.
18596 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
18597 of send_signal.
18598 (input_interrupt): Likewise.
18599
18600 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
18601
18602 * server.c (get_features_xml): Check if target implemented
18603 arch_string.
18604 * win32-i386-low.c (win32_arch_string): New.
18605 (win32_target_ops): Add win32_arch_string as arch_string member.
18606
18607 2007-02-22 Markus Deuling <deuling@de.ibm.com>
18608
18609 * spu-low.c (spu_arch_string): New.
18610 (spu_target_ops): Add spu_arch_string.
18611
18612 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
18613
18614 * remote-utils.c: Remove HAVE_TERMINAL_H check.
18615 * configure.ac: Do not check for terminal.h.
18616 * configure, config.in: Regenerated.
18617
18618 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
18619
18620 * Makefile.in (OBS): Add $(XML_BUILTIN).
18621 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
18622 (clean): Update.
18623 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
18624 (arm-with-iwmmxt.c): New.
18625 * config.in, configure: Regenerate.
18626 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
18627 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
18628 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
18629 (arm*-*-linux*): Add iWMMXt and regset support.
18630 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
18631 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
18632 (arm_store_wmmxregset, target_regsets): New.
18633 * server.c (get_features_xml): Take annex argument. Check builtin
18634 XML documents.
18635 (handle_query): Handle multiple annexes.
18636
18637 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
18638
18639 * remote-utils.c [USE_WIN32API] (read, write): Define.
18640 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
18641 write.
18642
18643 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
18644
18645 * linux-i386-low.c (the_low_target): Set arch_string.
18646 * linux-x86-64-low.c (the_low_target): Likewise.
18647 * linux-low.c (linux_arch_string): New.
18648 (linux_target_ops): Add it.
18649 * linux-low.h (struct linux_target_ops): Add arch_string.
18650 * server.c (write_qxfer_response): Use const void * for DATA.
18651 (get_features_xml): New.
18652 (handle_query): Handle qXfer:features:read. Report it for qSupported.
18653 * target.h (struct target_ops): Add arch_string method.
18654
18655 2007-01-03 Denis Pilat <denis.pilat@st.com>
18656 Daniel Jacobowitz <dan@codesourcery.com>
18657
18658 * linux-low.c (linux_kill): Handle being called with no threads.
18659 * win32-i386-low.c (win32_kill): Likewise.
18660 (get_child_debug_event): Clear current_process_handle.
18661
18662 2006-12-30 Denis PILAT <denis.pilat@st.com>
18663 Daniel Jacobowitz <dan@codesourcery.com>
18664
18665 * remote-utils.c (remote_open): Check the type of specified
18666 serial port devices before opening them.
18667 * server.c (main): Kill the inferior if an error occurs during
18668 the first remote_open.
18669
18670 2006-12-05 Markus Deuling <deuling@de.ibm.com>
18671
18672 * README: Update supported targets.
18673
18674 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
18675
18676 * Makefile.in (clean): Remove reg-mips64.c.
18677 (reg-mips64.c, reg-mips64.o): New rules.
18678 * configure.srv: Handle mips64. Include regset support for mips.
18679 * linux-mips-low.c (union mips_register): New.
18680 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
18681 (mips_breakpoint, mips_breakpoint_at): Use int.
18682 (mips_collect_register, mips_supply_register)
18683 (mips_collect_register_32bit, mips_supply_register_32bit)
18684 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
18685 (mips_store_fpregset, target_regsets): New.
18686 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
18687
18688 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
18689
18690 * configure.srv: Add target "spu*-*-*".
18691 * Makefile.in (clean): Remove reg-spu.c.
18692 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
18693 * spu-low.c: New file.
18694
18695 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
18696
18697 * configure.ac: Correct td_thr_tls_get_addr test.
18698 * configure: Regenerated.
18699
18700 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
18701
18702 * linux-low.c (linux_wait_for_event): Reformat. Use the
18703 pass_signals array.
18704 * remote-utils.c (decode_address_to_semicolon): New.
18705 * server.c (pass_signals, handle_general_set): New.
18706 (handle_query): Mention QPassSignals for qSupported.
18707 (main): Call handle_general_set.
18708 * server.h (pass_signals, decode_address_to_semicolon): New.
18709
18710 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
18711
18712 * server.c (handle_query): Correct error handling for read_auxv.
18713
18714 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
18715
18716 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
18717 and srv_linux_thread_db to yes.
18718 * linux-s390-low.c (s390_fill_gregset): New function.
18719 (target_regsets): Define data structure.
18720
18721 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
18722
18723 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
18724 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
18725 * config.in, configure: Regenerated.
18726 * inferiors.c (gdb_id_to_thread): New function.
18727 (gdb_id_to_thread_id): Use it.
18728 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
18729 * linux-low.h (struct process_info): Add th member.
18730 (thread_db_get_tls_address): New prototype.
18731 * remote-utils.c (decode_address): Make non-static.
18732 * server.c (handle_query): Handle qGetTLSAddr.
18733 * server.h (gdb_id_to_thread, decode_address): New prototypes.
18734 * target.h (struct target_ops): Add get_tls_address.
18735 * thread-db.c (maybe_attach_thread): Save the thread handle.
18736 (thread_db_get_tls_address): New.
18737
18738 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
18739
18740 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
18741 (linux_resume_one_process): Take a siginfo_t *. Update all
18742 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
18743 (struct pending_signals): Add a siginfo_t.
18744 (linux_wait_for_process): Always set last_status.
18745 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
18746 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
18747 * linux-low.h (struct process_info): Add last_status.
18748
18749 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
18750
18751 * remote-utils.c (try_rle): New function.
18752 (putpkt_binary): Use it.
18753
18754 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
18755
18756 * Makefile.in (clean): Clean reg-x86-64-linux.c.
18757 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
18758 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
18759 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
18760 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
18761 point registers.
18762
18763 2006-08-08 Richard Sandiford <richard@codesourcery.com>
18764
18765 * server.c (terminal_fd): New variable.
18766 (old_foreground_pgrp): Likewise.
18767 (restore_old_foreground_pgrp): New function.
18768 (start_inferior): Record the terminal file descriptor in terminal_fd
18769 and its original foreground group in old_foreground_pgrp. Register
18770 restore_old_foreground_pgrp with atexit().
18771
18772 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
18773
18774 * server.c (handle_query): Correct qPart to qXfer.
18775
18776 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
18777
18778 * configure.ac: Check for more headers which are missing on
18779 Windows. Automatically supply -lwsock32 and USE_WIN32API.
18780 * configure.srv: Add Cygwin and mingw32.
18781 * remote-utils.c: Don't include headers unconditionally which
18782 are missing on mingw32. Include <winsock.h> for mingw32.
18783 (remote_open): Adjust for mingw32 support. Flush
18784 standard error after writing to it.
18785 (remote_close, putpkt_binary, input_interrupt, block_async_io)
18786 (unblock_async_io, enable_async_io, disable_async_io)
18787 (readchar, getpkt): Update for Winsock support.
18788 (prepare_resume_reply): Expect a protocol signal number.
18789 * server.c: Disable <sys/wait.h> on mingw32.
18790 (start_inferior): Adjust for mingw32 support. Flush
18791 standard error after writing to it.
18792 (attach_inferior): Likewise. Use protocol signal
18793 numbers.
18794 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
18795 and names.
18796 * win32-i386-low.c: New file.
18797 * Makefile.in (XM_CLIBS): Set.
18798 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
18799 (win32-i386-low.o): New dependency rule.
18800 * linux-low.c (linux_wait): Use target signal numbers.
18801 * target.h (struct target_ops): Doc fix.
18802 * server.h (target_signal_to_name): New prototype.
18803 * gdbreplay.c: Don't include headers unconditionally which
18804 are missing on mingw32. Include <winsock.h> for mingw32.
18805 (remote_close, remote_open): Adjust for Winsock support.
18806 * configure, config.in: Regenerated.
18807
18808 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
18809
18810 * server.c (decode_xfer_read, write_qxfer_response): New.
18811 (handle_query): Take a packet length argument. Handle
18812 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
18813 the qSupported response.
18814 (main): Update call to handle_query.
18815
18816 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
18817
18818 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
18819 (putpkt_binary): Renamed from putpkt and adjusted for binary
18820 data.
18821 (putpkt): New wrapper for putpkt_binary.
18822 (readchar): Don't mask off the high bit.
18823 (decode_X_packet): New function.
18824 * server.c (main): Call putpkt_binary if a handler sets the packet
18825 length. Save the length of the incoming packet. Handle 'X'.
18826 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
18827
18828 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
18829
18830 * server.c (handle_query): Handle qSupported.
18831
18832 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
18833
18834 * remote-utils.c (all_symbols_looked_up): New variable.
18835 (look_up_one_symbol): Check it.
18836 * server.h (look_up_one_symbol): New declaration.
18837 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
18838
18839 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
18840
18841 * Makefile.in (linux-arm-low.o): Update dependencies.
18842 * linux-arm-low.c: Include "gdb_proc_service.h".
18843 (PTRACE_GET_THREAD_AREA): Define.
18844 (ps_get_thread_area): New function.
18845
18846 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
18847
18848 * configure.srv (m68k*-*-uclinux*): New target.
18849 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
18850 (linux_resume_one_process): Remove extraneous cast.
18851 (linux_read_offsets): New.
18852 (linux_target_op): Add linux_read_offsets on mmuless systems.
18853 * server.c (handle_query): Add qOffsets logic.
18854 * target.h (struct target_ops): Add read_offsets.
18855
18856 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
18857
18858 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
18859 (PTRACE_GET_THREAD_AREA): Define.
18860 (ps_get_thread_area): New function.
18861 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
18862 (linux-x86-64-low.o): Update.
18863
18864 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
18865
18866 * configure.ac: Remove checks for prfpregset_t.
18867 * gdb_proc_service.h: New file.
18868 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
18869 new "gdb_proc_service.h".
18870 * proc-service.c: Likewise.
18871 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
18872 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
18873 * Makefile.in (gdb_proc_service_h): Updated.
18874 * configure, config.in: Regenerated.
18875
18876 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
18877
18878 * remote-utils.c (prepare_resume_reply): Move declaration
18879 of gdb_id_from_wait to the top of the block.
18880
18881 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
18882
18883 * linux-low.c (regsets_store_inferior_registers): Read the regset
18884 from the target before filling it.
18885
18886 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
18887
18888 * server.c (attach_inferior): Return SIGTRAP for a successful
18889 attach.
18890
18891 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
18892
18893 * Makefile.in (OBS): Add version.o.
18894 (STAGESTUFF): Delete.
18895 (version.o): Add dependencies.
18896 (version.c): Replace rule.
18897 (clean): Remove version.c.
18898 * server.c (gdbserver_version): New.
18899 (gdbserver_usage): Use printf.
18900 (main): Handle --version and --help.
18901 * server.h (version, host_name): Add declarations.
18902
18903 2005-12-23 Eli Zaretskii <eliz@gnu.org>
18904
18905 * linux-arm-low.c:
18906 * linux-arm-low.c:
18907 * inferiors.c:
18908 * i387-fp.h:
18909 * i387-fp.c:
18910 * gdbreplay.c:
18911 * regcache.c:
18912 * proc-service.c:
18913 * mem-break.h:
18914 * mem-break.c:
18915 * linux-x86-64-low.c:
18916 * linux-sh-low.c:
18917 * linux-s390-low.c:
18918 * linux-ppc64-low.c:
18919 * linux-ppc-low.c:
18920 * linux-mips-low.c:
18921 * linux-m68k-low.c:
18922 * linux-m32r-low.c:
18923 * linux-low.h:
18924 * linux-low.c:
18925 * linux-ia64-low.c:
18926 * linux-i386-low.c:
18927 * linux-crisv32-low.c:
18928 * thread-db.c:
18929 * terminal.h:
18930 * target.h:
18931 * target.c:
18932 * server.h:
18933 * server.c:
18934 * remote-utils.c:
18935 * regcache.h:
18936 * utils.c:
18937 * Makefile.in:
18938 * configure.ac:
18939 * gdbserver.1: Add (C) after Copyright. Update the FSF
18940 address.
18941
18942 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
18943
18944 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
18945 (arm_breakpoint_at): Recognize both breakpoints.
18946 (the_low_target): Use the correct breakpoint instruction.
18947
18948 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
18949
18950 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
18951 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
18952 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
18953 (the_low_target): Update.
18954
18955 2005-10-25 Andreas Schwab <schwab@suse.de>
18956
18957 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
18958
18959 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
18960 (ia64_num_regs): Reduce to 462.
18961
18962 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
18963
18964 * acinclude.m4: Correct quoting.
18965 * aclocal.m4: Regenerated.
18966
18967 Suggested by SZOKOVACS Robert <szo@ies.hu>:
18968 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
18969 (thread_db_init): Call thread_db_err_str.
18970 * configure.ac: Check for TD_VERSION.
18971 * config.in, configure: Regenerated.
18972
18973 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18974
18975 * server.h (error, fatal, warning): Add ATTR_FORMAT.
18976
18977 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
18978
18979 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
18980 is not available. Define HAVE_PTRACE_GETREGS if it is.
18981 * config.in, configure: Regenerated.
18982 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
18983 * linux-i386-low.c, linux-m68k-low.c: Update to use
18984 HAVE_PTRACE_GETREGS.
18985 * linux-low.c (regsets_fetch_inferior_registers)
18986 (regsets_store_inferior_registers): Only return 0 if we processed
18987 GENERAL_REGS.
18988 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
18989 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
18990
18991 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
18992
18993 * inferiors.c (struct thread_info): Add gdb_id.
18994 (add_thread): Add gdb_id argument.
18995 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
18996 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
18997 calls to add_thread.
18998 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
18999 * server.c (handle_query): Use thread_to_gdb_id.
19000 (handle_v_cont, main): Use gdb_id_to_thread_id.
19001 * server.h (add_thread): Update prototype.
19002 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
19003 prototypes.
19004
19005 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
19006
19007 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
19008 left-padded registers.
19009 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
19010 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
19011
19012 2005-07-01 Steve Ellcey <sje@cup.hp.com>
19013
19014 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
19015 * configure: Regenerate.
19016 * config.in: Regenerate.
19017 * server.h (NEED_DECLARATION_STRERROR):
19018 Replace with !HAVE_DECL_STRERROR.
19019
19020 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
19021
19022 * linux-low.c (linux_wait, linux_send_signal): Don't test
19023 an unsigned long variable for > 0 if it could be MAX_ULONG.
19024 * server.c (myresume): Likewise.
19025 * target.c (set_desired_inferior): Likewise.
19026
19027 2005-06-13 Mark Kettenis <kettenis@gnu.org>
19028
19029 * configure.ac: Simplify and improve check for socklen_t.
19030 * configure, config.in: Regenerate.
19031
19032 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
19033
19034 * acconfig.h: Remove.
19035 * configure.ac: Add a test for socklen_t. Use three-argument
19036 AC_DEFINE throughout.
19037 * config.in: Regenerated using autoheader 2.59.
19038 * configure: Regenerated.
19039
19040 * gdbreplay.c (socklen_t): Provide a default.
19041 (remote_open): Use socklen_t.
19042 * remote-utils.c (socklen_t): Provide a default.
19043 (remote_open): Use socklen_t.
19044 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
19045 unsigned char.
19046
19047 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
19048 char for buffers.
19049 * linux-low.c (linux_read_memory, linux_write_memory)
19050 (linux_read_auxv): Likewise.
19051 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
19052 (check_mem_write): Likewise.
19053 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
19054 Likewise.
19055 * regcache.c (struct inferior_rgcache_data, registers_to_string)
19056 (registers_from_string, register_data): Likewise.
19057 * server.c (handle_query, main): Likewise.
19058 * server.h (convert_ascii_to_int, convert_int_to_ascii)
19059 (decode_M_packet): Likewise.
19060 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
19061 * target.h (struct target_ops): Update read_memory, write_memory,
19062 and read_auxv.
19063 (read_inferior_memory, write_inferior_memory): Update.
19064 * linux-low.h (struct linux_target_ops): Change type of breakpoint
19065 to unsigned char *.
19066 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
19067 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
19068 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
19069 linux-s390-low.c, linux-sh-low.c: Update for changes in
19070 read_inferior_memory and the_low_target->breakpoint.
19071
19072 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
19073
19074 * Makefile.in (SFILES): Add linux-ppc64-low.c.
19075 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
19076 * configure.srv: Add powerpc64-*-linux*.
19077 * linux-ppc64-low.c: New file.
19078
19079 2005-05-23 Orjan Friberg <orjanf@axis.com>
19080
19081 * linux-cris-low.c: New file with support for CRIS.
19082 * linux-crisv32-low.c: Ditto for CRISv32.
19083 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
19084 (clean): Add reg-cris.c and reg-crisv32.c.
19085 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
19086 reg-crisv32.o, and reg-crisv32.c to make rules.
19087 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
19088 recognized targets.
19089
19090 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
19091
19092 * linux-low.c (fetch_register): Ensure buffer size is a multiple
19093 of sizeof (PTRACE_XFER_TYPE).
19094 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
19095
19096 2005-05-12 Orjan Friberg <orjanf@axis.com>
19097
19098 * target.h (struct target_ops): Add insert_watchpoint,
19099 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
19100 pointers for hardware watchpoint support.
19101 * linux-low.h (struct linux_target_ops): Ditto.
19102 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
19103 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
19104 to linux_target_ops.
19105 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
19106 reply packet.
19107 * server.c (main): Recognize 'Z' and 'z' packets.
19108
19109 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
19110
19111 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
19112 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
19113 (the_low_target): Add new members.
19114
19115 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
19116
19117 * proc-service.c (ps_lgetregs): Search all_processes instead of
19118 all_threads.
19119
19120 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
19121
19122 * server.c (start_inferior): Change return type to int.
19123 (attach_inferior): Change sigptr to int *.
19124 (handle_v_cont, handle_v_requests): Change signal to int *.
19125 (main): Change signal to int.
19126
19127 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
19128
19129 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
19130 * configure.srv: Add m32r*-*-linux*.
19131 * linux-m32r-low.c: New file.
19132
19133 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
19134
19135 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
19136
19137 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
19138
19139 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
19140 Take unsigned long arguments for PIDs.
19141 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
19142 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
19143 (wait_for_sigstop, linux_resume_one_process)
19144 (regsets_fetch_inferior_registers, linux_send_signal)
19145 (linux_read_auxv): Likewise. Update the types of variables holding
19146 PIDs. Update format string specifiers.
19147 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
19148 * remote-utils.c (prepare_resume_reply): Likewise.
19149 * server.c (cont_thread, general_thread, step_thread)
19150 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
19151 unsigned long.
19152 (handle_query): Update format specifiers.
19153 (handle_v_cont, main): Use strtoul for thread IDs.
19154 * server.h (struct inferior_list_entry): Use unsigned long for ID.
19155 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
19156 (general_thread, step_thread, thread_from_wait)
19157 (old_thread_from_wait): Update.
19158 * target.h (struct thread_resume): Use unsigned long for THREAD.
19159 (struct target_ops): Use unsigned long for arguments to attach and
19160 thread_alive.
19161
19162 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
19163
19164 * acinclude.m4: Include bfd/bfd.m4 directly.
19165 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
19166 <agriffis@toolchain.org>.
19167 * aclocal.m4, configure: Regenerated.
19168
19169 2005-01-07 Andrew Cagney <cagney@gnu.org>
19170
19171 * configure.ac: Rename configure.in, require autoconf 2.59.
19172 * configure: Re-generate.
19173
19174 2004-12-08 Daniel Jacobowitz <dan@debian.org>
19175
19176 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
19177 LIBS when finished.
19178 * aclocal.m4: Regenerated.
19179 * configure: Regenerated.
19180
19181 2004-11-21 Andreas Schwab <schwab@suse.de>
19182
19183 * linux-m68k-low.c (m68k_num_gregs): Define.
19184 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
19185 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
19186 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
19187 (m68k_breakpoint_at): New. Add to the_low_target.
19188
19189 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
19190 srv_linux_thread_db to yes.
19191
19192 2004-10-20 Joel Brobecker <brobecker@gnat.com>
19193
19194 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
19195 (ARCH_SET_FS): Likewise.
19196 (ARCH_GET_FS): Likewise.
19197 (ARCH_GET_GS): Likewise.
19198
19199 2004-10-16 Daniel Jacobowitz <dan@debian.org>
19200
19201 * linux-i386-low.c (ps_get_thread_area): New.
19202 * linux-x86-64-low.c (ps_get_thread_area): New.
19203 * linux-low.c: Include <sys/syscall.h>.
19204 (linux_kill_one_process): Don't kill the first thread here.
19205 (linux_kill): Kill the first thread here.
19206 (kill_lwp): New function.
19207 (send_sigstop, linux_send_signal): Use it.
19208 * proc-service.c: Clean up #ifdefs.
19209 (fpregset_info): Delete.
19210 (ps_lgetregs): Update and enable implementation.
19211 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
19212 implementations.
19213 * remote-utils.c (struct sym_cache, symbol_cache): New.
19214 (input_interrupt): Print a clearer message.
19215 (async_io_enabled): New variable.
19216 (enable_async_io, disable_async_io): Use it. Update comments.
19217 (look_up_one_symbol): Use the symbol cache.
19218 * thread-db.c (thread_db_look_up_symbols): New function.
19219 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
19220
19221 2004-10-16 Daniel Jacobowitz <dan@debian.org>
19222
19223 * configure.in: Test for -rdynamic.
19224 * configure: Regenerated.
19225 * Makefile (INTERNAL_LDFLAGS): New.
19226 (gdbserver, gdbreplay): Use it.
19227
19228 2004-09-02 Andrew Cagney <cagney@gnu.org>
19229
19230 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
19231
19232 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
19233
19234 * linux-low.c (linux_wait): Clear all_processes list also.
19235
19236 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
19237
19238 * linux-low.c: Include <errno.h>. Remove extern declaration of
19239 errno.
19240
19241 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
19242
19243 * gdbreplay.c, server.h, utils.c: Update copyright years.
19244
19245 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
19246
19247 * server.c (main): Print child status or termination signal from
19248 variable 'signal', not 'sig'.
19249
19250 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
19251
19252 * linux-low.c (linux_read_memory): Change return type to
19253 int. Check for and return error from ptrace().
19254 * target.c (read_inferior_memory): Change return type to int. Pass
19255 back return status from the_target->read_memory().
19256 * target.h (struct target_ops): Adapt *read_memory() prototype.
19257 Update comment.
19258 (read_inferior_memory): Adapt prototype.
19259 * server.c (main): Return an error packet if
19260 read_inferior_memory() returns an error.
19261
19262 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
19263
19264 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
19265 Unify with other clean targets.
19266
19267 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
19268
19269 * server.c (handle_v_cont): Call set_desired_inferior.
19270
19271 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
19272
19273 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
19274
19275 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
19276
19277 * linux-low.c (linux_wait): Unblock async I/O.
19278 (linux_resume): Block and enable async I/O.
19279 * remote-utils.c (block_async_io, unblock_async_io): New functions.
19280 * server.h (block_async_io, unblock_async_io): Add prototypes.
19281
19282 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
19283
19284 * remote-utils.c (remote_open): Print a status notice after
19285 opening a TCP port.
19286 * server.c (attach_inferior): Print a status notice after
19287 attaching.
19288
19289 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
19290
19291 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
19292
19293 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
19294
19295 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
19296 error packet.
19297 * server.c, target.h: Update copyright years.
19298
19299 2004-02-25 Roland McGrath <roland@redhat.com>
19300
19301 * target.h (struct target_ops): New member `read_auxv'.
19302 * server.c (handle_query): Handle qPart:auxv:read: query using that.
19303 * linux-low.c (linux_read_auxv): New function.
19304 (linux_target_ops): Initialize `read_auxv' member to that.
19305
19306 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
19307
19308 Committed by Jim Blandy <jimb@redhat.com>.
19309
19310 * linux-s390-low.c (s390_num_regs): Update.
19311 (s390_regmap): Remove control registers. Use __s390x__ predefine
19312 instead of GPR_SIZE to distiguish s390 and s390x targets.
19313
19314 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
19315
19316 * linux-low.c: Update copyright year.
19317 (check_removed_breakpoint): Clear pending_is_breakpoint.
19318 (linux_set_resume_request, linux_queue_one_thread)
19319 (resume_status_pending_p): New functions.
19320 (linux_continue_one_thread): Use process->resume.
19321 (linux_resume): Only resume threads if there are no pending events.
19322 * linux-low.h (struct process_info): Add resume request
19323 pointer.
19324
19325 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
19326
19327 * regcache.c (new_register_cache): Clear the allocated register
19328 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
19329
19330 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
19331
19332 * linux-low.c (linux_resume): Take a struct thread_resume *
19333 argument.
19334 (linux_wait): Update call.
19335 (resume_ptr): New static variable.
19336 (linux_continue_one_thread): Renamed from
19337 linux_continue_one_process. Use resume_ptr.
19338 (linux_resume): Use linux_continue_one_thread.
19339 * server.c (handle_v_cont, handle_v_requests): New functions.
19340 (myresume): New function.
19341 (main): Handle 'v' case.
19342 * target.h (struct thread_resume): New type.
19343 (struct target_ops): Change argument of "resume" to struct
19344 thread_resume *.
19345 (myresume): Delete macro.
19346
19347 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
19348
19349 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
19350 (uninstall): Support DESTDIR.
19351
19352 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
19353
19354 * configure.srv: Add xscale*linux copy of arm*linux entry.
19355
19356 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
19357
19358 * linux-arm-low.c (arm_reinsert_addr): New function.
19359 (the_low_target): Add arm_reinsert_addr.
19360
19361 2003-07-08 Mark Kettenis <kettenis@gnu.org>
19362
19363 * mem-break.c: Remove whitespace at end of file.
19364
19365 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
19366
19367 * configure.in: Check whether we need to prototype strerror.
19368 * server.h: Optionally prototype strerror.
19369 * gdbreplay.c (perror_with_name): Use strerror.
19370 * linux-low.c (linux_attach_lwp): Use strerror.
19371 * utils.c (perror_with_name): Use strerror.
19372 * config.in, configure: Regenerated.
19373
19374 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
19375
19376 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
19377 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
19378
19379 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
19380
19381 * Makefile.in (SFILES): Update.
19382 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
19383 low-sun3.c: Remove files.
19384
19385 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
19386
19387 * linux-low.c: Move comment to linux_thread_alive where it belonged.
19388 (linux_detach_one_process, linux_detach): New functions.
19389 (linux_target_ops): Add linux_detach.
19390 * server.c (main): Handle 'D' packet.
19391 * target.h (struct target_ops): Add "detach" member.
19392 (detach_inferior): Define.
19393
19394 2003-06-13 Mark Kettenis <kettenis@gnu.org>
19395
19396 From Kelley Cook <kelleycook@wideopenwest.com>:
19397 * configure.srv: Accept i[34567]86 variants.
19398
19399 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
19400
19401 * linux-low.c (linux_wait_for_event): Correct comment typos.
19402 (linux_resume_one_process): Call check_removed_breakpoint.
19403 (linux_send_signal): New function.
19404 (linux_target_ops): Add linux_send_signal.
19405 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
19406 of kill.
19407 * target.h (struct target_ops): Add send_signal.
19408
19409 2003-05-29 Jim Blandy <jimb@redhat.com>
19410
19411 * linux-low.c (usr_store_inferior_registers): Transfer buf in
19412 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
19413 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
19414 away part of the register's value.
19415
19416 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
19417
19418 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
19419 (linux_wait_for_event, linux_init_signals): Likewise.
19420
19421 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
19422
19423 * configure.in: Check for stdlib.h.
19424 * configure: Regenerated.
19425 * config.in: Regenerated.
19426
19427 2003-01-04 Andreas Schwab <schwab@suse.de>
19428
19429 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
19430
19431 2003-01-02 Andrew Cagney <ac131313@redhat.com>
19432
19433 * Makefile.in: Remove obsolete code.
19434
19435 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
19436
19437 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
19438 defined(PT_FPR0_HI).
19439
19440 2002-11-17 Stuart Hughes <seh@zee2.com>
19441
19442 * linux-arm-low.c (arm_num_regs): Increase.
19443 (arm_regmap): Include status register.
19444
19445 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
19446
19447 * linux-low.c (register_addr): Remove incorrect -1 check.
19448
19449 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
19450
19451 * linux-low.c (linux_create_inferior): Call setpgid. Return
19452 the new PID.
19453 (unstopped_p, linux_signal_pid): Remove.
19454 (linux_target_ops): Remove linux_signal_pid.
19455 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
19456 global instead of target method.
19457 * target.h (struct target_ops): Remove signal_pid. Update comment
19458 for create_inferior.
19459 * server.c (signal_pid): New variable.
19460 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
19461 gdbserver. Set the child to be the foreground process group.
19462 (attach_inferior): Set signal_pid.
19463
19464 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
19465
19466 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
19467
19468 2002-08-20 Jim Blandy <jimb@redhat.com>
19469
19470 * Makefile.in (LDFLAGS): Allow the configure script to establish a
19471 default for this.
19472
19473 2002-08-01 Andrew Cagney <cagney@redhat.com>
19474
19475 * Makefile.in: Make chill references obsolete.
19476
19477 2002-07-24 Kevin Buettner <kevinb@redhat.com>
19478
19479 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
19480 * configure: Regenerate.
19481 * config.in: Regenerate.
19482
19483 2002-07-09 David O'Brien <obrien@FreeBSD.org>
19484
19485 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
19486 (perror_with_name, remote_close, remote_open, expect, play): Static.
19487
19488 2002-07-04 Michal Ludvig <mludvig@suse.cz>
19489
19490 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
19491 byte offsets instead of an array of indexes.
19492 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
19493
19494 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
19495
19496 * regcache.c: Add comment.
19497
19498 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
19499
19500 * thread-db.c: New file.
19501 * proc-service.c: New file.
19502 * acinclude.m4: New file.
19503 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
19504 proc-service.o, and thread-db.o.
19505 (linux-low.o): Add USE_THREAD_DB.
19506 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
19507 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
19508 * aclocal.m4: Regenerated.
19509 * config.in: Regenerated.
19510 * configure: Regenerated.
19511 * configure.in: Check for proc_service.h, sys/procfs.h,
19512 thread_db.h, and linux/elf.h headrs.
19513 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
19514 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
19515 Check for -lthread_db and thread support.
19516 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
19517 PowerPC, and SuperH.
19518 * i387-fp.c: Constify arguments.
19519 * i387-fp.h: Likewise.
19520 * inferiors.c: (struct thread_info): Renamed from
19521 `struct inferior_info'. Remove PID member. Use generic inferior
19522 list header. All uses updated.
19523 (inferiors, signal_pid): Removed.
19524 (all_threads): New variable.
19525 (get_thread): Define.
19526 (add_inferior_to_list): New function.
19527 (for_each_inferior): New function.
19528 (change_inferior_id): New function.
19529 (add_inferior): Removed.
19530 (remove_inferior): New function.
19531 (add_thread): New function.
19532 (free_one_thread): New function.
19533 (remove_thread): New function.
19534 (clear_inferiors): Use for_each_inferior and free_one_thread.
19535 (find_inferior): New function.
19536 (find_inferior_id): New function.
19537 (inferior_target_data): Update argument type.
19538 (set_inferior_target_data): Likewise.
19539 (inferior_regcache_data): Likewise.
19540 (set_inferior_regcache_data): Likewise.
19541 * linux-low.c (linux_bp_reinsert): Remove.
19542 (all_processes, stopping_threads, using_thrads)
19543 (struct pending_signals, debug_threads, pid_of): New.
19544 (inferior_pid): Replace with macro.
19545 (struct inferior_linux_data): Remove.
19546 (get_stop_pc, add_process): New functions.
19547 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
19548 Use add_process and add_thread.
19549 (linux_attach_lwp): New function, based on old linux_attach. Use
19550 add_process and add_thread. Set stop_expected for new threads.
19551 (linux_attach): New function.
19552 (linux_kill_one_process): New function.
19553 (linux_kill): Kill all LWPs.
19554 (linux_thread_alive): Use find_inferior_id.
19555 (check_removed_breakpoints, status_pending_p): New functions.
19556 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
19557 Update. Use WNOHANG. Wait for cloned processes also. Update process
19558 struct for the found process.
19559 (linux_wait_for_event): New function.
19560 (linux_wait): Use it. Support LWPs.
19561 (send_sigstop, wait_for_sigstop, stop_all_processes)
19562 (linux_resume_one_process, linux_continue_one_process): New functions.
19563 (linux_resume): Support LWPs.
19564 (REGISTER_RAW_SIZE): Remove.
19565 (fetch_register): Use register_size instead. Call supply_register.
19566 (usr_store_inferior_registers): Likewise. Call collect_register.
19567 Fix recursive case.
19568 (regsets_fetch_inferior_registers): Improve error message.
19569 (regsets_store_inferior_registers): Add debugging.
19570 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
19571 (unstopped_p, linux_signal_pid): New functions.
19572 (linux_target_ops): Add linux_signal_pid.
19573 (linux_init_signals): New function.
19574 (initialize_low): Call it. Initialize using_threads.
19575 * regcache.c (inferior_regcache_data): Add valid
19576 flag.
19577 (get_regcache): Fetch registers lazily. Add fetch argument
19578 and update all callers.
19579 (regcache_invalidate_one, regcache_invalidate): New
19580 functions.
19581 (new_register_cache): Renamed from create_register_cache.
19582 Return the new regcache.
19583 (free_register_cache): Change argument to a void *.
19584 (registers_to_string, registers_from_string): Call get_regcache
19585 with fetch flag set.
19586 (register_data): Make static. Pass fetch flag to get_regcache.
19587 (supply_register): Call get_regcache with fetch flag clear.
19588 (collect_register): Call get_regcache with fetch flag set.
19589 (collect_register_as_string): New function.
19590 * regcache.h: Update.
19591 * remote-utils.c (putpkt): Flush after debug output and use
19592 stderr.
19593 Handle input interrupts while waiting for an ACK.
19594 (input_interrupt): Use signal_pid method.
19595 (getpkt): Flush after debug output and use stderr.
19596 (outreg): Use collect_register_as_string.
19597 (new_thread_notify, dead_thread_notify): New functions.
19598 (prepare_resume_reply): Check using_threads. Set thread_from_wait
19599 and general_thread.
19600 (look_up_one_symbol): Flush after debug output.
19601 * server.c (step_thread, server_waiting): New variables.
19602 (start_inferior): Don't use signal_pid. Update call to mywait.
19603 (attach_inferior): Update call to mywait.
19604 (handle_query): Handle qfThreadInfo and qsThreadInfo.
19605 (main): Don't fetch/store registers explicitly. Use
19606 set_desired_inferior. Support proposed ``Hs'' packet. Update
19607 calls to mywait.
19608 * server.h: Update.
19609 (struct inferior_list, struct_inferior_list_entry): New.
19610 * target.c (set_desired_inferior): New.
19611 (write_inferior_memory): Constify.
19612 (mywait): New function.
19613 * target.h: Update.
19614 (struct target_ops): New signal_pid method.
19615 (mywait): Removed macro, added prototype.
19616
19617 * linux-low.h (regset_func): Removed.
19618 (regset_fill_func, regset_store_func): New.
19619 (enum regset_type): New.
19620 (struct regset_info): Add type field. Use new operation types.
19621 (struct linux_target_ops): stop_pc renamed to get_pc.
19622 Add decr_pc_after_break and breakpoint_at.
19623 (get_process, get_thread_proess, get_process_thread)
19624 (strut process_info, all_processes, linux_attach_lwp)
19625 (thread_db_init): New.
19626
19627 * linux-arm-low.c (arm_get_pc, arm_set_pc,
19628 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
19629 (the_low_target): Add new members.
19630 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
19631 (i386_store_fpxregset): Constify.
19632 (target_regsets): Add new kind identifier.
19633 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
19634 (i386_set_pc): Add debugging.
19635 (i386_breakpoint_at): New function.
19636 (the_low_target): Add new members.
19637 * linux-mips-low.c (mips_get_pc, mips_set_pc)
19638 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
19639 (mips_breakpoint_at): New.
19640 (the_low_target): Add new members.
19641 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
19642 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
19643 (the_low_target): Add new members.
19644 * linux-sh-low.c (sh_get_pc, sh_set_pc)
19645 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
19646 (the_low_target): Add new members.
19647 * linux-x86-64-low.c (target_regsets): Add new kind
19648 identifier.
19649
19650 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
19651
19652 From Martin Pool <mbp@samba.org>:
19653 * server.c (gdbserver_usage): New function.
19654 (main): Call it.
19655
19656 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
19657
19658 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
19659 stop_at -> stop_pc.
19660
19661 2002-05-04 Andrew Cagney <ac131313@redhat.com>
19662
19663 * Makefile.in: Remove obsolete code.
19664
19665 2002-04-24 Michal Ludvig <mludvig@suse.cz>
19666
19667 * linux-low.c (regsets_fetch_inferior_registers),
19668 (regsets_store_inferior_registers): Removed cast to int from
19669 ptrace() calls.
19670 * regcache.h: Added declaration of struct inferior_info.
19671
19672 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
19673
19674 * inferiors.c (struct inferior_info): Add regcache_data.
19675 (add_inferior): Call create_register_cache.
19676 (clear_inferiors): Call free_register_cache.
19677 (inferior_regcache_data, set_inferior_regcache_data): New functions.
19678 * regcache.c (struct inferior_regcache_data): New.
19679 (registers): Remove.
19680 (get_regcache): New function.
19681 (create_register_cache, free_register_cache): New functions.
19682 (set_register_cache): Don't initialize the register cache here.
19683 (registers_to_string, registers_from_string, register_data): Call
19684 get_regcache.
19685 * regcache.h: Add prototypes.
19686 * server.h: Likewise.
19687
19688 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
19689
19690 * mem-break.c: New file.
19691 * mem-break.h: New file.
19692 * Makefile.in: Add mem-break.o rule; update server.h
19693 dependencies.
19694 * inferiors.c (struct inferior_info): Add target_data
19695 member.
19696 (clear_inferiors): Free target_data member if set.
19697 (inferior_target_data, set_inferior_target_data): New functions.
19698 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
19699 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
19700 * linux-low.c (linux_bp_reinsert): New variable.
19701 (struct inferior_linux_data): New.
19702 (linux_create_inferior): Use set_inferior_target_data.
19703 (linux_attach): Likewise. Call add_inferior.
19704 (linux_wait_for_one_inferior): New function.
19705 (linux_wait): Call it.
19706 (linux_write_memory): Add const.
19707 (initialize_low): Call set_breakpoint_data.
19708 * linux-low.h (struct linux_target_ops): Add breakpoint
19709 handling members.
19710 * server.c (attach_inferior): Remove extra add_inferior
19711 call.
19712 * server.h: Include mem-break.h. Update inferior.c
19713 prototypes.
19714 * target.c (read_inferior_memory)
19715 (write_inferior_memory): New functions.
19716 * target.h (read_inferior_memory)
19717 (write_inferior_memory): Change macros to prototypes.
19718 (struct target_ops): Update comments. Add const to write_memory
19719 definition.
19720
19721 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
19722
19723 * linux-low.c (usr_store_inferior_registers): Support
19724 registers which are allowed to fail to store.
19725 * linux-low.h (linux_target_ops): Likewise.
19726 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
19727 (ppc_cannot_store_register): FPSCR may not be storable.
19728
19729 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19730
19731 * server.h: Include <string.h> if HAVE_STRING_H.
19732 * ChangeLog: Correct paths in last ChangeLog entry.
19733
19734 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19735
19736 * linux-low.h: Remove obsolete prototypes.
19737 (struct linux_target_ops): New.
19738 (extern the_low_target): New.
19739 * linux-low.c (num_regs, regmap): Remove declarations.
19740 (register_addr): Use the_low_target explicitly.
19741 (fetch_register): Likewise.
19742 (usr_fetch_inferior_registers): Likewise.
19743 (usr_store_inferior_registers): Likewise.
19744 * linux-arm-low.c (num_regs): Remove.
19745 (arm_num_regs): Define.
19746 (arm_regmap): Renamed from regmap, made static.
19747 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
19748 made static.
19749 (arm_cannot_store_register): Renamed from cannot_store_register,
19750 made static.
19751 (the_low_target): New.
19752 * linux-i386-low.c (num_regs): Remove.
19753 (i386_num_regs): Define.
19754 (i386_regmap): Renamed from regmap, made static.
19755 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
19756 made static.
19757 (i386_cannot_store_register): Renamed from cannot_store_register,
19758 made static.
19759 (the_low_target): New.
19760 * linux-ia64-low.c (num_regs): Remove.
19761 (ia64_num_regs): Define.
19762 (ia64_regmap): Renamed from regmap, made static.
19763 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
19764 made static.
19765 (ia64_cannot_store_register): Renamed from cannot_store_register,
19766 made static.
19767 (the_low_target): New.
19768 * linux-m68k-low.c (num_regs): Remove.
19769 (m68k_num_regs): Define.
19770 (m68k_regmap): Renamed from regmap, made static.
19771 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
19772 made static.
19773 (m68k_cannot_store_register): Renamed from cannot_store_register,
19774 made static.
19775 (the_low_target): New.
19776 * linux-mips-low.c (num_regs): Remove.
19777 (mips_num_regs): Define.
19778 (mips_regmap): Renamed from regmap, made static.
19779 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
19780 made static.
19781 (mips_cannot_store_register): Renamed from cannot_store_register,
19782 made static.
19783 (the_low_target): New.
19784 * linux-ppc-low.c (num_regs): Remove.
19785 (ppc_num_regs): Define.
19786 (ppc_regmap): Renamed from regmap, made static.
19787 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
19788 made static.
19789 (ppc_cannot_store_register): Renamed from cannot_store_register,
19790 made static.
19791 (the_low_target): New.
19792 * linux-s390-low.c (num_regs): Remove.
19793 (s390_num_regs): Define.
19794 (s390_regmap): Renamed from regmap, made static.
19795 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
19796 made static.
19797 (s390_cannot_store_register): Renamed from cannot_store_register,
19798 made static.
19799 (the_low_target): New.
19800 * linux-sh-low.c (num_regs): Remove.
19801 (sh_num_regs): Define.
19802 (sh_regmap): Renamed from regmap, made static.
19803 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
19804 made static.
19805 (sh_cannot_store_register): Renamed from cannot_store_register,
19806 made static.
19807 (the_low_target): New.
19808 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
19809 (the_low_target): New.
19810
19811 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19812
19813 * Makefile.in: Add stamp-h target.
19814 * configure.in: Create stamp-h.
19815 * configure: Regenerated.
19816
19817 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19818
19819 * inferiors.c: New file.
19820 * target.c: New file.
19821 * target.h: New file.
19822 * Makefile.in: Add target.o and inferiors.o. Update
19823 dependencies.
19824 * linux-low.c (inferior_pid): New static variable,
19825 moved from server.c.
19826 (linux_create_inferior): Renamed from create_inferior.
19827 Call add_inferior. Return 0 on success instead of a PID.
19828 (linux_attach): Renamed from myattach.
19829 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
19830 (linux_thread_alive): Renamed from mythread_alive.
19831 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
19832 child dies.
19833 (linux_resume): Renamed from myresume. Add missing ``return 0''.
19834 (regsets_store_inferior_registers): Correct error message.
19835 Add missing ``return 0''.
19836 (linux_fetch_registers): Renamed from fetch_inferior_registers.
19837 (linux_store_registers): Renamed from store_inferior_registers.
19838 (linux_read_memory): Renamed from read_inferior_memory.
19839 (linux_write_memory): Renamed from write_inferior_memory.
19840 (linux_target_ops): New structure.
19841 (initialize_low): Call set_target_ops ().
19842 * remote-utils.c (unhexify): New function.
19843 (hexify): New function.
19844 (input_interrupt): Send signals to ``signal_pid''.
19845 * server.c (inferior_pid): Remove.
19846 (start_inferior): Update create_inferior call.
19847 (attach_inferior): Call add_inferior.
19848 (handle_query): New function.
19849 (main): Call handle_query for `q' packets.
19850 * server.h: Include "target.h". Remove obsolete prototypes.
19851 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
19852
19853 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19854
19855 * Makefile.in: Add WARN_CFLAGS. Update configury
19856 dependencies.
19857 * configure.in: Check for <string.h>
19858 * configure: Regenerate.
19859 * config.in: Regenerate.
19860 * gdbreplay.c: Include needed system headers.
19861 (remote_open): Remove strchr prototype.
19862 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
19863 * regcache.c (supply_register): Change buf argument to const void *.
19864 (supply_register_by_name): Likewise.
19865 (collect_register): Change buf argument to void *.
19866 (collect_register_by_name): Likewise.
19867 * regcache.h: Add missing prototypes.
19868 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
19869 * server.c (handle_query): New function.
19870 (attached): New static variable, moved out of main.
19871 (main): Quiet longjmp clobber warnings.
19872 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
19873 * utils.c (error): Remove NORETURN.
19874 (fatal): Likewise.
This page took 0.758557 seconds and 3 git commands to generate.