4e44a763cc3f2098fa692d50fcf3ba4d86298259
[deliverable/binutils-gdb.git] / gdbserver / ChangeLog
1 2020-03-05 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2
3 * .gitattributes: New file.
4
5 2020-03-02 Andrew Burgess <andrew.burgess@embecosm.com>
6
7 * remote-utils.cc (prepare_resume_reply): Add ability to convert T
8 reply into an S reply.
9 * server.cc (disable_packet_T): New global.
10 (captured_main): Set new global when appropriate.
11 * server.h (disable_packet_T): Declare.
12
13 2020-02-21 Tom Tromey <tom@tromey.com>
14
15 * Makefile.in (mostlyclean): New target.
16
17 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
18
19 * target.h (struct process_stratum_target): Remove.
20 (class process_target): Rename to ...
21 (class process_stratum_target): ... this.
22 * linux-low.h (class linux_process_target): Derive from
23 'process_stratum_target'.
24 * linux-low.cc (linux_target_ops): Remove.
25 (initialize_low): Set the_target to the singleton instance of
26 linux_process_target.
27 * lynx-low.h (class lynx_process_target): Derive from
28 'process_stratum_target'.
29 * lynx-low.cc (lynx_target_ops): Remove.
30 (initialize_low): Set the_target to the singleton instance of
31 lynx_process_target.
32 * nto-low.h (class nto_process_target): Derive from
33 'process_stratum_target'.
34 * nto-low.cc (nto_target_ops): Remove.
35 (initialize_low): Set the_target to the singleton instance of
36 nto_process_target.
37 * win32-low.h (class win32_process_target): Derive from
38 'process_stratum_target'.
39 * win32-low.cc (win32_target_ops): Remove.
40 (initialize_low): Set the_target to the singleton instance of
41 win32_process_target.
42
43 Replace 'the_target->pt' with 'the_target' in the uses below.
44
45 * hostio.cc (hostio_error)
46 (handle_setfs)
47 (handle_open)
48 (handle_unlink)
49 (handle_readlink)
50 * linux-aarch32-low.cc (arm_breakpoint_at)
51 * linux-aarch64-low.cc (aarch64_breakpoint_at)
52 * linux-arm-low.cc (arm_sigreturn_next_pc)
53 (arm_get_hwcap)
54 (arm_get_syscall_trapinfo)
55 * linux-cris-low.cc (cris_breakpoint_at)
56 * linux-crisv32-low.cc (cris_breakpoint_at)
57 * linux-low.cc (handle_extended_wait)
58 (linux_wait_1)
59 (linux_read_memory)
60 (linux_process_target::breakpoint_kind_from_pc)
61 (linux_get_auxv)
62 * linux-m32r-low.cc (m32r_breakpoint_at)
63 * linux-mips-low.cc (mips_breakpoint_at)
64 * linux-nios2-low.cc (nios2_breakpoint_at)
65 * linux-ppc-low.cc (ppc_breakpoint_at)
66 * linux-s390-low.cc (s390_get_hwcap)
67 * linux-sh-low.cc (sh_breakpoint_at)
68 * linux-sparc-low.cc (sparc_fill_gregset_to_stack)
69 (sparc_store_gregset_from_stack)
70 (sparc_breakpoint_at)
71 * linux-tic6x-low.cc (tic6x_breakpoint_at)
72 * linux-tile-low.cc (tile_breakpoint_at)
73 * linux-x86-low.cc (x86_breakpoint_at)
74 * linux-xtensa-low.cc (xtensa_breakpoint_at)
75 * mem-break.cc (bp_size)
76 (bp_opcode)
77 (insert_memory_breakpoint)
78 (set_raw_breakpoint_at)
79 (delete_raw_breakpoint)
80 (z_type_supported)
81 (uninsert_raw_breakpoint)
82 (reinsert_raw_breakpoint)
83 (validate_inserted_breakpoint)
84 * regcache.cc (regcache_read_pc)
85 (regcache_write_pc)
86 * remote-utils.cc (putpkt_binary_1)
87 (input_interrupt)
88 (getpkt)
89 (prepare_resume_reply)
90 * server.cc (handle_general_set)
91 (handle_detach)
92 (handle_qxfer_auxv)
93 (handle_qxfer_exec_file)
94 (handle_qxfer_libraries_svr4)
95 (handle_qxfer_osdata)
96 (handle_qxfer_siginfo)
97 (handle_qxfer_fdpic)
98 (handle_query)
99 (resume)
100 (handle_v_requests)
101 (queue_stop_reply_callback)
102 (captured_main)
103 * target.cc (prepare_to_access_memory)
104 (done_accessing_memory)
105 (read_inferior_memory)
106 (target_write_memory)
107 (target_stop_and_wait)
108 (target_wait)
109 (target_mourn_inferior)
110 (target_continue_no_signal)
111 (target_continue)
112 (target_supports_multi_process)
113 (kill_inferior)
114 * target.h
115 (target_create_inferior)
116 (target_post_create_inferior)
117 (myattach)
118 (target_supports_fork_events)
119 (target_supports_vfork_events)
120 (target_supports_exec_events)
121 (target_handle_new_gdb_connection)
122 (detach_inferior)
123 (mythread_alive)
124 (fetch_inferior_registers)
125 (store_inferior_registers)
126 (join_inferior)
127 (target_supports_non_stop)
128 (target_async)
129 (target_process_qsupported)
130 (target_supports_catch_syscall)
131 (target_get_ipa_tdesc_idx)
132 (target_supports_tracepoints)
133 (target_supports_fast_tracepoints)
134 (target_get_min_fast_tracepoint_insn_len)
135 (target_thread_stopped)
136 (target_pause_all)
137 (target_unpause_all)
138 (target_stabilize_threads)
139 (target_install_fast_tracepoint_jump_pad)
140 (target_emit_ops)
141 (target_supports_disable_randomization)
142 (target_supports_agent)
143 (target_enable_btrace)
144 (target_disable_btrace)
145 (target_read_btrace)
146 (target_read_btrace_conf)
147 (target_supports_range_stepping)
148 (target_supports_stopped_by_sw_breakpoint)
149 (target_stopped_by_sw_breakpoint)
150 (target_supports_stopped_by_hw_breakpoint)
151 (target_supports_hardware_single_step)
152 (target_stopped_by_hw_breakpoint)
153 (target_breakpoint_kind_from_pc)
154 (target_breakpoint_kind_from_current_state)
155 (target_supports_software_single_step)
156 (target_core_of_thread)
157 (target_thread_name)
158 (target_thread_handle)
159 * win32-low.cc (do_initial_child_stuff)
160
161 Rename target op default definitions listed below.
162
163 * target.cc (process_target::post_create_inferior): Rename as ...
164 (process_stratum_target::post_create_inferior): ... this.
165 (process_target::prepare_to_access_memory): Rename as ...
166 (process_stratum_target::prepare_to_access_memory): ... this.
167 (process_target::done_accessing_memory): Rename as ...
168 (process_stratum_target::done_accessing_memory): ... this.
169 (process_target::look_up_symbols): Rename as ...
170 (process_stratum_target::look_up_symbols): ... this.
171 (process_target::supports_read_auxv): Rename as ...
172 (process_stratum_target::supports_read_auxv): ... this.
173 (process_target::read_auxv): Rename as ...
174 (process_stratum_target::read_auxv): ... this.
175 (process_target::supports_z_point_type): Rename as ...
176 (process_stratum_target::supports_z_point_type): ... this.
177 (process_target::insert_point): Rename as ...
178 (process_stratum_target::insert_point): ... this.
179 (process_target::remove_point): Rename as ...
180 (process_stratum_target::remove_point): ... this.
181 (process_target::stopped_by_sw_breakpoint): Rename as ...
182 (process_stratum_target::stopped_by_sw_breakpoint): ... this.
183 (process_target::supports_stopped_by_sw_breakpoint): Rename as ...
184 (process_stratum_target::supports_stopped_by_sw_breakpoint): ... this.
185 (process_target::stopped_by_hw_breakpoint): Rename as ...
186 (process_stratum_target::stopped_by_hw_breakpoint): ... this.
187 (process_target::supports_stopped_by_hw_breakpoint): Rename as ...
188 (process_stratum_target::supports_stopped_by_hw_breakpoint): ... this.
189 (process_target::supports_hardware_single_step): Rename as ...
190 (process_stratum_target::supports_hardware_single_step): ... this.
191 (process_target::stopped_by_watchpoint): Rename as ...
192 (process_stratum_target::stopped_by_watchpoint): ... this.
193 (process_target::stopped_data_address): Rename as ...
194 (process_stratum_target::stopped_data_address): ... this.
195 (process_target::supports_read_offsets): Rename as ...
196 (process_stratum_target::supports_read_offsets): ... this.
197 (process_target::read_offsets): Rename as ...
198 (process_stratum_target::read_offsets): ... this.
199 (process_target::supports_get_tls_address): Rename as ...
200 (process_stratum_target::supports_get_tls_address): ... this.
201 (process_target::get_tls_address): Rename as ...
202 (process_stratum_target::get_tls_address): ... this.
203 (process_target::hostio_last_error): Rename as ...
204 (process_stratum_target::hostio_last_error): ... this.
205 (process_target::supports_qxfer_osdata): Rename as ...
206 (process_stratum_target::supports_qxfer_osdata): ... this.
207 (process_target::qxfer_osdata): Rename as ...
208 (process_stratum_target::qxfer_osdata): ... this.
209 (process_target::supports_qxfer_siginfo): Rename as ...
210 (process_stratum_target::supports_qxfer_siginfo): ... this.
211 (process_target::qxfer_siginfo): Rename as ...
212 (process_stratum_target::qxfer_siginfo): ... this.
213 (process_target::supports_non_stop): Rename as ...
214 (process_stratum_target::supports_non_stop): ... this.
215 (process_target::async): Rename as ...
216 (process_stratum_target::async): ... this.
217 (process_target::start_non_stop): Rename as ...
218 (process_stratum_target::start_non_stop): ... this.
219 (process_target::supports_multi_process): Rename as ...
220 (process_stratum_target::supports_multi_process): ... this.
221 (process_target::supports_fork_events): Rename as ...
222 (process_stratum_target::supports_fork_events): ... this.
223 (process_target::supports_vfork_events): Rename as ...
224 (process_stratum_target::supports_vfork_events): ... this.
225 (process_target::supports_exec_events): Rename as ...
226 (process_stratum_target::supports_exec_events): ... this.
227 (process_target::handle_new_gdb_connection): Rename as ...
228 (process_stratum_target::handle_new_gdb_connection): ... this.
229 (process_target::handle_monitor_command): Rename as ...
230 (process_stratum_target::handle_monitor_command): ... this.
231 (process_target::core_of_thread): Rename as ...
232 (process_stratum_target::core_of_thread): ... this.
233 (process_target::supports_read_loadmap): Rename as ...
234 (process_stratum_target::supports_read_loadmap): ... this.
235 (process_target::read_loadmap): Rename as ...
236 (process_stratum_target::read_loadmap): ... this.
237 (process_target::process_qsupported): Rename as ...
238 (process_stratum_target::process_qsupported): ... this.
239 (process_target::supports_tracepoints): Rename as ...
240 (process_stratum_target::supports_tracepoints): ... this.
241 (process_target::read_pc): Rename as ...
242 (process_stratum_target::read_pc): ... this.
243 (process_target::write_pc): Rename as ...
244 (process_stratum_target::write_pc): ... this.
245 (process_target::supports_thread_stopped): Rename as ...
246 (process_stratum_target::supports_thread_stopped): ... this.
247 (process_target::thread_stopped): Rename as ...
248 (process_stratum_target::thread_stopped): ... this.
249 (process_target::supports_get_tib_address): Rename as ...
250 (process_stratum_target::supports_get_tib_address): ... this.
251 (process_target::get_tib_address): Rename as ...
252 (process_stratum_target::get_tib_address): ... this.
253 (process_target::pause_all): Rename as ...
254 (process_stratum_target::pause_all): ... this.
255 (process_target::unpause_all): Rename as ...
256 (process_stratum_target::unpause_all): ... this.
257 (process_target::stabilize_threads): Rename as ...
258 (process_stratum_target::stabilize_threads): ... this.
259 (process_target::supports_fast_tracepoints): Rename as ...
260 (process_stratum_target::supports_fast_tracepoints): ... this.
261 (process_target::get_min_fast_tracepoint_insn_len): Rename as ...
262 (process_stratum_target::get_min_fast_tracepoint_insn_len): ... this.
263 (process_target::emit_ops): Rename as ...
264 (process_stratum_target::emit_ops): ... this.
265 (process_target::supports_disable_randomization): Rename as ...
266 (process_stratum_target::supports_disable_randomization): ... this.
267 (process_target::supports_qxfer_libraries_svr4): Rename as ...
268 (process_stratum_target::supports_qxfer_libraries_svr4): ... this.
269 (process_target::qxfer_libraries_svr4): Rename as ...
270 (process_stratum_target::qxfer_libraries_svr4): ... this.
271 (process_target::supports_agent): Rename as ...
272 (process_stratum_target::supports_agent): ... this.
273 (process_target::enable_btrace): Rename as ...
274 (process_stratum_target::enable_btrace): ... this.
275 (process_target::disable_btrace): Rename as ...
276 (process_stratum_target::disable_btrace): ... this.
277 (process_target::read_btrace): Rename as ...
278 (process_stratum_target::read_btrace): ... this.
279 (process_target::read_btrace_conf): Rename as ...
280 (process_stratum_target::read_btrace_conf): ... this.
281 (process_target::supports_range_stepping): Rename as ...
282 (process_stratum_target::supports_range_stepping): ... this.
283 (process_target::supports_pid_to_exec_file): Rename as ...
284 (process_stratum_target::supports_pid_to_exec_file): ... this.
285 (process_target::pid_to_exec_file): Rename as ...
286 (process_stratum_target::pid_to_exec_file): ... this.
287 (process_target::supports_multifs): Rename as ...
288 (process_stratum_target::supports_multifs): ... this.
289 (process_target::multifs_open): Rename as ...
290 (process_stratum_target::multifs_open): ... this.
291 (process_target::multifs_unlink): Rename as ...
292 (process_stratum_target::multifs_unlink): ... this.
293 (process_target::multifs_readlink): Rename as ...
294 (process_stratum_target::multifs_readlink): ... this.
295 (process_target::breakpoint_kind_from_pc): Rename as ...
296 (process_stratum_target::breakpoint_kind_from_pc): ... this.
297 (process_target::breakpoint_kind_from_current_state): Rename as ...
298 (process_stratum_target::breakpoint_kind_from_current_state): ... this.
299 (process_target::thread_name): Rename as ...
300 (process_stratum_target::thread_name): ... this.
301 (process_target::thread_handle): Rename as ...
302 (process_stratum_target::thread_handle): ... this.
303 (process_target::supports_software_single_step): Rename as ...
304 (process_stratum_target::supports_software_single_step): ... this.
305 (process_target::supports_catch_syscall): Rename as ...
306 (process_stratum_target::supports_catch_syscall): ... this.
307 (process_target::get_ipa_tdesc_idx): Rename as ...
308 (process_stratum_target::get_ipa_tdesc_idx): ... this.
309
310 2020-02-20 Pedro Alves <palves@redhat.com>
311
312 * target.cc (set_target_ops): Simply copy the given target pointer
313 instead of creating a copy of the pointed object.
314
315 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
316
317 Turn process_stratum_target's get_ipa_tdesc_idx op into a method
318 of process_target.
319
320 * target.h (struct process_stratum_target): Remove the target op.
321 (class process_target): Add the target op.
322 (target_get_ipa_tdesc_idx): Update the macro.
323 * target.cc (process_target::get_ipa_tdesc_idx): Define.
324
325 Update the derived classes and callers below.
326
327 * linux-low.cc (linux_target_ops): Update.
328 (linux_get_ipa_tdesc_idx): Turn into ...
329 (linux_process_target::get_ipa_tdesc_idx): ... this.
330 * linux-low.h (class linux_process_target): Update.
331 * lynx-low.cc (lynx_target_ops): Update.
332 * nto-low.cc (nto_target_ops): Update.
333 * win32-low.cc (win32_target_ops): Update.
334
335 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
336
337 Turn process_stratum_target's supports_catch_syscall op into a
338 method of process_target.
339
340 * target.h (struct process_stratum_target): Remove the target op.
341 (class process_target): Add the target op.
342 (target_supports_catch_syscall): Update the macro.
343 * target.cc (process_target::supports_catch_syscall): Define.
344
345 Update the derived classes and callers below.
346
347 * linux-low.cc (linux_target_ops): Update.
348 (linux_supports_catch_syscall): Turn into ...
349 (linux_process_target::supports_catch_syscall): ... this.
350 * linux-low.h (class linux_process_target): Update.
351 * lynx-low.cc (lynx_target_ops): Update.
352 * nto-low.cc (nto_target_ops): Update.
353 * win32-low.cc (win32_target_ops): Update.
354
355 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
356
357 Turn process_stratum_target's supports_software_single_step op
358 into a method of process_target.
359
360 * target.h (struct process_stratum_target): Remove the target op.
361 (class process_target): Add the target op.
362 (target_supports_software_single_step): Update the macro.
363 * target.cc (process_target::supports_software_single_step): Define.
364
365 Update the derived classes and callers below.
366
367 * linux-low.cc (linux_target_ops): Update.
368 (linux_supports_software_single_step): Turn into ...
369 (linux_process_target::supports_software_single_step): ... this.
370 * linux-low.h (class linux_process_target): Update.
371 * lynx-low.cc (lynx_target_ops): Update.
372 * nto-low.cc (nto_target_ops): Update.
373 * win32-low.cc (win32_target_ops): Update.
374
375 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
376
377 Turn process_stratum_target's thread_name and thread_handle ops
378 into methods of process_target.
379
380 * target.h (struct process_stratum_target): Remove the target ops.
381 (class process_target): Add the target ops.
382 (target_thread_name): Update the macro.
383 (target_thread_handle): Update the macro.
384 * target.cc (process_target::thread_name): Define.
385 (process_target::thread_handle): Define.
386
387 Update the derived classes and callers below.
388
389 * linux-low.cc (linux_target_ops): Update.
390 (linux_process_target::thread_name): Define.
391 (linux_process_target::thread_handle): Define.
392 * linux-low.h (class linux_process_target): Update.
393 * lynx-low.cc (lynx_target_ops): Update.
394 * nto-low.cc (nto_target_ops): Update.
395 * win32-low.cc (win32_target_ops): Update.
396
397 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
398
399 Turn process_stratum_target's breakpoint_kind_from_pc,
400 sw_breakpoint_from_kind, and breakpoint_kind_from_current_state
401 ops into methods of process_target.
402
403 * target.h (struct process_stratum_target): Remove the target op.
404 (class process_target): Add the target op.
405 (target_breakpoint_kind_from_pc): Update the macro.
406 (target_breakpoint_kind_from_current_state): Update the macro.
407 (default_breakpoint_kind_from_pc): Remove declaration.
408 * target.cc (default_breakpoint_kind_from_pc): Turn into ...
409 (process_target::breakpoint_kind_from_pc): ... this.
410 (process_target::breakpoint_kind_from_current_state): Define.
411
412 Update the derived classes and callers below.
413
414 * mem-break.cc (bp_size): Update.
415 (bp_opcode): Update.
416 * linux-low.cc (linux_target_ops): Update.
417 (linux_wait_1): Update.
418 (linux_breakpoint_kind_from_pc): Turn into ...
419 (linux_process_target::breakpoint_kind_from_pc): ... this.
420 (linux_sw_breakpoint_from_kind): Turn into ...
421 (linux_process_target::sw_breakpoint_from_kind): ... this.
422 (linux_breakpoint_kind_from_current_state): Turn into ...
423 (linux_process_target::breakpoint_kind_from_current_state): ... this.
424 * linux-low.h (class linux_process_target): Update.
425 * lynx-low.cc (lynx_target_ops): Update.
426 (lynx_process_target::sw_breakpoint_from_kind): Define.
427 * lynx-low.h (class lynx_process_target): Update.
428 * nto-low.cc (nto_target_ops): Update.
429 (nto_sw_breakpoint_from_kind): Turn into ...
430 (nto_process_target::sw_breakpoint_from_kind): ... this.
431 * nto-low.h (class nto_process_target): Update.
432 * win32-low.cc (win32_target_ops): Update.
433 (win32_sw_breakpoint_from_kind): Turn into ...
434 (win32_process_target::sw_breakpoint_from_kind): ... this.
435 * win32-low.h (class win32_process_target): Update.
436
437 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
438
439 Turn process_stratum_target's multifs_open, multifs_readlink,
440 multifs_unlink ops into methods of process_target.
441
442 * target.h (struct process_stratum_target): Remove the target ops.
443 (class process_target): Add the target ops. Also add
444 'supports_multifs'.
445 * target.cc: Include "fcntl.h", "unistd.h", "sys/types.h", and
446 "sys/stat.h".
447 (process_target::supports_multifs): Define.
448 (process_target::multifs_open): Define.
449 (process_target::multifs_readlink): Define.
450 (process_target::multifs_unlink): Define.
451
452 Update the derived classes and callers below.
453
454 * hostio.cc (handle_setfs): Update.
455 (handle_open): Update.
456 (handle_unlink): Update.
457 (handle_readlink): Update.
458 * linux-low.cc (linux_target_ops): Update.
459 (linux_process_target::supports_multifs): Define.
460 (linux_process_target::multifs_open): Define.
461 (linux_process_target::multifs_readlink): Define.
462 (linux_process_target::multifs_unlink): Define.
463 * linux-low.h (class linux_process_target): Update.
464 * lynx-low.cc (lynx_target_ops): Update.
465 * nto-low.cc (nto_target_ops): Update.
466 * win32-low.cc (win32_target_ops): Update.
467
468 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
469
470 Turn process_stratum_target's pid_to_exec_file op into a method
471 of process_target.
472
473 * target.h (struct process_stratum_target): Remove the target op.
474 (class process_target): Add the target op. Also add
475 'supports_pid_to_exec_file'.
476 * target.cc (process_target::pid_to_exec_file): Define.
477 (process_target::supports_pid_to_exec_file): Define.
478
479 Update the derived classes and callers below.
480
481 * server.cc (handle_qxfer_exec_file): Update.
482 (handle_query): Update.
483 * linux-low.cc (linux_target_ops): Update.
484 (linux_process_target::supports_pid_to_exec_file): Define.
485 (linux_process_target::pid_to_exec_file): Define.
486 * linux-low.h (class linux_process_target): Update.
487 * lynx-low.cc (lynx_target_ops): Update.
488 * nto-low.cc (nto_target_ops): Update.
489 * win32-low.cc (win32_target_ops): Update.
490
491 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
492
493 Turn process_stratum_target's supports_range_stepping op into a
494 method of process_target.
495
496 * target.h (struct process_stratum_target): Remove the target op.
497 (class process_target): Add the target op.
498 (target_supports_range_stepping): Update the macro.
499 * target.cc (process_target::supports_range_stepping): Define.
500
501 Update the derived classes and callers below.
502
503 * linux-low.cc (linux_target_ops): Update.
504 (linux_supports_range_stepping): Turn into ...
505 (linux_process_target::supports_range_stepping): ... this.
506 * linux-low.h (class linux_process_target): Update.
507 * lynx-low.cc (lynx_target_ops): Update.
508 * nto-low.cc (nto_target_ops): Update.
509 * win32-low.cc (win32_target_ops): Update.
510
511 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
512
513 Turn process_stratum_target's btrace-related ops (enable_btrace,
514 disable_btrace, read_btrace, read_btrace_conf) into methods of
515 process_target.
516
517 * target.h (struct process_stratum_target): Remove the target ops.
518 (class process_target): Add the target ops.
519 (target_enable_btrace): Update.
520 (target_disable_btrace): Update.
521 (target_read_btrace): Update.
522 (target_read_btrace_conf): Update.
523 * target.cc (process_target::enable_btrace): Define.
524 (process_target::disable_btrace): Define.
525 (process_target::read_btrace): Define.
526 (process_target::read_btrace_conf): Define.
527
528 Update the derived classes and callers below.
529
530 * linux-low.cc (linux_target_ops): Update.
531 (linux_process_target:enable_btrace): Define as a wrapper around
532 linux_enable_btrace.
533 (linux_low_disable_btrace): Turn into ...
534 (linux_process_target::disable_btrace): ... this.
535 (linux_low_read_btrace): Turn into ...
536 (linux_process_target::read_btrace): ... this.
537 (linux_low_btrace_conf): Turn into ...
538 (linux_process_target::read_btrace_conf): ... this.
539 * linux-low.h (class linux_process_target): Update.
540 * lynx-low.cc (lynx_target_ops): Update.
541 * nto-low.cc (nto_target_ops): Update.
542 * win32-low.cc (win32_target_ops): Update.
543
544 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
545
546 Turn process_stratum_target's supports_agent op into a method of
547 process_target.
548
549 * target.h (struct process_stratum_target): Remove the target op.
550 (class process_target): Add the target op.
551 (target_supports_agent): Update the macro.
552 * target.cc (process_target::supports_agent): Define.
553
554 Update the derived classes and callers below.
555
556 * linux-low.cc (linux_target_ops): Update.
557 (linux_supports_agent): Turn into ...
558 (linux_process_target::supports_agent): ... this.
559 * linux-low.h (class linux_process_target): Update.
560 * lynx-low.cc (lynx_target_ops): Update.
561 * nto-low.cc (nto_target_ops): Update.
562 * win32-low.cc (win32_target_ops): Update.
563
564 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
565
566 Turn process_stratum_target's qxfer_libraries_svr4 op into a
567 method of process_target.
568
569 * target.h (struct process_stratum_target): Remove the target op.
570 (class process_target): Add the target op. Also add
571 'supports_qxfer_libraries_svr4'.
572 * target.cc (process_target::qxfer_libraries_svr4): Define.
573 (process_target::supports_qxfer_libraries_svr4): Define.
574
575 Update the derived classes and callers below.
576
577 * server.cc (handle_qxfer_libraries_svr4): Update.
578 (handle_query): Update.
579 * linux-low.cc (linux_target_ops): Update.
580 (linux_process_target::supports_qxfer_libraries_svr4): Define.
581 (linux_qxfer_libraries_svr4): Turn into ...
582 (linux_process_target::qxfer_libraries_svr4): ... this.
583 * linux-low.h (class linux_process_target): Update.
584 * lynx-low.cc (lynx_target_ops): Update.
585 * nto-low.cc (nto_target_ops): Update.
586 * win32-low.cc (win32_target_ops): Update.
587
588 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
589
590 Turn process_stratum_target's supports_disable_randomization op
591 into a method of process_target.
592
593 * target.h (struct process_stratum_target): Remove the target op.
594 (class process_target): Add the target op.
595 (target_supports_disable_randomization): Update the macro.
596 * target.cc (process_target::supports_disable_randomization): Define.
597
598 Update the derived classes and callers below.
599
600 * linux-low.cc (linux_target_ops): Update.
601 (linux_supports_disable_randomization): Turn into ...
602 (linux_process_target::supports_disable_randomization): ... this.
603 * linux-low.h (class linux_process_target): Update.
604 * lynx-low.cc (lynx_target_ops): Update.
605 * nto-low.cc (nto_target_ops): Update.
606 * win32-low.cc (win32_target_ops): Update.
607
608 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
609
610 Turn process_stratum_target's emit_ops op into a method of
611 process_target.
612
613 * target.h (struct process_stratum_target): Remove the target op.
614 (class process_target): Add the target op.
615 (target_emit_ops): Update the macro.
616 * target.cc (process_target::emit_ops): Define.
617
618 Update the derived classes and callers below.
619
620 * linux-low.cc (linux_target_ops): Update.
621 (linux_emit_ops): Turn into ...
622 (linux_process_target::emit_ops): ... this.
623 * linux-low.h (class linux_process_target): Update.
624 * lynx-low.cc (lynx_target_ops): Update.
625 * nto-low.cc (nto_target_ops): Update.
626 * win32-low.cc (win32_target_ops): Update.
627
628 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
629
630 Turn process_stratum_target's install_fast_tracepoint_jump_pad
631 and get_min_fast_tracepoint_insn_len ops into methods of
632 process_target.
633
634 * target.h (struct process_stratum_target): Remove the target ops.
635 (class process_target): Add the target ops. Also add
636 'supports_fast_tracepoints'.
637 (target_supports_fast_tracepoints): Update the macro.
638 (target_get_min_fast_tracepoint_insn_len): Update the macro.
639 (install_fast_tracepoint_jump_pad): Update and rename the macro
640 to ...
641 (target_install_fast_tracepoint_jump_pad): ... this.
642 * target.cc (process_target::supports_fast_tracepoints): Define.
643 (process_target::install_fast_tracepoint_jump_pad): Define.
644 (process_target::get_min_fast_tracepoint_insn_len): Define.
645
646 Update the derived classes and callers below.
647
648 * tracepoint.cc (install_fast_tracepoint): Update.
649 * linux-low.cc (linux_target_ops): Update.
650 (linux_process_target::supports_fast_tracepoints): Define.
651 (linux_install_fast_tracepoint_jump_pad): Turn into ...
652 (linux_process_target::install_fast_tracepoint_jump_pad): ... this.
653 (linux_get_min_fast_tracepoint_insn_len): Turn into ...
654 (linux_process_target::get_min_fast_tracepoint_insn_len): ... this.
655 * linux-low.h (class linux_process_target): Update.
656 * lynx-low.cc (lynx_target_ops): Update.
657 * nto-low.cc (nto_target_ops): Update.
658 * win32-low.cc (win32_target_ops): Update.
659
660 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
661
662 Turn process_stratum_target's stabilize_threads op into a
663 method of process_target.
664
665 * target.h (struct process_stratum_target): Remove the target op.
666 (class process_target): Add the target op.
667 (target_stabilize_threads): Update the macro.
668 * target.cc (process_target::stabilize_threads): Define.
669
670 Update the derived classes and callers below.
671
672 * server.cc (handle_status): Update.
673 * tracepoint.cc (cmd_qtdp): Update.
674 (cmd_qtstart): Update.
675 * linux-low.cc (linux_target_ops): Update.
676 (linux_stabilize_threads): Turn into ...
677 (linux_process_target::stabilize_threads): ... this.
678 (linux_wait_1): Update.
679 * linux-low.h (class linux_process_target): Update.
680 * lynx-low.cc (lynx_target_ops): Update.
681 * nto-low.cc (nto_target_ops): Update.
682 * win32-low.cc (win32_target_ops): Update.
683
684 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
685
686 Turn process_stratum_target's pause_all and unpause_all ops
687 into methods of process_target.
688
689 * target.h (struct process_stratum_target): Remove the target ops.
690 (class process_target): Add the target ops.
691 (pause_all): Update the macro and rename to...
692 (target_pause_all): ... this.
693 (unpause_all): Update the macro and rename to...
694 (target_unpause_all): ... this.
695 * target.cc (process_target::pause_all): Define.
696 (process_target::unpause_all): Define.
697
698 Update the derived classes and callers below.
699
700 * server.cc (handle_status): Update.
701 * tracepoint.cc (clear_installed_tracepoints): Update.
702 (cmd_qtdp): Update.
703 (cmd_qtstart): Update.
704 (stop_tracing): Update.
705 (cmd_qtstatus): Update.
706 (upload_fast_traceframes): Update.
707 (run_inferior_command): Update.
708 * linux-low.cc (linux_target_ops): Update.
709 (linux_pause_all): Turn into ...
710 (linux_process_target::pause_all): ... this.
711 (linux_unpause_all): Turn into ...
712 (linux_process_target::unpause_all): ... this.
713 (linux_process_target::prepare_to_access_memory): Update.
714 (linux_process_target::done_accessing_memory): Update.
715 * linux-low.h (class linux_process_target): Update.
716 * lynx-low.cc (lynx_target_ops): Update.
717 * nto-low.cc (nto_target_ops): Update.
718 * win32-low.cc (win32_target_ops): Update.
719
720 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
721
722 Turn process_stratum_target's get_tib_address op into a method of
723 process_target.
724
725 * target.h (struct process_stratum_target): Remove the target op.
726 (class process_target): Add the target op. Also add
727 'supports_get_tib_address'.
728 * target.cc (process_target::get_tib_address): Define.
729 (process_target::supports_get_tib_address): Define.
730
731 Update the derived classes and callers below.
732
733 * server.cc (handle_query): Update.
734 * linux-low.cc (win32_target_ops): Update.
735 * lynx-low.cc (lynx_target_ops): Update.
736 * nto-low.cc (nto_target_ops): Update.
737 * win32-low.cc (win32_target_ops): Update.
738 (win32_process_target::supports_get_tib_address): Define.
739 (win32_get_tib_address): Turn into ...
740 (win32_process_target::get_tib_address): ... this.
741 * win32-low.h (class win32_process_target): Update.
742
743 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
744
745 Turn process_stratum_target's thread_stopped op into a method of
746 process_target.
747
748 * target.h (struct process_stratum_target): Remove the target op.
749 (class process_target): Add the target op. Also add
750 'supports_thread_stopped'.
751 (target_thread_stopped): Update the macro.
752 * target.cc (process_target::thread_stopped): Define.
753 (process_target::supports_thread_stopped): Define.
754 (prepare_to_access_memory): Update.
755
756 Update the derived classes and callers below.
757
758 * server.cc (queue_stop_reply_callback): Update.
759 * linux-low.cc (linux_target_ops): Update.
760 (linux_process_target::supports_thread_stopped): Define.
761 (linux_thread_stopped): Turn into ...
762 (linux_process_target::thread_stopped): ... this.
763 * linux-low.h (class linux_process_target): Update.
764 * lynx-low.cc (lynx_target_ops): Update.
765 * nto-low.cc (nto_target_ops): Update.
766 * win32-low.cc (win32_target_ops): Update.
767
768 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
769
770 Turn process_stratum_target's read_pc and write_pc ops into
771 methods of process_target.
772
773 * target.h (struct process_stratum_target): Remove the target ops.
774 (class process_target): Add the target ops.
775 * target.cc (process_target::read_pc): Define.
776 (process_target::write_pc): Define.
777
778 Update the derived classes and callers below.
779
780 * regcache.cc (regcache_read_pc): Update.
781 (regcache_write_pc): Update.
782 * linux-low.cc (linux_target_ops): Update.
783 (linux_read_pc): Turn into ...
784 (linux_process_target::read_pc): ... this.
785 (linux_write_pc): Turn into ...
786 (linux_process_target::write_pc): ... this.
787 * linux-low.h (class linux_process_target): Update.
788 * lynx-low.cc (lynx_target_ops): Update.
789 * nto-low.cc (nto_target_ops): Update.
790 * win32-low.cc (win32_target_ops): Update.
791
792 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
793
794 Turn process_stratum_target's supports_tracepoints op into a
795 method of process_target.
796
797 * target.h (struct process_stratum_target): Remove the target op.
798 (class process_target): Add the target op.
799 (target_supports_tracepoints): Update the macro.
800 * target.cc (process_target::supports_tracepoints): Define.
801
802 Update the derived classes and callers below.
803
804 * linux-low.cc (linux_target_ops): Update.
805 (linux_supports_tracepoints): Turn into ...
806 (linux_process_target::supports_tracepoints): ... this.
807 * linux-low.h (class linux_process_target): Update.
808 * lynx-low.cc (lynx_target_ops): Update.
809 * nto-low.cc (nto_target_ops): Update.
810 * win32-low.cc (win32_target_ops): Update.
811
812 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
813
814 Turn process_stratum_target's process_qsupported op into a method
815 of process_target.
816
817 * target.h (struct process_stratum_target): Remove the target op.
818 (class process_target): Add the target op.
819 (target_process_qsupported): Update the macro.
820 * target.cc (process_target::process_qsupported): Define.
821
822 Update the derived classes and callers below.
823
824 * linux-low.cc (linux_target_ops): Update.
825 (linux_process_qsupported): Turn into ...
826 (linux_process_target::process_qsupported): ... this.
827 * linux-low.h (class linux_process_target): Update.
828 * lynx-low.cc (lynx_target_ops): Update.
829 * nto-low.cc (nto_target_ops): Update.
830 * win32-low.cc (win32_target_ops): Update.
831
832 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
833
834 Turn process_stratum_target's read_loadmap op into a method of
835 process_target.
836
837 * target.h (struct process_stratum_target): Remove the target op.
838 (class process_target): Add the target op. Also add
839 'supports_read_loadmap'.
840 * target.cc (process_target::read_loadmap): Define.
841 (process_target::supports_read_loadmap): Define.
842
843 Update the derived classes and callers below.
844
845 * server.cc (handle_qxfer_fdpic): Update.
846 (handle_query): Update.
847 * linux-low.cc (linux_target_ops): Update.
848 (linux_process_target::supports_read_loadmap): Define.
849 (linux_read_loadmap): Turn into ...
850 (linux_process_target::read_loadmap): ... this.
851 * linux-low.h (class linux_process_target): Update.
852 * lynx-low.cc (lynx_target_ops): Update.
853 * nto-low.cc (nto_target_ops): Update.
854 * win32-low.cc (win32_target_ops): Update.
855
856 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
857
858 Turn process_stratum_target's core_of_thread op into a method of
859 process_target.
860
861 * target.h (struct process_stratum_target): Remove the target op.
862 (class process_target): Add the target op.
863 (target_core_of_thread): Update the macro.
864 * target.cc (process_target::core_of_thread): Define.
865
866 Update the derived classes and callers below.
867
868 * linux-low.cc (linux_target_ops): Update.
869 (linux_process_target::core_of_thread): Define.
870 * linux-low.h (class linux_process_target): Update.
871 * lynx-low.cc (lynx_target_ops): Update.
872 * nto-low.cc (nto_target_ops): Update.
873 * win32-low.cc (win32_target_ops): Update.
874
875 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
876
877 Turn process_stratum_target's handle_monitor_command op into a
878 method of process_target.
879
880 * target.h (struct process_stratum_target): Remove the target op.
881 (class process_target): Add the target op.
882 (target_handle_monitor_command): Update the macro.
883 * target.cc (process_target::handle_monitor_command): Define.
884
885 Update the derived classes and callers below.
886
887 * server.cc (handle_query): Update.
888 * linux-low.cc (linux_target_ops): Update.
889 (linux_process_target::handle_monitor_command): Define.
890 * linux-low.h (class linux_process_target): Update.
891 * lynx-low.cc (lynx_target_ops): Update.
892 * nto-low.cc (nto_target_ops): Update.
893 * win32-low.cc (win32_target_ops): Update.
894
895 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
896
897 Turn process_stratum_target's handle_new_gdb_connection op into a
898 method of process_target.
899
900 * target.h (struct process_stratum_target): Remove the target op.
901 (class process_target): Add the target op.
902 (target_handle_new_gdb_connection): Update the macro.
903 * target.cc (process_target::handle_new_gdb_connection): Define.
904
905 Update the derived classes and callers below.
906
907 * linux-low.cc (linux_target_ops): Update.
908 (linux_handle_new_gdb_connection): Turn into ...
909 (linux_process_target::handle_new_gdb_connection): ... this.
910 * linux-low.h (class linux_process_target): Update.
911 * lynx-low.cc (lynx_target_ops): Update.
912 * nto-low.cc (nto_target_ops): Update.
913 * win32-low.cc (win32_target_ops): Update.
914
915 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
916
917 Turn process_stratum_target's supports_fork_events,
918 supports_vfork_events, and supports_exec_events ops into methods
919 of process_target.
920
921 * target.h (struct process_stratum_target): Remove the target ops.
922 (class process_target): Add the target ops.
923 (target_supports_fork_events): Update the macro.
924 (target_supports_vfork_events): Update the macro.
925 (target_supports_exec_events): Update the macro.
926 * target.cc (process_target::supports_fork_events): Define.
927 (process_target::supports_vfork_events): Define.
928 (process_target::supports_exec_events): Define.
929
930 Update the derived classes and callers below.
931
932 * linux-low.cc (linux_target_ops): Update.
933 (linux_supports_fork_events): Turn into ...
934 (linux_process_target::supports_fork_events): ... this.
935 (linux_supports_vfork_events): Turn into ...
936 (linux_process_target::supports_vfork_events): ... this.
937 (linux_supports_exec_events): Turn into ...
938 (linux_process_target::supports_exec_events): ... this.
939 * linux-low.h (class linux_process_target): Update.
940 * lynx-low.cc (lynx_target_ops): Update.
941 * nto-low.cc (nto_target_ops): Update.
942 * win32-low.cc (win32_target_ops): Update.
943
944 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
945
946 Turn process_stratum_target's supports_multi_process op into a
947 method of process_target.
948
949 * target.h (struct process_stratum_target): Remove the target op.
950 (class process_target): Add the target op.
951 * target.cc (process_target::supports_multi_process): Define.
952 (target_supports_multi_process): Update.
953
954 Update the derived classes and callers below.
955
956 * linux-low.cc (linux_target_ops): Update.
957 (linux_supports_multi_process): Turn into ...
958 (linux_process_target::supports_multi_process): ... this.
959 * linux-low.h (class linux_process_target): Update.
960 * lynx-low.cc (lynx_target_ops): Update.
961 * nto-low.cc (nto_target_ops): Update.
962 * win32-low.cc (win32_target_ops): Update.
963
964 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
965
966 Turn process_stratum_target's supports_non_stop, async, and
967 start_non_stop ops into methods of process_target.
968
969 * target.h (struct process_stratum_target): Remove the target ops.
970 (class process_target): Add the target ops.
971 (target_supports_non_stop): Update the macro.
972 (target_async): Update the macro.
973 (start_non_stop): Remove declaration.
974 * target.cc (process_target::supports_non_stop): Define.
975 (process_target::async): Define.
976 (process_target::start_non_stop): Define.
977 (start_non_stop): Remove.
978
979 Update the derived classes and callers below.
980
981 * server.cc (handle_qxfer_siginfo): Update.
982 (handle_query): Update.
983 * linux-low.cc (linux_target_ops): Update.
984 (linux_supports_non_stop): Turn into ...
985 (linux_process_target::supports_non_stop): ... this.
986 (linux_async): Turn into ...
987 (linux_process_target::async): ... this.
988 (linux_start_non_stop): Turn into ...
989 (linux_process_target::start_non_stop): ... this.
990 * linux-low.h (class linux_process_target): Update.
991 * lynx-low.cc (lynx_target_ops): Update.
992 * nto-low.cc (nto_target_ops): Update.
993 (nto_supports_non_stop): Remove; rely on the default behavior
994 instead.
995 * win32-low.cc (win32_target_ops): Update.
996
997 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
998
999 Turn process_stratum_target's qxfer_siginfo op into a method of
1000 process_target.
1001
1002 * target.h (struct process_stratum_target): Remove the target op.
1003 (class process_target): Add the target op. Also add
1004 'supports_qxfer_siginfo'.
1005 * target.cc (process_target::qxfer_siginfo): Define.
1006 (process_target::supports_qxfer_siginfo): Define.
1007
1008 Update the derived classes and callers below.
1009
1010 * server.cc (handle_qxfer_siginfo): Update.
1011 (handle_query): Update.
1012 * linux-low.cc (linux_target_ops): Update.
1013 (linux_process_target::supports_qxfer_siginfo): Define.
1014 (linux_xfer_siginfo): Turn into ...
1015 (linux_process_target::qxfer_siginfo): ... this.
1016 * linux-low.h (class linux_process_target): Update.
1017 * lynx-low.cc (lynx_target_ops): Update.
1018 * nto-low.cc (nto_target_ops): Update.
1019 * win32-low.cc (win32_target_ops): Update.
1020
1021 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1022
1023 Turn process_stratum_target's qxfer_osdata op into a method of
1024 process_target.
1025
1026 * target.h (struct process_stratum_target): Remove the target op.
1027 (class process_target): Add the target op. Also add
1028 'supports_qxfer_osdata'.
1029 * target.cc (process_target::qxfer_osdata): Define.
1030 (process_target::supports_qxfer_osdata): Define.
1031
1032 Update the derived classes and callers below.
1033
1034 * server.cc (handle_qxfer_osdata): Update.
1035 (handle_query): Update.
1036 * linux-low.cc (linux_target_ops): Update.
1037 (linux_process_target::supports_qxfer_osdata): Define.
1038 (linux_qxfer_osdata): Turn into ...
1039 (linux_process_target::qxfer_osdata): ... this.
1040 * linux-low.h (class linux_process_target): Update.
1041 * lynx-low.cc (lynx_target_ops): Update.
1042 * nto-low.cc (nto_target_ops): Update.
1043 * win32-low.cc (win32_target_ops): Update.
1044
1045 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1046
1047 Turn process_stratum_target's hostio_last_error op into a
1048 method of process_target.
1049
1050 * target.h (struct process_stratum_target): Remove the target op.
1051 (class process_target): Add the target op.
1052 * target.cc: Add "hostio.h" to includes.
1053 (process_target::hostio_last_error): Define.
1054
1055 Update the derived classes and callers below.
1056
1057 * hostio.cc (hostio_error): Update.
1058 * linux-low.cc: Remove "hostio.h" from includes.
1059 (linux_target_ops): Update.
1060 * lynx-low.cc (lynx_target_ops): Update.
1061 * nto-low.cc (nto_target_ops): Update.
1062 * win32-low.h (class win32_process_target): Update.
1063 * win32-low.cc (win32_target_ops): Update.
1064 (wince_hostio_last_error): Turn into ...
1065 (win32_process_target::hostio_last_error): ... this.
1066
1067 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1068
1069 Turn process_stratum_target's get_tls_address op into a method of
1070 process_target.
1071
1072 * target.h (struct process_stratum_target): Remove the target op.
1073 (class process_target): Add the target op. Also add
1074 'supports_get_tls_address'.
1075 * target.cc (process_target::get_tls_address): Define.
1076 (process_target::supports_get_tls_address): Define.
1077
1078 Update the derived classes and callers below.
1079
1080 * server.cc (handle_query): Update.
1081 * linux-low.cc (linux_target_ops): Update.
1082 (linux_process_target::supports_get_tls_address): Define.
1083 (linux_process_target::get_tls_address): Define.
1084 * linux-low.h (class linux_process_target): Update.
1085 * lynx-low.cc (lynx_target_ops): Update.
1086 * nto-low.cc (nto_target_ops): Update.
1087 * win32-low.cc (win32_target_ops): Update.
1088
1089 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1090
1091 Turn process_stratum_target's read_offsets op into a method of
1092 process_target.
1093
1094 * target.h (struct process_stratum_target): Remove the target op.
1095 (class process_target): Add the target op. Also add
1096 'supports_read_offsets'.
1097 * target.cc (process_target::read_offsets): Define.
1098 (process_target::supports_read_offsets): Define.
1099
1100 Update the derived classes and callers below.
1101
1102 * server.cc (handle_query): Update.
1103 * linux-low.cc (SUPPORTS_READ_OFFSETS): New #define directive.
1104 (linux_target_ops): Update.
1105 (linux_process_target::supports_read_offsets): Define.
1106 (linux_read_offsets): Turn into ...
1107 (linux_process_target::read_offsets): ... this.
1108 * linux-low.h (class linux_process_target): Update.
1109 * lynx-low.cc (lynx_target_ops): Update.
1110 * nto-low.cc (nto_target_ops): Update.
1111 * win32-low.cc (win32_target_ops): Update.
1112
1113 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1114
1115 Turn process_stratum_target's stopped_by_watchpoint and
1116 stopped_data_address ops into methods of process_target.
1117
1118 * target.h (struct process_stratum_target): Remove the target ops.
1119 (class process_target): Add the target ops.
1120 * target.cc (process_target::stopped_by_watchpoint): Define.
1121 (process_target::stopped_data_address): Define.
1122
1123 Update the derived classes and callers below.
1124
1125 * remote-utils.cc (prepare_resume_reply): Update.
1126 * linux-low.cc (linux_target_ops): Update.
1127 (linux_stopped_by_watchpoint): Turn into ...
1128 (linux_process_target::stopped_by_watchpoint): ... this.
1129 (linux_stopped_data_address): Turn into ...
1130 (linux_process_target::stopped_data_address): ... this.
1131 * linux-low.h (class linux_process_target): Update.
1132 * lynx-low.cc (lynx_target_ops): Update.
1133 * nto-low.cc (nto_target_ops): Update.
1134 (nto_stopped_by_watchpoint): Turn into ...
1135 (nto_process_target::stopped_by_watchpoint): ... this.
1136 (nto_stopped_data_address): Turn into ...
1137 (nto_process_target::stopped_data_address): ... this.
1138 * nto-low.h (class nto_process_target): Update.
1139 * win32-low.cc (win32_target_ops): Update.
1140 (win32_stopped_by_watchpoint): Turn into ...
1141 (win32_process_target::stopped_by_watchpoint): ... this.
1142 (win32_stopped_data_address): Turn into ...
1143 (win32_process_target::stopped_data_address): ... this.
1144 * win32-low.h (class win32_process_target): Update.
1145
1146 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1147
1148 Turn process_stratum_target's supports_hardware_single_step op into
1149 a method of process_target.
1150
1151 * target.h (struct process_stratum_target): Remove the target op.
1152 (class process_target): Add the target op.
1153 (target_supports_hardware_single_step): Update the macro.
1154 (target_can_do_hardware_single_step): Remove declaration.
1155 * target.cc (process_target::supports_hardware_single_step): Define.
1156 (target_can_do_hardware_single_step): Remove.
1157
1158 Update the derived classes and callers below.
1159
1160 * linux-low.h (class linux_process_target): Update.
1161 * linux-low.cc (linux_target_ops): Update.
1162 (linux_supports_hardware_single_step): Turn into ...
1163 (linux_process_target::supports_hardware_single_step): ... this.
1164 * lynx-low.h (class lynx_process_target): Update.
1165 * lynx-low.cc (lynx_target_ops): Update.
1166 (lynx_process_target::supports_hardware_single_step): Define.
1167 * nto-low.h (class nto_process_target): Update.
1168 * nto-low.cc (nto_target_ops): Update.
1169 (nto_process_target::supports_hardware_single_step): Define.
1170 * win32-low.h (class win32_process_target): Update.
1171 * win32-low.cc (win32_target_ops): Update.
1172 (win32_process_target::supports_hardware_single_step): Define.
1173
1174 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1175
1176 Turn process_stratum_target's {supports_}stopped_by_hw_breakpoint
1177 ops into methods of process_target.
1178
1179 * target.h (struct process_stratum_target): Remove the target ops.
1180 (class process_target): Add the target ops.
1181 (target_stopped_by_hw_breakpoint): Update the macro.
1182 (target_supports_stopped_by_hw_breakpoint): Update the macro.
1183 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
1184 (process_target::supports_stopped_by_hw_breakpoint): Define.
1185
1186 Update the derived classes and callers below.
1187
1188 * linux-low.cc (linux_target_ops): Update.
1189 (linux_stopped_by_hw_breakpoint): Turn into ...
1190 (linux_process_target::stopped_by_hw_breakpoint): ... this.
1191 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
1192 (linux_process_target::supports_stopped_by_hw_breakpoint): ... this.
1193 * linux-low.h (class linux_process_target): Update.
1194 * lynx-low.cc (lynx_target_ops): Update.
1195 * nto-low.cc (nto_target_ops): Update.
1196 * win32-low.cc (win32_target_ops): Update.
1197
1198 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1199
1200 Turn process_stratum_target's {supports_}stopped_by_sw_breakpoint
1201 ops into methods of process_target.
1202
1203 * target.h (struct process_stratum_target): Remove the target ops.
1204 (class process_target): Add the target ops.
1205 (target_stopped_by_sw_breakpoint): Update the macro.
1206 (target_supports_stopped_by_sw_breakpoint): Update the macro.
1207 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
1208 (process_target::supports_stopped_by_sw_breakpoint): Define.
1209
1210 Update the derived classes and callers below.
1211
1212 * linux-low.cc (linux_target_ops): Update.
1213 (linux_stopped_by_sw_breakpoint): Turn into ...
1214 (linux_process_target::stopped_by_sw_breakpoint): ... this.
1215 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
1216 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
1217 * linux-low.h (class linux_process_target): Update.
1218 * lynx-low.cc (lynx_target_ops): Update.
1219 * nto-low.cc (nto_target_ops): Update.
1220 * win32-low.cc (win32_target_ops): Update.
1221
1222 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1223
1224 Turn process_stratum_target's insert_point and remove_point ops
1225 into methods of process_target.
1226
1227 * target.h (struct process_stratum_target): Remove the target ops.
1228 (class process_target): Add the target ops.
1229 * target.cc (process_target::insert_point): Define.
1230 (process_target::remove_point): Define.
1231
1232 Update the derived classes and callers below.
1233
1234 * mem-break.cc (set_raw_breakpoint_at): Update.
1235 (delete_raw_breakpoint): Update.
1236 (uninsert_raw_breakpoint): Update.
1237 (reinsert_raw_breakpoint): Update.
1238 * linux-low.cc (linux_target_ops): Update.
1239 (linux_insert_point): Turn into ...
1240 (linux_process_target::insert_point): ... this.
1241 (linux_remove_point): Turn into ...
1242 (linux_process_target::remove_point): ... this.
1243 * linux-low.h (class linux_process_target): Update.
1244 * lynx-low.cc (lynx_target_ops): Update.
1245 * nto-low.cc (nto_target_ops): Update.
1246 (nto_insert_point): Turn into ...
1247 (nto_process_target::insert_point): ... this.
1248 (nto_remove_point): Turn into ...
1249 (nto_process_target::remove_point): ... this.
1250 * nto-low.h (class nto_process_target): Update.
1251 * win32-low.cc (win32_target_ops): Update.
1252 (win32_insert_point): Turn into ...
1253 (win32_process_target::insert_point): ... this.
1254 (win32_remove_point): Turn into ...
1255 (win32_process_target::remove_point): ... this.
1256 * win32-low.h (class win32_process_target): Update.
1257
1258 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1259
1260 Turn process_stratum_target's supports_z_point_type op into a
1261 method of process_target.
1262
1263 * target.h (struct process_stratum_target): Remove the target op.
1264 (class process_target): Add the target op.
1265 * target.cc (process_target::supports_z_point_type): Define.
1266
1267 Update the derived classes and callers below.
1268
1269 * mem-break.cc (z_type_supported): Update.
1270 * linux-low.cc (linux_target_ops): Update.
1271 (linux_supports_z_point_type): Turn into ...
1272 (linux_process_target::supports_z_point_type): ... this.
1273 * linux-low.h (class linux_process_target): Update.
1274 * lynx-low.cc (lynx_target_ops): Update.
1275 * nto-low.cc (nto_target_ops): Update.
1276 (nto_supports_z_point_type): Turn into ...
1277 (nto_process_target::supports_z_point_type): ... this.
1278 * nto-low.h (class nto_process_target): Update.
1279 * win32-low.cc (win32_target_ops): Update.
1280 (win32_supports_z_point_type): Turn into ...
1281 (win32_process_target::supports_z_point_type): ... this.
1282 * win32-low.h (class win32_process_target): Update.
1283
1284 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1285
1286 Turn process_stratum_target's read_auxv op into a method of
1287 process_target.
1288
1289 * target.h (class process_stratum_target): Remove the target op.
1290 (struct process_target): Add the target op. Also add
1291 'supports_read_auxv'.
1292 * target.cc (process_target::read_auxv): Define.
1293 (process_target::supports_read_auxv): Define.
1294
1295 Update the derived classes and callers below.
1296
1297 * server.cc (handle_qxfer_auxv): Update.
1298 (handle_query): Update.
1299 * linux-low.cc (linux_target_ops): Update.
1300 (linux_process_target::supports_read_auxv): Define.
1301 (linux_read_auxv): Turn into ...
1302 (linux_process_target::read_auxv): ... this.
1303 * linux-low.h (class linux_process_target): Update.
1304 * lynx-low.cc (lynx_target_ops): Update.
1305 * nto-low.cc (nto_target_ops): Update.
1306 (nto_process_target::supports_read_auxv): Define.
1307 (nto_read_auxv): Turn into ...
1308 (nto_process_target::read_auxv): ... this.
1309 * nto-low.h (class nto_process_target): Update.
1310 * win32-low.cc (win32_target_ops): Update.
1311
1312 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1313
1314 Turn process_stratum_target's request_interrupt op into a method of
1315 process_target.
1316
1317 * target.h (struct process_stratum_target): Remove the target op.
1318 (class process_target): Add the target op.
1319
1320 Update the derived classes and callers below.
1321
1322 * remote-utils.cc (putpkt_binary_1): Update.
1323 (input_interrupt): Update.
1324 (getpkt): Update.
1325 * server.cc (handle_v_requests): Update.
1326 * linux-low.cc (linux_target_ops): Update.
1327 (linux_request_interrupt): Turn into ...
1328 (linux_process_target::request_interrupt): ... this.
1329 * linux-low.h (class linux_process_target): Update.
1330 * lynx-low.cc (lynx_target_ops): Update.
1331 (lynx_request_interrupt): Turn into ...
1332 (lynx_process_target::request_interrupt): ... this.
1333 * lynx-low.h (class lynx_process_target): Update.
1334 * nto-low.cc (nto_target_ops): Update.
1335 (nto_request_interrupt): Turn into ...
1336 (nto_process_target::request_interrupt): ... this.
1337 * nto-low.h (class nto_process_target): Update.
1338 * win32-low.cc (win32_target_ops): Update.
1339 (win32_request_interrupt): Turn into ...
1340 (win32_process_target::request_interrupt): ... this.
1341 * win32-low.h (class win32_process_target): Update.
1342
1343 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1344
1345 Turn process_stratum_target's look_up_symbols op into a method of
1346 process_target.
1347
1348 * target.h (struct process_stratum_target): Remove the target op.
1349 (class process_target): Add the target op.
1350 * target.cc (process_target::look_up_symbols): Define.
1351
1352 Update the derived classes and callers below.
1353
1354 * server.cc (handle_query): Update.
1355 * linux-low.cc (linux_target_ops): Update.
1356 (linux_look_up_symbols): Turn into ...
1357 (linux_process_target::look_up_symbols): ... this.
1358 * linux-low.h (class linux_process_target): Update.
1359 * lynx-low.cc (lynx_target_ops): Update.
1360 * nto-low.cc (nto_target_ops): Update.
1361 * win32-low.cc (win32_target_ops): Update.
1362
1363 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1364
1365 Turn process_stratum_target's read_memory and write_memory
1366 ops into methods of process_target.
1367
1368 * target.h (struct process_stratum_target): Remove the target ops.
1369 (class process_target): Add the target ops.
1370
1371 Update the derived classes and callers below.
1372
1373 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
1374 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
1375 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
1376 (arm_get_syscall_trapinfo): Update.
1377 * linux-cris-low.cc (cris_breakpoint_at): Update.
1378 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
1379 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
1380 * linux-mips-low.cc (mips_breakpoint_at): Update.
1381 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
1382 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
1383 * linux-sh-low.cc (sh_breakpoint_at): Update.
1384 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
1385 (sparc_store_gregset_from_stack): Update.
1386 (sparc_breakpoint_at): Update.
1387 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
1388 * linux-tile-low.cc (tile_breakpoint_at): Update.
1389 * linux-x86-low.cc (x86_breakpoint_at): Update.
1390 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
1391 * mem-brea.cc (insert_memory_breakpoint): Update.
1392 (validate_inserted_breakpoint): Update.
1393 * target.cc (read_inferior_memory): Update.
1394 (target_write_memory): Update.
1395 * linux-low.cc (linux_target_ops): Update.
1396 (linux_read_memory): Make a wrapper around the read_memory target
1397 op call.
1398 (linux_process_target::read_memory): Rename from linux_read_memory.
1399 (linux_write_memory): Turn into ...
1400 (linux_process_target::write_memory): ... this.
1401 * linux-low.h (class linux_process_target): Update.
1402 * lynx-low.cc (lynx_target_ops): Update.
1403 (lynx_read_memory): Turn into ...
1404 (lynx_process_target::read_memory): ... this.
1405 (lynx_write_memory): Turn into ...
1406 (lynx_process_target::write_memory): ... this.
1407 * lynx-low.h (class lynx_process_target): Update.
1408 * nto-low.cc (nto_target_ops): Update.
1409 (nto_read_memory): Turn into ...
1410 (nto_process_target::read_memory): ... this.
1411 (nto_write_memory): Turn into ...
1412 (nto_process_target::write_memory): ... this.
1413 * nto-low.h (class nto_process_target): Update.
1414 * win32-low.cc (win32_target_ops): Update.
1415 (win32_read_inferior_memory): Turn into ...
1416 (win32_process_target::read_memory): ... this.
1417 (win32_write_inferior_memory): Turn into ...
1418 (win32_process_target::write_memory): ... this.
1419 * win32-low.h (class win32_process_target): Update.
1420
1421 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1422
1423 Turn process_stratum_target's prepare_to_access_memory and
1424 done_accessing_memory ops into methods of process_target.
1425
1426 * target.h (struct process_stratum_target): Remove the target ops.
1427 (class process_target): Add the target ops.
1428 * target.cc (process_target::prepare_to_access_memory): Define.
1429 (process_target::done_accessing_memory): Define.
1430 (prepare_to_access_memory): Update.
1431 (done_accessing_memory): Update.
1432
1433 Update the derived classes and callers below.
1434
1435 * linux-low.cc (linux_target_ops): Update.
1436 (linux_prepare_to_access_memory): Turn into ...
1437 (linux_process_target::prepare_to_access_memory): ... this.
1438 (linux_done_accessing_memory): Turn into ...
1439 (linux_process_target::done_accessing_memory): ... this.
1440 * linux-low.h (class linux_process_target): Update.
1441 * lynx-low.cc (lynx_target_ops): Update.
1442 * nto-low.cc (nto_target_ops): Update.
1443 * win32-low.cc (win32_target_ops): Update.
1444
1445 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1446
1447 Turn process_stratum_target's fetch_registers and store_registers
1448 ops into methods of process_target.
1449
1450 * target.h (struct process_stratum_target): Remove the target ops.
1451 (class process_target): Add the target ops.
1452 (fetch_inferior_registers): Update the macro.
1453 (store_inferior_registers): Update the macro.
1454
1455 Update the derived classes and callers below.
1456
1457 * linux-low.cc (linux_target_ops): Update.
1458 (linux_fetch_registers): Turn into ...
1459 (linux_process_target::fetch_registers): ... this.
1460 (linux_store_registers): Turn into ...
1461 (linux_process_target::store_registers): ... this.
1462 * linux-low.h (class linux_process_target): Update.
1463 * lynx-low.cc (lynx_target_ops): Update.
1464 (lynx_fetch_registers): Turn into ...
1465 (lynx_process_target::fetch_registers): ... this.
1466 (lynx_store_registers): Turn into ...
1467 (lynx_process_target::store_registers): ... this.
1468 * lynx-low.h (class lynx_process_target): Update.
1469 * nto-low.cc (nto_target_ops): Update.
1470 (nto_fetch_registers): Turn into ...
1471 (nto_process_target::fetch_registers): ... this.
1472 (nto_store_registers): Turn into ...
1473 (nto_process_target::store_registers): ... this.
1474 * nto-low.h (class nto_process_target): Update.
1475 * win32-low.cc (win32_target_ops): Update.
1476 (win32_fetch_inferior_registers): Turn into ...
1477 (win32_process_target::fetch_registers): ... this.
1478 (win32_store_inferior_registers): Turn into ...
1479 (win32_process_target::store_registers): ... this.
1480 * win32-low.h (class win32_process_target): Update.
1481
1482 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1483
1484 Turn process_stratum_target's wait op into a method of
1485 process_target.
1486
1487 * target.h (struct process_stratum_target): Remove the target op.
1488 (class process_target): Add the target op.
1489
1490 Update the derived classes and callers below.
1491
1492 * target.cc (target_wait): Update.
1493 * linux-low.cc (linux_target_ops): Update.
1494 (linux_wait): Turn into ...
1495 (linux_process_target::wait): ... this.
1496 * linux-low.h (class linux_process_target): Update.
1497 * lynx-low.cc (lynx_target_ops): Update.
1498 (lynx_wait): Turn into ...
1499 (lynx_process_target::wait): ... this.
1500 * lynx-low.h (class lynx_process_target): Update.
1501 * nto-low.cc (nto_target_ops): Update.
1502 (nto_wait): Turn into ...
1503 (nto_process_target::wait): ... this.
1504 * nto-low.h (class nto_process_target): Update.
1505 * win32-low.cc (win32_target_ops): Update.
1506 (win32_wait): Turn into ...
1507 (win32_process_target::wait): ... this.
1508 (do_initial_child_stuff): Update.
1509 * win32-low.h (class win32_process_target): Update.
1510
1511 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1512
1513 Turn process_stratum_target's resume op into a method of
1514 process_target.
1515
1516 * target.h (struct process_stratum_target): Remove the target op.
1517 (class process_target): Add the target op.
1518
1519 Update the derived classes and callers below.
1520
1521 * server.cc (resume): Update.
1522 * target.cc (target_stop_and_wait): Update.
1523 (target_continue_no_signal): Update.
1524 (target_continue): Update.
1525 * linux-low.cc (linux_target_ops): Update.
1526 (linux_resume): Turn into ...
1527 (linux_process_target::resume): ... this.
1528 * linux-low.h (class linux_process_target): Update.
1529 * lynx-low.cc (lynx_target_ops): Update.
1530 (lynx_resume): Turn into ...
1531 (lynx_process_target::resume): ... this.
1532 * lynx-low.h (class lynx_process_target): Update.
1533 * nto-low.cc (nto_target_ops): Update.
1534 (nto_resume): Turn into ...
1535 (nto_process_target::resume): ... this.
1536 * nto-low.h (class nto_process_target): Update.
1537 * win32-low.cc (win32_target_ops): Update.
1538 (win32_resume): Turn into ...
1539 (win32_process_target::resume): ... this.
1540 (win32_process_target::detach): Update.
1541 (do_initial_child_stuff): Update.
1542 * win32-low.h (class win32_process_target): Update.
1543
1544 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1545
1546 Turn process_stratum_target's thread_alive op into a method of
1547 process_target.
1548
1549 * target.h (struct process_stratum_target): Remove the target op.
1550 (class process_target): Add the target op.
1551 (mythread_alive): Update the macro.
1552
1553 Update the derived classes and callers below.
1554
1555 * linux-low.cc (linux_target_ops): Update.
1556 (linux_thread_alive): Turn into ...
1557 (linux_process_target::thread_alive): ... this.
1558 (wait_for_sigstop): Update.
1559 * linux-low.h (class linux_process_target): Update.
1560 * lynx-low.cc (lynx_target_ops): Update.
1561 (lynx_thread_alive): Turn into ...
1562 (lynx_process_target::thread_alive): ... this.
1563 * lynx-low.h (class lynx_process_target): Update.
1564 * nto-low.cc (nto_target_ops): Update.
1565 (nto_thread_alive): Turn into ...
1566 (nto_process_target::thread_alive): ... this.
1567 * nto-low.h (class nto_process_target): Update.
1568 * win32-low.cc (win32_target_ops): Update.
1569 (win32_thread_alive): Turn into ...
1570 (win32_process_target::thread_alive): ... this.
1571 * win32-low.h (class win32_process_target): Update.
1572
1573 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1574
1575 Turn process_stratum_target's join op into a method of
1576 process_target.
1577
1578 * target.h (struct process_stratum_target): Remove the target op.
1579 (class process_target): Add the target op.
1580 (join_inferior): Update the macro.
1581
1582 Update the derived classes and callers below.
1583
1584 * linux-low.cc (linux_target_ops): Update.
1585 (linux_join): Turn into ...
1586 (linux_process_target::join): ... this.
1587 * linux-low.h (class linux_process_target): Update.
1588 * lynx-low.cc (lynx_target_ops): Update.
1589 (lynx_join): Turn into ...
1590 (lynx_process_target::join): ... this.
1591 * lynx-low.h (class lynx_process_target): Update.
1592 * nto-low.cc (nto_target_ops): Update.
1593 (nto_process_target::join): Define.
1594 * nto-low.h (class nto_process_target): Update.
1595 * win32-low.cc (win32_target_ops): Update.
1596 (win32_join): Turn into ...
1597 (win32_process_target::join): ... this.
1598 * win32-low.h (class win32_process_target): Update.
1599
1600 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1601
1602 Turn process_stratum_target's mourn op into a method of
1603 process_target.
1604
1605 * target.h (struct process_stratum_target): Remove the target op.
1606 (class process_target): Add the target op.
1607
1608 Update the derived classes and callers below.
1609
1610 * target.cc (target_mourn_inferior): Update.
1611 * linux-low.cc (linux_target_ops): Update.
1612 (linux_mourn): Turn into ...
1613 (linux_process_target::mourn): ... this.
1614 (handle_extended_wait): Update.
1615 (linux_process_target::kill): Update.
1616 (linux_process_target::detach): Update.
1617 * linux-low.h (class linux_process_target): Update.
1618 * lynx-low.cc (lynx_target_ops): Update.
1619 (lynx_mourn): Turn into ...
1620 (lynx_process_target::mourn): ... this.
1621 * lynx-low.h (class lynx_process_target): Update.
1622 * nto-low.cc (nto_target_ops): Update.
1623 (nto_mourn): Turn into ...
1624 (nto_process_target::mourn): ... this.
1625 * nto-low.h (class nto_process_target): Update.
1626 * win32-low.cc (win32_target_ops): Update.
1627 (win32_mourn): Turn into ...
1628 (win32_process_target::mourn): ... this.
1629 * win32-low.h (class win32_process_target): Update.
1630
1631 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1632
1633 Turn process_stratum_target's detach op into a method of
1634 process_target.
1635
1636 * target.h (struct process_stratum_target): Remove the target op.
1637 (class process_target): Add the target op.
1638 (detach_inferior): Update the macro.
1639
1640 Update the derived classes and callers below.
1641
1642 * linux-low.cc (linux_target_ops): Update.
1643 (linux_detach): Turn into ...
1644 (linux_process_target::detach): ... this.
1645 * linux-low.h (class linux_process_target): Update.
1646 * lynx-low.cc (lynx_target_ops): Update.
1647 (lynx_detach): Turn into ...
1648 (lynx_process_target::detach): ... this.
1649 * lynx-low.h (class lynx_process_target): Update.
1650 * nto-low.cc (nto_target_ops): Update.
1651 (nto_detach): Turn into ...
1652 (nto_process_target::detach): ... this.
1653 * nto-low.h (class nto_process_target): Update.
1654 * win32-low.cc (win32_target_ops): Update.
1655 (win32_detach): Turn into ...
1656 (win32_process_target::detach): ... this.
1657 * win32-low.h (class win32_process_target): Update.
1658
1659 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1660
1661 Turn process_stratum_target's kill op into a method of
1662 process_target.
1663
1664 * target.h (struct process_stratum_target): Remove the target op.
1665 (class process_target): Add the target op.
1666
1667 Update the derived classes and callers below.
1668
1669 * target.cc (kill_inferior): Update.
1670 * linux-low.cc (linux_target_ops): Update.
1671 (linux_kill): Turn into ...
1672 (linux_process_target::kill): ... this.
1673 * linux-low.h (class linux_process_target): Update.
1674 * lynx-low.cc (lynx_target_ops): Update.
1675 (lynx_kill): Turn into ...
1676 (lynx_process_target::kill): ... this.
1677 * lynx-low.h (class lynx_process_target): Update.
1678 * nto-low.cc (nto_target_ops): Update.
1679 (nto_kill): Turn into ...
1680 (nto_process_target::kill): ... this.
1681 * nto-low.h (class nto_process_target): Update.
1682 * win32-low.cc (win32_target_ops): Update.
1683 (win32_kill): Turn into ...
1684 (win32_process_target::kill): ... this.
1685 * win32-low.h (class win32_process_target): Update.
1686
1687 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1688
1689 Turn process_stratum_target's attach op into a method of
1690 process_target.
1691
1692 * target.h (struct process_stratum_target): Remove the target op.
1693 (class process_target): Add the target op.
1694 (myattach): Update the macro.
1695
1696 Update the derived classes and callers below.
1697
1698 * linux-low.cc (linux_target_ops): Update.
1699 (linux_attach): Turn into ...
1700 (linux_process_target::attach): ... this.
1701 * linux-low.h (class linux_process_target): Update.
1702 * lynx-low.cc (lynx_target_ops): Update.
1703 (lynx_attach): Turn into ...
1704 (lynx_process_target::attach): ... this.
1705 * lynx-low.h (class lynx_process_target): Update.
1706 * nto-low.cc (nto_target_ops): Update.
1707 (nto_attach): Turn into ...
1708 (nto_process_target::attach): ... this.
1709 * nto-low.h (class nto_process_target): Update.
1710 * win32-low.cc (win32_target_ops): Update.
1711 (win32_attach): Turn into ...
1712 (win32_process_target::attach): ... this.
1713 * win32-low.h (class win32_process_target): Update.
1714
1715 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1716
1717 Turn process_stratum_target's post_create_inferior op into a method
1718 of process_target.
1719
1720 * target.h (struct process_stratum_target): Remove the target op.
1721 (class process_target): Add the target op.
1722 (target_post_create_inferior): Update the macro.
1723 * target.cc (process_target::post_create_inferior): Define.
1724
1725 Update the derived classes and callers below.
1726
1727 * linux-low.cc (linux_target_ops): Update.
1728 (linux_post_create_inferior): Turn into ...
1729 (linux_process_target::post_create_inferior): ... this.
1730 * linux-low.h (class linux_process_target): Update.
1731 * lynx-low.cc (lynx_target_ops): Update.
1732 * nto-low.cc (nto_target_ops): Update.
1733 * win32-low.cc (win32_target_ops): Update.
1734
1735 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1736
1737 Turn process_stratum_target's create_inferior op into a method of
1738 process_target.
1739
1740 * target.h (struct process_stratum_target): Remove the target op.
1741 (class process_target): Add the target op.
1742 (create_inferior): Rename the macro to ...
1743 (target_create_inferior): ... this.
1744
1745 Update the derived classes and callers below.
1746
1747 * server.cc (handle_v_run): Update.
1748 (captured_main): Update.
1749 (process_serial_event): Update.
1750 * linux-low.cc (linux_target_ops): Update.
1751 (linux_create_inferior): Turn into ...
1752 (linux_process_target::create_inferior): ... this.
1753 * linux-low.h (class linux_process_target): Update.
1754 * lynx-low.cc (lynx_target_ops): Update.
1755 (lynx_create_inferior): Turn into ...
1756 (lynx_process_target::create_inferior): ... this.
1757 * lynx-low.h (class lynx_process_target): Update.
1758 * nto-low.cc (nto_target_ops): Update.
1759 (nto_create_inferior): Turn into ...
1760 (nto_process_target::create_inferior): ... this.
1761 * nto-low.h (class nto_process_target): Update.
1762 * win32-low.cc (win32_target_ops): Update.
1763 (win32_create_inferior): Turn into ...
1764 (win32_process_target::create_inferior): ... this.
1765 * win32-low.h (class win32_process_target): Update.
1766
1767 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1768
1769 * target.h (class process_target): New class definition.
1770 (struct process_stratum_target) <pt>: New field with type
1771 'process_target*'.
1772 * linux-low.h (class linux_process_target): Define as a derived
1773 class of 'process_target'.
1774 * linux-low.cc (linux_target_ops): Add a linux_process_target*
1775 as the 'pt' field.
1776 * lynx-low.h (class lynx_process_target): Define as a derived
1777 class of 'process_target'.
1778 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
1779 as the 'pt' field.
1780 * nto-low.h (class nto_process_target): Define as a derived
1781 class of 'process_target'.
1782 * nto-low.cc (nto_target_ops): Add an nto_process_target*
1783 as the 'pt' field.
1784 * win32-low.h (class win32_process_target): Define as a derived
1785 class of 'process_target'.
1786 * win32-low.cc (win32_target_ops): Add a win32_process_target*
1787 as the 'pt' field.
1788
1789 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
1790
1791 * configure: Regenerate.
1792
1793 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
1794 Andrew Burgess <andrew.burgess@embecosm.com>
1795
1796 * linux-riscv-low.cc: New file.
1797 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
1798 and nat/riscv-linux-tdesc.c.
1799 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
1800 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
1801 Define.
1802
1803 2020-02-14 Tom Tromey <tom@tromey.com>
1804
1805 * acinclude.m4: Don't include acx_configure_dir.m4.
1806 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
1807 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
1808 (all, install-only, uninstall, clean-info, clean)
1809 (maintainer-clean): Don't recurse.
1810 (subdir_do, all-lib): Remove.
1811 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
1812 (GNULIB_H): Remove.
1813 (generated_files): Update.
1814 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
1815 * configure: Rebuild.
1816 * configure.ac: Don't configure gnulib or libiberty.
1817 (GNULIB): Update.
1818
1819 2020-02-14 Eli Zaretskii <eliz@gnu.org>
1820
1821 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
1822 preparing the command line for CreateProcess.
1823 (win32_create_inferior): Reflect the program name in debugging
1824 output that shows the process and its command line.
1825
1826 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
1827
1828 * Makefile.in: Rename source files from .c to .cc.
1829 * %.c: Rename to %.cc.
1830 * configure.ac: Rename server.c to server.cc.
1831 * configure: Re-generate.
1832
1833 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
1834
1835 * Makefile.in: Rename gdbsupport source files from .c to .cc.
1836
1837 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
1838
1839 * win32-low.c (win32_create_inferior): Set signal_pid.
1840
1841 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
1842 Pedro Alves <palves@redhat.com>
1843
1844 Skip building gdbserver in a cross-configuration.
1845 * configure.srv: Set $gdbserver_host depending on whether $target
1846 is $host. Use $gdbserver_host instead of $host.
1847
1848 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
1849
1850 * configure: Re-generate.
1851
1852 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
1853
1854 * configure: Re-generate.
1855
1856 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
1857
1858 * acinclude.m4: Update warning.m4 path.
1859
1860 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
1861
1862 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
1863 (handle_exception): Set siginfo_er.
1864 (win32_xfer_siginfo): New function.
1865
1866 2020-02-07 Tom Tromey <tom@tromey.com>
1867 Pedro Alves <palves@redhat.com>
1868
1869 * README: Update build documentation.
1870 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
1871 host, not target.
1872 * configure.ac: Update paths.
1873 * configure: Rebuild.
1874 * acinclude.m4: Update paths.
1875 * Makefile.in: Update include paths.
1876 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
1877 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
1878 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
1879 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
1880 (%-generated.c): Update paths.
1881 * Move entire directory from ../gdb/gdbserver.
1882
1883 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
1884
1885 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
1886
1887 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1888
1889 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
1890 assignment instead of srv_linux_obj.
1891
1892 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
1893
1894 * server.c (handle_qxfer_libraries): Write segment-address with
1895 paddress.
1896
1897 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
1898
1899 * Makefile.in (install-strip): New target.
1900 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
1901 * aclocal.m4: Regenerate.
1902 * configure: Regenerate.
1903 * configure.ac: Add AM_PROG_INSTALL_STRIP.
1904
1905 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
1906
1907 * Makefile.in (SFILES): Adjust paths to point to real files.
1908 (OBS): Move waitstatus.o to target/waitstatus.o.
1909 (TAGS): Transform paths appropriately.
1910 (%.o): Rename to...
1911 (nat/%.o): ... this pattern rule.
1912 (%.o): Rename to...
1913 (target/%.o): ... this pattern rule.
1914 * configure.srv: Adjust paths throughout to include nat/ prefix
1915 with the revant files.
1916 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
1917 * configure: Regenerate.
1918
1919 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
1920
1921 * Makefile.in (TAGS): Remove config files from the recipe.
1922
1923 2020-01-14 Tom Tromey <tom@tromey.com>
1924
1925 * configure: Rebuild.
1926 * configure.ac: Remove any checks that were added to common.m4.
1927 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
1928 lib-link.m4.
1929
1930 2020-01-14 Tom Tromey <tom@tromey.com>
1931
1932 * server.h: Include config.h.
1933 * gdbreplay.c: Include config.h.
1934 * configure: Rebuild.
1935 * configure.ac: Don't source common.host.
1936 * acinclude.m4: Update path.
1937 * Makefile.in (INCSUPPORT): New variable.
1938 (INCLUDE_CFLAGS): Add INCSUPPORT.
1939 (SFILES): Update paths.
1940 (version-generated.c): Update path to create-version.sh.
1941 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
1942
1943 2020-01-14 Tom Tromey <tom@tromey.com>
1944
1945 * configure.ac (LIBS): Use WIN32APILIBS.
1946 (USE_WIN32API): Don't define.
1947 * configure: Rebuild.
1948
1949 2020-01-14 Tom Tromey <tom@tromey.com>
1950
1951 * configure: Rebuild.
1952
1953 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1954
1955 * Makefile.in (%-generated.c): Remove rule for files from
1956 regformats/i386.
1957
1958 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1959
1960 * configure: Re-generate.
1961
1962 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1963
1964 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
1965 Define to static.
1966 * tracepoint.c (stop_tracing, flush_trace_buffer,
1967 about_to_request_buffer_space, get_trace_state_variable_value,
1968 set_trace_state_variable_value, gdb_collect): Add declaration.
1969
1970 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1971
1972 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
1973 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
1974 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
1975 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
1976 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
1977 static.
1978
1979 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1980
1981 * inferiors.c: Include gdbsupport/common-inferior.h.
1982
1983 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1984
1985 * hostio-errno.c: Include hostio.h.
1986
1987 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1988
1989 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
1990 prerequisite.
1991
1992 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
1993
1994 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
1995 * linux-arm-tdesc.h: Include arch/arm.h.
1996
1997 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
1998
1999 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
2000
2001 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
2002
2003 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
2004 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
2005
2006 2020-01-10 Pedro Alves <palves@redhat.com>
2007
2008 * fork-child.c (post_fork_inferior): Pass target down to
2009 startup_inferior.
2010 * inferiors.c (switch_to_thread): Add process_stratum_target
2011 parameter.
2012 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
2013 * nto-low.c (nto_target_ops): Now a process_stratum_target.
2014 * linux-low.c (linux_target_ops): Now a process_stratum_target.
2015 * remote-utils.c (prepare_resume_reply): Pass the target to
2016 switch_to_thread.
2017 * target.c (the_target): Now a process_stratum_target.
2018 (done_accessing_memory): Pass the target to switch_to_thread.
2019 (set_target_ops): Ajust to use process_stratum_target.
2020 * target.h (struct target_ops): Rename to ...
2021 (struct process_stratum_target): ... this.
2022 (the_target, set_target_ops): Adjust.
2023 (prepare_to_access_memory): Adjust comment.
2024 * win32-low.c (child_xfer_memory): Adjust to use
2025 process_stratum_target.
2026 (win32_target_ops): Now a process_stratum_target.
2027
2028 2020-01-06 Eli Zaretskii <eliz@gnu.org>
2029 Pedro Alves <palves@redhat.com>
2030
2031 * win32-low.c (get_child_debug_event): Extract the fatal exception
2032 from the exit status and convert to the equivalent Posix signal
2033 number.
2034 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
2035 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
2036
2037 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
2038
2039 * Makefile.in: Use INSTALL_PROGRAM_ENV.
2040
2041 2020-01-01 Joel Brobecker <brobecker@adacore.com>
2042
2043 * server.c (gdbserver_version): Change copyright year to 2020.
2044 * gdbreplay.c (gdbreplay_version): Likewise.
2045
2046 2019-12-19 Christian Biesinger <cbiesinger@google.com>
2047
2048 * configure: Regenerate.
2049 * configure.ac: Quote variable arguments of test.
2050
2051 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
2052
2053 * Makefile.in: Fix build with GNU Make 3.81
2054
2055 2019-12-16 Tom Tromey <tromey@adacore.com>
2056
2057 * server.c (get_exec_file): Constify result.
2058
2059 2019-12-10 Christian Biesinger <cbiesinger@google.com>
2060
2061 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
2062 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
2063 * config.in: Regenerate.
2064 * configure: Regenerate.
2065 * configure.ac: Don't check for strerror.
2066 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
2067 Call safe_strerror instead of strerror.
2068 * server.h (strerror): Remove this now-unnecessary declaration.
2069 * tracepoint.c (init_named_socket): Call safe_strerror instead of
2070 strerror.
2071 (gdb_agent_helper_thread): Likewise.
2072 * utils.c (perror_with_name): Likewise.
2073
2074 2019-11-26 Tom Tromey <tom@tromey.com>
2075
2076 * configure, config.in: Rebuild.
2077
2078 2019-11-26 Tom Tromey <tom@tromey.com>
2079
2080 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
2081 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
2082 gdb_sigmask.
2083 * configure, config.in: Rebuild.
2084
2085 2019-11-26 Tom Tromey <tom@tromey.com>
2086
2087 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
2088 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
2089 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
2090 * acinclude.m4: Include ax_pthread.m4.
2091 * config.in, configure: Rebuild.
2092
2093 2019-11-26 Christian Biesinger <cbiesinger@google.com>
2094
2095 * debug.c (debug_set_output): Call safe_strerror instead of
2096 strerror.
2097 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
2098 (linux_kill_one_lwp): Likewise.
2099 (linux_detach_one_lwp): Likewise.
2100 (linux_wait_for_event_filtered): Likewise.
2101 (store_register): Likewise.
2102 * lynx-low.c (lynx_attach): Likewise.
2103 * mem-break.c (insert_memory_breakpoint): Likewise.
2104 (remove_memory_breakpoint): Likewise.
2105 (delete_fast_tracepoint_jump): Likewise.
2106 (set_fast_tracepoint_jump): Likewise.
2107 (uninsert_fast_tracepoint_jumps_at): Likewise.
2108 (reinsert_fast_tracepoint_jumps_at): Likewise.
2109 * nto-low.c (nto_xfer_memory): Likewise.
2110 (nto_resume): Likewise.
2111
2112 2019-11-20 Luis Machado <luis.machado@linaro.org>
2113
2114 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
2115 instead of register count.
2116 * tdesc.c (tdesc_contains_feature): New function.
2117 * tdesc.h (tdesc_contains_feature): New prototype.
2118
2119 2019-11-15 Christian Biesinger <cbiesinger@google.com>
2120
2121 * Makefile.in: Add safe-strerror.c.
2122 * configure: Regenerate.
2123 * configure.ac: Don't source common.host.
2124
2125 2019-11-15 Christian Biesinger <cbiesinger@google.com>
2126
2127 * config.in: Regenerate.
2128 * configure: Regenerate.
2129
2130 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
2131
2132 * ax.c (ax_printf): Handle size_t_arg.
2133
2134 2019-11-06 Christian Biesinger <cbiesinger@google.com>
2135
2136 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
2137 * mi/mi-main.c (output_cores): Likewise.
2138 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
2139 (linux_xfer_osdata_modules): Likewise.
2140 * remote.c (register_remote_support_xml): Likewise.
2141 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
2142 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
2143
2144 2019-11-01 Christian Biesinger <cbiesinger@google.com>
2145
2146 * configure: Regenerate.
2147 * configure.ac: Remove check for strerror_r.
2148
2149 2019-10-31 Christian Biesinger <cbiesinger@google.com>
2150
2151 * config.in: Regenerate.
2152 * configure: Regenerate.
2153 * configure.ac: Also check for strerror_r.
2154
2155 2019-10-31 Christian Biesinger <cbiesinger@google.com>
2156
2157 * ax.h (debug_agent): Remove duplicate declaration.
2158
2159 2019-10-26 Tom de Vries <tdevries@suse.de>
2160
2161 * linux-aarch64-low.c: Fix typos in comments.
2162 * linux-arm-low.c: Same.
2163 * linux-low.c: Same.
2164 * linux-ppc-low.c: Same.
2165 * proc-service.c: Same.
2166 * regcache.h: Same.
2167 * server.c: Same.
2168 * tracepoint.c: Same.
2169 * win32-low.c: Same.
2170
2171 2019-10-25 Tom Tromey <tromey@adacore.com>
2172
2173 * utils.c (xstrdup): Remove.
2174
2175 2019-10-23 Tom Tromey <tom@tromey.com>
2176
2177 * configure, config.in: Rebuild.
2178
2179 2019-10-23 Tom Tromey <tom@tromey.com>
2180
2181 * configure: Rebuild.
2182 * acinclude.m4: Use m4_include, not sinclude.
2183
2184 2019-10-17 Tom Tromey <tromey@adacore.com>
2185
2186 * configure: Rebuild.
2187 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
2188 in AC_CONFIG_FILES invocation.
2189 * Makefile.in (stamp-h, Makefile): Use new-style config.status
2190 invocation.
2191
2192 2019-10-16 Christian Biesinger <cbiesinger@google.com>
2193
2194 * server.c: Include xml-builtin.h.
2195 (get_xml_features): Don't declare xml_builtins here.
2196
2197 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
2198
2199 * Makefile.in: Remove references to vec-ipa.o.
2200
2201 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
2202
2203 * Makefile.in: Remove references to vec.c.
2204
2205 2019-10-02 Christian Biesinger <cbiesinger@google.com>
2206
2207 * server.c (server_waiting): Change to bool.
2208 (extended_protocol): Likewise.
2209 (response_needed): Likewise.
2210 (exit_requested): Likewise.
2211 (run_once): Likewise.
2212 (report_no_resumed): Likewise.
2213 (non_stop): Likewise.
2214 (disable_packet_vCont): Likewise.
2215 (disable_packet_Tthread): Likewise.
2216 (disable_packet_qC): Likewise.
2217 (disable_packet_qfThreadInfo): Likewise.
2218 (handle_general_set): Update.
2219 (handle_detach): Update.
2220 (handle_monitor_command): Update.
2221 (handle_query): Update.
2222 (captured_main): Update.
2223 (process_serial_event): Update.
2224 * server.h (server_waiting): Change to bool.
2225 (disable_packet_vCont): Likewise.
2226 (disable_packet_Tthread): Likewise.
2227 (disable_packet_qC): Likewise.
2228 (disable_packet_qfThreadInfo): Likewise.
2229 (run_once): Likewise.
2230 (non_stop): Likewise.
2231 * target.c (target_stop_and_wait): Update.
2232
2233 2019-10-02 Tom Tromey <tromey@adacore.com>
2234
2235 * Makefile.in (SFILES): Add common-inferior.c.
2236 (OBS): Add common-inferior.o.
2237 * server.c (startup_with_shell): Don't define.
2238
2239 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
2240
2241 * linux-low.c (linux_low_read_btrace): Update for change to
2242 std::vector.
2243
2244 2019-09-20 Christian Biesinger <cbiesinger@google.com>
2245
2246 * debug.c (debug_threads): Remove comment in favor of the header.
2247 * debug.h (using_threads): Add declaration.
2248 (debug_threads): Add comment.
2249 * linux-aarch64-low.c: Include debug.h and remove declaration of
2250 debug_threads.
2251 * nto-low.c: Likewise.
2252 * remote-utils.c: Likewise.
2253 * thread-db.c: Likewise.
2254
2255 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
2256
2257 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
2258 and powerpc-cell64l-ipa.o.
2259 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
2260 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
2261 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
2262 (spu*-*-*): Remove.
2263
2264 * spu-low.c: Remove file.
2265
2266 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
2267 (parse_spufs_run): Remove.
2268 (ppc_get_pc): Remove Cell/B.E. support.
2269 (ppc_set_pc): Likewise.
2270 (ppc_breakpoint_at): Likewise.
2271 (ppc_arch_setup): Likewise.
2272 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
2273 tdesc_powerpc_cell32l.
2274 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
2275 or init_registers_powerpc_cell32l.
2276 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
2277 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
2278 or init_registers_powerpc_cell32l.
2279 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
2280 (init_registers_powerpc_cell32l): Remove prototype.
2281 (init_registers_powerpc_cell64l): Likewise.
2282
2283 * target.h (struct target_ops): Remove qxfer_spu member.
2284 * server.c (handle_qxfer_spu): Remove.
2285 (qxfer_packets): Remove entry for "spu".
2286 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
2287 * linux-low.c (SPUFS_MAGIC): Remove.
2288 (spu_enumerate_spu_ids): Remove.
2289 (linux_qxfer_spu): Remove.
2290 (linux_target_ops): Remove qxfer_spu member.
2291 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
2292 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
2293 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
2294
2295 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
2296
2297 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
2298 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
2299 * config.in: Regenerate.
2300 * configure: Regenerate.
2301
2302 2019-08-15 Tom Tromey <tromey@adacore.com>
2303
2304 * target.c (target_write_memory): Use gdb::byte_vector.
2305
2306 2019-08-15 Tom Tromey <tromey@adacore.com>
2307
2308 * tracepoint.c (write_inferior_data_pointer)
2309 (write_inferior_integer, write_inferior_int8)
2310 (write_inferior_uinteger, m_tracepoint_action_download)
2311 (r_tracepoint_action_download, x_tracepoint_action_download)
2312 (l_tracepoint_action_download, clear_inferior_trace_buffer)
2313 (download_agent_expr, download_tracepoint_1)
2314 (download_trace_state_variables, upload_fast_traceframes): Update.
2315 * server.c (gdb_write_memory): Update.
2316 * remote-utils.c (relocate_instruction): Update.
2317 * proc-service.c (ps_pdwrite): Update.
2318 * mem-break.c (remove_memory_breakpoint)
2319 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
2320 (uninsert_fast_tracepoint_jumps_at)
2321 (reinsert_fast_tracepoint_jumps_at): Update.
2322 * linux-x86-low.c (append_insns)
2323 (i386_install_fast_tracepoint_jump_pad)
2324 (amd64_write_goto_address, i386_write_goto_address): Update.
2325 * linux-s390-low.c (append_insns, s390_write_goto_address):
2326 Update.
2327 * linux-ppc-low.c (ppc_relocate_instruction)
2328 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
2329 (ppc_write_goto_address): Update.
2330 * linux-aarch64-low.c (append_insns): Update.
2331 * target.h (struct target_ops): Update.
2332 (write_inferior_memory): Don't declare.
2333 * target.c (target_write_memory): Rename from
2334 write_inferior_memory. Remove old target_write_memory.
2335
2336 2019-08-15 Tom Tromey <tromey@adacore.com>
2337
2338 * target.c (write_inferior_memory): Use std::vector.
2339
2340 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
2341
2342 PR build/24886
2343 * configure.ac: Drop enable-libmcheck support.
2344 * configure, config.in: Rebuild.
2345 * acinclude.m4: Don't include it.
2346
2347 2019-07-19 Alan Hayward <alan.hayward@arm.com>
2348
2349 * configure.srv: Remove Arm xml files.
2350
2351 2019-07-19 Alan Hayward <alan.hayward@arm.com>
2352
2353 * configure.srv: Add new files. Remove xml generated files.
2354 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
2355 registers.
2356 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
2357 * linux-aarch32-tdesc.c: New file.
2358 * linux-aarch32-tdesc.h: New file.
2359 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
2360 * linux-arm-low.c (init_registers_arm, tdesc_arm)
2361 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
2362 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
2363 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
2364 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
2365 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
2366 (arm_read_description): Call arm_linux_read_description.
2367 (initialize_low_arch): Don't init registers.
2368 * linux-arm-tdesc.c: New file.
2369 * linux-arm-tdesc.h: New file.
2370
2371 2019-07-10 Alan Hayward <alan.hayward@arm.com>
2372
2373 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
2374 Move counter inside for.
2375 (arm_read_description): Check ptrace earlier.
2376 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
2377
2378 2019-07-09 Tom Tromey <tom@tromey.com>
2379
2380 * configure: Rebuild.
2381 * configure.ac: Change common to gdbsupport.
2382 * acinclude.m4: Change common to gdbsupport.
2383 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
2384 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
2385 common to gdbsupport.
2386 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
2387 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
2388 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
2389 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
2390 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
2391 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
2392 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
2393 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
2394 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
2395 common to gdbsupport.
2396
2397 2019-07-04 Alan Hayward <alan.hayward@arm.com>
2398
2399 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
2400 defines.
2401 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
2402
2403 2019-07-04 Alan Hayward <alan.hayward@arm.com>
2404
2405 * configure.srv: Remove legacy xml.
2406 * linux-aarch64-low.c (initialize_low_arch): Remove
2407 initialize_low_tdesc call.
2408 * linux-aarch64-tdesc-selftest.c: Remove file.
2409 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
2410 * linux-x86-low.c (initialize_low_arch): Remove
2411 initialize_low_tdesc call.
2412 * linux-x86-tdesc-selftest.c: Remove file.
2413 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
2414
2415 2019-06-20 Tom de Vries <tdevries@suse.de>
2416
2417 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
2418 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
2419
2420 2019-06-19 Tom de Vries <tdevries@suse.de>
2421
2422 * debug.h (debug_write): Change return type to ssize_t.
2423 * debug.c (debug_write): Same.
2424
2425 2019-06-14 Tom Tromey <tom@tromey.com>
2426
2427 * configure.ac: Use new path to gnulib.
2428 * configure: Rebuild.
2429 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
2430 to gnulib.
2431
2432 2019-06-11 Tom Tromey <tom@tromey.com>
2433
2434 * Makefile.in (SFILES): Add alloc.c.
2435 (OBS): Add alloc.o.
2436 (IPA_OBJS): Add alloc-ipa.o.
2437 (alloc-ipa.o): New target.
2438 (%.o: ../%.c): New pattern rule.
2439
2440 2019-06-10 Tom Tromey <tromey@adacore.com>
2441
2442 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
2443 end warning with a newline.
2444 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
2445 newline.
2446 * thread-db.c (attach_thread): Don't end warning with a newline.
2447 (thread_db_notice_clone): Likewise.
2448 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
2449 newline.
2450 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
2451 end warning with a newline.
2452
2453 2019-06-04 Pedro Alves <palves@redhat.com>
2454
2455 * server.c (captured_main): Use make_unique_xstrdup.
2456
2457 2019-06-02 Tom Tromey <tom@tromey.com>
2458
2459 * gdbreplay.c (fromhex): Remove.
2460 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
2461
2462 2019-05-29 Tom Tromey <tromey@adacore.com>
2463
2464 * configure: Rebuild.
2465
2466 2019-05-06 Kevin Buettner <kevinb@redhat.com>
2467
2468 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
2469 sign extension code on 32-bit builds.
2470
2471 2019-05-03 Eli Zaretskii <eliz@gnu.org>
2472
2473 * remote-utils.c:
2474 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
2475
2476 2019-04-19 Tom Tromey <tom@tromey.com>
2477
2478 * server.c (struct vstop_notif): Derive from notif_event.
2479 <base>: Remove.
2480 (queue_stop_reply): Update.
2481 (remove_all_on_match_ptid): Change type. Rewrite.
2482 (discard_queued_stop_replies): Rewrite.
2483 (in_queued_stop_replies_ptid): Change type.
2484 (in_queued_stop_replies): Rewrite.
2485 (notif_stop): Update.
2486 (queue_stop_reply_callback): Update.
2487 (captured_main): Don't call initialize_notif.
2488 (push_stop_notification): Update.
2489 * notif.c (notif_write_event, handle_notif_ack)
2490 (notif_event_enque, notif_push): Update.
2491 (notif_event_xfree, initialize_notif): Remove.
2492 * notif.h (struct notif_event): Include <list>, not
2493 "common/queue.h".
2494 (struct notif_server) <queue>: Now a std::list.
2495 (notif_event_p): Remove typedef.
2496 (initialize_notif): Don't declare.
2497 (struct notif_event): Add virtual destructor.
2498
2499 2019-04-17 Alan Hayward <alan.hayward@arm.com>
2500
2501 * ax.c (ax_vdebug): Call debug_printf.
2502 * debug.c (debug_write): New function.
2503 * debug.h (debug_write): New declaration.
2504 * linux-low.c (sigchld_handler): Call debug_write.
2505
2506 2019-04-17 Alan Hayward <alan.hayward@arm.com>
2507
2508 * debug.c (debug_set_output): New function.
2509 (debug_vprintf): Send output to debug_file.
2510 (debug_flush): Likewise.
2511 * debug.h (debug_set_output): New declaration.
2512 * server.c (handle_monitor_command): Add debug-file option.
2513 (captured_main): Likewise.
2514
2515 2019-04-17 Alan Hayward <alan.hayward@arm.com>
2516
2517 * debug.c (remote_debug): Add definition.
2518 * debug.h (remote_debug): Add declaration.
2519 * hostio.c (remote_debug): Remove declaration.
2520 * remote-utils.c (struct ui_file): Likewise.
2521 (remote_debug): Likewise.
2522 * remote-utils.h (remote_debug): Likewise,
2523 * server.c (remote_debug): Remove definition.
2524
2525 2019-04-10 Kevin Buettner <kevinb@redhat.com>
2526
2527 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
2528 when using a 64-bit gdbserver.
2529
2530 2019-04-09 Tom Tromey <tromey@adacore.com>
2531
2532 * linux-low.c (select_event_lwp): Use find_thread_in_random.
2533
2534 2019-04-08 Tom Tromey <tom@tromey.com>
2535
2536 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
2537 throw.
2538 (linux_resume_one_lwp): Likewise.
2539
2540 2019-04-08 Tom Tromey <tom@tromey.com>
2541
2542 * gdbreplay.c: Update.
2543 * linux-low.c: Update.
2544 * server.c: Update.
2545
2546 2019-04-08 Tom Tromey <tom@tromey.com>
2547
2548 * server.c: Use C++ exception handling.
2549 * linux-low.c: Use C++ exception handling.
2550 * gdbreplay.c: Use C++ exception handling.
2551
2552 2019-04-08 Tom Tromey <tom@tromey.com>
2553
2554 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
2555 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
2556 (captured_main, main): Update.
2557 * gdbreplay.c (main): Update.
2558
2559 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2560
2561 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
2562 value in argument pointer, return 1 if the entry is found and 0
2563 otherwise. Move comment.
2564 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
2565 * linux-low.h (linux_get_auxv): Declare.
2566 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
2567
2568 2019-04-05 Tom Tromey <tromey@adacore.com>
2569
2570 * server.c (gdbserver_usage): Use upper-case for metasyntactic
2571 variables.
2572
2573 2019-03-28 Alan Hayward <alan.hayward@arm.com>
2574
2575 * linux-low.c (AT_HWCAP2): Add define if not already included.
2576
2577 2019-03-26 Alan Hayward <alan.hayward@arm.com>
2578
2579 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
2580 (aarch64_arch_setup): Call linux_get_hwcap.
2581 * linux-arm-low.c (arm_get_hwcap): Remove function.
2582 (arm_read_description): Call linux_get_hwcap.
2583 * linux-low.c (linux_get_auxv): New function.
2584 (linux_get_hwcap): Likewise.
2585 (linux_get_hwcap2): Likewise.
2586 * linux-low.h (linux_get_hwcap): New declaration.
2587 (linux_get_hwcap2): Likewise.
2588 * linux-ppc-low.c (ppc_get_auxv): Remove function.
2589 (ppc_arch_setup): Call linux_get_hwcap.
2590 * linux-s390-low.c (s390_get_hwcap): Remove function.
2591 (s390_arch_setup): Call linux_get_hwcap.
2592
2593 2019-03-22 Alan Hayward <alan.hayward@arm.com>
2594 Jiong Wang <jiong.wang@arm.com>
2595
2596 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
2597 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
2598 to fail.
2599 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
2600
2601 2019-03-22 Alan Hayward <alan.hayward@arm.com>
2602 Jiong Wang <jiong.wang@arm.com>
2603
2604 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
2605 (aarch64_get_hwcap): New function.
2606 (aarch64_arch_setup): Read APIA hwcap.
2607
2608 2019-03-22 Alan Hayward <alan.hayward@arm.com>
2609 Jiong Wang <jiong.wang@arm.com>
2610
2611 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
2612 (initialize_low_tracepoint): Likewise.
2613 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
2614 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
2615 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
2616 (aarch64_linux_read_description): Likewise.
2617 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
2618
2619 2019-03-12 John Baldwin <jhb@FreeBSD.org>
2620
2621 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
2622 i386_create_target_description for 'segments' parameter.
2623 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
2624 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2625 * win32-i386-low.c (i386_arch_setup): Likewise.
2626
2627 2019-03-12 Tom Tromey <tromey@adacore.com>
2628
2629 * linux-low.c (iterate_over_lwps): Update.
2630
2631 2019-03-06 Tom Tromey <tom@tromey.com>
2632
2633 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
2634 (captured_main): Use SCOPE_EXIT.
2635
2636 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
2637
2638 * configure.srv: Use '$enable_unittest' instead of '$development'
2639 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
2640 case.
2641
2642 2019-02-27 Tom Tromey <tromey@adacore.com>
2643
2644 * gdbreplay.c (logchar): Handle \r\n.
2645
2646 2019-02-07 Alan Hayward <alan.hayward@arm.com>
2647
2648 * linux-low.c (linux_attach): Add process before lwp.
2649 * server.c (attach_inferior): Check if already attached.
2650
2651 2019-02-07 Tom Tromey <tom@tromey.com>
2652
2653 * x86-tdesc.h: Rename include guard.
2654 * x86-low.h: Add include guard.
2655 * wincecompat.h: Rename include guard.
2656 * win32-low.h: Add include guard.
2657 * utils.h: Rename include guard.
2658 * tracepoint.h: Rename include guard.
2659 * tdesc.h: Rename include guard.
2660 * target.h: Rename include guard.
2661 * server.h: Rename include guard.
2662 * remote-utils.h: Rename include guard.
2663 * regcache.h: Rename include guard.
2664 * nto-low.h: Rename include guard.
2665 * notif.h: Add include guard.
2666 * mem-break.h: Rename include guard.
2667 * lynx-low.h: Add include guard.
2668 * linux-x86-tdesc.h: Add include guard.
2669 * linux-s390-tdesc.h: Add include guard.
2670 * linux-ppc-tdesc-init.h: Add include guard.
2671 * linux-low.h: Add include guard.
2672 * linux-aarch64-tdesc.h: Add include guard.
2673 * linux-aarch32-low.h: Add include guard.
2674 * inferiors.h: Rename include guard.
2675 * i387-fp.h: Rename include guard.
2676 * hostio.h: Rename include guard.
2677 * gdbthread.h: Rename include guard.
2678 * gdb_proc_service.h: Rename include guard.
2679 * event-loop.h: Rename include guard.
2680 * dll.h: Rename include guard.
2681 * debug.h: Rename include guard.
2682 * ax.h: Rename include guard.
2683
2684 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
2685
2686 PR gdb/23985
2687 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
2688 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
2689
2690 2019-01-25 Tom Tromey <tom@tromey.com>
2691
2692 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
2693
2694 2019-01-25 Tom Tromey <tom@tromey.com>
2695
2696 * win32-low.c: Fix common/ includes.
2697 * win32-i386-low.c: Fix common/ includes.
2698 * tracepoint.c: Fix common/ includes.
2699 * thread-db.c: Fix common/ includes.
2700 * target.h: Fix common/ includes.
2701 * symbol.c: Fix common/ includes.
2702 * spu-low.c: Fix common/ includes.
2703 * server.h: Fix common/ includes.
2704 * server.c: Fix common/ includes.
2705 * remote-utils.c: Fix common/ includes.
2706 * regcache.h: Fix common/ includes.
2707 * regcache.c: Fix common/ includes.
2708 * nto-x86-low.c: Fix common/ includes.
2709 * notif.h: Fix common/ includes.
2710 * mem-break.h: Fix common/ includes.
2711 * lynx-low.c: Fix common/ includes.
2712 * lynx-i386-low.c: Fix common/ includes.
2713 * linux-x86-tdesc-selftest.c: Fix common/ includes.
2714 * linux-x86-low.c: Fix common/ includes.
2715 * linux-low.c: Fix common/ includes.
2716 * inferiors.h: Fix common/ includes.
2717 * i387-fp.c: Fix common/ includes.
2718 * hostio.c: Fix common/ includes.
2719 * hostio-errno.c: Fix common/ includes.
2720 * gdbthread.h: Fix common/ includes.
2721 * gdbreplay.c: Fix common/ includes.
2722 * fork-child.c: Fix common/ includes.
2723 * event-loop.c: Fix common/ includes.
2724 * ax.c:
2725 (enum gdb_agent_op): Fix common/ includes.
2726
2727 2019-01-21 Tom Tromey <tom@tromey.com>
2728
2729 * tracepoint.c: Fix includes.
2730 * remote-utils.c: Fix includes.
2731 * linux-x86-low.c: Fix includes.
2732
2733 2019-01-01 Joel Brobecker <brobecker@adacore.com>
2734
2735 * gdbreplay.c (gdbreplay_version): Update copyright year in
2736 version message.
2737 * server.c (gdbserver_version): Likewise.
2738
2739 2018-12-05 Alan Hayward <alan.hayward@arm.com>
2740
2741 * linux-low.c (add_lwp): Switch ordering.
2742
2743 2018-11-29 Tom Tromey <tom@tromey.com>
2744
2745 * win32-low.c (win32_join): Take pid, not process.
2746 * target.h (struct target_ops) <join>: Change argument type.
2747 (join_inferior): Change argument name.
2748 * spu-low.c (spu_join): Take pid, not process.
2749 * server.c (handle_detach): Preserve pid before destroying
2750 process.
2751 * lynx-low.c (lynx_join): Take pid, not process.
2752 * linux-low.c (linux_join): Take pid, not process.
2753
2754 2018-11-23 Alan Hayward <alan.hayward@arm.com>
2755
2756 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
2757 (aarch64_cannot_fetch_register): Likewise.
2758 (struct linux_target_ops): Update references.
2759
2760 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2761
2762 * linux-ppc-low.c: Include nat/linux-ptrace.h.
2763
2764 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2765
2766 * configure.srv (ipa_ppc_linux_regobj): Add
2767 powerpc-isa207-htm-vsx32l-ipa.o and
2768 powerpc-isa207-htm-vsx64l-ipa.o.
2769 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
2770 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
2771 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
2772 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
2773 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
2774 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
2775 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
2776 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
2777 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
2778 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
2779 (init_registers_powerpc_isa207_htm_vsx32l)
2780 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
2781 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
2782 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
2783 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
2784 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
2785 (ppc_store_tm_ctarregset): New functions.
2786 (ppc_regsets): Add entries for HTM regsets.
2787 (ppc_arch_setup): Set htm in features struct when needed. Set
2788 sizes for the HTM regsets.
2789 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
2790 (initialize_low_arch): Call
2791 init_registers_powerpc_isa207_htm_vsx32l and
2792 init_registers_powerpc_isa207_htm_vsx64l.
2793 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
2794 PPC_TDESC_ISA207_HTM_VSX.
2795 (initialize_low_tracepoint): Call
2796 init_registers_powerpc_isa207_htm_vsx32l and
2797 init_registers_powerpc_isa207_htm_vsx64l.
2798
2799 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2800
2801 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
2802 rs6000/power-linux-pmu.xml to srv_xmlfiles.
2803 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
2804 (ppc_store_pmuregset): New functions.
2805 (ppc_regsets): Add entries for ebb and pmu regsets.
2806 (ppc_arch_setup): Set isa207 in features struct if the ebb and
2807 pmu regsets are available. Set sizes for these regsets.
2808
2809 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2810
2811 * configure.srv (ipa_ppc_linux_regobj): Add
2812 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
2813 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
2814 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
2815 rs6000/powerpc-isa207-vsx32l.xml, and
2816 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
2817 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
2818 <PPC_TDESC_ISA207_VSX>: New enum value.
2819 (init_registers_powerpc_isa207_vsx32l): Declare.
2820 (init_registers_powerpc_isa207_vsx64l): Declare.
2821 * linux-ppc-low.c (ppc_fill_tarregset): New function.
2822 (ppc_store_tarregset): New function.
2823 (ppc_regsets): Add entry for the TAR regset.
2824 (ppc_arch_setup): Set isa207 in features struct when needed. Set
2825 size for the TAR regsets.
2826 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
2827 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
2828 and init_registers_powerpc_isa207_vsx64l.
2829 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
2830 (initialize_low_tracepoint): Call
2831 init_registers_powerpc_isa207_vsx32l and
2832 init_registers_powerpc_isa207_vsx64l.
2833
2834 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2835 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2836
2837 * configure.srv (ipa_ppc_linux_regobj): Add
2838 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
2839 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
2840 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
2841 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
2842 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
2843 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
2844 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
2845 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
2846 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
2847 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
2848 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
2849 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
2850 (ppc_hwcap): Add comment.
2851 (ppc_hwcap2): New global.
2852 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
2853 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
2854 (ppc_regsets): Add entries for the DSCR and PPR regsets.
2855 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
2856 when needed. Set sizes for the the DSCR and PPR regsets.
2857 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
2858 (initialize_low_arch): Call
2859 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
2860 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
2861 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
2862 PPC_TDESC_ISA205_PPR_DSCR_VSX.
2863 (initialize_low_tracepoint): Call
2864 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
2865 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
2866
2867 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2868
2869 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
2870
2871 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
2872 Simon Marchi <simark@simark.ca>
2873
2874 * acinclude.m4: Include "../selftest.m4".
2875 * configure: Regenerate.
2876 * configure.ac: Use "GDB_AC_SELFTEST".
2877 * configure.srv: Use "$enable_unittests" instead of
2878 "$development" when checking whether unit tests have been
2879 enabled.
2880 * server.c (captured_main): Update message informing that
2881 selftests have been disabled.
2882
2883 2018-10-04 Tom Tromey <tom@tromey.com>
2884
2885 * configure: Rebuild.
2886
2887 2018-10-04 Tom Tromey <tom@tromey.com>
2888
2889 * server.c (handle_status): Rename inner "thread".
2890 (process_serial_event): Declare "res" in 'm' case.
2891 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
2892 (iterate_over_lwps): Rename inner "thread".
2893 (linux_qxfer_libraries_svr4): Rename inner "len".
2894 * gdbthread.h (find_thread_in_random): Rename inner "thread".
2895
2896 2018-10-01 Gary Benson <gbenson@redhat.com>
2897
2898 * gdb_proc_service.h: Moved common code to
2899 common/gdb_proc_service.h.
2900
2901 2018-10-01 Gary Benson <gbenson@redhat.com>
2902
2903 * gdb_proc_service.h: Synchronize comments and whitespace with
2904 GDB's version of this file.
2905
2906 2018-09-25 Tom Tromey <tom@tromey.com>
2907
2908 * configure: Rebuild.
2909 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
2910
2911 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
2912
2913 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
2914 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
2915 ($(IPA_LIB)): Sort IPA_OBJS.
2916
2917 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
2918
2919 * Makefile.in: Remove references to $(ADD_DEPS).
2920
2921 2018-09-16 Tom Tromey <tom@tromey.com>
2922
2923 * remote-utils.c (remote_open): Use GNU style for metasyntactic
2924 variables.
2925 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
2926 variables.
2927
2928 2018-09-05 Tom Tromey <tom@tromey.com>
2929
2930 * configure: Rebuild.
2931
2932 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
2933
2934 PR build/23399
2935 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
2936
2937 2018-08-27 Tom Tromey <tom@tromey.com>
2938
2939 PR build/23087:
2940 * configure: Rebuild.
2941
2942 2018-08-27 Tom Tromey <tom@tromey.com>
2943
2944 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
2945 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
2946 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
2947 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
2948 (s390x_emit_stack_adjust): Add casts to unsigned char.
2949
2950 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
2951
2952 PR gdb/23374
2953 PR gdb/23375
2954 * server.h (struct client_state) <disable_randomization>:
2955 Initialize to 1.
2956
2957 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
2958
2959 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
2960 variable.
2961 (mips_supply_ptrace_register): Likewise.
2962
2963 2018-07-22 Tom Tromey <tom@tromey.com>
2964
2965 * configure: Rebuild.
2966
2967 2018-07-22 Tom Tromey <tom@tromey.com>
2968
2969 * win32-low.c (win32_create_inferior): Remove unused variables.
2970 * gdbreplay.c (remote_open): Remove unused variable.
2971 * remote-utils.c (remote_prepare): Remove unused variable.
2972 * x86-tdesc.h (X86_TDESC_H): Define.
2973 (amd64_expedite_regs): Define conditionally.
2974 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
2975 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
2976 * remote-utils.c (readchar): Remove unused variable.
2977
2978 2018-07-13 Pedro Alves <palves@redhat.com>
2979
2980 * linux-low.c (linux_kill): Change parameter to process_info
2981 pointer instead of pid. Adjust.
2982 * lynx-low.c (lynx_kill): Likewise.
2983 * nto-low.c (nto_kill): Likewise.
2984 * spu-low.c (spu_kill): Likewise.
2985 * win32-low.c (win32_kill): Likewise.
2986 * server.c (handle_v_kill, kill_inferior_callback)
2987 (detach_or_kill_for_exit): Adjust.
2988 * target.c (kill_inferior): Change parameter to process_info
2989 pointer instead of pid. Adjust.
2990 * target.h (struct target_ops) <kill>: Change parameter to
2991 process_info pointer instead of pid. Adjust all implementations
2992 and callers.
2993 (kill_inferior): Likewise.
2994
2995 2018-07-13 Pedro Alves <palves@redhat.com>
2996
2997 * linux-low.c (linux_detach, linux_join): Change parameter to
2998 process_info pointer instead of pid. Adjust.
2999 * lynx-low.c (lynx_detach, lynx_join): Likewise.
3000 * nto-low.c (nto_detach): Likewise.
3001 * spu-low.c (spu_detach, spu_join): Likewise.
3002 * win32-low.c (win32_detach, win32_join): Likewise.
3003 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
3004 * target.h (struct target_ops) <detach, join>: Change parameter to
3005 process_info pointer instead of pid. Adjust all implementations
3006 and callers.
3007 (detach_inferior, join_inferior): Rename 'pid' parameter to
3008 'proc'.
3009
3010 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
3011 Jan Kratochvil <jan.kratochvil@redhat.com>
3012 Paul Fertser <fercerpav@gmail.com>
3013 Tsutomu Seki <sekiriki@gmail.com>
3014
3015 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
3016 (OBS): Add 'common/netstuff.o'.
3017 (GDBREPLAY_OBS): Likewise.
3018 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
3019 (remote_open): Implement support for IPv6
3020 connections.
3021 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
3022 and 'wspiapi.h'.
3023 (handle_accept_event): Accept connections from IPv6 sources.
3024 (remote_prepare): Handle IPv6-style hostnames; implement
3025 support for IPv6 connections.
3026 (remote_open): Implement support for printing connections from
3027 IPv6 sources.
3028
3029 2018-07-11 Pedro Alves <palves@redhat.com>
3030
3031 PR gdb/23377
3032 * mem-break.c (any_persistent_commands): Add process_info
3033 parameter and use it instead of relying on the current process.
3034 Change return type to bool.
3035 * mem-break.h (any_persistent_commands): Add process_info
3036 parameter and change return type to bool.
3037 * server.c (handle_detach): Remove require_running_or_return call.
3038 Look up the process_info for the process we're about to detach.
3039 If not found, return back error to GDB. Adjust
3040 any_persistent_commands call to pass down a process pointer.
3041
3042 2018-07-11 Pedro Alves <palves@redhat.com>
3043
3044 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
3045 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
3046 instead of collect_register_by_name.
3047 * regcache.c (regcache_raw_get_unsigned_by_name): New.
3048 * regcache.h (regcache_raw_get_unsigned_by_name): New.
3049
3050 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
3051 Pedro Alves <palves@redhat.com>
3052
3053 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
3054
3055 2018-07-03 Tom Tromey <tom@tromey.com>
3056
3057 * linux-low.c: Update.
3058 * lynx-low.c: Update.
3059 * mem-break.c: Update.
3060 * nto-low.c: Update.
3061 * remote-utils.c: Update.
3062 * server.c: Update.
3063 * spu-low.c: Update.
3064 * target.c: Update.
3065 * win32-low.c: Update.
3066
3067 2018-07-03 Tom Tromey <tom@tromey.com>
3068
3069 * server.c: Update.
3070
3071 2018-07-03 Tom Tromey <tom@tromey.com>
3072
3073 * linux-low.c: Update.
3074
3075 2018-07-03 Tom Tromey <tom@tromey.com>
3076
3077 * target.c: Update.
3078
3079 2018-07-03 Tom Tromey <tom@tromey.com>
3080
3081 * linux-low.c: Update.
3082 * linux-mips-low.c: Update.
3083 * lynx-low.c: Update.
3084 * nto-low.c: Update.
3085 * remote-utils.c: Update.
3086 * server.c: Update.
3087 * spu-low.c: Update.
3088 * target.c: Update.
3089 * thread-db.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 * mem-break.c: Update.
3097 * nto-low.c: Update.
3098 * remote-utils.c: Update.
3099 * server.c: Update.
3100 * spu-low.c: Update.
3101 * target.c: Update.
3102 * tracepoint.c: Update.
3103
3104 2018-07-03 Tom Tromey <tom@tromey.com>
3105
3106 * linux-low.c: Update.
3107 * linux-ppc-low.c: Update.
3108 * linux-x86-low.c: Update.
3109 * proc-service.c: Update.
3110 * server.c: Update.
3111 * spu-low.c: Update.
3112 * thread-db.c: Update.
3113 * win32-low.c: Update.
3114
3115 2018-07-03 Tom Tromey <tom@tromey.com>
3116
3117 * linux-low.c: Update.
3118 * lynx-low.c: Update.
3119 * nto-low.c: Update.
3120 * remote-utils.c: Update.
3121 * spu-low.c: Update.
3122 * thread-db.c: Update.
3123 * win32-low.c: Update.
3124
3125 2018-06-29 Joel Brobecker <brobecker@adacore.com>
3126
3127 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
3128 parameter in call to 'amd64_create_target_description'.
3129
3130 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3131
3132 * x86-tdesc.h: Remove executable permission flag.
3133
3134 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
3135
3136 * configure.ac: Remove AC_PREREQ, add missing quoting.
3137 * configure: Re-generate.
3138 * config.in: Re-generate.
3139 * aclocal.m4: Re-generate.
3140
3141 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
3142
3143 * tracepoint.h (current_traceframe): Remove declaration.
3144
3145 2018-06-18 Alan Hayward <alan.hayward@arm.com>
3146
3147 * linux-aarch64-low.c (is_sve_tdesc): New function.
3148 (aarch64_sve_regs_copy_to_regcache): Likewise.
3149 (aarch64_sve_regs_copy_from_regcache): Likewise.
3150 (aarch64_regs_info): Add SVE checks.
3151 (initialize_low_arch): Initialize SVE.
3152
3153 2018-06-18 Alan Hayward <alan.hayward@arm.com>
3154
3155 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
3156
3157 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3158
3159 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
3160 (initialize_low_tracepoint): Likewise
3161 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
3162 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
3163 param.
3164 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
3165 checks.
3166 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
3167
3168 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3169
3170 * server.h (PBUFSIZ): Increase size
3171
3172 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3173
3174 * regcache.c (regcache::raw_compare): New function.
3175 * regcache.h (regcache::raw_compare): New declaration.
3176
3177 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3178
3179 * regcache.c (new_register_cache): Use new.
3180 (free_register_cache): Use delete.
3181 (register_data): Use const.
3182 (supply_register): Move body inside regcache.
3183 (regcache::raw_supply): New override function.
3184 (collect_register): Move body inside regcache.
3185 (regcache::raw_collect): New override function.
3186 (regcache::get_register_status): New override function.
3187 * regcache.h (struct regcache): Inherit from reg_buffer_common.
3188
3189 2018-06-09 Tom Tromey <tom@tromey.com>
3190
3191 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
3192 declare queue.
3193 (event_queue): Use std::queue.
3194 (gdb_event_xfree): Remove.
3195 (initialize_event_loop, process_event, wait_for_event): Update.
3196
3197 2018-06-08 Stan Cox <scox@redhat.com>
3198
3199 * win32-low.c (win32_create_inferior): last_ptid and last_status
3200 moved to client_state.
3201
3202 2018-06-08 Pedro Alves <palves@redhat.com>
3203
3204 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
3205 common/common-exceptions.o, common/common-utils.o,
3206 common/errors.o, common/print-utils.o and utils.o.
3207 * gdbreplay.c: Include "common-defs.h" instead of the two
3208 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
3209 string.h or alloca.h.
3210 (perror_with_name): Delete.
3211 (remote_open): Use xstrdup instead of strdup.
3212 (main): Rename to ...
3213 (captured_main): ... this.
3214 (main): New.
3215
3216 2018-06-08 Tom Tromey <tom@tromey.com>
3217
3218 * linux-low.c (linux_low_read_btrace): Update.
3219
3220 2018-06-04 Stan Cox <scox@redhat.com>
3221
3222 * server.h (struct client_state): New.
3223 * server.c (cont_thread, general_thread, multi_process)
3224 (report_fork_events, report_vfork_events, report_exec_events)
3225 (report_thread_events, swbreak_feature, hwbreak_feature)
3226 (vCont_supported, disable_randomization, pass_signals)
3227 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
3228 Moved to client_state.
3229 * remote-utils.c (remote_debug, noack_mode)
3230 (transport_is_reliable): Moved to client_state.
3231 * tracepoint.c (current_traceframe): Moved to client_state.
3232
3233 Update all callers.
3234 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
3235 linux-low.c, remote-utils.h, target.c: Use client_state.
3236
3237 2018-05-31 Alan Hayward <alan.hayward@arm.com>
3238
3239 * configure.srv: Add new c/h file.
3240
3241 2018-05-31 Alan Hayward <alan.hayward@arm.com>
3242
3243 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
3244 null VQ.
3245
3246 2018-05-25 Maciej W. Rozycki <macro@mips.com>
3247
3248 * gdb.arch/mips-fpregset-core.exp: New test.
3249 * gdb.arch/mips-fpregset-core.c: New test source.
3250
3251 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
3252
3253 PR server/23198
3254 * hostio.c (require_int): Do not report overflow for integers
3255 between 0xfffffff and 0x7fffffff.
3256
3257 2018-05-22 Maciej W. Rozycki <macro@mips.com>
3258
3259 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
3260 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
3261 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
3262 functions.
3263 (the_low_target): Wire them.
3264
3265 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3266
3267 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
3268 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
3269 mode. Call collect_register_by_name with vscr using
3270 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
3271 (ppc_store_vrregset): Add and set vscr_offset variable as in
3272 ppc_fill_vrregset. Call supply_register_by_name with vscr using
3273 vscr_offset.
3274
3275 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3276
3277 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
3278 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
3279 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
3280
3281 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3282
3283 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
3284 (ppc_store_vsxregset): Likewise.
3285 (ppc_fill_vrregset): Likewise.
3286 (ppc_store_vrregset): Likewise.
3287 (ppc_fill_evrregset): Likewise.
3288 (ppc_store_evrregset): Likewise.
3289 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
3290 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
3291 needed.
3292
3293 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3294
3295 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
3296 wordsize of the inferior. Call ppc_linux_target_wordsize.
3297
3298 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3299
3300 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
3301 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
3302 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
3303 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
3304 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
3305 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
3306 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
3307 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
3308 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
3309 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
3310 (tdesc_powerpc_e500l): Remove.
3311 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
3312 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
3313 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
3314 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
3315 linux-ppc-tdesc.h.
3316 (ppc_arch_setup): Remove target description matching code. Fill a
3317 ppc_linux_features struct and call ppc_linux_match_description
3318 with it.
3319
3320 2018-05-22 Maciej W. Rozycki <macro@mips.com>
3321
3322 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
3323 width of the requested register exceeds the width of the
3324 `ptrace' data type.
3325 (mips_cannot_store_register): Likewise.
3326
3327 2018-05-21 Maciej W. Rozycki <macro@mips.com>
3328
3329 * linux-mips-low.c (mips_fetch_register): New function. Update
3330 preceding comment.
3331 (mips_store_gregset): Supply 0 rather than $restart for $zero.
3332 (the_low_target): Wire `mips_fetch_register'.
3333
3334 2018-05-10 Joel Brobecker <brobecker@adacore.com>
3335
3336 * lynx-i386-low.c (LYNXOS_178): New macro.
3337 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
3338 the layout on LynxOS-178.
3339 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
3340 handle floating point registers that are not supported by
3341 LynxOS-178.
3342
3343 2018-05-10 Tom Tromey <tom@tromey.com>
3344
3345 * configure: Rebuild.
3346
3347 2018-05-10 Joel Brobecker <brobecker@adacore.com>
3348
3349 PR server/23158:
3350 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
3351 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
3352 Use it to set the expedite_regs field in the given tdesc.
3353 * x86-tdesc.h: New file.
3354 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
3355 Adjust following the addition of the new expedite_regs parameter
3356 to init_target_desc.
3357 * linux-tic6x-low.c (tic6x_read_description): Likewise.
3358 * linux-x86-tdesc.c: #include "x86-tdesc.h".
3359 (i386_linux_read_description, amd64_linux_read_description):
3360 Adjust following the addition of the new expedite_regs parameter
3361 to init_target_desc.
3362 * lynx-i386-low.c: #include "x86-tdesc.h".
3363 (lynx_i386_arch_setup): Adjust following the addition of the new
3364 expedite_regs parameter to init_target_desc.
3365 * nto-x86-low.c: #include "x86-tdesc.h".
3366 (nto_x86_arch_setup): Adjust following the addition of the new
3367 expedite_regs parameter to init_target_desc.
3368 * win32-i386-low.c: #include "x86-tdesc.h".
3369 (i386_arch_setup): Adjust following the addition of the new
3370 expedite_regs parameter to init_target_desc.
3371
3372 2018-05-10 Joel Brobecker <brobecker@adacore.com>
3373
3374 PR server/23158:
3375 * win32-low.c (win32_create_inferior): Add call to my_wait
3376 setting last_status global.
3377
3378 2018-05-10 Joel Brobecker <brobecker@adacore.com>
3379
3380 PR server/23158:
3381 * win32-low.c (create_process): Only call gdb_tilde_expand if
3382 inferior_cwd is not NULL.
3383
3384 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
3385
3386 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
3387 registers to the cache if their values have changed.
3388 (i387_xsave_to_cache): Provide default values for x87 control
3389 registers when these features are available, but disabled.
3390 * regcache.c (supply_register_by_name_zeroed): New function.
3391 * regcache.h (supply_register_by_name_zeroed): Declare new
3392 function.
3393
3394 2018-05-07 Tom Tromey <tom@tromey.com>
3395
3396 * configure: Rebuild.
3397
3398 2018-05-04 Tom Tromey <tom@tromey.com>
3399
3400 * configure: Rebuild.
3401
3402 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
3403 Pedro Alves <palves@redhat.com>
3404
3405 * linux-aarch64-low.c (aarch64_stopped_data_address):
3406 Likewise.
3407
3408 2018-04-27 Tom Tromey <tom@tromey.com>
3409
3410 * configure: Rebuild.
3411
3412 2018-04-23 Tom Tromey <tom@tromey.com>
3413
3414 * configure: Rebuild.
3415
3416 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
3417
3418 * Makefile.in (depcomp): Add "..".
3419 (all_deps_files): New and use it.
3420
3421 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3422
3423 * configure.srv (aarch64*-*-linux*): Don't include xml.
3424 (i[34567]86-*-cygwin*): Likewise.
3425 (i[34567]86-*-linux*): Likewise.
3426 (i[34567]86-*-lynxos*): Likewise.
3427 (i[34567]86-*-mingw32ce*): Likewise.
3428 (i[34567]86-*-mingw*): Likewise.
3429 (i[34567]86-*-nto*): Likewise.
3430 (tic6x-*-uclinux): Likewise.
3431 (x86_64-*-linux*): Likewise.
3432 (x86_64-*-mingw*): Likewise.
3433 (x86_64-*-cygwin*): Likewise.
3434
3435 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3436
3437 * tdesc.c: Remove xml parameter.
3438
3439 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3440
3441 * server.c (get_features_xml): Remove cast.
3442 * tdesc.c (void target_desc::accept): Fill in function.
3443 (tdesc_get_features_xml): Remove old xml creation.
3444 (print_xml_feature::visit_pre): Add xml vistor.
3445 * tdesc.h (struct target_desc): Make xmltarget mutable.
3446 (tdesc_get_features_xml): Remove declaration.
3447
3448 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3449
3450 * tdesc.c (tdesc_architecture_name): Add new function.
3451 (tdesc_osabi_name): Likewise.
3452 (tdesc_get_features_xml): Use new functions.
3453
3454 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3455
3456 * tdesc.c (tdesc_create_flags): Remove.
3457 (tdesc_add_flag): Likewise.
3458 (tdesc_named_type): Likewise.
3459 (tdesc_create_union): Likewise.
3460 (tdesc_create_struct): Likewise.
3461 (tdesc_create_vector): Likewise.
3462 (tdesc_add_bitfield): Likewise.
3463 (tdesc_add_field): Likewise.
3464 (tdesc_set_struct_size): Likewise.
3465
3466 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3467
3468 * tdesc.c (~target_desc): Remove implictly deleted items.
3469 (init_target_desc): Iterate all features.
3470 (tdesc_get_features_xml): Use vector.
3471 (tdesc_create_feature): Create feature.
3472 * tdesc.h (tdesc_feature) Remove
3473 (target_desc): Add features.
3474
3475 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3476
3477 * Makefile.in: Add common/tdesc.c
3478 * tdesc.c (init_target_desc): init all reg_defs from register
3479 vector.
3480 (tdesc_create_reg): Create tdesc_reg.
3481 * tdesc.h (tdesc_feature): Add register vector.
3482
3483 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
3484
3485 * tdesc.h (struct target_desc) <features>: Change type to
3486 std::vector<std::string>.
3487 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
3488 changes.
3489 (tdesc_get_features_xml): Likewise.
3490 (tdesc_create_feature): Likewise.
3491
3492 2018-03-26 Alan Hayward <alan.hayward@arm.com>
3493
3494 * regcache.c (find_register_by_number): Return a ref.
3495 (find_regno): Use references.
3496 (register_size): Likewise.
3497 (register_data): Likewise.
3498 * tdesc.c (target_desc::~target_desc): Remove free calls.
3499 (target_desc::operator==): Use std::vector compare.
3500 (init_target_desc): Use reference.
3501 (tdesc_create_reg): Use reg constructors.
3502 * tdesc.h (struct target_desc): Replace pointer with object.
3503
3504 2018-03-23 Alan Hayward <alan.hayward@arm.com>
3505
3506 * regcache.c (find_register_by_number): Make static.
3507 (find_regno): Use find_register_by_number
3508 * regcache.h (struct reg): Remove declaration.
3509
3510 2018-03-23 Alan Hayward <alan.hayward@arm.com>
3511
3512 * tdesc.c (target_desc::~target_desc): Move to here.
3513 (target_desc::operator==): Likewise.
3514 * tdesc.h (target_desc::~target_desc): Move from here.
3515 (target_desc::operator==): Likewise.
3516
3517 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
3518
3519 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
3520
3521 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3522
3523 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
3524 S390_TDESC_GS.
3525 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
3526 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
3527 and init_registers_s390_gs_linux64.
3528
3529 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3530
3531 * linux-s390-low.c (s390_fill_gs): Remove function.
3532 (s390_fill_gsbc): Remove function.
3533 (s390_regsets): Set fill functions for the guarded storage regsets
3534 to NULL.
3535
3536 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3537
3538 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
3539 the word size. Add comment.
3540 (s390_get_wordsize): New function.
3541 (s390_arch_setup): No longer select a temporary tdesc to fetch the
3542 pswm with it. Instead, use s390_get_wordsize to determine the
3543 word size first and derive the correct tdesc from that directly.
3544
3545 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
3546
3547 * Makefile.in: Include silent-rules.mk.
3548 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
3549 (COMPILE): Add ECHO_CXX.
3550 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
3551 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
3552 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
3553 (version-generated.c): Add ECHO_GEN.
3554 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
3555 (IPAGENT_COMPILE): Add ECHO_CXX.
3556 (%-generated.c): Add ECHO_REGDAT.
3557
3558 2018-03-14 Tom Tromey <tom@tromey.com>
3559
3560 PR cli/14977:
3561 * ax.c (ax_printf): Special case for NULL.
3562
3563 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
3564
3565 * linux-low.c (linux_qxfer_libraries_svr4): Use
3566 xml_escape_text_append.
3567
3568 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
3569
3570 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
3571
3572 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
3573
3574 * server.c (handle_general_set): Remove unnecessary xstrdup.
3575
3576 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
3577
3578 * server.c (parse_debug_format_options): Adjust to
3579 delim_string_to_char_ptr_vec changes.
3580 * thread-db.c (thread_db_load_search): Adjust to
3581 dirnames_to_char_ptr_vec changes.
3582
3583 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
3584
3585 * target.h (target_enable_btrace, target_disable_btrace)
3586 (target_read_btrace, target_read_btrace_conf): Turn macro into
3587 inline function. Throw error if target method is not defined.
3588 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
3589 check for btrace target method. Be prepared to handle exceptions
3590 from btrace target methods.
3591
3592 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
3593
3594 * server.c (captured_main): Change order of error message printed
3595 when the current working directory cannot be found.
3596
3597 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
3598
3599 * server.c: Include "filenames.h" and "pathstuff.h".
3600 (program_name): Delete variable.
3601 (program_path): New anonymous class.
3602 (get_exec_wrapper): Use "program_path" instead of
3603 "program_name".
3604 (handle_v_run): Likewise.
3605 (captured_main): Likewise.
3606 (process_serial_event): Likewise.
3607
3608 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
3609
3610 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
3611 (OBJS): Add "pathstuff.o".
3612 * server.c (current_directory): New global variable.
3613 (captured_main): Initialize "current_directory".
3614
3615 2018-02-26 Alan Hayward <alan.hayward@arm.com>
3616
3617 * tdesc.c: Use common/tdesc.h.
3618 * tdesc.h: Likewise.
3619
3620 2018-02-20 Alan Hayward <alan.hayward@arm.com>
3621 Simon Marchi <simon.marchi@ericsson.com>
3622
3623 * Makefile.in: Switch order of make rules.
3624
3625 2018-02-19 Alan Hayward <alan.hayward@arm.com>
3626
3627 * Makefile.in: Add common directory in build.
3628 * configure.ac: Add common reference.
3629 * configure: Regenerate.
3630
3631 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
3632
3633 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
3634 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
3635 * spu-low.c (spu_target_ops): Likewise.
3636 * win32-low.c (win32_target_ops): Likewise.
3637 * server.c (supported_btrace_packets): Report packets unconditionally.
3638 * target.h (target_ops) <supports_btrace>: Remove.
3639 (target_supports_btrace): Remove.
3640
3641 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
3642
3643 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
3644 (handle_btrace_disable): Change return type to void. Use exceptions
3645 to report errors.
3646 (handle_btrace_general_set): Catch exception and copy message to
3647 return message.
3648
3649 2018-02-08 Tom Tromey <tom@tromey.com>
3650
3651 * linux-low.c (install_software_single_step_breakpoints): Use
3652 make_scoped_restore.
3653 * inferiors.c (make_cleanup_restore_current_thread): Remove.
3654 (do_restore_current_thread_cleanup): Remove.
3655 * gdbthread.h (make_cleanup_restore_current_thread): Don't
3656 declare.
3657
3658 2018-02-08 Tom Tromey <tom@tromey.com>
3659
3660 * mem-break.c (set_raw_breakpoint_at): Use
3661 gdb::unique_xmalloc_ptr.
3662
3663 2018-01-30 Pedro Alves <palves@redhat.com>
3664
3665 PR gdb/13211
3666 * target.c (target_terminal::terminal_state): Rename to ...
3667 (target_terminal::m_terminal_state): ... this.
3668
3669 2018-01-19 James Clarke <jrtc27@jrtc27.com>
3670
3671 * linux-low.c (handle_extended_wait): Surround call to
3672 thread_db_notice_clone with #ifdef USE_THREAD_DB.
3673
3674 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
3675
3676 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
3677 linux_ptrace_attach_fail_reason_string now returning an
3678 std::string.
3679 (linux_attach): Likewise.
3680 * thread-db.c (attach_thread): Likewise.
3681
3682 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
3683
3684 PR gdb/21559
3685 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
3686 checking for fs_base/gs_base fields in struct user_regs_struct.
3687 * configure: Regenerate.
3688
3689 2018-01-16 Yao Qi <yao.qi@linaro.org>
3690
3691 PR gdb/18749
3692 * linux-low.c (fetch_register): Call supply_register instead of
3693 error.
3694
3695 2018-01-08 Yao Qi <yao.qi@linaro.org>
3696 Simon Marchi <simon.marchi@ericsson.com>
3697
3698 * Makefile.in (OBS): Remove selftest.o.
3699 * configure.ac: Set srv_selftest_objs if $development is true.
3700 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
3701 * configure: Re-generated.
3702 * server.c (captured_main): Wrap variable selftest_filter with
3703 GDB_SELF_TEST.
3704
3705 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
3706
3707 * server.c (parse_debug_format_options): Return std::string.
3708 (handle_monitor_command, captured_main): Adjust.
3709
3710 2018-01-05 Pedro Alves <palves@redhat.com>
3711
3712 PR gdb/18653
3713 * server.c (captured_main): Pass quiet=false to
3714 save_original_signals_state.
3715
3716 2018-01-01 Joel Brobecker <brobecker@adacore.com>
3717
3718 * gdbreplay.c (gdbreplay_version): Update copyright year in
3719 version message.
3720 * server.c (gdbserver_version): Likewise.
3721
3722 2017-12-08 Tom Tromey <tom@tromey.com>
3723
3724 * ax.c (ax_printf): Update.
3725
3726 2017-12-07 Yao Qi <yao.qi@linaro.org>
3727
3728 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
3729 aarch64_linux_read_description.
3730 * linux-amd64-ipa.c (idx2mask): New array.
3731 (get_ipa_tdesc): Move idx2mask out.
3732 (initialize_low_tracepoint): Initialize target descriptions.
3733 * linux-i386-ipa.c (idx2mask): New array.
3734 (get_ipa_tdesc): Move idx2mask out.
3735 (initialize_low_tracepoint): Initialize target descriptions.
3736
3737 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
3738
3739 * tdesc.c (struct tdesc_type): Change return type.
3740 (tdesc_add_flag): Change parameter type.
3741 (tdesc_add_bitfield): Likewise.
3742 (tdesc_add_field): Likewise.
3743 (tdesc_set_struct_size): Likewise.
3744
3745 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
3746
3747 * regcache.c (registers_to_string): Remove unused variable.
3748
3749 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3750
3751 * inferiors.c (for_each_inferior_with_data): Remove.
3752 * inferiors.h (for_each_inferior_with_data): Remove.
3753 * server.c (handle_qxfer_threads_worker): Change parameter type.
3754 (handle_qxfer_threads_proper): Use for_each_thread.
3755
3756 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3757
3758 * inferiors.c (for_each_inferior): Remove.
3759 (clear_inferiors): Use for_each_thread.
3760 * inferiors.h (for_each_inferior): Remove.
3761 * linux-low.c (linux_wait_for_event_filtered): Use
3762 for_each_thread.
3763 (linux_stabilize_threads): Likewise.
3764 * regcache.c (regcache_release): Likewise.
3765 * server.c (gdb_wants_all_threads_stopped): Likewise.
3766 (clear_pending_status_callback): Remove.
3767 (handle_status): Use for_each_thread.
3768 (captured_main): Likewise.
3769 * win32-low.c (child_init_thread_list): Likewise.
3770 (win32_clear_inferiors): Likewise.
3771 (fake_breakpoint_event): Likewise.
3772
3773 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3774
3775 * inferiors.h (find_inferior): Remove.
3776 * inferiors.c (find_inferior): Remove.
3777
3778 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3779
3780 * linux-low.c (resume_status_pending_p): Update comment.
3781 (need_step_over_p): Update comment.
3782
3783 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3784
3785 * linux-low.c (proceed_one_lwp): Return void, change parameter
3786 type.
3787 (unsuspend_and_proceed_one_lwp): Likewise.
3788 (proceed_all_lwps): Use for_each_thread.
3789 (unstop_all_lwps): Likewise.
3790
3791 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3792
3793 * linux-low.c (linux_resume_one_thread): Return void, take
3794 parameter directly.
3795 (linux_resume): Use for_each_thread.
3796
3797 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3798
3799 * linux-low.c (send_sigstop_callback): Return void, change
3800 parameter type. Rename to...
3801 (send_sigstop): ... this.
3802 (suspend_and_send_sigstop_callback): Return void, change parameter
3803 type. Rename to...
3804 (suspend_and_send_sigstop): ... this.
3805 (stop_all_lwps): Use for_each_thread.
3806
3807 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3808
3809 * linux-low.c (lwp_running): Return bool, remove unused
3810 argument.
3811 (linux_stabilize_threads): Use find_thread.
3812
3813 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3814
3815 * linux-low.c (select_singlestep_lwp_callback): Remove.
3816 (count_events_callback): Remove.
3817 (select_event_lwp_callback): Remove.
3818 (select_event_lwp): Use find_thread/for_each_thread.
3819
3820 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3821
3822 * linux-low.c (not_stopped_callback): Return bool, take filter
3823 argument directly.
3824 (linux_wait_for_event_filtered): Use find_thread.
3825 (linux_wait_1): Likewise.
3826
3827 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3828
3829 * linux-low.c (same_lwp): Remove.
3830 (find_lwp_pid): Use find_thread.
3831
3832 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3833
3834 * linux-low.c (delete_lwp_callback): Remove.
3835 (linux_mourn): Use for_each_thread.
3836
3837 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3838
3839 * linux-low.c (linux_detach_lwp_callback): Return void, remove
3840 args parameter, don't check for pid.
3841 (linux_detach): Use for_each_thread.
3842
3843 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3844
3845 * linux-low.c (struct counter): Remove.
3846 (second_thread_of_pid_p): Remove.
3847 (last_thread_of_process_p): Use find_thread.
3848
3849 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3850
3851 * inferiors.c (find_inferior_in_random): Remove.
3852 * inferiors.h (find_inferior_in_random): Remove.
3853 * linux-low.c (status_pending_p_callback): Return bool, accept
3854 parameter ptid directly.
3855 (linux_wait_for_event_filtered): Use find_thread_in_random.
3856 (linux_wait_1): Likewise.
3857
3858 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3859
3860 * inferiors.c (find_inferior_id): Remove.
3861 (find_thread_ptid): Move implemention from find_inferior_id to
3862 here.
3863 * inferiors.h (find_inferior_id): Remove.
3864 * server.c (handle_status): Use find_thread_ptid.
3865 (process_serial_event): Likewise.
3866 * thread-db.c (find_one_thread): Likewise.
3867 (thread_db_thread_handle): Likewise.
3868 * win32-low.c (thread_rec): Likewise.
3869 (child_delete_thread): Likewise.
3870 (win32_thread_alive): Likewise.
3871 (get_child_debug_event): Likewise.
3872
3873 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3874
3875 * linux-mips-low.c (update_watch_registers_callback): Return
3876 void, remove pid_p parameter, don't check for pid.
3877 (mips_insert_point, mips_remove_point): Use for_each_thread.
3878
3879 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3880
3881 * lynx.low (lynx_delete_thread_callback): Remove.
3882 (lynx_mourn): Use for_each_thread.
3883
3884 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3885
3886 * regcache.c (regcache_invalidate_one): Remove.
3887 (regcache_invalidate_pid): use for_each_thread.
3888
3889 2017-11-26 Tom Tromey <tom@tromey.com>
3890
3891 * linux-low.c (linux_create_inferior): Update.
3892
3893 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
3894
3895 * spu-low.c (spu_create_inferior): Fix typo in argument name.
3896
3897 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3898
3899 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
3900 * linux-aarch64-low.c (initialize_low_arch): Call init func.
3901 * linux-aarch64-tdesc-selftest.c: New file.
3902 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
3903
3904 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3905
3906 * configure.srv: Add new file.
3907 * linux-aarch64-low.c (initialize_low_arch): Call init func.
3908 * linux-aarch64-tdesc-selftest.c: New file.
3909 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
3910
3911 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3912
3913 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
3914 * linux-aarch64-low.c (initialize_low_arch): Remove init.
3915 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
3916
3917 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3918
3919 * configure.srv: Add new files.
3920 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
3921 aarch64_linux_read_description.
3922 * linux-aarch64-low.c (aarch64_linux_read_description):
3923 Merge with aarch64_arch_setup.
3924 (aarch64_arch_setup): Call aarch64_linux_read_description.
3925 * linux-aarch64-tdesc.c: New file.
3926 * linux-aarch64-tdesc.h: New file.
3927
3928 2017-11-24 Yao Qi <yao.qi@linaro.org>
3929
3930 * configure.srv: Set $srv_regobj for tic6x-linux.
3931 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
3932 (tic6x_read_description): Move some code to tic6x_arch_setup.
3933 (tic6x_tdesc_test): New function.
3934 (initialize_low_arch): Call selftests::register_test.
3935
3936 2017-11-22 Yao Qi <yao.qi@linaro.org>
3937
3938 * remote-utils.c (prepare_resume_reply): Use memcpy.
3939
3940 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3941
3942 * linux-low.c (kill_one_lwp_callback): Return void, take
3943 argument directly, don't filter on pid.
3944 (linux_kill): Use for_each_thread.
3945
3946 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3947
3948 * linux-low.c (need_step_over_p): Return bool, remove dummy
3949 argument.
3950 (linux_resume, proceed_all_lwps): Use find_thread.
3951
3952 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3953
3954 * linux-low.c (resume_status_pending_p): Return bool, remove
3955 flag_p argument.
3956 (linux_resume): Use find_thread.
3957
3958 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3959
3960 * linux-low.c (struct thread_resume_array): Remove.
3961 (linux_set_resume_request): Return void, take arguments
3962 directly.
3963 (linux_resume): Use for_each_thread.
3964
3965 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3966
3967 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
3968 return bool, remove data argument.
3969 (linux_stabilize_threads): Use find_thread.
3970
3971 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3972
3973 * linux-low.c (unsuspend_one_lwp): Remove.
3974 (unsuspend_all_lwps): Use for_each_thread, inline code from
3975 unsuspend_one_lwp.
3976
3977 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3978
3979 * gdbthread.h (find_thread): Add overload with ptid_t filter.
3980 * linux-low.c (struct iterate_over_lwps_args): Remove.
3981 (iterate_over_lwps_filter): Remove.
3982 (iterate_over_lwps): Use find_thread.
3983
3984 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3985
3986 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
3987 (linux_handle_new_gdb_connection): Use for_each_thread, inline
3988 code from reset_lwp_ptrace_options_callback.
3989
3990 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3991
3992 * linux-arm-low.c (struct update_registers_data): Remove.
3993 (update_registers_callback): Return void, take arguments
3994 directly, don't check thread's pid.
3995 (arm_insert_point, arm_remove_point): Use for_each_thread.
3996
3997 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3998
3999 * win32-low.c (continue_one_thread): Return void, take argument
4000 directly.
4001 (child_continue): Use for_each_thread.
4002
4003 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
4004
4005 * win32-i386-low.c (update_debug_registers_callback): Rename
4006 to ...
4007 (update_debug_registers): ... this, return void, remove pid_p arg.
4008 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
4009
4010 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4011
4012 * inferiors.h (struct process_info): Add constructor, initialize
4013 fields..
4014 <syscalls_to_catch>: Change type to std::vector<int>.
4015 * inferiors.c (add_process): Allocate process_info with new.
4016 (remove_process): Free process_info with delete.
4017 * linux-low.c (handle_extended_wait): Adjust.
4018 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
4019 * server.c (handle_general_set): Adjust.
4020
4021 2017-11-16 Pedro Alves <palves@redhat.com>
4022
4023 * remote-utils.c (remote_close): Block SIGIO signals instead of
4024 uninstalling the SIGIO handler.
4025
4026 2017-11-16 Alan Hayward <alan.hayward@arm.com>
4027
4028 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
4029
4030 2017-11-16 Yao Qi <yao.qi@linaro.org>
4031
4032 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
4033 (tic6x_store_gregset): Likewise.
4034 (tic6x_usrregs_info): Move it up.
4035
4036 2017-11-15 Alan Hayward <alan.hayward@arm.com>
4037
4038 * Makefile.in: Update arch rules.
4039 * configure.srv: Explicitly mark arch/ files.
4040
4041 2017-11-13 Andreas Schwab <schwab@suse.de>
4042
4043 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
4044 function.
4045 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4046
4047 2017-11-06 Pedro Alves <palves@redhat.com>
4048
4049 * config.in, configure: Regenerate.
4050
4051 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
4052
4053 * target.c (struct thread_search): Remove.
4054 (thread_search_callback): Remove.
4055 (prepare_to_access_memory): Use for_each_thread instead of
4056 find_inferior. Inline code from thread_search_callback.
4057
4058 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
4059
4060 * server.c (struct visit_actioned_threads_data): Remove.
4061 (visit_actioned_threads): Change prototype to take arguments
4062 directly.
4063 (resume): Use find_thread instead of find_inferior.
4064
4065 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
4066
4067 * server.c (queue_stop_reply_callback): Change prototype, return
4068 void.
4069 (find_status_pending_thread_callback): Remove.
4070 (handle_status): Replace find_inferior with find_thread and
4071 for_each_thread.
4072
4073 2017-10-25 Alan Hayward <alan.hayward@arm.com>
4074
4075 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
4076 with REGNO.
4077 (aarch64_store_gregset): Likewise.
4078 (aarch64_fill_fpregset): Likewise.
4079 (aarch64_store_fpregset): Likewise.
4080
4081 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
4082
4083 * gdbthread.h (find_thread, for_each_thread): New functions.
4084 * inferiors.c (thread_of_pid): Remove.
4085 (find_any_thread_of_pid): Use find_thread.
4086 * linux-low.c (num_lwps): Use for_each_thread.
4087
4088 2017-10-17 Yao Qi <yao.qi@linaro.org>
4089
4090 * Makefile.in: Remove one rule.
4091 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
4092
4093 2017-10-17 Yao Qi <yao.qi@linaro.org>
4094
4095 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
4096 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
4097
4098 2017-10-17 Yao Qi <yao.qi@linaro.org>
4099
4100 * configure.srv: Rename arm.o with arch/arm.o.
4101
4102 2017-10-17 Yao Qi <yao.qi@linaro.org>
4103
4104 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
4105 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
4106 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
4107 (arch-i386.o, arch-amd64.o): Remove rules.
4108 (arch/%.o): New rule.
4109 Update POSTCOMPILE and COMPILE.pre.
4110 * configure.ac: Invoke AC_CONFIG_COMMANDS.
4111 * configure: Re-generated.
4112 * configure.srv: Replace arch-i386.o with arch/i386.o.
4113 Replace arch-amd64.o with arch/amd64.o.
4114
4115 2017-10-16 Yao Qi <yao.qi@linaro.org>
4116
4117 * configure: Regenerated.
4118
4119 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4120
4121 * inferiors.h: (struct inferior_list): Remove.
4122 (struct inferior_list_entry); Remove.
4123 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
4124 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
4125 get_first_inferior): Remove.
4126 (for_each_inferior, for_each_inferior_with_data, find_inferior,
4127 find_inferior_id, find_inferior_in_random): Change signature.
4128 * inferiors.c (all_threads): Change type to
4129 std::list<thread_info *>.
4130 (get_thread): Remove macro.
4131 (find_inferior, find_inferior_id): Change signature, implement
4132 using find_thread.
4133 (find_inferior_in_random): Change signature, implement using
4134 find_thread_in_random.
4135 (for_each_inferior, for_each_inferior_with_data): Change
4136 signature, implement using for_each_thread.
4137 (add_inferior_to_list, remove_inferior): Remove.
4138 (add_thread, get_first_thread, thread_of_pid,
4139 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
4140 (get_first_inferior, one_inferior_p, clear_inferior_list):
4141 Remove.
4142 (clear_inferiors, get_thread_process): Update.
4143 * gdbthread.h: Include <list>.
4144 (struct thread_info) <entry>: Remove field.
4145 <id>: New field.
4146 (all_threads): Change type to std::list<thread_info *>.
4147 (get_first_inferior): Add doc.
4148 (find_thread, for_each_thread, find_thread_in_random): New
4149 functions.
4150 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
4151 * linux-arm-low.c (update_registers_callback): Update.
4152 * linux-low.c (second_thread_of_pid_p): Update.
4153 (kill_one_lwp_callback, linux_detach_lwp_callback,
4154 delete_lwp_callback, status_pending_p_callback, same_lwp,
4155 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
4156 iterate_over_lwps, not_stopped_callback,
4157 resume_stopped_resumed_lwps, count_events_callback,
4158 select_singlestep_lwp_callback, select_event_lwp_callback,
4159 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
4160 suspend_and_send_sigstop_callback, wait_for_sigstop,
4161 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
4162 lwp_running, linux_set_resume_request, resume_status_pending_p,
4163 need_step_over_p, start_step_over, linux_resume_one_thread,
4164 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
4165 reset_lwp_ptrace_options_callback): Update.
4166 * linux-mips-low.c (update_watch_registers_callback): Update.
4167 * regcache.c (regcache_invalidate_one, regcache_invalidate):
4168 Update.
4169 (free_register_cache_thread_one): Remove.
4170 (regcache_release): Update.
4171 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
4172 handle_qxfer_threads_worker): Update.
4173 (handle_query): Update, use list iterator.
4174 (visit_actioned_threads, handle_pending_status,
4175 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
4176 clear_pending_status_callback, set_pending_status_callback,
4177 find_status_pending_thread_callback, handle_status,
4178 process_serial_event): Update.
4179 * target.c (thread_search_callback): Update.
4180 * thread-db.c (thread_db_get_tls_address): Update.
4181 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
4182 Update.
4183 * win32-i386-low.c (update_debug_registers_callback): Update.
4184 * win32-low.c (delete_thread_info, child_delete_thread,
4185 continue_one_thread, suspend_one_thread,
4186 get_child_debug_event): Adjust.
4187
4188 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4189
4190 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
4191 * inferiors.h: Include <list>.
4192 (struct process_info) <entry>: Remove field.
4193 <pid>: New field.
4194 (pid_of): Change macro to function.
4195 (ptid_of, lwpid_of): Remove macro.
4196 (all_processes): Change type to std::list<process_info *>.
4197 (ALL_PROCESSES): Remove macro.
4198 (for_each_process, find_process): New function.
4199 * inferiors.c (all_processes): Change type to
4200 std::list<process_info *>.
4201 (find_thread_process): Adjust.
4202 (add_process): Likewise.
4203 (remove_process): Likewise.
4204 (find_process_pid): Likewise.
4205 (get_first_process): Likewise.
4206 (started_inferior_callback): Remove.
4207 (have_started_inferiors_p): Adjust.
4208 (attached_inferior_callback): Remove.
4209 (have_attached_inferiors_p): Adjust.
4210 * linux-low.c (check_zombie_leaders): Likewise.
4211 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
4212 (x86_linux_update_xmltarget): Adjust.
4213 * server.c (handle_query): Likewise.
4214 (gdb_reattached_process): Remove.
4215 (handle_status): Adjust.
4216 (kill_inferior_callback): Likewise.
4217 (detach_or_kill_inferior): Remove.
4218 (print_started_pid): Likewise.
4219 (print_attached_pid): Likewise.
4220 (detach_or_kill_for_exit): Update.
4221 (process_serial_event): Likewise.
4222 * linux-arm-low.c (arm_new_fork): Likewise.
4223
4224 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4225
4226 * dll.h: Include <list>.
4227 (struct dll_info): Add constructor.
4228 <entry>: Remove field.
4229 (all_dlls): Change type to std::list<dll_info>.
4230 * dll.c: Include <algorithm>.
4231 (get_dll): Remove macro.
4232 (all_dlls): Change type to std::list<dll_info *>.
4233 (free_one_dll): Remove.
4234 (match_dll): Likewise.
4235 (loaded_dll): Adjust.
4236 (unloaded_dll): Adjust to all_dlls type change, use
4237 std::find_if. Inline code from match_dll.
4238 (clear_dlls): Adjust to all_dlls type change.
4239 * server.c (emit_dll_description): Remove.
4240 (handle_qxfer_libraries): Adjust to all_dlls type change,
4241 integrate emit_dll_description's functionality.
4242
4243 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
4244
4245 * linux-low.h (struct linux_target_ops) <delete_process>: New
4246 field.
4247 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
4248 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
4249 (struct linux_target_ops): Add delete_process callback.
4250 * linux-arm-low.c (arm_delete_process): New.
4251 (struct linux_target_ops): Add delete_process callback.
4252 * linux-bfin-low.c (struct linux_target_ops): Likewise.
4253 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
4254 * linux-m32r-low.c (struct linux_target_ops): Likewise.
4255 * linux-mips-low.c (mips_linux_delete_process): New.
4256 (struct linux_target_ops): Add delete_process callback.
4257 * linux-ppc-low.c (struct linux_target_ops): Likewise.
4258 * linux-s390-low.c (struct linux_target_ops): Likewise.
4259 * linux-sh-low.c (struct linux_target_ops): Likewise.
4260 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
4261 * linux-tile-low.c (struct linux_target_ops): Likewise.
4262 * linux-x86-low.c (x86_linux_delete_process): New.
4263 (struct linux_target_ops): Add delete_process callback.
4264 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
4265
4266 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
4267
4268 * linux-aarch64-low.c (the_low_target): Add thread delete
4269 callback.
4270 * linux-arm-low.c (arm_delete_thread): New function.
4271 (the_low_target): Add thread delete callback.
4272 * linux-bfin-low.c (the_low_target): Likewise.
4273 * linux-crisv32-low.c (the_low_target): Likewise.
4274 * linux-low.c (delete_lwp): Invoke delete_thread callback if
4275 set.
4276 * linux-low.h (struct linux_target_ops) <delete_thread>: New
4277 field.
4278 * linux-m32r-low.c (the_low_target): Add thread delete callback.
4279 * linux-mips-low.c (mips_linux_delete_thread): New function.
4280 (the_low_target): Add thread delete callback.
4281 * linux-ppc-low.c (the_low_target): Likewise.
4282 * linux-s390-low.c (the_low_target): Likewise.
4283 * linux-sh-low.c (the_low_target): Likewise.
4284 * linux-tic6x-low.c (the_low_target): Likewise.
4285 * linux-tile-low.c (the_low_target): Likewise.
4286 * linux-x86-low.c (the_low_target): Likewise.
4287 * linux-xtensa-low.c (the_low_target): Likewise.
4288
4289 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
4290
4291 * win32-low.c: Include "common-inferior.h".
4292
4293 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4294
4295 * inferiors.c (set_inferior_cwd): New function.
4296 * server.c (handle_general_set): Handle QSetWorkingDir packet.
4297 (handle_query): Inform that QSetWorkingDir is supported.
4298 * win32-low.c (create_process): Pass the inferior's cwd to
4299 CreateProcess.
4300
4301 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4302
4303 * inferiors.c (current_inferior_cwd): New global variable.
4304 (get_inferior_cwd): New function.
4305 * inferiors.h (struct process_info) <cwd>: New field.
4306
4307 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4308
4309 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
4310 (OBS): Add gdb_tilde_expand.o.
4311
4312 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
4313
4314 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
4315 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
4316
4317 2017-09-29 Pedro Alves <palves@redhat.com>
4318
4319 * ax.c (gdb_parse_agent_expr): Constify.
4320 * ax.h (gdb_parse_agent_expr): Constify.
4321 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4322 Constify.
4323 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
4324 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
4325 * remote-utils.h (read_ptid): Constify.
4326 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
4327 (process_point_options, process_serial_event): Constify.
4328 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
4329 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
4330 (cmd_qtbuffer): Constify.
4331
4332 2017-09-29 Pedro Alves <palves@redhat.com>
4333
4334 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
4335 fails.
4336
4337 2017-09-29 Pedro Alves <palves@redhat.com>
4338
4339 * linux-low.c (handle_extended_wait): Pass parent thread instead
4340 of process to thread_db_notice_clone.
4341 * linux-low.h (thread_db_notice_clone): Replace parent process
4342 parameter with parent thread parameter.
4343 * thread-db.c (find_one_thread): Add comment.
4344 (thread_db_notice_clone): Replace parent process parameter with
4345 parent thread parameter. Temporarily switch to the parent thread.
4346
4347 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
4348
4349 * gdbthread.h: Include "common-gdbthread.h".
4350 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
4351 "if" when validating the ptid.
4352 * remote-utils.c: Include "gdbthread.h".
4353 (prepare_resume_reply): Use "switch_to_thread".
4354 * target.c (done_accessing_memory): Likewise.
4355
4356 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
4357
4358 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
4359 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
4360 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
4361 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
4362 s390x-gs-linux64-ipa.o to ipa_obj.
4363 * linux-s390-low.c (HWCAP_S390_GS): New define.
4364 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
4365 New functions.
4366 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
4367 (s390_arch_setup): Check for guarded-storage support and choose
4368 appropriate tdesc.
4369 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
4370 init_registers_s390x_gs_linux64.
4371 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
4372 enum value.
4373 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
4374 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
4375
4376 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
4377
4378 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
4379
4380 2017-09-21 Kevin Buettner <kevinb@redhat.com>
4381
4382 * linux-low.h (struct lwp_info): Add new field, thread_handle.
4383 (thread_db_thread_handle): Declare.
4384 * linux-low.c (linux_target_ops): Initialize thread_handle.
4385 * server.c (handle_qxfer_threads_worker): Add support for
4386 "handle" attribute.
4387 * target.h (struct target_ops): Add new function pointer,
4388 thread_handle.
4389 (target_thread_handle): Define.
4390 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
4391 field in lwp.
4392 (thread_db_thread_handle): New function.
4393
4394 2017-09-21 Kevin Buettner <kevinb@redhat.com>
4395
4396 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
4397 * linux-low.h (thread_db_notice_clone): Declare.
4398 * thread-db.c (thread_db_notice_clone): New function.
4399
4400 2017-09-21 Pedro Alves <palves@redhat.com>
4401
4402 * server.c (gdb_read_memory, handle_status, process_serial_event)
4403 (handle_serial_event, handle_target_event): Adjust to
4404 set_desired_thread prototype change.
4405 * target.c (set_desired_thread): Remove 'use_general' parameter
4406 and adjust.
4407 * target.h (set_desired_thread): Remove 'use_general' parameter.
4408
4409 2017-09-20 Tom Tromey <tom@tromey.com>
4410
4411 * target.c (target_terminal::terminal_state): Define.
4412 (target_terminal::init): Rename from target_terminal_init.
4413 (target_terminal::inferior): Rename from
4414 target_terminal_inferior.
4415 (target_terminal::ours): Rename from target_terminal_ours.
4416 (target_terminal::ours_for_output, target_terminal::info): New.
4417
4418 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4419
4420 * server.c (accumulate_file_name_length): Remove.
4421 (emit_dll_description): Adjust to std::string change.
4422 (handle_qxfer_libraries): Use std::string to hold document.
4423
4424 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4425
4426 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
4427 return type of xml_escape_text.
4428 * server.c (emit_dll_description): Likewise.
4429
4430 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4431
4432 * server.c (captured_main): Accept argument for --selftest.
4433 Update run_tests call.
4434 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
4435 when registering selftests.
4436
4437 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
4438
4439 * regcache.c (get_thread_regcache): Update code to use "std::vector"
4440 instead of "VEC" for "target_desc.reg_defs".
4441 (regcache_cpy): Likewise.
4442 (registers_to_string): Likewise.
4443 (registers_from_string): Likewise.
4444 (find_regno): Likewise.
4445 (supply_regblock): Likewise.
4446 (regcache_raw_read_unsigned): Likewise.
4447 * tdesc.c (init_target_desc): Likewise.
4448 (tdesc_create_reg): Likewise.
4449 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
4450 (struct target_desc) <reg_defs>: Convert to "std::vector".
4451 (target_desc): Do not initialize "reg_defs".
4452 (~target_desc): Update code to use "std::vector" instead of "VEC"
4453 for "target_desc.reg_defs".
4454 (operator==): Likewise.
4455
4456 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4457
4458 * inferiors.h (thread_to_gdb_id): Remove.
4459 * inferiors.c (thread_to_gdb_id): Remove.
4460 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
4461 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
4462 lynx_store_registers, lynx_read_memory, lynx_write_memory):
4463 Likewise.
4464 * nto-low.c (nto_fetch_registers, nto_store_registers,
4465 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
4466
4467 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4468
4469 * inferiors.h (gdb_id_to_thread_id): Remove.
4470 * inferiors.c (gdb_id_to_thread_id): Remove.
4471 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
4472 removal. Move pid declaration closer to where it's used.
4473
4474 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4475
4476 * server.c (handle_detach): New function.
4477 (process_serial_event): Move code out, call handle_detach.
4478
4479 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4480
4481 * server.c (require_running): Rename to ...
4482 (require_running_or_return): ... this ...
4483 (require_running_or_break): ... and this.
4484 (handle_query, process_serial_event): Adjust.
4485
4486 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4487
4488 * linux-low.c (linux_set_resume_request): Remove unused
4489 variables.
4490
4491 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4492
4493 * server.c (first_thread_of): Remove.
4494 (process_serial_event): Replace usage of first_thread_of with
4495 find_any_thread_of_pid.
4496 * tracepoint.c (same_process_p): Remove.
4497 (gdb_agent_about_to_close): Replace usage of same_process_p with
4498 find_any_thread_of_pid.
4499 * linux-x86-low.c (same_process_callback): Remove.
4500 (x86_arch_setup_process_callback): Replace usage of
4501 same_process_callback with find_any_thread_of_pid.
4502 * thread-db.c (any_thread_of): Remove.
4503 (switch_to_process): Replace usage of any_thread_of with
4504 find_any_thread_of_pid.
4505 * inferiors.c (thread_pid_matches_callback): Remove.
4506 (find_thread_process): Adjust to use find_any_thread_of_pid.
4507
4508 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
4509
4510 * regcache.c (get_thread_regcache): Guard calls to "memset"
4511 with "!VEC_empty".
4512
4513 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
4514
4515 * linux-low.c (handle_extended_wait): Use
4516 "allocate_target_description" instead of "XNEW".
4517 * linux-x86-low.c (initialize_low_arch): Likewise.
4518
4519 2017-09-05 Yao Qi <yao.qi@linaro.org>
4520
4521 * configure.srv (srv_i386_regobj): Remove.
4522 (srv_amd64_regobj): Remove.
4523 (srv_regobj): Set it to "" for x86 non-linux targets.
4524 * linux-x86-tdesc.c (i386_linux_read_description):
4525 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
4526 (init_registers_i386): Remove the declaration.
4527 (tdesc_i386): Remove the declaration.
4528 (lynx_i386_arch_setup): Call i386_create_target_description.
4529 * nto-x86-low.c: Likewise.
4530 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
4531 [!__x86_64__]: include arch/i386.h.
4532 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
4533
4534 2017-09-05 Yao Qi <yao.qi@linaro.org>
4535
4536 * configure.srv (srv_amd64_linux_xmlfiles): Remove
4537 i386/amd64-XXX-linux from it.
4538
4539 2017-09-05 Yao Qi <yao.qi@linaro.org>
4540
4541 * configure.srv: Empty srv_amd64_linux_regobj if $development is
4542 false.
4543 (ipa_amd64_linux_regobj): Remove.
4544 (ipa_x32_linux_regobj): Remove.
4545
4546 2017-09-05 Yao Qi <yao.qi@linaro.org>
4547
4548 * Makefile.in (arch-amd64.o): New rule.
4549 * configure.srv: Append arch-amd64.o.
4550 * linux-amd64-ipa.c: Include common/x86-xstate.h.
4551 (get_ipa_tdesc): Call amd64_linux_read_description.
4552 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
4553 and init_registers_amd64_XXX.
4554 * linux-x86-low.c (x86_linux_read_description): Call
4555 amd64_linux_read_description.
4556 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
4557 (initialize_low_arch): Don't call init_registers_x32_XXX and
4558 init_registers_amd64_XXX.
4559 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
4560 and tdesc_amd64_XXX.
4561 [__x86_64__] (amd64_tdesc_test): New function.
4562 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
4563 and init_registers_amd64_XXX.
4564 * linux-x86-tdesc.c: Include arch/amd64.h.
4565 (xcr0_to_tdesc_idx): New function.
4566 (i386_linux_read_description): New function.
4567 (amd64_get_ipa_tdesc_idx): New function.
4568 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
4569 (amd64_get_ipa_tdesc): Declare.
4570
4571 2017-09-05 Yao Qi <yao.qi@linaro.org>
4572
4573 * configure.srv (srv_i386_linux_xmlfiles): Remove
4574 i386/i386-XXX-linux.xml from it.
4575
4576 2017-09-05 Yao Qi <yao.qi@linaro.org>
4577
4578 * configure.srv: Set srv_i386_linux_regobj empty if $development
4579 is false.
4580 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
4581 initialize_low_tdesc.
4582 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
4583 with #if initialize_low_tdesc.
4584 * linux-x86-tdesc-selftest.c: New file.
4585 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
4586
4587 2017-09-05 Yao Qi <yao.qi@linaro.org>
4588
4589 * Makefile.in (arch-i386.o): New rule.
4590 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
4591 (x86_64-*-linux*): Likewise.
4592 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
4593 include arch/i386.h.
4594 (i386_linux_read_description): Remove code and call
4595 i386_create_target_description.
4596 * tdesc.c (allocate_target_description): New function.
4597 * tdesc.h (set_tdesc_architecture): Remove declaration.
4598 (set_tdesc_osabi): Likewise.
4599
4600 2017-09-05 Yao Qi <yao.qi@linaro.org>
4601
4602 * linux-x86-tdesc.c: Don't include <inttypes.h>.
4603 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
4604 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
4605 .xmltarget.
4606 * server.c (get_features_xml): Call tdesc_get_features_xml.
4607 * tdesc.c (set_tdesc_architecture): New function.
4608 (set_tdesc_osabi): New function.
4609 (tdesc_get_features_xml): New function.
4610 (tdesc_create_feature): Add an argument.
4611 * tdesc.h (struct target_desc) <features>: New field.
4612 <arch, osabi>: New field.
4613 (~target_desc): xfree features, arch, and osabi.
4614 (target_desc::oerator==): Don't compare .xmltarget.
4615 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
4616 (set_tdesc_osabi): Likewise.
4617 (tdesc_get_features_xml): Likewise.
4618
4619 2017-09-05 Yao Qi <yao.qi@linaro.org>
4620
4621 * linux-x86-tdesc.c: Include selftest.h.
4622 (i386_tdesc_test): New function.
4623 (initialize_low_tdesc): Call selftests::register_test.
4624 * tdesc.h: Include regdef.h.
4625 (target_desc): Override operator == and !=.
4626
4627 2017-09-05 Yao Qi <yao.qi@linaro.org>
4628
4629 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
4630 (ipa_obj): Likewise.
4631 * linux-i386-ipa.c: Include common/x86-xstate.h
4632 (get_ipa_tdesc): Call i386_linux_read_description.
4633 (initialize_low_tracepoint): Don't call init_registers_XXX
4634 functions, call initialize_low_tdesc instead.
4635 * linux-x86-low.c (x86_linux_read_description): Call
4636 i386_linux_read_description.
4637 (initialize_low_arch): Don't call init_registers_i386_XXX
4638 functions, call initialize_low_tdesc.
4639 * linux-x86-tdesc.c: New file.
4640 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
4641 (i386_get_ipa_tdesc_idx): Declare.
4642 (i386_get_ipa_tdesc): Declare.
4643 (initialize_low_tdesc): Declare.
4644
4645 2017-09-05 Yao Qi <yao.qi@linaro.org>
4646
4647 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
4648 instead of 0.
4649
4650 2017-09-05 Yao Qi <yao.qi@linaro.org>
4651
4652 * Makefile.in (IPA_OBJS): Add vec-ipa.o
4653 * regcache.c (get_thread_regcache): Use VEC_length.
4654 (init_register_cache): Likewise.
4655 (regcache_cpy): Likewise.
4656 (registers_to_string): Iterate reg_defs via VEC_iterate.
4657 (find_regno): Likewise.
4658 (find_register_by_number): Use VEC_index.
4659 (register_size): Call find_register_by_number.
4660 (register_data): Call find_register_by_number.
4661 (supply_regblock): Use VEC_length.
4662 (regcache_raw_read_unsigned): Likewise.
4663 * tdesc.c (init_target_desc): Iterate reg_defs via
4664 VEC_iterate.
4665 (default_description): Update initializer.
4666 (copy_target_description): Don't update field num_registers.
4667 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
4668 <num_registers>: Remove.
4669
4670 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
4671
4672 * Makefile.in (.SECONDARY): Define target.
4673
4674 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
4675
4676 * linux-low.c (linux_wait_1): Adjust.
4677 * server.c (queue_stop_reply_callback): Adjust.
4678
4679 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
4680
4681 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
4682 QEnvironmentUnset and QEnvironmentReset packets.
4683 (handle_query): Inform remote that QEnvironmentHexEncoded,
4684 QEnvironmentUnset and QEnvironmentReset are supported.
4685
4686 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
4687
4688 * inferiors.h (inferior_target_data): Rename to ...
4689 (thread_target_data): ... this.
4690 (inferior_regcache_data): Rename to ...
4691 (thread_regcache_data): ... this.
4692 (set_inferior_regcache_data): Rename to ...
4693 (set_thread_regcache_data): ... this.
4694 * inferiors.c (inferior_target_data): Rename to ...
4695 (thread_target_data): ... this.
4696 (inferior_regcache_data): Rename to ...
4697 (thread_regcache_data): ... this.
4698 (set_inferior_regcache_data): Rename to ...
4699 (set_thread_regcache_data): ... this.
4700 (free_one_thread): Update.
4701 * linux-low.h (get_thread_lwp): Update.
4702 * regcache.c (get_thread_regcache): Update.
4703 (regcache_invalidate_thread): Update.
4704 (free_register_cache_thread): Update.
4705 * win32-i386-low.c (update_debug_registers_callback): Update.
4706 (win32_get_current_dr): Update.
4707 * win32-low.c (thread_rec): Update.
4708 (delete_thread_info): Update.
4709 (continue_one_thread): Update.
4710 (suspend_one_thread): Update.
4711
4712 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
4713
4714 * inferiors.c (set_inferior_target_data): Remove.
4715 * inferiors.h (set_inferior_target_data): Remove.
4716
4717 2017-08-18 Yao Qi <yao.qi@linaro.org>
4718
4719 * Makefile.in (OBS): Add selftest.o.
4720 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
4721 * configure, config.in: Re-generated.
4722 * server.c: Include common/sefltest.h.
4723 (captured_main): Handle option --selftest.
4724
4725 2017-08-09 Yao Qi <yao.qi@linaro.org>
4726
4727 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
4728 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
4729 i386-avx-mpx.o and i386-mmx.o.
4730 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
4731 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
4732 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
4733 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
4734 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
4735 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
4736 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
4737 i386/amd64-avx-mpx.xml.
4738
4739 2017-08-09 Yao Qi <yao.qi@linaro.org>
4740
4741 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
4742 and x32-avx-avx512.o.
4743 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
4744 i386/x32-avx-avx512.xml.
4745
4746 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
4747
4748 * tracepoint.h (enum class fast_tpoint_collect_result): New
4749 enumeration.
4750 (fast_tracepoint_collecting): Change return type to
4751 fast_tpoint_collect_result.
4752 * tracepoint.c (fast_tracepoint_collecting): Likewise.
4753 * linux-low.h: Include tracepoint.h.
4754 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
4755 fast_tpoint_collect_result.
4756 * linux-low.c (handle_tracepoints): Adjust.
4757 (linux_fast_tracepoint_collecting): Change return type to
4758 fast_tpoint_collect_result.
4759 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
4760 linux_wait_1, stuck_in_jump_pad_callback,
4761 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
4762 proceed_one_lwp): Adjust to type change.
4763
4764 2017-07-10 Yao Qi <yao.qi@linaro.org>
4765
4766 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
4767
4768 2017-06-29 Yao Qi <yao.qi@linaro.org>
4769
4770 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
4771 Remove.
4772 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
4773
4774 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
4775
4776 * Makefile.in (IPA_OBJS): Sort and format one item per line.
4777
4778 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
4779
4780 * linux-low.c (linux_create_inferior): Adjust code to access the
4781 environment information via 'gdb_environ' class.
4782 * lynx-low.c (lynx_create_inferior): Likewise.
4783 * server.c (our_environ): Make it an instance of 'gdb_environ'.
4784 (get_environ): Return a pointer to 'our_environ'.
4785 (captured_main): Initialize 'our_environ'.
4786 * server.h (get_environ): Adjust prototype.
4787 * spu-low.c (spu_create_inferior): Adjust code to access the
4788 environment information via 'gdb_environ' class.
4789
4790 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4791
4792 * linux-low.c (linux_read_memory, linux_write_memory): Remove
4793 usage of "register" keyword.
4794
4795 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4796
4797 * configure: Re-generate.
4798
4799 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4800
4801 * configure: Re-generate.
4802
4803 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4804
4805 * Makefile.in (COMPILE.pre): Add "-x c++".
4806
4807 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
4808
4809 * fork-child.c: Conditionally include <signal.h>.
4810
4811 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4812
4813 * server.c (handle_general_set): Handle new packet
4814 "QStartupWithShell".
4815 (handle_query): Add "QStartupWithShell" to the list of supported
4816 packets.
4817 (gdbserver_usage): Add help text explaining the
4818 new "--startup-with-shell" and "--no-startup-with-shell" CLI
4819 options.
4820 (captured_main): Recognize and act upon the presence of the new
4821 CLI options.
4822
4823 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4824 Pedro Alves <palves@redhat.com>
4825
4826 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
4827 * configure: Regenerate.
4828 * configure.srv (srv_linux_obj): Add "fork-child.o" and
4829 "fork-inferior.o".
4830 (i[34567]86-*-lynxos*): Likewise.
4831 (spu*-*-*): Likewise.
4832 * fork-child.c: New file.
4833 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
4834 and "environ.h".
4835 (linux_ptrace_fun): New function.
4836 (linux_create_inferior): Adjust function prototype to reflect
4837 change on "target.h". Adjust function code to use
4838 "fork_inferior".
4839 (linux_request_interrupt): Delete "signal_pid".
4840 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
4841 (lynx_ptrace_fun): New function.
4842 (lynx_create_inferior): Adjust function prototype to reflect
4843 change on "target.h". Adjust function code to use
4844 "fork_inferior".
4845 * nto-low.c (nto_create_inferior): Adjust function prototype and
4846 code to reflect change on "target.h". Update comments.
4847 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
4848 "common-terminal.h" and "environ.h".
4849 (terminal_fd): Moved to fork-child.c.
4850 (old_foreground_pgrp): Likewise.
4851 (restore_old_foreground_pgrp): Likewise.
4852 (last_status): Make it global.
4853 (last_ptid): Likewise.
4854 (our_environ): New variable.
4855 (startup_with_shell): Likewise.
4856 (program_name): Likewise.
4857 (program_argv): Rename to...
4858 (program_args): ...this.
4859 (wrapper_argv): New variable.
4860 (start_inferior): Delete function.
4861 (get_exec_wrapper): New function.
4862 (get_exec_file): Likewise.
4863 (get_environ): Likewise.
4864 (prefork_hook): Likewise.
4865 (post_fork_inferior): Likewise.
4866 (postfork_hook): Likewise.
4867 (postfork_child_hook): Likewise.
4868 (handle_v_run): Update code to deal with arguments coming from the
4869 remote host. Update calls from "start_inferior" to
4870 "create_inferior".
4871 (captured_main): Likewise. Initialize environment variable. Call
4872 "have_job_control".
4873 * server.h (post_fork_inferior): New prototype.
4874 (get_environ): Likewise.
4875 (last_status): Declare.
4876 (last_ptid): Likewise.
4877 (signal_pid): Likewise.
4878 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
4879 (spu_ptrace_fun): New function.
4880 (spu_create_inferior): Adjust function prototype to reflect change
4881 on "target.h". Adjust function code to use "fork_inferior".
4882 * target.c (target_terminal_init): New function.
4883 (target_terminal_inferior): Likewise.
4884 (target_terminal_ours): Likewise.
4885 * target.h: Include <vector>.
4886 (struct target_ops) <create_inferior>: Update prototype.
4887 (create_inferior): Update macro.
4888 * utils.c (gdb_flush_out_err): New function.
4889 * win32-low.c (win32_create_inferior): Adjust function prototype
4890 and code to reflect change on "target.h".
4891
4892 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4893
4894 * inferiors.c (switch_to_thread): New function.
4895
4896 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4897
4898 * Makefile.in (SFILE): Add "common/job-control.c".
4899 (OBS): Add "job-control.o".
4900
4901 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
4902
4903 * Makefile: Remove "@host_makefile_frag@".
4904
4905 2017-05-05 Pedro Alves <palves@redhat.com>
4906
4907 * configure: Regenerate.
4908
4909 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
4910
4911 * configure: Regenerate.
4912
4913 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
4914
4915 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
4916 software_single_step change of return type to
4917 std::vector<CORE_ADDR>.
4918 * linux-low.c (install_software_single_step_breakpoints):
4919 Likewise.
4920 * linux-low.h (install_software_single_step_breakpoints):
4921 Likewise.
4922
4923 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
4924
4925 * remote-utils.c: Include "gdb_termios.h" instead of
4926 "terminal.h".
4927 * terminal.h: Delete file.
4928
4929 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
4930
4931 * server.c: Include <vector>.
4932 <program_argv, wrapper_argv>: Convert to std::vector.
4933 (start_inferior): Rewrite function to use C++.
4934 (handle_v_run): Likewise. Update code that calculates the argv
4935 based on the vRun packet; use C++.
4936 (captured_main): Likewise.
4937
4938 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
4939
4940 * server.c (handle_v_cont): Initialize thread_resume::thread
4941 with null_ptid.
4942
4943 2017-04-05 Pedro Alves <palves@redhat.com>
4944
4945 * configure: Regenerate.
4946
4947 2017-04-05 Pedro Alves <palves@redhat.com>
4948
4949 * gdbreplay.c (sync_error): Constify.
4950 * linux-x86-low.c (push_opcode): Constify.
4951
4952 2017-04-05 Pedro Alves <palves@redhat.com>
4953
4954 * win32-low.c (get_child_debug_event)
4955 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
4956 Report TARGET_WAITKIND_SPURIOUS instead.
4957
4958 2017-04-05 Pedro Alves <palves@redhat.com>
4959
4960 * remote-utils.c (remote_prepare, remote_open): Constify.
4961 * remote-utils.h (remote_prepare, remote_open): Constify.
4962 * server.c (captured_main): Constify 'port' handling.
4963
4964 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
4965
4966 * Makefile.in (clean): Clear .deps.
4967
4968 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
4969
4970 * .gitignore: Remove generated files, replace with wildcard.
4971 * (clean): Replace removal of generated files with wildcard.
4972 (version.c): Replace with...
4973 (version-generated.c): ...this.
4974 (xml-builtin.c): Replace with...
4975 (xml-builtin-generated.c): ...this.
4976 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
4977 (%.c: *regformats*): Replace with...
4978 (%-generated.c: *regformats*): ...this.
4979
4980 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
4981
4982 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
4983 (xtensa_fill_gregset): Call collect_register_by_name for
4984 threadptr register.
4985 (xtensa_store_gregset): Call supply_register_by_name for
4986 threadptr register.
4987
4988 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
4989
4990 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
4991 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
4992 (xtensa_store_gregset): Call supply_register for all registers in
4993 a0_regnum..a0_regnum + C0_NREGS range.
4994
4995 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4996
4997 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
4998 (ax-ipa.o: ax.c): Remove.
4999 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
5000 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
5001 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
5002 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
5003 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
5004
5005 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
5006
5007 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
5008 (print-utils-ipa.o: ../common/print-utils.c): Remove.
5009 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
5010 (errors-ipa.o: ../common/errors.c): Remove.
5011 (format-ipa.o: ../common/format.c): Remove.
5012 (common-utils-ipa.o: ../common/common-utils.c): Remove.
5013
5014 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
5015
5016 * Makefile.in (%-ipa.o: %.c): New rule.
5017 (tracepoint-ipa.o: tracepoint.c): Remove.
5018 (utils-ipa.o: utils.c): Remove.
5019 (remote-utils-ipa.o: remote-utils.c): Remove.
5020 (regcache-ipa.o: regcache.c): Remove.
5021 (i386-linux-ipa.o: i386-linux.c): Remove.
5022 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
5023 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
5024 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
5025 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
5026 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
5027 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
5028 (amd64-linux-ipa.o: amd64-linux.c): Remove.
5029 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
5030 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
5031 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
5032 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
5033 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
5034 (aarch64-ipa.o: aarch64.c): Remove.
5035 (s390-linux32-ipa.o: s390-linux32.c): Remove.
5036 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
5037 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
5038 (s390-linux64-ipa.o: s390-linux64.c): Remove.
5039 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
5040 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
5041 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
5042 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
5043 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
5044 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
5045 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
5046 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
5047 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
5048 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
5049 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
5050 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
5051 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
5052 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
5053 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
5054 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
5055 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
5056 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
5057 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
5058 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
5059 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
5060 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
5061 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
5062 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
5063 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
5064 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
5065 (tdesc-ipa.o: tdesc.c): Remove.
5066 (x32-linux-ipa.o: x32-linux.c): Remove.
5067 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
5068 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
5069
5070 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
5071
5072 * Makefile.in (%.o: ../arch/%.c): New rule.
5073 (arm.o: ../arch/arm.c): Remove.
5074 (arm-linux.o: ../arch/arm-linux.c): Remove.
5075 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
5076 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
5077
5078 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
5079
5080 * Makefile.in (%.o: ../nat/%.c): New rule.
5081 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
5082 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
5083 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
5084 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
5085 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
5086 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
5087 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
5088 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
5089 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
5090 (linux-personality.o: ../nat/linux-personality.c): Remove.
5091 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
5092 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
5093 (x86-linux.o: ../nat/x86-linux.c): Remove.
5094 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
5095 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
5096
5097 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
5098
5099 * Makefile.in (%.o: ../common/%.c): New rule.
5100 (signals.o: ../common/signals.c): Remove.
5101 (print-utils.o: ../common/print-utils.c): Remove.
5102 (rsp-low.o: ../common/rsp-low.c): Remove.
5103 (common-utils.o: ../common/common-utils.c): Remove.
5104 (posix-strerror.o: ../common/posix-strerror.c): Remove.
5105 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
5106 (vec.o: ../common/vec.c): Remove.
5107 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
5108 (xml-utils.o: ../common/xml-utils.c): Remove.
5109 (ptid.o: ../common/ptid.c): Remove.
5110 (buffer.o: ../common/buffer.c): Remove.
5111 (format.o: ../common/format.c): Remove.
5112 (filestuff.o: ../common/filestuff.c): Remove.
5113 (agent.o: ../common/agent.c): Remove.
5114 (errors.o: ../common/errors.c): Remove.
5115 (environ.o: ../common/environ.c): Remove.
5116 (common-debug.o: ../common/common-debug.c): Remove.
5117 (cleanups.o: ../common/cleanups.c): Remove.
5118 (common-exceptions.o: ../common/common-exceptions.c): Remove.
5119 (fileio.o: ../common/fileio.c): Remove.
5120 (common-regcache.o: ../common/common-regcache.c): Remove.
5121 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
5122 (new-op.o: ../common/new-op.c): Remove.
5123 (btrace-common.o: ../common/btrace-common.c): Remove.
5124
5125 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
5126
5127 * Makefile.in (%.o: ../target/%.c): New rule.
5128 (waitstatus.o: ../target/waitstatus.c): Remove.
5129
5130 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
5131
5132 * Makefile.in
5133 (%.c: ../regformats/%.dat,
5134 (%.c: ../regformats/arm/%.dat,
5135 (%.c: ../regformats/i386/%.dat,
5136 (%.c: ../regformats/rs6000/%.dat): New rules.
5137 (aarch64.c): Remove.
5138 (reg-arm.c): Remove.
5139 (arm-with-iwmmxt.c): Remove.
5140 (arm-with-vfpv2.c): Remove.
5141 (arm-with-vfpv3.c): Remove.
5142 (arm-with-neon.c): Remove.
5143 (reg-bfin.c): Remove.
5144 (reg-cris.c): Remove.
5145 (reg-crisv32.c): Remove.
5146 (i386.c): Remove.
5147 (i386-linux.c): Remove.
5148 (i386-avx.c): Remove.
5149 (i386-avx-linux.c): Remove.
5150 (i386-avx-avx512.c): Remove.
5151 (i386-avx-avx512-linux.c): Remove.
5152 (i386-mpx.c): Remove.
5153 (i386-mpx-linux.c): Remove.
5154 (i386-avx-mpx-avx512-pku.c): Remove.
5155 (i386-avx-mpx-avx512-pku-linux.c): Remove.
5156 (i386-avx-mpx.c): Remove.
5157 (i386-avx-mpx-linux.c): Remove.
5158 (i386-mmx.c): Remove.
5159 (i386-mmx-linux.c): Remove.
5160 (reg-ia64.c): Remove.
5161 (reg-m32r.c): Remove.
5162 (reg-m68k.c): Remove.
5163 (reg-cf.c): Remove.
5164 (mips-linux.c): Remove.
5165 (mips-dsp-linux.c): Remove.
5166 (mips64-linux.c): Remove.
5167 (mips64-dsp-linux.c): Remove.
5168 (nios2-linux.c): Remove.
5169 (powerpc-32.c): Remove.
5170 (powerpc-32l.c): Remove.
5171 (powerpc-altivec32l.c): Remove.
5172 (powerpc-cell32l.c): Remove.
5173 (powerpc-vsx32l.c): Remove.
5174 (powerpc-isa205-32l.c): Remove.
5175 (powerpc-isa205-altivec32l.c): Remove.
5176 (powerpc-isa205-vsx32l.c): Remove.
5177 (powerpc-e500l.c): Remove.
5178 (powerpc-64l.c): Remove.
5179 (powerpc-altivec64l.c): Remove.
5180 (powerpc-cell64l.c): Remove.
5181 (powerpc-vsx64l.c): Remove.
5182 (powerpc-isa205-64l.c): Remove.
5183 (powerpc-isa205-altivec64l.c): Remove.
5184 (powerpc-isa205-vsx64l.c): Remove.
5185 (s390-linux32.c): Remove.
5186 (s390-linux32v1.c): Remove.
5187 (s390-linux32v2.c): Remove.
5188 (s390-linux64.c): Remove.
5189 (s390-linux64v1.c): Remove.
5190 (s390-linux64v2.c): Remove.
5191 (s390-te-linux64.c): Remove.
5192 (s390-vx-linux64.c): Remove.
5193 (s390-tevx-linux64.c): Remove.
5194 (s390x-linux64.c): Remove.
5195 (s390x-linux64v1.c): Remove.
5196 (s390x-linux64v2.c): Remove.
5197 (s390x-te-linux64.c): Remove.
5198 (s390x-vx-linux64.c): Remove.
5199 (s390x-tevx-linux64.c): Remove.
5200 (tic6x-c64xp-linux.c): Remove.
5201 (tic6x-c64x-linux.c): Remove.
5202 (tic6x-c62x-linux.c): Remove.
5203 (reg-sh.c): Remove.
5204 (reg-sparc64.c): Remove.
5205 (reg-spu.c): Remove.
5206 (amd64.c): Remove.
5207 (amd64-linux.c): Remove.
5208 (amd64-avx.c): Remove.
5209 (amd64-avx-linux.c): Remove.
5210 (amd64-avx-avx512.c): Remove.
5211 (amd64-avx-avx512-linux.c): Remove.
5212 (amd64-mpx.c): Remove.
5213 (amd64-mpx-linux.c): Remove.
5214 (amd64-avx-mpx-avx512-pku.c): Remove.
5215 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
5216 (amd64-avx-mpx.c): Remove.
5217 (amd64-avx-mpx-linux.c): Remove.
5218 (x32.c): Remove.
5219 (x32-linux.c): Remove.
5220 (x32-avx.c): Remove.
5221 (x32-avx-linux.c): Remove.
5222 (x32-avx-avx512.c): Remove.
5223 (x32-avx-avx512-linux.c): Remove.
5224 (reg-xtensa.c): Remove.
5225 (reg-tilegx.c): Remove.
5226 (reg-tilegx32.c): Remove.
5227
5228 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
5229
5230 * Makefile.in (SFILES): Add "common/environ.c".
5231 (OBJS): Add "common/environ.h".
5232
5233 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
5234
5235 * configure.ac: Check if the fs_base and gs_base members of
5236 `struct user_regs_struct' exist.
5237 * config.in: Regenerated.
5238 * configure: Likewise.
5239
5240 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
5241
5242 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
5243 target_read_memory.
5244 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
5245 (get_next_pcs_syscall_next_pc): Likewise.
5246
5247 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
5248
5249 * win32-i386-low.c: Fix incorrect reference to a couple source files.
5250 * nto-x86-low.c: Likewise.
5251
5252 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
5253
5254 * Makefile.in: Include disable-implicit-rules.mk.
5255
5256 2016-11-23 Pedro Alves <palves@redhat.com>
5257
5258 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
5259 (debug_vprintf): Use std::chrono::steady_clock instead of
5260 gettimeofday. Use '.' instead of ':'.
5261 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
5262 (get_timestamp): Use std::chrono::steady_clock instead of
5263 gettimeofday.
5264
5265 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
5266
5267 * Makefile.in: Fix whitespace formatting.
5268
5269 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
5270
5271 * Makefile.in (SFILES, OBS): Flatten list and order
5272 alphabetically.
5273
5274 2016-11-23 Pedro Alves <palves@redhat.com>
5275
5276 * event-loop.c (handle_file_event): Use warning.
5277 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
5278 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5279 Use warning.
5280
5281 2016-11-23 Pedro Alves <palves@redhat.com>
5282
5283 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
5284 output.
5285 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
5286 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
5287 debug_printf and debug_flush for debug output.
5288 * server.c (handle_general_set): Likewise.
5289 * thread-db.c (try_thread_db_load): Use debug_printf for debug
5290 output.
5291
5292 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
5293
5294 * Makefile.in (.c.o): Replace rule with ...
5295 (%.o: %.c): ... this one.
5296
5297 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
5298
5299 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
5300 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
5301 make.
5302 * configure.ac: Remove checks for the make program.
5303 * configure: Re-generate.
5304
5305 2016-10-28 Pedro Alves <palves@redhat.com>
5306
5307 * Makefile.in (CXX_DIALECT): Get from configure.
5308 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
5309 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
5310 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
5311 * config.in: Regenerate.
5312 * configure: Regenerate.
5313
5314 2016-10-27 Yao Qi <yao.qi@linaro.org>
5315
5316 * linux-low.c (linux_supports_range_stepping): Return true if
5317 can_software_single_step return true.
5318
5319 2016-10-27 Yao Qi <yao.qi@linaro.org>
5320
5321 * inferiors.c (find_inferior_in_random): New function.
5322 * inferiors.h (find_inferior_in_random): Declare.
5323 * linux-low.c (linux_wait_for_event_filtered): Call
5324 find_inferior_in_random instead of find_inferior.
5325
5326 2016-10-27 Yao Qi <yao.qi@linaro.org>
5327
5328 * linux-low.c (linux_wait_1): If single-step breakpoints are
5329 inserted, remove them.
5330
5331 2016-10-26 Pedro Alves <palves@redhat.com>
5332
5333 * linux-low.c (handle_extended_wait): Link parent/child fork
5334 threads.
5335 (linux_wait_1): Unlink them.
5336 (linux_set_resume_request): Ignore resume requests for
5337 already-resumed and unhandled fork child threads.
5338 * linux-low.h (struct lwp_info) <fork_relative>: New field.
5339 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
5340 New functions.
5341 (handle_v_requests) <vCont>: Don't call require_running.
5342 * server.h (in_queued_stop_replies): New declaration.
5343
5344 2016-10-24 Yao Qi <yao.qi@linaro.org>
5345
5346 PR server/20733
5347 * linux-aarch64-low.c (append_insns): Cast the return value to
5348 'uint32_t *'.
5349
5350 2016-10-10 Yao Qi <yao.qi@linaro.org>
5351
5352 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
5353
5354 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
5355
5356 * target.c (target_supports_multi_process): New function, moved
5357 from...
5358 * target.h (target_supports_multi_process): ... here. Remove
5359 macro.
5360
5361 2016-10-05 Tom Tromey <tom@tromey.com>
5362
5363 PR remote/20655:
5364 * tracepoint.c (handle_tracepoint_bkpts): Check
5365 ipa_error_tracepoint, not ipa_stopping_tracepoint.
5366
5367 2016-10-05 Yao Qi <yao.qi@linaro.org>
5368
5369 * configure.srv: Update the path of arm-*.xml files.
5370
5371 2016-10-05 Terry Guo <terry.guo@arm.com>
5372 Yao Qi <yao.qi@linaro.org>
5373
5374 * Makefile.in: Adjust the path of rules.
5375 * configure.srv: Update the path of xml files.
5376 * regformats/arm-with-iwmmxt.dat: Regenerated.
5377 * regformats/arm-with-neon.dat: Likewise.
5378 * regformats/arm-with-vfpv2.dat: Likewise.
5379 * regformats/arm-with-vfpv3.dat Likewise.
5380
5381 2016-09-30 Yao Qi <yao.qi@linaro.org>
5382
5383 PR gdbserver/20627
5384 * target.c (target_stop_and_wait): Don't call
5385 target_continue_no_signal, use resume_stop instead.
5386
5387 2016-09-26 Yao Qi <yao.qi@linaro.org>
5388
5389 * linux-low.c (linux_wait_1): Call debug_exit.
5390
5391 2016-09-23 Pedro Alves <palves@redhat.com>
5392
5393 * Makefile.in (SFILES): Add common/new-op.c.
5394 (OBS): Add common/new-op.o.
5395 (new-op.o): New rule.
5396
5397 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
5398
5399 * .gitinore: Ignore more files.
5400
5401 2016-09-21 Yao Qi <yao.qi@linaro.org>
5402
5403 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
5404 23.
5405
5406 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
5407
5408 * server.c (start_inferior): Call target_mourn_inferior instead of
5409 mourn_inferior; pass ptid_t argument to it.
5410 (resume): Likewise.
5411 (handle_target_event): Likewise.
5412 * target.c (target_mourn_inferior): New function.
5413 * target.h (mourn_inferior): Delete macro.
5414
5415 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
5416
5417 * linux-low.c (lwp_is_stepping): New function.
5418
5419 2016-09-06 Carl Love <cel@us.ibm.com>
5420
5421 * server.c (start_inferior): Fixed comment, requested comment change
5422 didn't get updated correctly. Removed reference to ptrace () call as
5423 it is only true on Linux systems.
5424
5425 2016-09-06 Carl Love <cel@us.ibm.com>
5426
5427 * server.c (start_inferior): Do not call
5428 function target_post_create_inferior () if the
5429 inferior process has already exited.
5430
5431 2016-09-05 Pedro Alves <palves@redhat.com>
5432
5433 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
5434 (COMPILE.pre, CC_LD): Use CXX directly.
5435 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
5436 * acinclude.m4: Don't include build-with-cxx.m4.
5437 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
5438 * configure: Regenerate.
5439
5440 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
5441
5442 PR gdb/19495
5443 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
5444 call writing data to own_buf.
5445
5446 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
5447
5448 * target.c (mywait): Call target_wait instead of
5449 the_target->wait.
5450 (target_wait): New function.
5451
5452 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
5453
5454 * server.c (start_inferior): New variable 'ptid'. Replace calls
5455 to the_target->resume by target_continue{,_no_signal}, depending
5456 on the case.
5457 * target.c (target_stop_and_wait): Call target_continue_no_signal
5458 instead of the_target->resume.
5459 (target_continue): New function.
5460
5461 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
5462
5463 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
5464
5465 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
5466
5467 PR server/20491
5468 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
5469 ps_prochandle.
5470 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
5471 * linux-arm-low.c (ps_get_thread_area): Likewise.
5472 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
5473 * linux-m68k-low.c (ps_get_thread_area): Likewise.
5474 * linux-mips-low.c (ps_get_thread_area): Likewise.
5475 * linux-nios2-low.c (ps_get_thread_area): Likewise.
5476 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
5477 * linux-x86-low.c (ps_get_thread_area): Likewise.
5478 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
5479
5480 2016-08-19 Pedro Alves <palves@redhat.com>
5481
5482 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
5483
5484 2016-08-19 Pedro Alves <palves@redhat.com>
5485
5486 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
5487 comment. Use memcpy instead of casting through unsigned long.
5488
5489 2016-08-19 Pedro Alves <palves@redhat.com>
5490
5491 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
5492 allocating around 0x80000000.
5493
5494 2016-08-19 Pedro Alves <palves@redhat.com>
5495
5496 PR gdb/20415
5497 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
5498 (x32-avx512-linux-ipa.o): New rules.
5499 * configure.ac (x86_64-*-linux*): New x32 check.
5500 * configure.srv (ipa_x32_linux_regobj): New.
5501 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
5502 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
5503 descriptions.
5504 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
5505 descriptions.
5506 * configure: Regenerate.
5507
5508 2016-08-09 Pedro Alves <palves@redhat.com>
5509
5510 PR gdb/18653
5511 * Makefile.in (OBS): Add signals-state-save-restore.o.
5512 (signals-state-save-restore.o): New rule.
5513 * config.in: Regenerate.
5514 * configure: Regenerate.
5515 * linux-low.c: Include "signals-state-save-restore.h".
5516 (linux_create_inferior): Call
5517 restore_original_signals_state.
5518 * server.c: Include "dispositions-save-restore.h".
5519 (captured_main): Call save_original_signals_state.
5520
5521 2016-08-05 Pedro Alves <palves@redhat.com>
5522
5523 * configure: Regenerate.
5524
5525 2016-08-04 Yao Qi <yao.qi@linaro.org>
5526
5527 * linux-low.c (regsets_fetch_inferior_registers): Check
5528 errno is ESRCH or not.
5529
5530 2016-08-02 Yao Qi <yao.qi@linaro.org>
5531
5532 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
5533 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
5534 (thread_db_load_search): Update.
5535 (try_thread_db_load_1): Don't look for td_ta_event_addr,
5536 td_ta_set_event and td_ta_event_getmsg.
5537
5538 2016-07-26 Pedro Alves <palves@redhat.com>
5539
5540 PR server/20414
5541 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
5542 of unsigned long for 64-bit registers and use uint32_t instead of
5543 unsigned int for 32-bit registers.
5544
5545 2016-07-26 Pedro Alves <palves@redhat.com>
5546
5547 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
5548 to 'ptrace'.
5549
5550 2016-07-21 Tom Tromey <tom@tromey.com>
5551
5552 * configure: Rebuild.
5553
5554 2016-07-21 Yao Qi <yao.qi@linaro.org>
5555
5556 * mem-break.c (find_gdb_breakpoint): Cast bp to
5557 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
5558
5559 2016-07-21 Yao Qi <yao.qi@linaro.org>
5560
5561 * server.c (handle_v_requests): Support s and S actions
5562 if target_supports_software_single_step return true.
5563
5564 2016-07-21 Yao Qi <yao.qi@linaro.org>
5565
5566 * linux-low.c (resume_stopped_resumed_lwps): If resume request
5567 is resume_step, call maybe_hw_step.
5568 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
5569 and unstop them.
5570 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
5571 breakpoints or not.
5572 (proceed_one_lwp): If resume request is resume_step, install
5573 reinsert breakpoints and call maybe_hw_step.
5574
5575 2016-07-21 Yao Qi <yao.qi@linaro.org>
5576
5577 * linux-low.c (proceed_one_lwp): Declare.
5578 (linux_resume_one_thread): Remove local variable 'step'.
5579 Lift code enqueue signal. Call proceed_one_lwp instead of
5580 linux_resume_one_lwp.
5581
5582 2016-07-21 Yao Qi <yao.qi@linaro.org>
5583
5584 * linux-low.c (linux_resume_one_thread): Call
5585 enqueue_pending_signal.
5586
5587 2016-07-21 Yao Qi <yao.qi@linaro.org>
5588
5589 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
5590 * inferiors.c (do_restore_current_thread_cleanup): New function.
5591 (make_cleanup_restore_current_thread): Likewise.
5592 * linux-low.c (install_software_single_step_breakpoints): Call
5593 make_cleanup_restore_current_thread. Switch current_thread to
5594 thread.
5595
5596 2016-07-21 Yao Qi <yao.qi@linaro.org>
5597
5598 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
5599 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
5600 (clone_one_breakpoint): Likewise.
5601 (delete_reinsert_breakpoints): Change parameter to thread.
5602 Callers updated.
5603 (has_reinsert_breakpoints): Likewise.
5604 (uninsert_reinsert_breakpoints): Likewise.
5605 (reinsert_reinsert_breakpoints): Likewise.
5606 * mem-break.h (set_reinsert_breakpoint): Update declaration.
5607 (delete_reinsert_breakpoints): Likewise.
5608 (reinsert_reinsert_breakpoints): Likewise.
5609 (uninsert_reinsert_breakpoints): Likewise.
5610 (has_reinsert_breakpoints): Likewise.
5611
5612 2016-07-21 Yao Qi <yao.qi@linaro.org>
5613
5614 * inferiors.c (get_thread_process): Make parameter const.
5615 * inferiors.h (get_thread_process): Update declaration.
5616 * mem-break.c (clone_all_breakpoints): Remove all parameters.
5617 Add new parameters child_thread and parent_thread. Callers
5618 updated.
5619 * mem-break.h (clone_all_breakpoints): Update declaration.
5620
5621 2016-07-21 Yao Qi <yao.qi@linaro.org>
5622
5623 * mem-break.c (struct breakpoint) <cond_list>: Remove.
5624 <command_list, handler>: Remove.
5625 (struct gdb_breakpoint): New.
5626 (struct other_breakpoint): New.
5627 (struct reinsert_breakpoint): New.
5628 (is_gdb_breakpoint): New function.
5629 (any_persistent_commands): Update command_list if
5630 is_gdb_breakpoint returns true.
5631 (set_breakpoint): Create breakpoints according to their types.
5632 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
5633 (set_gdb_breakpoint_1): Likewise.
5634 (set_gdb_breakpoint): Likewise.
5635 (clear_breakpoint_conditions): Change parameter type to
5636 'struct gdb_breakpoint *'.
5637 (clear_breakpoint_commands): Likewise.
5638 (clear_breakpoint_conditions_and_commands): Likewise.
5639 (add_condition_to_breakpoint): Likewise.
5640 (add_breakpoint_condition): Likewise.
5641 (add_commands_to_breakpoint): Likewise.
5642 (check_breakpoints): Check other_breakpoint.
5643 (clone_one_breakpoint): Clone breakpopint according to its type.
5644 * mem-break.h (struct gdb_breakpoint): Declare.
5645 (set_gdb_breakpoint): Update declaration.
5646 (clear_breakpoint_conditions_and_commands): Likewise.
5647 (add_breakpoint_condition): Likewise.
5648 (add_breakpoint_commands): Likewise.
5649 * server.c (process_point_options): Change parameter type to
5650 'struct gdb_breakpoint *'.
5651
5652 2016-07-21 Yao Qi <yao.qi@linaro.org>
5653
5654 * mem-break.c (set_breakpoint_at): Rename it to ...
5655 (set_breakpoint_type_at): ... it.
5656 (set_breakpoint_at): Call set_breakpoint_type_at.
5657 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
5658 * mem-break.h (set_breakpoint_at): Update comments.
5659
5660 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
5661
5662 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
5663 to buf parameter.
5664 (nios2_store_gregset): Likewise.
5665
5666 2016-07-01 Pedro Alves <palves@redhat.com>
5667 Antoine Tremblay <antoine.tremblay@ericsson.com>
5668
5669 * linux-low.c: Change interface to take the target lwp_info
5670 pointer directly and return void. Handle detaching from a zombie
5671 thread.
5672 (linux_detach_lwp_callback): New function.
5673 (linux_detach): Detach from the leader thread after detaching from
5674 the clone threads.
5675
5676 2016-06-28 Yao Qi <yao.qi@linaro.org>
5677
5678 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
5679 for variable new_offset.
5680 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5681 (aarch64_ftrace_insn_reloc_cb): Likewise.
5682 (aarch64_ftrace_insn_reloc_tb): Likewise.
5683 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
5684 PRIx64 instead of PRIx32.
5685
5686 2016-06-28 Yao Qi <yao.qi@linaro.org>
5687
5688 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
5689 (the_low_target): Install arm_get_syscall_trapinfo.
5690
5691 2016-06-28 Yao Qi <yao.qi@linaro.org>
5692
5693 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
5694 function.
5695 (the_low_target): Install aarch64_get_syscall_trapinfo.
5696
5697 2016-06-28 Yao Qi <yao.qi@linaro.org>
5698
5699 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
5700 Callers updated.
5701 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
5702 Remove parameter sysno.
5703 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
5704 sysret.
5705
5706 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5707
5708 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
5709 (s390_emit_ne_goto): Likewise.
5710 (s390_emit_lt_goto): Likewise.
5711 (s390_emit_le_goto): Likewise.
5712 (s390_emit_gt_goto): Likewise.
5713 (s390_emit_ge_goto): Likewise.
5714 (s390x_emit_eq_goto): Likewise.
5715 (s390x_emit_ne_goto): Likewise.
5716 (s390x_emit_lt_goto): Likewise.
5717 (s390x_emit_le_goto): Likewise.
5718 (s390x_emit_gt_goto): Likewise.
5719 (s390x_emit_ge_goto): Likewise.
5720 (s390_emit_ops_impl): Mark variable static.
5721 (s390x_emit_ops): Likewise.
5722
5723 2016-06-17 Yao Qi <yao.qi@linaro.org>
5724
5725 * linux-low.c (handle_extended_wait): Call
5726 uninsert_reinsert_breakpoints for the parent process. Remove
5727 reinsert breakpoints from the child process. Reinsert them to
5728 the parent process when vfork is done.
5729 * mem-break.c (uninsert_reinsert_breakpoints): New function.
5730 (reinsert_reinsert_breakpoints): New function.
5731 * mem-break.h (uninsert_reinsert_breakpoints): Declare
5732 (reinsert_reinsert_breakpoints): Declare.
5733
5734 2016-06-17 Yao Qi <yao.qi@linaro.org>
5735
5736 * linux-low.c (handle_extended_wait): If the parent is doing
5737 step-over, remove the reinsert breakpoints from the forked child.
5738
5739 2016-06-17 Yao Qi <yao.qi@linaro.org>
5740
5741 * linux-low.c (unsuspend_all_lwps): Declare.
5742 (linux_low_filter_event): If thread exited, call finish_step_over.
5743 If step-over is finished, unsuspend other threads.
5744
5745 2016-06-17 Yao Qi <yao.qi@linaro.org>
5746
5747 * linux-low.c (linux_resume_one_lwp_throw): Assert
5748 has_reinsert_breakpoints returns false.
5749 * mem-break.c (delete_disabled_breakpoints): Assert
5750 bp type isn't reinsert_breakpoint.
5751
5752 2016-06-17 Yao Qi <yao.qi@linaro.org>
5753
5754 * linux-low.c (maybe_hw_step): New function.
5755 (linux_resume_one_lwp_throw): Call maybe_hw_step.
5756 (finish_step_over): Switch current_thread to lwp temporarily,
5757 and assert has_reinsert_breakpoints returns true.
5758 (proceed_one_lwp): Call maybe_hw_step.
5759 * mem-break.c (has_reinsert_breakpoints): New function.
5760 * mem-break.h (has_reinsert_breakpoints): Declare.
5761
5762 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
5763
5764 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
5765
5766 2016-05-17 Yao Qi <yao.qi@linaro.org>
5767
5768 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
5769 instead of find_inferior.
5770
5771 2016-05-05 Yao Qi <yao.qi@linaro.org>
5772
5773 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
5774 Initialize res to zero.
5775
5776 2016-05-05 Yao Qi <yao.qi@linaro.org>
5777
5778 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
5779 to uint32_t.
5780
5781 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5782
5783 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
5784 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
5785 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
5786
5787 2016-04-28 Par Olsson <par.olsson@windriver.com>
5788 Simon Marchi <simon.marchi@ericsson.com>
5789
5790 * tracepoint.c (write_inferior_int8): New function.
5791 (cmd_qtenable_disable): Write enable flag using
5792 write_inferior_int8.
5793
5794 2016-04-25 Yao Qi <yao.qi@linaro.org>
5795
5796 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
5797 (need_step_over_p): Return zero if the LWP has pending signals
5798 can be delivered on software single step target.
5799
5800 2016-04-25 Yao Qi <yao.qi@linaro.org>
5801
5802 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
5803 return instead of error.
5804
5805 2016-04-22 Yao Qi <yao.qi@linaro.org>
5806
5807 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
5808 to 23.
5809
5810 2016-04-22 Yao Qi <yao.qi@linaro.org>
5811
5812 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
5813 signal when stepping over breakpoint with software single
5814 step.
5815
5816 2016-04-21 Pedro Alves <palves@redhat.com>
5817
5818 * linux-s390-low.c (s390_collect_ptrace_register)
5819 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
5820 add casts.
5821 (s390_check_regset): Use void * instead of gdb_byte *.
5822
5823 2016-04-20 Pedro Alves <palves@redhat.com>
5824
5825 * configure: Renegerate.
5826
5827 2016-04-20 Yao Qi <yao.qi@linaro.org>
5828
5829 * linux-aarch32-low.c: Include "arch/arm-linux.h".
5830 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
5831 number 16.
5832 (arm_store_gregset): Likewise.
5833
5834 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
5835
5836 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
5837 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
5838 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
5839 (amd64-avx-mpx-linux.c): New rules.
5840 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
5841 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
5842 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
5843 (srv_amd64_regobj): Add amd64-avx-mpx.o.
5844 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
5845 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
5846 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
5847 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
5848 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
5849 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
5850 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
5851 * linux-x86-low.c (x86_linux_read_description): Add case for
5852 X86_XSTATE_AVX_MPX_MASK.
5853 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
5854 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
5855 init_registers_i386_avx_mpx_linux.
5856 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
5857 (initialize_low_tracepoint): Call
5858 init_registers_i386_avx_mpx_linux.
5859 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
5860 (initialize_low_tracepoint): Call
5861 init_registers_amd64_avx_mpx_linux.
5862 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
5863 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
5864 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
5865 declarations.
5866
5867 2016-04-18 Pedro Alves <palves@redhat.com>
5868
5869 * configure: Regenerate.
5870
5871 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
5872
5873 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
5874 (aarch64_emit_sub): Likewise.
5875
5876 2016-04-12 Pedro Alves <palves@redhat.com>
5877
5878 * utils.c (prepare_to_throw_exception): Delete.
5879
5880 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
5881
5882 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
5883
5884 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
5885
5886 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
5887
5888 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
5889
5890 * linux-aarch64-ipa.c: Add <elf.h> include.
5891 * linux-ppc-ipa.c: Add <elf.h> include.
5892 * linux-s390-ipa.c: Add <elf.h> include.
5893
5894 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
5895
5896 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
5897 (get_raw_reg_ptr): Likewise.
5898 (get_trace_state_variable_value_ptr): Likewise.
5899 (set_trace_state_variable_value_ptr): Likewise.
5900 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
5901 char *.
5902
5903 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
5904 Marcin Kościelnicki <koriakin@0x04.net>
5905
5906 PR/17221
5907 * linux-ppc-low.c (emit_insns): New function.
5908 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
5909 (ppc_emit_prologue): New function.
5910 (ppc_emit_epilogue): New function.
5911 (ppc_emit_add): New function.
5912 (ppc_emit_sub): New function.
5913 (ppc_emit_mul): New function.
5914 (ppc_emit_lsh): New function.
5915 (ppc_emit_rsh_signed): New function.
5916 (ppc_emit_rsh_unsigned): New function.
5917 (ppc_emit_ext): New function.
5918 (ppc_emit_zero_ext): New function.
5919 (ppc_emit_log_not): New function.
5920 (ppc_emit_bit_and): New function.
5921 (ppc_emit_bit_or): New function.
5922 (ppc_emit_bit_xor): New function.
5923 (ppc_emit_bit_not): New function.
5924 (ppc_emit_equal): New function.
5925 (ppc_emit_less_signed): New function.
5926 (ppc_emit_less_unsigned): New function.
5927 (ppc_emit_ref): New function.
5928 (ppc_emit_const): New function.
5929 (ppc_emit_reg): New function.
5930 (ppc_emit_pop): New function.
5931 (ppc_emit_stack_flush): New function.
5932 (ppc_emit_swap): New function.
5933 (ppc_emit_stack_adjust): New function.
5934 (ppc_emit_call): New function.
5935 (ppc_emit_int_call_1): New function.
5936 (ppc_emit_void_call_2): New function.
5937 (ppc_emit_if_goto): New function.
5938 (ppc_emit_goto): New function.
5939 (ppc_emit_eq_goto): New function.
5940 (ppc_emit_ne_goto): New function.
5941 (ppc_emit_lt_goto): New function.
5942 (ppc_emit_le_goto): New function.
5943 (ppc_emit_gt_goto): New function.
5944 (ppc_emit_ge_goto): New function.
5945 (ppc_write_goto_address): New function.
5946 (ppc_emit_ops_impl): New static variable.
5947 (ppc64v1_emit_prologue): New function.
5948 (ppc64v2_emit_prologue): New function.
5949 (ppc64_emit_epilogue): New function.
5950 (ppc64_emit_add): New function.
5951 (ppc64_emit_sub): New function.
5952 (ppc64_emit_mul): New function.
5953 (ppc64_emit_lsh): New function.
5954 (ppc64_emit_rsh_signed): New function.
5955 (ppc64_emit_rsh_unsigned): New function.
5956 (ppc64_emit_ext): New function.
5957 (ppc64_emit_zero_ext): New function.
5958 (ppc64_emit_log_not): New function.
5959 (ppc64_emit_bit_and): New function.
5960 (ppc64_emit_bit_or): New function.
5961 (ppc64_emit_bit_xor): New function.
5962 (ppc64_emit_bit_not): New function.
5963 (ppc64_emit_equal): New function.
5964 (ppc64_emit_less_signed): New function.
5965 (ppc64_emit_less_unsigned): New function.
5966 (ppc64_emit_ref): New function.
5967 (ppc64_emit_const): New function.
5968 (ppc64v1_emit_reg): New function.
5969 (ppc64v2_emit_reg): New function.
5970 (ppc64_emit_pop): New function.
5971 (ppc64_emit_stack_flush): New function.
5972 (ppc64_emit_swap): New function.
5973 (ppc64v1_emit_call): New function.
5974 (ppc64v2_emit_call): New function.
5975 (ppc64v1_emit_int_call_1): New function.
5976 (ppc64v2_emit_int_call_1): New function.
5977 (ppc64v1_emit_void_call_2): New function.
5978 (ppc64v2_emit_void_call_2): New function.
5979 (ppc64_emit_if_goto): New function.
5980 (ppc64_emit_eq_goto): New function.
5981 (ppc64_emit_ne_goto): New function.
5982 (ppc64_emit_lt_goto): New function.
5983 (ppc64_emit_le_goto): New function.
5984 (ppc64_emit_gt_goto): New function.
5985 (ppc64_emit_ge_goto): New function.
5986 (ppc64v1_emit_ops_impl): New static variable.
5987 (ppc64v2_emit_ops_impl): New static variable.
5988 (ppc_emit_ops): New function.
5989 (linux_low_target): Wire in ppc_emit_ops.
5990
5991 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
5992 Marcin Kościelnicki <koriakin@0x04.net>
5993
5994 PR/17221
5995 * Makefile.in: Add powerpc-*-ipa.o
5996 * configure.srv: Add ipa_obj for powerpc*-linux.
5997 * linux-ppc-ipa.c: New file.
5998 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
5999 includes.
6000 (PPC_FIELD): New macro.
6001 (PPC_SEXT): New macro.
6002 (PPC_OP6): New macro.
6003 (PPC_BO): New macro.
6004 (PPC_LI): New macro.
6005 (PPC_BD): New macro.
6006 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
6007 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
6008 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
6009 (ppc_get_thread_area): New function.
6010 (is_elfv2_inferior): New function.
6011 (gen_ds_form): New function.
6012 (GEN_STD): New macro.
6013 (GEN_STDU): New macro.
6014 (GEN_LD): New macro.
6015 (GEN_LDU): New macro.
6016 (gen_d_form): New function.
6017 (GEN_ADDI): New macro.
6018 (GEN_ADDIS): New macro.
6019 (GEN_LI): New macro.
6020 (GEN_LIS): New macro.
6021 (GEN_ORI): New macro.
6022 (GEN_ORIS): New macro.
6023 (GEN_LWZ): New macro.
6024 (GEN_STW): New macro.
6025 (GEN_STWU): New macro.
6026 (gen_xfx_form): New function.
6027 (GEN_MFSPR): New macro.
6028 (GEN_MTSPR): New macro.
6029 (GEN_MFCR): New macro.
6030 (GEN_MTCR): New macro.
6031 (GEN_SYNC): New macro.
6032 (GEN_LWSYNC): New macro.
6033 (gen_x_form): New function.
6034 (GEN_OR): New macro.
6035 (GEN_MR): New macro.
6036 (GEN_LWARX): New macro.
6037 (GEN_STWCX): New macro.
6038 (GEN_CMPW): New macro.
6039 (gen_md_form): New function.
6040 (GEN_RLDICL): New macro.
6041 (GEN_RLDICR): New macro.
6042 (gen_i_form): New function.
6043 (GEN_B): New macro.
6044 (GEN_BL): New macro.
6045 (gen_b_form): New function.
6046 (GEN_BNE): New macro.
6047 (GEN_LOAD): New macro.
6048 (GEN_STORE): New macro.
6049 (gen_limm): New function.
6050 (gen_atomic_xchg): New function.
6051 (gen_call): New function.
6052 (ppc_relocate_instruction): New function.
6053 (ppc_install_fast_tracepoint_jump_pad): New function.
6054 (ppc_get_min_fast_tracepoint_insn_len): New function.
6055 (ppc_get_ipa_tdesc_idx): New function.
6056 (the_low_target): Wire in the new functions.
6057 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
6058 tdescs.
6059 * linux-ppc-tdesc.h: New file.
6060
6061 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
6062
6063 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
6064 (alloc_jump_pad_buffer): New function.
6065 * linux-amd64-ipa.c: Add <sys/mman.h> include.
6066 (alloc_jump_pad_buffer): New function.
6067 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
6068 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
6069 (alloc_jump_pad_buffer): New function.
6070 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
6071 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
6072 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
6073 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
6074
6075 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
6076
6077 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
6078 * linux-amd64-ipa.c: Likewise.
6079 * linux-i386-ipa.c: Likewise.
6080 * linux-s390-ipa.c: Likewise.
6081 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
6082 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
6083 set_trace_state_variable_value_ptr.
6084 (struct ipa_sym_addresses): Likewise.
6085 (symbol_list): Likewise.
6086 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
6087 accessing gdb_collect directly.
6088 (gdb_collect_ptr_type): New typedef.
6089 (get_raw_reg_ptr_type): New typedef.
6090 (get_trace_state_variable_value_ptr_type): New typedef.
6091 (set_trace_state_variable_value_ptr_type): New typedef.
6092 (gdb_collect_ptr): New global.
6093 (get_raw_reg_ptr): New global.
6094 (get_trace_state_variable_value_ptr): New global.
6095 (set_trace_state_variable_value_ptr): New global.
6096 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
6097 accessing get_raw_reg directly.
6098 (get_get_tsv_func_addr): Likewise for
6099 get_trace_state_variable_value_ptr.
6100 (get_set_tsv_func_addr): Likewise for
6101 set_trace_state_variable_value_ptr.
6102 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
6103
6104 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
6105
6106 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
6107
6108 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
6109
6110 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
6111 packets.
6112 (relocate_instruction): Remove own_buf.
6113 * server.c (own_buf): Make global.
6114 (handle_v_requests): Make global.
6115 * server.h (own_buf): New declaration.
6116 (handle_v_requests): New prototype.
6117
6118 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
6119
6120 PR 18377
6121 * linux-s390-low.c (add_insns): New function.
6122 (s390_emit_prologue): New function.
6123 (s390_emit_epilogue): New function.
6124 (s390_emit_add): New function.
6125 (s390_emit_sub): New function.
6126 (s390_emit_mul): New function.
6127 (s390_emit_lsh): New function.
6128 (s390_emit_rsh_signed): New function.
6129 (s390_emit_rsh_unsigned): New function.
6130 (s390_emit_ext): New function.
6131 (s390_emit_log_not): New function.
6132 (s390_emit_bit_and): New function.
6133 (s390_emit_bit_or): New function.
6134 (s390_emit_bit_xor): New function.
6135 (s390_emit_bit_not): New function.
6136 (s390_emit_equal): New function.
6137 (s390_emit_less_signed): New function.
6138 (s390_emit_less_unsigned): New function.
6139 (s390_emit_ref): New function.
6140 (s390_emit_if_goto): New function.
6141 (s390_emit_goto): New function.
6142 (s390_write_goto_address): New function.
6143 (s390_emit_litpool): New function.
6144 (s390_emit_const): New function.
6145 (s390_emit_call): New function.
6146 (s390_emit_reg): New function.
6147 (s390_emit_pop): New function.
6148 (s390_emit_stack_flush): New function.
6149 (s390_emit_zero_ext): New function.
6150 (s390_emit_swap): New function.
6151 (s390_emit_stack_adjust): New function.
6152 (s390_emit_set_r2): New function.
6153 (s390_emit_int_call_1): New function.
6154 (s390_emit_void_call_2): New function.
6155 (s390_emit_eq_goto): New function.
6156 (s390_emit_ne_goto): New function.
6157 (s390_emit_lt_goto): New function.
6158 (s390_emit_le_goto): New function.
6159 (s390_emit_gt_goto): New function.
6160 (s390_emit_ge_goto): New function.
6161 (s390x_emit_prologue): New function.
6162 (s390x_emit_epilogue): New function.
6163 (s390x_emit_add): New function.
6164 (s390x_emit_sub): New function.
6165 (s390x_emit_mul): New function.
6166 (s390x_emit_lsh): New function.
6167 (s390x_emit_rsh_signed): New function.
6168 (s390x_emit_rsh_unsigned): New function.
6169 (s390x_emit_ext): New function.
6170 (s390x_emit_log_not): New function.
6171 (s390x_emit_bit_and): New function.
6172 (s390x_emit_bit_or): New function.
6173 (s390x_emit_bit_xor): New function.
6174 (s390x_emit_bit_not): New function.
6175 (s390x_emit_equal): New function.
6176 (s390x_emit_less_signed): New function.
6177 (s390x_emit_less_unsigned): New function.
6178 (s390x_emit_ref): New function.
6179 (s390x_emit_if_goto): New function.
6180 (s390x_emit_const): New function.
6181 (s390x_emit_call): New function.
6182 (s390x_emit_reg): New function.
6183 (s390x_emit_pop): New function.
6184 (s390x_emit_stack_flush): New function.
6185 (s390x_emit_zero_ext): New function.
6186 (s390x_emit_swap): New function.
6187 (s390x_emit_stack_adjust): New function.
6188 (s390x_emit_int_call_1): New function.
6189 (s390x_emit_void_call_2): New function.
6190 (s390x_emit_eq_goto): New function.
6191 (s390x_emit_ne_goto): New function.
6192 (s390x_emit_lt_goto): New function.
6193 (s390x_emit_le_goto): New function.
6194 (s390x_emit_gt_goto): New function.
6195 (s390x_emit_ge_goto): New function.
6196 (s390_emit_ops): New function.
6197 (struct linux_target_ops): Fill in emit_ops hook.
6198
6199 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
6200
6201 PR 18377
6202 * Makefile.in: Add s390 IPA files.
6203 * configure.srv: Build IPA for s390.
6204 * linux-s390-ipa.c: New file.
6205 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
6206 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
6207 (tdesc_s390_linux32): Likewise.
6208 (init_registers_s390_linux32v1): Likewise.
6209 (tdesc_s390_linux32v1): Likewise.
6210 (init_registers_s390_linux32v2): Likewise.
6211 (tdesc_s390_linux32v2): Likewise.
6212 (init_registers_s390_linux64): Likewise.
6213 (tdesc_s390_linux64): Likewise.
6214 (init_registers_s390_linux64v1): Likewise.
6215 (tdesc_s390_linux64v1): Likewise.
6216 (init_registers_s390_linux64v2): Likewise.
6217 (tdesc_s390_linux64v2): Likewise.
6218 (init_registers_s390_te_linux64): Likewise.
6219 (tdesc_s390_te_linux64): Likewise.
6220 (init_registers_s390_vx_linux64): Likewise.
6221 (tdesc_s390_vx_linux64): Likewise.
6222 (init_registers_s390_tevx_linux64): Likewise.
6223 (tdesc_s390_tevx_linux64): Likewise.
6224 (init_registers_s390x_linux64): Likewise.
6225 (tdesc_s390x_linux64): Likewise.
6226 (init_registers_s390x_linux64v1): Likewise.
6227 (tdesc_s390x_linux64v1): Likewise.
6228 (init_registers_s390x_linux64v2): Likewise.
6229 (tdesc_s390x_linux64v2): Likewise.
6230 (init_registers_s390x_te_linux64): Likewise.
6231 (tdesc_s390x_te_linux64): Likewise.
6232 (init_registers_s390x_vx_linux64): Likewise.
6233 (tdesc_s390x_vx_linux64): Likewise.
6234 (init_registers_s390x_tevx_linux64): Likewise.
6235 (tdesc_s390x_tevx_linux64): Likewise.
6236 (have_hwcap_s390_vx): New static variable.
6237 (s390_arch_setup): Fill have_hwcap_s390_vx.
6238 (s390_get_thread_area): New function.
6239 (s390_ft_entry_gpr_esa): New const.
6240 (s390_ft_entry_gpr_zarch): New const.
6241 (s390_ft_entry_misc): New const.
6242 (s390_ft_entry_fr): New const.
6243 (s390_ft_entry_vr): New const.
6244 (s390_ft_main_31): New const.
6245 (s390_ft_main_64): New const.
6246 (s390_ft_exit_fr): New const.
6247 (s390_ft_exit_vr): New const.
6248 (s390_ft_exit_misc): New const.
6249 (s390_ft_exit_gpr_esa): New const.
6250 (s390_ft_exit_gpr_zarch): New const.
6251 (append_insns): New function.
6252 (s390_relocate_instruction): New function.
6253 (s390_install_fast_tracepoint_jump_pad): New function.
6254 (s390_get_min_fast_tracepoint_insn_len): New function.
6255 (s390_get_ipa_tdesc_idx): New function.
6256 (struct linux_target_ops): Wire in the above functions.
6257 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
6258 * linux-s390-tdesc.h: New file.
6259
6260 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
6261
6262 * linux-s390-low.c (s390_supports_tracepoints): New function.
6263 (struct linux_target_ops): Fill supports_tracepoints hook.
6264
6265 2016-03-18 Yao Qi <yao.qi@linaro.org>
6266
6267 * linux-low.c (lwp_signal_can_be_delivered): New function.
6268 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
6269
6270 2016-03-18 Yao Qi <yao.qi@linaro.org>
6271
6272 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
6273 0 if signal is enqueued. Remove 'signal' from one debugging
6274 message. Move one debugging message to some lines below.
6275 Remove code setting 'signal' to 0.
6276
6277 2016-03-18 Yao Qi <yao.qi@linaro.org>
6278
6279 * linux-low.c (linux_low_filter_event): Remove redundant
6280 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
6281
6282 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
6283
6284 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
6285 (struct linux_target_ops): Wire in the above.
6286
6287 2016-03-03 Yao Qi <yao.qi@linaro.org>
6288
6289 * linux-low.c: Update comments to start_step_over.
6290
6291 2016-03-03 Yao Qi <yao.qi@linaro.org>
6292
6293 PR server/19736
6294 * linux-low.c (handle_extended_wait): Set child suspended
6295 if event_lwp->bp_reinsert isn't zero.
6296
6297 2016-03-02 Yao Qi <yao.qi@linaro.org>
6298
6299 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
6300 enqueue_pending_signal.
6301
6302 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
6303
6304 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
6305 is actually loaded.
6306
6307 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
6308
6309 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
6310 (s390_regmap_3264) [!__s390x__]: New global.
6311 (s390_collect_ptrace_register): Skip map entries containing -1.
6312 (s390_supply_ptrace_register): Ditto.
6313 (s390_fill_gprs_high): New function.
6314 (s390_store_gprs_high): New function.
6315 (s390_regsets): Add NT_S390_HIGH_GPRS.
6316 (s390_get_hwcap): Enable on 31-bit.
6317 (have_hwcap_s390_high_gprs): Enable on 31-bit.
6318 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
6319 Detect NT_S390_HIGH_GPRS.
6320 (s390_usrregs_info_3264): Enable on 31-bit.
6321 (s390_regs_info): Enable regs_info_3264 on 31-bit.
6322 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
6323
6324 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
6325
6326 PR gdb/13808
6327 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
6328 * configure.srv: Ditto.
6329 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
6330 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
6331 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
6332 (init_registers_amd64_linux): Remove prototype.
6333 (tdesc_amd64_linux): Remove declaration.
6334 (get_ipa_tdesc): New function.
6335 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
6336 initialize remaining tdescs.
6337 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
6338 (init_registers_i386_linux): Remove prototype.
6339 (tdesc_i386_linux): Remove declaration.
6340 (get_ipa_tdesc): New function.
6341 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
6342 initialize remaining tdescs.
6343 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
6344 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
6345 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
6346 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
6347 (x86_get_ipa_tdesc_idx): New function.
6348 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
6349 * linux-x86-tdesc.h: New file.
6350 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
6351 (target_get_ipa_tdesc_idx): New macro.
6352 * tracepoint.c (ipa_tdesc_idx): New macro.
6353 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
6354 (symbol_list): Add ipa_tdesc_idx.
6355 (cmd_qtstart): Write ipa_tdesc_idx in the target.
6356 (ipa_tdesc): Remove.
6357 (ipa_tdesc_idx): New variable.
6358 (get_context_regcache): Use get_ipa_tdesc.
6359 (gdb_collect): Ditto.
6360 (gdb_probe): Ditto.
6361 * tracepoint.h (get_ipa_tdesc): New prototype.
6362 (ipa_tdesc): Remove.
6363
6364 2016-02-24 Pedro Alves <palves@redhat.com>
6365
6366 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
6367 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
6368 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
6369 Factor out common code between the USE_SIGTRAP_SIGINFO and
6370 !USE_SIGTRAP_SIGINFO blocks.
6371 (linux_low_filter_event): Call save_stop_reason instead of
6372 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
6373 Update comments.
6374 (linux_wait_1): Update comments.
6375
6376 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
6377
6378 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
6379 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
6380 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
6381 ppc_insert_point, ppc_remove_point.
6382
6383 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
6384
6385 * linux-s390-low.c (s390_supports_z_point_type): New function.
6386 (struct linux_target_ops): Wire s390_supports_z_point_type in.
6387
6388 2016-02-16 Yao Qi <yao.qi@linaro.org>
6389
6390 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
6391 PC. Get pc from regcache_read_pc.
6392
6393 2016-02-12 Yao Qi <yao.qi@linaro.org>
6394
6395 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
6396 or linux_get_pc_32bit.
6397 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
6398
6399 2016-02-12 Yao Qi <yao.qi@linaro.org>
6400
6401 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
6402 arm_linux_get_next_pcs_fixup.
6403
6404 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
6405
6406 * tracepoint.c (x_tracepoint_action_download): Change
6407 write_inferior_data_ptr to write_inferior_data_pointer.
6408 (cmd_qtstart): Likewise.
6409 (write_inferior_data_ptr): Remove.
6410 (download_agent_expr): Change write_inferior_data_ptr to
6411 write_inferior_data_pointer.
6412 (download_tracepoint_1): Likewise.
6413 (download_tracepoint): Likewise.
6414 (download_trace_state_variables): Likewise.
6415
6416 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
6417 Marcin Kościelnicki <koriakin@0x04.net>
6418
6419 * tracepoint.c (struct tracepoint_action_ops): Remove.
6420 (struct tracepoint_action): Remove ops.
6421 (m_tracepoint_action_download, r_tracepoint_action_download)
6422 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
6423 size and offset accordingly.
6424 (m_tracepoint_action_ops, r_tracepoint_action_ops)
6425 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
6426 (tracepoint_action_send, tracepoint_action_download): New functions.
6427 Helpers for trace action handlers.
6428 (add_tracepoint_action): Remove setup actions ops.
6429 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
6430
6431 2016-02-10 Yao Qi <yao.qi@linaro.org>
6432
6433 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
6434
6435 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
6436
6437 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
6438 to AC_OUTPUT.
6439 * configure: Regenerate.
6440
6441 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
6442
6443 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
6444 void * to gdb_byte *.
6445 * linux-low.c (siginfo_fixup): Likewise.
6446 (linux_xfer_siginfo): Likewise.
6447 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
6448 Likewise.
6449 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
6450
6451 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
6452
6453 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
6454 to srv_tgtobj.
6455 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
6456 to srv_tgtobj.
6457 * linux-x86-low.c [__x86_64__]: Include
6458 "nat/amd64-linux-siginfo.h".
6459 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
6460 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
6461 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
6462 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
6463 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
6464 (cpt_si_fd, si_timerid, si_overrun): Move from
6465 nat/amd64-linux-siginfo.c.
6466 * Makefile.in (amd64-linux-siginfo.o:): New rule.
6467
6468 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
6469
6470 * server.c (skip_to_semicolon): Remove.
6471 (process_point_options): Use strchrnul instead of
6472 skip_to_semicolon.
6473
6474 2016-01-26 Yao Qi <yao.qi@linaro.org>
6475
6476 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
6477 * linux-low.c (install_software_single_step_breakpoints): Don't
6478 call regcache_read_pc.
6479 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
6480 argument pc.
6481
6482 2016-01-26 Yao Qi <yao.qi@linaro.org>
6483
6484 * linux-low.c (install_software_single_step_breakpoints): Call
6485 regcache_read_pc instead of get_pc.
6486
6487 2016-01-26 Yao Qi <yao.qi@linaro.org>
6488
6489 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
6490 (unblock_async_io): Rename to ...
6491 (block_unblock_async_io): ... it. New function.
6492 (enable_async_io): Don't install SIGIO handler. Unblock it
6493 instead.
6494 (disable_async_io): Don't ignore SIGIO. Block it instead.
6495 (initialize_async_io): Install SIGIO handler. Don't call
6496 unblock_async_io.
6497
6498 2016-01-26 Yao Qi <yao.qi@linaro.org>
6499
6500 * remote-utils.c (getpkt): If the buffer isn't empty, and the
6501 first character is '\003', call *the_target->request_interrupt.
6502
6503 2016-01-25 Yao Qi <yao.qi@linaro.org>
6504
6505 * remote-utils.c (new_thread_notify): Remove.
6506 (dead_thread_notify): Likewise.
6507 * remote-utils.h (new_thread_notify): Remove declaration.
6508 (dead_thread_notify): Likewise.
6509
6510 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
6511
6512 * gdb.trace/pending.exp: Fix expected message on continue.
6513
6514 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
6515
6516 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
6517 it works properly on big-endian machines where sizeof (CORE_ADDR)
6518 != sizeof (void *).
6519
6520 2016-01-21 Pedro Alves <palves@redhat.com>
6521
6522 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
6523 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
6524 * configure: Regenerate.
6525
6526 2016-01-21 Yao Qi <yao.qi@linaro.org>
6527
6528 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
6529 is_thumb and set it according to CPSR saved on the stack.
6530 (get_next_pcs_syscall_next_pc): Pass is_thumb to
6531 arm_sigreturn_next_pc.
6532
6533 2016-01-18 Yao Qi <yao.qi@linaro.org>
6534
6535 * linux-low.c (linux_set_pc_64bit): New function.
6536 (linux_get_pc_64bit): New function.
6537 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
6538 Declare.
6539 * linux-sparc-low.c (debug_threads): Remove declaration.
6540 (sparc_get_pc): Remove.
6541 (the_low_target): Use linux_get_pc_64bit instead of
6542 sparc_get_pc.
6543 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
6544 (the_low_target): Use linux_get_pc_64bit and
6545 linux_set_pc_64bit.
6546
6547 2016-01-18 Yao Qi <yao.qi@linaro.org>
6548
6549 * linux-arm-low.c (debug_threads): Remove declaration.
6550 (arm_get_pc, arm_set_pc): Remove.
6551 (the_low_target): Use linux_get_pc_32bit and
6552 linux_set_pc_32bit.
6553 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
6554 (the_low_target): Use linux_get_pc_32bit and
6555 linux_set_pc_32bit.
6556 * linux-cris-low.c (debug_threads): Remove declaration.
6557 (cris_get_pc, cris_set_pc,): Remove.
6558 (the_low_target): Use linux_get_pc_32bit and
6559 linux_set_pc_32bit.
6560 * linux-crisv32-low.c (debug_threads): Remove declaration.
6561 (cris_get_pc, cris_set_pc): Remove.
6562 (the_low_target): Use linux_get_pc_32bit and
6563 linux_set_pc_32bit.
6564 * linux-low.c: Include inttypes.h.
6565 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
6566 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
6567 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
6568 (the_low_target): Use linux_get_pc_32bit and
6569 linux_set_pc_32bit.
6570 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
6571 (the_low_target): Use linux_get_pc_32bit and
6572 linux_set_pc_32bit.
6573 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
6574 (the_low_target): Use linux_get_pc_32bit and
6575 linux_set_pc_32bit.
6576 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
6577 (the_low_target): Use linux_get_pc_32bit and
6578 linux_set_pc_32bit.
6579 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
6580 (the_low_target): Use linux_get_pc_32bit and
6581 linux_set_pc_32bit.
6582
6583 2016-01-18 Gary Benson <gbenson@redhat.com>
6584
6585 * configure.ac (AC_FUNC_FORK): New check.
6586 * config.in: Regenerate.
6587 * configure: Likewise.
6588
6589 2016-01-14 Yao Qi <yao.qi@linaro.org>
6590
6591 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
6592 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
6593 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
6594 arm_get_next_pcs_ctor.
6595
6596 2016-01-12 Josh Stone <jistone@redhat.com>
6597 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6598
6599 * inferiors.h: Include "gdb_vecs.h".
6600 (struct process_info): Add syscalls_to_catch.
6601 * inferiors.c (remove_process): Free syscalls_to_catch.
6602 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
6603 syscall_return stops.
6604 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
6605 * server.c (handle_general_set): Handle QCatchSyscalls.
6606 (handle_query): Report support for QCatchSyscalls.
6607 * target.h (struct target_ops): Add supports_catch_syscall.
6608 (target_supports_catch_syscall): New macro.
6609 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
6610 (struct lwp_info): Add syscall_state.
6611 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
6612 Maintain syscall_state and syscalls_to_catch across exec.
6613 (get_syscall_trapinfo): New function, proxy to the_low_target.
6614 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
6615 (linux_low_filter_event): Toggle syscall_state entry/return for
6616 syscall traps, and set it ignored for all others.
6617 (gdb_catching_syscalls_p): New function.
6618 (gdb_catch_this_syscall_p): New function.
6619 (linux_wait_1): Handle SYSCALL_SIGTRAP.
6620 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
6621 (linux_supports_catch_syscall): New function.
6622 (linux_target_ops): Install it.
6623 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
6624 (the_low_target): Install it.
6625
6626 2016-01-12 Mike Frysinger <vapier@gentoo.org>
6627
6628 * acinclude.m4: Include new ../warning.m4 file.
6629 * configure: Regenerated.
6630 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
6631
6632 2016-01-12 Mike Frysinger <vapier@gentoo.org>
6633
6634 * ax.c (is_goto_target): Mark static.
6635 * linux-low.c (register_addr): Likewise.
6636 (linux_fetch_registers, linux_store_registers): Likewise.
6637 * mem-break.c (any_persistent_commands): Fix old prototype.
6638 (add_commands_to_breakpoint): Mark static.
6639 * regcache.c (find_register_by_name): Delete unused func.
6640 * remote-utils.c (hex_or_minus_one): Mark static.
6641 * server.c (monitor_show_help): Mark static.
6642 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
6643 handle_v_requests): Likewise.
6644
6645 2016-01-12 Pedro Alves <palves@redhat.com>
6646
6647 Remove use of the registered trademark symbol throughout.
6648
6649 2016-01-08 Yao Qi <yao.qi@linaro.org>
6650
6651 * remote-utils.c (getpkt): If c is '\003', call target hook
6652 request_interrupt.
6653
6654 2016-01-06 Yao Qi <yao.qi@linaro.org>
6655
6656 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
6657 linux-aarch32-low.c.
6658 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6659 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
6660 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
6661 (thumb2_breakpoint): Declare.
6662 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
6663 linux-aarch32-low.h.
6664 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6665 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
6666 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
6667
6668 2016-01-01 Joel Brobecker <brobecker@adacore.com>
6669
6670 * gdbreplay.c (gdbreplay_version): Change copyright year in
6671 version message.
6672 * server.c (gdbserver_version): Likewise.
6673
6674 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
6675
6676 * server.c (crc32_table): Delete.
6677 (crc32): Use libiberty's xcrc32 function.
6678
6679 2015-12-22 Joel Brobecker <brobecker@adacore.com>
6680
6681 * lynx-low.c (lynx_delete_thread_callback): New function.
6682 (lynx_mourn): Properly delete our process and all of its
6683 threads. Remove call to clear_inferiors.
6684
6685 2015-12-22 Joel Brobecker <brobecker@adacore.com>
6686
6687 * target.c (thread_search_callback): Add check that
6688 the thread_stopped target callback is not NULL before
6689 calling it.
6690
6691 2015-12-21 Yao Qi <yao.qi@linaro.org>
6692
6693 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
6694 arm breakpoint.
6695
6696 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6697
6698 * server.c (handle_query): Call target_supports_software_single_step.
6699
6700 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6701
6702 * linux-low.c (single_step): New function.
6703 (linux_resume_one_lwp_throw): Call single_step.
6704 (start_step_over): Likewise.
6705
6706 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6707
6708 * Makefile.in (SFILES): Append arch/arm-linux.c,
6709 arch/arm-get-next-pcs.c.
6710 (arm-linux.o): New rule.
6711 (arm-get-next-pcs.o): New rule.
6712 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
6713 arm-linux.o.
6714 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
6715 to linux-aarch32-low.c.
6716 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6717 (arm_breakpoint_len, thumb_breakpoint): Likewise.
6718 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
6719 (thumb2_breakpoint_len): Likewise.
6720 (arm_is_thumb_mode): Make non-static.
6721 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
6722 from linux-aarch32-low.c.
6723 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6724 (arm_breakpoint_len, thumb_breakpoint): Likewise.
6725 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
6726 (thumb2_breakpoint_len): Likewise.
6727 (arm_is_thumb_mode): New declaration.
6728 * linux-arm-low.c: Include arch/arm-linux.h
6729 aarch/arm-get-next-pcs.h, sys/syscall.h.
6730 (get_next_pcs_ops): New struct.
6731 (get_next_pcs_addr_bits_remove): New function.
6732 (get_next_pcs_is_thumb): New function.
6733 (get_next_pcs_read_memory_unsigned_integer): Likewise.
6734 (arm_sigreturn_next_pc): Likewise.
6735 (get_next_pcs_syscall_next_pc): Likewise.
6736 (arm_gdbserver_get_next_pcs): Likewise.
6737 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
6738 Initialize.
6739 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
6740 * server.h: Include gdb_vecs.h.
6741
6742 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6743
6744 * Makefile.in (SFILES): Append common/common-regcache.c.
6745 (OBS): Append common-regcache.o.
6746 (common-regcache.o): New rule.
6747 * regcache.c (init_register_cache): Initialize cache to
6748 REG_UNAVAILABLE.
6749 (regcache_raw_read_unsigned): New function.
6750 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
6751 register_status enum.
6752
6753 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6754
6755 * linux-aarch64-low.c (the_low_targets): Rename
6756 breakpoint_reinsert_addr to get_next_pcs.
6757 * linux-arm-low.c (the_low_targets): Likewise.
6758 * linux-bfin-low.c (the_low_targets): Likewise.
6759 * linux-cris-low.c (the_low_targets): Likewise.
6760 * linux-crisv32-low.c (the_low_targets): Likewise.
6761 * linux-low.c (can_software_single_step): Likewise.
6762 (install_software_single_step_breakpoints): New function.
6763 (start_step_over): Use install_software_single_step_breakpoints.
6764 * linux-low.h: New CORE_ADDR vector.
6765 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
6766 get_next_pcs.
6767 * linux-mips-low.c (the_low_targets): Likewise.
6768 * linux-nios2-low.c (the_low_targets): Likewise.
6769 * linux-sparc-low.c (the_low_targets): Likewise.
6770
6771 2015-12-17 Pedro Alves <palves@redhat.com>
6772
6773 * linux-low.c (linux_kill_one_lwp): Remove references to
6774 LinuxThreads.
6775 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
6776 to 'kill'.
6777 (linux_init_signals): Delete.
6778 (initialize_low): Adjust.
6779 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
6780
6781 2015-12-16 Pedro Alves <palves@redhat.com>
6782
6783 * configure.ac (compiler warning flags): When testing a
6784 -Wno-foo option, check whether -Wfoo works instead.
6785 * configure: Regenerate.
6786
6787 2015-12-11 Don Breazeal <donb@codesourcery.com>
6788
6789 * server.c (process_serial_event): Don't exit from gdbserver
6790 in remote mode if there are still active inferiors.
6791
6792 2015-12-11 Yao Qi <yao.qi@linaro.org>
6793
6794 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
6795 arm_breakpoint_at if the process is 32-bit.
6796
6797 2015-12-11 Yao Qi <yao.qi@linaro.org>
6798
6799 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
6800 arm breakpoint.
6801
6802 2015-12-07 Yao Qi <yao.qi@linaro.org>
6803
6804 * configure.srv: Append arm.o to srv_tgtobj for
6805 aarch64*-*-linux* target.
6806 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
6807 from linux-arm-low.c.
6808 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6809 (arm_breakpoint_len, thumb_breakpoint): Likewise.
6810 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
6811 (thumb2_breakpoint_len): Likewise.
6812 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
6813 (arm_breakpoint_kinds): Likewise.
6814 (arm_breakpoint_kind_from_pc): Likewise.
6815 (arm_sw_breakpoint_from_kind): Likewise.
6816 (arm_breakpoint_kind_from_current_state): Likewise.
6817 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
6818 (arm_sw_breakpoint_from_kind): Declare.
6819 (arm_breakpoint_kind_from_current_state): Declare.
6820 (arm_breakpoint_at): Declare.
6821 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
6822 arm_sw_breakpoint_from_kind if process is 32-bit.
6823 (aarch64_breakpoint_kind_from_pc): New function.
6824 (aarch64_breakpoint_kind_from_current_state): New function.
6825 (the_low_target): Initialize fields breakpoint_kind_from_pc
6826 and breakpoint_kind_from_current_state.
6827 * linux-arm-low.c (arm_breakpoint_kinds): Move to
6828 linux-aarch32-low.c.
6829 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
6830 (arm_breakpoint, arm_breakpoint_len): Likewise.
6831 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
6832 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
6833 (arm_is_thumb_mode): Likewise.
6834 (arm_breakpoint_at): Likewise.
6835 (arm_breakpoint_kind_from_pc): Likewise.
6836 (arm_sw_breakpoint_from_kind): Likewise.
6837 (arm_breakpoint_kind_from_current_state): Likewise.
6838
6839 Revert:
6840 2015-08-04 Yao Qi <yao.qi@linaro.org>
6841
6842 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6843 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6844 * server.c (extended_protocol): Remove "static".
6845 * server.h (extended_protocol): Declare it.
6846
6847 2015-12-04 Josh Stone <jistone@redhat.com>
6848
6849 * target.h (struct target_ops) <arch_setup>: Rename to ...
6850 (struct target_ops) <post_create_inferior>: ... this.
6851 (target_arch_setup): Rename to ...
6852 (target_post_create_inferior): ... this, calling post_create_inferior.
6853 * server.c (start_inferior): Update target_arch_setup calls to
6854 target_post_create_inferior.
6855 * linux-low.c (linux_low_ptrace_options): Forward declare.
6856 (linux_arch_setup): Update its comment for general use.
6857 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
6858 (struct linux_target_ops): Use linux_post_create_inferior.
6859 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
6860 to post_create_inferior.
6861 * nto-low.c (struct nto_target_ops): Likewise.
6862 * spu-low.c (struct spu_target_ops): Likewise.
6863 * win32-low.c (struct win32_target_ops): Likewise.
6864
6865 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
6866
6867 * linux-arm-low.c: Remove duplicate arch/arm.h include.
6868
6869 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6870
6871 * linux-arm-low.c (arm_reinsert_addr): Remove function.
6872 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
6873 * linux-cris-low.c (cris_reinsert_addr> Remove function.
6874 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6875 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
6876 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6877 * linux-mips-low.c (mips_reinsert_addr): Remove function.
6878 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6879 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
6880 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6881 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
6882 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6883
6884 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6885
6886 * linux-low.c (linux_look_up_symbols): Don't call
6887 linux_supports_traceclone.
6888 * linux-low.h (thread_db_init): Remove use_events argument.
6889 * thread-db.c (thread_db_use_event): Remove global variable.
6890 (struct thread_db) <td_thr_event_enable_p>: Remove field.
6891 (struct thread_db) <td_create_bp>: Remove field.
6892 (thread_db_create_event): Remove function.
6893 (thread_db_enable_reporting): Likewise.
6894 (find_one_thread): Don't check for thread_db_use_events.
6895 (attach_thread): Likewise.
6896 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
6897 (try_thread_db_load_1): Don't check for thread_db_use_events.
6898 (thread_db_init): Remove use_events argument and thread events
6899 handling.
6900 (remove_thread_event_breakpoints): Remove function.
6901 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
6902
6903 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6904
6905 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
6906 New function.
6907 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6908 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
6909 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6910 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
6911 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
6912 Initialize.
6913 * linux-crisv32-low.c (cris_supports_hardware_single_step):
6914 New function.
6915 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6916 * linux-low.c (can_hardware_single_step): Use
6917 supports_hardware_single_step.
6918 (can_software_single_step): New function.
6919 (start_step_over): Call can_software_single_step.
6920 (linux_supports_hardware_single_step): New function.
6921 (struct target_ops) <supports_software_single_step>: Initialize.
6922 * linux-low.h (struct linux_target_ops)
6923 <supports_hardware_single_step>: Initialize.
6924 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
6925 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6926 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
6927 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
6928 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
6929 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6930 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
6931 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6932 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
6933 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
6934 Initialize.
6935 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
6936 (struct linux_target_ops) <tile_supports_hardware_single_step>:
6937 Initialize.
6938 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
6939 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6940 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
6941 New function.
6942 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6943 * target.h (struct target_ops): <supports_software_single_step>:
6944 New field.
6945 (target_supports_software_single_step): New macro.
6946
6947 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6948
6949 * linux-low.c (linux_wait_1): Fix pc advance condition.
6950 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
6951 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
6952
6953 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6954
6955 * linux-arm-low.c (arm_is_thumb_mode): New function.
6956 (arm_breakpoint_at): Use arm_is_thumb_mode.
6957 (arm_breakpoint_kind_from_current_state): New function.
6958 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
6959 Initialize.
6960 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
6961 (linux_breakpoint_kind_from_current_state): New function.
6962 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
6963 * linux-low.h (struct linux_target_ops)
6964 <breakpoint_kind_from_current_state>: New field.
6965 * target.h (struct target_ops): Likewise.
6966 (target_breakpoint_kind_from_current_state): New macro.
6967
6968 2015-11-30 Pedro Alves <palves@redhat.com>
6969
6970 * linux-low.c (linux_resume): Wake up the event loop before
6971 returning.
6972
6973 2015-11-30 Pedro Alves <palves@redhat.com>
6974
6975 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
6976 check.
6977 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
6978 to -1.
6979 * target.c (struct thread_search): New structure.
6980 (thread_search_callback): New function.
6981 (prev_general_thread): New global.
6982 (prepare_to_access_memory, done_accessing_memory): New functions.
6983 * target.h (prepare_to_access_memory, done_accessing_memory):
6984 Replace macros with function declarations.
6985
6986 2015-11-30 Pedro Alves <palves@redhat.com>
6987
6988 PR 14618
6989 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
6990 report TARGET_WAITKIND_NO_RESUMED.
6991 * remote-utils.c (prepare_resume_reply): Handle
6992 TARGET_WAITKIND_NO_RESUMED.
6993 * server.c (report_no_resumed): New global.
6994 (handle_query) <qSupported>: Handle "no-resumed+". Report
6995 "no-resumed+" support.
6996 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
6997 return error if the client doesn't support no-resumed events.
6998 (push_stop_notification): New function.
6999 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
7000 events if the client supports them.
7001
7002 2015-11-30 Pedro Alves <palves@redhat.com>
7003
7004 * linux-low.c (thread_still_has_status_pending_p): Don't check
7005 vCont;t here.
7006 (lwp_resumed): New function.
7007 (status_pending_p_callback): Return early if the LWP is not
7008 supposed to be resumed.
7009
7010 2015-11-30 Pedro Alves <palves@redhat.com>
7011
7012 * linux-low.c (handle_extended_wait): Assert that the LWP's
7013 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
7014 thread create events, leave the new child's status pending.
7015 (linux_low_filter_event): If GDB wants to hear about thread exit
7016 events, leave the LWP marked dead and don't delete it.
7017 (linux_wait_for_event_filtered): Don't check for thread exit.
7018 (filter_exit_event): New function.
7019 (linux_wait_1): Use it, when returning an exit event.
7020 (linux_resume_one_lwp_throw): Assert that the LWP's
7021 waitstatus is TARGET_WAITKIND_IGNORE.
7022 * remote-utils.c (prepare_resume_reply): Handle
7023 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
7024 * server.c (report_thread_events): New global.
7025 (handle_general_set): Handle QThreadEvents.
7026 (handle_query) <qSupported>: Handle and report QThreadEvents+;
7027 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
7028 TARGET_WAITKIND_THREAD_EXITED.
7029 * server.h (report_thread_events): Declare.
7030
7031 2015-11-30 Pedro Alves <palves@redhat.com>
7032
7033 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
7034 the thread's last_resume_kind was resume_stop.
7035
7036 2015-11-30 Pedro Alves <palves@redhat.com>
7037
7038 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
7039 before returning.
7040
7041 2015-11-30 Pedro Alves <palves@redhat.com>
7042
7043 * server.c (handle_v_requests): Handle vCtrlC.
7044
7045 2015-11-30 Pedro Alves <palves@redhat.com>
7046
7047 * gdbthread.h (find_any_thread_of_pid): Declare.
7048 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
7049 functions.
7050 * server.c (handle_query): If current_thread is NULL, look for
7051 another thread of the selected process.
7052
7053 2015-11-26 Daniel Colascione <dancol@dancol.org>
7054 Simon Marchi <simon.marchi@ericsson.com>
7055
7056 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
7057 * server.c (handle_qxfer_threads_worker): Refactor to include thread
7058 name in reply.
7059 * target.h (struct target_ops) <thread_name>: New field.
7060 (target_thread_name): New macro.
7061
7062 2015-11-23 Joel Brobecker <brobecker@adacore.com>
7063
7064 * regcache.h (regcache_invalidate_pid): Add declaration.
7065 * regcache.c (regcache_invalidate_pid): New function, extracted
7066 from regcache_invalidate.
7067 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
7068 Add trivial documentation comment.
7069 * lynx-low.c: Use regcache_invalidate_pid instead of
7070 regcache_invalidate.
7071
7072 2015-11-23 Joel Brobecker <brobecker@adacore.com>
7073
7074 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
7075 and Elf64_auxv_t if the target is Android.
7076
7077 2015-11-22 Doug Evans <xdje42@gmail.com>
7078
7079 * target.h: #include <sys/types.h>.
7080
7081 2015-11-19 Pedro Alves <palves@redhat.com>
7082
7083 * linux-low.c (linux_process_qsupported): Change prototype.
7084 Adjust.
7085 * linux-low.h (struct linux_target_ops) <process_qsupported>:
7086 Change prototype.
7087 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
7088 and adjust to loop over all features.
7089 * server.c (handle_query) <qSupported>: Adjust to call
7090 target_process_qsupported once, passing it a vector of unprocessed
7091 features.
7092 * target.h (struct target_ops) <process_qsupported>: Change
7093 prototype.
7094 (target_process_qsupported): Adjust.
7095
7096 2015-11-19 Pedro Alves <palves@redhat.com>
7097
7098 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
7099 mode.
7100 * configure: Regenerate.
7101
7102 2015-11-19 Pedro Alves <palves@redhat.com>
7103
7104 * configure: Regenerate.
7105
7106 2015-11-19 Yao Qi <yao.qi@linaro.org>
7107
7108 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
7109 type to uint32_t.
7110
7111 2015-11-19 Yao Qi <yao.qi@linaro.org>
7112
7113 * linux-aarch64-low.c (enum aarch64_operand_type): New.
7114 (struct aarch64_operand): Move enum out.
7115
7116 2015-11-19 Yao Qi <yao.qi@linaro.org>
7117
7118 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
7119 struct user_fpsimd_state *.
7120 (aarch64_store_fpregset): Likewise.
7121
7122 2015-11-19 Yao Qi <yao.qi@linaro.org>
7123
7124 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
7125 struct user_pt_regs *.
7126 (aarch64_store_gregset): Likewise.
7127
7128 2015-11-18 Pedro Alves <palves@redhat.com>
7129
7130 * Makefile.in (all_object_files): Add $IPA_OBJS.
7131
7132 2015-11-17 Pedro Alves <palves@redhat.com>
7133
7134 * win32-low.c (win32_resume): Use gdb_signal_from_host,
7135 GDB_SIGNAL_0 and gdb_signal_to_string.
7136
7137 2015-11-17 Pedro Alves <palves@redhat.com>
7138
7139 * win32-low.c (handle_output_debug_string): Remove parameter.
7140 (win32_kill): Remove our_status local and adjust call to
7141 handle_output_debug_string.
7142 (get_child_debug_event): Adjust call to
7143 handle_output_debug_string.
7144
7145 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
7146
7147 * linux-mips-low.c (mips_fill_gregset): Add cast.
7148 (mips_store_gregset): Likewise.
7149 (mips_fill_fpregset): Likewise.
7150 (mips_store_fpregset): Likewise.
7151
7152 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
7153
7154 * linux-mips-low.c (mips_add_watchpoint): Rename private to
7155 priv.
7156
7157 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
7158
7159 * linux-mips-low.c (mips_linux_new_thread): Change type of
7160 watch_type to enum target_hw_bp_type.
7161
7162 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
7163
7164 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
7165 Change return type to arm_hwbp_type.
7166
7167 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
7168
7169 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
7170 (arm_store_gregset): Likewise.
7171 * linux-arm-low.c (arm_get_hwcap): Likewise.
7172 (arm_read_description): Likewise.
7173
7174 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
7175
7176 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
7177
7178 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
7179
7180 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
7181 (ppc_fill_vsxregset): Likewise.
7182 (ppc_store_vsxregset): Likewise.
7183 (ppc_fill_vrregset): Likewise.
7184 (ppc_store_vrregset): Likewise.
7185 (ppc_fill_evrregset): Likewise.
7186 (ppc_store_evrregset): Likewise.
7187
7188 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
7189
7190 * linux-ppc-low.c (ppc_usrregs_info): Remove
7191 forward-declaration.
7192 (ppc_arch_setup): Move lower in file.
7193
7194 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
7195
7196 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
7197 (ps_pdwrite): Likewise.
7198
7199 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
7200
7201 * linux-arm-low.c (arm_new_thread): Move pointer dereference
7202 to after assert checks.
7203
7204 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
7205
7206 * proc-service.c (ps_pdread): Add/adjust casts.
7207 (ps_pdwrite): Add/adjust casts.
7208
7209 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
7210
7211 * server.c (handle_search_memory_1): Cast return value of
7212 memmem.
7213
7214 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
7215
7216 * server.c (write_qxfer_response): Change type of data to
7217 gdb_byte *.
7218
7219 2015-10-29 Pedro Alves <palves@redhat.com>
7220
7221 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
7222
7223 2015-10-29 Pedro Alves <palves@redhat.com>
7224
7225 * tracepoint.c (clear_installed_tracepoints): Add casts.
7226
7227 2015-10-29 Pedro Alves <palves@redhat.com>
7228
7229 * server.c (handle_v_cont, process_serial_event): Add enum
7230 gdb_signal casts to signal parsing code.
7231
7232 2015-10-29 Pedro Alves <palves@redhat.com>
7233
7234 * linux-low.h (NULL_REGSET): Define.
7235 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
7236 * linux-arm-low.c (arm_regsets): Likewise.
7237 * linux-crisv32-low.c (cris_regsets): Likewise.
7238 * linux-m68k-low.c (m68k_regsets): Likewise.
7239 * linux-mips-low.c (mips_regsets): Likewise.
7240 * linux-nios2-low.c (nios2_regsets): Likewise.
7241 * linux-ppc-low.c (ppc_regsets): Likewise.
7242 * linux-s390-low.c (s390_regsets): Likewise.
7243 * linux-sh-low.c (sh_regsets): Likewise.
7244 * linux-sparc-low.c (sparc_regsets): Likewise.
7245 * linux-tic6x-low.c (tic6x_regsets): Likewise.
7246 * linux-tile-low.c (tile_regsets): Likewise.
7247 * linux-x86-low.c (x86_regsets): Likewise.
7248 * linux-xtensa-low.c (xtensa_regsets): Likewise.
7249
7250 2015-10-29 Pedro Alves <palves@redhat.com>
7251
7252 * linux-low.h (NULL_REGSET): Define.
7253 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
7254 * linux-arm-low.c (arm_regsets): Likewise.
7255 * linux-crisv32-low.c (cris_regsets): Likewise.
7256 * linux-m68k-low.c (m68k_regsets): Likewise.
7257 * linux-mips-low.c (mips_regsets): Likewise.
7258 * linux-nios2-low.c (nios2_regsets): Likewise.
7259 * linux-ppc-low.c (ppc_regsets): Likewise.
7260 * linux-s390-low.c (s390_regsets): Likewise.
7261 * linux-sh-low.c (sh_regsets): Likewise.
7262 * linux-sparc-low.c (sparc_regsets): Likewise.
7263 * linux-tic6x-low.c (tic6x_regsets): Likewise.
7264 * linux-tile-low.c (tile_regsets): Likewise.
7265 * linux-x86-low.c (x86_regsets): Likewise.
7266 * linux-xtensa-low.c (xtensa_regsets): Likewise.
7267
7268 2015-10-26 Doug Evans <dje@google.com>
7269
7270 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
7271
7272 2015-10-26 Doug Evans <dje@google.com>
7273
7274 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
7275
7276 2015-10-26 Doug Evans <dje@google.com>
7277
7278 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
7279 for debug_printf.
7280 (attach_thread, find_new_threads_callback): Ditto.
7281
7282 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
7283
7284 * mem-break.h (set_breakpoint_data): Remove.
7285
7286 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
7287
7288 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
7289 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
7290 (initialize_low): Remove set_breakpoint_data call.
7291 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
7292 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
7293 (initialize_low): Remove set_breakpoint_data call.
7294 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
7295 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
7296 (initialize_low): Remove set_breakpoint_data call.
7297
7298 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
7299
7300 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
7301 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
7302 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
7303 * target.h (target_breakpoint_kind_from_pc): New macro.
7304
7305 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
7306
7307 * linux-low.c (default_breakpoint_kind_from_pc): New function.
7308 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
7309 the default breakpoint kind.
7310
7311 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
7312
7313 * linux-arm-low.c (arm_supports_z_point_type): Add software
7314 breakpoint support.
7315
7316 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
7317
7318 * linux-arm-low.c: Refactor breakpoint definitions.
7319 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
7320 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
7321
7322 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
7323
7324 * Makefile.in: Add arm.c/o.
7325 * configure.srv: Likewise.
7326 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
7327 (arm_breakpoint_kind_from_pc): New function.
7328 (arm_sw_breakpoint_from_kind): Return proper kind.
7329 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
7330
7331 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
7332
7333 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
7334 removal.
7335 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
7336 (struct raw_breakpoint) <size>: Remove.
7337 (struct raw_breakpoint) <kind>: Add.
7338 (bp_size): New function.
7339 (bp_opcode): Likewise.
7340 (find_raw_breakpoint_at): Adjust for kind.
7341 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
7342 (remove_memory_breakpoint): Adjust for kind call bp_size.
7343 (set_raw_breakpoint_at): Adjust for kind.
7344 (set_breakpoint): Likewise.
7345 (set_breakpoint_at): Call breakpoint_kind_from_pc.
7346 (delete_raw_breakpoint): Adjust for kind.
7347 (delete_breakpoint): Likewise.
7348 (find_gdb_breakpoint): Likewise.
7349 (set_gdb_breakpoint_1): Likewise.
7350 (set_gdb_breakpoint): Likewise.
7351 (delete_gdb_breakpoint_1): Likewise.
7352 (delete_gdb_breakpoint): Likewise.
7353 (uninsert_raw_breakpoint): Likewise.
7354 (reinsert_raw_breakpoint): Likewise.
7355 (set_breakpoint_data): Remove.
7356 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
7357 (check_mem_read): Adjust for kind call bp_size.
7358 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
7359 (clone_one_breakpoint): Adjust for kind.
7360 * mem-break.h (set_gdb_breakpoint): Likewise.
7361 (delete_gdb_breakpoint): Likewise.
7362 * server.c (process_serial_event): Likewise.
7363
7364 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
7365
7366 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
7367 (struct linux_target_ops) <breakpoint>: Remove.
7368 (struct linux_target_ops) <breakpoint_len>: Remove.
7369 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7370 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7371 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
7372 (arm_sw_breakpoint_from_kind): New function.
7373 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
7374 (struct linux_target_ops) <breakpoint>: Remove.
7375 (struct linux_target_ops) <breakpoint_len>: Remove.
7376 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7377 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7378 * linux-cris-low.c (cris_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-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
7384 (struct linux_target_ops) <breakpoint>: Remove.
7385 (struct linux_target_ops) <breakpoint_len>: Remove.
7386 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7387 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7388 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
7389 and sw_breakpoint_from_kind to increment the pc.
7390 (linux_breakpoint_kind_from_pc): New function.
7391 (linux_sw_breakpoint_from_kind): New function.
7392 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
7393 (initialize_low): Call breakpoint_kind_from_pc and
7394 sw_breakpoint_from_kind to replace breakpoint_data/len.
7395 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
7396 New field.
7397 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
7398 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
7399 (struct linux_target_ops) <breakpoint>: Remove.
7400 (struct linux_target_ops) <breakpoint_len>: Remove.
7401 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7402 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7403 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
7404 (struct linux_target_ops) <breakpoint>: Remove.
7405 (struct linux_target_ops) <breakpoint_len>: Remove.
7406 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7407 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7408 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
7409 (struct linux_target_ops) <breakpoint>: Remove.
7410 (struct linux_target_ops) <breakpoint_len>: Remove.
7411 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7412 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7413 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
7414 (struct linux_target_ops) <breakpoint>: Remove.
7415 (struct linux_target_ops) <breakpoint_len>: Remove.
7416 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7417 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7418 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
7419 (struct linux_target_ops) <breakpoint>: Remove.
7420 (struct linux_target_ops) <breakpoint_len>: Remove.
7421 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7422 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7423 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
7424 (struct linux_target_ops) <breakpoint>: Remove.
7425 (struct linux_target_ops) <breakpoint_len>: Remove.
7426 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7427 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7428 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
7429 (struct linux_target_ops) <breakpoint>: Remove.
7430 (struct linux_target_ops) <breakpoint_len>: Remove.
7431 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7432 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7433 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
7434 (struct linux_target_ops) <breakpoint>: Remove.
7435 (struct linux_target_ops) <breakpoint_len>: Remove.
7436 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7437 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7438 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
7439 (struct linux_target_ops) <breakpoint>: Remove.
7440 (struct linux_target_ops) <breakpoint_len>: Remove.
7441 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7442 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7443 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
7444 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
7445 (struct linux_target_ops) <breakpoint>: Remove.
7446 (struct linux_target_ops) <breakpoint_len>: Remove.
7447 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7448 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7449 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
7450 (struct linux_target_ops) <breakpoint>: Remove.
7451 (struct linux_target_ops) <breakpoint_len>: Remove.
7452 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7453 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7454
7455 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
7456
7457 * linux-cris-low.c (cris_get_pc): Remove void arg.
7458
7459 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
7460
7461 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
7462 variable name.
7463
7464 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
7465
7466 * inferiors.c (thread_pid_matches_callback): New function.
7467 (find_thread_process): New function.
7468 (remove_thread): Reset current_thread.
7469 (remove_process): Assert threads have been removed first.
7470
7471 2015-10-15 Yao Qi <yao.qi@linaro.org>
7472
7473 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
7474 if it is 3.
7475 (aarch64_remove_point): Likewise.
7476 * regcache.c (regcache_register_size): New function.
7477
7478 2015-10-12 Yao Qi <yao.qi@linaro.org>
7479
7480 * linux-aarch64-low.c: Update all callers as emit_load_store
7481 is renamed to aarch64_emit_load_store.
7482
7483 2015-10-12 Yao Qi <yao.qi@linaro.org>
7484
7485 * linux-aarch64-low.c: Update all callers of function renaming
7486 from emit_insn to aarch64_emit_insn.
7487
7488 2015-10-12 Yao Qi <yao.qi@linaro.org>
7489
7490 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
7491 arch/aarch64-insn.h.
7492 (struct aarch64_memory_operand): Likewise.
7493 (ENCODE): Likewise.
7494 (emit_insn): Move to arch/aarch64-insn.c.
7495 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
7496 (emit_load_store): Move to arch/aarch64-insn.c.
7497 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
7498 (can_encode_int32): Remove.
7499
7500 2015-10-12 Yao Qi <yao.qi@linaro.org>
7501
7502 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
7503 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
7504 (aarch64_relocate_instruction): Likewise.
7505 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
7506 (struct aarch64_insn_visitor): Likewise.
7507
7508 2015-10-12 Yao Qi <yao.qi@linaro.org>
7509
7510 * linux-aarch64-low.c (struct aarch64_insn_data): New.
7511 (struct aarch64_insn_visitor): New.
7512 (struct aarch64_insn_relocation_data): New.
7513 (aarch64_ftrace_insn_reloc_b): New function.
7514 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
7515 (aarch64_ftrace_insn_reloc_cb): Likewise.
7516 (aarch64_ftrace_insn_reloc_tb): Likewise.
7517 (aarch64_ftrace_insn_reloc_adr): Likewise.
7518 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
7519 (aarch64_ftrace_insn_reloc_others): Likewise.
7520 (visitor): New.
7521 (aarch64_relocate_instruction): Use visitor.
7522
7523 2015-10-12 Yao Qi <yao.qi@linaro.org>
7524
7525 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
7526 int. Add argument buf.
7527 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
7528 aarch64_relocate_instruction.
7529
7530 2015-10-12 Yao Qi <yao.qi@linaro.org>
7531
7532 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
7533 argument insn. Remove local variable insn. Don't call
7534 target_read_uint32.
7535 (aarch64_install_fast_tracepoint_jump_pad): Call
7536 target_read_uint32.
7537
7538 2015-09-30 Yao Qi <yao.qi@linaro.org>
7539
7540 * linux-aarch64-low.c (emit_movk): Shorten a long line.
7541 (emit_load_store_pair): Likewise.
7542
7543 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
7544
7545 * dll.c (match_dll): Add cast(s).
7546 (unloaded_dll): Likewise.
7547 * linux-low.c (second_thread_of_pid_p): Likewise.
7548 (delete_lwp_callback): Likewise.
7549 (count_events_callback): Likewise.
7550 (select_event_lwp_callback): Likewise.
7551 (linux_set_resume_request): Likewise.
7552 * server.c (accumulate_file_name_length): Likewise.
7553 (emit_dll_description): Likewise.
7554 (handle_qxfer_threads_worker): Likewise.
7555 (visit_actioned_threads): Likewise.
7556 * thread-db.c (any_thread_of): Likewise.
7557 * tracepoint.c (same_process_p): Likewise.
7558 (match_blocktype): Likewise.
7559 (build_traceframe_info_xml): Likewise.
7560
7561 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
7562
7563 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
7564 assignment.
7565 (gdb_unparse_agent_expr): Likewise.
7566 * hostio.c (require_data): Likewise.
7567 (handle_pread): Likewise.
7568 * linux-low.c (disable_regset): Likewise.
7569 (fetch_register): Likewise.
7570 (store_register): Likewise.
7571 (get_dynamic): Likewise.
7572 (linux_qxfer_libraries_svr4): Likewise.
7573 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
7574 (set_fast_tracepoint_jump): Likewise.
7575 (uninsert_fast_tracepoint_jumps_at): Likewise.
7576 (reinsert_fast_tracepoint_jumps_at): Likewise.
7577 (validate_inserted_breakpoint): Likewise.
7578 (clone_agent_expr): Likewise.
7579 * regcache.c (init_register_cache): Likewise.
7580 * remote-utils.c (putpkt_binary_1): Likewise.
7581 (decode_M_packet): Likewise.
7582 (decode_X_packet): Likewise.
7583 (look_up_one_symbol): Likewise.
7584 (relocate_instruction): Likewise.
7585 (monitor_output): Likewise.
7586 * server.c (handle_search_memory): Likewise.
7587 (handle_qxfer_exec_file): Likewise.
7588 (handle_qxfer_libraries): Likewise.
7589 (handle_qxfer): Likewise.
7590 (handle_query): Likewise.
7591 (handle_v_cont): Likewise.
7592 (handle_v_run): Likewise.
7593 (captured_main): Likewise.
7594 * target.c (write_inferior_memory): Likewise.
7595 * thread-db.c (try_thread_db_load_from_dir): Likewise.
7596 * tracepoint.c (init_trace_buffer): Likewise.
7597 (add_tracepoint_action): Likewise.
7598 (add_traceframe): Likewise.
7599 (add_traceframe_block): Likewise.
7600 (cmd_qtdpsrc): Likewise.
7601 (cmd_qtdv): Likewise.
7602 (cmd_qtstatus): Likewise.
7603 (response_source): Likewise.
7604 (response_tsv): Likewise.
7605 (cmd_qtnotes): Likewise.
7606 (gdb_collect): Likewise.
7607 (initialize_tracepoint): Likewise.
7608
7609 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
7610
7611 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
7612 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
7613 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
7614 <NOP>: New.
7615 (enum aarch64_condition_codes): New enum.
7616 (w0): New static global.
7617 (fp): Likewise.
7618 (lr): Likewise.
7619 (struct aarch64_memory_operand) <type>: New
7620 MEMORY_OPERAND_POSTINDEX type.
7621 (postindex_memory_operand): New helper function.
7622 (emit_ret): New function.
7623 (emit_load_store_pair): New function, factored out of emit_stp
7624 with support for MEMORY_OPERAND_POSTINDEX.
7625 (emit_stp): Rewrite using emit_load_store_pair.
7626 (emit_ldp): New function.
7627 (emit_load_store): Likewise.
7628 (emit_ldr): Mention post-index instruction in comment.
7629 (emit_ldrh): New function.
7630 (emit_ldrb): New function.
7631 (emit_ldrsw): Mention post-index instruction in comment.
7632 (emit_str): Likewise.
7633 (emit_subs): New function.
7634 (emit_cmp): Likewise.
7635 (emit_and): Likewise.
7636 (emit_orr): Likewise.
7637 (emit_orn): Likewise.
7638 (emit_eor): Likewise.
7639 (emit_mvn): Likewise.
7640 (emit_lslv): Likewise.
7641 (emit_lsrv): Likewise.
7642 (emit_asrv): Likewise.
7643 (emit_mul): Likewise.
7644 (emit_sbfm): Likewise.
7645 (emit_sbfx): Likewise.
7646 (emit_ubfm): Likewise.
7647 (emit_ubfx): Likewise.
7648 (emit_csinc): Likewise.
7649 (emit_cset): Likewise.
7650 (emit_nop): Likewise.
7651 (emit_ops_insns): New helper function.
7652 (emit_pop): Likewise.
7653 (emit_push): Likewise.
7654 (aarch64_emit_prologue): New function.
7655 (aarch64_emit_epilogue): Likewise.
7656 (aarch64_emit_add): Likewise.
7657 (aarch64_emit_sub): Likewise.
7658 (aarch64_emit_mul): Likewise.
7659 (aarch64_emit_lsh): Likewise.
7660 (aarch64_emit_rsh_signed): Likewise.
7661 (aarch64_emit_rsh_unsigned): Likewise.
7662 (aarch64_emit_ext): Likewise.
7663 (aarch64_emit_log_not): Likewise.
7664 (aarch64_emit_bit_and): Likewise.
7665 (aarch64_emit_bit_or): Likewise.
7666 (aarch64_emit_bit_xor): Likewise.
7667 (aarch64_emit_bit_not): Likewise.
7668 (aarch64_emit_equal): Likewise.
7669 (aarch64_emit_less_signed): Likewise.
7670 (aarch64_emit_less_unsigned): Likewise.
7671 (aarch64_emit_ref): Likewise.
7672 (aarch64_emit_if_goto): Likewise.
7673 (aarch64_emit_goto): Likewise.
7674 (aarch64_write_goto_address): Likewise.
7675 (aarch64_emit_const): Likewise.
7676 (aarch64_emit_call): Likewise.
7677 (aarch64_emit_reg): Likewise.
7678 (aarch64_emit_pop): Likewise.
7679 (aarch64_emit_stack_flush): Likewise.
7680 (aarch64_emit_zero_ext): Likewise.
7681 (aarch64_emit_swap): Likewise.
7682 (aarch64_emit_stack_adjust): Likewise.
7683 (aarch64_emit_int_call_1): Likewise.
7684 (aarch64_emit_void_call_2): Likewise.
7685 (aarch64_emit_eq_goto): Likewise.
7686 (aarch64_emit_ne_goto): Likewise.
7687 (aarch64_emit_lt_goto): Likewise.
7688 (aarch64_emit_le_goto): Likewise.
7689 (aarch64_emit_gt_goto): Likewise.
7690 (aarch64_emit_ge_got): Likewise.
7691 (aarch64_emit_ops_impl): New static global variable.
7692 (aarch64_emit_ops): New target function, return
7693 &aarch64_emit_ops_impl.
7694 (struct linux_target_ops): Install it.
7695
7696 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
7697
7698 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
7699 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
7700 aarch64-ipa.o.
7701 * linux-aarch64-ipa.c: New file.
7702 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
7703 and endian.h.
7704 (aarch64_get_thread_area): New target method.
7705 (extract_signed_bitfield): New helper function.
7706 (aarch64_decode_ldr_literal): New function.
7707 (enum aarch64_opcodes): New enum.
7708 (struct aarch64_register): New struct.
7709 (struct aarch64_operand): New struct.
7710 (x0): New static global.
7711 (x1): Likewise.
7712 (x2): Likewise.
7713 (x3): Likewise.
7714 (x4): Likewise.
7715 (w2): Likewise.
7716 (ip0): Likewise.
7717 (sp): Likewise.
7718 (xzr): Likewise.
7719 (aarch64_register): New helper function.
7720 (register_operand): Likewise.
7721 (immediate_operand): Likewise.
7722 (struct aarch64_memory_operand): New struct.
7723 (offset_memory_operand): New helper function.
7724 (preindex_memory_operand): Likewise.
7725 (enum aarch64_system_control_registers): New enum.
7726 (ENCODE): New macro.
7727 (emit_insn): New helper function.
7728 (emit_b): New function.
7729 (emit_bcond): Likewise.
7730 (emit_cb): Likewise.
7731 (emit_tb): Likewise.
7732 (emit_blr): Likewise.
7733 (emit_stp): Likewise.
7734 (emit_ldp_q_offset): Likewise.
7735 (emit_stp_q_offset): Likewise.
7736 (emit_load_store): Likewise.
7737 (emit_ldr): Likewise.
7738 (emit_ldrsw): Likewise.
7739 (emit_str): Likewise.
7740 (emit_ldaxr): Likewise.
7741 (emit_stxr): Likewise.
7742 (emit_stlr): Likewise.
7743 (emit_data_processing_reg): Likewise.
7744 (emit_data_processing): Likewise.
7745 (emit_add): Likewise.
7746 (emit_sub): Likewise.
7747 (emit_mov): Likewise.
7748 (emit_movk): Likewise.
7749 (emit_mov_addr): Likewise.
7750 (emit_mrs): Likewise.
7751 (emit_msr): Likewise.
7752 (emit_sevl): Likewise.
7753 (emit_wfe): Likewise.
7754 (append_insns): Likewise.
7755 (can_encode_int32_in): New helper function.
7756 (aarch64_relocate_instruction): New function.
7757 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
7758 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
7759 (struct linux_target_ops): Install aarch64_get_thread_area,
7760 aarch64_install_fast_tracepoint_jump_pad and
7761 aarch64_get_min_fast_tracepoint_insn_len.
7762
7763 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
7764
7765 * Makefile.in (aarch64-insn.o): New rule.
7766 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
7767
7768 2015-09-21 Yao Qi <yao.qi@linaro.org>
7769
7770 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
7771
7772 2015-09-21 Yao Qi <yao.qi@linaro.org>
7773
7774 * tracepoint.c (max_jump_pad_size): Remove.
7775
7776 2015-09-18 Yao Qi <yao.qi@linaro.org>
7777
7778 * linux-aarch64-low.c: Don't include sys/uio.h.
7779 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
7780
7781 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
7782
7783 * tracepoint.c (eval_result_type): Change prototype.
7784 (condition_true_at_tracepoint): Fix argument to compiled_cond.
7785
7786 2015-09-15 Pedro Alves <palves@redhat.com>
7787
7788 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
7789 Check whether to report exec events instead of checking whether
7790 multiprocess is enabled.
7791
7792 2015-09-15 Pedro Alves <palves@redhat.com>
7793
7794 PR remote/18965
7795 * remote-utils.c (prepare_resume_reply): Merge
7796 TARGET_WAITKIND_VFORK_DONE switch case with the
7797 TARGET_WAITKIND_FORKED case.
7798
7799 2015-09-15 Yao Qi <yao.qi@linaro.org>
7800
7801 * server.c (handle_query): Check string comparison using
7802 "else if" instead of "if".
7803
7804 2015-09-15 Yao Qi <yao.qi@linaro.org>
7805
7806 * server.c (vCont_supported): New global variable.
7807 (handle_query): Set vCont_supported to 1 if "vContSupported+"
7808 matches. Append ";vContSupported+" to own_buf.
7809 (handle_v_requests): Append ";s;S" to own_buf if target supports
7810 hardware single step or vCont_supported is false.
7811 (capture_main): Set vCont_supported to zero.
7812
7813 2015-09-15 Yao Qi <yao.qi@linaro.org>
7814
7815 * linux-low.c (linux_supports_conditional_breakpoints): Rename
7816 it to ...
7817 (linux_supports_hardware_single_step): ... New function.
7818 (linux_target_ops): Update.
7819 * lynx-low.c (lynx_target_ops): Set field
7820 supports_hardware_single_step to target_can_do_hardware_single_step.
7821 * nto-low.c (nto_target_ops): Likewise.
7822 * spu-low.c (spu_target_ops): Likewise.
7823 * win32-low.c (win32_target_ops): Likewise.
7824 * target.c (target_can_do_hardware_single_step): New function.
7825 * target.h (struct target_ops) <supports_conditional_breakpoints>:
7826 Remove. <supports_hardware_single_step>: New field.
7827 (target_supports_conditional_breakpoints): Remove.
7828 (target_supports_hardware_single_step): New macro.
7829 (target_can_do_hardware_single_step): Declare.
7830 * server.c (handle_query): Use target_supports_hardware_single_step
7831 instead of target_supports_conditional_breakpoints.
7832
7833 2015-09-15 Yao Qi <yao.qi@linaro.org>
7834
7835 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
7836 function.
7837 (struct linux_target_ops the_low_target): Install
7838 aarch64_linux_siginfo_fixup.
7839
7840 2015-09-11 Don Breazeal <donb@codesourcery.com>
7841 Luis Machado <lgustavo@codesourcery.com>
7842
7843 * linux-low.c (linux_mourn): Static declaration.
7844 (linux_arch_setup): Move in front of
7845 handle_extended_wait.
7846 (linux_arch_setup_thread): New function.
7847 (handle_extended_wait): Handle exec events. Call
7848 linux_arch_setup_thread. Make event_lwp argument a
7849 pointer-to-a-pointer.
7850 (check_zombie_leaders): Do not check stopped threads.
7851 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
7852 (linux_low_filter_event): Add lwp and thread for exec'ing
7853 non-leader thread if leader thread has been deleted.
7854 Refactor code into linux_arch_setup_thread and call it.
7855 Pass child lwp pointer by reference to handle_extended_wait.
7856 (linux_wait_for_event_filtered): Update comment.
7857 (linux_wait_1): Prevent clobbering exec event status.
7858 (linux_supports_exec_events): New function.
7859 (linux_target_ops) <supports_exec_events>: Initialize new member.
7860 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
7861 new member.
7862 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
7863 * server.c (report_exec_events): New global variable.
7864 (handle_query): Handle qSupported query for exec-events feature.
7865 (captured_main): Initialize report_exec_events.
7866 * server.h (report_exec_events): Declare new global variable.
7867 * target.h (struct target_ops) <supports_exec_events>: New
7868 member.
7869 (target_supports_exec_events): New macro.
7870 * win32-low.c (win32_target_ops) <supports_exec_events>:
7871 Initialize new member.
7872
7873 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
7874
7875 * linux-low.c (linux_low_enable_btrace): Remove.
7876 (linux_target_ops): Replace linux_low_enable_btrace with
7877 linux_enable_btrace.
7878
7879 2015-09-03 Yao Qi <yao.qi@linaro.org>
7880
7881 * linux-aarch64-low.c (aarch64_insert_point): Call
7882 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
7883 returns true.
7884
7885 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
7886
7887 * linux-low.c (check_stopped_by_breakpoint): Use
7888 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
7889
7890 2015-08-27 Pedro Alves <palves@redhat.com>
7891
7892 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
7893
7894 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
7895
7896 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
7897 the XNEW-family equivalent.
7898 (compile_bytecodes): Likewise.
7899 * dll.c (loaded_dll): Likewise.
7900 * event-loop.c (append_callback_event): Likewise.
7901 (create_file_handler): Likewise.
7902 (create_file_event): Likewise.
7903 * hostio.c (handle_open): Likewise.
7904 * inferiors.c (add_thread): Likewise.
7905 (add_process): Likewise.
7906 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
7907 * linux-arm-low.c (arm_new_process): Likewise.
7908 (arm_new_thread): Likewise.
7909 * linux-low.c (add_to_pid_list): Likewise.
7910 (linux_add_process): Likewise.
7911 (handle_extended_wait): Likewise.
7912 (add_lwp): Likewise.
7913 (enqueue_one_deferred_signal): Likewise.
7914 (enqueue_pending_signal): Likewise.
7915 (linux_resume_one_lwp_throw): Likewise.
7916 (linux_resume_one_thread): Likewise.
7917 (linux_read_memory): Likewise.
7918 (linux_write_memory): Likewise.
7919 * linux-mips-low.c (mips_linux_new_process): Likewise.
7920 (mips_linux_new_thread): Likewise.
7921 (mips_add_watchpoint): Likewise.
7922 * linux-x86-low.c (initialize_low_arch): Likewise.
7923 * lynx-low.c (lynx_add_process): Likewise.
7924 * mem-break.c (set_raw_breakpoint_at): Likewise.
7925 (set_breakpoint): Likewise.
7926 (add_condition_to_breakpoint): Likewise.
7927 (add_commands_to_breakpoint): Likewise.
7928 (clone_agent_expr): Likewise.
7929 (clone_one_breakpoint): Likewise.
7930 * regcache.c (new_register_cache): Likewise.
7931 * remote-utils.c (look_up_one_symbol): Likewise.
7932 * server.c (queue_stop_reply): Likewise.
7933 (start_inferior): Likewise.
7934 (queue_stop_reply_callback): Likewise.
7935 (handle_target_event): Likewise.
7936 * spu-low.c (fetch_ppc_memory): Likewise.
7937 (store_ppc_memory): Likewise.
7938 * target.c (set_target_ops): Likewise.
7939 * thread-db.c (thread_db_load_search): Likewise.
7940 (try_thread_db_load_1): Likewise.
7941 * tracepoint.c (add_tracepoint): Likewise.
7942 (add_tracepoint_action): Likewise.
7943 (create_trace_state_variable): Likewise.
7944 (cmd_qtdpsrc): Likewise.
7945 (cmd_qtro): Likewise.
7946 (add_while_stepping_state): Likewise.
7947 * win32-low.c (child_add_thread): Likewise.
7948 (get_image_name): Likewise.
7949
7950 2015-08-25 Yao Qi <yao.qi@linaro.org>
7951
7952 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
7953
7954 2015-08-25 Yao Qi <yao.qi@linaro.org>
7955
7956 * Makefile.in (aarch64-linux.o): New rule.
7957 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
7958 srv_tgtobj.
7959 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
7960 (aarch64_init_debug_reg_state): Make it extern.
7961 (aarch64_linux_prepare_to_resume): Remove.
7962
7963 2015-08-25 Yao Qi <yao.qi@linaro.org>
7964
7965 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
7966 lwp_arch_private_info and ptid_of_lwp.
7967
7968 2015-08-25 Yao Qi <yao.qi@linaro.org>
7969
7970 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
7971 Find proc_info by find_process_pid. All callers updated.
7972
7973 2015-08-25 Yao Qi <yao.qi@linaro.org>
7974
7975 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
7976 Remove.
7977 (debug_reg_change_callback): Remove.
7978 (aarch64_notify_debug_reg_change): Remove.
7979
7980 2015-08-25 Yao Qi <yao.qi@linaro.org>
7981
7982 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
7983 Call current_lwp_ptid.
7984
7985 2015-08-25 Yao Qi <yao.qi@linaro.org>
7986
7987 * linux-aarch64-low.c (debug_reg_change_callback): Use
7988 debug_printf.
7989
7990 2015-08-25 Yao Qi <yao.qi@linaro.org>
7991
7992 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
7993
7994 2015-08-25 Yao Qi <yao.qi@linaro.org>
7995
7996 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
7997
7998 2015-08-25 Yao Qi <yao.qi@linaro.org>
7999
8000 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
8001 the code.
8002
8003 2015-08-25 Yao Qi <yao.qi@linaro.org>
8004
8005 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
8006 Remove.
8007 (debug_reg_change_callback): Remove argument entry and add argument
8008 lwp. Remove local variable thread. Don't print thread id in the
8009 debugging output. Don't check whether pid of thread equals to pid.
8010 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
8011 iterate_over_lwps instead find_inferior.
8012
8013 2015-08-24 Pedro Alves <palves@redhat.com>
8014
8015 * inferiors.c (get_first_process): New function.
8016 * inferiors.h (get_first_process): New declaration.
8017 * remote-utils.c (read_ptid): Default to the first process in the
8018 list, instead of to the current thread's process.
8019
8020 2015-08-24 Pedro Alves <palves@redhat.com>
8021
8022 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
8023 * event-loop.c: Likewise.
8024 * remote-utils.c: Likewise.
8025 * tracepoint.c: Likewise.
8026
8027 2015-08-24 Pedro Alves <palves@redhat.com>
8028
8029 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
8030 ptid_get_lwp.
8031
8032 2015-08-21 Pedro Alves <palves@redhat.com>
8033
8034 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
8035 instead of literal 1.
8036
8037 2015-08-21 Pedro Alves <palves@redhat.com>
8038
8039 * tdesc.c (default_description): Explicitly zero-initialize.
8040
8041 2015-08-21 Pedro Alves <palves@redhat.com>
8042
8043 PR gdb/18749
8044 * inferiors.c (remove_thread): Discard any pending stop reply for
8045 this thread.
8046 * server.c (remove_all_on_match_pid): Rename to ...
8047 (remove_all_on_match_ptid): ... this. Work with a filter ptid
8048 instead of a pid.
8049 (discard_queued_stop_replies): Change parameter to a ptid. Now
8050 extern.
8051 (handle_v_kill, kill_inferior_callback, captured_main)
8052 (process_serial_event): Adjust.
8053 * server.h (discard_queued_stop_replies): Declare.
8054
8055 2015-08-21 Pedro Alves <palves@redhat.com>
8056
8057 * linux-low.c (wait_for_sigstop): Always switch to no thread
8058 selected if the previously current thread dies.
8059 * lynx-low.c (lynx_request_interrupt): Use the first thread's
8060 process instead of the current thread's.
8061 * remote-utils.c (input_interrupt): Don't check if there's no
8062 current thread.
8063 * server.c (gdb_read_memory, gdb_write_memory): If setting the
8064 current thread to the general thread fails, error out.
8065 (handle_qxfer_auxv, handle_qxfer_libraries)
8066 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
8067 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
8068 (handle_query): Check if there's a thread selected instead of
8069 checking whether there's any thread in the thread list.
8070 (handle_qxfer_threads, handle_qxfer_btrace)
8071 (handle_qxfer_btrace_conf): Don't error out early if there's no
8072 thread in the thread list.
8073 (handle_v_cont, myresume): Don't set the current thread to the
8074 continue thread.
8075 (process_serial_event) <Hg handling>: Also set thread_id if the
8076 previous general thread is still alive.
8077 (process_serial_event) <g/G handling>: If setting the current
8078 thread to the general thread fails, error out.
8079 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
8080 thread's lwp instead of the current thread's.
8081 * target.c (set_desired_thread): If the desired thread was not
8082 found, leave the current thread pointing to NULL. Return an int
8083 (boolean) indicating success.
8084 * target.h (set_desired_thread): Change return type to int.
8085
8086 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
8087
8088 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
8089 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
8090 #includes.
8091 (ps_get_thread_area): New function.
8092
8093 2015-08-19 Gary Benson <gbenson@redhat.com>
8094
8095 * hostio.c (handle_pread): Do not attempt to read more data
8096 than hostio_reply_with_data can fit in a packet.
8097
8098 2015-08-18 Joel Brobecker <brobecker@adacore.com>
8099
8100 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
8101
8102 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
8103
8104 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
8105
8106 2015-08-06 Pedro Alves <palves@redhat.com>
8107
8108 * tracepoint.c (expr_eval_result): Now an int.
8109
8110 2015-08-06 Pedro Alves <palves@redhat.com>
8111
8112 * gdbthread.h (struct regcache): Forward declare.
8113 (struct thread_info) <regcache_data>: Now a struct regcache
8114 pointer.
8115 * inferiors.c (inferior_regcache_data)
8116 (set_inferior_regcache_data): Now work with struct regcache
8117 pointers.
8118 * inferiors.h (struct regcache): Forward declare.
8119 (inferior_regcache_data, set_inferior_regcache_data): Now work
8120 with struct regcache pointers.
8121 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
8122 (free_register_cache_thread): Remove struct regcache pointer
8123 casts.
8124
8125 2015-08-06 Pedro Alves <palves@redhat.com>
8126
8127 * server.c (captured_main): On error, print the exception message
8128 to stderr, and if run_once is set, throw a quit.
8129
8130 2015-08-06 Pedro Alves <palves@redhat.com>
8131
8132 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
8133 the current thread.
8134
8135 2015-08-06 Pedro Alves <palves@redhat.com>
8136
8137 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
8138 reading beyond the passed in buffer length.
8139
8140 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
8141
8142 * tracepoint.c (symbol_list) <required>: Remove.
8143
8144 2015-08-06 Pedro Alves <palves@redhat.com>
8145
8146 * linux-low.c (handle_extended_wait): Set the fork child's suspend
8147 count if stopping and suspending threads.
8148 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
8149 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
8150 (linux_detach): Complete an ongoing step-over.
8151 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
8152 throughout.
8153 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
8154 (linux_wait_1): If passing a signal to the inferior after
8155 finishing a step-over, unsuspend and re-resume all lwps. If we
8156 see a single-step event but the thread should be continuing, don't
8157 pass the trap to gdb.
8158 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
8159 internal_error instead of gdb_assert.
8160 (enqueue_pending_signal): New function.
8161 (check_ptrace_stopped_lwp_gone): Add debug output.
8162 (start_step_over): Use internal_error instead of gdb_assert.
8163 (complete_ongoing_step_over): New function.
8164 (linux_resume_one_thread): Don't resume a suspended thread.
8165 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
8166 it stepping.
8167
8168 2015-08-06 Pedro Alves <palves@redhat.com>
8169
8170 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
8171 (linux_thread_alive): Use lwp_is_marked_dead.
8172 (extended_event_reported): Delete.
8173 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
8174 instead of extended_event_reported.
8175 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
8176 as well.
8177 (lwp_is_marked_dead): New function.
8178 (lwp_running): Use lwp_is_marked_dead.
8179 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
8180 comment.
8181
8182 2015-08-06 Pedro Alves <palves@redhat.com>
8183
8184 * linux-low.c (linux_wait_1): Move fork event output out of the
8185 !report_to_gdb check. Pass event_child->waitstatus to
8186 target_waitstatus_to_string instead of ourstatus.
8187
8188 2015-08-04 Yao Qi <yao.qi@linaro.org>
8189
8190 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
8191 if current_thread is 32 bit.
8192
8193 2015-08-04 Yao Qi <yao.qi@linaro.org>
8194
8195 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
8196 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
8197 * server.c (extended_protocol): Remove "static".
8198 * server.h (extended_protocol): Declare it.
8199
8200 2015-08-04 Yao Qi <yao.qi@linaro.org>
8201
8202 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
8203 both aarch64 and aarch32.
8204 (aarch64_set_pc): Likewise.
8205
8206 2015-08-04 Yao Qi <yao.qi@linaro.org>
8207
8208 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
8209 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
8210 arm-with-neon.xml to srv_xmlfiles.
8211 * linux-aarch64-low.c: Include linux-aarch32-low.h.
8212 (is_64bit_tdesc): New function.
8213 (aarch64_linux_read_description): New function.
8214 (aarch64_arch_setup): Call aarch64_linux_read_description.
8215 (regs_info): Rename to regs_info_aarch64.
8216 (aarch64_regs_info): Return right regs_info.
8217 (initialize_low_arch): Call initialize_low_arch_aarch32.
8218
8219 2015-08-04 Yao Qi <yao.qi@linaro.org>
8220
8221 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
8222 * linux-aarch32-low.c: New file.
8223 * linux-aarch32-low.h: New file.
8224 * linux-arm-low.c (arm_fill_gregset): Move it to
8225 linux-aarch32-low.c.
8226 (arm_store_gregset): Likewise.
8227 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
8228 (arm_store_vfpregset): Call arm_store_vfpregset_num.
8229 (arm_arch_setup): Check if PTRACE_GETREGSET works.
8230 (regs_info): Rename to regs_info_arm.
8231 (arm_regs_info): Return regs_info_aarch32 if
8232 have_ptrace_getregset is 1 and target description is
8233 arm_with_neon or arm_with_vfpv3.
8234 (initialize_low_arch): Don't call init_registers_arm_with_neon.
8235 Call initialize_low_arch_aarch32 instead.
8236
8237 2015-08-04 Yao Qi <yao.qi@linaro.org>
8238
8239 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
8240 * linux-low.c: ... here.
8241 * linux-low.h (have_ptrace_getregset): Declare it.
8242
8243 2015-08-04 Pedro Alves <palves@redhat.com>
8244
8245 * thread-db.c (struct thread_db): Use new typedefs.
8246 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
8247 CHK calls.
8248 (disable_thread_event_reporting): Cast result of dlsym to
8249 destination function pointer type.
8250 (thread_db_mourn): Use td_ta_delete_ftype.
8251
8252 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
8253
8254 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
8255 arch variant.
8256 (CDX_BREAKPOINT): Define for R2.
8257 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
8258 (the_low_target): Add comments.
8259
8260 2015-07-30 Yao Qi <yao.qi@linaro.org>
8261
8262 * linux-arm-low.c (arm_hwcap): Remove it.
8263 (arm_read_description): New local variable arm_hwcap. Don't
8264 set arm_hwcap to zero.
8265
8266 2015-07-30 Yao Qi <yao.qi@linaro.org>
8267
8268 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
8269 Use regcache->tdesc instead.
8270 (arm_store_wmmxregset): Likewise.
8271 (arm_fill_vfpregset): Likewise.
8272 (arm_store_vfpregset): Likewise.
8273
8274 2015-07-30 Yao Qi <yao.qi@linaro.org>
8275
8276 * linux-arm-low.c: Include arch/arm.h.
8277 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
8278 (arm_store_gregset): Likewise.
8279
8280 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
8281
8282 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
8283 ptrace's 4th parameter.
8284
8285 2015-07-27 Yao Qi <yao.qi@linaro.org>
8286
8287 * configure.srv (case aarch64*-*-linux*): Don't set
8288 srv_linux_usrregs.
8289
8290 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
8291
8292 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
8293 sys/ptrace.h.
8294 * linux-arm-low.c: Likewise.
8295 * linux-cris-low.c: Likewise.
8296 * linux-crisv32-low.c: Likewise.
8297 * linux-low.c: Likewise.
8298 * linux-m68k-low.c: Likewise.
8299 * linux-mips-low.c: Likewise.
8300 * linux-nios2-low.c: Likewise.
8301 * linux-s390-low.c: Likewise.
8302 * linux-sparc-low.c: Likewise.
8303 * linux-tic6x-low.c: Likewise.
8304 * linux-tile-low.c: Likewise.
8305 * linux-x86-low.c: Likewise.
8306
8307 2015-07-24 Pedro Alves <palves@redhat.com>
8308
8309 * config.in: Regenerate.
8310 * configure: Regenerate.
8311
8312 2015-07-24 Pedro Alves <palves@redhat.com>
8313
8314 * acinclude.m4: Include ../ptrace.m4.
8315 * configure.ac: Call GDB_AC_PTRACE.
8316 * config.in, configure: Regenerate.
8317
8318 2015-07-24 Yao Qi <yao.qi@linaro.org>
8319
8320 * linux-low.c (linux_create_inferior): Remove setting to
8321 proc->priv->new_inferior.
8322 (linux_attach): Likewise.
8323 (linux_low_filter_event): Likewise.
8324 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
8325
8326 2015-07-24 Yao Qi <yao.qi@linaro.org>
8327
8328 * linux-low.c (linux_arch_setup): New function.
8329 (linux_low_filter_event): If proc->tdesc is NULL and
8330 proc->attached is true, call the_low_target.arch_setup.
8331 Otherwise, keep status pending, and return.
8332 (linux_resume_one_lwp_throw): Don't call get_pc if
8333 thread->while_stepping isn't NULL. Don't call
8334 get_thread_regcache if proc->tdesc is NULL.
8335 (need_step_over_p): Return 0 if proc->tdesc is NULL.
8336 (linux_target_ops): Install arch_setup.
8337 * server.c (start_inferior): Call the_target->arch_setup.
8338 * target.h (struct target_ops) <arch_setup>: New field.
8339 (target_arch_setup): New marco.
8340 * lynx-low.c (lynx_target_ops): Update.
8341 * nto-low.c (nto_target_ops): Update.
8342 * spu-low.c (spu_target_ops): Update.
8343 * win32-low.c (win32_target_ops): Update.
8344
8345 2015-07-24 Yao Qi <yao.qi@linaro.org>
8346
8347 * linux-low.c (linux_add_process): Don't set
8348 proc->priv->new_inferior.
8349 (linux_create_inferior): Set proc->priv->new_inferior to 1.
8350 (linux_attach): Likewise.
8351
8352 2015-07-24 Yao Qi <yao.qi@linaro.org>
8353
8354 * server.c (start_inferior): Code refactor.
8355
8356 2015-07-24 Yao Qi <yao.qi@linaro.org>
8357
8358 * server.c (process_serial_event): Set general_thread.
8359
8360 2015-07-21 Yao Qi <yao.qi@linaro.org>
8361
8362 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
8363 aarch64_linux_get_debug_reg_capacity.
8364
8365 2015-07-17 Yao Qi <yao.qi@linaro.org>
8366
8367 * Makefile.in (aarch64-linux-hw-point.o): New rule.
8368 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
8369 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
8370 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
8371 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
8372 (AARCH64_HWP_ALIGNMENT): Likewise.
8373 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
8374 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
8375 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
8376 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
8377 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
8378 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
8379 (struct aarch64_debug_reg_state): Likewise.
8380 (struct arch_lwp_info): Likewise.
8381 (aarch64_align_watchpoint): Likewise.
8382 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
8383 (aarch64_watchpoint_length): Likewise.
8384 (aarch64_point_encode_ctrl_reg): Likewise
8385 (aarch64_point_is_aligned): Likewise.
8386 (aarch64_align_watchpoint): Likewise.
8387 (aarch64_linux_set_debug_regs):
8388 (aarch64_dr_state_insert_one_point): Likewise.
8389 (aarch64_dr_state_remove_one_point): Likewise.
8390 (aarch64_handle_breakpoint): Likewise.
8391 (aarch64_handle_aligned_watchpoint): Likewise.
8392 (aarch64_handle_unaligned_watchpoint): Likewise.
8393 (aarch64_handle_watchpoint): Likewise.
8394
8395 2015-07-17 Yao Qi <yao.qi@linaro.org>
8396
8397 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
8398 and don't aarch64_get_debug_reg_state. All callers update.
8399 (aarch64_handle_aligned_watchpoint): Likewise.
8400 (aarch64_handle_unaligned_watchpoint): Likewise.
8401 (aarch64_handle_watchpoint): Likewise.
8402 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
8403 (aarch64_remove_point): Likewise.
8404
8405 2015-07-17 Yao Qi <yao.qi@linaro.org>
8406
8407 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
8408 debug_printf.
8409 (aarch64_handle_unaligned_watchpoint): Likewise.
8410
8411 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
8412
8413 Revert the previous 3 commits:
8414 Move gdb_regex* to common/
8415 Move linux_find_memory_regions_full & co.
8416 gdbserver build-id attribute generator
8417
8418 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
8419 Jan Kratochvil <jan.kratochvil@redhat.com>
8420
8421 gdbserver build-id attribute generator.
8422 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
8423 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
8424 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
8425 (find_phdr): New.
8426 (get_dynamic): Use find_pdhr to traverse program headers.
8427 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
8428 (compare_mapping_entry_range, struct find_memory_region_callback_data)
8429 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
8430 (get_hex_build_id): New.
8431 (linux_qxfer_libraries_svr4): Add optional build-id attribute
8432 to reply XML document.
8433
8434 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
8435 Jan Kratochvil <jan.kratochvil@redhat.com>
8436
8437 * target.c: Include target/target-utils.h and fcntl.h.
8438 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
8439 (target_fileio_read_stralloc): New functions.
8440
8441 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
8442
8443 * Makefile.in (OBS): Add gdb_regex.o.
8444 (gdb_regex.o): New.
8445 * config.in: Rebuilt.
8446 * configure: Rebuilt.
8447
8448 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
8449 Jan Kratochvil <jan.kratochvil@redhat.com>
8450
8451 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
8452 * Makefile.in (OBS): Add target-utils.o.
8453 (linux-maps.o, target-utils.o): New.
8454 * configure.srv (srv_linux_obj): Add linux-maps.o.
8455
8456 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
8457
8458 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
8459 function, return 1.
8460 (the_low_target): Install it.
8461
8462 2015-07-14 Pedro Alves <palves@redhat.com>
8463
8464 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
8465 Instead, ignore ECHILD, and throw an error for other errnos.
8466
8467 2015-07-10 Pedro Alves <palves@redhat.com>
8468
8469 * event-loop.c (struct callback_event) <data>: Change type to
8470 gdb_client_data instance instead of gdb_client_data pointer.
8471 (append_callback_event): Adjust.
8472
8473 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
8474
8475 * linux-aarch64-low.c: Add comments for each linux_target_ops
8476 method. Remove comments already covered in target_ops and
8477 linux_target_ops definitions.
8478 (the_low_target): Add comments for each unimplemented method.
8479
8480 2015-07-09 Yao Qi <yao.qi@linaro.org>
8481
8482 * linux-aarch64-low.c (aarch64_regmap): Remove.
8483 (aarch64_usrregs_info): Remove.
8484 (regs_info): Set field usrregs to NULL.
8485
8486 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
8487
8488 * linux-low.c: Include "rsp-low.h"
8489 (linux_low_encode_pt_config, linux_low_encode_raw): New.
8490 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
8491 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
8492 (handle_btrace_enable_pt): New.
8493 (handle_btrace_general_set): Support "pt".
8494 (handle_btrace_conf_general_set): Support "pt:size".
8495
8496 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
8497
8498 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
8499 Z_PACKET_SW_BP.
8500
8501 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
8502
8503 * linux-aarch64-low.c: Remove comment about endianness.
8504 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
8505 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
8506 memcmp.
8507
8508 2015-06-24 Gary Benson <gbenson@redhat.com>
8509
8510 * linux-i386-ipa.c (stdint.h): Do not include.
8511 * lynx-i386-low.c (stdint.h): Likewise.
8512 * lynx-ppc-low.c (stdint.h): Likewise.
8513 * mem-break.c (stdint.h): Likewise.
8514 * thread-db.c (stdint.h): Likewise.
8515 * tracepoint.c (stdint.h): Likewise.
8516 * win32-low.c (stdint.h): Likewise.
8517
8518 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
8519
8520 * server.c (write_qxfer_response): Update call to
8521 remote_escape_output.
8522
8523 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
8524 Jan Kratochvil <jan.kratochvil@redhat.com>
8525
8526 Merge multiple hex conversions.
8527 * gdbreplay.c (tohex): Rename to 'fromhex'.
8528 (logchar): Use fromhex.
8529
8530 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
8531
8532 * server.c (handle_qxfer_libraries): Set `version' attribute for
8533 <library-list>.
8534
8535 2015-06-10 Gary Benson <gbenson@redhat.com>
8536
8537 * target.h (struct target_ops) <multifs_open>: New field.
8538 <multifs_unlink>: Likewise.
8539 <multifs_readlink>: Likewise.
8540 * linux-low.c (nat/linux-namespaces.h): New include.
8541 (linux_target_ops): Initialize the_target->multifs_open,
8542 the_target->multifs_unlink and the_target->multifs_readlink.
8543 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
8544 * hostio.c (hostio_fs_pid): New static variable.
8545 (hostio_handle_new_gdb_connection): New function.
8546 (handle_setfs): Likewise.
8547 (handle_open): Use the_target->multifs_open as appropriate.
8548 (handle_unlink): Use the_target->multifs_unlink as appropriate.
8549 (handle_readlink): Use the_target->multifs_readlink as
8550 appropriate.
8551 (handle_vFile): Handle vFile:setfs packets.
8552 * server.c (handle_query): Call hostio_handle_new_gdb_connection
8553 after target_handle_new_gdb_connection.
8554
8555 2015-06-10 Gary Benson <gbenson@redhat.com>
8556
8557 * configure.ac (AC_CHECK_FUNCS): Add setns.
8558 * config.in: Regenerate.
8559 * configure: Likewise.
8560 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
8561 (linux-namespaces.o): New rule.
8562 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
8563
8564 2015-06-09 Gary Benson <gbenson@redhat.com>
8565
8566 * hostio.c (handle_open): Process mode argument with
8567 fileio_to_host_mode.
8568
8569 2015-06-01 Yao Qi <yao.qi@linaro.org>
8570
8571 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
8572 * linux-x86-low.c: Likewise.
8573
8574 2015-05-28 Don Breazeal <donb@codesourcery.com>
8575
8576 * linux-low.c (handle_extended_wait): Initialize
8577 thread_info.last_resume_kind for new fork children.
8578
8579 2015-05-15 Pedro Alves <palves@redhat.com>
8580
8581 * target.h (target_handle_new_gdb_connection): Rewrite using if
8582 wrapped in do/while.
8583
8584 2015-05-14 Joel Brobecker <brobecker@adacore.com>
8585
8586 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
8587 * configure, config.in: Regenerate.
8588 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
8589 Declare typedef.
8590
8591 2015-05-12 Don Breazeal <donb@codesourcery.com>
8592
8593 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
8594 PTRACE_EVENT_VFORK_DONE.
8595 (linux_low_ptrace_options, extended_event_reported): Add vfork
8596 events.
8597 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
8598 and "vforkdone" for RSP 'T' Stop Reply Packet.
8599 * server.h (report_vfork_events): Declare
8600 global variable.
8601
8602 2015-05-12 Don Breazeal <donb@codesourcery.com>
8603
8604 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
8605 (the_low_target) <new_fork>: Initialize new member.
8606 * linux-arm-low.c (arm_new_fork): New function.
8607 (the_low_target) <new_fork>: Initialize new member.
8608 * linux-low.c (handle_extended_wait): Call new target function
8609 new_fork.
8610 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
8611 * linux-mips-low.c (mips_add_watchpoint): New function
8612 extracted from mips_insert_point.
8613 (the_low_target) <new_fork>: Initialize new member.
8614 (mips_linux_new_fork): New function.
8615 (mips_insert_point): Call mips_add_watchpoint.
8616 * linux-x86-low.c (x86_linux_new_fork): New function.
8617 (the_low_target) <new_fork>: Initialize new member.
8618
8619 2015-05-12 Don Breazeal <donb@codesourcery.com>
8620
8621 * linux-low.c (handle_extended_wait): Implement return value,
8622 rename argument 'event_child' to 'event_lwp', handle
8623 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
8624 (linux_low_ptrace_options): New function.
8625 (linux_low_filter_event): Call linux_low_ptrace_options,
8626 use different argument fo linux_enable_event_reporting,
8627 use return value from handle_extended_wait.
8628 (extended_event_reported): New function.
8629 (linux_wait_1): Call extended_event_reported and set
8630 status to report fork events.
8631 (linux_write_memory): Add pid to debug message.
8632 (reset_lwp_ptrace_options_callback): New function.
8633 (linux_handle_new_gdb_connection): New function.
8634 (linux_target_ops): Initialize new structure member.
8635 * linux-low.h (struct lwp_info) <waitstatus>: New member.
8636 * lynx-low.c: Initialize new structure member.
8637 * remote-utils.c (prepare_resume_reply): Implement stop reason
8638 "fork" for "T" stop message.
8639 * server.c (handle_query): Call handle_new_gdb_connection.
8640 * server.h (report_fork_events): Declare global flag.
8641 * target.h (struct target_ops) <handle_new_gdb_connection>:
8642 New member.
8643 (target_handle_new_gdb_connection): New macro.
8644 * win32-low.c: Initialize new structure member.
8645
8646 2015-05-12 Don Breazeal <donb@codesourcery.com>
8647
8648 * mem-break.c (APPEND_TO_LIST): Define macro.
8649 (clone_agent_expr): New function.
8650 (clone_one_breakpoint): New function.
8651 (clone_all_breakpoints): New function.
8652 * mem-break.h: Declare new functions.
8653
8654 2015-05-12 Don Breazeal <donb@codesourcery.com>
8655
8656 * linux-low.c (linux_supports_fork_events): New function.
8657 (linux_supports_vfork_events): New function.
8658 (linux_target_ops): Initialize new structure members.
8659 (initialize_low): Call linux_check_ptrace_features.
8660 * lynx-low.c (lynx_target_ops): Initialize new structure
8661 members.
8662 * server.c (report_fork_events, report_vfork_events):
8663 New global flags.
8664 (handle_query): Add new features to qSupported packet and
8665 response.
8666 (captured_main): Initialize new global variables.
8667 * target.h (struct target_ops) <supports_fork_events>:
8668 New member.
8669 <supports_vfork_events>: New member.
8670 (target_supports_fork_events): New macro.
8671 (target_supports_vfork_events): New macro.
8672 * win32-low.c (win32_target_ops): Initialize new structure
8673 members.
8674
8675 2015-05-12 Gary Benson <gbenson@redhat.com>
8676
8677 * server.c (handle_qxfer_exec_file): Use current process
8678 if annex is empty.
8679
8680 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
8681
8682 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
8683 Remove HAVE_PTRACE_GETREGS conditionals.
8684 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
8685 instead of PTRACE_GETREGS and PTRACE_SETREGS.
8686
8687 2015-05-08 Yao Qi <yao.qi@linaro.org>
8688
8689 * linux-low.c (linux_supports_conditional_breakpoints): New
8690 function.
8691 (linux_target_ops): Install new target method.
8692 * lynx-low.c (lynx_target_ops): Install NULL hook for
8693 supports_conditional_breakpoints.
8694 * nto-low.c (nto_target_ops): Likewise.
8695 * spu-low.c (spu_target_ops): Likewise.
8696 * win32-low.c (win32_target_ops): Likewise.
8697 * server.c (handle_query): Check
8698 target_supports_conditional_breakpoints.
8699 * target.h (struct target_ops) <supports_conditional_breakpoints>:
8700 New field.
8701 (target_supports_conditional_breakpoints): New macro.
8702
8703 2015-05-06 Pedro Alves <palves@redhat.com>
8704
8705 PR server/18081
8706 * server.c (start_inferior): If the process exits, mourn it.
8707
8708 2015-04-21 Gary Benson <gbenson@redhat.com>
8709
8710 * hostio.c (fileio_open_flags_to_host): Factored out to
8711 fileio_to_host_openflags in common/fileio.c. Single use
8712 updated.
8713
8714 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
8715
8716 * linux-xtensa-low.c (xtensa_fill_gregset)
8717 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
8718 XCHAL_HAVE_LOOP.
8719
8720 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
8721
8722 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
8723 (regs_info): Replace usrregs pointer with NULL.
8724
8725 2015-04-17 Gary Benson <gbenson@redhat.com>
8726
8727 * target.h (struct target_ops) <pid_to_exec_file>: New field.
8728 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
8729 * server.c (handle_qxfer_exec_file): New function.
8730 (qxfer_packets): Add exec-file entry.
8731 (handle_query): Report qXfer:exec-file:read as supported packet.
8732
8733 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
8734
8735 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
8736
8737 2015-04-09 Gary Benson <gbenson@redhat.com>
8738
8739 * hostio-errno.c (errno_to_fileio_error): Remove function.
8740 Update caller to use remote_fileio_to_fio_error.
8741
8742 2015-04-09 Yao Qi <yao.qi@linaro.org>
8743
8744 * linux-low.c (linux_insert_point): Call
8745 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
8746 (linux_remove_point): Call remove_memory_breakpoint if type is
8747 raw_bkpt_type_sw.
8748 * linux-x86-low.c (x86_insert_point): Don't call
8749 insert_memory_breakpoint.
8750 (x86_remove_point): Don't call remove_memory_breakpoint.
8751
8752 2015-04-01 Pedro Alves <palves@redhat.com>
8753 Cleber Rosa <crosa@redhat.com>
8754
8755 * server.c (gdbserver_usage): Reorganize and extend the usage
8756 message.
8757
8758 2015-03-24 Pedro Alves <palves@redhat.com>
8759
8760 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
8761 output. Also dump TRAP_TRACE.
8762 (linux_low_filter_event): In debug output, distinguish a
8763 resume_stop SIGSTOP from a delayed SIGSTOP.
8764
8765 2015-03-24 Gary Benson <gbenson@redhat.com>
8766
8767 * linux-x86-low.c (x86_linux_new_thread): Moved to
8768 nat/x86-linux.c.
8769 (x86_linux_prepare_to_resume): Likewise.
8770
8771 2015-03-24 Gary Benson <gbenson@redhat.com>
8772
8773 * Makefile.in (x86-linux-dregs.o): New rule.
8774 * configure.srv: Add x86-linux-dregs.o to relevant targets.
8775 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
8776 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
8777 (x86_linux_dr_get): Likewise.
8778 (x86_linux_dr_set): Likewise.
8779 (update_debug_registers_callback): Likewise.
8780 (x86_linux_dr_set_addr): Likewise.
8781 (x86_linux_dr_get_addr): Likewise.
8782 (x86_linux_dr_set_control): Likewise.
8783 (x86_linux_dr_get_control): Likewise.
8784 (x86_linux_dr_get_status): Likewise.
8785 (x86_linux_update_debug_registers): Likewise.
8786
8787 2015-03-24 Gary Benson <gbenson@redhat.com>
8788
8789 * linux-x86-low.c (x86_linux_update_debug_registers):
8790 New function, factored out from...
8791 (x86_linux_prepare_to_resume): ...this.
8792
8793 2015-03-24 Gary Benson <gbenson@redhat.com>
8794
8795 * linux-x86-low.c (x86_linux_dr_get): Update comments.
8796 (x86_linux_dr_set): Likewise.
8797 (update_debug_registers_callback): Likewise.
8798 (x86_linux_dr_set_addr): Likewise.
8799 (x86_linux_dr_get_addr): Likewise.
8800 (x86_linux_dr_set_control): Likewise.
8801 (x86_linux_dr_get_control): Likewise.
8802 (x86_linux_dr_get_status): Likewise.
8803 (x86_linux_prepare_to_resume): Likewise.
8804
8805 2015-03-24 Gary Benson <gbenson@redhat.com>
8806
8807 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
8808 Use perror_with_name. Pass string through gettext.
8809 (x86_linux_dr_set): Likewise.
8810
8811 2015-03-24 Gary Benson <gbenson@redhat.com>
8812
8813 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
8814 (x86_linux_dr_set_addr): ...this.
8815 (x86_dr_low_get_addr): Rename to...
8816 (x86_linux_dr_get_addr): ...this.
8817 (x86_dr_low_set_control): Rename to...
8818 (x86_linux_dr_set_control): ...this.
8819 (x86_dr_low_get_control): Rename to...
8820 (x86_linux_dr_get_control): ...this.
8821 (x86_dr_low_get_status): Rename to...
8822 (x86_linux_dr_get_status): ...this.
8823 (x86_dr_low): Update with new function names.
8824
8825 2015-03-24 Gary Benson <gbenson@redhat.com>
8826
8827 * Makefile.in (x86-linux.o): New rule.
8828 * configure.srv: Add x86-linux.o to relevant targets.
8829 * linux-low.c (lwp_set_arch_private_info): New function.
8830 (lwp_arch_private_info): Likewise.
8831 * linux-x86-low.c: Include nat/x86-linux.h.
8832 (arch_lwp_info): Removed structure.
8833 (update_debug_registers_callback):
8834 Use lwp_set_debug_registers_changed.
8835 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
8836 and lwp_set_debug_registers_changed.
8837 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
8838
8839 2015-03-24 Gary Benson <gbenson@redhat.com>
8840
8841 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
8842 * linux-arm-low.c (arm_new_thread): Likewise.
8843 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
8844 * linux-mips-low.c (mips_linux_new_thread): Likewise.
8845 * linux-x86-low.c (x86_linux_new_thread): Likewise.
8846 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
8847
8848 2015-03-24 Gary Benson <gbenson@redhat.com>
8849
8850 * linux-low.c (ptid_of_lwp): New function.
8851 (lwp_is_stopped): Likewise.
8852 (lwp_stop_reason): Likewise.
8853 * linux-x86-low.c (update_debug_registers_callback):
8854 Use lwp_is_stopped.
8855 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
8856 lwp_stop_reason.
8857
8858 2015-03-24 Gary Benson <gbenson@redhat.com>
8859
8860 * linux-low.h (linux_stop_lwp): Remove declaration.
8861
8862 2015-03-24 Gary Benson <gbenson@redhat.com>
8863
8864 * linux-low.h: Include nat/linux-nat.h.
8865 * linux-low.c (iterate_over_lwps_args): New structure.
8866 (iterate_over_lwps_filter): New function.
8867 (iterate_over_lwps): Likewise.
8868 * linux-x86-low.c (update_debug_registers_callback):
8869 Update signature to what iterate_over_lwps expects.
8870 Remove PID check that iterate_over_lwps now performs.
8871 (x86_dr_low_set_addr): Use iterate_over_lwps.
8872 (x86_dr_low_set_control): Likewise.
8873
8874 2015-03-24 Gary Benson <gbenson@redhat.com>
8875
8876 * linux-x86-low.c (x86_debug_reg_state): New function.
8877 (x86_linux_prepare_to_resume): Use the above.
8878
8879 2015-03-24 Gary Benson <gbenson@redhat.com>
8880
8881 * linux-low.c (current_lwp_ptid): New function.
8882 * linux-x86-low.c: Include nat/linux-nat.h.
8883 (x86_dr_low_get_addr): Use current_lwp_ptid.
8884 (x86_dr_low_get_control): Likewise.
8885 (x86_dr_low_get_status): Likewise.
8886
8887 2015-03-20 Pedro Alves <palves@redhat.com>
8888
8889 * tracepoint.c (cmd_qtstatus): Make "str" const.
8890
8891 2015-03-20 Pedro Alves <palves@redhat.com>
8892
8893 * server.c (handle_general_set): Make "req_str" const.
8894
8895 2015-03-19 Pedro Alves <palves@redhat.com>
8896
8897 * linux-low.c (linux_resume_one_lwp): Rename to ...
8898 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
8899 instead call perror_with_name.
8900 (check_ptrace_stopped_lwp_gone): New function.
8901 (linux_resume_one_lwp): Reimplement as wrapper around
8902 linux_resume_one_lwp_throw that swallows errors if the LWP is
8903 gone.
8904
8905 2015-03-19 Pedro Alves <palves@redhat.com>
8906
8907 * linux-low.c (count_events_callback, select_event_lwp_callback):
8908 No longer check whether the thread has resume_stop as last resume
8909 kind.
8910
8911 2015-03-19 Pedro Alves <palves@redhat.com>
8912
8913 * linux-low.c (count_events_callback, select_event_lwp_callback):
8914 Use the lwp's status_pending_p field, not the thread's.
8915
8916 2015-03-19 Pedro Alves <palves@redhat.com>
8917
8918 * linux-low.c (select_event_lwp_callback): Update comments to
8919 no longer mention SIGTRAP.
8920
8921 2015-03-18 Gary Benson <gbenson@redhat.com>
8922
8923 * server.c (handle_query): Do not report vFile:fstat as supported.
8924
8925 2015-03-11 Gary Benson <gbenson@redhat.com>
8926
8927 * hostio.c (sys/types.h): New include.
8928 (sys/stat.h): Likewise.
8929 (common-remote-fileio.h): Likewise.
8930 (handle_fstat): New function.
8931 (handle_vFile): Handle vFile:fstat packets.
8932
8933 2015-03-11 Gary Benson <gbenson@redhat.com>
8934
8935 * configure.ac (AC_CHECK_MEMBERS): Add checks for
8936 struct stat.st_blocks and struct stat.st_blksize.
8937 * configure: Regenerate.
8938 * config.in: Likewise.
8939 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
8940 (OBS): Add common-remote-fileio.o.
8941 (common-remote-fileio.o): New rule.
8942
8943 2015-03-09 Pedro Alves <palves@redhat.com>
8944
8945 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
8946 'struct sockaddr' pointer in 'accept' call.
8947
8948 2015-03-09 Pedro Alves <palves@redhat.com>
8949
8950 Revert:
8951 2015-03-07 Pedro Alves <palves@redhat.com>
8952 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
8953 or <winsock2.h> here. Instead include "gdb_socket.h".
8954 (remote_open): Use union gdb_sockaddr_u.
8955 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
8956 or <winsock2.h> here. Instead include "gdb_socket.h".
8957 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
8958 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
8959 or <sys/un.h>.
8960 (init_named_socket, gdb_agent_helper_thread): Use union
8961 gdb_sockaddr_u.
8962
8963 2015-03-07 Pedro Alves <palves@redhat.com>
8964
8965 * configure.ac (build_warnings): Move
8966 -Wdeclaration-after-statement to the C-specific set.
8967 * configure: Regenerate.
8968
8969 2015-03-07 Pedro Alves <palves@redhat.com>
8970
8971 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
8972 or <winsock2.h> here. Instead include "gdb_socket.h".
8973 (remote_open): Use union gdb_sockaddr_u.
8974 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
8975 or <winsock2.h> here. Instead include "gdb_socket.h".
8976 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
8977 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
8978 or <sys/un.h>.
8979 (init_named_socket, gdb_agent_helper_thread): Use union
8980 gdb_sockaddr_u.
8981
8982 2015-03-07 Pedro Alves <palves@redhat.com>
8983
8984 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
8985 instead.
8986
8987 2015-03-06 Yao Qi <yao.qi@linaro.org>
8988
8989 * linux-aarch64-low.c (aarch64_insert_point): Use
8990 show_debug_regs as a boolean.
8991 (aarch64_remove_point): Likewise.
8992
8993 2015-03-05 Pedro Alves <palves@redhat.com>
8994
8995 * lynx-low.c (lynx_target_ops): Install NULL hooks for
8996 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
8997 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
8998 * nto-low.c (nto_target_ops): Likewise.
8999 * spu-low.c (spu_target_ops): Likewise.
9000 * win32-low.c (win32_target_ops): Likewise.
9001
9002 2015-03-04 Pedro Alves <palves@redhat.com>
9003
9004 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
9005 Decide whether a breakpoint triggered based on the SIGTRAP's
9006 siginfo.si_code.
9007 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
9008 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
9009 (linux_low_filter_event): Check for breakpoints before checking
9010 watchpoints.
9011 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
9012 siginfo.si_code.
9013 (linux_stopped_by_sw_breakpoint)
9014 (linux_supports_stopped_by_sw_breakpoint)
9015 (linux_stopped_by_hw_breakpoint)
9016 (linux_supports_stopped_by_hw_breakpoint): New functions.
9017 (linux_target_ops): Install new target methods.
9018
9019 2015-03-04 Pedro Alves <palves@redhat.com>
9020
9021 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
9022 * server.c (swbreak_feature, hwbreak_feature): New globals.
9023 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
9024 (captured_main): Clear swbreak_feature and hwbreak_feature.
9025 * server.h (swbreak_feature, hwbreak_feature): Declare.
9026 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
9027 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
9028 supports_stopped_by_hw_breakpoint>: New fields.
9029 (target_supports_stopped_by_sw_breakpoint)
9030 (target_stopped_by_sw_breakpoint)
9031 (target_supports_stopped_by_hw_breakpoint)
9032 (target_stopped_by_hw_breakpoint): Declare.
9033
9034 2015-03-04 Pedro Alves <palves@redhat.com>
9035
9036 enum lwp_stop_reason -> enum target_stop_reason
9037 * linux-low.c (check_stopped_by_breakpoint): Adjust.
9038 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
9039 (linux_wait_1, stuck_in_jump_pad_callback)
9040 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
9041 (linux_stopped_by_watchpoint):
9042 * linux-low.h (enum lwp_stop_reason): Delete.
9043 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
9044 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
9045
9046 2015-03-04 Yao Qi <yao.qi@linaro.org>
9047
9048 * Makefile.in (SFILES): Add linux-aarch64-low.c.
9049
9050 2015-03-03 Gary Benson <gbenson@redhat.com>
9051
9052 * hostio.c (handle_vFile): Fix prefix lengths.
9053
9054 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
9055
9056 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
9057 ptr_bits.
9058
9059 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
9060
9061 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
9062 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
9063 (clean): Add "rm -f" for above C files.
9064 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
9065 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
9066 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
9067 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
9068 * linux-s390-low.c (HWCAP_S390_VX): New macro.
9069 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
9070 (init_registers_s390x_vx_linux64)
9071 (init_registers_s390x_tevx_linux64)
9072 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
9073 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
9074 declarations.
9075 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
9076 (s390_store_vxrs_high): New functions.
9077 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
9078 NT_S390_VXRS_HIGH.
9079 (s390_arch_setup): Add logic for selecting one of the new target
9080 descriptions. Activate the new vector regsets if applicable.
9081 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
9082 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
9083 and init_registers_s390x_tevx_linux64.
9084
9085 2015-03-01 Pedro Alves <palves@redhat.com>
9086
9087 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
9088 parameter.
9089
9090 2015-02-27 Pedro Alves <palves@redhat.com>
9091
9092 * linux-x86-low.c (u_debugreg_offset): New function.
9093 (x86_linux_dr_get, x86_linux_dr_set): Use it.
9094
9095 2015-02-27 Pedro Alves <palves@redhat.com>
9096
9097 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
9098 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
9099 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
9100 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
9101 (ps_lsetfpregs, ps_getpid)
9102 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
9103 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
9104 (ps_lsetxregs, ps_plog): Declare.
9105
9106 2015-02-27 Pedro Alves <palves@redhat.com>
9107
9108 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
9109 IP_AGENT_EXPORT_FUNC.
9110 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
9111 IP_AGENT_EXPORT_FUNC.
9112 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
9113 (IP_AGENT_EXPORT): Delete.
9114 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
9115 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
9116 (gdb_trampoline_buffer_error, collecting, gdb_collect)
9117 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
9118 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
9119 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
9120 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
9121 (traceframe_read_count, traceframe_write_count)
9122 (traceframes_created, trace_state_variables, get_raw_reg)
9123 (get_trace_state_variable_value, set_trace_state_variable_value)
9124 (ust_loaded, helper_thread_id, cmd_buf): Use
9125 IPA_SYM_EXPORTED_NAME.
9126 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
9127 (tracepoints) Use IP_AGENT_EXPORT_VAR.
9128 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
9129 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
9130 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
9131 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
9132 EXTERN_C_PUSH/EXTERN_C_POP.
9133 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
9134 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
9135 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
9136 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
9137 (traceframe_write_count, traceframe_read_count)
9138 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
9139 (about_to_request_buffer_space, get_trace_state_variable_value)
9140 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
9141 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
9142 EXTERN_C_PUSH/EXTERN_C_POP.
9143 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
9144 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
9145 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
9146 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
9147 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
9148 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
9149 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
9150 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
9151 Define.
9152 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
9153 (IP_AGENT_EXPORT_VAR_DECL): Define.
9154 (tracing): Declare.
9155 (gdb_agent_get_raw_reg): Declare.
9156
9157 2015-02-27 Tom Tromey <tromey@redhat.com>
9158 Pedro Alves <palves@redhat.com>
9159
9160 Rename symbols whose names are reserved C++ keywords throughout.
9161
9162 2015-02-27 Pedro Alves <palves@redhat.com>
9163
9164 * Makefile.in (COMPILER): New, get it from autoconf.
9165 (CXX): Get from autoconf instead.
9166 (COMPILE.pre): Use COMPILER.
9167 (CC-LD): Rename to ...
9168 (CC_LD): ... this. Use COMPILER.
9169 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
9170 (CXX_FOR_TARGET): Default to g++ instead of gcc.
9171 * acinclude.m4: Include build-with-cxx.m4.
9172 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
9173 Disable -Werror by default if building in C++ mode.
9174 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
9175 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
9176 the C++ compiler. Save/restore CXXFLAGS too.
9177 * configure: Regenerate.
9178
9179 2015-02-27 Pedro Alves <palves@redhat.com>
9180
9181 * acinclude.m4: Include libiberty.m4.
9182 * configure.ac: Call libiberty_INIT.
9183 * config.in, configure: Regenerate.
9184
9185 2015-02-26 Pedro Alves <palves@redhat.com>
9186
9187 * linux-low.c (linux_wait_1): When incrementing the PC past a
9188 program breakpoint always use the_low_target.breakpoint_len as
9189 increment, rather than the maximum between that and
9190 the_low_target.decr_pc_after_break.
9191
9192 2015-02-23 Pedro Alves <palves@redhat.com>
9193
9194 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
9195 thread was doing a step-over; always adjust the PC if
9196 we stepped over a permanent breakpoint.
9197 (linux_wait_1): If we stepped over breakpoint that was on top of a
9198 permanent breakpoint, manually advance the PC past it.
9199
9200 2015-02-23 Pedro Alves <palves@redhat.com>
9201
9202 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
9203 modes.
9204 (x86_fill_gregset, x86_store_gregset): Use it when handling
9205 $orig_eax.
9206
9207 2015-02-20 Pedro Alves <palves@redhat.com>
9208
9209 * thread-db.c: Include "nat/linux-procfs.h".
9210 (thread_db_init): Skip listing new threads if the kernel supports
9211 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
9212
9213 2015-02-20 Pedro Alves <palves@redhat.com>
9214
9215 * linux-low.c (status_pending_p_callback): Use ptid_match.
9216
9217 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
9218
9219 PR breakpoints/16812
9220 * linux-low.c (wstatus_maybe_breakpoint): Remove.
9221 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
9222 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
9223
9224 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
9225
9226 PR breakpoints/15956
9227 * tracepoint.c (cmd_qtinit): Add check for current_thread.
9228
9229 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
9230
9231 * linux-low.c (linux_low_btrace_conf): Print size.
9232 * server.c (handle_btrace_conf_general_set): New.
9233 (hanle_general_set): Call handle_btrace_conf_general_set.
9234 (handle_query): Report Qbtrace-conf:bts:size as supported.
9235
9236 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
9237
9238 * linux-low.c (linux_low_enable_btrace): Update parameters.
9239 (linux_low_btrace_conf): New.
9240 (linux_target_ops)<to_btrace_conf>: Initialize.
9241 * server.c (current_btrace_conf): New.
9242 (handle_btrace_enable): Rename to ...
9243 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
9244 to target_enable_btrace. Update comment. Update users.
9245 (handle_qxfer_btrace_conf): New.
9246 (qxfer_packets): Add btrace-conf entry.
9247 (handle_query): Report qXfer:btrace-conf:read as supported packet.
9248 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
9249 (target_ops)<read_btrace_conf>: New.
9250 (target_enable_btrace): Update parameters.
9251 (target_read_btrace_conf): New.
9252
9253 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
9254
9255 * server.c (handle_btrace_general_set): Remove call to
9256 target_supports_btrace.
9257 (supported_btrace_packets): New.
9258 (handle_query): Call supported_btrace_packets.
9259 * target.h: include btrace-common.h.
9260 (btrace_target_info): Removed.
9261 (supports_btrace, target_supports_btrace): Update parameters.
9262
9263 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
9264
9265 * Makefile.in (SFILES): Add common/btrace-common.c.
9266 (OBS): Add common/btrace-common.o.
9267 (btrace-common.o): Add build rules.
9268 * linux-low: Include btrace-common.h.
9269 (linux_low_read_btrace): Use struct btrace_data. Call
9270 btrace_data_init and btrace_data_fini.
9271
9272 2015-02-06 Pedro Alves <palves@redhat.com>
9273
9274 * thread-db.c (find_new_threads_callback): Add debug output.
9275
9276 2015-02-04 Pedro Alves <palves@redhat.com>
9277
9278 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
9279 (resume_stopped_resumed_lwps): New function.
9280 (linux_wait_for_event_filtered): Use it.
9281
9282 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
9283
9284 * Makefile.in (SFILES): Add linux-personality.c.
9285 (linux-personality.o): New rule.
9286 * configure.srv (srv_linux_obj): Add linux-personality.o to the
9287 list of objects to be built.
9288 * linux-low.c: Include nat/linux-personality.h.
9289 (linux_create_inferior): Remove code to disable address space
9290 randomization (moved to ../nat/linux-personality.c). Create
9291 cleanup to disable address space randomization.
9292
9293 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
9294
9295 * Makefile.in (posix-strerror.o): New rule.
9296 (mingw-strerror.o): Likewise.
9297 * configure: Regenerated.
9298 * configure.ac: Source file ../common/common.host. Initialize new
9299 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
9300
9301 2015-01-14 Yao Qi <yao@codesourcery.com>
9302
9303 * Makefile.in (SFILES): Add nat/ppc-linux.c.
9304 (ppc-linux.o): New rule.
9305 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
9306 * configure.ac: AC_CHECK_FUNCS(getauxval).
9307 * config.in: Re-generated.
9308 * configure: Re-generated.
9309 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
9310 ppc64_64bit_inferior_p
9311
9312 2015-01-14 Yao Qi <yao@codesourcery.com>
9313
9314 * linux-ppc-low.c: Include "nat/ppc-linux.h".
9315 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
9316 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
9317 (PT_ORIG_R3, PT_TRAP): Likewise.
9318 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
9319 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
9320 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
9321
9322 2015-01-10 Joel Brobecker <brobecker@adacore.com>
9323
9324 * i387-fp.c (i387_cache_to_xsave): In look over
9325 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
9326 zmmh_low_space field by use of zmmh_high_space.
9327
9328 2015-01-09 Pedro Alves <palves@redhat.com>
9329
9330 * linux-low.c (step_over_bkpt): Move higher up in the file.
9331 (handle_extended_wait): Don't store the stop_pc here.
9332 (get_stop_pc): Adjust comments and rename to ...
9333 (check_stopped_by_breakpoint): ... this. Record whether the LWP
9334 stopped for a software breakpoint or hardware breakpoint.
9335 (thread_still_has_status_pending_p): New function.
9336 (status_pending_p_callback): Use
9337 thread_still_has_status_pending_p. If the event is no longer
9338 interesting, resume the LWP.
9339 (handle_tracepoints): Add assert.
9340 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
9341 (wstatus_maybe_breakpoint): New function.
9342 (cancel_breakpoint): Delete function.
9343 (check_stopped_by_watchpoint): New function, factored out from
9344 linux_low_filter_event.
9345 (lp_status_maybe_breakpoint): Delete function.
9346 (linux_low_filter_event): Remove filter_ptid argument.
9347 Leave thread group exits pending here. Store the LWP's stop PC.
9348 Always leave events pending.
9349 (linux_wait_for_event_filtered): Pull all events out of the
9350 kernel, and leave them all pending.
9351 (count_events_callback, select_event_lwp_callback): Consider all
9352 events.
9353 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
9354 (select_event_lwp): Only give preference to the stepping LWP in
9355 all-stop mode. Adjust comments.
9356 (ignore_event): New function.
9357 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
9358 references to cancel_breakpoints. Adjust to renames. Also give
9359 equal priority to all LWPs that have had events in non-stop mode.
9360 If reporting a software breakpoint event, unadjust the LWP's PC.
9361 (linux_wait): If linux_wait_1 returned an ignored event, retry.
9362 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
9363 Adjust.
9364 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
9365 (resume_status_pending_p): Use thread_still_has_status_pending_p.
9366 (linux_stopped_by_watchpoint): Adjust.
9367 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
9368 * linux-low.h (enum lwp_stop_reason): New.
9369 (struct lwp_info) <stop_pc>: Adjust comment.
9370 <stopped_by_watchpoint>: Delete field.
9371 <stop_reason>: New field.
9372 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
9373 * mem-break.c (software_breakpoint_inserted_here)
9374 (hardware_breakpoint_inserted_here): New function.
9375 * mem-break.h (software_breakpoint_inserted_here)
9376 (hardware_breakpoint_inserted_here): Declare.
9377 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
9378 (cancel_breakpoints): Delete.
9379 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
9380 (upload_fast_traceframes): Remove references to
9381 cancel_breakpoints.
9382
9383 2015-01-09 Pedro Alves <palves@redhat.com>
9384
9385 * thread-db.c (find_new_threads_callback): Ignore thread if the
9386 kernel thread ID is -1.
9387
9388 2015-01-09 Pedro Alves <palves@redhat.com>
9389
9390 * linux-low.c (linux_attach_fail_reason_string): Move to
9391 nat/linux-ptrace.c, and rename.
9392 (linux_attach_lwp): Update comment.
9393 (attach_proc_task_lwp_callback): New function.
9394 (linux_attach): Adjust to rename and use
9395 linux_proc_attach_tgid_threads.
9396 (linux_attach_fail_reason_string): Delete declaration.
9397
9398 2015-01-01 Joel Brobecker <brobecker@adacore.com>
9399
9400 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
9401 * server.c (gdbserver_version): Likewise.
9402
9403 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
9404
9405 * remote-utils.c: Include ctype.h.
9406 (input_interrupt): Explicitly handle the case when the char
9407 received is the NUL byte. Improve the printing of non-ASCII
9408 characters.
9409
9410 2014-12-16 Joel Brobecker <brobecker@adacore.com>
9411
9412 * linux-low.c (linux_low_filter_event): Update call to
9413 linux_enable_event_reporting following the addition of
9414 a new parameter to that function.
9415
9416 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
9417
9418 PR server/17457
9419 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
9420 (AARCH64_FPCR_REGNO): Likewise.
9421 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
9422 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
9423 (aarch64_store_fpregset): Likewise.
9424
9425 2014-12-15 Joel Brobecker <brobecker@adacore.com>
9426
9427 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
9428 Remove FIXME comment about assumption about N.
9429
9430 2014-12-13 Joel Brobecker <brobecker@adacore.com>
9431
9432 * configure.ac: If large-file support is disabled in GDBserver,
9433 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
9434 * configure: Regenerate.
9435
9436 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9437
9438 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
9439 warning upon ENODATA from ptrace.
9440 * linux-s390-low.c (s390_store_tdb): New.
9441 (s390_regsets): Add regset for NT_S390_TDB.
9442
9443 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9444
9445 * linux-low.c (regsets_store_inferior_registers): Skip regsets
9446 without a fill_function.
9447 * linux-s390-low.c (s390_fill_last_break): Remove.
9448 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
9449 (s390_arch_setup): Use regset's size instead of fill_function for
9450 loop end condition.
9451
9452 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9453
9454 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
9455 the regset's store function when ptrace returned an error.
9456 * regcache.c (get_thread_regcache): Invalidate register cache
9457 before fetching inferior's registers.
9458
9459 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9460
9461 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
9462 while-loop as for-loop.
9463 (regsets_store_inferior_registers): Likewise.
9464
9465 2014-11-28 Yao Qi <yao@codesourcery.com>
9466
9467 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
9468 * config.in, configure: Re-generate.
9469 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
9470 is defined.
9471
9472 2014-11-21 Yao Qi <yao@codesourcery.com>
9473
9474 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
9475 (AC_CHECK_HEADERS): Remove malloc.h.
9476 * configure: Re-generated.
9477 * config.in: Re-generated.
9478 * server.h: Don't include alloca.h and malloc.h.
9479 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
9480 Don't include malloc.h.
9481
9482 2014-11-17 Joel Brobecker <brobecker@adacore.com>
9483
9484 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
9485 corresponding ERRNO check in same block.
9486
9487 2014-11-12 Pedro Alves <palves@redhat.com>
9488
9489 * server.c (cont_thread): Update comment.
9490 (start_inferior, attach_inferior): No longer clear cont_thread.
9491 (handle_v_cont): No longer set cont_thread.
9492 (captured_main): Clear cont_thread each time a GDB connects.
9493
9494 2014-11-12 Pedro Alves <palves@redhat.com>
9495
9496 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
9497 thread, and don't resume all threads if the Hc thread has exited.
9498
9499 2014-11-12 Pedro Alves <palves@redhat.com>
9500
9501 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
9502 the process group instead of to a specific LWP.
9503
9504 2014-10-15 Pedro Alves <palves@redhat.com>
9505
9506 PR server/17487
9507 * win32-arm-low.c (arm_set_thread_context): Remove current_event
9508 parameter.
9509 (arm_set_thread_context): Delete.
9510 (the_low_target): Adjust.
9511 * win32-i386-low.c (debug_registers_changed)
9512 (debug_registers_used): Delete.
9513 (update_debug_registers_callback): New function.
9514 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
9515 needing to update their debug registers.
9516 (win32_get_current_dr): New function.
9517 (x86_dr_low_get_addr, x86_dr_low_get_control)
9518 (x86_dr_low_get_status): Fetch the debug register from the thread
9519 record's context.
9520 (i386_initial_stuff): Adjust.
9521 (i386_get_thread_context): Remove current_event parameter. Don't
9522 clear debug_registers_changed nor copy DR values to
9523 debug_reg_state.
9524 (i386_set_thread_context): Delete.
9525 (i386_prepare_to_resume): New function.
9526 (i386_thread_added): Mark the thread as needing to update irs
9527 debug registers.
9528 (the_low_target): Remove i386_set_thread_context and install
9529 i386_prepare_to_resume.
9530 * win32-low.c (win32_get_thread_context): Adjust.
9531 (win32_set_thread_context): Use SetThreadContext
9532 directly.
9533 (win32_prepare_to_resume): New function.
9534 (win32_require_context): New function, factored out from ...
9535 (thread_rec): ... this.
9536 (continue_one_thread): Call win32_prepare_to_resume on each thread
9537 we're about to continue.
9538 (win32_resume): Call win32_prepare_to_resume on the event thread.
9539 * win32-low.h (struct win32_thread_info)
9540 <debug_registers_changed>: New field.
9541 (struct win32_target_ops): Change prototype of set_thread_context,
9542 delete set_thread_context and add prepare_to_resume.
9543 (win32_require_context): New declaration.
9544
9545 2014-10-08 Gary Benson <gbenson@redhat.com>
9546
9547 * server.h: Do not include common-exceptions.h.
9548
9549 2014-10-08 Gary Benson <gbenson@redhat.com>
9550
9551 * server.h: Do not include cleanups.h.
9552
9553 2014-09-30 James Hogan <james.hogan@imgtec.com>
9554
9555 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
9556 mips64-dsp-linux.c.
9557
9558 2014-09-23 Yao Qi <yao@codesourcery.com>
9559
9560 * linux-low.c (lp_status_maybe_breakpoint): New function.
9561 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
9562 (count_events_callback): Likewise.
9563 (select_event_lwp_callback): Likewise.
9564 (cancel_breakpoints_callback): Likewise.
9565
9566 2014-09-19 Don Breazeal <donb@codesourcery.com>
9567
9568 * linux-low.c (handle_extended_wait): Call
9569 linux_ptrace_get_extended_event.
9570 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
9571 linux_is_extended_waitstatus.
9572
9573 2014-09-16 Joel Brobecker <brobecker@adacore.com>
9574
9575 * Makefile.in (CPPFLAGS): Define.
9576 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
9577 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
9578
9579 2014-09-16 Gary Benson <gbenson@redhat.com>
9580
9581 * inferiors.h (current_inferior): Renamed as...
9582 (current_thread): New variable. All uses updated.
9583 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
9584 (maybe_move_out_of_jump_pad): Likewise.
9585 (cancel_breakpoint): Likewise.
9586 (linux_low_filter_event): Likewise.
9587 (wait_for_sigstop): Likewise.
9588 (linux_resume_one_lwp): Likewise.
9589 (need_step_over_p): Likewise.
9590 (start_step_over): Likewise.
9591 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
9592 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
9593 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
9594 and save_inferior as saved_thread.
9595 * regcache.c (get_thread_regcache): Renamed saved_inferior as
9596 saved_thread.
9597 (regcache_invalidate_thread): Likewise.
9598 * remote-utils.c (prepare_resume_reply): Likewise.
9599 * thread-db.c (thread_db_get_tls_address): Likewise.
9600 (disable_thread_event_reporting): Likewise.
9601 (remove_thread_event_breakpoints): Likewise.
9602 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
9603 as saved_thread.
9604 * target.h (set_desired_inferior): Renamed as...
9605 (set_desired_thread): New declaration. All uses updated.
9606 * server.c (myresume): Updated comment to reference thread instead
9607 of inferior.
9608 (handle_serial_event): Likewise.
9609 (handle_target_event): Likewise.
9610
9611 2014-09-12 Tom Tromey <tromey@redhat.com>
9612 Gary Benson <gbenson@redhat.com>
9613
9614 * regcache.h: Include common-regcache.h.
9615 (regcache_read_pc): Don't declare.
9616 * regcache.c (get_thread_regcache_for_ptid): New function.
9617
9618 2014-09-11 Tom Tromey <tromey@redhat.com>
9619 Gary Benson <gbenson@redhat.com>
9620
9621 * symbol.c: New file.
9622 * Makefile.in (SFILES): Add symbol.c.
9623 (OBS): Add symbol.o.
9624
9625 2014-09-11 Gary Benson <gbenson@redhat.com>
9626
9627 * target.c (target_stop_ptid, target_continue_ptid): New
9628 functions.
9629
9630 2014-09-11 Tom Tromey <tromey@redhat.com>
9631 Gary Benson <gbenson@redhat.com>
9632
9633 * target.h: Include target/target.h.
9634 * target.c (target_read_memory, target_read_uint32)
9635 (target_write_memory): New functions.
9636
9637 2014-09-11 Gary Benson <gbenson@redhat.com>
9638
9639 * server.h (debug_hw_points): Don't declare.
9640 * server.c (debug_hw_points): Don't define. Replace all uses
9641 with show_debug_regs.
9642 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
9643 all uses with show_debug_regs.
9644
9645 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
9646
9647 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
9648 endianness into account.
9649 (ppc_supply_ptrace_register): Likewise.
9650
9651 2014-09-03 James Hogan <james.hogan@imgtec.com>
9652
9653 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
9654 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
9655
9656 2014-09-03 Gary Benson <gbenson@redhat.com>
9657
9658 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
9659 ALL_DEBUG_ADDRESS_REGISTERS.
9660
9661 2014-09-02 Gary Benson <gbenson@redhat.com>
9662
9663 * i386-low.h: Renamed as...
9664 * x86-low.h: New file. All type, function and variable name
9665 prefixes changed from "i386_" to "x86_". All references updated.
9666 * i386-low.c: Renamed as...
9667 * x86-low.c: New file. All type, function and variable name
9668 prefixes changed from "i386_" to "x86_". All references updated.
9669
9670 2014-09-02 Gary Benson <gbenson@redhat.com>
9671
9672 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
9673 (x86_linux_new_thread): Likewise.
9674
9675 2014-08-29 Gary Benson <gbenson@redhat.com>
9676
9677 * server.h (setjmp.h): Do not include.
9678 (toplevel): Do not declare.
9679 (common-exceptions.h): Include.
9680 (cleanups.h): Likewise.
9681 * server.c (toplevel): Do not define.
9682 (exit_code): New static global.
9683 (detach_or_kill_for_exit_cleanup): New function.
9684 (main): New function. Original main renamed to...
9685 (captured_main): New function.
9686 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
9687
9688 2014-08-29 Gary Benson <gbenson@redhat.com>
9689
9690 * Makefile.in (SFILES): Add common/common-exceptions.c.
9691 (OBS): Add common-exceptions.o.
9692 (common-exceptions.o): New rule.
9693 * utils.c (prepare_to_throw_exception): New function.
9694
9695 2014-08-29 Gary Benson <gbenson@redhat.com>
9696
9697 * config.in: Regenerate.
9698 * configure: Likewise.
9699
9700 2014-08-29 Gary Benson <gbenson@redhat.com>
9701
9702 * Makefile.in (SFILES): Add common/cleanups.c.
9703 (OBS): cleanups.o.
9704 (cleanups.o): New rule.
9705
9706 2014-08-29 Gary Benson <gbenson@redhat.com>
9707
9708 * utils.c (internal_vwarning): New function.
9709
9710 2014-08-28 Gary Benson <gbenson@redhat.com>
9711
9712 * utils.h (fatal): Remove declaration.
9713 * utils.c (fatal): Remove function.
9714
9715 2014-08-28 Gary Benson <gbenson@redhat.com>
9716
9717 * tracepoint.c (gdb_agent_init): Replace fatal with
9718 perror_with_name.
9719 (initialize_tracepoint): Likewise.
9720
9721 2014-08-28 Gary Benson <gbenson@redhat.com>
9722
9723 * remote-utils.c (remote_prepare): Replace fatal with error.
9724
9725 2014-08-28 Gary Benson <gbenson@redhat.com>
9726
9727 * linux-low.c (linux_async): Replace fatal with warning.
9728 Tidy up and return.
9729 (linux_start_non_stop): Return -1 if linux_async failed.
9730
9731 2014-08-28 Gary Benson <gbenson@redhat.com>
9732
9733 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
9734 gdb_assert.
9735 (i386_dr_low_get_addr): Remove vague comment.
9736 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
9737 gdb_assert.
9738
9739 2014-08-28 Gary Benson <gbenson@redhat.com>
9740
9741 * inferiors.c (get_thread_process): Replace check with gdb_assert.
9742 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
9743 internal_error.
9744 (linux_resume_one_lwp): Likewise.
9745 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
9746 gdb_assert.
9747 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
9748 with internal_error.
9749 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
9750 (init_register_cache): Replace fatal with gdb_assert_not_reached.
9751 (find_register_by_name): Replace fatal with internal_error.
9752 (find_regno): Likewise.
9753 * tdesc.c (init_target_desc): Replace check with gdb_assert.
9754 * thread-db.c (thread_db_create_event): Likewise.
9755 (thread_db_load_search): Likewise.
9756 (try_thread_db_load_1): Likewise.
9757 * tracepoint.c (get_jump_space_head): Replace fatal with
9758 internal_error.
9759 (claim_trampoline_space): Likewise.
9760 (have_fast_tracepoint_trampoline_buffer): Likewise.
9761 (cmd_qtstart): Likewise.
9762 (stop_tracing): Likewise.
9763 (fast_tracepoint_collecting): Likewise.
9764 (target_malloc): Likewise.
9765 (download_tracepoint): Likewise.
9766 (download_trace_state_variables): Replace check with gdb_assert.
9767 (upload_fast_traceframes): Replace fatal with internal_error.
9768
9769 2014-08-19 Tom Tromey <tromey@redhat.com>
9770 Gary Benson <gbenson@redhat.com>
9771
9772 * Makefile.in (SFILES): Add common/common-debug.c.
9773 (OBS): Add common-debug.o.
9774 (common-debug.o): New rule.
9775 * debug.h (debug_printf): Don't declare.
9776 * debug.c (debug_printf): Renamed and rewritten as...
9777 (debug_vprintf): New function.
9778
9779 2014-08-19 Gary Benson <gbenson@redhat.com>
9780
9781 * utils.h: Do not include print-utils.h.
9782
9783 2014-08-19 Tom Tromey <tromey@redhat.com>
9784 Gary Benson <gbenson@redhat.com>
9785
9786 * server.h: Add static assertion.
9787 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
9788
9789 2014-08-19 Tom Tromey <tromey@redhat.com>
9790 Gary Benson <gbenson@redhat.com>
9791
9792 * Makefile.in (SFILES): Add common/errors.c.
9793 (OBS): Add errors.o.
9794 (IPA_OBS): Add errors-ipa.o.
9795 (errors.o): New rule.
9796 (errors-ipa.o): Likewise.
9797 * utils.h (perror_with_name, error, warning): Don't declare.
9798 * utils.c (warning): Renamed and rewritten as...
9799 (vwarning): New function.
9800 (error): Renamed and rewritten as...
9801 (verror): New function.
9802 (internal_error): Renamed and rewritten as...
9803 (internal_verror): New function.
9804
9805 2014-08-07 Gary Benson <gbenson@redhat.com>
9806
9807 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
9808 * configure: Regenerate.
9809 * config.in: Likewise.
9810 * server.h: Do not include errno.h.
9811 * event-loop.c: Likewise.
9812 * hostio-errno.c: Likewise.
9813 * linux-low.c: Likewise.
9814 * remote-utils.c: Likewise.
9815 * spu-low.c: Likewise.
9816 * utils.c: Likewise.
9817 * gdbreplay.c: Unconditionally include errno.h.
9818
9819 2014-08-07 Gary Benson <gbenson@redhat.com>
9820
9821 * server.h: Do not include string.h.
9822 * event-loop.c: Likewise.
9823 * linux-low.c: Likewise.
9824 * regcache.c: Likewise.
9825 * remote-utils.c: Likewise.
9826 * spu-low.c: Likewise.
9827 * utils.c: Likewise.
9828
9829 2014-08-07 Gary Benson <gbenson@redhat.com>
9830
9831 * server.h: Do not include gdb_assert.h.
9832
9833 2014-08-07 Gary Benson <gbenson@redhat.com>
9834
9835 * server.h: Do not include common-utils.h.
9836
9837 2014-08-07 Gary Benson <gbenson@redhat.com>
9838
9839 * server.h: Do not include ptid.h.
9840 * notif.h: Likewise.
9841
9842 2014-08-07 Gary Benson <gbenson@redhat.com>
9843
9844 * server.h: Do not include gdb_locale.h.
9845
9846 2014-08-07 Gary Benson <gbenson@redhat.com>
9847
9848 * server.h: Do not include gdb/signals.h.
9849 * win32-low.c: Likewise.
9850
9851 2014-08-07 Gary Benson <gbenson@redhat.com>
9852
9853 * server.h: Do not include pathmax.h.
9854
9855 2014-08-07 Gary Benson <gbenson@redhat.com>
9856
9857 * server.h: Do not include libiberty.h.
9858 * linux-bfin-low.c: Likewise.
9859
9860 2014-08-07 Gary Benson <gbenson@redhat.com>
9861
9862 * server.h: Do not include ansidecl.h.
9863
9864 2014-08-07 Gary Benson <gbenson@redhat.com>
9865
9866 * linux-x86-low.c: Do not include stddef.h.
9867 * lynx-ppc-low.c: Likewise.
9868 * tracepoint.c: Likewise.
9869
9870 2014-08-07 Gary Benson <gbenson@redhat.com>
9871
9872 * server.h: Do not include stdarg.h.
9873 * nto-low.c: Likewise.
9874
9875 2014-08-07 Gary Benson <gbenson@redhat.com>
9876
9877 * server.h: Do not include stdlib.h.
9878 * inferiors.c: Likewise.
9879 * linux-low.c: Likewise.
9880 * regcache.c: Likewise.
9881 * spu-low.c: Likewise.
9882 * tracepoint.c: Likewise.
9883 * utils.c: Likewise.
9884
9885 2014-08-07 Gary Benson <gbenson@redhat.com>
9886
9887 * server.h: Do not include stdio.h.
9888 * linux-low.c: Likewise.
9889 * remote-utils.c: Likewise.
9890 * spu-low.c: Likewise.
9891 * utils.c: Likewise.
9892 * wincecompat.c: Likewise.
9893
9894 2014-08-06 Gary Benson <gbenson@redhat.com>
9895
9896 * regcache.c (init_register_cache): Move conditionals inside if.
9897
9898 2014-08-06 Gary Benson <gbenson@redhat.com>
9899
9900 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
9901
9902 2014-07-31 Gary Benson <gbenson@redhat.com>
9903
9904 * ax.h: Do not include server.h.
9905 * gdbthread.h: Likewise.
9906 * lynx-low.h: Likewise.
9907 * notif.h: Likewise.
9908
9909 2014-07-30 Gary Benson <gbenson@redhat.com>
9910
9911 * server.h: Include common-defs.h.
9912 Do not include config.h or build-gnulib-gdbserver/config.h.
9913
9914 2014-07-30 Gary Benson <gbenson@redhat.com>
9915
9916 * hostio-errno.c: Move server.h to top of includes list.
9917 * inferiors.c: Likewise.
9918 * linux-x86-low.c: Likewise.
9919 * notif.c: Include server.h.
9920
9921 2014-07-24 Tom Tromey <tromey@redhat.com>
9922 Gary Benson <gbenson@redhat.com>
9923
9924 * server.h (CORE_ADDR): Now unsigned.
9925
9926 2014-07-16 Pedro Alves <palves@redhat.com>
9927
9928 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
9929
9930 2014-07-15 Pedro Alves <palves@redhat.com>
9931
9932 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
9933 copy.
9934
9935 2014-07-11 Pedro Alves <palves@redhat.com>
9936
9937 * linux-low.c (kill_wait_lwp): New function, based on
9938 kill_one_lwp_callback, but use my_waitpid directly.
9939 (kill_one_lwp_callback, linux_kill): Use it.
9940
9941 2014-06-23 Pedro Alves <palves@redhat.com>
9942
9943 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
9944 before setting DR0..DR3.
9945
9946 2014-06-20 Gary Benson <gbenson@redhat.com>
9947
9948 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
9949 * configure: Regenerated.
9950 * config.in: Likewise.
9951
9952 2014-06-20 Gary Benson <gbenson@redhat.com>
9953
9954 * Makefile.in (SFILES): Update locations for files moved
9955 from common to nat.
9956 (object file files): Reordered.
9957
9958 2014-06-20 Gary Benson <gbenson@redhat.com>
9959
9960 * i386-low.h (i386_dr_low_can_set_addr): Removed.
9961 (i386_dr_low_set_addr): Likewise.
9962 (i386_dr_low_get_addr): Likewise.
9963 (i386_dr_low_can_set_control): Likewise.
9964 (i386_dr_low_set_control): Likewise.
9965 (i386_dr_low_get_control): Likewise.
9966 (i386_dr_low_get_status): Likewise.
9967 (i386_get_debug_register_length): Likewise.
9968 * linux-x86-low.c (i386_dr_low_set_addr):
9969 Changed signature. Made static.
9970 (i386_dr_low_get_addr): Likewise.
9971 (i386_dr_low_set_control): Likewise.
9972 (i386_dr_low_get_control): Likewise.
9973 (i386_dr_low_get_status): Likewise.
9974 (i386_dr_low): New global variable.
9975 * win32-i386-low.c (i386_dr_low_set_addr):
9976 Changed signature. Made static.
9977 (i386_dr_low_get_addr): Likewise.
9978 (i386_dr_low_set_control): Likewise.
9979 (i386_dr_low_get_control): Likewise.
9980 (i386_dr_low_get_status): Likewise.
9981 (i386_dr_low): New global variable.
9982
9983 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
9984
9985 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
9986 * Makefile.in (AR, AR_FLAGS): Define.
9987 * configure: Regenerate.
9988
9989 2014-06-19 Gary Benson <gbenson@redhat.com>
9990
9991 * Makefile.in (i386-dregs.o): New rule.
9992 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
9993 * i386-low.c (target.h): Remove include.
9994 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
9995 (DR_CONTROL_SHIFT): Likewise.
9996 (DR_CONTROL_SIZE): Likewise.
9997 (DR_RW_EXECUTE): Likewise.
9998 (DR_RW_WRITE): Likewise.
9999 (DR_RW_READ): Likewise.
10000 (DR_RW_IORW): Likewise.
10001 (DR_LEN_1): Likewise.
10002 (DR_LEN_2): Likewise.
10003 (DR_LEN_4): Likewise.
10004 (DR_LEN_8): Likewise.
10005 (DR_LOCAL_ENABLE_SHIFT): Likewise.
10006 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
10007 (DR_ENABLE_SIZE): Likewise.
10008 (DR_LOCAL_SLOWDOWN): Likewise.
10009 (DR_GLOBAL_SLOWDOWN): Likewise.
10010 (DR_CONTROL_RESERVED): Likewise.
10011 (I386_DR_CONTROL_MASK): Likewise.
10012 (I386_DR_VACANT): Likewise.
10013 (I386_DR_LOCAL_ENABLE): Likewise.
10014 (I386_DR_GLOBAL_ENABLE): Likewise.
10015 (I386_DR_DISABLE): Likewise.
10016 (I386_DR_SET_RW_LEN): Likewise.
10017 (I386_DR_GET_RW_LEN): Likewise.
10018 (I386_DR_WATCH_HIT): Likewise.
10019 (i386_wp_op_t): Likewise.
10020 (i386_show_dr): Likewise.
10021 (i386_length_and_rw_bits): Likewise.
10022 (i386_insert_aligned_watchpoint): Likewise.
10023 (i386_remove_aligned_watchpoint): Likewise.
10024 (i386_handle_nonaligned_watchpoint): Likewise.
10025 i386_update_inferior_debug_regs(): Likewise.
10026 (i386_dr_insert_watchpoint): Likewise.
10027 (i386_dr_remove_watchpoint): Likewise.
10028 (i386_dr_region_ok_for_watchpoint): Likewise.
10029 (i386_dr_stopped_data_address): Likewise.
10030 (i386_dr_stopped_by_watchpoint): Likewise.
10031
10032 2014-06-19 Gary Benson <gbenson@redhat.com>
10033
10034 * i386-low.c (i386_dr_show): Renamed to
10035 i386_show_dr and made static. All uses updated.
10036 (i386_dr_length_and_rw_bits): Renamed to
10037 i386_length_and_rw_bits and made static.
10038 All uses updated.
10039 (i386_dr_insert_aligned_watchpoint): Renamed to
10040 i386_insert_aligned_watchpoint and made static.
10041 All uses updated.
10042 (i386_dr_remove_aligned_watchpoint): Renamed to
10043 i386_remove_aligned_watchpoint and made static.
10044 All uses updated.
10045 (i386_dr_update_inferior_debug_regs): Renamed to
10046 i386_update_inferior_debug_regs and made static.
10047 All uses updated.
10048
10049 2014-06-18 Gary Benson <gbenson@redhat.com>
10050
10051 * i386-low.h (i386_dr_low_can_set_addr): New macro.
10052 (i386_dr_low_can_set_control): Likewise.
10053 (i386_get_debug_register_length): Likewise.
10054 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
10055 (i386_dr_low_can_set_control): Likewise.
10056 (i386_get_debug_register_length): Likewise.
10057
10058 2014-06-17 Gary Benson <gbenson@redhat.com>
10059
10060 * i386-low.h (i386-dregs.h): New include.
10061 (DR_FIRSTADDR): Now in i386-dregs.h.
10062 (DR_LASTADDR): Likewise.
10063 (DR_NADDR): Likewise.
10064 (DR_STATUS): Likewise.
10065 (DR_CONTROL): Likewise.
10066 (i386_debug_reg_state): Likewise.
10067 (i386_dr_insert_watchpoint): Likewise.
10068 (i386_dr_remove_watchpoint): Likewise.
10069 (i386_dr_region_ok_for_watchpoint): Likewise.
10070 (i386_dr_stopped_data_address): Likewise.
10071 (i386_dr_stopped_by_watchpoint): Likewise.
10072 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
10073
10074 2014-06-18 Gary Benson <gbenson@redhat.com>
10075
10076 * i386-low.h (i386_low_insert_watchpoint): Renamed to
10077 i386_dr_insert_watchpoint.
10078 (i386_low_remove_watchpoint): Renamed to
10079 i386_dr_remove_watchpoint.
10080 (i386_low_region_ok_for_watchpoint): Renamed to
10081 i386_dr_region_ok_for_watchpoint.
10082 (i386_low_stopped_data_address): Renamed to
10083 i386_dr_stopped_data_address.
10084 (i386_low_stopped_by_watchpoint): Renamed to
10085 i386_dr_stopped_by_watchpoint.
10086 * i386-low.c (i386_show_dr): Renamed to
10087 i386_dr_show and made nonstatic. All uses updated.
10088 (i386_length_and_rw_bits): Renamed to
10089 i386_dr_length_and_rw_bits and made nonstatic.
10090 All uses updated.
10091 (i386_insert_aligned_watchpoint): Renamed to
10092 i386_dr_insert_aligned_watchpoint and made nonstatic.
10093 All uses updated.
10094 (i386_remove_aligned_watchpoint): Renamed to
10095 i386_dr_remove_aligned_watchpoint and made nonstatic.
10096 All uses updated.
10097 (i386_update_inferior_debug_regs): Renamed to
10098 i386_dr_update_inferior_debug_regs and made nonstatic.
10099 All uses updated.
10100 (i386_low_insert_watchpoint): Renamed to
10101 i386_dr_insert_watchpoint. All uses updated.
10102 (i386_low_remove_watchpoint): Renamed to
10103 i386_dr_remove_watchpoint. All uses updated.
10104 (i386_low_region_ok_for_watchpoint): Renamed to
10105 i386_dr_region_ok_for_watchpoint. All uses updated.
10106 (i386_low_stopped_data_address): Renamed to
10107 i386_dr_stopped_data_address. All uses updated.
10108 (i386_low_stopped_by_watchpoint): Renamed to
10109 i386_dr_stopped_by_watchpoint. All uses updated.
10110
10111 2014-06-18 Gary Benson <gbenson@redhat.com>
10112
10113 * i386-low.c (i386_dr_low_can_set_addr): New macro.
10114 (i386_dr_low_can_set_control): Likewise.
10115 (i386_insert_aligned_watchpoint): New check.
10116
10117 2014-06-18 Gary Benson <gbenson@redhat.com>
10118
10119 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
10120 Renamed to state.
10121
10122 2014-06-18 Gary Benson <gbenson@redhat.com>
10123
10124 * i386-low.c (i386_length_and_rw_bits): Use internal_error
10125 instead of fatal and error.
10126 (i386_handle_nonaligned_watchpoint): Likewise.
10127
10128 2014-06-18 Gary Benson <gbenson@redhat.com>
10129
10130 * i386-low.c (i386_get_debug_register_length): New macro.
10131 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
10132 (i386_show_dr): Use debug_printf instead of fprintf. Use
10133 phex to format values.
10134
10135 2014-06-18 Gary Benson <gbenson@redhat.com>
10136
10137 * i386-low.h: Comment changes.
10138 * i386-low.c: Likewise.
10139
10140 2014-06-18 Gary Benson <gbenson@redhat.com>
10141
10142 * i386-low.c: Whitespace changes.
10143
10144 2014-06-12 Tom Tromey <tromey@redhat.com>
10145
10146 * utils.c (freeargv): Remove.
10147
10148 2014-06-12 Tom Tromey <tromey@redhat.com>
10149
10150 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
10151 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
10152 (parse_debug_format_options): Likewise.
10153 (gdbserver_usage): Likewise.
10154 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
10155 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
10156 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
10157 against libiberty.
10158 ($(LIBGNU)): Depend on libiberty.
10159 (all-lib): Recurse into all subdirs.
10160 (install-only): Invoke "install" target in subdirs.
10161 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
10162 targets.
10163 * configure: Rebuild.
10164 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
10165 for vasprintf, vsnprintf, or gettimeofday.
10166 * configure.srv: Don't add safe-ctype.o or lbasename.o to
10167 srv_tgtobj.
10168
10169 2014-06-05 Joel Brobecker <brobecker@adacore.com>
10170
10171 * development.sh: Delete.
10172 * Makefile.in (config.status): Adjust dependency on development.sh.
10173 * configure.ac: Adjust development.sh source call.
10174 * configure: Regenerate.
10175
10176 2014-06-02 Pedro Alves <palves@redhat.com>
10177
10178 * ax.c (gdb_free_agent_expr): New function.
10179 * ax.h (gdb_free_agent_expr): New declaration.
10180 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
10181 list.
10182 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
10183 static.
10184 (clear_breakpoint_conditions_and_commands): New function.
10185 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
10186 (clear_breakpoint_conditions_and_commands): New declaration.
10187
10188 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
10189
10190 * linux-aarch64-low.c (asm/ptrace.h): Include.
10191
10192 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10193
10194 Fix TLS access for -static -pthread.
10195 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
10196 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
10197 (thread_db_load_search, try_thread_db_load_1): Initialize it.
10198
10199 2014-05-20 Pedro Alves <palves@redhat.com>
10200
10201 * linux-aarch64-low.c (aarch64_insert_point)
10202 (aarch64_remove_point): No longer check whether the type is
10203 supported here. Adjust to new interface.
10204 (the_low_target): Install aarch64_supports_z_point_type as
10205 supports_z_point_type method.
10206 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
10207 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
10208 instead of a Z packet char. Adjust.
10209 (arm_supports_z_point_type): New function.
10210 (arm_insert_point, arm_remove_point): Adjust to new interface.
10211 (the_low_target): Install arm_supports_z_point_type.
10212 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
10213 (cris_insert_point, cris_remove_point): Adjust to new interface.
10214 Don't check whether the type is supported here.
10215 (the_low_target): Install cris_supports_z_point_type.
10216 * linux-low.c (linux_supports_z_point_type): New function.
10217 (linux_insert_point, linux_remove_point): Adjust to new interface.
10218 * linux-low.h (struct linux_target_ops) <insert_point,
10219 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
10220 raw_breakpoint pointer parameter.
10221 <supports_z_point_type>: New method.
10222 * linux-mips-low.c (mips_supports_z_point_type): New function.
10223 (mips_insert_point, mips_remove_point): Adjust to new interface.
10224 Use mips_supports_z_point_type.
10225 (the_low_target): Install mips_supports_z_point_type.
10226 * linux-ppc-low.c (the_low_target): Install NULL as
10227 supports_z_point_type method.
10228 * linux-s390-low.c (the_low_target): Install NULL as
10229 supports_z_point_type method.
10230 * linux-sparc-low.c (the_low_target): Install NULL as
10231 supports_z_point_type method.
10232 * linux-x86-low.c (x86_supports_z_point_type): New function.
10233 (x86_insert_point): Adjust to new insert_point interface. Use
10234 insert_memory_breakpoint. Adjust to new
10235 i386_low_insert_watchpoint interface.
10236 (x86_remove_point): Adjust to remove_point interface. Use
10237 remove_memory_breakpoint. Adjust to new
10238 i386_low_remove_watchpoint interface.
10239 (the_low_target): Install x86_supports_z_point_type.
10240 * lynx-low.c (lynx_target_ops): Install NULL as
10241 supports_z_point_type callback.
10242 * nto-low.c (nto_supports_z_point_type): New.
10243 (nto_insert_point, nto_remove_point): Adjust to new interface.
10244 (nto_target_ops): Install nto_supports_z_point_type.
10245 * mem-break.c: Adjust intro comment.
10246 (struct raw_breakpoint) <raw_type, size>: New fields.
10247 <inserted>: Update comment.
10248 <shlib_disabled>: Delete field.
10249 (enum bkpt_type) <gdb_breakpoint>: Delete value.
10250 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
10251 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
10252 (raw_bkpt_type_to_target_hw_bp_type): New function.
10253 (find_enabled_raw_code_breakpoint_at): New function.
10254 (find_raw_breakpoint_at): New type and size parameters. Use them.
10255 (insert_memory_breakpoint): New function, based off
10256 set_raw_breakpoint_at.
10257 (remove_memory_breakpoint): New function.
10258 (set_raw_breakpoint_at): Reimplement.
10259 (set_breakpoint): New, based on set_breakpoint_at.
10260 (set_breakpoint_at): Reimplement.
10261 (delete_raw_breakpoint): Go through the_target->remove_point
10262 instead of assuming memory breakpoints.
10263 (find_gdb_breakpoint_at): Delete.
10264 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
10265 (find_gdb_breakpoint): New function.
10266 (set_gdb_breakpoint_at): Delete.
10267 (z_type_supported): New function.
10268 (set_gdb_breakpoint_1): New function, loosely based off
10269 set_gdb_breakpoint_at.
10270 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
10271 (delete_gdb_breakpoint_at): Delete.
10272 (delete_gdb_breakpoint_1): New function, loosely based off
10273 delete_gdb_breakpoint_at.
10274 (delete_gdb_breakpoint): New function.
10275 (clear_gdb_breakpoint_conditions): Rename to ...
10276 (clear_breakpoint_conditions): ... this. Don't handle a NULL
10277 breakpoint.
10278 (add_condition_to_breakpoint): Make static.
10279 (add_breakpoint_condition): Take a struct breakpoint pointer
10280 instead of an address. Adjust.
10281 (gdb_condition_true_at_breakpoint): Rename to ...
10282 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
10283 z_type parameter.
10284 (gdb_condition_true_at_breakpoint): Reimplement.
10285 (add_breakpoint_commands): Take a struct breakpoint pointer
10286 instead of an address. Adjust.
10287 (gdb_no_commands_at_breakpoint): Rename to ...
10288 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
10289 parameter. Return true if no breakpoint was found. Change debug
10290 output.
10291 (gdb_no_commands_at_breakpoint): Reimplement.
10292 (run_breakpoint_commands): Rename to ...
10293 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
10294 and change return type to boolean.
10295 (run_breakpoint_commands): New function.
10296 (gdb_breakpoint_here): Also check for Z1 breakpoints.
10297 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
10298 breakpoint. Go through the_target->remove_point instead of
10299 assuming memory breakpoint.
10300 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
10301 software and hardware breakpoints.
10302 (reinsert_raw_breakpoint): Go through the_target->insert_point
10303 instead of assuming memory breakpoint.
10304 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
10305 software and hardware breakpoints.
10306 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
10307 Check both software and hardware breakpoints.
10308 (validate_inserted_breakpoint): Assert the breakpoint is a
10309 software breakpoint. Set the inserted flag to -1 instead of
10310 setting shlib_disabled.
10311 (delete_disabled_breakpoints): Adjust.
10312 (validate_breakpoints): Only validate software breakpoints.
10313 Adjust to inserted flag change.
10314 (check_mem_read, check_mem_write): Skip breakpoint types other
10315 than software breakpoints. Adjust to inserted flag change.
10316 * mem-break.h (enum raw_bkpt_type): New enum.
10317 (raw_breakpoint, struct process_info): Forward declare.
10318 (Z_packet_to_target_hw_bp_type): Delete declaration.
10319 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
10320 (set_gdb_breakpoint, delete_gdb_breakpoint)
10321 (clear_breakpoint_conditions): New declarations.
10322 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
10323 (breakpoint_inserted_here): Update comment.
10324 (add_breakpoint_condition, add_breakpoint_commands): Replace
10325 address parameter with a breakpoint pointer parameter.
10326 (gdb_breakpoint_here): Update comment.
10327 (delete_gdb_breakpoint_at): Delete.
10328 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
10329 * server.c (process_point_options): Take a struct breakpoint
10330 pointer instead of an address. Adjust.
10331 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
10332 delete_gdb_breakpoint.
10333 * spu-low.c (spu_target_ops): Install NULL as
10334 supports_z_point_type method.
10335 * target.h: Include mem-break.h.
10336 (struct target_ops) <prepare_to_access_memory>: Update comment.
10337 <supports_z_point_type>: New field.
10338 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
10339 instead of a char. Also take a raw breakpoint pointer.
10340 * win32-arm-low.c (the_low_target): Install NULL as
10341 supports_z_point_type.
10342 * win32-i386-low.c (i386_supports_z_point_type): New function.
10343 (i386_insert_point, i386_remove_point): Adjust to new interface.
10344 (the_low_target): Install i386_supports_z_point_type.
10345 * win32-low.c (win32_supports_z_point_type): New function.
10346 (win32_insert_point, win32_remove_point): Adjust to new interface.
10347 (win32_target_ops): Install win32_supports_z_point_type.
10348 * win32-low.h (struct win32_target_ops):
10349 <supports_z_point_type>: New method.
10350 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
10351 instead of a char. Also take a raw breakpoint pointer.
10352
10353 2014-05-20 Pedro Alves <palves@redhat.com>
10354
10355 * mem-break.h: Include break-common.h.
10356 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
10357 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
10358 (Z_packet_to_target_hw_bp_type): New declaration.
10359 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
10360 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
10361 (Z_PACKET_ACCESS_WP): Delete macros.
10362 (Z_packet_to_hw_type): Delete function.
10363 * i386-low.h: Don't include break-common.h here.
10364 (Z_packet_to_hw_type): Delete declaration.
10365 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
10366 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
10367 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
10368 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
10369 * linux-aarch64-low.c: Don't include break-common.h here.
10370 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
10371 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
10372 (Z_packet_to_target_hw_bp_type): Delete function.
10373 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
10374 function.
10375 (mips_insert_point, mips_remove_point): Use
10376 Z_packet_to_target_hw_bp_type.
10377
10378 2014-05-20 Pedro Alves <palves@redhat.com>
10379
10380 * linux-aarch64-low.c: Include break-common.h.
10381 (enum target_point_type): Delete.
10382 (Z_packet_to_point_type): Rename to ...
10383 (Z_packet_to_target_hw_bp_type): ... this, and return a
10384 target_hw_bp_type instead.
10385 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
10386 instead of an enum target_point_type.
10387 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
10388 breakpoint type.
10389 (aarch64_dr_state_insert_one_point)
10390 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
10391 (aarch64_handle_aligned_watchpoint)
10392 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
10393 Take an enum target_hw_bp_type instead of an enum
10394 target_point_type.
10395 (aarch64_supports_z_point_type): New function.
10396 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
10397 use Z_packet_to_target_hw_bp_type.
10398
10399 2014-05-20 Joel Brobecker <brobecker@adacore.com>
10400
10401 * configure.ac: Only use -Werror by default when DEVELOPMENT
10402 is true.
10403 * configure: Regenerate.
10404
10405 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
10406
10407 Fix gdbserver qGetTLSAddr for x86_64 -m32.
10408 * linux-x86-low.c (X86_64_USER_REGS): New.
10409 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
10410
10411 2014-04-28 Yao Qi <yao@codesourcery.com>
10412
10413 * Makefile.in (i386-avx512.c): Fix the typo of generated file
10414 name.
10415
10416 2014-04-25 Pedro Alves <palves@redhat.com>
10417
10418 PR server/16255
10419 * linux-low.c (linux_attach_fail_reason_string): New function.
10420 (linux_attach_lwp): Delete.
10421 (linux_attach_lwp_1): Rename to ...
10422 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
10423 argument. Remove "initial" parameter. Return int instead of
10424 void. Don't error or warn here.
10425 (linux_attach): Adjust to call linux_attach_lwp. Call error on
10426 failure to attach to the tgid. Call warning when failing to
10427 attach to an lwp.
10428 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
10429 argument. Remove "initial" parameter. Return int instead of
10430 void. Don't error or warn here.
10431 (linux_attach_fail_reason_string): New declaration.
10432 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
10433 interface change. Use linux_attach_fail_reason_string.
10434
10435 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
10436 Walfred Tedeschi <walfred.tedeschi@intel.com>
10437
10438 * Makefile.in: Added rules to handle new files
10439 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
10440 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
10441 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
10442 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
10443 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
10444 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
10445 x32-avx512-linux.o.
10446 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
10447 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
10448 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
10449 i386/x32-avx512.xml.
10450 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
10451 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
10452 i386/x32-avx512-linux.xml.
10453 * i387-fp.c (num_avx512_k_registers): New constant for number
10454 of K registers.
10455 (num_avx512_zmmh_low_registers): New constant for number of
10456 lower ZMM registers (0-15).
10457 (num_avx512_zmmh_high_registers): New constant for number of
10458 higher ZMM registers (16-31).
10459 (num_avx512_ymmh_registers): New contant for number of higher
10460 YMM registers (ymm16-31 added by avx521 on x86_64).
10461 (num_avx512_xmm_registers): New constant for number of higher
10462 XMM registers (xmm16-31 added by AVX512 on x86_64).
10463 (struct i387_xsave): Add space for AVX512 registers.
10464 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
10465 Add code to handle AVX512 registers.
10466 (i387_xsave_to_cache): Add code to handle AVX512 registers.
10467 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
10468 prototypei from generated file.
10469 (tdesc_amd64_avx512_linux): Likewise.
10470 (init_registers_x32_avx512_linux): Likewise.
10471 (tdesc_x32_avx512_linux): Likewise.
10472 (init_registers_i386_avx512_linux): Likewise.
10473 (tdesc_i386_avx512_linux): Likewise.
10474 (x86_64_regmap): Add AVX512 registers.
10475 (x86_linux_read_description): Add code to handle AVX512 XSTATE
10476 mask.
10477 (initialize_low_arch): Add code to initialize AVX512 registers.
10478
10479 2014-04-23 Pedro Alves <palves@redhat.com>
10480
10481 * mem-break.c (find_gdb_breakpoint_at): Make static.
10482 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
10483
10484 2014-04-23 Pedro Alves <palves@redhat.com>
10485
10486 * i386-low.c: Don't include break-common.h here.
10487 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
10488 prototype to take target_hw_bp_type as argument instead of a Z
10489 packet char.
10490 * i386-low.h: Include break-common.h here.
10491 (Z_packet_to_hw_type): Declare.
10492 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
10493 prototypes.
10494 * linux-x86-low.c (x86_insert_point): Convert the packet number to
10495 a target_hw_bp_type before calling i386_low_insert_watchpoint.
10496 (x86_remove_point): Convert the packet number to a
10497 target_hw_bp_type before calling i386_low_remove_watchpoint.
10498 * win32-i386-low.c (i386_insert_point): Convert the packet number
10499 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
10500 (i386_remove_point): Convert the packet number to a
10501 target_hw_bp_type before calling i386_low_remove_watchpoint.
10502
10503 2014-04-23 Pedro Alves <palves@redhat.com>
10504
10505 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
10506
10507 2014-04-10 Pedro Alves <palves@redhat.com>
10508
10509 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
10510 Check if the condition or command is NULL before checking if the
10511 breakpoint is known. On success, return true.
10512 * mem-break.h (add_breakpoint_condition): Document return.
10513 (add_breakpoint_commands): Add describing comment.
10514 * server.c (skip_to_semicolon): New function.
10515 (process_point_options): Use it.
10516
10517 2014-04-09 Pedro Alves <palves@redhat.com>
10518
10519 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
10520 to lwpid_of.
10521
10522 2014-02-27 Pedro Alves <palves@redhat.com>
10523
10524 PR 12702
10525 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
10526 macros.
10527 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
10528 output.
10529 (last_thread_of_process_p): Take a PID argument instead of a
10530 thread pointer.
10531 (linux_wait_for_lwp): Delete.
10532 (num_lwps, check_zombie_leaders, not_stopped_callback): New
10533 functions.
10534 (linux_low_filter_event): New function, party factored out from
10535 linux_wait_for_event.
10536 (linux_wait_for_event): Rename to ...
10537 (linux_wait_for_event_filtered): ... this. Add new filter ptid
10538 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
10539 sigsuspend. Check for zombie leaders.
10540 (linux_wait_for_event): Reimplement as wrapper around
10541 linux_wait_for_event_filtered.
10542 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
10543 a normal or signal exit is seen, it's the whole process exiting.
10544 (wait_for_sigstop): No longer a for_each_inferior callback.
10545 Rewrite on top of linux_wait_for_event_filtered.
10546 (stop_all_lwps): Call wait_for_sigstop directly.
10547 * server.c (resume, handle_target_event): Handle
10548 TARGET_WAITKIND_NO_RESUMED.
10549
10550 2014-02-26 Joel Brobecker <brobecker@adacore.com>
10551
10552 * win32-low.c (psapi_get_dll_name,
10553 * win32_CreateToolhelp32Snapshot): Delete.
10554 (win32_CreateToolhelp32Snapshot, win32_Module32First)
10555 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
10556 Delete.
10557 (handle_load_dll): Add function description.
10558 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
10559
10560 2014-02-26 Joel Brobecker <brobecker@adacore.com>
10561
10562 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
10563 Add comment.
10564 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
10565 base address when calling win32_add_one_solib.
10566 (handle_load_dll): Delete local variable load_addr.
10567 Remove 0x1000 offset applied to DLL base address when calling
10568 win32_add_one_solib.
10569 (handle_unload_dll): Add comment.
10570
10571 2014-02-26 Joel Brobecker <brobecker@adacore.com>
10572
10573 * win32-low.c (win32_add_all_dlls): Renames
10574 win32_ensure_ntdll_loaded. Rewrite function documentation.
10575 Adjust implementation to always load all DLLs.
10576 Add 0x1000 offset to DLL base address when calling
10577 win32_add_one_solib.
10578 (child_initialization_done): New static global.
10579 (do_initial_child_stuff): Set child_initialization_done to
10580 zero during child initialization, and 1 after. Replace call
10581 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
10582 Add comment.
10583 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
10584 (handle_unload_dll): Add function documentation.
10585 (get_child_debug_event): Ignore load and unload DLL events
10586 during child initialization.
10587
10588 2014-02-20 Doug Evans <dje@google.com>
10589
10590 Remove global all_lwps.
10591 * inferiors.h (ptid_of): Move here from linux-low.h.
10592 (pid_of, lwpid_of): Ditto.
10593 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
10594 parameter is a struct thread_info * now.
10595 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
10596 directly. Pass &all_threads to find_inferior instead of &all_lwps.
10597 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
10598 directly.
10599 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
10600 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
10601 * linux-arm-low.c (update_registers_callback): Update, "entry"
10602 parameter is a struct thread_info * now.
10603 Fetch lwpid from current_inferior directly.
10604 (arm_insert_point): Pass &all_threads to find_inferior instead of
10605 &all_lwps.
10606 (arm_remove_point): Ditto.
10607 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
10608 (arm_prepare_to_resume): Fetch pid from thread.
10609 (arm_read_description): Fetch lwpid from current_inferior directly.
10610 * linux-low.c (all_lwps): Delete.
10611 (delete_lwp): Delete call to remove_inferior.
10612 (handle_extended_wait): Fetch lwpid from thread.
10613 (add_lwp): Don't set lwp->entry.id. Remove call to
10614 add_inferior_to_list.
10615 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
10616 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
10617 (kill_one_lwp_callback): Ditto.
10618 (linux_kill): Don't dereference NULL pointer.
10619 Fetch ptid,lwpid from thread.
10620 (get_detach_signal): Fetch ptid from thread.
10621 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
10622 Simplify call to regcache_invalidate_thread.
10623 (delete_lwp_callback): Update, "entry" parameter is a
10624 struct thread_info * now. Fetch pid from thread.
10625 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
10626 (status_pending_p_callback): Update, "entry" parameter is a
10627 struct thread_info * now. Fetch ptid from thread.
10628 (find_lwp_pid): Update, "entry" parameter is a
10629 struct thread_info * now.
10630 (linux_wait_for_lwp): Fetch pid from thread.
10631 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
10632 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
10633 (enqueue_one_deferred_signal): Fetch lwpid from thread.
10634 (dequeue_one_deferred_signal): Ditto.
10635 (cancel_breakpoint): Fetch ptid from current_inferior.
10636 (linux_wait_for_event): Pass &all_threads to find_inferior,
10637 not &all_lwps. Fetch ptid, lwpid from thread.
10638 (count_events_callback): Update, "entry" parameter is a
10639 struct thread_info * now.
10640 (select_singlestep_lwp_callback): Ditto.
10641 (select_event_lwp_callback): Ditto.
10642 (cancel_breakpoints_callback): Ditto.
10643 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
10644 not &all_lwps.
10645 (select_event_lwp): Ditto. Fetch ptid from event_thread.
10646 (unsuspend_one_lwp): Update, "entry" parameter is a
10647 struct thread_info * now.
10648 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
10649 not &all_lwps.
10650 (linux_stabilize_threads): Ditto. And for for_each_inferior.
10651 Fetch lwpid from thread, not lwp.
10652 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
10653 Pass &all_threads to find_inferior, not &all_lwps.
10654 (send_sigstop): Fetch lwpid from thread, not lwp.
10655 (send_sigstop_callback): Update, "entry" parameter is a
10656 struct thread_info * now.
10657 (suspend_and_send_sigstop_callback): Ditto.
10658 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
10659 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
10660 struct thread_info * now.
10661 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
10662 from thread, lwp.
10663 (lwp_running): Update, "entry" parameter is a
10664 struct thread_info * now.
10665 (stop_all_lwps): Fetch ptid from thread.
10666 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
10667 (linux_resume_one_lwp): Fetch lwpid from thread.
10668 (linux_set_resume_request): Update, "entry" parameter is a
10669 struct thread_info * now. Fetch pid, lwpid from thread.
10670 (resume_status_pending_p): Update, "entry" parameter is a
10671 struct thread_info * now.
10672 (need_step_over_p): Ditto. Fetch lwpid from thread.
10673 (start_step_over): Fetch lwpid from thread.
10674 (linux_resume_one_thread): Update, "entry" parameter is a
10675 struct thread_info * now. Fetch lwpid from thread.
10676 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
10677 (proceed_one_lwp): Update, "entry" parameter is a
10678 struct thread_info * now. Fetch lwpid from thread.
10679 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
10680 struct thread_info * now.
10681 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
10682 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
10683 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
10684 directly.
10685 (regsets_store_inferior_registers): Ditto.
10686 (fetch_register, store_register): Ditto.
10687 (linux_read_memory, linux_write_memory): Ditto.
10688 (linux_request_interrupt): Ditto.
10689 (linux_read_auxv): Ditto.
10690 (linux_xfer_siginfo): Ditto.
10691 (linux_qxfer_spu): Ditto.
10692 (linux_qxfer_libraries_svr4): Ditto.
10693 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
10694 moved to inferiors.h.
10695 (get_lwp): Delete.
10696 (get_thread_lwp): Update.
10697 (struct lwp_info): Delete member "entry". Simplify comment for
10698 member "thread".
10699 (all_lwps): Delete.
10700 * linux-mips-low.c (mips_read_description): Fetch lwpid from
10701 current_inferior directly.
10702 (update_watch_registers_callback): Update, "entry" parameter is a
10703 struct thread_info * now. Fetch pid from thread.
10704 (mips_linux_prepare_to_resume): Fetch ptid from thread.
10705 (mips_insert_point): Fetch lwpid from current_inferior.
10706 Pass &all_threads to find_inferior, not &all_lwps.
10707 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
10708 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
10709 directly.
10710 (mips_stopped_data_address): Ditto.
10711 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
10712 directly.
10713 * linux-tile-low.c (tile_arch_setup): Ditto.
10714 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
10715 (update_debug_registers_callback): Update, "entry" parameter is a
10716 struct thread_info * now. Fetch pid from thread.
10717 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
10718 Pass &all_threads to find_inferior, not &all_lwps.
10719 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
10720 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
10721 Pass &all_threads to find_inferior, not &all_lwps.
10722 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
10723 (i386_dr_low_get_status): Ditto.
10724 (x86_linux_prepare_to_resume): Fetch ptid from thread.
10725 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
10726 (x86_linux_read_description): Ditto.
10727 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
10728
10729 2014-02-20 Doug Evans <dje@google.com>
10730
10731 * inferiors.c (get_first_inferior): Fix buglet.
10732
10733 2014-02-19 Doug Evans <dje@google.com>
10734
10735 * gdbthread.h (add_thread): Change result type to struct thread_info *.
10736 * inferiors.c (add_thread): Change result type to struct thread_info *.
10737 All callers updated.
10738 (add_lwp): Call add_thread here instead of in callers.
10739 All callers updated.
10740 * linux-low.h (get_lwp_thread): Rewrite.
10741 (struct lwp_info): New member "thread".
10742
10743 2014-02-19 Doug Evans <dje@google.com>
10744
10745 * linux-low.c (add_lwp): Change result to struct lwp_info *.
10746 All callers updated.
10747
10748 2014-02-19 Doug Evans <dje@google.com>
10749
10750 * inferiors.c (add_thread): Fix whitespace.
10751
10752 2014-02-19 Doug Evans <dje@google.com>
10753
10754 * dll.c (clear_dlls): Replace accessing list implemention details
10755 with API function.
10756 * gdbthread.h (get_first_thread): Declare.
10757 * inferiors.c (for_each_inferior_with_data): New function.
10758 (get_first_thread): New function.
10759 (find_thread_ptid): Simplify.
10760 (get_first_inferior): New function.
10761 (clear_list): Delete.
10762 (one_inferior_p): New function.
10763 (clear_inferior_list): New function.
10764 (clear_inferiors): Update.
10765 * inferiors.h (for_each_inferior_with_data): Declare.
10766 (clear_inferior_list): Declare.
10767 (one_inferior_p): Declare.
10768 (get_first_inferior): Declare.
10769 * linux-low.c (linux_wait_for_event): Replace accessing list
10770 implemention details with API function.
10771 * server.c (target_running): Ditto.
10772 (accumulate_file_name_length): New function.
10773 (emit_dll_description): New function.
10774 (handle_qxfer_libraries): Replace accessing list implemention
10775 details with API function.
10776 (handle_qxfer_threads_worker): New function.
10777 (handle_qxfer_threads_proper): Replace accessing list implemention
10778 details with API function.
10779 (handle_query): Ditto.
10780 (visit_actioned_threads_callback_ftype): New typedef.
10781 (visit_actioned_threads_data): New struct.
10782 (visit_actioned_threads): Rewrite to be find_inferior callback.
10783 (resume): Call find_inferior.
10784 (handle_status): Replace accessing list implemention
10785 details with API function.
10786 (process_serial_event): Replace accessing list implemention details
10787 with API function.
10788 * target.c (set_desired_inferior): Replace accessing list implemention
10789 details with API function.
10790 * tracepoint.c (same_process_p): New function.
10791 (gdb_agent_about_to_close): Replace accessing list implemention
10792 details with API function.
10793 * win32-low.c (child_delete_thread): Replace accessing list
10794 implemention details with API function.
10795 (match_dll_by_basename): New function.
10796 (dll_is_loaded_by_basename): New function.
10797 (win32_ensure_ntdll_loaded): Replace accessing list implemention
10798 details call to dll_is_loaded_by_basename.
10799
10800 2014-02-19 Doug Evans <dje@google.com>
10801
10802 * dll.h (struct dll_info): Add comment.
10803 * gdbthread.h (struct thread_info): Add comment.
10804 (current_ptid): Simplify.
10805 * inferiors.c (add_process): Update.
10806 (remove_process): Update.
10807 * inferiors.h (struct process_info): Rename member "head" to "entry".
10808 * linux-low.c (delete_lwp): Update.
10809 (add_lwp): Update.
10810 (last_thread_of_process_p): Update.
10811 (kill_one_lwp_callback, linux_kill): Update.
10812 (status_pending_p_callback): Update.
10813 (wait_for_sigstop): Update. Simplify read of ptid.
10814 (start_step_over): Update.
10815 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
10816 (get_lwp_thread): Update.
10817 (struct lwp_info): Rename member "head" to "entry".
10818 * regcache.h (inferior_list_entry): Delete.
10819 * server.c (kill_inferior_callback): Update.
10820 (detach_or_kill_inferior_callback): Update.
10821 (print_started_pid): Update.
10822 (print_attached_pid): Update.
10823 (process_serial_event): Simplify read of ptid.
10824 * thread-db.c (thread_db_create_event): Update.
10825 (thread_db_get_tls_address): Update.
10826 * win32-low.c (current_inferior_ptid): Simplify.
10827
10828 2014-02-19 Tom Tromey <tromey@redhat.com>
10829
10830 * target.h (struct target_ops) <supports_btrace>: Add target_ops
10831 argument.
10832 (target_supports_btrace): Update.
10833
10834 2014-02-14 Yao Qi <yao@codesourcery.com>
10835
10836 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
10837 (rsp-low-ipa.o): New target.
10838
10839 2014-02-12 Tom Tromey <tromey@redhat.com>
10840
10841 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
10842 convert_ascii_to_int.
10843 * regcache.c (registers_to_string): Likewise.
10844 * remote-utils.c (decode_M_packet): Likewise.
10845 * server.c (process_serial_event): Likewise.
10846
10847 2014-02-12 Tom Tromey <tromey@redhat.com>
10848
10849 * server.c (handle_query, handle_v_run): Use hex2bin, not
10850 unhexify.
10851 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
10852
10853 2014-02-12 Tom Tromey <tromey@redhat.com>
10854
10855 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
10856 convert_int_to_ascii.
10857 * regcache.c (registers_to_string, collect_register_as_string):
10858 Likewise.
10859 * remote-utils.c (look_up_one_symbol, relocate_instruction):
10860 Likewise.
10861 * server.c (process_serial_event): Likewise.
10862 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
10863 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
10864
10865 2014-02-12 Tom Tromey <tromey@redhat.com>
10866
10867 * remote-utils.c (look_up_one_symbol, monitor_output): Use
10868 bin2hex, not hexify.
10869 * tracepoint.c (cmd_qtstatus): Likewise.
10870
10871 2014-02-12 Tom Tromey <tromey@redhat.com>
10872
10873 * remote-utils.c (monitor_output): Pass explicit length to
10874 hexify.
10875
10876 2014-02-12 Tom Tromey <tromey@redhat.com>
10877
10878 * tracepoint.c: Include rsp-low.h.
10879 * server.c: Include rsp-low.h.
10880 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
10881 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
10882 declare.
10883 * remote-utils.c: Include rsp-low.h.
10884 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
10885 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
10886 (convert_int_to_ascii, convert_ascii_to_int): Move to
10887 common/rsp-low.c.
10888 * regcache.c: Include rsp-low.h.
10889 * ax.c: Include rsp-low.h.
10890 * Makefile.in (SFILES): Add common/rsp-low.c.
10891 (OBS): Add rsp-low.o.
10892 (rsp-low.o): New target.
10893
10894 2014-02-12 Tom Tromey <tromey@redhat.com>
10895
10896 * utils.h (pulongest, plongest, phex_nz): Don't declare.
10897 Include print-utils.h.
10898 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
10899 (plongest, thirty_two, phex_nz): Remove.
10900 * Makefile.in (SFILES): Add common/print-utils.c.
10901 (OBS): Add print-utils.o.
10902 (print-utils-ipa.o): New target.
10903 (print-utils.o): New target.
10904 (IPA_OBJS): Add print-utils-ipa.o.
10905
10906 2014-02-06 Tom Tromey <tromey@redhat.com>
10907
10908 * Makefile.in (SFILES): Fix indentation.
10909
10910 2014-02-05 Doug Evans <dje@google.com>
10911
10912 * linux-low.c (linux_wait_for_event): Improve comment.
10913 (linux_wait_1): Keep current_inferior in sync with event_child.
10914
10915 2014-01-22 Doug Evans <dje@google.com>
10916
10917 * gdbthread.h (gdb_id_to_thread): Delete, unused.
10918
10919 2014-01-22 Doug Evans <dje@google.com>
10920
10921 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
10922 * configure: Regenerate.
10923 * config.in: Regenerate.
10924 * Makefile.in (SFILES): Add debug.c.
10925 (OBS): Add debug.o.
10926 * debug.c: New file.
10927 * debug.h: New file.
10928 * linux-aarch64-low.c (*): Update all debugging printfs to use
10929 debug_printf instead of fprintf.
10930 * linux-arm-low.c (*): Ditto.
10931 * linux-cris-low.c (*): Ditto.
10932 * linux-crisv32-low.c (*): Ditto.
10933 * linux-m32r-low.c (*): Ditto.
10934 * linux-sparc-low.c (*): Ditto.
10935 * linux-x86.c (*): Ditto.
10936 * linux-low.c (*): Ditto.
10937 (linux_wait_1): Add calls to debug_enter, debug_exit.
10938 (linux_wait): Remove redundant debugging printf.
10939 (stop_all_lwps): Add calls to debug_enter, debug_exit.
10940 (linux_resume, unstop_all_lwps): Ditto.
10941 * mem-break.c (*): Update all debugging printfs to use
10942 debug_printf instead of fprintf.
10943 * remote-utils.c (*): Ditto.
10944 * thread-db.c (*): Ditto.
10945 * server.c #include <ctype.h>, "gdb_vecs.h".
10946 (debug_threads): Moved to debug.c.
10947 (*): Update all debugging printfs to use debug_printf instead of
10948 fprintf.
10949 (start_inferior): Replace call to fflush with call to debug_flush.
10950 (monitor_show_help): Mention set debug-format.
10951 (parse_debug_format_options): New function.
10952 (handle_monitor_command): Handle "monitor set debug-format".
10953 (gdbserver_usage): Mention --debug-format.
10954 (main): Parse --debug-format.
10955 * server.h (debug_threads): Declaration moved to debug.h.
10956 #include "debug.h".
10957 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
10958 trace_debug_1 that uses debug_printf.
10959 (tracepoint_look_up_symbols): Update all debugging printfs to use
10960 debug_printf instead of fprintf.
10961
10962 2014-01-20 Baruch Siach <baruch@tkos.co.il>
10963
10964 * linux-xtensa-low.c: Include asm/ptrace.h instead of
10965 sys/ptrace.h.
10966
10967 2014-01-17 Pedro Alves <palves@redhat.com>
10968
10969 PR build/16445
10970 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
10971 defined after including gdb_proc_service.h.
10972
10973 2014-01-16 Doug Evans <dje@google.com>
10974
10975 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
10976 (match_dll): Use it.
10977
10978 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
10979
10980 * target.h (target_ops) <read_btrace>: Change parameters and
10981 return type to allow error reporting.
10982 * server.c (handle_qxfer_btrace): Support delta reads. Pass
10983 trace reading errors on.
10984 * linux-low.c (linux_low_read_btrace): Pass trace reading
10985 errors on.
10986 (linux_low_disable_btrace): New.
10987
10988 2014-01-15 Doug Evans <dje@google.com>
10989
10990 * inferiors.c (thread_id_to_gdb_id): Delete.
10991 * inferiors.h (thread_id_to_gdb_id): Delete.
10992
10993 2014-01-13 Eli Zaretskii <eliz@gnu.org>
10994
10995 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
10996 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
10997 versions.
10998
10999 2014-01-08 Pedro Alves <palves@redhat.com>
11000
11001 * server.c (handle_status): Don't discard previous queued stop
11002 replies or thread's pending status here.
11003 (main) <disconnection>: Do it here instead.
11004
11005 2014-01-08 Pedro Alves <palves@redhat.com>
11006
11007 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
11008 * server.c (visit_actioned_threads, handle_pending_status): New
11009 function.
11010 (handle_v_cont): Factor out parts to ...
11011 (resume): ... this new function. If in all-stop, and a thread
11012 being resumed has a pending status, report it without actually
11013 resuming.
11014 (myresume): Adjust to use the new 'resume' function.
11015 (clear_pending_status_callback, set_pending_status_callback)
11016 (find_status_pending_thread_callback): New functions.
11017 (handle_status): Handle the case of multiple threads having
11018 interesting statuses to report. Report threads' real last signal
11019 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
11020 with an interesting thread to report the status for, instead of
11021 always reporting the status of the first thread.
11022
11023 2014-01-01 Joel Brobecker <brobecker@adacore.com>
11024
11025 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
11026 * gdbreplay.c (gdbreplay_version): Likewise.
11027
11028 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
11029
11030 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
11031 iov.iov_len with the real length in use.
11032
11033 2013-12-13 Joel Brobecker <brobecker@adacore.com>
11034
11035 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
11036 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
11037 for all targets that use win32-low.c.
11038 * win32-low.c (win32_ensure_ntdll_loaded): New function.
11039 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
11040
11041 2013-12-13 Pedro Alves <palves@redhat.com>
11042
11043 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
11044 if equal to TARGET_WAITKIND_LOADED.
11045 * win32-low.c (cached_status): New static global.
11046 (win32_wait): Add declaration.
11047 (do_initial_child_stuff): Flush all initial pending debug events
11048 up to the initial breakpoint.
11049 (win32_wait): If CACHED_STATUS was set, return that instead
11050 of doing a real wait. Remove the code resuming the execution
11051 of the inferior after receiving a TARGET_WAITKIND_LOADED event
11052 during the initial phase. Also remove the code changing
11053 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
11054 TARGET_WAITKIND_STOPPED.
11055
11056 2013-12-11 Yao Qi <yao@codesourcery.com>
11057
11058 * notif.c (handle_notif_ack): Return 0 if no notification
11059 matches.
11060
11061 2013-11-20 Doug Evans <dje@google.com>
11062
11063 * linux-low.c (linux_set_resume_request): Fix comment.
11064
11065 2013-11-20 Doug Evans <dje@google.com>
11066
11067 * linux-low.c (resume_status_pending_p): Tweak comment.
11068
11069 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
11070
11071 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
11072 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
11073 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
11074 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
11075 (srv_amd64_regobj): Add amd64-mpx.o.
11076 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
11077 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
11078 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
11079 * i387-fp.c (num_pl_bnd_register) Added constant.
11080 (num_pl_bnd_cfg_registers) Added constant.
11081 (struct i387_xsave) Added reserved area and MPX fields.
11082 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
11083 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
11084 function.
11085 (tdesc_i386_mpx_linux): Add MPX amd64 target.
11086 (init_registers_amd64_mpx_linux): Declare new function.
11087 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
11088 (x86_64_regmap): Add MPX registers.
11089 (x86_linux_read_description): Add MPX case.
11090 (initialize_low_arch): Initialize MPX targets.
11091
11092 2013-11-18 Tom Tromey <tromey@redhat.com>
11093
11094 * configure: Rebuild.
11095 * configure.ac: Don't check for stdlib.h.
11096 * gdbreplay.c: Unconditionally include stdlib.h.
11097
11098 2013-11-18 Tom Tromey <tromey@redhat.com>
11099
11100 * config.in: Rebuild.
11101 * configure: Rebuild.
11102 * configure.ac: Don't use AC_HEADER_DIRENT.
11103
11104 2013-11-18 Tom Tromey <tromey@redhat.com>
11105
11106 * server.h: Don't check HAVE_STRING_H.
11107 * gdbreplay.c: Don't check HAVE_STRING_H.
11108 * configure: Rebuild.
11109
11110 2013-11-18 Tom Tromey <tromey@redhat.com>
11111
11112 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
11113 LIBGNU.
11114
11115 2013-11-08 Tom Tromey <tromey@redhat.com>
11116
11117 * configure, config.in: Rebuild.
11118 * configure.ac: Remove unused configury.
11119
11120 2013-11-08 Tom Tromey <tromey@redhat.com>
11121
11122 * acinclude.m4: Include common.m4, codeset.m4.
11123 * configure, config.in: Rebuild.
11124 * configure.ac: Use GDB_AC_COMMON.
11125
11126 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
11127
11128 * linux-s390-low.c (HWCAP_S390_TE): New define.
11129 (s390_arch_setup): Consider the TE field in the HWCAP for
11130 determining 'have_regset_tdb'.
11131
11132 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
11133
11134 PR gdb/16014
11135 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
11136 call to sizeof.
11137
11138 2013-10-02 Pedro Alves <palves@redhat.com>
11139
11140 * server.c (process_serial_event): Don't output "GDBserver
11141 exiting" if GDB is connected through stdio.
11142 * target.c (mywait): Likewise, be silent if GDB is connected
11143 through stdio.
11144
11145 2013-10-01 Joel Brobecker <brobecker@adacore.com>
11146
11147 * lynx-low.c (lynx_add_threads_after_attach): New function.
11148 (lynx_attach): Remove call to add_thread. Add call to
11149 lynx_add_threads_after_attach instead.
11150
11151 2013-09-28 Mike Frysinger <vapier@gentoo.org>
11152
11153 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
11154 * config.in, configure: Regenerated.
11155
11156 2013-09-18 Yao Qi <yao@codesourcery.com>
11157
11158 PR server/15959
11159 * server.c (start_inferior): Clear 'resume_info'.
11160
11161 2013-09-16 Jiong Wang <jiwang@tilera.com>
11162
11163 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
11164 for each register.
11165
11166 2013-09-16 Jiong Wang <jiwang@tilera.com>
11167
11168 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
11169 linux-tile-low.o to srv_tgtobj.
11170
11171 2013-09-16 Will Newton <will.newton@linaro.org>
11172
11173 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
11174 out regs.
11175
11176 2013-09-06 Pedro Alves <palves@redhat.com>
11177
11178 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
11179 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
11180 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
11181 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
11182 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
11183 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
11184
11185 2013-09-06 Pedro Alves <palves@redhat.com>
11186
11187 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
11188 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
11189
11190 2013-09-06 Pedro Alves <palves@redhat.com>
11191
11192 * linux-amd64-ipa.c: Include tracepoint.h.
11193 * linux-i386-ipa.c: Include tracepoint.h.
11194
11195 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
11196
11197 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
11198 (ps_get_thread_area): New function.
11199
11200 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
11201
11202 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
11203 (initialize_low_arch): Call init_registers_crisv32 rather than
11204 init_register_crisv32.
11205
11206 2013-09-05 Pedro Alves <palves@redhat.com>
11207
11208 * server.h (handle_vFile, hostio_last_error_from_errno): Move
11209 to ...
11210 * hostio.h: ... this new file.
11211 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
11212 win32-low.c: Include hostio.h.
11213
11214 2013-09-05 Pedro Alves <palves@redhat.com>
11215
11216 * server.h (gdb_client_data, handler_func, callback_handler_func)
11217 (delete_file_handler, add_file_handler, append_callback_event)
11218 (delete_callback_event, start_event_loop, initialize_event_loop):
11219 Move to event-loop.h and include it.
11220 * event-loop.h: New file.
11221
11222 2013-09-05 Pedro Alves <palves@redhat.com>
11223
11224 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
11225 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
11226 (loaded_dll, unloaded_dll): Move to ...
11227 * dll.h: ... this new file.
11228 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
11229
11230 2013-09-05 Pedro Alves <palves@redhat.com>
11231
11232 * server.h (current_process, get_thread_process, all_processes)
11233 (add_inferior_to_list, for_each_inferior, current_inferior)
11234 (remove_inferior, add_process, remove_process, find_process_pid)
11235 (have_started_inferiors_p, have_attached_inferiors_p)
11236 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
11237 (clear_inferiors, find_inferior, find_inferior_id)
11238 (inferior_target_data, set_inferior_target_data)
11239 (inferior_regcache_data, set_inferior_regcache_data): Move to
11240 inferiors.h, and include it.
11241 * inferiors.h: New file.
11242
11243 2013-09-05 Pedro Alves <palves@redhat.com>
11244
11245 * server.h (struct emit_ops, current_insn_ptr, emit_error):
11246 Move ...
11247 * ax.h: ... here.
11248
11249 2013-09-05 Pedro Alves <palves@redhat.com>
11250
11251 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
11252 tracepoint.h.
11253 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
11254 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
11255 (handle_tracepoint_general_set, handle_tracepoint_query)
11256 (tracepoint_finished_step, tracepoint_was_hit)
11257 (release_while_stepping_state_list, current_traceframe)
11258 (in_readonly_region, traceframe_read_mem)
11259 (fetch_traceframe_registers, traceframe_read_sdata)
11260 (traceframe_read_info, struct fast_tpoint_collect_status)
11261 (fast_tracepoint_collecting, force_unlock_trace_buffer)
11262 (handle_tracepoit_bkpts, initialize_low_tracepoint)
11263 (supply_fast_tracepoint_registers)
11264 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
11265 (ipa_tdesc, claim_trampoline_space)
11266 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
11267 (agent_mem_read, agent_get_trace_state_variable_value)
11268 (agent_set_trace_state_variable_value, agent_tsv_read)
11269 (agent_mem_read_string, get_raw_reg_func_addr)
11270 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
11271 * tracepoint.h: ... this new file.
11272
11273 2013-09-05 Pedro Alves <palves@redhat.com>
11274
11275 * server.h (perror_with_name, error, fatal, warning, paddress)
11276 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
11277 include it.
11278 * utils.h: New file.
11279
11280 2013-09-05 Pedro Alves <palves@redhat.com>
11281
11282 * server.h (remote_debug, noack_mode, transport_is_reliable)
11283 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
11284 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
11285 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
11286 (write_enn, initialize_async_io, enable_async_io)
11287 (disable_async_io, check_remote_input_interrupt_request)
11288 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
11289 (dead_thread_notify, prepare_resume_reply)
11290 (decode_address_to_semicolon, decode_address, decode_m_packet)
11291 (decode_M_packet, decode_X_packet, decode_xfer_write)
11292 (decode_search_memory_packet, unhexify, hexify)
11293 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
11294 (look_up_one_symbol, relocate_instruction)
11295 (monitor_output): Move to remote-utils.h, and include it.
11296 * remote-utils.h: New file.
11297
11298 2013-09-05 Pedro Alves <palves@redhat.com>
11299
11300 * server.h (_): Delete.
11301
11302 2013-09-02 Pedro Alves <palves@redhat.com>
11303
11304 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
11305 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
11306 allocated.
11307 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
11308
11309 2013-09-02 Pierre Muller <muller@sourceware.org>
11310
11311 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
11312 or WriteProcessMemory complete successfully and handle
11313 ERROR_PARTIAL_COPY error.
11314
11315 2013-09-02 Pedro Alves <palves@redhat.com>
11316
11317 * server.c (gdb_read_memory): Return -1 on traceframe memory read
11318 error instead of EIO.
11319
11320 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11321
11322 PR server/15604
11323 * linux-low.c: Include filestuff.h.
11324 (linux_create_inferior) <pid == 0>: Call close_most_fds.
11325 * lynx-low.c: Include filestuff.h.
11326 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
11327 * server.c: Include filestuff.h.
11328 (main): Call notice_open_fds.
11329 * spu-low.c: Include filestuff.h.
11330 (spu_create_inferior) <pid == 0>: Call close_most_fds.
11331
11332 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
11333
11334 * Makefile.in: Explain why ../target and ../nat are not
11335 listed as include file search paths.
11336 (linux-waitpid.o): New object file rule.
11337 * configure.srv (srv_native_linux_obj): New variable.
11338 Replace all occurrences of linux native object files with
11339 $srv_native_linux_obj.
11340 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
11341 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
11342 (linux_enable_event_reporting): Remove declaration.
11343 (my_waitpid): Moved to common/linux-waitpid.c.
11344 (linux_wait_for_event): Pass ptid when calling
11345 linux_enable_event_reporting.
11346 (linux_supports_tracefork_flag): Remove.
11347 (linux_enable_event_reporting): Likewise.
11348 (linux_tracefork_grandchild): Remove.
11349 (STACK_SIZE): Moved to common/linux-ptrace.c.
11350 (linux_tracefork_child): Remove.
11351 (linux_test_for_tracefork): Remove.
11352 (linux_look_up_symbols): Call linux_supports_traceclone.
11353 (initialize_low): Remove call to linux_test_for_tracefork.
11354 * linux-low.h (PTRACE_TYPE_ARG3): Move to
11355 common/linux-ptrace.h.
11356 (PTRACE_TYPE_ARG4): Likewise.
11357 Include linux-ptrace.h.
11358
11359 2013-08-21 Pedro Alves <palves@redhat.com>
11360
11361 * config.in: Renegerate.
11362
11363 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
11364
11365 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
11366 (SFILES): Remove $(srcdir)/common/target-common.c and
11367 add $(srcdir)/target/waitstatus.c.
11368 (OBS): Remove target-common.o and add waitstatus.o.
11369 (server_h): Remove $(srcdir)/../common/target-common.h and
11370 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
11371 and $(srcdir)/../target/waitstatus.h.
11372 (target-common.o): Remove.
11373 (waitstatus.o): New target object file.
11374 * target.h: Do not include target-common.h and
11375 include target/resume.h, target/wait.h and
11376 target/waitstatus.h.
11377
11378 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
11379
11380 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
11381 to PTRACE_TYPE_ARG3.
11382 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
11383 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
11384 PTRACE_TYPE_ARG4.
11385 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
11386 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
11387
11388 2013-07-27 Jie Zhang <jie@codesourcery.com>
11389 Daniel Jacobowitz <dan@codesourcery.com>
11390 Yao Qi <yao@codesourcery.com>
11391
11392 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
11393 (mips-linux-watch.o): New rule.
11394 (mips_linux_watch_h): New variable.
11395 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
11396 srv_tgtobj.
11397 * linux-mips-low.c: Include mips-linux-watch.h.
11398 (struct arch_process_info, struct arch_lwp_info): New.
11399 (update_watch_registers_callback): New function.
11400 (mips_linux_new_process, mips_linux_new_thread) New functions.
11401 (mips_linux_prepare_to_resume, mips_insert_point): New
11402 functions.
11403 (mips_remove_point, mips_stopped_by_watchpoint): New
11404 functions.
11405 (rsp_bp_type_to_target_hw_bp_type): New function.
11406 (mips_stopped_data_address): New function.
11407 (the_low_target): Add watchpoint support functions.
11408
11409 2013-07-27 Yao Qi <yao@codesourcery.com>
11410
11411 * i386-low.c: Include break-common.h.
11412 (enum target_hw_bp_type): Remove.
11413
11414 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
11415
11416 * Makefile.in (SFILES): /common/target-common.c.
11417 (OBS): Add target-common.o.
11418 (server_h): Add $(srcdir)/../common/target-common.h.
11419 (target-common.o): New target.
11420 * server.c (queue_stop_reply_callback): Free
11421 status string after use.
11422 * target.c (target_waitstatus_to_string): Remove.
11423 * target.h: Include target-common.h.
11424 (resume_kind): Likewise.
11425 (target_waitkind): Likewise.
11426 (target_waitstatus): Likewise.
11427 (TARGET_WNOHANG): Likewise.
11428
11429 2013-07-04 Yao Qi <yao@codesourcery.com>
11430
11431 * Makefile.in (host_alias): Use @host_noncanonical@.
11432 (target_alias): Use @target_noncanonical@.
11433 * configure.ac: Use ACX_NONCANONICAL_TARGET and
11434 ACX_NONCANONICAL_HOST.
11435 * configure: Regenerated.
11436
11437 Revert:
11438 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
11439
11440 * configure.ac (version_host, version_target): Set and AC_SUBST them.
11441 * configure: Rebuild.
11442 * Makefile.in (version_host, version_target): Get from configure.
11443 (version.c): Use $(version_host) and $(version_target).
11444
11445 2013-07-03 Pedro Alves <palves@redhat.com>
11446
11447 * Makefile.in (config.status): Depend on development.sh.
11448 * acinclude.m4: Include libmcheck.m4.
11449 * configure: Regenerate.
11450
11451 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
11452
11453 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
11454 attribute inside the parentheses.
11455 (winapi_DebugSetProcessKillOnExit): Ditto.
11456 (winapi_DebugBreakProcess): Ditto.
11457 (winapi_GenerateConsoleCtrlEvent): Ditto.
11458
11459 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
11460
11461 * notif.h (notif_event): Add a dummy member to avoid compiler
11462 errors.
11463
11464 2013-07-01 Pedro Alves <palves@redhat.com>
11465
11466 * hostio.c (HOSTIO_PATH_MAX): Define.
11467 (require_filename, handle_open, handle_unlink, handle_readlink):
11468 Use it.
11469
11470 2013-07-01 Pedro Alves <palves@redhat.com>
11471
11472 * server.h: Include "pathmax.h".
11473 * linux-low.c: Don't include sys/param.h.
11474 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
11475 MAXPATHLEN.
11476 * win32-low.c: Don't include sys/param.h.
11477 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
11478
11479 2013-07-01 Pedro Alves <palves@redhat.com>
11480
11481 * event-loop.c: Don't check HAVE_UNISTD_H before including
11482 <unistd.h>.
11483 * gdbreplay.c: Likewise.
11484 * remote-utils.c: Likewise.
11485 * server.c: Likewise.
11486 * configure.ac: Don't check for unistd.h.
11487 * configure: Regenerate.
11488
11489 2013-06-28 Tom Tromey <tromey@redhat.com>
11490
11491 * Makefile.in (version.c): Use version.in, not
11492 common/version.in.
11493
11494 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
11495
11496 * configure.ac (version_host, version_target): Set and AC_SUBST them.
11497 * configure: Rebuild.
11498 * Makefile.in (version_host, version_target): Get from configure.
11499 (version.c): Use $(version_host) and $(version_target).
11500
11501 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
11502
11503 Fix trace-status to output user name without trailing colon.
11504 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
11505
11506 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
11507
11508 Fix trace-status to output proper start-time and stop-time.
11509 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
11510 output start time and stop time in hex as gdb expects.
11511
11512 2013-06-26 Pedro Alves <pedro@codesourcery.com>
11513
11514 * tracepoint.c (build_traceframe_info_xml): Output trace state
11515 variables present in the trace buffer.
11516
11517 2013-06-24 Tom Tromey <tromey@redhat.com>
11518
11519 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
11520 create-version.sh.
11521 (version.o): Remove.
11522 * gdbreplay.c: Include version.h.
11523 (version, host_name): Don't declare.
11524 * server.h: Include version.h.
11525 (version, host_name): Don't declare.
11526
11527 2013-06-12 Pedro Alves <palves@redhat.com>
11528
11529 * linux-x86-low.c (linux_is_elf64): Delete global.
11530 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
11531 with local linux_pid_exe_is_elf_64_file use.
11532
11533 2013-06-11 Pedro Alves <palves@redhat.com>
11534
11535 * linux-low.c (regset_disabled, disable_regset): New functions.
11536 (regsets_fetch_inferior_registers)
11537 (regsets_store_inferior_registers): Use them.
11538 (initialize_regsets_info); Don't allocate the disabled_regsets
11539 array here.
11540 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
11541 comment.
11542
11543 2013-06-11 Pedro Alves <palves@redhat.com>
11544
11545 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
11546 xmalloc.
11547
11548 2013-06-11 Pedro Alves <palves@redhat.com>
11549
11550 * linux-x86-low.c (initialize_low_arch): Call
11551 init_registers_x32_avx_linux.
11552
11553 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
11554
11555 Fix compatibility with Android Bionic.
11556 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
11557 it is not empty.
11558
11559 2013-06-07 Pedro Alves <palves@redhat.com>
11560
11561 PR server/14823
11562 * Makefile.in (OBS): Add tdesc.o.
11563 (IPA_OBJS): Add tdesc-ipa.o.
11564 (tdesc-ipa.o): New rule.
11565 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
11566 interface.
11567 * linux-low.c (new_inferior): Delete.
11568 (disabled_regsets, num_regsets): Delete.
11569 (linux_add_process): Adjust to set the new per-process
11570 new_inferior flag.
11571 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
11572 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
11573 was a stop. When calling arch_setup, switch the current inferior
11574 to the thread that got an event.
11575 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
11576 (regsets_fetch_inferior_registers)
11577 (regsets_store_inferior_registers): New regsets_info parameter.
11578 Adjust to use it.
11579 (linux_register_in_regsets): New regs_info parameter. Adjust to
11580 use it.
11581 (register_addr, fetch_register, store_register): New usrregs_info
11582 parameter. Adjust to use it.
11583 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
11584 parameter regs_info. Adjust to use it.
11585 (linux_fetch_registers): Get the current inferior's regs_info, and
11586 adjust to use it.
11587 (linux_store_registers): Ditto.
11588 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
11589 (initialize_low): Don't initialize the target_regsets here. Call
11590 initialize_low_arch.
11591 * linux-low.h (target_regsets): Delete declaration.
11592 (struct regsets_info): New.
11593 (struct usrregs_info): New.
11594 (struct regs_info): New.
11595 (struct process_info_private) <new_inferior>: New field.
11596 (struct linux_target_ops): Delete the num_regs, regmap, and
11597 regset_bitmap fields. New field regs_info.
11598 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
11599 * i387-fp.c (num_xmm_registers): Delete.
11600 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
11601 calls to new interface.
11602 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
11603 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
11604 Infer the number of xmm registers from the regcache's target
11605 description.
11606 * i387-fp.h (num_xmm_registers): Delete.
11607 * inferiors.c (add_thread): Don't install the thread's regcache
11608 here.
11609 * proc-service.c (gregset_info): Fetch the current inferior's
11610 regs_info. Adjust to use it.
11611 * regcache.c: Include tdesc.h.
11612 (register_bytes, reg_defs, num_registers)
11613 (gdbserver_expedite_regs): Delete.
11614 (get_thread_regcache): If the thread doesn't have a regcache yet,
11615 create one, instead of aborting gdbserver.
11616 (regcache_invalidate_one): Rename to ...
11617 (regcache_invalidate_thread): ... this.
11618 (regcache_invalidate_one): New.
11619 (regcache_invalidate): Only invalidate registers of the current
11620 process.
11621 (init_register_cache): Add target_desc parameter, and use it.
11622 (new_register_cache): Ditto. Assert the target description has a
11623 non zero registers_size.
11624 (regcache_cpy): Add assertions. Adjust.
11625 (realloc_register_cache, set_register_cache): Delete.
11626 (registers_to_string, registers_from_string): Adjust.
11627 (find_register_by_name, find_regno, find_register_by_number)
11628 (register_cache_size): Add target_desc parameter, and use it.
11629 (free_register_cache_thread, free_register_cache_thread_one)
11630 (regcache_release, register_cache_size): New.
11631 (register_size): Add target_desc parameter, and use it.
11632 (register_data, supply_register, supply_register_zeroed)
11633 (supply_regblock, supply_register_by_name, collect_register)
11634 (collect_register_as_string, collect_register_by_name): Adjust.
11635 * regcache.h (struct target_desc): Forward declare.
11636 (struct regcache) <tdesc>: New field.
11637 (init_register_cache, new_register_cache): Add target_desc
11638 parameter.
11639 (regcache_invalidate_thread): Declare.
11640 (regcache_invalidate_one): Delete declaration.
11641 (regcache_release): Declare.
11642 (find_register_by_number, register_cache_size, register_size)
11643 (find_regno): Add target_desc parameter.
11644 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
11645 declarations.
11646 * remote-utils.c: Include tdesc.h.
11647 (outreg, prepare_resume_reply): Adjust.
11648 * server.c: Include tdesc.h.
11649 (gdbserver_xmltarget): Delete declaration.
11650 (get_features_xml, process_serial_event): Adjust.
11651 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
11652 declare.
11653 (struct process_info) <tdesc>: New field.
11654 (ipa_tdesc): Declare.
11655 * tdesc.c: New file.
11656 * tdesc.h: New file.
11657 * tracepoint.c: Include tdesc.h.
11658 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
11659 (get_context_regcache): Adjust to pass ipa_tdesc down.
11660 (do_action_at_tracepoint): Adjust to get the register cache size
11661 from the context regcache's description.
11662 (traceframe_walk_blocks): Adjust to get the register cache size
11663 from the current trace frame's description.
11664 (traceframe_get_pc): Adjust to get current trace frame's
11665 description and pass it down.
11666 (gdb_collect): Adjust to get the register cache size from the
11667 IPA's description.
11668 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
11669 (gdbserver_xmltarget): Delete.
11670 (initialize_low_tracepoint): Set the ipa's target description.
11671 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
11672 (initialize_low_tracepoint): Set the ipa's target description.
11673 * linux-x86-low.c: Include tdesc.h.
11674 [__x86_64__] (is_64bit_tdesc): New.
11675 (ps_get_thread_area, x86_get_thread_area): Use it.
11676 (i386_cannot_store_register): Rename to ...
11677 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
11678 (i386_cannot_fetch_register): Rename to ...
11679 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
11680 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
11681 to new interface.
11682 (target_regsets): Rename to ...
11683 (x86_regsets): ... this.
11684 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
11685 interface.
11686 (x86_siginfo_fixup): Use is_64bit_tdesc.
11687 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
11688 (tdesc_x32_avx_linux, tdesc_x32_linux)
11689 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
11690 Declare.
11691 (x86_linux_update_xmltarget): Delete.
11692 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
11693 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
11694 (AMD64_LINUX_USER64_CS): New.
11695 (x86_linux_read_description): New, based on
11696 x86_linux_update_xmltarget.
11697 (same_process_callback): New.
11698 (x86_arch_setup_process_callback): New.
11699 (x86_linux_update_xmltarget): New.
11700 (x86_regsets_info): New.
11701 (amd64_linux_regs_info): New.
11702 (i386_linux_usrregs_info): New.
11703 (i386_linux_regs_info): New.
11704 (x86_linux_regs_info): New.
11705 (x86_arch_setup): Reimplement.
11706 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
11707 (x86_emit_ops): Ditto.
11708 (the_low_target): Adjust. Install x86_linux_regs_info,
11709 x86_cannot_fetch_register, and x86_cannot_store_register.
11710 (initialize_low_arch): New.
11711 * linux-ia64-low.c (tdesc_ia64): Declare.
11712 (ia64_fetch_register): Adjust.
11713 (ia64_usrregs_info, regs_info): New globals.
11714 (ia64_regs_info): New function.
11715 (the_low_target): Adjust.
11716 (initialize_low_arch): New function.
11717 * linux-sparc-low.c (tdesc_sparc64): Declare.
11718 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
11719 Adjust.
11720 (sparc_arch_setup): New function.
11721 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
11722 (the_low_target): Adjust.
11723 (initialize_low_arch): New function.
11724 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
11725 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
11726 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
11727 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
11728 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
11729 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
11730 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
11731 (tdesc_powerpc_isa205_vsx64l): Declare.
11732 (ppc_cannot_store_register, ppc_collect_ptrace_register)
11733 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
11734 (ppc_set_pc, ppc_get_hwcap): Adjust.
11735 (ppc_usrregs_info): Forward declare.
11736 (!__powerpc64__) ppc_regmap_adjusted: New global.
11737 (ppc_arch_setup): Adjust to the current process'es target
11738 description.
11739 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
11740 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
11741 (ppc_store_evrregset): Adjust.
11742 (target_regsets): Rename to ...
11743 (ppc_regsets): ... this, and make static.
11744 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
11745 (ppc_regs_info): New function.
11746 (the_low_target): Adjust.
11747 (initialize_low_arch): New function.
11748 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
11749 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
11750 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
11751 (tdesc_s390x_linux64v2): Declare.
11752 (s390_collect_ptrace_register, s390_supply_ptrace_register)
11753 (s390_fill_gregset, s390_store_last_break): Adjust.
11754 (target_regsets): Rename to ...
11755 (s390_regsets): ... this, and make static.
11756 (s390_get_pc, s390_set_pc): Adjust.
11757 (s390_get_hwcap): New target_desc parameter, and use it.
11758 [__s390x__] (have_hwcap_s390_high_gprs): New global.
11759 (s390_arch_setup): Adjust to set the current process'es target
11760 description. Don't adjust the regmap.
11761 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
11762 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
11763 (regs_info_3264): New globals.
11764 (s390_regs_info): New function.
11765 (the_low_target): Adjust.
11766 (initialize_low_arch): New function.
11767 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
11768 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
11769 [__mips64] (init_registers_mips_linux)
11770 (init_registers_mips_dsp_linux): Delete defines.
11771 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
11772 (have_dsp): New global.
11773 (mips_read_description): New, based on mips_arch_setup.
11774 (mips_arch_setup): Reimplement.
11775 (get_usrregs_info): New function.
11776 (mips_cannot_fetch_register, mips_cannot_store_register)
11777 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
11778 (mips_fill_fpregset, mips_store_fpregset): Adjust.
11779 (target_regsets): Rename to ...
11780 (mips_regsets): ... this, and make static.
11781 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
11782 (dsp_regs_info, regs_info): New globals.
11783 (mips_regs_info): New function.
11784 (the_low_target): Adjust.
11785 (initialize_low_arch): New function.
11786 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
11787 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
11788 Declare.
11789 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
11790 (arm_read_description): New, with bits factored from
11791 arm_arch_setup.
11792 (arm_arch_setup): Reimplement.
11793 (target_regsets): Rename to ...
11794 (arm_regsets): ... this, and make static.
11795 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
11796 (arm_regs_info): New function.
11797 (the_low_target): Adjust.
11798 (initialize_low_arch): New function.
11799 * linux-m68k-low.c (tdesc_m68k): Declare.
11800 (target_regsets): Rename to ...
11801 (m68k_regsets): ... this, and make static.
11802 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
11803 (m68k_regs_info): New function.
11804 (m68k_arch_setup): New function.
11805 (the_low_target): Adjust.
11806 (initialize_low_arch): New function.
11807 * linux-sh-low.c (tdesc_sharch): Declare.
11808 (target_regsets): Rename to ...
11809 (sh_regsets): ... this, and make static.
11810 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
11811 (sh_regs_info, sh_arch_setup): New functions.
11812 (the_low_target): Adjust.
11813 (initialize_low_arch): New function.
11814 * linux-bfin-low.c (tdesc_bfin): Declare.
11815 (bfin_arch_setup): New function.
11816 (bfin_usrregs_info, regs_info): New globals.
11817 (bfin_regs_info): New function.
11818 (the_low_target): Adjust.
11819 (initialize_low_arch): New function.
11820 * linux-cris-low.c (tdesc_cris): Declare.
11821 (cris_arch_setup): New function.
11822 (cris_usrregs_info, regs_info): New globals.
11823 (cris_regs_info): New function.
11824 (the_low_target): Adjust.
11825 (initialize_low_arch): New function.
11826 * linux-cris-low.c (tdesc_crisv32): Declare.
11827 (cris_arch_setup): New function.
11828 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
11829 (cris_regs_info): New function.
11830 (the_low_target): Adjust.
11831 (initialize_low_arch): New function.
11832 * linux-m32r-low.c (tdesc_m32r): Declare.
11833 (m32r_arch_setup): New function.
11834 (m32r_usrregs_info, regs_info): New globals.
11835 (m32r_regs_info): Adjust.
11836 (initialize_low_arch): New function.
11837 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
11838 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
11839 (tic6x_usrregs_info): Forward declare.
11840 (tic6x_read_description): New function, based on ...
11841 (tic6x_arch_setup): ... this. Reimplement.
11842 (target_regsets): Rename to ...
11843 (tic6x_regsets): ... this, and make static.
11844 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
11845 (tic6x_regs_info): New function.
11846 (the_low_target): Adjust.
11847 (initialize_low_arch): New function.
11848 * linux-xtensa-low.c (tdesc_xtensa): Declare.
11849 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
11850 (target_regsets): Rename to ...
11851 (xtensa_regsets): ... this, and make static.
11852 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
11853 globals.
11854 (xtensa_arch_setup, xtensa_regs_info): New functions.
11855 (the_low_target): Adjust.
11856 (initialize_low_arch): New function.
11857 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
11858 (nios2_arch_setup): Set the current process'es tdesc.
11859 (target_regsets): Rename to ...
11860 (nios2_regsets): ... this.
11861 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
11862 (nios2_regs_info): New function.
11863 (the_low_target): Adjust.
11864 (initialize_low_arch): New function.
11865 * linux-aarch64-low.c (tdesc_aarch64): Declare.
11866 (aarch64_arch_setup): Set the current process'es tdesc.
11867 (target_regsets): Rename to ...
11868 (aarch64_regsets): ... this.
11869 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
11870 (aarch64_regs_info): New function.
11871 (the_low_target): Adjust.
11872 (initialize_low_arch): New function.
11873 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
11874 globals.
11875 (target_regsets): Rename to ...
11876 (tile_regsets): ... this.
11877 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
11878 (tile_regs_info): New function.
11879 (tile_arch_setup): Set the current process'es tdesc.
11880 (the_low_target): Adjust.
11881 (initialize_low_arch): New function.
11882 * spu-low.c (tdesc_spu): Declare.
11883 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
11884 * win32-arm-low.c (tdesc_arm): Declare.
11885 (arm_arch_setup): New function.
11886 (the_low_target): Install arm_arch_setup instead of
11887 init_registers_arm.
11888 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
11889 (init_windows_x86): Rename to ...
11890 (i386_arch_setup): ... this. Set `win32_tdesc'.
11891 (the_low_target): Adjust.
11892 * win32-low.c (win32_tdesc): New global.
11893 (child_add_thread): Don't create the thread cache here.
11894 (do_initial_child_stuff): Set the new process'es tdesc.
11895 * win32-low.h (struct target_desc): Forward declare.
11896 (win32_tdesc): Declare.
11897 * lynx-i386-low.c (tdesc_i386): Declare global.
11898 (lynx_i386_arch_setup): Set `lynx_tdesc'.
11899 * lynx-low.c (lynx_tdesc): New global.
11900 (lynx_add_process): Set the new process'es tdesc.
11901 * lynx-low.h (struct target_desc): Forward declare.
11902 (lynx_tdesc): Declare global.
11903 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
11904 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
11905 * nto-low.c (nto_tdesc): New global.
11906 (do_attach): Set the new process'es tdesc.
11907 * nto-low.h (struct target_desc): Forward declare.
11908 (nto_tdesc): Declare.
11909 * nto-x86-low.c (tdesc_i386): Declare.
11910 (nto_x86_arch_setup): Set `nto_tdesc'.
11911
11912 2013-06-04 Gary Benson <gbenson@redhat.com>
11913
11914 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
11915 to qSupported response when appropriate.
11916 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
11917 with nonzero-length annex.
11918 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
11919 arguments supplied in annex.
11920
11921 2013-05-31 Doug Evans <dje@google.com>
11922
11923 PR server/15594
11924 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
11925 64 bits in 64-cross-32 environment.
11926
11927 2013-05-28 Pedro Alves <palves@redhat.com>
11928
11929 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
11930 (aarch64-without-fpu.c): Delete rule.
11931 * configure.srv (aarch64*-*-linux*): Remove references to
11932 aarch64-without-fpu.o and aarch64-without-fpu.xml.
11933 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
11934 declaration.
11935
11936 2013-05-24 Pedro Alves <palves@redhat.com>
11937
11938 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
11939 instead of strchr/decode_address. Error if the range isn't split
11940 with a ','. Don't assume there's be a ':' in the action.
11941
11942 2013-05-23 Yao Qi <yao@codesourcery.com>
11943 Pedro Alves <palves@redhat.com>
11944
11945 * linux-low.c (lwp_in_step_range): New function.
11946 (linux_wait_1): If the thread was range stepping and stopped
11947 outside the stepping range, report the stop to GDB. Otherwise,
11948 continue stepping. Add range stepping debug output.
11949 (linux_set_resume_request): Copy the step range from the resume
11950 request to the lwp.
11951 (linux_supports_range_stepping): New.
11952 (linux_target_ops) <supports_range_stepping>: Set to
11953 linux_supports_range_stepping.
11954 * linux-low.h (struct linux_target_ops)
11955 <supports_range_stepping>: New field.
11956 (struct lwp_info) <step_range_start, step_range_end>: New fields.
11957 * linux-x86-low.c (x86_supports_range_stepping): New.
11958 (the_low_target) <supports_range_stepping>: Set to
11959 x86_supports_range_stepping.
11960 * server.c (handle_v_cont): Handle 'r' action.
11961 (handle_v_requests): Append ";r" if the target supports range
11962 stepping.
11963 * target.h (struct thread_resume) <step_range_start,
11964 step_range_end>: New fields.
11965 (struct target_ops) <supports_range_stepping>:
11966 New field.
11967 (target_supports_range_stepping): New macro.
11968
11969 2013-05-17 Joel Brobecker <brobecker@adacore.com>
11970
11971 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
11972 confusion in comment.
11973
11974 2013-05-17 Joel Brobecker <brobecker@adacore.com>
11975
11976 * lynx-low.c (struct process_info_private): New type.
11977 (lynx_add_process): New function.
11978 (lynx_create_inferior, lynx_attach): Replace calls to
11979 add_process by calls to lynx_add_process.
11980 (lynx_resume): If PTID is null, then try using
11981 current_process()->private->last_wait_event_ptid.
11982 Add comments.
11983 (lynx_clear_inferiors): Delete. The contents of that function
11984 has been inlined in lynx_mourn;
11985 (lynx_wait_1): Save the ptid in the process's private data.
11986 (lynx_mourn): Free the process' private data. Replace call
11987 to lynx_clear_inferiors by call to clear_inferiors.
11988
11989 2013-05-17 Yao Qi <yao@codesourcery.com>
11990
11991 * i386-low.c (i386_length_and_rw_bits): Move the comment to
11992 the right place.
11993
11994 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
11995
11996 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
11997 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
11998 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
11999 PT_TEXT_END_ADDR guards. Update comments.
12000 (linux_target_op) <read_offsets>: Conditionally define to
12001 linux_read_offsets if the target is UCLIBC and if it defines
12002 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
12003
12004 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
12005 Andrew Jenner <andrew@codesourcery.com>
12006
12007 * Makefile.in (SFILES): Add linux-nios2-low.c.
12008 (clean): Add action to delete nios2-linux.c.
12009 (nios2-linux.c): New rule.
12010 * configure.srv: Add nios2*-*-linux*.
12011 * linux-nios2-low.c: New.
12012
12013 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
12014
12015 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
12016
12017 2013-04-25 Hui Zhu <hui@codesourcery.com>
12018
12019 PR gdb/15186
12020 * ax.c (ax_printf): Add fflush.
12021
12022 2013-04-22 Tom Tromey <tromey@redhat.com>
12023
12024 * Makefile.in (SFILES): Add filestuff.c.
12025 (OBS): Add filestuff.o.
12026 (filestuff.o): New target.
12027 * config.in, configure: Rebuild.
12028 * configure.ac: Check for fdwalk, pipe2.
12029
12030 2013-04-17 Pedro Alves <palves@redhat.com>
12031
12032 * configure.ac (USE_THREAD_DB): Delete variable.
12033 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
12034 Don't AC_SUBST USE_THREAD_DB.
12035 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
12036 * config.in, configure: Regenerate.
12037
12038 2013-04-16 Pedro Alves <palves@redhat.com>
12039
12040 * linux-low.h (struct lwp_info) <thread_known>: Move under
12041 the USE_THREAD_DB #ifdef.
12042
12043 2013-04-16 Pedro Alves <palves@redhat.com>
12044
12045 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
12046 (linux-low.o): Delete rule.
12047 * linux-low.h: Always include "gdb_thread_db.h" instead of
12048 conditionally including thread_db.h.
12049 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
12050 HAVE_THREAD_DB_H.
12051
12052 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12053
12054 * Makefile.in (install-only): Fix make install regression.
12055
12056 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
12057
12058 Convert man pages to texinfo, new gdbinit.5 texinfo page.
12059 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
12060 installation.
12061 * gdbserver.1: Remove.
12062
12063 2013-03-22 Pedro Alves <palves@redhat.com>
12064
12065 * linux-low.c (handle_extended_wait): Don't call
12066 linux_enable_event_reporting.
12067
12068 2013-03-15 Tony Theodore <tonyt@logyst.com>
12069
12070 PR build/9098:
12071 * Makefile.in (SHELL): Use @SHELL@.
12072
12073 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
12074
12075 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
12076 compiler warning.
12077
12078 2013-03-13 Joel Brobecker <brobecker@adacore.com>
12079
12080 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
12081 Remove extraneous NULL element.
12082
12083 2013-03-13 Yao Qi <yao@codesourcery.com>
12084
12085 * tracepoint.c (traceframe_read_tsv): Look for the last matched
12086 'V' block in trace frame.
12087
12088 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
12089
12090 * target.h (struct target_ops): Add btrace ops.
12091 (target_supports_btrace): New macro.
12092 (target_enable_btrace): New macro.
12093 (target_disable_btrace): New macro.
12094 (target_read_btrace): New macro.
12095 * gdbthread.h (struct thread_info): Add btrace field.
12096 * server.c: Include btrace-common.h.
12097 (handle_btrace_general_set): New function.
12098 (handle_btrace_enable): New function.
12099 (handle_btrace_disable): New function.
12100 (handle_general_set): Call handle_btrace_general_set.
12101 (handle_qxfer_btrace): New function.
12102 (struct qxfer qxfer_packets[]): Add btrace entry.
12103 * inferiors.c (remove_thread): Disable btrace.
12104 * linux-low: Include linux-btrace.h.
12105 (linux_low_enable_btrace): New function.
12106 (linux_low_read_btrace): New function.
12107 (linux_target_ops): Add btrace ops.
12108 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
12109 Add srv_linux_btrace=yes.
12110 (x86_64-*-linux*): Add linux-btrace.o.
12111 Add srv_linux_btrace=yes.
12112 * configure.ac: Define HAVE_LINUX_BTRACE.
12113 * config.in: Regenerated.
12114 * configure: Regenerated.
12115
12116 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
12117
12118 * server.c (handle_qxfer): Preserve error message if -3 is
12119 returned.
12120 (qxfer): Document the -3 return value.
12121
12122 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
12123
12124 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
12125 (linux_btrace_h): New variable.
12126 (linux-btrace.o): New rule.
12127
12128 2013-03-08 Stan Shebs <stan@codesourcery.com>
12129 Hafiz Abid Qadeer <abidh@codesourcery.com>
12130
12131 * tracepoint.c (trace_buffer_size): New global.
12132 (DEFAULT_TRACE_BUFFER_SIZE): New define.
12133 (init_trace_buffer): Change to one-argument function. Allocate
12134 trace buffer memory.
12135 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
12136 handle QTBuffer:size packet.
12137 (cmd_bigqtbuffer_size): New function.
12138 (initialize_tracepoint): Call init_trace_buffer with
12139 DEFAULT_TRACE_BUFFER_SIZE.
12140 * server.c (handle_query): Add QTBuffer:size in the
12141 supported packets.
12142
12143 2013-03-07 Yao Qi <yao@codesourcery.com>
12144
12145 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
12146 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
12147 of -1.
12148 (cmd_qtsp): Adjust condition. Do post increment.
12149 Set cur_action and cur_step_action back to 0.
12150
12151 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
12152
12153 PR server/15236
12154 * linux-low.c (linux_write_memory): Return early success if LEN is
12155 zero.
12156
12157 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
12158
12159 * configure.srv: Add x86_64-*-cygwin* as target.
12160
12161 2013-02-28 Tom Tromey <tromey@redhat.com>
12162
12163 * configure.ac: Invoke AC_SYS_LARGEFILE.
12164 * configure, config.in: Rebuild.
12165
12166 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
12167
12168 * win32-low.c: Throughout, fix format strings and casts of
12169 printf-like functions to avoid type related warnings on all
12170 platforms.
12171 (get_child_debug_event): Print dwDebugEventCode as hex since
12172 that's how it's usually documented.
12173
12174 2013-02-28 Yao Qi <yao@codesourcery.com>
12175
12176 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
12177 pulongest.
12178
12179 2013-02-27 Jiong Wang <jiwang@tilera.com>
12180
12181 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
12182 (reg-tilegx32.c): New rule.
12183 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
12184 * linux-tile-low.c (tile_arch_setup): New function. Invoke
12185 different register info initializer according to elf class.
12186 (init_registers_tilgx32): New function. The tilegx32 register info
12187 initializer.
12188 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
12189 (tile_store_gregset): Likewise.
12190
12191 2013-02-27 Yao Qi <yao@codesourcery.com>
12192
12193 * server.c (process_point_options): Print debug message when
12194 debug_threads is true.
12195
12196 2013-02-26 Yao Qi <yao@codesourcery.com>
12197
12198 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
12199
12200 2013-02-19 Pedro Alves <palves@redhat.com>
12201 Kai Tietz <ktietz@redhat.com>
12202
12203 PR gdb/15161
12204
12205 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
12206 instead of strtoul to extract address from packet.
12207 (process_serial_event) <'z'>: Likewise.
12208
12209 2013-02-18 Yao Qi <yao@codesourcery.com>
12210
12211 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
12212
12213 2013-02-14 Pedro Alves <palves@redhat.com>
12214
12215 Plug memory leak.
12216
12217 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
12218 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
12219
12220 2013-02-14 Pedro Alves <palves@redhat.com>
12221
12222 * tracepoint.c (cmd_qtdpsrc): Use savestring.
12223
12224 2013-02-14 Pedro Alves <palves@redhat.com>
12225
12226 * tracepoint.c (save_string): Delete.
12227 (add_tracepoint_action): Use savestring instead of save_string.
12228
12229 2013-02-12 Pedro Alves <palves@redhat.com>
12230
12231 * linux-xtensa-low.c: Ditto.
12232 * xtensa-xtregs.c: Ditto.
12233
12234 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
12235
12236 * thread-db.c (thread_db_get_tls_address): NULL pointer check
12237 thread_db.
12238
12239 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
12240
12241 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
12242 aarch64_num_wp_regs and aarch64_num_bp_regs to
12243 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
12244
12245 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
12246
12247 * linux-aarch64-low.c (ps_get_thread_area): Replace
12248 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
12249
12250 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
12251 Marcus Shawcroft <marcus.shawcroft@arm.com>
12252 Nigel Stephens <nigel.stephens@arm.com>
12253 Yufeng Zhang <yufeng.zhang@arm.com>
12254
12255 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
12256 (aarch64.c, aarch64-without-fpu.c): New targets.
12257 * configure.srv (aarch64*-*-linux*): New.
12258 * linux-aarch64-low.c: New file.
12259
12260 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
12261
12262 * linux-low.c (handle_extended_wait, linux_create_inferior)
12263 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
12264 (dequeue_one_deferred_signal, linux_resume_one_thread)
12265 (fetch_register, linux_write_memory, linux_enable_event_reporting)
12266 (linux_tracefork_grandchild, linux_test_for_tracefork)
12267 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
12268 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
12269 where the argument is 0.
12270
12271 2013-01-25 Yao Qi <yao@codesourcery.com>
12272
12273 * event-loop.c: Include "queue.h".
12274 (gdb_event_p): New typedef.
12275 (struct gdb_event) <next_event>: Remove.
12276 (event_queue): Change to QUEUE(gdb_event_p).
12277 (async_queue_event): Remove.
12278 (gdb_event_xfree): New.
12279 (initialize_event_loop): New.
12280 (process_event): Use API from QUEUE.
12281 (wait_for_event): Likewise.
12282 * server.c (main): Call initialize_event_loop.
12283 * server.h (initialize_event_loop): Declare.
12284
12285 2013-01-18 Yao Qi <yao@codesourcery.com>
12286
12287 * ax.h (struct eval_agent_expr_context): New.
12288 (gdb_eval_agent_expr): Update declaration.
12289 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
12290 TFRAME. Add new argument CTX.
12291 * server.h (struct eval_agent_expr_context): Declare.
12292 (agent_mem_read, agent_tsv_read): Update declaration.
12293 (agent_mem_read_string): Likewise.
12294 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
12295 (add_traceframe_block): Add new argument TPOINT.
12296 Increase TPOINT->traceframe_usage.
12297 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
12298 eval_tracepoint_agent_expr.
12299 (condition_true_at_tracepoint): Likewise.
12300 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
12301 (agent_mem_read_string, agent_tsv_read): Likewise.
12302
12303 2013-01-16 Yao Qi <yao@codesourcery.com>
12304
12305 * linux-low.c (linux_resume_one_lwp): Don't check
12306 'lwp->bp_reinsert != 0'.
12307
12308 2013-01-07 Joel Brobecker <brobecker@adacore.com>
12309 Pedro Alves <palves@redhat.com>
12310
12311 * lynx-low.c (ptrace_request_to_str): Define a temporary
12312 macro and use it to simplify this function's implementation.
12313
12314 2013-01-07 Joel Brobecker <brobecker@adacore.com>
12315
12316 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
12317 sets errno.
12318
12319 2013-01-07 Joel Brobecker <brobecker@adacore.com>
12320
12321 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
12322
12323 2013-01-07 Joel Brobecker <brobecker@adacore.com>
12324
12325 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
12326
12327 2013-01-07 Joel Brobecker <brobecker@adacore.com>
12328
12329 * lynx-low.c (lynx_resume): Use the resume_info parameter
12330 to determine the ptid for the lynx_ptrace call, unless
12331 it is equal to minus_one_ptid, in which case we use the
12332 ptid of the current_inferior.
12333 (lynx_wait_1): After having received a thread create/exit
12334 event, resume the inferior's execution using the signaling
12335 thread's ptid, rather than the old ptid.
12336
12337 2013-01-07 Joel Brobecker <brobecker@adacore.com>
12338
12339 * lynx-low.c (lynx_resume): Delete variable ret.
12340
12341 2013-01-01 Joel Brobecker <brobecker@adacore.com>
12342
12343 * gdbreplay.c (gdbreplay_version): Update copyright year.
12344 * server.c (gdbserver_version): Likewise.
12345
12346 2012-12-17 Joel Brobecker <brobecker@adacore.com>
12347
12348 * lynx-low.c (lynx_wait_1): Add debug trace before adding
12349 new thread.
12350
12351 2012-12-17 Joel Brobecker <brobecker@adacore.com>
12352
12353 * lynx-low.c (ptrace_request_to_str): Add handling for
12354 PTRACE_GETTRACESIG.
12355
12356 2012-12-17 Joel Brobecker <brobecker@adacore.com>
12357
12358 * lynx-low.c (lynx_attach): Delete variable new_process.
12359
12360 2012-12-17 Joel Brobecker <brobecker@adacore.com>
12361
12362 * lynx-low.c (lynx_create_inferior): Delete variable
12363 new_process.
12364
12365 2012-12-17 Joel Brobecker <brobecker@adacore.com>
12366
12367 * lynx-low.c (ptrace_request_to_str): Do not handle
12368 PTRACE_GETTHREADLIST if this macro does not exist.
12369
12370 2012-12-15 Yao Qi <yao@codesourcery.com>
12371
12372 * Makefile.in (OBS): Add notif.o.
12373 * notif.c, notif.h: New.
12374 * server.c: Include "notif.h".
12375 (struct vstop_notif) <next>: Remove.
12376 <base>: New field.
12377 (queue_stop_reply): Update.
12378 (push_event, send_next_stop_reply): Remove.
12379 (discard_queued_stop_replies): Update.
12380 (notif_stop): New variable.
12381 (handle_v_stopped): Remove.
12382 (handle_v_requests): Don't call handle_v_stopped. Call
12383 handle_ack_notif instead.
12384 (queue_stop_reply_callback): Call notif_event_enque instead
12385 of queue_stop_reply.
12386 (handle_status): Don't call send_next_stop_reply, call
12387 notif_write_event instead.
12388 (kill_inferior_callback): Likewise.
12389 (detach_or_kill_inferior_callback): Likewise.
12390 (main): Call initialize_notif.
12391 (process_serial_event): Call QUEUE_is_empty.
12392 (handle_target_event): Call notif_push instead of push event.
12393 * server.h (push_event): Remove declaration.
12394
12395 2012-12-10 Tom Tromey <tromey@redhat.com>
12396
12397 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
12398 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
12399 macros.
12400 (.c.o): Rewrite.
12401 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
12402 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
12403 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
12404 (amd64-linux-ipa.o, ax.o): Rewrite.
12405 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
12406 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
12407 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
12408 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
12409 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
12410 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
12411 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
12412 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
12413 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
12414 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
12415 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
12416 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
12417 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
12418 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
12419 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
12420 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
12421 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
12422 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
12423 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
12424 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
12425 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
12426 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
12427 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
12428 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
12429 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
12430 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
12431 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
12432 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
12433 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
12434 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
12435 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
12436 (reg-tilegx.o): Remove.
12437 (all_object_files): New macro.
12438 Include .deps files.
12439 * aclocal.m4, configure: Rebuild.
12440 * acinclude.m4: Include depstand.m4, lead-dot.m4.
12441 * configure.ac: Invoke ZW_CREATE_DEPDIR,
12442 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
12443
12444 2012-12-05 Tom Tromey <tromey@redhat.com>
12445
12446 PR gdb/14917:
12447 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
12448
12449 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
12450
12451 * configure.ac: Check for linux/perf_event.h.
12452 * config.in: Regenerated.
12453 * configure: Regenerated.
12454
12455 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
12456
12457 * hostio.c (handle_readlink): Decrease buffer size
12458 parameter passed to readlink by one byte.
12459
12460 2012-11-26 Yao Qi <yao@codesourcery.com>
12461
12462 * configure.ac (build_warnings): Append '-Wempty-body'.
12463 * configure: Regenerated.
12464 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
12465 body.
12466
12467 2012-11-15 Pierre Muller <muller@sourceware.org>
12468
12469 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
12470 * config.in: Regenerate.
12471 * configure: Regenerate.
12472 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
12473 Use "gdb_wait.h" header instead of <sys/wait.h> header.
12474 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
12475 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
12476 header.
12477 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
12478 instead of <sys/wait.h> header.
12479 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
12480
12481 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
12482
12483 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
12484 (various make rules): Remove -DGDBSERVER
12485
12486 2012-11-09 Yao Qi <yao@codesourcery.com>
12487
12488 * spu-low.c (current_ptid): Move it to ..
12489 * gdbthread.h: ... here. New.
12490 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
12491 * server.c (myresume, process_serial_event): Likewise.
12492 * thread-db.c (thread_db_find_new_threads): Likewise.
12493 * tracepoint.c (run_inferior_command): Likewise.
12494
12495 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
12496
12497 * server.c (handle_search_memory_1): Include access length in
12498 warning message.
12499
12500 2012-09-05 Michael Brandt <michael.brandt@axis.com>
12501
12502 * linux-crisv32-low.c: Fix compile errors.
12503
12504 2012-09-04 Yao Qi <yao@codesourcery.com>
12505
12506 * tracepoint.c (cmd_qtsv): Adjust debug message.
12507 Don't check CUR_TPOINT.
12508
12509 2012-08-28 Yao Qi <yao@codesourcery.com>
12510
12511 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
12512 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
12513 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
12514 Remove declarations of xmalloc, xreallloc, xstrdup and
12515 freeargv.
12516 * Makefile.in (libiberty_h): New.
12517 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
12518 (linux-bfin-low.o): Append dependency 'libiberty.h'.
12519
12520 2012-08-23 Yao Qi <yao@codesourcery.com>
12521
12522 * server.h: Remove declaration of 'xsnprintf'.
12523
12524 2012-08-22 Keith Seitz <keiths@redhat.com>
12525
12526 * server.h: Include build-gnulib-gbserver/config.h.
12527 * gdbreplay.c: Likewise.
12528
12529 2012-08-08 Doug Evans <dje@google.com>
12530
12531 * Makefile.in (SFILES): Add gdb_vecs.c.
12532 (OBS): Add gdb_vecs.o.
12533 (gdb_vecs_h, host_defs_h): New variables.
12534 (thread-db.o): Add $(gdb_vecs_h) dependency.
12535 (gdb_vecs.o): New rule.
12536 * thread-db.c: #include "gdb_vecs.h".
12537 (thread_db_load_search): Use a vector to iterate over path elements.
12538 Handle text appearing after "$pdir".
12539
12540 * configure.ac: Add check for strstr.
12541 * config.in: Regenerate.
12542 * configure: Regenerate.
12543
12544 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
12545
12546 * hostio.c (handle_pread): If pread fails, fall back to attempting
12547 lseek/read.
12548 (handle_pwrite): Likewise for pwrite.
12549
12550 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
12551
12552 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
12553 between unsupported TYPE and unimplementable ADDR/LEN combination.
12554 (arm_insert_point): Act on new return value.
12555
12556 2012-07-31 Pedro Alves <palves@redhat.com>
12557
12558 * server.c (process_point_options): Only skip tokens if we find
12559 one that is unrecognized. Don't treat 'X' specially while
12560 skipping unrecognized tokens.
12561
12562 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
12563
12564 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
12565 to 4-byte-align HW breakpoint addresses for Thumb.
12566
12567 2012-07-27 Yao Qi <yao@codesourcery.com>
12568
12569 PR remote/14161.
12570
12571 * server.h: Declare gdb_agent_about_to_close.
12572 * target.c (kill_inferior): Include "agent.h".
12573 New. Send command 'kill'.
12574 * target.h (kill_inferior): Removed macro.
12575 * tracepoint.c (gdb_agent_about_to_close): New.
12576 (gdb_agent_helper_thread): Handle command 'close'.
12577 Wait endlessly until the inferior stops.
12578 Install gdb_agent_remove_socket to atexit hook.
12579 (agent_socket_name): New static variable.
12580 (gdb_agent_socket_init): Replace local variable 'name' with
12581 'agent_socket_name'.
12582 (gdb_agent_remove_socket): New.
12583
12584 2012-07-27 Yao Qi <yao@codesourcery.com>
12585
12586 * server.c (process_point_options): Stop at 'X' when parsing.
12587
12588 2012-07-19 Michael Eager <eager@eagercon.com>
12589
12590 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
12591 to hw_execute.
12592 * linux-x86-low.c (x86_insert_point, x86_remove_point):
12593 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
12594 hardware breakpoint.
12595
12596 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12597
12598 * gdbserver/linux-low.c (initialize_low): Call
12599 linux_ptrace_init_warnings.
12600
12601 2012-07-02 Doug Evans <dje@google.com>
12602
12603 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
12604 pointer to int.
12605
12606 2012-07-02 Stan Shebs <stan@codesourcery.com>
12607
12608 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
12609 (ax.o): Add it to build rule.
12610 (ax-ipa.o): Ditto.
12611 (OBS): Add format.o.
12612 (IPA_OBS): Add format.o.
12613 * server.c (handle_query): Claim support for breakpoint commands.
12614 (process_point_options): Add command case.
12615 (process_serial_event): Leave running if there are printfs in
12616 effect.
12617 * mem-break.h (any_persistent_commands): Declare.
12618 (add_breakpoint_commands): Declare.
12619 (gdb_no_commands_at_breakpoint): Declare.
12620 (run_breakpoint_commands): Declare.
12621 * mem-break.c (struct point_command_list): New struct.
12622 (struct breakpoint): New field command_list.
12623 (any_persistent_commands): New function.
12624 (add_commands_to_breakpoint): New function.
12625 (add_breakpoint_commands): New function.
12626 (gdb_no_commands_at_breakpoint): New function.
12627 (run_breakpoint_commands): New function.
12628 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
12629 locally.
12630 * ax.c: Include format.h.
12631 (ax_printf): New function.
12632 (gdb_eval_agent_expr): Add printf opcode.
12633
12634 2012-06-13 Yao Qi <yao@codesourcery.com>
12635
12636 * server.c (start_inferior): Remove duplicated writes to fields
12637 'last_resume_kind' and 'last_status' of 'current_inferior'.
12638
12639 2012-06-12 Yao Qi <yao@codesourcery.com>
12640 Pedro Alves <palves@redhat.com>
12641
12642 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
12643 comment.
12644 * server.c (handle_v_cont): Extend comment.
12645
12646 2012-06-11 Yao Qi <yao@codesourcery.com>
12647
12648 * linux-low.c (linux_attach): Add 'static'.
12649
12650 2012-06-06 Yao Qi <yao@codesourcery.com>
12651
12652 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
12653
12654 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
12655
12656 Fix gcc -flto compilation warning.
12657 * server.c (main): Make variable multi_mode and attach volatile.
12658
12659 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12660
12661 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
12662 if the platform doesn't know about it.
12663
12664 2012-05-30 Jeff Kenton <jkenton@tilera.com>
12665
12666 * Makefile.in (SFILES): Add linux-tile-low.c.
12667 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
12668 * configure.srv: Handle tilegx-*-linux*.
12669 * linux-tile-low.c: New file.
12670
12671 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12672
12673 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
12674
12675 2012-05-24 Pedro Alves <palves@redhat.com>
12676
12677 PR gdb/7205
12678
12679 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
12680
12681 2012-05-24 Pedro Alves <palves@redhat.com>
12682
12683 PR gdb/7205
12684
12685 Replace target_signal with gdb_signal throughout.
12686
12687 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
12688
12689 * linux-low.c (linux_store_registers): Avoid the copying sequence
12690 when no data has been retrieved by ptrace.
12691
12692 2012-05-22 Will Deacon <will.deacon@arm.com>
12693
12694 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
12695 Include asm/ptrace.h.
12696 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
12697 already defined.
12698
12699 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
12700
12701 * linux-low.c (linux_store_registers): Don't re-retrieve data
12702 with ptrace that has already been obtained from /proc. Always
12703 copy any data retrieved with ptrace to the buffer supplied.
12704
12705 2012-05-11 Yao Qi <yao@codesourcery.com>
12706 Pedro Alves <palves@redhat.com>
12707
12708 * linux-low.c (enum stopping_threads_kind): New.
12709 (stopping_threads): Change type to `enum stopping_threads_kind'.
12710 (handle_extended_wait): If stopping and suspending threads, leave
12711 the new_lwp suspended too.
12712 (linux_wait_for_event): Adjust.
12713 (stop_all_lwps): Set `stopping_threads' to
12714 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
12715 whether we're suspending threads or just stopping them. Assert no
12716 recursion happens.
12717
12718 2012-04-29 Yao Qi <yao@codesourcery.com>
12719
12720 * server.h: Move some code to ...
12721 * gdbthread.h: ... here. New.
12722 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
12723 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
12724 (nto-low.o, win32-low.o): Likewise.
12725 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
12726 * regcache.c, remote-utils.c, server.c: Likewise.
12727 * target.c, tracepoint.c, win32-low.c: Likewise.
12728
12729 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12730
12731 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
12732 (PTRACE_ARG4_TYPE): Likewise.
12733 (PTRACE_XFER_TYPE): Likewise.
12734 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
12735 ptrace to PTRACE_ARG3_TYPE.
12736 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
12737 (PTRACE_ARG4_TYPE): Likewise.
12738 (PTRACE_XFER_TYPE): Likewise.
12739 (linux_detach_one_lwp): Cast fourth argument of
12740 ptrace to long then PTRACE_ARG4_TYPE.
12741 (regsets_fetch_inferior_registers): Cast third argument of
12742 ptrace to long then PTRACE_ARG3_TYPE.
12743 (regsets_store_inferior_registers): Likewise.
12744
12745 2012-04-20 Pedro Alves <palves@redhat.com>
12746
12747 * configure: Regenerate.
12748
12749 2012-04-19 Pedro Alves <palves@redhat.com>
12750
12751 * Makefile.in (GNULIB_BUILDDIR): New.
12752 (LIBGNU, INCGNU, GNULIB_H): Adjust.
12753 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
12754 (all, install-only, uninstall, clean-info, all-lib, clean): No
12755 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
12756 (maintainer-clean realclean distclean): Use subdir_do.
12757 (subdir_do): New.
12758 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
12759 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
12760 * acinclude.m4: Include acx_configure_dir.m4.
12761 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
12762 calls. Call AC_PROG_RANLIB. Configure gnulib using
12763 ACX_CONFIGURE_DIR.
12764 (GNULIB): New.
12765 (GNULIB_STDINT_H): Adjust.
12766 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
12767 * gdbreplay.c: Include build-gnulib/config.h.
12768 * server.h: Likewise.
12769 * aclocal.m4: Regenerate.
12770 * config.in: Regenerate.
12771 * configure: Regenerate.
12772
12773 2012-04-19 Pedro Alves <palves@redhat.com>
12774
12775 * Makefile.in (LIBGNU, INCGNU): Adjust.
12776 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
12777 (all, install-only, uninstall, clean-info, all-lib, clean)
12778 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
12779 * configure.ac: Adjust AC_OUTPUT output.
12780 * aclocal.m4: Regenerate.
12781 * configure: Regenerate.
12782
12783 2012-04-19 Pedro Alves <palves@redhat.com>
12784
12785 * Makefile.in (generated_files): New.
12786 (server_h): Remove the explicit dependency on config.h, and depend
12787 on $generated_files.
12788
12789 2012-04-19 Pedro Alves <palves@redhat.com>
12790
12791 * Makefile.in (INCGNU): Add -Ignulib.
12792
12793 2012-04-19 Pedro Alves <palves@redhat.com>
12794
12795 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
12796 (INCGNU): ... this, and spell out -I here.
12797 (GNULIB_LIB): Rename to ...
12798 (LIBGNU): ... this.
12799 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
12800
12801 2012-04-19 Pedro Alves <palves@redhat.com>
12802
12803 * config.in: Regenerate.
12804
12805 2012-04-19 Pedro Alves <palves@redhat.com>
12806
12807 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
12808 * server.h (memmem): Remove declaration.
12809 * config.in: Regenerate.
12810 * configure: Regenerate.
12811
12812 2012-04-19 Yao Qi <yao@codesourcery.com>
12813
12814 * Makefile.in (SFILES): Add common/vec.c.
12815 (OBS): Add vec.o.
12816 (vec.o): New rule.
12817
12818 2012-04-19 Yao Qi <yao@codesourcery.com>
12819
12820 * remote-utils.c (prepare_resume_reply): Replace with macro
12821 target_core_of_thread.
12822 * server.c (handle_qxfer_threads_proper): Likewise.
12823 * target.h (traget_core_of_thread): New macro.
12824
12825 2012-04-18 Pedro Alves <palves@redhat.com>
12826
12827 * aclocal.m4: Regenerate.
12828 * configure: Regenerate.
12829
12830 2012-04-16 Yao Qi <yao@codesourcery.com>
12831
12832 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
12833 duplicated on address.
12834
12835 2012-04-16 Yao Qi <yao@codesourcery.com>
12836
12837 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
12838 (struct tracepoint_action_ops) <send>: New field.
12839 (m_tracepoint_action_send, r_tracepoint_action_send): New.
12840 (agent_expr_send, x_tracepoint_action_send): New.
12841 (l_tracepoint_action_send): New.
12842 (cmd_qtdp): Download and install tracepoint
12843 according to `use_agent'.
12844 (run_inferior_command): Add one more parameter `len'.
12845 Update callers.
12846 (tracepoint_send_agent): New.
12847 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
12848
12849 2012-04-16 Yao Qi <yao@codesourcery.com>
12850
12851 * tracepoint.c (download_tracepoints): Moved to ...
12852 (cmd_qtstart): ... here.
12853
12854 2012-04-14 Yao Qi <yao@codesourcery.com>
12855
12856 * tracepoint.c: Include inttypes.h.
12857 (struct collect_memory_action): Use sized types.
12858 (struct tracepoint): Likewise.
12859 (cmd_qtdp, stop_tracing): Update print specifiers.
12860 (cmd_qtp, response_tracepoint): Likewise.
12861 (collect_data_at_tracepoint): Likewise.
12862 (collect_data_at_step): Likewise.
12863
12864 2012-04-14 Yao Qi <yao@codesourcery.com>
12865
12866 Import gnulib module inttypes.
12867 * aclocal.m4, config.in, configure: Regenerated.
12868
12869 2012-04-14 Yao Qi <yao@codesourcery.com>
12870
12871 * Makefile.in (maintainer-clean, realclean, distclean): Remove
12872 Makefile and config.status at last.
12873
12874 2012-04-13 Yao Qi <yao@codesourcery.com>
12875
12876 * tracepoint.c: Include stdint.h unconditionally.
12877
12878 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12879
12880 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
12881 on BFD_HAVE_SYS_PROCFS_TYPE.
12882 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
12883 * configure: Regenerate.
12884 * config.in: Likewise.
12885
12886 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
12887
12888 * Makefile.in (clean): Also remove x32.c x32-linux.c
12889 x32-avx.c x32-avx-linux.c.
12890 (x32.o): New target.
12891 (x32.c): Likewise.
12892 (x32-linux.o): Likewise.
12893 (x32-linux.c): Likewise.
12894 (x32-avx.o): Likewise.
12895 (x32-avx.c): Likewise.
12896 (x32-avx-linux.o): Likewise.
12897 (x32-avx-linux.c): Likewise.
12898
12899 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
12900 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
12901 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
12902 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
12903 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
12904 i386/x32-avx-linux.xml.
12905
12906 * linux-x86-low.c (init_registers_x32_linux): New prototype.
12907 (init_registers_x32_avx_linux): Likwise.
12908 (x86_linux_update_xmltarget): Call init_registers_x32_linux
12909 or init_registers_x32_avx_linux if linux_is_elf64 is false.
12910
12911 2012-04-13 Pedro Alves <palves@redhat.com>
12912
12913 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
12914 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
12915 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
12916 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
12917 the sub-make.
12918
12919 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
12920
12921 * linux-x86-low.c (compat_x32_clock_t): New.
12922 (compat_x32_siginfo_t): Likewise.
12923 (compat_x32_siginfo_from_siginfo): Likewise.
12924 (siginfo_from_compat_x32_siginfo): Likewise.
12925 (linux_is_elf64): Likewise.
12926 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
12927 and siginfo_from_compat_x32_siginfo for x32.
12928 (x86_arch_setup): Set linux_is_elf64.
12929
12930 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
12931
12932 PR gdb/13969
12933 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
12934 e_machine field.
12935 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
12936 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
12937 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
12938 compatible with process.
12939
12940 2012-04-12 Yao Qi <yao@codesourcery.com>
12941
12942 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
12943 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
12944 (install-only, install-info, clean): Handle sub dir gnulib.
12945 (all-lib, am--refresh): New targets.
12946 (memmem.o): Remove target.
12947 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
12948 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
12949 (AC_REPLACE_FUNCS): Remove memmem.
12950 Invoke gl_INIT and AM_INIT_AUTOMAKE.
12951 (AC_OUTPUT): Generate Makefile in gnulib/.
12952 * aclocal.m4, config.in, configure: Regenerated.
12953
12954 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
12955
12956 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
12957
12958 2012-04-05 Pedro Alves <palves@redhat.com>
12959
12960 -Werror=strict-aliasing
12961
12962 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
12963 pointer.
12964
12965 2012-04-04 Pedro Alves <palves@redhat.com>
12966
12967 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12968 (sparc_store_gregset_from_stack, sparc_store_gregset)
12969 (sparc_breakpoint_at): Fix formatting.
12970
12971 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12972
12973 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
12974 are available.
12975 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
12976 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
12977 * config.in: Regenerate.
12978 * configure: Likewise.
12979
12980 2012-03-29 Pedro Alves <palves@redhat.com>
12981
12982 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
12983 Correct ptrace arguments.
12984
12985 2012-03-28 Pedro Alves <palves@redhat.com>
12986
12987 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
12988 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
12989 (IA64_FR1_REGNUM): New defines.
12990 (ia64_fetch_register): New.
12991 (the_low_target): Install it.
12992 * linux-low.h (struct linux_target_ops) <fetch_register>: New
12993 field.
12994 * linux-low.c (linux_fetch_registers): Try the
12995 the_low_target.fetch_register hook first.
12996
12997 * linux-arm-low.c (the_low_target): Adjust.
12998 * linux-bfin-low.c (the_low_target): Adjust.
12999 * linux-cris-low.c (the_low_target): Adjust.
13000 * linux-crisv32-low.c (the_low_target): Adjust.
13001 * linux-m32r-low.c (the_low_target): Adjust.
13002 * linux-m68k-low.c (the_low_target): Adjust.
13003 * linux-mips-low.c (the_low_target): Adjust.
13004 * linux-ppc-low.c (the_low_target): Adjust.
13005 * linux-s390-low.c (the_low_target): Adjust.
13006 * linux-sh-low.c (the_low_target): Adjust.
13007 * linux-sparc-low.c (the_low_target): Adjust.
13008 * linux-tic6x-low.c (the_low_target): Adjust.
13009 * linux-x86-low.c (the_low_target): Adjust.
13010 * linux-xtensa-low.c (the_low_target): Adjust.
13011
13012 2012-03-26 Pedro Alves <palves@redhat.com>
13013
13014 * server.c (handle_qxfer_libraries): Don't bail early if
13015 the_target->qxfer_libraries_svr4 is not NULL.
13016
13017 2012-03-26 Pedro Alves <palves@redhat.com>
13018
13019 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
13020
13021 2012-03-23 Pedro Alves <palves@redhat.com>
13022
13023 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
13024 "library-list-svr4" element's start tag when the the DSO list is
13025 empty.
13026
13027 2012-03-23 Pedro Alves <palves@redhat.com>
13028
13029 * linux-low.c (read_one_ptr): Read the inferior's pointer through
13030 a variable whose type size is the same as the inferior's pointer
13031 size.
13032
13033 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
13034
13035 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
13036 struct siginfo.
13037 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
13038 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
13039 * linux-low.h: Include <signal.h>.
13040 (struct siginfo): Remove forward declaration.
13041 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
13042 struct siginfo.
13043
13044 2012-03-21 Mike Frysinger <vapier@gentoo.org>
13045
13046 * .gitignore: Ignore more files.
13047
13048 2012-03-19 Pedro Alves <palves@redhat.com>
13049 Jan Kratochvil <jan.kratochvil@redhat.com>
13050
13051 * server.c (cont_thread, general_thread): Add describing comments.
13052 (start_inferior): Clear `cont_thread'.
13053 (handle_v_cont): Don't set `cont_thread' if resuming all threads
13054 of a process.
13055
13056 2012-03-15 Yao Qi <yao@codesourcery.com>
13057
13058 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
13059 handling to ...
13060 (cmd_qtdp): ... here.
13061
13062 2012-03-15 Yao Qi <yao@codesourcery.com>
13063
13064 * tracepoint.c (struct tracepoint_action_ops): New.
13065 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
13066 (m_tracepoint_action_download): New.
13067 (r_tracepoint_action_download): New.
13068 (x_tracepoint_action_download): New.
13069 (l_tracepoint_action_download): New.
13070 (add_tracepoint_action): Install `action->ops' according type.
13071 (download_tracepoint_1): Move code `download' function pointer
13072 of various tracepoint_action_ops.
13073
13074 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
13075
13076 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
13077 linux_ptrace_attach_warnings.
13078
13079 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
13080
13081 * Makefile.in (linux-ptrace.o): New.
13082 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
13083 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
13084 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
13085 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
13086 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
13087 of these targets.
13088 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
13089
13090 2012-03-08 Yao Qi <yao@codesourcery.com>
13091 Pedro Alves <palves@redhat.com>
13092
13093 Fix PR server/13392.
13094 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
13095 offset of JMP insn.
13096 * tracepoint.c (remove_tracepoint): New.
13097 (cmd_qtdp): Call remove_tracepoint when failed to install.
13098
13099 2012-03-07 Pedro Alves <palves@redhat.com>
13100
13101 * linux-low.c (get_detach_signal): New.
13102 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
13103 Pass on pending signals to PTRACE_DETACH. Check the result of the
13104 ptrace call.
13105 * server.c (program_signals, program_signals_p): New.
13106 (handle_general_set): Handle QProgramSignals.
13107 * server.h (program_signals, program_signals_p): Declare.
13108
13109 2012-03-05 Pedro Alves <palves@redhat.com>
13110 Jan Kratochvil <jan.kratochvil@redhat.com>
13111
13112 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
13113 New comment why.
13114
13115 2012-03-03 Yao Qi <yao@codesourcery.com>
13116
13117 * tracepoint.c (tracepoint_look_up_symbols): Update call to
13118 agent_look_up_symbols.
13119
13120 2012-03-03 Yao Qi <yao@codesourcery.com>
13121
13122 * Makefile.in (linux-low.o): Keep dependence on agent.h.
13123 (linux-x86-low.o): Likewise.
13124 * server.h: Remove in_process_agent_loaded.
13125 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
13126 common/agent.c.
13127 Update callers.
13128
13129 2012-03-03 Yao Qi <yao@codesourcery.com>
13130
13131 * tracepoint.c (gdb_agent_capability): New global.
13132 (in_process_agent_loaded_ust): Renamed to
13133 `in_process_agent_supports_ust'.
13134 Update callers.
13135 (in_process_agent_supports_ust): Call agent_capability_check.
13136 (clear_installed_tracepoints): Assert that agent supports
13137 agent.
13138
13139 2012-03-03 Yao Qi <yao@codesourcery.com>
13140
13141 * linux-low.c (linux_supports_agent): New.
13142 (linux_target_ops): Initialize field `supports_agent' with
13143 linux_supports_agent.
13144 * target.h (struct target_ops) <supports_agent>: New.
13145 (target_supports_agent): New macro.
13146 * server.c (handle_general_set): Handle packet 'QAgent'.
13147 (handle_query): Send `QAgent+'.
13148 * Makefile.in (server.o): Depends on agent.h.
13149
13150 2012-03-03 Yao Qi <yao@codesourcery.com>
13151
13152 * Makefile.in (OBS): Add agent.o.
13153 Add new rule for agent.o.
13154 Track dependence of tracepoint.c on agent.h.
13155 * tracepoint.c (run_inferior_command_1):
13156 (run_inferior_command): Call agent_run_command.
13157 (gdb_ust_connect_sync_socket): Deleted. Move it to
13158 common/agent.c.
13159 (resume_thread, stop_thread): Likewise.
13160 (gdb_ust_socket_init): Renamed to ...
13161 (gdb_agent_socket_init): ... New.
13162 (gdb_ust_thread): Renamed to ...
13163 (gdb_agent_helper_thread): ... New.
13164 (gdb_ust_init): Move some code to ...
13165 (gdb_agent_init): ... here. New.
13166 [HAVE_UST]: Call gdb_ust_init.
13167 (initialize_tracepoint_ftlib): Call gdb_agent_init.
13168 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
13169 * config.in, configure: Regenerated.
13170
13171 2012-03-02 Pedro Alves <palves@redhat.com>
13172
13173 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
13174 * linux-low.c (struct simple_pid_list): New.
13175 (stopped_pids): New a struct simple_pid_list pointer.
13176 (add_to_pid_list, pull_pid_from_list): New.
13177 (handle_extended_wait): Don't assume the first signal new children
13178 report is SIGSTOP. Adjust call to pull_pid_from_list.
13179 (linux_wait_for_lwp): Adjust.
13180
13181 2012-03-02 Yao Qi <yao@codesourcery.com>
13182
13183 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
13184 debug log.
13185
13186 2012-03-02 Yao Qi <yao@codesourcery.com>
13187
13188 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
13189 `stop_pc' and `tpoint'. Update caller.
13190
13191 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
13192
13193 * linux-low.h (linux_target_ops): Add regset_bitmap member.
13194 * linux-low.c (use_linux_regsets): New macro.
13195 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
13196 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
13197 (linux_register_in_regsets): New function.
13198 (usr_fetch_inferior_registers): Skip registers covered by
13199 regsets.
13200 (usr_store_inferior_registers): Likewise.
13201 (usr_fetch_inferior_registers): New macro.
13202 (usr_store_inferior_registers): Likewise.
13203 (linux_fetch_registers): Handle mixed regset/non-regset targets.
13204 (linux_store_registers): Likewise.
13205 * linux-mips-low.c (init_registers_mips_dsp_linux): New
13206 prototype.
13207 (init_registers_mips64_dsp_linux): Likewise.
13208 (init_registers_mips_linux): New macro.
13209 (init_registers_mips_dsp_linux): Likewise.
13210 (mips_dsp_num_regs): Likewise.
13211 (DSP_BASE, DSP_CONTROL): New fallback macros.
13212 (mips_base_regs): New macro.
13213 (mips_regmap): Use it. Fix the size.
13214 (mips_dsp_regmap): New variable.
13215 (mips_dsp_regset_bitmap): Likewise.
13216 (mips_arch_setup): New function.
13217 (mips_cannot_fetch_register): Use the_low_target.regmap rather
13218 than mips_regmap.
13219 (mips_cannot_store_register): Likewise.
13220 (the_low_target): Update .arch_setup, .num_regs and .regmap
13221 initializers. Add .regset_bitmap initializer.
13222 * linux-arm-low.c (the_low_target): Add .regset_bitmap
13223 initializer.
13224 * linux-bfin-low.c (the_low_target): Likewise.
13225 * linux-cris-low.c (the_low_target): Likewise.
13226 * linux-crisv32-low.c (the_low_target): Likewise.
13227 * linux-ia64-low.c (the_low_target): Likewise.
13228 * linux-m32r-low.c (the_low_target): Likewise.
13229 * linux-m68k-low.c (the_low_target): Likewise.
13230 * linux-ppc-low.c (the_low_target): Likewise.
13231 * linux-s390-low.c (the_low_target): Likewise.
13232 * linux-sh-low.c (the_low_target): Likewise.
13233 * linux-sparc-low.c (the_low_target): Likewise.
13234 * linux-tic6x-low.c (the_low_target): Likewise.
13235 * linux-x86-low.c (the_low_target): Likewise.
13236 * linux-xtensa-low.c (the_low_target): Likewise.
13237 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
13238 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
13239 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
13240 srv_xmlfiles.
13241 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
13242 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
13243
13244 2012-02-29 Yao Qi <yao@codesourcery.com>
13245 Pedro Alves <palves@redhat.com>
13246
13247 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
13248 `step_over_finished' is true.
13249
13250 2012-02-27 Pedro Alves <palves@redhat.com>
13251
13252 * linux-low.c (pid_is_stopped): Delete, moved to common/.
13253 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
13254
13255 2012-02-27 Pedro Alves <palves@redhat.com>
13256
13257 PR server/9684
13258 * linux-low.c (pid_is_stopped): New.
13259 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
13260
13261 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
13262
13263 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
13264 of conditions.
13265
13266 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
13267
13268 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
13269
13270 2012-02-24 Luis Machado <lgustavo@codesourcery>
13271
13272 * server.c (handle_query): Advertise support for target-side
13273 breakpoint condition evaluation.
13274 (process_point_options): New function.
13275 (process_serial_event): When inserting a breakpoint, check for
13276 a target-side condition that should be evaluated.
13277
13278 * mem-break.c: Include regcache.h and ax.h.
13279 (point_cond_list_t): New data structure.
13280 (breakpoint) <cond_list>: New field.
13281 (find_gdb_breakpoint_at): Make non-static.
13282 (delete_gdb_breakpoint_at): Clear any target-side
13283 conditions.
13284 (clear_gdb_breakpoint_conditions): New function.
13285 (add_condition_to_breakpoint): Likewise.
13286 (add_breakpoint_condition): Likewise.
13287 (gdb_condition_true_at_breakpoint): Likewise.
13288 (gdb_breakpoint_here): Return result directly instead
13289 of going through a local variable.
13290
13291 * mem-break.h (find_gdb_breakpoint_at): New prototype.
13292 (clear_gdb_breakpoint_conditions): Likewise.
13293 (add_breakpoint_condition): Likewise.
13294 (gdb_condition_true_at_breakpoint): Likewise.
13295
13296 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
13297 (need_step_over_p): Take target-side breakpoint condition into
13298 consideration.
13299
13300 2012-02-24 Luis Machado <lgustavo@codesourcery>
13301
13302 * server.h: Include tracepoint.h.
13303 (agent_mem_read, agent_get_trace_state_variable_value,
13304 agent_set_trace_state_variable_value,
13305 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
13306 get_set_tsv_func_addr): New prototypes.
13307
13308 * ax.h: New include file.
13309 * ax.c: New source file.
13310
13311 * tracepoint.c: Include ax.h.
13312 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
13313 agent_expr, eval_result_type): Move to ax.h.
13314 (parse_agent_expr): Rename to ...
13315 (gdb_parse_agent_expr): ... this, make it non-static and move
13316 to ax.h.
13317 (unparse_agent_expr) Rename to ...
13318 (gdb_unparse_agent_expr): ... this, make it non-static and move
13319 to ax.h.
13320 (eval_agent_expr): Rename to ...
13321 (eval_tracepoint_agent_expr): ... this.
13322 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
13323 forward declarations.
13324 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
13325 (agent_get_trace_state_variable_value): New function.
13326 (agent_set_trace_state_variable_value): New function.
13327 (cmd_qtdp): Call gdb_parse_agent_expr (...).
13328 (response_tracepoint): Call gdb_unparse_agent_expr (...).
13329 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
13330 (condition_true_at_tracepoint): Likewise.
13331 (parse_agent_expr): Rename to ...
13332 (gdb_parse_agent_expr): ... this and move to ax.c.
13333 (unparse_agent_expr): Rename to ...
13334 (gdb_unparse_agent_expr): ... this and move to ax.c.
13335 (gdb_agent_op_name): Move to ax.c.
13336 (eval_agent_expr): Rename to ...
13337 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
13338 and move to ax.c.
13339 (eval_tracepoint_agent_expr): New function.
13340 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
13341 non-static.
13342 (current_insn_ptr, emit_error, struct bytecode_address): Move to
13343 ax.c.
13344 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
13345 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
13346 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
13347 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
13348 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
13349 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
13350 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
13351 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
13352 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
13353 (compile_bytecodes): Remove forward declaration.
13354 (is_goto_target): Move to ax.c.
13355 (compile_bytecodes): Move to ax.c and call
13356 agent_get_trace_state_variable_value (...) and
13357 agent_set_trace_state_variable_value (...).
13358
13359 * Makefile.in: Update ax.c and IPA dependencies.
13360
13361 2012-02-24 Pedro Alves <palves@redhat.com>
13362
13363 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
13364 (cmd_bigqtbuffer_circular): ... this. Only handle
13365 'QTBuffer:circular:'.
13366 (handle_tracepoint_general_set): Adjust.
13367
13368 2012-02-16 Yao Qi <yao@codesourcery.com>
13369
13370 * inferiors.c: Move code to ...
13371 * dll.c: .... here. New.
13372 * server.h: Declare clear_dlls.
13373 * Makefile.in (SFILES): Add dll.c.
13374 (OBS): Add dll.o
13375 (dll.o): New rule.
13376
13377 2012-02-11 Yao Qi <yao@codesourcery.com>
13378
13379 * server.c: (handle_monitor_command): Add a new parameter
13380 `own_buf'.
13381 (handle_query): Update caller.
13382
13383 2012-02-09 Joel Brobecker <brobecker@adacore.com>
13384
13385 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
13386 * configure, config.in: Regenerate.
13387 * hostio.c: Provide an alternate implementation if HAVE_READLINK
13388 is not defined.
13389
13390 2012-02-02 Pedro Alves <palves@redhat.com>
13391
13392 Try SIGKILL first, then PTRACE_KILL.
13393 * linux-low.c (linux_kill_one_lwp): New.
13394 (linux_kill_one_lwp): Rename to ...
13395 (kill_one_lwp_callback): ... this. Use the new
13396 linux_kill_one_lwp.
13397
13398 2012-02-02 Pedro Alves <palves@redhat.com>
13399
13400 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
13401 inferior.
13402
13403 2012-01-27 Pedro Alves <palves@redhat.com>
13404
13405 * linux-low.c (linux_child_pid_to_exec_file): Delete.
13406 (elf_64_file_p): Make static.
13407 (linux_pid_exe_is_elf_64_file): New.
13408 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
13409 Delete declarations.
13410 (linux_pid_exe_is_elf_64_file): Declare.
13411 * linux-x86-low.c (x86_arch_setup): Use
13412 linux_pid_exe_is_elf_64_file.
13413
13414 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
13415
13416 * linux-low.c (linux_wait_for_event_1): Rename to ...
13417 (linux_wait_for_event): ... here and merge it with former
13418 linux_wait_for_event - new variable wait_ptid, use it.
13419 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
13420
13421 2012-01-23 Pedro Alves <palves@redhat.com>
13422
13423 * server.c (main): Avoid yet another case of infinite loop while
13424 detaching/killing after a longjmp.
13425
13426 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13427
13428 Code cleanup.
13429 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
13430
13431 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
13432
13433 * hostio.c (handle_readlink): New function.
13434 (handle_vFile): Call it to handle "vFile:readlink" packets.
13435
13436 2012-01-20 Pedro Alves <palves@redhat.com>
13437 Ulrich Weigand <ulrich.weigand@linaro.org>
13438
13439 * server.c (handle_v_requests): Only support vAttach and vRun to
13440 start multiple processes when in extended protocol mode.
13441
13442 2012-01-17 Pedro Alves <palves@redhat.com>
13443
13444 * tracepoint.c (initialize_tracepoint): Use mmap instead of
13445 memalign plus mprotect to allocate the scratch buffer.
13446
13447 2012-01-13 Pedro Alves <palves@redhat.com>
13448
13449 * server.c (attach_inferior): Clear `cont_thread'.
13450
13451 2012-01-13 Pedro Alves <palves@redhat.com>
13452
13453 * server.c (main): Avoid infinite loop while detaching/killing
13454 after a longjmp.
13455
13456 2012-01-09 Doug Evans <dje@google.com>
13457
13458 * server.c (start_inferior): Set last_ptid in --wrapper case.
13459
13460 2012-01-06 Yao Qi <yao@codesourcery.com>
13461
13462 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
13463 defined.
13464 [IN_PROCESS_AGENT] (debug_agent): New global variable.
13465
13466 2012-01-04 Yao Qi <yao@codesourcery.com>
13467
13468 * tracepoint.c (cmd_qtdp): Print debug message
13469 for static tracepoint.
13470
13471 2012-01-04 Yao Qi <yao@codesourcery.com>
13472
13473 * tracepoint.c (trace_vdebug): Differentiate debug message
13474 between gdbserver and IPA.
13475
13476 2012-01-03 Yao Qi <yao@codesourcery.com>
13477
13478 * tracepoint.c (tracepoint_was_hit): Don't collect for
13479 static tracepoint.
13480
13481 2012-01-02 Joel Brobecker <brobecker@adacore.com>
13482
13483 * terminal.h: Reformat copyright header.
13484
13485 2012-01-02 Joel Brobecker <brobecker@adacore.com>
13486
13487 * server.c (gdbserver_version): Update copyright year.
13488 * gdbreplay.c (gdbreplay_version): Likewise.
13489
13490 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
13491
13492 * linux-low.c (linux_create_inferior): Put empty if clause for write.
13493
13494 Revert:
13495 2011-12-18 Hui Zhu <teawater@gmail.com>
13496 * linux-low.c (linux_create_inferior): Save return value to ret.
13497
13498 2011-12-18 Hui Zhu <teawater@gmail.com>
13499
13500 * linux-low.c (linux_create_inferior): Save return value to ret.
13501
13502 2011-12-16 Doug Evans <dje@google.com>
13503
13504 * linux-low.c (linux_create_inferior): If stdio connection,
13505 redirect stdin from /dev/null, stdout to stderr.
13506 * remote-utils.c (remote_is_stdio): New static global.
13507 (remote_connection_is_stdio): New function.
13508 (remote_prepare): Handle stdio connection.
13509 (remote_open): Ditto.
13510 (remote_close): Don't close stdin for stdio connections.
13511 (read_prim,write_prim): New functions. Replace all calls to
13512 read/write to these.
13513 * server.c (main): Watch for "-" argument. Move call to
13514 remote_prepare before start_inferior.
13515 * server.h (STDIO_CONNECTION_NAME): New macro.
13516 (remote_connection_is_stdio): Declare.
13517
13518 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
13519 in debugging output.
13520
13521 2011-12-15 Yao Qi <yao@codesourcery.com>
13522
13523 * tracepoint.c: Include sys/syscall.h.
13524 (gdb_ust_thread): Remove preprocessor conditional.
13525
13526 2011-12-14 Pedro Alves <pedro@codesourcery.com>
13527
13528 * linux-low.c (linux_detach_one_lwp): Call
13529 the_low_target.prepare_to_resume before detaching.
13530
13531 2011-12-14 Yao Qi <yao@codesourcery.com>
13532
13533 * tracepoint.c (gdb_ust_thread): Don't ignore return value
13534 of write.
13535
13536 2011-12-14 Yao Qi <yao@codesourcery.com>
13537
13538 * i386-low.c (i386_low_stopped_data_address): Initialize local
13539 variable `control'.
13540
13541 2011-12-13 Pedro Alves <pedro@codesourcery.com>
13542
13543 PR remote/13492
13544
13545 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
13546 DR_CONTROL unless necessary. Extend comments.
13547 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
13548 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
13549
13550 2011-12-13 Yao Qi <yao@codesourcery.com>
13551
13552 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
13553 macros.
13554 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
13555
13556 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
13557
13558 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
13559 Print new debug message for such case.
13560
13561 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
13562
13563 Fix overlapping memcpy.
13564 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
13565 the read_inferior_memory transfer.
13566 (delete_fast_tracepoint_jump): New variable buf. Use it for the
13567 write_inferior_memory transfer.
13568 (set_fast_tracepoint_jump): New variable buf. Use it for the
13569 read_inferior_memory and write_inferior_memory transfers.
13570 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
13571 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
13572 Use it for the write_inferior_memory transfer.
13573 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
13574 buffers.
13575
13576 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
13577
13578 * linux-low.c (fetch_register, store_register): Make code
13579 consistent, fix formatting.
13580
13581 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
13582
13583 * linux-low.c (usr_store_inferior_registers): Factor out code
13584 to handle individual registers into...
13585 (store_register): ... this new function.
13586
13587 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
13588
13589 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
13590 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
13591 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
13592 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
13593 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
13594 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
13595 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
13596 (srv_xmlfiles): Add new XML files.
13597
13598 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
13599 and <sys/uio.h>.
13600 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
13601 (init_registers_s390_linux32v1): Add prototype.
13602 (init_registers_s390_linux32v2): Likewise.
13603 (init_registers_s390_linux64v1): Likewise.
13604 (init_registers_s390_linux64v2): Likewise.
13605 (init_registers_s390x_linux64v1): Likewise.
13606 (init_registers_s390x_linux64v2): Likewise.
13607 (s390_num_regs): Increment to 52.
13608 (s390_regmap): Add orig_r2 register.
13609 (s390_num_regs_3264): Increment to 68.
13610 (s390_regmap_3264): Add orig_r2 register.
13611 (s390_collect_ptrace_register): Handle orig_r2 register.
13612 (s390_supply_ptrace_register): Likewise.
13613 (s390_fill_last_break): New function.
13614 (s390_store_last_break): Likewise.
13615 (s390_fill_system_call): New function.
13616 (s390_store_system_call): Likewise.
13617 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
13618 register sets.
13619 (s390_check_regset): New function.
13620 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
13621 NT_S390_SYSTEM_CALL regsets and use appropriate description.
13622 Update target_regsets for available register sets.
13623
13624 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
13625 Jan Kratochvil <jan.kratochvil@redhat.com>
13626
13627 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
13628 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
13629 New.
13630 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
13631 * linux-low.h (struct process_info_private): New member r_debug.
13632 * server.c (handle_qxfer_libraries): Call
13633 the_target->qxfer_libraries_svr4.
13634 (handle_qxfer_libraries_svr4): New function.
13635 (qxfer_packets): New entry "libraries-svr4".
13636 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
13637 * target.h (struct target_ops): New member qxfer_libraries_svr4.
13638 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
13639 PACKET_qXfer_libraries_svr4.
13640
13641 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
13642
13643 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
13644 PSW address/mask between 8-byte and 16-byte formats.
13645 (s390_supply_ptrace_register): Likewise.
13646 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
13647 basic addressing mode bit.
13648
13649 2011-11-24 Stan Shebs <stan@codesourcery.com>
13650
13651 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
13652
13653 2011-11-17 Stan Shebs <stan@codesourcery.com>
13654
13655 * tracepoint.c (struct tracepoint): New field traceframe_usage.
13656 (tracing_start_time): New global.
13657 (tracing_stop_time): New global.
13658 (tracing_user_name): New global.
13659 (tracing_notes): New global.
13660 (tracing_stop_note): New global.
13661 (cmd_qtstart): Set traceframe_usage, start_time.
13662 (stop_tracing): Set stop_time.
13663 (cmd_qtstatus): Report additional status.
13664 (cmd_qtp): New function.
13665 (handle_tracepoint_query): Call it.
13666 (cmd_qtnotes): New function.
13667 (handle_tracepoint_general_set): Call it.
13668 (get_timestamp): Rename from tsv_get_timestamp.
13669
13670 2011-11-14 Stan Shebs <stan@codesourcery.com>
13671 Kwok Cheung Yeung <kcy@codesourcery.com>
13672
13673 * linux-x86-low.c (small_jump_insn): New.
13674 (i386_install_fast_tracepoint_jump_pad): Add arguments for
13675 trampoline and error message, build a trampoline and issue a small
13676 jump instruction to it.
13677 (x86_install_fast_tracepoint_jump_pad): Add arguments for
13678 trampoline and error message.
13679 (x86_get_min_fast_tracepoint_insn_len): New.
13680 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
13681 * linux-low.h (struct linux_target_ops): Add arguments to
13682 install_fast_tracepoint_jump_pad operation, add new operation.
13683 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
13684 arguments.
13685 (linux_get_min_fast_tracepoint_insn_len): New function.
13686 (linux_target_op): Add new operation.
13687 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
13688 (gdb_trampoline_buffer_end): Ditto.
13689 (gdb_trampoline_buffer_error): Ditto.
13690 (struct ipa_sym_addresses): Add fields for new IPA variables.
13691 (symbol_list): Add entries for new IPA variables.
13692 (struct tracepoint): Add fields to hold the address range of the
13693 trampoline used by the tracepoint.
13694 (trampoline_buffer_head): New static variable.
13695 (trampoline_buffer_tail): Ditto.
13696 (claim_trampoline_space): New function.
13697 (have_fast_tracepoint_trampoline_buffer): New function.
13698 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
13699 structure.
13700 (install_fast_tracepoint): Ditto, also add error buffer argument.
13701 (cmd_qtminftpilen): New function.
13702 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
13703 (fast_tracepoint_from_trampoline_address): New function.
13704 (fast_tracepoint_collecting): Handle trampoline as part of jump
13705 pad space.
13706 (set_trampoline_buffer_space): New function.
13707 (initialize_tracepoint): Initialize new IPA variables.
13708 * target.h (struct target_ops): Add arguments to
13709 install_fast_tracepoint_jump_pad operation, add new
13710 get_min_fast_tracepoint_insn_len operation.
13711 (target_get_min_fast_tracepoint_insn_len): New.
13712 (install_fast_tracepoint_jump_pad): Add arguments.
13713 * server.h (IPA_BUFSIZ): Define.
13714 * linux-i386-ipa.c: Include extra header files.
13715 (initialize_fast_tracepoint_trampoline_buffer): New function.
13716 (initialize_low_tracepoint): Call it.
13717 * server.h (set_trampoline_buffer_space): Declare.
13718 (claim_trampoline_space): Ditto.
13719 (have_fast_tracepoint_trampoline_buffer): Ditto.
13720
13721 2011-11-14 Yao Qi <yao@codesourcery.com>
13722
13723 * server.c (handle_query): Handle InstallInTrace for qSupported.
13724 * tracepoint.c (add_tracepoint): Sort list.
13725 (install_tracepoint, download_tracepoint): New.
13726 (cmd_qtdp): Call them to install and download tracepoints.
13727 (sort_tracepoints): Removed.
13728 (cmd_qtstart): Update.
13729
13730 2011-11-14 Yao Qi <yao@codesourcery.com>
13731
13732 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
13733 * mem-break.h: Declare.
13734 * tracepoint.c (cmd_qtstart): Move some code to ...
13735 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
13736 New.
13737 (download_tracepoints): Move some code to ...
13738 (download_tracepoint_1): ... here. New.
13739
13740 2011-11-08 Yao Qi <yao@codesourcery.com>
13741
13742 * remote-utils.c (relocate_instruction): A comment fix.
13743
13744 2011-11-07 Joel Brobecker <brobecker@adacore.com>
13745
13746 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
13747 (i386_dr_low_get_control, i386_dr_low_get_status): Use
13748 dr_status_mirror and dr_control_mirror from debug_reg_state.
13749 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
13750 (i386_initial_stuff): Remove use of deleted globals.
13751 (i386_get_thread_context, i386_set_thread_context,
13752 i386_thread_added): Use dr_status_mirror and dr_control_mirror
13753 from debug_reg_state.
13754
13755 2011-11-05 Yao Qi <yao@codesourcery.com>
13756
13757 * tracepoint.c (gdb_collect): Loop over tracepoints of same
13758 address as TPOINT's.
13759
13760 2011-11-02 Stan Shebs <stan@codesourcery.com>
13761
13762 * tracepoint.c (agent_mem_read_string): New function.
13763 (eval_agent_expr): Call it for tracenz.
13764 * server.c (handle_query): Report support for tracenz.
13765
13766 2011-11-02 Yao Qi <yao@codesourcery.com>
13767
13768 * tracepoint.c (cmd_qtstart): Remove unused local variables.
13769
13770 2011-11-02 Yao Qi <yao@codesourcery.com>
13771
13772 * target.h: Fix a typo in comment.
13773
13774 2011-10-31 Pedro Alves <pedro@codesourcery.com>
13775
13776 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
13777 clobber the breakpoints' shadows with fast tracepoint jumps.
13778 * mem-break.h (check_mem_write): Add `myaddr' parameter.
13779 * target.c (write_inferior_memory): Also pass MYADDR down to
13780 check_mem_write.
13781
13782 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
13783
13784 * configure.ac: Check support for personality routine.
13785 * configure: Regenerate.
13786 * config.in: Likewise.
13787 * linux-low.c: Include <sys/personality.h>.
13788 Define ADDR_NO_RANDOMIZE if necessary.
13789 (linux_create_inferior): Disable address space randomization when
13790 forking inferior, if requested.
13791 (linux_supports_disable_randomization): New function.
13792 (linux_target_ops): Install it.
13793 * server.h (disable_randomization): Declare.
13794 * server.c (disable_randomization): New global variable.
13795 (handle_general_set): Handle QDisableRandomization.
13796 (handle_query): Likewise for qSupported.
13797 (main): Support --disable-randomization and --no-disable-randomization
13798 command line arguments.
13799 * target.h (struct target_ops): Add supports_disable_randomization.
13800 (target_supports_disable_randomization): New macro.
13801
13802 2011-09-29 Mike Frysinger <vapier@gentoo.org>
13803
13804 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
13805 ifdef check.
13806 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
13807 [!PT_GETDSBT] (target_loadmap): New definition.
13808 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
13809 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
13810 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
13811 and PT_GETDSBT to LINUX_LOADMAP.
13812 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
13813 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
13814
13815 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
13816
13817 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
13818 (arm_linux_hwbp_cap): New static variable.
13819 (arm_linux_get_hwbp_cap): Replace by ...
13820 (arm_linux_init_hwbp_cap): ... this new function.
13821 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
13822 (arm_linux_get_hw_watchpoint_count): Likewise.
13823 (arm_linux_get_hw_watchpoint_max_length): Likewise.
13824 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
13825 (arm_prepare_to_resume): Use perror_with_name instead of error.
13826
13827 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
13828
13829 * linux-arm-low.c: Include <signal.h>.
13830 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
13831 (struct arm_linux_hwbp_cap): New data type.
13832 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
13833 (struct arm_linux_hw_breakpoint): New data type.
13834 (MAX_BPTS, MAX_WPTS): Define.
13835 (struct arch_process_info, struct arch_lwp_info): New data types.
13836 (arm_linux_get_hwbp_cap): New function.
13837 (arm_linux_get_hw_breakpoint_count): Likewise.
13838 (arm_linux_get_hw_watchpoint_count): Likewise.
13839 (arm_linux_get_hw_watchpoint_max_length): Likewise.
13840 (arm_hwbp_control_initialize): Likewise.
13841 (arm_hwbp_control_is_enabled): Likewise.
13842 (arm_hwbp_control_is_initialized): Likewise.
13843 (arm_hwbp_control_disable): Likewise.
13844 (arm_linux_hw_breakpoint_equal): Likewise.
13845 (arm_linux_hw_point_initialize): Likewise.
13846 (struct update_registers_data): New data structure.
13847 (update_registers_callback: New function.
13848 (arm_insert_point): Likewise.
13849 (arm_remove_point): Likewise.
13850 (arm_stopped_by_watchpoint): Likewise.
13851 (arm_stopped_data_address): Likewise.
13852 (arm_new_process): Likewise.
13853 (arm_new_thread): Likewise.
13854 (arm_prepare_to_resume): Likewise.
13855 (the_low_target): Register arm_insert_point, arm_remove_point,
13856 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
13857 arm_new_thread, and arm_prepare_to_resume.
13858
13859 2011-09-15 Stan Shebs <stan@codesourcery.com>
13860
13861 * server.h (struct emit_ops): Add compare-goto fields.
13862 * tracepoint.c (gdb_agent_op_sizes): New table.
13863 (emit_eq_goto): New function.
13864 (emit_ne_goto): New function.
13865 (emit_lt_goto): New function.
13866 (emit_le_goto): New function.
13867 (emit_gt_goto): New function.
13868 (emit_ge_goto): New function.
13869 (is_goto_target): New function.
13870 (compile_bytecodes): Recognize special cases of compare-goto
13871 combinations and call specialized emitters for them.
13872 * linux-x86-low.c (amd64_emit_eq_goto): New function.
13873 (amd64_emit_ne_goto): New function.
13874 (amd64_emit_lt_goto): New function.
13875 (amd64_emit_le_goto): New function.
13876 (amd64_emit_gt_goto): New function.
13877 (amd64_emit_ge_goto): New function.
13878 (amd64_emit_ops): Add the new functions.
13879 (i386_emit_eq_goto): New function.
13880 (i386_emit_ne_goto): New function.
13881 (i386_emit_lt_goto): New function.
13882 (i386_emit_le_goto): New function.
13883 (i386_emit_gt_goto): New function.
13884 (i386_emit_ge_goto): New function.
13885 (i386_emit_ops): Add the new functions.
13886
13887 2011-09-08 Stan Shebs <stan@codesourcery.com>
13888
13889 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
13890 (i386_emit_epilogue): Restore %ebx.
13891
13892 2011-08-31 Jie Zhang <jzhang918@gmail.com>
13893
13894 * server.c (step_thread): Remove definition.
13895 (process_serial_event): Don't handle Hs.
13896 * server.h (step_thread): Remove declaration.
13897 * target.c (set_desired_inferior): Remove use of step_thread.
13898
13899 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
13900
13901 * linux-low.c: Include linux-procfs.h.
13902 (linux_attach_lwp_1): Update comments.
13903 (linux_attach): Scan for existing threads when attaching to a
13904 process that is the tgid.
13905 * Makefile.in: Update dependencies.
13906
13907 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
13908
13909 * configure.srv: Add linux-procfs.o dependencies.
13910
13911 2011-08-14 Yao Qi <yao@codesourcery.com>
13912
13913 * target.h (struct target_ops): Fix indent.
13914 * win32-low.c (win32_target_ops): Fix comment.
13915
13916 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
13917 Yao Qi <yao@codesourcery.com>
13918
13919 * Makefile.in (clean): Remove tic6x-*.c files.
13920 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
13921 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
13922 (tic6x-c64xp-linux.c): Likewise.
13923 * configure.srv: Add support for tic6x-*-uclinux.
13924 * linux-tic6x-low.c: New.
13925 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
13926
13927 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
13928 Yao Qi <yao@codesourcery.com>
13929
13930 * target.h (struct target_ops): Add read_loadmap.
13931 * linux-low.c (struct target_loadseg): New type.
13932 (struct target_loadmap): New type.
13933 (linux_read_loadmap): New function.
13934 (linux_target_ops): Add linux_read_loadmap.
13935 * server.c (handle_query): Support qXfer:fdpic:read packet.
13936 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
13937 to NULL.
13938
13939 2011-08-05 Eli Zaretskii <eliz@gnu.org>
13940
13941 * win32-low.c: Include <stdint.h>.
13942
13943 2011-07-22 Pedro Alves <pedro@codesourcery.com>
13944
13945 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
13946 to the inferior here.
13947 (i386_remove_aligned_watchpoint): Ditto.
13948 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
13949 fit part of the watchpoint in the debug registers.
13950 (i386_update_inferior_debug_regs): New.
13951 (i386_low_insert_watchpoint): Work on a local mirror of the debug
13952 registers, and only update the inferior on success.
13953 (i386_low_remove_watchpoint): Ditto.
13954
13955 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
13956
13957 * linux-low.c (compare_ints, unique, list_threads, show_process,
13958 linux_core_of_thread): Delete.
13959 (linux_target_ops): Change linux_core_of_thread to
13960 linux_common_core_of_thread.
13961 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
13962 * utils.c (malloc_failure): Change type of argument.
13963 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
13964 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
13965 common/linux-osdata.c, common/ptid.c and common/buffer.c.
13966 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
13967 (IPA_OBJS): Add common-utils-ipa.o.
13968 (ptid_h, linux_osdata_h): New macros.
13969 (server_h): Add common/common-utils.h, common/xml-utils.h,
13970 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
13971 common/ptid.h.
13972 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
13973 ptid.o, buffer.o): New rules.
13974 (linux-low.o): Add common/linux-osdata.h as a dependency.
13975 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
13976 * configure.ac: Add AC_HEADER_DIRENT check.
13977 * config.in: Regenerate.
13978 * configure: Regenerate.
13979 * remote-utils.c (xml_escape_text): Delete.
13980 (buffer_grow, buffer_free, buffer_init, buffer_finish,
13981 buffer_xml_printf): Move to common/buffer.c.
13982 * server.c (main): Remove call to initialize_inferiors.
13983 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
13984 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
13985 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
13986 internal_error, gdb_assert, gdb_assert_fail): Delete.
13987 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
13988 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
13989 common/buffer.h.
13990 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
13991 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
13992 initialize_inferiors): Delete.
13993
13994 2011-07-20 Pedro Alves <pedro@codesourcery.com>
13995
13996 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
13997 symbol error.
13998
13999 2011-05-31 Pedro Alves <pedro@codesourcery.com>
14000
14001 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
14002 assertion.
14003 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
14004
14005 2011-05-26 Yao Qi <yao@codesourcery.com>
14006
14007 * Makefile.in (thread-db.o): Track dependence to
14008 common/gdb_thread_db.h.
14009 * thread-db.c: include gdb_thread_db.h from right place.
14010
14011 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
14012
14013 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
14014 __FILE__ and __LINE__ to internal_error.
14015
14016 2011-05-13 Doug Evans <dje@google.com>
14017
14018 * thread-db.c (try_thread_db_load_from_sdir): New function.
14019 (try_thread_db_load_from_dir): New function.
14020 (thread_db_load_search): Handle $sdir, ignore $pdir.
14021 Remove trying of system directories if search of
14022 libthread-db-search-path fails, that is now done via $sdir.
14023
14024 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
14025
14026 * server.c (handle_query): Add EnableDisableTracepoints to the list
14027 of supported features.
14028 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
14029 tracepoints.
14030 (cmd_qtenable_disable): New.
14031 (cmd_qtstart): Install tracepoints even if disabled.
14032 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
14033 receiving a QTEnable or QTDisable packet.
14034 (gdb_collect): Skip data collection if fast tracepoint is disabled.
14035 (ust_marker_to_static_tracepoint): Do not ignore disabled static
14036 tracepoints.
14037 (gdb_probe): Skip data collection if static tracepoint is disabled.
14038
14039 2011-05-10 Doug Evans <dje@google.com>
14040
14041 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
14042
14043 2011-05-04 Doug Evans <dje@google.com>
14044
14045 * linux-low.c (linux_join): Skip process lookup.
14046 * spu-low.c (spu_join): Ditto.
14047 * server.c (join_inferiors_callback): Delete.
14048 (process_serial_event): For 'D' packet (detach) call join_inferior
14049 directly.
14050
14051 2011-05-04 Joseph Myers <joseph@codesourcery.com>
14052
14053 * README: Don't mention xscale*-*-linux*.
14054 * configure.srv (xscale*-*-linux*): Don't handle target.
14055
14056 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
14057
14058 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
14059 casting pointers.
14060 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
14061 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
14062 (i386_emit_void_call_2): Likewise.
14063
14064 2011-04-26 Yao Qi <yao@codesourcery.com>
14065
14066 * linux-low.c: Move common macros to linux-ptrace.h.
14067 Include linux-ptrace.h.
14068 * Makefile.in (linux_ptrace_h): New.
14069 (linux-low.o): Depends on linux-ptrace.h.
14070
14071 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
14072
14073 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
14074 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
14075 (remote_prepare): New function with most of the TCP code from ...
14076 (remote_open): ... here. Detect PORT here unconditionally. Move also
14077 setting transport_is_reliable.
14078 * server.c (run_once): New variable.
14079 (gdbserver_usage): Document it.
14080 (main): Set run_once for `--once'. Call remote_prepare. Exit after
14081 the first run if RUN_ONCE.
14082 * server.h (run_once, remote_prepare): New declarations.
14083
14084 2011-04-19 Tom Tromey <tromey@redhat.com>
14085
14086 * win32-low.c (handle_load_dll): Remove duplicate "the".
14087
14088 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
14089
14090 Remove support for old Cygwin 1.5 versions.
14091 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
14092 function to avoid warning.
14093 (win32_add_one_solib): Use cygwin_conv_path function to avoid
14094 warning.
14095
14096 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
14097
14098 * gdbserver/server.h (Macro _): Define it if not available.
14099
14100 2011-03-14 Michael Snyder <msnyder@vmware.com>
14101
14102 * hostio.c (handle_close): Remove unnecessary null test.
14103
14104 2011-03-10 Joel Brobecker <brobecker@adacore.com>
14105
14106 * Makefile.in (maintainer-clean realclean distclean): Remove
14107 "make ... subdir_do" command.
14108
14109 2011-03-10 Michael Snyder <msnyder@vmware.com>
14110
14111 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
14112
14113 * server.c (handle_v_run): Free alloced buffer on early return.
14114
14115 2011-03-09 Yao Qi <yao@codesourcery.com>
14116
14117 Revert:
14118 2011-03-04 Yao Qi <yao@codesourcery.com>
14119
14120 * Makefile.in: Remove GNU make feature --directory.
14121
14122 2011-03-05 Yao Qi <yao@codesourcery.com>
14123
14124 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
14125 (subdir_do): New make target. Copied from gdb/Makefile.
14126 (maintainer-clean, realclean, distclean, clean): Call corresponding
14127 make targets in common/Makefile.
14128
14129 2011-02-11 Yao Qi <yao@codesourcery.com>
14130
14131 * configure.ac: Call AC_PROG_RANLIB.
14132 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
14133 * configure: Regenerate.
14134
14135 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
14136
14137 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
14138
14139 2011-03-06 Yao Qi <yao@codesourcery.com>
14140
14141 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
14142
14143 2011-03-05 Yao Qi <yao@codesourcery.com>
14144
14145 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
14146 (subdir_do): New make target. Copied from gdb/Makefile.
14147 (maintainer-clean, realclean, distclean, clean): Call corresponding
14148 make targets in common/Makefile.
14149
14150 2011-03-04 Yao Qi <yao@codesourcery.com>
14151
14152 * Makefile.in: Remove GNU make feature --directory.
14153
14154 2011-03-04 Michael Snyder <msnyder@vmware.com>
14155
14156 * server.c (queue_stop_reply): Call xmalloc not malloc.
14157
14158 2011-03-02 Michael Snyder <msnyder@vmware.com>
14159
14160 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
14161
14162 2011-02-28 Michael Snyder <msnyder@vmware.com>
14163
14164 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
14165 (cmd_qtframe): Ditto.
14166 (cmd_qtbuffer): Ditto.
14167 (cmd_bigqtbuffer): Ditto.
14168
14169 * utils.c (decimal2str): Initialize 'width' to nine, then
14170 don't mess with it.
14171
14172 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14173
14174 * hostio.c (require_data): Free *data, not data.
14175
14176 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14177
14178 * hostio.c (require_data): Use free, not xfree.
14179
14180 2011-02-27 Michael Snyder <msnyder@vmware.com>
14181
14182 * server.c (handle_query): Discard unused value.
14183
14184 * hostio.c (require_data): Free malloc memory before returning
14185 error.
14186
14187 2011-02-26 Michael Snyder <msnyder@vmware.com>
14188
14189 * linux-low.c (list_threads): Call closedir for dirent.
14190
14191 2011-02-27 Michael Snyder <msnyder@vmware.com>
14192
14193 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
14194 a case statement falls through.
14195
14196 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
14197
14198 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
14199 in comparison.
14200
14201 2011-02-26 Michael Snyder <msnyder@vmware.com>
14202
14203 * utils.c (decimal2str): Eliminate dead code and dead param.
14204 (pulongest): Drop dead param from call to decimal2str.
14205 (plongest): Ditto.
14206
14207 2011-02-24 Joel Brobecker <brobecker@adacore.com>
14208
14209 Revert the following patch (not approved yet):
14210 2011-02-21 Hui Zhu <teawater@gmail.com>
14211 * tracepoint.c (tp_printf): New function.
14212 (eval_agent_expr): Handle gdb_agent_op_printf.
14213
14214 2011-02-21 Hui Zhu <teawater@gmail.com>
14215
14216 * tracepoint.c (tp_printf): New function.
14217 (eval_agent_expr): Handle gdb_agent_op_printf.
14218
14219 2011-02-18 Tom Tromey <tromey@redhat.com>
14220
14221 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
14222 (tracepoint.o): Likewise.
14223 * tracepoint.c (enum gdb_agent_op): Use ax.def.
14224 (gdb_agent_op_names): Likewise.
14225
14226 2011-02-18 Tom Tromey <tromey@redhat.com>
14227
14228 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
14229 gdb_agent_op_rot>: New constants.
14230 (gdb_agent_op_names): Add pick and roll.
14231 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
14232 cases.
14233
14234 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
14235
14236 * aclocal.m4: Regenerated with aclocal-1.11.1.
14237
14238 2011-02-14 Pedro Alves <pedro@codesourcery.com>
14239
14240 * server.c (handle_qxfer_traceframe_info): New.
14241 (qxfer_packets): Register "traceframe-info".
14242 (handle_query): Report support for qXfer:traceframe-info:read+.
14243 * tracepoint.c (match_blocktype): New.
14244 (traceframe_find_block_type): Rename to ...
14245 (traceframe_walk_blocks): ... this. Add callback filter argument,
14246 and use it.
14247 (traceframe_find_block_type): New, reimplemented on top of
14248 traceframe_walk_blocks.
14249 (build_traceframe_info_xml): New.
14250 (traceframe_read_info): New.
14251 * server.h (traceframe_read_info): Declare.
14252
14253 2011-02-11 Yao Qi <yao@codesourcery.com>
14254
14255 * configure.ac: Call AC_PROG_RANLIB.
14256 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
14257 * configure: Regenerate.
14258
14259 2011-02-07 Pedro Alves <pedro@codesourcery.com>
14260
14261 * server.c (gdb_read_memory): Change return semantics to allow
14262 partial transfers.
14263 (handle_search_memory_1): Adjust.
14264 (process_serial_event) <'m' packet>: Handle partial transfers.
14265 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
14266
14267 2011-01-28 Pedro Alves <pedro@codesourcery.com>
14268
14269 * regcache.c (init_register_cache): Initialize
14270 regcache->register_status.
14271 (free_register_cache): Release regcache->register_status.
14272 (regcache_cpy): Copy register_status.
14273 (registers_to_string): Print 'x's for unavailable registers.
14274 (supply_register): Mark the register's status valid or
14275 unavailable, depending on whether a buffer was passed in or not.
14276 (supply_register_zeroed): New.
14277 (supply_regblock): Mark the registers' status valid or
14278 unavailable, depending on whether a buffer was passed in or not.
14279 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
14280 (struct regcache): New `register_status' field.
14281 (supply_register_zeroed): Declare.
14282 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
14283 supply_register_zeroed, rather than passing a NULL buffer to
14284 supply_register.
14285 * tracepoint.c (fetch_traceframe_registers): Update comment.
14286
14287 2011-01-28 Pedro Alves <pedro@codesourcery.com>
14288
14289 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
14290 buffer explicit.
14291
14292 2011-01-25 Pedro Alves <pedro@codesourcery.com>
14293
14294 * server.h (decode_xfer_write): Change prototype.
14295 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
14296 and don't extract the annex here.
14297 * server.c (decode_xfer_read): Remove `annex' parameter,
14298 and don't extract the annex here.
14299 (decode_xfer): New.
14300 (struct qxfer): New.
14301 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
14302 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
14303 (handle_qxfer_statictrace): New functions, abstracted out from
14304 handle_query, and made to use the struct qxfer interface.
14305 (handle_threads_qxfer_proper): Rename to ...
14306 (handle_qxfer_threads_proper): ... this.
14307 (handle_threads_qxfer): Rename to ...
14308 (handle_qxfer_threads): ... this. Adjust.
14309 (qxfer_packets): New array.
14310 (handle_qxfer): New function.
14311 (handle_query): Use handle_qxfer.
14312
14313 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
14314
14315 * gdbreplay.c: Shorten lines of >= 80 columns.
14316 * linux-low.c: Ditto.
14317 * linux-ppc-low.c: Ditto.
14318 * linux-s390-low.c: Ditto.
14319 * linux-sparc-low.c: Ditto.
14320 * linux-x86-low.c: Ditto.
14321 * linux-xtensa-low.c: Ditto.
14322 * mem-break.c: Ditto.
14323 * nto-low.c: Ditto.
14324 * regcache.h: Ditto.
14325 * remote-utils.c: Ditto.
14326 * server.c: Ditto.
14327 * server.h: Ditto.
14328 * thread-db.c: Ditto.
14329 * tracepoint.c: Ditto.
14330 * utils.c: Ditto.
14331 * win32-low.h: Ditto.
14332
14333 2011-01-05 Joel Brobecker <brobecker@adacore.com>
14334
14335 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
14336 update.
14337
14338 2011-01-01 Joel Brobecker <brobecker@adacore.com>
14339
14340 * server.c (gdbserver_version): Update copyright year in version
14341 output.
14342 * gdbreplay.c (gdbreplay_version): Ditto.
14343
14344 2010-12-29 Jie Zhang <jie.zhang@analog.com>
14345
14346 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
14347 * linux-bfin-low.c: New file.
14348 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
14349 PT_DATA_ADDR for BFIN targets.
14350 * Makefile.in (SFILES): Add linux-bfin-low.c.
14351 (clean): Remove reg-bfin.c.
14352 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
14353 * README: Mention supported Blackfin targets.
14354
14355 2010-12-23 Mike Frysinger <vapier@gentoo.org>
14356
14357 * .gitignore: New file.
14358
14359 2010-11-16 Mike Frysinger <vapier@gentoo.org>
14360
14361 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
14362
14363 2010-10-22 Jie Zhang <jie@codesourcery.com>
14364
14365 * Makefile.in: Add FLAGS_TO_PASS variable.
14366 (install): Remove dependency of install-only and recursively
14367 invoke make for install-only.
14368
14369 2010-10-04 Doug Evans <dje@google.com>
14370
14371 * Makefile.in (uninstall): Use $(DESTDIR).
14372
14373 2010-09-24 Pedro Alves <pedro@codesourcery.com>
14374
14375 PR gdb/11842
14376
14377 * linux-x86-low.c (compat_siginfo_from_siginfo)
14378 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
14379 si_code is < 0. Check for si_code == SI_TIMER before checking for
14380 si_code < 0.
14381
14382 2010-09-13 Joel Brobecker <brobecker@adacore.com>
14383
14384 * lynx-i386-low.c: New file.
14385 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
14386
14387 2010-09-13 Joel Brobecker <brobecker@adacore.com>
14388
14389 * lynx-low.c (ptrace_request_to_str): Remove handling for
14390 request values that have been removed in LynxOS 5.x.
14391
14392 2010-09-13 Joel Brobecker <brobecker@adacore.com>
14393
14394 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
14395 <ptrace.h>
14396
14397 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
14398
14399 * configure.ac: Add --enable-inprocess-agent option.
14400 * configure: Rebuilt.
14401
14402 2010-09-06 Yao Qi <yao@codesourcery.com>
14403
14404 * linux-low.c (linux_kill): Remove unused variable.
14405 (linux_stabilize_threads): Likewise.
14406 * server.c (start_inferior): Likewise.
14407 (queue_stop_reply_callback): Likewise.
14408 * tracepoint.c (do_action_at_tracepoint): Likewise.
14409
14410 2010-09-06 Yao Qi <yao@codesourcery.com>
14411
14412 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
14413 on return.
14414
14415 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
14416
14417 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
14418
14419 2010-09-06 Pedro Alves <pedro@codesourcery.com>
14420
14421 * Makefile.in (install-only): Replace $IPA_DEPFILES with
14422 "$(IPA_DEPFILES)".
14423
14424 2010-09-01 Joel Brobecker <brobecker@adacore.com>
14425
14426 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
14427 gdbserver/lynx-ppc-low.c: New files.
14428 * Makefile.in (lynx_low_h): New variable.
14429 (lynx-low.o, lynx-ppc-low.o): New rules.
14430 * configure.ac: On LynxOS, link with -lnetinet.
14431 * configure.srv: Add handling of powerpc-*-lynxos* targets.
14432 * configure: regenerate.
14433
14434 2010-09-01 Joel Brobecker <brobecker@adacore.com>
14435
14436 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
14437 * configure.ac: Add check for vasprintf and vsnprintf.
14438 * configure, config.in: Regenerate.
14439 * server.h (vasprintf, vsnprintf): Add conditional declarations.
14440
14441 2010-09-01 Joel Brobecker <brobecker@adacore.com>
14442
14443 * gdbreplay.c: Move include of alloca.h up, next to include of
14444 malloc.h.
14445 * server.h: Add include of malloc.h.
14446 * mem-break.c: Remove include of malloc.h.
14447 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
14448
14449 2010-09-01 Joel Brobecker <brobecker@adacore.com>
14450
14451 * Makefile.in (memmem.o): Build with -Wno-error.
14452
14453 2010-09-01 Joel Brobecker <brobecker@adacore.com>
14454
14455 * utils.c (xsnprintf): Make non-static.
14456 * server.h: Add xsnprintf declaration.
14457 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
14458 replace calls to snprintf by calls to xsnprintf throughout.
14459
14460 2010-09-01 Joel Brobecker <brobecker@adacore.com>
14461
14462 * configure.ac: Add configure check for alloca.
14463 * configure, config.in: Regenerate.
14464 * server.h: Include alloca.h if it exists.
14465 * gdbreplay.c: Include alloca.h if it exists.
14466
14467 2010-08-28 Pedro Alves <pedro@codesourcery.com>
14468
14469 * linux-low.c (__SIGRTMIN): Define if not already defined.
14470 (linux_create_inferior): Check for __ANDROID__ rather than
14471 __SIGRTMIN.
14472 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
14473 are already deferred.
14474 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
14475 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
14476 stopped and already has a pending signal to report.
14477 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
14478 a pending signal to report or is moving out of a jump pad.
14479 (linux_init_signals): Check for __ANDROID__ rather than
14480 __SIGRTMIN.
14481
14482 2010-08-28 Pedro Alves <pedro@codesourcery.com>
14483
14484 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
14485 debug_threads check. Avoid a linear search when not doing debug
14486 output.
14487
14488 2010-08-27 Pedro Alves <pedro@codesourcery.com>
14489
14490 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
14491 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
14492 (struct file_handler) <fd>: Change type to gdb_fildes_t.
14493 (process_event): Change local fd's type to gdb_fildes_t.
14494 (create_file_handler): Adjust prototype.
14495 (delete_file_handler): Adjust prototype.
14496 (handle_file_event): Adjust prototype. Use pfildes.
14497 (create_file_event): Adjsut prototype.
14498 * remote-utils.c (remote_desc, listen_desc): Change type to
14499 gdb_fildes_t.
14500 * server.h: New gdb_fildes_t typedef.
14501 [USE_WIN32API]: Include winsock2.h.
14502 (delete_file_handler, add_file_handler): Adjust prototypes.
14503 (pfildes): Declare.
14504 * utils.c (pfildes): New.
14505
14506 2010-08-27 Pedro Alves <pedro@codesourcery.com>
14507
14508 * configure.ac (build_warnings): Add -Wno-char-subscripts.
14509 * configure: Regenerate.
14510
14511 2010-08-27 Pedro Alves <pedro@codesourcery.com>
14512
14513 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
14514 (linux_done_accessing_memory): ... this.
14515 (linux_target_ops): Adjust.
14516 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
14517 * nto-low.c (nto_target_ops): Adjust comment.
14518 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
14519 * spu-low.c (spu_target_ops): Adjust comment.
14520 * target.h (target_ops): Rename unprepare_to_access_memory field
14521 to done_accessing_memory.
14522 (unprepare_to_access_memory): Rename to ...
14523 (done_accessing_memory): ... this.
14524
14525 2010-08-26 Pedro Alves <pedro@codesourcery.com>
14526
14527 * linux-low.c (linux_prepare_to_access_memory): New.
14528 (linux_unprepare_to_access_memory): New.
14529 (linux_target_ops): Install them.
14530 * server.c (read_memory): Rename to ...
14531 (gdb_read_memory): ... this. Use
14532 prepare_to_access_memory/prepare_to_access_memory.
14533 (write_memory): Rename to ...
14534 (gdb_write_memory): ... this. Use
14535 prepare_to_access_memory/prepare_to_access_memory.
14536 (handle_search_memory_1): Adjust.
14537 (process_serial_event): Adjust.
14538 * target.h (struct target_ops): New fields
14539 prepare_to_access_memory and unprepare_to_access_memory.
14540 (prepare_to_access_memory, unprepare_to_access_memory): New.
14541 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
14542 prepare_to_access_memory/prepare_to_access_memory.
14543 * nto-low.c (nto_target_ops): Adjust.
14544 * spu-low.c (spu_target_ops): Adjust.
14545 * win32-low.c (win32_target_ops): Adjust.
14546
14547 2010-08-26 Pedro Alves <pedro@codesourcery.com>
14548
14549 * Makefile.in (WARN_CFLAGS): Get it from configure.
14550 (WERROR_CFLAGS): New.
14551 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
14552 * configure.ac: Introduce --enable-werror, which adds -Werror to
14553 the compiler command line. Enabled by default. Disable with
14554 --disable-werror. Add -Wdeclaration-after-statement
14555 Wpointer-arith and -Wformat-nonliteral to warning flags.
14556 * configure: Regenerate.
14557
14558 2010-08-26 Pedro Alves <pedro@codesourcery.com>
14559
14560 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
14561
14562 2010-08-26 Pedro Alves <pedro@codesourcery.com>
14563
14564 * gdbreplay.c (remote_error): New.
14565 (gdbchar): New.
14566 (expect): Use gdbchar. Check for error reading from GDB.
14567 Clarify sync error output.
14568 (play): Check for errors writing to GDB.
14569 * linux-low.c (sigchld_handler): Really ignore `write' errors.
14570 * remote-utils.c (getpkt): Check for errors writing to the remote
14571 descriptor.
14572
14573 2010-08-25 Pedro Alves <pedro@codesourcery.com>
14574
14575 * linux-low.c (linux_wait_1): Move non-debugging code out of
14576 `debug_threads' control.
14577
14578 2010-08-25 Pedro Alves <pedro@codesourcery.com>
14579
14580 * linux-low.c (linux_wait_1): Don't set last_status here.
14581 * server.c (push_event, queue_stop_reply_callback): Assert we're
14582 not pushing a TARGET_WAITKIND_IGNORE event.
14583 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
14584 (myresume, handle_target_event): Set the thread's last_resume_kind
14585 and last_status from the target returned status.
14586
14587 2010-08-25 Pedro Alves <pedro@codesourcery.com>
14588
14589 PR threads/10729
14590
14591 * linux-x86-low.c (update_debug_registers_callback): New.
14592 (i386_dr_low_set_addr): Use it.
14593 (i386_dr_low_get_addr): New.
14594 (i386_dr_low_set_control): Use update_debug_registers_callback.
14595 (i386_dr_low_get_control): New.
14596 (i386_dr_low_get_status): Adjust.
14597 * linux-low.c (linux_stop_lwp): New.
14598 * linux-low.h (linux_stop_lwp): Declare.
14599
14600 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
14601 argument instead of a i386_debug_reg_state.
14602 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
14603 a i386_debug_reg_state.
14604 (i386_insert_aligned_watchpoint): Adjust.
14605 (i386_remove_aligned_watchpoint): Adjust.
14606 (i386_low_stopped_data_address): Read the debug registers from the
14607 inferior instead of from the mirrors.
14608 * i386-low.h (struct i386_debug_reg_state): Extend comment.
14609 (i386_dr_low_get_addr): Declare.
14610 (i386_dr_low_get_control): Declare.
14611 (i386_dr_low_get_status): Change prototype.
14612
14613 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
14614 (i386_dr_low_get_addr): New.
14615 (i386_dr_low_get_control): New.
14616 (i386_dr_low_get_status): Adjust prototype. Return
14617 dr_status_mirror.
14618 (i386_initial_stuff): Clear dr_status_mirror and
14619 dr_control_mirror.
14620 (i386_get_thread_context): Adjust.
14621 (i386_set_thread_context): Adjust.
14622 (i386_thread_added): Adjust.
14623
14624 2010-08-24 Pedro Alves <pedro@codesourcery.com>
14625
14626 * linux-low.h (linux_thread_area): Delete declaration.
14627
14628 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
14629
14630 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
14631 after its termination.
14632
14633 2010-08-09 Pedro Alves <pedro@codesourcery.com>
14634
14635 * linux-low.c (gdb_wants_lwp_stopped): Delete.
14636 (gdb_wants_all_stopped): Delete.
14637 (linux_wait_1): Don't call them.
14638 * server.c (handle_v_cont): Tag all threads as want-stopped.
14639 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
14640 stopped as "client-wants-stopped".
14641
14642 2010-07-31 Pedro Alves <pedro@codesourcery.com>
14643
14644 * Makefile.in (signals_h): New.
14645 (server_h): Depend on it.
14646 (server.o): Don't depend on $(signals_def).
14647 (signals.o): Depend on $(signals_def).
14648
14649 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
14650
14651 * Makefile.in (signals_def): New.
14652 (server_h): Append include/gdb/signals.h and signals_def.
14653 (server.o): Append signals_def.
14654
14655 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
14656
14657 * server.c (handle_target_event): Use target_signal_to_host for
14658 resume_info.sig initialization.
14659 * target.h (struct thread_resume) <sig>: New comment.
14660
14661 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
14662
14663 * server.c (handle_query): strcpy() the returned string from paddress()
14664 instead of sprintf().
14665 * utils.c (paddress): Return phex_nz().
14666
14667 2010-07-07 Joel Brobecker <brobecker@adacore.com>
14668
14669 * server.c (handle_v_cont): Call mourn_inferior if process
14670 just exited.
14671 (myresume): Likewise.
14672
14673 2010-07-01 Pedro Alves <pedro@codesourcery.com>
14674
14675 Static tracepoints, and integration with UST.
14676
14677 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
14678 * mem-break.c (uninsert_all_breakpoints)
14679 (reinsert_all_breakpoints): New.
14680 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
14681 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
14682 (gdb_agent_ust_loaded, helper_thread_id)
14683 (gdb_agent_helper_thread_id): New macros.
14684 (struct ipa_sym_addresses): Add addr_ust_loaded,
14685 addr_helper_thread_id, addr_cmd_buf.
14686 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
14687 (in_process_agent_loaded_ust): New.
14688 (write_e_ust_not_loaded): New.
14689 (maybe_write_ipa_ust_not_loaded): New.
14690 (struct collect_static_trace_data_action): New.
14691 (enum tracepoint_type) <static_tracepoint>: New.
14692 (struct tracepoint) <handle>: Mention static tracepoints.
14693 (struct static_tracepoint_ctx): New.
14694 (CMD_BUF_SIZE): New.
14695 (add_tracepoint_action): Handle static tracepoint actions.
14696 (unprobe_marker_at): New.
14697 (clear_installed_tracepoints): Handle static tracepoints.
14698 (cmd_qtdp): Handle static tracepoints.
14699 (probe_marker_at): New.
14700 (cmd_qtstart): Handle static tracepoints.
14701 (response_tracepoint): Handle static tracepoints.
14702 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
14703 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
14704 (get_context_regcache): Handle static tracepoints.
14705 (do_action_at_tracepoint): Handle static tracepoint actions.
14706 (traceframe_find_block_type): Handle static trace data blocks.
14707 (traceframe_read_sdata): New.
14708 (download_tracepoints): Download static tracepoint actions.
14709 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
14710 (GDB_PROBE_NAME): New.
14711 (ust_ops): New.
14712 (GET_UST_SYM): New.
14713 (USTF): New.
14714 (dlsym_ust): New.
14715 (ust_marker_to_static_tracepoint): New.
14716 (gdb_probe): New.
14717 (collect_ust_data_at_tracepoint): New.
14718 (gdb_ust_probe): New.
14719 (UNIX_PATH_MAX, SOCK_DIR): New.
14720 (gdb_ust_connect_sync_socket): New.
14721 (resume_thread, stop_thread): New.
14722 (run_inferior_command): New.
14723 (init_named_socket): New.
14724 (gdb_ust_socket_init): New.
14725 (cstr_to_hexstr): New.
14726 (next_st): New.
14727 (first_marker, next_marker): New.
14728 (response_ust_marker): New.
14729 (cmd_qtfstm, cmd_qtsstm): New.
14730 (unprobe_marker_at, probe_marker_at): New.
14731 (cmd_qtstmat, gdb_ust_thread): New.
14732 (gdb_ust_init): New.
14733 (initialize_tracepoint_ftlib): Call gdb_ust_init.
14734 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
14735 (ST_REGENTRY): New.
14736 (x86_64_st_collect_regmap): New.
14737 (X86_64_NUM_ST_COLLECT_GREGS): New.
14738 (AMD64_RIP_REGNUM): New.
14739 (supply_static_tracepoint_registers): New.
14740 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
14741 (ST_REGENTRY): New.
14742 (i386_st_collect_regmap): New.
14743 (i386_NUM_ST_COLLECT_GREGS): New.
14744 (supply_static_tracepoint_registers): New.
14745 * server.c (handle_query): Handle qXfer:statictrace:read.
14746 <qSupported>: Report support for StaticTracepoints, and
14747 qXfer:statictrace:read features.
14748 * server.h (traceframe_read_sdata)
14749 (supply_static_tracepoint_registers): Declare.
14750 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
14751 (unpack_varlen_hex): Include in IPA build.
14752 * Makefile.in (ustlibs, ustinc): New.
14753 (IPA_OBJS): Add remote-utils-ipa.o.
14754 ($(IPA_LIB)): Link -ldl and -lpthread.
14755 (UST_CFLAGS): New.
14756 (IPAGENT_CFLAGS): Add UST_CFLAGS.
14757 * config.in, configure: Regenerate.
14758
14759 2010-06-20 Ian Lance Taylor <iant@google.com>
14760 Pedro Alves <pedro@codesourcery.com>
14761
14762 * linux-x86-low.c (always_true): Delete.
14763 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
14764 trying to fool the compiler with always_true.
14765
14766 2010-06-20 Pedro Alves <pedro@codesourcery.com>
14767
14768 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
14769 conditions in gdbserver.
14770
14771 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
14772
14773 * spu-low.c (spu_read_memory): Wrap around local store limit.
14774 (spu_write_memory): Likewise.
14775
14776 2010-06-15 Pedro Alves <pedro@codesourcery.com>
14777
14778 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
14779 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
14780 LONGEST uses.
14781 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
14782 uses.
14783 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
14784 uses with LONGEST uses.
14785
14786 2010-06-14 Stan Shebs <stan@codesourcery.com>
14787 Pedro Alves <pedro@codesourcery.com>
14788
14789 Bytecode compiler.
14790
14791 * linux-x86-low.c: Include limits.h.
14792 (add_insns): New.
14793 (always_true): New.
14794 (EMIT_ASM): New.
14795 (EMIT_ASM32): New.
14796 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
14797 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
14798 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
14799 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
14800 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
14801 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
14802 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
14803 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
14804 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
14805 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
14806 (amd64_emit_void_call_2): New.
14807 (amd64_emit_ops): New.
14808 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
14809 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
14810 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
14811 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
14812 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
14813 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
14814 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
14815 (i386_emit_call, i386_emit_reg, i386_emit_pop)
14816 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
14817 (i386_emit_stack_adjust, i386_emit_int_call_1)
14818 (i386_emit_void_call_2): New.
14819 (i386_emit_ops): New.
14820 (x86_emit_ops): New.
14821 (the_low_target): Install x86_emit_ops.
14822 * server.h (struct emit_ops): New.
14823 (get_raw_reg_func_addr): Declare.
14824 (current_insn_ptr, emit_error): Declare.
14825 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
14826 (set_trace_state_variable_value): New defines.
14827 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
14828 addr_get_trace_state_variable_value and
14829 addr_set_trace_state_variable_value.
14830 (symbol_list): New fields for get_raw_reg,
14831 get_trace_state_variable_value and set_trace_state_variable_value.
14832 (condfn): New typedef.
14833 (struct tracepoint): New field `compiled_cond'.
14834 (do_action_at_tracepoint): Clear compiled_cond.
14835 (get_trace_state_variable_value, set_trace_state_variable_value):
14836 Export in the IPA.
14837 (condition_true_at_tracepoint): If there's a compiled condition,
14838 run that.
14839 (current_insn_ptr, emit_error): New globals.
14840 (struct bytecode_address): New.
14841 (get_raw_reg_func_addr): New.
14842 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
14843 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
14844 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
14845 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
14846 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
14847 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
14848 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
14849 (compile_tracepoint_condition, compile_bytecodes): New.
14850 * target.h (emit_ops): Forward declare.
14851 (struct target_ops): New field emit_ops.
14852 (target_emit_ops): New.
14853 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
14854 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
14855 * linux-low.c (linux_emit_ops): New.
14856 (linux_target_ops): Install it.
14857 * linux-low.h (struct linux_target_ops): New field emit_ops.
14858
14859 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
14860
14861 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
14862 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
14863
14864 2010-06-01 Pedro Alves <pedro@codesourcery.com>
14865 Stan Shebs <stan@codesourcery.com>
14866
14867 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
14868 (all): Depend on $(extra_libraries).
14869 (install-only): Install the IPA.
14870 (IPA_OBJS, IPA_LIB): New.
14871 (clean): Remove the IPA lib.
14872 (IPAGENT_CFLAGS): New.
14873 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
14874 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
14875 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
14876 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
14877 * configure.ac: Check for atomic builtins support in the compiler.
14878 (IPA_DEPFILES, extra_libraries): Define.
14879 * configure.srv (ipa_obj): Add description.
14880 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
14881 (i[34567]86-*-linux*): Set ipa_obj.
14882 (x86_64-*-linux*): Set ipa_obj.
14883 * linux-low.c (stabilizing_threads): New.
14884 (supports_fast_tracepoints): New.
14885 (linux_detach): Stabilize threads before detaching.
14886 (handle_tracepoints): Handle internal tracing breakpoints. Assert
14887 the lwp is either not stabilizing, or is moving out of a jump pad.
14888 (linux_fast_tracepoint_collecting): New.
14889 (maybe_move_out_of_jump_pad): New.
14890 (enqueue_one_deferred_signal): New.
14891 (dequeue_one_deferred_signal): New.
14892 (linux_wait_for_event_1): If moving out of a jump pad, defer
14893 pending signals to later.
14894 (linux_stabilize_threads): New.
14895 (linux_wait_1): Check if threads need moving out of jump pads, and
14896 do it if so.
14897 (stuck_in_jump_pad_callback): New.
14898 (move_out_of_jump_pad_callback): New.
14899 (lwp_running): New.
14900 (linux_resume_one_lwp): Handle moving out of jump pads.
14901 (linux_set_resume_request): Dequeue deferred signals.
14902 (need_step_over_p): Also step over fast tracepoint jumps.
14903 (start_step_over): Also uninsert fast tracepoint jumps.
14904 (finish_step_over): Also reinsert fast tracepoint jumps.
14905 (linux_install_fast_tracepoint_jump): New.
14906 (linux_target_ops): Install linux_stabilize_threads and
14907 linux_install_fast_tracepoint_jump_pad.
14908 * linux-low.h (linux_target_ops) <get_thread_area,
14909 install_fast_tracepoint_jump_pad>: New fields.
14910 (struct lwp_info) <collecting_fast_tracepoint,
14911 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
14912 (linux_get_thread_area): Declare.
14913 * linux-x86-low.c (jump_insn): New.
14914 (x86_get_thread_area): New.
14915 (append_insns): New.
14916 (push_opcode): New.
14917 (amd64_install_fast_tracepoint_jump_pad): New.
14918 (i386_install_fast_tracepoint_jump_pad): New.
14919 (x86_install_fast_tracepoint_jump_pad): New.
14920 (the_low_target): Install x86_get_thread_area and
14921 x86_install_fast_tracepoint_jump_pad.
14922 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
14923 (struct fast_tracepoint_jump): New.
14924 (fast_tracepoint_jump_insn): New.
14925 (fast_tracepoint_jump_shadow): New.
14926 (find_fast_tracepoint_jump_at): New.
14927 (fast_tracepoint_jump_here): New.
14928 (delete_fast_tracepoint_jump): New.
14929 (set_fast_tracepoint_jump): New.
14930 (uninsert_fast_tracepoint_jumps_at): New.
14931 (reinsert_fast_tracepoint_jumps_at): New.
14932 (set_breakpoint_at): Use write_inferior_memory.
14933 (uninsert_raw_breakpoint): Use write_inferior_memory.
14934 (check_mem_read): Mask out fast tracepoint jumps.
14935 (check_mem_write): Mask out fast tracepoint jumps.
14936 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
14937 (set_fast_tracepoint_jump): Declare.
14938 (delete_fast_tracepoint_jump)
14939 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
14940 (reinsert_fast_tracepoint_jumps_at): Declare.
14941 * regcache.c: Don't compile many functions when building the
14942 in-process agent library.
14943 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
14944 the register buffer in the heap.
14945 (free_register_cache): If the register buffer isn't owned by the
14946 regcache, don't free it.
14947 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
14948 pre-existing register caches.
14949 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
14950 type.
14951 (convert_ascii_to_int): : Constify `from' parameter type.
14952 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
14953 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
14954 the needed buffer in-place.
14955 (relocate_instruction): New.
14956 * server.c (handle_query) <qSymbols>: If the target supports
14957 tracepoints, give it a chance of looking up symbols. Report
14958 support for fast tracepoints.
14959 (handle_status): Stabilize threads.
14960 (process_serial_event): Adjust.
14961 * server.h (struct fast_tracepoint_jump): Forward declare.
14962 (struct process_info) <fast_tracepoint_jumps>: New field.
14963 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
14964 (decode_X_packet, decode_M_packet): Adjust.
14965 (relocate_instruction): Declare.
14966 (in_process_agent_loaded): Declare.
14967 (tracepoint_look_up_symbols): Declare.
14968 (struct fast_tpoint_collect_status): Declare.
14969 (fast_tracepoint_collecting): Declare.
14970 (force_unlock_trace_buffer): Declare.
14971 (handle_tracepoint_bkpts): Declare.
14972 (initialize_low_tracepoint)
14973 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
14974 * target.h (struct target_ops) <stabilize_threads,
14975 install_fast_tracepoint_jump_pad>: New fields.
14976 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
14977 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
14978 [HAVE_STDINT_H]: Include stdint.h.
14979 (trace_debug_1): Rename to ...
14980 (trace_vdebug): ... this.
14981 (trace_debug): Rename to ...
14982 (trace_debug_1): ... this. Add `level' parameter.
14983 (trace_debug): New.
14984 (ATTR_USED, ATTR_NOINLINE): New.
14985 (IP_AGENT_EXPORT): New.
14986 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
14987 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
14988 (about_to_request_buffer_space, trace_buffer_is_full)
14989 (stopping_tracepoint, expr_eval_result, error_tracepoint)
14990 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
14991 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
14992 (traceframe_write_count, traceframes_created)
14993 (trace_state_variables)
14994 New renaming defines.
14995 (struct ipa_sym_addresses): New.
14996 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
14997 (symbol_list): New.
14998 (ipa_sym_addrs): New.
14999 (all_tracepoint_symbols_looked_up): New.
15000 (in_process_agent_loaded): New.
15001 (write_e_ipa_not_loaded): New.
15002 (maybe_write_ipa_not_loaded): New.
15003 (tracepoint_look_up_symbols): New.
15004 (debug_threads) [IN_PROCESS_AGENT]: New.
15005 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
15006 (UNKNOWN_SIDE_EFFECTS): New.
15007 (stop_tracing): New.
15008 (flush_trace_buffer): New.
15009 (stop_tracing_bkpt): New.
15010 (flush_trace_buffer_bkpt): New.
15011 (read_inferior_integer): New.
15012 (read_inferior_uinteger): New.
15013 (read_inferior_data_pointer): New.
15014 (write_inferior_data_pointer): New.
15015 (write_inferior_integer): New.
15016 (write_inferior_uinteger): New.
15017 (struct collect_static_trace_data_action): Delete.
15018 (enum tracepoint_type): New.
15019 (struct tracepoint) <type>: New field `type'.
15020 <actions_str, step_actions, step_actions_str>: Only include in
15021 GDBserver.
15022 <orig_size, obj_addr_on_target, adjusted_insn_addr>
15023 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
15024 (tracepoints): Use IP_AGENT_EXPORT.
15025 (last_tracepoint): Don't include in the IPA.
15026 (stopping_tracepoint): Use IP_AGENT_EXPORT.
15027 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
15028 (alloced_trace_state_variables): New.
15029 (trace_state_variables): Use IP_AGENT_EXPORT.
15030 (traceframe_t): Delete unused variable.
15031 (circular_trace_buffer): Don't include in the IPA.
15032 (trace_buffer_start): Delete.
15033 (struct trace_buffer_control): New.
15034 (trace_buffer_free): Delete.
15035 (struct ipa_trace_buffer_control): New.
15036 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
15037 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
15038 New.
15039 (trace_buffer_ctrl): New.
15040 (TRACE_BUFFER_CTRL_CURR): New.
15041 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
15042 Reimplement as macros.
15043 (trace_buffer_wrap): Delete.
15044 (traceframe_write_count, traceframe_read_count)
15045 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
15046 (struct tracepoint_hit_ctx) <type>: New field.
15047 (struct fast_tracepoint_ctx): New.
15048 (memory_barrier): New.
15049 (cmpxchg): New.
15050 (record_tracepoint_error): Update atomically in the IPA.
15051 (clear_inferior_trace_buffer): New.
15052 (about_to_request_buffer_space): New.
15053 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
15054 updating the same buffer.
15055 (add_tracepoint): Default the tracepoint's type to trap
15056 tracepoint, and orig_size to -1.
15057 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
15058 internal variables.
15059 (create_trace_state_variable): New parameter `gdb'. Handle it.
15060 (clear_installed_tracepoints): Clear fast tracepoint jumps.
15061 (cmd_qtdp): Handle fast tracepoints.
15062 (cmd_qtdv): Adjust.
15063 (max_jump_pad_size): New.
15064 (gdb_jump_pad_head): New.
15065 (get_jump_space_head): New.
15066 (claim_jump_space): New.
15067 (sort_tracepoints): New.
15068 (MAX_JUMP_SIZE): New.
15069 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
15070 IPA.
15071 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
15072 support. Upload fast traceframes, and delete internal IPA
15073 breakpoints.
15074 (stop_tracing_handler): New.
15075 (flush_trace_buffer_handler): New.
15076 (cmd_qtstop): Upload fast tracepoints.
15077 (response_tracepoint): Handle fast tracepoints.
15078 (tracepoint_finished_step): Upload fast traceframes. Set the
15079 tracepoint hit context's tracepoint type.
15080 (handle_tracepoint_bkpts): New.
15081 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
15082 type. Add comment about fast tracepoints.
15083 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
15084 non-existing action_str field.
15085 (get_context_regcache): Handle fast tracepoints.
15086 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
15087 to the regcache.
15088 (fast_tracepoint_from_jump_pad_address): New.
15089 (fast_tracepoint_from_ipa_tpoint_address): New.
15090 (collecting_t): New.
15091 (force_unlock_trace_buffer): New.
15092 (fast_tracepoint_collecting): New.
15093 (collecting): New.
15094 (gdb_collect): New.
15095 (write_inferior_data_ptr): New.
15096 (target_tp_heap): New.
15097 (target_malloc): New.
15098 (download_agent_expr): New.
15099 (UALIGN): New.
15100 (download_tracepoints): New.
15101 (download_trace_state_variables): New.
15102 (upload_fast_traceframes): New.
15103 (IPA_FIRST_TRACEFRAME): New.
15104 (IPA_NEXT_TRACEFRAME_1): New.
15105 (IPA_NEXT_TRACEFRAME): New.
15106 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
15107 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
15108 (gdb_jump_pad_buffer_end): New.
15109 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
15110 (initialize_tracepoint): Adjust.
15111 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
15112 buffer. Initialize the low module.
15113 * utils.c (PREFIX, TOOLNAME): New.
15114 (malloc_failure): Use PREFIX.
15115 (error): In the IPA, an error causes an exit.
15116 (fatal, warning): Use PREFIX.
15117 (internal_error): Use TOOLNAME.
15118 (NUMCELLS): Increase to 10.
15119 * configure, config.in: Regenerate.
15120
15121 2010-06-01 Pedro Alves <pedro@codesourcery.com>
15122
15123 * server.c (handle_query) <qSupported>: Do two passes over the
15124 qSupported string to avoid nesting strtok.
15125
15126 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
15127
15128 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
15129 (CDEPS): New.
15130 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
15131 -Wl,--dynamic-list.
15132 * configure: Regenerate.
15133 * proc-service.list: New.
15134
15135 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
15136
15137 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
15138 New comment.
15139
15140 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
15141
15142 * gdbreplay.c (remote_open): Check error return from socket() call by
15143 its equality to -1 not by it being negative.
15144 * remote-utils.c (remote_open): Likewise.
15145
15146 2010-05-23 Pedro Alves <pedro@codesourcery.com>
15147
15148 * config.h: Regenerate.
15149
15150 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
15151
15152 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
15153 doesn't provide PTRACE_GET_THREAD_AREA.
15154
15155 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
15156
15157 * linux-m68k-low.c: Include <asm/ptrace.h>
15158 (ps_get_thread_area): Implement.
15159
15160 2010-05-03 Doug Evans <dje@google.com>
15161
15162 * event-loop.c (struct callback_event): New struct.
15163 (callback_list): New global.
15164 (append_callback_event, delete_callback_event): New functions.
15165 (process_callback): New function.
15166 (start_event_loop): Call it.
15167 * remote-utils.c (NOT_SCHEDULED): Define.
15168 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
15169 moved out of readchar.
15170 (readchar): Rewrite. Call reschedule before returning.
15171 (reset_readchar): New function.
15172 (remote_close): Call it.
15173 (process_remaining, reschedule): New functions.
15174 * server.h (callback_handler_func): New typedef.
15175 (append_callback_event, delete_callback_event): Declare.
15176
15177 2010-05-03 Pedro Alves <pedro@codesourcery.com>
15178
15179 * proc-service.c (ps_pglobal_lookup): Use
15180 thread_db_look_up_one_symbol.
15181 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
15182 parameter. Use it instead of all_symbols_looked_up.
15183 * server.h (struct process_info) <all_symbols_looked_up>: Delete
15184 field.
15185 (all_symbols_looked_up): Don't declare.
15186 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
15187 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
15188 field.
15189 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
15190 Set all_symbols_looked_up here.
15191 (thread_db_look_up_one_symbol): New.
15192 (thread_db_get_tls_address): Adjust.
15193 (thread_db_load_search, try_thread_db_load_1): Always allocate the
15194 thread_db object on the heap, and tentatively set it in the
15195 process structure.
15196 (thread_db_init): Don't set all_symbols_looked_up here.
15197 * linux-low.h (thread_db_look_up_one_symbol): Declare.
15198
15199 2010-05-03 Pedro Alves <pedro@codesourcery.com>
15200
15201 * linux-low.c (linux_kill, linux_detach): Adjust.
15202 (status_pending_p_callback): Remove redundant statement. Check
15203 for !TARGET_WAITIKIND_IGNORE, instead of
15204 TARGET_WAITKIND_STOPPED.
15205 (handle_tracepoints): Make sure LWP is locked. Adjust.
15206 (linux_wait_for_event_1): Adjust.
15207 (linux_cancel_breakpoints): New.
15208 (unsuspend_one_lwp): New.
15209 (unsuspend_all_lwps): New.
15210 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
15211 (send_sigstop_callback): Change return type to int, add new
15212 `except' parameter and handle it.
15213 (suspend_and_send_sigstop_callback): New.
15214 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
15215 pass them down. If SUSPEND, also increment the lwp's suspend
15216 count.
15217 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
15218 (need_step_over_p): Don't consider suspended LWPs.
15219 (start_step_over): Adjust.
15220 (proceed_one_lwp): Change return type to int, add new `except'
15221 parameter and handle it.
15222 (unsuspend_and_proceed_one_lwp): New.
15223 (proceed_all_lwps): Use find_inferior instead of
15224 for_each_inferior.
15225 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
15226 also decrement the suspend count of LWPs. Pass `except' down,
15227 instead of hacking its suspend count.
15228 (linux_pause_all): Add `freeze' parameter. Adjust.
15229 (linux_unpause_all): New.
15230 (linux_target_ops): Install linux_unpause_all.
15231 * server.c (handle_status): Adjust.
15232 * target.h (struct target_ops): New fields `unpause_all' and
15233 `cancel_breakpoints'. Add new parameter to `pause_all'.
15234 (pause_all): Add new `freeze' parameter.
15235 (unpause_all): New.
15236 (cancel_breakpoints): New.
15237 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
15238 cancel breakpoints.
15239 (cmd_qtstart): Pause threads.
15240 (stop_tracing): Pause threads, and cancel breakpoints.
15241 * win32-low.c (win32_target_ops): Adjust.
15242
15243 2010-05-03 Pedro Alves <pedro@codesourcery.com>
15244
15245 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
15246 the inferior right away from here...
15247 (linux_wait_1): ... to here, and adjust to check the thread's
15248 last_resume_kind instead of the lwp's step or stop_expected flags.
15249
15250 2010-05-02 Pedro Alves <pedro@codesourcery.com>
15251
15252 * README: Use consistent `GDB' and `GDBserver' spellings.
15253
15254 2010-05-02 Pedro Alves <pedro@codesourcery.com>
15255
15256 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
15257 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
15258 (linux_detach_one_lwp): Assume the lwp is stopped.
15259 (any_thread_of): Delete.
15260 (linux_detach): Stop all lwps here. Don't blindly delete all
15261 breakpoints.
15262 (delete_lwp_callback): New.
15263 (linux_mourn): Delete all lwps of the process that is gone.
15264 (linux_wait_1): Don't delete the last lwp of the process here.
15265 * mem-break.h (mark_breakpoints_out): Declare.
15266 * mem-break.c (mark_breakpoints_out): New.
15267 (free_all_breakpoints): Use it.
15268 * server.c (handle_target_event): If the process is gone, mark
15269 breakpoints out.
15270 * thread-db.c (struct thread_db) <create_bp>: New field.
15271 (thread_db_enable_reporting): Fix prototype. Store a thread event
15272 breakpoint reference in the thread_db struct.
15273 (thread_db_load_search): Clear the thread_db object.
15274 (try_thread_db_load_1): Ditto.
15275 (switch_to_process): New.
15276 (disable_thread_event_reporting): Use it.
15277 (remove_thread_event_breakpoints): New.
15278 (thread_db_detach, thread_db_mourn): Use it.
15279
15280 2010-05-01 Pedro Alves <pedro@codesourcery.com>
15281
15282 * linux-low.c (linux_enable_event_reporting): New.
15283 (linux_wait_for_event_1, handle_extended_wait): Use it.
15284
15285 2010-04-30 Pedro Alves <pedro@codesourcery.com>
15286
15287 * linux-low.c (linux_kill_one_lwp, linux_kill)
15288 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
15289 (send_sigstop): Take an lwp_info as parameter instead. Queue a
15290 SIGSTOP even if the LWP is stopped.
15291 (send_sigstop_callback): New.
15292 (stop_all_lwps): Use send_sigstop_callback instead.
15293 (linux_resume_one_thread): Adjust.
15294 (proceed_one_lwp): Still proceed an LWP that the client has
15295 requested to stop, if we haven't reported it as stopped yet. Make
15296 sure that LWPs the client want stopped, have a pending SIGSTOP.
15297
15298 2010-04-26 Doug Evans <dje@google.com>
15299
15300 * server.c (handle_general_set): Make static.
15301
15302 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
15303 Print received char after testing for error/eof instead of before.
15304 (input_interrupt): Tweak comment.
15305
15306 2010-04-23 Doug Evans <dje@google.com>
15307
15308 * server.c (start_inferior): Print inferior argv if --debug.
15309
15310 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
15311
15312 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
15313 * nto-x86-low.c: Include server.h
15314
15315 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
15316
15317 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
15318 be consistent with other sources of this directory.
15319 (init_registers_amd64): Correct name of source file of this function
15320 in the comment.
15321
15322 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
15323
15324 * configure.srv (x86_64-*-mingw*): New configuration for Windows
15325 64-bit executables.
15326
15327 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
15328
15329 * win32-i386-low.c: Add 64-bit support.
15330 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
15331 (init_registers_amd64): Declare.
15332 (mappings): Add 64-bit version of array.
15333 (init_windows_x86): New function.
15334 (the_low_target): Change init_arch field to init_windows_x86.
15335
15336 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
15337
15338 * win32-low.c: Adapt to support also 64-bit architecture.
15339 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
15340 (get_image_name): Use SIZE_T type for local variable `done'.
15341 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
15342 (toolhelp_get_dll_name): Idem.
15343 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
15344 Use uintptr_t typecast to avoid warning.
15345 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
15346 (handle_exception): Use phex_nz to avoid warning.
15347 (win32_wait): Remove unused local variable `process'.
15348
15349 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
15350
15351 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
15352 `amd64-avx.o'.
15353
15354 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
15355
15356 * configure.ac: Use `ws2_32' library for srv_mingw.
15357 * configure: Regenerate.
15358 * gdbreplay.c: Include winsock2.h instead of winsock.h.
15359 * remote-utils.c: Likewise.
15360
15361 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
15362
15363 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
15364 if __x86_64__ is defined.
15365
15366 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
15367
15368 * configure: Regenerate.
15369
15370 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
15371
15372 * server.c (handle_query): Handle 'qGetTIBAddr' query.
15373 * target.h (target_ops): New get_tib_address field.
15374 * win32-low.h (win32_thread_info): Add thread_local_base field.
15375 * win32-low.c (child_add_thread): Add tlb argument.
15376 Set thread_local_base field to TLB.
15377 (get_child_debug_event): Adapt to child_add_thread change.
15378 (win32_get_tib_address): New function.
15379 (win32_target_ops): Set get_tib_address field to
15380 win32_get_tib_address.
15381 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
15382
15383 2010-04-12 Pedro Alves <pedro@codesourcery.com>
15384
15385 * linux-low.c (linux_mourn): Also remove the process.
15386 * server.c (handle_target_event): Don't remove the process here.
15387 * nto-low.c (nto_mourn): New.
15388 (nto_target_ops): Install it.
15389 * spu-low.c (spu_mourn): New.
15390 (spu_target_ops): Install it.
15391 * win32-low.c (win32_mourn): New.
15392 (win32_target_ops): Install it.
15393
15394 2010-04-12 Pedro Alves <pedro@codesourcery.com>
15395
15396 * server.h (buffer_xml_printf): Remove redundant `;'.
15397
15398 2010-04-12 Pedro Alves <pedro@codesourcery.com>
15399
15400 * regcache.c (set_register_cache): Invalidate regcaches before
15401 changing the register cache layout.
15402 (regcache_invalidate_one): Allow a NULL regcache.
15403 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
15404 regcaches before changing the register cache layout or the target
15405 regsets.
15406
15407 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
15408
15409 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
15410 variable warning on Linux/x86-64.
15411
15412 2010-04-11 Pedro Alves <pedro@codesourcery.com>
15413
15414 GDBserver disconnected tracing support.
15415
15416 * linux-low.c (linux_remove_process): Delete.
15417 (add_lwp): Don't set last_resume_kind here.
15418 (linux_kill): Use `mourn'.
15419 (linux_detach): Use `thread_db_detach', and `mourn'.
15420 (linux_mourn): New.
15421 (linux_attach_lwp_1): Adjust comment.
15422 (linux_attach): last_resume_kind moved the thread_info; adjust.
15423 (status_pending_p_callback): Adjust.
15424 (linux_wait_for_event_1): Adjust.
15425 (count_events_callback, select_singlestep_lwp_callback)
15426 (select_event_lwp_callback, cancel_breakpoints_callback)
15427 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
15428 (proceed_one_lwp): Adjust.
15429 (linux_async): Add debug output.
15430 (linux_thread_stopped): New.
15431 (linux_pause_all): New.
15432 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
15433 linux_pause_all.
15434 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
15435 (thread_db_free): Delete declaration.
15436 (thread_db_detach, thread_db_mourn): Declare.
15437 * thread-db.c (thread_db_init): Use thread_db_mourn.
15438 (thread_db_free): Delete, split in two.
15439 (disable_thread_event_reporting): New.
15440 (thread_db_detach): New.
15441 (thread_db_mourn): New.
15442
15443 * server.h (struct thread_info) <last_resume_kind>: New field.
15444 <attached>: Add comment.
15445 <gdb_detached>: New field.
15446 (handler_func): Change return type to int.
15447 (handle_serial_event, handle_target_event): Ditto.
15448 (gdb_connected): Declare.
15449 (tracing): Delete.
15450 (disconnected_tracing): Declare.
15451 (stop_tracing): Declare.
15452
15453 * server.c (handle_query) <qSupported>: Report support for
15454 disconnected tracing.
15455 (queue_stop_reply_callback): Account for running threads.
15456 (gdb_wants_thread_stopped): New.
15457 (gdb_wants_all_threads_stopped): New.
15458 (gdb_reattached_process): New.
15459 (handle_status): Clear the `gdb_detached' flag of all processes.
15460 In all-stop, stop all threads.
15461 (main): Be sure to leave tfind mode. Handle disconnected tracing.
15462 (process_serial_event): If the remote connection breaks, or if an
15463 exit was forced with "monitor exit", force an event loop exit.
15464 Handle disconnected tracing on detach.
15465 (handle_serial_event): Adjust.
15466 (handle_target_event): If GDB isn't connected, forward events back
15467 to the inferior, unless the last process exited, in which case,
15468 exit gdbserver. Adjust interface.
15469
15470 * remote-utils.c (remote_open): Don't block in accept. Instead
15471 register an event loop source on the listen socket file
15472 descriptor. Refactor bits into ...
15473 (listen_desc): ... this new global.
15474 (gdb_connected): ... this new function.
15475 (enable_async_notification): ... this new function.
15476 (handle_accept_event): ... this new function.
15477 (remote_close): Clear remote_desc.
15478
15479 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
15480
15481 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
15482 New fields.
15483 (mourn_inferior): Define.
15484 (target_process_qsupported): Avoid the dangling else problem.
15485 (thread_stopped): Define.
15486 (pause_all): Define.
15487 (target_waitstatus_to_string): Declare.
15488 * target.c (target_waitstatus_to_string): New.
15489
15490 * tracepoint.c (tracing): Make extern.
15491 (disconnected_tracing): New.
15492 (stop_tracing): Make extern. Handle tracing stops due to GDB
15493 disconnecting.
15494 (cmd_qtdisconnected): New.
15495 (cmd_qtstatus): Report disconnected tracing status in trace reply.
15496 (handle_tracepoint_general_set): Handle QTDisconnected.
15497
15498 * event-loop.c (event_handler_func): Change return type to int.
15499 (process_event): Bail out if the event handler wants the event
15500 loop to stop.
15501 (handle_file_event): Ditto.
15502 (start_event_loop): Bail out if the event handler wants the event
15503 loop to stop.
15504
15505 * nto-low.c (nto_target_ops): Adjust.
15506 * spu-low.c (spu_wait): Don't remove the process here.
15507 (spu_target_ops): Adjust.
15508 * win32-low.c (win32_wait): Don't remove the process here.
15509 (win32_target_ops): Adjust.
15510
15511 2010-04-11 Pedro Alves <pedro@codesourcery.com>
15512
15513 * regcache.c (realloc_register_cache): Invalidate inferior's
15514 regcache before recreating it.
15515
15516 2010-04-09 Pedro Alves <pedro@codesourcery.com>
15517
15518 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
15519
15520 2010-04-09 Stan Shebs <stan@codesourcery.com>
15521 Pedro Alves <pedro@codesourcery.com>
15522
15523 * server.h (LONGEST): New.
15524 (struct thread_info) <while_stepping>: New field.
15525 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
15526 Declare.
15527 (initialize_tracepoint, handle_tracepoint_general_set)
15528 (handle_tracepoint_query, tracepoint_finished_step)
15529 (tracepoint_was_hit, release_while_stepping_state_list):
15530 (current_traceframe): Declare.
15531 * server.c (handle_general_set): Handle tracepoint packets.
15532 (read_memory): New.
15533 (write_memory): New.
15534 (handle_search_memory_1): Use read_memory.
15535 (handle_query): Report support for conditional tracepoints, trace
15536 state variables, and tracepoint sources. Handle tracepoint
15537 queries.
15538 (main): Initialize the tracepoints module.
15539 (process_serial_event): Handle traceframe reads/writes.
15540
15541 * linux-low.c (handle_tracepoints): New.
15542 (linux_wait_1): Call it.
15543 (linux_resume_one_lwp): Handle while-stepping.
15544 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
15545 (linux_target_ops): Install them.
15546 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
15547 New field.
15548 * linux-x86-low.c (x86_supports_tracepoints): New.
15549 (the_low_target). Install it.
15550
15551 * mem-break.h (delete_breakpoint): Declare.
15552 * mem-break.c (delete_breakpoint): Make external.
15553
15554 * target.h (struct target_ops): Add `supports_tracepoints',
15555 `read_pc', and `write_pc' fields.
15556 (target_supports_tracepoints): Define.
15557 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
15558 (phex_nz): New.
15559
15560 * regcache.h (struct regcache) <registers_owned>: New field.
15561 (init_register_cache, regcache_cpy): Declare.
15562 (regcache_read_pc, regcache_write_pc): Declare.
15563 (register_cache_size): Declare.
15564 (supply_regblock): Declare.
15565 * regcache.c (init_register_cache): New.
15566 (new_register_cache): Use it.
15567 (regcache_cpy): New.
15568 (register_cache_size): New.
15569 (supply_regblock): New.
15570 (regcache_read_pc, regcache_write_pc): New.
15571
15572 * tracepoint.c: New.
15573
15574 * Makefile.in (OBS): Add tracepoint.o.
15575 (tracepoint.o): New rule.
15576
15577 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
15578
15579 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
15580 (i386-mmx.o): New.
15581 (i386-mmx.c): Likewise.
15582 (i386-mmx-linux.o): Likewise.
15583 (i386-mmx-linux.c): Likewise.
15584
15585 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
15586 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
15587 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
15588 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
15589
15590 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
15591 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
15592 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
15593
15594 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
15595
15596 * Makefile.in (clean): Updated.
15597 (i386-avx.o): New.
15598 (i386-avx.c): Likewise.
15599 (i386-avx-linux.o): Likewise.
15600 (i386-avx-linux.c): Likewise.
15601 (amd64-avx.o): Likewise.
15602 (amd64-avx.c): Likewise.
15603 (amd64-avx-linux.o): Likewise.
15604 (amd64-avx-linux.c): Likewise.
15605
15606 * configure.srv (srv_i386_regobj): Add i386-avx.o.
15607 (srv_i386_linux_regobj): Add i386-avx-linux.o.
15608 (srv_amd64_regobj): Add amd64-avx.o.
15609 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
15610 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
15611 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
15612 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
15613 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
15614 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
15615 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
15616
15617 * i387-fp.c: Include "i386-xstate.h".
15618 (i387_xsave): New.
15619 (i387_cache_to_xsave): Likewise.
15620 (i387_xsave_to_cache): Likewise.
15621 (x86_xcr0): Likewise.
15622
15623 * i387-fp.h (i387_cache_to_xsave): Likewise.
15624 (i387_xsave_to_cache): Likewise.
15625 (x86_xcr0): Likewise.
15626
15627 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
15628 * linux-crisv32-low.c (target_regsets): Likewise.
15629 * linux-m68k-low.c (target_regsets): Likewise.
15630 * linux-mips-low.c (target_regsets): Likewise.
15631 * linux-ppc-low.c (target_regsets): Likewise.
15632 * linux-s390-low.c (target_regsets): Likewise.
15633 * linux-sh-low.c (target_regsets): Likewise.
15634 * linux-sparc-low.c (target_regsets): Likewise.
15635 * linux-xtensa-low.c (target_regsets): Likewise.
15636
15637 * linux-low.c: Include <sys/uio.h>.
15638 (regsets_fetch_inferior_registers): Support nt_type.
15639 (regsets_store_inferior_registers): Likewise.
15640 (linux_process_qsupported): New.
15641 (linux_target_ops): Add linux_process_qsupported.
15642
15643 * linux-low.h (regset_info): Add nt_type.
15644 (linux_target_ops): Add process_qsupported.
15645
15646 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
15647 and <sys/uio.h>.
15648 (init_registers_i386_avx_linux): New.
15649 (init_registers_amd64_avx_linux): Likewise.
15650 (xmltarget_i386_linux_no_xml): Likewise.
15651 (xmltarget_amd64_linux_no_xml): Likewise.
15652 (PTRACE_GETREGSET): Likewise.
15653 (PTRACE_SETREGSET): Likewise.
15654 (x86_fill_xstateregset): Likewise.
15655 (x86_store_xstateregset): Likewise.
15656 (use_xml): Likewise.
15657 (x86_linux_update_xmltarget): Likewise.
15658 (x86_linux_process_qsupported): Likewise.
15659 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
15660 (x86_arch_setup): Don't call init_registers_amd64_linux nor
15661 init_registers_i386_linux here. Call
15662 x86_linux_update_xmltarget.
15663 (the_low_target): Add x86_linux_process_qsupported.
15664
15665 * server.c (handle_query): Call target_process_qsupported.
15666
15667 * target.h (target_ops): Add process_qsupported.
15668 (target_process_qsupported): New.
15669
15670 2010-04-03 Pedro Alves <pedro@codesourcery.com>
15671
15672 * inferiors.c (add_thread): Set last_status kind to
15673 TARGET_WAITKIND_IGNORE.
15674 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
15675 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
15676 (linux_wait_1): Move `thread' local definition to block that uses
15677 it. Don't NULL initialize `event_child'.
15678 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
15679 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
15680 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
15681
15682 2010-04-01 Pedro Alves <pedro@codesourcery.com>
15683
15684 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
15685 an extended waitstatus, or by a watchpoint.
15686 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
15687 thread was stepping or has been stopped by a watchpoint.
15688
15689 2010-04-01 Pedro Alves <pedro@codesourcery.com>
15690
15691 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
15692 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
15693 of another, then delete the previous, and validate all
15694 breakpoints.
15695 (validate_inserted_breakpoint): New.
15696 (delete_disabled_breakpoints): New.
15697 (validate_breakpoints): New.
15698 (check_mem_read): Validate breakpoints before trusting their
15699 shadow. Delete disabled breakpoints.
15700 (check_mem_write): Validate breakpoints before trusting they
15701 should be inserted. Delete disabled breakpoints.
15702 * mem-break.h (validate_breakpoints):
15703 * server.c (handle_query): Validate breakpoints when we see a
15704 qSymbol query.
15705
15706 2010-04-01 Pedro Alves <pedro@codesourcery.com>
15707
15708 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
15709 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
15710 if we could tell there's a GDB breakpoint at stop_pc.
15711 (need_step_over_p): Don't do a step over if we find a GDB
15712 breakpoint at the resume PC.
15713
15714 * mem-break.c (struct raw_breakpoint): New.
15715 (enum bkpt_type): New type `gdb_breakpoint'.
15716 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
15717 fields. New field `raw'.
15718 (find_raw_breakpoint_at): New.
15719 (set_raw_breakpoint_at): Handle refcounting. Create a raw
15720 breakpoint instead.
15721 (set_breakpoint_at): Adjust.
15722 (delete_raw_breakpoint): New.
15723 (release_breakpoint): New.
15724 (delete_breakpoint): Rename to...
15725 (delete_breakpoint_1): ... this. Add proc parameter. Use
15726 release_breakpoint. Return ENOENT.
15727 (delete_breakpoint): Reimplement.
15728 (find_breakpoint_at): Delete.
15729 (find_gdb_breakpoint_at): New.
15730 (delete_breakpoint_at): Delete.
15731 (set_gdb_breakpoint_at): New.
15732 (delete_gdb_breakpoint_at): New.
15733 (gdb_breakpoint_here): New.
15734 (set_reinsert_breakpoint): Use release_breakpoint.
15735 (uninsert_breakpoint): Rename to ...
15736 (uninsert_raw_breakpoint): ... this.
15737 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
15738 (reinsert_raw_breakpoint): Change parameter type to
15739 raw_breakpoint.
15740 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
15741 instead.
15742 (check_breakpoints): Adjust. Use release_breakpoint.
15743 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
15744 (breakpoint_inserted_here): Ditto.
15745 (check_mem_read): Adjust to iterate over raw breakpoints instead.
15746 Don't trust the breakpoint's shadow if it is not inserted.
15747 (check_mem_write): Adjust to iterate over raw breakpoints instead.
15748 (delete_all_breakpoints): Adjust.
15749 (free_all_breakpoints): Mark all breakpoints as uninserted, and
15750 use delete_breakpoint_1.
15751
15752 * mem-break.h (breakpoints_supported): Delete declaration.
15753 (set_gdb_breakpoint_at): Declare.
15754 (gdb_breakpoint_here): Declare.
15755 (delete_breakpoint_at): Delete.
15756 (delete_gdb_breakpoint_at): Declare.
15757
15758 * server.h (struct raw_breakpoint): Forward declare.
15759 (struct process_info): New field `raw_breakpoints'.
15760
15761 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
15762 breakpoints.
15763
15764 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15765
15766 * linux-low.c (status_pending_p_callback): Fix comment.
15767 (linux_wait_for_event_1): Move most of the internal breakpoint
15768 handling from here...
15769 (linux_wait_1): ... to here.
15770 (count_events_callback): New.
15771 (select_singlestep_lwp_callback): New.
15772 (select_event_lwp_callback): New.
15773 (cancel_breakpoints_callback): New.
15774 (select_event_lwp): New.
15775 (linux_wait_1): Simplify internal breakpoint handling. Give equal
15776 priority to all LWPs that have had events that should be reported
15777 to the client. Cancel breakpoints when about to reporting the
15778 event to the client, not while stopping lwps. No longer cancel
15779 finished single-steps here.
15780 (cancel_finished_single_step): Delete.
15781 (cancel_finished_single_steps): Delete.
15782
15783 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15784
15785 * mem-break.c (enum bkpt_type): New.
15786 (struct breakpoint): New field `type'.
15787 (set_breakpoint_at): Change return type to struct breakpoint
15788 pointer. Set type to `other_breakpoint' by default.
15789 (delete_breakpoint): Rewrite, supporting more than one breakpoint
15790 in the breakpoint list.
15791 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
15792 (reinsert_breakpoint): Rename to ...
15793 (reinsert_raw_breakpoint): ... this.
15794 (reinsert_breakpoints_at): Adjust.
15795 * mem-break.h (struct breakpoint): Declare.
15796 (set_breakpoint_at): Change return type to struct breakpoint
15797 pointer.
15798
15799 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15800
15801 * server.c (handle_query): Assign, not compare.
15802
15803 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15804
15805 Teach linux gdbserver to step-over-breakpoints.
15806
15807 * linux-low.c (can_hardware_single_step): New.
15808 (supports_breakpoints): New.
15809 (handle_extended_wait): If stopping threads, read the stop pc of
15810 the new cloned LWP.
15811 (get_pc): New.
15812 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
15813 low target doesn't support retrieving the PC.
15814 (add_lwp): Set last_resume_kind to resume_continue.
15815 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
15816 (linux_attach): Don't clear stop_expected. Set the lwp's
15817 last_resume_kind to resume_stop.
15818 (linux_detach_one_lwp): Don't check for removed breakpoints.
15819 (check_removed_breakpoint): Delete.
15820 (status_pending_p): Rename to ...
15821 (status_pending_p_callback): ... this. Don't check for removed
15822 breakpoints. Don't consider threads that are stopped from GDB's
15823 perspective.
15824 (linux_wait_for_lwp): Always read the stop_pc here.
15825 (cancel_breakpoint): New.
15826 (step_over_bkpt): New global.
15827 (linux_wait_for_event_1): Implement stepping over breakpoints.
15828 (gdb_wants_lwp_stopped): New.
15829 (gdb_wants_all_stopped): New.
15830 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
15831 single-step traps here. Store the thread's last reported target
15832 wait status.
15833 (send_sigstop): Don't clear stop_expected. Always set it,
15834 instead.
15835 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
15836 (cancel_finished_single_step): New.
15837 (cancel_finished_single_steps): New.
15838 (wait_for_sigstop): Don't cancel finished single-step traps here.
15839 (linux_resume_one_lwp): Don't check for removed breakpoints.
15840 Don't set `step' on non-hardware step archs.
15841 (linux_set_resume_request): Ignore resume_stop requests if already
15842 stopping or stopped. Set the lwp's last_resume_kind.
15843 (resume_status_pending_p): Don't check for removed breakpoints.
15844 (need_step_over_p): New.
15845 (start_step_over): New.
15846 (finish_step_over): New.
15847 (linux_resume_one_thread): Always queue a sigstop for resume_stop
15848 requests. Clear the thread's last reported target waitstatus.
15849 Don't use the `suspended' flag. Don't consider pending breakpoints.
15850 (linux_resume): Start a step-over if necessary.
15851 (proceed_one_lwp): New.
15852 (proceed_all_lwps): New.
15853 (unstop_all_lwps): New.
15854 * linux-low.h (struct lwp_info): Rewrite comment for the
15855 `suspended' flag. Add the `stop_pc' field. Delete the
15856 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
15857 Add `'last_resume_kind' and `need_step_over' fields.
15858 * inferiors.c (struct thread_info): Delete, moved elsewhere.
15859 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
15860 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
15861 (set_raw_breakpoint_at): New.
15862 (set_breakpoint_at): Rewrite to use it.
15863 (reinsert_breakpoint_handler): Delete.
15864 (set_reinsert_breakpoint): New.
15865 (reinsert_breakpoint_by_bp): Delete.
15866 (delete_reinsert_breakpoints): New.
15867 (uninsert_breakpoint): Rewrite.
15868 (uninsert_breakpoints_at): New.
15869 (reinsert_breakpoint): Rewrite.
15870 (reinsert_breakpoints_at): New.
15871 (check_breakpoints): Rewrite.
15872 (breakpoint_here): New.
15873 (breakpoint_inserted_here): New.
15874 (check_mem_read): Adjust.
15875 * mem-break.h (breakpoints_supported, breakpoint_here)
15876 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
15877 (reinsert_breakpoint_by_bp): Delete declaration.
15878 (delete_reinsert_breakpoints): Declare.
15879 (reinsert_breakpoint): Delete declaration.
15880 (reinsert_breakpoints_at): Declare.
15881 (uninsert_breakpoint): Delete declaration.
15882 (uninsert_breakpoints_at): Declare.
15883 (check_breakpoints): Adjust prototype.
15884 * server.h: Adjust include order.
15885 (struct thread_info): Declare here. Add a `last_status' field.
15886
15887 2010-03-23 Michael Snyder <msnyder@vmware.com>
15888
15889 * server.c (crc32): New function.
15890 (handle_query): Add handling for 'qCRC:' request.
15891
15892 2010-03-23 Pedro Alves <pedro@codesourcery.com>
15893
15894 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
15895 lwp had been stopped by a watchpoint.
15896
15897 2010-03-16 Pedro Alves <pedro@codesourcery.com>
15898
15899 * server.h (internal_error): Declare.
15900 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
15901 * utils.c (internal_error): New function.
15902
15903 2010-03-15 Andreas Schwab <schwab@redhat.com>
15904
15905 * configure.srv: Fix typo setting srv_regobj.
15906
15907 2010-03-15 Pedro Alves <pedro@codesourcery.com>
15908
15909 * linux-low.c (fetch_register): Avoid passing a non string literal
15910 format to `error'.
15911 (usr_store_inferior_registers): Ditto.
15912
15913 2010-03-14 Pedro Alves <pedro@codesourcery.com>
15914
15915 * linux-low.c (linux_write_memory): Bail out early if peeking
15916 memory failed.
15917
15918 2010-03-14 Pedro Alves <pedro@codesourcery.com>
15919
15920 * linux-low.h (struct lwp_info): New fields
15921 `stopped_by_watchpoint' and `stopped_data_address'.
15922 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
15923 here, and cache them in the lwp object.
15924 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
15925 directly.
15926 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
15927 field.
15928 (linux_stopped_by_watchpoint): Rewrite.
15929 (linux_stopped_data_address): Rewrite.
15930
15931 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
15932
15933 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
15934 switching the current inferior, not before.
15935
15936 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
15937
15938 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
15939 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
15940 i386-linux.c and amd64-linux.c.
15941 (reg-i386.o): Removed.
15942 (reg-i386.c): Likewise.
15943 (reg-i386-linux.o): Likewise.
15944 (reg-i386-linux.c): Likewise.
15945 (reg-x86-64.o): Likewise.
15946 (reg-x86-64.c): Likewise.
15947 (reg-x86-64-linux.o): Likewise.
15948 (reg-x86-64-linux.c): Likewise.
15949 (i386.o): New.
15950 (i386.c): Likewise.
15951 (i386-linux.o): Likewise.
15952 (i386-linux.c): Likewise.
15953 (amd64.o): Likewise.
15954 (amd64.c): Likewise.
15955 (amd64-linux.o): Likewise.
15956 (amd64-linux.c): Likewise.
15957
15958 * configure.srv (srv_i386_regobj): New.
15959 (srv_i386_linux_regobj): Likewise.
15960 (srv_amd64_regobj): Likewise.
15961 (srv_amd64_linux_regobj): Likewise.
15962 (srv_i386_32bit_xmlfiles): Likewise.
15963 (srv_i386_64bit_xmlfiles): Likewise.
15964 (srv_i386_xmlfiles): Likewise.
15965 (srv_amd64_xmlfiles): Likewise.
15966 (srv_i386_linux_xmlfiles): Likewise.
15967 (srv_amd64_linux_xmlfiles): Likewise.
15968 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
15969 srv_xmlfiles to $srv_i386_xmlfiles.
15970 (i[34567]86-*-mingw32ce*): Likewise.
15971 (i[34567]86-*-mingw*): Likewise.
15972 (i[34567]86-*-nto*): Likewise.
15973 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
15974 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
15975 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
15976 (x86_64-*-linux*): Likewise.
15977
15978 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
15979 (init_registers_amd64_linux): New.
15980 (x86_arch_setup): Replace init_registers_x86_64_linux with
15981 init_registers_amd64_linux.
15982
15983 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
15984
15985 * configure.ac: Check for libdl. If it is not available link against
15986 static libthread_db.
15987 * configure: Regenerate.
15988
15989 2010-02-22 Pedro Alves <pedro@codesourcery.com>
15990
15991 PR9605
15992
15993 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
15994 handing a read watchpoint.
15995 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
15996
15997 2010-02-12 Doug Evans <dje@google.com>
15998
15999 * linux-low.c (linux_supports_tracefork_flag): Document.
16000 (linux_look_up_symbols): Add comment.
16001
16002 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
16003
16004 * regcache.c (supply_register): Clear regcache if buf is NULL.
16005
16006 2010-02-02 Nicolas Roche <roche@sourceware.org>
16007 Joel Brobecker <brobecker@adacore.com>
16008
16009 * inferiors.c (find_inferior): Add function documentation.
16010 (unloaded_dll): Handle the case where the unloaded dll has not
16011 been previously registered in the dll list.
16012
16013 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16014
16015 * linux-arm-low.c (thumb_breakpoint_len): Delete.
16016 (thumb2_breakpoint): New.
16017 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
16018
16019 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16020
16021 * linux-low.c (get_stop_pc): Check for SIGTRAP.
16022 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
16023 breakpoints.
16024
16025 2010-01-21 Pedro Alves <pedro@codesourcery.com>
16026
16027 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
16028
16029 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
16030
16031 * linux-s390-low.c (s390_collect_ptrace_register)
16032 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
16033
16034 2010-01-21 Doug Evans <dje@google.com>
16035
16036 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
16037 (PTRACE_ARG4_TYPE): New macro.
16038 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
16039 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
16040 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
16041 (usr_store_inferior_registers): Ditto.
16042 (linux_read_memory, linux_write_memory): Ditto.
16043 (linux_test_for_tracefork): Ditto.
16044
16045 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
16046 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
16047
16048 2010-01-21 Pedro Alves <pedro@codesourcery.com>
16049
16050 * proc-service.c (ps_lgetregs): Don't refetch registers from the
16051 target.
16052
16053 2010-01-21 Pedro Alves <pedro@codesourcery.com>
16054
16055 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
16056 prototype to take a regcache. Adjust.
16057
16058 2010-01-20 Pedro Alves <pedro@codesourcery.com>
16059
16060 * regcache.h (struct thread_info): Forward declare.
16061 (struct regcache): New.
16062 (new_register_cache): Adjust prototype.
16063 (get_thread_regcache): Declare.
16064 (free_register_cache): Adjust prototype.
16065 (registers_to_string, registers_from_string): Ditto.
16066 (supply_register, supply_register_by_name, collect_register)
16067 (collect_register_as_string, collect_register_by_name): Ditto.
16068 * regcache.c (struct inferior_regcache_data): Delete.
16069 (get_regcache): Rename to ...
16070 (get_thread_regcache): ... this. Adjust. Switch inferior before
16071 fetching registers.
16072 (regcache_invalidate_one): Adjust.
16073 (regcache_invalidate): Fix prototype.
16074 (new_register_cache): Return the new register cache.
16075 (free_register_cache): Change prototype.
16076 (realloc_register_cache): Adjust.
16077 (registers_to_string): Change prototype to take a regcache. Adjust.
16078 (registers_from_string): Ditto.
16079 (register_data): Ditto.
16080 (supply_register): Ditto.
16081 (supply_register_by_name): Ditto.
16082 (collect_register): Ditto.
16083 (collect_register_as_string): Ditto.
16084 (collect_register_by_name): Ditto.
16085 * server.c (process_serial_event): Adjust.
16086 * linux-low.h (regset_fill_func, regset_store_func): Change
16087 prototype.
16088 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
16089 Change prototype.
16090 * linux-low.c (get_stop_pc): Adjust.
16091 (check_removed_breakpoint): Adjust.
16092 (linux_wait_for_event): Adjust.
16093 (linux_resume_one_lwp): Adjust.
16094 (fetch_register): Add regcache parameter. Adjust.
16095 (usr_store_inferior_registers): Ditto.
16096 (regsets_fetch_inferior_registers): Ditto.
16097 (regsets_store_inferior_registers): Ditto.
16098 (linux_fetch_registers, linux_store_registers): Ditto.
16099 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
16100 regcache. Adjust.
16101 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
16102 Ditto.
16103 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
16104 prototype to take a regcache.
16105 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
16106 * remote-utils.c (convert_ascii_to_int, outreg)
16107 (prepare_resume_reply): Change prototype to take a regcache.
16108 Adjust.
16109 * target.h (struct target_ops) <fetch_registers, store_registers>:
16110 Change prototype to take a regcache.
16111 (fetch_inferior_registers, store_inferior_registers): Change
16112 prototype to take a regcache. Adjust.
16113 * proc-service.c (ps_lgetregs): Adjust.
16114 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
16115 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
16116 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
16117 take a regcache. Adjust.
16118 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
16119 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
16120 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
16121 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
16122 * linux-cris-low.c (cris_get_pc, cris_set_pc)
16123 (cris_cannot_fetch_register):
16124 (cris_breakpoint_at): Change prototype to take a regcache.
16125 Adjust.
16126 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
16127 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
16128 to take a regcache. Adjust.
16129 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
16130 Adjust.
16131 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
16132 take a regcache. Adjust.
16133 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
16134 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
16135 (m68k_set_pc): Change prototype to take a regcache. Adjust.
16136 * linux-mips-low.c (mips_get_pc):
16137 (mips_set_pc): Change prototype to take a regcache. Adjust.
16138 (mips_reinsert_addr): Adjust.
16139 (mips_collect_register): Change prototype to take a regcache.
16140 Adjust.
16141 (mips_supply_register):
16142 (mips_collect_register_32bit, mips_supply_register_32bit)
16143 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16144 (mips_store_fpregset): Ditto.
16145 * linux-ppc-low.c (ppc_supply_ptrace_register)
16146 (ppc_supply_ptrace_register): Ditto.
16147 (parse_spufs_run): Adjust.
16148 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
16149 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
16150 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
16151 take a regcache. Adjust.
16152 * linux-s390-low.c (s390_collect_ptrace_register)
16153 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
16154 (s390_set_pc): Change prototype to take a regcache. Adjust.
16155 (s390_arch_setup): Adjust.
16156 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
16157 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
16158 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
16159 (sparc_fill_gregset, sparc_store_gregset_from_stack)
16160 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
16161 regcache. Adjust.
16162 (sparc_breakpoint_at): Adjust.
16163 * linux-xtensa-low.c (xtensa_fill_gregset):
16164 (xtensa_store_gregset):
16165 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
16166 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
16167 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
16168 prototype to take a regcache. Adjust.
16169 * win32-arm-low.c (arm_fetch_inferior_register)
16170 (arm_store_inferior_register): Change prototype to take a
16171 regcache. Adjust.
16172 * win32-i386-low.c (i386_fetch_inferior_register)
16173 (i386_store_inferior_register): Change prototype to take a
16174 regcache. Adjust.
16175 * win32-low.c (child_fetch_inferior_registers)
16176 (child_store_inferior_registers): Change prototype to take a
16177 regcache. Adjust.
16178 (win32_wait): Adjust.
16179 (win32_fetch_inferior_registers): Change prototype to take a
16180 regcache. Adjust.
16181 (win32_store_inferior_registers): Adjust.
16182 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
16183 store_inferior_register>: Change prototype to take a regcache.
16184
16185 2010-01-20 Doug Evans <dje@google.com>
16186
16187 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
16188 #ifdef.
16189 (linux_wait_for_event1, linux_init_signals): Ditto.
16190 (W_STOPCODE): Provide definition if missing.
16191
16192 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
16193
16194 * linux-low.c (linux_core_of_thread): New.
16195 (compare_ints, show_process, list_threads): New.
16196 (linux_qxfer_osdata): Report threads and cores.
16197 (linux_target_op): Register linux_core_of_thread.
16198 * remote-utils.c (prepare_resume_reply): Report the core.
16199 (buffer_xml_printf): Support %d specifier.
16200 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
16201 New.
16202 (handle_query): Handle qXfer:threads. Announce availability
16203 thereof.
16204 * target.h (struct target_ops): New field core_of_thread.
16205
16206 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
16207
16208 * Makefile.in (clean): Remove new generated files.
16209 (reg-s390.o, reg-s390.c): Remove rules.
16210 (reg-s390x.o, reg-s390x.c): Likewise.
16211 (s390-linux32.o, s390-linux32.c): Add rules.
16212 (s390-linux64.o, s390-linux64.c): Likewise.
16213 (s390x-linux64.o, s390x-linux64.c): Likewise.
16214 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
16215 * linux-s390-low.c: Include <elf.h>.
16216 (HWCAP_S390_HIGH_GPRS): Define if undefined.
16217 (init_registers_s390): Remove prototype.
16218 (init_registers_s390x): Likewise.
16219 (init_registers_s390_linux32): Add prototype.
16220 (init_registers_s390_linux64): Likewise.
16221 (init_registers_s390x_linux64): Likewise.
16222 (s390_num_regs_3264): New define.
16223 (s390_regmap_3264): New global variable.
16224 (s390_cannot_fetch_register): Remove obsolete check.
16225 (s390_cannot_store_register): Likewise.
16226 (s390_collect_ptrace_register): Handle upper/lower register halves.
16227 (s390_supply_ptrace_register): Likewise.
16228 (s390_fill_gregset): Update to register number changes.
16229 (s390_get_hwcap): New routine.
16230 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
16231 Install appropriate regmap and register set.
16232
16233 2010-01-01 Joel Brobecker <brobecker@adacore.com>
16234
16235 * server.c (gdbserver_version): Update copyright year to 2010.
16236 * gdbreplay.c (gdbreplay_version): Likewise.
16237
16238 2009-12-28 Doug Evans <dje@google.com>
16239
16240 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
16241 elf/external.h. Include <elf.h> instead but only if necessary.
16242
16243 2009-12-28 Pedro Alves <pedro@codesourcery.com>
16244
16245 * linux-low.c (linux_remove_process): Remove `detaching'
16246 parameter. Don't release/detach from thread_db here.
16247 (linux_kill): Release/detach from thread_db here, ...
16248 (linux_detach): ... and here, before actually detaching.
16249 (linux_wait_1): ... and here, when a process exits.
16250 * thread-db.c (any_thread_of): New.
16251 (thread_db_free): Switch the current inferior to a thread of the
16252 passed in process.
16253
16254 2009-12-21 Doug Evans <dje@google.com>
16255
16256 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
16257
16258 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
16259 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
16260 warning ifndef __NR_tkill. Move setting of errno there too.
16261 Delete unnecessary resetting of errno after syscall.
16262 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
16263
16264 * configure.ac: Check for dladdr.
16265 * config.in: Regenerate.
16266 * configure: Regenerate.
16267 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
16268 (try_thread_db_load): Update.
16269
16270 * linux-low.c (my_waitpid): Delete unnecessary prototype.
16271
16272 2009-12-18 Doug Evans <dje@google.com>
16273
16274 * event-loop.c: Include unistd.h if it exists.
16275
16276 * linux-low.c (my_waitpid): Move definition away from being in
16277 between linux_tracefork_child/linux_test_for_tracefork.
16278
16279 * gdb_proc_service.h (psaddr_t): Fix type.
16280 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
16281 signature to match glibc.
16282
16283 2009-12-16 Doug Evans <dje@google.com>
16284
16285 * linux-low.c (linux_read_memory): Fix argument to read.
16286
16287 2009-11-26 Pedro Alves <pedro@codesourcery.com>
16288
16289 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
16290 events, don't leave current_inferior pointing at null.
16291
16292 2009-11-26 Pedro Alves <pedro@codesourcery.com>
16293
16294 * win32-low.c (LOG): Delete.
16295 (OUTMSG): Output to stderr.
16296 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
16297 on compile time LOG macro.
16298 (win32_wait): Fix debug output.
16299
16300 2009-11-26 Pedro Alves <pedro@codesourcery.com>
16301
16302 * win32-low.c (win32_add_one_solib): If the dll name is
16303 "ntdll.dll", prepend the system directory to the dll path.
16304
16305 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
16306
16307 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
16308
16309 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
16310 Vladimir Prus <vladimir@codesourcery.com>
16311
16312 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
16313 * configure.ac: Check for __mcoldfire__ and set
16314 gdb_cv_m68k_is_coldfire.
16315 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
16316 reg-cf.o and reg-m68k.o.
16317 * configure: Regenerated.
16318
16319 2009-11-16 Pedro Alves <pedro@codesourcery.com>
16320
16321 * linux-low.c (linux_remove_process): Add `detaching' parameter.
16322 Pass it to thread_db_free.
16323 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
16324 proper `detaching' argument to linux_remove_process.
16325 * linux-low.h (thread_db_free): Add `detaching' parameter.
16326 * thread-db.c (thread_db_init): Pass false as `detaching' argument
16327 to thread_db_free.
16328 (thread_db_free): Add `detaching' parameter. Only
16329 call td_ta_clear_event if detaching from process.
16330
16331 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
16332
16333 * thread-db.c (thread_db_free): Fix typo.
16334
16335 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
16336
16337 PR gdb/10838
16338 * thread-db.c (thread_db_free): Call td_ta_clear_event.
16339
16340 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
16341
16342 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
16343 with an i686 compiler.
16344 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
16345 needed.
16346 * configure: Rebuilt.
16347
16348 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
16349
16350 PR gdb/10783
16351
16352 * server.c (handle_search_memory_1): Correct read_addr initialization
16353 in loop for searching subsequent chunks.
16354
16355 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
16356
16357 * configure.ac: New --with-libthread-db option.
16358 * thread-db.c: Allow direct dependence on libthread_db.
16359 (thread_db_free): Adjust.
16360 * config.in: Regenerate.
16361 * configure: Likewise.
16362
16363 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
16364
16365 PR gdb/10757
16366 * thread-db.c (attach_thread): New function.
16367 (maybe_attach_thread): Return success/failure.
16368 (find_new_threads_callback): Adjust.
16369 (thread_db_find_new_threads): Loop until no new threads.
16370
16371 2009-10-13 Pedro Alves <pedro@codesourcery.com>
16372
16373 * proc-service.c (ps_lgetregs): Formatting.
16374
16375 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
16376
16377 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
16378 * configure.ac: Adjust.
16379 * linux-low.h (struct process_info_private): Move members to struct
16380 thread_db.
16381 (thread_db_free, thread_db_handle_monitor_command): New prototype.
16382 * linux-low.c (linux_remove_process): Adjust.
16383 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
16384 * server.c (handle_query): Move code ...
16385 (handle_monitor_command): ... here. New function.
16386 * target.h (struct target_ops): New member.
16387 * thread-db.c (struct thread_db): New.
16388 (libthread_db_search_path): New variable.
16389 (thread_db_create_event, thread_db_enable_reporting)
16390 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
16391 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
16392 (try_thread_db_load_1, dladdr_to_soname): New functions.
16393 (try_thread_db_load, thread_db_load_search): New functions.
16394 (thread_db_init): Search for libthread_db.
16395 (thread_db_free): New function.
16396 (thread_db_handle_monitor_command): Likewise.
16397 * config.in: Regenerate.
16398 * configure: Regenerate.
16399
16400 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
16401
16402 * spu-low.c (spu_kill): Wait for inferior to terminate.
16403 Call clear_inferiors.
16404 (spu_detach): Call clear_inferiors.
16405
16406 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
16407
16408 * aclocal.m4: Regenerate.
16409 * config.in: Likewise.
16410 * configure: Likewise.
16411
16412 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
16413
16414 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
16415 (parse_spufs_run): New function.
16416 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
16417 (ppc_breakpoint_at): Handle SPU breakpoints.
16418
16419 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
16420
16421 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
16422 (SPUFS_MAGIC): Define.
16423 (spu_enumerate_spu_ids): New function.
16424 (linux_qxfer_spu): New function.
16425 (linux_target_ops): Install linux_qxfer_spu.
16426
16427 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
16428
16429 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
16430 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
16431 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
16432 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
16433 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
16434 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
16435 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
16436 (init_registers_powerpc_cell32l): Add prototype.
16437 (init_registers_powerpc_cell64l): Likewise.
16438 (ppc_arch_setup): Detect Cell/B.E. architecture.
16439
16440 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
16441
16442 * Makefile.in (datarootdir): New variable.
16443
16444 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
16445
16446 * linux-low.c (linux_write_memory): Update debugging output.
16447 * Makefile.in (clean): Add new descriptions.
16448 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
16449 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
16450 * configure.srv: Add new files for arm*-*-linux*.
16451 * linux-arm-low.c: Add new declarations.
16452 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
16453 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
16454 (HWCAP_VFPv3D16): New.
16455 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
16456 instead of __IWMMXT__.
16457 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
16458 (arm_arch_setup): New.
16459 (target_regsets): Remove #ifdef. Add VFP regset.
16460 (the_low_target): Use arm_arch_setup.
16461
16462 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
16463
16464 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
16465 the main thread again.
16466
16467 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
16468
16469 Adding Neutrino gdbserver.
16470 * configure: Regenerated.
16471 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
16472 * configure.srv (i[34567]86-*-nto*): New target.
16473 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
16474 * remote-utils.c [__QNX__]: Include sys/iomgr.h
16475 (nto_comctrl) [__QNX__]: New function.
16476 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
16477
16478 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
16479
16480 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
16481 srv_tgtobj.
16482
16483 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
16484 Pedro Alves <pedro@codesourcery.com>
16485
16486 * win32-i386-low.c (i386_get_thread_context): Handle systems that
16487 don't support CONTEXT_EXTENDED_REGISTERS.
16488 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
16489 (the_low_target): Install them.
16490 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
16491 failing with ERROR_PIPE_NOT_CONNECTED.
16492
16493 2009-06-30 Doug Evans <dje@google.com>
16494 Pierre Muller <muller@ics.u-strasbg.fr>
16495
16496 Add h/w watchpoint support to x86-linux, win32-i386.
16497 * Makefile.in (SFILES): Add i386-low.c
16498 (i386_low_h): Define.
16499 (i386-low.o): Add dependencies.
16500 (linux-x86-low.o): Add i386-low.h dependency.
16501 (win32-i386-low.o): Ditto.
16502 * i386-low.c: New file.
16503 * i386-low.h: New file.
16504 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
16505 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
16506 * linux-low.c (linux_add_process): Initialize arch_private.
16507 (linux_remove_process): Free arch_private.
16508 (add_lwp): Initialize arch_private.
16509 (delete_lwp): Free arch_private.
16510 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
16511 provided.
16512 * linux-low.h (process_info_private): New member arch_private.
16513 (lwp_info): New member arch_private.
16514 (linux_target_ops): New members new_process, new_thread,
16515 prepare_to_resume.
16516 (ptid_of): New macro.
16517 * linux-x86-low.c: Include stddef.h, i386-low.h.
16518 (arch_process_info): New struct.
16519 (arch_lwp_info): New struct.
16520 (x86_linux_dr_get, x86_linux_dr_set): New functions.
16521 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
16522 (i386_dr_low_get_status): New function.
16523 (x86_insert_point, x86_remove_point): New functions.
16524 (x86_stopped_by_watchpoint): New function.
16525 (x86_stopped_data_address): New function.
16526 (x86_linux_new_process, x86_linux_new_thread): New functions.
16527 (x86_linux_prepare_to_resume): New function.
16528 (the_low_target): Add entries for insert_point, remove_point,
16529 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
16530 prepare_to_resume.
16531 * server.c (debug_hw_points): New global.
16532 (monitor_show_help): Document set debug-hw-points.
16533 (handle_query): Process "set debug-hw-points".
16534 * server.h (debug_hw_points): Declare.
16535 (paddress): Declare.
16536 * utils.c (NUMCELLS, CELLSIZE): New macros.
16537 (get_sell, xsnprintf, paddress): New functions.
16538 * win32-arm-low.c (the_low_target): Add entries for insert_point,
16539 remove_point, stopped_by_watchpoint, stopped_data_address.
16540 * win32-i386-low.c: Include i386-low.h.
16541 (debug_reg_state): Replaces dr.
16542 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
16543 (i386_dr_low_get_status): New function.
16544 (i386_insert_point, i386_remove_point): New functions.
16545 (i386_stopped_by_watchpoint): New function.
16546 (i386_stopped_data_address): New function.
16547 (i386_initial_stuff): Update.
16548 (get_thread_context,set_thread_context,i386_thread_added): Update.
16549 (the_low_target): Add entries for insert_point,
16550 remove_point, stopped_by_watchpoint, stopped_data_address.
16551 * win32-low.c (win32_insert_watchpoint): New function.
16552 (win32_remove_watchpoint): New function.
16553 (win32_stopped_by_watchpoint): New function.
16554 (win32_stopped_data_address): New function.
16555 (win32_target_ops): Add entries for insert_watchpoint,
16556 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
16557 * win32-low.h (win32_target_ops): New members insert_point,
16558 remove_point, stopped_by_watchpoint, stopped_data_address.
16559
16560 2009-06-25 Pedro Alves <pedro@codesourcery.com>
16561
16562 * server.c (process_serial_event): Re-return unsupported, not
16563 error, if the type isn't recognized. Re-allow supporting only
16564 insert or remove packets. Also call require_running for
16565 breakpoints. Add missing break statement to default case. Tidy.
16566 * target.h (struct target_ops): Rename insert_watchpoint to
16567 insert_point, and remove_watchpoint to remove_point.
16568
16569 * linux-low.h (struct linux_target_ops): Likewise.
16570 * linux-low.c (linux_insert_watchpoint): Rename to ...
16571 (linux_insert_point): ... this. Adjust.
16572 (linux_remove_watchpoint): Rename to ...
16573 (linux_remove_point): ... this. Adjust.
16574 (linux_target_ops): Adjust.
16575 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
16576 (cris_insert_point): ... this.
16577 (cris_remove_watchpoint): Rename to ...
16578 (cris_remove_point): ... this.
16579 (the_low_target): Adjust.
16580
16581 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
16582
16583 * server.c (handle_v_kill): Pass signal_pid to
16584 kill_inferior if multi_process is zero.
16585
16586 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
16587
16588 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
16589 * target.h (target_ops): Comment for *_watchpoint to make it clear
16590 the functions can get types '0' and '1'.
16591
16592 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
16593
16594 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
16595 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
16596 * regcache.c (get_regcache): Likewise.
16597 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
16598 * win32-low.c (child_fetch_inferior_registers): Remove check for
16599 regno 0.
16600
16601 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
16602 Pedro Alves <pedro@codesourcery.com>
16603
16604 * target.h (struct target_ops) <supports_multi_process>: New
16605 callback.
16606 (target_supports_multi_process): New.
16607 * server.c (handle_query): Even if GDB reports support, only
16608 enable multi-process if the target also supports it. Report
16609 multi-process support only if the target backend supports it.
16610 * linux-low.c (linux_supports_multi_process): New function.
16611 (linux_target_ops): Install it as target_supports_multi_process
16612 callback.
16613
16614 2009-05-24 Doug Evans <dje@google.com>
16615
16616 Global renaming of find_thread_pid to find_thread_ptid.
16617 * server.h (find_thread_ptid): Renamed from find_thread_pid.
16618 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
16619 All callers updated.
16620
16621 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
16622 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
16623 directly.
16624
16625 * linux-low.c (get_stop_pc): Print pc if debug_threads.
16626 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
16627 (linux_resume_one_lwp): Ditto.
16628
16629 2009-05-23 Doug Evans <dje@google.com>
16630
16631 * linux-low.c (linux_resume_one_lwp): Change type of first arg
16632 from struct inferior_list_entry * to struct lwp_info *.
16633 All callers updated.
16634
16635 2009-05-13 Doug Evans <dje@google.com>
16636
16637 * linux-x86-low.c: Don't include assert.h.
16638 (x86_siginfo_fixup): Use fatal, not assert.
16639 (x86_arch_setup): Fix comment.
16640
16641 2009-05-12 Doug Evans <dje@google.com>
16642
16643 Biarch support for i386/amd64 gdbserver.
16644 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
16645 Add linux-x86-low.c.
16646 (linux-i386-low.o, linux-x86-64-low.o): Delete.
16647 (linux-x86-low.o): Add.
16648 * linux-x86-64-low.c: Delete.
16649 * linux-i386-low.c: Delete.
16650 * linux-x86-low.c: New file.
16651 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
16652 linux-x86-low.o.
16653 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
16654 linux-x86-low.o.
16655 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
16656 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
16657 (linux_child_pid_to_exec_file): New function.
16658 (elf_64_header_p, elf_64_file_p): New functions.
16659 (siginfo_fixup): New function.
16660 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
16661 give target a chance to convert layout.
16662 * linux-low.h (linux_target_ops): New member siginfo_fixup.
16663 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
16664
16665 2009-05-07 Doug Evans <dje@google.com>
16666
16667 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
16668 (regsets_store_inferior_registers): Ditto.
16669
16670 2009-05-06 Pedro Alves <pedro@codesourcery.com>
16671
16672 PR server/10048
16673
16674 * linux-low.c (must_set_ptrace_flags): Delete.
16675 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
16676 of the global.
16677 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
16678 `lwp->must_set_ptrace_flags' instead.
16679 (linux_wait_for_event_1): Set ptrace options here.
16680 (linux_wait_1): ... not here.
16681
16682 2009-04-30 Doug Evans <dje@google.com>
16683
16684 * inferiors.c (started_inferior_callback): New function.
16685 (attached_inferior_callback): New function.
16686 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
16687 * server.c (print_started_pid, print_attached_pid): New functions.
16688 (detach_or_kill_for_exit): New function.
16689 (main): Call it instead of for_each_inferior (kill_inferior_callback).
16690 * server.h (have_started_inferiors_p): Declare.
16691 (have_attached_inferiors_p): Declare.
16692
16693 * inferiors.c (remove_process): Fix memory leak, free process.
16694 * linux-low.c (linux_remove_process): New function.
16695 (linux_kill): Call it instead of remove_process.
16696 (linux_detach, linux_wait_1): Ditto.
16697
16698 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
16699
16700 * configure.srv: Add x86 Windows CE target.
16701
16702 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
16703
16704 * inferiors.c (get_thread_process): Make global.
16705 * server.h (get_thread_process): Add prototype.
16706 * thread-db.c (find_one_thread): Use get_thread_process
16707 instead of current_process.
16708 (thread_db_get_tls_address): Do not crash if called when
16709 thread layer is not yet initialized.
16710
16711 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
16712
16713 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
16714 * spu-low.c (current_tid): Rename to ...
16715 (current_ptid): ... this.
16716 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
16717 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
16718 ptid_get_lwp (current_ptid) instead of current_tid.
16719 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
16720 instead of current_tid. Use find_process_pid to verify pid
16721 argument is valid. Pass proper argument to remove_process.
16722 (spu_thread_alive): Compare current_ptid instead of current_tid.
16723 (spu_resume): Likewise.
16724
16725 2009-04-02 Pedro Alves <pedro@codesourcery.com>
16726
16727 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
16728 variable.
16729
16730 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16731
16732 Implement the multiprocess extensions, and add linux multiprocess
16733 support.
16734
16735 * server.h (ULONGEST): Declare.
16736 (struct ptid, ptid_t): New.
16737 (minus_one_ptid, null_ptid): Declare.
16738 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
16739 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
16740 (struct inferior_list_entry): Change `id' type from unsigned from
16741 to ptid_t.
16742 (struct sym_cache, struct breakpoint, struct
16743 process_info_private): Forward declare.
16744 (struct process_info): Declare.
16745 (current_process): Declare.
16746 (all_processes): Declare.
16747 (initialize_inferiors): Declare.
16748 (add_thread): Adjust to use ptid_t.
16749 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
16750 (add_process, remove_process, find_thread_pid): Declare.
16751 (find_inferior_id): Adjust to use ptid_t.
16752 (cont_thread, general_thread, step_thread): Change type to ptid_t.
16753 (multi_process): Declare.
16754 (push_event): Adjust to use ptid_t.
16755 (read_ptid, write_ptid): Declare.
16756 (prepare_resume_reply): Adjust to use ptid_t.
16757 (clear_symbol_cache): Declare.
16758 * inferiors.c (all_processes): New.
16759 (null_ptid, minus_one_ptid): New.
16760 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
16761 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
16762 (add_thread): Change unsigned long to ptid. Remove gdb_id
16763 parameter. Adjust.
16764 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
16765 (gdb_id_to_thread): Rename to ...
16766 (find_thread_pid): ... this. Change unsigned long to ptid.
16767 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
16768 (loaded_dll, pull_pid_from_list): Adjust.
16769 (add_process, remove_process, find_process_pid)
16770 (get_thread_process, current_process, initialize_inferiors): New.
16771 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
16772 (struct target_waitstatus) <related_pid>: Ditto.
16773 (struct target_ops) <kill, detach>: Add `pid' argument. Change
16774 return type to int.
16775 (struct target_ops) <join>: Add `pid' argument.
16776 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
16777 (struct target_ops) <wait>: Add `ptid' field. Change return type
16778 to ptid.
16779 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
16780 (mywait): Add `ptid' argument. Change return type to ptid_t.
16781 (target_pid_to_str): Declare.
16782 * target.c (set_desired_inferior): Adjust to use ptids.
16783 (mywait): Add new `ptid' argument. Adjust.
16784 (target_pid_to_str): New.
16785 * mem-break.h (free_all_breakpoints): Declare.
16786 * mem-break.c (breakpoints): Delelete.
16787 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
16788 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
16789 to use per-process breakpoint list.
16790 (free_all_breakpoints): New.
16791 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
16792 (symbol_cache, all_symbols_looked_up): Delete.
16793 (hexchars): New.
16794 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
16795 read_ptid): New.
16796 (prepare_resume_reply): Change ptid argument's type from unsigned
16797 long to ptid_t. Adjust. Implement W;process and X;process.
16798 (free_sym_cache, clear_symbol_cache): New.
16799 (look_up_one_symbol): Adjust to per-process symbol cache. *
16800 * server.c (cont_thread, general_thread, step_thread): Change type
16801 to ptid_t.
16802 (attached): Delete.
16803 (multi_process): New.
16804 (last_ptid): Change type to ptid_t.
16805 (struct vstop_notif) <ptid>: Change type to ptid_t.
16806 (queue_stop_reply, push_event): Change `ptid' argument's type to
16807 ptid_t.
16808 (discard_queued_stop_replies): Add `pid' argument.
16809 (start_inferior): Adjust to use ptids. Adjust to mywait interface
16810 changes. Don't reference the `attached' global.
16811 (attach_inferior): Adjust to mywait interface changes.
16812 (handle_query): Adjust to use ptids. Parse GDB's qSupported
16813 features. Handle and report "multiprocess+". Handle
16814 "qAttached:PID".
16815 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
16816 changes.
16817 (handle_v_kill): New.
16818 (handle_v_stopped): Adjust to use target_pid_to_str.
16819 (handle_v_requests): Allow multiple attaches and runs when
16820 multiprocess extensions are in effect. Handle "vKill".
16821 (myresume): Adjust to use ptids.
16822 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
16823 (handle_status): Adjust to discard_queued_stop_replies interface
16824 change.
16825 (first_thread_of, kill_inferior_callback)
16826 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
16827 (main): Call initialize_inferiors. Adjust to use ptids, killing
16828 and detaching from all inferiors. Handle multiprocess packet
16829 variants.
16830 * linux-low.h: Include gdb_proc_service.h.
16831 (struct process_info_private): New.
16832 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
16833 <lwpid_of>: Use ptid_get_lwp.
16834 (get_lwp_thread): Adjust.
16835 (struct lwp_info): Add `dead' member.
16836 (find_lwp_pid): Declare.
16837 * linux-low.c (thread_db_active): Delete.
16838 (new_inferior): Adjust comment.
16839 (inferior_pid): Delete.
16840 (linux_add_process): New.
16841 (handle_extended_wait): Adjust.
16842 (add_lwp): Change unsigned long to ptid.
16843 (linux_create_inferior): Add process to processes table. Adjust
16844 to use ptids. Don't set new_inferior here.
16845 (linux_attach_lwp): Rename to ...
16846 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
16847 it. Adjust to use ptids.
16848 (linux_attach_lwp): New.
16849 (linux_attach): Add process to processes table. Don't set
16850 new_inferior here.
16851 (struct counter): New.
16852 (second_thread_of_pid_p, last_thread_of_process_p): New.
16853 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
16854 multiple processes.
16855 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
16856 processes. Remove process from process table.
16857 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
16858 to multiple processes.
16859 (any_thread_of): New.
16860 (linux_detach): Add `pid' argument, and handle it. Remove process
16861 from processes table.
16862 (linux_join): Add `pid' argument. Handle it.
16863 (linux_thread_alive): Change unsighed long argument to ptid_t.
16864 Consider dead lwps as not being alive.
16865 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
16866 threads we're not interested in.
16867 (same_lwp, find_lwp_pid): New.
16868 (linux_wait_for_lwp): Change `pid' argument's type from int to
16869 ptid_t. Adjust.
16870 (linux_wait_for_event): Rename to ...
16871 (linux_wait_for_event_1): ... this. Change `pid' argument's type
16872 from int to ptid_t. Adjust.
16873 (linux_wait_for_event): New.
16874 (linux_wait_1): Add `ptid' argument. Change return type to
16875 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
16876 that exit from the process table.
16877 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
16878 Adjust.
16879 (mark_lwp_dead): New.
16880 (wait_for_sigstop): Adjust to use ptids. If a process exits while
16881 stopping all threads, mark its main lwp as dead.
16882 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
16883 ptids.
16884 (fetch_register, usr_store_inferior_registers)
16885 (regsets_fetch_inferior_registers)
16886 (regsets_store_inferior_registers, linux_read_memory)
16887 (linux_write_memory): Inline `inferior_pid'.
16888 (linux_look_up_symbols): Adjust to use per-process
16889 `thread_db_active'.
16890 (linux_request_interrupt): Adjust to use ptids.
16891 (linux_read_auxv): Inline `inferior_pid'.
16892 (initialize_low): Don't reference thread_db_active.
16893 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
16894 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
16895 (ps_getpid): Return the pid of the current inferior.
16896 * thread-db.c (proc_handle, thread_agent): Delete.
16897 (thread_db_create_event, thread_db_enable_reporting): Adjust to
16898 per-process data.
16899 (find_one_thread): Change argument type to ptid_t. Adjust to
16900 per-process data.
16901 (maybe_attach_thread): Adjust to per-process data and ptids.
16902 (thread_db_find_new_threads): Ditto.
16903 (thread_db_init): Ditto.
16904 * spu-low.c (spu_create_inferior, spu_attach): Add process to
16905 processes table. Adjust to use ptids.
16906 (spu_kill, spu_detach): Adjust interface. Remove process from
16907 processes table.
16908 (spu_join, spu_thread_alive): Adjust interface.
16909 (spu_wait): Adjust interface. Remove process from processes
16910 table. Adjust to use ptids.
16911 * win32-low.c (current_inferior_tid): Delete.
16912 (current_inferior_ptid): New.
16913 (debug_event_ptid): New.
16914 (thread_rec): Take a ptid. Adjust.
16915 (child_add_thread): Add `pid' argument. Adjust to use ptids.
16916 (child_delete_thread): Ditto.
16917 (do_initial_child_stuff): Add `attached' argument. Add process to
16918 processes table.
16919 (child_fetch_inferior_registers, child_store_inferior_registers):
16920 Adjust.
16921 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
16922 (win32_attach): Pass 1 to do_initial_child_stuff.
16923 (win32_kill): Adjust interface. Remove process from processes
16924 table.
16925 (win32_detach): Ditto.
16926 (win32_join): Adjust interface.
16927 (win32_thread_alive): Take a ptid.
16928 (win32_resume): Adjust to use ptids.
16929 (get_child_debug_event): Ditto.
16930 (win32_wait): Adjust interface. Remove exiting process from
16931 processes table.
16932
16933 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16934
16935 Non-stop mode support.
16936
16937 * server.h (non_stop): Declare.
16938 (gdb_client_data, handler_func): Declare.
16939 (delete_file_handler, add_file_handler, start_event_loop):
16940 Declare.
16941 (handle_serial_event, handle_target_event, push_event)
16942 (putpkt_notif): Declare.
16943 * target.h (enum resume_kind): New.
16944 (struct thread_resume): Replace `step' field by `kind' field.
16945 (TARGET_WNOHANG): Define.
16946 (struct target_ops) <wait>: Add `options' argument.
16947 <supports_non_stop, async, start_non_stop>: New fields.
16948 (target_supports_non_stop, target_async): New.
16949 (start_non_stop): Declare.
16950 (mywait): Add `options' argument.
16951 * target.c (mywait): Add `options' argument. Print child exit
16952 notifications here.
16953 (start_non_stop): New.
16954 * server.c (non_stop, own_buf, mem_buf): New globals.
16955 (struct vstop_notif): New.
16956 (notif_queue): New global.
16957 (queue_stop_reply, push_event, discard_queued_stop_replies)
16958 (send_next_stop_reply): New.
16959 (start_inferior): Adjust to use resume_kind. Adjust to mywait
16960 interface changes.
16961 (attach_inferior): In non-stop mode, don't wait for the target
16962 here.
16963 (handle_general_set): Handle QNonStop.
16964 (handle_query): When handling qC, return the current general
16965 thread, instead of the first thread of the list.
16966 (handle_query): If the backend supports non-stop mode, include
16967 QNonStop+ in the qSupported query response.
16968 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
16969 and non-stop mode.
16970 (handle_v_attach, handle_v_run): Handle non-stop mode.
16971 (handle_v_stopped): New.
16972 (handle_v_requests): Report support for vCont;t. Handle vStopped.
16973 (myresume): Adjust to use resume_kind. Handle non-stop.
16974 (queue_stop_reply_callback): New.
16975 (handle_status): Handle non-stop mode.
16976 (main): Clear non_stop flag on reconnection. Use the event-loop.
16977 Refactor serial protocol handling from here ...
16978 (process_serial_event): ... to this new function. When GDB
16979 selects any thread, select one here. In non-stop mode, wait until
16980 GDB acks all pending events before exiting.
16981 (handle_serial_event, handle_target_event): New.
16982 * remote-utils.c (remote_open): Install remote_desc in the event
16983 loop.
16984 (remote_close): Remove remote_desc from the event loop.
16985 (putpkt_binary): Rename to...
16986 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
16987 (putpkt_binary): New as wrapper around putpkt_binary_1.
16988 (putpkt_notif): New.
16989 (prepare_resume_reply): In non-stop mode, don't change the
16990 general_thread.
16991 * event-loop.c: New.
16992 * Makefile.in (OBJ): Add event-loop.o.
16993 (event-loop.o): New rule.
16994
16995 * linux-low.h (pid_of): Moved here.
16996 (lwpid_of): New.
16997 (get_lwp_thread): Use lwpid_of.
16998 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
16999 * linux-low.c (pid_of): Delete.
17000 (inferior_pid): Use lwpid_of.
17001 (linux_event_pipe): New.
17002 (target_is_async_p): New.
17003 (delete_lwp): New.
17004 (handle_extended_wait): Use lwpid_of.
17005 (add_lwp): Don't set lwpid field.
17006 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
17007 (linux_kill_one_lwp): If killing a running lwp, stop it first.
17008 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
17009 (linux_detach_one_lwp): If detaching from a running lwp, stop it
17010 first. Adjust to linux_wait_for_event interface changes. Use
17011 lwpid_of.
17012 (linux_detach): Don't delete the main lwp here.
17013 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
17014 (status_pending_p): Don't consider explicitly suspended lwps.
17015 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
17016 pointer. Add OPTIONS argument. Change return type to int. Use
17017 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
17018 (linux_wait_for_event): Take an integer pid instead of a lwp_info
17019 pointer. Add status pointer argument. Return a pid instead of a
17020 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
17021 changes. In non-stop mode, don't switch to a random thread.
17022 (linux_wait): Rename to...
17023 (linux_wait_1): ... this. Add target_options argument, and handle
17024 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
17025 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
17026 clean exit and signal exit code. Don't stop all threads in
17027 non-stop mode. In all-stop mode, only stop all threads when
17028 reporting a stop to GDB. Handle explicit thread stop requests.
17029 (async_file_flush, async_file_mark): New.
17030 (linux_wait): New.
17031 (send_sigstop): Use lwpid_of.
17032 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
17033 interface changes. In non-stop mode, don't switch to a random
17034 thread.
17035 (linux_resume_one_lwp): Use lwpid_of.
17036 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
17037 (linux_resume_one_thread): ... this. Handle resume_stop. In
17038 non-stop mode, don't look for pending flag in all threads.
17039 (resume_status_pending_p): Don't consider explicitly suspended
17040 threads.
17041 (my_waitpid): Reimplement. Emulate __WALL.
17042 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
17043 Use lwpid_of.
17044 (sigchld_handler, linux_supports_non_stop, linux_async)
17045 (linux_start_non_stop): New.
17046 (linux_target_ops): Register linux_supports_non_stop, linux_async
17047 and linux_start_non_stop.
17048 (initialize_low): Install SIGCHLD handler.
17049 * thread-db.c (thread_db_create_event, find_one_thread)
17050 (thread_db_get_tls_address): Use lwpid_of.
17051 * win32-low.c (win32_detach): Adjust to use resume_kind.
17052 (win32_wait): Add `options' argument.
17053 * spu-low.c (spu_resume): Adjust to use resume_kind.
17054 (spu_wait): Add `options' argument.
17055
17056 2009-04-01 Pedro Alves <pedro@codesourcery.com>
17057
17058 Decouple target code from remote protocol.
17059
17060 * target.h (enum target_waitkind): New.
17061 (struct target_waitstatus): New.
17062 (struct target_ops) <wait>: Return an unsigned long. Take a
17063 target_waitstatus pointer instead of a char pointer.
17064 (mywait): Likewise.
17065 * target.c (mywait): Change prototype to return an unsigned long.
17066 Take a target_waitstatus pointer instead of a char pointer. Adjust.
17067 * server.h (thread_from_wait, old_thread_from_wait): Delete
17068 declarations.
17069 (prepare_resume_reply): Change prototype to take a
17070 target_waitstatus.
17071 * server.c (thread_from_wait, old_thread_from_wait): Delete.
17072 (last_status, last_ptid): New.
17073 (start_inferior): Remove "statusptr" argument. Adjust. Return a
17074 pid instead of a signal.
17075 (attach_inferior): Remove "status" and "signal" parameters.
17076 Adjust.
17077 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
17078 not as an address.
17079 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
17080 (handle_v_requests, myresume): Remove "status" and "signal"
17081 parameters. Adjust.
17082 (handle_status): New.
17083 (main): Delete local `status'. Adjust.
17084 * remote-utils.c: Include target.h.
17085 (prepare_resume_reply): Change prototype to take a
17086 target_waitstatus. Adjust.
17087
17088 * linux-low.c (linux_wait): Adjust to new target_ops->wait
17089 interface.
17090 * spu-low.c (spu_wait): Adjust.
17091 * win32-low.c (enum target_waitkind, struct target_waitstatus):
17092 Delete.
17093 (win32_wait): Adjust.
17094
17095 2009-04-01 Pedro Alves <pedro@codesourcery.com>
17096
17097 * target.h (struct thread_resume): Delete leave_stopped member.
17098 (struct target_ops): Add a `n' argument to the `resume' callback.
17099 * server.c (start_inferior): Adjust.
17100 (handle_v_cont, myresume): Adjust.
17101 * linux-low.c (check_removed_breakpoint): Adjust to resume
17102 interface change, and to removed leave_stopped field.
17103 (resume_ptr): Delete.
17104 (struct thread_resume_array): New.
17105 (linux_set_resume_request): Add new `arg' parameter. Adjust to
17106 resume interface change.
17107 (linux_continue_one_thread, linux_queue_one_thread)
17108 (resume_status_pending_p): Check if the resume field is NULL
17109 instead of checking the leave_stopped member.
17110 (linux_resume): Adjust to the target resume interface change.
17111 * spu-low.c (spu_resume): Adjust to the target resume interface
17112 change.
17113 * win32-low.c (win32_detach, win32_resume): Ditto.
17114
17115 2009-04-01 Pedro Alves <pedro@codesourcery.com>
17116
17117 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
17118 flag.
17119 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
17120 pending.
17121 (linux_continue_one_thread): Only preserve the stepping flag if
17122 there's a pending breakpoint.
17123
17124 2009-03-31 Pedro Alves <pedro@codesourcery.com>
17125
17126 * server.c (main): After the inferior having exited, call
17127 remote_close before exiting gdbserver.
17128
17129 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
17130
17131 Fix size of FPSCR in Power 7 processors.
17132 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
17133 (PPC_FEATURE_HAS_DFP): New #define.
17134 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
17135 size of the FPSCR.
17136
17137 2009-03-23 Pedro Alves <pedro@codesourcery.com>
17138
17139 * server.c (handle_query) Whitespace and formatting.
17140
17141 2009-03-22 Pedro Alves <pedro@codesourcery.com>
17142
17143 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
17144 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
17145 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
17146 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
17147 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
17148 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
17149 Makefile.in, configure.ac: Fix whitespace throughout.
17150 * configure: Regenerate.
17151
17152 2009-03-22 Pedro Alves <pedro@codesourcery.com>
17153
17154 * inferiors.c (find_inferior): Make it safe for the callback
17155 function to delete the currently iterated inferior.
17156
17157 2009-03-22 Pedro Alves <pedro@codesourcery.com>
17158
17159 * Makefile.in (linuw_low_h): Move higher.
17160 (thread-db.o): Depend on $(linux_low_h).
17161
17162 2009-03-17 Pedro Alves <pedro@codesourcery.com>
17163
17164 Rename "process" to "lwp" throughout.
17165
17166 * linux-low.c (all_processes): Rename to...
17167 (all_lwps): ... this.
17168 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
17169 (add_process): Rename to ...
17170 (add_lwp): ... this. Adjust.
17171 (linux_create_inferior): Adjust.
17172 (linux_attach_lwp): Adjust.
17173 (linux_attach): Adjust.
17174 (linux_kill_one_process): Rename to ...
17175 (linux_kill_one_lwp): ... this. Adjust.
17176 (linux_kill): Adjust.
17177 (linux_detach_one_process): Rename to ...
17178 (linux_detach_one_lwp): ... this. Adjust.
17179 (linux_detach): Adjust.
17180 (check_removed_breakpoint): Adjust.
17181 (status_pending_p): Adjust.
17182 (linux_wait_for_process): Rename to ...
17183 (linux_wait_for_lwp): ... this. Adjust.
17184 (linux_wait_for_event): Adjust.
17185 (send_sigstop): Adjust.
17186 (wait_for_sigstop): Adjust.
17187 (stop_all_processes): Rename to ...
17188 (stop_all_lwps): ... this.
17189 (linux_resume_one_process): Rename to ...
17190 (linux_resume_one_lwp): ... this. Adjust.
17191 (linux_set_resume_request, linux_continue_one_thread)
17192 (linux_queue_one_thread, resume_status_pending_p)
17193 (usr_store_inferior_registers, regsets_store_inferior_registers)
17194 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
17195 Adjust.
17196 * linux-low.h (get_process): Rename to ...
17197 (get_lwp): ... this. Adjust.
17198 (get_thread_process): Rename to ...
17199 (get_thread_lwp): ... this. Adjust.
17200 (get_process_thread): Rename to ...
17201 (get_lwp_thread): ... this. Adjust.
17202 (struct process_info): Rename to ...
17203 (struct lwp_info): ... this.
17204 (all_processes): Rename to ...
17205 (all_lwps): ... this.
17206 * proc-service.c (ps_lgetregs): Adjust.
17207 * thread-db.c (thread_db_create_event, find_one_thread)
17208 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
17209
17210 2009-03-14 Pedro Alves <pedro@codesourcery.com>
17211
17212 * server.c (handle_query): Handle "qAttached".
17213
17214 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
17215
17216 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
17217 GPLv3, update license URL.
17218
17219 2009-03-01 Doug Evans <dje@google.com>
17220
17221 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
17222 (server_h): Add gdb_signals.h.
17223 (signals.o): Update.
17224 * server.h (target_signal_from_host,target_signal_to_host_p)
17225 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
17226
17227 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
17228
17229 * remote-utils.c (getpkt): Also generate remote-debug
17230 information if noack_mode is set.
17231
17232 2009-02-06 Pedro Alves <pedro@codesourcery.com>
17233
17234 * server.c (handle_query): Report qXfer:siginfo:read and
17235 qXfer:siginfo:write as supported and handle them.
17236 * target.h (struct target_ops) <qxfer_siginfo>: New field.
17237 * linux-low.c (linux_xfer_siginfo): New.
17238 (linux_target_ops): Set it.
17239
17240 2009-01-26 Pedro Alves <pedro@codesourcery.com>
17241
17242 * server.c (gdbserver_usage): Mention --remote-debug.
17243 (main): Accept '--remote-debug' switch.
17244
17245 2009-01-18 Doug Evans <dje@google.com>
17246
17247 * regcache.c (new_register_cache): No need to check result of xcalloc.
17248 * server.c (handle_search_memory): Back out calls to xmalloc,
17249 result is checked and error is returned to user upon failure.
17250 (handle_query): Ditto. Add more checks for result of malloc.
17251 (handle_v_cont): Check result of malloc, report error back to
17252 user upon failure.
17253 (handle_v_run): Ditto. Call freeargv.
17254 * server.h (freeargv): Declare.
17255 * utils.c (freeargv): New fn.
17256
17257 2009-01-15 Doug Evans <dje@google.com>
17258
17259 * gdbreplay.c (perror_with_name): Make arg const char *.
17260 * server.h (target_signal_to_name): Make return type const char *.
17261 * thread-db.c (thread_db_err_str): Make return type const char *.
17262 * utils.c (perror_with_name): Make arg const char *.
17263
17264 2009-01-14 Pedro Alves <pedro@codesourcery.com>
17265
17266 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
17267 when handling a EXIT_PROCESS_DEBUG_EVENT.
17268
17269 2009-01-06 Joel Brobecker <brobecker@adacore.com>
17270
17271 * gdbreplay.c (gdbreplay_version): Update copyright year.
17272 * server.c (gdbserver_version): Likewise.
17273
17274 2009-01-05 Doug Evans <dje@google.com>
17275
17276 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
17277 (handle_extended_wait): Improve comment.
17278
17279 2008-12-13 Doug Evans <dje@google.com>
17280
17281 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
17282 * server.h (ATTR_MALLOC): New macro.
17283 (xmalloc,xcalloc,xstrdup): Declare.
17284 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
17285 * inferiors.c: Ditto.
17286 * linux-low.c: Ditto.
17287 * mem-break.c: Ditto.
17288 * regcache.c: Ditto.
17289 * remote-utils.c: Ditto.
17290 * server.c: Ditto.
17291 * target.c: Ditto.
17292 * win32-low.c: Ditto.
17293
17294 2008-12-12 Doug Evans <dje@google.com>
17295
17296 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
17297 in debugging printf.
17298
17299 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
17300
17301 2008-12-09 Doug Evans <dje@google.com>
17302
17303 * linux-low.h (struct process_info): Delete member tid, unused.
17304 * thread-db.c (find_one_thread): Update.
17305 (maybe_attach_thread): Update.
17306
17307 2008-12-02 Pedro Alves <pedro@codesourcery.com>
17308
17309 * target.h (struct target_ops): Add qxfer_osdata member.
17310 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
17311 and dirent.h.
17312 (linux_qxfer_osdata): New functions.
17313 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
17314 callback.
17315 * server.c (handle_query): Handle "qXfer:osdata:read:".
17316 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
17317 (buffer_xml_printf): New functions.
17318 * server.h (struct buffer): New.
17319 (buffer_grow_str, buffer_grow_str0): New macros.
17320 (buffer_grow, buffer_free, buffer_init, buffer_finish)
17321 (buffer_xml_printf): Declare.
17322
17323 2008-11-24 Doug Evans <dje@google.com>
17324
17325 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
17326
17327 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
17328
17329 * server.c (handle_v_run): Always use the supplied argument list.
17330
17331 2008-11-19 Bob Wilson <bob.wilson@acm.org>
17332
17333 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
17334 (xtensa_regmap_table): Add entry for scompare1.
17335
17336 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
17337
17338 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
17339 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
17340 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
17341 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
17342 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
17343 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
17344 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
17345 XML target descriptions.
17346 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
17347 when inferior is running on an ISA 2.05 or later processor. Add
17348 special case to return offset for full 64-bit slot of FPSCR when
17349 in 32-bits.
17350
17351 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
17352
17353 * Makefile.in (SFILES, clean): Added sparc64 files.
17354 (reg-sparc64.o, reg-sparc64.c): New.
17355 * configure.srv (sparc*-*-linux*): New configuration.
17356 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
17357 syscall arguments for SPARC.
17358 (regsets_store_inferior_registers): Likewise.
17359 * linux-sparc-low.c: New file.
17360
17361 2008-10-21 Doug Evans <dje@google.com>
17362
17363 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
17364 (READLINE_DIR,READLINE_DEP): Delete.
17365 (INTERNAL_CFLAGS): Update.
17366 (LINTFLAGS): Update.
17367
17368 2008-10-10 Pedro Alves <pedro@codesourcery.com>
17369
17370 * server.c (handle_v_run): If GDB didn't specify an argv, use the
17371 whole argv from the last run, not just argv[0].
17372
17373 2008-09-08 Pedro Alves <pedro@codesourcery.com>
17374
17375 * regcache.c (new_register_cache): Return NULL if the register
17376 cache size isn't known yet.
17377 (free_register_cache): Avoid dereferencing a NULL regcache.
17378
17379 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
17380
17381 * configure.srv: Merge MIPS and MIPS64.
17382
17383 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
17384
17385 * Makefile.in (uninstall): Apply $(EXEEXT) too.
17386
17387 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
17388
17389 * Makefile.in: Add required vsx dependencies.
17390
17391 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
17392 Declare init_registers_powerpc_vsx32l.
17393 Declare init_registers_powerpc_vsx64l.
17394 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
17395 (ppc_arch_setup): Check for VSX in hwcap.
17396 (ppc_fill_vsxregset): New function.
17397 (ppc_store_vsxregset): New function.
17398 Add new VSX entry in regset_info target_regsets.
17399
17400 * configure.srv: Add new VSX dependencies.
17401
17402 2008-08-12 Pedro Alves <pedro@codesourcery.com>
17403
17404 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
17405 (remote_open): Set or clear transport_is_reliable.
17406 (putpkt_binary): Don't expect acks in noack mode.
17407 (getpkt): Don't send ack/nac in noack mode.
17408 * server.c (handle_general_set): Handle QStartNoAckMode.
17409 (handle_query): If connected by tcp pass QStartNoAckMode+ in
17410 qSupported.
17411 (main): Reset noack_mode on every connection.
17412 * server.h (noack_mode): Declare.
17413
17414 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
17415
17416 * Makefile.in (GDBREPLAY_OBS): New variable.
17417 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
17418
17419 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
17420 Daniel Jacobowitz <dan@codesourcery.com>
17421
17422 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
17423 (usr_store_inferior_registers): Likewise.
17424 (regsets_store_inferior_registers): Likewise.
17425
17426 2008-07-31 Rolf Jansen <rj@surtec.com>
17427 Pedro Alves <pedro@codesourcery.com>
17428
17429 * configure.ac: Check for memmem declaration.
17430 * server.c [HAVE_MALLOC_H]: Include malloc.h.
17431 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
17432 (disable_packet_qfThreadInfo): Unconditionally compile.
17433 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
17434 * configure, config.in: Regenerate.
17435
17436 2008-07-28 Doug Kwan <dougkwan@google.com>
17437
17438 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
17439 (linux_write_memory): Remove declaration of errno.
17440
17441 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
17442
17443 * linux-low.c (handle_extended_wait): Do not use "status"
17444 variable uninitialized.
17445
17446 2008-07-07 Pedro Alves <pedro@codesourcery.com>
17447
17448 * server.c (handle_v_attach): Inhibit reporting dll changes.
17449
17450 2008-06-27 Pedro Alves <pedro@codesourcery.com>
17451
17452 * remote-utils.c (prepare_resume_reply): If requested, don't
17453 output "thread:TID" in the T stop reply.
17454
17455 * server.c (disable_packet_vCont, disable_packet_Tthread)
17456 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
17457 (handle_query): If requested, disable support for qC, qfThreadInfo
17458 and qsThreadInfo.
17459 (handle_v_requests): If requested, disable support for vCont.
17460 (gdbserver_show_disableable): New.
17461 (main): Handle --disable-packet and --disable-packet=LIST.
17462
17463 * server.h (disable_packet_vCont, disable_packet_Tthread)
17464 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
17465
17466 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
17467
17468 * server.c (gdbserver_usage): Mention --version.
17469
17470 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
17471
17472 * Makefile.in (gdbreplay.o): New rule.
17473
17474 2008-06-06 Joseph Myers <joseph@codesourcery.com>
17475
17476 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
17477 message, not gdbserver.
17478
17479 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
17480 Nathan Sidwell <nathan@codesourcery.com>
17481 Joseph Myers <joseph@codesourcery.com>
17482
17483 * acinclude.m4: Include ../../config/acx.m4.
17484 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
17485 * configure, config.in: Regenerate.
17486 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
17487 * server.c (gdbserver_version): Print PKGVERSION.
17488 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
17489 (main): Adjust gdbserver_usage calls.
17490 * gdbreplay.c (version, host_name): Add declarations.
17491 (gdbreplay_version, gdbreplay_usage): New.
17492 (main): Accept --version and --help options.
17493
17494 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
17495
17496 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
17497 (arm_breakpoint_at): Handle Thumb.
17498 (the_low_target): Add comment.
17499
17500 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
17501
17502 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
17503
17504 2008-05-09 Doug Evans <dje@google.com>
17505
17506 * server.h (decode_search_memory_packet): Declare.
17507 * remote-utils.c (decode_search_memory_packet): New fn.
17508 * server.c (handle_search_memory_1): New fn.
17509 (handle_search_memory): New fn.
17510 (handle_query): Process qSearch:memory packets.
17511
17512 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
17513
17514 * regcache.c (registers_length): Remove.
17515 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
17516 full register packet.
17517 * regcache.h (registers_length): Remove prototype.
17518 * server.h (PBUFSIZ): Define to 16384.
17519
17520 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
17521
17522 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
17523 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
17524 powerpc-64l.o, and powerpc-altivec64l.o.
17525 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
17526 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
17527 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
17528 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
17529 rs6000/power-linux.xml, and rs6000/power64-linux.xml
17530 to srv_xmlfiles.
17531
17532 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
17533 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
17534 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
17535 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
17536 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
17537 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
17538 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
17539 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
17540 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
17541 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
17542 (clean): Update.
17543
17544 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
17545 (init_registers_powerpc_32l): ... this new prototype.
17546 (init_registers_powerpc_32): Remove, replace by ...
17547 (init_registers_powerpc_altivec32l): ... this new prototype.
17548 (init_registers_powerpc_e500): Remove, replace by ...
17549 (init_registers_powerpc_e500l): ... this new prototype.
17550 (init_registers_ppc64): Remove, replace by ...
17551 (init_registers_powerpc_64l): ... this new prototype.
17552 (init_registers_powerpc_64): Remove, replace by ...
17553 (init_registers_powerpc_altivec64l): ... this new prototype.
17554 (ppc_num_regs): Set to 73.
17555 (PT_ORIG_R3, PT_TRAP): Define if necessary.
17556 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
17557 (ppc_cannot_store_register): Handle orig_r3 and trap.
17558 (ppc_arch_setup): Update init_registers_... calls.
17559 (ppc_fill_gregset): Handle orig_r3 and trap.
17560
17561 * inferiors.c (clear_inferiors): Reset current_inferior.
17562
17563 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
17564
17565 * acinclude.m4: Add override.m4.
17566 * configure: Regenerate.
17567
17568 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
17569
17570 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
17571 initial call to init_register_ppc64.
17572
17573 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
17574
17575 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
17576 single powerpc*-*-linux* case.
17577 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
17578
17579 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
17580
17581 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
17582 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
17583 from reg_xmlfiles.
17584 * linux-ppc-low.c: Include <elf.h>.
17585 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
17586 (ppc_hwcap): New global variable.
17587 (ppc_regmap): Remove __SPE__ #ifdef sections.
17588 (ppc_regmap_e500): New global variable.
17589 (ppc_cannot_store_register): Update __SPE__ special case.
17590 (ppc_get_hwcap): New function.
17591 (ppc_arch_setup): Use it to determine whether inferior supports
17592 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
17593 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
17594 Do not access registers if target does not support AltiVec.
17595 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
17596 Do not access registers if target does not support SPE.
17597 (target_regsets): Unconditionally include AltiVec and SPE regsets.
17598
17599 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
17600
17601 * linux-low.c (disabled_regsets, num_regsets): New.
17602 (use_regsets_p): Delete.
17603 (linux_wait_for_process): Clear disabled_regsets.
17604 (regsets_fetch_inferior_registers): Check and set it.
17605 (regsets_store_inferior_registers): Likewise.
17606 (linux_fetch_registers, linux_store_registers): Do not use
17607 use_regsets_p.
17608 (initialize_low): Allocate disabled_regsets.
17609
17610 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
17611
17612 * Makefile.in (LIBOBJS): New.
17613 (OBS): Use LIBOBJS.
17614 (memmem.o): New rule.
17615 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
17616 * configure: Regenerated.
17617
17618 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
17619
17620 * server.c (handle_query): Never return "unsupported" for
17621 qXfer:features:read queries.
17622
17623 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
17624
17625 * server.c (get_features_xml): Fix inverted condition.
17626 (handle_query): Always support qXfer:feature:read.
17627
17628 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
17629
17630 * server.c (wrapper_argv): New.
17631 (start_inferior): Handle wrapper_argv. If set, expect an extra
17632 trap.
17633 (gdbserver_usage): Document --wrapper.
17634 (main): Parse --wrapper.
17635
17636 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
17637
17638 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
17639 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
17640 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
17641 (ppc_set_pc): Likewise.
17642 (ppc_arch_setup): New function.
17643 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
17644 of collect_register.
17645 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
17646
17647 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
17648
17649 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
17650 instead of linux-ppc64-low.o.
17651 * linux-ppc64-low.c: Remove file.
17652 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
17653 (linux-ppc64-low.o): Remove rule.
17654
17655 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
17656 (init_registers_powerpc_64): Likewise.
17657 (ppc_regmap): Conditionally define depending on __powerpc64__.
17658 (ppc_cannot_store_register): Do not special-case "fpscr" when
17659 compiled on __powerpc64__.
17660 (ppc_collect_ptrace_register): New function.
17661 (ppc_supply_ptrace_register): New function.
17662 (ppc_breakpoint): Change type to "unsigned int".
17663 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
17664 (the_low_target): Conditionally provide initializers for the
17665 arch_setup member depending on __powerpc64__. Install
17666 collect_ptrace_register and supply_ptrace_register members.
17667
17668 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
17669
17670 * regcache.h (gdbserver_xmltarget): Add extern declaration.
17671 * server.c (gdbserver_xmltarget): Define.
17672 (get_features_xml): Use it to replace "target.xml" and arch_string.
17673
17674 * configure.srv: Remove srv_xmltarget. Add XML files that were
17675 mentioned there to srv_xmlfiles instead. Remove conditional tests
17676 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
17677 srv_xmlfiles and srv_regobj to include all possible choices.
17678 * configure.ac (srv_xmltarget): Remove.
17679 (srv_xmlfiles): Do not add "target.xml".
17680 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
17681 checks for supplementary target information.
17682 * configure: Regenerate.
17683 * Makefile.in (XML_TARGET): Remove.
17684 (target.xml): Remove rule.
17685 (clean): Do not clean up target.xml.
17686 (.PRECIOUS): Do not mention target.xml.
17687
17688 * target.h (struct target_ops): Remove arch_string member.
17689 * linux-low.c (linux_arch_string): Remove.
17690 (linux_target_ops): Remove arch_string initializer.
17691 * linux-low.h (struct linux_target_ops): Remove arch_string member.
17692 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
17693 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
17694 * spu-low.c (spu_arch_string): Remove.
17695 (spu_target_ops): Remove arch_string initializer.
17696 * win32-low.c (win32_arch_string): Remove.
17697 (win32_target_ops): Remove arch_string initializer.
17698 * win32-low.h (struct win32_target_ops): Remove arch_string member.
17699 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
17700 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
17701
17702 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
17703
17704 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
17705 by collect_ptrace_register and supply_ptrace_register hooks.
17706 * linux-low.c (fetch_register): Use supply_ptrace_register callback
17707 instead of checking for the_low_target.left_pad_xfer.
17708 (usr_store_inferior_registers): Use collect_ptrace_register callback
17709 instead of checking for the_low_target.left_pad_xfer.
17710
17711 * linux-s390-low.c (s390_collect_ptrace_register): New function.
17712 (s390_supply_ptrace_register): Likewise.
17713 (s390_fill_gregset): Call s390_collect_ptrace_register.
17714 (the_low_target): Update.
17715
17716 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
17717 (ppc_supply_ptrace_register): Likewise.
17718 (the_low_target): Update.
17719
17720 * linux-i386-low.c (the_low_target): Update.
17721 * linux-x86-64-low.c (the_low_target): Update.
17722
17723 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
17724
17725 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
17726 reg-s390.o and reg-s390x.o.
17727
17728 * linux-low.c (new_inferior): New global variable.
17729 (linux_create_inferior, linux_attach): Set it.
17730 (linux_wait_for_process): Call the_low_target.arch_setup after the
17731 target has stopped for the first time.
17732 (initialize_low): Do not call the_low_target.arch_setup.
17733
17734 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
17735 (s390_set_pc): Likewise.
17736 (s390_arch_setup): New function.
17737 (the_low_target): Use s390_arch_setup as arch_setup routine.
17738
17739 * regcache.c (realloc_register_cache): New function.
17740 (set_register_cache): Call it for each existing regcache.
17741
17742 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
17743
17744 * server.h (init_registers): Remove prototype.
17745
17746 * linux-low.h (struct linux_target_ops): Add arch_setup field.
17747 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
17748 instead of init_registers ().
17749 * linux-arm-low.c (init_registers_arm): Add prototype.
17750 (init_registers_arm_with_iwmmxt): Likewise.
17751 (the_low_target): Add initializer for arch_setup field.
17752 * linux-cris-low.c (init_registers_cris): Add prototype.
17753 (the_low_target): Add initializer for arch_setup field.
17754 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
17755 (the_low_target): Add initializer for arch_setup field.
17756 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
17757 (the_low_target): Add initializer for arch_setup field.
17758 * linux-ia64-low.c (init_registers_ia64): Add prototype.
17759 (the_low_target): Add initializer for arch_setup field.
17760 * linux-m32r-low.c (init_registers_m32r): Add prototype.
17761 (the_low_target): Add initializer for arch_setup field.
17762 * linux-m68k-low.c (init_registers_m68k): Add prototype.
17763 (the_low_target): Add initializer for arch_setup field.
17764 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
17765 (init_registers_mips64_linux): Likewise.
17766 (the_low_target): Add initializer for arch_setup field.
17767 * linux-ppc-low.c (init_registers_ppc): Add prototype.
17768 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
17769 (the_low_target): Add initializer for arch_setup field.
17770 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
17771 (init_registers_powerpc_64): Likewise.
17772 (the_low_target): Add initializer for arch_setup field.
17773 * linux-s390-low.c (init_registers_s390): Add prototype.
17774 (init_registers_s390x): Likewise.
17775 (the_low_target): Add initializer for arch_setup field.
17776 * linux-sh-low.c (init_registers_sh): Add prototype.
17777 (the_low_target): Add initializer for arch_setup field.
17778 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
17779 (the_low_target): Add initializer for arch_setup field.
17780 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
17781 (the_low_target): Add initializer for arch_setup field.
17782
17783 * win32-low.h (struct win32_target_ops): Add arch_setup field.
17784 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
17785 instead of init_registers ().
17786 * win32-arm-low.c (init_registers_arm): Add prototype.
17787 (the_low_target): Add initializer for arch_setup field.
17788 * win32-i386-low.c (init_registers_i386): Add prototype.
17789 (the_low_target): Add initializer for arch_setup field.
17790
17791 * spu-low.c (init_registers_spu): Add prototype.
17792 (initialize_low): Call initialie_registers_spu () instead of
17793 initialize_registers ().
17794
17795 2008-02-19 Pedro Alves <pedro@codesourcery.com>
17796
17797 * server.c (handle_v_requests): When handling the vRun and vAttach
17798 packets, if already debugging a process, don't kill it. Return an
17799 error instead.
17800
17801 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
17802
17803 * server.c (handle_query): Correct length check.
17804
17805 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
17806
17807 * win32-low.c (do_initial_child_stuff): Add process handle
17808 parameter. Set current_process_handle and current_process_id from the
17809 parameters. Clear globals.
17810 (win32_create_inferior): Don't set current_process_handle and
17811 current_process_id here. Instead pass them on the call to
17812 do_initial_child_stuff.
17813 (win32_attach): Likewise.
17814 (win32_clear_inferiors): New.
17815 (win32_kill): Don't close the current process handle or the
17816 current thread handle here. Instead call win32_clear_inferiors.
17817 (win32_detach): Don't open a new handle to the process. Call
17818 win32_clear_inferiors.
17819 (win32_join): Don't rely on current_process_handle; open a new
17820 handle using the process id.
17821 (win32_wait): Call win32_clear_inferiors when the inferior process
17822 has exited.
17823
17824 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
17825
17826 * server.c (monitor_show_help): Add "exit".
17827
17828 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
17829
17830 * Makefile.in (SFILES): Add linux-xtensa-low.c.
17831 (clean): Add reg-xtensa.c.
17832 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
17833 * configure.srv (xtensa*-*-linux*) New target.
17834 * linux-xtensa-low.c: New.
17835 * xtensa-xtregs.c: New.
17836
17837 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
17838
17839 * hostio.c: Don't include errno.h.
17840 (errno_to_fileio_errno): Move to hostio-errno.
17841 * hostio.c: (hostio_error): Remove the error parameter. Defer the
17842 error number outputting to the target->hostio_last_error callback.
17843 (hostio_packet_error): Use FILEIO_EINVAL directly.
17844 (handle_open, handle_pread, hostio_error, handle_unlink): Update
17845 calls to hostio_error.
17846 * hostio-errno.c: New.
17847 * server.h (hostio_last_error_from_errno): Declare.
17848 * target.h (target_ops): Add hostio_last_error member.
17849 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
17850 as hostio_last_error handler.
17851 * spu-low.c (spu_target_ops): Likewise.
17852 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
17853 (wince_hostio_last_error): New functions.
17854 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
17855 as hostio_last_error handler.
17856 (win32_target_ops) [!_WIN32_WCE]: Register
17857 hostio_last_error_from_errno as hostio_last_error handler.
17858 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
17859 (hostio-errno.o): New rule.
17860 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
17861 * configure.srv (srv_hostio_err_objs): New variable. Default to
17862 hostio-errno.o.
17863 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
17864 * configure: Regenerate.
17865
17866 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
17867
17868 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
17869 (linux_kill, linux_detach): Clean up the process list.
17870 * remote-utils.c (remote_open): Improve port number parsing.
17871 (putpkt_binary, input_interrupt): Only send interrupts if the target
17872 is running.
17873 * server.c (extended_protocol): Make static.
17874 (attached): Define earlier.
17875 (exit_requested, response_needed, program_argv): New variables.
17876 (target_running): New.
17877 (start_inferior): Clear attached here.
17878 (attach_inferior): Set attached here.
17879 (require_running): Define.
17880 (handle_query): Use require_running and target_running. Implement
17881 "monitor exit".
17882 (handle_v_attach, handle_v_run): New.
17883 (handle_v_requests): Use require_running. Handle vAttach and vRun.
17884 (gdbserver_usage): Update.
17885 (main): Redo argument parsing. Handle --debug and --multi. Handle
17886 --attach along with other options or after the port. Save
17887 program_argv. Support no initial program. Resynchronize
17888 communication with GDB after an error. Handle "monitor exit".
17889 Use require_running and target_running. Always allow the extended
17890 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
17891 restart in extended mode.
17892 * README: Refer to the GDB manual. Update --attach usage.
17893
17894 2007-12-20 Andreas Schwab <schwab@suse.de>
17895
17896 * linux-low.c (STACK_SIZE): Define.
17897 (linux_tracefork_child): Use it. Use __clone2 on ia64.
17898 (linux_test_for_tracefork): Likewise.
17899
17900 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
17901
17902 * linux-low.c (linux_wait_for_event): Update messages. Do not
17903 reinsert auto-delete breakpoints.
17904 * mem-break.c (struct breakpoint): Change return type of handler to
17905 int.
17906 (set_breakpoint_at): Update handler type.
17907 (reinsert_breakpoint_handler): Return 1 instead of calling
17908 delete_breakpoint.
17909 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
17910 setting a new one.
17911 (check_breakpoints): Delete auto-delete breakpoints and return 2.
17912 * mem-break.h (set_breakpoint_at): Update handler type.
17913 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
17914 * win32-low.c (auto_delete_breakpoint): New.
17915 (get_child_debug_event): Use it.
17916
17917 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
17918
17919 * configure.ac: Check for pread and pwrite.
17920 * hostio.c (handle_pread): Fall back to lseek and read.
17921 (handle_pwrite): Fall back to lseek and write.
17922 * config.in, configure: Regenerated.
17923
17924 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
17925
17926 * server.c (myresume): Add own_buf argument.
17927 (main): Update calls.
17928
17929 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
17930
17931 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
17932 * remote-utils.c (remote_open): Do not call disable_async_io.
17933 (block_async_io): Delete.
17934 (unblock_async_io): Make static.
17935 (initialize_async_io): New.
17936 * server.c (handle_v_cont): Handle async I/O here.
17937 (myresume): Likewise. Move other common resume tasks here...
17938 (main): ... from here. Call initialize_async_io. Disable async
17939 I/O before the main loop.
17940 * server.h (initialize_async_io): Declare.
17941 (block_async_io, unblock_async_io): Delete prototypes.
17942 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
17943
17944 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
17945
17946 * remote-utils.c (readchar): Allow binary data in received messages.
17947
17948 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17949
17950 * win32-low.c (attaching): New global.
17951 (win32_create_inferior): Clear the `attaching' global.
17952 (win32_attach): Set the `attaching' global.
17953 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
17954 attaching. Only set a breakpoint at the entry point if not
17955 attaching.
17956
17957 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17958
17959 * server.c (main): Don't report dll events on the initial
17960 connection on attaches.
17961
17962 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17963
17964 * server.c (main): Relax numerical bases supported for the pid of
17965 the --attach command line argument.
17966
17967 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17968
17969 * win32-low.c (win32_attach): Call OpenProcess before
17970 DebugActiveProcess, not after. Add last error output to error
17971 call.
17972
17973 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17974
17975 * win32-low.c (win32_get_thread_context)
17976 (win32_set_thread_context): New functions.
17977 (thread_rec): Use win32_get_thread_context.
17978 (continue_one_thread, win32_resume): Use win32_set_thread_context.
17979 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
17980 field.
17981
17982 2007-12-03 Leo Zayas
17983 Pedro Alves <pedro_alves@portugalmail.pt>
17984
17985 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
17986 global variables.
17987 (child_add_thread): Minor cleanup.
17988 (child_continue): Resume artificially suspended threads before
17989 calling ContinueDebugEvent.
17990 (suspend_one_thread): New.
17991 (fake_breakpoint_event): New.
17992 (get_child_debug_event): Change return type to int. Check here if
17993 gdb sent an interrupt request. If a soft interrupt was requested,
17994 fake a breakpoint event. Return 0 if there is no event to handle,
17995 and 1 otherwise.
17996 (win32_wait): Don't check here if gdb sent an interrupt request.
17997 Ensure there is a valid event to handle.
17998 (win32_request_interrupt): Add soft interruption method as last
17999 resort.
18000
18001 2007-12-03 Leo Zayas
18002 Pedro Alves <pedro_alves@portugalmail.pt>
18003
18004 * win32-low.h (win32_thread_info): Add descriptions to the
18005 structure members. Replace `suspend_count' counter by a
18006 `suspended' flag.
18007 * win32-low.c (thread_rec): Update condition of when to get the
18008 context from the inferior. Rely on ContextFlags being set if it
18009 has already been retrieved. Only suspend the inferior thread if
18010 we haven't already. Warn if that fails.
18011 (continue_one_thread): s/suspend_count/suspended/. Only call
18012 ResumeThread once. Warn if that fails.
18013
18014 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
18015
18016 * win32-low.c (win32_wait): Don't read from the inferior when it
18017 has already exited.
18018
18019 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
18020
18021 * Makefile.in (win32_low_h): New variable.
18022 (win32-low.o): Add dependency on $(win32_low_h).
18023 (win32-arm-low.o, win32-i386-low.o): New rules.
18024
18025 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
18026
18027 * hostio.c: Correct copyright year.
18028
18029 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
18030
18031 * Makefile.in (OBS): Add hostio.o.
18032 (hostio.o): New rule.
18033 * server.h (handle_vFile): Declare.
18034 * hostio.c: New file.
18035 * server.c (handle_v_requests): Take packet_len and new_packet_len
18036 for binary packets. Call handle_vFile.
18037 (main): Update call to handle_v_requests.
18038
18039 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
18040
18041 * linux-low.c: Include <sched.h>.
18042
18043 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
18044
18045 * linux-low.c (linux_tracefork_grandchild): New.
18046 (linux_tracefork_child): Use clone.
18047 (linux_test_for_tracefork): Use clone; allocate and free a stack.
18048
18049 2007-10-31 Joel Brobecker <brobecker@adacore.com>
18050
18051 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
18052
18053 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
18054
18055 * linux-low.c (handle_extended_wait): Handle unexpected signals.
18056
18057 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
18058
18059 * inferiors.c (change_inferior_id): Delete.
18060 (add_pid_to_list, pull_pid_from_list): New.
18061 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
18062 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
18063 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
18064 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
18065 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
18066 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
18067 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
18068 (using_threads): Always set to 1.
18069 (handle_extended_wait): New.
18070 (add_process): Do not set TID.
18071 (linux_create_inferior): Set must_set_ptrace_flags.
18072 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
18073 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
18074 (linux_thread_alive): Rename TID argument to LWPID.
18075 (linux_wait_for_process): Handle unknown processes. Do not use TID.
18076 (linux_wait_for_event): Do not use TID or check using_threads. Update
18077 call to dead_thread_notify. Call handle_extended_wait.
18078 (linux_create_inferior): Use PTRACE_SETOPTIONS.
18079 (send_sigstop): Delete sigstop_sent.
18080 (wait_for_sigstop): Avoid TID.
18081 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
18082 (linux_test_for_tracefork): New.
18083 (linux_lookup_signals): Use thread_db_active and
18084 linux_supports_tracefork_flag.
18085 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
18086 * linux-low.h (get_process_thread): Avoid TID.
18087 (struct process_ifo): Move thread_known and tid to the end. Remove
18088 sigstop_sent.
18089 (linux_attach_lwp, thread_db_init): Update prototypes.
18090 * server.h (change_inferior_id): Delete prototype.
18091 (add_pid_to_list, pull_pid_from_list): New prototypes.
18092 * thread-db.c (thread_db_use_events): New.
18093 (find_first_thread): Rename to...
18094 (find_one_thread): ...this. Update callers and messages. Do not
18095 call fatal. Check thread_db_use_events. Do not call
18096 change_inferior_id or new_thread_notify.
18097 (maybe_attach_thread): Update. Do not call new_thread_notify.
18098 (thread_db_init): Set thread_db_use_events. Check use_events.
18099 * utils.c (fatal, warning): Correct message prefix.
18100
18101 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
18102
18103 * Makefile.in (clean): Remove new files.
18104 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
18105 (powerpc-64.o, powerpc-64.c): New rules.
18106 * configure.srv: Use alternate register sets for powerpc64-*-linux*
18107 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
18108 with SPE.
18109 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
18110 SPE targets.
18111 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
18112 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
18113 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
18114 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
18115 (target_regsets): Add AltiVec and SPE register sets.
18116 * configure.ac: Check for AltiVec and SPE.
18117 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
18118 (ppc_fill_vrregset, ppc_store_vrregset): New.
18119 (target_regsets): Add AltiVec register set.
18120 * configure: Regenerated.
18121
18122 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
18123
18124 * linux-low.c (O_LARGEFILE): Define.
18125 (linux_read_memory): Use /proc/PID/mem.
18126 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
18127 * configure, config.in: Regenerated.
18128
18129 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
18130
18131 * linux-low.c (linux_wait_for_event): Do not pass signals while
18132 single-stepping.
18133
18134 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
18135
18136 * win32-low.c (create_process): New.
18137 (win32_create_inferior): Use create_process instead of
18138 CreateProcess. If create_process failed retry appending an ".exe"
18139 suffix. Store the GetLastError result immediatelly after
18140 create_process calls and use it on the call to error.
18141
18142 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
18143
18144 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
18145
18146 2007-08-23 Joel Brobecker <brobecker@adacore.com>
18147
18148 * configure.ac: Switch license to GPLv3.
18149
18150 2007-08-01 Michael Snyder <msnyder@access-company.com>
18151
18152 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
18153
18154 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
18155
18156 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
18157 typedef.
18158 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
18159 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
18160 CloseToolhelp32Snapshot.
18161 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
18162 CloseToolhelp32Snapshot.
18163
18164 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
18165
18166 * server.c (main): Check for inferior exit before main loop.
18167
18168 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
18169
18170 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
18171 instead of on tmp_desc.
18172
18173 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
18174 Daniel Jacobowitz <dan@codesourcery.com>
18175
18176 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
18177 (add_thread): Minor cleanups.
18178 (clear_inferiors): Move lower in the file. Clear the DLL
18179 list.
18180 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
18181 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
18182 (xml_escape_text): New.
18183 * server.c (handle_query): Handle qXfer:libraries:read. Report it
18184 for qSupported.
18185 (handle_v_cont): Report errors.
18186 (gdbserver_version): Update.
18187 (main): Correct size of own_buf. Do not report initial DLL events.
18188 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
18189 (unloaded_dll, xml_escape_text): New.
18190 * win32-low.c (enum target_waitkind): Update comments.
18191 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
18192 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
18193 (win32_EnumProcessModules, win32_GetModuleInformation)
18194 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
18195 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
18196 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
18197 (win32_Module32First, win32_Module32Next, load_toolhelp)
18198 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
18199 (get_child_debug_event): Handle DLL events.
18200 (win32_wait): Likewise.
18201
18202 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
18203
18204 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
18205 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
18206
18207 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
18208
18209 * win32-low.c (handle_output_debug_string): Ignore event if not
18210 waiting.
18211
18212 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
18213
18214 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
18215
18216 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
18217
18218 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
18219
18220 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
18221
18222 * inferiors.c (change_inferior_id): Add comment.
18223 * linux-low.c (check_removed_breakpoint): Add an early
18224 prototype. Improve debug output.
18225 (linux_attach): Doc update.
18226 (linux_detach_one_process, linux_detach): Clean up before releasing
18227 each process.
18228 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
18229 * linux-low.h (struct process_info): Doc improvement.
18230 * mem-break.c (delete_all_breakpoints): New.
18231 * mem-break.h (delete_all_breakpoints): New prototype.
18232 * thread-db.c (find_first_thread): New.
18233 (thread_db_create_event): Call it instead of
18234 thread_db_find_new_threads. Clean up unused variables.
18235 (maybe_attach_thread): Remove first thread handling.
18236 (thread_db_find_new_threads): Use find_first_thread.
18237 (thread_db_get_tls_address): Likewise.
18238
18239 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
18240
18241 * thread-db.c (thread_db_find_new_threads): Add prototype.
18242 (thread_db_create_event): Check for the main thread before adding
18243 a new thread.
18244 (maybe_attach_thread): Only enable event reporting if TID == 0.
18245 (thread_db_get_tls_address): Check for new threads.
18246
18247 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
18248
18249 * linux-low.c (linux_create_inferior): Try execv before execvp.
18250 * spu-low.c (spu_create_inferior): Likewise.
18251
18252 2007-06-13 Mike Frysinger <vapier@gentoo.org>
18253
18254 * linux-low.c (linux_create_inferior): Change execv to execvp.
18255 * spu-low.c (spu_create_inferior): Likewies.
18256
18257 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
18258
18259 * Makefile.in (clean): Clean new files instead of deleted ones.
18260 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
18261 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
18262 rules.
18263 * configure.srv: Specify XML files and new regformats for MIPS and
18264 MIPS64 GNU/Linux.
18265 * linux-mips-low.c (mips_num_regs): Set to only used registers.
18266 (mips_regmap): Do not fetch $0. Remove unused registers. Add
18267 an entry for the restart register.
18268 (mips_cannot_fetch_register, mips_cannot_store_register)
18269 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
18270 register names to match the XML descriptions.
18271 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
18272 restart register instead of $0.
18273
18274 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
18275 Markus Deuling <deuling@de.ibm.com>
18276
18277 * remote-utils.c (decode_xfer_write): New function.
18278 * server.h (decode_xfer_write): Add prototype.
18279 * server.c (handle_query): Add PACKET_LEN argument. Support
18280 qXfer:spu:read and qXfer:spu:write packets.
18281 (main): Pass packet_len to handle_query.
18282 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
18283 * target.h (target_ops): Add qxfer_spu.
18284
18285 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
18286
18287 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
18288 accessing non-seekable spufs files.
18289
18290 2007-05-16 Markus Deuling <deuling@de.ibm.com>
18291
18292 * server.c (handle_query): Add reply for qC packet.
18293
18294 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
18295 Leo Zayas <lerele@champenstudios@com>
18296
18297 * server.h (check_remote_input_interrupt_request): New function.
18298 * remote_utils.c (INVALID_DESCRIPTOR): New define.
18299 (remote_desc): Initialize with INVALID_DESCRIPTOR.
18300 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
18301 (check_remote_input_interrupt_request): New function.
18302 * server.h (check_remote_input_interrupt_request): Declare.
18303 * win32-low.c (winapi_DebugBreakProcess,
18304 winapi_GenerateConsoleCtrlEvent): New typedefs.
18305 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
18306 to 250 ms.
18307 (win32_wait): Check for remote interrupt request
18308 with check_remote_input_interrupt_request.
18309 (win32_request_interrupt): New function.
18310 (win32_target_op): Set request_interrupt to win32_request_interrupt.
18311
18312 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
18313
18314 * win32-low.c (debug_registers_changed,
18315 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
18316 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
18317 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
18318 (thread_rec): Get context using the low target.
18319 (child_add_thread): Call thread_added on the low target,
18320 which does the same thing.
18321 (regptr): Delete.
18322 (do_initial_child_stuff): Remove debug registers references.
18323 Set context using the low target. Resume threads after
18324 setting the contexts.
18325 (child_continue): Remove dead variable. Remove debug
18326 registers references.
18327 (child_fetch_inferior_registers): Go through the low target.
18328 (do_child_store_inferior_registers): Remove.
18329 (child_store_inferior_registers): Go through the low target.
18330 (win32_resume): Remove debug registers references.
18331 Set context using the low target.
18332 (handle_exception): Change return type to void. Don't record
18333 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
18334 first chance exception.
18335 (get_child_debug_event): Change return type to void. Remove
18336 goto loop. Always return after waiting for debug event.
18337 (win32_wait): Convert to switch statement. Handle spurious
18338 events.
18339
18340 * win32-i386-low.c (debug_registers_changed,
18341 debug_registers_used): New.
18342 (initial_stuff): Rename to ...
18343 (i386_initial_stuff): ... this. Clear debug registers
18344 state variables.
18345 (store_debug_registers): Delete.
18346 (i386_get_thread_context): New.
18347 (load_debug_registers): Delete.
18348 (i386_set_thread_context): New.
18349 (i386_thread_added): New.
18350 (single_step): Rename to ...
18351 (i386_single_step): ... this.
18352 (do_fetch_inferior_registers): Rename to ...
18353 (i386_fetch_inferior_register): ... this.
18354 (i386_store_inferior_register): New.
18355 (the_low_target): Adapt to new interface.
18356
18357 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
18358 (arm_get_thread_context): New.
18359 (arm_set_thread_context): New.
18360 (regptr): New.
18361 (do_fetch_inferior_registers): Rename to ...
18362 (arm_fetch_inferior_register): ... this.
18363 (arm_store_inferior_register): New.
18364 (arm_wince_breakpoint): Reimplement as unsigned long.
18365 (arm_wince_breakpoint_len): Define.
18366 (the_low_target): Adapt to new interface.
18367
18368 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
18369 load_debug_registers. Add get_thread_context, set_thread_context,
18370 thread_added and store_inferior_register. Rename
18371 fetch_inferior_registers to fetch_inferior_register.
18372 (regptr): Remove declaration.
18373
18374 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
18375
18376 * linux-low.c (linux_detach): Change return type to int. Return 0.
18377 * spu-low.c (spu_detach): Likewise.
18378
18379 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
18380
18381 * target.h (target_ops): Change return type of detach to int.
18382 Add join.
18383 (join_inferior): New.
18384 * server.c (main): Don't skip detach support on mingw32.
18385 If the inferior doesn't support detaching return error.
18386 Call join_inferior instead of using waitpid.
18387 * linux-low.c (linux_join): New.
18388 (linux_target_op): Add linux_join.
18389 * spu-low.c (spu_join): New.
18390 (spu_target_ops): Add spu_join.
18391 * win32-low.c (win32_detach): Adapt to new interface.
18392 Reopen current_process_handle before detaching. Issue a child
18393 resume before detaching.
18394 (win32_join): New.
18395 (win32_target_op): Add win32_join.
18396
18397 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
18398
18399 * win32-low.c (win32-attach): Fix return value.
18400 * target.h (target_ops): Describe ATTACH return values.
18401
18402 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
18403
18404 * win32-low.c (GETPROCADDRESS): Define.
18405 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
18406 (winapi_DebugSetProcessKillOnExit): Likewise.
18407 (win32_create_inferior): Force usage of ansi CreateProcessA.
18408 (win32_attach): Use GETPROCADDRESS.
18409 (win32_detach): Likewise.
18410
18411 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
18412
18413 * win32-low.c (win32_wait): Don't use WSTOPSIG.
18414
18415 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
18416
18417 * win32-low.c: Commit leftover changes from 2007-03-29.
18418
18419 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
18420
18421 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
18422 fields short instead of int. Add explicit padding.
18423 (i387_cache_to_fsave): Remove unnecessary casts.
18424 (i387_fsave_to_cache): Doc fix.
18425 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
18426
18427 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
18428
18429 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
18430 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
18431
18432 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
18433
18434 * configure.srv (arm*-*-mingw32ce*): Move near the other
18435 arm targets.
18436
18437 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
18438
18439 * configure.ac: Add errno checking.
18440 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
18441 sys/file.h and malloc.h.
18442 (AC_CHECK_DECLS): Add perror.
18443 (srv_mingwce): Handle.
18444 * configure.srv (i[34567]86-*-cygwin*): Add
18445 win32-i386-low.o to srv_tgtobj.
18446 (i[34567]86-*-mingw*): Likewise.
18447 (arm*-*-mingw32ce*): Add case.
18448 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
18449 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
18450 [__MINGW32CE__] (strerror): New function.
18451 [__MINGW32CE__] (errno): Define to GetLastError.
18452 [__MINGW32CE__] (COUNTOF): New macro.
18453 (remote_open): Remove extra close call.
18454 * mem-break.c (delete_breakpoint_at): New function.
18455 * mem-break.h (delete_breakpoint_at): Declare.
18456 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
18457 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
18458 [USE_WIN32API] (read, write): Add char* casts.
18459 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
18460 * server.h: Include wincecompat.h on Windows CE.
18461 [HAVE_ERRNO_H]: Check.
18462 (perror): Declare if not declared.
18463 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
18464 (perror_with_name): Remove errno declaration.
18465 * wincecompat.h: New.
18466 * wincecompat.c: New.
18467 * win32-low.h: New.
18468 * win32-arm-low.c: New.
18469 * win32-i386-low.c: New.
18470 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
18471 (OUTMSG2): Make it safe.
18472 (_T): New macro.
18473 (COUNTOF): New macro.
18474 (NUM_REGS): Get it from the low target.
18475 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
18476 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
18477 (thread_rec): Let low target handle debug registers.
18478 (child_add_thread): Likewise.
18479 (child_init_thread_list): Likewise.
18480 (continue_one_thread): Likewise.
18481 (regptr): New.
18482 (do_child_fetch_inferior_registers): Move to ...
18483 * win32-i386-low.c: ... here, and rename to ...
18484 (do_fetch_inferior_registers): ... this.
18485 * win32-low.c (child_fetch_inferior_registers):
18486 Go through the low target.
18487 (do_child_store_inferior_registers): Use regptr.
18488 (strwinerror): New function.
18489 (win32_create_inferior): Handle Windows CE.
18490 Use strwinerror instead of strerror on Windows error
18491 codes. Add program to the error output.
18492 Don't close the main thread handle on Windows CE.
18493 (win32_attach): Use coredll.dll on Windows CE.
18494 (win32_kill): Close current process and current
18495 thread handles.
18496 (win32_detach): Use coredll.dll on Windows CE.
18497 (win32_resume): Let low target handle debug registers, and
18498 step request.
18499 (handle_exception): Add/Remove initial breakpoint. Avoid
18500 non-existant WSTOPSIG on Windows CE.
18501 (win32_read_inferior_memory): Cast to remove warning.
18502 (win32_arch_string): Go through the low target.
18503 (initialize_low): Call set_breakpoint_data with the low
18504 target's breakpoint.
18505 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
18506 FOP_REGNUM, mappings): Move to ...
18507 * win32-i386-low.c: ... here.
18508 * win32-low.c (win32_thread_info): Move to ...
18509 * win32-low.h: ... here.
18510 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
18511 win32-arm-low.c and wincecompat.c.
18512 (all:): Add $EXEEXT.
18513 (install-only:): Likewise.
18514 (gdbserver:): Likewise.
18515 (gdbreplay:): Likewise.
18516 * config.in: Regenerate.
18517 * configure: Regenerate.
18518
18519 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
18520
18521 * win32-low.c: Rename typedef thread_info to
18522 win32_thread_info throughout.
18523
18524 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
18525
18526 * win32-i386-low.c: Rename to ...
18527 * win32-low.c: ... this.
18528 * configure.srv: Replace win32-i386-low.o with win32-low.o.
18529 * Makefile.in: Likewise.
18530
18531 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
18532
18533 * remote-utils.c (monitor_output): Constify msg parameter.
18534 * server.h (monitor_output): Likewise.
18535 * win32-i386-low.c (handle_output_debug_string): New.
18536 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
18537 handle_output_debug_string.
18538 (get_child_debug_event): Likewise.
18539
18540 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
18541
18542 * server.c (main): Correct strtoul check.
18543
18544 2007-03-27 Jon Ringle <jon@ringle.org>
18545
18546 * linux-low.c: Check __ARCH_HAS_MMU__ also.
18547
18548 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
18549
18550 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
18551
18552 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
18553
18554 * terminal.h: Check HAVE_SGTTY_H.
18555
18556 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
18557
18558 * remote-utils.c (remote_open): Print out the assigned port number.
18559
18560 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
18561
18562 * remote-utils.c (monitor_output): New function.
18563 * server.c (debug_threads): Define here.
18564 (monitor_show_help): New function.
18565 (handle_query): Handle qRcmd.
18566 (main): Do not handle 'd' packet.
18567 * server.h (debug_threads, remote_debug, monitor_output): Declare.
18568 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
18569 of debug_threads.
18570
18571 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
18572
18573 * Makefile.in (EXEEXT): New.
18574 (clean): Use $(EXEEXT).
18575
18576 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
18577
18578 * target.h (target_ops): Rename send_signal to request_interrupt,
18579 and remove enum target_signal parameter.
18580 * linux-low.c (linux_request_interrupt): Rename from
18581 linux_send_signal, and always send SIGINT.
18582 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
18583 and always send SIGINT.
18584 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
18585 of send_signal.
18586 (input_interrupt): Likewise.
18587
18588 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
18589
18590 * server.c (get_features_xml): Check if target implemented
18591 arch_string.
18592 * win32-i386-low.c (win32_arch_string): New.
18593 (win32_target_ops): Add win32_arch_string as arch_string member.
18594
18595 2007-02-22 Markus Deuling <deuling@de.ibm.com>
18596
18597 * spu-low.c (spu_arch_string): New.
18598 (spu_target_ops): Add spu_arch_string.
18599
18600 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
18601
18602 * remote-utils.c: Remove HAVE_TERMINAL_H check.
18603 * configure.ac: Do not check for terminal.h.
18604 * configure, config.in: Regenerated.
18605
18606 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
18607
18608 * Makefile.in (OBS): Add $(XML_BUILTIN).
18609 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
18610 (clean): Update.
18611 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
18612 (arm-with-iwmmxt.c): New.
18613 * config.in, configure: Regenerate.
18614 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
18615 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
18616 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
18617 (arm*-*-linux*): Add iWMMXt and regset support.
18618 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
18619 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
18620 (arm_store_wmmxregset, target_regsets): New.
18621 * server.c (get_features_xml): Take annex argument. Check builtin
18622 XML documents.
18623 (handle_query): Handle multiple annexes.
18624
18625 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
18626
18627 * remote-utils.c [USE_WIN32API] (read, write): Define.
18628 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
18629 write.
18630
18631 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
18632
18633 * linux-i386-low.c (the_low_target): Set arch_string.
18634 * linux-x86-64-low.c (the_low_target): Likewise.
18635 * linux-low.c (linux_arch_string): New.
18636 (linux_target_ops): Add it.
18637 * linux-low.h (struct linux_target_ops): Add arch_string.
18638 * server.c (write_qxfer_response): Use const void * for DATA.
18639 (get_features_xml): New.
18640 (handle_query): Handle qXfer:features:read. Report it for qSupported.
18641 * target.h (struct target_ops): Add arch_string method.
18642
18643 2007-01-03 Denis Pilat <denis.pilat@st.com>
18644 Daniel Jacobowitz <dan@codesourcery.com>
18645
18646 * linux-low.c (linux_kill): Handle being called with no threads.
18647 * win32-i386-low.c (win32_kill): Likewise.
18648 (get_child_debug_event): Clear current_process_handle.
18649
18650 2006-12-30 Denis PILAT <denis.pilat@st.com>
18651 Daniel Jacobowitz <dan@codesourcery.com>
18652
18653 * remote-utils.c (remote_open): Check the type of specified
18654 serial port devices before opening them.
18655 * server.c (main): Kill the inferior if an error occurs during
18656 the first remote_open.
18657
18658 2006-12-05 Markus Deuling <deuling@de.ibm.com>
18659
18660 * README: Update supported targets.
18661
18662 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
18663
18664 * Makefile.in (clean): Remove reg-mips64.c.
18665 (reg-mips64.c, reg-mips64.o): New rules.
18666 * configure.srv: Handle mips64. Include regset support for mips.
18667 * linux-mips-low.c (union mips_register): New.
18668 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
18669 (mips_breakpoint, mips_breakpoint_at): Use int.
18670 (mips_collect_register, mips_supply_register)
18671 (mips_collect_register_32bit, mips_supply_register_32bit)
18672 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
18673 (mips_store_fpregset, target_regsets): New.
18674 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
18675
18676 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
18677
18678 * configure.srv: Add target "spu*-*-*".
18679 * Makefile.in (clean): Remove reg-spu.c.
18680 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
18681 * spu-low.c: New file.
18682
18683 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
18684
18685 * configure.ac: Correct td_thr_tls_get_addr test.
18686 * configure: Regenerated.
18687
18688 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
18689
18690 * linux-low.c (linux_wait_for_event): Reformat. Use the
18691 pass_signals array.
18692 * remote-utils.c (decode_address_to_semicolon): New.
18693 * server.c (pass_signals, handle_general_set): New.
18694 (handle_query): Mention QPassSignals for qSupported.
18695 (main): Call handle_general_set.
18696 * server.h (pass_signals, decode_address_to_semicolon): New.
18697
18698 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
18699
18700 * server.c (handle_query): Correct error handling for read_auxv.
18701
18702 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
18703
18704 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
18705 and srv_linux_thread_db to yes.
18706 * linux-s390-low.c (s390_fill_gregset): New function.
18707 (target_regsets): Define data structure.
18708
18709 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
18710
18711 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
18712 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
18713 * config.in, configure: Regenerated.
18714 * inferiors.c (gdb_id_to_thread): New function.
18715 (gdb_id_to_thread_id): Use it.
18716 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
18717 * linux-low.h (struct process_info): Add th member.
18718 (thread_db_get_tls_address): New prototype.
18719 * remote-utils.c (decode_address): Make non-static.
18720 * server.c (handle_query): Handle qGetTLSAddr.
18721 * server.h (gdb_id_to_thread, decode_address): New prototypes.
18722 * target.h (struct target_ops): Add get_tls_address.
18723 * thread-db.c (maybe_attach_thread): Save the thread handle.
18724 (thread_db_get_tls_address): New.
18725
18726 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
18727
18728 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
18729 (linux_resume_one_process): Take a siginfo_t *. Update all
18730 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
18731 (struct pending_signals): Add a siginfo_t.
18732 (linux_wait_for_process): Always set last_status.
18733 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
18734 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
18735 * linux-low.h (struct process_info): Add last_status.
18736
18737 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
18738
18739 * remote-utils.c (try_rle): New function.
18740 (putpkt_binary): Use it.
18741
18742 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
18743
18744 * Makefile.in (clean): Clean reg-x86-64-linux.c.
18745 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
18746 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
18747 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
18748 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
18749 point registers.
18750
18751 2006-08-08 Richard Sandiford <richard@codesourcery.com>
18752
18753 * server.c (terminal_fd): New variable.
18754 (old_foreground_pgrp): Likewise.
18755 (restore_old_foreground_pgrp): New function.
18756 (start_inferior): Record the terminal file descriptor in terminal_fd
18757 and its original foreground group in old_foreground_pgrp. Register
18758 restore_old_foreground_pgrp with atexit().
18759
18760 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
18761
18762 * server.c (handle_query): Correct qPart to qXfer.
18763
18764 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
18765
18766 * configure.ac: Check for more headers which are missing on
18767 Windows. Automatically supply -lwsock32 and USE_WIN32API.
18768 * configure.srv: Add Cygwin and mingw32.
18769 * remote-utils.c: Don't include headers unconditionally which
18770 are missing on mingw32. Include <winsock.h> for mingw32.
18771 (remote_open): Adjust for mingw32 support. Flush
18772 standard error after writing to it.
18773 (remote_close, putpkt_binary, input_interrupt, block_async_io)
18774 (unblock_async_io, enable_async_io, disable_async_io)
18775 (readchar, getpkt): Update for Winsock support.
18776 (prepare_resume_reply): Expect a protocol signal number.
18777 * server.c: Disable <sys/wait.h> on mingw32.
18778 (start_inferior): Adjust for mingw32 support. Flush
18779 standard error after writing to it.
18780 (attach_inferior): Likewise. Use protocol signal
18781 numbers.
18782 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
18783 and names.
18784 * win32-i386-low.c: New file.
18785 * Makefile.in (XM_CLIBS): Set.
18786 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
18787 (win32-i386-low.o): New dependency rule.
18788 * linux-low.c (linux_wait): Use target signal numbers.
18789 * target.h (struct target_ops): Doc fix.
18790 * server.h (target_signal_to_name): New prototype.
18791 * gdbreplay.c: Don't include headers unconditionally which
18792 are missing on mingw32. Include <winsock.h> for mingw32.
18793 (remote_close, remote_open): Adjust for Winsock support.
18794 * configure, config.in: Regenerated.
18795
18796 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
18797
18798 * server.c (decode_xfer_read, write_qxfer_response): New.
18799 (handle_query): Take a packet length argument. Handle
18800 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
18801 the qSupported response.
18802 (main): Update call to handle_query.
18803
18804 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
18805
18806 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
18807 (putpkt_binary): Renamed from putpkt and adjusted for binary
18808 data.
18809 (putpkt): New wrapper for putpkt_binary.
18810 (readchar): Don't mask off the high bit.
18811 (decode_X_packet): New function.
18812 * server.c (main): Call putpkt_binary if a handler sets the packet
18813 length. Save the length of the incoming packet. Handle 'X'.
18814 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
18815
18816 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
18817
18818 * server.c (handle_query): Handle qSupported.
18819
18820 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
18821
18822 * remote-utils.c (all_symbols_looked_up): New variable.
18823 (look_up_one_symbol): Check it.
18824 * server.h (look_up_one_symbol): New declaration.
18825 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
18826
18827 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
18828
18829 * Makefile.in (linux-arm-low.o): Update dependencies.
18830 * linux-arm-low.c: Include "gdb_proc_service.h".
18831 (PTRACE_GET_THREAD_AREA): Define.
18832 (ps_get_thread_area): New function.
18833
18834 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
18835
18836 * configure.srv (m68k*-*-uclinux*): New target.
18837 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
18838 (linux_resume_one_process): Remove extraneous cast.
18839 (linux_read_offsets): New.
18840 (linux_target_op): Add linux_read_offsets on mmuless systems.
18841 * server.c (handle_query): Add qOffsets logic.
18842 * target.h (struct target_ops): Add read_offsets.
18843
18844 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
18845
18846 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
18847 (PTRACE_GET_THREAD_AREA): Define.
18848 (ps_get_thread_area): New function.
18849 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
18850 (linux-x86-64-low.o): Update.
18851
18852 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
18853
18854 * configure.ac: Remove checks for prfpregset_t.
18855 * gdb_proc_service.h: New file.
18856 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
18857 new "gdb_proc_service.h".
18858 * proc-service.c: Likewise.
18859 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
18860 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
18861 * Makefile.in (gdb_proc_service_h): Updated.
18862 * configure, config.in: Regenerated.
18863
18864 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
18865
18866 * remote-utils.c (prepare_resume_reply): Move declaration
18867 of gdb_id_from_wait to the top of the block.
18868
18869 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
18870
18871 * linux-low.c (regsets_store_inferior_registers): Read the regset
18872 from the target before filling it.
18873
18874 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
18875
18876 * server.c (attach_inferior): Return SIGTRAP for a successful
18877 attach.
18878
18879 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
18880
18881 * Makefile.in (OBS): Add version.o.
18882 (STAGESTUFF): Delete.
18883 (version.o): Add dependencies.
18884 (version.c): Replace rule.
18885 (clean): Remove version.c.
18886 * server.c (gdbserver_version): New.
18887 (gdbserver_usage): Use printf.
18888 (main): Handle --version and --help.
18889 * server.h (version, host_name): Add declarations.
18890
18891 2005-12-23 Eli Zaretskii <eliz@gnu.org>
18892
18893 * linux-arm-low.c:
18894 * linux-arm-low.c:
18895 * inferiors.c:
18896 * i387-fp.h:
18897 * i387-fp.c:
18898 * gdbreplay.c:
18899 * regcache.c:
18900 * proc-service.c:
18901 * mem-break.h:
18902 * mem-break.c:
18903 * linux-x86-64-low.c:
18904 * linux-sh-low.c:
18905 * linux-s390-low.c:
18906 * linux-ppc64-low.c:
18907 * linux-ppc-low.c:
18908 * linux-mips-low.c:
18909 * linux-m68k-low.c:
18910 * linux-m32r-low.c:
18911 * linux-low.h:
18912 * linux-low.c:
18913 * linux-ia64-low.c:
18914 * linux-i386-low.c:
18915 * linux-crisv32-low.c:
18916 * thread-db.c:
18917 * terminal.h:
18918 * target.h:
18919 * target.c:
18920 * server.h:
18921 * server.c:
18922 * remote-utils.c:
18923 * regcache.h:
18924 * utils.c:
18925 * Makefile.in:
18926 * configure.ac:
18927 * gdbserver.1: Add (C) after Copyright. Update the FSF
18928 address.
18929
18930 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
18931
18932 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
18933 (arm_breakpoint_at): Recognize both breakpoints.
18934 (the_low_target): Use the correct breakpoint instruction.
18935
18936 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
18937
18938 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
18939 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
18940 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
18941 (the_low_target): Update.
18942
18943 2005-10-25 Andreas Schwab <schwab@suse.de>
18944
18945 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
18946
18947 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
18948 (ia64_num_regs): Reduce to 462.
18949
18950 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
18951
18952 * acinclude.m4: Correct quoting.
18953 * aclocal.m4: Regenerated.
18954
18955 Suggested by SZOKOVACS Robert <szo@ies.hu>:
18956 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
18957 (thread_db_init): Call thread_db_err_str.
18958 * configure.ac: Check for TD_VERSION.
18959 * config.in, configure: Regenerated.
18960
18961 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18962
18963 * server.h (error, fatal, warning): Add ATTR_FORMAT.
18964
18965 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
18966
18967 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
18968 is not available. Define HAVE_PTRACE_GETREGS if it is.
18969 * config.in, configure: Regenerated.
18970 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
18971 * linux-i386-low.c, linux-m68k-low.c: Update to use
18972 HAVE_PTRACE_GETREGS.
18973 * linux-low.c (regsets_fetch_inferior_registers)
18974 (regsets_store_inferior_registers): Only return 0 if we processed
18975 GENERAL_REGS.
18976 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
18977 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
18978
18979 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
18980
18981 * inferiors.c (struct thread_info): Add gdb_id.
18982 (add_thread): Add gdb_id argument.
18983 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
18984 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
18985 calls to add_thread.
18986 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
18987 * server.c (handle_query): Use thread_to_gdb_id.
18988 (handle_v_cont, main): Use gdb_id_to_thread_id.
18989 * server.h (add_thread): Update prototype.
18990 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
18991 prototypes.
18992
18993 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
18994
18995 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
18996 left-padded registers.
18997 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
18998 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
18999
19000 2005-07-01 Steve Ellcey <sje@cup.hp.com>
19001
19002 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
19003 * configure: Regenerate.
19004 * config.in: Regenerate.
19005 * server.h (NEED_DECLARATION_STRERROR):
19006 Replace with !HAVE_DECL_STRERROR.
19007
19008 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
19009
19010 * linux-low.c (linux_wait, linux_send_signal): Don't test
19011 an unsigned long variable for > 0 if it could be MAX_ULONG.
19012 * server.c (myresume): Likewise.
19013 * target.c (set_desired_inferior): Likewise.
19014
19015 2005-06-13 Mark Kettenis <kettenis@gnu.org>
19016
19017 * configure.ac: Simplify and improve check for socklen_t.
19018 * configure, config.in: Regenerate.
19019
19020 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
19021
19022 * acconfig.h: Remove.
19023 * configure.ac: Add a test for socklen_t. Use three-argument
19024 AC_DEFINE throughout.
19025 * config.in: Regenerated using autoheader 2.59.
19026 * configure: Regenerated.
19027
19028 * gdbreplay.c (socklen_t): Provide a default.
19029 (remote_open): Use socklen_t.
19030 * remote-utils.c (socklen_t): Provide a default.
19031 (remote_open): Use socklen_t.
19032 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
19033 unsigned char.
19034
19035 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
19036 char for buffers.
19037 * linux-low.c (linux_read_memory, linux_write_memory)
19038 (linux_read_auxv): Likewise.
19039 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
19040 (check_mem_write): Likewise.
19041 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
19042 Likewise.
19043 * regcache.c (struct inferior_rgcache_data, registers_to_string)
19044 (registers_from_string, register_data): Likewise.
19045 * server.c (handle_query, main): Likewise.
19046 * server.h (convert_ascii_to_int, convert_int_to_ascii)
19047 (decode_M_packet): Likewise.
19048 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
19049 * target.h (struct target_ops): Update read_memory, write_memory,
19050 and read_auxv.
19051 (read_inferior_memory, write_inferior_memory): Update.
19052 * linux-low.h (struct linux_target_ops): Change type of breakpoint
19053 to unsigned char *.
19054 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
19055 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
19056 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
19057 linux-s390-low.c, linux-sh-low.c: Update for changes in
19058 read_inferior_memory and the_low_target->breakpoint.
19059
19060 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
19061
19062 * Makefile.in (SFILES): Add linux-ppc64-low.c.
19063 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
19064 * configure.srv: Add powerpc64-*-linux*.
19065 * linux-ppc64-low.c: New file.
19066
19067 2005-05-23 Orjan Friberg <orjanf@axis.com>
19068
19069 * linux-cris-low.c: New file with support for CRIS.
19070 * linux-crisv32-low.c: Ditto for CRISv32.
19071 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
19072 (clean): Add reg-cris.c and reg-crisv32.c.
19073 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
19074 reg-crisv32.o, and reg-crisv32.c to make rules.
19075 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
19076 recognized targets.
19077
19078 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
19079
19080 * linux-low.c (fetch_register): Ensure buffer size is a multiple
19081 of sizeof (PTRACE_XFER_TYPE).
19082 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
19083
19084 2005-05-12 Orjan Friberg <orjanf@axis.com>
19085
19086 * target.h (struct target_ops): Add insert_watchpoint,
19087 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
19088 pointers for hardware watchpoint support.
19089 * linux-low.h (struct linux_target_ops): Ditto.
19090 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
19091 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
19092 to linux_target_ops.
19093 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
19094 reply packet.
19095 * server.c (main): Recognize 'Z' and 'z' packets.
19096
19097 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
19098
19099 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
19100 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
19101 (the_low_target): Add new members.
19102
19103 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
19104
19105 * proc-service.c (ps_lgetregs): Search all_processes instead of
19106 all_threads.
19107
19108 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
19109
19110 * server.c (start_inferior): Change return type to int.
19111 (attach_inferior): Change sigptr to int *.
19112 (handle_v_cont, handle_v_requests): Change signal to int *.
19113 (main): Change signal to int.
19114
19115 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
19116
19117 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
19118 * configure.srv: Add m32r*-*-linux*.
19119 * linux-m32r-low.c: New file.
19120
19121 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
19122
19123 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
19124
19125 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
19126
19127 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
19128 Take unsigned long arguments for PIDs.
19129 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
19130 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
19131 (wait_for_sigstop, linux_resume_one_process)
19132 (regsets_fetch_inferior_registers, linux_send_signal)
19133 (linux_read_auxv): Likewise. Update the types of variables holding
19134 PIDs. Update format string specifiers.
19135 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
19136 * remote-utils.c (prepare_resume_reply): Likewise.
19137 * server.c (cont_thread, general_thread, step_thread)
19138 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
19139 unsigned long.
19140 (handle_query): Update format specifiers.
19141 (handle_v_cont, main): Use strtoul for thread IDs.
19142 * server.h (struct inferior_list_entry): Use unsigned long for ID.
19143 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
19144 (general_thread, step_thread, thread_from_wait)
19145 (old_thread_from_wait): Update.
19146 * target.h (struct thread_resume): Use unsigned long for THREAD.
19147 (struct target_ops): Use unsigned long for arguments to attach and
19148 thread_alive.
19149
19150 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
19151
19152 * acinclude.m4: Include bfd/bfd.m4 directly.
19153 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
19154 <agriffis@toolchain.org>.
19155 * aclocal.m4, configure: Regenerated.
19156
19157 2005-01-07 Andrew Cagney <cagney@gnu.org>
19158
19159 * configure.ac: Rename configure.in, require autoconf 2.59.
19160 * configure: Re-generate.
19161
19162 2004-12-08 Daniel Jacobowitz <dan@debian.org>
19163
19164 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
19165 LIBS when finished.
19166 * aclocal.m4: Regenerated.
19167 * configure: Regenerated.
19168
19169 2004-11-21 Andreas Schwab <schwab@suse.de>
19170
19171 * linux-m68k-low.c (m68k_num_gregs): Define.
19172 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
19173 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
19174 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
19175 (m68k_breakpoint_at): New. Add to the_low_target.
19176
19177 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
19178 srv_linux_thread_db to yes.
19179
19180 2004-10-20 Joel Brobecker <brobecker@gnat.com>
19181
19182 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
19183 (ARCH_SET_FS): Likewise.
19184 (ARCH_GET_FS): Likewise.
19185 (ARCH_GET_GS): Likewise.
19186
19187 2004-10-16 Daniel Jacobowitz <dan@debian.org>
19188
19189 * linux-i386-low.c (ps_get_thread_area): New.
19190 * linux-x86-64-low.c (ps_get_thread_area): New.
19191 * linux-low.c: Include <sys/syscall.h>.
19192 (linux_kill_one_process): Don't kill the first thread here.
19193 (linux_kill): Kill the first thread here.
19194 (kill_lwp): New function.
19195 (send_sigstop, linux_send_signal): Use it.
19196 * proc-service.c: Clean up #ifdefs.
19197 (fpregset_info): Delete.
19198 (ps_lgetregs): Update and enable implementation.
19199 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
19200 implementations.
19201 * remote-utils.c (struct sym_cache, symbol_cache): New.
19202 (input_interrupt): Print a clearer message.
19203 (async_io_enabled): New variable.
19204 (enable_async_io, disable_async_io): Use it. Update comments.
19205 (look_up_one_symbol): Use the symbol cache.
19206 * thread-db.c (thread_db_look_up_symbols): New function.
19207 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
19208
19209 2004-10-16 Daniel Jacobowitz <dan@debian.org>
19210
19211 * configure.in: Test for -rdynamic.
19212 * configure: Regenerated.
19213 * Makefile (INTERNAL_LDFLAGS): New.
19214 (gdbserver, gdbreplay): Use it.
19215
19216 2004-09-02 Andrew Cagney <cagney@gnu.org>
19217
19218 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
19219
19220 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
19221
19222 * linux-low.c (linux_wait): Clear all_processes list also.
19223
19224 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
19225
19226 * linux-low.c: Include <errno.h>. Remove extern declaration of
19227 errno.
19228
19229 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
19230
19231 * gdbreplay.c, server.h, utils.c: Update copyright years.
19232
19233 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
19234
19235 * server.c (main): Print child status or termination signal from
19236 variable 'signal', not 'sig'.
19237
19238 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
19239
19240 * linux-low.c (linux_read_memory): Change return type to
19241 int. Check for and return error from ptrace().
19242 * target.c (read_inferior_memory): Change return type to int. Pass
19243 back return status from the_target->read_memory().
19244 * target.h (struct target_ops): Adapt *read_memory() prototype.
19245 Update comment.
19246 (read_inferior_memory): Adapt prototype.
19247 * server.c (main): Return an error packet if
19248 read_inferior_memory() returns an error.
19249
19250 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
19251
19252 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
19253 Unify with other clean targets.
19254
19255 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
19256
19257 * server.c (handle_v_cont): Call set_desired_inferior.
19258
19259 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
19260
19261 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
19262
19263 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
19264
19265 * linux-low.c (linux_wait): Unblock async I/O.
19266 (linux_resume): Block and enable async I/O.
19267 * remote-utils.c (block_async_io, unblock_async_io): New functions.
19268 * server.h (block_async_io, unblock_async_io): Add prototypes.
19269
19270 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
19271
19272 * remote-utils.c (remote_open): Print a status notice after
19273 opening a TCP port.
19274 * server.c (attach_inferior): Print a status notice after
19275 attaching.
19276
19277 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
19278
19279 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
19280
19281 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
19282
19283 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
19284 error packet.
19285 * server.c, target.h: Update copyright years.
19286
19287 2004-02-25 Roland McGrath <roland@redhat.com>
19288
19289 * target.h (struct target_ops): New member `read_auxv'.
19290 * server.c (handle_query): Handle qPart:auxv:read: query using that.
19291 * linux-low.c (linux_read_auxv): New function.
19292 (linux_target_ops): Initialize `read_auxv' member to that.
19293
19294 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
19295
19296 Committed by Jim Blandy <jimb@redhat.com>.
19297
19298 * linux-s390-low.c (s390_num_regs): Update.
19299 (s390_regmap): Remove control registers. Use __s390x__ predefine
19300 instead of GPR_SIZE to distiguish s390 and s390x targets.
19301
19302 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
19303
19304 * linux-low.c: Update copyright year.
19305 (check_removed_breakpoint): Clear pending_is_breakpoint.
19306 (linux_set_resume_request, linux_queue_one_thread)
19307 (resume_status_pending_p): New functions.
19308 (linux_continue_one_thread): Use process->resume.
19309 (linux_resume): Only resume threads if there are no pending events.
19310 * linux-low.h (struct process_info): Add resume request
19311 pointer.
19312
19313 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
19314
19315 * regcache.c (new_register_cache): Clear the allocated register
19316 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
19317
19318 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
19319
19320 * linux-low.c (linux_resume): Take a struct thread_resume *
19321 argument.
19322 (linux_wait): Update call.
19323 (resume_ptr): New static variable.
19324 (linux_continue_one_thread): Renamed from
19325 linux_continue_one_process. Use resume_ptr.
19326 (linux_resume): Use linux_continue_one_thread.
19327 * server.c (handle_v_cont, handle_v_requests): New functions.
19328 (myresume): New function.
19329 (main): Handle 'v' case.
19330 * target.h (struct thread_resume): New type.
19331 (struct target_ops): Change argument of "resume" to struct
19332 thread_resume *.
19333 (myresume): Delete macro.
19334
19335 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
19336
19337 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
19338 (uninstall): Support DESTDIR.
19339
19340 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
19341
19342 * configure.srv: Add xscale*linux copy of arm*linux entry.
19343
19344 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
19345
19346 * linux-arm-low.c (arm_reinsert_addr): New function.
19347 (the_low_target): Add arm_reinsert_addr.
19348
19349 2003-07-08 Mark Kettenis <kettenis@gnu.org>
19350
19351 * mem-break.c: Remove whitespace at end of file.
19352
19353 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
19354
19355 * configure.in: Check whether we need to prototype strerror.
19356 * server.h: Optionally prototype strerror.
19357 * gdbreplay.c (perror_with_name): Use strerror.
19358 * linux-low.c (linux_attach_lwp): Use strerror.
19359 * utils.c (perror_with_name): Use strerror.
19360 * config.in, configure: Regenerated.
19361
19362 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
19363
19364 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
19365 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
19366
19367 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
19368
19369 * Makefile.in (SFILES): Update.
19370 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
19371 low-sun3.c: Remove files.
19372
19373 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
19374
19375 * linux-low.c: Move comment to linux_thread_alive where it belonged.
19376 (linux_detach_one_process, linux_detach): New functions.
19377 (linux_target_ops): Add linux_detach.
19378 * server.c (main): Handle 'D' packet.
19379 * target.h (struct target_ops): Add "detach" member.
19380 (detach_inferior): Define.
19381
19382 2003-06-13 Mark Kettenis <kettenis@gnu.org>
19383
19384 From Kelley Cook <kelleycook@wideopenwest.com>:
19385 * configure.srv: Accept i[34567]86 variants.
19386
19387 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
19388
19389 * linux-low.c (linux_wait_for_event): Correct comment typos.
19390 (linux_resume_one_process): Call check_removed_breakpoint.
19391 (linux_send_signal): New function.
19392 (linux_target_ops): Add linux_send_signal.
19393 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
19394 of kill.
19395 * target.h (struct target_ops): Add send_signal.
19396
19397 2003-05-29 Jim Blandy <jimb@redhat.com>
19398
19399 * linux-low.c (usr_store_inferior_registers): Transfer buf in
19400 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
19401 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
19402 away part of the register's value.
19403
19404 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
19405
19406 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
19407 (linux_wait_for_event, linux_init_signals): Likewise.
19408
19409 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
19410
19411 * configure.in: Check for stdlib.h.
19412 * configure: Regenerated.
19413 * config.in: Regenerated.
19414
19415 2003-01-04 Andreas Schwab <schwab@suse.de>
19416
19417 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
19418
19419 2003-01-02 Andrew Cagney <ac131313@redhat.com>
19420
19421 * Makefile.in: Remove obsolete code.
19422
19423 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
19424
19425 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
19426 defined(PT_FPR0_HI).
19427
19428 2002-11-17 Stuart Hughes <seh@zee2.com>
19429
19430 * linux-arm-low.c (arm_num_regs): Increase.
19431 (arm_regmap): Include status register.
19432
19433 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
19434
19435 * linux-low.c (register_addr): Remove incorrect -1 check.
19436
19437 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
19438
19439 * linux-low.c (linux_create_inferior): Call setpgid. Return
19440 the new PID.
19441 (unstopped_p, linux_signal_pid): Remove.
19442 (linux_target_ops): Remove linux_signal_pid.
19443 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
19444 global instead of target method.
19445 * target.h (struct target_ops): Remove signal_pid. Update comment
19446 for create_inferior.
19447 * server.c (signal_pid): New variable.
19448 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
19449 gdbserver. Set the child to be the foreground process group.
19450 (attach_inferior): Set signal_pid.
19451
19452 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
19453
19454 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
19455
19456 2002-08-20 Jim Blandy <jimb@redhat.com>
19457
19458 * Makefile.in (LDFLAGS): Allow the configure script to establish a
19459 default for this.
19460
19461 2002-08-01 Andrew Cagney <cagney@redhat.com>
19462
19463 * Makefile.in: Make chill references obsolete.
19464
19465 2002-07-24 Kevin Buettner <kevinb@redhat.com>
19466
19467 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
19468 * configure: Regenerate.
19469 * config.in: Regenerate.
19470
19471 2002-07-09 David O'Brien <obrien@FreeBSD.org>
19472
19473 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
19474 (perror_with_name, remote_close, remote_open, expect, play): Static.
19475
19476 2002-07-04 Michal Ludvig <mludvig@suse.cz>
19477
19478 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
19479 byte offsets instead of an array of indexes.
19480 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
19481
19482 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
19483
19484 * regcache.c: Add comment.
19485
19486 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
19487
19488 * thread-db.c: New file.
19489 * proc-service.c: New file.
19490 * acinclude.m4: New file.
19491 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
19492 proc-service.o, and thread-db.o.
19493 (linux-low.o): Add USE_THREAD_DB.
19494 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
19495 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
19496 * aclocal.m4: Regenerated.
19497 * config.in: Regenerated.
19498 * configure: Regenerated.
19499 * configure.in: Check for proc_service.h, sys/procfs.h,
19500 thread_db.h, and linux/elf.h headrs.
19501 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
19502 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
19503 Check for -lthread_db and thread support.
19504 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
19505 PowerPC, and SuperH.
19506 * i387-fp.c: Constify arguments.
19507 * i387-fp.h: Likewise.
19508 * inferiors.c: (struct thread_info): Renamed from
19509 `struct inferior_info'. Remove PID member. Use generic inferior
19510 list header. All uses updated.
19511 (inferiors, signal_pid): Removed.
19512 (all_threads): New variable.
19513 (get_thread): Define.
19514 (add_inferior_to_list): New function.
19515 (for_each_inferior): New function.
19516 (change_inferior_id): New function.
19517 (add_inferior): Removed.
19518 (remove_inferior): New function.
19519 (add_thread): New function.
19520 (free_one_thread): New function.
19521 (remove_thread): New function.
19522 (clear_inferiors): Use for_each_inferior and free_one_thread.
19523 (find_inferior): New function.
19524 (find_inferior_id): New function.
19525 (inferior_target_data): Update argument type.
19526 (set_inferior_target_data): Likewise.
19527 (inferior_regcache_data): Likewise.
19528 (set_inferior_regcache_data): Likewise.
19529 * linux-low.c (linux_bp_reinsert): Remove.
19530 (all_processes, stopping_threads, using_thrads)
19531 (struct pending_signals, debug_threads, pid_of): New.
19532 (inferior_pid): Replace with macro.
19533 (struct inferior_linux_data): Remove.
19534 (get_stop_pc, add_process): New functions.
19535 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
19536 Use add_process and add_thread.
19537 (linux_attach_lwp): New function, based on old linux_attach. Use
19538 add_process and add_thread. Set stop_expected for new threads.
19539 (linux_attach): New function.
19540 (linux_kill_one_process): New function.
19541 (linux_kill): Kill all LWPs.
19542 (linux_thread_alive): Use find_inferior_id.
19543 (check_removed_breakpoints, status_pending_p): New functions.
19544 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
19545 Update. Use WNOHANG. Wait for cloned processes also. Update process
19546 struct for the found process.
19547 (linux_wait_for_event): New function.
19548 (linux_wait): Use it. Support LWPs.
19549 (send_sigstop, wait_for_sigstop, stop_all_processes)
19550 (linux_resume_one_process, linux_continue_one_process): New functions.
19551 (linux_resume): Support LWPs.
19552 (REGISTER_RAW_SIZE): Remove.
19553 (fetch_register): Use register_size instead. Call supply_register.
19554 (usr_store_inferior_registers): Likewise. Call collect_register.
19555 Fix recursive case.
19556 (regsets_fetch_inferior_registers): Improve error message.
19557 (regsets_store_inferior_registers): Add debugging.
19558 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
19559 (unstopped_p, linux_signal_pid): New functions.
19560 (linux_target_ops): Add linux_signal_pid.
19561 (linux_init_signals): New function.
19562 (initialize_low): Call it. Initialize using_threads.
19563 * regcache.c (inferior_regcache_data): Add valid
19564 flag.
19565 (get_regcache): Fetch registers lazily. Add fetch argument
19566 and update all callers.
19567 (regcache_invalidate_one, regcache_invalidate): New
19568 functions.
19569 (new_register_cache): Renamed from create_register_cache.
19570 Return the new regcache.
19571 (free_register_cache): Change argument to a void *.
19572 (registers_to_string, registers_from_string): Call get_regcache
19573 with fetch flag set.
19574 (register_data): Make static. Pass fetch flag to get_regcache.
19575 (supply_register): Call get_regcache with fetch flag clear.
19576 (collect_register): Call get_regcache with fetch flag set.
19577 (collect_register_as_string): New function.
19578 * regcache.h: Update.
19579 * remote-utils.c (putpkt): Flush after debug output and use
19580 stderr.
19581 Handle input interrupts while waiting for an ACK.
19582 (input_interrupt): Use signal_pid method.
19583 (getpkt): Flush after debug output and use stderr.
19584 (outreg): Use collect_register_as_string.
19585 (new_thread_notify, dead_thread_notify): New functions.
19586 (prepare_resume_reply): Check using_threads. Set thread_from_wait
19587 and general_thread.
19588 (look_up_one_symbol): Flush after debug output.
19589 * server.c (step_thread, server_waiting): New variables.
19590 (start_inferior): Don't use signal_pid. Update call to mywait.
19591 (attach_inferior): Update call to mywait.
19592 (handle_query): Handle qfThreadInfo and qsThreadInfo.
19593 (main): Don't fetch/store registers explicitly. Use
19594 set_desired_inferior. Support proposed ``Hs'' packet. Update
19595 calls to mywait.
19596 * server.h: Update.
19597 (struct inferior_list, struct_inferior_list_entry): New.
19598 * target.c (set_desired_inferior): New.
19599 (write_inferior_memory): Constify.
19600 (mywait): New function.
19601 * target.h: Update.
19602 (struct target_ops): New signal_pid method.
19603 (mywait): Removed macro, added prototype.
19604
19605 * linux-low.h (regset_func): Removed.
19606 (regset_fill_func, regset_store_func): New.
19607 (enum regset_type): New.
19608 (struct regset_info): Add type field. Use new operation types.
19609 (struct linux_target_ops): stop_pc renamed to get_pc.
19610 Add decr_pc_after_break and breakpoint_at.
19611 (get_process, get_thread_proess, get_process_thread)
19612 (strut process_info, all_processes, linux_attach_lwp)
19613 (thread_db_init): New.
19614
19615 * linux-arm-low.c (arm_get_pc, arm_set_pc,
19616 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
19617 (the_low_target): Add new members.
19618 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
19619 (i386_store_fpxregset): Constify.
19620 (target_regsets): Add new kind identifier.
19621 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
19622 (i386_set_pc): Add debugging.
19623 (i386_breakpoint_at): New function.
19624 (the_low_target): Add new members.
19625 * linux-mips-low.c (mips_get_pc, mips_set_pc)
19626 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
19627 (mips_breakpoint_at): New.
19628 (the_low_target): Add new members.
19629 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
19630 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
19631 (the_low_target): Add new members.
19632 * linux-sh-low.c (sh_get_pc, sh_set_pc)
19633 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
19634 (the_low_target): Add new members.
19635 * linux-x86-64-low.c (target_regsets): Add new kind
19636 identifier.
19637
19638 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
19639
19640 From Martin Pool <mbp@samba.org>:
19641 * server.c (gdbserver_usage): New function.
19642 (main): Call it.
19643
19644 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
19645
19646 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
19647 stop_at -> stop_pc.
19648
19649 2002-05-04 Andrew Cagney <ac131313@redhat.com>
19650
19651 * Makefile.in: Remove obsolete code.
19652
19653 2002-04-24 Michal Ludvig <mludvig@suse.cz>
19654
19655 * linux-low.c (regsets_fetch_inferior_registers),
19656 (regsets_store_inferior_registers): Removed cast to int from
19657 ptrace() calls.
19658 * regcache.h: Added declaration of struct inferior_info.
19659
19660 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
19661
19662 * inferiors.c (struct inferior_info): Add regcache_data.
19663 (add_inferior): Call create_register_cache.
19664 (clear_inferiors): Call free_register_cache.
19665 (inferior_regcache_data, set_inferior_regcache_data): New functions.
19666 * regcache.c (struct inferior_regcache_data): New.
19667 (registers): Remove.
19668 (get_regcache): New function.
19669 (create_register_cache, free_register_cache): New functions.
19670 (set_register_cache): Don't initialize the register cache here.
19671 (registers_to_string, registers_from_string, register_data): Call
19672 get_regcache.
19673 * regcache.h: Add prototypes.
19674 * server.h: Likewise.
19675
19676 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
19677
19678 * mem-break.c: New file.
19679 * mem-break.h: New file.
19680 * Makefile.in: Add mem-break.o rule; update server.h
19681 dependencies.
19682 * inferiors.c (struct inferior_info): Add target_data
19683 member.
19684 (clear_inferiors): Free target_data member if set.
19685 (inferior_target_data, set_inferior_target_data): New functions.
19686 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
19687 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
19688 * linux-low.c (linux_bp_reinsert): New variable.
19689 (struct inferior_linux_data): New.
19690 (linux_create_inferior): Use set_inferior_target_data.
19691 (linux_attach): Likewise. Call add_inferior.
19692 (linux_wait_for_one_inferior): New function.
19693 (linux_wait): Call it.
19694 (linux_write_memory): Add const.
19695 (initialize_low): Call set_breakpoint_data.
19696 * linux-low.h (struct linux_target_ops): Add breakpoint
19697 handling members.
19698 * server.c (attach_inferior): Remove extra add_inferior
19699 call.
19700 * server.h: Include mem-break.h. Update inferior.c
19701 prototypes.
19702 * target.c (read_inferior_memory)
19703 (write_inferior_memory): New functions.
19704 * target.h (read_inferior_memory)
19705 (write_inferior_memory): Change macros to prototypes.
19706 (struct target_ops): Update comments. Add const to write_memory
19707 definition.
19708
19709 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
19710
19711 * linux-low.c (usr_store_inferior_registers): Support
19712 registers which are allowed to fail to store.
19713 * linux-low.h (linux_target_ops): Likewise.
19714 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
19715 (ppc_cannot_store_register): FPSCR may not be storable.
19716
19717 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19718
19719 * server.h: Include <string.h> if HAVE_STRING_H.
19720 * ChangeLog: Correct paths in last ChangeLog entry.
19721
19722 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19723
19724 * linux-low.h: Remove obsolete prototypes.
19725 (struct linux_target_ops): New.
19726 (extern the_low_target): New.
19727 * linux-low.c (num_regs, regmap): Remove declarations.
19728 (register_addr): Use the_low_target explicitly.
19729 (fetch_register): Likewise.
19730 (usr_fetch_inferior_registers): Likewise.
19731 (usr_store_inferior_registers): Likewise.
19732 * linux-arm-low.c (num_regs): Remove.
19733 (arm_num_regs): Define.
19734 (arm_regmap): Renamed from regmap, made static.
19735 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
19736 made static.
19737 (arm_cannot_store_register): Renamed from cannot_store_register,
19738 made static.
19739 (the_low_target): New.
19740 * linux-i386-low.c (num_regs): Remove.
19741 (i386_num_regs): Define.
19742 (i386_regmap): Renamed from regmap, made static.
19743 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
19744 made static.
19745 (i386_cannot_store_register): Renamed from cannot_store_register,
19746 made static.
19747 (the_low_target): New.
19748 * linux-ia64-low.c (num_regs): Remove.
19749 (ia64_num_regs): Define.
19750 (ia64_regmap): Renamed from regmap, made static.
19751 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
19752 made static.
19753 (ia64_cannot_store_register): Renamed from cannot_store_register,
19754 made static.
19755 (the_low_target): New.
19756 * linux-m68k-low.c (num_regs): Remove.
19757 (m68k_num_regs): Define.
19758 (m68k_regmap): Renamed from regmap, made static.
19759 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
19760 made static.
19761 (m68k_cannot_store_register): Renamed from cannot_store_register,
19762 made static.
19763 (the_low_target): New.
19764 * linux-mips-low.c (num_regs): Remove.
19765 (mips_num_regs): Define.
19766 (mips_regmap): Renamed from regmap, made static.
19767 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
19768 made static.
19769 (mips_cannot_store_register): Renamed from cannot_store_register,
19770 made static.
19771 (the_low_target): New.
19772 * linux-ppc-low.c (num_regs): Remove.
19773 (ppc_num_regs): Define.
19774 (ppc_regmap): Renamed from regmap, made static.
19775 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
19776 made static.
19777 (ppc_cannot_store_register): Renamed from cannot_store_register,
19778 made static.
19779 (the_low_target): New.
19780 * linux-s390-low.c (num_regs): Remove.
19781 (s390_num_regs): Define.
19782 (s390_regmap): Renamed from regmap, made static.
19783 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
19784 made static.
19785 (s390_cannot_store_register): Renamed from cannot_store_register,
19786 made static.
19787 (the_low_target): New.
19788 * linux-sh-low.c (num_regs): Remove.
19789 (sh_num_regs): Define.
19790 (sh_regmap): Renamed from regmap, made static.
19791 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
19792 made static.
19793 (sh_cannot_store_register): Renamed from cannot_store_register,
19794 made static.
19795 (the_low_target): New.
19796 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
19797 (the_low_target): New.
19798
19799 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19800
19801 * Makefile.in: Add stamp-h target.
19802 * configure.in: Create stamp-h.
19803 * configure: Regenerated.
19804
19805 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19806
19807 * inferiors.c: New file.
19808 * target.c: New file.
19809 * target.h: New file.
19810 * Makefile.in: Add target.o and inferiors.o. Update
19811 dependencies.
19812 * linux-low.c (inferior_pid): New static variable,
19813 moved from server.c.
19814 (linux_create_inferior): Renamed from create_inferior.
19815 Call add_inferior. Return 0 on success instead of a PID.
19816 (linux_attach): Renamed from myattach.
19817 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
19818 (linux_thread_alive): Renamed from mythread_alive.
19819 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
19820 child dies.
19821 (linux_resume): Renamed from myresume. Add missing ``return 0''.
19822 (regsets_store_inferior_registers): Correct error message.
19823 Add missing ``return 0''.
19824 (linux_fetch_registers): Renamed from fetch_inferior_registers.
19825 (linux_store_registers): Renamed from store_inferior_registers.
19826 (linux_read_memory): Renamed from read_inferior_memory.
19827 (linux_write_memory): Renamed from write_inferior_memory.
19828 (linux_target_ops): New structure.
19829 (initialize_low): Call set_target_ops ().
19830 * remote-utils.c (unhexify): New function.
19831 (hexify): New function.
19832 (input_interrupt): Send signals to ``signal_pid''.
19833 * server.c (inferior_pid): Remove.
19834 (start_inferior): Update create_inferior call.
19835 (attach_inferior): Call add_inferior.
19836 (handle_query): New function.
19837 (main): Call handle_query for `q' packets.
19838 * server.h: Include "target.h". Remove obsolete prototypes.
19839 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
19840
19841 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19842
19843 * Makefile.in: Add WARN_CFLAGS. Update configury
19844 dependencies.
19845 * configure.in: Check for <string.h>
19846 * configure: Regenerate.
19847 * config.in: Regenerate.
19848 * gdbreplay.c: Include needed system headers.
19849 (remote_open): Remove strchr prototype.
19850 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
19851 * regcache.c (supply_register): Change buf argument to const void *.
19852 (supply_register_by_name): Likewise.
19853 (collect_register): Change buf argument to void *.
19854 (collect_register_by_name): Likewise.
19855 * regcache.h: Add missing prototypes.
19856 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
19857 * server.c (handle_query): New function.
19858 (attached): New static variable, moved out of main.
19859 (main): Quiet longjmp clobber warnings.
19860 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
19861 * utils.c (error): Remove NORETURN.
19862 (fatal): Likewise.
This page took 0.534846 seconds and 3 git commands to generate.